// 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.ClusterMetricsConfigurationPatchProperties;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonProperty;
import java.util.List;
import java.util.Map;

/**
 * ClusterMetricsConfigurationPatchParameters represents the body of the request to patch the metrics configuration of
 * cluster.
 */
@Fluent
public final class ClusterMetricsConfigurationPatchParameters {
    /*
     * ClusterMetricsConfigurationPatchProperties represents the properties of metrics configuration for the cluster
     * for patching.
     *
     * The list of the resource properties.
     */
    @JsonProperty(value = "properties")
    private ClusterMetricsConfigurationPatchProperties 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 ClusterMetricsConfigurationPatchParameters class. */
    public ClusterMetricsConfigurationPatchParameters() {
    }

    /**
     * Get the innerProperties property: ClusterMetricsConfigurationPatchProperties represents the properties of metrics
     * configuration for the cluster for patching.
     *
     * <p>The list of the resource properties.
     *
     * @return the innerProperties value.
     */
    private ClusterMetricsConfigurationPatchProperties 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 ClusterMetricsConfigurationPatchParameters object itself.
     */
    public ClusterMetricsConfigurationPatchParameters withTags(Map<String, String> tags) {
        this.tags = tags;
        return this;
    }

    /**
     * Get the collectionInterval property: The interval in minutes by which metrics will be collected.
     *
     * @return the collectionInterval value.
     */
    public Long collectionInterval() {
        return this.innerProperties() == null ? null : this.innerProperties().collectionInterval();
    }

    /**
     * Set the collectionInterval property: The interval in minutes by which metrics will be collected.
     *
     * @param collectionInterval the collectionInterval value to set.
     * @return the ClusterMetricsConfigurationPatchParameters object itself.
     */
    public ClusterMetricsConfigurationPatchParameters withCollectionInterval(Long collectionInterval) {
        if (this.innerProperties() == null) {
            this.innerProperties = new ClusterMetricsConfigurationPatchProperties();
        }
        this.innerProperties().withCollectionInterval(collectionInterval);
        return this;
    }

    /**
     * Get the enabledMetrics property: The list of metric names that have been chosen to be enabled in addition to the
     * core set of enabled metrics.
     *
     * @return the enabledMetrics value.
     */
    public List<String> enabledMetrics() {
        return this.innerProperties() == null ? null : this.innerProperties().enabledMetrics();
    }

    /**
     * Set the enabledMetrics property: The list of metric names that have been chosen to be enabled in addition to the
     * core set of enabled metrics.
     *
     * @param enabledMetrics the enabledMetrics value to set.
     * @return the ClusterMetricsConfigurationPatchParameters object itself.
     */
    public ClusterMetricsConfigurationPatchParameters withEnabledMetrics(List<String> enabledMetrics) {
        if (this.innerProperties() == null) {
            this.innerProperties = new ClusterMetricsConfigurationPatchProperties();
        }
        this.innerProperties().withEnabledMetrics(enabledMetrics);
        return this;
    }

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