huaweicloudsdkram 3.1.160__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.
- huaweicloudsdkram/__init__.py +0 -0
- huaweicloudsdkram/v1/__init__.py +96 -0
- huaweicloudsdkram/v1/model/__init__.py +93 -0
- huaweicloudsdkram/v1/model/accept_resource_share_invitation_request.py +144 -0
- huaweicloudsdkram/v1/model/accept_resource_share_invitation_response.py +112 -0
- huaweicloudsdkram/v1/model/associate_permission_req_body.py +143 -0
- huaweicloudsdkram/v1/model/associate_resource_share_permission_request.py +169 -0
- huaweicloudsdkram/v1/model/associate_resource_share_permission_response.py +85 -0
- huaweicloudsdkram/v1/model/associate_resource_share_request.py +169 -0
- huaweicloudsdkram/v1/model/associate_resource_share_response.py +112 -0
- huaweicloudsdkram/v1/model/associated_permission.py +260 -0
- huaweicloudsdkram/v1/model/batch_create_resource_share_tags_request.py +169 -0
- huaweicloudsdkram/v1/model/batch_create_resource_share_tags_response.py +85 -0
- huaweicloudsdkram/v1/model/batch_delete_resource_share_tags_request.py +169 -0
- huaweicloudsdkram/v1/model/batch_delete_resource_share_tags_response.py +85 -0
- huaweicloudsdkram/v1/model/create_resource_share_req_body.py +288 -0
- huaweicloudsdkram/v1/model/create_resource_share_request.py +141 -0
- huaweicloudsdkram/v1/model/create_resource_share_response.py +112 -0
- huaweicloudsdkram/v1/model/delete_resource_share_request.py +144 -0
- huaweicloudsdkram/v1/model/delete_resource_share_response.py +85 -0
- huaweicloudsdkram/v1/model/disable_organization_share_request.py +116 -0
- huaweicloudsdkram/v1/model/disable_organization_share_response.py +85 -0
- huaweicloudsdkram/v1/model/disassociate_permission_req_body.py +114 -0
- huaweicloudsdkram/v1/model/disassociate_resource_share_permission_request.py +169 -0
- huaweicloudsdkram/v1/model/disassociate_resource_share_permission_response.py +85 -0
- huaweicloudsdkram/v1/model/disassociate_resource_share_request.py +169 -0
- huaweicloudsdkram/v1/model/disassociate_resource_share_response.py +112 -0
- huaweicloudsdkram/v1/model/enable_organization_share_request.py +116 -0
- huaweicloudsdkram/v1/model/enable_organization_share_response.py +85 -0
- huaweicloudsdkram/v1/model/list_permission_versions_request.py +202 -0
- huaweicloudsdkram/v1/model/list_permission_versions_response.py +141 -0
- huaweicloudsdkram/v1/model/list_permissions_request.py +232 -0
- huaweicloudsdkram/v1/model/list_permissions_response.py +141 -0
- huaweicloudsdkram/v1/model/list_quota_request.py +116 -0
- huaweicloudsdkram/v1/model/list_quota_response.py +112 -0
- huaweicloudsdkram/v1/model/list_resource_share_permissions_request.py +231 -0
- huaweicloudsdkram/v1/model/list_resource_share_permissions_response.py +141 -0
- huaweicloudsdkram/v1/model/list_resource_share_tags_request.py +174 -0
- huaweicloudsdkram/v1/model/list_resource_share_tags_response.py +141 -0
- huaweicloudsdkram/v1/model/list_resource_shares_by_tags_request.py +199 -0
- huaweicloudsdkram/v1/model/list_resource_shares_by_tags_response.py +145 -0
- huaweicloudsdkram/v1/model/list_resource_types_request.py +174 -0
- huaweicloudsdkram/v1/model/list_resource_types_response.py +141 -0
- huaweicloudsdkram/v1/model/match.py +142 -0
- huaweicloudsdkram/v1/model/page_info.py +173 -0
- huaweicloudsdkram/v1/model/page_info_marker_by_key.py +173 -0
- huaweicloudsdkram/v1/model/permission.py +427 -0
- huaweicloudsdkram/v1/model/permission_summary.py +399 -0
- huaweicloudsdkram/v1/model/quota_resources_dto.py +114 -0
- huaweicloudsdkram/v1/model/quotas.py +226 -0
- huaweicloudsdkram/v1/model/reject_resource_share_invitation_request.py +144 -0
- huaweicloudsdkram/v1/model/reject_resource_share_invitation_response.py +112 -0
- huaweicloudsdkram/v1/model/resource_dto.py +198 -0
- huaweicloudsdkram/v1/model/resource_share.py +340 -0
- huaweicloudsdkram/v1/model/resource_share_association.py +340 -0
- huaweicloudsdkram/v1/model/resource_share_association_req_body.py +144 -0
- huaweicloudsdkram/v1/model/resource_share_invitation.py +318 -0
- huaweicloudsdkram/v1/model/resource_shares_by_tags_req_body.py +173 -0
- huaweicloudsdkram/v1/model/resource_types_summary.py +142 -0
- huaweicloudsdkram/v1/model/search_resource_share_associations_req_body.py +317 -0
- huaweicloudsdkram/v1/model/search_resource_share_associations_request.py +141 -0
- huaweicloudsdkram/v1/model/search_resource_share_associations_response.py +141 -0
- huaweicloudsdkram/v1/model/search_resource_share_count_by_tags_request.py +141 -0
- huaweicloudsdkram/v1/model/search_resource_share_count_by_tags_response.py +116 -0
- huaweicloudsdkram/v1/model/search_resource_share_invitation_req_body.py +231 -0
- huaweicloudsdkram/v1/model/search_resource_share_invitation_request.py +141 -0
- huaweicloudsdkram/v1/model/search_resource_share_invitation_response.py +137 -0
- huaweicloudsdkram/v1/model/search_resource_shares_req_body.py +317 -0
- huaweicloudsdkram/v1/model/search_resource_shares_request.py +141 -0
- huaweicloudsdkram/v1/model/search_resource_shares_response.py +141 -0
- huaweicloudsdkram/v1/model/search_shared_principals_req_body.py +259 -0
- huaweicloudsdkram/v1/model/search_shared_principals_request.py +141 -0
- huaweicloudsdkram/v1/model/search_shared_principals_response.py +141 -0
- huaweicloudsdkram/v1/model/search_shared_resources_req_body.py +346 -0
- huaweicloudsdkram/v1/model/search_shared_resources_request.py +141 -0
- huaweicloudsdkram/v1/model/search_shared_resources_response.py +141 -0
- huaweicloudsdkram/v1/model/shared_principal.py +202 -0
- huaweicloudsdkram/v1/model/shared_resource.py +260 -0
- huaweicloudsdkram/v1/model/show_organization_share_request.py +116 -0
- huaweicloudsdkram/v1/model/show_organization_share_response.py +116 -0
- huaweicloudsdkram/v1/model/show_permission_request.py +173 -0
- huaweicloudsdkram/v1/model/show_permission_response.py +112 -0
- huaweicloudsdkram/v1/model/tag.py +142 -0
- huaweicloudsdkram/v1/model/tag_dto.py +142 -0
- huaweicloudsdkram/v1/model/tag_filter.py +143 -0
- huaweicloudsdkram/v1/model/tag_resource_req_body.py +114 -0
- huaweicloudsdkram/v1/model/untag.py +143 -0
- huaweicloudsdkram/v1/model/untag_resource_req_body.py +114 -0
- huaweicloudsdkram/v1/model/update_resource_share_req_body.py +172 -0
- huaweicloudsdkram/v1/model/update_resource_share_request.py +169 -0
- huaweicloudsdkram/v1/model/update_resource_share_response.py +112 -0
- huaweicloudsdkram/v1/ram_async_client.py +1991 -0
- huaweicloudsdkram/v1/ram_client.py +1988 -0
- huaweicloudsdkram/v1/region/__init__.py +0 -0
- huaweicloudsdkram/v1/region/ram_region.py +31 -0
- huaweicloudsdkram-3.1.160.dist-info/LICENSE +13 -0
- huaweicloudsdkram-3.1.160.dist-info/METADATA +26 -0
- huaweicloudsdkram-3.1.160.dist-info/RECORD +100 -0
- huaweicloudsdkram-3.1.160.dist-info/WHEEL +5 -0
- huaweicloudsdkram-3.1.160.dist-info/top_level.txt +1 -0
@@ -0,0 +1,399 @@
|
|
1
|
+
# coding: utf-8
|
2
|
+
|
3
|
+
import six
|
4
|
+
|
5
|
+
from huaweicloudsdkcore.utils.http_utils import sanitize_for_serialization
|
6
|
+
|
7
|
+
|
8
|
+
class PermissionSummary:
|
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
|
+
'id': 'str',
|
21
|
+
'name': 'str',
|
22
|
+
'resource_type': 'str',
|
23
|
+
'is_resource_type_default': 'bool',
|
24
|
+
'created_at': 'datetime',
|
25
|
+
'updated_at': 'datetime',
|
26
|
+
'permission_urn': 'str',
|
27
|
+
'permission_type': 'str',
|
28
|
+
'default_version': 'bool',
|
29
|
+
'version': 'int',
|
30
|
+
'status': 'str'
|
31
|
+
}
|
32
|
+
|
33
|
+
attribute_map = {
|
34
|
+
'id': 'id',
|
35
|
+
'name': 'name',
|
36
|
+
'resource_type': 'resource_type',
|
37
|
+
'is_resource_type_default': 'is_resource_type_default',
|
38
|
+
'created_at': 'created_at',
|
39
|
+
'updated_at': 'updated_at',
|
40
|
+
'permission_urn': 'permission_urn',
|
41
|
+
'permission_type': 'permission_type',
|
42
|
+
'default_version': 'default_version',
|
43
|
+
'version': 'version',
|
44
|
+
'status': 'status'
|
45
|
+
}
|
46
|
+
|
47
|
+
def __init__(self, id=None, name=None, resource_type=None, is_resource_type_default=None, created_at=None, updated_at=None, permission_urn=None, permission_type=None, default_version=None, version=None, status=None):
|
48
|
+
r"""PermissionSummary
|
49
|
+
|
50
|
+
The model defined in huaweicloud sdk
|
51
|
+
|
52
|
+
:param id: 权限ID。
|
53
|
+
:type id: str
|
54
|
+
:param name: 权限名称。
|
55
|
+
:type name: str
|
56
|
+
:param resource_type: 此权限适用的资源类型。
|
57
|
+
:type resource_type: str
|
58
|
+
:param is_resource_type_default: 该权限是否是此资源类型的默认权限。
|
59
|
+
:type is_resource_type_default: bool
|
60
|
+
:param created_at: 权限的创建时间。
|
61
|
+
:type created_at: datetime
|
62
|
+
:param updated_at: 上次更新权限的时间。
|
63
|
+
:type updated_at: datetime
|
64
|
+
:param permission_urn: 权限URN。
|
65
|
+
:type permission_urn: str
|
66
|
+
:param permission_type: 权限类型,RAM托管或者租户自定义权限。
|
67
|
+
:type permission_type: str
|
68
|
+
:param default_version: 是否是默认版本。
|
69
|
+
:type default_version: bool
|
70
|
+
:param version: 权限版本。
|
71
|
+
:type version: int
|
72
|
+
:param status: 权限的状态
|
73
|
+
:type status: str
|
74
|
+
"""
|
75
|
+
|
76
|
+
|
77
|
+
|
78
|
+
self._id = None
|
79
|
+
self._name = None
|
80
|
+
self._resource_type = None
|
81
|
+
self._is_resource_type_default = None
|
82
|
+
self._created_at = None
|
83
|
+
self._updated_at = None
|
84
|
+
self._permission_urn = None
|
85
|
+
self._permission_type = None
|
86
|
+
self._default_version = None
|
87
|
+
self._version = None
|
88
|
+
self._status = None
|
89
|
+
self.discriminator = None
|
90
|
+
|
91
|
+
self.id = id
|
92
|
+
self.name = name
|
93
|
+
self.resource_type = resource_type
|
94
|
+
self.is_resource_type_default = is_resource_type_default
|
95
|
+
self.created_at = created_at
|
96
|
+
self.updated_at = updated_at
|
97
|
+
if permission_urn is not None:
|
98
|
+
self.permission_urn = permission_urn
|
99
|
+
if permission_type is not None:
|
100
|
+
self.permission_type = permission_type
|
101
|
+
if default_version is not None:
|
102
|
+
self.default_version = default_version
|
103
|
+
if version is not None:
|
104
|
+
self.version = version
|
105
|
+
if status is not None:
|
106
|
+
self.status = status
|
107
|
+
|
108
|
+
@property
|
109
|
+
def id(self):
|
110
|
+
r"""Gets the id of this PermissionSummary.
|
111
|
+
|
112
|
+
权限ID。
|
113
|
+
|
114
|
+
:return: The id of this PermissionSummary.
|
115
|
+
:rtype: str
|
116
|
+
"""
|
117
|
+
return self._id
|
118
|
+
|
119
|
+
@id.setter
|
120
|
+
def id(self, id):
|
121
|
+
r"""Sets the id of this PermissionSummary.
|
122
|
+
|
123
|
+
权限ID。
|
124
|
+
|
125
|
+
:param id: The id of this PermissionSummary.
|
126
|
+
:type id: str
|
127
|
+
"""
|
128
|
+
self._id = id
|
129
|
+
|
130
|
+
@property
|
131
|
+
def name(self):
|
132
|
+
r"""Gets the name of this PermissionSummary.
|
133
|
+
|
134
|
+
权限名称。
|
135
|
+
|
136
|
+
:return: The name of this PermissionSummary.
|
137
|
+
:rtype: str
|
138
|
+
"""
|
139
|
+
return self._name
|
140
|
+
|
141
|
+
@name.setter
|
142
|
+
def name(self, name):
|
143
|
+
r"""Sets the name of this PermissionSummary.
|
144
|
+
|
145
|
+
权限名称。
|
146
|
+
|
147
|
+
:param name: The name of this PermissionSummary.
|
148
|
+
:type name: str
|
149
|
+
"""
|
150
|
+
self._name = name
|
151
|
+
|
152
|
+
@property
|
153
|
+
def resource_type(self):
|
154
|
+
r"""Gets the resource_type of this PermissionSummary.
|
155
|
+
|
156
|
+
此权限适用的资源类型。
|
157
|
+
|
158
|
+
:return: The resource_type of this PermissionSummary.
|
159
|
+
:rtype: str
|
160
|
+
"""
|
161
|
+
return self._resource_type
|
162
|
+
|
163
|
+
@resource_type.setter
|
164
|
+
def resource_type(self, resource_type):
|
165
|
+
r"""Sets the resource_type of this PermissionSummary.
|
166
|
+
|
167
|
+
此权限适用的资源类型。
|
168
|
+
|
169
|
+
:param resource_type: The resource_type of this PermissionSummary.
|
170
|
+
:type resource_type: str
|
171
|
+
"""
|
172
|
+
self._resource_type = resource_type
|
173
|
+
|
174
|
+
@property
|
175
|
+
def is_resource_type_default(self):
|
176
|
+
r"""Gets the is_resource_type_default of this PermissionSummary.
|
177
|
+
|
178
|
+
该权限是否是此资源类型的默认权限。
|
179
|
+
|
180
|
+
:return: The is_resource_type_default of this PermissionSummary.
|
181
|
+
:rtype: bool
|
182
|
+
"""
|
183
|
+
return self._is_resource_type_default
|
184
|
+
|
185
|
+
@is_resource_type_default.setter
|
186
|
+
def is_resource_type_default(self, is_resource_type_default):
|
187
|
+
r"""Sets the is_resource_type_default of this PermissionSummary.
|
188
|
+
|
189
|
+
该权限是否是此资源类型的默认权限。
|
190
|
+
|
191
|
+
:param is_resource_type_default: The is_resource_type_default of this PermissionSummary.
|
192
|
+
:type is_resource_type_default: bool
|
193
|
+
"""
|
194
|
+
self._is_resource_type_default = is_resource_type_default
|
195
|
+
|
196
|
+
@property
|
197
|
+
def created_at(self):
|
198
|
+
r"""Gets the created_at of this PermissionSummary.
|
199
|
+
|
200
|
+
权限的创建时间。
|
201
|
+
|
202
|
+
:return: The created_at of this PermissionSummary.
|
203
|
+
:rtype: datetime
|
204
|
+
"""
|
205
|
+
return self._created_at
|
206
|
+
|
207
|
+
@created_at.setter
|
208
|
+
def created_at(self, created_at):
|
209
|
+
r"""Sets the created_at of this PermissionSummary.
|
210
|
+
|
211
|
+
权限的创建时间。
|
212
|
+
|
213
|
+
:param created_at: The created_at of this PermissionSummary.
|
214
|
+
:type created_at: datetime
|
215
|
+
"""
|
216
|
+
self._created_at = created_at
|
217
|
+
|
218
|
+
@property
|
219
|
+
def updated_at(self):
|
220
|
+
r"""Gets the updated_at of this PermissionSummary.
|
221
|
+
|
222
|
+
上次更新权限的时间。
|
223
|
+
|
224
|
+
:return: The updated_at of this PermissionSummary.
|
225
|
+
:rtype: datetime
|
226
|
+
"""
|
227
|
+
return self._updated_at
|
228
|
+
|
229
|
+
@updated_at.setter
|
230
|
+
def updated_at(self, updated_at):
|
231
|
+
r"""Sets the updated_at of this PermissionSummary.
|
232
|
+
|
233
|
+
上次更新权限的时间。
|
234
|
+
|
235
|
+
:param updated_at: The updated_at of this PermissionSummary.
|
236
|
+
:type updated_at: datetime
|
237
|
+
"""
|
238
|
+
self._updated_at = updated_at
|
239
|
+
|
240
|
+
@property
|
241
|
+
def permission_urn(self):
|
242
|
+
r"""Gets the permission_urn of this PermissionSummary.
|
243
|
+
|
244
|
+
权限URN。
|
245
|
+
|
246
|
+
:return: The permission_urn of this PermissionSummary.
|
247
|
+
:rtype: str
|
248
|
+
"""
|
249
|
+
return self._permission_urn
|
250
|
+
|
251
|
+
@permission_urn.setter
|
252
|
+
def permission_urn(self, permission_urn):
|
253
|
+
r"""Sets the permission_urn of this PermissionSummary.
|
254
|
+
|
255
|
+
权限URN。
|
256
|
+
|
257
|
+
:param permission_urn: The permission_urn of this PermissionSummary.
|
258
|
+
:type permission_urn: str
|
259
|
+
"""
|
260
|
+
self._permission_urn = permission_urn
|
261
|
+
|
262
|
+
@property
|
263
|
+
def permission_type(self):
|
264
|
+
r"""Gets the permission_type of this PermissionSummary.
|
265
|
+
|
266
|
+
权限类型,RAM托管或者租户自定义权限。
|
267
|
+
|
268
|
+
:return: The permission_type of this PermissionSummary.
|
269
|
+
:rtype: str
|
270
|
+
"""
|
271
|
+
return self._permission_type
|
272
|
+
|
273
|
+
@permission_type.setter
|
274
|
+
def permission_type(self, permission_type):
|
275
|
+
r"""Sets the permission_type of this PermissionSummary.
|
276
|
+
|
277
|
+
权限类型,RAM托管或者租户自定义权限。
|
278
|
+
|
279
|
+
:param permission_type: The permission_type of this PermissionSummary.
|
280
|
+
:type permission_type: str
|
281
|
+
"""
|
282
|
+
self._permission_type = permission_type
|
283
|
+
|
284
|
+
@property
|
285
|
+
def default_version(self):
|
286
|
+
r"""Gets the default_version of this PermissionSummary.
|
287
|
+
|
288
|
+
是否是默认版本。
|
289
|
+
|
290
|
+
:return: The default_version of this PermissionSummary.
|
291
|
+
:rtype: bool
|
292
|
+
"""
|
293
|
+
return self._default_version
|
294
|
+
|
295
|
+
@default_version.setter
|
296
|
+
def default_version(self, default_version):
|
297
|
+
r"""Sets the default_version of this PermissionSummary.
|
298
|
+
|
299
|
+
是否是默认版本。
|
300
|
+
|
301
|
+
:param default_version: The default_version of this PermissionSummary.
|
302
|
+
:type default_version: bool
|
303
|
+
"""
|
304
|
+
self._default_version = default_version
|
305
|
+
|
306
|
+
@property
|
307
|
+
def version(self):
|
308
|
+
r"""Gets the version of this PermissionSummary.
|
309
|
+
|
310
|
+
权限版本。
|
311
|
+
|
312
|
+
:return: The version of this PermissionSummary.
|
313
|
+
:rtype: int
|
314
|
+
"""
|
315
|
+
return self._version
|
316
|
+
|
317
|
+
@version.setter
|
318
|
+
def version(self, version):
|
319
|
+
r"""Sets the version of this PermissionSummary.
|
320
|
+
|
321
|
+
权限版本。
|
322
|
+
|
323
|
+
:param version: The version of this PermissionSummary.
|
324
|
+
:type version: int
|
325
|
+
"""
|
326
|
+
self._version = version
|
327
|
+
|
328
|
+
@property
|
329
|
+
def status(self):
|
330
|
+
r"""Gets the status of this PermissionSummary.
|
331
|
+
|
332
|
+
权限的状态
|
333
|
+
|
334
|
+
:return: The status of this PermissionSummary.
|
335
|
+
:rtype: str
|
336
|
+
"""
|
337
|
+
return self._status
|
338
|
+
|
339
|
+
@status.setter
|
340
|
+
def status(self, status):
|
341
|
+
r"""Sets the status of this PermissionSummary.
|
342
|
+
|
343
|
+
权限的状态
|
344
|
+
|
345
|
+
:param status: The status of this PermissionSummary.
|
346
|
+
:type status: str
|
347
|
+
"""
|
348
|
+
self._status = status
|
349
|
+
|
350
|
+
def to_dict(self):
|
351
|
+
"""Returns the model properties as a dict"""
|
352
|
+
result = {}
|
353
|
+
|
354
|
+
for attr, _ in six.iteritems(self.openapi_types):
|
355
|
+
value = getattr(self, attr)
|
356
|
+
if isinstance(value, list):
|
357
|
+
result[attr] = list(map(
|
358
|
+
lambda x: x.to_dict() if hasattr(x, "to_dict") else x,
|
359
|
+
value
|
360
|
+
))
|
361
|
+
elif hasattr(value, "to_dict"):
|
362
|
+
result[attr] = value.to_dict()
|
363
|
+
elif isinstance(value, dict):
|
364
|
+
result[attr] = dict(map(
|
365
|
+
lambda item: (item[0], item[1].to_dict())
|
366
|
+
if hasattr(item[1], "to_dict") else item,
|
367
|
+
value.items()
|
368
|
+
))
|
369
|
+
else:
|
370
|
+
if attr in self.sensitive_list:
|
371
|
+
result[attr] = "****"
|
372
|
+
else:
|
373
|
+
result[attr] = value
|
374
|
+
|
375
|
+
return result
|
376
|
+
|
377
|
+
def to_str(self):
|
378
|
+
"""Returns the string representation of the model"""
|
379
|
+
import simplejson as json
|
380
|
+
if six.PY2:
|
381
|
+
import sys
|
382
|
+
reload(sys)
|
383
|
+
sys.setdefaultencoding("utf-8")
|
384
|
+
return json.dumps(sanitize_for_serialization(self), ensure_ascii=False)
|
385
|
+
|
386
|
+
def __repr__(self):
|
387
|
+
"""For `print`"""
|
388
|
+
return self.to_str()
|
389
|
+
|
390
|
+
def __eq__(self, other):
|
391
|
+
"""Returns true if both objects are equal"""
|
392
|
+
if not isinstance(other, PermissionSummary):
|
393
|
+
return False
|
394
|
+
|
395
|
+
return self.__dict__ == other.__dict__
|
396
|
+
|
397
|
+
def __ne__(self, other):
|
398
|
+
"""Returns true if both objects are not equal"""
|
399
|
+
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 QuotaResourcesDto:
|
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
|
+
'resources': 'list[Quotas]'
|
21
|
+
}
|
22
|
+
|
23
|
+
attribute_map = {
|
24
|
+
'resources': 'resources'
|
25
|
+
}
|
26
|
+
|
27
|
+
def __init__(self, resources=None):
|
28
|
+
r"""QuotaResourcesDto
|
29
|
+
|
30
|
+
The model defined in huaweicloud sdk
|
31
|
+
|
32
|
+
:param resources: 配额信息。
|
33
|
+
:type resources: list[:class:`huaweicloudsdkram.v1.Quotas`]
|
34
|
+
"""
|
35
|
+
|
36
|
+
|
37
|
+
|
38
|
+
self._resources = None
|
39
|
+
self.discriminator = None
|
40
|
+
|
41
|
+
self.resources = resources
|
42
|
+
|
43
|
+
@property
|
44
|
+
def resources(self):
|
45
|
+
r"""Gets the resources of this QuotaResourcesDto.
|
46
|
+
|
47
|
+
配额信息。
|
48
|
+
|
49
|
+
:return: The resources of this QuotaResourcesDto.
|
50
|
+
:rtype: list[:class:`huaweicloudsdkram.v1.Quotas`]
|
51
|
+
"""
|
52
|
+
return self._resources
|
53
|
+
|
54
|
+
@resources.setter
|
55
|
+
def resources(self, resources):
|
56
|
+
r"""Sets the resources of this QuotaResourcesDto.
|
57
|
+
|
58
|
+
配额信息。
|
59
|
+
|
60
|
+
:param resources: The resources of this QuotaResourcesDto.
|
61
|
+
:type resources: list[:class:`huaweicloudsdkram.v1.Quotas`]
|
62
|
+
"""
|
63
|
+
self._resources = resources
|
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, QuotaResourcesDto):
|
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
|