// 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.azure.core.util.CoreUtils;
import com.fasterxml.jackson.annotation.JsonProperty;
import java.time.OffsetDateTime;

/** Configuration properties for apps environment custom domain. */
@Fluent
public final class CustomDomainConfiguration {
    /*
     * Id used to verify domain name ownership
     */
    @JsonProperty(value = "customDomainVerificationId", access = JsonProperty.Access.WRITE_ONLY)
    private String customDomainVerificationId;

    /*
     * Dns suffix for the environment domain
     */
    @JsonProperty(value = "dnsSuffix")
    private String dnsSuffix;

    /*
     * PFX or PEM blob
     */
    @JsonProperty(value = "certificateValue")
    private byte[] certificateValue;

    /*
     * Certificate password
     */
    @JsonProperty(value = "certificatePassword")
    private String certificatePassword;

    /*
     * Certificate expiration date.
     */
    @JsonProperty(value = "expirationDate", access = JsonProperty.Access.WRITE_ONLY)
    private OffsetDateTime expirationDate;

    /*
     * Certificate thumbprint.
     */
    @JsonProperty(value = "thumbprint", access = JsonProperty.Access.WRITE_ONLY)
    private String thumbprint;

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

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

    /**
     * Get the customDomainVerificationId property: Id used to verify domain name ownership.
     *
     * @return the customDomainVerificationId value.
     */
    public String customDomainVerificationId() {
        return this.customDomainVerificationId;
    }

    /**
     * Get the dnsSuffix property: Dns suffix for the environment domain.
     *
     * @return the dnsSuffix value.
     */
    public String dnsSuffix() {
        return this.dnsSuffix;
    }

    /**
     * Set the dnsSuffix property: Dns suffix for the environment domain.
     *
     * @param dnsSuffix the dnsSuffix value to set.
     * @return the CustomDomainConfiguration object itself.
     */
    public CustomDomainConfiguration withDnsSuffix(String dnsSuffix) {
        this.dnsSuffix = dnsSuffix;
        return this;
    }

    /**
     * Get the certificateValue property: PFX or PEM blob.
     *
     * @return the certificateValue value.
     */
    public byte[] certificateValue() {
        return CoreUtils.clone(this.certificateValue);
    }

    /**
     * Set the certificateValue property: PFX or PEM blob.
     *
     * @param certificateValue the certificateValue value to set.
     * @return the CustomDomainConfiguration object itself.
     */
    public CustomDomainConfiguration withCertificateValue(byte[] certificateValue) {
        this.certificateValue = CoreUtils.clone(certificateValue);
        return this;
    }

    /**
     * Get the certificatePassword property: Certificate password.
     *
     * @return the certificatePassword value.
     */
    public String certificatePassword() {
        return this.certificatePassword;
    }

    /**
     * Set the certificatePassword property: Certificate password.
     *
     * @param certificatePassword the certificatePassword value to set.
     * @return the CustomDomainConfiguration object itself.
     */
    public CustomDomainConfiguration withCertificatePassword(String certificatePassword) {
        this.certificatePassword = certificatePassword;
        return this;
    }

    /**
     * Get the expirationDate property: Certificate expiration date.
     *
     * @return the expirationDate value.
     */
    public OffsetDateTime expirationDate() {
        return this.expirationDate;
    }

    /**
     * Get the thumbprint property: Certificate thumbprint.
     *
     * @return the thumbprint value.
     */
    public String thumbprint() {
        return this.thumbprint;
    }

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

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