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

import com.pulumi.aws.ecs.inputs.ServiceServiceConnectConfigurationServiceClientAliasArgs;
import com.pulumi.core.Output;
import com.pulumi.core.annotations.Import;
import java.lang.Integer;
import java.lang.String;
import java.util.List;
import java.util.Objects;
import java.util.Optional;
import javax.annotation.Nullable;


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

    public static final ServiceServiceConnectConfigurationServiceArgs Empty = new ServiceServiceConnectConfigurationServiceArgs();

    /**
     * The list of client aliases for this Service Connect service. You use these to assign names that can be used by client applications. The maximum number of client aliases that you can have in this list is 1. See below.
     * 
     */
    @Import(name="clientAlias")
    private @Nullable Output<List<ServiceServiceConnectConfigurationServiceClientAliasArgs>> clientAlias;

    /**
     * @return The list of client aliases for this Service Connect service. You use these to assign names that can be used by client applications. The maximum number of client aliases that you can have in this list is 1. See below.
     * 
     */
    public Optional<Output<List<ServiceServiceConnectConfigurationServiceClientAliasArgs>>> clientAlias() {
        return Optional.ofNullable(this.clientAlias);
    }

    /**
     * The name of the new AWS Cloud Map service that Amazon ECS creates for this Amazon ECS service.
     * 
     */
    @Import(name="discoveryName")
    private @Nullable Output<String> discoveryName;

    /**
     * @return The name of the new AWS Cloud Map service that Amazon ECS creates for this Amazon ECS service.
     * 
     */
    public Optional<Output<String>> discoveryName() {
        return Optional.ofNullable(this.discoveryName);
    }

    /**
     * The port number for the Service Connect proxy to listen on.
     * 
     */
    @Import(name="ingressPortOverride")
    private @Nullable Output<Integer> ingressPortOverride;

    /**
     * @return The port number for the Service Connect proxy to listen on.
     * 
     */
    public Optional<Output<Integer>> ingressPortOverride() {
        return Optional.ofNullable(this.ingressPortOverride);
    }

    /**
     * The name of one of the `portMappings` from all the containers in the task definition of this Amazon ECS service.
     * 
     */
    @Import(name="portName", required=true)
    private Output<String> portName;

    /**
     * @return The name of one of the `portMappings` from all the containers in the task definition of this Amazon ECS service.
     * 
     */
    public Output<String> portName() {
        return this.portName;
    }

    private ServiceServiceConnectConfigurationServiceArgs() {}

    private ServiceServiceConnectConfigurationServiceArgs(ServiceServiceConnectConfigurationServiceArgs $) {
        this.clientAlias = $.clientAlias;
        this.discoveryName = $.discoveryName;
        this.ingressPortOverride = $.ingressPortOverride;
        this.portName = $.portName;
    }

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

    public static final class Builder {
        private ServiceServiceConnectConfigurationServiceArgs $;

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

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

        /**
         * @param clientAlias The list of client aliases for this Service Connect service. You use these to assign names that can be used by client applications. The maximum number of client aliases that you can have in this list is 1. See below.
         * 
         * @return builder
         * 
         */
        public Builder clientAlias(@Nullable Output<List<ServiceServiceConnectConfigurationServiceClientAliasArgs>> clientAlias) {
            $.clientAlias = clientAlias;
            return this;
        }

        /**
         * @param clientAlias The list of client aliases for this Service Connect service. You use these to assign names that can be used by client applications. The maximum number of client aliases that you can have in this list is 1. See below.
         * 
         * @return builder
         * 
         */
        public Builder clientAlias(List<ServiceServiceConnectConfigurationServiceClientAliasArgs> clientAlias) {
            return clientAlias(Output.of(clientAlias));
        }

        /**
         * @param clientAlias The list of client aliases for this Service Connect service. You use these to assign names that can be used by client applications. The maximum number of client aliases that you can have in this list is 1. See below.
         * 
         * @return builder
         * 
         */
        public Builder clientAlias(ServiceServiceConnectConfigurationServiceClientAliasArgs... clientAlias) {
            return clientAlias(List.of(clientAlias));
        }

        /**
         * @param discoveryName The name of the new AWS Cloud Map service that Amazon ECS creates for this Amazon ECS service.
         * 
         * @return builder
         * 
         */
        public Builder discoveryName(@Nullable Output<String> discoveryName) {
            $.discoveryName = discoveryName;
            return this;
        }

        /**
         * @param discoveryName The name of the new AWS Cloud Map service that Amazon ECS creates for this Amazon ECS service.
         * 
         * @return builder
         * 
         */
        public Builder discoveryName(String discoveryName) {
            return discoveryName(Output.of(discoveryName));
        }

        /**
         * @param ingressPortOverride The port number for the Service Connect proxy to listen on.
         * 
         * @return builder
         * 
         */
        public Builder ingressPortOverride(@Nullable Output<Integer> ingressPortOverride) {
            $.ingressPortOverride = ingressPortOverride;
            return this;
        }

        /**
         * @param ingressPortOverride The port number for the Service Connect proxy to listen on.
         * 
         * @return builder
         * 
         */
        public Builder ingressPortOverride(Integer ingressPortOverride) {
            return ingressPortOverride(Output.of(ingressPortOverride));
        }

        /**
         * @param portName The name of one of the `portMappings` from all the containers in the task definition of this Amazon ECS service.
         * 
         * @return builder
         * 
         */
        public Builder portName(Output<String> portName) {
            $.portName = portName;
            return this;
        }

        /**
         * @param portName The name of one of the `portMappings` from all the containers in the task definition of this Amazon ECS service.
         * 
         * @return builder
         * 
         */
        public Builder portName(String portName) {
            return portName(Output.of(portName));
        }

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

}
