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

package com.azure.resourcemanager.batchai.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;

/** Manual scale settings for the cluster. */
@Fluent
public final class ManualScaleSettings {
    @JsonIgnore private final ClientLogger logger = new ClientLogger(ManualScaleSettings.class);

    /*
     * The desired number of compute nodes in the Cluster. Default is 0.
     */
    @JsonProperty(value = "targetNodeCount", required = true)
    private int targetNodeCount;

    /*
     * An action to be performed when the cluster size is decreasing. The
     * default value is requeue.
     */
    @JsonProperty(value = "nodeDeallocationOption")
    private DeallocationOption nodeDeallocationOption;

    /**
     * Get the targetNodeCount property: The desired number of compute nodes in the Cluster. Default is 0.
     *
     * @return the targetNodeCount value.
     */
    public int targetNodeCount() {
        return this.targetNodeCount;
    }

    /**
     * Set the targetNodeCount property: The desired number of compute nodes in the Cluster. Default is 0.
     *
     * @param targetNodeCount the targetNodeCount value to set.
     * @return the ManualScaleSettings object itself.
     */
    public ManualScaleSettings withTargetNodeCount(int targetNodeCount) {
        this.targetNodeCount = targetNodeCount;
        return this;
    }

    /**
     * Get the nodeDeallocationOption property: An action to be performed when the cluster size is decreasing. The
     * default value is requeue.
     *
     * @return the nodeDeallocationOption value.
     */
    public DeallocationOption nodeDeallocationOption() {
        return this.nodeDeallocationOption;
    }

    /**
     * Set the nodeDeallocationOption property: An action to be performed when the cluster size is decreasing. The
     * default value is requeue.
     *
     * @param nodeDeallocationOption the nodeDeallocationOption value to set.
     * @return the ManualScaleSettings object itself.
     */
    public ManualScaleSettings withNodeDeallocationOption(DeallocationOption nodeDeallocationOption) {
        this.nodeDeallocationOption = nodeDeallocationOption;
        return this;
    }

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