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

import com.pulumi.aws.ecs.outputs.ServiceServiceConnectConfigurationLogConfiguration;
import com.pulumi.aws.ecs.outputs.ServiceServiceConnectConfigurationService;
import com.pulumi.core.annotations.CustomType;
import java.lang.Boolean;
import java.lang.String;
import java.util.List;
import java.util.Objects;
import java.util.Optional;
import javax.annotation.Nullable;

@CustomType
public final class ServiceServiceConnectConfiguration {
    /**
     * @return Specifies whether to use Service Connect with this service.
     * 
     */
    private Boolean enabled;
    /**
     * @return The log configuration for the container. See below.
     * 
     */
    private @Nullable ServiceServiceConnectConfigurationLogConfiguration logConfiguration;
    /**
     * @return The namespace name or ARN of the `aws.servicediscovery.HttpNamespace` for use with Service Connect.
     * 
     */
    private @Nullable String namespace;
    /**
     * @return The list of Service Connect service objects. See below.
     * 
     */
    private @Nullable List<ServiceServiceConnectConfigurationService> services;

    private ServiceServiceConnectConfiguration() {}
    /**
     * @return Specifies whether to use Service Connect with this service.
     * 
     */
    public Boolean enabled() {
        return this.enabled;
    }
    /**
     * @return The log configuration for the container. See below.
     * 
     */
    public Optional<ServiceServiceConnectConfigurationLogConfiguration> logConfiguration() {
        return Optional.ofNullable(this.logConfiguration);
    }
    /**
     * @return The namespace name or ARN of the `aws.servicediscovery.HttpNamespace` for use with Service Connect.
     * 
     */
    public Optional<String> namespace() {
        return Optional.ofNullable(this.namespace);
    }
    /**
     * @return The list of Service Connect service objects. See below.
     * 
     */
    public List<ServiceServiceConnectConfigurationService> services() {
        return this.services == null ? List.of() : this.services;
    }

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

    public static Builder builder(ServiceServiceConnectConfiguration defaults) {
        return new Builder(defaults);
    }
    @CustomType.Builder
    public static final class Builder {
        private Boolean enabled;
        private @Nullable ServiceServiceConnectConfigurationLogConfiguration logConfiguration;
        private @Nullable String namespace;
        private @Nullable List<ServiceServiceConnectConfigurationService> services;
        public Builder() {}
        public Builder(ServiceServiceConnectConfiguration defaults) {
    	      Objects.requireNonNull(defaults);
    	      this.enabled = defaults.enabled;
    	      this.logConfiguration = defaults.logConfiguration;
    	      this.namespace = defaults.namespace;
    	      this.services = defaults.services;
        }

        @CustomType.Setter
        public Builder enabled(Boolean enabled) {
            this.enabled = Objects.requireNonNull(enabled);
            return this;
        }
        @CustomType.Setter
        public Builder logConfiguration(@Nullable ServiceServiceConnectConfigurationLogConfiguration logConfiguration) {
            this.logConfiguration = logConfiguration;
            return this;
        }
        @CustomType.Setter
        public Builder namespace(@Nullable String namespace) {
            this.namespace = namespace;
            return this;
        }
        @CustomType.Setter
        public Builder services(@Nullable List<ServiceServiceConnectConfigurationService> services) {
            this.services = services;
            return this;
        }
        public Builder services(ServiceServiceConnectConfigurationService... services) {
            return services(List.of(services));
        }
        public ServiceServiceConnectConfiguration build() {
            final var o = new ServiceServiceConnectConfiguration();
            o.enabled = enabled;
            o.logConfiguration = logConfiguration;
            o.namespace = namespace;
            o.services = services;
            return o;
        }
    }
}
