
com.azure.resourcemanager.monitor.models.AlertRulePatchObject Maven / Gradle / Ivy
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
// Code generated by Microsoft (R) AutoRest Code Generator.
package com.azure.resourcemanager.monitor.models;
import com.azure.core.annotation.Fluent;
import com.azure.resourcemanager.monitor.fluent.models.AlertRulePatchProperties;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonProperty;
import java.util.Map;
/**
* An Activity Log Alert rule object for the body of patch operations.
*/
@Fluent
public final class AlertRulePatchObject {
/*
* The resource tags
*/
@JsonProperty(value = "tags")
@JsonInclude(value = JsonInclude.Include.NON_NULL, content = JsonInclude.Include.ALWAYS)
private Map tags;
/*
* The activity log alert settings for an update operation.
*/
@JsonProperty(value = "properties")
private AlertRulePatchProperties innerProperties;
/**
* Creates an instance of AlertRulePatchObject class.
*/
public AlertRulePatchObject() {
}
/**
* Get the tags property: The resource tags.
*
* @return the tags value.
*/
public Map tags() {
return this.tags;
}
/**
* Set the tags property: The resource tags.
*
* @param tags the tags value to set.
* @return the AlertRulePatchObject object itself.
*/
public AlertRulePatchObject withTags(Map tags) {
this.tags = tags;
return this;
}
/**
* Get the innerProperties property: The activity log alert settings for an update operation.
*
* @return the innerProperties value.
*/
private AlertRulePatchProperties innerProperties() {
return this.innerProperties;
}
/**
* Get the enabled property: Indicates whether this Activity Log Alert rule is enabled. If an Activity Log Alert
* rule is not enabled, then none of its actions will be activated.
*
* @return the enabled value.
*/
public Boolean enabled() {
return this.innerProperties() == null ? null : this.innerProperties().enabled();
}
/**
* Set the enabled property: Indicates whether this Activity Log Alert rule is enabled. If an Activity Log Alert
* rule is not enabled, then none of its actions will be activated.
*
* @param enabled the enabled value to set.
* @return the AlertRulePatchObject object itself.
*/
public AlertRulePatchObject withEnabled(Boolean enabled) {
if (this.innerProperties() == null) {
this.innerProperties = new AlertRulePatchProperties();
}
this.innerProperties().withEnabled(enabled);
return this;
}
/**
* Validates the instance.
*
* @throws IllegalArgumentException thrown if the instance is not valid.
*/
public void validate() {
if (innerProperties() != null) {
innerProperties().validate();
}
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy