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

import com.pulumi.core.annotations.CustomType;
import com.pulumi.gcp.gameservices.outputs.GameServerConfigScalingConfigSchedule;
import com.pulumi.gcp.gameservices.outputs.GameServerConfigScalingConfigSelector;
import java.lang.String;
import java.util.List;
import java.util.Objects;
import javax.annotation.Nullable;

@CustomType
public final class GameServerConfigScalingConfig {
    /**
     * @return Fleet autoscaler spec, which is sent to Agones.
     * Example spec can be found :
     * https://agones.dev/site/docs/reference/fleetautoscaler/
     * 
     */
    private String fleetAutoscalerSpec;
    /**
     * @return The name of the ScalingConfig
     * 
     */
    private String name;
    /**
     * @return The schedules to which this scaling config applies.
     * Structure is documented below.
     * 
     */
    private @Nullable List<GameServerConfigScalingConfigSchedule> schedules;
    /**
     * @return Labels used to identify the clusters to which this scaling config
     * applies. A cluster is subject to this scaling config if its labels match
     * any of the selector entries.
     * Structure is documented below.
     * 
     */
    private @Nullable List<GameServerConfigScalingConfigSelector> selectors;

    private GameServerConfigScalingConfig() {}
    /**
     * @return Fleet autoscaler spec, which is sent to Agones.
     * Example spec can be found :
     * https://agones.dev/site/docs/reference/fleetautoscaler/
     * 
     */
    public String fleetAutoscalerSpec() {
        return this.fleetAutoscalerSpec;
    }
    /**
     * @return The name of the ScalingConfig
     * 
     */
    public String name() {
        return this.name;
    }
    /**
     * @return The schedules to which this scaling config applies.
     * Structure is documented below.
     * 
     */
    public List<GameServerConfigScalingConfigSchedule> schedules() {
        return this.schedules == null ? List.of() : this.schedules;
    }
    /**
     * @return Labels used to identify the clusters to which this scaling config
     * applies. A cluster is subject to this scaling config if its labels match
     * any of the selector entries.
     * Structure is documented below.
     * 
     */
    public List<GameServerConfigScalingConfigSelector> selectors() {
        return this.selectors == null ? List.of() : this.selectors;
    }

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

    public static Builder builder(GameServerConfigScalingConfig defaults) {
        return new Builder(defaults);
    }
    @CustomType.Builder
    public static final class Builder {
        private String fleetAutoscalerSpec;
        private String name;
        private @Nullable List<GameServerConfigScalingConfigSchedule> schedules;
        private @Nullable List<GameServerConfigScalingConfigSelector> selectors;
        public Builder() {}
        public Builder(GameServerConfigScalingConfig defaults) {
    	      Objects.requireNonNull(defaults);
    	      this.fleetAutoscalerSpec = defaults.fleetAutoscalerSpec;
    	      this.name = defaults.name;
    	      this.schedules = defaults.schedules;
    	      this.selectors = defaults.selectors;
        }

        @CustomType.Setter
        public Builder fleetAutoscalerSpec(String fleetAutoscalerSpec) {
            this.fleetAutoscalerSpec = Objects.requireNonNull(fleetAutoscalerSpec);
            return this;
        }
        @CustomType.Setter
        public Builder name(String name) {
            this.name = Objects.requireNonNull(name);
            return this;
        }
        @CustomType.Setter
        public Builder schedules(@Nullable List<GameServerConfigScalingConfigSchedule> schedules) {
            this.schedules = schedules;
            return this;
        }
        public Builder schedules(GameServerConfigScalingConfigSchedule... schedules) {
            return schedules(List.of(schedules));
        }
        @CustomType.Setter
        public Builder selectors(@Nullable List<GameServerConfigScalingConfigSelector> selectors) {
            this.selectors = selectors;
            return this;
        }
        public Builder selectors(GameServerConfigScalingConfigSelector... selectors) {
            return selectors(List.of(selectors));
        }
        public GameServerConfigScalingConfig build() {
            final var o = new GameServerConfigScalingConfig();
            o.fleetAutoscalerSpec = fleetAutoscalerSpec;
            o.name = name;
            o.schedules = schedules;
            o.selectors = selectors;
            return o;
        }
    }
}
