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,70 @@
1
+ """
2
+ Request entity for DeleteServiceMonitorRequest information.
3
+ """
4
+
5
+ from baiducloud_python_sdk_core.abstract_model import AbstractModel
6
+
7
+
8
+ class DeleteServiceMonitorRequest(AbstractModel):
9
+ """
10
+ Request entity for DeleteServiceMonitorRequest operation.
11
+
12
+ This class encapsulates all parameters for the API request.
13
+ """
14
+
15
+ def __init__(self, service_monitor_name, instance_id, agent_id):
16
+ """
17
+ Initialize DeleteServiceMonitorRequest request entity.
18
+
19
+ :param service_monitor_name: service_monitor_name parameter
20
+ :type service_monitor_name: str (required)
21
+
22
+ :param instance_id: instance_id parameter
23
+ :type instance_id: str (required)
24
+
25
+ :param agent_id: agent_id parameter
26
+ :type agent_id: str (required)
27
+ """
28
+ super().__init__()
29
+ self.service_monitor_name = service_monitor_name
30
+ self.instance_id = instance_id
31
+ self.agent_id = agent_id
32
+
33
+ def to_dict(self):
34
+ """
35
+ Convert the request entity to a dictionary representation.
36
+
37
+ Nested model objects are recursively converted to dictionaries.
38
+
39
+ :return: Dictionary representation of the request
40
+ :rtype: dict
41
+ """
42
+ _map = super().to_dict()
43
+ if _map is not None:
44
+ return _map
45
+ result = dict()
46
+ return result
47
+
48
+ def from_dict(self, m):
49
+ """
50
+ Populate the request entity from a dictionary.
51
+
52
+ Nested dictionaries are recursively converted to model objects.
53
+
54
+ :param m: Dictionary containing request data
55
+ :type m: dict
56
+
57
+ :return: Self reference for method chaining
58
+ :rtype: DeleteServiceMonitorRequest
59
+
60
+ :raises TypeError: If input is not a dictionary or field type mismatch
61
+ :raises ValueError: If nested model conversion fails
62
+ """
63
+ m = m or dict()
64
+ if m.get('serviceMonitorName') is not None:
65
+ self.service_monitor_name = m.get('serviceMonitorName')
66
+ if m.get('instanceId') is not None:
67
+ self.instance_id = m.get('instanceId')
68
+ if m.get('agentId') is not None:
69
+ self.agent_id = m.get('agentId')
70
+ return self
@@ -0,0 +1,82 @@
1
+ """
2
+ Endpoint information
3
+ """
4
+
5
+ from baiducloud_python_sdk_core.abstract_model import AbstractModel
6
+
7
+
8
+ class Endpoint(AbstractModel):
9
+ """
10
+ Endpoint
11
+ """
12
+
13
+ def __init__(self, port=None, path=None, interval=None, matched_target_count=None):
14
+ """
15
+ Initialize Endpoint instance.
16
+
17
+ :param port: 端口名称
18
+ :type port: str (optional)
19
+
20
+ :param path: 采集路径
21
+ :type path: str (optional)
22
+
23
+ :param interval: 采集间隔
24
+ :type interval: str (optional)
25
+
26
+ :param matched_target_count: 匹配的 target 数量
27
+ :type matched_target_count: int (optional)
28
+ """
29
+ super().__init__()
30
+ self.port = port
31
+ self.path = path
32
+ self.interval = interval
33
+ self.matched_target_count = matched_target_count
34
+
35
+ def to_dict(self):
36
+ """
37
+ Convert the model instance to a dictionary representation.
38
+
39
+ Nested model objects are recursively converted to dictionaries.
40
+
41
+ :return: Dictionary representation of the model
42
+ :rtype: dict
43
+ """
44
+ _map = super().to_dict()
45
+ if _map is not None:
46
+ return _map
47
+ result = dict()
48
+ if self.port is not None:
49
+ result['port'] = self.port
50
+ if self.path is not None:
51
+ result['path'] = self.path
52
+ if self.interval is not None:
53
+ result['interval'] = self.interval
54
+ if self.matched_target_count is not None:
55
+ result['matchedTargetCount'] = self.matched_target_count
56
+ return result
57
+
58
+ def from_dict(self, m):
59
+ """
60
+ Populate the model instance from a dictionary.
61
+
62
+ Nested dictionaries are recursively converted to model objects.
63
+
64
+ :param m: Dictionary containing model data
65
+ :type m: dict
66
+
67
+ :return: Self reference for method chaining
68
+ :rtype: Endpoint
69
+
70
+ :raises TypeError: If input is not a dictionary type
71
+ :raises ValueError: If nested model conversion fails
72
+ """
73
+ m = m or dict()
74
+ if m.get('port') is not None:
75
+ self.port = m.get('port')
76
+ if m.get('path') is not None:
77
+ self.path = m.get('path')
78
+ if m.get('interval') is not None:
79
+ self.interval = m.get('interval')
80
+ if m.get('matchedTargetCount') is not None:
81
+ self.matched_target_count = m.get('matchedTargetCount')
82
+ return self
@@ -0,0 +1,78 @@
1
+ """
2
+ EscalateParam information
3
+ """
4
+
5
+ from baiducloud_python_sdk_core.abstract_model import AbstractModel
6
+
7
+ from baiducloud_python_sdk_cprom.models.claim_condition import ClaimCondition
8
+
9
+ from baiducloud_python_sdk_cprom.models.notify_action import NotifyAction
10
+
11
+
12
+ class EscalateParam(AbstractModel):
13
+ """
14
+ EscalateParam
15
+ """
16
+
17
+ def __init__(self, rank=None, condition=None, notify_action=None):
18
+ """
19
+ Initialize EscalateParam instance.
20
+
21
+ :param rank: 升级通知策略级别,1,2,3, xx时间未响应升级到1级->2级->3级
22
+ :type rank: int (optional)
23
+
24
+ :param condition: condition attribute
25
+ :type condition: ClaimCondition (optional)
26
+
27
+ :param notify_action: notify_action attribute
28
+ :type notify_action: NotifyAction (optional)
29
+ """
30
+ super().__init__()
31
+ self.rank = rank
32
+ self.condition = condition
33
+ self.notify_action = notify_action
34
+
35
+ def to_dict(self):
36
+ """
37
+ Convert the model instance to a dictionary representation.
38
+
39
+ Nested model objects are recursively converted to dictionaries.
40
+
41
+ :return: Dictionary representation of the model
42
+ :rtype: dict
43
+ """
44
+ _map = super().to_dict()
45
+ if _map is not None:
46
+ return _map
47
+ result = dict()
48
+ if self.rank is not None:
49
+ result['rank'] = self.rank
50
+ if self.condition is not None:
51
+ result['condition'] = self.condition.to_dict()
52
+ if self.notify_action is not None:
53
+ result['notifyAction'] = self.notify_action.to_dict()
54
+ return result
55
+
56
+ def from_dict(self, m):
57
+ """
58
+ Populate the model instance from a dictionary.
59
+
60
+ Nested dictionaries are recursively converted to model objects.
61
+
62
+ :param m: Dictionary containing model data
63
+ :type m: dict
64
+
65
+ :return: Self reference for method chaining
66
+ :rtype: EscalateParam
67
+
68
+ :raises TypeError: If input is not a dictionary type
69
+ :raises ValueError: If nested model conversion fails
70
+ """
71
+ m = m or dict()
72
+ if m.get('rank') is not None:
73
+ self.rank = m.get('rank')
74
+ if m.get('condition') is not None:
75
+ self.condition = ClaimCondition().from_dict(m.get('condition'))
76
+ if m.get('notifyAction') is not None:
77
+ self.notify_action = NotifyAction().from_dict(m.get('notifyAction'))
78
+ return self
@@ -0,0 +1,216 @@
1
+ """
2
+ Event information
3
+ """
4
+
5
+ from baiducloud_python_sdk_core.abstract_model import AbstractModel
6
+
7
+ from baiducloud_python_sdk_cprom.models.claimed_info import ClaimedInfo
8
+
9
+
10
+ class Event(AbstractModel):
11
+ """
12
+ Event
13
+ """
14
+
15
+ def __init__(
16
+ self,
17
+ event_id=None,
18
+ monitor_instance_id=None,
19
+ alerting_rule_id=None,
20
+ alerting_rule_name=None,
21
+ notify_rule_id=None,
22
+ notify_rule_name=None,
23
+ severity=None,
24
+ status=None,
25
+ start_time=None,
26
+ end_time=None,
27
+ duration=None,
28
+ alarm_value=None,
29
+ expr=None,
30
+ description=None,
31
+ alarm_tags=None,
32
+ labels=None,
33
+ annotations=None,
34
+ claimed_info=None,
35
+ ):
36
+ """
37
+ Initialize Event instance.
38
+
39
+ :param event_id: 事件 ID
40
+ :type event_id: str (optional)
41
+
42
+ :param monitor_instance_id: 监控实例 ID
43
+ :type monitor_instance_id: str (optional)
44
+
45
+ :param alerting_rule_id: 告警规则 ID
46
+ :type alerting_rule_id: str (optional)
47
+
48
+ :param alerting_rule_name: 告警规则名称
49
+ :type alerting_rule_name: str (optional)
50
+
51
+ :param notify_rule_id: 通知规则 ID
52
+ :type notify_rule_id: str (optional)
53
+
54
+ :param notify_rule_name: 通知规则名称
55
+ :type notify_rule_name: str (optional)
56
+
57
+ :param severity: 告警等级:critical/warning/info
58
+ :type severity: str (optional)
59
+
60
+ :param status: 事件状态:abnormal/normal/level1-4
61
+ :type status: str (optional)
62
+
63
+ :param start_time: 事件开始时间(Unix 时间戳,秒)
64
+ :type start_time: int (optional)
65
+
66
+ :param end_time: 事件结束时间(Unix 时间戳,秒),0 表示未结束
67
+ :type end_time: int (optional)
68
+
69
+ :param duration: 事件持续时间(秒)
70
+ :type duration: int (optional)
71
+
72
+ :param alarm_value: 告警值
73
+ :type alarm_value: str (optional)
74
+
75
+ :param expr: 告警表达式
76
+ :type expr: str (optional)
77
+
78
+ :param description: 告警描述
79
+ :type description: str (optional)
80
+
81
+ :param alarm_tags: 告警标签
82
+ :type alarm_tags: object (optional)
83
+
84
+ :param labels: 告警规则标签
85
+ :type labels: object (optional)
86
+
87
+ :param annotations: 告警规则注解
88
+ :type annotations: object (optional)
89
+
90
+ :param claimed_info: claimed_info attribute
91
+ :type claimed_info: ClaimedInfo (optional)
92
+ """
93
+ super().__init__()
94
+ self.event_id = event_id
95
+ self.monitor_instance_id = monitor_instance_id
96
+ self.alerting_rule_id = alerting_rule_id
97
+ self.alerting_rule_name = alerting_rule_name
98
+ self.notify_rule_id = notify_rule_id
99
+ self.notify_rule_name = notify_rule_name
100
+ self.severity = severity
101
+ self.status = status
102
+ self.start_time = start_time
103
+ self.end_time = end_time
104
+ self.duration = duration
105
+ self.alarm_value = alarm_value
106
+ self.expr = expr
107
+ self.description = description
108
+ self.alarm_tags = alarm_tags
109
+ self.labels = labels
110
+ self.annotations = annotations
111
+ self.claimed_info = claimed_info
112
+
113
+ def to_dict(self):
114
+ """
115
+ Convert the model instance to a dictionary representation.
116
+
117
+ Nested model objects are recursively converted to dictionaries.
118
+
119
+ :return: Dictionary representation of the model
120
+ :rtype: dict
121
+ """
122
+ _map = super().to_dict()
123
+ if _map is not None:
124
+ return _map
125
+ result = dict()
126
+ if self.event_id is not None:
127
+ result['eventId'] = self.event_id
128
+ if self.monitor_instance_id is not None:
129
+ result['monitorInstanceId'] = self.monitor_instance_id
130
+ if self.alerting_rule_id is not None:
131
+ result['alertingRuleId'] = self.alerting_rule_id
132
+ if self.alerting_rule_name is not None:
133
+ result['alertingRuleName'] = self.alerting_rule_name
134
+ if self.notify_rule_id is not None:
135
+ result['notifyRuleId'] = self.notify_rule_id
136
+ if self.notify_rule_name is not None:
137
+ result['notifyRuleName'] = self.notify_rule_name
138
+ if self.severity is not None:
139
+ result['severity'] = self.severity
140
+ if self.status is not None:
141
+ result['status'] = self.status
142
+ if self.start_time is not None:
143
+ result['startTime'] = self.start_time
144
+ if self.end_time is not None:
145
+ result['endTime'] = self.end_time
146
+ if self.duration is not None:
147
+ result['duration'] = self.duration
148
+ if self.alarm_value is not None:
149
+ result['alarmValue'] = self.alarm_value
150
+ if self.expr is not None:
151
+ result['expr'] = self.expr
152
+ if self.description is not None:
153
+ result['description'] = self.description
154
+ if self.alarm_tags is not None:
155
+ result['alarmTags'] = self.alarm_tags
156
+ if self.labels is not None:
157
+ result['labels'] = self.labels
158
+ if self.annotations is not None:
159
+ result['annotations'] = self.annotations
160
+ if self.claimed_info is not None:
161
+ result['claimedInfo'] = self.claimed_info.to_dict()
162
+ return result
163
+
164
+ def from_dict(self, m):
165
+ """
166
+ Populate the model instance from a dictionary.
167
+
168
+ Nested dictionaries are recursively converted to model objects.
169
+
170
+ :param m: Dictionary containing model data
171
+ :type m: dict
172
+
173
+ :return: Self reference for method chaining
174
+ :rtype: Event
175
+
176
+ :raises TypeError: If input is not a dictionary type
177
+ :raises ValueError: If nested model conversion fails
178
+ """
179
+ m = m or dict()
180
+ if m.get('eventId') is not None:
181
+ self.event_id = m.get('eventId')
182
+ if m.get('monitorInstanceId') is not None:
183
+ self.monitor_instance_id = m.get('monitorInstanceId')
184
+ if m.get('alertingRuleId') is not None:
185
+ self.alerting_rule_id = m.get('alertingRuleId')
186
+ if m.get('alertingRuleName') is not None:
187
+ self.alerting_rule_name = m.get('alertingRuleName')
188
+ if m.get('notifyRuleId') is not None:
189
+ self.notify_rule_id = m.get('notifyRuleId')
190
+ if m.get('notifyRuleName') is not None:
191
+ self.notify_rule_name = m.get('notifyRuleName')
192
+ if m.get('severity') is not None:
193
+ self.severity = m.get('severity')
194
+ if m.get('status') is not None:
195
+ self.status = m.get('status')
196
+ if m.get('startTime') is not None:
197
+ self.start_time = m.get('startTime')
198
+ if m.get('endTime') is not None:
199
+ self.end_time = m.get('endTime')
200
+ if m.get('duration') is not None:
201
+ self.duration = m.get('duration')
202
+ if m.get('alarmValue') is not None:
203
+ self.alarm_value = m.get('alarmValue')
204
+ if m.get('expr') is not None:
205
+ self.expr = m.get('expr')
206
+ if m.get('description') is not None:
207
+ self.description = m.get('description')
208
+ if m.get('alarmTags') is not None:
209
+ self.alarm_tags = m.get('alarmTags')
210
+ if m.get('labels') is not None:
211
+ self.labels = m.get('labels')
212
+ if m.get('annotations') is not None:
213
+ self.annotations = m.get('annotations')
214
+ if m.get('claimedInfo') is not None:
215
+ self.claimed_info = ClaimedInfo().from_dict(m.get('claimedInfo'))
216
+ return self
@@ -0,0 +1,74 @@
1
+ """
2
+ EventClaimDetail information
3
+ """
4
+
5
+ from baiducloud_python_sdk_core.abstract_model import AbstractModel
6
+
7
+
8
+ class EventClaimDetail(AbstractModel):
9
+ """
10
+ EventClaimDetail
11
+ """
12
+
13
+ def __init__(self, event_id=None, success=None, message=None):
14
+ """
15
+ Initialize EventClaimDetail instance.
16
+
17
+ :param event_id: 事件 ID
18
+ :type event_id: str (optional)
19
+
20
+ :param success: 是否成功
21
+ :type success: bool (optional)
22
+
23
+ :param message: 错误信息(失败时有值)
24
+ :type message: str (optional)
25
+ """
26
+ super().__init__()
27
+ self.event_id = event_id
28
+ self.success = success
29
+ self.message = message
30
+
31
+ def to_dict(self):
32
+ """
33
+ Convert the model instance to a dictionary representation.
34
+
35
+ Nested model objects are recursively converted to dictionaries.
36
+
37
+ :return: Dictionary representation of the model
38
+ :rtype: dict
39
+ """
40
+ _map = super().to_dict()
41
+ if _map is not None:
42
+ return _map
43
+ result = dict()
44
+ if self.event_id is not None:
45
+ result['eventId'] = self.event_id
46
+ if self.success is not None:
47
+ result['success'] = self.success
48
+ if self.message is not None:
49
+ result['message'] = self.message
50
+ return result
51
+
52
+ def from_dict(self, m):
53
+ """
54
+ Populate the model instance from a dictionary.
55
+
56
+ Nested dictionaries are recursively converted to model objects.
57
+
58
+ :param m: Dictionary containing model data
59
+ :type m: dict
60
+
61
+ :return: Self reference for method chaining
62
+ :rtype: EventClaimDetail
63
+
64
+ :raises TypeError: If input is not a dictionary type
65
+ :raises ValueError: If nested model conversion fails
66
+ """
67
+ m = m or dict()
68
+ if m.get('eventId') is not None:
69
+ self.event_id = m.get('eventId')
70
+ if m.get('success') is not None:
71
+ self.success = m.get('success')
72
+ if m.get('message') is not None:
73
+ self.message = m.get('message')
74
+ return self
@@ -0,0 +1,72 @@
1
+ """
2
+ Request entity for GenerateInstanceTokenRequest information.
3
+ """
4
+
5
+ from baiducloud_python_sdk_core.abstract_model import AbstractModel
6
+
7
+
8
+ class GenerateInstanceTokenRequest(AbstractModel):
9
+ """
10
+ Request entity for GenerateInstanceTokenRequest operation.
11
+
12
+ This class encapsulates all parameters for the API request.
13
+ """
14
+
15
+ def __init__(self, instance_id, action=None, token=None):
16
+ """
17
+ Initialize GenerateInstanceTokenRequest request entity.
18
+
19
+ :param instance_id: instance_id parameter
20
+ :type instance_id: str (required)
21
+
22
+ :param action: action parameter
23
+ :type action: str (optional)
24
+
25
+ :param token: token parameter
26
+ :type token: str (optional)
27
+ """
28
+ super().__init__()
29
+ self.instance_id = instance_id
30
+ self.action = action
31
+ self.token = token
32
+
33
+ def to_dict(self):
34
+ """
35
+ Convert the request entity to a dictionary representation.
36
+
37
+ Nested model objects are recursively converted to dictionaries.
38
+
39
+ :return: Dictionary representation of the request
40
+ :rtype: dict
41
+ """
42
+ _map = super().to_dict()
43
+ if _map is not None:
44
+ return _map
45
+ result = dict()
46
+ if self.token is not None:
47
+ result['token'] = self.token
48
+ return result
49
+
50
+ def from_dict(self, m):
51
+ """
52
+ Populate the request entity from a dictionary.
53
+
54
+ Nested dictionaries are recursively converted to model objects.
55
+
56
+ :param m: Dictionary containing request data
57
+ :type m: dict
58
+
59
+ :return: Self reference for method chaining
60
+ :rtype: GenerateInstanceTokenRequest
61
+
62
+ :raises TypeError: If input is not a dictionary or field type mismatch
63
+ :raises ValueError: If nested model conversion fails
64
+ """
65
+ m = m or dict()
66
+ if m.get('instanceId') is not None:
67
+ self.instance_id = m.get('instanceId')
68
+ if m.get('Action') is not None:
69
+ self.action = m.get('Action')
70
+ if m.get('token') is not None:
71
+ self.token = m.get('token')
72
+ return self
@@ -0,0 +1,64 @@
1
+ """
2
+ Request entity for GetAlertDetailRequest information.
3
+ """
4
+
5
+ from baiducloud_python_sdk_core.abstract_model import AbstractModel
6
+
7
+
8
+ class GetAlertDetailRequest(AbstractModel):
9
+ """
10
+ Request entity for GetAlertDetailRequest operation.
11
+
12
+ This class encapsulates all parameters for the API request.
13
+ """
14
+
15
+ def __init__(self, alerting_rule_id, instance_id):
16
+ """
17
+ Initialize GetAlertDetailRequest request entity.
18
+
19
+ :param alerting_rule_id: alerting_rule_id parameter
20
+ :type alerting_rule_id: str (required)
21
+
22
+ :param instance_id: instance_id parameter
23
+ :type instance_id: str (required)
24
+ """
25
+ super().__init__()
26
+ self.alerting_rule_id = alerting_rule_id
27
+ self.instance_id = instance_id
28
+
29
+ def to_dict(self):
30
+ """
31
+ Convert the request entity to a dictionary representation.
32
+
33
+ Nested model objects are recursively converted to dictionaries.
34
+
35
+ :return: Dictionary representation of the request
36
+ :rtype: dict
37
+ """
38
+ _map = super().to_dict()
39
+ if _map is not None:
40
+ return _map
41
+ result = dict()
42
+ return result
43
+
44
+ def from_dict(self, m):
45
+ """
46
+ Populate the request entity from a dictionary.
47
+
48
+ Nested dictionaries are recursively converted to model objects.
49
+
50
+ :param m: Dictionary containing request data
51
+ :type m: dict
52
+
53
+ :return: Self reference for method chaining
54
+ :rtype: GetAlertDetailRequest
55
+
56
+ :raises TypeError: If input is not a dictionary or field type mismatch
57
+ :raises ValueError: If nested model conversion fails
58
+ """
59
+ m = m or dict()
60
+ if m.get('alertingRuleId') is not None:
61
+ self.alerting_rule_id = m.get('alertingRuleId')
62
+ if m.get('instanceId') is not None:
63
+ self.instance_id = m.get('instanceId')
64
+ return self