// *** WARNING: this file was generated by pulumi-java-gen. ***
// *** Do not edit by hand unless you're certain you know what you are doing! ***

package com.pulumi.azure.apimanagement.outputs;

import com.pulumi.core.annotations.CustomType;
import java.lang.Boolean;
import java.util.Objects;
import java.util.Optional;
import javax.annotation.Nullable;

@CustomType
public final class BackendTls {
    /**
     * @return Flag indicating whether SSL certificate chain validation should be done when using self-signed certificates for the backend host.
     * 
     */
    private @Nullable Boolean validateCertificateChain;
    /**
     * @return Flag indicating whether SSL certificate name validation should be done when using self-signed certificates for the backend host.
     * 
     */
    private @Nullable Boolean validateCertificateName;

    private BackendTls() {}
    /**
     * @return Flag indicating whether SSL certificate chain validation should be done when using self-signed certificates for the backend host.
     * 
     */
    public Optional<Boolean> validateCertificateChain() {
        return Optional.ofNullable(this.validateCertificateChain);
    }
    /**
     * @return Flag indicating whether SSL certificate name validation should be done when using self-signed certificates for the backend host.
     * 
     */
    public Optional<Boolean> validateCertificateName() {
        return Optional.ofNullable(this.validateCertificateName);
    }

    public static Builder builder() {
        return new Builder();
    }

    public static Builder builder(BackendTls defaults) {
        return new Builder(defaults);
    }
    @CustomType.Builder
    public static final class Builder {
        private @Nullable Boolean validateCertificateChain;
        private @Nullable Boolean validateCertificateName;
        public Builder() {}
        public Builder(BackendTls defaults) {
    	      Objects.requireNonNull(defaults);
    	      this.validateCertificateChain = defaults.validateCertificateChain;
    	      this.validateCertificateName = defaults.validateCertificateName;
        }

        @CustomType.Setter
        public Builder validateCertificateChain(@Nullable Boolean validateCertificateChain) {
            this.validateCertificateChain = validateCertificateChain;
            return this;
        }
        @CustomType.Setter
        public Builder validateCertificateName(@Nullable Boolean validateCertificateName) {
            this.validateCertificateName = validateCertificateName;
            return this;
        }
        public BackendTls build() {
            final var o = new BackendTls();
            o.validateCertificateChain = validateCertificateChain;
            o.validateCertificateName = validateCertificateName;
            return o;
        }
    }
}
