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

package com.azure.resourcemanager.networkcloud.fluent.models;

import com.azure.core.annotation.Fluent;
import com.azure.resourcemanager.networkcloud.models.AgentPoolUpgradeSettings;
import com.fasterxml.jackson.annotation.JsonProperty;

/** AgentPoolPatchProperties represents the properties of an agent pool that can be modified. */
@Fluent
public final class AgentPoolPatchProperties {
    /*
     * The number of virtual machines that use this configuration.
     */
    @JsonProperty(value = "count")
    private Long count;

    /*
     * AgentPoolUpgradeSettings specifies the upgrade settings for an agent pool.
     *
     * The configuration of the agent pool.
     */
    @JsonProperty(value = "upgradeSettings")
    private AgentPoolUpgradeSettings upgradeSettings;

    /** Creates an instance of AgentPoolPatchProperties class. */
    public AgentPoolPatchProperties() {
    }

    /**
     * Get the count property: The number of virtual machines that use this configuration.
     *
     * @return the count value.
     */
    public Long count() {
        return this.count;
    }

    /**
     * Set the count property: The number of virtual machines that use this configuration.
     *
     * @param count the count value to set.
     * @return the AgentPoolPatchProperties object itself.
     */
    public AgentPoolPatchProperties withCount(Long count) {
        this.count = count;
        return this;
    }

    /**
     * Get the upgradeSettings property: AgentPoolUpgradeSettings specifies the upgrade settings for an agent pool.
     *
     * <p>The configuration of the agent pool.
     *
     * @return the upgradeSettings value.
     */
    public AgentPoolUpgradeSettings upgradeSettings() {
        return this.upgradeSettings;
    }

    /**
     * Set the upgradeSettings property: AgentPoolUpgradeSettings specifies the upgrade settings for an agent pool.
     *
     * <p>The configuration of the agent pool.
     *
     * @param upgradeSettings the upgradeSettings value to set.
     * @return the AgentPoolPatchProperties object itself.
     */
    public AgentPoolPatchProperties withUpgradeSettings(AgentPoolUpgradeSettings upgradeSettings) {
        this.upgradeSettings = upgradeSettings;
        return this;
    }

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