// *** 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.aws.appmesh.inputs;

import com.pulumi.aws.appmesh.inputs.VirtualNodeSpecListenerTlsCertificateArgs;
import com.pulumi.aws.appmesh.inputs.VirtualNodeSpecListenerTlsValidationArgs;
import com.pulumi.core.Output;
import com.pulumi.core.annotations.Import;
import java.lang.String;
import java.util.Objects;
import java.util.Optional;
import javax.annotation.Nullable;


public final class VirtualNodeSpecListenerTlsArgs extends com.pulumi.resources.ResourceArgs {

    public static final VirtualNodeSpecListenerTlsArgs Empty = new VirtualNodeSpecListenerTlsArgs();

    /**
     * Listener&#39;s TLS certificate.
     * 
     */
    @Import(name="certificate", required=true)
    private Output<VirtualNodeSpecListenerTlsCertificateArgs> certificate;

    /**
     * @return Listener&#39;s TLS certificate.
     * 
     */
    public Output<VirtualNodeSpecListenerTlsCertificateArgs> certificate() {
        return this.certificate;
    }

    /**
     * Listener&#39;s TLS mode. Valid values: `DISABLED`, `PERMISSIVE`, `STRICT`.
     * 
     */
    @Import(name="mode", required=true)
    private Output<String> mode;

    /**
     * @return Listener&#39;s TLS mode. Valid values: `DISABLED`, `PERMISSIVE`, `STRICT`.
     * 
     */
    public Output<String> mode() {
        return this.mode;
    }

    /**
     * Listener&#39;s Transport Layer Security (TLS) validation context.
     * 
     */
    @Import(name="validation")
    private @Nullable Output<VirtualNodeSpecListenerTlsValidationArgs> validation;

    /**
     * @return Listener&#39;s Transport Layer Security (TLS) validation context.
     * 
     */
    public Optional<Output<VirtualNodeSpecListenerTlsValidationArgs>> validation() {
        return Optional.ofNullable(this.validation);
    }

    private VirtualNodeSpecListenerTlsArgs() {}

    private VirtualNodeSpecListenerTlsArgs(VirtualNodeSpecListenerTlsArgs $) {
        this.certificate = $.certificate;
        this.mode = $.mode;
        this.validation = $.validation;
    }

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

    public static final class Builder {
        private VirtualNodeSpecListenerTlsArgs $;

        public Builder() {
            $ = new VirtualNodeSpecListenerTlsArgs();
        }

        public Builder(VirtualNodeSpecListenerTlsArgs defaults) {
            $ = new VirtualNodeSpecListenerTlsArgs(Objects.requireNonNull(defaults));
        }

        /**
         * @param certificate Listener&#39;s TLS certificate.
         * 
         * @return builder
         * 
         */
        public Builder certificate(Output<VirtualNodeSpecListenerTlsCertificateArgs> certificate) {
            $.certificate = certificate;
            return this;
        }

        /**
         * @param certificate Listener&#39;s TLS certificate.
         * 
         * @return builder
         * 
         */
        public Builder certificate(VirtualNodeSpecListenerTlsCertificateArgs certificate) {
            return certificate(Output.of(certificate));
        }

        /**
         * @param mode Listener&#39;s TLS mode. Valid values: `DISABLED`, `PERMISSIVE`, `STRICT`.
         * 
         * @return builder
         * 
         */
        public Builder mode(Output<String> mode) {
            $.mode = mode;
            return this;
        }

        /**
         * @param mode Listener&#39;s TLS mode. Valid values: `DISABLED`, `PERMISSIVE`, `STRICT`.
         * 
         * @return builder
         * 
         */
        public Builder mode(String mode) {
            return mode(Output.of(mode));
        }

        /**
         * @param validation Listener&#39;s Transport Layer Security (TLS) validation context.
         * 
         * @return builder
         * 
         */
        public Builder validation(@Nullable Output<VirtualNodeSpecListenerTlsValidationArgs> validation) {
            $.validation = validation;
            return this;
        }

        /**
         * @param validation Listener&#39;s Transport Layer Security (TLS) validation context.
         * 
         * @return builder
         * 
         */
        public Builder validation(VirtualNodeSpecListenerTlsValidationArgs validation) {
            return validation(Output.of(validation));
        }

        public VirtualNodeSpecListenerTlsArgs build() {
            $.certificate = Objects.requireNonNull($.certificate, "expected parameter 'certificate' to be non-null");
            $.mode = Objects.requireNonNull($.mode, "expected parameter 'mode' to be non-null");
            return $;
        }
    }

}
