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,245 @@
1
+ """
2
+ Request entity for CreateAsGroupV2Request information.
3
+ """
4
+
5
+ from baiducloud_python_sdk_core.abstract_model import AbstractModel
6
+ from baiducloud_python_sdk_as.models.zone_info import ZoneInfo
7
+ from baiducloud_python_sdk_as.models.group_config import GroupConfig
8
+ from baiducloud_python_sdk_as.models.blb_info import BlbInfo
9
+ from baiducloud_python_sdk_as.models.node_info import NodeInfo
10
+ from baiducloud_python_sdk_as.models.eip_info import EipInfo
11
+ from baiducloud_python_sdk_as.models.eip_config import EipConfig
12
+ from baiducloud_python_sdk_as.models.billing_info import BillingInfo
13
+ from baiducloud_python_sdk_as.models.health_check_config import HealthCheckConfig
14
+ from baiducloud_python_sdk_as.models.assign_tag_info import AssignTagInfo
15
+ from baiducloud_python_sdk_as.models.cmd_config import CmdConfig
16
+ from baiducloud_python_sdk_as.models.bcc_name_config import BccNameConfig
17
+
18
+
19
+ class CreateAsGroupV2Request(AbstractModel):
20
+ """
21
+ Request entity for CreateAsGroupV2Request operation.
22
+
23
+ This class encapsulates all parameters for the API request.
24
+ """
25
+
26
+ def __init__(
27
+ self,
28
+ group_name,
29
+ zone_info,
30
+ config,
31
+ nodes,
32
+ assign_tag_info,
33
+ cmd_config,
34
+ keypair_id=None,
35
+ keypair_name=None,
36
+ keep_image_login=None,
37
+ blb=None,
38
+ blb_unbind_wait_time=None,
39
+ eip=None,
40
+ eip_config=None,
41
+ billing=None,
42
+ rds=None,
43
+ scs=None,
44
+ health_check=None,
45
+ expansion_strategy=None,
46
+ shrinkage_strategy=None,
47
+ bcc_name_config=None,
48
+ ):
49
+ """
50
+ Initialize CreateAsGroupV2Request request entity.
51
+
52
+ :param group_name: 伸缩组名称
53
+ :type group_name: str (required)
54
+
55
+ :param zone_info: 伸缩组所在可用区
56
+ :type zone_info: List[ZoneInfo] (required)
57
+
58
+ :param config: config parameter
59
+ :type config: GroupConfig (required)
60
+
61
+ :param keypair_id: 创建实例时使用的密钥对 ID
62
+ :type keypair_id: str (optional)
63
+
64
+ :param keypair_name: 创建实例时使用的密钥对名称
65
+ :type keypair_name: str (optional)
66
+
67
+ :param keep_image_login: 是否使用镜像预置密码,非必填,默认为0,当为1时使用预置密码,这时镜像类型必须为自定义镜像
68
+ :type keep_image_login: int (optional)
69
+
70
+ :param blb: 伸缩组绑定BLB,可绑定多个
71
+ :type blb: List[BlbInfo] (optional)
72
+
73
+ :param blb_unbind_wait_time: blb_unbind_wait_time parameter
74
+ :type blb_unbind_wait_time: int (optional)
75
+
76
+ :param nodes: 伸缩组扩容时节点配置
77
+ :type nodes: List[NodeInfo] (required)
78
+
79
+ :param eip: eip parameter
80
+ :type eip: EipInfo (optional)
81
+
82
+ :param eip_config: eip_config parameter
83
+ :type eip_config: EipConfig (optional)
84
+
85
+ :param billing: billing parameter
86
+ :type billing: BillingInfo (optional)
87
+
88
+ :param rds: 伸缩组绑定RDS,可绑定多个
89
+ :type rds: List[str] (optional)
90
+
91
+ :param scs: 伸缩组绑定SCS,可绑定多个
92
+ :type scs: List[str] (optional)
93
+
94
+ :param health_check: health_check parameter
95
+ :type health_check: HealthCheckConfig (optional)
96
+
97
+ :param expansion_strategy: expansion_strategy parameter
98
+ :type expansion_strategy: str (optional)
99
+
100
+ :param shrinkage_strategy: 伸缩组缩容时策略;Earlier - 删除先创建实例,Later - 删除后创建实例
101
+ :type shrinkage_strategy: str (optional)
102
+
103
+ :param assign_tag_info: assign_tag_info parameter
104
+ :type assign_tag_info: AssignTagInfo (required)
105
+
106
+ :param cmd_config: cmd_config parameter
107
+ :type cmd_config: CmdConfig (required)
108
+
109
+ :param bcc_name_config: bcc_name_config parameter
110
+ :type bcc_name_config: BccNameConfig (optional)
111
+ """
112
+ super().__init__()
113
+ self.group_name = group_name
114
+ self.zone_info = zone_info
115
+ self.config = config
116
+ self.keypair_id = keypair_id
117
+ self.keypair_name = keypair_name
118
+ self.keep_image_login = keep_image_login
119
+ self.blb = blb
120
+ self.blb_unbind_wait_time = blb_unbind_wait_time
121
+ self.nodes = nodes
122
+ self.eip = eip
123
+ self.eip_config = eip_config
124
+ self.billing = billing
125
+ self.rds = rds
126
+ self.scs = scs
127
+ self.health_check = health_check
128
+ self.expansion_strategy = expansion_strategy
129
+ self.shrinkage_strategy = shrinkage_strategy
130
+ self.assign_tag_info = assign_tag_info
131
+ self.cmd_config = cmd_config
132
+ self.bcc_name_config = bcc_name_config
133
+
134
+ def to_dict(self):
135
+ """
136
+ Convert the request entity to a dictionary representation.
137
+
138
+ Nested model objects are recursively converted to dictionaries.
139
+
140
+ :return: Dictionary representation of the request
141
+ :rtype: dict
142
+ """
143
+ _map = super().to_dict()
144
+ if _map is not None:
145
+ return _map
146
+ result = dict()
147
+ if self.group_name is not None:
148
+ result['groupName'] = self.group_name
149
+ if self.zone_info is not None:
150
+ result['zoneInfo'] = [i.to_dict() for i in self.zone_info]
151
+ if self.config is not None:
152
+ result['config'] = self.config.to_dict()
153
+ if self.keypair_id is not None:
154
+ result['keypairId'] = self.keypair_id
155
+ if self.keypair_name is not None:
156
+ result['keypairName'] = self.keypair_name
157
+ if self.keep_image_login is not None:
158
+ result['keepImageLogin'] = self.keep_image_login
159
+ if self.blb is not None:
160
+ result['blb'] = [i.to_dict() for i in self.blb]
161
+ if self.blb_unbind_wait_time is not None:
162
+ result['blbUnbindWaitTime'] = self.blb_unbind_wait_time
163
+ if self.nodes is not None:
164
+ result['nodes'] = [i.to_dict() for i in self.nodes]
165
+ if self.eip is not None:
166
+ result['eip'] = self.eip.to_dict()
167
+ if self.eip_config is not None:
168
+ result['eipConfig'] = self.eip_config.to_dict()
169
+ if self.billing is not None:
170
+ result['billing'] = self.billing.to_dict()
171
+ if self.rds is not None:
172
+ result['rds'] = self.rds
173
+ if self.scs is not None:
174
+ result['scs'] = self.scs
175
+ if self.health_check is not None:
176
+ result['healthCheck'] = self.health_check.to_dict()
177
+ if self.expansion_strategy is not None:
178
+ result['expansionStrategy'] = self.expansion_strategy
179
+ if self.shrinkage_strategy is not None:
180
+ result['shrinkageStrategy'] = self.shrinkage_strategy
181
+ if self.assign_tag_info is not None:
182
+ result['assignTagInfo'] = self.assign_tag_info.to_dict()
183
+ if self.cmd_config is not None:
184
+ result['cmdConfig'] = self.cmd_config.to_dict()
185
+ if self.bcc_name_config is not None:
186
+ result['bccNameConfig'] = self.bcc_name_config.to_dict()
187
+ return result
188
+
189
+ def from_dict(self, m):
190
+ """
191
+ Populate the request entity from a dictionary.
192
+
193
+ Nested dictionaries are recursively converted to model objects.
194
+
195
+ :param m: Dictionary containing request data
196
+ :type m: dict
197
+
198
+ :return: Self reference for method chaining
199
+ :rtype: CreateAsGroupV2Request
200
+
201
+ :raises TypeError: If input is not a dictionary or field type mismatch
202
+ :raises ValueError: If nested model conversion fails
203
+ """
204
+ m = m or dict()
205
+ if m.get('groupName') is not None:
206
+ self.group_name = m.get('groupName')
207
+ if m.get('zoneInfo') is not None:
208
+ self.zone_info = [ZoneInfo().from_dict(i) for i in m.get('zoneInfo')]
209
+ if m.get('config') is not None:
210
+ self.config = GroupConfig().from_dict(m.get('config'))
211
+ if m.get('keypairId') is not None:
212
+ self.keypair_id = m.get('keypairId')
213
+ if m.get('keypairName') is not None:
214
+ self.keypair_name = m.get('keypairName')
215
+ if m.get('keepImageLogin') is not None:
216
+ self.keep_image_login = m.get('keepImageLogin')
217
+ if m.get('blb') is not None:
218
+ self.blb = [BlbInfo().from_dict(i) for i in m.get('blb')]
219
+ if m.get('blbUnbindWaitTime') is not None:
220
+ self.blb_unbind_wait_time = m.get('blbUnbindWaitTime')
221
+ if m.get('nodes') is not None:
222
+ self.nodes = [NodeInfo().from_dict(i) for i in m.get('nodes')]
223
+ if m.get('eip') is not None:
224
+ self.eip = EipInfo().from_dict(m.get('eip'))
225
+ if m.get('eipConfig') is not None:
226
+ self.eip_config = EipConfig().from_dict(m.get('eipConfig'))
227
+ if m.get('billing') is not None:
228
+ self.billing = BillingInfo().from_dict(m.get('billing'))
229
+ if m.get('rds') is not None:
230
+ self.rds = m.get('rds')
231
+ if m.get('scs') is not None:
232
+ self.scs = m.get('scs')
233
+ if m.get('healthCheck') is not None:
234
+ self.health_check = HealthCheckConfig().from_dict(m.get('healthCheck'))
235
+ if m.get('expansionStrategy') is not None:
236
+ self.expansion_strategy = m.get('expansionStrategy')
237
+ if m.get('shrinkageStrategy') is not None:
238
+ self.shrinkage_strategy = m.get('shrinkageStrategy')
239
+ if m.get('assignTagInfo') is not None:
240
+ self.assign_tag_info = AssignTagInfo().from_dict(m.get('assignTagInfo'))
241
+ if m.get('cmdConfig') is not None:
242
+ self.cmd_config = CmdConfig().from_dict(m.get('cmdConfig'))
243
+ if m.get('bccNameConfig') is not None:
244
+ self.bcc_name_config = BccNameConfig().from_dict(m.get('bccNameConfig'))
245
+ return self
@@ -0,0 +1,69 @@
1
+ """
2
+ Request entity for CreateAsGroupV2Response information.
3
+ """
4
+
5
+ from baiducloud_python_sdk_core.bce_response import BceResponse
6
+
7
+
8
+ class CreateAsGroupV2Response(BceResponse):
9
+ """
10
+ CreateAsGroupV2Response
11
+ """
12
+
13
+ def __init__(self, group_id=None, order_id=None):
14
+ """
15
+ Initialize CreateAsGroupV2Response response.
16
+
17
+ :param group_id: 伸缩组ID
18
+ :type group_id: str (optional)
19
+
20
+ :param order_id: 订单ID
21
+ :type order_id: List[str] (optional)
22
+ """
23
+ super().__init__()
24
+ self.group_id = group_id
25
+ self.order_id = order_id
26
+
27
+ def to_dict(self):
28
+ """
29
+ Convert the response instance to a dictionary representation.
30
+
31
+ Includes metadata from the parent BceResponse class.
32
+ Nested model objects are recursively converted to dictionaries.
33
+
34
+ :return: Dictionary representation of the response
35
+ :rtype: dict
36
+ """
37
+ _map = super().to_dict()
38
+ if _map is not None:
39
+ return _map
40
+ result = dict()
41
+ if self.metadata is not None:
42
+ result['metadata'] = dict(self.metadata)
43
+ if self.group_id is not None:
44
+ result['groupId'] = self.group_id
45
+ if self.order_id is not None:
46
+ result['orderId'] = self.order_id
47
+ return result
48
+
49
+ def from_dict(self, m):
50
+ """
51
+ Populate the response instance from a dictionary.
52
+
53
+ Nested dictionaries are recursively converted to model objects.
54
+
55
+ :param m: Dictionary containing response data
56
+ :type m: dict
57
+
58
+ :return: Self reference for method chaining
59
+ :rtype: CreateAsGroupV2Response
60
+
61
+ :raises TypeError: If input is not a dictionary or field type mismatch
62
+ :raises ValueError: If nested model conversion fails
63
+ """
64
+ m = m or dict()
65
+ if m.get('groupId') is not None:
66
+ self.group_id = m.get('groupId')
67
+ if m.get('orderId') is not None:
68
+ self.order_id = m.get('orderId')
69
+ return self
@@ -0,0 +1,172 @@
1
+ """
2
+ Request entity for CreateRuleV2Request information.
3
+ """
4
+
5
+ from baiducloud_python_sdk_core.abstract_model import AbstractModel
6
+ from baiducloud_python_sdk_as.models.as_alarm_rule import AsAlarmRule
7
+
8
+
9
+ class CreateRuleV2Request(AbstractModel):
10
+ """
11
+ Request entity for CreateRuleV2Request operation.
12
+
13
+ This class encapsulates all parameters for the API request.
14
+ """
15
+
16
+ def __init__(
17
+ self,
18
+ rule_name,
19
+ group_id,
20
+ state,
21
+ type,
22
+ action_type,
23
+ action_num,
24
+ cooldown_in_sec,
25
+ cron_time=None,
26
+ period_type=None,
27
+ period_value=None,
28
+ period_start_time=None,
29
+ period_end_time=None,
30
+ as_alarm_rule=None,
31
+ ):
32
+ """
33
+ Initialize CreateRuleV2Request request entity.
34
+
35
+ :param rule_name: 规则名称
36
+ :type rule_name: str (required)
37
+
38
+ :param group_id: 伸缩组id
39
+ :type group_id: str (required)
40
+
41
+ :param state: 规则状态。包括:ENABLE(可用),DISABLE(禁用)
42
+ :type state: str (required)
43
+
44
+ :param type: 规则类型。包括:CRONTAB(定时伸缩),ALARM(报警触发伸缩),PERIOD(周期伸缩)
45
+ :type type: str (required)
46
+
47
+ :param action_type: 动作类型。包括:INCREASE(扩容),DECREASE(缩容),ADJUST(调整至)
48
+ :type action_type: str (required)
49
+
50
+ :param action_num: 动作数量
51
+ :type action_num: int (required)
52
+
53
+ :param cron_time: 定时规则或周期规则:当日执行时间。如12:30。
54
+ :type cron_time: str (optional)
55
+
56
+ :param cooldown_in_sec: 冷却时间(秒)
57
+ :type cooldown_in_sec: int (required)
58
+
59
+ :param period_type: 周期规则:周期单位,可选值为DAY/WEEK/MONTH/CronExpression
60
+ :type period_type: str (optional)
61
+
62
+ :param period_value: 周期规则:周期触发日期,1-7标识周1-周日,1-31表示1号到31号,与periodType相关
63
+ :type period_value: int (optional)
64
+
65
+ :param period_start_time: 周期规则:周期有效期开始时间。如:2023-12-10T12:00:00Z
66
+ :type period_start_time: str (optional)
67
+
68
+ :param period_end_time: 周期规则:周期有效期结束时间。如:2023-12-11T12:00:00Z
69
+ :type period_end_time: str (optional)
70
+
71
+ :param as_alarm_rule: as_alarm_rule parameter
72
+ :type as_alarm_rule: AsAlarmRule (optional)
73
+ """
74
+ super().__init__()
75
+ self.rule_name = rule_name
76
+ self.group_id = group_id
77
+ self.state = state
78
+ self.type = type
79
+ self.action_type = action_type
80
+ self.action_num = action_num
81
+ self.cron_time = cron_time
82
+ self.cooldown_in_sec = cooldown_in_sec
83
+ self.period_type = period_type
84
+ self.period_value = period_value
85
+ self.period_start_time = period_start_time
86
+ self.period_end_time = period_end_time
87
+ self.as_alarm_rule = as_alarm_rule
88
+
89
+ def to_dict(self):
90
+ """
91
+ Convert the request entity to a dictionary representation.
92
+
93
+ Nested model objects are recursively converted to dictionaries.
94
+
95
+ :return: Dictionary representation of the request
96
+ :rtype: dict
97
+ """
98
+ _map = super().to_dict()
99
+ if _map is not None:
100
+ return _map
101
+ result = dict()
102
+ if self.rule_name is not None:
103
+ result['ruleName'] = self.rule_name
104
+ if self.group_id is not None:
105
+ result['groupId'] = self.group_id
106
+ if self.state is not None:
107
+ result['state'] = self.state
108
+ if self.type is not None:
109
+ result['type'] = self.type
110
+ if self.action_type is not None:
111
+ result['actionType'] = self.action_type
112
+ if self.action_num is not None:
113
+ result['actionNum'] = self.action_num
114
+ if self.cron_time is not None:
115
+ result['cronTime'] = self.cron_time
116
+ if self.cooldown_in_sec is not None:
117
+ result['cooldownInSec'] = self.cooldown_in_sec
118
+ if self.period_type is not None:
119
+ result['periodType'] = self.period_type
120
+ if self.period_value is not None:
121
+ result['periodValue'] = self.period_value
122
+ if self.period_start_time is not None:
123
+ result['periodStartTime'] = self.period_start_time
124
+ if self.period_end_time is not None:
125
+ result['periodEndTime'] = self.period_end_time
126
+ if self.as_alarm_rule is not None:
127
+ result['asAlarmRule'] = self.as_alarm_rule.to_dict()
128
+ return result
129
+
130
+ def from_dict(self, m):
131
+ """
132
+ Populate the request entity from a dictionary.
133
+
134
+ Nested dictionaries are recursively converted to model objects.
135
+
136
+ :param m: Dictionary containing request data
137
+ :type m: dict
138
+
139
+ :return: Self reference for method chaining
140
+ :rtype: CreateRuleV2Request
141
+
142
+ :raises TypeError: If input is not a dictionary or field type mismatch
143
+ :raises ValueError: If nested model conversion fails
144
+ """
145
+ m = m or dict()
146
+ if m.get('ruleName') is not None:
147
+ self.rule_name = m.get('ruleName')
148
+ if m.get('groupId') is not None:
149
+ self.group_id = m.get('groupId')
150
+ if m.get('state') is not None:
151
+ self.state = m.get('state')
152
+ if m.get('type') is not None:
153
+ self.type = m.get('type')
154
+ if m.get('actionType') is not None:
155
+ self.action_type = m.get('actionType')
156
+ if m.get('actionNum') is not None:
157
+ self.action_num = m.get('actionNum')
158
+ if m.get('cronTime') is not None:
159
+ self.cron_time = m.get('cronTime')
160
+ if m.get('cooldownInSec') is not None:
161
+ self.cooldown_in_sec = m.get('cooldownInSec')
162
+ if m.get('periodType') is not None:
163
+ self.period_type = m.get('periodType')
164
+ if m.get('periodValue') is not None:
165
+ self.period_value = m.get('periodValue')
166
+ if m.get('periodStartTime') is not None:
167
+ self.period_start_time = m.get('periodStartTime')
168
+ if m.get('periodEndTime') is not None:
169
+ self.period_end_time = m.get('periodEndTime')
170
+ if m.get('asAlarmRule') is not None:
171
+ self.as_alarm_rule = AsAlarmRule().from_dict(m.get('asAlarmRule'))
172
+ return self
@@ -0,0 +1,61 @@
1
+ """
2
+ Request entity for CreateRuleV2Response information.
3
+ """
4
+
5
+ from baiducloud_python_sdk_core.bce_response import BceResponse
6
+
7
+
8
+ class CreateRuleV2Response(BceResponse):
9
+ """
10
+ CreateRuleV2Response
11
+ """
12
+
13
+ def __init__(self, rule_id=None):
14
+ """
15
+ Initialize CreateRuleV2Response response.
16
+
17
+ :param rule_id: 规则ID
18
+ :type rule_id: str (optional)
19
+ """
20
+ super().__init__()
21
+ self.rule_id = rule_id
22
+
23
+ def to_dict(self):
24
+ """
25
+ Convert the response instance to a dictionary representation.
26
+
27
+ Includes metadata from the parent BceResponse class.
28
+ Nested model objects are recursively converted to dictionaries.
29
+
30
+ :return: Dictionary representation of the response
31
+ :rtype: dict
32
+ """
33
+ _map = super().to_dict()
34
+ if _map is not None:
35
+ return _map
36
+ result = dict()
37
+ if self.metadata is not None:
38
+ result['metadata'] = dict(self.metadata)
39
+ if self.rule_id is not None:
40
+ result['ruleId'] = self.rule_id
41
+ return result
42
+
43
+ def from_dict(self, m):
44
+ """
45
+ Populate the response instance from a dictionary.
46
+
47
+ Nested dictionaries are recursively converted to model objects.
48
+
49
+ :param m: Dictionary containing response data
50
+ :type m: dict
51
+
52
+ :return: Self reference for method chaining
53
+ :rtype: CreateRuleV2Response
54
+
55
+ :raises TypeError: If input is not a dictionary or field type mismatch
56
+ :raises ValueError: If nested model conversion fails
57
+ """
58
+ m = m or dict()
59
+ if m.get('ruleId') is not None:
60
+ self.rule_id = m.get('ruleId')
61
+ return self
@@ -0,0 +1,58 @@
1
+ """
2
+ DagModel information
3
+ """
4
+
5
+ from baiducloud_python_sdk_core.abstract_model import AbstractModel
6
+
7
+
8
+ class DagModel(AbstractModel):
9
+ """
10
+ DagModel
11
+ """
12
+
13
+ def __init__(self, id=None):
14
+ """
15
+ Initialize DagModel instance.
16
+
17
+ :param id: DAG 的唯一标识符
18
+ :type id: str (optional)
19
+ """
20
+ super().__init__()
21
+ self.id = id
22
+
23
+ def to_dict(self):
24
+ """
25
+ Convert the model instance to a dictionary representation.
26
+
27
+ Nested model objects are recursively converted to dictionaries.
28
+
29
+ :return: Dictionary representation of the model
30
+ :rtype: dict
31
+ """
32
+ _map = super().to_dict()
33
+ if _map is not None:
34
+ return _map
35
+ result = dict()
36
+ if self.id is not None:
37
+ result['id'] = self.id
38
+ return result
39
+
40
+ def from_dict(self, m):
41
+ """
42
+ Populate the model instance from a dictionary.
43
+
44
+ Nested dictionaries are recursively converted to model objects.
45
+
46
+ :param m: Dictionary containing model data
47
+ :type m: dict
48
+
49
+ :return: Self reference for method chaining
50
+ :rtype: DagModel
51
+
52
+ :raises TypeError: If input is not a dictionary type
53
+ :raises ValueError: If nested model conversion fails
54
+ """
55
+ m = m or dict()
56
+ if m.get('id') is not None:
57
+ self.id = m.get('id')
58
+ return self
@@ -0,0 +1,60 @@
1
+ """
2
+ Request entity for DeleteAsGroupV2Request information.
3
+ """
4
+
5
+ from baiducloud_python_sdk_core.abstract_model import AbstractModel
6
+
7
+
8
+ class DeleteAsGroupV2Request(AbstractModel):
9
+ """
10
+ Request entity for DeleteAsGroupV2Request operation.
11
+
12
+ This class encapsulates all parameters for the API request.
13
+ """
14
+
15
+ def __init__(self, group_ids):
16
+ """
17
+ Initialize DeleteAsGroupV2Request request entity.
18
+
19
+ :param group_ids: 伸缩组id列表
20
+ :type group_ids: List[str] (required)
21
+ """
22
+ super().__init__()
23
+ self.group_ids = group_ids
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
+ if self.group_ids is not None:
39
+ result['groupIds'] = self.group_ids
40
+ return result
41
+
42
+ def from_dict(self, m):
43
+ """
44
+ Populate the request entity from a dictionary.
45
+
46
+ Nested dictionaries are recursively converted to model objects.
47
+
48
+ :param m: Dictionary containing request data
49
+ :type m: dict
50
+
51
+ :return: Self reference for method chaining
52
+ :rtype: DeleteAsGroupV2Request
53
+
54
+ :raises TypeError: If input is not a dictionary or field type mismatch
55
+ :raises ValueError: If nested model conversion fails
56
+ """
57
+ m = m or dict()
58
+ if m.get('groupIds') is not None:
59
+ self.group_ids = m.get('groupIds')
60
+ return self