com.tencentcloudapi.monitor.v20180724.models.UpdateAlertRuleRequest Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of tencentcloud-sdk-java-intl-en Show documentation
Show all versions of tencentcloud-sdk-java-intl-en Show documentation
Tencent Cloud API SDK for Java
/*
* Copyright (c) 2017-2018 THL A29 Limited, a Tencent company. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.tencentcloudapi.monitor.v20180724.models;
import com.tencentcloudapi.common.AbstractModel;
import com.tencentcloudapi.common.SSEResponseModel;
import com.google.gson.annotations.SerializedName;
import com.google.gson.annotations.Expose;
import java.util.HashMap;
public class UpdateAlertRuleRequest extends AbstractModel {
/**
* Prometheus alerting rule ID
*/
@SerializedName("RuleId")
@Expose
private String RuleId;
/**
* Prometheus instance ID
*/
@SerializedName("InstanceId")
@Expose
private String InstanceId;
/**
* Rule status code. Valid values:
1=RuleDeleted
2=RuleEnabled
3=RuleDisabled
Default value: 2 (enabled).
*/
@SerializedName("RuleState")
@Expose
private Long RuleState;
/**
* Alerting rule name
*/
@SerializedName("RuleName")
@Expose
private String RuleName;
/**
* Alerting rule expression
*/
@SerializedName("Expr")
@Expose
private String Expr;
/**
* Alerting rule duration
*/
@SerializedName("Duration")
@Expose
private String Duration;
/**
* List of alerting rule recipient groups
*/
@SerializedName("Receivers")
@Expose
private String [] Receivers;
/**
* List of alerting rule tags
*/
@SerializedName("Labels")
@Expose
private PrometheusRuleKV [] Labels;
/**
* List of alerting rule annotations.
Alert object and alert message are special fields of Prometheus Rule Annotations, which need to be passed in through `annotations` and correspond to `summary` and `description` keys respectively.
*/
@SerializedName("Annotations")
@Expose
private PrometheusRuleKV [] Annotations;
/**
* Alerting rule template category
*/
@SerializedName("Type")
@Expose
private String Type;
/**
* Get Prometheus alerting rule ID
* @return RuleId Prometheus alerting rule ID
*/
public String getRuleId() {
return this.RuleId;
}
/**
* Set Prometheus alerting rule ID
* @param RuleId Prometheus alerting rule ID
*/
public void setRuleId(String RuleId) {
this.RuleId = RuleId;
}
/**
* Get Prometheus instance ID
* @return InstanceId Prometheus instance ID
*/
public String getInstanceId() {
return this.InstanceId;
}
/**
* Set Prometheus instance ID
* @param InstanceId Prometheus instance ID
*/
public void setInstanceId(String InstanceId) {
this.InstanceId = InstanceId;
}
/**
* Get Rule status code. Valid values:
1=RuleDeleted
2=RuleEnabled
3=RuleDisabled
Default value: 2 (enabled).
* @return RuleState Rule status code. Valid values:
1=RuleDeleted
2=RuleEnabled
3=RuleDisabled
Default value: 2 (enabled).
*/
public Long getRuleState() {
return this.RuleState;
}
/**
* Set Rule status code. Valid values:
1=RuleDeleted
2=RuleEnabled
3=RuleDisabled
Default value: 2 (enabled).
* @param RuleState Rule status code. Valid values:
1=RuleDeleted
2=RuleEnabled
3=RuleDisabled
Default value: 2 (enabled).
*/
public void setRuleState(Long RuleState) {
this.RuleState = RuleState;
}
/**
* Get Alerting rule name
* @return RuleName Alerting rule name
*/
public String getRuleName() {
return this.RuleName;
}
/**
* Set Alerting rule name
* @param RuleName Alerting rule name
*/
public void setRuleName(String RuleName) {
this.RuleName = RuleName;
}
/**
* Get Alerting rule expression
* @return Expr Alerting rule expression
*/
public String getExpr() {
return this.Expr;
}
/**
* Set Alerting rule expression
* @param Expr Alerting rule expression
*/
public void setExpr(String Expr) {
this.Expr = Expr;
}
/**
* Get Alerting rule duration
* @return Duration Alerting rule duration
*/
public String getDuration() {
return this.Duration;
}
/**
* Set Alerting rule duration
* @param Duration Alerting rule duration
*/
public void setDuration(String Duration) {
this.Duration = Duration;
}
/**
* Get List of alerting rule recipient groups
* @return Receivers List of alerting rule recipient groups
*/
public String [] getReceivers() {
return this.Receivers;
}
/**
* Set List of alerting rule recipient groups
* @param Receivers List of alerting rule recipient groups
*/
public void setReceivers(String [] Receivers) {
this.Receivers = Receivers;
}
/**
* Get List of alerting rule tags
* @return Labels List of alerting rule tags
*/
public PrometheusRuleKV [] getLabels() {
return this.Labels;
}
/**
* Set List of alerting rule tags
* @param Labels List of alerting rule tags
*/
public void setLabels(PrometheusRuleKV [] Labels) {
this.Labels = Labels;
}
/**
* Get List of alerting rule annotations.
Alert object and alert message are special fields of Prometheus Rule Annotations, which need to be passed in through `annotations` and correspond to `summary` and `description` keys respectively.
* @return Annotations List of alerting rule annotations.
Alert object and alert message are special fields of Prometheus Rule Annotations, which need to be passed in through `annotations` and correspond to `summary` and `description` keys respectively.
*/
public PrometheusRuleKV [] getAnnotations() {
return this.Annotations;
}
/**
* Set List of alerting rule annotations.
Alert object and alert message are special fields of Prometheus Rule Annotations, which need to be passed in through `annotations` and correspond to `summary` and `description` keys respectively.
* @param Annotations List of alerting rule annotations.
Alert object and alert message are special fields of Prometheus Rule Annotations, which need to be passed in through `annotations` and correspond to `summary` and `description` keys respectively.
*/
public void setAnnotations(PrometheusRuleKV [] Annotations) {
this.Annotations = Annotations;
}
/**
* Get Alerting rule template category
* @return Type Alerting rule template category
*/
public String getType() {
return this.Type;
}
/**
* Set Alerting rule template category
* @param Type Alerting rule template category
*/
public void setType(String Type) {
this.Type = Type;
}
public UpdateAlertRuleRequest() {
}
/**
* NOTE: Any ambiguous key set via .set("AnyKey", "value") will be a shallow copy,
* and any explicit key, i.e Foo, set via .setFoo("value") will be a deep copy.
*/
public UpdateAlertRuleRequest(UpdateAlertRuleRequest source) {
if (source.RuleId != null) {
this.RuleId = new String(source.RuleId);
}
if (source.InstanceId != null) {
this.InstanceId = new String(source.InstanceId);
}
if (source.RuleState != null) {
this.RuleState = new Long(source.RuleState);
}
if (source.RuleName != null) {
this.RuleName = new String(source.RuleName);
}
if (source.Expr != null) {
this.Expr = new String(source.Expr);
}
if (source.Duration != null) {
this.Duration = new String(source.Duration);
}
if (source.Receivers != null) {
this.Receivers = new String[source.Receivers.length];
for (int i = 0; i < source.Receivers.length; i++) {
this.Receivers[i] = new String(source.Receivers[i]);
}
}
if (source.Labels != null) {
this.Labels = new PrometheusRuleKV[source.Labels.length];
for (int i = 0; i < source.Labels.length; i++) {
this.Labels[i] = new PrometheusRuleKV(source.Labels[i]);
}
}
if (source.Annotations != null) {
this.Annotations = new PrometheusRuleKV[source.Annotations.length];
for (int i = 0; i < source.Annotations.length; i++) {
this.Annotations[i] = new PrometheusRuleKV(source.Annotations[i]);
}
}
if (source.Type != null) {
this.Type = new String(source.Type);
}
}
/**
* Internal implementation, normal users should not use it.
*/
public void toMap(HashMap map, String prefix) {
this.setParamSimple(map, prefix + "RuleId", this.RuleId);
this.setParamSimple(map, prefix + "InstanceId", this.InstanceId);
this.setParamSimple(map, prefix + "RuleState", this.RuleState);
this.setParamSimple(map, prefix + "RuleName", this.RuleName);
this.setParamSimple(map, prefix + "Expr", this.Expr);
this.setParamSimple(map, prefix + "Duration", this.Duration);
this.setParamArraySimple(map, prefix + "Receivers.", this.Receivers);
this.setParamArrayObj(map, prefix + "Labels.", this.Labels);
this.setParamArrayObj(map, prefix + "Annotations.", this.Annotations);
this.setParamSimple(map, prefix + "Type", this.Type);
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy