// *** 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.outputs;

import com.pulumi.aws.appmesh.outputs.VirtualGatewaySpecListenerConnectionPool;
import com.pulumi.aws.appmesh.outputs.VirtualGatewaySpecListenerHealthCheck;
import com.pulumi.aws.appmesh.outputs.VirtualGatewaySpecListenerPortMapping;
import com.pulumi.aws.appmesh.outputs.VirtualGatewaySpecListenerTls;
import com.pulumi.core.annotations.CustomType;
import java.util.Objects;
import java.util.Optional;
import javax.annotation.Nullable;

@CustomType
public final class VirtualGatewaySpecListener {
    /**
     * @return Connection pool information for the listener.
     * 
     */
    private @Nullable VirtualGatewaySpecListenerConnectionPool connectionPool;
    /**
     * @return Health check information for the listener.
     * 
     */
    private @Nullable VirtualGatewaySpecListenerHealthCheck healthCheck;
    /**
     * @return Port mapping information for the listener.
     * 
     */
    private VirtualGatewaySpecListenerPortMapping portMapping;
    /**
     * @return Transport Layer Security (TLS) properties for the listener
     * 
     */
    private @Nullable VirtualGatewaySpecListenerTls tls;

    private VirtualGatewaySpecListener() {}
    /**
     * @return Connection pool information for the listener.
     * 
     */
    public Optional<VirtualGatewaySpecListenerConnectionPool> connectionPool() {
        return Optional.ofNullable(this.connectionPool);
    }
    /**
     * @return Health check information for the listener.
     * 
     */
    public Optional<VirtualGatewaySpecListenerHealthCheck> healthCheck() {
        return Optional.ofNullable(this.healthCheck);
    }
    /**
     * @return Port mapping information for the listener.
     * 
     */
    public VirtualGatewaySpecListenerPortMapping portMapping() {
        return this.portMapping;
    }
    /**
     * @return Transport Layer Security (TLS) properties for the listener
     * 
     */
    public Optional<VirtualGatewaySpecListenerTls> tls() {
        return Optional.ofNullable(this.tls);
    }

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

    public static Builder builder(VirtualGatewaySpecListener defaults) {
        return new Builder(defaults);
    }
    @CustomType.Builder
    public static final class Builder {
        private @Nullable VirtualGatewaySpecListenerConnectionPool connectionPool;
        private @Nullable VirtualGatewaySpecListenerHealthCheck healthCheck;
        private VirtualGatewaySpecListenerPortMapping portMapping;
        private @Nullable VirtualGatewaySpecListenerTls tls;
        public Builder() {}
        public Builder(VirtualGatewaySpecListener defaults) {
    	      Objects.requireNonNull(defaults);
    	      this.connectionPool = defaults.connectionPool;
    	      this.healthCheck = defaults.healthCheck;
    	      this.portMapping = defaults.portMapping;
    	      this.tls = defaults.tls;
        }

        @CustomType.Setter
        public Builder connectionPool(@Nullable VirtualGatewaySpecListenerConnectionPool connectionPool) {
            this.connectionPool = connectionPool;
            return this;
        }
        @CustomType.Setter
        public Builder healthCheck(@Nullable VirtualGatewaySpecListenerHealthCheck healthCheck) {
            this.healthCheck = healthCheck;
            return this;
        }
        @CustomType.Setter
        public Builder portMapping(VirtualGatewaySpecListenerPortMapping portMapping) {
            this.portMapping = Objects.requireNonNull(portMapping);
            return this;
        }
        @CustomType.Setter
        public Builder tls(@Nullable VirtualGatewaySpecListenerTls tls) {
            this.tls = tls;
            return this;
        }
        public VirtualGatewaySpecListener build() {
            final var o = new VirtualGatewaySpecListener();
            o.connectionPool = connectionPool;
            o.healthCheck = healthCheck;
            o.portMapping = portMapping;
            o.tls = tls;
            return o;
        }
    }
}
