|
| 1 | +/** |
| 2 | + * Copyright 2021 UCloud Technology Co., Ltd. |
| 3 | + * |
| 4 | + * <p>Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file |
| 5 | + * except in compliance with the License. You may obtain a copy of the License at |
| 6 | + * |
| 7 | + * <p>http://www.apache.org/licenses/LICENSE-2.0 |
| 8 | + * |
| 9 | + * <p>Unless required by applicable law or agreed to in writing, software distributed under the |
| 10 | + * License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either |
| 11 | + * express or implied. See the License for the specific language governing permissions and |
| 12 | + * limitations under the License. |
| 13 | + */ |
| 14 | +package cn.ucloud.cloudwatch.models; |
| 15 | + |
| 16 | +import cn.ucloud.common.annotation.NotEmpty; |
| 17 | +import cn.ucloud.common.annotation.UCloudParam; |
| 18 | +import cn.ucloud.common.request.Request; |
| 19 | + |
| 20 | +import java.util.List; |
| 21 | + |
| 22 | +public class CreateAlertStrategyTemplateRequest extends Request { |
| 23 | + |
| 24 | + /** |
| 25 | + * 项目ID。不填写为默认项目,子帐号必须填写。 |
| 26 | + * 请参考[GetProjectList接口](https://docs.ucloud.cn/api/summary/get_project_list) |
| 27 | + */ |
| 28 | + @NotEmpty |
| 29 | + @UCloudParam("ProjectId") |
| 30 | + private String projectId; |
| 31 | + |
| 32 | + /** 告警模板名称。最大长度64个字符 */ |
| 33 | + @NotEmpty |
| 34 | + @UCloudParam("Name") |
| 35 | + private String name; |
| 36 | + |
| 37 | + /** 产品类型。参考ListMonitorProduct获取监控对象类型列表 */ |
| 38 | + @NotEmpty |
| 39 | + @UCloudParam("ProductKey") |
| 40 | + private String productKey; |
| 41 | + |
| 42 | + /** */ |
| 43 | + @UCloudParam("RuleSet") |
| 44 | + private List<RuleSet> ruleSet; |
| 45 | + |
| 46 | + /** 备注 */ |
| 47 | + @UCloudParam("Remark") |
| 48 | + private String remark; |
| 49 | + |
| 50 | + public String getProjectId() { |
| 51 | + return projectId; |
| 52 | + } |
| 53 | + |
| 54 | + public void setProjectId(String projectId) { |
| 55 | + this.projectId = projectId; |
| 56 | + } |
| 57 | + |
| 58 | + public String getName() { |
| 59 | + return name; |
| 60 | + } |
| 61 | + |
| 62 | + public void setName(String name) { |
| 63 | + this.name = name; |
| 64 | + } |
| 65 | + |
| 66 | + public String getProductKey() { |
| 67 | + return productKey; |
| 68 | + } |
| 69 | + |
| 70 | + public void setProductKey(String productKey) { |
| 71 | + this.productKey = productKey; |
| 72 | + } |
| 73 | + |
| 74 | + public List<RuleSet> getRuleSet() { |
| 75 | + return ruleSet; |
| 76 | + } |
| 77 | + |
| 78 | + public void setRuleSet(List<RuleSet> ruleSet) { |
| 79 | + this.ruleSet = ruleSet; |
| 80 | + } |
| 81 | + |
| 82 | + public String getRemark() { |
| 83 | + return remark; |
| 84 | + } |
| 85 | + |
| 86 | + public void setRemark(String remark) { |
| 87 | + this.remark = remark; |
| 88 | + } |
| 89 | + |
| 90 | + public static class RuleSet extends Request { |
| 91 | + |
| 92 | + /** 规则指标ID。参考该类型产品下返回的指标列表GetProductMetrics */ |
| 93 | + @NotEmpty |
| 94 | + @UCloudParam("MetricID") |
| 95 | + private Integer metricID; |
| 96 | + |
| 97 | + /** 阈值比较方式。 枚举值比较方式: 1->= 2-<= 3-> 4-< 5-== 6-!= */ |
| 98 | + @NotEmpty |
| 99 | + @UCloudParam("ThresholdCompare") |
| 100 | + private Integer thresholdCompare; |
| 101 | + |
| 102 | + /** 触发阈值 */ |
| 103 | + @NotEmpty |
| 104 | + @UCloudParam("ThresholdValue") |
| 105 | + private Integer thresholdValue; |
| 106 | + |
| 107 | + /** 触发次数 */ |
| 108 | + @NotEmpty |
| 109 | + @UCloudParam("TriggerCount") |
| 110 | + private Integer triggerCount; |
| 111 | + |
| 112 | + /** 触发周期。枚举值:continuous连续 exponent 指数 single 不重复 */ |
| 113 | + @NotEmpty |
| 114 | + @UCloudParam("SendPeriodType") |
| 115 | + private String sendPeriodType; |
| 116 | + |
| 117 | + /** 告警等级。枚举值:P0,P1,P2,P3 */ |
| 118 | + @NotEmpty |
| 119 | + @UCloudParam("Level") |
| 120 | + private String level; |
| 121 | + |
| 122 | + /** 告警状态。枚举值:0-关闭 1-开启 */ |
| 123 | + @NotEmpty |
| 124 | + @UCloudParam("Status") |
| 125 | + private Integer status; |
| 126 | + |
| 127 | + /** 沉默周期(告警周期选择为连续时必填) */ |
| 128 | + @UCloudParam("SendInterval") |
| 129 | + private Integer sendInterval; |
| 130 | + |
| 131 | + public Integer getMetricID() { |
| 132 | + return metricID; |
| 133 | + } |
| 134 | + |
| 135 | + public void setMetricID(Integer metricID) { |
| 136 | + this.metricID = metricID; |
| 137 | + } |
| 138 | + |
| 139 | + public Integer getThresholdCompare() { |
| 140 | + return thresholdCompare; |
| 141 | + } |
| 142 | + |
| 143 | + public void setThresholdCompare(Integer thresholdCompare) { |
| 144 | + this.thresholdCompare = thresholdCompare; |
| 145 | + } |
| 146 | + |
| 147 | + public Integer getThresholdValue() { |
| 148 | + return thresholdValue; |
| 149 | + } |
| 150 | + |
| 151 | + public void setThresholdValue(Integer thresholdValue) { |
| 152 | + this.thresholdValue = thresholdValue; |
| 153 | + } |
| 154 | + |
| 155 | + public Integer getTriggerCount() { |
| 156 | + return triggerCount; |
| 157 | + } |
| 158 | + |
| 159 | + public void setTriggerCount(Integer triggerCount) { |
| 160 | + this.triggerCount = triggerCount; |
| 161 | + } |
| 162 | + |
| 163 | + public String getSendPeriodType() { |
| 164 | + return sendPeriodType; |
| 165 | + } |
| 166 | + |
| 167 | + public void setSendPeriodType(String sendPeriodType) { |
| 168 | + this.sendPeriodType = sendPeriodType; |
| 169 | + } |
| 170 | + |
| 171 | + public String getLevel() { |
| 172 | + return level; |
| 173 | + } |
| 174 | + |
| 175 | + public void setLevel(String level) { |
| 176 | + this.level = level; |
| 177 | + } |
| 178 | + |
| 179 | + public Integer getStatus() { |
| 180 | + return status; |
| 181 | + } |
| 182 | + |
| 183 | + public void setStatus(Integer status) { |
| 184 | + this.status = status; |
| 185 | + } |
| 186 | + |
| 187 | + public Integer getSendInterval() { |
| 188 | + return sendInterval; |
| 189 | + } |
| 190 | + |
| 191 | + public void setSendInterval(Integer sendInterval) { |
| 192 | + this.sendInterval = sendInterval; |
| 193 | + } |
| 194 | + } |
| 195 | +} |
0 commit comments