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,83 @@
1
+ """
2
+ Request entity for DeleteNodesClusterScalingV2Request information.
3
+ """
4
+
5
+ from baiducloud_python_sdk_core.abstract_model import AbstractModel
6
+ from baiducloud_python_sdk_cce.models.delete_option import DeleteOption
7
+
8
+
9
+ class DeleteNodesClusterScalingV2Request(AbstractModel):
10
+ """
11
+ Request entity for DeleteNodesClusterScalingV2Request operation.
12
+
13
+ This class encapsulates all parameters for the API request.
14
+ """
15
+
16
+ def __init__(self, cluster_id, instance_ids, delete_option=None, scale_down=None):
17
+ """
18
+ Initialize DeleteNodesClusterScalingV2Request request entity.
19
+
20
+ :param cluster_id: cluster_id parameter
21
+ :type cluster_id: str (required)
22
+
23
+ :param delete_option: delete_option parameter
24
+ :type delete_option: DeleteOption (optional)
25
+
26
+ :param instance_ids: 要删除的节点 ID 列表
27
+ :type instance_ids: List[str] (required)
28
+
29
+ :param scale_down: 是否同时减少被删除节点所在节点组的期望节点数
30
+ :type scale_down: bool (optional)
31
+ """
32
+ super().__init__()
33
+ self.cluster_id = cluster_id
34
+ self.delete_option = delete_option
35
+ self.instance_ids = instance_ids
36
+ self.scale_down = scale_down
37
+
38
+ def to_dict(self):
39
+ """
40
+ Convert the request entity to a dictionary representation.
41
+
42
+ Nested model objects are recursively converted to dictionaries.
43
+
44
+ :return: Dictionary representation of the request
45
+ :rtype: dict
46
+ """
47
+ _map = super().to_dict()
48
+ if _map is not None:
49
+ return _map
50
+ result = dict()
51
+ if self.delete_option is not None:
52
+ result['deleteOption'] = self.delete_option.to_dict()
53
+ if self.instance_ids is not None:
54
+ result['instanceIDs'] = self.instance_ids
55
+ if self.scale_down is not None:
56
+ result['scaleDown'] = self.scale_down
57
+ return result
58
+
59
+ def from_dict(self, m):
60
+ """
61
+ Populate the request entity from a dictionary.
62
+
63
+ Nested dictionaries are recursively converted to model objects.
64
+
65
+ :param m: Dictionary containing request data
66
+ :type m: dict
67
+
68
+ :return: Self reference for method chaining
69
+ :rtype: DeleteNodesClusterScalingV2Request
70
+
71
+ :raises TypeError: If input is not a dictionary or field type mismatch
72
+ :raises ValueError: If nested model conversion fails
73
+ """
74
+ m = m or dict()
75
+ if m.get('clusterID') is not None:
76
+ self.cluster_id = m.get('clusterID')
77
+ if m.get('deleteOption') is not None:
78
+ self.delete_option = DeleteOption().from_dict(m.get('deleteOption'))
79
+ if m.get('instanceIDs') is not None:
80
+ self.instance_ids = m.get('instanceIDs')
81
+ if m.get('scaleDown') is not None:
82
+ self.scale_down = m.get('scaleDown')
83
+ return self
@@ -0,0 +1,61 @@
1
+ """
2
+ Request entity for DeleteNodesClusterScalingV2Response information.
3
+ """
4
+
5
+ from baiducloud_python_sdk_core.bce_response import BceResponse
6
+
7
+
8
+ class DeleteNodesClusterScalingV2Response(BceResponse):
9
+ """
10
+ DeleteNodesClusterScalingV2Response
11
+ """
12
+
13
+ def __init__(self, request_id=None):
14
+ """
15
+ Initialize DeleteNodesClusterScalingV2Response response.
16
+
17
+ :param request_id: 响应的请求的ID
18
+ :type request_id: str (optional)
19
+ """
20
+ super().__init__()
21
+ self.request_id = request_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.request_id is not None:
40
+ result['requestID'] = self.request_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: DeleteNodesClusterScalingV2Response
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('requestID') is not None:
60
+ self.request_id = m.get('requestID')
61
+ return self
@@ -0,0 +1,74 @@
1
+ """
2
+ DeleteOption information
3
+ """
4
+
5
+ from baiducloud_python_sdk_core.abstract_model import AbstractModel
6
+
7
+
8
+ class DeleteOption(AbstractModel):
9
+ """
10
+ DeleteOption
11
+ """
12
+
13
+ def __init__(self, delete_resource=None, delete_cds_snapshot=None, move_out=None):
14
+ """
15
+ Initialize DeleteOption instance.
16
+
17
+ :param delete_resource:
18
+ :type delete_resource: bool (optional)
19
+
20
+ :param delete_cds_snapshot:
21
+ :type delete_cds_snapshot: bool (optional)
22
+
23
+ :param move_out:
24
+ :type move_out: bool (optional)
25
+ """
26
+ super().__init__()
27
+ self.delete_resource = delete_resource
28
+ self.delete_cds_snapshot = delete_cds_snapshot
29
+ self.move_out = move_out
30
+
31
+ def to_dict(self):
32
+ """
33
+ Convert the model instance to a dictionary representation.
34
+
35
+ Nested model objects are recursively converted to dictionaries.
36
+
37
+ :return: Dictionary representation of the model
38
+ :rtype: dict
39
+ """
40
+ _map = super().to_dict()
41
+ if _map is not None:
42
+ return _map
43
+ result = dict()
44
+ if self.delete_resource is not None:
45
+ result['deleteResource'] = self.delete_resource
46
+ if self.delete_cds_snapshot is not None:
47
+ result['deleteCDSSnapshot'] = self.delete_cds_snapshot
48
+ if self.move_out is not None:
49
+ result['moveOut'] = self.move_out
50
+ return result
51
+
52
+ def from_dict(self, m):
53
+ """
54
+ Populate the model instance from a dictionary.
55
+
56
+ Nested dictionaries are recursively converted to model objects.
57
+
58
+ :param m: Dictionary containing model data
59
+ :type m: dict
60
+
61
+ :return: Self reference for method chaining
62
+ :rtype: DeleteOption
63
+
64
+ :raises TypeError: If input is not a dictionary type
65
+ :raises ValueError: If nested model conversion fails
66
+ """
67
+ m = m or dict()
68
+ if m.get('deleteResource') is not None:
69
+ self.delete_resource = m.get('deleteResource')
70
+ if m.get('deleteCDSSnapshot') is not None:
71
+ self.delete_cds_snapshot = m.get('deleteCDSSnapshot')
72
+ if m.get('moveOut') is not None:
73
+ self.move_out = m.get('moveOut')
74
+ return self
@@ -0,0 +1,58 @@
1
+ """
2
+ ExistedInstanceInCluster information
3
+ """
4
+
5
+ from baiducloud_python_sdk_core.abstract_model import AbstractModel
6
+
7
+
8
+ class ExistedInstanceInCluster(AbstractModel):
9
+ """
10
+ ExistedInstanceInCluster
11
+ """
12
+
13
+ def __init__(self, existed_instance_id=None):
14
+ """
15
+ Initialize ExistedInstanceInCluster instance.
16
+
17
+ :param existed_instance_id:
18
+ :type existed_instance_id: str (optional)
19
+ """
20
+ super().__init__()
21
+ self.existed_instance_id = existed_instance_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.existed_instance_id is not None:
37
+ result['existedInstanceID'] = self.existed_instance_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: ExistedInstanceInCluster
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('existedInstanceID') is not None:
57
+ self.existed_instance_id = m.get('existedInstanceID')
58
+ return self
@@ -0,0 +1,64 @@
1
+ """
2
+ Request entity for GetNodeDetailsV2Request information.
3
+ """
4
+
5
+ from baiducloud_python_sdk_core.abstract_model import AbstractModel
6
+
7
+
8
+ class GetNodeDetailsV2Request(AbstractModel):
9
+ """
10
+ Request entity for GetNodeDetailsV2Request operation.
11
+
12
+ This class encapsulates all parameters for the API request.
13
+ """
14
+
15
+ def __init__(self, cluster_id, instance_id):
16
+ """
17
+ Initialize GetNodeDetailsV2Request request entity.
18
+
19
+ :param cluster_id: cluster_id parameter
20
+ :type cluster_id: str (required)
21
+
22
+ :param instance_id: instance_id parameter
23
+ :type instance_id: str (required)
24
+ """
25
+ super().__init__()
26
+ self.cluster_id = cluster_id
27
+ self.instance_id = instance_id
28
+
29
+ def to_dict(self):
30
+ """
31
+ Convert the request entity to a dictionary representation.
32
+
33
+ Nested model objects are recursively converted to dictionaries.
34
+
35
+ :return: Dictionary representation of the request
36
+ :rtype: dict
37
+ """
38
+ _map = super().to_dict()
39
+ if _map is not None:
40
+ return _map
41
+ result = dict()
42
+ return result
43
+
44
+ def from_dict(self, m):
45
+ """
46
+ Populate the request entity from a dictionary.
47
+
48
+ Nested dictionaries are recursively converted to model objects.
49
+
50
+ :param m: Dictionary containing request data
51
+ :type m: dict
52
+
53
+ :return: Self reference for method chaining
54
+ :rtype: GetNodeDetailsV2Request
55
+
56
+ :raises TypeError: If input is not a dictionary or field type mismatch
57
+ :raises ValueError: If nested model conversion fails
58
+ """
59
+ m = m or dict()
60
+ if m.get('clusterID') is not None:
61
+ self.cluster_id = m.get('clusterID')
62
+ if m.get('instanceID') is not None:
63
+ self.instance_id = m.get('instanceID')
64
+ return self
@@ -0,0 +1,70 @@
1
+ """
2
+ Request entity for GetNodeDetailsV2Response information.
3
+ """
4
+
5
+ from baiducloud_python_sdk_core.bce_response import BceResponse
6
+ from baiducloud_python_sdk_cce.models.instance import Instance
7
+
8
+
9
+ class GetNodeDetailsV2Response(BceResponse):
10
+ """
11
+ GetNodeDetailsV2Response
12
+ """
13
+
14
+ def __init__(self, instance=None, request_id=None):
15
+ """
16
+ Initialize GetNodeDetailsV2Response response.
17
+
18
+ :param instance: instance field
19
+ :type instance: Instance (optional)
20
+
21
+ :param request_id: 请求 ID, 问题定位提供该 ID
22
+ :type request_id: str (optional)
23
+ """
24
+ super().__init__()
25
+ self.instance = instance
26
+ self.request_id = request_id
27
+
28
+ def to_dict(self):
29
+ """
30
+ Convert the response instance to a dictionary representation.
31
+
32
+ Includes metadata from the parent BceResponse class.
33
+ Nested model objects are recursively converted to dictionaries.
34
+
35
+ :return: Dictionary representation of the response
36
+ :rtype: dict
37
+ """
38
+ _map = super().to_dict()
39
+ if _map is not None:
40
+ return _map
41
+ result = dict()
42
+ if self.metadata is not None:
43
+ result['metadata'] = dict(self.metadata)
44
+ if self.instance is not None:
45
+ result['instance'] = self.instance.to_dict()
46
+ if self.request_id is not None:
47
+ result['requestID'] = self.request_id
48
+ return result
49
+
50
+ def from_dict(self, m):
51
+ """
52
+ Populate the response instance from a dictionary.
53
+
54
+ Nested dictionaries are recursively converted to model objects.
55
+
56
+ :param m: Dictionary containing response data
57
+ :type m: dict
58
+
59
+ :return: Self reference for method chaining
60
+ :rtype: GetNodeDetailsV2Response
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('instance') is not None:
67
+ self.instance = Instance().from_dict(m.get('instance'))
68
+ if m.get('requestID') is not None:
69
+ self.request_id = m.get('requestID')
70
+ return self
@@ -0,0 +1,64 @@
1
+ """
2
+ Request entity for GetNodeGroupDetailsV2Request information.
3
+ """
4
+
5
+ from baiducloud_python_sdk_core.abstract_model import AbstractModel
6
+
7
+
8
+ class GetNodeGroupDetailsV2Request(AbstractModel):
9
+ """
10
+ Request entity for GetNodeGroupDetailsV2Request operation.
11
+
12
+ This class encapsulates all parameters for the API request.
13
+ """
14
+
15
+ def __init__(self, cluster_id, instance_group_id):
16
+ """
17
+ Initialize GetNodeGroupDetailsV2Request request entity.
18
+
19
+ :param cluster_id: cluster_id parameter
20
+ :type cluster_id: str (required)
21
+
22
+ :param instance_group_id: instance_group_id parameter
23
+ :type instance_group_id: str (required)
24
+ """
25
+ super().__init__()
26
+ self.cluster_id = cluster_id
27
+ self.instance_group_id = instance_group_id
28
+
29
+ def to_dict(self):
30
+ """
31
+ Convert the request entity to a dictionary representation.
32
+
33
+ Nested model objects are recursively converted to dictionaries.
34
+
35
+ :return: Dictionary representation of the request
36
+ :rtype: dict
37
+ """
38
+ _map = super().to_dict()
39
+ if _map is not None:
40
+ return _map
41
+ result = dict()
42
+ return result
43
+
44
+ def from_dict(self, m):
45
+ """
46
+ Populate the request entity from a dictionary.
47
+
48
+ Nested dictionaries are recursively converted to model objects.
49
+
50
+ :param m: Dictionary containing request data
51
+ :type m: dict
52
+
53
+ :return: Self reference for method chaining
54
+ :rtype: GetNodeGroupDetailsV2Request
55
+
56
+ :raises TypeError: If input is not a dictionary or field type mismatch
57
+ :raises ValueError: If nested model conversion fails
58
+ """
59
+ m = m or dict()
60
+ if m.get('clusterID') is not None:
61
+ self.cluster_id = m.get('clusterID')
62
+ if m.get('instanceGroupID') is not None:
63
+ self.instance_group_id = m.get('instanceGroupID')
64
+ return self
@@ -0,0 +1,70 @@
1
+ """
2
+ Request entity for GetNodeGroupDetailsV2Response information.
3
+ """
4
+
5
+ from baiducloud_python_sdk_core.bce_response import BceResponse
6
+ from baiducloud_python_sdk_cce.models.instance_group import InstanceGroup
7
+
8
+
9
+ class GetNodeGroupDetailsV2Response(BceResponse):
10
+ """
11
+ GetNodeGroupDetailsV2Response
12
+ """
13
+
14
+ def __init__(self, request_id=None, instance_group=None):
15
+ """
16
+ Initialize GetNodeGroupDetailsV2Response response.
17
+
18
+ :param request_id: 请求 ID, 问题定位提供该 ID
19
+ :type request_id: str (optional)
20
+
21
+ :param instance_group: instance_group field
22
+ :type instance_group: InstanceGroup (optional)
23
+ """
24
+ super().__init__()
25
+ self.request_id = request_id
26
+ self.instance_group = instance_group
27
+
28
+ def to_dict(self):
29
+ """
30
+ Convert the response instance to a dictionary representation.
31
+
32
+ Includes metadata from the parent BceResponse class.
33
+ Nested model objects are recursively converted to dictionaries.
34
+
35
+ :return: Dictionary representation of the response
36
+ :rtype: dict
37
+ """
38
+ _map = super().to_dict()
39
+ if _map is not None:
40
+ return _map
41
+ result = dict()
42
+ if self.metadata is not None:
43
+ result['metadata'] = dict(self.metadata)
44
+ if self.request_id is not None:
45
+ result['requestID'] = self.request_id
46
+ if self.instance_group is not None:
47
+ result['instanceGroup'] = self.instance_group.to_dict()
48
+ return result
49
+
50
+ def from_dict(self, m):
51
+ """
52
+ Populate the response instance from a dictionary.
53
+
54
+ Nested dictionaries are recursively converted to model objects.
55
+
56
+ :param m: Dictionary containing response data
57
+ :type m: dict
58
+
59
+ :return: Self reference for method chaining
60
+ :rtype: GetNodeGroupDetailsV2Response
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('requestID') is not None:
67
+ self.request_id = m.get('requestID')
68
+ if m.get('instanceGroup') is not None:
69
+ self.instance_group = InstanceGroup().from_dict(m.get('instanceGroup'))
70
+ return self
@@ -0,0 +1,66 @@
1
+ """
2
+ Request entity for GetPackageListV2Request information.
3
+ """
4
+
5
+ from baiducloud_python_sdk_core.abstract_model import AbstractModel
6
+
7
+
8
+ class GetPackageListV2Request(AbstractModel):
9
+ """
10
+ Request entity for GetPackageListV2Request operation.
11
+
12
+ This class encapsulates all parameters for the API request.
13
+ """
14
+
15
+ def __init__(self, type=None, machine_spec_list=None):
16
+ """
17
+ Initialize GetPackageListV2Request request entity.
18
+
19
+ :param type: type parameter
20
+ :type type: str (optional)
21
+
22
+ :param machine_spec_list: 查询指定套餐
23
+ :type machine_spec_list: List[str] (optional)
24
+ """
25
+ super().__init__()
26
+ self.type = type
27
+ self.machine_spec_list = machine_spec_list
28
+
29
+ def to_dict(self):
30
+ """
31
+ Convert the request entity to a dictionary representation.
32
+
33
+ Nested model objects are recursively converted to dictionaries.
34
+
35
+ :return: Dictionary representation of the request
36
+ :rtype: dict
37
+ """
38
+ _map = super().to_dict()
39
+ if _map is not None:
40
+ return _map
41
+ result = dict()
42
+ if self.machine_spec_list is not None:
43
+ result['machineSpecList'] = self.machine_spec_list
44
+ return result
45
+
46
+ def from_dict(self, m):
47
+ """
48
+ Populate the request entity from a dictionary.
49
+
50
+ Nested dictionaries are recursively converted to model objects.
51
+
52
+ :param m: Dictionary containing request data
53
+ :type m: dict
54
+
55
+ :return: Self reference for method chaining
56
+ :rtype: GetPackageListV2Request
57
+
58
+ :raises TypeError: If input is not a dictionary or field type mismatch
59
+ :raises ValueError: If nested model conversion fails
60
+ """
61
+ m = m or dict()
62
+ if m.get('type') is not None:
63
+ self.type = m.get('type')
64
+ if m.get('machineSpecList') is not None:
65
+ self.machine_spec_list = m.get('machineSpecList')
66
+ return self
@@ -0,0 +1,62 @@
1
+ """
2
+ Request entity for GetPackageListV2Response information.
3
+ """
4
+
5
+ from baiducloud_python_sdk_core.bce_response import BceResponse
6
+ from baiducloud_python_sdk_cce.models.machine_spec_status import MachineSpecStatus
7
+
8
+
9
+ class GetPackageListV2Response(BceResponse):
10
+ """
11
+ GetPackageListV2Response
12
+ """
13
+
14
+ def __init__(self, machine_spec_list=None):
15
+ """
16
+ Initialize GetPackageListV2Response response.
17
+
18
+ :param machine_spec_list: 套餐列表
19
+ :type machine_spec_list: List[MachineSpecStatus] (optional)
20
+ """
21
+ super().__init__()
22
+ self.machine_spec_list = machine_spec_list
23
+
24
+ def to_dict(self):
25
+ """
26
+ Convert the response instance to a dictionary representation.
27
+
28
+ Includes metadata from the parent BceResponse class.
29
+ Nested model objects are recursively converted to dictionaries.
30
+
31
+ :return: Dictionary representation of the response
32
+ :rtype: dict
33
+ """
34
+ _map = super().to_dict()
35
+ if _map is not None:
36
+ return _map
37
+ result = dict()
38
+ if self.metadata is not None:
39
+ result['metadata'] = dict(self.metadata)
40
+ if self.machine_spec_list is not None:
41
+ result['machineSpecList'] = [i.to_dict() for i in self.machine_spec_list]
42
+ return result
43
+
44
+ def from_dict(self, m):
45
+ """
46
+ Populate the response instance from a dictionary.
47
+
48
+ Nested dictionaries are recursively converted to model objects.
49
+
50
+ :param m: Dictionary containing response data
51
+ :type m: dict
52
+
53
+ :return: Self reference for method chaining
54
+ :rtype: GetPackageListV2Response
55
+
56
+ :raises TypeError: If input is not a dictionary or field type mismatch
57
+ :raises ValueError: If nested model conversion fails
58
+ """
59
+ m = m or dict()
60
+ if m.get('machineSpecList') is not None:
61
+ self.machine_spec_list = [MachineSpecStatus().from_dict(i) for i in m.get('machineSpecList')]
62
+ return self