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

package com.azure.resourcemanager.dashboard.models;

import com.azure.core.annotation.Fluent;
import com.fasterxml.jackson.annotation.JsonProperty;
import java.util.List;

/**
 * GrafanaIntegrations is a bundled observability experience (e.g. pre-configured data source, tailored Grafana
 * dashboards, alerting defaults) for common monitoring scenarios.
 */
@Fluent
public final class GrafanaIntegrations {
    /*
     * The azureMonitorWorkspaceIntegrations property.
     */
    @JsonProperty(value = "azureMonitorWorkspaceIntegrations")
    private List<AzureMonitorWorkspaceIntegration> azureMonitorWorkspaceIntegrations;

    /**
     * Get the azureMonitorWorkspaceIntegrations property: The azureMonitorWorkspaceIntegrations property.
     *
     * @return the azureMonitorWorkspaceIntegrations value.
     */
    public List<AzureMonitorWorkspaceIntegration> azureMonitorWorkspaceIntegrations() {
        return this.azureMonitorWorkspaceIntegrations;
    }

    /**
     * Set the azureMonitorWorkspaceIntegrations property: The azureMonitorWorkspaceIntegrations property.
     *
     * @param azureMonitorWorkspaceIntegrations the azureMonitorWorkspaceIntegrations value to set.
     * @return the GrafanaIntegrations object itself.
     */
    public GrafanaIntegrations withAzureMonitorWorkspaceIntegrations(
        List<AzureMonitorWorkspaceIntegration> azureMonitorWorkspaceIntegrations) {
        this.azureMonitorWorkspaceIntegrations = azureMonitorWorkspaceIntegrations;
        return this;
    }

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