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

package com.azure.resourcemanager.dataprotection.models;

import com.azure.core.annotation.Fluent;
import com.fasterxml.jackson.annotation.JsonProperty;

/** Monitoring Settings. */
@Fluent
public final class MonitoringSettings {
    /*
     * Settings for Azure Monitor based alerts
     */
    @JsonProperty(value = "azureMonitorAlertSettings")
    private AzureMonitorAlertSettings azureMonitorAlertSettings;

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

    /**
     * Get the azureMonitorAlertSettings property: Settings for Azure Monitor based alerts.
     *
     * @return the azureMonitorAlertSettings value.
     */
    public AzureMonitorAlertSettings azureMonitorAlertSettings() {
        return this.azureMonitorAlertSettings;
    }

    /**
     * Set the azureMonitorAlertSettings property: Settings for Azure Monitor based alerts.
     *
     * @param azureMonitorAlertSettings the azureMonitorAlertSettings value to set.
     * @return the MonitoringSettings object itself.
     */
    public MonitoringSettings withAzureMonitorAlertSettings(AzureMonitorAlertSettings azureMonitorAlertSettings) {
        this.azureMonitorAlertSettings = azureMonitorAlertSettings;
        return this;
    }

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