baiducloud-python-sdk-as 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 (83) hide show
  1. baiducloud_python_sdk_as/__init__.py +5 -0
  2. baiducloud_python_sdk_as/api/__init__.py +0 -0
  3. baiducloud_python_sdk_as/api/as_client.py +626 -0
  4. baiducloud_python_sdk_as/models/__init__.py +78 -0
  5. baiducloud_python_sdk_as/models/action_type.py +20 -0
  6. baiducloud_python_sdk_as/models/adjust_num_v2_request.py +72 -0
  7. baiducloud_python_sdk_as/models/adjust_num_v2_response.py +80 -0
  8. baiducloud_python_sdk_as/models/alarm_rule.py +135 -0
  9. baiducloud_python_sdk_as/models/as_alarm_rule.py +189 -0
  10. baiducloud_python_sdk_as/models/as_eip.py +90 -0
  11. baiducloud_python_sdk_as/models/as_group.py +186 -0
  12. baiducloud_python_sdk_as/models/as_record.py +202 -0
  13. baiducloud_python_sdk_as/models/assign_tag_info.py +76 -0
  14. baiducloud_python_sdk_as/models/attach_node_v2_request.py +72 -0
  15. baiducloud_python_sdk_as/models/attach_node_v2_response.py +78 -0
  16. baiducloud_python_sdk_as/models/bcc_name_config.py +82 -0
  17. baiducloud_python_sdk_as/models/billing_info.py +68 -0
  18. baiducloud_python_sdk_as/models/blb_info.py +82 -0
  19. baiducloud_python_sdk_as/models/cds_info.py +82 -0
  20. baiducloud_python_sdk_as/models/check_detail.py +74 -0
  21. baiducloud_python_sdk_as/models/check_entity.py +76 -0
  22. baiducloud_python_sdk_as/models/cmd_config.py +142 -0
  23. baiducloud_python_sdk_as/models/create_as_group_v2_request.py +245 -0
  24. baiducloud_python_sdk_as/models/create_as_group_v2_response.py +69 -0
  25. baiducloud_python_sdk_as/models/create_rule_v2_request.py +172 -0
  26. baiducloud_python_sdk_as/models/create_rule_v2_response.py +61 -0
  27. baiducloud_python_sdk_as/models/dag_model.py +58 -0
  28. baiducloud_python_sdk_as/models/delete_as_group_v2_request.py +60 -0
  29. baiducloud_python_sdk_as/models/delete_rule_v2_request.py +58 -0
  30. baiducloud_python_sdk_as/models/detach_node_v2_request.py +72 -0
  31. baiducloud_python_sdk_as/models/detach_node_v2_response.py +78 -0
  32. baiducloud_python_sdk_as/models/dimension.py +66 -0
  33. baiducloud_python_sdk_as/models/eip_config.py +112 -0
  34. baiducloud_python_sdk_as/models/eip_group_bandwidth.py +74 -0
  35. baiducloud_python_sdk_as/models/eip_group_decrease.py +58 -0
  36. baiducloud_python_sdk_as/models/eip_group_increase.py +66 -0
  37. baiducloud_python_sdk_as/models/eip_info.py +82 -0
  38. baiducloud_python_sdk_as/models/ephemeral_disk.py +66 -0
  39. baiducloud_python_sdk_as/models/exec_cmd_strategy_type.py +19 -0
  40. baiducloud_python_sdk_as/models/exec_rule_v2_request.py +72 -0
  41. baiducloud_python_sdk_as/models/exec_rule_v2_response.py +80 -0
  42. baiducloud_python_sdk_as/models/expect_action.py +74 -0
  43. baiducloud_python_sdk_as/models/get_as_group_v2_request.py +58 -0
  44. baiducloud_python_sdk_as/models/get_as_group_v2_response.py +279 -0
  45. baiducloud_python_sdk_as/models/get_rule_v2_request.py +58 -0
  46. baiducloud_python_sdk_as/models/get_rule_v2_response.py +218 -0
  47. baiducloud_python_sdk_as/models/group_config.py +90 -0
  48. baiducloud_python_sdk_as/models/health_check_config.py +66 -0
  49. baiducloud_python_sdk_as/models/health_check_state.py +102 -0
  50. baiducloud_python_sdk_as/models/list_as_group_v2_request.py +96 -0
  51. baiducloud_python_sdk_as/models/list_as_group_v2_response.py +102 -0
  52. baiducloud_python_sdk_as/models/list_as_node_v2_request.py +94 -0
  53. baiducloud_python_sdk_as/models/list_as_node_v2_response.py +102 -0
  54. baiducloud_python_sdk_as/models/list_rule_v2_request.py +94 -0
  55. baiducloud_python_sdk_as/models/list_rule_v2_response.py +102 -0
  56. baiducloud_python_sdk_as/models/list_task_v2_request.py +94 -0
  57. baiducloud_python_sdk_as/models/list_task_v2_response.py +102 -0
  58. baiducloud_python_sdk_as/models/monitor_object.py +84 -0
  59. baiducloud_python_sdk_as/models/node.py +245 -0
  60. baiducloud_python_sdk_as/models/node_info.py +373 -0
  61. baiducloud_python_sdk_as/models/period_type.py +21 -0
  62. baiducloud_python_sdk_as/models/policy_resource.py +70 -0
  63. baiducloud_python_sdk_as/models/reservation.py +58 -0
  64. baiducloud_python_sdk_as/models/resource.py +66 -0
  65. baiducloud_python_sdk_as/models/rule.py +216 -0
  66. baiducloud_python_sdk_as/models/scale_condition.py +160 -0
  67. baiducloud_python_sdk_as/models/scaling_down_v2_request.py +72 -0
  68. baiducloud_python_sdk_as/models/scaling_down_v2_response.py +78 -0
  69. baiducloud_python_sdk_as/models/scaling_up_v2_request.py +88 -0
  70. baiducloud_python_sdk_as/models/scaling_up_v2_response.py +80 -0
  71. baiducloud_python_sdk_as/models/state.py +19 -0
  72. baiducloud_python_sdk_as/models/status.py +41 -0
  73. baiducloud_python_sdk_as/models/tag_info.py +66 -0
  74. baiducloud_python_sdk_as/models/type.py +20 -0
  75. baiducloud_python_sdk_as/models/update_is_managed_v2_request.py +80 -0
  76. baiducloud_python_sdk_as/models/update_protect_v2_request.py +80 -0
  77. baiducloud_python_sdk_as/models/vpc_info.py +74 -0
  78. baiducloud_python_sdk_as/models/zone_info.py +100 -0
  79. baiducloud_python_sdk_as-0.0.1.dist-info/LICENSE +177 -0
  80. baiducloud_python_sdk_as-0.0.1.dist-info/METADATA +76 -0
  81. baiducloud_python_sdk_as-0.0.1.dist-info/RECORD +83 -0
  82. baiducloud_python_sdk_as-0.0.1.dist-info/WHEEL +5 -0
  83. baiducloud_python_sdk_as-0.0.1.dist-info/top_level.txt +1 -0
@@ -0,0 +1,58 @@
1
+ """
2
+ Request entity for GetRuleV2Request information.
3
+ """
4
+
5
+ from baiducloud_python_sdk_core.abstract_model import AbstractModel
6
+
7
+
8
+ class GetRuleV2Request(AbstractModel):
9
+ """
10
+ Request entity for GetRuleV2Request operation.
11
+
12
+ This class encapsulates all parameters for the API request.
13
+ """
14
+
15
+ def __init__(self, rule_id):
16
+ """
17
+ Initialize GetRuleV2Request request entity.
18
+
19
+ :param rule_id: rule_id parameter
20
+ :type rule_id: str (required)
21
+ """
22
+ super().__init__()
23
+ self.rule_id = 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: GetRuleV2Request
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('ruleId') is not None:
57
+ self.rule_id = m.get('ruleId')
58
+ return self
@@ -0,0 +1,218 @@
1
+ """
2
+ Request entity for GetRuleV2Response information.
3
+ """
4
+
5
+ from baiducloud_python_sdk_core.bce_response import BceResponse
6
+ from baiducloud_python_sdk_as.models.as_alarm_rule import AsAlarmRule
7
+
8
+
9
+ class GetRuleV2Response(BceResponse):
10
+ """
11
+ GetRuleV2Response
12
+ """
13
+
14
+ def __init__(
15
+ self,
16
+ rule_id=None,
17
+ rule_name=None,
18
+ group_id=None,
19
+ account_id=None,
20
+ state=None,
21
+ type=None,
22
+ cron_time=None,
23
+ action_type=None,
24
+ action_num=None,
25
+ cooldown_in_sec=None,
26
+ create_time=None,
27
+ last_execution_time=None,
28
+ last_schedule_time=None,
29
+ period_start_time=None,
30
+ period_end_time=None,
31
+ period_type=None,
32
+ period_value=None,
33
+ as_alarm_rule=None,
34
+ ):
35
+ """
36
+ Initialize GetRuleV2Response response.
37
+
38
+ :param rule_id: 规则ID
39
+ :type rule_id: str (optional)
40
+
41
+ :param rule_name: 规则名称
42
+ :type rule_name: str (optional)
43
+
44
+ :param group_id: 伸缩组ID
45
+ :type group_id: str (optional)
46
+
47
+ :param account_id: 用户ID
48
+ :type account_id: str (optional)
49
+
50
+ :param state: 规则的状态
51
+ :type state: str (optional)
52
+
53
+ :param type: 规则的类型
54
+ :type type: str (optional)
55
+
56
+ :param cron_time: 定时规则或周期规则:当日执行时间。如12:30。
57
+ :type cron_time: str (optional)
58
+
59
+ :param action_type: 动作类型。包括:INCREASE(扩容),DECREASE(缩容),ADJUST(调整至)
60
+ :type action_type: str (optional)
61
+
62
+ :param action_num: 动作数量
63
+ :type action_num: int (optional)
64
+
65
+ :param cooldown_in_sec: 冷却时间(秒)
66
+ :type cooldown_in_sec: int (optional)
67
+
68
+ :param create_time: 规则创建时间
69
+ :type create_time: str (optional)
70
+
71
+ :param last_execution_time: 规则最后修改时间
72
+ :type last_execution_time: str (optional)
73
+
74
+ :param last_schedule_time: 规则最后执行时间
75
+ :type last_schedule_time: str (optional)
76
+
77
+ :param period_start_time: 周期规则:周期有效期开始时间。如:2023-12-10T12:00:00Z
78
+ :type period_start_time: str (optional)
79
+
80
+ :param period_end_time: 周期规则:周期有效期结束时间。如:2023-12-11T12:00:00Z
81
+ :type period_end_time: str (optional)
82
+
83
+ :param period_type: 周期规则:周期单位,可选值为DAY/WEEK/MONTH/CronExpression
84
+ :type period_type: str (optional)
85
+
86
+ :param period_value: 周期规则:周期触发日期,1-7标识周1-周日,1-31表示1号到31号,与periodType相关
87
+ :type period_value: int (optional)
88
+
89
+ :param as_alarm_rule: as_alarm_rule field
90
+ :type as_alarm_rule: AsAlarmRule (optional)
91
+ """
92
+ super().__init__()
93
+ self.rule_id = rule_id
94
+ self.rule_name = rule_name
95
+ self.group_id = group_id
96
+ self.account_id = account_id
97
+ self.state = state
98
+ self.type = type
99
+ self.cron_time = cron_time
100
+ self.action_type = action_type
101
+ self.action_num = action_num
102
+ self.cooldown_in_sec = cooldown_in_sec
103
+ self.create_time = create_time
104
+ self.last_execution_time = last_execution_time
105
+ self.last_schedule_time = last_schedule_time
106
+ self.period_start_time = period_start_time
107
+ self.period_end_time = period_end_time
108
+ self.period_type = period_type
109
+ self.period_value = period_value
110
+ self.as_alarm_rule = as_alarm_rule
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.rule_id is not None:
129
+ result['ruleId'] = self.rule_id
130
+ if self.rule_name is not None:
131
+ result['ruleName'] = self.rule_name
132
+ if self.group_id is not None:
133
+ result['groupId'] = self.group_id
134
+ if self.account_id is not None:
135
+ result['accountId'] = self.account_id
136
+ if self.state is not None:
137
+ result['state'] = self.state
138
+ if self.type is not None:
139
+ result['type'] = self.type
140
+ if self.cron_time is not None:
141
+ result['cronTime'] = self.cron_time
142
+ if self.action_type is not None:
143
+ result['actionType'] = self.action_type
144
+ if self.action_num is not None:
145
+ result['actionNum'] = self.action_num
146
+ if self.cooldown_in_sec is not None:
147
+ result['cooldownInSec'] = self.cooldown_in_sec
148
+ if self.create_time is not None:
149
+ result['createTime'] = self.create_time
150
+ if self.last_execution_time is not None:
151
+ result['lastExecutionTime'] = self.last_execution_time
152
+ if self.last_schedule_time is not None:
153
+ result['lastScheduleTime'] = self.last_schedule_time
154
+ if self.period_start_time is not None:
155
+ result['periodStartTime'] = self.period_start_time
156
+ if self.period_end_time is not None:
157
+ result['periodEndTime'] = self.period_end_time
158
+ if self.period_type is not None:
159
+ result['periodType'] = self.period_type
160
+ if self.period_value is not None:
161
+ result['periodValue'] = self.period_value
162
+ if self.as_alarm_rule is not None:
163
+ result['asAlarmRule'] = self.as_alarm_rule.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: GetRuleV2Response
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('ruleId') is not None:
183
+ self.rule_id = m.get('ruleId')
184
+ if m.get('ruleName') is not None:
185
+ self.rule_name = m.get('ruleName')
186
+ if m.get('groupId') is not None:
187
+ self.group_id = m.get('groupId')
188
+ if m.get('accountId') is not None:
189
+ self.account_id = m.get('accountId')
190
+ if m.get('state') is not None:
191
+ self.state = m.get('state')
192
+ if m.get('type') is not None:
193
+ self.type = m.get('type')
194
+ if m.get('cronTime') is not None:
195
+ self.cron_time = m.get('cronTime')
196
+ if m.get('actionType') is not None:
197
+ self.action_type = m.get('actionType')
198
+ if m.get('actionNum') is not None:
199
+ self.action_num = m.get('actionNum')
200
+ if m.get('cooldownInSec') is not None:
201
+ self.cooldown_in_sec = m.get('cooldownInSec')
202
+ if m.get('createTime') is not None:
203
+ self.create_time = m.get('createTime')
204
+ if m.get('lastExecutionTime') is not None:
205
+ self.last_execution_time = m.get('lastExecutionTime')
206
+ if m.get('lastScheduleTime') is not None:
207
+ self.last_schedule_time = m.get('lastScheduleTime')
208
+ if m.get('periodStartTime') is not None:
209
+ self.period_start_time = m.get('periodStartTime')
210
+ if m.get('periodEndTime') is not None:
211
+ self.period_end_time = m.get('periodEndTime')
212
+ if m.get('periodType') is not None:
213
+ self.period_type = m.get('periodType')
214
+ if m.get('periodValue') is not None:
215
+ self.period_value = m.get('periodValue')
216
+ if m.get('asAlarmRule') is not None:
217
+ self.as_alarm_rule = AsAlarmRule().from_dict(m.get('asAlarmRule'))
218
+ return self
@@ -0,0 +1,90 @@
1
+ """
2
+ GroupConfig information
3
+ """
4
+
5
+ from baiducloud_python_sdk_core.abstract_model import AbstractModel
6
+
7
+
8
+ class GroupConfig(AbstractModel):
9
+ """
10
+ GroupConfig
11
+ """
12
+
13
+ def __init__(self, min_node_num=None, max_node_num=None, cooldown_in_sec=None, expect_num=None, init_num=None):
14
+ """
15
+ Initialize GroupConfig instance.
16
+
17
+ :param min_node_num: 最小节点数量
18
+ :type min_node_num: int (optional)
19
+
20
+ :param max_node_num: 最大节点数量
21
+ :type max_node_num: int (optional)
22
+
23
+ :param cooldown_in_sec: 冷却时间
24
+ :type cooldown_in_sec: int (optional)
25
+
26
+ :param expect_num: 期望节点数,默认为-1,开启期望节点数后,健康检查任务会自动巡检,如果当前节点数和期望不一致会自动扩缩容保持一致
27
+ :type expect_num: int (optional)
28
+
29
+ :param init_num: 初始节点数,默认为-1
30
+ :type init_num: int (optional)
31
+ """
32
+ super().__init__()
33
+ self.min_node_num = min_node_num
34
+ self.max_node_num = max_node_num
35
+ self.cooldown_in_sec = cooldown_in_sec
36
+ self.expect_num = expect_num
37
+ self.init_num = init_num
38
+
39
+ def to_dict(self):
40
+ """
41
+ Convert the model instance to a dictionary representation.
42
+
43
+ Nested model objects are recursively converted to dictionaries.
44
+
45
+ :return: Dictionary representation of the model
46
+ :rtype: dict
47
+ """
48
+ _map = super().to_dict()
49
+ if _map is not None:
50
+ return _map
51
+ result = dict()
52
+ if self.min_node_num is not None:
53
+ result['minNodeNum'] = self.min_node_num
54
+ if self.max_node_num is not None:
55
+ result['maxNodeNum'] = self.max_node_num
56
+ if self.cooldown_in_sec is not None:
57
+ result['cooldownInSec'] = self.cooldown_in_sec
58
+ if self.expect_num is not None:
59
+ result['expectNum'] = self.expect_num
60
+ if self.init_num is not None:
61
+ result['initNum'] = self.init_num
62
+ return result
63
+
64
+ def from_dict(self, m):
65
+ """
66
+ Populate the model instance from a dictionary.
67
+
68
+ Nested dictionaries are recursively converted to model objects.
69
+
70
+ :param m: Dictionary containing model data
71
+ :type m: dict
72
+
73
+ :return: Self reference for method chaining
74
+ :rtype: GroupConfig
75
+
76
+ :raises TypeError: If input is not a dictionary type
77
+ :raises ValueError: If nested model conversion fails
78
+ """
79
+ m = m or dict()
80
+ if m.get('minNodeNum') is not None:
81
+ self.min_node_num = m.get('minNodeNum')
82
+ if m.get('maxNodeNum') is not None:
83
+ self.max_node_num = m.get('maxNodeNum')
84
+ if m.get('cooldownInSec') is not None:
85
+ self.cooldown_in_sec = m.get('cooldownInSec')
86
+ if m.get('expectNum') is not None:
87
+ self.expect_num = m.get('expectNum')
88
+ if m.get('initNum') is not None:
89
+ self.init_num = m.get('initNum')
90
+ return self
@@ -0,0 +1,66 @@
1
+ """
2
+ HealthCheckConfig information
3
+ """
4
+
5
+ from baiducloud_python_sdk_core.abstract_model import AbstractModel
6
+
7
+
8
+ class HealthCheckConfig(AbstractModel):
9
+ """
10
+ HealthCheckConfig
11
+ """
12
+
13
+ def __init__(self, health_check_interval=None, grace_time=None):
14
+ """
15
+ Initialize HealthCheckConfig instance.
16
+
17
+ :param health_check_interval: 健康检查间隔
18
+ :type health_check_interval: int (optional)
19
+
20
+ :param grace_time: 健康检查时间
21
+ :type grace_time: int (optional)
22
+ """
23
+ super().__init__()
24
+ self.health_check_interval = health_check_interval
25
+ self.grace_time = grace_time
26
+
27
+ def to_dict(self):
28
+ """
29
+ Convert the model instance to a dictionary representation.
30
+
31
+ Nested model objects are recursively converted to dictionaries.
32
+
33
+ :return: Dictionary representation of the model
34
+ :rtype: dict
35
+ """
36
+ _map = super().to_dict()
37
+ if _map is not None:
38
+ return _map
39
+ result = dict()
40
+ if self.health_check_interval is not None:
41
+ result['healthCheckInterval'] = self.health_check_interval
42
+ if self.grace_time is not None:
43
+ result['graceTime'] = self.grace_time
44
+ return result
45
+
46
+ def from_dict(self, m):
47
+ """
48
+ Populate the model instance from a dictionary.
49
+
50
+ Nested dictionaries are recursively converted to model objects.
51
+
52
+ :param m: Dictionary containing model data
53
+ :type m: dict
54
+
55
+ :return: Self reference for method chaining
56
+ :rtype: HealthCheckConfig
57
+
58
+ :raises TypeError: If input is not a dictionary type
59
+ :raises ValueError: If nested model conversion fails
60
+ """
61
+ m = m or dict()
62
+ if m.get('healthCheckInterval') is not None:
63
+ self.health_check_interval = m.get('healthCheckInterval')
64
+ if m.get('graceTime') is not None:
65
+ self.grace_time = m.get('graceTime')
66
+ return self
@@ -0,0 +1,102 @@
1
+ """
2
+ HealthCheckState information
3
+ """
4
+
5
+ from baiducloud_python_sdk_core.abstract_model import AbstractModel
6
+
7
+ from baiducloud_python_sdk_as.models.check_entity import CheckEntity
8
+
9
+
10
+ class HealthCheckState(AbstractModel):
11
+ """
12
+ HealthCheckState
13
+ """
14
+
15
+ def __init__(
16
+ self, check_id=None, group_id=None, account_id=None, state=None, check_entities=None, create_time=None
17
+ ):
18
+ """
19
+ Initialize HealthCheckState instance.
20
+
21
+ :param check_id: 检查id
22
+ :type check_id: str (optional)
23
+
24
+ :param group_id: 伸缩组id
25
+ :type group_id: str (optional)
26
+
27
+ :param account_id: 账号id
28
+ :type account_id: str (optional)
29
+
30
+ :param state: 检查状态(CHECKING-正在检查、CHECK_SUCCESS-检查通过、CHECK_FAILED-检查失败)
31
+ :type state: str (optional)
32
+
33
+ :param check_entities: 检查项列表
34
+ :type check_entities: List[CheckEntity] (optional)
35
+
36
+ :param create_time: 创建时间
37
+ :type create_time: str (optional)
38
+ """
39
+ super().__init__()
40
+ self.check_id = check_id
41
+ self.group_id = group_id
42
+ self.account_id = account_id
43
+ self.state = state
44
+ self.check_entities = check_entities
45
+ self.create_time = create_time
46
+
47
+ def to_dict(self):
48
+ """
49
+ Convert the model instance to a dictionary representation.
50
+
51
+ Nested model objects are recursively converted to dictionaries.
52
+
53
+ :return: Dictionary representation of the model
54
+ :rtype: dict
55
+ """
56
+ _map = super().to_dict()
57
+ if _map is not None:
58
+ return _map
59
+ result = dict()
60
+ if self.check_id is not None:
61
+ result['checkId'] = self.check_id
62
+ if self.group_id is not None:
63
+ result['groupId'] = self.group_id
64
+ if self.account_id is not None:
65
+ result['accountId'] = self.account_id
66
+ if self.state is not None:
67
+ result['state'] = self.state
68
+ if self.check_entities is not None:
69
+ result['checkEntities'] = [i.to_dict() for i in self.check_entities]
70
+ if self.create_time is not None:
71
+ result['createTime'] = self.create_time
72
+ return result
73
+
74
+ def from_dict(self, m):
75
+ """
76
+ Populate the model instance from a dictionary.
77
+
78
+ Nested dictionaries are recursively converted to model objects.
79
+
80
+ :param m: Dictionary containing model data
81
+ :type m: dict
82
+
83
+ :return: Self reference for method chaining
84
+ :rtype: HealthCheckState
85
+
86
+ :raises TypeError: If input is not a dictionary type
87
+ :raises ValueError: If nested model conversion fails
88
+ """
89
+ m = m or dict()
90
+ if m.get('checkId') is not None:
91
+ self.check_id = m.get('checkId')
92
+ if m.get('groupId') is not None:
93
+ self.group_id = m.get('groupId')
94
+ if m.get('accountId') is not None:
95
+ self.account_id = m.get('accountId')
96
+ if m.get('state') is not None:
97
+ self.state = m.get('state')
98
+ if m.get('checkEntities') is not None:
99
+ self.check_entities = [CheckEntity().from_dict(i) for i in m.get('checkEntities')]
100
+ if m.get('createTime') is not None:
101
+ self.create_time = m.get('createTime')
102
+ return self
@@ -0,0 +1,96 @@
1
+ """
2
+ Request entity for ListAsGroupV2Request information.
3
+ """
4
+
5
+ from baiducloud_python_sdk_core.abstract_model import AbstractModel
6
+
7
+
8
+ class ListAsGroupV2Request(AbstractModel):
9
+ """
10
+ Request entity for ListAsGroupV2Request operation.
11
+
12
+ This class encapsulates all parameters for the API request.
13
+ """
14
+
15
+ def __init__(
16
+ self, page_no, page_size, keyword=None, keyword_type=None, sub_keyword_type=None, order=None, order_by=None
17
+ ):
18
+ """
19
+ Initialize ListAsGroupV2Request request entity.
20
+
21
+ :param keyword: keyword parameter
22
+ :type keyword: str (optional)
23
+
24
+ :param keyword_type: keyword_type parameter
25
+ :type keyword_type: str (optional)
26
+
27
+ :param sub_keyword_type: sub_keyword_type parameter
28
+ :type sub_keyword_type: str (optional)
29
+
30
+ :param order: order parameter
31
+ :type order: str (optional)
32
+
33
+ :param order_by: order_by parameter
34
+ :type order_by: str (optional)
35
+
36
+ :param page_no: page_no parameter
37
+ :type page_no: int (required)
38
+
39
+ :param page_size: page_size parameter
40
+ :type page_size: int (required)
41
+ """
42
+ super().__init__()
43
+ self.keyword = keyword
44
+ self.keyword_type = keyword_type
45
+ self.sub_keyword_type = sub_keyword_type
46
+ self.order = order
47
+ self.order_by = order_by
48
+ self.page_no = page_no
49
+ self.page_size = page_size
50
+
51
+ def to_dict(self):
52
+ """
53
+ Convert the request entity to a dictionary representation.
54
+
55
+ Nested model objects are recursively converted to dictionaries.
56
+
57
+ :return: Dictionary representation of the request
58
+ :rtype: dict
59
+ """
60
+ _map = super().to_dict()
61
+ if _map is not None:
62
+ return _map
63
+ result = dict()
64
+ return result
65
+
66
+ def from_dict(self, m):
67
+ """
68
+ Populate the request entity from a dictionary.
69
+
70
+ Nested dictionaries are recursively converted to model objects.
71
+
72
+ :param m: Dictionary containing request data
73
+ :type m: dict
74
+
75
+ :return: Self reference for method chaining
76
+ :rtype: ListAsGroupV2Request
77
+
78
+ :raises TypeError: If input is not a dictionary or field type mismatch
79
+ :raises ValueError: If nested model conversion fails
80
+ """
81
+ m = m or dict()
82
+ if m.get('keyword') is not None:
83
+ self.keyword = m.get('keyword')
84
+ if m.get('keywordType') is not None:
85
+ self.keyword_type = m.get('keywordType')
86
+ if m.get('subKeywordType') is not None:
87
+ self.sub_keyword_type = m.get('subKeywordType')
88
+ if m.get('order') is not None:
89
+ self.order = m.get('order')
90
+ if m.get('orderBy') is not None:
91
+ self.order_by = m.get('orderBy')
92
+ if m.get('pageNo') is not None:
93
+ self.page_no = m.get('pageNo')
94
+ if m.get('pageSize') is not None:
95
+ self.page_size = m.get('pageSize')
96
+ return self