// 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;

/** The properties parameters for a PATCH request to a grafana resource. */
@Fluent
public final class ManagedGrafanaPropertiesUpdateParameters {
    /*
     * The zone redundancy setting of the Grafana instance.
     */
    @JsonProperty(value = "zoneRedundancy")
    private ZoneRedundancy zoneRedundancy;

    /*
     * The api key setting of the Grafana instance.
     */
    @JsonProperty(value = "apiKey")
    private ApiKey apiKey;

    /*
     * Whether a Grafana instance uses deterministic outbound IPs.
     */
    @JsonProperty(value = "deterministicOutboundIP")
    private DeterministicOutboundIp deterministicOutboundIp;

    /*
     * Indicate the state for enable or disable traffic over the public interface.
     */
    @JsonProperty(value = "publicNetworkAccess")
    private PublicNetworkAccess publicNetworkAccess;

    /*
     * GrafanaIntegrations is a bundled observability experience (e.g. pre-configured data source, tailored Grafana
     * dashboards, alerting defaults) for common monitoring scenarios.
     */
    @JsonProperty(value = "grafanaIntegrations")
    private GrafanaIntegrations grafanaIntegrations;

    /**
     * Get the zoneRedundancy property: The zone redundancy setting of the Grafana instance.
     *
     * @return the zoneRedundancy value.
     */
    public ZoneRedundancy zoneRedundancy() {
        return this.zoneRedundancy;
    }

    /**
     * Set the zoneRedundancy property: The zone redundancy setting of the Grafana instance.
     *
     * @param zoneRedundancy the zoneRedundancy value to set.
     * @return the ManagedGrafanaPropertiesUpdateParameters object itself.
     */
    public ManagedGrafanaPropertiesUpdateParameters withZoneRedundancy(ZoneRedundancy zoneRedundancy) {
        this.zoneRedundancy = zoneRedundancy;
        return this;
    }

    /**
     * Get the apiKey property: The api key setting of the Grafana instance.
     *
     * @return the apiKey value.
     */
    public ApiKey apiKey() {
        return this.apiKey;
    }

    /**
     * Set the apiKey property: The api key setting of the Grafana instance.
     *
     * @param apiKey the apiKey value to set.
     * @return the ManagedGrafanaPropertiesUpdateParameters object itself.
     */
    public ManagedGrafanaPropertiesUpdateParameters withApiKey(ApiKey apiKey) {
        this.apiKey = apiKey;
        return this;
    }

    /**
     * Get the deterministicOutboundIp property: Whether a Grafana instance uses deterministic outbound IPs.
     *
     * @return the deterministicOutboundIp value.
     */
    public DeterministicOutboundIp deterministicOutboundIp() {
        return this.deterministicOutboundIp;
    }

    /**
     * Set the deterministicOutboundIp property: Whether a Grafana instance uses deterministic outbound IPs.
     *
     * @param deterministicOutboundIp the deterministicOutboundIp value to set.
     * @return the ManagedGrafanaPropertiesUpdateParameters object itself.
     */
    public ManagedGrafanaPropertiesUpdateParameters withDeterministicOutboundIp(
        DeterministicOutboundIp deterministicOutboundIp) {
        this.deterministicOutboundIp = deterministicOutboundIp;
        return this;
    }

    /**
     * Get the publicNetworkAccess property: Indicate the state for enable or disable traffic over the public interface.
     *
     * @return the publicNetworkAccess value.
     */
    public PublicNetworkAccess publicNetworkAccess() {
        return this.publicNetworkAccess;
    }

    /**
     * Set the publicNetworkAccess property: Indicate the state for enable or disable traffic over the public interface.
     *
     * @param publicNetworkAccess the publicNetworkAccess value to set.
     * @return the ManagedGrafanaPropertiesUpdateParameters object itself.
     */
    public ManagedGrafanaPropertiesUpdateParameters withPublicNetworkAccess(PublicNetworkAccess publicNetworkAccess) {
        this.publicNetworkAccess = publicNetworkAccess;
        return this;
    }

    /**
     * Get the grafanaIntegrations property: GrafanaIntegrations is a bundled observability experience (e.g.
     * pre-configured data source, tailored Grafana dashboards, alerting defaults) for common monitoring scenarios.
     *
     * @return the grafanaIntegrations value.
     */
    public GrafanaIntegrations grafanaIntegrations() {
        return this.grafanaIntegrations;
    }

    /**
     * Set the grafanaIntegrations property: GrafanaIntegrations is a bundled observability experience (e.g.
     * pre-configured data source, tailored Grafana dashboards, alerting defaults) for common monitoring scenarios.
     *
     * @param grafanaIntegrations the grafanaIntegrations value to set.
     * @return the ManagedGrafanaPropertiesUpdateParameters object itself.
     */
    public ManagedGrafanaPropertiesUpdateParameters withGrafanaIntegrations(GrafanaIntegrations grafanaIntegrations) {
        this.grafanaIntegrations = grafanaIntegrations;
        return this;
    }

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