All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.microsoft.azure.management.monitor.implementation.AlertRuleResourceInner Maven / Gradle / Ivy

Go to download

This package contains Microsoft Azure Monitor SDK. This package has been deprecated. A replacement package com.azure.resourcemanager:azure-resourcemanager-monitor is available as of 31-March-2022. We strongly encourage you to upgrade to continue receiving updates. See Migration Guide https://aka.ms/java-track2-migration-guide for guidance on upgrading. Refer to our deprecation policy https://azure.github.io/azure-sdk/policies_support.html for more details.

There is a newer version: 1.41.4
Show newest version
/**
 * Copyright (c) Microsoft Corporation. All rights reserved.
 * Licensed under the MIT License. See License.txt in the project root for
 * license information.
 *
 * Code generated by Microsoft (R) AutoRest Code Generator.
 */

package com.microsoft.azure.management.monitor.implementation;

import com.microsoft.azure.management.monitor.RuleCondition;
import java.util.List;
import com.microsoft.azure.management.monitor.RuleAction;
import org.joda.time.DateTime;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.microsoft.rest.serializer.JsonFlatten;
import com.microsoft.azure.Resource;

/**
 * The alert rule resource.
 */
@JsonFlatten
public class AlertRuleResourceInner extends Resource {
    /**
     * the name of the alert rule.
     */
    @JsonProperty(value = "properties.name", required = true)
    private String alertRuleResourceName;

    /**
     * the description of the alert rule that will be included in the alert
     * email.
     */
    @JsonProperty(value = "properties.description")
    private String description;

    /**
     * the flag that indicates whether the alert rule is enabled.
     */
    @JsonProperty(value = "properties.isEnabled", required = true)
    private boolean isEnabled;

    /**
     * the condition that results in the alert rule being activated.
     */
    @JsonProperty(value = "properties.condition", required = true)
    private RuleCondition condition;

    /**
     * the array of actions that are performed when the alert rule becomes
     * active, and when an alert condition is resolved.
     */
    @JsonProperty(value = "properties.actions")
    private List actions;

    /**
     * Last time the rule was updated in ISO8601 format.
     */
    @JsonProperty(value = "properties.lastUpdatedTime", access = JsonProperty.Access.WRITE_ONLY)
    private DateTime lastUpdatedTime;

    /**
     * Get the name of the alert rule.
     *
     * @return the alertRuleResourceName value
     */
    public String alertRuleResourceName() {
        return this.alertRuleResourceName;
    }

    /**
     * Set the name of the alert rule.
     *
     * @param alertRuleResourceName the alertRuleResourceName value to set
     * @return the AlertRuleResourceInner object itself.
     */
    public AlertRuleResourceInner withAlertRuleResourceName(String alertRuleResourceName) {
        this.alertRuleResourceName = alertRuleResourceName;
        return this;
    }

    /**
     * Get the description of the alert rule that will be included in the alert email.
     *
     * @return the description value
     */
    public String description() {
        return this.description;
    }

    /**
     * Set the description of the alert rule that will be included in the alert email.
     *
     * @param description the description value to set
     * @return the AlertRuleResourceInner object itself.
     */
    public AlertRuleResourceInner withDescription(String description) {
        this.description = description;
        return this;
    }

    /**
     * Get the flag that indicates whether the alert rule is enabled.
     *
     * @return the isEnabled value
     */
    public boolean isEnabled() {
        return this.isEnabled;
    }

    /**
     * Set the flag that indicates whether the alert rule is enabled.
     *
     * @param isEnabled the isEnabled value to set
     * @return the AlertRuleResourceInner object itself.
     */
    public AlertRuleResourceInner withIsEnabled(boolean isEnabled) {
        this.isEnabled = isEnabled;
        return this;
    }

    /**
     * Get the condition that results in the alert rule being activated.
     *
     * @return the condition value
     */
    public RuleCondition condition() {
        return this.condition;
    }

    /**
     * Set the condition that results in the alert rule being activated.
     *
     * @param condition the condition value to set
     * @return the AlertRuleResourceInner object itself.
     */
    public AlertRuleResourceInner withCondition(RuleCondition condition) {
        this.condition = condition;
        return this;
    }

    /**
     * Get the array of actions that are performed when the alert rule becomes active, and when an alert condition is resolved.
     *
     * @return the actions value
     */
    public List actions() {
        return this.actions;
    }

    /**
     * Set the array of actions that are performed when the alert rule becomes active, and when an alert condition is resolved.
     *
     * @param actions the actions value to set
     * @return the AlertRuleResourceInner object itself.
     */
    public AlertRuleResourceInner withActions(List actions) {
        this.actions = actions;
        return this;
    }

    /**
     * Get last time the rule was updated in ISO8601 format.
     *
     * @return the lastUpdatedTime value
     */
    public DateTime lastUpdatedTime() {
        return this.lastUpdatedTime;
    }

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy