// *** 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.WorkflowTemplatePlacementManagedClusterConfigAutoscalingConfig;
import com.pulumi.gcp.dataproc.outputs.WorkflowTemplatePlacementManagedClusterConfigEncryptionConfig;
import com.pulumi.gcp.dataproc.outputs.WorkflowTemplatePlacementManagedClusterConfigEndpointConfig;
import com.pulumi.gcp.dataproc.outputs.WorkflowTemplatePlacementManagedClusterConfigGceClusterConfig;
import com.pulumi.gcp.dataproc.outputs.WorkflowTemplatePlacementManagedClusterConfigGkeClusterConfig;
import com.pulumi.gcp.dataproc.outputs.WorkflowTemplatePlacementManagedClusterConfigInitializationAction;
import com.pulumi.gcp.dataproc.outputs.WorkflowTemplatePlacementManagedClusterConfigLifecycleConfig;
import com.pulumi.gcp.dataproc.outputs.WorkflowTemplatePlacementManagedClusterConfigMasterConfig;
import com.pulumi.gcp.dataproc.outputs.WorkflowTemplatePlacementManagedClusterConfigMetastoreConfig;
import com.pulumi.gcp.dataproc.outputs.WorkflowTemplatePlacementManagedClusterConfigSecondaryWorkerConfig;
import com.pulumi.gcp.dataproc.outputs.WorkflowTemplatePlacementManagedClusterConfigSecurityConfig;
import com.pulumi.gcp.dataproc.outputs.WorkflowTemplatePlacementManagedClusterConfigSoftwareConfig;
import com.pulumi.gcp.dataproc.outputs.WorkflowTemplatePlacementManagedClusterConfigWorkerConfig;
import java.lang.String;
import java.util.List;
import java.util.Objects;
import java.util.Optional;
import javax.annotation.Nullable;

@CustomType
public final class WorkflowTemplatePlacementManagedClusterConfig {
    /**
     * @return Autoscaling config for the policy associated with the cluster. Cluster does not autoscale if this field is unset.
     * 
     */
    private @Nullable WorkflowTemplatePlacementManagedClusterConfigAutoscalingConfig autoscalingConfig;
    /**
     * @return Encryption settings for the cluster.
     * 
     */
    private @Nullable WorkflowTemplatePlacementManagedClusterConfigEncryptionConfig encryptionConfig;
    /**
     * @return Port/endpoint configuration for this cluster
     * 
     */
    private @Nullable WorkflowTemplatePlacementManagedClusterConfigEndpointConfig endpointConfig;
    /**
     * @return The shared Compute Engine config settings for all instances in a cluster.
     * 
     */
    private @Nullable WorkflowTemplatePlacementManagedClusterConfigGceClusterConfig gceClusterConfig;
    /**
     * @return The Kubernetes Engine config for Dataproc clusters deployed to Kubernetes. Setting this is considered mutually exclusive with Compute Engine-based options such as `gce_cluster_config`, `master_config`, `worker_config`, `secondary_worker_config`, and `autoscaling_config`.
     * 
     */
    private @Nullable WorkflowTemplatePlacementManagedClusterConfigGkeClusterConfig gkeClusterConfig;
    /**
     * @return Commands to execute on each node after config is completed. By default, executables are run on master and all worker nodes. You can test a node&#39;s `role` metadata to run an executable on a master or worker node, as shown below using `curl` (you can also use `wget`): ROLE=$(curl -H Metadata-Flavor:Google http://metadata/computeMetadata/v1/instance/attributes/dataproc-role) if ; then ... master specific actions ... else ... worker specific actions ... fi
     * 
     */
    private @Nullable List<WorkflowTemplatePlacementManagedClusterConfigInitializationAction> initializationActions;
    /**
     * @return Lifecycle setting for the cluster.
     * 
     */
    private @Nullable WorkflowTemplatePlacementManagedClusterConfigLifecycleConfig lifecycleConfig;
    /**
     * @return The Compute Engine config settings for additional worker instances in a cluster.
     * 
     */
    private @Nullable WorkflowTemplatePlacementManagedClusterConfigMasterConfig masterConfig;
    /**
     * @return Metastore configuration.
     * 
     */
    private @Nullable WorkflowTemplatePlacementManagedClusterConfigMetastoreConfig metastoreConfig;
    /**
     * @return The Compute Engine config settings for additional worker instances in a cluster.
     * 
     */
    private @Nullable WorkflowTemplatePlacementManagedClusterConfigSecondaryWorkerConfig secondaryWorkerConfig;
    /**
     * @return Security settings for the cluster.
     * 
     */
    private @Nullable WorkflowTemplatePlacementManagedClusterConfigSecurityConfig securityConfig;
    /**
     * @return The config settings for software inside the cluster.
     * 
     */
    private @Nullable WorkflowTemplatePlacementManagedClusterConfigSoftwareConfig softwareConfig;
    /**
     * @return A Cloud Storage bucket used to stage job dependencies, config files, and job driver console output. If you do not specify a staging bucket, Cloud Dataproc will determine a Cloud Storage location (US, ASIA, or EU) for your cluster&#39;s staging bucket according to the Compute Engine zone where your cluster is deployed, and then create and manage this project-level, per-location bucket (see (https://cloud.google.com/dataproc/docs/concepts/configuring-clusters/staging-bucket)).
     * 
     */
    private @Nullable String stagingBucket;
    /**
     * @return A Cloud Storage bucket used to store ephemeral cluster and jobs data, such as Spark and MapReduce history files. If you do not specify a temp bucket, Dataproc will determine a Cloud Storage location (US, ASIA, or EU) for your cluster&#39;s temp bucket according to the Compute Engine zone where your cluster is deployed, and then create and manage this project-level, per-location bucket. The default bucket has a TTL of 90 days, but you can use any TTL (or none) if you specify a bucket.
     * 
     */
    private @Nullable String tempBucket;
    /**
     * @return The Compute Engine config settings for additional worker instances in a cluster.
     * 
     * ***
     * 
     */
    private @Nullable WorkflowTemplatePlacementManagedClusterConfigWorkerConfig workerConfig;

    private WorkflowTemplatePlacementManagedClusterConfig() {}
    /**
     * @return Autoscaling config for the policy associated with the cluster. Cluster does not autoscale if this field is unset.
     * 
     */
    public Optional<WorkflowTemplatePlacementManagedClusterConfigAutoscalingConfig> autoscalingConfig() {
        return Optional.ofNullable(this.autoscalingConfig);
    }
    /**
     * @return Encryption settings for the cluster.
     * 
     */
    public Optional<WorkflowTemplatePlacementManagedClusterConfigEncryptionConfig> encryptionConfig() {
        return Optional.ofNullable(this.encryptionConfig);
    }
    /**
     * @return Port/endpoint configuration for this cluster
     * 
     */
    public Optional<WorkflowTemplatePlacementManagedClusterConfigEndpointConfig> endpointConfig() {
        return Optional.ofNullable(this.endpointConfig);
    }
    /**
     * @return The shared Compute Engine config settings for all instances in a cluster.
     * 
     */
    public Optional<WorkflowTemplatePlacementManagedClusterConfigGceClusterConfig> gceClusterConfig() {
        return Optional.ofNullable(this.gceClusterConfig);
    }
    /**
     * @return The Kubernetes Engine config for Dataproc clusters deployed to Kubernetes. Setting this is considered mutually exclusive with Compute Engine-based options such as `gce_cluster_config`, `master_config`, `worker_config`, `secondary_worker_config`, and `autoscaling_config`.
     * 
     */
    public Optional<WorkflowTemplatePlacementManagedClusterConfigGkeClusterConfig> gkeClusterConfig() {
        return Optional.ofNullable(this.gkeClusterConfig);
    }
    /**
     * @return Commands to execute on each node after config is completed. By default, executables are run on master and all worker nodes. You can test a node&#39;s `role` metadata to run an executable on a master or worker node, as shown below using `curl` (you can also use `wget`): ROLE=$(curl -H Metadata-Flavor:Google http://metadata/computeMetadata/v1/instance/attributes/dataproc-role) if ; then ... master specific actions ... else ... worker specific actions ... fi
     * 
     */
    public List<WorkflowTemplatePlacementManagedClusterConfigInitializationAction> initializationActions() {
        return this.initializationActions == null ? List.of() : this.initializationActions;
    }
    /**
     * @return Lifecycle setting for the cluster.
     * 
     */
    public Optional<WorkflowTemplatePlacementManagedClusterConfigLifecycleConfig> lifecycleConfig() {
        return Optional.ofNullable(this.lifecycleConfig);
    }
    /**
     * @return The Compute Engine config settings for additional worker instances in a cluster.
     * 
     */
    public Optional<WorkflowTemplatePlacementManagedClusterConfigMasterConfig> masterConfig() {
        return Optional.ofNullable(this.masterConfig);
    }
    /**
     * @return Metastore configuration.
     * 
     */
    public Optional<WorkflowTemplatePlacementManagedClusterConfigMetastoreConfig> metastoreConfig() {
        return Optional.ofNullable(this.metastoreConfig);
    }
    /**
     * @return The Compute Engine config settings for additional worker instances in a cluster.
     * 
     */
    public Optional<WorkflowTemplatePlacementManagedClusterConfigSecondaryWorkerConfig> secondaryWorkerConfig() {
        return Optional.ofNullable(this.secondaryWorkerConfig);
    }
    /**
     * @return Security settings for the cluster.
     * 
     */
    public Optional<WorkflowTemplatePlacementManagedClusterConfigSecurityConfig> securityConfig() {
        return Optional.ofNullable(this.securityConfig);
    }
    /**
     * @return The config settings for software inside the cluster.
     * 
     */
    public Optional<WorkflowTemplatePlacementManagedClusterConfigSoftwareConfig> softwareConfig() {
        return Optional.ofNullable(this.softwareConfig);
    }
    /**
     * @return A Cloud Storage bucket used to stage job dependencies, config files, and job driver console output. If you do not specify a staging bucket, Cloud Dataproc will determine a Cloud Storage location (US, ASIA, or EU) for your cluster&#39;s staging bucket according to the Compute Engine zone where your cluster is deployed, and then create and manage this project-level, per-location bucket (see (https://cloud.google.com/dataproc/docs/concepts/configuring-clusters/staging-bucket)).
     * 
     */
    public Optional<String> stagingBucket() {
        return Optional.ofNullable(this.stagingBucket);
    }
    /**
     * @return A Cloud Storage bucket used to store ephemeral cluster and jobs data, such as Spark and MapReduce history files. If you do not specify a temp bucket, Dataproc will determine a Cloud Storage location (US, ASIA, or EU) for your cluster&#39;s temp bucket according to the Compute Engine zone where your cluster is deployed, and then create and manage this project-level, per-location bucket. The default bucket has a TTL of 90 days, but you can use any TTL (or none) if you specify a bucket.
     * 
     */
    public Optional<String> tempBucket() {
        return Optional.ofNullable(this.tempBucket);
    }
    /**
     * @return The Compute Engine config settings for additional worker instances in a cluster.
     * 
     * ***
     * 
     */
    public Optional<WorkflowTemplatePlacementManagedClusterConfigWorkerConfig> workerConfig() {
        return Optional.ofNullable(this.workerConfig);
    }

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

    public static Builder builder(WorkflowTemplatePlacementManagedClusterConfig defaults) {
        return new Builder(defaults);
    }
    @CustomType.Builder
    public static final class Builder {
        private @Nullable WorkflowTemplatePlacementManagedClusterConfigAutoscalingConfig autoscalingConfig;
        private @Nullable WorkflowTemplatePlacementManagedClusterConfigEncryptionConfig encryptionConfig;
        private @Nullable WorkflowTemplatePlacementManagedClusterConfigEndpointConfig endpointConfig;
        private @Nullable WorkflowTemplatePlacementManagedClusterConfigGceClusterConfig gceClusterConfig;
        private @Nullable WorkflowTemplatePlacementManagedClusterConfigGkeClusterConfig gkeClusterConfig;
        private @Nullable List<WorkflowTemplatePlacementManagedClusterConfigInitializationAction> initializationActions;
        private @Nullable WorkflowTemplatePlacementManagedClusterConfigLifecycleConfig lifecycleConfig;
        private @Nullable WorkflowTemplatePlacementManagedClusterConfigMasterConfig masterConfig;
        private @Nullable WorkflowTemplatePlacementManagedClusterConfigMetastoreConfig metastoreConfig;
        private @Nullable WorkflowTemplatePlacementManagedClusterConfigSecondaryWorkerConfig secondaryWorkerConfig;
        private @Nullable WorkflowTemplatePlacementManagedClusterConfigSecurityConfig securityConfig;
        private @Nullable WorkflowTemplatePlacementManagedClusterConfigSoftwareConfig softwareConfig;
        private @Nullable String stagingBucket;
        private @Nullable String tempBucket;
        private @Nullable WorkflowTemplatePlacementManagedClusterConfigWorkerConfig workerConfig;
        public Builder() {}
        public Builder(WorkflowTemplatePlacementManagedClusterConfig defaults) {
    	      Objects.requireNonNull(defaults);
    	      this.autoscalingConfig = defaults.autoscalingConfig;
    	      this.encryptionConfig = defaults.encryptionConfig;
    	      this.endpointConfig = defaults.endpointConfig;
    	      this.gceClusterConfig = defaults.gceClusterConfig;
    	      this.gkeClusterConfig = defaults.gkeClusterConfig;
    	      this.initializationActions = defaults.initializationActions;
    	      this.lifecycleConfig = defaults.lifecycleConfig;
    	      this.masterConfig = defaults.masterConfig;
    	      this.metastoreConfig = defaults.metastoreConfig;
    	      this.secondaryWorkerConfig = defaults.secondaryWorkerConfig;
    	      this.securityConfig = defaults.securityConfig;
    	      this.softwareConfig = defaults.softwareConfig;
    	      this.stagingBucket = defaults.stagingBucket;
    	      this.tempBucket = defaults.tempBucket;
    	      this.workerConfig = defaults.workerConfig;
        }

        @CustomType.Setter
        public Builder autoscalingConfig(@Nullable WorkflowTemplatePlacementManagedClusterConfigAutoscalingConfig autoscalingConfig) {
            this.autoscalingConfig = autoscalingConfig;
            return this;
        }
        @CustomType.Setter
        public Builder encryptionConfig(@Nullable WorkflowTemplatePlacementManagedClusterConfigEncryptionConfig encryptionConfig) {
            this.encryptionConfig = encryptionConfig;
            return this;
        }
        @CustomType.Setter
        public Builder endpointConfig(@Nullable WorkflowTemplatePlacementManagedClusterConfigEndpointConfig endpointConfig) {
            this.endpointConfig = endpointConfig;
            return this;
        }
        @CustomType.Setter
        public Builder gceClusterConfig(@Nullable WorkflowTemplatePlacementManagedClusterConfigGceClusterConfig gceClusterConfig) {
            this.gceClusterConfig = gceClusterConfig;
            return this;
        }
        @CustomType.Setter
        public Builder gkeClusterConfig(@Nullable WorkflowTemplatePlacementManagedClusterConfigGkeClusterConfig gkeClusterConfig) {
            this.gkeClusterConfig = gkeClusterConfig;
            return this;
        }
        @CustomType.Setter
        public Builder initializationActions(@Nullable List<WorkflowTemplatePlacementManagedClusterConfigInitializationAction> initializationActions) {
            this.initializationActions = initializationActions;
            return this;
        }
        public Builder initializationActions(WorkflowTemplatePlacementManagedClusterConfigInitializationAction... initializationActions) {
            return initializationActions(List.of(initializationActions));
        }
        @CustomType.Setter
        public Builder lifecycleConfig(@Nullable WorkflowTemplatePlacementManagedClusterConfigLifecycleConfig lifecycleConfig) {
            this.lifecycleConfig = lifecycleConfig;
            return this;
        }
        @CustomType.Setter
        public Builder masterConfig(@Nullable WorkflowTemplatePlacementManagedClusterConfigMasterConfig masterConfig) {
            this.masterConfig = masterConfig;
            return this;
        }
        @CustomType.Setter
        public Builder metastoreConfig(@Nullable WorkflowTemplatePlacementManagedClusterConfigMetastoreConfig metastoreConfig) {
            this.metastoreConfig = metastoreConfig;
            return this;
        }
        @CustomType.Setter
        public Builder secondaryWorkerConfig(@Nullable WorkflowTemplatePlacementManagedClusterConfigSecondaryWorkerConfig secondaryWorkerConfig) {
            this.secondaryWorkerConfig = secondaryWorkerConfig;
            return this;
        }
        @CustomType.Setter
        public Builder securityConfig(@Nullable WorkflowTemplatePlacementManagedClusterConfigSecurityConfig securityConfig) {
            this.securityConfig = securityConfig;
            return this;
        }
        @CustomType.Setter
        public Builder softwareConfig(@Nullable WorkflowTemplatePlacementManagedClusterConfigSoftwareConfig softwareConfig) {
            this.softwareConfig = softwareConfig;
            return this;
        }
        @CustomType.Setter
        public Builder stagingBucket(@Nullable String stagingBucket) {
            this.stagingBucket = stagingBucket;
            return this;
        }
        @CustomType.Setter
        public Builder tempBucket(@Nullable String tempBucket) {
            this.tempBucket = tempBucket;
            return this;
        }
        @CustomType.Setter
        public Builder workerConfig(@Nullable WorkflowTemplatePlacementManagedClusterConfigWorkerConfig workerConfig) {
            this.workerConfig = workerConfig;
            return this;
        }
        public WorkflowTemplatePlacementManagedClusterConfig build() {
            final var o = new WorkflowTemplatePlacementManagedClusterConfig();
            o.autoscalingConfig = autoscalingConfig;
            o.encryptionConfig = encryptionConfig;
            o.endpointConfig = endpointConfig;
            o.gceClusterConfig = gceClusterConfig;
            o.gkeClusterConfig = gkeClusterConfig;
            o.initializationActions = initializationActions;
            o.lifecycleConfig = lifecycleConfig;
            o.masterConfig = masterConfig;
            o.metastoreConfig = metastoreConfig;
            o.secondaryWorkerConfig = secondaryWorkerConfig;
            o.securityConfig = securityConfig;
            o.softwareConfig = softwareConfig;
            o.stagingBucket = stagingBucket;
            o.tempBucket = tempBucket;
            o.workerConfig = workerConfig;
            return o;
        }
    }
}
