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

package com.azure.resourcemanager.alertsmanagement.models;

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

/** Alert property bag. */
@Fluent
public final class AlertProperties {
    /*
     * This object contains consistent fields across different monitor services.
     */
    @JsonProperty(value = "essentials")
    private Essentials essentials;

    /*
     * Information specific to the monitor service that gives more contextual details about the alert.
     */
    @JsonProperty(value = "context", access = JsonProperty.Access.WRITE_ONLY)
    private Object context;

    /*
     * Config which would be used for displaying the data in portal.
     */
    @JsonProperty(value = "egressConfig", access = JsonProperty.Access.WRITE_ONLY)
    private Object egressConfig;

    /**
     * Get the essentials property: This object contains consistent fields across different monitor services.
     *
     * @return the essentials value.
     */
    public Essentials essentials() {
        return this.essentials;
    }

    /**
     * Set the essentials property: This object contains consistent fields across different monitor services.
     *
     * @param essentials the essentials value to set.
     * @return the AlertProperties object itself.
     */
    public AlertProperties withEssentials(Essentials essentials) {
        this.essentials = essentials;
        return this;
    }

    /**
     * Get the context property: Information specific to the monitor service that gives more contextual details about
     * the alert.
     *
     * @return the context value.
     */
    public Object context() {
        return this.context;
    }

    /**
     * Get the egressConfig property: Config which would be used for displaying the data in portal.
     *
     * @return the egressConfig value.
     */
    public Object egressConfig() {
        return this.egressConfig;
    }

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