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

package com.azure.resourcemanager.appcontainers.models;

import com.azure.core.annotation.Fluent;
import com.fasterxml.jackson.annotation.JsonProperty;

/** Certificate resource specific properties. */
@Fluent
public final class ManagedCertificateProperties {
    /*
     * Provisioning state of the certificate.
     */
    @JsonProperty(value = "provisioningState", access = JsonProperty.Access.WRITE_ONLY)
    private CertificateProvisioningState provisioningState;

    /*
     * Subject name of the certificate.
     */
    @JsonProperty(value = "subjectName")
    private String subjectName;

    /*
     * Any error occurred during the certificate provision.
     */
    @JsonProperty(value = "error", access = JsonProperty.Access.WRITE_ONLY)
    private String error;

    /*
     * Selected type of domain control validation for managed certificates.
     */
    @JsonProperty(value = "domainControlValidation")
    private ManagedCertificateDomainControlValidation domainControlValidation;

    /*
     * A TXT token used for DNS TXT domain control validation when issuing this type of managed certificates.
     */
    @JsonProperty(value = "validationToken", access = JsonProperty.Access.WRITE_ONLY)
    private String validationToken;

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

    /**
     * Get the provisioningState property: Provisioning state of the certificate.
     *
     * @return the provisioningState value.
     */
    public CertificateProvisioningState provisioningState() {
        return this.provisioningState;
    }

    /**
     * Get the subjectName property: Subject name of the certificate.
     *
     * @return the subjectName value.
     */
    public String subjectName() {
        return this.subjectName;
    }

    /**
     * Set the subjectName property: Subject name of the certificate.
     *
     * @param subjectName the subjectName value to set.
     * @return the ManagedCertificateProperties object itself.
     */
    public ManagedCertificateProperties withSubjectName(String subjectName) {
        this.subjectName = subjectName;
        return this;
    }

    /**
     * Get the error property: Any error occurred during the certificate provision.
     *
     * @return the error value.
     */
    public String error() {
        return this.error;
    }

    /**
     * Get the domainControlValidation property: Selected type of domain control validation for managed certificates.
     *
     * @return the domainControlValidation value.
     */
    public ManagedCertificateDomainControlValidation domainControlValidation() {
        return this.domainControlValidation;
    }

    /**
     * Set the domainControlValidation property: Selected type of domain control validation for managed certificates.
     *
     * @param domainControlValidation the domainControlValidation value to set.
     * @return the ManagedCertificateProperties object itself.
     */
    public ManagedCertificateProperties withDomainControlValidation(
        ManagedCertificateDomainControlValidation domainControlValidation) {
        this.domainControlValidation = domainControlValidation;
        return this;
    }

    /**
     * Get the validationToken property: A TXT token used for DNS TXT domain control validation when issuing this type
     * of managed certificates.
     *
     * @return the validationToken value.
     */
    public String validationToken() {
        return this.validationToken;
    }

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