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

import com.pulumi.core.annotations.CustomType;
import com.pulumi.gcp.dataproc.outputs.ClusterClusterConfigGceClusterConfigNodeGroupAffinity;
import com.pulumi.gcp.dataproc.outputs.ClusterClusterConfigGceClusterConfigReservationAffinity;
import com.pulumi.gcp.dataproc.outputs.ClusterClusterConfigGceClusterConfigShieldedInstanceConfig;
import java.lang.Boolean;
import java.lang.String;
import java.util.List;
import java.util.Map;
import java.util.Objects;
import java.util.Optional;
import javax.annotation.Nullable;

@CustomType
public final class ClusterClusterConfigGceClusterConfig {
    /**
     * @return By default, clusters are not restricted to internal IP addresses,
     * and will have ephemeral external IP addresses assigned to each instance. If set to true, all
     * instances in the cluster will only have internal IP addresses. Note: Private Google Access
     * (also known as `privateIpGoogleAccess`) must be enabled on the subnetwork that the cluster
     * will be launched in.
     * 
     */
    private @Nullable Boolean internalIpOnly;
    /**
     * @return A map of the Compute Engine metadata entries to add to all instances
     * (see [Project and instance metadata](https://cloud.google.com/compute/docs/storing-retrieving-metadata#project_and_instance_metadata)).
     * 
     */
    private @Nullable Map<String,String> metadata;
    /**
     * @return The name or self_link of the Google Compute Engine
     * network to the cluster will be part of. Conflicts with `subnetwork`.
     * If neither is specified, this defaults to the &#34;default&#34; network.
     * 
     */
    private @Nullable String network;
    /**
     * @return Node Group Affinity for sole-tenant clusters.
     * 
     */
    private @Nullable ClusterClusterConfigGceClusterConfigNodeGroupAffinity nodeGroupAffinity;
    /**
     * @return Reservation Affinity for consuming zonal reservation.
     * 
     */
    private @Nullable ClusterClusterConfigGceClusterConfigReservationAffinity reservationAffinity;
    /**
     * @return The service account to be used by the Node VMs.
     * If not specified, the &#34;default&#34; service account is used.
     * 
     */
    private @Nullable String serviceAccount;
    /**
     * @return The set of Google API scopes
     * to be made available on all of the node VMs under the `service_account`
     * specified. Both OAuth2 URLs and gcloud
     * short names are supported. To allow full access to all Cloud APIs, use the
     * `cloud-platform` scope. See a complete list of scopes [here](https://cloud.google.com/sdk/gcloud/reference/alpha/compute/instances/set-scopes#--scopes).
     * 
     */
    private @Nullable List<String> serviceAccountScopes;
    /**
     * @return Shielded Instance Config for clusters using [Compute Engine Shielded VMs](https://cloud.google.com/security/shielded-cloud/shielded-vm).
     * 
     * ***
     * 
     */
    private @Nullable ClusterClusterConfigGceClusterConfigShieldedInstanceConfig shieldedInstanceConfig;
    /**
     * @return The name or self_link of the Google Compute Engine
     * subnetwork the cluster will be part of. Conflicts with `network`.
     * 
     */
    private @Nullable String subnetwork;
    /**
     * @return The list of instance tags applied to instances in the cluster.
     * Tags are used to identify valid sources or targets for network firewalls.
     * 
     */
    private @Nullable List<String> tags;
    /**
     * @return The GCP zone where your data is stored and used (i.e. where
     * the master and the worker nodes will be created in). If `region` is set to &#39;global&#39; (default)
     * then `zone` is mandatory, otherwise GCP is able to make use of [Auto Zone Placement](https://cloud.google.com/dataproc/docs/concepts/auto-zone)
     * to determine this automatically for you.
     * Note: This setting additionally determines and restricts
     * which computing resources are available for use with other configs such as
     * `cluster_config.master_config.machine_type` and `cluster_config.worker_config.machine_type`.
     * 
     */
    private @Nullable String zone;

    private ClusterClusterConfigGceClusterConfig() {}
    /**
     * @return By default, clusters are not restricted to internal IP addresses,
     * and will have ephemeral external IP addresses assigned to each instance. If set to true, all
     * instances in the cluster will only have internal IP addresses. Note: Private Google Access
     * (also known as `privateIpGoogleAccess`) must be enabled on the subnetwork that the cluster
     * will be launched in.
     * 
     */
    public Optional<Boolean> internalIpOnly() {
        return Optional.ofNullable(this.internalIpOnly);
    }
    /**
     * @return A map of the Compute Engine metadata entries to add to all instances
     * (see [Project and instance metadata](https://cloud.google.com/compute/docs/storing-retrieving-metadata#project_and_instance_metadata)).
     * 
     */
    public Map<String,String> metadata() {
        return this.metadata == null ? Map.of() : this.metadata;
    }
    /**
     * @return The name or self_link of the Google Compute Engine
     * network to the cluster will be part of. Conflicts with `subnetwork`.
     * If neither is specified, this defaults to the &#34;default&#34; network.
     * 
     */
    public Optional<String> network() {
        return Optional.ofNullable(this.network);
    }
    /**
     * @return Node Group Affinity for sole-tenant clusters.
     * 
     */
    public Optional<ClusterClusterConfigGceClusterConfigNodeGroupAffinity> nodeGroupAffinity() {
        return Optional.ofNullable(this.nodeGroupAffinity);
    }
    /**
     * @return Reservation Affinity for consuming zonal reservation.
     * 
     */
    public Optional<ClusterClusterConfigGceClusterConfigReservationAffinity> reservationAffinity() {
        return Optional.ofNullable(this.reservationAffinity);
    }
    /**
     * @return The service account to be used by the Node VMs.
     * If not specified, the &#34;default&#34; service account is used.
     * 
     */
    public Optional<String> serviceAccount() {
        return Optional.ofNullable(this.serviceAccount);
    }
    /**
     * @return The set of Google API scopes
     * to be made available on all of the node VMs under the `service_account`
     * specified. Both OAuth2 URLs and gcloud
     * short names are supported. To allow full access to all Cloud APIs, use the
     * `cloud-platform` scope. See a complete list of scopes [here](https://cloud.google.com/sdk/gcloud/reference/alpha/compute/instances/set-scopes#--scopes).
     * 
     */
    public List<String> serviceAccountScopes() {
        return this.serviceAccountScopes == null ? List.of() : this.serviceAccountScopes;
    }
    /**
     * @return Shielded Instance Config for clusters using [Compute Engine Shielded VMs](https://cloud.google.com/security/shielded-cloud/shielded-vm).
     * 
     * ***
     * 
     */
    public Optional<ClusterClusterConfigGceClusterConfigShieldedInstanceConfig> shieldedInstanceConfig() {
        return Optional.ofNullable(this.shieldedInstanceConfig);
    }
    /**
     * @return The name or self_link of the Google Compute Engine
     * subnetwork the cluster will be part of. Conflicts with `network`.
     * 
     */
    public Optional<String> subnetwork() {
        return Optional.ofNullable(this.subnetwork);
    }
    /**
     * @return The list of instance tags applied to instances in the cluster.
     * Tags are used to identify valid sources or targets for network firewalls.
     * 
     */
    public List<String> tags() {
        return this.tags == null ? List.of() : this.tags;
    }
    /**
     * @return The GCP zone where your data is stored and used (i.e. where
     * the master and the worker nodes will be created in). If `region` is set to &#39;global&#39; (default)
     * then `zone` is mandatory, otherwise GCP is able to make use of [Auto Zone Placement](https://cloud.google.com/dataproc/docs/concepts/auto-zone)
     * to determine this automatically for you.
     * Note: This setting additionally determines and restricts
     * which computing resources are available for use with other configs such as
     * `cluster_config.master_config.machine_type` and `cluster_config.worker_config.machine_type`.
     * 
     */
    public Optional<String> zone() {
        return Optional.ofNullable(this.zone);
    }

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

    public static Builder builder(ClusterClusterConfigGceClusterConfig defaults) {
        return new Builder(defaults);
    }
    @CustomType.Builder
    public static final class Builder {
        private @Nullable Boolean internalIpOnly;
        private @Nullable Map<String,String> metadata;
        private @Nullable String network;
        private @Nullable ClusterClusterConfigGceClusterConfigNodeGroupAffinity nodeGroupAffinity;
        private @Nullable ClusterClusterConfigGceClusterConfigReservationAffinity reservationAffinity;
        private @Nullable String serviceAccount;
        private @Nullable List<String> serviceAccountScopes;
        private @Nullable ClusterClusterConfigGceClusterConfigShieldedInstanceConfig shieldedInstanceConfig;
        private @Nullable String subnetwork;
        private @Nullable List<String> tags;
        private @Nullable String zone;
        public Builder() {}
        public Builder(ClusterClusterConfigGceClusterConfig defaults) {
    	      Objects.requireNonNull(defaults);
    	      this.internalIpOnly = defaults.internalIpOnly;
    	      this.metadata = defaults.metadata;
    	      this.network = defaults.network;
    	      this.nodeGroupAffinity = defaults.nodeGroupAffinity;
    	      this.reservationAffinity = defaults.reservationAffinity;
    	      this.serviceAccount = defaults.serviceAccount;
    	      this.serviceAccountScopes = defaults.serviceAccountScopes;
    	      this.shieldedInstanceConfig = defaults.shieldedInstanceConfig;
    	      this.subnetwork = defaults.subnetwork;
    	      this.tags = defaults.tags;
    	      this.zone = defaults.zone;
        }

        @CustomType.Setter
        public Builder internalIpOnly(@Nullable Boolean internalIpOnly) {
            this.internalIpOnly = internalIpOnly;
            return this;
        }
        @CustomType.Setter
        public Builder metadata(@Nullable Map<String,String> metadata) {
            this.metadata = metadata;
            return this;
        }
        @CustomType.Setter
        public Builder network(@Nullable String network) {
            this.network = network;
            return this;
        }
        @CustomType.Setter
        public Builder nodeGroupAffinity(@Nullable ClusterClusterConfigGceClusterConfigNodeGroupAffinity nodeGroupAffinity) {
            this.nodeGroupAffinity = nodeGroupAffinity;
            return this;
        }
        @CustomType.Setter
        public Builder reservationAffinity(@Nullable ClusterClusterConfigGceClusterConfigReservationAffinity reservationAffinity) {
            this.reservationAffinity = reservationAffinity;
            return this;
        }
        @CustomType.Setter
        public Builder serviceAccount(@Nullable String serviceAccount) {
            this.serviceAccount = serviceAccount;
            return this;
        }
        @CustomType.Setter
        public Builder serviceAccountScopes(@Nullable List<String> serviceAccountScopes) {
            this.serviceAccountScopes = serviceAccountScopes;
            return this;
        }
        public Builder serviceAccountScopes(String... serviceAccountScopes) {
            return serviceAccountScopes(List.of(serviceAccountScopes));
        }
        @CustomType.Setter
        public Builder shieldedInstanceConfig(@Nullable ClusterClusterConfigGceClusterConfigShieldedInstanceConfig shieldedInstanceConfig) {
            this.shieldedInstanceConfig = shieldedInstanceConfig;
            return this;
        }
        @CustomType.Setter
        public Builder subnetwork(@Nullable String subnetwork) {
            this.subnetwork = subnetwork;
            return this;
        }
        @CustomType.Setter
        public Builder tags(@Nullable List<String> tags) {
            this.tags = tags;
            return this;
        }
        public Builder tags(String... tags) {
            return tags(List.of(tags));
        }
        @CustomType.Setter
        public Builder zone(@Nullable String zone) {
            this.zone = zone;
            return this;
        }
        public ClusterClusterConfigGceClusterConfig build() {
            final var o = new ClusterClusterConfigGceClusterConfig();
            o.internalIpOnly = internalIpOnly;
            o.metadata = metadata;
            o.network = network;
            o.nodeGroupAffinity = nodeGroupAffinity;
            o.reservationAffinity = reservationAffinity;
            o.serviceAccount = serviceAccount;
            o.serviceAccountScopes = serviceAccountScopes;
            o.shieldedInstanceConfig = shieldedInstanceConfig;
            o.subnetwork = subnetwork;
            o.tags = tags;
            o.zone = zone;
            return o;
        }
    }
}
