huaweicloudsdkdcs 3.1.148__py2.py3-none-any.whl → 3.1.149__py2.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 huaweicloudsdkdcs might be problematic. Click here for more details.
- huaweicloudsdkdcs/v2/__init__.py +29 -0
- huaweicloudsdkdcs/v2/dcs_async_client.py +604 -0
- huaweicloudsdkdcs/v2/dcs_client.py +604 -0
- huaweicloudsdkdcs/v2/model/__init__.py +29 -0
- huaweicloudsdkdcs/v2/model/band_width.py +144 -0
- huaweicloudsdkdcs/v2/model/create_instance_body.py +3 -3
- huaweicloudsdkdcs/v2/model/create_offline_key_analysis_request.py +139 -0
- huaweicloudsdkdcs/v2/model/create_offline_key_analysis_request_body.py +143 -0
- huaweicloudsdkdcs/v2/model/create_offline_key_analysis_response.py +116 -0
- huaweicloudsdkdcs/v2/model/delete_offline_key_analysis_task_request.py +142 -0
- huaweicloudsdkdcs/v2/model/delete_offline_key_analysis_task_response.py +116 -0
- huaweicloudsdkdcs/v2/model/dims_info.py +144 -0
- huaweicloudsdkdcs/v2/model/download_hot_key_request.py +142 -0
- huaweicloudsdkdcs/v2/model/download_hot_key_response.py +85 -0
- huaweicloudsdkdcs/v2/model/key_space.py +202 -0
- huaweicloudsdkdcs/v2/model/key_type_byte.py +144 -0
- huaweicloudsdkdcs/v2/model/key_type_num.py +144 -0
- huaweicloudsdkdcs/v2/model/largest_key.py +202 -0
- huaweicloudsdkdcs/v2/model/largest_key_prefix.py +202 -0
- huaweicloudsdkdcs/v2/model/list_offline_key_analysis_task_request.py +201 -0
- huaweicloudsdkdcs/v2/model/list_offline_key_analysis_task_response.py +174 -0
- huaweicloudsdkdcs/v2/model/migrate_az_request.py +139 -0
- huaweicloudsdkdcs/v2/model/migrate_az_request_body.py +144 -0
- huaweicloudsdkdcs/v2/model/migrate_az_response.py +85 -0
- huaweicloudsdkdcs/v2/model/offline_key_analysis_record.py +231 -0
- huaweicloudsdkdcs/v2/model/rename_command_resp.py +119 -3
- huaweicloudsdkdcs/v2/model/rollback_exchange_instance_ip_request.py +114 -0
- huaweicloudsdkdcs/v2/model/rollback_exchange_instance_ip_response.py +85 -0
- huaweicloudsdkdcs/v2/model/show_instance_topology_request.py +114 -0
- huaweicloudsdkdcs/v2/model/show_instance_topology_response.py +290 -0
- huaweicloudsdkdcs/v2/model/show_offline_key_analysis_task_request.py +142 -0
- huaweicloudsdkdcs/v2/model/show_offline_key_analysis_task_response.py +580 -0
- huaweicloudsdkdcs/v2/model/topology_info.py +538 -0
- huaweicloudsdkdcs/v2/model/update_ip_whitelist_async_request.py +139 -0
- huaweicloudsdkdcs/v2/model/update_ip_whitelist_async_response.py +116 -0
- {huaweicloudsdkdcs-3.1.148.dist-info → huaweicloudsdkdcs-3.1.149.dist-info}/METADATA +2 -2
- {huaweicloudsdkdcs-3.1.148.dist-info → huaweicloudsdkdcs-3.1.149.dist-info}/RECORD +40 -11
- {huaweicloudsdkdcs-3.1.148.dist-info → huaweicloudsdkdcs-3.1.149.dist-info}/LICENSE +0 -0
- {huaweicloudsdkdcs-3.1.148.dist-info → huaweicloudsdkdcs-3.1.149.dist-info}/WHEEL +0 -0
- {huaweicloudsdkdcs-3.1.148.dist-info → huaweicloudsdkdcs-3.1.149.dist-info}/top_level.txt +0 -0
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
# coding: utf-8
|
|
2
|
+
|
|
3
|
+
import six
|
|
4
|
+
|
|
5
|
+
from huaweicloudsdkcore.sdk_stream_response import SdkStreamResponse
|
|
6
|
+
from huaweicloudsdkcore.utils.http_utils import sanitize_for_serialization
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
class DownloadHotKeyResponse(SdkStreamResponse):
|
|
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, response):
|
|
27
|
+
r"""DownloadHotKeyResponse
|
|
28
|
+
|
|
29
|
+
The model defined in huaweicloud sdk
|
|
30
|
+
|
|
31
|
+
"""
|
|
32
|
+
|
|
33
|
+
super(DownloadHotKeyResponse, self).__init__(response)
|
|
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, DownloadHotKeyResponse):
|
|
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,202 @@
|
|
|
1
|
+
# coding: utf-8
|
|
2
|
+
|
|
3
|
+
import six
|
|
4
|
+
|
|
5
|
+
from huaweicloudsdkcore.utils.http_utils import sanitize_for_serialization
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
class KeySpace:
|
|
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
|
+
'db_idx': 'str',
|
|
21
|
+
'keys': 'str',
|
|
22
|
+
'expires': 'str',
|
|
23
|
+
'avg_ttl': 'str'
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
attribute_map = {
|
|
27
|
+
'db_idx': 'db_idx',
|
|
28
|
+
'keys': 'keys',
|
|
29
|
+
'expires': 'expires',
|
|
30
|
+
'avg_ttl': 'avg_ttl'
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
def __init__(self, db_idx=None, keys=None, expires=None, avg_ttl=None):
|
|
34
|
+
r"""KeySpace
|
|
35
|
+
|
|
36
|
+
The model defined in huaweicloud sdk
|
|
37
|
+
|
|
38
|
+
:param db_idx: **参数解释**: db索引值。 **取值范围**: 不涉及。
|
|
39
|
+
:type db_idx: str
|
|
40
|
+
:param keys: **参数解释**: 节点键数量。 **取值范围**: 不涉及。
|
|
41
|
+
:type keys: str
|
|
42
|
+
:param expires: **参数解释**: 节点过期键数量。 **取值范围**: 不涉及。
|
|
43
|
+
:type expires: str
|
|
44
|
+
:param avg_ttl: **参数解释**: 节点键的平均过期时间。 **取值范围**: 不涉及。
|
|
45
|
+
:type avg_ttl: str
|
|
46
|
+
"""
|
|
47
|
+
|
|
48
|
+
|
|
49
|
+
|
|
50
|
+
self._db_idx = None
|
|
51
|
+
self._keys = None
|
|
52
|
+
self._expires = None
|
|
53
|
+
self._avg_ttl = None
|
|
54
|
+
self.discriminator = None
|
|
55
|
+
|
|
56
|
+
if db_idx is not None:
|
|
57
|
+
self.db_idx = db_idx
|
|
58
|
+
if keys is not None:
|
|
59
|
+
self.keys = keys
|
|
60
|
+
if expires is not None:
|
|
61
|
+
self.expires = expires
|
|
62
|
+
if avg_ttl is not None:
|
|
63
|
+
self.avg_ttl = avg_ttl
|
|
64
|
+
|
|
65
|
+
@property
|
|
66
|
+
def db_idx(self):
|
|
67
|
+
r"""Gets the db_idx of this KeySpace.
|
|
68
|
+
|
|
69
|
+
**参数解释**: db索引值。 **取值范围**: 不涉及。
|
|
70
|
+
|
|
71
|
+
:return: The db_idx of this KeySpace.
|
|
72
|
+
:rtype: str
|
|
73
|
+
"""
|
|
74
|
+
return self._db_idx
|
|
75
|
+
|
|
76
|
+
@db_idx.setter
|
|
77
|
+
def db_idx(self, db_idx):
|
|
78
|
+
r"""Sets the db_idx of this KeySpace.
|
|
79
|
+
|
|
80
|
+
**参数解释**: db索引值。 **取值范围**: 不涉及。
|
|
81
|
+
|
|
82
|
+
:param db_idx: The db_idx of this KeySpace.
|
|
83
|
+
:type db_idx: str
|
|
84
|
+
"""
|
|
85
|
+
self._db_idx = db_idx
|
|
86
|
+
|
|
87
|
+
@property
|
|
88
|
+
def keys(self):
|
|
89
|
+
r"""Gets the keys of this KeySpace.
|
|
90
|
+
|
|
91
|
+
**参数解释**: 节点键数量。 **取值范围**: 不涉及。
|
|
92
|
+
|
|
93
|
+
:return: The keys of this KeySpace.
|
|
94
|
+
:rtype: str
|
|
95
|
+
"""
|
|
96
|
+
return self._keys
|
|
97
|
+
|
|
98
|
+
@keys.setter
|
|
99
|
+
def keys(self, keys):
|
|
100
|
+
r"""Sets the keys of this KeySpace.
|
|
101
|
+
|
|
102
|
+
**参数解释**: 节点键数量。 **取值范围**: 不涉及。
|
|
103
|
+
|
|
104
|
+
:param keys: The keys of this KeySpace.
|
|
105
|
+
:type keys: str
|
|
106
|
+
"""
|
|
107
|
+
self._keys = keys
|
|
108
|
+
|
|
109
|
+
@property
|
|
110
|
+
def expires(self):
|
|
111
|
+
r"""Gets the expires of this KeySpace.
|
|
112
|
+
|
|
113
|
+
**参数解释**: 节点过期键数量。 **取值范围**: 不涉及。
|
|
114
|
+
|
|
115
|
+
:return: The expires of this KeySpace.
|
|
116
|
+
:rtype: str
|
|
117
|
+
"""
|
|
118
|
+
return self._expires
|
|
119
|
+
|
|
120
|
+
@expires.setter
|
|
121
|
+
def expires(self, expires):
|
|
122
|
+
r"""Sets the expires of this KeySpace.
|
|
123
|
+
|
|
124
|
+
**参数解释**: 节点过期键数量。 **取值范围**: 不涉及。
|
|
125
|
+
|
|
126
|
+
:param expires: The expires of this KeySpace.
|
|
127
|
+
:type expires: str
|
|
128
|
+
"""
|
|
129
|
+
self._expires = expires
|
|
130
|
+
|
|
131
|
+
@property
|
|
132
|
+
def avg_ttl(self):
|
|
133
|
+
r"""Gets the avg_ttl of this KeySpace.
|
|
134
|
+
|
|
135
|
+
**参数解释**: 节点键的平均过期时间。 **取值范围**: 不涉及。
|
|
136
|
+
|
|
137
|
+
:return: The avg_ttl of this KeySpace.
|
|
138
|
+
:rtype: str
|
|
139
|
+
"""
|
|
140
|
+
return self._avg_ttl
|
|
141
|
+
|
|
142
|
+
@avg_ttl.setter
|
|
143
|
+
def avg_ttl(self, avg_ttl):
|
|
144
|
+
r"""Sets the avg_ttl of this KeySpace.
|
|
145
|
+
|
|
146
|
+
**参数解释**: 节点键的平均过期时间。 **取值范围**: 不涉及。
|
|
147
|
+
|
|
148
|
+
:param avg_ttl: The avg_ttl of this KeySpace.
|
|
149
|
+
:type avg_ttl: str
|
|
150
|
+
"""
|
|
151
|
+
self._avg_ttl = avg_ttl
|
|
152
|
+
|
|
153
|
+
def to_dict(self):
|
|
154
|
+
"""Returns the model properties as a dict"""
|
|
155
|
+
result = {}
|
|
156
|
+
|
|
157
|
+
for attr, _ in six.iteritems(self.openapi_types):
|
|
158
|
+
value = getattr(self, attr)
|
|
159
|
+
if isinstance(value, list):
|
|
160
|
+
result[attr] = list(map(
|
|
161
|
+
lambda x: x.to_dict() if hasattr(x, "to_dict") else x,
|
|
162
|
+
value
|
|
163
|
+
))
|
|
164
|
+
elif hasattr(value, "to_dict"):
|
|
165
|
+
result[attr] = value.to_dict()
|
|
166
|
+
elif isinstance(value, dict):
|
|
167
|
+
result[attr] = dict(map(
|
|
168
|
+
lambda item: (item[0], item[1].to_dict())
|
|
169
|
+
if hasattr(item[1], "to_dict") else item,
|
|
170
|
+
value.items()
|
|
171
|
+
))
|
|
172
|
+
else:
|
|
173
|
+
if attr in self.sensitive_list:
|
|
174
|
+
result[attr] = "****"
|
|
175
|
+
else:
|
|
176
|
+
result[attr] = value
|
|
177
|
+
|
|
178
|
+
return result
|
|
179
|
+
|
|
180
|
+
def to_str(self):
|
|
181
|
+
"""Returns the string representation of the model"""
|
|
182
|
+
import simplejson as json
|
|
183
|
+
if six.PY2:
|
|
184
|
+
import sys
|
|
185
|
+
reload(sys)
|
|
186
|
+
sys.setdefaultencoding("utf-8")
|
|
187
|
+
return json.dumps(sanitize_for_serialization(self), ensure_ascii=False)
|
|
188
|
+
|
|
189
|
+
def __repr__(self):
|
|
190
|
+
"""For `print`"""
|
|
191
|
+
return self.to_str()
|
|
192
|
+
|
|
193
|
+
def __eq__(self, other):
|
|
194
|
+
"""Returns true if both objects are equal"""
|
|
195
|
+
if not isinstance(other, KeySpace):
|
|
196
|
+
return False
|
|
197
|
+
|
|
198
|
+
return self.__dict__ == other.__dict__
|
|
199
|
+
|
|
200
|
+
def __ne__(self, other):
|
|
201
|
+
"""Returns true if both objects are not equal"""
|
|
202
|
+
return not self == other
|
|
@@ -0,0 +1,144 @@
|
|
|
1
|
+
# coding: utf-8
|
|
2
|
+
|
|
3
|
+
import six
|
|
4
|
+
|
|
5
|
+
from huaweicloudsdkcore.utils.http_utils import sanitize_for_serialization
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
class KeyTypeByte:
|
|
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
|
+
'type': 'str',
|
|
21
|
+
'bytes': 'int'
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
attribute_map = {
|
|
25
|
+
'type': 'type',
|
|
26
|
+
'bytes': 'bytes'
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
def __init__(self, type=None, bytes=None):
|
|
30
|
+
r"""KeyTypeByte
|
|
31
|
+
|
|
32
|
+
The model defined in huaweicloud sdk
|
|
33
|
+
|
|
34
|
+
:param type: **参数解释**: Key的数据类型。 **取值范围**: string list set zset hash
|
|
35
|
+
:type type: str
|
|
36
|
+
:param bytes: **参数解释**: 每种数据类型Key的总大小,单位:Bytes。 **取值范围**: 不涉及。
|
|
37
|
+
:type bytes: int
|
|
38
|
+
"""
|
|
39
|
+
|
|
40
|
+
|
|
41
|
+
|
|
42
|
+
self._type = None
|
|
43
|
+
self._bytes = None
|
|
44
|
+
self.discriminator = None
|
|
45
|
+
|
|
46
|
+
if type is not None:
|
|
47
|
+
self.type = type
|
|
48
|
+
if bytes is not None:
|
|
49
|
+
self.bytes = bytes
|
|
50
|
+
|
|
51
|
+
@property
|
|
52
|
+
def type(self):
|
|
53
|
+
r"""Gets the type of this KeyTypeByte.
|
|
54
|
+
|
|
55
|
+
**参数解释**: Key的数据类型。 **取值范围**: string list set zset hash
|
|
56
|
+
|
|
57
|
+
:return: The type of this KeyTypeByte.
|
|
58
|
+
:rtype: str
|
|
59
|
+
"""
|
|
60
|
+
return self._type
|
|
61
|
+
|
|
62
|
+
@type.setter
|
|
63
|
+
def type(self, type):
|
|
64
|
+
r"""Sets the type of this KeyTypeByte.
|
|
65
|
+
|
|
66
|
+
**参数解释**: Key的数据类型。 **取值范围**: string list set zset hash
|
|
67
|
+
|
|
68
|
+
:param type: The type of this KeyTypeByte.
|
|
69
|
+
:type type: str
|
|
70
|
+
"""
|
|
71
|
+
self._type = type
|
|
72
|
+
|
|
73
|
+
@property
|
|
74
|
+
def bytes(self):
|
|
75
|
+
r"""Gets the bytes of this KeyTypeByte.
|
|
76
|
+
|
|
77
|
+
**参数解释**: 每种数据类型Key的总大小,单位:Bytes。 **取值范围**: 不涉及。
|
|
78
|
+
|
|
79
|
+
:return: The bytes of this KeyTypeByte.
|
|
80
|
+
:rtype: int
|
|
81
|
+
"""
|
|
82
|
+
return self._bytes
|
|
83
|
+
|
|
84
|
+
@bytes.setter
|
|
85
|
+
def bytes(self, bytes):
|
|
86
|
+
r"""Sets the bytes of this KeyTypeByte.
|
|
87
|
+
|
|
88
|
+
**参数解释**: 每种数据类型Key的总大小,单位:Bytes。 **取值范围**: 不涉及。
|
|
89
|
+
|
|
90
|
+
:param bytes: The bytes of this KeyTypeByte.
|
|
91
|
+
:type bytes: int
|
|
92
|
+
"""
|
|
93
|
+
self._bytes = bytes
|
|
94
|
+
|
|
95
|
+
def to_dict(self):
|
|
96
|
+
"""Returns the model properties as a dict"""
|
|
97
|
+
result = {}
|
|
98
|
+
|
|
99
|
+
for attr, _ in six.iteritems(self.openapi_types):
|
|
100
|
+
value = getattr(self, attr)
|
|
101
|
+
if isinstance(value, list):
|
|
102
|
+
result[attr] = list(map(
|
|
103
|
+
lambda x: x.to_dict() if hasattr(x, "to_dict") else x,
|
|
104
|
+
value
|
|
105
|
+
))
|
|
106
|
+
elif hasattr(value, "to_dict"):
|
|
107
|
+
result[attr] = value.to_dict()
|
|
108
|
+
elif isinstance(value, dict):
|
|
109
|
+
result[attr] = dict(map(
|
|
110
|
+
lambda item: (item[0], item[1].to_dict())
|
|
111
|
+
if hasattr(item[1], "to_dict") else item,
|
|
112
|
+
value.items()
|
|
113
|
+
))
|
|
114
|
+
else:
|
|
115
|
+
if attr in self.sensitive_list:
|
|
116
|
+
result[attr] = "****"
|
|
117
|
+
else:
|
|
118
|
+
result[attr] = value
|
|
119
|
+
|
|
120
|
+
return result
|
|
121
|
+
|
|
122
|
+
def to_str(self):
|
|
123
|
+
"""Returns the string representation of the model"""
|
|
124
|
+
import simplejson as json
|
|
125
|
+
if six.PY2:
|
|
126
|
+
import sys
|
|
127
|
+
reload(sys)
|
|
128
|
+
sys.setdefaultencoding("utf-8")
|
|
129
|
+
return json.dumps(sanitize_for_serialization(self), ensure_ascii=False)
|
|
130
|
+
|
|
131
|
+
def __repr__(self):
|
|
132
|
+
"""For `print`"""
|
|
133
|
+
return self.to_str()
|
|
134
|
+
|
|
135
|
+
def __eq__(self, other):
|
|
136
|
+
"""Returns true if both objects are equal"""
|
|
137
|
+
if not isinstance(other, KeyTypeByte):
|
|
138
|
+
return False
|
|
139
|
+
|
|
140
|
+
return self.__dict__ == other.__dict__
|
|
141
|
+
|
|
142
|
+
def __ne__(self, other):
|
|
143
|
+
"""Returns true if both objects are not equal"""
|
|
144
|
+
return not self == other
|
|
@@ -0,0 +1,144 @@
|
|
|
1
|
+
# coding: utf-8
|
|
2
|
+
|
|
3
|
+
import six
|
|
4
|
+
|
|
5
|
+
from huaweicloudsdkcore.utils.http_utils import sanitize_for_serialization
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
class KeyTypeNum:
|
|
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
|
+
'type': 'str',
|
|
21
|
+
'num': 'int'
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
attribute_map = {
|
|
25
|
+
'type': 'type',
|
|
26
|
+
'num': 'num'
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
def __init__(self, type=None, num=None):
|
|
30
|
+
r"""KeyTypeNum
|
|
31
|
+
|
|
32
|
+
The model defined in huaweicloud sdk
|
|
33
|
+
|
|
34
|
+
:param type: **参数解释**: Key的数据类型。 **取值范围**: string list set zset hash
|
|
35
|
+
:type type: str
|
|
36
|
+
:param num: **参数解释**: Key类型的总数量。 **取值范围**: 不涉及。
|
|
37
|
+
:type num: int
|
|
38
|
+
"""
|
|
39
|
+
|
|
40
|
+
|
|
41
|
+
|
|
42
|
+
self._type = None
|
|
43
|
+
self._num = None
|
|
44
|
+
self.discriminator = None
|
|
45
|
+
|
|
46
|
+
if type is not None:
|
|
47
|
+
self.type = type
|
|
48
|
+
if num is not None:
|
|
49
|
+
self.num = num
|
|
50
|
+
|
|
51
|
+
@property
|
|
52
|
+
def type(self):
|
|
53
|
+
r"""Gets the type of this KeyTypeNum.
|
|
54
|
+
|
|
55
|
+
**参数解释**: Key的数据类型。 **取值范围**: string list set zset hash
|
|
56
|
+
|
|
57
|
+
:return: The type of this KeyTypeNum.
|
|
58
|
+
:rtype: str
|
|
59
|
+
"""
|
|
60
|
+
return self._type
|
|
61
|
+
|
|
62
|
+
@type.setter
|
|
63
|
+
def type(self, type):
|
|
64
|
+
r"""Sets the type of this KeyTypeNum.
|
|
65
|
+
|
|
66
|
+
**参数解释**: Key的数据类型。 **取值范围**: string list set zset hash
|
|
67
|
+
|
|
68
|
+
:param type: The type of this KeyTypeNum.
|
|
69
|
+
:type type: str
|
|
70
|
+
"""
|
|
71
|
+
self._type = type
|
|
72
|
+
|
|
73
|
+
@property
|
|
74
|
+
def num(self):
|
|
75
|
+
r"""Gets the num of this KeyTypeNum.
|
|
76
|
+
|
|
77
|
+
**参数解释**: Key类型的总数量。 **取值范围**: 不涉及。
|
|
78
|
+
|
|
79
|
+
:return: The num of this KeyTypeNum.
|
|
80
|
+
:rtype: int
|
|
81
|
+
"""
|
|
82
|
+
return self._num
|
|
83
|
+
|
|
84
|
+
@num.setter
|
|
85
|
+
def num(self, num):
|
|
86
|
+
r"""Sets the num of this KeyTypeNum.
|
|
87
|
+
|
|
88
|
+
**参数解释**: Key类型的总数量。 **取值范围**: 不涉及。
|
|
89
|
+
|
|
90
|
+
:param num: The num of this KeyTypeNum.
|
|
91
|
+
:type num: int
|
|
92
|
+
"""
|
|
93
|
+
self._num = num
|
|
94
|
+
|
|
95
|
+
def to_dict(self):
|
|
96
|
+
"""Returns the model properties as a dict"""
|
|
97
|
+
result = {}
|
|
98
|
+
|
|
99
|
+
for attr, _ in six.iteritems(self.openapi_types):
|
|
100
|
+
value = getattr(self, attr)
|
|
101
|
+
if isinstance(value, list):
|
|
102
|
+
result[attr] = list(map(
|
|
103
|
+
lambda x: x.to_dict() if hasattr(x, "to_dict") else x,
|
|
104
|
+
value
|
|
105
|
+
))
|
|
106
|
+
elif hasattr(value, "to_dict"):
|
|
107
|
+
result[attr] = value.to_dict()
|
|
108
|
+
elif isinstance(value, dict):
|
|
109
|
+
result[attr] = dict(map(
|
|
110
|
+
lambda item: (item[0], item[1].to_dict())
|
|
111
|
+
if hasattr(item[1], "to_dict") else item,
|
|
112
|
+
value.items()
|
|
113
|
+
))
|
|
114
|
+
else:
|
|
115
|
+
if attr in self.sensitive_list:
|
|
116
|
+
result[attr] = "****"
|
|
117
|
+
else:
|
|
118
|
+
result[attr] = value
|
|
119
|
+
|
|
120
|
+
return result
|
|
121
|
+
|
|
122
|
+
def to_str(self):
|
|
123
|
+
"""Returns the string representation of the model"""
|
|
124
|
+
import simplejson as json
|
|
125
|
+
if six.PY2:
|
|
126
|
+
import sys
|
|
127
|
+
reload(sys)
|
|
128
|
+
sys.setdefaultencoding("utf-8")
|
|
129
|
+
return json.dumps(sanitize_for_serialization(self), ensure_ascii=False)
|
|
130
|
+
|
|
131
|
+
def __repr__(self):
|
|
132
|
+
"""For `print`"""
|
|
133
|
+
return self.to_str()
|
|
134
|
+
|
|
135
|
+
def __eq__(self, other):
|
|
136
|
+
"""Returns true if both objects are equal"""
|
|
137
|
+
if not isinstance(other, KeyTypeNum):
|
|
138
|
+
return False
|
|
139
|
+
|
|
140
|
+
return self.__dict__ == other.__dict__
|
|
141
|
+
|
|
142
|
+
def __ne__(self, other):
|
|
143
|
+
"""Returns true if both objects are not equal"""
|
|
144
|
+
return not self == other
|