text: # coding=utf8
  
  # Copyright 2018 JDCLOUD.COM
  #
  # 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.
  #
  # NOTE: This class is auto generated by the jdcloud code generator program.
  
  
  class CreateAlarmParam(object):
  
      def __init__(self, calculateUnit, calculation, downSample, metric, operation, period, resourceIds, serviceCode, threshold, times, contactGroups=None, contactPersons=None, noticeLevel=None, noticePeriod=None, ruleName=None, tags=None, webHookContent=None, webHookProtocol=None, webHookSecret=None, webHookUrl=None):
          """
          :param calculateUnit:  单位
          :param calculation:  统计方法，必须与定义的metric一致，可选值列表：avg,sum,max,min
          :param contactGroups: (Optional) 报警规则通知的联系组，必须在控制台上已创建，例如" ['联系组1','联系组2']"
          :param contactPersons: (Optional) 报警规则通知的联系人，必须在控制台上已创建，例如 [“联系人1”,”联系人2”]
          :param downSample:  降采样函数
          :param metric:  根据产品线查询可用监控项列表 接口 返回的Metric字段
          :param noticeLevel: (Optional) 
          :param noticePeriod: (Optional) 通知周期 单位：小时
          :param operation:  报警比较符，只能为以下几种lte(<=),lt(<),gt(>),gte(>=),eq(==),ne(!=)
          :param period:  查询指标的周期，单位为分钟,目前支持的取值：1，2，5，10,15，30，60
          :param resourceIds:  报警规则对应实例列表，每次最多100个，例如"['resourceId1','resourceId2']"
          :param ruleName: (Optional) 规则名称，最大长度42个字符，只允许中英文、数字、''-''和"_"
          :param serviceCode:  产品名称
          :param tags: (Optional) 多值标签
          :param threshold:  报警阈值，目前只开放数值类型功能
          :param times:  连续探测几次都满足阈值条件时报警，可选值:1,2,3,5,10,15,30,60
          :param webHookContent: (Optional) 回调content 注：仅webHookUrl和webHookContent均不为空时，才会创建webHook
          :param webHookProtocol: (Optional) webHook协议，目前支持http，https
          :param webHookSecret: (Optional) 回调secret，用户请求签名，防伪造
          :param webHookUrl: (Optional) 回调url，例如http://www.jdcloud.com
          """
  
          self.calculateUnit = calculateUnit
          self.calculation = calculation
          self.contactGroups = contactGroups
          self.contactPersons = contactPersons
          self.downSample = downSample
          self.metric = metric
          self.noticeLevel = noticeLevel
          self.noticePeriod = noticePeriod
          self.operation = operation
          self.period = period
          self.resourceIds = resourceIds
          self.ruleName = ruleName
          self.serviceCode = serviceCode
          self.tags = tags
          self.threshold = threshold
          self.times = times
          self.webHookContent = webHookContent
          self.webHookProtocol = webHookProtocol
          self.webHookSecret = webHookSecret
          self.webHookUrl = webHookUrl
  