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.
/** * 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.
/** * The alert rule object for patch operations. */
@JsonFlatten public class AlertRuleResourcePatch {
Resource tags.
/** * Resource tags. */
@JsonProperty(value = "tags") private Map<String, String> tags;
the name of the alert rule.
/** * 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.
/** * 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.
/** * 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.
/** * 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.
/** * 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<RuleAction> actions;
Last time the rule was updated in ISO8601 format.
/** * Last time the rule was updated in ISO8601 format. */
@JsonProperty(value = "properties.lastUpdatedTime", access = JsonProperty.Access.WRITE_ONLY) private DateTime lastUpdatedTime;
Get resource tags.
Returns:the tags value
/** * Get resource tags. * * @return the tags value */
public Map<String, String> tags() { return this.tags; }
Set resource tags.
Params:
  • tags – the tags value to set
Returns:the AlertRuleResourcePatch object itself.
/** * Set resource tags. * * @param tags the tags value to set * @return the AlertRuleResourcePatch object itself. */
public AlertRuleResourcePatch withTags(Map<String, String> tags) { this.tags = tags; return this; }
Get the name of the alert rule.
Returns:the name value
/** * Get the name of the alert rule. * * @return the name value */
public String name() { return this.name; }
Set the name of the alert rule.
Params:
  • name – the name value to set
Returns:the AlertRuleResourcePatch object itself.
/** * 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.
Returns:the description value
/** * 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.
Params:
  • description – the description value to set
Returns:the AlertRuleResourcePatch object itself.
/** * 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.
Returns:the isEnabled value
/** * 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.
Params:
  • isEnabled – the isEnabled value to set
Returns:the AlertRuleResourcePatch object itself.
/** * 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.
Returns:the condition value
/** * 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.
Params:
  • condition – the condition value to set
Returns:the AlertRuleResourcePatch object itself.
/** * 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.
Returns:the actions value
/** * 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<RuleAction> 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.
Params:
  • actions – the actions value to set
Returns:the AlertRuleResourcePatch object itself.
/** * 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<RuleAction> actions) { this.actions = actions; return this; }
Get last time the rule was updated in ISO8601 format.
Returns:the lastUpdatedTime value
/** * Get last time the rule was updated in ISO8601 format. * * @return the lastUpdatedTime value */
public DateTime lastUpdatedTime() { return this.lastUpdatedTime; } }