CreateOrUpdateAlertRuleResult.h 3.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122
  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_ARMS_MODEL_CREATEORUPDATEALERTRULERESULT_H_
  17. #define ALIBABACLOUD_ARMS_MODEL_CREATEORUPDATEALERTRULERESULT_H_
  18. #include <string>
  19. #include <vector>
  20. #include <utility>
  21. #include <alibabacloud/core/ServiceResult.h>
  22. #include <alibabacloud/arms/ARMSExport.h>
  23. namespace AlibabaCloud
  24. {
  25. namespace ARMS
  26. {
  27. namespace Model
  28. {
  29. class ALIBABACLOUD_ARMS_EXPORT CreateOrUpdateAlertRuleResult : public ServiceResult
  30. {
  31. public:
  32. struct AlertRule
  33. {
  34. struct AlertRuleContent
  35. {
  36. struct AlertRuleItemsItem
  37. {
  38. std::string metricKey;
  39. std::string value;
  40. std::string _operator;
  41. std::string aggregate;
  42. float n;
  43. };
  44. std::string condition;
  45. std::vector<AlertRuleItemsItem> alertRuleItems;
  46. };
  47. struct Filters
  48. {
  49. struct DimFiltersItem
  50. {
  51. std::string filterOpt;
  52. std::vector<std::string> filterValues;
  53. std::string filterKey;
  54. };
  55. struct CustomSLSFiltersItem
  56. {
  57. std::string opt;
  58. std::string t;
  59. std::string value;
  60. bool show;
  61. std::string key;
  62. };
  63. std::vector<CustomSLSFiltersItem> customSLSFilters;
  64. std::vector<std::string> customSLSWheres;
  65. std::vector<std::string> customSLSGroupByDimensions;
  66. std::vector<DimFiltersItem> dimFilters;
  67. };
  68. struct LabelsItem
  69. {
  70. std::string value;
  71. std::string name;
  72. };
  73. struct AnnotationsItem
  74. {
  75. std::string value;
  76. std::string name;
  77. };
  78. std::string alertName;
  79. long createdTime;
  80. std::string message;
  81. std::string clusterId;
  82. std::string promQL;
  83. std::string alertCheckType;
  84. AlertRuleContent alertRuleContent;
  85. std::string notifyStrategy;
  86. std::vector<LabelsItem> labels;
  87. std::string duration;
  88. std::vector<std::string> pids;
  89. std::string alertType;
  90. Filters filters;
  91. float alertId;
  92. long alertGroup;
  93. std::vector<AnnotationsItem> annotations;
  94. std::string extend;
  95. std::string userId;
  96. std::string alertStatus;
  97. bool autoAddNewApplication;
  98. std::string level;
  99. std::string regionId;
  100. long updatedTime;
  101. std::string metricsType;
  102. };
  103. CreateOrUpdateAlertRuleResult();
  104. explicit CreateOrUpdateAlertRuleResult(const std::string &payload);
  105. ~CreateOrUpdateAlertRuleResult();
  106. AlertRule getAlertRule()const;
  107. protected:
  108. void parse(const std::string &payload);
  109. private:
  110. AlertRule alertRule_;
  111. };
  112. }
  113. }
  114. }
  115. #endif // !ALIBABACLOUD_ARMS_MODEL_CREATEORUPDATEALERTRULERESULT_H_