huaweicloudsdkas 3.1.164__py3-none-any.whl → 3.1.166__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.
Potentially problematic release.
This version of huaweicloudsdkas might be problematic. Click here for more details.
- huaweicloudsdkas/v1/__init__.py +15 -0
- huaweicloudsdkas/v1/as_async_client.py +333 -0
- huaweicloudsdkas/v1/as_client.py +333 -0
- huaweicloudsdkas/v1/model/__init__.py +15 -0
- huaweicloudsdkas/v1/model/close_warm_pool_request.py +114 -0
- huaweicloudsdkas/v1/model/close_warm_pool_response.py +85 -0
- huaweicloudsdkas/v1/model/list_warm_pool_instances_request.py +172 -0
- huaweicloudsdkas/v1/model/list_warm_pool_instances_response.py +141 -0
- huaweicloudsdkas/v1/model/put_warm_pool_option.py +173 -0
- huaweicloudsdkas/v1/model/put_warm_pool_request.py +139 -0
- huaweicloudsdkas/v1/model/put_warm_pool_response.py +85 -0
- huaweicloudsdkas/v1/model/show_warm_pool_request.py +114 -0
- huaweicloudsdkas/v1/model/show_warm_pool_response.py +112 -0
- huaweicloudsdkas/v1/model/update_instance_config.py +114 -0
- huaweicloudsdkas/v1/model/update_scaling_config_option.py +110 -0
- huaweicloudsdkas/v1/model/update_scaling_config_request.py +135 -0
- huaweicloudsdkas/v1/model/update_scaling_config_response.py +85 -0
- huaweicloudsdkas/v1/model/warm_pool_info.py +202 -0
- huaweicloudsdkas/v1/model/warm_pool_instance.py +202 -0
- {huaweicloudsdkas-3.1.164.dist-info → huaweicloudsdkas-3.1.166.dist-info}/METADATA +9 -10
- {huaweicloudsdkas-3.1.164.dist-info → huaweicloudsdkas-3.1.166.dist-info}/RECORD +23 -9
- {huaweicloudsdkas-3.1.164.dist-info → huaweicloudsdkas-3.1.166.dist-info}/WHEEL +1 -2
- huaweicloudsdkas-3.1.164.dist-info/top_level.txt +0 -1
- {huaweicloudsdkas-3.1.164.dist-info → huaweicloudsdkas-3.1.166.dist-info/licenses}/LICENSE +0 -0
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
# coding: utf-8
|
|
2
|
+
|
|
3
|
+
import six
|
|
4
|
+
|
|
5
|
+
from huaweicloudsdkcore.sdk_response import SdkResponse
|
|
6
|
+
from huaweicloudsdkcore.utils.http_utils import sanitize_for_serialization
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
class PutWarmPoolResponse(SdkResponse):
|
|
10
|
+
|
|
11
|
+
"""
|
|
12
|
+
Attributes:
|
|
13
|
+
openapi_types (dict): The key is attribute name
|
|
14
|
+
and the value is attribute type.
|
|
15
|
+
attribute_map (dict): The key is attribute name
|
|
16
|
+
and the value is json key in definition.
|
|
17
|
+
"""
|
|
18
|
+
sensitive_list = []
|
|
19
|
+
|
|
20
|
+
openapi_types = {
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
attribute_map = {
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
def __init__(self):
|
|
27
|
+
r"""PutWarmPoolResponse
|
|
28
|
+
|
|
29
|
+
The model defined in huaweicloud sdk
|
|
30
|
+
|
|
31
|
+
"""
|
|
32
|
+
|
|
33
|
+
super(PutWarmPoolResponse, self).__init__()
|
|
34
|
+
self.discriminator = None
|
|
35
|
+
|
|
36
|
+
def to_dict(self):
|
|
37
|
+
"""Returns the model properties as a dict"""
|
|
38
|
+
result = {}
|
|
39
|
+
|
|
40
|
+
for attr, _ in six.iteritems(self.openapi_types):
|
|
41
|
+
value = getattr(self, attr)
|
|
42
|
+
if isinstance(value, list):
|
|
43
|
+
result[attr] = list(map(
|
|
44
|
+
lambda x: x.to_dict() if hasattr(x, "to_dict") else x,
|
|
45
|
+
value
|
|
46
|
+
))
|
|
47
|
+
elif hasattr(value, "to_dict"):
|
|
48
|
+
result[attr] = value.to_dict()
|
|
49
|
+
elif isinstance(value, dict):
|
|
50
|
+
result[attr] = dict(map(
|
|
51
|
+
lambda item: (item[0], item[1].to_dict())
|
|
52
|
+
if hasattr(item[1], "to_dict") else item,
|
|
53
|
+
value.items()
|
|
54
|
+
))
|
|
55
|
+
else:
|
|
56
|
+
if attr in self.sensitive_list:
|
|
57
|
+
result[attr] = "****"
|
|
58
|
+
else:
|
|
59
|
+
result[attr] = value
|
|
60
|
+
|
|
61
|
+
return result
|
|
62
|
+
|
|
63
|
+
def to_str(self):
|
|
64
|
+
"""Returns the string representation of the model"""
|
|
65
|
+
import simplejson as json
|
|
66
|
+
if six.PY2:
|
|
67
|
+
import sys
|
|
68
|
+
reload(sys)
|
|
69
|
+
sys.setdefaultencoding("utf-8")
|
|
70
|
+
return json.dumps(sanitize_for_serialization(self), ensure_ascii=False)
|
|
71
|
+
|
|
72
|
+
def __repr__(self):
|
|
73
|
+
"""For `print`"""
|
|
74
|
+
return self.to_str()
|
|
75
|
+
|
|
76
|
+
def __eq__(self, other):
|
|
77
|
+
"""Returns true if both objects are equal"""
|
|
78
|
+
if not isinstance(other, PutWarmPoolResponse):
|
|
79
|
+
return False
|
|
80
|
+
|
|
81
|
+
return self.__dict__ == other.__dict__
|
|
82
|
+
|
|
83
|
+
def __ne__(self, other):
|
|
84
|
+
"""Returns true if both objects are not equal"""
|
|
85
|
+
return not self == other
|
|
@@ -0,0 +1,114 @@
|
|
|
1
|
+
# coding: utf-8
|
|
2
|
+
|
|
3
|
+
import six
|
|
4
|
+
|
|
5
|
+
from huaweicloudsdkcore.utils.http_utils import sanitize_for_serialization
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
class ShowWarmPoolRequest:
|
|
9
|
+
|
|
10
|
+
"""
|
|
11
|
+
Attributes:
|
|
12
|
+
openapi_types (dict): The key is attribute name
|
|
13
|
+
and the value is attribute type.
|
|
14
|
+
attribute_map (dict): The key is attribute name
|
|
15
|
+
and the value is json key in definition.
|
|
16
|
+
"""
|
|
17
|
+
sensitive_list = []
|
|
18
|
+
|
|
19
|
+
openapi_types = {
|
|
20
|
+
'scaling_group_id': 'str'
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
attribute_map = {
|
|
24
|
+
'scaling_group_id': 'scaling_group_id'
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
def __init__(self, scaling_group_id=None):
|
|
28
|
+
r"""ShowWarmPoolRequest
|
|
29
|
+
|
|
30
|
+
The model defined in huaweicloud sdk
|
|
31
|
+
|
|
32
|
+
:param scaling_group_id: 伸缩组ID
|
|
33
|
+
:type scaling_group_id: str
|
|
34
|
+
"""
|
|
35
|
+
|
|
36
|
+
|
|
37
|
+
|
|
38
|
+
self._scaling_group_id = None
|
|
39
|
+
self.discriminator = None
|
|
40
|
+
|
|
41
|
+
self.scaling_group_id = scaling_group_id
|
|
42
|
+
|
|
43
|
+
@property
|
|
44
|
+
def scaling_group_id(self):
|
|
45
|
+
r"""Gets the scaling_group_id of this ShowWarmPoolRequest.
|
|
46
|
+
|
|
47
|
+
伸缩组ID
|
|
48
|
+
|
|
49
|
+
:return: The scaling_group_id of this ShowWarmPoolRequest.
|
|
50
|
+
:rtype: str
|
|
51
|
+
"""
|
|
52
|
+
return self._scaling_group_id
|
|
53
|
+
|
|
54
|
+
@scaling_group_id.setter
|
|
55
|
+
def scaling_group_id(self, scaling_group_id):
|
|
56
|
+
r"""Sets the scaling_group_id of this ShowWarmPoolRequest.
|
|
57
|
+
|
|
58
|
+
伸缩组ID
|
|
59
|
+
|
|
60
|
+
:param scaling_group_id: The scaling_group_id of this ShowWarmPoolRequest.
|
|
61
|
+
:type scaling_group_id: str
|
|
62
|
+
"""
|
|
63
|
+
self._scaling_group_id = scaling_group_id
|
|
64
|
+
|
|
65
|
+
def to_dict(self):
|
|
66
|
+
"""Returns the model properties as a dict"""
|
|
67
|
+
result = {}
|
|
68
|
+
|
|
69
|
+
for attr, _ in six.iteritems(self.openapi_types):
|
|
70
|
+
value = getattr(self, attr)
|
|
71
|
+
if isinstance(value, list):
|
|
72
|
+
result[attr] = list(map(
|
|
73
|
+
lambda x: x.to_dict() if hasattr(x, "to_dict") else x,
|
|
74
|
+
value
|
|
75
|
+
))
|
|
76
|
+
elif hasattr(value, "to_dict"):
|
|
77
|
+
result[attr] = value.to_dict()
|
|
78
|
+
elif isinstance(value, dict):
|
|
79
|
+
result[attr] = dict(map(
|
|
80
|
+
lambda item: (item[0], item[1].to_dict())
|
|
81
|
+
if hasattr(item[1], "to_dict") else item,
|
|
82
|
+
value.items()
|
|
83
|
+
))
|
|
84
|
+
else:
|
|
85
|
+
if attr in self.sensitive_list:
|
|
86
|
+
result[attr] = "****"
|
|
87
|
+
else:
|
|
88
|
+
result[attr] = value
|
|
89
|
+
|
|
90
|
+
return result
|
|
91
|
+
|
|
92
|
+
def to_str(self):
|
|
93
|
+
"""Returns the string representation of the model"""
|
|
94
|
+
import simplejson as json
|
|
95
|
+
if six.PY2:
|
|
96
|
+
import sys
|
|
97
|
+
reload(sys)
|
|
98
|
+
sys.setdefaultencoding("utf-8")
|
|
99
|
+
return json.dumps(sanitize_for_serialization(self), ensure_ascii=False)
|
|
100
|
+
|
|
101
|
+
def __repr__(self):
|
|
102
|
+
"""For `print`"""
|
|
103
|
+
return self.to_str()
|
|
104
|
+
|
|
105
|
+
def __eq__(self, other):
|
|
106
|
+
"""Returns true if both objects are equal"""
|
|
107
|
+
if not isinstance(other, ShowWarmPoolRequest):
|
|
108
|
+
return False
|
|
109
|
+
|
|
110
|
+
return self.__dict__ == other.__dict__
|
|
111
|
+
|
|
112
|
+
def __ne__(self, other):
|
|
113
|
+
"""Returns true if both objects are not equal"""
|
|
114
|
+
return not self == other
|
|
@@ -0,0 +1,112 @@
|
|
|
1
|
+
# coding: utf-8
|
|
2
|
+
|
|
3
|
+
import six
|
|
4
|
+
|
|
5
|
+
from huaweicloudsdkcore.sdk_response import SdkResponse
|
|
6
|
+
from huaweicloudsdkcore.utils.http_utils import sanitize_for_serialization
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
class ShowWarmPoolResponse(SdkResponse):
|
|
10
|
+
|
|
11
|
+
"""
|
|
12
|
+
Attributes:
|
|
13
|
+
openapi_types (dict): The key is attribute name
|
|
14
|
+
and the value is attribute type.
|
|
15
|
+
attribute_map (dict): The key is attribute name
|
|
16
|
+
and the value is json key in definition.
|
|
17
|
+
"""
|
|
18
|
+
sensitive_list = []
|
|
19
|
+
|
|
20
|
+
openapi_types = {
|
|
21
|
+
'warm_pool': 'WarmPoolInfo'
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
attribute_map = {
|
|
25
|
+
'warm_pool': 'warm_pool'
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
def __init__(self, warm_pool=None):
|
|
29
|
+
r"""ShowWarmPoolResponse
|
|
30
|
+
|
|
31
|
+
The model defined in huaweicloud sdk
|
|
32
|
+
|
|
33
|
+
:param warm_pool:
|
|
34
|
+
:type warm_pool: :class:`huaweicloudsdkas.v1.WarmPoolInfo`
|
|
35
|
+
"""
|
|
36
|
+
|
|
37
|
+
super(ShowWarmPoolResponse, self).__init__()
|
|
38
|
+
|
|
39
|
+
self._warm_pool = None
|
|
40
|
+
self.discriminator = None
|
|
41
|
+
|
|
42
|
+
if warm_pool is not None:
|
|
43
|
+
self.warm_pool = warm_pool
|
|
44
|
+
|
|
45
|
+
@property
|
|
46
|
+
def warm_pool(self):
|
|
47
|
+
r"""Gets the warm_pool of this ShowWarmPoolResponse.
|
|
48
|
+
|
|
49
|
+
:return: The warm_pool of this ShowWarmPoolResponse.
|
|
50
|
+
:rtype: :class:`huaweicloudsdkas.v1.WarmPoolInfo`
|
|
51
|
+
"""
|
|
52
|
+
return self._warm_pool
|
|
53
|
+
|
|
54
|
+
@warm_pool.setter
|
|
55
|
+
def warm_pool(self, warm_pool):
|
|
56
|
+
r"""Sets the warm_pool of this ShowWarmPoolResponse.
|
|
57
|
+
|
|
58
|
+
:param warm_pool: The warm_pool of this ShowWarmPoolResponse.
|
|
59
|
+
:type warm_pool: :class:`huaweicloudsdkas.v1.WarmPoolInfo`
|
|
60
|
+
"""
|
|
61
|
+
self._warm_pool = warm_pool
|
|
62
|
+
|
|
63
|
+
def to_dict(self):
|
|
64
|
+
"""Returns the model properties as a dict"""
|
|
65
|
+
result = {}
|
|
66
|
+
|
|
67
|
+
for attr, _ in six.iteritems(self.openapi_types):
|
|
68
|
+
value = getattr(self, attr)
|
|
69
|
+
if isinstance(value, list):
|
|
70
|
+
result[attr] = list(map(
|
|
71
|
+
lambda x: x.to_dict() if hasattr(x, "to_dict") else x,
|
|
72
|
+
value
|
|
73
|
+
))
|
|
74
|
+
elif hasattr(value, "to_dict"):
|
|
75
|
+
result[attr] = value.to_dict()
|
|
76
|
+
elif isinstance(value, dict):
|
|
77
|
+
result[attr] = dict(map(
|
|
78
|
+
lambda item: (item[0], item[1].to_dict())
|
|
79
|
+
if hasattr(item[1], "to_dict") else item,
|
|
80
|
+
value.items()
|
|
81
|
+
))
|
|
82
|
+
else:
|
|
83
|
+
if attr in self.sensitive_list:
|
|
84
|
+
result[attr] = "****"
|
|
85
|
+
else:
|
|
86
|
+
result[attr] = value
|
|
87
|
+
|
|
88
|
+
return result
|
|
89
|
+
|
|
90
|
+
def to_str(self):
|
|
91
|
+
"""Returns the string representation of the model"""
|
|
92
|
+
import simplejson as json
|
|
93
|
+
if six.PY2:
|
|
94
|
+
import sys
|
|
95
|
+
reload(sys)
|
|
96
|
+
sys.setdefaultencoding("utf-8")
|
|
97
|
+
return json.dumps(sanitize_for_serialization(self), ensure_ascii=False)
|
|
98
|
+
|
|
99
|
+
def __repr__(self):
|
|
100
|
+
"""For `print`"""
|
|
101
|
+
return self.to_str()
|
|
102
|
+
|
|
103
|
+
def __eq__(self, other):
|
|
104
|
+
"""Returns true if both objects are equal"""
|
|
105
|
+
if not isinstance(other, ShowWarmPoolResponse):
|
|
106
|
+
return False
|
|
107
|
+
|
|
108
|
+
return self.__dict__ == other.__dict__
|
|
109
|
+
|
|
110
|
+
def __ne__(self, other):
|
|
111
|
+
"""Returns true if both objects are not equal"""
|
|
112
|
+
return not self == other
|
|
@@ -0,0 +1,114 @@
|
|
|
1
|
+
# coding: utf-8
|
|
2
|
+
|
|
3
|
+
import six
|
|
4
|
+
|
|
5
|
+
from huaweicloudsdkcore.utils.http_utils import sanitize_for_serialization
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
class UpdateInstanceConfig:
|
|
9
|
+
|
|
10
|
+
"""
|
|
11
|
+
Attributes:
|
|
12
|
+
openapi_types (dict): The key is attribute name
|
|
13
|
+
and the value is attribute type.
|
|
14
|
+
attribute_map (dict): The key is attribute name
|
|
15
|
+
and the value is json key in definition.
|
|
16
|
+
"""
|
|
17
|
+
sensitive_list = []
|
|
18
|
+
|
|
19
|
+
openapi_types = {
|
|
20
|
+
'image_ref': 'str'
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
attribute_map = {
|
|
24
|
+
'image_ref': 'imageRef'
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
def __init__(self, image_ref=None):
|
|
28
|
+
r"""UpdateInstanceConfig
|
|
29
|
+
|
|
30
|
+
The model defined in huaweicloud sdk
|
|
31
|
+
|
|
32
|
+
:param image_ref: 镜像ID
|
|
33
|
+
:type image_ref: str
|
|
34
|
+
"""
|
|
35
|
+
|
|
36
|
+
|
|
37
|
+
|
|
38
|
+
self._image_ref = None
|
|
39
|
+
self.discriminator = None
|
|
40
|
+
|
|
41
|
+
self.image_ref = image_ref
|
|
42
|
+
|
|
43
|
+
@property
|
|
44
|
+
def image_ref(self):
|
|
45
|
+
r"""Gets the image_ref of this UpdateInstanceConfig.
|
|
46
|
+
|
|
47
|
+
镜像ID
|
|
48
|
+
|
|
49
|
+
:return: The image_ref of this UpdateInstanceConfig.
|
|
50
|
+
:rtype: str
|
|
51
|
+
"""
|
|
52
|
+
return self._image_ref
|
|
53
|
+
|
|
54
|
+
@image_ref.setter
|
|
55
|
+
def image_ref(self, image_ref):
|
|
56
|
+
r"""Sets the image_ref of this UpdateInstanceConfig.
|
|
57
|
+
|
|
58
|
+
镜像ID
|
|
59
|
+
|
|
60
|
+
:param image_ref: The image_ref of this UpdateInstanceConfig.
|
|
61
|
+
:type image_ref: str
|
|
62
|
+
"""
|
|
63
|
+
self._image_ref = image_ref
|
|
64
|
+
|
|
65
|
+
def to_dict(self):
|
|
66
|
+
"""Returns the model properties as a dict"""
|
|
67
|
+
result = {}
|
|
68
|
+
|
|
69
|
+
for attr, _ in six.iteritems(self.openapi_types):
|
|
70
|
+
value = getattr(self, attr)
|
|
71
|
+
if isinstance(value, list):
|
|
72
|
+
result[attr] = list(map(
|
|
73
|
+
lambda x: x.to_dict() if hasattr(x, "to_dict") else x,
|
|
74
|
+
value
|
|
75
|
+
))
|
|
76
|
+
elif hasattr(value, "to_dict"):
|
|
77
|
+
result[attr] = value.to_dict()
|
|
78
|
+
elif isinstance(value, dict):
|
|
79
|
+
result[attr] = dict(map(
|
|
80
|
+
lambda item: (item[0], item[1].to_dict())
|
|
81
|
+
if hasattr(item[1], "to_dict") else item,
|
|
82
|
+
value.items()
|
|
83
|
+
))
|
|
84
|
+
else:
|
|
85
|
+
if attr in self.sensitive_list:
|
|
86
|
+
result[attr] = "****"
|
|
87
|
+
else:
|
|
88
|
+
result[attr] = value
|
|
89
|
+
|
|
90
|
+
return result
|
|
91
|
+
|
|
92
|
+
def to_str(self):
|
|
93
|
+
"""Returns the string representation of the model"""
|
|
94
|
+
import simplejson as json
|
|
95
|
+
if six.PY2:
|
|
96
|
+
import sys
|
|
97
|
+
reload(sys)
|
|
98
|
+
sys.setdefaultencoding("utf-8")
|
|
99
|
+
return json.dumps(sanitize_for_serialization(self), ensure_ascii=False)
|
|
100
|
+
|
|
101
|
+
def __repr__(self):
|
|
102
|
+
"""For `print`"""
|
|
103
|
+
return self.to_str()
|
|
104
|
+
|
|
105
|
+
def __eq__(self, other):
|
|
106
|
+
"""Returns true if both objects are equal"""
|
|
107
|
+
if not isinstance(other, UpdateInstanceConfig):
|
|
108
|
+
return False
|
|
109
|
+
|
|
110
|
+
return self.__dict__ == other.__dict__
|
|
111
|
+
|
|
112
|
+
def __ne__(self, other):
|
|
113
|
+
"""Returns true if both objects are not equal"""
|
|
114
|
+
return not self == other
|
|
@@ -0,0 +1,110 @@
|
|
|
1
|
+
# coding: utf-8
|
|
2
|
+
|
|
3
|
+
import six
|
|
4
|
+
|
|
5
|
+
from huaweicloudsdkcore.utils.http_utils import sanitize_for_serialization
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
class UpdateScalingConfigOption:
|
|
9
|
+
|
|
10
|
+
"""
|
|
11
|
+
Attributes:
|
|
12
|
+
openapi_types (dict): The key is attribute name
|
|
13
|
+
and the value is attribute type.
|
|
14
|
+
attribute_map (dict): The key is attribute name
|
|
15
|
+
and the value is json key in definition.
|
|
16
|
+
"""
|
|
17
|
+
sensitive_list = []
|
|
18
|
+
|
|
19
|
+
openapi_types = {
|
|
20
|
+
'instance_config': 'UpdateInstanceConfig'
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
attribute_map = {
|
|
24
|
+
'instance_config': 'instance_config'
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
def __init__(self, instance_config=None):
|
|
28
|
+
r"""UpdateScalingConfigOption
|
|
29
|
+
|
|
30
|
+
The model defined in huaweicloud sdk
|
|
31
|
+
|
|
32
|
+
:param instance_config:
|
|
33
|
+
:type instance_config: :class:`huaweicloudsdkas.v1.UpdateInstanceConfig`
|
|
34
|
+
"""
|
|
35
|
+
|
|
36
|
+
|
|
37
|
+
|
|
38
|
+
self._instance_config = None
|
|
39
|
+
self.discriminator = None
|
|
40
|
+
|
|
41
|
+
self.instance_config = instance_config
|
|
42
|
+
|
|
43
|
+
@property
|
|
44
|
+
def instance_config(self):
|
|
45
|
+
r"""Gets the instance_config of this UpdateScalingConfigOption.
|
|
46
|
+
|
|
47
|
+
:return: The instance_config of this UpdateScalingConfigOption.
|
|
48
|
+
:rtype: :class:`huaweicloudsdkas.v1.UpdateInstanceConfig`
|
|
49
|
+
"""
|
|
50
|
+
return self._instance_config
|
|
51
|
+
|
|
52
|
+
@instance_config.setter
|
|
53
|
+
def instance_config(self, instance_config):
|
|
54
|
+
r"""Sets the instance_config of this UpdateScalingConfigOption.
|
|
55
|
+
|
|
56
|
+
:param instance_config: The instance_config of this UpdateScalingConfigOption.
|
|
57
|
+
:type instance_config: :class:`huaweicloudsdkas.v1.UpdateInstanceConfig`
|
|
58
|
+
"""
|
|
59
|
+
self._instance_config = instance_config
|
|
60
|
+
|
|
61
|
+
def to_dict(self):
|
|
62
|
+
"""Returns the model properties as a dict"""
|
|
63
|
+
result = {}
|
|
64
|
+
|
|
65
|
+
for attr, _ in six.iteritems(self.openapi_types):
|
|
66
|
+
value = getattr(self, attr)
|
|
67
|
+
if isinstance(value, list):
|
|
68
|
+
result[attr] = list(map(
|
|
69
|
+
lambda x: x.to_dict() if hasattr(x, "to_dict") else x,
|
|
70
|
+
value
|
|
71
|
+
))
|
|
72
|
+
elif hasattr(value, "to_dict"):
|
|
73
|
+
result[attr] = value.to_dict()
|
|
74
|
+
elif isinstance(value, dict):
|
|
75
|
+
result[attr] = dict(map(
|
|
76
|
+
lambda item: (item[0], item[1].to_dict())
|
|
77
|
+
if hasattr(item[1], "to_dict") else item,
|
|
78
|
+
value.items()
|
|
79
|
+
))
|
|
80
|
+
else:
|
|
81
|
+
if attr in self.sensitive_list:
|
|
82
|
+
result[attr] = "****"
|
|
83
|
+
else:
|
|
84
|
+
result[attr] = value
|
|
85
|
+
|
|
86
|
+
return result
|
|
87
|
+
|
|
88
|
+
def to_str(self):
|
|
89
|
+
"""Returns the string representation of the model"""
|
|
90
|
+
import simplejson as json
|
|
91
|
+
if six.PY2:
|
|
92
|
+
import sys
|
|
93
|
+
reload(sys)
|
|
94
|
+
sys.setdefaultencoding("utf-8")
|
|
95
|
+
return json.dumps(sanitize_for_serialization(self), ensure_ascii=False)
|
|
96
|
+
|
|
97
|
+
def __repr__(self):
|
|
98
|
+
"""For `print`"""
|
|
99
|
+
return self.to_str()
|
|
100
|
+
|
|
101
|
+
def __eq__(self, other):
|
|
102
|
+
"""Returns true if both objects are equal"""
|
|
103
|
+
if not isinstance(other, UpdateScalingConfigOption):
|
|
104
|
+
return False
|
|
105
|
+
|
|
106
|
+
return self.__dict__ == other.__dict__
|
|
107
|
+
|
|
108
|
+
def __ne__(self, other):
|
|
109
|
+
"""Returns true if both objects are not equal"""
|
|
110
|
+
return not self == other
|
|
@@ -0,0 +1,135 @@
|
|
|
1
|
+
# coding: utf-8
|
|
2
|
+
|
|
3
|
+
import six
|
|
4
|
+
|
|
5
|
+
from huaweicloudsdkcore.utils.http_utils import sanitize_for_serialization
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
class UpdateScalingConfigRequest:
|
|
9
|
+
|
|
10
|
+
"""
|
|
11
|
+
Attributes:
|
|
12
|
+
openapi_types (dict): The key is attribute name
|
|
13
|
+
and the value is attribute type.
|
|
14
|
+
attribute_map (dict): The key is attribute name
|
|
15
|
+
and the value is json key in definition.
|
|
16
|
+
"""
|
|
17
|
+
sensitive_list = []
|
|
18
|
+
|
|
19
|
+
openapi_types = {
|
|
20
|
+
'scaling_configuration_id': 'str',
|
|
21
|
+
'body': 'UpdateScalingConfigOption'
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
attribute_map = {
|
|
25
|
+
'scaling_configuration_id': 'scaling_configuration_id',
|
|
26
|
+
'body': 'body'
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
def __init__(self, scaling_configuration_id=None, body=None):
|
|
30
|
+
r"""UpdateScalingConfigRequest
|
|
31
|
+
|
|
32
|
+
The model defined in huaweicloud sdk
|
|
33
|
+
|
|
34
|
+
:param scaling_configuration_id:
|
|
35
|
+
:type scaling_configuration_id: str
|
|
36
|
+
:param body: Body of the UpdateScalingConfigRequest
|
|
37
|
+
:type body: :class:`huaweicloudsdkas.v1.UpdateScalingConfigOption`
|
|
38
|
+
"""
|
|
39
|
+
|
|
40
|
+
|
|
41
|
+
|
|
42
|
+
self._scaling_configuration_id = None
|
|
43
|
+
self._body = None
|
|
44
|
+
self.discriminator = None
|
|
45
|
+
|
|
46
|
+
self.scaling_configuration_id = scaling_configuration_id
|
|
47
|
+
if body is not None:
|
|
48
|
+
self.body = body
|
|
49
|
+
|
|
50
|
+
@property
|
|
51
|
+
def scaling_configuration_id(self):
|
|
52
|
+
r"""Gets the scaling_configuration_id of this UpdateScalingConfigRequest.
|
|
53
|
+
|
|
54
|
+
:return: The scaling_configuration_id of this UpdateScalingConfigRequest.
|
|
55
|
+
:rtype: str
|
|
56
|
+
"""
|
|
57
|
+
return self._scaling_configuration_id
|
|
58
|
+
|
|
59
|
+
@scaling_configuration_id.setter
|
|
60
|
+
def scaling_configuration_id(self, scaling_configuration_id):
|
|
61
|
+
r"""Sets the scaling_configuration_id of this UpdateScalingConfigRequest.
|
|
62
|
+
|
|
63
|
+
:param scaling_configuration_id: The scaling_configuration_id of this UpdateScalingConfigRequest.
|
|
64
|
+
:type scaling_configuration_id: str
|
|
65
|
+
"""
|
|
66
|
+
self._scaling_configuration_id = scaling_configuration_id
|
|
67
|
+
|
|
68
|
+
@property
|
|
69
|
+
def body(self):
|
|
70
|
+
r"""Gets the body of this UpdateScalingConfigRequest.
|
|
71
|
+
|
|
72
|
+
:return: The body of this UpdateScalingConfigRequest.
|
|
73
|
+
:rtype: :class:`huaweicloudsdkas.v1.UpdateScalingConfigOption`
|
|
74
|
+
"""
|
|
75
|
+
return self._body
|
|
76
|
+
|
|
77
|
+
@body.setter
|
|
78
|
+
def body(self, body):
|
|
79
|
+
r"""Sets the body of this UpdateScalingConfigRequest.
|
|
80
|
+
|
|
81
|
+
:param body: The body of this UpdateScalingConfigRequest.
|
|
82
|
+
:type body: :class:`huaweicloudsdkas.v1.UpdateScalingConfigOption`
|
|
83
|
+
"""
|
|
84
|
+
self._body = body
|
|
85
|
+
|
|
86
|
+
def to_dict(self):
|
|
87
|
+
"""Returns the model properties as a dict"""
|
|
88
|
+
result = {}
|
|
89
|
+
|
|
90
|
+
for attr, _ in six.iteritems(self.openapi_types):
|
|
91
|
+
value = getattr(self, attr)
|
|
92
|
+
if isinstance(value, list):
|
|
93
|
+
result[attr] = list(map(
|
|
94
|
+
lambda x: x.to_dict() if hasattr(x, "to_dict") else x,
|
|
95
|
+
value
|
|
96
|
+
))
|
|
97
|
+
elif hasattr(value, "to_dict"):
|
|
98
|
+
result[attr] = value.to_dict()
|
|
99
|
+
elif isinstance(value, dict):
|
|
100
|
+
result[attr] = dict(map(
|
|
101
|
+
lambda item: (item[0], item[1].to_dict())
|
|
102
|
+
if hasattr(item[1], "to_dict") else item,
|
|
103
|
+
value.items()
|
|
104
|
+
))
|
|
105
|
+
else:
|
|
106
|
+
if attr in self.sensitive_list:
|
|
107
|
+
result[attr] = "****"
|
|
108
|
+
else:
|
|
109
|
+
result[attr] = value
|
|
110
|
+
|
|
111
|
+
return result
|
|
112
|
+
|
|
113
|
+
def to_str(self):
|
|
114
|
+
"""Returns the string representation of the model"""
|
|
115
|
+
import simplejson as json
|
|
116
|
+
if six.PY2:
|
|
117
|
+
import sys
|
|
118
|
+
reload(sys)
|
|
119
|
+
sys.setdefaultencoding("utf-8")
|
|
120
|
+
return json.dumps(sanitize_for_serialization(self), ensure_ascii=False)
|
|
121
|
+
|
|
122
|
+
def __repr__(self):
|
|
123
|
+
"""For `print`"""
|
|
124
|
+
return self.to_str()
|
|
125
|
+
|
|
126
|
+
def __eq__(self, other):
|
|
127
|
+
"""Returns true if both objects are equal"""
|
|
128
|
+
if not isinstance(other, UpdateScalingConfigRequest):
|
|
129
|
+
return False
|
|
130
|
+
|
|
131
|
+
return self.__dict__ == other.__dict__
|
|
132
|
+
|
|
133
|
+
def __ne__(self, other):
|
|
134
|
+
"""Returns true if both objects are not equal"""
|
|
135
|
+
return not self == other
|