// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
// Code generated by Microsoft (R) AutoRest Code Generator.

package com.azure.resourcemanager.machinelearningservices.models;

import com.azure.core.annotation.Fluent;
import com.azure.core.util.logging.ClientLogger;
import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonProperty;

/** The Auto Scaler properties. */
@Fluent
public class AutoScaler {
    @JsonIgnore private final ClientLogger logger = new ClientLogger(AutoScaler.class);

    /*
     * Option to enable/disable auto scaling.
     */
    @JsonProperty(value = "autoscaleEnabled")
    private Boolean autoscaleEnabled;

    /*
     * The minimum number of replicas to scale down to.
     */
    @JsonProperty(value = "minReplicas")
    private Integer minReplicas;

    /*
     * The maximum number of replicas in the cluster.
     */
    @JsonProperty(value = "maxReplicas")
    private Integer maxReplicas;

    /*
     * The target utilization percentage to use for determining whether to
     * scale the cluster.
     */
    @JsonProperty(value = "targetUtilization")
    private Integer targetUtilization;

    /*
     * The amount of seconds to wait between auto scale updates.
     */
    @JsonProperty(value = "refreshPeriodInSeconds")
    private Integer refreshPeriodInSeconds;

    /**
     * Get the autoscaleEnabled property: Option to enable/disable auto scaling.
     *
     * @return the autoscaleEnabled value.
     */
    public Boolean autoscaleEnabled() {
        return this.autoscaleEnabled;
    }

    /**
     * Set the autoscaleEnabled property: Option to enable/disable auto scaling.
     *
     * @param autoscaleEnabled the autoscaleEnabled value to set.
     * @return the AutoScaler object itself.
     */
    public AutoScaler withAutoscaleEnabled(Boolean autoscaleEnabled) {
        this.autoscaleEnabled = autoscaleEnabled;
        return this;
    }

    /**
     * Get the minReplicas property: The minimum number of replicas to scale down to.
     *
     * @return the minReplicas value.
     */
    public Integer minReplicas() {
        return this.minReplicas;
    }

    /**
     * Set the minReplicas property: The minimum number of replicas to scale down to.
     *
     * @param minReplicas the minReplicas value to set.
     * @return the AutoScaler object itself.
     */
    public AutoScaler withMinReplicas(Integer minReplicas) {
        this.minReplicas = minReplicas;
        return this;
    }

    /**
     * Get the maxReplicas property: The maximum number of replicas in the cluster.
     *
     * @return the maxReplicas value.
     */
    public Integer maxReplicas() {
        return this.maxReplicas;
    }

    /**
     * Set the maxReplicas property: The maximum number of replicas in the cluster.
     *
     * @param maxReplicas the maxReplicas value to set.
     * @return the AutoScaler object itself.
     */
    public AutoScaler withMaxReplicas(Integer maxReplicas) {
        this.maxReplicas = maxReplicas;
        return this;
    }

    /**
     * Get the targetUtilization property: The target utilization percentage to use for determining whether to scale the
     * cluster.
     *
     * @return the targetUtilization value.
     */
    public Integer targetUtilization() {
        return this.targetUtilization;
    }

    /**
     * Set the targetUtilization property: The target utilization percentage to use for determining whether to scale the
     * cluster.
     *
     * @param targetUtilization the targetUtilization value to set.
     * @return the AutoScaler object itself.
     */
    public AutoScaler withTargetUtilization(Integer targetUtilization) {
        this.targetUtilization = targetUtilization;
        return this;
    }

    /**
     * Get the refreshPeriodInSeconds property: The amount of seconds to wait between auto scale updates.
     *
     * @return the refreshPeriodInSeconds value.
     */
    public Integer refreshPeriodInSeconds() {
        return this.refreshPeriodInSeconds;
    }

    /**
     * Set the refreshPeriodInSeconds property: The amount of seconds to wait between auto scale updates.
     *
     * @param refreshPeriodInSeconds the refreshPeriodInSeconds value to set.
     * @return the AutoScaler object itself.
     */
    public AutoScaler withRefreshPeriodInSeconds(Integer refreshPeriodInSeconds) {
        this.refreshPeriodInSeconds = refreshPeriodInSeconds;
        return this;
    }

    /**
     * Validates the instance.
     *
     * @throws IllegalArgumentException thrown if the instance is not valid.
     */
    public void validate() {
    }
}
