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,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 SearchSharedResourcesResponse(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
|
+
'shared_resources': 'list[SharedResource]',
|
22
|
+
'page_info': 'PageInfo'
|
23
|
+
}
|
24
|
+
|
25
|
+
attribute_map = {
|
26
|
+
'shared_resources': 'shared_resources',
|
27
|
+
'page_info': 'page_info'
|
28
|
+
}
|
29
|
+
|
30
|
+
def __init__(self, shared_resources=None, page_info=None):
|
31
|
+
r"""SearchSharedResourcesResponse
|
32
|
+
|
33
|
+
The model defined in huaweicloud sdk
|
34
|
+
|
35
|
+
:param shared_resources: 共享资源的信息列表。
|
36
|
+
:type shared_resources: list[:class:`huaweicloudsdkram.v1.SharedResource`]
|
37
|
+
:param page_info:
|
38
|
+
:type page_info: :class:`huaweicloudsdkram.v1.PageInfo`
|
39
|
+
"""
|
40
|
+
|
41
|
+
super(SearchSharedResourcesResponse, self).__init__()
|
42
|
+
|
43
|
+
self._shared_resources = None
|
44
|
+
self._page_info = None
|
45
|
+
self.discriminator = None
|
46
|
+
|
47
|
+
if shared_resources is not None:
|
48
|
+
self.shared_resources = shared_resources
|
49
|
+
if page_info is not None:
|
50
|
+
self.page_info = page_info
|
51
|
+
|
52
|
+
@property
|
53
|
+
def shared_resources(self):
|
54
|
+
r"""Gets the shared_resources of this SearchSharedResourcesResponse.
|
55
|
+
|
56
|
+
共享资源的信息列表。
|
57
|
+
|
58
|
+
:return: The shared_resources of this SearchSharedResourcesResponse.
|
59
|
+
:rtype: list[:class:`huaweicloudsdkram.v1.SharedResource`]
|
60
|
+
"""
|
61
|
+
return self._shared_resources
|
62
|
+
|
63
|
+
@shared_resources.setter
|
64
|
+
def shared_resources(self, shared_resources):
|
65
|
+
r"""Sets the shared_resources of this SearchSharedResourcesResponse.
|
66
|
+
|
67
|
+
共享资源的信息列表。
|
68
|
+
|
69
|
+
:param shared_resources: The shared_resources of this SearchSharedResourcesResponse.
|
70
|
+
:type shared_resources: list[:class:`huaweicloudsdkram.v1.SharedResource`]
|
71
|
+
"""
|
72
|
+
self._shared_resources = shared_resources
|
73
|
+
|
74
|
+
@property
|
75
|
+
def page_info(self):
|
76
|
+
r"""Gets the page_info of this SearchSharedResourcesResponse.
|
77
|
+
|
78
|
+
:return: The page_info of this SearchSharedResourcesResponse.
|
79
|
+
:rtype: :class:`huaweicloudsdkram.v1.PageInfo`
|
80
|
+
"""
|
81
|
+
return self._page_info
|
82
|
+
|
83
|
+
@page_info.setter
|
84
|
+
def page_info(self, page_info):
|
85
|
+
r"""Sets the page_info of this SearchSharedResourcesResponse.
|
86
|
+
|
87
|
+
:param page_info: The page_info of this SearchSharedResourcesResponse.
|
88
|
+
:type page_info: :class:`huaweicloudsdkram.v1.PageInfo`
|
89
|
+
"""
|
90
|
+
self._page_info = page_info
|
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, SearchSharedResourcesResponse):
|
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,202 @@
|
|
1
|
+
# coding: utf-8
|
2
|
+
|
3
|
+
import six
|
4
|
+
|
5
|
+
from huaweicloudsdkcore.utils.http_utils import sanitize_for_serialization
|
6
|
+
|
7
|
+
|
8
|
+
class SharedPrincipal:
|
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
|
+
'resource_share_id': 'str',
|
21
|
+
'id': 'str',
|
22
|
+
'created_at': 'datetime',
|
23
|
+
'updated_at': 'datetime'
|
24
|
+
}
|
25
|
+
|
26
|
+
attribute_map = {
|
27
|
+
'resource_share_id': 'resource_share_id',
|
28
|
+
'id': 'id',
|
29
|
+
'created_at': 'created_at',
|
30
|
+
'updated_at': 'updated_at'
|
31
|
+
}
|
32
|
+
|
33
|
+
def __init__(self, resource_share_id=None, id=None, created_at=None, updated_at=None):
|
34
|
+
r"""SharedPrincipal
|
35
|
+
|
36
|
+
The model defined in huaweicloud sdk
|
37
|
+
|
38
|
+
:param resource_share_id: 资源使用者绑定的资源共享实例的ID。
|
39
|
+
:type resource_share_id: str
|
40
|
+
:param id: 资源使用者的账号ID或URN。
|
41
|
+
:type id: str
|
42
|
+
:param created_at: 资源使用者与资源共享实例关联的时间。
|
43
|
+
:type created_at: datetime
|
44
|
+
:param updated_at: 最后一次更新资源共享实例的时间。
|
45
|
+
:type updated_at: datetime
|
46
|
+
"""
|
47
|
+
|
48
|
+
|
49
|
+
|
50
|
+
self._resource_share_id = None
|
51
|
+
self._id = None
|
52
|
+
self._created_at = None
|
53
|
+
self._updated_at = None
|
54
|
+
self.discriminator = None
|
55
|
+
|
56
|
+
if resource_share_id is not None:
|
57
|
+
self.resource_share_id = resource_share_id
|
58
|
+
if id is not None:
|
59
|
+
self.id = id
|
60
|
+
if created_at is not None:
|
61
|
+
self.created_at = created_at
|
62
|
+
if updated_at is not None:
|
63
|
+
self.updated_at = updated_at
|
64
|
+
|
65
|
+
@property
|
66
|
+
def resource_share_id(self):
|
67
|
+
r"""Gets the resource_share_id of this SharedPrincipal.
|
68
|
+
|
69
|
+
资源使用者绑定的资源共享实例的ID。
|
70
|
+
|
71
|
+
:return: The resource_share_id of this SharedPrincipal.
|
72
|
+
:rtype: str
|
73
|
+
"""
|
74
|
+
return self._resource_share_id
|
75
|
+
|
76
|
+
@resource_share_id.setter
|
77
|
+
def resource_share_id(self, resource_share_id):
|
78
|
+
r"""Sets the resource_share_id of this SharedPrincipal.
|
79
|
+
|
80
|
+
资源使用者绑定的资源共享实例的ID。
|
81
|
+
|
82
|
+
:param resource_share_id: The resource_share_id of this SharedPrincipal.
|
83
|
+
:type resource_share_id: str
|
84
|
+
"""
|
85
|
+
self._resource_share_id = resource_share_id
|
86
|
+
|
87
|
+
@property
|
88
|
+
def id(self):
|
89
|
+
r"""Gets the id of this SharedPrincipal.
|
90
|
+
|
91
|
+
资源使用者的账号ID或URN。
|
92
|
+
|
93
|
+
:return: The id of this SharedPrincipal.
|
94
|
+
:rtype: str
|
95
|
+
"""
|
96
|
+
return self._id
|
97
|
+
|
98
|
+
@id.setter
|
99
|
+
def id(self, id):
|
100
|
+
r"""Sets the id of this SharedPrincipal.
|
101
|
+
|
102
|
+
资源使用者的账号ID或URN。
|
103
|
+
|
104
|
+
:param id: The id of this SharedPrincipal.
|
105
|
+
:type id: str
|
106
|
+
"""
|
107
|
+
self._id = id
|
108
|
+
|
109
|
+
@property
|
110
|
+
def created_at(self):
|
111
|
+
r"""Gets the created_at of this SharedPrincipal.
|
112
|
+
|
113
|
+
资源使用者与资源共享实例关联的时间。
|
114
|
+
|
115
|
+
:return: The created_at of this SharedPrincipal.
|
116
|
+
:rtype: datetime
|
117
|
+
"""
|
118
|
+
return self._created_at
|
119
|
+
|
120
|
+
@created_at.setter
|
121
|
+
def created_at(self, created_at):
|
122
|
+
r"""Sets the created_at of this SharedPrincipal.
|
123
|
+
|
124
|
+
资源使用者与资源共享实例关联的时间。
|
125
|
+
|
126
|
+
:param created_at: The created_at of this SharedPrincipal.
|
127
|
+
:type created_at: datetime
|
128
|
+
"""
|
129
|
+
self._created_at = created_at
|
130
|
+
|
131
|
+
@property
|
132
|
+
def updated_at(self):
|
133
|
+
r"""Gets the updated_at of this SharedPrincipal.
|
134
|
+
|
135
|
+
最后一次更新资源共享实例的时间。
|
136
|
+
|
137
|
+
:return: The updated_at of this SharedPrincipal.
|
138
|
+
:rtype: datetime
|
139
|
+
"""
|
140
|
+
return self._updated_at
|
141
|
+
|
142
|
+
@updated_at.setter
|
143
|
+
def updated_at(self, updated_at):
|
144
|
+
r"""Sets the updated_at of this SharedPrincipal.
|
145
|
+
|
146
|
+
最后一次更新资源共享实例的时间。
|
147
|
+
|
148
|
+
:param updated_at: The updated_at of this SharedPrincipal.
|
149
|
+
:type updated_at: datetime
|
150
|
+
"""
|
151
|
+
self._updated_at = updated_at
|
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, SharedPrincipal):
|
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,260 @@
|
|
1
|
+
# coding: utf-8
|
2
|
+
|
3
|
+
import six
|
4
|
+
|
5
|
+
from huaweicloudsdkcore.utils.http_utils import sanitize_for_serialization
|
6
|
+
|
7
|
+
|
8
|
+
class SharedResource:
|
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
|
+
'resource_urn': 'str',
|
21
|
+
'created_at': 'datetime',
|
22
|
+
'updated_at': 'datetime',
|
23
|
+
'resource_type': 'str',
|
24
|
+
'resource_share_id': 'str',
|
25
|
+
'status': 'str'
|
26
|
+
}
|
27
|
+
|
28
|
+
attribute_map = {
|
29
|
+
'resource_urn': 'resource_urn',
|
30
|
+
'created_at': 'created_at',
|
31
|
+
'updated_at': 'updated_at',
|
32
|
+
'resource_type': 'resource_type',
|
33
|
+
'resource_share_id': 'resource_share_id',
|
34
|
+
'status': 'status'
|
35
|
+
}
|
36
|
+
|
37
|
+
def __init__(self, resource_urn=None, created_at=None, updated_at=None, resource_type=None, resource_share_id=None, status=None):
|
38
|
+
r"""SharedResource
|
39
|
+
|
40
|
+
The model defined in huaweicloud sdk
|
41
|
+
|
42
|
+
:param resource_urn: 资源的统一资源名称。
|
43
|
+
:type resource_urn: str
|
44
|
+
:param created_at: 资源与资源共享实例关联的时间。
|
45
|
+
:type created_at: datetime
|
46
|
+
:param updated_at: 最后一次更新资源共享实例的时间。
|
47
|
+
:type updated_at: datetime
|
48
|
+
:param resource_type: 资源的类型。
|
49
|
+
:type resource_type: str
|
50
|
+
:param resource_share_id: 资源绑定的资源共享实例的ID。
|
51
|
+
:type resource_share_id: str
|
52
|
+
:param status: 资源绑定的当前状态。
|
53
|
+
:type status: str
|
54
|
+
"""
|
55
|
+
|
56
|
+
|
57
|
+
|
58
|
+
self._resource_urn = None
|
59
|
+
self._created_at = None
|
60
|
+
self._updated_at = None
|
61
|
+
self._resource_type = None
|
62
|
+
self._resource_share_id = None
|
63
|
+
self._status = None
|
64
|
+
self.discriminator = None
|
65
|
+
|
66
|
+
if resource_urn is not None:
|
67
|
+
self.resource_urn = resource_urn
|
68
|
+
if created_at is not None:
|
69
|
+
self.created_at = created_at
|
70
|
+
if updated_at is not None:
|
71
|
+
self.updated_at = updated_at
|
72
|
+
if resource_type is not None:
|
73
|
+
self.resource_type = resource_type
|
74
|
+
if resource_share_id is not None:
|
75
|
+
self.resource_share_id = resource_share_id
|
76
|
+
if status is not None:
|
77
|
+
self.status = status
|
78
|
+
|
79
|
+
@property
|
80
|
+
def resource_urn(self):
|
81
|
+
r"""Gets the resource_urn of this SharedResource.
|
82
|
+
|
83
|
+
资源的统一资源名称。
|
84
|
+
|
85
|
+
:return: The resource_urn of this SharedResource.
|
86
|
+
:rtype: str
|
87
|
+
"""
|
88
|
+
return self._resource_urn
|
89
|
+
|
90
|
+
@resource_urn.setter
|
91
|
+
def resource_urn(self, resource_urn):
|
92
|
+
r"""Sets the resource_urn of this SharedResource.
|
93
|
+
|
94
|
+
资源的统一资源名称。
|
95
|
+
|
96
|
+
:param resource_urn: The resource_urn of this SharedResource.
|
97
|
+
:type resource_urn: str
|
98
|
+
"""
|
99
|
+
self._resource_urn = resource_urn
|
100
|
+
|
101
|
+
@property
|
102
|
+
def created_at(self):
|
103
|
+
r"""Gets the created_at of this SharedResource.
|
104
|
+
|
105
|
+
资源与资源共享实例关联的时间。
|
106
|
+
|
107
|
+
:return: The created_at of this SharedResource.
|
108
|
+
:rtype: datetime
|
109
|
+
"""
|
110
|
+
return self._created_at
|
111
|
+
|
112
|
+
@created_at.setter
|
113
|
+
def created_at(self, created_at):
|
114
|
+
r"""Sets the created_at of this SharedResource.
|
115
|
+
|
116
|
+
资源与资源共享实例关联的时间。
|
117
|
+
|
118
|
+
:param created_at: The created_at of this SharedResource.
|
119
|
+
:type created_at: datetime
|
120
|
+
"""
|
121
|
+
self._created_at = created_at
|
122
|
+
|
123
|
+
@property
|
124
|
+
def updated_at(self):
|
125
|
+
r"""Gets the updated_at of this SharedResource.
|
126
|
+
|
127
|
+
最后一次更新资源共享实例的时间。
|
128
|
+
|
129
|
+
:return: The updated_at of this SharedResource.
|
130
|
+
:rtype: datetime
|
131
|
+
"""
|
132
|
+
return self._updated_at
|
133
|
+
|
134
|
+
@updated_at.setter
|
135
|
+
def updated_at(self, updated_at):
|
136
|
+
r"""Sets the updated_at of this SharedResource.
|
137
|
+
|
138
|
+
最后一次更新资源共享实例的时间。
|
139
|
+
|
140
|
+
:param updated_at: The updated_at of this SharedResource.
|
141
|
+
:type updated_at: datetime
|
142
|
+
"""
|
143
|
+
self._updated_at = updated_at
|
144
|
+
|
145
|
+
@property
|
146
|
+
def resource_type(self):
|
147
|
+
r"""Gets the resource_type of this SharedResource.
|
148
|
+
|
149
|
+
资源的类型。
|
150
|
+
|
151
|
+
:return: The resource_type of this SharedResource.
|
152
|
+
:rtype: str
|
153
|
+
"""
|
154
|
+
return self._resource_type
|
155
|
+
|
156
|
+
@resource_type.setter
|
157
|
+
def resource_type(self, resource_type):
|
158
|
+
r"""Sets the resource_type of this SharedResource.
|
159
|
+
|
160
|
+
资源的类型。
|
161
|
+
|
162
|
+
:param resource_type: The resource_type of this SharedResource.
|
163
|
+
:type resource_type: str
|
164
|
+
"""
|
165
|
+
self._resource_type = resource_type
|
166
|
+
|
167
|
+
@property
|
168
|
+
def resource_share_id(self):
|
169
|
+
r"""Gets the resource_share_id of this SharedResource.
|
170
|
+
|
171
|
+
资源绑定的资源共享实例的ID。
|
172
|
+
|
173
|
+
:return: The resource_share_id of this SharedResource.
|
174
|
+
:rtype: str
|
175
|
+
"""
|
176
|
+
return self._resource_share_id
|
177
|
+
|
178
|
+
@resource_share_id.setter
|
179
|
+
def resource_share_id(self, resource_share_id):
|
180
|
+
r"""Sets the resource_share_id of this SharedResource.
|
181
|
+
|
182
|
+
资源绑定的资源共享实例的ID。
|
183
|
+
|
184
|
+
:param resource_share_id: The resource_share_id of this SharedResource.
|
185
|
+
:type resource_share_id: str
|
186
|
+
"""
|
187
|
+
self._resource_share_id = resource_share_id
|
188
|
+
|
189
|
+
@property
|
190
|
+
def status(self):
|
191
|
+
r"""Gets the status of this SharedResource.
|
192
|
+
|
193
|
+
资源绑定的当前状态。
|
194
|
+
|
195
|
+
:return: The status of this SharedResource.
|
196
|
+
:rtype: str
|
197
|
+
"""
|
198
|
+
return self._status
|
199
|
+
|
200
|
+
@status.setter
|
201
|
+
def status(self, status):
|
202
|
+
r"""Sets the status of this SharedResource.
|
203
|
+
|
204
|
+
资源绑定的当前状态。
|
205
|
+
|
206
|
+
:param status: The status of this SharedResource.
|
207
|
+
:type status: str
|
208
|
+
"""
|
209
|
+
self._status = status
|
210
|
+
|
211
|
+
def to_dict(self):
|
212
|
+
"""Returns the model properties as a dict"""
|
213
|
+
result = {}
|
214
|
+
|
215
|
+
for attr, _ in six.iteritems(self.openapi_types):
|
216
|
+
value = getattr(self, attr)
|
217
|
+
if isinstance(value, list):
|
218
|
+
result[attr] = list(map(
|
219
|
+
lambda x: x.to_dict() if hasattr(x, "to_dict") else x,
|
220
|
+
value
|
221
|
+
))
|
222
|
+
elif hasattr(value, "to_dict"):
|
223
|
+
result[attr] = value.to_dict()
|
224
|
+
elif isinstance(value, dict):
|
225
|
+
result[attr] = dict(map(
|
226
|
+
lambda item: (item[0], item[1].to_dict())
|
227
|
+
if hasattr(item[1], "to_dict") else item,
|
228
|
+
value.items()
|
229
|
+
))
|
230
|
+
else:
|
231
|
+
if attr in self.sensitive_list:
|
232
|
+
result[attr] = "****"
|
233
|
+
else:
|
234
|
+
result[attr] = value
|
235
|
+
|
236
|
+
return result
|
237
|
+
|
238
|
+
def to_str(self):
|
239
|
+
"""Returns the string representation of the model"""
|
240
|
+
import simplejson as json
|
241
|
+
if six.PY2:
|
242
|
+
import sys
|
243
|
+
reload(sys)
|
244
|
+
sys.setdefaultencoding("utf-8")
|
245
|
+
return json.dumps(sanitize_for_serialization(self), ensure_ascii=False)
|
246
|
+
|
247
|
+
def __repr__(self):
|
248
|
+
"""For `print`"""
|
249
|
+
return self.to_str()
|
250
|
+
|
251
|
+
def __eq__(self, other):
|
252
|
+
"""Returns true if both objects are equal"""
|
253
|
+
if not isinstance(other, SharedResource):
|
254
|
+
return False
|
255
|
+
|
256
|
+
return self.__dict__ == other.__dict__
|
257
|
+
|
258
|
+
def __ne__(self, other):
|
259
|
+
"""Returns true if both objects are not equal"""
|
260
|
+
return not self == other
|