huaweicloudsdkims 3.1.144__py2.py3-none-any.whl → 3.1.146__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.
- huaweicloudsdkims/v2/__init__.py +8 -0
- huaweicloudsdkims/v2/ims_async_client.py +199 -0
- huaweicloudsdkims/v2/ims_client.py +199 -0
- huaweicloudsdkims/v2/model/__init__.py +8 -0
- huaweicloudsdkims/v2/model/batch_delete_tags_request.py +139 -0
- huaweicloudsdkims/v2/model/batch_delete_tags_request_body.py +114 -0
- huaweicloudsdkims/v2/model/batch_delete_tags_response.py +85 -0
- huaweicloudsdkims/v2/model/image_member.py +310 -0
- huaweicloudsdkims/v2/model/list_image_members_request.py +114 -0
- huaweicloudsdkims/v2/model/list_image_members_response.py +145 -0
- huaweicloudsdkims/v2/model/show_image_member_request.py +142 -0
- huaweicloudsdkims/v2/model/show_image_member_response.py +319 -0
- {huaweicloudsdkims-3.1.144.dist-info → huaweicloudsdkims-3.1.146.dist-info}/METADATA +2 -2
- {huaweicloudsdkims-3.1.144.dist-info → huaweicloudsdkims-3.1.146.dist-info}/RECORD +17 -9
- {huaweicloudsdkims-3.1.144.dist-info → huaweicloudsdkims-3.1.146.dist-info}/LICENSE +0 -0
- {huaweicloudsdkims-3.1.144.dist-info → huaweicloudsdkims-3.1.146.dist-info}/WHEEL +0 -0
- {huaweicloudsdkims-3.1.144.dist-info → huaweicloudsdkims-3.1.146.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 BatchDeleteTagsRequestBody:
|
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
|
+
'tags': 'list[ResourceTag]'
|
21
|
+
}
|
22
|
+
|
23
|
+
attribute_map = {
|
24
|
+
'tags': 'tags'
|
25
|
+
}
|
26
|
+
|
27
|
+
def __init__(self, tags=None):
|
28
|
+
r"""BatchDeleteTagsRequestBody
|
29
|
+
|
30
|
+
The model defined in huaweicloud sdk
|
31
|
+
|
32
|
+
:param tags: 需要删除的标签键值对集合。
|
33
|
+
:type tags: list[:class:`huaweicloudsdkims.v2.ResourceTag`]
|
34
|
+
"""
|
35
|
+
|
36
|
+
|
37
|
+
|
38
|
+
self._tags = None
|
39
|
+
self.discriminator = None
|
40
|
+
|
41
|
+
self.tags = tags
|
42
|
+
|
43
|
+
@property
|
44
|
+
def tags(self):
|
45
|
+
r"""Gets the tags of this BatchDeleteTagsRequestBody.
|
46
|
+
|
47
|
+
需要删除的标签键值对集合。
|
48
|
+
|
49
|
+
:return: The tags of this BatchDeleteTagsRequestBody.
|
50
|
+
:rtype: list[:class:`huaweicloudsdkims.v2.ResourceTag`]
|
51
|
+
"""
|
52
|
+
return self._tags
|
53
|
+
|
54
|
+
@tags.setter
|
55
|
+
def tags(self, tags):
|
56
|
+
r"""Sets the tags of this BatchDeleteTagsRequestBody.
|
57
|
+
|
58
|
+
需要删除的标签键值对集合。
|
59
|
+
|
60
|
+
:param tags: The tags of this BatchDeleteTagsRequestBody.
|
61
|
+
:type tags: list[:class:`huaweicloudsdkims.v2.ResourceTag`]
|
62
|
+
"""
|
63
|
+
self._tags = tags
|
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, BatchDeleteTagsRequestBody):
|
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 BatchDeleteTagsResponse(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"""BatchDeleteTagsResponse
|
28
|
+
|
29
|
+
The model defined in huaweicloud sdk
|
30
|
+
|
31
|
+
"""
|
32
|
+
|
33
|
+
super(BatchDeleteTagsResponse, 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, BatchDeleteTagsResponse):
|
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,310 @@
|
|
1
|
+
# coding: utf-8
|
2
|
+
|
3
|
+
import six
|
4
|
+
|
5
|
+
from huaweicloudsdkcore.utils.http_utils import sanitize_for_serialization
|
6
|
+
|
7
|
+
|
8
|
+
class ImageMember:
|
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
|
+
'status': 'str',
|
21
|
+
'created_at': 'str',
|
22
|
+
'updated_at': 'str',
|
23
|
+
'image_id': 'str',
|
24
|
+
'member_id': 'str',
|
25
|
+
'schema': 'str',
|
26
|
+
'member_type': 'str',
|
27
|
+
'urn': 'str'
|
28
|
+
}
|
29
|
+
|
30
|
+
attribute_map = {
|
31
|
+
'status': 'status',
|
32
|
+
'created_at': 'created_at',
|
33
|
+
'updated_at': 'updated_at',
|
34
|
+
'image_id': 'image_id',
|
35
|
+
'member_id': 'member_id',
|
36
|
+
'schema': 'schema',
|
37
|
+
'member_type': 'member_type',
|
38
|
+
'urn': 'urn'
|
39
|
+
}
|
40
|
+
|
41
|
+
def __init__(self, status=None, created_at=None, updated_at=None, image_id=None, member_id=None, schema=None, member_type=None, urn=None):
|
42
|
+
r"""ImageMember
|
43
|
+
|
44
|
+
The model defined in huaweicloud sdk
|
45
|
+
|
46
|
+
:param status: 共享状态
|
47
|
+
:type status: str
|
48
|
+
:param created_at: 共享时间,格式为UTC时间
|
49
|
+
:type created_at: str
|
50
|
+
:param updated_at: 更新时间,格式为UTC时间
|
51
|
+
:type updated_at: str
|
52
|
+
:param image_id: 镜像ID
|
53
|
+
:type image_id: str
|
54
|
+
:param member_id: 成员ID
|
55
|
+
:type member_id: str
|
56
|
+
:param schema: 共享视图
|
57
|
+
:type schema: str
|
58
|
+
:param member_type: 共享成员类型
|
59
|
+
:type member_type: str
|
60
|
+
:param urn: 共享组织的URN,仅当member_type类型为organization时,才会返回urn字段。
|
61
|
+
:type urn: str
|
62
|
+
"""
|
63
|
+
|
64
|
+
|
65
|
+
|
66
|
+
self._status = None
|
67
|
+
self._created_at = None
|
68
|
+
self._updated_at = None
|
69
|
+
self._image_id = None
|
70
|
+
self._member_id = None
|
71
|
+
self._schema = None
|
72
|
+
self._member_type = None
|
73
|
+
self._urn = None
|
74
|
+
self.discriminator = None
|
75
|
+
|
76
|
+
self.status = status
|
77
|
+
self.created_at = created_at
|
78
|
+
self.updated_at = updated_at
|
79
|
+
self.image_id = image_id
|
80
|
+
self.member_id = member_id
|
81
|
+
self.schema = schema
|
82
|
+
self.member_type = member_type
|
83
|
+
self.urn = urn
|
84
|
+
|
85
|
+
@property
|
86
|
+
def status(self):
|
87
|
+
r"""Gets the status of this ImageMember.
|
88
|
+
|
89
|
+
共享状态
|
90
|
+
|
91
|
+
:return: The status of this ImageMember.
|
92
|
+
:rtype: str
|
93
|
+
"""
|
94
|
+
return self._status
|
95
|
+
|
96
|
+
@status.setter
|
97
|
+
def status(self, status):
|
98
|
+
r"""Sets the status of this ImageMember.
|
99
|
+
|
100
|
+
共享状态
|
101
|
+
|
102
|
+
:param status: The status of this ImageMember.
|
103
|
+
:type status: str
|
104
|
+
"""
|
105
|
+
self._status = status
|
106
|
+
|
107
|
+
@property
|
108
|
+
def created_at(self):
|
109
|
+
r"""Gets the created_at of this ImageMember.
|
110
|
+
|
111
|
+
共享时间,格式为UTC时间
|
112
|
+
|
113
|
+
:return: The created_at of this ImageMember.
|
114
|
+
:rtype: str
|
115
|
+
"""
|
116
|
+
return self._created_at
|
117
|
+
|
118
|
+
@created_at.setter
|
119
|
+
def created_at(self, created_at):
|
120
|
+
r"""Sets the created_at of this ImageMember.
|
121
|
+
|
122
|
+
共享时间,格式为UTC时间
|
123
|
+
|
124
|
+
:param created_at: The created_at of this ImageMember.
|
125
|
+
:type created_at: str
|
126
|
+
"""
|
127
|
+
self._created_at = created_at
|
128
|
+
|
129
|
+
@property
|
130
|
+
def updated_at(self):
|
131
|
+
r"""Gets the updated_at of this ImageMember.
|
132
|
+
|
133
|
+
更新时间,格式为UTC时间
|
134
|
+
|
135
|
+
:return: The updated_at of this ImageMember.
|
136
|
+
:rtype: str
|
137
|
+
"""
|
138
|
+
return self._updated_at
|
139
|
+
|
140
|
+
@updated_at.setter
|
141
|
+
def updated_at(self, updated_at):
|
142
|
+
r"""Sets the updated_at of this ImageMember.
|
143
|
+
|
144
|
+
更新时间,格式为UTC时间
|
145
|
+
|
146
|
+
:param updated_at: The updated_at of this ImageMember.
|
147
|
+
:type updated_at: str
|
148
|
+
"""
|
149
|
+
self._updated_at = updated_at
|
150
|
+
|
151
|
+
@property
|
152
|
+
def image_id(self):
|
153
|
+
r"""Gets the image_id of this ImageMember.
|
154
|
+
|
155
|
+
镜像ID
|
156
|
+
|
157
|
+
:return: The image_id of this ImageMember.
|
158
|
+
:rtype: str
|
159
|
+
"""
|
160
|
+
return self._image_id
|
161
|
+
|
162
|
+
@image_id.setter
|
163
|
+
def image_id(self, image_id):
|
164
|
+
r"""Sets the image_id of this ImageMember.
|
165
|
+
|
166
|
+
镜像ID
|
167
|
+
|
168
|
+
:param image_id: The image_id of this ImageMember.
|
169
|
+
:type image_id: str
|
170
|
+
"""
|
171
|
+
self._image_id = image_id
|
172
|
+
|
173
|
+
@property
|
174
|
+
def member_id(self):
|
175
|
+
r"""Gets the member_id of this ImageMember.
|
176
|
+
|
177
|
+
成员ID
|
178
|
+
|
179
|
+
:return: The member_id of this ImageMember.
|
180
|
+
:rtype: str
|
181
|
+
"""
|
182
|
+
return self._member_id
|
183
|
+
|
184
|
+
@member_id.setter
|
185
|
+
def member_id(self, member_id):
|
186
|
+
r"""Sets the member_id of this ImageMember.
|
187
|
+
|
188
|
+
成员ID
|
189
|
+
|
190
|
+
:param member_id: The member_id of this ImageMember.
|
191
|
+
:type member_id: str
|
192
|
+
"""
|
193
|
+
self._member_id = member_id
|
194
|
+
|
195
|
+
@property
|
196
|
+
def schema(self):
|
197
|
+
r"""Gets the schema of this ImageMember.
|
198
|
+
|
199
|
+
共享视图
|
200
|
+
|
201
|
+
:return: The schema of this ImageMember.
|
202
|
+
:rtype: str
|
203
|
+
"""
|
204
|
+
return self._schema
|
205
|
+
|
206
|
+
@schema.setter
|
207
|
+
def schema(self, schema):
|
208
|
+
r"""Sets the schema of this ImageMember.
|
209
|
+
|
210
|
+
共享视图
|
211
|
+
|
212
|
+
:param schema: The schema of this ImageMember.
|
213
|
+
:type schema: str
|
214
|
+
"""
|
215
|
+
self._schema = schema
|
216
|
+
|
217
|
+
@property
|
218
|
+
def member_type(self):
|
219
|
+
r"""Gets the member_type of this ImageMember.
|
220
|
+
|
221
|
+
共享成员类型
|
222
|
+
|
223
|
+
:return: The member_type of this ImageMember.
|
224
|
+
:rtype: str
|
225
|
+
"""
|
226
|
+
return self._member_type
|
227
|
+
|
228
|
+
@member_type.setter
|
229
|
+
def member_type(self, member_type):
|
230
|
+
r"""Sets the member_type of this ImageMember.
|
231
|
+
|
232
|
+
共享成员类型
|
233
|
+
|
234
|
+
:param member_type: The member_type of this ImageMember.
|
235
|
+
:type member_type: str
|
236
|
+
"""
|
237
|
+
self._member_type = member_type
|
238
|
+
|
239
|
+
@property
|
240
|
+
def urn(self):
|
241
|
+
r"""Gets the urn of this ImageMember.
|
242
|
+
|
243
|
+
共享组织的URN,仅当member_type类型为organization时,才会返回urn字段。
|
244
|
+
|
245
|
+
:return: The urn of this ImageMember.
|
246
|
+
:rtype: str
|
247
|
+
"""
|
248
|
+
return self._urn
|
249
|
+
|
250
|
+
@urn.setter
|
251
|
+
def urn(self, urn):
|
252
|
+
r"""Sets the urn of this ImageMember.
|
253
|
+
|
254
|
+
共享组织的URN,仅当member_type类型为organization时,才会返回urn字段。
|
255
|
+
|
256
|
+
:param urn: The urn of this ImageMember.
|
257
|
+
:type urn: str
|
258
|
+
"""
|
259
|
+
self._urn = urn
|
260
|
+
|
261
|
+
def to_dict(self):
|
262
|
+
"""Returns the model properties as a dict"""
|
263
|
+
result = {}
|
264
|
+
|
265
|
+
for attr, _ in six.iteritems(self.openapi_types):
|
266
|
+
value = getattr(self, attr)
|
267
|
+
if isinstance(value, list):
|
268
|
+
result[attr] = list(map(
|
269
|
+
lambda x: x.to_dict() if hasattr(x, "to_dict") else x,
|
270
|
+
value
|
271
|
+
))
|
272
|
+
elif hasattr(value, "to_dict"):
|
273
|
+
result[attr] = value.to_dict()
|
274
|
+
elif isinstance(value, dict):
|
275
|
+
result[attr] = dict(map(
|
276
|
+
lambda item: (item[0], item[1].to_dict())
|
277
|
+
if hasattr(item[1], "to_dict") else item,
|
278
|
+
value.items()
|
279
|
+
))
|
280
|
+
else:
|
281
|
+
if attr in self.sensitive_list:
|
282
|
+
result[attr] = "****"
|
283
|
+
else:
|
284
|
+
result[attr] = value
|
285
|
+
|
286
|
+
return result
|
287
|
+
|
288
|
+
def to_str(self):
|
289
|
+
"""Returns the string representation of the model"""
|
290
|
+
import simplejson as json
|
291
|
+
if six.PY2:
|
292
|
+
import sys
|
293
|
+
reload(sys)
|
294
|
+
sys.setdefaultencoding("utf-8")
|
295
|
+
return json.dumps(sanitize_for_serialization(self), ensure_ascii=False)
|
296
|
+
|
297
|
+
def __repr__(self):
|
298
|
+
"""For `print`"""
|
299
|
+
return self.to_str()
|
300
|
+
|
301
|
+
def __eq__(self, other):
|
302
|
+
"""Returns true if both objects are equal"""
|
303
|
+
if not isinstance(other, ImageMember):
|
304
|
+
return False
|
305
|
+
|
306
|
+
return self.__dict__ == other.__dict__
|
307
|
+
|
308
|
+
def __ne__(self, other):
|
309
|
+
"""Returns true if both objects are not equal"""
|
310
|
+
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 ListImageMembersRequest:
|
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_id': 'str'
|
21
|
+
}
|
22
|
+
|
23
|
+
attribute_map = {
|
24
|
+
'image_id': 'image_id'
|
25
|
+
}
|
26
|
+
|
27
|
+
def __init__(self, image_id=None):
|
28
|
+
r"""ListImageMembersRequest
|
29
|
+
|
30
|
+
The model defined in huaweicloud sdk
|
31
|
+
|
32
|
+
:param image_id: 镜像id
|
33
|
+
:type image_id: str
|
34
|
+
"""
|
35
|
+
|
36
|
+
|
37
|
+
|
38
|
+
self._image_id = None
|
39
|
+
self.discriminator = None
|
40
|
+
|
41
|
+
self.image_id = image_id
|
42
|
+
|
43
|
+
@property
|
44
|
+
def image_id(self):
|
45
|
+
r"""Gets the image_id of this ListImageMembersRequest.
|
46
|
+
|
47
|
+
镜像id
|
48
|
+
|
49
|
+
:return: The image_id of this ListImageMembersRequest.
|
50
|
+
:rtype: str
|
51
|
+
"""
|
52
|
+
return self._image_id
|
53
|
+
|
54
|
+
@image_id.setter
|
55
|
+
def image_id(self, image_id):
|
56
|
+
r"""Sets the image_id of this ListImageMembersRequest.
|
57
|
+
|
58
|
+
镜像id
|
59
|
+
|
60
|
+
:param image_id: The image_id of this ListImageMembersRequest.
|
61
|
+
:type image_id: str
|
62
|
+
"""
|
63
|
+
self._image_id = image_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, ListImageMembersRequest):
|
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
|