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

package com.azure.resourcemanager.apimanagement.models;

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

/** Properties controlling TLS Certificate Validation. */
@Fluent
public final class BackendTlsProperties {
    /*
     * Flag indicating whether SSL certificate chain validation should be done
     * when using self-signed certificates for this backend host.
     */
    @JsonProperty(value = "validateCertificateChain")
    private Boolean validateCertificateChain;

    /*
     * Flag indicating whether SSL certificate name validation should be done
     * when using self-signed certificates for this backend host.
     */
    @JsonProperty(value = "validateCertificateName")
    private Boolean validateCertificateName;

    /**
     * Get the validateCertificateChain property: Flag indicating whether SSL certificate chain validation should be
     * done when using self-signed certificates for this backend host.
     *
     * @return the validateCertificateChain value.
     */
    public Boolean validateCertificateChain() {
        return this.validateCertificateChain;
    }

    /**
     * Set the validateCertificateChain property: Flag indicating whether SSL certificate chain validation should be
     * done when using self-signed certificates for this backend host.
     *
     * @param validateCertificateChain the validateCertificateChain value to set.
     * @return the BackendTlsProperties object itself.
     */
    public BackendTlsProperties withValidateCertificateChain(Boolean validateCertificateChain) {
        this.validateCertificateChain = validateCertificateChain;
        return this;
    }

    /**
     * Get the validateCertificateName property: Flag indicating whether SSL certificate name validation should be done
     * when using self-signed certificates for this backend host.
     *
     * @return the validateCertificateName value.
     */
    public Boolean validateCertificateName() {
        return this.validateCertificateName;
    }

    /**
     * Set the validateCertificateName property: Flag indicating whether SSL certificate name validation should be done
     * when using self-signed certificates for this backend host.
     *
     * @param validateCertificateName the validateCertificateName value to set.
     * @return the BackendTlsProperties object itself.
     */
    public BackendTlsProperties withValidateCertificateName(Boolean validateCertificateName) {
        this.validateCertificateName = validateCertificateName;
        return this;
    }

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