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

import com.pulumi.core.Output;
import com.pulumi.core.annotations.Import;
import com.pulumi.gcp.dataproc.inputs.ClusterClusterConfigPreemptibleWorkerConfigDiskConfigArgs;
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 ClusterClusterConfigPreemptibleWorkerConfigArgs extends com.pulumi.resources.ResourceArgs {

    public static final ClusterClusterConfigPreemptibleWorkerConfigArgs Empty = new ClusterClusterConfigPreemptibleWorkerConfigArgs();

    /**
     * Disk Config
     * 
     */
    @Import(name="diskConfig")
    private @Nullable Output<ClusterClusterConfigPreemptibleWorkerConfigDiskConfigArgs> diskConfig;

    /**
     * @return Disk Config
     * 
     */
    public Optional<Output<ClusterClusterConfigPreemptibleWorkerConfigDiskConfigArgs>> diskConfig() {
        return Optional.ofNullable(this.diskConfig);
    }

    @Import(name="instanceNames")
    private @Nullable Output<List<String>> instanceNames;

    public Optional<Output<List<String>>> instanceNames() {
        return Optional.ofNullable(this.instanceNames);
    }

    /**
     * Specifies the number of preemptible nodes to create.
     * Defaults to 0.
     * 
     */
    @Import(name="numInstances")
    private @Nullable Output<Integer> numInstances;

    /**
     * @return Specifies the number of preemptible nodes to create.
     * Defaults to 0.
     * 
     */
    public Optional<Output<Integer>> numInstances() {
        return Optional.ofNullable(this.numInstances);
    }

    /**
     * Specifies the preemptibility of the secondary workers. The default value is `PREEMPTIBLE`
     * Accepted values are:
     * * PREEMPTIBILITY_UNSPECIFIED
     * * NON_PREEMPTIBLE
     * * PREEMPTIBLE
     * 
     */
    @Import(name="preemptibility")
    private @Nullable Output<String> preemptibility;

    /**
     * @return Specifies the preemptibility of the secondary workers. The default value is `PREEMPTIBLE`
     * Accepted values are:
     * * PREEMPTIBILITY_UNSPECIFIED
     * * NON_PREEMPTIBLE
     * * PREEMPTIBLE
     * 
     */
    public Optional<Output<String>> preemptibility() {
        return Optional.ofNullable(this.preemptibility);
    }

    private ClusterClusterConfigPreemptibleWorkerConfigArgs() {}

    private ClusterClusterConfigPreemptibleWorkerConfigArgs(ClusterClusterConfigPreemptibleWorkerConfigArgs $) {
        this.diskConfig = $.diskConfig;
        this.instanceNames = $.instanceNames;
        this.numInstances = $.numInstances;
        this.preemptibility = $.preemptibility;
    }

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

    public static final class Builder {
        private ClusterClusterConfigPreemptibleWorkerConfigArgs $;

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

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

        /**
         * @param diskConfig Disk Config
         * 
         * @return builder
         * 
         */
        public Builder diskConfig(@Nullable Output<ClusterClusterConfigPreemptibleWorkerConfigDiskConfigArgs> diskConfig) {
            $.diskConfig = diskConfig;
            return this;
        }

        /**
         * @param diskConfig Disk Config
         * 
         * @return builder
         * 
         */
        public Builder diskConfig(ClusterClusterConfigPreemptibleWorkerConfigDiskConfigArgs diskConfig) {
            return diskConfig(Output.of(diskConfig));
        }

        public Builder instanceNames(@Nullable Output<List<String>> instanceNames) {
            $.instanceNames = instanceNames;
            return this;
        }

        public Builder instanceNames(List<String> instanceNames) {
            return instanceNames(Output.of(instanceNames));
        }

        public Builder instanceNames(String... instanceNames) {
            return instanceNames(List.of(instanceNames));
        }

        /**
         * @param numInstances Specifies the number of preemptible nodes to create.
         * Defaults to 0.
         * 
         * @return builder
         * 
         */
        public Builder numInstances(@Nullable Output<Integer> numInstances) {
            $.numInstances = numInstances;
            return this;
        }

        /**
         * @param numInstances Specifies the number of preemptible nodes to create.
         * Defaults to 0.
         * 
         * @return builder
         * 
         */
        public Builder numInstances(Integer numInstances) {
            return numInstances(Output.of(numInstances));
        }

        /**
         * @param preemptibility Specifies the preemptibility of the secondary workers. The default value is `PREEMPTIBLE`
         * Accepted values are:
         * * PREEMPTIBILITY_UNSPECIFIED
         * * NON_PREEMPTIBLE
         * * PREEMPTIBLE
         * 
         * @return builder
         * 
         */
        public Builder preemptibility(@Nullable Output<String> preemptibility) {
            $.preemptibility = preemptibility;
            return this;
        }

        /**
         * @param preemptibility Specifies the preemptibility of the secondary workers. The default value is `PREEMPTIBLE`
         * Accepted values are:
         * * PREEMPTIBILITY_UNSPECIFIED
         * * NON_PREEMPTIBLE
         * * PREEMPTIBLE
         * 
         * @return builder
         * 
         */
        public Builder preemptibility(String preemptibility) {
            return preemptibility(Output.of(preemptibility));
        }

        public ClusterClusterConfigPreemptibleWorkerConfigArgs build() {
            return $;
        }
    }

}
