// 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.models;

import com.azure.core.annotation.Fluent;
import com.azure.resourcemanager.networkcloud.fluent.models.AgentPoolPatchProperties;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonProperty;
import java.util.Map;

/** AgentPoolPatchParameters represents the body of the request to patch the Kubernetes cluster agent pool. */
@Fluent
public final class AgentPoolPatchParameters {
    /*
     * AgentPoolPatchProperties represents the properties of an agent pool that can be modified.
     *
     * The list of the resource properties.
     */
    @JsonProperty(value = "properties")
    private AgentPoolPatchProperties innerProperties;

    /*
     * The Azure resource tags that will replace the existing ones.
     */
    @JsonProperty(value = "tags")
    @JsonInclude(value = JsonInclude.Include.NON_NULL, content = JsonInclude.Include.ALWAYS)
    private Map<String, String> tags;

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

    /**
     * Get the innerProperties property: AgentPoolPatchProperties represents the properties of an agent pool that can be
     * modified.
     *
     * <p>The list of the resource properties.
     *
     * @return the innerProperties value.
     */
    private AgentPoolPatchProperties innerProperties() {
        return this.innerProperties;
    }

    /**
     * Get the tags property: The Azure resource tags that will replace the existing ones.
     *
     * @return the tags value.
     */
    public Map<String, String> tags() {
        return this.tags;
    }

    /**
     * Set the tags property: The Azure resource tags that will replace the existing ones.
     *
     * @param tags the tags value to set.
     * @return the AgentPoolPatchParameters object itself.
     */
    public AgentPoolPatchParameters withTags(Map<String, String> tags) {
        this.tags = tags;
        return this;
    }

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

    /**
     * Set the count property: The number of virtual machines that use this configuration.
     *
     * @param count the count value to set.
     * @return the AgentPoolPatchParameters object itself.
     */
    public AgentPoolPatchParameters withCount(Long count) {
        if (this.innerProperties() == null) {
            this.innerProperties = new AgentPoolPatchProperties();
        }
        this.innerProperties().withCount(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.innerProperties() == null ? null : this.innerProperties().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 AgentPoolPatchParameters object itself.
     */
    public AgentPoolPatchParameters withUpgradeSettings(AgentPoolUpgradeSettings upgradeSettings) {
        if (this.innerProperties() == null) {
            this.innerProperties = new AgentPoolPatchProperties();
        }
        this.innerProperties().withUpgradeSettings(upgradeSettings);
        return this;
    }

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