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,78 @@
1
+ """
2
+ Request entity for ScalingDownV2Response 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 ScalingDownV2Response(BceResponse):
10
+ """
11
+ ScalingDownV2Response
12
+ """
13
+
14
+ def __init__(self, success=None, msg=None, result=None):
15
+ """
16
+ Initialize ScalingDownV2Response 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: ScalingDownV2Response
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,88 @@
1
+ """
2
+ Request entity for ScalingUpV2Request information.
3
+ """
4
+
5
+ from baiducloud_python_sdk_core.abstract_model import AbstractModel
6
+
7
+
8
+ class ScalingUpV2Request(AbstractModel):
9
+ """
10
+ Request entity for ScalingUpV2Request operation.
11
+
12
+ This class encapsulates all parameters for the API request.
13
+ """
14
+
15
+ def __init__(self, group_id, scaling_up, zone, node_count=None, expansion_strategy=None):
16
+ """
17
+ Initialize ScalingUpV2Request request entity.
18
+
19
+ :param group_id: group_id parameter
20
+ :type group_id: str (required)
21
+
22
+ :param scaling_up: scaling_up parameter
23
+ :type scaling_up: str (required)
24
+
25
+ :param node_count: 节点数量
26
+ :type node_count: int (optional)
27
+
28
+ :param zone: 区域信息
29
+ :type zone: List[str] (required)
30
+
31
+ :param expansion_strategy: 扩容策略 ( Priority - 以单独可用区进行创建 ; Balanced - 在选定可用区中均衡创建)
32
+ :type expansion_strategy: str (optional)
33
+ """
34
+ super().__init__()
35
+ self.group_id = group_id
36
+ self.scaling_up = scaling_up
37
+ self.node_count = node_count
38
+ self.zone = zone
39
+ self.expansion_strategy = expansion_strategy
40
+
41
+ def to_dict(self):
42
+ """
43
+ Convert the request entity to a dictionary representation.
44
+
45
+ Nested model objects are recursively converted to dictionaries.
46
+
47
+ :return: Dictionary representation of the request
48
+ :rtype: dict
49
+ """
50
+ _map = super().to_dict()
51
+ if _map is not None:
52
+ return _map
53
+ result = dict()
54
+ if self.node_count is not None:
55
+ result['nodeCount'] = self.node_count
56
+ if self.zone is not None:
57
+ result['zone'] = self.zone
58
+ if self.expansion_strategy is not None:
59
+ result['expansionStrategy'] = self.expansion_strategy
60
+ return result
61
+
62
+ def from_dict(self, m):
63
+ """
64
+ Populate the request entity from a dictionary.
65
+
66
+ Nested dictionaries are recursively converted to model objects.
67
+
68
+ :param m: Dictionary containing request data
69
+ :type m: dict
70
+
71
+ :return: Self reference for method chaining
72
+ :rtype: ScalingUpV2Request
73
+
74
+ :raises TypeError: If input is not a dictionary or field type mismatch
75
+ :raises ValueError: If nested model conversion fails
76
+ """
77
+ m = m or dict()
78
+ if m.get('groupId') is not None:
79
+ self.group_id = m.get('groupId')
80
+ if m.get('scalingUp') is not None:
81
+ self.scaling_up = m.get('scalingUp')
82
+ if m.get('nodeCount') is not None:
83
+ self.node_count = m.get('nodeCount')
84
+ if m.get('zone') is not None:
85
+ self.zone = m.get('zone')
86
+ if m.get('expansionStrategy') is not None:
87
+ self.expansion_strategy = m.get('expansionStrategy')
88
+ return self
@@ -0,0 +1,80 @@
1
+ """
2
+ ScalingUpV2Response information
3
+ """
4
+
5
+ from baiducloud_python_sdk_core.bce_response import BceResponse
6
+
7
+ from baiducloud_python_sdk_as.models.dag_model import DagModel
8
+
9
+
10
+ class ScalingUpV2Response(BceResponse):
11
+ """
12
+ ScalingUpV2Response
13
+ """
14
+
15
+ def __init__(self, success=None, msg=None, result=None):
16
+ """
17
+ Initialize ScalingUpV2Response instance.
18
+
19
+ :param success: 请求是否成功
20
+ :type success: bool (optional)
21
+
22
+ :param msg: 响应消息
23
+ :type msg: str (optional)
24
+
25
+ :param result: result attribute
26
+ :type result: DagModel (optional)
27
+ """
28
+ super().__init__()
29
+ self.success = success
30
+ self.msg = msg
31
+ self.result = result
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
+ Includes metadata from the parent BceResponse class.
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.metadata is not None:
49
+ result['metadata'] = dict(self.metadata)
50
+ if self.success is not None:
51
+ result['success'] = self.success
52
+ if self.msg is not None:
53
+ result['msg'] = self.msg
54
+ if self.result is not None:
55
+ result['result'] = self.result.to_dict()
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: ScalingUpV2Response
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('success') is not None:
75
+ self.success = m.get('success')
76
+ if m.get('msg') is not None:
77
+ self.msg = m.get('msg')
78
+ if m.get('result') is not None:
79
+ self.result = DagModel().from_dict(m.get('result'))
80
+ return self
@@ -0,0 +1,19 @@
1
+ """
2
+ State information
3
+ """
4
+
5
+
6
+ class State:
7
+ """
8
+ Enum class for State
9
+ Allowed values: ENABLE, DISABLE
10
+ """
11
+
12
+ ENABLE = 'ENABLE'
13
+ DISABLE = 'DISABLE'
14
+
15
+ @staticmethod
16
+ def is_valid(value):
17
+ """Check if the value is valid for this enum"""
18
+ valid_values = ['ENABLE', 'DISABLE']
19
+ return value in valid_values
@@ -0,0 +1,41 @@
1
+ """
2
+ Status information
3
+ """
4
+
5
+
6
+ class Status:
7
+ """
8
+ Enum class for Status
9
+ """
10
+
11
+ CREATING = 'CREATING'
12
+ RUNNING = 'RUNNING'
13
+ SCALING_UP = 'SCALING_UP'
14
+ SCALING_DOWN = 'SCALING_DOWN'
15
+ ATTACHING_NODE = 'ATTACHING_NODE'
16
+ DETACHING_NODE = 'DETACHING_NODE'
17
+ DELETING = 'DELETING'
18
+ BINDING_BLB = 'BINDING_BLB'
19
+ UNBINDING_BLB = 'UNBINDING_BLB'
20
+ COOLDOWN = 'COOLDOWN'
21
+ PAUSE = 'PAUSE'
22
+ DELETED = 'DELETED'
23
+
24
+ @staticmethod
25
+ def is_valid(value):
26
+ """Check if the value is valid for this enum"""
27
+ valid_values = [
28
+ 'CREATING',
29
+ 'RUNNING',
30
+ 'SCALING_UP',
31
+ 'SCALING_DOWN',
32
+ 'ATTACHING_NODE',
33
+ 'DETACHING_NODE',
34
+ 'DELETING',
35
+ 'BINDING_BLB',
36
+ 'UNBINDING_BLB',
37
+ 'COOLDOWN',
38
+ 'PAUSE',
39
+ 'DELETED',
40
+ ]
41
+ return value in valid_values
@@ -0,0 +1,66 @@
1
+ """
2
+ TagInfo information
3
+ """
4
+
5
+ from baiducloud_python_sdk_core.abstract_model import AbstractModel
6
+
7
+
8
+ class TagInfo(AbstractModel):
9
+ """
10
+ TagInfo
11
+ """
12
+
13
+ def __init__(self, tag_key=None, tag_value=None):
14
+ """
15
+ Initialize TagInfo instance.
16
+
17
+ :param tag_key: 键
18
+ :type tag_key: str (optional)
19
+
20
+ :param tag_value: 值
21
+ :type tag_value: str (optional)
22
+ """
23
+ super().__init__()
24
+ self.tag_key = tag_key
25
+ self.tag_value = tag_value
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.tag_key is not None:
41
+ result['tagKey'] = self.tag_key
42
+ if self.tag_value is not None:
43
+ result['tagValue'] = self.tag_value
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: TagInfo
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('tagKey') is not None:
63
+ self.tag_key = m.get('tagKey')
64
+ if m.get('tagValue') is not None:
65
+ self.tag_value = m.get('tagValue')
66
+ return self
@@ -0,0 +1,20 @@
1
+ """
2
+ Type information
3
+ """
4
+
5
+
6
+ class Type:
7
+ """
8
+ Enum class for Type
9
+ Allowed values: CRONTAB, ALARM, PERIOD
10
+ """
11
+
12
+ CRONTAB = 'CRONTAB'
13
+ ALARM = 'ALARM'
14
+ PERIOD = 'PERIOD'
15
+
16
+ @staticmethod
17
+ def is_valid(value):
18
+ """Check if the value is valid for this enum"""
19
+ valid_values = ['CRONTAB', 'ALARM', 'PERIOD']
20
+ return value in valid_values
@@ -0,0 +1,80 @@
1
+ """
2
+ Request entity for UpdateIsManagedV2Request information.
3
+ """
4
+
5
+ from baiducloud_python_sdk_core.abstract_model import AbstractModel
6
+
7
+
8
+ class UpdateIsManagedV2Request(AbstractModel):
9
+ """
10
+ Request entity for UpdateIsManagedV2Request operation.
11
+
12
+ This class encapsulates all parameters for the API request.
13
+ """
14
+
15
+ def __init__(self, group_id, update_is_managed, add_managed_node_ids, del_managed_node_ids):
16
+ """
17
+ Initialize UpdateIsManagedV2Request request entity.
18
+
19
+ :param group_id: group_id parameter
20
+ :type group_id: str (required)
21
+
22
+ :param update_is_managed: update_is_managed parameter
23
+ :type update_is_managed: str (required)
24
+
25
+ :param add_managed_node_ids: 新增托管的节点列表
26
+ :type add_managed_node_ids: List[str] (required)
27
+
28
+ :param del_managed_node_ids: 取消托管的节点列表
29
+ :type del_managed_node_ids: List[str] (required)
30
+ """
31
+ super().__init__()
32
+ self.group_id = group_id
33
+ self.update_is_managed = update_is_managed
34
+ self.add_managed_node_ids = add_managed_node_ids
35
+ self.del_managed_node_ids = del_managed_node_ids
36
+
37
+ def to_dict(self):
38
+ """
39
+ Convert the request entity to a dictionary representation.
40
+
41
+ Nested model objects are recursively converted to dictionaries.
42
+
43
+ :return: Dictionary representation of the request
44
+ :rtype: dict
45
+ """
46
+ _map = super().to_dict()
47
+ if _map is not None:
48
+ return _map
49
+ result = dict()
50
+ if self.add_managed_node_ids is not None:
51
+ result['addManagedNodeIds'] = self.add_managed_node_ids
52
+ if self.del_managed_node_ids is not None:
53
+ result['delManagedNodeIds'] = self.del_managed_node_ids
54
+ return result
55
+
56
+ def from_dict(self, m):
57
+ """
58
+ Populate the request entity from a dictionary.
59
+
60
+ Nested dictionaries are recursively converted to model objects.
61
+
62
+ :param m: Dictionary containing request data
63
+ :type m: dict
64
+
65
+ :return: Self reference for method chaining
66
+ :rtype: UpdateIsManagedV2Request
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('groupId') is not None:
73
+ self.group_id = m.get('groupId')
74
+ if m.get('updateIsManaged') is not None:
75
+ self.update_is_managed = m.get('updateIsManaged')
76
+ if m.get('addManagedNodeIds') is not None:
77
+ self.add_managed_node_ids = m.get('addManagedNodeIds')
78
+ if m.get('delManagedNodeIds') is not None:
79
+ self.del_managed_node_ids = m.get('delManagedNodeIds')
80
+ return self
@@ -0,0 +1,80 @@
1
+ """
2
+ Request entity for UpdateProtectV2Request information.
3
+ """
4
+
5
+ from baiducloud_python_sdk_core.abstract_model import AbstractModel
6
+
7
+
8
+ class UpdateProtectV2Request(AbstractModel):
9
+ """
10
+ Request entity for UpdateProtectV2Request operation.
11
+
12
+ This class encapsulates all parameters for the API request.
13
+ """
14
+
15
+ def __init__(self, group_id, update_protect, nodes, is_protected):
16
+ """
17
+ Initialize UpdateProtectV2Request request entity.
18
+
19
+ :param group_id: group_id parameter
20
+ :type group_id: str (required)
21
+
22
+ :param update_protect: update_protect parameter
23
+ :type update_protect: str (required)
24
+
25
+ :param nodes: 待移入实例短id列表
26
+ :type nodes: List[str] (required)
27
+
28
+ :param is_protected: 是否将nodes中节点设置为保护节点
29
+ :type is_protected: bool (required)
30
+ """
31
+ super().__init__()
32
+ self.group_id = group_id
33
+ self.update_protect = update_protect
34
+ self.nodes = nodes
35
+ self.is_protected = is_protected
36
+
37
+ def to_dict(self):
38
+ """
39
+ Convert the request entity to a dictionary representation.
40
+
41
+ Nested model objects are recursively converted to dictionaries.
42
+
43
+ :return: Dictionary representation of the request
44
+ :rtype: dict
45
+ """
46
+ _map = super().to_dict()
47
+ if _map is not None:
48
+ return _map
49
+ result = dict()
50
+ if self.nodes is not None:
51
+ result['nodes'] = self.nodes
52
+ if self.is_protected is not None:
53
+ result['isProtected'] = self.is_protected
54
+ return result
55
+
56
+ def from_dict(self, m):
57
+ """
58
+ Populate the request entity from a dictionary.
59
+
60
+ Nested dictionaries are recursively converted to model objects.
61
+
62
+ :param m: Dictionary containing request data
63
+ :type m: dict
64
+
65
+ :return: Self reference for method chaining
66
+ :rtype: UpdateProtectV2Request
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('groupId') is not None:
73
+ self.group_id = m.get('groupId')
74
+ if m.get('updateProtect') is not None:
75
+ self.update_protect = m.get('updateProtect')
76
+ if m.get('nodes') is not None:
77
+ self.nodes = m.get('nodes')
78
+ if m.get('isProtected') is not None:
79
+ self.is_protected = m.get('isProtected')
80
+ return self
@@ -0,0 +1,74 @@
1
+ """
2
+ VpcInfo information
3
+ """
4
+
5
+ from baiducloud_python_sdk_core.abstract_model import AbstractModel
6
+
7
+
8
+ class VpcInfo(AbstractModel):
9
+ """
10
+ VpcInfo
11
+ """
12
+
13
+ def __init__(self, vpc_name=None, vpc_id=None, vpc_uuid=None):
14
+ """
15
+ Initialize VpcInfo instance.
16
+
17
+ :param vpc_name: 子网名称
18
+ :type vpc_name: str (optional)
19
+
20
+ :param vpc_id: 子网id
21
+ :type vpc_id: str (optional)
22
+
23
+ :param vpc_uuid: 子网uuid
24
+ :type vpc_uuid: str (optional)
25
+ """
26
+ super().__init__()
27
+ self.vpc_name = vpc_name
28
+ self.vpc_id = vpc_id
29
+ self.vpc_uuid = vpc_uuid
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.vpc_name is not None:
45
+ result['vpcName'] = self.vpc_name
46
+ if self.vpc_id is not None:
47
+ result['vpcId'] = self.vpc_id
48
+ if self.vpc_uuid is not None:
49
+ result['vpcUuid'] = self.vpc_uuid
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: VpcInfo
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('vpcName') is not None:
69
+ self.vpc_name = m.get('vpcName')
70
+ if m.get('vpcId') is not None:
71
+ self.vpc_id = m.get('vpcId')
72
+ if m.get('vpcUuid') is not None:
73
+ self.vpc_uuid = m.get('vpcUuid')
74
+ return self