huaweicloudsdkas 3.1.163__py3-none-any.whl → 3.1.165__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 +11 -0
- huaweicloudsdkas/v1/as_async_client.py +266 -0
- huaweicloudsdkas/v1/as_client.py +266 -0
- huaweicloudsdkas/v1/model/__init__.py +11 -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/warm_pool_info.py +202 -0
- huaweicloudsdkas/v1/model/warm_pool_instance.py +202 -0
- {huaweicloudsdkas-3.1.163.dist-info → huaweicloudsdkas-3.1.165.dist-info}/METADATA +2 -2
- {huaweicloudsdkas-3.1.163.dist-info → huaweicloudsdkas-3.1.165.dist-info}/RECORD +20 -9
- {huaweicloudsdkas-3.1.163.dist-info → huaweicloudsdkas-3.1.165.dist-info}/LICENSE +0 -0
- {huaweicloudsdkas-3.1.163.dist-info → huaweicloudsdkas-3.1.165.dist-info}/WHEEL +0 -0
- {huaweicloudsdkas-3.1.163.dist-info → huaweicloudsdkas-3.1.165.dist-info}/top_level.txt +0 -0
|
@@ -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 CloseWarmPoolRequest:
|
|
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"""CloseWarmPoolRequest
|
|
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 CloseWarmPoolRequest.
|
|
46
|
+
|
|
47
|
+
伸缩组ID
|
|
48
|
+
|
|
49
|
+
:return: The scaling_group_id of this CloseWarmPoolRequest.
|
|
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 CloseWarmPoolRequest.
|
|
57
|
+
|
|
58
|
+
伸缩组ID
|
|
59
|
+
|
|
60
|
+
:param scaling_group_id: The scaling_group_id of this CloseWarmPoolRequest.
|
|
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, CloseWarmPoolRequest):
|
|
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,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 CloseWarmPoolResponse(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"""CloseWarmPoolResponse
|
|
28
|
+
|
|
29
|
+
The model defined in huaweicloud sdk
|
|
30
|
+
|
|
31
|
+
"""
|
|
32
|
+
|
|
33
|
+
super(CloseWarmPoolResponse, 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, CloseWarmPoolResponse):
|
|
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,172 @@
|
|
|
1
|
+
# coding: utf-8
|
|
2
|
+
|
|
3
|
+
import six
|
|
4
|
+
|
|
5
|
+
from huaweicloudsdkcore.utils.http_utils import sanitize_for_serialization
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
class ListWarmPoolInstancesRequest:
|
|
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
|
+
'limit': 'int',
|
|
22
|
+
'marker': 'str'
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
attribute_map = {
|
|
26
|
+
'scaling_group_id': 'scaling_group_id',
|
|
27
|
+
'limit': 'limit',
|
|
28
|
+
'marker': 'marker'
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
def __init__(self, scaling_group_id=None, limit=None, marker=None):
|
|
32
|
+
r"""ListWarmPoolInstancesRequest
|
|
33
|
+
|
|
34
|
+
The model defined in huaweicloud sdk
|
|
35
|
+
|
|
36
|
+
:param scaling_group_id: 伸缩组ID
|
|
37
|
+
:type scaling_group_id: str
|
|
38
|
+
:param limit: 查询的记录条数,不传默认20,最大可传入100
|
|
39
|
+
:type limit: int
|
|
40
|
+
:param marker: 查询暖池实例的分页marker
|
|
41
|
+
:type marker: str
|
|
42
|
+
"""
|
|
43
|
+
|
|
44
|
+
|
|
45
|
+
|
|
46
|
+
self._scaling_group_id = None
|
|
47
|
+
self._limit = None
|
|
48
|
+
self._marker = None
|
|
49
|
+
self.discriminator = None
|
|
50
|
+
|
|
51
|
+
self.scaling_group_id = scaling_group_id
|
|
52
|
+
if limit is not None:
|
|
53
|
+
self.limit = limit
|
|
54
|
+
if marker is not None:
|
|
55
|
+
self.marker = marker
|
|
56
|
+
|
|
57
|
+
@property
|
|
58
|
+
def scaling_group_id(self):
|
|
59
|
+
r"""Gets the scaling_group_id of this ListWarmPoolInstancesRequest.
|
|
60
|
+
|
|
61
|
+
伸缩组ID
|
|
62
|
+
|
|
63
|
+
:return: The scaling_group_id of this ListWarmPoolInstancesRequest.
|
|
64
|
+
:rtype: str
|
|
65
|
+
"""
|
|
66
|
+
return self._scaling_group_id
|
|
67
|
+
|
|
68
|
+
@scaling_group_id.setter
|
|
69
|
+
def scaling_group_id(self, scaling_group_id):
|
|
70
|
+
r"""Sets the scaling_group_id of this ListWarmPoolInstancesRequest.
|
|
71
|
+
|
|
72
|
+
伸缩组ID
|
|
73
|
+
|
|
74
|
+
:param scaling_group_id: The scaling_group_id of this ListWarmPoolInstancesRequest.
|
|
75
|
+
:type scaling_group_id: str
|
|
76
|
+
"""
|
|
77
|
+
self._scaling_group_id = scaling_group_id
|
|
78
|
+
|
|
79
|
+
@property
|
|
80
|
+
def limit(self):
|
|
81
|
+
r"""Gets the limit of this ListWarmPoolInstancesRequest.
|
|
82
|
+
|
|
83
|
+
查询的记录条数,不传默认20,最大可传入100
|
|
84
|
+
|
|
85
|
+
:return: The limit of this ListWarmPoolInstancesRequest.
|
|
86
|
+
:rtype: int
|
|
87
|
+
"""
|
|
88
|
+
return self._limit
|
|
89
|
+
|
|
90
|
+
@limit.setter
|
|
91
|
+
def limit(self, limit):
|
|
92
|
+
r"""Sets the limit of this ListWarmPoolInstancesRequest.
|
|
93
|
+
|
|
94
|
+
查询的记录条数,不传默认20,最大可传入100
|
|
95
|
+
|
|
96
|
+
:param limit: The limit of this ListWarmPoolInstancesRequest.
|
|
97
|
+
:type limit: int
|
|
98
|
+
"""
|
|
99
|
+
self._limit = limit
|
|
100
|
+
|
|
101
|
+
@property
|
|
102
|
+
def marker(self):
|
|
103
|
+
r"""Gets the marker of this ListWarmPoolInstancesRequest.
|
|
104
|
+
|
|
105
|
+
查询暖池实例的分页marker
|
|
106
|
+
|
|
107
|
+
:return: The marker of this ListWarmPoolInstancesRequest.
|
|
108
|
+
:rtype: str
|
|
109
|
+
"""
|
|
110
|
+
return self._marker
|
|
111
|
+
|
|
112
|
+
@marker.setter
|
|
113
|
+
def marker(self, marker):
|
|
114
|
+
r"""Sets the marker of this ListWarmPoolInstancesRequest.
|
|
115
|
+
|
|
116
|
+
查询暖池实例的分页marker
|
|
117
|
+
|
|
118
|
+
:param marker: The marker of this ListWarmPoolInstancesRequest.
|
|
119
|
+
:type marker: str
|
|
120
|
+
"""
|
|
121
|
+
self._marker = marker
|
|
122
|
+
|
|
123
|
+
def to_dict(self):
|
|
124
|
+
"""Returns the model properties as a dict"""
|
|
125
|
+
result = {}
|
|
126
|
+
|
|
127
|
+
for attr, _ in six.iteritems(self.openapi_types):
|
|
128
|
+
value = getattr(self, attr)
|
|
129
|
+
if isinstance(value, list):
|
|
130
|
+
result[attr] = list(map(
|
|
131
|
+
lambda x: x.to_dict() if hasattr(x, "to_dict") else x,
|
|
132
|
+
value
|
|
133
|
+
))
|
|
134
|
+
elif hasattr(value, "to_dict"):
|
|
135
|
+
result[attr] = value.to_dict()
|
|
136
|
+
elif isinstance(value, dict):
|
|
137
|
+
result[attr] = dict(map(
|
|
138
|
+
lambda item: (item[0], item[1].to_dict())
|
|
139
|
+
if hasattr(item[1], "to_dict") else item,
|
|
140
|
+
value.items()
|
|
141
|
+
))
|
|
142
|
+
else:
|
|
143
|
+
if attr in self.sensitive_list:
|
|
144
|
+
result[attr] = "****"
|
|
145
|
+
else:
|
|
146
|
+
result[attr] = value
|
|
147
|
+
|
|
148
|
+
return result
|
|
149
|
+
|
|
150
|
+
def to_str(self):
|
|
151
|
+
"""Returns the string representation of the model"""
|
|
152
|
+
import simplejson as json
|
|
153
|
+
if six.PY2:
|
|
154
|
+
import sys
|
|
155
|
+
reload(sys)
|
|
156
|
+
sys.setdefaultencoding("utf-8")
|
|
157
|
+
return json.dumps(sanitize_for_serialization(self), ensure_ascii=False)
|
|
158
|
+
|
|
159
|
+
def __repr__(self):
|
|
160
|
+
"""For `print`"""
|
|
161
|
+
return self.to_str()
|
|
162
|
+
|
|
163
|
+
def __eq__(self, other):
|
|
164
|
+
"""Returns true if both objects are equal"""
|
|
165
|
+
if not isinstance(other, ListWarmPoolInstancesRequest):
|
|
166
|
+
return False
|
|
167
|
+
|
|
168
|
+
return self.__dict__ == other.__dict__
|
|
169
|
+
|
|
170
|
+
def __ne__(self, other):
|
|
171
|
+
"""Returns true if both objects are not equal"""
|
|
172
|
+
return not self == other
|
|
@@ -0,0 +1,141 @@
|
|
|
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 ListWarmPoolInstancesResponse(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
|
+
'page_info': 'PageInfo',
|
|
22
|
+
'warm_pool_instances': 'list[WarmPoolInstance]'
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
attribute_map = {
|
|
26
|
+
'page_info': 'page_info',
|
|
27
|
+
'warm_pool_instances': 'warm_pool_instances'
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
def __init__(self, page_info=None, warm_pool_instances=None):
|
|
31
|
+
r"""ListWarmPoolInstancesResponse
|
|
32
|
+
|
|
33
|
+
The model defined in huaweicloud sdk
|
|
34
|
+
|
|
35
|
+
:param page_info:
|
|
36
|
+
:type page_info: :class:`huaweicloudsdkas.v1.PageInfo`
|
|
37
|
+
:param warm_pool_instances: 暖池实例列表
|
|
38
|
+
:type warm_pool_instances: list[:class:`huaweicloudsdkas.v1.WarmPoolInstance`]
|
|
39
|
+
"""
|
|
40
|
+
|
|
41
|
+
super(ListWarmPoolInstancesResponse, self).__init__()
|
|
42
|
+
|
|
43
|
+
self._page_info = None
|
|
44
|
+
self._warm_pool_instances = None
|
|
45
|
+
self.discriminator = None
|
|
46
|
+
|
|
47
|
+
if page_info is not None:
|
|
48
|
+
self.page_info = page_info
|
|
49
|
+
if warm_pool_instances is not None:
|
|
50
|
+
self.warm_pool_instances = warm_pool_instances
|
|
51
|
+
|
|
52
|
+
@property
|
|
53
|
+
def page_info(self):
|
|
54
|
+
r"""Gets the page_info of this ListWarmPoolInstancesResponse.
|
|
55
|
+
|
|
56
|
+
:return: The page_info of this ListWarmPoolInstancesResponse.
|
|
57
|
+
:rtype: :class:`huaweicloudsdkas.v1.PageInfo`
|
|
58
|
+
"""
|
|
59
|
+
return self._page_info
|
|
60
|
+
|
|
61
|
+
@page_info.setter
|
|
62
|
+
def page_info(self, page_info):
|
|
63
|
+
r"""Sets the page_info of this ListWarmPoolInstancesResponse.
|
|
64
|
+
|
|
65
|
+
:param page_info: The page_info of this ListWarmPoolInstancesResponse.
|
|
66
|
+
:type page_info: :class:`huaweicloudsdkas.v1.PageInfo`
|
|
67
|
+
"""
|
|
68
|
+
self._page_info = page_info
|
|
69
|
+
|
|
70
|
+
@property
|
|
71
|
+
def warm_pool_instances(self):
|
|
72
|
+
r"""Gets the warm_pool_instances of this ListWarmPoolInstancesResponse.
|
|
73
|
+
|
|
74
|
+
暖池实例列表
|
|
75
|
+
|
|
76
|
+
:return: The warm_pool_instances of this ListWarmPoolInstancesResponse.
|
|
77
|
+
:rtype: list[:class:`huaweicloudsdkas.v1.WarmPoolInstance`]
|
|
78
|
+
"""
|
|
79
|
+
return self._warm_pool_instances
|
|
80
|
+
|
|
81
|
+
@warm_pool_instances.setter
|
|
82
|
+
def warm_pool_instances(self, warm_pool_instances):
|
|
83
|
+
r"""Sets the warm_pool_instances of this ListWarmPoolInstancesResponse.
|
|
84
|
+
|
|
85
|
+
暖池实例列表
|
|
86
|
+
|
|
87
|
+
:param warm_pool_instances: The warm_pool_instances of this ListWarmPoolInstancesResponse.
|
|
88
|
+
:type warm_pool_instances: list[:class:`huaweicloudsdkas.v1.WarmPoolInstance`]
|
|
89
|
+
"""
|
|
90
|
+
self._warm_pool_instances = warm_pool_instances
|
|
91
|
+
|
|
92
|
+
def to_dict(self):
|
|
93
|
+
"""Returns the model properties as a dict"""
|
|
94
|
+
result = {}
|
|
95
|
+
|
|
96
|
+
for attr, _ in six.iteritems(self.openapi_types):
|
|
97
|
+
value = getattr(self, attr)
|
|
98
|
+
if isinstance(value, list):
|
|
99
|
+
result[attr] = list(map(
|
|
100
|
+
lambda x: x.to_dict() if hasattr(x, "to_dict") else x,
|
|
101
|
+
value
|
|
102
|
+
))
|
|
103
|
+
elif hasattr(value, "to_dict"):
|
|
104
|
+
result[attr] = value.to_dict()
|
|
105
|
+
elif isinstance(value, dict):
|
|
106
|
+
result[attr] = dict(map(
|
|
107
|
+
lambda item: (item[0], item[1].to_dict())
|
|
108
|
+
if hasattr(item[1], "to_dict") else item,
|
|
109
|
+
value.items()
|
|
110
|
+
))
|
|
111
|
+
else:
|
|
112
|
+
if attr in self.sensitive_list:
|
|
113
|
+
result[attr] = "****"
|
|
114
|
+
else:
|
|
115
|
+
result[attr] = value
|
|
116
|
+
|
|
117
|
+
return result
|
|
118
|
+
|
|
119
|
+
def to_str(self):
|
|
120
|
+
"""Returns the string representation of the model"""
|
|
121
|
+
import simplejson as json
|
|
122
|
+
if six.PY2:
|
|
123
|
+
import sys
|
|
124
|
+
reload(sys)
|
|
125
|
+
sys.setdefaultencoding("utf-8")
|
|
126
|
+
return json.dumps(sanitize_for_serialization(self), ensure_ascii=False)
|
|
127
|
+
|
|
128
|
+
def __repr__(self):
|
|
129
|
+
"""For `print`"""
|
|
130
|
+
return self.to_str()
|
|
131
|
+
|
|
132
|
+
def __eq__(self, other):
|
|
133
|
+
"""Returns true if both objects are equal"""
|
|
134
|
+
if not isinstance(other, ListWarmPoolInstancesResponse):
|
|
135
|
+
return False
|
|
136
|
+
|
|
137
|
+
return self.__dict__ == other.__dict__
|
|
138
|
+
|
|
139
|
+
def __ne__(self, other):
|
|
140
|
+
"""Returns true if both objects are not equal"""
|
|
141
|
+
return not self == other
|
|
@@ -0,0 +1,173 @@
|
|
|
1
|
+
# coding: utf-8
|
|
2
|
+
|
|
3
|
+
import six
|
|
4
|
+
|
|
5
|
+
from huaweicloudsdkcore.utils.http_utils import sanitize_for_serialization
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
class PutWarmPoolOption:
|
|
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
|
+
'min_capacity': 'int',
|
|
21
|
+
'max_capacity': 'int',
|
|
22
|
+
'instance_init_wait_time': 'int'
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
attribute_map = {
|
|
26
|
+
'min_capacity': 'min_capacity',
|
|
27
|
+
'max_capacity': 'max_capacity',
|
|
28
|
+
'instance_init_wait_time': 'instance_init_wait_time'
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
def __init__(self, min_capacity=None, max_capacity=None, instance_init_wait_time=None):
|
|
32
|
+
r"""PutWarmPoolOption
|
|
33
|
+
|
|
34
|
+
The model defined in huaweicloud sdk
|
|
35
|
+
|
|
36
|
+
:param min_capacity: 暖池最小容量,暖池最小与最大容量必须同时填写或不填写。暖池最小容量和最大容量填写时必须相等
|
|
37
|
+
:type min_capacity: int
|
|
38
|
+
:param max_capacity: 暖池最大容量,暖池最小与最大容量必须同时填写或不填写。暖池最小容量和最大容量填写时必须相等
|
|
39
|
+
:type max_capacity: int
|
|
40
|
+
:param instance_init_wait_time: 实例初始化等待时间,单位:秒
|
|
41
|
+
:type instance_init_wait_time: int
|
|
42
|
+
"""
|
|
43
|
+
|
|
44
|
+
|
|
45
|
+
|
|
46
|
+
self._min_capacity = None
|
|
47
|
+
self._max_capacity = None
|
|
48
|
+
self._instance_init_wait_time = None
|
|
49
|
+
self.discriminator = None
|
|
50
|
+
|
|
51
|
+
if min_capacity is not None:
|
|
52
|
+
self.min_capacity = min_capacity
|
|
53
|
+
if max_capacity is not None:
|
|
54
|
+
self.max_capacity = max_capacity
|
|
55
|
+
if instance_init_wait_time is not None:
|
|
56
|
+
self.instance_init_wait_time = instance_init_wait_time
|
|
57
|
+
|
|
58
|
+
@property
|
|
59
|
+
def min_capacity(self):
|
|
60
|
+
r"""Gets the min_capacity of this PutWarmPoolOption.
|
|
61
|
+
|
|
62
|
+
暖池最小容量,暖池最小与最大容量必须同时填写或不填写。暖池最小容量和最大容量填写时必须相等
|
|
63
|
+
|
|
64
|
+
:return: The min_capacity of this PutWarmPoolOption.
|
|
65
|
+
:rtype: int
|
|
66
|
+
"""
|
|
67
|
+
return self._min_capacity
|
|
68
|
+
|
|
69
|
+
@min_capacity.setter
|
|
70
|
+
def min_capacity(self, min_capacity):
|
|
71
|
+
r"""Sets the min_capacity of this PutWarmPoolOption.
|
|
72
|
+
|
|
73
|
+
暖池最小容量,暖池最小与最大容量必须同时填写或不填写。暖池最小容量和最大容量填写时必须相等
|
|
74
|
+
|
|
75
|
+
:param min_capacity: The min_capacity of this PutWarmPoolOption.
|
|
76
|
+
:type min_capacity: int
|
|
77
|
+
"""
|
|
78
|
+
self._min_capacity = min_capacity
|
|
79
|
+
|
|
80
|
+
@property
|
|
81
|
+
def max_capacity(self):
|
|
82
|
+
r"""Gets the max_capacity of this PutWarmPoolOption.
|
|
83
|
+
|
|
84
|
+
暖池最大容量,暖池最小与最大容量必须同时填写或不填写。暖池最小容量和最大容量填写时必须相等
|
|
85
|
+
|
|
86
|
+
:return: The max_capacity of this PutWarmPoolOption.
|
|
87
|
+
:rtype: int
|
|
88
|
+
"""
|
|
89
|
+
return self._max_capacity
|
|
90
|
+
|
|
91
|
+
@max_capacity.setter
|
|
92
|
+
def max_capacity(self, max_capacity):
|
|
93
|
+
r"""Sets the max_capacity of this PutWarmPoolOption.
|
|
94
|
+
|
|
95
|
+
暖池最大容量,暖池最小与最大容量必须同时填写或不填写。暖池最小容量和最大容量填写时必须相等
|
|
96
|
+
|
|
97
|
+
:param max_capacity: The max_capacity of this PutWarmPoolOption.
|
|
98
|
+
:type max_capacity: int
|
|
99
|
+
"""
|
|
100
|
+
self._max_capacity = max_capacity
|
|
101
|
+
|
|
102
|
+
@property
|
|
103
|
+
def instance_init_wait_time(self):
|
|
104
|
+
r"""Gets the instance_init_wait_time of this PutWarmPoolOption.
|
|
105
|
+
|
|
106
|
+
实例初始化等待时间,单位:秒
|
|
107
|
+
|
|
108
|
+
:return: The instance_init_wait_time of this PutWarmPoolOption.
|
|
109
|
+
:rtype: int
|
|
110
|
+
"""
|
|
111
|
+
return self._instance_init_wait_time
|
|
112
|
+
|
|
113
|
+
@instance_init_wait_time.setter
|
|
114
|
+
def instance_init_wait_time(self, instance_init_wait_time):
|
|
115
|
+
r"""Sets the instance_init_wait_time of this PutWarmPoolOption.
|
|
116
|
+
|
|
117
|
+
实例初始化等待时间,单位:秒
|
|
118
|
+
|
|
119
|
+
:param instance_init_wait_time: The instance_init_wait_time of this PutWarmPoolOption.
|
|
120
|
+
:type instance_init_wait_time: int
|
|
121
|
+
"""
|
|
122
|
+
self._instance_init_wait_time = instance_init_wait_time
|
|
123
|
+
|
|
124
|
+
def to_dict(self):
|
|
125
|
+
"""Returns the model properties as a dict"""
|
|
126
|
+
result = {}
|
|
127
|
+
|
|
128
|
+
for attr, _ in six.iteritems(self.openapi_types):
|
|
129
|
+
value = getattr(self, attr)
|
|
130
|
+
if isinstance(value, list):
|
|
131
|
+
result[attr] = list(map(
|
|
132
|
+
lambda x: x.to_dict() if hasattr(x, "to_dict") else x,
|
|
133
|
+
value
|
|
134
|
+
))
|
|
135
|
+
elif hasattr(value, "to_dict"):
|
|
136
|
+
result[attr] = value.to_dict()
|
|
137
|
+
elif isinstance(value, dict):
|
|
138
|
+
result[attr] = dict(map(
|
|
139
|
+
lambda item: (item[0], item[1].to_dict())
|
|
140
|
+
if hasattr(item[1], "to_dict") else item,
|
|
141
|
+
value.items()
|
|
142
|
+
))
|
|
143
|
+
else:
|
|
144
|
+
if attr in self.sensitive_list:
|
|
145
|
+
result[attr] = "****"
|
|
146
|
+
else:
|
|
147
|
+
result[attr] = value
|
|
148
|
+
|
|
149
|
+
return result
|
|
150
|
+
|
|
151
|
+
def to_str(self):
|
|
152
|
+
"""Returns the string representation of the model"""
|
|
153
|
+
import simplejson as json
|
|
154
|
+
if six.PY2:
|
|
155
|
+
import sys
|
|
156
|
+
reload(sys)
|
|
157
|
+
sys.setdefaultencoding("utf-8")
|
|
158
|
+
return json.dumps(sanitize_for_serialization(self), ensure_ascii=False)
|
|
159
|
+
|
|
160
|
+
def __repr__(self):
|
|
161
|
+
"""For `print`"""
|
|
162
|
+
return self.to_str()
|
|
163
|
+
|
|
164
|
+
def __eq__(self, other):
|
|
165
|
+
"""Returns true if both objects are equal"""
|
|
166
|
+
if not isinstance(other, PutWarmPoolOption):
|
|
167
|
+
return False
|
|
168
|
+
|
|
169
|
+
return self.__dict__ == other.__dict__
|
|
170
|
+
|
|
171
|
+
def __ne__(self, other):
|
|
172
|
+
"""Returns true if both objects are not equal"""
|
|
173
|
+
return not self == other
|