baiducloud-python-sdk-cce 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 (74) hide show
  1. baiducloud_python_sdk_cce/__init__.py +5 -0
  2. baiducloud_python_sdk_cce/api/__init__.py +0 -0
  3. baiducloud_python_sdk_cce/api/cce_client.py +931 -0
  4. baiducloud_python_sdk_cce/models/__init__.py +77 -0
  5. baiducloud_python_sdk_cce/models/autoscaler.py +76 -0
  6. baiducloud_python_sdk_cce/models/ca_config.py +151 -0
  7. baiducloud_python_sdk_cce/models/cluster_autoscaler_spec.py +82 -0
  8. baiducloud_python_sdk_cce/models/create_a_shrinking_node_group_task_v2_request.py +105 -0
  9. baiducloud_python_sdk_cce/models/create_a_shrinking_node_group_task_v2_response.py +70 -0
  10. baiducloud_python_sdk_cce/models/create_an_autoscaler_v2_request.py +58 -0
  11. baiducloud_python_sdk_cce/models/create_an_autoscaler_v2_response.py +62 -0
  12. baiducloud_python_sdk_cce/models/create_expansion_node_group_task_v2_request.py +76 -0
  13. baiducloud_python_sdk_cce/models/create_expansion_node_group_task_v2_response.py +69 -0
  14. baiducloud_python_sdk_cce/models/create_node_group_v2_request.py +135 -0
  15. baiducloud_python_sdk_cce/models/create_node_group_v2_response.py +69 -0
  16. baiducloud_python_sdk_cce/models/create_nodes_cluster_expansion_v2_request.py +67 -0
  17. baiducloud_python_sdk_cce/models/create_nodes_cluster_expansion_v2_response.py +69 -0
  18. baiducloud_python_sdk_cce/models/delete_node_group_v2_request.py +76 -0
  19. baiducloud_python_sdk_cce/models/delete_node_group_v2_response.py +62 -0
  20. baiducloud_python_sdk_cce/models/delete_nodes_cluster_scaling_v2_request.py +83 -0
  21. baiducloud_python_sdk_cce/models/delete_nodes_cluster_scaling_v2_response.py +61 -0
  22. baiducloud_python_sdk_cce/models/delete_option.py +74 -0
  23. baiducloud_python_sdk_cce/models/existed_instance_in_cluster.py +58 -0
  24. baiducloud_python_sdk_cce/models/get_node_details_v2_request.py +64 -0
  25. baiducloud_python_sdk_cce/models/get_node_details_v2_response.py +70 -0
  26. baiducloud_python_sdk_cce/models/get_node_group_details_v2_request.py +64 -0
  27. baiducloud_python_sdk_cce/models/get_node_group_details_v2_response.py +70 -0
  28. baiducloud_python_sdk_cce/models/get_package_list_v2_request.py +66 -0
  29. baiducloud_python_sdk_cce/models/get_package_list_v2_response.py +62 -0
  30. baiducloud_python_sdk_cce/models/get_task_list_v2_request.py +110 -0
  31. baiducloud_python_sdk_cce/models/get_task_list_v2_response.py +70 -0
  32. baiducloud_python_sdk_cce/models/get_the_list_of_cluster_node_groups_v2_request.py +103 -0
  33. baiducloud_python_sdk_cce/models/get_the_list_of_cluster_node_groups_v2_response.py +70 -0
  34. baiducloud_python_sdk_cce/models/get_the_list_of_cluster_nodes_v2_request.py +96 -0
  35. baiducloud_python_sdk_cce/models/get_the_list_of_cluster_nodes_v2_response.py +70 -0
  36. baiducloud_python_sdk_cce/models/instance.py +82 -0
  37. baiducloud_python_sdk_cce/models/instance_group.py +74 -0
  38. baiducloud_python_sdk_cce/models/instance_page.py +133 -0
  39. baiducloud_python_sdk_cce/models/instance_set.py +66 -0
  40. baiducloud_python_sdk_cce/models/instance_template.py +268 -0
  41. baiducloud_python_sdk_cce/models/list_instance_group_page.py +82 -0
  42. baiducloud_python_sdk_cce/models/list_instances_by_instance_group_id_page.py +82 -0
  43. baiducloud_python_sdk_cce/models/list_task_page.py +82 -0
  44. baiducloud_python_sdk_cce/models/machine_spec_status.py +66 -0
  45. baiducloud_python_sdk_cce/models/modify_ig_auto_scaler_request.py +98 -0
  46. baiducloud_python_sdk_cce/models/modify_ig_auto_scaler_response.py +61 -0
  47. baiducloud_python_sdk_cce/models/modify_node_group_node_shrink_protection_status_v2_request.py +74 -0
  48. baiducloud_python_sdk_cce/models/modify_node_group_node_shrink_protection_status_v2_response.py +69 -0
  49. baiducloud_python_sdk_cce/models/modify_the_number_of_node_replicas_in_a_node_group_v2_request.py +99 -0
  50. baiducloud_python_sdk_cce/models/modify_the_number_of_node_replicas_in_a_node_group_v2_response.py +62 -0
  51. baiducloud_python_sdk_cce/models/move_into_an_existing_node_v2_request.py +126 -0
  52. baiducloud_python_sdk_cce/models/move_into_an_existing_node_v2_response.py +69 -0
  53. baiducloud_python_sdk_cce/models/query_the_configuration_of_autoscaler_v2_request.py +58 -0
  54. baiducloud_python_sdk_cce/models/query_the_configuration_of_autoscaler_v2_response.py +70 -0
  55. baiducloud_python_sdk_cce/models/retrieve_the_node_group_node_list_v2_request.py +76 -0
  56. baiducloud_python_sdk_cce/models/retrieve_the_node_group_node_list_v2_response.py +72 -0
  57. baiducloud_python_sdk_cce/models/step.py +124 -0
  58. baiducloud_python_sdk_cce/models/steps_to_obtain_node_events_v2_request.py +58 -0
  59. baiducloud_python_sdk_cce/models/steps_to_obtain_node_events_v2_response.py +78 -0
  60. baiducloud_python_sdk_cce/models/synchronize_node_metadata_v2_request.py +58 -0
  61. baiducloud_python_sdk_cce/models/synchronize_node_metadata_v2_response.py +69 -0
  62. baiducloud_python_sdk_cce/models/taint.py +74 -0
  63. baiducloud_python_sdk_cce/models/task.py +108 -0
  64. baiducloud_python_sdk_cce/models/update_autoscaler_configuration_v2_request.py +169 -0
  65. baiducloud_python_sdk_cce/models/update_autoscaler_configuration_v2_response.py +61 -0
  66. baiducloud_python_sdk_cce/models/update_node_attributes_v2_request.py +97 -0
  67. baiducloud_python_sdk_cce/models/update_node_attributes_v2_response.py +72 -0
  68. baiducloud_python_sdk_cce/models/view_task_details_v2_request.py +64 -0
  69. baiducloud_python_sdk_cce/models/view_task_details_v2_response.py +70 -0
  70. baiducloud_python_sdk_cce-0.0.1.dist-info/LICENSE +177 -0
  71. baiducloud_python_sdk_cce-0.0.1.dist-info/METADATA +76 -0
  72. baiducloud_python_sdk_cce-0.0.1.dist-info/RECORD +74 -0
  73. baiducloud_python_sdk_cce-0.0.1.dist-info/WHEEL +5 -0
  74. baiducloud_python_sdk_cce-0.0.1.dist-info/top_level.txt +1 -0
@@ -0,0 +1,133 @@
1
+ """
2
+ InstancePage information
3
+ """
4
+
5
+ from baiducloud_python_sdk_core.abstract_model import AbstractModel
6
+
7
+
8
+ class InstancePage(AbstractModel):
9
+ """
10
+ InstancePage
11
+ """
12
+
13
+ def __init__(
14
+ self,
15
+ cluster_id=None,
16
+ keyword_type=None,
17
+ keyword=None,
18
+ order_by=None,
19
+ order=None,
20
+ page_no=None,
21
+ page_size=None,
22
+ total_count=None,
23
+ instance_list=None,
24
+ ):
25
+ """
26
+ Initialize InstancePage instance.
27
+
28
+ :param cluster_id:
29
+ :type cluster_id: str (optional)
30
+
31
+ :param keyword_type:
32
+ :type keyword_type: str (optional)
33
+
34
+ :param keyword:
35
+ :type keyword: str (optional)
36
+
37
+ :param order_by:
38
+ :type order_by: str (optional)
39
+
40
+ :param order:
41
+ :type order: str (optional)
42
+
43
+ :param page_no:
44
+ :type page_no: int (optional)
45
+
46
+ :param page_size:
47
+ :type page_size: int (optional)
48
+
49
+ :param total_count:
50
+ :type total_count: int (optional)
51
+
52
+ :param instance_list:
53
+ :type instance_list: List[object] (optional)
54
+ """
55
+ super().__init__()
56
+ self.cluster_id = cluster_id
57
+ self.keyword_type = keyword_type
58
+ self.keyword = keyword
59
+ self.order_by = order_by
60
+ self.order = order
61
+ self.page_no = page_no
62
+ self.page_size = page_size
63
+ self.total_count = total_count
64
+ self.instance_list = instance_list
65
+
66
+ def to_dict(self):
67
+ """
68
+ Convert the model instance to a dictionary representation.
69
+
70
+ Nested model objects are recursively converted to dictionaries.
71
+
72
+ :return: Dictionary representation of the model
73
+ :rtype: dict
74
+ """
75
+ _map = super().to_dict()
76
+ if _map is not None:
77
+ return _map
78
+ result = dict()
79
+ if self.cluster_id is not None:
80
+ result['clusterID'] = self.cluster_id
81
+ if self.keyword_type is not None:
82
+ result['keywordType'] = self.keyword_type
83
+ if self.keyword is not None:
84
+ result['keyword'] = self.keyword
85
+ if self.order_by is not None:
86
+ result['orderBy'] = self.order_by
87
+ if self.order is not None:
88
+ result['order'] = self.order
89
+ if self.page_no is not None:
90
+ result['pageNo'] = self.page_no
91
+ if self.page_size is not None:
92
+ result['pageSize'] = self.page_size
93
+ if self.total_count is not None:
94
+ result['totalCount'] = self.total_count
95
+ if self.instance_list is not None:
96
+ result['instanceList'] = self.instance_list
97
+ return result
98
+
99
+ def from_dict(self, m):
100
+ """
101
+ Populate the model instance from a dictionary.
102
+
103
+ Nested dictionaries are recursively converted to model objects.
104
+
105
+ :param m: Dictionary containing model data
106
+ :type m: dict
107
+
108
+ :return: Self reference for method chaining
109
+ :rtype: InstancePage
110
+
111
+ :raises TypeError: If input is not a dictionary type
112
+ :raises ValueError: If nested model conversion fails
113
+ """
114
+ m = m or dict()
115
+ if m.get('clusterID') is not None:
116
+ self.cluster_id = m.get('clusterID')
117
+ if m.get('keywordType') is not None:
118
+ self.keyword_type = m.get('keywordType')
119
+ if m.get('keyword') is not None:
120
+ self.keyword = m.get('keyword')
121
+ if m.get('orderBy') is not None:
122
+ self.order_by = m.get('orderBy')
123
+ if m.get('order') is not None:
124
+ self.order = m.get('order')
125
+ if m.get('pageNo') is not None:
126
+ self.page_no = m.get('pageNo')
127
+ if m.get('pageSize') is not None:
128
+ self.page_size = m.get('pageSize')
129
+ if m.get('totalCount') is not None:
130
+ self.total_count = m.get('totalCount')
131
+ if m.get('instanceList') is not None:
132
+ self.instance_list = m.get('instanceList')
133
+ return self
@@ -0,0 +1,66 @@
1
+ """
2
+ InstanceSet information
3
+ """
4
+
5
+ from baiducloud_python_sdk_core.abstract_model import AbstractModel
6
+
7
+
8
+ class InstanceSet(AbstractModel):
9
+ """
10
+ InstanceSet
11
+ """
12
+
13
+ def __init__(self, instance_spec=None, count=None):
14
+ """
15
+ Initialize InstanceSet instance.
16
+
17
+ :param instance_spec: 节点规格配置
18
+ :type instance_spec: object (optional)
19
+
20
+ :param count: 节点数量
21
+ :type count: int (optional)
22
+ """
23
+ super().__init__()
24
+ self.instance_spec = instance_spec
25
+ self.count = count
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.instance_spec is not None:
41
+ result['instanceSpec'] = self.instance_spec
42
+ if self.count is not None:
43
+ result['count'] = self.count
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: InstanceSet
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('instanceSpec') is not None:
63
+ self.instance_spec = m.get('instanceSpec')
64
+ if m.get('count') is not None:
65
+ self.count = m.get('count')
66
+ return self
@@ -0,0 +1,268 @@
1
+ """
2
+ InstanceTemplate information
3
+ """
4
+
5
+ from baiducloud_python_sdk_core.abstract_model import AbstractModel
6
+
7
+
8
+ class InstanceTemplate(AbstractModel):
9
+ """
10
+ InstanceTemplate
11
+ """
12
+
13
+ def __init__(
14
+ self,
15
+ machine_type=None,
16
+ instance_type=None,
17
+ instance_name=None,
18
+ vpc_config=None,
19
+ instance_resource=None,
20
+ check_gpu_driver=None,
21
+ image_id=None,
22
+ user_data=None,
23
+ instance_os=None,
24
+ scale_down_disabled=None,
25
+ is_open_hostname_domain=None,
26
+ need_eip=None,
27
+ eip_option=None,
28
+ iam_role=None,
29
+ deploy_custom_config=None,
30
+ runtime_type=None,
31
+ runtime_version=None,
32
+ deploy_set_ids=None,
33
+ labels=None,
34
+ annotations=None,
35
+ tags=None,
36
+ taints=None,
37
+ relation_tag=None,
38
+ instance_pre_charging_option=None,
39
+ ):
40
+ """
41
+ Initialize InstanceTemplate instance.
42
+
43
+ :param machine_type:
44
+ :type machine_type: str (optional)
45
+
46
+ :param instance_type:
47
+ :type instance_type: str (optional)
48
+
49
+ :param instance_name:
50
+ :type instance_name: str (optional)
51
+
52
+ :param vpc_config:
53
+ :type vpc_config: object (optional)
54
+
55
+ :param instance_resource:
56
+ :type instance_resource: object (optional)
57
+
58
+ :param check_gpu_driver:
59
+ :type check_gpu_driver: bool (optional)
60
+
61
+ :param image_id:
62
+ :type image_id: str (optional)
63
+
64
+ :param user_data:
65
+ :type user_data: object (optional)
66
+
67
+ :param instance_os:
68
+ :type instance_os: object (optional)
69
+
70
+ :param scale_down_disabled:
71
+ :type scale_down_disabled: bool (optional)
72
+
73
+ :param is_open_hostname_domain:
74
+ :type is_open_hostname_domain: bool (optional)
75
+
76
+ :param need_eip:
77
+ :type need_eip: bool (optional)
78
+
79
+ :param eip_option:
80
+ :type eip_option: object (optional)
81
+
82
+ :param iam_role:
83
+ :type iam_role: object (optional)
84
+
85
+ :param deploy_custom_config:
86
+ :type deploy_custom_config: object (optional)
87
+
88
+ :param runtime_type:
89
+ :type runtime_type: str (optional)
90
+
91
+ :param runtime_version:
92
+ :type runtime_version: str (optional)
93
+
94
+ :param deploy_set_ids:
95
+ :type deploy_set_ids: List[str] (optional)
96
+
97
+ :param labels:
98
+ :type labels: Dict[str, str] (optional)
99
+
100
+ :param annotations:
101
+ :type annotations: Dict[str, str] (optional)
102
+
103
+ :param tags:
104
+ :type tags: List[str] (optional)
105
+
106
+ :param taints:
107
+ :type taints: List[str] (optional)
108
+
109
+ :param relation_tag:
110
+ :type relation_tag: bool (optional)
111
+
112
+ :param instance_pre_charging_option:
113
+ :type instance_pre_charging_option: object (optional)
114
+ """
115
+ super().__init__()
116
+ self.machine_type = machine_type
117
+ self.instance_type = instance_type
118
+ self.instance_name = instance_name
119
+ self.vpc_config = vpc_config
120
+ self.instance_resource = instance_resource
121
+ self.check_gpu_driver = check_gpu_driver
122
+ self.image_id = image_id
123
+ self.user_data = user_data
124
+ self.instance_os = instance_os
125
+ self.scale_down_disabled = scale_down_disabled
126
+ self.is_open_hostname_domain = is_open_hostname_domain
127
+ self.need_eip = need_eip
128
+ self.eip_option = eip_option
129
+ self.iam_role = iam_role
130
+ self.deploy_custom_config = deploy_custom_config
131
+ self.runtime_type = runtime_type
132
+ self.runtime_version = runtime_version
133
+ self.deploy_set_ids = deploy_set_ids
134
+ self.labels = labels
135
+ self.annotations = annotations
136
+ self.tags = tags
137
+ self.taints = taints
138
+ self.relation_tag = relation_tag
139
+ self.instance_pre_charging_option = instance_pre_charging_option
140
+
141
+ def to_dict(self):
142
+ """
143
+ Convert the model instance to a dictionary representation.
144
+
145
+ Nested model objects are recursively converted to dictionaries.
146
+
147
+ :return: Dictionary representation of the model
148
+ :rtype: dict
149
+ """
150
+ _map = super().to_dict()
151
+ if _map is not None:
152
+ return _map
153
+ result = dict()
154
+ if self.machine_type is not None:
155
+ result['machineType'] = self.machine_type
156
+ if self.instance_type is not None:
157
+ result['instanceType'] = self.instance_type
158
+ if self.instance_name is not None:
159
+ result['instanceName'] = self.instance_name
160
+ if self.vpc_config is not None:
161
+ result['vpcConfig'] = self.vpc_config
162
+ if self.instance_resource is not None:
163
+ result['instanceResource'] = self.instance_resource
164
+ if self.check_gpu_driver is not None:
165
+ result['checkGPUDriver'] = self.check_gpu_driver
166
+ if self.image_id is not None:
167
+ result['imageID'] = self.image_id
168
+ if self.user_data is not None:
169
+ result['userData'] = self.user_data
170
+ if self.instance_os is not None:
171
+ result['instanceOS'] = self.instance_os
172
+ if self.scale_down_disabled is not None:
173
+ result['scaleDownDisabled'] = self.scale_down_disabled
174
+ if self.is_open_hostname_domain is not None:
175
+ result['isOpenHostnameDomain'] = self.is_open_hostname_domain
176
+ if self.need_eip is not None:
177
+ result['needEIP'] = self.need_eip
178
+ if self.eip_option is not None:
179
+ result['eipOption'] = self.eip_option
180
+ if self.iam_role is not None:
181
+ result['iamRole'] = self.iam_role
182
+ if self.deploy_custom_config is not None:
183
+ result['deployCustomConfig'] = self.deploy_custom_config
184
+ if self.runtime_type is not None:
185
+ result['runtimeType'] = self.runtime_type
186
+ if self.runtime_version is not None:
187
+ result['runtimeVersion'] = self.runtime_version
188
+ if self.deploy_set_ids is not None:
189
+ result['deploySetIDs'] = self.deploy_set_ids
190
+ if self.labels is not None:
191
+ result['labels'] = self.labels
192
+ if self.annotations is not None:
193
+ result['annotations'] = self.annotations
194
+ if self.tags is not None:
195
+ result['tags'] = self.tags
196
+ if self.taints is not None:
197
+ result['taints'] = self.taints
198
+ if self.relation_tag is not None:
199
+ result['relationTag'] = self.relation_tag
200
+ if self.instance_pre_charging_option is not None:
201
+ result['instancePreChargingOption'] = self.instance_pre_charging_option
202
+ return result
203
+
204
+ def from_dict(self, m):
205
+ """
206
+ Populate the model instance from a dictionary.
207
+
208
+ Nested dictionaries are recursively converted to model objects.
209
+
210
+ :param m: Dictionary containing model data
211
+ :type m: dict
212
+
213
+ :return: Self reference for method chaining
214
+ :rtype: InstanceTemplate
215
+
216
+ :raises TypeError: If input is not a dictionary type
217
+ :raises ValueError: If nested model conversion fails
218
+ """
219
+ m = m or dict()
220
+ if m.get('machineType') is not None:
221
+ self.machine_type = m.get('machineType')
222
+ if m.get('instanceType') is not None:
223
+ self.instance_type = m.get('instanceType')
224
+ if m.get('instanceName') is not None:
225
+ self.instance_name = m.get('instanceName')
226
+ if m.get('vpcConfig') is not None:
227
+ self.vpc_config = m.get('vpcConfig')
228
+ if m.get('instanceResource') is not None:
229
+ self.instance_resource = m.get('instanceResource')
230
+ if m.get('checkGPUDriver') is not None:
231
+ self.check_gpu_driver = m.get('checkGPUDriver')
232
+ if m.get('imageID') is not None:
233
+ self.image_id = m.get('imageID')
234
+ if m.get('userData') is not None:
235
+ self.user_data = m.get('userData')
236
+ if m.get('instanceOS') is not None:
237
+ self.instance_os = m.get('instanceOS')
238
+ if m.get('scaleDownDisabled') is not None:
239
+ self.scale_down_disabled = m.get('scaleDownDisabled')
240
+ if m.get('isOpenHostnameDomain') is not None:
241
+ self.is_open_hostname_domain = m.get('isOpenHostnameDomain')
242
+ if m.get('needEIP') is not None:
243
+ self.need_eip = m.get('needEIP')
244
+ if m.get('eipOption') is not None:
245
+ self.eip_option = m.get('eipOption')
246
+ if m.get('iamRole') is not None:
247
+ self.iam_role = m.get('iamRole')
248
+ if m.get('deployCustomConfig') is not None:
249
+ self.deploy_custom_config = m.get('deployCustomConfig')
250
+ if m.get('runtimeType') is not None:
251
+ self.runtime_type = m.get('runtimeType')
252
+ if m.get('runtimeVersion') is not None:
253
+ self.runtime_version = m.get('runtimeVersion')
254
+ if m.get('deploySetIDs') is not None:
255
+ self.deploy_set_ids = m.get('deploySetIDs')
256
+ if m.get('labels') is not None:
257
+ self.labels = m.get('labels')
258
+ if m.get('annotations') is not None:
259
+ self.annotations = m.get('annotations')
260
+ if m.get('tags') is not None:
261
+ self.tags = m.get('tags')
262
+ if m.get('taints') is not None:
263
+ self.taints = m.get('taints')
264
+ if m.get('relationTag') is not None:
265
+ self.relation_tag = m.get('relationTag')
266
+ if m.get('instancePreChargingOption') is not None:
267
+ self.instance_pre_charging_option = m.get('instancePreChargingOption')
268
+ return self
@@ -0,0 +1,82 @@
1
+ """
2
+ ListInstanceGroupPage information
3
+ """
4
+
5
+ from baiducloud_python_sdk_core.abstract_model import AbstractModel
6
+
7
+
8
+ class ListInstanceGroupPage(AbstractModel):
9
+ """
10
+ ListInstanceGroupPage
11
+ """
12
+
13
+ def __init__(self, page_no=None, page_size=None, total_count=None, list=None):
14
+ """
15
+ Initialize ListInstanceGroupPage instance.
16
+
17
+ :param page_no: 查询页码序号
18
+ :type page_no: int (optional)
19
+
20
+ :param page_size: 查询结果每页条目数
21
+ :type page_size: int (optional)
22
+
23
+ :param total_count: 总条目数
24
+ :type total_count: int (optional)
25
+
26
+ :param list: 节点组列表
27
+ :type list: List[object] (optional)
28
+ """
29
+ super().__init__()
30
+ self.page_no = page_no
31
+ self.page_size = page_size
32
+ self.total_count = total_count
33
+ self.list = list
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.page_no is not None:
49
+ result['pageNo'] = self.page_no
50
+ if self.page_size is not None:
51
+ result['pageSize'] = self.page_size
52
+ if self.total_count is not None:
53
+ result['totalCount'] = self.total_count
54
+ if self.list is not None:
55
+ result['list'] = self.list
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: ListInstanceGroupPage
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('pageNo') is not None:
75
+ self.page_no = m.get('pageNo')
76
+ if m.get('pageSize') is not None:
77
+ self.page_size = m.get('pageSize')
78
+ if m.get('totalCount') is not None:
79
+ self.total_count = m.get('totalCount')
80
+ if m.get('list') is not None:
81
+ self.list = m.get('list')
82
+ return self
@@ -0,0 +1,82 @@
1
+ """
2
+ ListInstancesByInstanceGroupIDPage information
3
+ """
4
+
5
+ from baiducloud_python_sdk_core.abstract_model import AbstractModel
6
+
7
+
8
+ class ListInstancesByInstanceGroupIDPage(AbstractModel):
9
+ """
10
+ ListInstancesByInstanceGroupIDPage
11
+ """
12
+
13
+ def __init__(self, page_no=None, page_size=None, total_count=None, list=None):
14
+ """
15
+ Initialize ListInstancesByInstanceGroupIDPage instance.
16
+
17
+ :param page_no:
18
+ :type page_no: int (optional)
19
+
20
+ :param page_size:
21
+ :type page_size: int (optional)
22
+
23
+ :param total_count:
24
+ :type total_count: int (optional)
25
+
26
+ :param list:
27
+ :type list: List[object] (optional)
28
+ """
29
+ super().__init__()
30
+ self.page_no = page_no
31
+ self.page_size = page_size
32
+ self.total_count = total_count
33
+ self.list = list
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.page_no is not None:
49
+ result['pageNo'] = self.page_no
50
+ if self.page_size is not None:
51
+ result['pageSize'] = self.page_size
52
+ if self.total_count is not None:
53
+ result['totalCount'] = self.total_count
54
+ if self.list is not None:
55
+ result['list'] = self.list
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: ListInstancesByInstanceGroupIDPage
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('pageNo') is not None:
75
+ self.page_no = m.get('pageNo')
76
+ if m.get('pageSize') is not None:
77
+ self.page_size = m.get('pageSize')
78
+ if m.get('totalCount') is not None:
79
+ self.total_count = m.get('totalCount')
80
+ if m.get('list') is not None:
81
+ self.list = m.get('list')
82
+ return self