// *** 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.AutoscalingPolicyBasicAlgorithmArgs;
import com.pulumi.gcp.dataproc.inputs.AutoscalingPolicySecondaryWorkerConfigArgs;
import com.pulumi.gcp.dataproc.inputs.AutoscalingPolicyWorkerConfigArgs;
import java.lang.String;
import java.util.Objects;
import java.util.Optional;
import javax.annotation.Nullable;


public final class AutoscalingPolicyState extends com.pulumi.resources.ResourceArgs {

    public static final AutoscalingPolicyState Empty = new AutoscalingPolicyState();

    /**
     * Basic algorithm for autoscaling.
     * Structure is documented below.
     * 
     */
    @Import(name="basicAlgorithm")
    private @Nullable Output<AutoscalingPolicyBasicAlgorithmArgs> basicAlgorithm;

    /**
     * @return Basic algorithm for autoscaling.
     * Structure is documented below.
     * 
     */
    public Optional<Output<AutoscalingPolicyBasicAlgorithmArgs>> basicAlgorithm() {
        return Optional.ofNullable(this.basicAlgorithm);
    }

    /**
     * The  location where the autoscaling policy should reside.
     * The default value is `global`.
     * 
     */
    @Import(name="location")
    private @Nullable Output<String> location;

    /**
     * @return The  location where the autoscaling policy should reside.
     * The default value is `global`.
     * 
     */
    public Optional<Output<String>> location() {
        return Optional.ofNullable(this.location);
    }

    /**
     * The &#34;resource name&#34; of the autoscaling policy.
     * 
     */
    @Import(name="name")
    private @Nullable Output<String> name;

    /**
     * @return The &#34;resource name&#34; of the autoscaling policy.
     * 
     */
    public Optional<Output<String>> name() {
        return Optional.ofNullable(this.name);
    }

    /**
     * The policy id. The id must contain only letters (a-z, A-Z), numbers (0-9), underscores (_),
     * and hyphens (-). Cannot begin or end with underscore or hyphen. Must consist of between
     * 3 and 50 characters.
     * 
     * ***
     * 
     */
    @Import(name="policyId")
    private @Nullable Output<String> policyId;

    /**
     * @return The policy id. The id must contain only letters (a-z, A-Z), numbers (0-9), underscores (_),
     * and hyphens (-). Cannot begin or end with underscore or hyphen. Must consist of between
     * 3 and 50 characters.
     * 
     * ***
     * 
     */
    public Optional<Output<String>> policyId() {
        return Optional.ofNullable(this.policyId);
    }

    /**
     * The ID of the project in which the resource belongs.
     * If it is not provided, the provider project is used.
     * 
     */
    @Import(name="project")
    private @Nullable Output<String> project;

    /**
     * @return The ID of the project in which the resource belongs.
     * If it is not provided, the provider project is used.
     * 
     */
    public Optional<Output<String>> project() {
        return Optional.ofNullable(this.project);
    }

    /**
     * Describes how the autoscaler will operate for secondary workers.
     * Structure is documented below.
     * 
     */
    @Import(name="secondaryWorkerConfig")
    private @Nullable Output<AutoscalingPolicySecondaryWorkerConfigArgs> secondaryWorkerConfig;

    /**
     * @return Describes how the autoscaler will operate for secondary workers.
     * Structure is documented below.
     * 
     */
    public Optional<Output<AutoscalingPolicySecondaryWorkerConfigArgs>> secondaryWorkerConfig() {
        return Optional.ofNullable(this.secondaryWorkerConfig);
    }

    /**
     * Describes how the autoscaler will operate for primary workers.
     * Structure is documented below.
     * 
     */
    @Import(name="workerConfig")
    private @Nullable Output<AutoscalingPolicyWorkerConfigArgs> workerConfig;

    /**
     * @return Describes how the autoscaler will operate for primary workers.
     * Structure is documented below.
     * 
     */
    public Optional<Output<AutoscalingPolicyWorkerConfigArgs>> workerConfig() {
        return Optional.ofNullable(this.workerConfig);
    }

    private AutoscalingPolicyState() {}

    private AutoscalingPolicyState(AutoscalingPolicyState $) {
        this.basicAlgorithm = $.basicAlgorithm;
        this.location = $.location;
        this.name = $.name;
        this.policyId = $.policyId;
        this.project = $.project;
        this.secondaryWorkerConfig = $.secondaryWorkerConfig;
        this.workerConfig = $.workerConfig;
    }

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

    public static final class Builder {
        private AutoscalingPolicyState $;

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

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

        /**
         * @param basicAlgorithm Basic algorithm for autoscaling.
         * Structure is documented below.
         * 
         * @return builder
         * 
         */
        public Builder basicAlgorithm(@Nullable Output<AutoscalingPolicyBasicAlgorithmArgs> basicAlgorithm) {
            $.basicAlgorithm = basicAlgorithm;
            return this;
        }

        /**
         * @param basicAlgorithm Basic algorithm for autoscaling.
         * Structure is documented below.
         * 
         * @return builder
         * 
         */
        public Builder basicAlgorithm(AutoscalingPolicyBasicAlgorithmArgs basicAlgorithm) {
            return basicAlgorithm(Output.of(basicAlgorithm));
        }

        /**
         * @param location The  location where the autoscaling policy should reside.
         * The default value is `global`.
         * 
         * @return builder
         * 
         */
        public Builder location(@Nullable Output<String> location) {
            $.location = location;
            return this;
        }

        /**
         * @param location The  location where the autoscaling policy should reside.
         * The default value is `global`.
         * 
         * @return builder
         * 
         */
        public Builder location(String location) {
            return location(Output.of(location));
        }

        /**
         * @param name The &#34;resource name&#34; of the autoscaling policy.
         * 
         * @return builder
         * 
         */
        public Builder name(@Nullable Output<String> name) {
            $.name = name;
            return this;
        }

        /**
         * @param name The &#34;resource name&#34; of the autoscaling policy.
         * 
         * @return builder
         * 
         */
        public Builder name(String name) {
            return name(Output.of(name));
        }

        /**
         * @param policyId The policy id. The id must contain only letters (a-z, A-Z), numbers (0-9), underscores (_),
         * and hyphens (-). Cannot begin or end with underscore or hyphen. Must consist of between
         * 3 and 50 characters.
         * 
         * ***
         * 
         * @return builder
         * 
         */
        public Builder policyId(@Nullable Output<String> policyId) {
            $.policyId = policyId;
            return this;
        }

        /**
         * @param policyId The policy id. The id must contain only letters (a-z, A-Z), numbers (0-9), underscores (_),
         * and hyphens (-). Cannot begin or end with underscore or hyphen. Must consist of between
         * 3 and 50 characters.
         * 
         * ***
         * 
         * @return builder
         * 
         */
        public Builder policyId(String policyId) {
            return policyId(Output.of(policyId));
        }

        /**
         * @param project The ID of the project in which the resource belongs.
         * If it is not provided, the provider project is used.
         * 
         * @return builder
         * 
         */
        public Builder project(@Nullable Output<String> project) {
            $.project = project;
            return this;
        }

        /**
         * @param project The ID of the project in which the resource belongs.
         * If it is not provided, the provider project is used.
         * 
         * @return builder
         * 
         */
        public Builder project(String project) {
            return project(Output.of(project));
        }

        /**
         * @param secondaryWorkerConfig Describes how the autoscaler will operate for secondary workers.
         * Structure is documented below.
         * 
         * @return builder
         * 
         */
        public Builder secondaryWorkerConfig(@Nullable Output<AutoscalingPolicySecondaryWorkerConfigArgs> secondaryWorkerConfig) {
            $.secondaryWorkerConfig = secondaryWorkerConfig;
            return this;
        }

        /**
         * @param secondaryWorkerConfig Describes how the autoscaler will operate for secondary workers.
         * Structure is documented below.
         * 
         * @return builder
         * 
         */
        public Builder secondaryWorkerConfig(AutoscalingPolicySecondaryWorkerConfigArgs secondaryWorkerConfig) {
            return secondaryWorkerConfig(Output.of(secondaryWorkerConfig));
        }

        /**
         * @param workerConfig Describes how the autoscaler will operate for primary workers.
         * Structure is documented below.
         * 
         * @return builder
         * 
         */
        public Builder workerConfig(@Nullable Output<AutoscalingPolicyWorkerConfigArgs> workerConfig) {
            $.workerConfig = workerConfig;
            return this;
        }

        /**
         * @param workerConfig Describes how the autoscaler will operate for primary workers.
         * Structure is documented below.
         * 
         * @return builder
         * 
         */
        public Builder workerConfig(AutoscalingPolicyWorkerConfigArgs workerConfig) {
            return workerConfig(Output.of(workerConfig));
        }

        public AutoscalingPolicyState build() {
            return $;
        }
    }

}
