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,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 BatchDeleteResourceShareTagsResponse(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"""BatchDeleteResourceShareTagsResponse
|
28
|
+
|
29
|
+
The model defined in huaweicloud sdk
|
30
|
+
|
31
|
+
"""
|
32
|
+
|
33
|
+
super(BatchDeleteResourceShareTagsResponse, 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, BatchDeleteResourceShareTagsResponse):
|
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,288 @@
|
|
1
|
+
# coding: utf-8
|
2
|
+
|
3
|
+
import six
|
4
|
+
|
5
|
+
from huaweicloudsdkcore.utils.http_utils import sanitize_for_serialization
|
6
|
+
|
7
|
+
|
8
|
+
class CreateResourceShareReqBody:
|
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
|
+
'name': 'str',
|
21
|
+
'description': 'str',
|
22
|
+
'allow_external_principals': 'bool',
|
23
|
+
'permission_ids': 'list[str]',
|
24
|
+
'principals': 'list[str]',
|
25
|
+
'resource_urns': 'list[str]',
|
26
|
+
'tags': 'list[Tag]'
|
27
|
+
}
|
28
|
+
|
29
|
+
attribute_map = {
|
30
|
+
'name': 'name',
|
31
|
+
'description': 'description',
|
32
|
+
'allow_external_principals': 'allow_external_principals',
|
33
|
+
'permission_ids': 'permission_ids',
|
34
|
+
'principals': 'principals',
|
35
|
+
'resource_urns': 'resource_urns',
|
36
|
+
'tags': 'tags'
|
37
|
+
}
|
38
|
+
|
39
|
+
def __init__(self, name=None, description=None, allow_external_principals=None, permission_ids=None, principals=None, resource_urns=None, tags=None):
|
40
|
+
r"""CreateResourceShareReqBody
|
41
|
+
|
42
|
+
The model defined in huaweicloud sdk
|
43
|
+
|
44
|
+
:param name: 资源共享实例的名称。
|
45
|
+
:type name: str
|
46
|
+
:param description: 资源共享实例的描述。
|
47
|
+
:type description: str
|
48
|
+
:param allow_external_principals: 资源共享实例是否支持共享给组织外账号。
|
49
|
+
:type allow_external_principals: bool
|
50
|
+
:param permission_ids: 资源共享实例关联的RAM权限列表。一种资源类型只能关联一个RAM权限。如果您没有指定权限ID,RAM将自动为每个资源类型关联默认权限。
|
51
|
+
:type permission_ids: list[str]
|
52
|
+
:param principals: 资源共享实例关联的一个或多个资源使用者的列表。
|
53
|
+
:type principals: list[str]
|
54
|
+
:param resource_urns: 资源共享实例关联的一个或多个共享资源URN的列表。
|
55
|
+
:type resource_urns: list[str]
|
56
|
+
:param tags: 资源共享标签列表。
|
57
|
+
:type tags: list[:class:`huaweicloudsdkram.v1.Tag`]
|
58
|
+
"""
|
59
|
+
|
60
|
+
|
61
|
+
|
62
|
+
self._name = None
|
63
|
+
self._description = None
|
64
|
+
self._allow_external_principals = None
|
65
|
+
self._permission_ids = None
|
66
|
+
self._principals = None
|
67
|
+
self._resource_urns = None
|
68
|
+
self._tags = None
|
69
|
+
self.discriminator = None
|
70
|
+
|
71
|
+
self.name = name
|
72
|
+
if description is not None:
|
73
|
+
self.description = description
|
74
|
+
if allow_external_principals is not None:
|
75
|
+
self.allow_external_principals = allow_external_principals
|
76
|
+
if permission_ids is not None:
|
77
|
+
self.permission_ids = permission_ids
|
78
|
+
if principals is not None:
|
79
|
+
self.principals = principals
|
80
|
+
if resource_urns is not None:
|
81
|
+
self.resource_urns = resource_urns
|
82
|
+
if tags is not None:
|
83
|
+
self.tags = tags
|
84
|
+
|
85
|
+
@property
|
86
|
+
def name(self):
|
87
|
+
r"""Gets the name of this CreateResourceShareReqBody.
|
88
|
+
|
89
|
+
资源共享实例的名称。
|
90
|
+
|
91
|
+
:return: The name of this CreateResourceShareReqBody.
|
92
|
+
:rtype: str
|
93
|
+
"""
|
94
|
+
return self._name
|
95
|
+
|
96
|
+
@name.setter
|
97
|
+
def name(self, name):
|
98
|
+
r"""Sets the name of this CreateResourceShareReqBody.
|
99
|
+
|
100
|
+
资源共享实例的名称。
|
101
|
+
|
102
|
+
:param name: The name of this CreateResourceShareReqBody.
|
103
|
+
:type name: str
|
104
|
+
"""
|
105
|
+
self._name = name
|
106
|
+
|
107
|
+
@property
|
108
|
+
def description(self):
|
109
|
+
r"""Gets the description of this CreateResourceShareReqBody.
|
110
|
+
|
111
|
+
资源共享实例的描述。
|
112
|
+
|
113
|
+
:return: The description of this CreateResourceShareReqBody.
|
114
|
+
:rtype: str
|
115
|
+
"""
|
116
|
+
return self._description
|
117
|
+
|
118
|
+
@description.setter
|
119
|
+
def description(self, description):
|
120
|
+
r"""Sets the description of this CreateResourceShareReqBody.
|
121
|
+
|
122
|
+
资源共享实例的描述。
|
123
|
+
|
124
|
+
:param description: The description of this CreateResourceShareReqBody.
|
125
|
+
:type description: str
|
126
|
+
"""
|
127
|
+
self._description = description
|
128
|
+
|
129
|
+
@property
|
130
|
+
def allow_external_principals(self):
|
131
|
+
r"""Gets the allow_external_principals of this CreateResourceShareReqBody.
|
132
|
+
|
133
|
+
资源共享实例是否支持共享给组织外账号。
|
134
|
+
|
135
|
+
:return: The allow_external_principals of this CreateResourceShareReqBody.
|
136
|
+
:rtype: bool
|
137
|
+
"""
|
138
|
+
return self._allow_external_principals
|
139
|
+
|
140
|
+
@allow_external_principals.setter
|
141
|
+
def allow_external_principals(self, allow_external_principals):
|
142
|
+
r"""Sets the allow_external_principals of this CreateResourceShareReqBody.
|
143
|
+
|
144
|
+
资源共享实例是否支持共享给组织外账号。
|
145
|
+
|
146
|
+
:param allow_external_principals: The allow_external_principals of this CreateResourceShareReqBody.
|
147
|
+
:type allow_external_principals: bool
|
148
|
+
"""
|
149
|
+
self._allow_external_principals = allow_external_principals
|
150
|
+
|
151
|
+
@property
|
152
|
+
def permission_ids(self):
|
153
|
+
r"""Gets the permission_ids of this CreateResourceShareReqBody.
|
154
|
+
|
155
|
+
资源共享实例关联的RAM权限列表。一种资源类型只能关联一个RAM权限。如果您没有指定权限ID,RAM将自动为每个资源类型关联默认权限。
|
156
|
+
|
157
|
+
:return: The permission_ids of this CreateResourceShareReqBody.
|
158
|
+
:rtype: list[str]
|
159
|
+
"""
|
160
|
+
return self._permission_ids
|
161
|
+
|
162
|
+
@permission_ids.setter
|
163
|
+
def permission_ids(self, permission_ids):
|
164
|
+
r"""Sets the permission_ids of this CreateResourceShareReqBody.
|
165
|
+
|
166
|
+
资源共享实例关联的RAM权限列表。一种资源类型只能关联一个RAM权限。如果您没有指定权限ID,RAM将自动为每个资源类型关联默认权限。
|
167
|
+
|
168
|
+
:param permission_ids: The permission_ids of this CreateResourceShareReqBody.
|
169
|
+
:type permission_ids: list[str]
|
170
|
+
"""
|
171
|
+
self._permission_ids = permission_ids
|
172
|
+
|
173
|
+
@property
|
174
|
+
def principals(self):
|
175
|
+
r"""Gets the principals of this CreateResourceShareReqBody.
|
176
|
+
|
177
|
+
资源共享实例关联的一个或多个资源使用者的列表。
|
178
|
+
|
179
|
+
:return: The principals of this CreateResourceShareReqBody.
|
180
|
+
:rtype: list[str]
|
181
|
+
"""
|
182
|
+
return self._principals
|
183
|
+
|
184
|
+
@principals.setter
|
185
|
+
def principals(self, principals):
|
186
|
+
r"""Sets the principals of this CreateResourceShareReqBody.
|
187
|
+
|
188
|
+
资源共享实例关联的一个或多个资源使用者的列表。
|
189
|
+
|
190
|
+
:param principals: The principals of this CreateResourceShareReqBody.
|
191
|
+
:type principals: list[str]
|
192
|
+
"""
|
193
|
+
self._principals = principals
|
194
|
+
|
195
|
+
@property
|
196
|
+
def resource_urns(self):
|
197
|
+
r"""Gets the resource_urns of this CreateResourceShareReqBody.
|
198
|
+
|
199
|
+
资源共享实例关联的一个或多个共享资源URN的列表。
|
200
|
+
|
201
|
+
:return: The resource_urns of this CreateResourceShareReqBody.
|
202
|
+
:rtype: list[str]
|
203
|
+
"""
|
204
|
+
return self._resource_urns
|
205
|
+
|
206
|
+
@resource_urns.setter
|
207
|
+
def resource_urns(self, resource_urns):
|
208
|
+
r"""Sets the resource_urns of this CreateResourceShareReqBody.
|
209
|
+
|
210
|
+
资源共享实例关联的一个或多个共享资源URN的列表。
|
211
|
+
|
212
|
+
:param resource_urns: The resource_urns of this CreateResourceShareReqBody.
|
213
|
+
:type resource_urns: list[str]
|
214
|
+
"""
|
215
|
+
self._resource_urns = resource_urns
|
216
|
+
|
217
|
+
@property
|
218
|
+
def tags(self):
|
219
|
+
r"""Gets the tags of this CreateResourceShareReqBody.
|
220
|
+
|
221
|
+
资源共享标签列表。
|
222
|
+
|
223
|
+
:return: The tags of this CreateResourceShareReqBody.
|
224
|
+
:rtype: list[:class:`huaweicloudsdkram.v1.Tag`]
|
225
|
+
"""
|
226
|
+
return self._tags
|
227
|
+
|
228
|
+
@tags.setter
|
229
|
+
def tags(self, tags):
|
230
|
+
r"""Sets the tags of this CreateResourceShareReqBody.
|
231
|
+
|
232
|
+
资源共享标签列表。
|
233
|
+
|
234
|
+
:param tags: The tags of this CreateResourceShareReqBody.
|
235
|
+
:type tags: list[:class:`huaweicloudsdkram.v1.Tag`]
|
236
|
+
"""
|
237
|
+
self._tags = tags
|
238
|
+
|
239
|
+
def to_dict(self):
|
240
|
+
"""Returns the model properties as a dict"""
|
241
|
+
result = {}
|
242
|
+
|
243
|
+
for attr, _ in six.iteritems(self.openapi_types):
|
244
|
+
value = getattr(self, attr)
|
245
|
+
if isinstance(value, list):
|
246
|
+
result[attr] = list(map(
|
247
|
+
lambda x: x.to_dict() if hasattr(x, "to_dict") else x,
|
248
|
+
value
|
249
|
+
))
|
250
|
+
elif hasattr(value, "to_dict"):
|
251
|
+
result[attr] = value.to_dict()
|
252
|
+
elif isinstance(value, dict):
|
253
|
+
result[attr] = dict(map(
|
254
|
+
lambda item: (item[0], item[1].to_dict())
|
255
|
+
if hasattr(item[1], "to_dict") else item,
|
256
|
+
value.items()
|
257
|
+
))
|
258
|
+
else:
|
259
|
+
if attr in self.sensitive_list:
|
260
|
+
result[attr] = "****"
|
261
|
+
else:
|
262
|
+
result[attr] = value
|
263
|
+
|
264
|
+
return result
|
265
|
+
|
266
|
+
def to_str(self):
|
267
|
+
"""Returns the string representation of the model"""
|
268
|
+
import simplejson as json
|
269
|
+
if six.PY2:
|
270
|
+
import sys
|
271
|
+
reload(sys)
|
272
|
+
sys.setdefaultencoding("utf-8")
|
273
|
+
return json.dumps(sanitize_for_serialization(self), ensure_ascii=False)
|
274
|
+
|
275
|
+
def __repr__(self):
|
276
|
+
"""For `print`"""
|
277
|
+
return self.to_str()
|
278
|
+
|
279
|
+
def __eq__(self, other):
|
280
|
+
"""Returns true if both objects are equal"""
|
281
|
+
if not isinstance(other, CreateResourceShareReqBody):
|
282
|
+
return False
|
283
|
+
|
284
|
+
return self.__dict__ == other.__dict__
|
285
|
+
|
286
|
+
def __ne__(self, other):
|
287
|
+
"""Returns true if both objects are not equal"""
|
288
|
+
return not self == other
|
@@ -0,0 +1,141 @@
|
|
1
|
+
# coding: utf-8
|
2
|
+
|
3
|
+
import six
|
4
|
+
|
5
|
+
from huaweicloudsdkcore.utils.http_utils import sanitize_for_serialization
|
6
|
+
|
7
|
+
|
8
|
+
class CreateResourceShareRequest:
|
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
|
+
sensitive_list.append('x_security_token')
|
19
|
+
|
20
|
+
openapi_types = {
|
21
|
+
'x_security_token': 'str',
|
22
|
+
'body': 'CreateResourceShareReqBody'
|
23
|
+
}
|
24
|
+
|
25
|
+
attribute_map = {
|
26
|
+
'x_security_token': 'X-Security-Token',
|
27
|
+
'body': 'body'
|
28
|
+
}
|
29
|
+
|
30
|
+
def __init__(self, x_security_token=None, body=None):
|
31
|
+
r"""CreateResourceShareRequest
|
32
|
+
|
33
|
+
The model defined in huaweicloud sdk
|
34
|
+
|
35
|
+
:param x_security_token: 如果正在使用临时安全凭据,则此header是必需的,该值是临时安全凭据的安全令牌(会话令牌)。
|
36
|
+
:type x_security_token: str
|
37
|
+
:param body: Body of the CreateResourceShareRequest
|
38
|
+
:type body: :class:`huaweicloudsdkram.v1.CreateResourceShareReqBody`
|
39
|
+
"""
|
40
|
+
|
41
|
+
|
42
|
+
|
43
|
+
self._x_security_token = None
|
44
|
+
self._body = None
|
45
|
+
self.discriminator = None
|
46
|
+
|
47
|
+
if x_security_token is not None:
|
48
|
+
self.x_security_token = x_security_token
|
49
|
+
if body is not None:
|
50
|
+
self.body = body
|
51
|
+
|
52
|
+
@property
|
53
|
+
def x_security_token(self):
|
54
|
+
r"""Gets the x_security_token of this CreateResourceShareRequest.
|
55
|
+
|
56
|
+
如果正在使用临时安全凭据,则此header是必需的,该值是临时安全凭据的安全令牌(会话令牌)。
|
57
|
+
|
58
|
+
:return: The x_security_token of this CreateResourceShareRequest.
|
59
|
+
:rtype: str
|
60
|
+
"""
|
61
|
+
return self._x_security_token
|
62
|
+
|
63
|
+
@x_security_token.setter
|
64
|
+
def x_security_token(self, x_security_token):
|
65
|
+
r"""Sets the x_security_token of this CreateResourceShareRequest.
|
66
|
+
|
67
|
+
如果正在使用临时安全凭据,则此header是必需的,该值是临时安全凭据的安全令牌(会话令牌)。
|
68
|
+
|
69
|
+
:param x_security_token: The x_security_token of this CreateResourceShareRequest.
|
70
|
+
:type x_security_token: str
|
71
|
+
"""
|
72
|
+
self._x_security_token = x_security_token
|
73
|
+
|
74
|
+
@property
|
75
|
+
def body(self):
|
76
|
+
r"""Gets the body of this CreateResourceShareRequest.
|
77
|
+
|
78
|
+
:return: The body of this CreateResourceShareRequest.
|
79
|
+
:rtype: :class:`huaweicloudsdkram.v1.CreateResourceShareReqBody`
|
80
|
+
"""
|
81
|
+
return self._body
|
82
|
+
|
83
|
+
@body.setter
|
84
|
+
def body(self, body):
|
85
|
+
r"""Sets the body of this CreateResourceShareRequest.
|
86
|
+
|
87
|
+
:param body: The body of this CreateResourceShareRequest.
|
88
|
+
:type body: :class:`huaweicloudsdkram.v1.CreateResourceShareReqBody`
|
89
|
+
"""
|
90
|
+
self._body = body
|
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, CreateResourceShareRequest):
|
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,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 CreateResourceShareResponse(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
|
+
'resource_share': 'ResourceShare'
|
22
|
+
}
|
23
|
+
|
24
|
+
attribute_map = {
|
25
|
+
'resource_share': 'resource_share'
|
26
|
+
}
|
27
|
+
|
28
|
+
def __init__(self, resource_share=None):
|
29
|
+
r"""CreateResourceShareResponse
|
30
|
+
|
31
|
+
The model defined in huaweicloud sdk
|
32
|
+
|
33
|
+
:param resource_share:
|
34
|
+
:type resource_share: :class:`huaweicloudsdkram.v1.ResourceShare`
|
35
|
+
"""
|
36
|
+
|
37
|
+
super(CreateResourceShareResponse, self).__init__()
|
38
|
+
|
39
|
+
self._resource_share = None
|
40
|
+
self.discriminator = None
|
41
|
+
|
42
|
+
if resource_share is not None:
|
43
|
+
self.resource_share = resource_share
|
44
|
+
|
45
|
+
@property
|
46
|
+
def resource_share(self):
|
47
|
+
r"""Gets the resource_share of this CreateResourceShareResponse.
|
48
|
+
|
49
|
+
:return: The resource_share of this CreateResourceShareResponse.
|
50
|
+
:rtype: :class:`huaweicloudsdkram.v1.ResourceShare`
|
51
|
+
"""
|
52
|
+
return self._resource_share
|
53
|
+
|
54
|
+
@resource_share.setter
|
55
|
+
def resource_share(self, resource_share):
|
56
|
+
r"""Sets the resource_share of this CreateResourceShareResponse.
|
57
|
+
|
58
|
+
:param resource_share: The resource_share of this CreateResourceShareResponse.
|
59
|
+
:type resource_share: :class:`huaweicloudsdkram.v1.ResourceShare`
|
60
|
+
"""
|
61
|
+
self._resource_share = resource_share
|
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, CreateResourceShareResponse):
|
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
|