
com.tencentcloudapi.monitor.v20180724.models.CreateAlarmPolicyRequest Maven / Gradle / Ivy
/*
* 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.google.gson.annotations.SerializedName;
import com.google.gson.annotations.Expose;
import java.util.HashMap;
public class CreateAlarmPolicyRequest extends AbstractModel{
/**
* 固定值,为"monitor"
*/
@SerializedName("Module")
@Expose
private String Module;
/**
* 策略名称,不超过20字符
*/
@SerializedName("PolicyName")
@Expose
private String PolicyName;
/**
* 监控类型 MT_QCE=云产品监控
*/
@SerializedName("MonitorType")
@Expose
private String MonitorType;
/**
* 告警策略类型,由 [DescribeAllNamespaces](https://cloud.tencent.com/document/product/248/48683) 获得。对于云产品监控,取接口出参的 QceNamespacesNew.N.Id,例如 cvm_device
*/
@SerializedName("Namespace")
@Expose
private String Namespace;
/**
* 备注,不超过100字符,仅支持中英文、数字、下划线、-
*/
@SerializedName("Remark")
@Expose
private String Remark;
/**
* 是否启用 0=停用 1=启用,可不传 默认为1
*/
@SerializedName("Enable")
@Expose
private Long Enable;
/**
* 项目 Id,对于区分项目的产品必须传入非 -1 的值。 -1=无项目 0=默认项目,如不传 默认为 -1。支持的项目 Id 可以在控制台 [账号中心-项目管理](https://console.cloud.tencent.com/project) 中查看。
*/
@SerializedName("ProjectId")
@Expose
private Long ProjectId;
/**
* 触发条件模板 Id,该参数与 Condition 参数二选一。如果策略绑定触发条件模板,则传该参数;否则不传该参数,而是传 Condition 参数。触发条件模板 Id 可以从 [DescribeConditionsTemplateList](https://cloud.tencent.com/document/api/248/70250) 接口获取。
*/
@SerializedName("ConditionTemplateId")
@Expose
private Long ConditionTemplateId;
/**
* 指标触发条件,支持的指标可以从 [DescribeAlarmMetrics](https://cloud.tencent.com/document/product/248/51283) 查询。
*/
@SerializedName("Condition")
@Expose
private AlarmPolicyCondition Condition;
/**
* 事件触发条件,支持的事件可以从 [DescribeAlarmEvents](https://cloud.tencent.com/document/product/248/51284) 查询。
*/
@SerializedName("EventCondition")
@Expose
private AlarmPolicyEventCondition EventCondition;
/**
* 通知规则 Id 列表,由 [DescribeAlarmNotices](https://cloud.tencent.com/document/product/248/51280) 获得
*/
@SerializedName("NoticeIds")
@Expose
private String [] NoticeIds;
/**
* 触发任务列表
*/
@SerializedName("TriggerTasks")
@Expose
private AlarmPolicyTriggerTask [] TriggerTasks;
/**
* 全局过滤条件
*/
@SerializedName("Filter")
@Expose
private AlarmPolicyFilter Filter;
/**
* 聚合维度列表,指定按哪些维度 key 来做 group by
*/
@SerializedName("GroupBy")
@Expose
private String [] GroupBy;
/**
* 模板绑定的标签
*/
@SerializedName("Tags")
@Expose
private Tag [] Tags;
/**
* 日志告警信息
*/
@SerializedName("LogAlarmReqInfo")
@Expose
private LogAlarmReq LogAlarmReqInfo;
/**
* 告警分级通知规则配置
*/
@SerializedName("HierarchicalNotices")
@Expose
private AlarmHierarchicalNotice [] HierarchicalNotices;
/**
* 迁移策略专用字段,0-走鉴权逻辑,1-跳过鉴权逻辑
*/
@SerializedName("MigrateFlag")
@Expose
private Long MigrateFlag;
/**
* 事件配置的告警
*/
@SerializedName("EbSubject")
@Expose
private String EbSubject;
/**
* Get 固定值,为"monitor"
* @return Module 固定值,为"monitor"
*/
public String getModule() {
return this.Module;
}
/**
* Set 固定值,为"monitor"
* @param Module 固定值,为"monitor"
*/
public void setModule(String Module) {
this.Module = Module;
}
/**
* Get 策略名称,不超过20字符
* @return PolicyName 策略名称,不超过20字符
*/
public String getPolicyName() {
return this.PolicyName;
}
/**
* Set 策略名称,不超过20字符
* @param PolicyName 策略名称,不超过20字符
*/
public void setPolicyName(String PolicyName) {
this.PolicyName = PolicyName;
}
/**
* Get 监控类型 MT_QCE=云产品监控
* @return MonitorType 监控类型 MT_QCE=云产品监控
*/
public String getMonitorType() {
return this.MonitorType;
}
/**
* Set 监控类型 MT_QCE=云产品监控
* @param MonitorType 监控类型 MT_QCE=云产品监控
*/
public void setMonitorType(String MonitorType) {
this.MonitorType = MonitorType;
}
/**
* Get 告警策略类型,由 [DescribeAllNamespaces](https://cloud.tencent.com/document/product/248/48683) 获得。对于云产品监控,取接口出参的 QceNamespacesNew.N.Id,例如 cvm_device
* @return Namespace 告警策略类型,由 [DescribeAllNamespaces](https://cloud.tencent.com/document/product/248/48683) 获得。对于云产品监控,取接口出参的 QceNamespacesNew.N.Id,例如 cvm_device
*/
public String getNamespace() {
return this.Namespace;
}
/**
* Set 告警策略类型,由 [DescribeAllNamespaces](https://cloud.tencent.com/document/product/248/48683) 获得。对于云产品监控,取接口出参的 QceNamespacesNew.N.Id,例如 cvm_device
* @param Namespace 告警策略类型,由 [DescribeAllNamespaces](https://cloud.tencent.com/document/product/248/48683) 获得。对于云产品监控,取接口出参的 QceNamespacesNew.N.Id,例如 cvm_device
*/
public void setNamespace(String Namespace) {
this.Namespace = Namespace;
}
/**
* Get 备注,不超过100字符,仅支持中英文、数字、下划线、-
* @return Remark 备注,不超过100字符,仅支持中英文、数字、下划线、-
*/
public String getRemark() {
return this.Remark;
}
/**
* Set 备注,不超过100字符,仅支持中英文、数字、下划线、-
* @param Remark 备注,不超过100字符,仅支持中英文、数字、下划线、-
*/
public void setRemark(String Remark) {
this.Remark = Remark;
}
/**
* Get 是否启用 0=停用 1=启用,可不传 默认为1
* @return Enable 是否启用 0=停用 1=启用,可不传 默认为1
*/
public Long getEnable() {
return this.Enable;
}
/**
* Set 是否启用 0=停用 1=启用,可不传 默认为1
* @param Enable 是否启用 0=停用 1=启用,可不传 默认为1
*/
public void setEnable(Long Enable) {
this.Enable = Enable;
}
/**
* Get 项目 Id,对于区分项目的产品必须传入非 -1 的值。 -1=无项目 0=默认项目,如不传 默认为 -1。支持的项目 Id 可以在控制台 [账号中心-项目管理](https://console.cloud.tencent.com/project) 中查看。
* @return ProjectId 项目 Id,对于区分项目的产品必须传入非 -1 的值。 -1=无项目 0=默认项目,如不传 默认为 -1。支持的项目 Id 可以在控制台 [账号中心-项目管理](https://console.cloud.tencent.com/project) 中查看。
*/
public Long getProjectId() {
return this.ProjectId;
}
/**
* Set 项目 Id,对于区分项目的产品必须传入非 -1 的值。 -1=无项目 0=默认项目,如不传 默认为 -1。支持的项目 Id 可以在控制台 [账号中心-项目管理](https://console.cloud.tencent.com/project) 中查看。
* @param ProjectId 项目 Id,对于区分项目的产品必须传入非 -1 的值。 -1=无项目 0=默认项目,如不传 默认为 -1。支持的项目 Id 可以在控制台 [账号中心-项目管理](https://console.cloud.tencent.com/project) 中查看。
*/
public void setProjectId(Long ProjectId) {
this.ProjectId = ProjectId;
}
/**
* Get 触发条件模板 Id,该参数与 Condition 参数二选一。如果策略绑定触发条件模板,则传该参数;否则不传该参数,而是传 Condition 参数。触发条件模板 Id 可以从 [DescribeConditionsTemplateList](https://cloud.tencent.com/document/api/248/70250) 接口获取。
* @return ConditionTemplateId 触发条件模板 Id,该参数与 Condition 参数二选一。如果策略绑定触发条件模板,则传该参数;否则不传该参数,而是传 Condition 参数。触发条件模板 Id 可以从 [DescribeConditionsTemplateList](https://cloud.tencent.com/document/api/248/70250) 接口获取。
*/
public Long getConditionTemplateId() {
return this.ConditionTemplateId;
}
/**
* Set 触发条件模板 Id,该参数与 Condition 参数二选一。如果策略绑定触发条件模板,则传该参数;否则不传该参数,而是传 Condition 参数。触发条件模板 Id 可以从 [DescribeConditionsTemplateList](https://cloud.tencent.com/document/api/248/70250) 接口获取。
* @param ConditionTemplateId 触发条件模板 Id,该参数与 Condition 参数二选一。如果策略绑定触发条件模板,则传该参数;否则不传该参数,而是传 Condition 参数。触发条件模板 Id 可以从 [DescribeConditionsTemplateList](https://cloud.tencent.com/document/api/248/70250) 接口获取。
*/
public void setConditionTemplateId(Long ConditionTemplateId) {
this.ConditionTemplateId = ConditionTemplateId;
}
/**
* Get 指标触发条件,支持的指标可以从 [DescribeAlarmMetrics](https://cloud.tencent.com/document/product/248/51283) 查询。
* @return Condition 指标触发条件,支持的指标可以从 [DescribeAlarmMetrics](https://cloud.tencent.com/document/product/248/51283) 查询。
*/
public AlarmPolicyCondition getCondition() {
return this.Condition;
}
/**
* Set 指标触发条件,支持的指标可以从 [DescribeAlarmMetrics](https://cloud.tencent.com/document/product/248/51283) 查询。
* @param Condition 指标触发条件,支持的指标可以从 [DescribeAlarmMetrics](https://cloud.tencent.com/document/product/248/51283) 查询。
*/
public void setCondition(AlarmPolicyCondition Condition) {
this.Condition = Condition;
}
/**
* Get 事件触发条件,支持的事件可以从 [DescribeAlarmEvents](https://cloud.tencent.com/document/product/248/51284) 查询。
* @return EventCondition 事件触发条件,支持的事件可以从 [DescribeAlarmEvents](https://cloud.tencent.com/document/product/248/51284) 查询。
*/
public AlarmPolicyEventCondition getEventCondition() {
return this.EventCondition;
}
/**
* Set 事件触发条件,支持的事件可以从 [DescribeAlarmEvents](https://cloud.tencent.com/document/product/248/51284) 查询。
* @param EventCondition 事件触发条件,支持的事件可以从 [DescribeAlarmEvents](https://cloud.tencent.com/document/product/248/51284) 查询。
*/
public void setEventCondition(AlarmPolicyEventCondition EventCondition) {
this.EventCondition = EventCondition;
}
/**
* Get 通知规则 Id 列表,由 [DescribeAlarmNotices](https://cloud.tencent.com/document/product/248/51280) 获得
* @return NoticeIds 通知规则 Id 列表,由 [DescribeAlarmNotices](https://cloud.tencent.com/document/product/248/51280) 获得
*/
public String [] getNoticeIds() {
return this.NoticeIds;
}
/**
* Set 通知规则 Id 列表,由 [DescribeAlarmNotices](https://cloud.tencent.com/document/product/248/51280) 获得
* @param NoticeIds 通知规则 Id 列表,由 [DescribeAlarmNotices](https://cloud.tencent.com/document/product/248/51280) 获得
*/
public void setNoticeIds(String [] NoticeIds) {
this.NoticeIds = NoticeIds;
}
/**
* Get 触发任务列表
* @return TriggerTasks 触发任务列表
*/
public AlarmPolicyTriggerTask [] getTriggerTasks() {
return this.TriggerTasks;
}
/**
* Set 触发任务列表
* @param TriggerTasks 触发任务列表
*/
public void setTriggerTasks(AlarmPolicyTriggerTask [] TriggerTasks) {
this.TriggerTasks = TriggerTasks;
}
/**
* Get 全局过滤条件
* @return Filter 全局过滤条件
*/
public AlarmPolicyFilter getFilter() {
return this.Filter;
}
/**
* Set 全局过滤条件
* @param Filter 全局过滤条件
*/
public void setFilter(AlarmPolicyFilter Filter) {
this.Filter = Filter;
}
/**
* Get 聚合维度列表,指定按哪些维度 key 来做 group by
* @return GroupBy 聚合维度列表,指定按哪些维度 key 来做 group by
*/
public String [] getGroupBy() {
return this.GroupBy;
}
/**
* Set 聚合维度列表,指定按哪些维度 key 来做 group by
* @param GroupBy 聚合维度列表,指定按哪些维度 key 来做 group by
*/
public void setGroupBy(String [] GroupBy) {
this.GroupBy = GroupBy;
}
/**
* Get 模板绑定的标签
* @return Tags 模板绑定的标签
*/
public Tag [] getTags() {
return this.Tags;
}
/**
* Set 模板绑定的标签
* @param Tags 模板绑定的标签
*/
public void setTags(Tag [] Tags) {
this.Tags = Tags;
}
/**
* Get 日志告警信息
* @return LogAlarmReqInfo 日志告警信息
*/
public LogAlarmReq getLogAlarmReqInfo() {
return this.LogAlarmReqInfo;
}
/**
* Set 日志告警信息
* @param LogAlarmReqInfo 日志告警信息
*/
public void setLogAlarmReqInfo(LogAlarmReq LogAlarmReqInfo) {
this.LogAlarmReqInfo = LogAlarmReqInfo;
}
/**
* Get 告警分级通知规则配置
* @return HierarchicalNotices 告警分级通知规则配置
*/
public AlarmHierarchicalNotice [] getHierarchicalNotices() {
return this.HierarchicalNotices;
}
/**
* Set 告警分级通知规则配置
* @param HierarchicalNotices 告警分级通知规则配置
*/
public void setHierarchicalNotices(AlarmHierarchicalNotice [] HierarchicalNotices) {
this.HierarchicalNotices = HierarchicalNotices;
}
/**
* Get 迁移策略专用字段,0-走鉴权逻辑,1-跳过鉴权逻辑
* @return MigrateFlag 迁移策略专用字段,0-走鉴权逻辑,1-跳过鉴权逻辑
*/
public Long getMigrateFlag() {
return this.MigrateFlag;
}
/**
* Set 迁移策略专用字段,0-走鉴权逻辑,1-跳过鉴权逻辑
* @param MigrateFlag 迁移策略专用字段,0-走鉴权逻辑,1-跳过鉴权逻辑
*/
public void setMigrateFlag(Long MigrateFlag) {
this.MigrateFlag = MigrateFlag;
}
/**
* Get 事件配置的告警
* @return EbSubject 事件配置的告警
*/
public String getEbSubject() {
return this.EbSubject;
}
/**
* Set 事件配置的告警
* @param EbSubject 事件配置的告警
*/
public void setEbSubject(String EbSubject) {
this.EbSubject = EbSubject;
}
public CreateAlarmPolicyRequest() {
}
/**
* 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 CreateAlarmPolicyRequest(CreateAlarmPolicyRequest source) {
if (source.Module != null) {
this.Module = new String(source.Module);
}
if (source.PolicyName != null) {
this.PolicyName = new String(source.PolicyName);
}
if (source.MonitorType != null) {
this.MonitorType = new String(source.MonitorType);
}
if (source.Namespace != null) {
this.Namespace = new String(source.Namespace);
}
if (source.Remark != null) {
this.Remark = new String(source.Remark);
}
if (source.Enable != null) {
this.Enable = new Long(source.Enable);
}
if (source.ProjectId != null) {
this.ProjectId = new Long(source.ProjectId);
}
if (source.ConditionTemplateId != null) {
this.ConditionTemplateId = new Long(source.ConditionTemplateId);
}
if (source.Condition != null) {
this.Condition = new AlarmPolicyCondition(source.Condition);
}
if (source.EventCondition != null) {
this.EventCondition = new AlarmPolicyEventCondition(source.EventCondition);
}
if (source.NoticeIds != null) {
this.NoticeIds = new String[source.NoticeIds.length];
for (int i = 0; i < source.NoticeIds.length; i++) {
this.NoticeIds[i] = new String(source.NoticeIds[i]);
}
}
if (source.TriggerTasks != null) {
this.TriggerTasks = new AlarmPolicyTriggerTask[source.TriggerTasks.length];
for (int i = 0; i < source.TriggerTasks.length; i++) {
this.TriggerTasks[i] = new AlarmPolicyTriggerTask(source.TriggerTasks[i]);
}
}
if (source.Filter != null) {
this.Filter = new AlarmPolicyFilter(source.Filter);
}
if (source.GroupBy != null) {
this.GroupBy = new String[source.GroupBy.length];
for (int i = 0; i < source.GroupBy.length; i++) {
this.GroupBy[i] = new String(source.GroupBy[i]);
}
}
if (source.Tags != null) {
this.Tags = new Tag[source.Tags.length];
for (int i = 0; i < source.Tags.length; i++) {
this.Tags[i] = new Tag(source.Tags[i]);
}
}
if (source.LogAlarmReqInfo != null) {
this.LogAlarmReqInfo = new LogAlarmReq(source.LogAlarmReqInfo);
}
if (source.HierarchicalNotices != null) {
this.HierarchicalNotices = new AlarmHierarchicalNotice[source.HierarchicalNotices.length];
for (int i = 0; i < source.HierarchicalNotices.length; i++) {
this.HierarchicalNotices[i] = new AlarmHierarchicalNotice(source.HierarchicalNotices[i]);
}
}
if (source.MigrateFlag != null) {
this.MigrateFlag = new Long(source.MigrateFlag);
}
if (source.EbSubject != null) {
this.EbSubject = new String(source.EbSubject);
}
}
/**
* Internal implementation, normal users should not use it.
*/
public void toMap(HashMap map, String prefix) {
this.setParamSimple(map, prefix + "Module", this.Module);
this.setParamSimple(map, prefix + "PolicyName", this.PolicyName);
this.setParamSimple(map, prefix + "MonitorType", this.MonitorType);
this.setParamSimple(map, prefix + "Namespace", this.Namespace);
this.setParamSimple(map, prefix + "Remark", this.Remark);
this.setParamSimple(map, prefix + "Enable", this.Enable);
this.setParamSimple(map, prefix + "ProjectId", this.ProjectId);
this.setParamSimple(map, prefix + "ConditionTemplateId", this.ConditionTemplateId);
this.setParamObj(map, prefix + "Condition.", this.Condition);
this.setParamObj(map, prefix + "EventCondition.", this.EventCondition);
this.setParamArraySimple(map, prefix + "NoticeIds.", this.NoticeIds);
this.setParamArrayObj(map, prefix + "TriggerTasks.", this.TriggerTasks);
this.setParamObj(map, prefix + "Filter.", this.Filter);
this.setParamArraySimple(map, prefix + "GroupBy.", this.GroupBy);
this.setParamArrayObj(map, prefix + "Tags.", this.Tags);
this.setParamObj(map, prefix + "LogAlarmReqInfo.", this.LogAlarmReqInfo);
this.setParamArrayObj(map, prefix + "HierarchicalNotices.", this.HierarchicalNotices);
this.setParamSimple(map, prefix + "MigrateFlag", this.MigrateFlag);
this.setParamSimple(map, prefix + "EbSubject", this.EbSubject);
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy