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

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

import com.azure.core.annotation.Fluent;
import com.azure.core.management.ProxyResource;
import com.azure.core.management.SystemData;
import com.azure.resourcemanager.workloads.models.SapLandscapeMonitorMetricThresholds;
import com.azure.resourcemanager.workloads.models.SapLandscapeMonitorPropertiesGrouping;
import com.azure.resourcemanager.workloads.models.SapLandscapeMonitorProvisioningState;
import com.fasterxml.jackson.annotation.JsonProperty;
import java.util.List;

/** configuration associated with SAP Landscape Monitor Dashboard. */
@Fluent
public final class SapLandscapeMonitorInner extends ProxyResource {
    /*
     * Sap Landscape Monitor properties
     */
    @JsonProperty(value = "properties")
    private SapLandscapeMonitorProperties innerProperties;

    /*
     * Azure Resource Manager metadata containing createdBy and modifiedBy information.
     */
    @JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY)
    private SystemData systemData;

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

    /**
     * Get the innerProperties property: Sap Landscape Monitor properties.
     *
     * @return the innerProperties value.
     */
    private SapLandscapeMonitorProperties innerProperties() {
        return this.innerProperties;
    }

    /**
     * Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information.
     *
     * @return the systemData value.
     */
    public SystemData systemData() {
        return this.systemData;
    }

    /**
     * Get the provisioningState property: State of provisioning of the SAP monitor.
     *
     * @return the provisioningState value.
     */
    public SapLandscapeMonitorProvisioningState provisioningState() {
        return this.innerProperties() == null ? null : this.innerProperties().provisioningState();
    }

    /**
     * Get the grouping property: Gets or sets the SID groupings by landscape and Environment.
     *
     * @return the grouping value.
     */
    public SapLandscapeMonitorPropertiesGrouping grouping() {
        return this.innerProperties() == null ? null : this.innerProperties().grouping();
    }

    /**
     * Set the grouping property: Gets or sets the SID groupings by landscape and Environment.
     *
     * @param grouping the grouping value to set.
     * @return the SapLandscapeMonitorInner object itself.
     */
    public SapLandscapeMonitorInner withGrouping(SapLandscapeMonitorPropertiesGrouping grouping) {
        if (this.innerProperties() == null) {
            this.innerProperties = new SapLandscapeMonitorProperties();
        }
        this.innerProperties().withGrouping(grouping);
        return this;
    }

    /**
     * Get the topMetricsThresholds property: Gets or sets the list Top Metric Thresholds for SAP Landscape Monitor
     * Dashboard.
     *
     * @return the topMetricsThresholds value.
     */
    public List<SapLandscapeMonitorMetricThresholds> topMetricsThresholds() {
        return this.innerProperties() == null ? null : this.innerProperties().topMetricsThresholds();
    }

    /**
     * Set the topMetricsThresholds property: Gets or sets the list Top Metric Thresholds for SAP Landscape Monitor
     * Dashboard.
     *
     * @param topMetricsThresholds the topMetricsThresholds value to set.
     * @return the SapLandscapeMonitorInner object itself.
     */
    public SapLandscapeMonitorInner withTopMetricsThresholds(
        List<SapLandscapeMonitorMetricThresholds> topMetricsThresholds) {
        if (this.innerProperties() == null) {
            this.innerProperties = new SapLandscapeMonitorProperties();
        }
        this.innerProperties().withTopMetricsThresholds(topMetricsThresholds);
        return this;
    }

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