DescribeMetricRuleListResult.h 2.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112
  1. /*
  2. * Copyright 2009-2017 Alibaba Cloud All rights reserved.
  3. *
  4. * Licensed under the Apache License, Version 2.0 (the "License");
  5. * you may not use this file except in compliance with the License.
  6. * You may obtain a copy of the License at
  7. *
  8. * http://www.apache.org/licenses/LICENSE-2.0
  9. *
  10. * Unless required by applicable law or agreed to in writing, software
  11. * distributed under the License is distributed on an "AS IS" BASIS,
  12. * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  13. * See the License for the specific language governing permissions and
  14. * limitations under the License.
  15. */
  16. #ifndef ALIBABACLOUD_CMS_MODEL_DESCRIBEMETRICRULELISTRESULT_H_
  17. #define ALIBABACLOUD_CMS_MODEL_DESCRIBEMETRICRULELISTRESULT_H_
  18. #include <string>
  19. #include <vector>
  20. #include <utility>
  21. #include <alibabacloud/core/ServiceResult.h>
  22. #include <alibabacloud/cms/CmsExport.h>
  23. namespace AlibabaCloud
  24. {
  25. namespace Cms
  26. {
  27. namespace Model
  28. {
  29. class ALIBABACLOUD_CMS_EXPORT DescribeMetricRuleListResult : public ServiceResult
  30. {
  31. public:
  32. struct Alarm
  33. {
  34. struct Escalations
  35. {
  36. struct Info
  37. {
  38. std::string comparisonOperator;
  39. int times;
  40. std::string preCondition;
  41. std::string statistics;
  42. std::string threshold;
  43. };
  44. struct Warn
  45. {
  46. std::string comparisonOperator;
  47. int times;
  48. std::string preCondition;
  49. std::string statistics;
  50. std::string threshold;
  51. };
  52. struct Critical
  53. {
  54. std::string comparisonOperator;
  55. int times;
  56. std::string preCondition;
  57. std::string statistics;
  58. std::string threshold;
  59. };
  60. Critical critical;
  61. Info info;
  62. Warn warn;
  63. };
  64. std::string groupName;
  65. std::string noEffectiveInterval;
  66. int silenceTime;
  67. std::string contactGroups;
  68. std::string groupBy;
  69. std::string mailSubject;
  70. std::string ruleId;
  71. std::string sourceType;
  72. std::string period;
  73. std::string dimensions;
  74. std::string _namespace;
  75. std::string effectiveInterval;
  76. std::string alertState;
  77. std::string groupId;
  78. std::string metricName;
  79. Escalations escalations;
  80. bool enableState;
  81. std::string webhook;
  82. std::string resources;
  83. std::string ruleName;
  84. };
  85. DescribeMetricRuleListResult();
  86. explicit DescribeMetricRuleListResult(const std::string &payload);
  87. ~DescribeMetricRuleListResult();
  88. std::string getMessage()const;
  89. std::string getTotal()const;
  90. std::vector<Alarm> getAlarms()const;
  91. int getCode()const;
  92. bool getSuccess()const;
  93. protected:
  94. void parse(const std::string &payload);
  95. private:
  96. std::string message_;
  97. std::string total_;
  98. std::vector<Alarm> alarms_;
  99. int code_;
  100. bool success_;
  101. };
  102. }
  103. }
  104. }
  105. #endif // !ALIBABACLOUD_CMS_MODEL_DESCRIBEMETRICRULELISTRESULT_H_