// 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.annotation.JsonFlatten;
import com.azure.core.util.logging.ClientLogger;
import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonProperty;

/** Cluster update parameters. */
@JsonFlatten
@Fluent
public class ClusterUpdateParameters {
    @JsonIgnore private final ClientLogger logger = new ClientLogger(ClusterUpdateParameters.class);

    /*
     * Desired scale settings for the cluster. Batch AI service supports manual
     * and auto scale clusters.
     */
    @JsonProperty(value = "properties.scaleSettings")
    private ScaleSettings scaleSettings;

    /**
     * Get the scaleSettings property: Desired scale settings for the cluster. Batch AI service supports manual and auto
     * scale clusters.
     *
     * @return the scaleSettings value.
     */
    public ScaleSettings scaleSettings() {
        return this.scaleSettings;
    }

    /**
     * Set the scaleSettings property: Desired scale settings for the cluster. Batch AI service supports manual and auto
     * scale clusters.
     *
     * @param scaleSettings the scaleSettings value to set.
     * @return the ClusterUpdateParameters object itself.
     */
    public ClusterUpdateParameters withScaleSettings(ScaleSettings scaleSettings) {
        this.scaleSettings = scaleSettings;
        return this;
    }

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