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,186 @@
1
+ """
2
+ AsGroup information
3
+ """
4
+
5
+ from baiducloud_python_sdk_core.abstract_model import AbstractModel
6
+
7
+ from baiducloud_python_sdk_as.models.tag_info import TagInfo
8
+
9
+ from baiducloud_python_sdk_as.models.group_config import GroupConfig
10
+
11
+ from baiducloud_python_sdk_as.models.blb_info import BlbInfo
12
+
13
+ from baiducloud_python_sdk_as.models.health_check_state import HealthCheckState
14
+
15
+
16
+ class AsGroup(AbstractModel):
17
+ """
18
+ AsGroup
19
+ """
20
+
21
+ def __init__(
22
+ self,
23
+ group_id=None,
24
+ group_name=None,
25
+ region=None,
26
+ status=None,
27
+ tags=None,
28
+ relation_tag=None,
29
+ vpc_id=None,
30
+ zone_info=None,
31
+ config=None,
32
+ blb=None,
33
+ node_num=None,
34
+ rule_count=None,
35
+ create_time=None,
36
+ health_check_state=None,
37
+ ):
38
+ """
39
+ Initialize AsGroup instance.
40
+
41
+ :param group_id: 伸缩组id
42
+ :type group_id: str (optional)
43
+
44
+ :param group_name: 伸缩组名称
45
+ :type group_name: str (optional)
46
+
47
+ :param region: 分区
48
+ :type region: str (optional)
49
+
50
+ :param status: 状态
51
+ :type status: str (optional)
52
+
53
+ :param tags: 标签信息
54
+ :type tags: List[TagInfo] (optional)
55
+
56
+ :param relation_tag: 是否绑定标签
57
+ :type relation_tag: bool (optional)
58
+
59
+ :param vpc_id: vpc的id
60
+ :type vpc_id: str (optional)
61
+
62
+ :param zone_info: 伸缩组所在可用区
63
+ :type zone_info: List[object] (optional)
64
+
65
+ :param config: config attribute
66
+ :type config: GroupConfig (optional)
67
+
68
+ :param blb: 伸缩组绑定BLB,可绑定多个
69
+ :type blb: List[BlbInfo] (optional)
70
+
71
+ :param node_num: 节点数量
72
+ :type node_num: int (optional)
73
+
74
+ :param rule_count: 规则数量
75
+ :type rule_count: int (optional)
76
+
77
+ :param create_time: 创建时间
78
+ :type create_time: str (optional)
79
+
80
+ :param health_check_state: health_check_state attribute
81
+ :type health_check_state: HealthCheckState (optional)
82
+ """
83
+ super().__init__()
84
+ self.group_id = group_id
85
+ self.group_name = group_name
86
+ self.region = region
87
+ self.status = status
88
+ self.tags = tags
89
+ self.relation_tag = relation_tag
90
+ self.vpc_id = vpc_id
91
+ self.zone_info = zone_info
92
+ self.config = config
93
+ self.blb = blb
94
+ self.node_num = node_num
95
+ self.rule_count = rule_count
96
+ self.create_time = create_time
97
+ self.health_check_state = health_check_state
98
+
99
+ def to_dict(self):
100
+ """
101
+ Convert the model instance to a dictionary representation.
102
+
103
+ Nested model objects are recursively converted to dictionaries.
104
+
105
+ :return: Dictionary representation of the model
106
+ :rtype: dict
107
+ """
108
+ _map = super().to_dict()
109
+ if _map is not None:
110
+ return _map
111
+ result = dict()
112
+ if self.group_id is not None:
113
+ result['groupId'] = self.group_id
114
+ if self.group_name is not None:
115
+ result['groupName'] = self.group_name
116
+ if self.region is not None:
117
+ result['region'] = self.region
118
+ if self.status is not None:
119
+ result['status'] = self.status
120
+ if self.tags is not None:
121
+ result['tags'] = [i.to_dict() for i in self.tags]
122
+ if self.relation_tag is not None:
123
+ result['relationTag'] = self.relation_tag
124
+ if self.vpc_id is not None:
125
+ result['vpcId'] = self.vpc_id
126
+ if self.zone_info is not None:
127
+ result['zoneInfo'] = self.zone_info
128
+ if self.config is not None:
129
+ result['config'] = self.config.to_dict()
130
+ if self.blb is not None:
131
+ result['blb'] = [i.to_dict() for i in self.blb]
132
+ if self.node_num is not None:
133
+ result['nodeNum'] = self.node_num
134
+ if self.rule_count is not None:
135
+ result['ruleCount'] = self.rule_count
136
+ if self.create_time is not None:
137
+ result['createTime'] = self.create_time
138
+ if self.health_check_state is not None:
139
+ result['healthCheckState'] = self.health_check_state.to_dict()
140
+ return result
141
+
142
+ def from_dict(self, m):
143
+ """
144
+ Populate the model instance from a dictionary.
145
+
146
+ Nested dictionaries are recursively converted to model objects.
147
+
148
+ :param m: Dictionary containing model data
149
+ :type m: dict
150
+
151
+ :return: Self reference for method chaining
152
+ :rtype: AsGroup
153
+
154
+ :raises TypeError: If input is not a dictionary type
155
+ :raises ValueError: If nested model conversion fails
156
+ """
157
+ m = m or dict()
158
+ if m.get('groupId') is not None:
159
+ self.group_id = m.get('groupId')
160
+ if m.get('groupName') is not None:
161
+ self.group_name = m.get('groupName')
162
+ if m.get('region') is not None:
163
+ self.region = m.get('region')
164
+ if m.get('status') is not None:
165
+ self.status = m.get('status')
166
+ if m.get('tags') is not None:
167
+ self.tags = [TagInfo().from_dict(i) for i in m.get('tags')]
168
+ if m.get('relationTag') is not None:
169
+ self.relation_tag = m.get('relationTag')
170
+ if m.get('vpcId') is not None:
171
+ self.vpc_id = m.get('vpcId')
172
+ if m.get('zoneInfo') is not None:
173
+ self.zone_info = m.get('zoneInfo')
174
+ if m.get('config') is not None:
175
+ self.config = GroupConfig().from_dict(m.get('config'))
176
+ if m.get('blb') is not None:
177
+ self.blb = [BlbInfo().from_dict(i) for i in m.get('blb')]
178
+ if m.get('nodeNum') is not None:
179
+ self.node_num = m.get('nodeNum')
180
+ if m.get('ruleCount') is not None:
181
+ self.rule_count = m.get('ruleCount')
182
+ if m.get('createTime') is not None:
183
+ self.create_time = m.get('createTime')
184
+ if m.get('healthCheckState') is not None:
185
+ self.health_check_state = HealthCheckState().from_dict(m.get('healthCheckState'))
186
+ return self
@@ -0,0 +1,202 @@
1
+ """
2
+ AsRecord information
3
+ """
4
+
5
+ from baiducloud_python_sdk_core.abstract_model import AbstractModel
6
+
7
+ from baiducloud_python_sdk_as.models.scale_condition import ScaleCondition
8
+
9
+ from baiducloud_python_sdk_as.models.expect_action import ExpectAction
10
+
11
+ from baiducloud_python_sdk_as.models.resource import Resource
12
+
13
+
14
+ class AsRecord(AbstractModel):
15
+ """
16
+ AsRecord
17
+ """
18
+
19
+ def __init__(
20
+ self,
21
+ group_id=None,
22
+ record_id=None,
23
+ start_time=None,
24
+ result=None,
25
+ actual_scale_node=None,
26
+ actual_scale_bandwidth=None,
27
+ current_bandwidth=None,
28
+ remained_node=None,
29
+ action=None,
30
+ scale_condition=None,
31
+ rule_id=None,
32
+ message=None,
33
+ expect_action=None,
34
+ execute_type=None,
35
+ dag_id=None,
36
+ resource=None,
37
+ ):
38
+ """
39
+ Initialize AsRecord instance.
40
+
41
+ :param group_id: 伸缩组ID
42
+ :type group_id: str (optional)
43
+
44
+ :param record_id: 记录ID
45
+ :type record_id: str (optional)
46
+
47
+ :param start_time: 开始时间
48
+ :type start_time: str (optional)
49
+
50
+ :param result: 执行结果
51
+ :type result: str (optional)
52
+
53
+ :param actual_scale_node: 实际操作的节点列表
54
+ :type actual_scale_node: List[str] (optional)
55
+
56
+ :param actual_scale_bandwidth: 实际扩容后的带宽值
57
+ :type actual_scale_bandwidth: int (optional)
58
+
59
+ :param current_bandwidth: 当前带宽值
60
+ :type current_bandwidth: int (optional)
61
+
62
+ :param remained_node: 剩余的节点列表
63
+ :type remained_node: List[str] (optional)
64
+
65
+ :param action: 动作
66
+ :type action: str (optional)
67
+
68
+ :param scale_condition: scale_condition attribute
69
+ :type scale_condition: ScaleCondition (optional)
70
+
71
+ :param rule_id: 规则 ID
72
+ :type rule_id: str (optional)
73
+
74
+ :param message: 消息
75
+ :type message: str (optional)
76
+
77
+ :param expect_action: expect_action attribute
78
+ :type expect_action: ExpectAction (optional)
79
+
80
+ :param execute_type: 执行类型
81
+ :type execute_type: str (optional)
82
+
83
+ :param dag_id: DAG编号
84
+ :type dag_id: str (optional)
85
+
86
+ :param resource: resource attribute
87
+ :type resource: Resource (optional)
88
+ """
89
+ super().__init__()
90
+ self.group_id = group_id
91
+ self.record_id = record_id
92
+ self.start_time = start_time
93
+ self.result = result
94
+ self.actual_scale_node = actual_scale_node
95
+ self.actual_scale_bandwidth = actual_scale_bandwidth
96
+ self.current_bandwidth = current_bandwidth
97
+ self.remained_node = remained_node
98
+ self.action = action
99
+ self.scale_condition = scale_condition
100
+ self.rule_id = rule_id
101
+ self.message = message
102
+ self.expect_action = expect_action
103
+ self.execute_type = execute_type
104
+ self.dag_id = dag_id
105
+ self.resource = resource
106
+
107
+ def to_dict(self):
108
+ """
109
+ Convert the model instance to a dictionary representation.
110
+
111
+ Nested model objects are recursively converted to dictionaries.
112
+
113
+ :return: Dictionary representation of the model
114
+ :rtype: dict
115
+ """
116
+ _map = super().to_dict()
117
+ if _map is not None:
118
+ return _map
119
+ result = dict()
120
+ if self.group_id is not None:
121
+ result['groupId'] = self.group_id
122
+ if self.record_id is not None:
123
+ result['recordId'] = self.record_id
124
+ if self.start_time is not None:
125
+ result['startTime'] = self.start_time
126
+ if self.result is not None:
127
+ result['result'] = self.result
128
+ if self.actual_scale_node is not None:
129
+ result['actualScaleNode'] = self.actual_scale_node
130
+ if self.actual_scale_bandwidth is not None:
131
+ result['actualScaleBandwidth'] = self.actual_scale_bandwidth
132
+ if self.current_bandwidth is not None:
133
+ result['currentBandwidth'] = self.current_bandwidth
134
+ if self.remained_node is not None:
135
+ result['remainedNode'] = self.remained_node
136
+ if self.action is not None:
137
+ result['action'] = self.action
138
+ if self.scale_condition is not None:
139
+ result['scaleCondition'] = self.scale_condition.to_dict()
140
+ if self.rule_id is not None:
141
+ result['ruleId'] = self.rule_id
142
+ if self.message is not None:
143
+ result['message'] = self.message
144
+ if self.expect_action is not None:
145
+ result['expectAction'] = self.expect_action.to_dict()
146
+ if self.execute_type is not None:
147
+ result['executeType'] = self.execute_type
148
+ if self.dag_id is not None:
149
+ result['dagId'] = self.dag_id
150
+ if self.resource is not None:
151
+ result['resource'] = self.resource.to_dict()
152
+ return result
153
+
154
+ def from_dict(self, m):
155
+ """
156
+ Populate the model instance from a dictionary.
157
+
158
+ Nested dictionaries are recursively converted to model objects.
159
+
160
+ :param m: Dictionary containing model data
161
+ :type m: dict
162
+
163
+ :return: Self reference for method chaining
164
+ :rtype: AsRecord
165
+
166
+ :raises TypeError: If input is not a dictionary type
167
+ :raises ValueError: If nested model conversion fails
168
+ """
169
+ m = m or dict()
170
+ if m.get('groupId') is not None:
171
+ self.group_id = m.get('groupId')
172
+ if m.get('recordId') is not None:
173
+ self.record_id = m.get('recordId')
174
+ if m.get('startTime') is not None:
175
+ self.start_time = m.get('startTime')
176
+ if m.get('result') is not None:
177
+ self.result = m.get('result')
178
+ if m.get('actualScaleNode') is not None:
179
+ self.actual_scale_node = m.get('actualScaleNode')
180
+ if m.get('actualScaleBandwidth') is not None:
181
+ self.actual_scale_bandwidth = m.get('actualScaleBandwidth')
182
+ if m.get('currentBandwidth') is not None:
183
+ self.current_bandwidth = m.get('currentBandwidth')
184
+ if m.get('remainedNode') is not None:
185
+ self.remained_node = m.get('remainedNode')
186
+ if m.get('action') is not None:
187
+ self.action = m.get('action')
188
+ if m.get('scaleCondition') is not None:
189
+ self.scale_condition = ScaleCondition().from_dict(m.get('scaleCondition'))
190
+ if m.get('ruleId') is not None:
191
+ self.rule_id = m.get('ruleId')
192
+ if m.get('message') is not None:
193
+ self.message = m.get('message')
194
+ if m.get('expectAction') is not None:
195
+ self.expect_action = ExpectAction().from_dict(m.get('expectAction'))
196
+ if m.get('executeType') is not None:
197
+ self.execute_type = m.get('executeType')
198
+ if m.get('dagId') is not None:
199
+ self.dag_id = m.get('dagId')
200
+ if m.get('resource') is not None:
201
+ self.resource = Resource().from_dict(m.get('resource'))
202
+ return self
@@ -0,0 +1,76 @@
1
+ """
2
+ AssignTagInfo information
3
+ """
4
+
5
+ from baiducloud_python_sdk_core.abstract_model import AbstractModel
6
+
7
+ from baiducloud_python_sdk_as.models.tag_info import TagInfo
8
+
9
+
10
+ class AssignTagInfo(AbstractModel):
11
+ """
12
+ AssignTagInfo
13
+ """
14
+
15
+ def __init__(self, resource_id=None, relation_tag=None, tags=None):
16
+ """
17
+ Initialize AssignTagInfo instance.
18
+
19
+ :param resource_id: 资源id
20
+ :type resource_id: str (optional)
21
+
22
+ :param relation_tag: 是否绑定标签
23
+ :type relation_tag: bool (optional)
24
+
25
+ :param tags: 标签信息
26
+ :type tags: List[TagInfo] (optional)
27
+ """
28
+ super().__init__()
29
+ self.resource_id = resource_id
30
+ self.relation_tag = relation_tag
31
+ self.tags = tags
32
+
33
+ def to_dict(self):
34
+ """
35
+ Convert the model instance to a dictionary representation.
36
+
37
+ Nested model objects are recursively converted to dictionaries.
38
+
39
+ :return: Dictionary representation of the model
40
+ :rtype: dict
41
+ """
42
+ _map = super().to_dict()
43
+ if _map is not None:
44
+ return _map
45
+ result = dict()
46
+ if self.resource_id is not None:
47
+ result['resourceId'] = self.resource_id
48
+ if self.relation_tag is not None:
49
+ result['relationTag'] = self.relation_tag
50
+ if self.tags is not None:
51
+ result['tags'] = [i.to_dict() for i in self.tags]
52
+ return result
53
+
54
+ def from_dict(self, m):
55
+ """
56
+ Populate the model instance from a dictionary.
57
+
58
+ Nested dictionaries are recursively converted to model objects.
59
+
60
+ :param m: Dictionary containing model data
61
+ :type m: dict
62
+
63
+ :return: Self reference for method chaining
64
+ :rtype: AssignTagInfo
65
+
66
+ :raises TypeError: If input is not a dictionary type
67
+ :raises ValueError: If nested model conversion fails
68
+ """
69
+ m = m or dict()
70
+ if m.get('resourceId') is not None:
71
+ self.resource_id = m.get('resourceId')
72
+ if m.get('relationTag') is not None:
73
+ self.relation_tag = m.get('relationTag')
74
+ if m.get('tags') is not None:
75
+ self.tags = [TagInfo().from_dict(i) for i in m.get('tags')]
76
+ return self
@@ -0,0 +1,72 @@
1
+ """
2
+ Request entity for AttachNodeV2Request information.
3
+ """
4
+
5
+ from baiducloud_python_sdk_core.abstract_model import AbstractModel
6
+
7
+
8
+ class AttachNodeV2Request(AbstractModel):
9
+ """
10
+ Request entity for AttachNodeV2Request operation.
11
+
12
+ This class encapsulates all parameters for the API request.
13
+ """
14
+
15
+ def __init__(self, group_id, attach_node, nodes):
16
+ """
17
+ Initialize AttachNodeV2Request request entity.
18
+
19
+ :param group_id: group_id parameter
20
+ :type group_id: str (required)
21
+
22
+ :param attach_node: attach_node parameter
23
+ :type attach_node: str (required)
24
+
25
+ :param nodes: 期望添加的节点列表
26
+ :type nodes: List[str] (required)
27
+ """
28
+ super().__init__()
29
+ self.group_id = group_id
30
+ self.attach_node = attach_node
31
+ self.nodes = nodes
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.nodes is not None:
47
+ result['nodes'] = self.nodes
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: AttachNodeV2Request
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('groupId') is not None:
67
+ self.group_id = m.get('groupId')
68
+ if m.get('attachNode') is not None:
69
+ self.attach_node = m.get('attachNode')
70
+ if m.get('nodes') is not None:
71
+ self.nodes = m.get('nodes')
72
+ return self
@@ -0,0 +1,78 @@
1
+ """
2
+ Request entity for AttachNodeV2Response information.
3
+ """
4
+
5
+ from baiducloud_python_sdk_core.bce_response import BceResponse
6
+ from baiducloud_python_sdk_as.models.dag_model import DagModel
7
+
8
+
9
+ class AttachNodeV2Response(BceResponse):
10
+ """
11
+ AttachNodeV2Response
12
+ """
13
+
14
+ def __init__(self, success=None, msg=None, result=None):
15
+ """
16
+ Initialize AttachNodeV2Response response.
17
+
18
+ :param success: 请求是否成功
19
+ :type success: bool (optional)
20
+
21
+ :param msg: 响应消息
22
+ :type msg: str (optional)
23
+
24
+ :param result: result field
25
+ :type result: DagModel (optional)
26
+ """
27
+ super().__init__()
28
+ self.success = success
29
+ self.msg = msg
30
+ self.result = result
31
+
32
+ def to_dict(self):
33
+ """
34
+ Convert the response instance to a dictionary representation.
35
+
36
+ Includes metadata from the parent BceResponse class.
37
+ Nested model objects are recursively converted to dictionaries.
38
+
39
+ :return: Dictionary representation of the response
40
+ :rtype: dict
41
+ """
42
+ _map = super().to_dict()
43
+ if _map is not None:
44
+ return _map
45
+ result = dict()
46
+ if self.metadata is not None:
47
+ result['metadata'] = dict(self.metadata)
48
+ if self.success is not None:
49
+ result['success'] = self.success
50
+ if self.msg is not None:
51
+ result['msg'] = self.msg
52
+ if self.result is not None:
53
+ result['result'] = self.result.to_dict()
54
+ return result
55
+
56
+ def from_dict(self, m):
57
+ """
58
+ Populate the response instance from a dictionary.
59
+
60
+ Nested dictionaries are recursively converted to model objects.
61
+
62
+ :param m: Dictionary containing response data
63
+ :type m: dict
64
+
65
+ :return: Self reference for method chaining
66
+ :rtype: AttachNodeV2Response
67
+
68
+ :raises TypeError: If input is not a dictionary or field type mismatch
69
+ :raises ValueError: If nested model conversion fails
70
+ """
71
+ m = m or dict()
72
+ if m.get('success') is not None:
73
+ self.success = m.get('success')
74
+ if m.get('msg') is not None:
75
+ self.msg = m.get('msg')
76
+ if m.get('result') is not None:
77
+ self.result = DagModel().from_dict(m.get('result'))
78
+ return self
@@ -0,0 +1,82 @@
1
+ """
2
+ BccNameConfig information
3
+ """
4
+
5
+ from baiducloud_python_sdk_core.abstract_model import AbstractModel
6
+
7
+
8
+ class BccNameConfig(AbstractModel):
9
+ """
10
+ BccNameConfig
11
+ """
12
+
13
+ def __init__(self, bcc_name=None, bcc_hostname=None, auto_seq_suffix=None, open_hostname_domain=None):
14
+ """
15
+ Initialize BccNameConfig instance.
16
+
17
+ :param bcc_name: 虚拟机名字(可选)。默认都不指定name。如果指定name:批量时name作为名字的前缀。后端将加上后缀
18
+ :type bcc_name: str (optional)
19
+
20
+ :param bcc_hostname: bcc_hostname attribute
21
+ :type bcc_hostname: str (optional)
22
+
23
+ :param auto_seq_suffix: 是否自动生成name和hostname有序后缀(可选参数) 是:true 否:false
24
+ :type auto_seq_suffix: bool (optional)
25
+
26
+ :param open_hostname_domain: 是否自动生成hostname domain(可选参数) 是:true 否:false
27
+ :type open_hostname_domain: bool (optional)
28
+ """
29
+ super().__init__()
30
+ self.bcc_name = bcc_name
31
+ self.bcc_hostname = bcc_hostname
32
+ self.auto_seq_suffix = auto_seq_suffix
33
+ self.open_hostname_domain = open_hostname_domain
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.bcc_name is not None:
49
+ result['bccName'] = self.bcc_name
50
+ if self.bcc_hostname is not None:
51
+ result['bccHostname'] = self.bcc_hostname
52
+ if self.auto_seq_suffix is not None:
53
+ result['autoSeqSuffix'] = self.auto_seq_suffix
54
+ if self.open_hostname_domain is not None:
55
+ result['openHostnameDomain'] = self.open_hostname_domain
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: BccNameConfig
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('bccName') is not None:
75
+ self.bcc_name = m.get('bccName')
76
+ if m.get('bccHostname') is not None:
77
+ self.bcc_hostname = m.get('bccHostname')
78
+ if m.get('autoSeqSuffix') is not None:
79
+ self.auto_seq_suffix = m.get('autoSeqSuffix')
80
+ if m.get('openHostnameDomain') is not None:
81
+ self.open_hostname_domain = m.get('openHostnameDomain')
82
+ return self