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

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

import com.azure.core.annotation.Fluent;
import com.azure.core.management.ProxyResource;
import com.azure.resourcemanager.advisor.models.CpuThreshold;
import com.azure.resourcemanager.advisor.models.DigestConfig;
import com.fasterxml.jackson.annotation.JsonProperty;
import java.util.List;

/** The Advisor configuration data structure. */
@Fluent
public final class ConfigDataInner extends ProxyResource {
    /*
     * The Advisor configuration data structure.
     */
    @JsonProperty(value = "properties")
    private ConfigDataProperties innerProperties;

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

    /**
     * Get the innerProperties property: The Advisor configuration data structure.
     *
     * @return the innerProperties value.
     */
    private ConfigDataProperties innerProperties() {
        return this.innerProperties;
    }

    /**
     * Get the exclude property: Exclude the resource from Advisor evaluations. Valid values: False (default) or True.
     *
     * @return the exclude value.
     */
    public Boolean exclude() {
        return this.innerProperties() == null ? null : this.innerProperties().exclude();
    }

    /**
     * Set the exclude property: Exclude the resource from Advisor evaluations. Valid values: False (default) or True.
     *
     * @param exclude the exclude value to set.
     * @return the ConfigDataInner object itself.
     */
    public ConfigDataInner withExclude(Boolean exclude) {
        if (this.innerProperties() == null) {
            this.innerProperties = new ConfigDataProperties();
        }
        this.innerProperties().withExclude(exclude);
        return this;
    }

    /**
     * Get the lowCpuThreshold property: Minimum percentage threshold for Advisor low CPU utilization evaluation. Valid
     * only for subscriptions. Valid values: 5 (default), 10, 15 or 20.
     *
     * @return the lowCpuThreshold value.
     */
    public CpuThreshold lowCpuThreshold() {
        return this.innerProperties() == null ? null : this.innerProperties().lowCpuThreshold();
    }

    /**
     * Set the lowCpuThreshold property: Minimum percentage threshold for Advisor low CPU utilization evaluation. Valid
     * only for subscriptions. Valid values: 5 (default), 10, 15 or 20.
     *
     * @param lowCpuThreshold the lowCpuThreshold value to set.
     * @return the ConfigDataInner object itself.
     */
    public ConfigDataInner withLowCpuThreshold(CpuThreshold lowCpuThreshold) {
        if (this.innerProperties() == null) {
            this.innerProperties = new ConfigDataProperties();
        }
        this.innerProperties().withLowCpuThreshold(lowCpuThreshold);
        return this;
    }

    /**
     * Get the digests property: Advisor digest configuration. Valid only for subscriptions.
     *
     * @return the digests value.
     */
    public List<DigestConfig> digests() {
        return this.innerProperties() == null ? null : this.innerProperties().digests();
    }

    /**
     * Set the digests property: Advisor digest configuration. Valid only for subscriptions.
     *
     * @param digests the digests value to set.
     * @return the ConfigDataInner object itself.
     */
    public ConfigDataInner withDigests(List<DigestConfig> digests) {
        if (this.innerProperties() == null) {
            this.innerProperties = new ConfigDataProperties();
        }
        this.innerProperties().withDigests(digests);
        return this;
    }

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