// 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.fluent.models;

import com.azure.core.annotation.Fluent;
import com.azure.core.management.ProxyResource;
import com.azure.resourcemanager.alertsmanagement.models.AlertProperties;
import com.fasterxml.jackson.annotation.JsonProperty;

/** An alert created in alert management service. */
@Fluent
public final class AlertInner extends ProxyResource {
    /*
     * Alert property bag
     */
    @JsonProperty(value = "properties")
    private AlertProperties properties;

    /**
     * Get the properties property: Alert property bag.
     *
     * @return the properties value.
     */
    public AlertProperties properties() {
        return this.properties;
    }

    /**
     * Set the properties property: Alert property bag.
     *
     * @param properties the properties value to set.
     * @return the AlertInner object itself.
     */
    public AlertInner withProperties(AlertProperties properties) {
        this.properties = properties;
        return this;
    }

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