baiducloud-python-sdk-cprom 0.0.1__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (95) hide show
  1. baiducloud_python_sdk_cprom/__init__.py +5 -0
  2. baiducloud_python_sdk_cprom/api/__init__.py +0 -0
  3. baiducloud_python_sdk_cprom/api/cprom_client.py +1197 -0
  4. baiducloud_python_sdk_cprom/models/__init__.py +90 -0
  5. baiducloud_python_sdk_cprom/models/bind_cluster_request.py +72 -0
  6. baiducloud_python_sdk_cprom/models/bind_cluster_response.py +61 -0
  7. baiducloud_python_sdk_cprom/models/callback_config.py +68 -0
  8. baiducloud_python_sdk_cprom/models/claim_alert_event_request.py +68 -0
  9. baiducloud_python_sdk_cprom/models/claim_alert_event_response.py +78 -0
  10. baiducloud_python_sdk_cprom/models/claim_condition.py +58 -0
  11. baiducloud_python_sdk_cprom/models/claimed_info.py +82 -0
  12. baiducloud_python_sdk_cprom/models/create_alert_request.py +142 -0
  13. baiducloud_python_sdk_cprom/models/create_alert_response.py +61 -0
  14. baiducloud_python_sdk_cprom/models/create_custom_scrape_task_request.py +72 -0
  15. baiducloud_python_sdk_cprom/models/create_custom_scrape_task_response.py +61 -0
  16. baiducloud_python_sdk_cprom/models/create_instance_request.py +117 -0
  17. baiducloud_python_sdk_cprom/models/create_notification_policy_request.py +149 -0
  18. baiducloud_python_sdk_cprom/models/create_notification_policy_response.py +61 -0
  19. baiducloud_python_sdk_cprom/models/create_podmonitor_request.py +98 -0
  20. baiducloud_python_sdk_cprom/models/create_podmonitor_response.py +61 -0
  21. baiducloud_python_sdk_cprom/models/create_service_monitor_request.py +98 -0
  22. baiducloud_python_sdk_cprom/models/create_service_monitor_response.py +61 -0
  23. baiducloud_python_sdk_cprom/models/delete_alert_request.py +64 -0
  24. baiducloud_python_sdk_cprom/models/delete_custom_scrape_task_request.py +70 -0
  25. baiducloud_python_sdk_cprom/models/delete_instance_request.py +64 -0
  26. baiducloud_python_sdk_cprom/models/delete_notification_policy_request.py +58 -0
  27. baiducloud_python_sdk_cprom/models/delete_podmonitor_request.py +70 -0
  28. baiducloud_python_sdk_cprom/models/delete_service_monitor_request.py +70 -0
  29. baiducloud_python_sdk_cprom/models/endpoint.py +82 -0
  30. baiducloud_python_sdk_cprom/models/escalate_param.py +78 -0
  31. baiducloud_python_sdk_cprom/models/event.py +216 -0
  32. baiducloud_python_sdk_cprom/models/event_claim_detail.py +74 -0
  33. baiducloud_python_sdk_cprom/models/generate_instance_token_request.py +72 -0
  34. baiducloud_python_sdk_cprom/models/get_alert_detail_request.py +64 -0
  35. baiducloud_python_sdk_cprom/models/get_alert_detail_response.py +136 -0
  36. baiducloud_python_sdk_cprom/models/get_alert_event_detail_request.py +58 -0
  37. baiducloud_python_sdk_cprom/models/get_alert_event_detail_response.py +218 -0
  38. baiducloud_python_sdk_cprom/models/get_cluster_bind_status_request.py +58 -0
  39. baiducloud_python_sdk_cprom/models/get_cluster_bind_status_response.py +77 -0
  40. baiducloud_python_sdk_cprom/models/get_notification_policy_request.py +58 -0
  41. baiducloud_python_sdk_cprom/models/get_notification_policy_response.py +167 -0
  42. baiducloud_python_sdk_cprom/models/label_selector.py +58 -0
  43. baiducloud_python_sdk_cprom/models/list_alert_events_request.py +159 -0
  44. baiducloud_python_sdk_cprom/models/list_alert_events_response.py +102 -0
  45. baiducloud_python_sdk_cprom/models/list_alert_templates_response.py +62 -0
  46. baiducloud_python_sdk_cprom/models/list_alerts_request.py +82 -0
  47. baiducloud_python_sdk_cprom/models/list_alerts_response.py +128 -0
  48. baiducloud_python_sdk_cprom/models/list_bindable_cloud_products_response.py +62 -0
  49. baiducloud_python_sdk_cprom/models/list_instances_request.py +82 -0
  50. baiducloud_python_sdk_cprom/models/list_instances_response.py +102 -0
  51. baiducloud_python_sdk_cprom/models/list_notification_policies_request.py +76 -0
  52. baiducloud_python_sdk_cprom/models/list_notification_policies_response.py +128 -0
  53. baiducloud_python_sdk_cprom/models/list_pod_monitors_request.py +110 -0
  54. baiducloud_python_sdk_cprom/models/list_pod_monitors_response.py +137 -0
  55. baiducloud_python_sdk_cprom/models/list_related_cloud_products_request.py +58 -0
  56. baiducloud_python_sdk_cprom/models/list_related_cloud_products_response.py +61 -0
  57. baiducloud_python_sdk_cprom/models/list_service_monitors_request.py +110 -0
  58. baiducloud_python_sdk_cprom/models/list_service_monitors_response.py +137 -0
  59. baiducloud_python_sdk_cprom/models/mentioned_user_config.py +66 -0
  60. baiducloud_python_sdk_cprom/models/monitor_instance.py +135 -0
  61. baiducloud_python_sdk_cprom/models/namespace_selector.py +58 -0
  62. baiducloud_python_sdk_cprom/models/notify_action.py +96 -0
  63. baiducloud_python_sdk_cprom/models/notify_rule.py +179 -0
  64. baiducloud_python_sdk_cprom/models/object_meta.py +66 -0
  65. baiducloud_python_sdk_cprom/models/pod_metrics_endpoint.py +74 -0
  66. baiducloud_python_sdk_cprom/models/pod_monitor.py +86 -0
  67. baiducloud_python_sdk_cprom/models/pod_monitor_item.py +92 -0
  68. baiducloud_python_sdk_cprom/models/pod_monitor_spec.py +80 -0
  69. baiducloud_python_sdk_cprom/models/remote_read_request.py +90 -0
  70. baiducloud_python_sdk_cprom/models/remote_read_response.py +127 -0
  71. baiducloud_python_sdk_cprom/models/remote_write_request.py +90 -0
  72. baiducloud_python_sdk_cprom/models/repeat_notify_config.py +90 -0
  73. baiducloud_python_sdk_cprom/models/rule_detail.py +142 -0
  74. baiducloud_python_sdk_cprom/models/rule_template.py +82 -0
  75. baiducloud_python_sdk_cprom/models/scope_detail.py +74 -0
  76. baiducloud_python_sdk_cprom/models/service_monitor.py +86 -0
  77. baiducloud_python_sdk_cprom/models/service_monitor_endpoint.py +74 -0
  78. baiducloud_python_sdk_cprom/models/service_monitor_item.py +92 -0
  79. baiducloud_python_sdk_cprom/models/service_monitor_spec.py +80 -0
  80. baiducloud_python_sdk_cprom/models/status.py +74 -0
  81. baiducloud_python_sdk_cprom/models/toggle_pod_monitor_service_request.py +70 -0
  82. baiducloud_python_sdk_cprom/models/toggle_service_monitor_service_request.py +70 -0
  83. baiducloud_python_sdk_cprom/models/update_alert_request.py +149 -0
  84. baiducloud_python_sdk_cprom/models/update_notification_policy_request.py +156 -0
  85. baiducloud_python_sdk_cprom/models/update_pod_monitor_request.py +87 -0
  86. baiducloud_python_sdk_cprom/models/update_related_cloud_products_request.py +66 -0
  87. baiducloud_python_sdk_cprom/models/update_service_monitor_request.py +87 -0
  88. baiducloud_python_sdk_cprom/models/user.py +90 -0
  89. baiducloud_python_sdk_cprom/models/user_group.py +74 -0
  90. baiducloud_python_sdk_cprom/models/webhook_detail.py +102 -0
  91. baiducloud_python_sdk_cprom-0.0.1.dist-info/LICENSE +177 -0
  92. baiducloud_python_sdk_cprom-0.0.1.dist-info/METADATA +76 -0
  93. baiducloud_python_sdk_cprom-0.0.1.dist-info/RECORD +95 -0
  94. baiducloud_python_sdk_cprom-0.0.1.dist-info/WHEEL +5 -0
  95. baiducloud_python_sdk_cprom-0.0.1.dist-info/top_level.txt +1 -0
@@ -0,0 +1,136 @@
1
+ """
2
+ Request entity for GetAlertDetailResponse information.
3
+ """
4
+
5
+ from baiducloud_python_sdk_core.bce_response import BceResponse
6
+
7
+
8
+ class GetAlertDetailResponse(BceResponse):
9
+ """
10
+ GetAlertDetailResponse
11
+ """
12
+
13
+ def __init__(
14
+ self,
15
+ alert_id=None,
16
+ alert_name=None,
17
+ expr=None,
18
+ cprom_for=None,
19
+ description=None,
20
+ enable=None,
21
+ notify_rule_id=None,
22
+ severity=None,
23
+ annotations=None,
24
+ ):
25
+ """
26
+ Initialize GetAlertDetailResponse response.
27
+
28
+ :param alert_id: 告警ID
29
+ :type alert_id: str (optional)
30
+
31
+ :param alert_name: 告警名称
32
+ :type alert_name: str (optional)
33
+
34
+ :param expr: 告警规则,promQL查询语句
35
+ :type expr: str (optional)
36
+
37
+ :param cprom_for: 告警持续时间
38
+ :type cprom_for: str (optional)
39
+
40
+ :param description: 告警内容
41
+ :type description: str (optional)
42
+
43
+ :param enable: 是否开启告警
44
+ :type enable: bool (optional)
45
+
46
+ :param notify_rule_id: 通知策略ID
47
+ :type notify_rule_id: str (optional)
48
+
49
+ :param severity: 告警级别,取值为 `notice`、`warning`、`major`、`critical`
50
+ :type severity: str (optional)
51
+
52
+ :param annotations: 注解列表,支持自定义注解
53
+ :type annotations: Dict[str, str] (optional)
54
+ """
55
+ super().__init__()
56
+ self.alert_id = alert_id
57
+ self.alert_name = alert_name
58
+ self.expr = expr
59
+ self.cprom_for = cprom_for
60
+ self.description = description
61
+ self.enable = enable
62
+ self.notify_rule_id = notify_rule_id
63
+ self.severity = severity
64
+ self.annotations = annotations
65
+
66
+ def to_dict(self):
67
+ """
68
+ Convert the response instance to a dictionary representation.
69
+
70
+ Includes metadata from the parent BceResponse class.
71
+ Nested model objects are recursively converted to dictionaries.
72
+
73
+ :return: Dictionary representation of the response
74
+ :rtype: dict
75
+ """
76
+ _map = super().to_dict()
77
+ if _map is not None:
78
+ return _map
79
+ result = dict()
80
+ if self.metadata is not None:
81
+ result['metadata'] = dict(self.metadata)
82
+ if self.alert_id is not None:
83
+ result['alertId'] = self.alert_id
84
+ if self.alert_name is not None:
85
+ result['alertName'] = self.alert_name
86
+ if self.expr is not None:
87
+ result['expr'] = self.expr
88
+ if self.cprom_for is not None:
89
+ result['for'] = self.cprom_for
90
+ if self.description is not None:
91
+ result['description'] = self.description
92
+ if self.enable is not None:
93
+ result['enable'] = self.enable
94
+ if self.notify_rule_id is not None:
95
+ result['notifyRuleId'] = self.notify_rule_id
96
+ if self.severity is not None:
97
+ result['severity'] = self.severity
98
+ if self.annotations is not None:
99
+ result['annotations'] = self.annotations
100
+ return result
101
+
102
+ def from_dict(self, m):
103
+ """
104
+ Populate the response instance from a dictionary.
105
+
106
+ Nested dictionaries are recursively converted to model objects.
107
+
108
+ :param m: Dictionary containing response data
109
+ :type m: dict
110
+
111
+ :return: Self reference for method chaining
112
+ :rtype: GetAlertDetailResponse
113
+
114
+ :raises TypeError: If input is not a dictionary or field type mismatch
115
+ :raises ValueError: If nested model conversion fails
116
+ """
117
+ m = m or dict()
118
+ if m.get('alertId') is not None:
119
+ self.alert_id = m.get('alertId')
120
+ if m.get('alertName') is not None:
121
+ self.alert_name = m.get('alertName')
122
+ if m.get('expr') is not None:
123
+ self.expr = m.get('expr')
124
+ if m.get('for') is not None:
125
+ self.cprom_for = m.get('for')
126
+ if m.get('description') is not None:
127
+ self.description = m.get('description')
128
+ if m.get('enable') is not None:
129
+ self.enable = m.get('enable')
130
+ if m.get('notifyRuleId') is not None:
131
+ self.notify_rule_id = m.get('notifyRuleId')
132
+ if m.get('severity') is not None:
133
+ self.severity = m.get('severity')
134
+ if m.get('annotations') is not None:
135
+ self.annotations = m.get('annotations')
136
+ return self
@@ -0,0 +1,58 @@
1
+ """
2
+ Request entity for GetAlertEventDetailRequest information.
3
+ """
4
+
5
+ from baiducloud_python_sdk_core.abstract_model import AbstractModel
6
+
7
+
8
+ class GetAlertEventDetailRequest(AbstractModel):
9
+ """
10
+ Request entity for GetAlertEventDetailRequest operation.
11
+
12
+ This class encapsulates all parameters for the API request.
13
+ """
14
+
15
+ def __init__(self, event_id):
16
+ """
17
+ Initialize GetAlertEventDetailRequest request entity.
18
+
19
+ :param event_id: event_id parameter
20
+ :type event_id: str (required)
21
+ """
22
+ super().__init__()
23
+ self.event_id = event_id
24
+
25
+ def to_dict(self):
26
+ """
27
+ Convert the request entity to a dictionary representation.
28
+
29
+ Nested model objects are recursively converted to dictionaries.
30
+
31
+ :return: Dictionary representation of the request
32
+ :rtype: dict
33
+ """
34
+ _map = super().to_dict()
35
+ if _map is not None:
36
+ return _map
37
+ result = dict()
38
+ return result
39
+
40
+ def from_dict(self, m):
41
+ """
42
+ Populate the request entity from a dictionary.
43
+
44
+ Nested dictionaries are recursively converted to model objects.
45
+
46
+ :param m: Dictionary containing request data
47
+ :type m: dict
48
+
49
+ :return: Self reference for method chaining
50
+ :rtype: GetAlertEventDetailRequest
51
+
52
+ :raises TypeError: If input is not a dictionary or field type mismatch
53
+ :raises ValueError: If nested model conversion fails
54
+ """
55
+ m = m or dict()
56
+ if m.get('eventId') is not None:
57
+ self.event_id = m.get('eventId')
58
+ return self
@@ -0,0 +1,218 @@
1
+ """
2
+ Request entity for GetAlertEventDetailResponse information.
3
+ """
4
+
5
+ from baiducloud_python_sdk_core.bce_response import BceResponse
6
+ from baiducloud_python_sdk_cprom.models.claimed_info import ClaimedInfo
7
+
8
+
9
+ class GetAlertEventDetailResponse(BceResponse):
10
+ """
11
+ GetAlertEventDetailResponse
12
+ """
13
+
14
+ def __init__(
15
+ self,
16
+ event_id=None,
17
+ monitor_instance_id=None,
18
+ alerting_rule_id=None,
19
+ alerting_rule_name=None,
20
+ notify_rule_id=None,
21
+ notify_rule_name=None,
22
+ severity=None,
23
+ status=None,
24
+ start_time=None,
25
+ end_time=None,
26
+ duration=None,
27
+ alarm_value=None,
28
+ expr=None,
29
+ description=None,
30
+ alarm_tags=None,
31
+ labels=None,
32
+ annotations=None,
33
+ claimed_info=None,
34
+ ):
35
+ """
36
+ Initialize GetAlertEventDetailResponse response.
37
+
38
+ :param event_id: 事件 ID
39
+ :type event_id: str (optional)
40
+
41
+ :param monitor_instance_id: 监控实例 ID
42
+ :type monitor_instance_id: str (optional)
43
+
44
+ :param alerting_rule_id: 告警规则 ID
45
+ :type alerting_rule_id: str (optional)
46
+
47
+ :param alerting_rule_name: 告警规则名称
48
+ :type alerting_rule_name: str (optional)
49
+
50
+ :param notify_rule_id: 通知规则 ID
51
+ :type notify_rule_id: str (optional)
52
+
53
+ :param notify_rule_name: 通知规则名称
54
+ :type notify_rule_name: str (optional)
55
+
56
+ :param severity: 告警等级:critical/warning/info
57
+ :type severity: str (optional)
58
+
59
+ :param status: 事件状态:abnormal/normal/level1-4
60
+ :type status: str (optional)
61
+
62
+ :param start_time: 事件开始时间(Unix 时间戳,秒)
63
+ :type start_time: int (optional)
64
+
65
+ :param end_time: 事件结束时间(Unix 时间戳,秒),0 表示未结束
66
+ :type end_time: int (optional)
67
+
68
+ :param duration: 事件持续时间(秒)
69
+ :type duration: int (optional)
70
+
71
+ :param alarm_value: 告警值
72
+ :type alarm_value: str (optional)
73
+
74
+ :param expr: 告警表达式
75
+ :type expr: str (optional)
76
+
77
+ :param description: 告警描述
78
+ :type description: str (optional)
79
+
80
+ :param alarm_tags: 告警标签
81
+ :type alarm_tags: object (optional)
82
+
83
+ :param labels: 告警规则标签
84
+ :type labels: object (optional)
85
+
86
+ :param annotations: 告警规则注解
87
+ :type annotations: object (optional)
88
+
89
+ :param claimed_info: claimed_info field
90
+ :type claimed_info: ClaimedInfo (optional)
91
+ """
92
+ super().__init__()
93
+ self.event_id = event_id
94
+ self.monitor_instance_id = monitor_instance_id
95
+ self.alerting_rule_id = alerting_rule_id
96
+ self.alerting_rule_name = alerting_rule_name
97
+ self.notify_rule_id = notify_rule_id
98
+ self.notify_rule_name = notify_rule_name
99
+ self.severity = severity
100
+ self.status = status
101
+ self.start_time = start_time
102
+ self.end_time = end_time
103
+ self.duration = duration
104
+ self.alarm_value = alarm_value
105
+ self.expr = expr
106
+ self.description = description
107
+ self.alarm_tags = alarm_tags
108
+ self.labels = labels
109
+ self.annotations = annotations
110
+ self.claimed_info = claimed_info
111
+
112
+ def to_dict(self):
113
+ """
114
+ Convert the response instance to a dictionary representation.
115
+
116
+ Includes metadata from the parent BceResponse class.
117
+ Nested model objects are recursively converted to dictionaries.
118
+
119
+ :return: Dictionary representation of the response
120
+ :rtype: dict
121
+ """
122
+ _map = super().to_dict()
123
+ if _map is not None:
124
+ return _map
125
+ result = dict()
126
+ if self.metadata is not None:
127
+ result['metadata'] = dict(self.metadata)
128
+ if self.event_id is not None:
129
+ result['eventId'] = self.event_id
130
+ if self.monitor_instance_id is not None:
131
+ result['monitorInstanceId'] = self.monitor_instance_id
132
+ if self.alerting_rule_id is not None:
133
+ result['alertingRuleId'] = self.alerting_rule_id
134
+ if self.alerting_rule_name is not None:
135
+ result['alertingRuleName'] = self.alerting_rule_name
136
+ if self.notify_rule_id is not None:
137
+ result['notifyRuleId'] = self.notify_rule_id
138
+ if self.notify_rule_name is not None:
139
+ result['notifyRuleName'] = self.notify_rule_name
140
+ if self.severity is not None:
141
+ result['severity'] = self.severity
142
+ if self.status is not None:
143
+ result['status'] = self.status
144
+ if self.start_time is not None:
145
+ result['startTime'] = self.start_time
146
+ if self.end_time is not None:
147
+ result['endTime'] = self.end_time
148
+ if self.duration is not None:
149
+ result['duration'] = self.duration
150
+ if self.alarm_value is not None:
151
+ result['alarmValue'] = self.alarm_value
152
+ if self.expr is not None:
153
+ result['expr'] = self.expr
154
+ if self.description is not None:
155
+ result['description'] = self.description
156
+ if self.alarm_tags is not None:
157
+ result['alarmTags'] = self.alarm_tags
158
+ if self.labels is not None:
159
+ result['labels'] = self.labels
160
+ if self.annotations is not None:
161
+ result['annotations'] = self.annotations
162
+ if self.claimed_info is not None:
163
+ result['claimedInfo'] = self.claimed_info.to_dict()
164
+ return result
165
+
166
+ def from_dict(self, m):
167
+ """
168
+ Populate the response instance from a dictionary.
169
+
170
+ Nested dictionaries are recursively converted to model objects.
171
+
172
+ :param m: Dictionary containing response data
173
+ :type m: dict
174
+
175
+ :return: Self reference for method chaining
176
+ :rtype: GetAlertEventDetailResponse
177
+
178
+ :raises TypeError: If input is not a dictionary or field type mismatch
179
+ :raises ValueError: If nested model conversion fails
180
+ """
181
+ m = m or dict()
182
+ if m.get('eventId') is not None:
183
+ self.event_id = m.get('eventId')
184
+ if m.get('monitorInstanceId') is not None:
185
+ self.monitor_instance_id = m.get('monitorInstanceId')
186
+ if m.get('alertingRuleId') is not None:
187
+ self.alerting_rule_id = m.get('alertingRuleId')
188
+ if m.get('alertingRuleName') is not None:
189
+ self.alerting_rule_name = m.get('alertingRuleName')
190
+ if m.get('notifyRuleId') is not None:
191
+ self.notify_rule_id = m.get('notifyRuleId')
192
+ if m.get('notifyRuleName') is not None:
193
+ self.notify_rule_name = m.get('notifyRuleName')
194
+ if m.get('severity') is not None:
195
+ self.severity = m.get('severity')
196
+ if m.get('status') is not None:
197
+ self.status = m.get('status')
198
+ if m.get('startTime') is not None:
199
+ self.start_time = m.get('startTime')
200
+ if m.get('endTime') is not None:
201
+ self.end_time = m.get('endTime')
202
+ if m.get('duration') is not None:
203
+ self.duration = m.get('duration')
204
+ if m.get('alarmValue') is not None:
205
+ self.alarm_value = m.get('alarmValue')
206
+ if m.get('expr') is not None:
207
+ self.expr = m.get('expr')
208
+ if m.get('description') is not None:
209
+ self.description = m.get('description')
210
+ if m.get('alarmTags') is not None:
211
+ self.alarm_tags = m.get('alarmTags')
212
+ if m.get('labels') is not None:
213
+ self.labels = m.get('labels')
214
+ if m.get('annotations') is not None:
215
+ self.annotations = m.get('annotations')
216
+ if m.get('claimedInfo') is not None:
217
+ self.claimed_info = ClaimedInfo().from_dict(m.get('claimedInfo'))
218
+ return self
@@ -0,0 +1,58 @@
1
+ """
2
+ Request entity for GetClusterBindStatusRequest information.
3
+ """
4
+
5
+ from baiducloud_python_sdk_core.abstract_model import AbstractModel
6
+
7
+
8
+ class GetClusterBindStatusRequest(AbstractModel):
9
+ """
10
+ Request entity for GetClusterBindStatusRequest operation.
11
+
12
+ This class encapsulates all parameters for the API request.
13
+ """
14
+
15
+ def __init__(self, cluster_id):
16
+ """
17
+ Initialize GetClusterBindStatusRequest request entity.
18
+
19
+ :param cluster_id: cluster_id parameter
20
+ :type cluster_id: str (required)
21
+ """
22
+ super().__init__()
23
+ self.cluster_id = cluster_id
24
+
25
+ def to_dict(self):
26
+ """
27
+ Convert the request entity to a dictionary representation.
28
+
29
+ Nested model objects are recursively converted to dictionaries.
30
+
31
+ :return: Dictionary representation of the request
32
+ :rtype: dict
33
+ """
34
+ _map = super().to_dict()
35
+ if _map is not None:
36
+ return _map
37
+ result = dict()
38
+ return result
39
+
40
+ def from_dict(self, m):
41
+ """
42
+ Populate the request entity from a dictionary.
43
+
44
+ Nested dictionaries are recursively converted to model objects.
45
+
46
+ :param m: Dictionary containing request data
47
+ :type m: dict
48
+
49
+ :return: Self reference for method chaining
50
+ :rtype: GetClusterBindStatusRequest
51
+
52
+ :raises TypeError: If input is not a dictionary or field type mismatch
53
+ :raises ValueError: If nested model conversion fails
54
+ """
55
+ m = m or dict()
56
+ if m.get('clusterId') is not None:
57
+ self.cluster_id = m.get('clusterId')
58
+ return self
@@ -0,0 +1,77 @@
1
+ """
2
+ Request entity for GetClusterBindStatusResponse information.
3
+ """
4
+
5
+ from baiducloud_python_sdk_core.bce_response import BceResponse
6
+
7
+
8
+ class GetClusterBindStatusResponse(BceResponse):
9
+ """
10
+ GetClusterBindStatusResponse
11
+ """
12
+
13
+ def __init__(self, binding_status=None, instance_id=None, agent_id=None):
14
+ """
15
+ Initialize GetClusterBindStatusResponse response.
16
+
17
+ :param binding_status: binding_status field
18
+ :type binding_status: str (optional)
19
+
20
+ :param instance_id: CProm 监控实例 ID。
21
+ :type instance_id: str (optional)
22
+
23
+ :param agent_id: Agent ID。
24
+ :type agent_id: str (optional)
25
+ """
26
+ super().__init__()
27
+ self.binding_status = binding_status
28
+ self.instance_id = instance_id
29
+ self.agent_id = agent_id
30
+
31
+ def to_dict(self):
32
+ """
33
+ Convert the response instance to a dictionary representation.
34
+
35
+ Includes metadata from the parent BceResponse class.
36
+ Nested model objects are recursively converted to dictionaries.
37
+
38
+ :return: Dictionary representation of the response
39
+ :rtype: dict
40
+ """
41
+ _map = super().to_dict()
42
+ if _map is not None:
43
+ return _map
44
+ result = dict()
45
+ if self.metadata is not None:
46
+ result['metadata'] = dict(self.metadata)
47
+ if self.binding_status is not None:
48
+ result['bindingStatus'] = self.binding_status
49
+ if self.instance_id is not None:
50
+ result['instanceId'] = self.instance_id
51
+ if self.agent_id is not None:
52
+ result['agentId'] = self.agent_id
53
+ return result
54
+
55
+ def from_dict(self, m):
56
+ """
57
+ Populate the response instance from a dictionary.
58
+
59
+ Nested dictionaries are recursively converted to model objects.
60
+
61
+ :param m: Dictionary containing response data
62
+ :type m: dict
63
+
64
+ :return: Self reference for method chaining
65
+ :rtype: GetClusterBindStatusResponse
66
+
67
+ :raises TypeError: If input is not a dictionary or field type mismatch
68
+ :raises ValueError: If nested model conversion fails
69
+ """
70
+ m = m or dict()
71
+ if m.get('bindingStatus') is not None:
72
+ self.binding_status = m.get('bindingStatus')
73
+ if m.get('instanceId') is not None:
74
+ self.instance_id = m.get('instanceId')
75
+ if m.get('agentId') is not None:
76
+ self.agent_id = m.get('agentId')
77
+ return self
@@ -0,0 +1,58 @@
1
+ """
2
+ Request entity for GetNotificationPolicyRequest information.
3
+ """
4
+
5
+ from baiducloud_python_sdk_core.abstract_model import AbstractModel
6
+
7
+
8
+ class GetNotificationPolicyRequest(AbstractModel):
9
+ """
10
+ Request entity for GetNotificationPolicyRequest operation.
11
+
12
+ This class encapsulates all parameters for the API request.
13
+ """
14
+
15
+ def __init__(self, notify_rule_id):
16
+ """
17
+ Initialize GetNotificationPolicyRequest request entity.
18
+
19
+ :param notify_rule_id: notify_rule_id parameter
20
+ :type notify_rule_id: str (required)
21
+ """
22
+ super().__init__()
23
+ self.notify_rule_id = notify_rule_id
24
+
25
+ def to_dict(self):
26
+ """
27
+ Convert the request entity to a dictionary representation.
28
+
29
+ Nested model objects are recursively converted to dictionaries.
30
+
31
+ :return: Dictionary representation of the request
32
+ :rtype: dict
33
+ """
34
+ _map = super().to_dict()
35
+ if _map is not None:
36
+ return _map
37
+ result = dict()
38
+ return result
39
+
40
+ def from_dict(self, m):
41
+ """
42
+ Populate the request entity from a dictionary.
43
+
44
+ Nested dictionaries are recursively converted to model objects.
45
+
46
+ :param m: Dictionary containing request data
47
+ :type m: dict
48
+
49
+ :return: Self reference for method chaining
50
+ :rtype: GetNotificationPolicyRequest
51
+
52
+ :raises TypeError: If input is not a dictionary or field type mismatch
53
+ :raises ValueError: If nested model conversion fails
54
+ """
55
+ m = m or dict()
56
+ if m.get('notifyRuleId') is not None:
57
+ self.notify_rule_id = m.get('notifyRuleId')
58
+ return self