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

com.microsoft.azure.management.monitor.AlertRuleResourcePatch 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;

import java.util.Map;
import java.util.List;
import org.joda.time.DateTime;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.microsoft.rest.serializer.JsonFlatten;

/**
 * The alert rule object for patch operations.
 */
@JsonFlatten
public class AlertRuleResourcePatch {
    /**
     * Resource tags.
     */
    @JsonProperty(value = "tags")
    private Map tags;

    /**
     * the name of the alert rule.
     */
    @JsonProperty(value = "properties.name", required = true)
    private String name;

    /**
     * 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 resource tags.
     *
     * @return the tags value
     */
    public Map tags() {
        return this.tags;
    }

    /**
     * Set resource tags.
     *
     * @param tags the tags value to set
     * @return the AlertRuleResourcePatch object itself.
     */
    public AlertRuleResourcePatch withTags(Map tags) {
        this.tags = tags;
        return this;
    }

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

    /**
     * Set the name of the alert rule.
     *
     * @param name the name value to set
     * @return the AlertRuleResourcePatch object itself.
     */
    public AlertRuleResourcePatch withName(String name) {
        this.name = name;
        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 AlertRuleResourcePatch object itself.
     */
    public AlertRuleResourcePatch 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 AlertRuleResourcePatch object itself.
     */
    public AlertRuleResourcePatch 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 AlertRuleResourcePatch object itself.
     */
    public AlertRuleResourcePatch 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 AlertRuleResourcePatch object itself.
     */
    public AlertRuleResourcePatch 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