// *** 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.WorkflowTemplatePlacementManagedClusterConfigMasterConfigAccelerator;
import com.pulumi.gcp.dataproc.outputs.WorkflowTemplatePlacementManagedClusterConfigMasterConfigDiskConfig;
import com.pulumi.gcp.dataproc.outputs.WorkflowTemplatePlacementManagedClusterConfigMasterConfigManagedGroupConfig;
import java.lang.Boolean;
import java.lang.Integer;
import java.lang.String;
import java.util.List;
import java.util.Objects;
import java.util.Optional;
import javax.annotation.Nullable;

@CustomType
public final class WorkflowTemplatePlacementManagedClusterConfigMasterConfig {
    /**
     * @return The Compute Engine accelerator configuration for these instances.
     * 
     */
    private @Nullable List<WorkflowTemplatePlacementManagedClusterConfigMasterConfigAccelerator> accelerators;
    /**
     * @return Disk option config settings.
     * 
     */
    private @Nullable WorkflowTemplatePlacementManagedClusterConfigMasterConfigDiskConfig diskConfig;
    /**
     * @return The Compute Engine image resource used for cluster instances. The URI can represent an image or image family. Image examples: * `https://www.googleapis.com/compute/beta/projects/` If the URI is unspecified, it will be inferred from `SoftwareConfig.image_version` or the system default.
     * 
     */
    private @Nullable String image;
    /**
     * @return Output only. The list of instance names. Dataproc derives the names from `cluster_name`, `num_instances`, and the instance group.
     * 
     */
    private @Nullable List<String> instanceNames;
    /**
     * @return Output only. Specifies that this instance group contains preemptible instances.
     * 
     */
    private @Nullable Boolean isPreemptible;
    /**
     * @return The Compute Engine machine type used for cluster instances. A full URL, partial URI, or short name are valid. Examples: * ` https://www.googleapis.com/compute/v1/projects/(https://cloud.google.com/dataproc/docs/concepts/configuring-clusters/auto-zone#using_auto_zone_placement) feature, you must use the short name of the machine type resource, for example,  `n1-standard-2`.
     * 
     */
    private @Nullable String machineType;
    /**
     * @return Output only. The config for Compute Engine Instance Group Manager that manages this group. This is only used for preemptible instance groups.
     * 
     */
    private @Nullable List<WorkflowTemplatePlacementManagedClusterConfigMasterConfigManagedGroupConfig> managedGroupConfigs;
    /**
     * @return Specifies the minimum cpu platform for the Instance Group. See (https://cloud.google.com/dataproc/docs/concepts/compute/dataproc-min-cpu).
     * 
     */
    private @Nullable String minCpuPlatform;
    /**
     * @return The number of VM instances in the instance group. For master instance groups, must be set to 1.
     * 
     */
    private @Nullable Integer numInstances;
    /**
     * @return Specifies the preemptibility of the instance group. The default value for master and worker groups is `NON_PREEMPTIBLE`. This default cannot be changed. The default value for secondary instances is `PREEMPTIBLE`. Possible values: PREEMPTIBILITY_UNSPECIFIED, NON_PREEMPTIBLE, PREEMPTIBLE
     * 
     */
    private @Nullable String preemptibility;

    private WorkflowTemplatePlacementManagedClusterConfigMasterConfig() {}
    /**
     * @return The Compute Engine accelerator configuration for these instances.
     * 
     */
    public List<WorkflowTemplatePlacementManagedClusterConfigMasterConfigAccelerator> accelerators() {
        return this.accelerators == null ? List.of() : this.accelerators;
    }
    /**
     * @return Disk option config settings.
     * 
     */
    public Optional<WorkflowTemplatePlacementManagedClusterConfigMasterConfigDiskConfig> diskConfig() {
        return Optional.ofNullable(this.diskConfig);
    }
    /**
     * @return The Compute Engine image resource used for cluster instances. The URI can represent an image or image family. Image examples: * `https://www.googleapis.com/compute/beta/projects/` If the URI is unspecified, it will be inferred from `SoftwareConfig.image_version` or the system default.
     * 
     */
    public Optional<String> image() {
        return Optional.ofNullable(this.image);
    }
    /**
     * @return Output only. The list of instance names. Dataproc derives the names from `cluster_name`, `num_instances`, and the instance group.
     * 
     */
    public List<String> instanceNames() {
        return this.instanceNames == null ? List.of() : this.instanceNames;
    }
    /**
     * @return Output only. Specifies that this instance group contains preemptible instances.
     * 
     */
    public Optional<Boolean> isPreemptible() {
        return Optional.ofNullable(this.isPreemptible);
    }
    /**
     * @return The Compute Engine machine type used for cluster instances. A full URL, partial URI, or short name are valid. Examples: * ` https://www.googleapis.com/compute/v1/projects/(https://cloud.google.com/dataproc/docs/concepts/configuring-clusters/auto-zone#using_auto_zone_placement) feature, you must use the short name of the machine type resource, for example,  `n1-standard-2`.
     * 
     */
    public Optional<String> machineType() {
        return Optional.ofNullable(this.machineType);
    }
    /**
     * @return Output only. The config for Compute Engine Instance Group Manager that manages this group. This is only used for preemptible instance groups.
     * 
     */
    public List<WorkflowTemplatePlacementManagedClusterConfigMasterConfigManagedGroupConfig> managedGroupConfigs() {
        return this.managedGroupConfigs == null ? List.of() : this.managedGroupConfigs;
    }
    /**
     * @return Specifies the minimum cpu platform for the Instance Group. See (https://cloud.google.com/dataproc/docs/concepts/compute/dataproc-min-cpu).
     * 
     */
    public Optional<String> minCpuPlatform() {
        return Optional.ofNullable(this.minCpuPlatform);
    }
    /**
     * @return The number of VM instances in the instance group. For master instance groups, must be set to 1.
     * 
     */
    public Optional<Integer> numInstances() {
        return Optional.ofNullable(this.numInstances);
    }
    /**
     * @return Specifies the preemptibility of the instance group. The default value for master and worker groups is `NON_PREEMPTIBLE`. This default cannot be changed. The default value for secondary instances is `PREEMPTIBLE`. Possible values: PREEMPTIBILITY_UNSPECIFIED, NON_PREEMPTIBLE, PREEMPTIBLE
     * 
     */
    public Optional<String> preemptibility() {
        return Optional.ofNullable(this.preemptibility);
    }

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

    public static Builder builder(WorkflowTemplatePlacementManagedClusterConfigMasterConfig defaults) {
        return new Builder(defaults);
    }
    @CustomType.Builder
    public static final class Builder {
        private @Nullable List<WorkflowTemplatePlacementManagedClusterConfigMasterConfigAccelerator> accelerators;
        private @Nullable WorkflowTemplatePlacementManagedClusterConfigMasterConfigDiskConfig diskConfig;
        private @Nullable String image;
        private @Nullable List<String> instanceNames;
        private @Nullable Boolean isPreemptible;
        private @Nullable String machineType;
        private @Nullable List<WorkflowTemplatePlacementManagedClusterConfigMasterConfigManagedGroupConfig> managedGroupConfigs;
        private @Nullable String minCpuPlatform;
        private @Nullable Integer numInstances;
        private @Nullable String preemptibility;
        public Builder() {}
        public Builder(WorkflowTemplatePlacementManagedClusterConfigMasterConfig defaults) {
    	      Objects.requireNonNull(defaults);
    	      this.accelerators = defaults.accelerators;
    	      this.diskConfig = defaults.diskConfig;
    	      this.image = defaults.image;
    	      this.instanceNames = defaults.instanceNames;
    	      this.isPreemptible = defaults.isPreemptible;
    	      this.machineType = defaults.machineType;
    	      this.managedGroupConfigs = defaults.managedGroupConfigs;
    	      this.minCpuPlatform = defaults.minCpuPlatform;
    	      this.numInstances = defaults.numInstances;
    	      this.preemptibility = defaults.preemptibility;
        }

        @CustomType.Setter
        public Builder accelerators(@Nullable List<WorkflowTemplatePlacementManagedClusterConfigMasterConfigAccelerator> accelerators) {
            this.accelerators = accelerators;
            return this;
        }
        public Builder accelerators(WorkflowTemplatePlacementManagedClusterConfigMasterConfigAccelerator... accelerators) {
            return accelerators(List.of(accelerators));
        }
        @CustomType.Setter
        public Builder diskConfig(@Nullable WorkflowTemplatePlacementManagedClusterConfigMasterConfigDiskConfig diskConfig) {
            this.diskConfig = diskConfig;
            return this;
        }
        @CustomType.Setter
        public Builder image(@Nullable String image) {
            this.image = image;
            return this;
        }
        @CustomType.Setter
        public Builder instanceNames(@Nullable List<String> instanceNames) {
            this.instanceNames = instanceNames;
            return this;
        }
        public Builder instanceNames(String... instanceNames) {
            return instanceNames(List.of(instanceNames));
        }
        @CustomType.Setter
        public Builder isPreemptible(@Nullable Boolean isPreemptible) {
            this.isPreemptible = isPreemptible;
            return this;
        }
        @CustomType.Setter
        public Builder machineType(@Nullable String machineType) {
            this.machineType = machineType;
            return this;
        }
        @CustomType.Setter
        public Builder managedGroupConfigs(@Nullable List<WorkflowTemplatePlacementManagedClusterConfigMasterConfigManagedGroupConfig> managedGroupConfigs) {
            this.managedGroupConfigs = managedGroupConfigs;
            return this;
        }
        public Builder managedGroupConfigs(WorkflowTemplatePlacementManagedClusterConfigMasterConfigManagedGroupConfig... managedGroupConfigs) {
            return managedGroupConfigs(List.of(managedGroupConfigs));
        }
        @CustomType.Setter
        public Builder minCpuPlatform(@Nullable String minCpuPlatform) {
            this.minCpuPlatform = minCpuPlatform;
            return this;
        }
        @CustomType.Setter
        public Builder numInstances(@Nullable Integer numInstances) {
            this.numInstances = numInstances;
            return this;
        }
        @CustomType.Setter
        public Builder preemptibility(@Nullable String preemptibility) {
            this.preemptibility = preemptibility;
            return this;
        }
        public WorkflowTemplatePlacementManagedClusterConfigMasterConfig build() {
            final var o = new WorkflowTemplatePlacementManagedClusterConfigMasterConfig();
            o.accelerators = accelerators;
            o.diskConfig = diskConfig;
            o.image = image;
            o.instanceNames = instanceNames;
            o.isPreemptible = isPreemptible;
            o.machineType = machineType;
            o.managedGroupConfigs = managedGroupConfigs;
            o.minCpuPlatform = minCpuPlatform;
            o.numInstances = numInstances;
            o.preemptibility = preemptibility;
            return o;
        }
    }
}
