// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
// Code generated by Microsoft (R) AutoRest Code Generator.

package com.azure.resourcemanager.machinelearning.models;

import com.azure.core.annotation.Fluent;
import com.azure.resourcemanager.machinelearning.fluent.models.DatastoreSecretsInner;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.annotation.JsonTypeInfo;
import com.fasterxml.jackson.annotation.JsonTypeName;

/** Datastore certificate secrets. */
@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "secretsType")
@JsonTypeName("Certificate")
@Fluent
public final class CertificateDatastoreSecrets extends DatastoreSecretsInner {
    /*
     * Service principal certificate.
     */
    @JsonProperty(value = "certificate")
    private String certificate;

    /** Creates an instance of CertificateDatastoreSecrets class. */
    public CertificateDatastoreSecrets() {
    }

    /**
     * Get the certificate property: Service principal certificate.
     *
     * @return the certificate value.
     */
    public String certificate() {
        return this.certificate;
    }

    /**
     * Set the certificate property: Service principal certificate.
     *
     * @param certificate the certificate value to set.
     * @return the CertificateDatastoreSecrets object itself.
     */
    public CertificateDatastoreSecrets withCertificate(String certificate) {
        this.certificate = certificate;
        return this;
    }

    /**
     * Validates the instance.
     *
     * @throws IllegalArgumentException thrown if the instance is not valid.
     */
    @Override
    public void validate() {
        super.validate();
    }
}
