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.
- baiducloud_python_sdk_as/__init__.py +5 -0
- baiducloud_python_sdk_as/api/__init__.py +0 -0
- baiducloud_python_sdk_as/api/as_client.py +626 -0
- baiducloud_python_sdk_as/models/__init__.py +78 -0
- baiducloud_python_sdk_as/models/action_type.py +20 -0
- baiducloud_python_sdk_as/models/adjust_num_v2_request.py +72 -0
- baiducloud_python_sdk_as/models/adjust_num_v2_response.py +80 -0
- baiducloud_python_sdk_as/models/alarm_rule.py +135 -0
- baiducloud_python_sdk_as/models/as_alarm_rule.py +189 -0
- baiducloud_python_sdk_as/models/as_eip.py +90 -0
- baiducloud_python_sdk_as/models/as_group.py +186 -0
- baiducloud_python_sdk_as/models/as_record.py +202 -0
- baiducloud_python_sdk_as/models/assign_tag_info.py +76 -0
- baiducloud_python_sdk_as/models/attach_node_v2_request.py +72 -0
- baiducloud_python_sdk_as/models/attach_node_v2_response.py +78 -0
- baiducloud_python_sdk_as/models/bcc_name_config.py +82 -0
- baiducloud_python_sdk_as/models/billing_info.py +68 -0
- baiducloud_python_sdk_as/models/blb_info.py +82 -0
- baiducloud_python_sdk_as/models/cds_info.py +82 -0
- baiducloud_python_sdk_as/models/check_detail.py +74 -0
- baiducloud_python_sdk_as/models/check_entity.py +76 -0
- baiducloud_python_sdk_as/models/cmd_config.py +142 -0
- baiducloud_python_sdk_as/models/create_as_group_v2_request.py +245 -0
- baiducloud_python_sdk_as/models/create_as_group_v2_response.py +69 -0
- baiducloud_python_sdk_as/models/create_rule_v2_request.py +172 -0
- baiducloud_python_sdk_as/models/create_rule_v2_response.py +61 -0
- baiducloud_python_sdk_as/models/dag_model.py +58 -0
- baiducloud_python_sdk_as/models/delete_as_group_v2_request.py +60 -0
- baiducloud_python_sdk_as/models/delete_rule_v2_request.py +58 -0
- baiducloud_python_sdk_as/models/detach_node_v2_request.py +72 -0
- baiducloud_python_sdk_as/models/detach_node_v2_response.py +78 -0
- baiducloud_python_sdk_as/models/dimension.py +66 -0
- baiducloud_python_sdk_as/models/eip_config.py +112 -0
- baiducloud_python_sdk_as/models/eip_group_bandwidth.py +74 -0
- baiducloud_python_sdk_as/models/eip_group_decrease.py +58 -0
- baiducloud_python_sdk_as/models/eip_group_increase.py +66 -0
- baiducloud_python_sdk_as/models/eip_info.py +82 -0
- baiducloud_python_sdk_as/models/ephemeral_disk.py +66 -0
- baiducloud_python_sdk_as/models/exec_cmd_strategy_type.py +19 -0
- baiducloud_python_sdk_as/models/exec_rule_v2_request.py +72 -0
- baiducloud_python_sdk_as/models/exec_rule_v2_response.py +80 -0
- baiducloud_python_sdk_as/models/expect_action.py +74 -0
- baiducloud_python_sdk_as/models/get_as_group_v2_request.py +58 -0
- baiducloud_python_sdk_as/models/get_as_group_v2_response.py +279 -0
- baiducloud_python_sdk_as/models/get_rule_v2_request.py +58 -0
- baiducloud_python_sdk_as/models/get_rule_v2_response.py +218 -0
- baiducloud_python_sdk_as/models/group_config.py +90 -0
- baiducloud_python_sdk_as/models/health_check_config.py +66 -0
- baiducloud_python_sdk_as/models/health_check_state.py +102 -0
- baiducloud_python_sdk_as/models/list_as_group_v2_request.py +96 -0
- baiducloud_python_sdk_as/models/list_as_group_v2_response.py +102 -0
- baiducloud_python_sdk_as/models/list_as_node_v2_request.py +94 -0
- baiducloud_python_sdk_as/models/list_as_node_v2_response.py +102 -0
- baiducloud_python_sdk_as/models/list_rule_v2_request.py +94 -0
- baiducloud_python_sdk_as/models/list_rule_v2_response.py +102 -0
- baiducloud_python_sdk_as/models/list_task_v2_request.py +94 -0
- baiducloud_python_sdk_as/models/list_task_v2_response.py +102 -0
- baiducloud_python_sdk_as/models/monitor_object.py +84 -0
- baiducloud_python_sdk_as/models/node.py +245 -0
- baiducloud_python_sdk_as/models/node_info.py +373 -0
- baiducloud_python_sdk_as/models/period_type.py +21 -0
- baiducloud_python_sdk_as/models/policy_resource.py +70 -0
- baiducloud_python_sdk_as/models/reservation.py +58 -0
- baiducloud_python_sdk_as/models/resource.py +66 -0
- baiducloud_python_sdk_as/models/rule.py +216 -0
- baiducloud_python_sdk_as/models/scale_condition.py +160 -0
- baiducloud_python_sdk_as/models/scaling_down_v2_request.py +72 -0
- baiducloud_python_sdk_as/models/scaling_down_v2_response.py +78 -0
- baiducloud_python_sdk_as/models/scaling_up_v2_request.py +88 -0
- baiducloud_python_sdk_as/models/scaling_up_v2_response.py +80 -0
- baiducloud_python_sdk_as/models/state.py +19 -0
- baiducloud_python_sdk_as/models/status.py +41 -0
- baiducloud_python_sdk_as/models/tag_info.py +66 -0
- baiducloud_python_sdk_as/models/type.py +20 -0
- baiducloud_python_sdk_as/models/update_is_managed_v2_request.py +80 -0
- baiducloud_python_sdk_as/models/update_protect_v2_request.py +80 -0
- baiducloud_python_sdk_as/models/vpc_info.py +74 -0
- baiducloud_python_sdk_as/models/zone_info.py +100 -0
- baiducloud_python_sdk_as-0.0.1.dist-info/LICENSE +177 -0
- baiducloud_python_sdk_as-0.0.1.dist-info/METADATA +76 -0
- baiducloud_python_sdk_as-0.0.1.dist-info/RECORD +83 -0
- baiducloud_python_sdk_as-0.0.1.dist-info/WHEEL +5 -0
- baiducloud_python_sdk_as-0.0.1.dist-info/top_level.txt +1 -0
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
"""
|
|
2
|
+
BillingInfo information
|
|
3
|
+
"""
|
|
4
|
+
|
|
5
|
+
from baiducloud_python_sdk_core.abstract_model import AbstractModel
|
|
6
|
+
|
|
7
|
+
from baiducloud_python_sdk_as.models.reservation import Reservation
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
class BillingInfo(AbstractModel):
|
|
11
|
+
"""
|
|
12
|
+
BillingInfo
|
|
13
|
+
"""
|
|
14
|
+
|
|
15
|
+
def __init__(self, payment_timing=None, reservation=None):
|
|
16
|
+
"""
|
|
17
|
+
Initialize BillingInfo instance.
|
|
18
|
+
|
|
19
|
+
:param payment_timing: 伸缩组Billing,后付费:postpay,抢占式:bidding
|
|
20
|
+
:type payment_timing: str (optional)
|
|
21
|
+
|
|
22
|
+
:param reservation: reservation attribute
|
|
23
|
+
:type reservation: Reservation (optional)
|
|
24
|
+
"""
|
|
25
|
+
super().__init__()
|
|
26
|
+
self.payment_timing = payment_timing
|
|
27
|
+
self.reservation = reservation
|
|
28
|
+
|
|
29
|
+
def to_dict(self):
|
|
30
|
+
"""
|
|
31
|
+
Convert the model instance to a dictionary representation.
|
|
32
|
+
|
|
33
|
+
Nested model objects are recursively converted to dictionaries.
|
|
34
|
+
|
|
35
|
+
:return: Dictionary representation of the model
|
|
36
|
+
:rtype: dict
|
|
37
|
+
"""
|
|
38
|
+
_map = super().to_dict()
|
|
39
|
+
if _map is not None:
|
|
40
|
+
return _map
|
|
41
|
+
result = dict()
|
|
42
|
+
if self.payment_timing is not None:
|
|
43
|
+
result['paymentTiming'] = self.payment_timing
|
|
44
|
+
if self.reservation is not None:
|
|
45
|
+
result['reservation'] = self.reservation.to_dict()
|
|
46
|
+
return result
|
|
47
|
+
|
|
48
|
+
def from_dict(self, m):
|
|
49
|
+
"""
|
|
50
|
+
Populate the model instance from a dictionary.
|
|
51
|
+
|
|
52
|
+
Nested dictionaries are recursively converted to model objects.
|
|
53
|
+
|
|
54
|
+
:param m: Dictionary containing model data
|
|
55
|
+
:type m: dict
|
|
56
|
+
|
|
57
|
+
:return: Self reference for method chaining
|
|
58
|
+
:rtype: BillingInfo
|
|
59
|
+
|
|
60
|
+
:raises TypeError: If input is not a dictionary type
|
|
61
|
+
:raises ValueError: If nested model conversion fails
|
|
62
|
+
"""
|
|
63
|
+
m = m or dict()
|
|
64
|
+
if m.get('paymentTiming') is not None:
|
|
65
|
+
self.payment_timing = m.get('paymentTiming')
|
|
66
|
+
if m.get('reservation') is not None:
|
|
67
|
+
self.reservation = Reservation().from_dict(m.get('reservation'))
|
|
68
|
+
return self
|
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
"""
|
|
2
|
+
BlbInfo information
|
|
3
|
+
"""
|
|
4
|
+
|
|
5
|
+
from baiducloud_python_sdk_core.abstract_model import AbstractModel
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
class BlbInfo(AbstractModel):
|
|
9
|
+
"""
|
|
10
|
+
BlbInfo
|
|
11
|
+
"""
|
|
12
|
+
|
|
13
|
+
def __init__(self, blb_id=None, blb_name=None, blb_type=None, sg_ids=None):
|
|
14
|
+
"""
|
|
15
|
+
Initialize BlbInfo instance.
|
|
16
|
+
|
|
17
|
+
:param blb_id: BLB实例ID
|
|
18
|
+
:type blb_id: str (optional)
|
|
19
|
+
|
|
20
|
+
:param blb_name: BLB实例名称
|
|
21
|
+
:type blb_name: str (optional)
|
|
22
|
+
|
|
23
|
+
:param blb_type: blbType类型:Blb-普通型BLB,AppBLb-应用型BLB,Ipv6Blb-ipv6型BLB
|
|
24
|
+
:type blb_type: str (optional)
|
|
25
|
+
|
|
26
|
+
:param sg_ids: 当blb类型为应用型BLB时,服务器组必填,可选多个。其他类型BLB不需要填写该值。
|
|
27
|
+
:type sg_ids: List[str] (optional)
|
|
28
|
+
"""
|
|
29
|
+
super().__init__()
|
|
30
|
+
self.blb_id = blb_id
|
|
31
|
+
self.blb_name = blb_name
|
|
32
|
+
self.blb_type = blb_type
|
|
33
|
+
self.sg_ids = sg_ids
|
|
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.blb_id is not None:
|
|
49
|
+
result['blbId'] = self.blb_id
|
|
50
|
+
if self.blb_name is not None:
|
|
51
|
+
result['blbName'] = self.blb_name
|
|
52
|
+
if self.blb_type is not None:
|
|
53
|
+
result['blbType'] = self.blb_type
|
|
54
|
+
if self.sg_ids is not None:
|
|
55
|
+
result['sgIds'] = self.sg_ids
|
|
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: BlbInfo
|
|
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('blbId') is not None:
|
|
75
|
+
self.blb_id = m.get('blbId')
|
|
76
|
+
if m.get('blbName') is not None:
|
|
77
|
+
self.blb_name = m.get('blbName')
|
|
78
|
+
if m.get('blbType') is not None:
|
|
79
|
+
self.blb_type = m.get('blbType')
|
|
80
|
+
if m.get('sgIds') is not None:
|
|
81
|
+
self.sg_ids = m.get('sgIds')
|
|
82
|
+
return self
|
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
"""
|
|
2
|
+
CdsInfo information
|
|
3
|
+
"""
|
|
4
|
+
|
|
5
|
+
from baiducloud_python_sdk_core.abstract_model import AbstractModel
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
class CdsInfo(AbstractModel):
|
|
9
|
+
"""
|
|
10
|
+
CdsInfo
|
|
11
|
+
"""
|
|
12
|
+
|
|
13
|
+
def __init__(self, volume_type=None, size_in_gb=None, snapshot_id=None, snapshot_name=None):
|
|
14
|
+
"""
|
|
15
|
+
Initialize CdsInfo instance.
|
|
16
|
+
|
|
17
|
+
:param volume_type: 磁盘类型
|
|
18
|
+
:type volume_type: str (optional)
|
|
19
|
+
|
|
20
|
+
:param size_in_gb: 磁盘大小
|
|
21
|
+
:type size_in_gb: int (optional)
|
|
22
|
+
|
|
23
|
+
:param snapshot_id: 磁盘快照ID
|
|
24
|
+
:type snapshot_id: str (optional)
|
|
25
|
+
|
|
26
|
+
:param snapshot_name: 磁盘快照名称
|
|
27
|
+
:type snapshot_name: str (optional)
|
|
28
|
+
"""
|
|
29
|
+
super().__init__()
|
|
30
|
+
self.volume_type = volume_type
|
|
31
|
+
self.size_in_gb = size_in_gb
|
|
32
|
+
self.snapshot_id = snapshot_id
|
|
33
|
+
self.snapshot_name = snapshot_name
|
|
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.volume_type is not None:
|
|
49
|
+
result['volumeType'] = self.volume_type
|
|
50
|
+
if self.size_in_gb is not None:
|
|
51
|
+
result['sizeInGB'] = self.size_in_gb
|
|
52
|
+
if self.snapshot_id is not None:
|
|
53
|
+
result['snapshotId'] = self.snapshot_id
|
|
54
|
+
if self.snapshot_name is not None:
|
|
55
|
+
result['snapshotName'] = self.snapshot_name
|
|
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: CdsInfo
|
|
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('volumeType') is not None:
|
|
75
|
+
self.volume_type = m.get('volumeType')
|
|
76
|
+
if m.get('sizeInGB') is not None:
|
|
77
|
+
self.size_in_gb = m.get('sizeInGB')
|
|
78
|
+
if m.get('snapshotId') is not None:
|
|
79
|
+
self.snapshot_id = m.get('snapshotId')
|
|
80
|
+
if m.get('snapshotName') is not None:
|
|
81
|
+
self.snapshot_name = m.get('snapshotName')
|
|
82
|
+
return self
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
"""
|
|
2
|
+
CheckDetail information
|
|
3
|
+
"""
|
|
4
|
+
|
|
5
|
+
from baiducloud_python_sdk_core.abstract_model import AbstractModel
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
class CheckDetail(AbstractModel):
|
|
9
|
+
"""
|
|
10
|
+
CheckDetail
|
|
11
|
+
"""
|
|
12
|
+
|
|
13
|
+
def __init__(self, resource_id=None, detail=None, advice=None):
|
|
14
|
+
"""
|
|
15
|
+
Initialize CheckDetail instance.
|
|
16
|
+
|
|
17
|
+
:param resource_id: 资源id
|
|
18
|
+
:type resource_id: str (optional)
|
|
19
|
+
|
|
20
|
+
:param detail: 详细信息
|
|
21
|
+
:type detail: str (optional)
|
|
22
|
+
|
|
23
|
+
:param advice: 系统建议
|
|
24
|
+
:type advice: str (optional)
|
|
25
|
+
"""
|
|
26
|
+
super().__init__()
|
|
27
|
+
self.resource_id = resource_id
|
|
28
|
+
self.detail = detail
|
|
29
|
+
self.advice = advice
|
|
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.resource_id is not None:
|
|
45
|
+
result['resourceId'] = self.resource_id
|
|
46
|
+
if self.detail is not None:
|
|
47
|
+
result['detail'] = self.detail
|
|
48
|
+
if self.advice is not None:
|
|
49
|
+
result['advice'] = self.advice
|
|
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: CheckDetail
|
|
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('resourceId') is not None:
|
|
69
|
+
self.resource_id = m.get('resourceId')
|
|
70
|
+
if m.get('detail') is not None:
|
|
71
|
+
self.detail = m.get('detail')
|
|
72
|
+
if m.get('advice') is not None:
|
|
73
|
+
self.advice = m.get('advice')
|
|
74
|
+
return self
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
"""
|
|
2
|
+
CheckEntity information
|
|
3
|
+
"""
|
|
4
|
+
|
|
5
|
+
from baiducloud_python_sdk_core.abstract_model import AbstractModel
|
|
6
|
+
|
|
7
|
+
from baiducloud_python_sdk_as.models.check_detail import CheckDetail
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
class CheckEntity(AbstractModel):
|
|
11
|
+
"""
|
|
12
|
+
CheckEntity
|
|
13
|
+
"""
|
|
14
|
+
|
|
15
|
+
def __init__(self, label=None, status=None, result=None):
|
|
16
|
+
"""
|
|
17
|
+
Initialize CheckEntity instance.
|
|
18
|
+
|
|
19
|
+
:param label: 标签
|
|
20
|
+
:type label: str (optional)
|
|
21
|
+
|
|
22
|
+
:param status: 检查状态
|
|
23
|
+
:type status: object (optional)
|
|
24
|
+
|
|
25
|
+
:param result: result attribute
|
|
26
|
+
:type result: CheckDetail (optional)
|
|
27
|
+
"""
|
|
28
|
+
super().__init__()
|
|
29
|
+
self.label = label
|
|
30
|
+
self.status = status
|
|
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
|
+
: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.label is not None:
|
|
47
|
+
result['label'] = self.label
|
|
48
|
+
if self.status is not None:
|
|
49
|
+
result['status'] = self.status
|
|
50
|
+
if self.result is not None:
|
|
51
|
+
result['result'] = self.result.to_dict()
|
|
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: CheckEntity
|
|
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('label') is not None:
|
|
71
|
+
self.label = m.get('label')
|
|
72
|
+
if m.get('status') is not None:
|
|
73
|
+
self.status = m.get('status')
|
|
74
|
+
if m.get('result') is not None:
|
|
75
|
+
self.result = CheckDetail().from_dict(m.get('result'))
|
|
76
|
+
return self
|
|
@@ -0,0 +1,142 @@
|
|
|
1
|
+
"""
|
|
2
|
+
CmdConfig information
|
|
3
|
+
"""
|
|
4
|
+
|
|
5
|
+
from baiducloud_python_sdk_core.abstract_model import AbstractModel
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
class CmdConfig(AbstractModel):
|
|
9
|
+
"""
|
|
10
|
+
CmdConfig
|
|
11
|
+
"""
|
|
12
|
+
|
|
13
|
+
def __init__(
|
|
14
|
+
self,
|
|
15
|
+
has_decrease_cmd=None,
|
|
16
|
+
dec_cmd_strategy=None,
|
|
17
|
+
dec_cmd_data=None,
|
|
18
|
+
dec_cmd_timeout=None,
|
|
19
|
+
dec_cmd_manual=None,
|
|
20
|
+
has_increase_cmd=None,
|
|
21
|
+
inc_cmd_strategy=None,
|
|
22
|
+
inc_cmd_data=None,
|
|
23
|
+
inc_cmd_timeout=None,
|
|
24
|
+
inc_cmd_manual=None,
|
|
25
|
+
):
|
|
26
|
+
"""
|
|
27
|
+
Initialize CmdConfig instance.
|
|
28
|
+
|
|
29
|
+
:param has_decrease_cmd: 是否配置缩容脚本
|
|
30
|
+
:type has_decrease_cmd: bool (optional)
|
|
31
|
+
|
|
32
|
+
:param dec_cmd_strategy: 缩容策略,不可为空,失败暂停缩容、失败继续缩容:Proceed、Pause
|
|
33
|
+
:type dec_cmd_strategy: str (optional)
|
|
34
|
+
|
|
35
|
+
:param dec_cmd_data: 缩容脚本
|
|
36
|
+
:type dec_cmd_data: str (optional)
|
|
37
|
+
|
|
38
|
+
:param dec_cmd_timeout: 缩容脚本超时时间
|
|
39
|
+
:type dec_cmd_timeout: int (optional)
|
|
40
|
+
|
|
41
|
+
:param dec_cmd_manual: 手动移出是否执行缩容脚本
|
|
42
|
+
:type dec_cmd_manual: bool (optional)
|
|
43
|
+
|
|
44
|
+
:param has_increase_cmd: 是否配置扩容脚本
|
|
45
|
+
:type has_increase_cmd: bool (optional)
|
|
46
|
+
|
|
47
|
+
:param inc_cmd_strategy: 缩容策略,不可为空,失败暂停缩容、失败继续缩容:Proceed、Pause
|
|
48
|
+
:type inc_cmd_strategy: str (optional)
|
|
49
|
+
|
|
50
|
+
:param inc_cmd_data: 扩容脚本
|
|
51
|
+
:type inc_cmd_data: str (optional)
|
|
52
|
+
|
|
53
|
+
:param inc_cmd_timeout: 扩容脚本超时时间
|
|
54
|
+
:type inc_cmd_timeout: int (optional)
|
|
55
|
+
|
|
56
|
+
:param inc_cmd_manual: 手动移入是否执行扩容脚本
|
|
57
|
+
:type inc_cmd_manual: bool (optional)
|
|
58
|
+
"""
|
|
59
|
+
super().__init__()
|
|
60
|
+
self.has_decrease_cmd = has_decrease_cmd
|
|
61
|
+
self.dec_cmd_strategy = dec_cmd_strategy
|
|
62
|
+
self.dec_cmd_data = dec_cmd_data
|
|
63
|
+
self.dec_cmd_timeout = dec_cmd_timeout
|
|
64
|
+
self.dec_cmd_manual = dec_cmd_manual
|
|
65
|
+
self.has_increase_cmd = has_increase_cmd
|
|
66
|
+
self.inc_cmd_strategy = inc_cmd_strategy
|
|
67
|
+
self.inc_cmd_data = inc_cmd_data
|
|
68
|
+
self.inc_cmd_timeout = inc_cmd_timeout
|
|
69
|
+
self.inc_cmd_manual = inc_cmd_manual
|
|
70
|
+
|
|
71
|
+
def to_dict(self):
|
|
72
|
+
"""
|
|
73
|
+
Convert the model instance to a dictionary representation.
|
|
74
|
+
|
|
75
|
+
Nested model objects are recursively converted to dictionaries.
|
|
76
|
+
|
|
77
|
+
:return: Dictionary representation of the model
|
|
78
|
+
:rtype: dict
|
|
79
|
+
"""
|
|
80
|
+
_map = super().to_dict()
|
|
81
|
+
if _map is not None:
|
|
82
|
+
return _map
|
|
83
|
+
result = dict()
|
|
84
|
+
if self.has_decrease_cmd is not None:
|
|
85
|
+
result['hasDecreaseCmd'] = self.has_decrease_cmd
|
|
86
|
+
if self.dec_cmd_strategy is not None:
|
|
87
|
+
result['decCmdStrategy'] = self.dec_cmd_strategy
|
|
88
|
+
if self.dec_cmd_data is not None:
|
|
89
|
+
result['decCmdData'] = self.dec_cmd_data
|
|
90
|
+
if self.dec_cmd_timeout is not None:
|
|
91
|
+
result['decCmdTimeout'] = self.dec_cmd_timeout
|
|
92
|
+
if self.dec_cmd_manual is not None:
|
|
93
|
+
result['decCmdManual'] = self.dec_cmd_manual
|
|
94
|
+
if self.has_increase_cmd is not None:
|
|
95
|
+
result['hasIncreaseCmd'] = self.has_increase_cmd
|
|
96
|
+
if self.inc_cmd_strategy is not None:
|
|
97
|
+
result['incCmdStrategy'] = self.inc_cmd_strategy
|
|
98
|
+
if self.inc_cmd_data is not None:
|
|
99
|
+
result['incCmdData'] = self.inc_cmd_data
|
|
100
|
+
if self.inc_cmd_timeout is not None:
|
|
101
|
+
result['incCmdTimeout'] = self.inc_cmd_timeout
|
|
102
|
+
if self.inc_cmd_manual is not None:
|
|
103
|
+
result['incCmdManual'] = self.inc_cmd_manual
|
|
104
|
+
return result
|
|
105
|
+
|
|
106
|
+
def from_dict(self, m):
|
|
107
|
+
"""
|
|
108
|
+
Populate the model instance from a dictionary.
|
|
109
|
+
|
|
110
|
+
Nested dictionaries are recursively converted to model objects.
|
|
111
|
+
|
|
112
|
+
:param m: Dictionary containing model data
|
|
113
|
+
:type m: dict
|
|
114
|
+
|
|
115
|
+
:return: Self reference for method chaining
|
|
116
|
+
:rtype: CmdConfig
|
|
117
|
+
|
|
118
|
+
:raises TypeError: If input is not a dictionary type
|
|
119
|
+
:raises ValueError: If nested model conversion fails
|
|
120
|
+
"""
|
|
121
|
+
m = m or dict()
|
|
122
|
+
if m.get('hasDecreaseCmd') is not None:
|
|
123
|
+
self.has_decrease_cmd = m.get('hasDecreaseCmd')
|
|
124
|
+
if m.get('decCmdStrategy') is not None:
|
|
125
|
+
self.dec_cmd_strategy = m.get('decCmdStrategy')
|
|
126
|
+
if m.get('decCmdData') is not None:
|
|
127
|
+
self.dec_cmd_data = m.get('decCmdData')
|
|
128
|
+
if m.get('decCmdTimeout') is not None:
|
|
129
|
+
self.dec_cmd_timeout = m.get('decCmdTimeout')
|
|
130
|
+
if m.get('decCmdManual') is not None:
|
|
131
|
+
self.dec_cmd_manual = m.get('decCmdManual')
|
|
132
|
+
if m.get('hasIncreaseCmd') is not None:
|
|
133
|
+
self.has_increase_cmd = m.get('hasIncreaseCmd')
|
|
134
|
+
if m.get('incCmdStrategy') is not None:
|
|
135
|
+
self.inc_cmd_strategy = m.get('incCmdStrategy')
|
|
136
|
+
if m.get('incCmdData') is not None:
|
|
137
|
+
self.inc_cmd_data = m.get('incCmdData')
|
|
138
|
+
if m.get('incCmdTimeout') is not None:
|
|
139
|
+
self.inc_cmd_timeout = m.get('incCmdTimeout')
|
|
140
|
+
if m.get('incCmdManual') is not None:
|
|
141
|
+
self.inc_cmd_manual = m.get('incCmdManual')
|
|
142
|
+
return self
|