huaweicloudsdkram 3.1.160__py3-none-any.whl → 3.1.161__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/v1/__init__.py +8 -0
- huaweicloudsdkram/v1/model/__init__.py +8 -0
- huaweicloudsdkram/v1/model/distinct_shared_principal.py +144 -0
- huaweicloudsdkram/v1/model/distinct_shared_resource.py +173 -0
- huaweicloudsdkram/v1/model/search_distinct_principals_request.py +141 -0
- huaweicloudsdkram/v1/model/search_distinct_principals_response.py +141 -0
- huaweicloudsdkram/v1/model/search_distinct_shared_principals_req_body.py +230 -0
- huaweicloudsdkram/v1/model/search_distinct_shared_resources_req_body.py +288 -0
- huaweicloudsdkram/v1/model/search_distinct_shared_resources_request.py +141 -0
- huaweicloudsdkram/v1/model/search_distinct_shared_resources_response.py +141 -0
- huaweicloudsdkram/v1/ram_async_client.py +134 -0
- huaweicloudsdkram/v1/ram_client.py +134 -0
- {huaweicloudsdkram-3.1.160.dist-info → huaweicloudsdkram-3.1.161.dist-info}/METADATA +2 -2
- {huaweicloudsdkram-3.1.160.dist-info → huaweicloudsdkram-3.1.161.dist-info}/RECORD +17 -9
- {huaweicloudsdkram-3.1.160.dist-info → huaweicloudsdkram-3.1.161.dist-info}/LICENSE +0 -0
- {huaweicloudsdkram-3.1.160.dist-info → huaweicloudsdkram-3.1.161.dist-info}/WHEEL +0 -0
- {huaweicloudsdkram-3.1.160.dist-info → huaweicloudsdkram-3.1.161.dist-info}/top_level.txt +0 -0
huaweicloudsdkram/v1/__init__.py
CHANGED
@@ -29,6 +29,8 @@ from huaweicloudsdkram.v1.model.disassociate_resource_share_permission_request i
|
|
29
29
|
from huaweicloudsdkram.v1.model.disassociate_resource_share_permission_response import DisassociateResourceSharePermissionResponse
|
30
30
|
from huaweicloudsdkram.v1.model.disassociate_resource_share_request import DisassociateResourceShareRequest
|
31
31
|
from huaweicloudsdkram.v1.model.disassociate_resource_share_response import DisassociateResourceShareResponse
|
32
|
+
from huaweicloudsdkram.v1.model.distinct_shared_principal import DistinctSharedPrincipal
|
33
|
+
from huaweicloudsdkram.v1.model.distinct_shared_resource import DistinctSharedResource
|
32
34
|
from huaweicloudsdkram.v1.model.enable_organization_share_request import EnableOrganizationShareRequest
|
33
35
|
from huaweicloudsdkram.v1.model.enable_organization_share_response import EnableOrganizationShareResponse
|
34
36
|
from huaweicloudsdkram.v1.model.list_permission_versions_request import ListPermissionVersionsRequest
|
@@ -61,6 +63,12 @@ from huaweicloudsdkram.v1.model.resource_share_association_req_body import Resou
|
|
61
63
|
from huaweicloudsdkram.v1.model.resource_share_invitation import ResourceShareInvitation
|
62
64
|
from huaweicloudsdkram.v1.model.resource_shares_by_tags_req_body import ResourceSharesByTagsReqBody
|
63
65
|
from huaweicloudsdkram.v1.model.resource_types_summary import ResourceTypesSummary
|
66
|
+
from huaweicloudsdkram.v1.model.search_distinct_principals_request import SearchDistinctPrincipalsRequest
|
67
|
+
from huaweicloudsdkram.v1.model.search_distinct_principals_response import SearchDistinctPrincipalsResponse
|
68
|
+
from huaweicloudsdkram.v1.model.search_distinct_shared_principals_req_body import SearchDistinctSharedPrincipalsReqBody
|
69
|
+
from huaweicloudsdkram.v1.model.search_distinct_shared_resources_req_body import SearchDistinctSharedResourcesReqBody
|
70
|
+
from huaweicloudsdkram.v1.model.search_distinct_shared_resources_request import SearchDistinctSharedResourcesRequest
|
71
|
+
from huaweicloudsdkram.v1.model.search_distinct_shared_resources_response import SearchDistinctSharedResourcesResponse
|
64
72
|
from huaweicloudsdkram.v1.model.search_resource_share_associations_req_body import SearchResourceShareAssociationsReqBody
|
65
73
|
from huaweicloudsdkram.v1.model.search_resource_share_associations_request import SearchResourceShareAssociationsRequest
|
66
74
|
from huaweicloudsdkram.v1.model.search_resource_share_associations_response import SearchResourceShareAssociationsResponse
|
@@ -27,6 +27,8 @@ from huaweicloudsdkram.v1.model.disassociate_resource_share_permission_request i
|
|
27
27
|
from huaweicloudsdkram.v1.model.disassociate_resource_share_permission_response import DisassociateResourceSharePermissionResponse
|
28
28
|
from huaweicloudsdkram.v1.model.disassociate_resource_share_request import DisassociateResourceShareRequest
|
29
29
|
from huaweicloudsdkram.v1.model.disassociate_resource_share_response import DisassociateResourceShareResponse
|
30
|
+
from huaweicloudsdkram.v1.model.distinct_shared_principal import DistinctSharedPrincipal
|
31
|
+
from huaweicloudsdkram.v1.model.distinct_shared_resource import DistinctSharedResource
|
30
32
|
from huaweicloudsdkram.v1.model.enable_organization_share_request import EnableOrganizationShareRequest
|
31
33
|
from huaweicloudsdkram.v1.model.enable_organization_share_response import EnableOrganizationShareResponse
|
32
34
|
from huaweicloudsdkram.v1.model.list_permission_versions_request import ListPermissionVersionsRequest
|
@@ -59,6 +61,12 @@ from huaweicloudsdkram.v1.model.resource_share_association_req_body import Resou
|
|
59
61
|
from huaweicloudsdkram.v1.model.resource_share_invitation import ResourceShareInvitation
|
60
62
|
from huaweicloudsdkram.v1.model.resource_shares_by_tags_req_body import ResourceSharesByTagsReqBody
|
61
63
|
from huaweicloudsdkram.v1.model.resource_types_summary import ResourceTypesSummary
|
64
|
+
from huaweicloudsdkram.v1.model.search_distinct_principals_request import SearchDistinctPrincipalsRequest
|
65
|
+
from huaweicloudsdkram.v1.model.search_distinct_principals_response import SearchDistinctPrincipalsResponse
|
66
|
+
from huaweicloudsdkram.v1.model.search_distinct_shared_principals_req_body import SearchDistinctSharedPrincipalsReqBody
|
67
|
+
from huaweicloudsdkram.v1.model.search_distinct_shared_resources_req_body import SearchDistinctSharedResourcesReqBody
|
68
|
+
from huaweicloudsdkram.v1.model.search_distinct_shared_resources_request import SearchDistinctSharedResourcesRequest
|
69
|
+
from huaweicloudsdkram.v1.model.search_distinct_shared_resources_response import SearchDistinctSharedResourcesResponse
|
62
70
|
from huaweicloudsdkram.v1.model.search_resource_share_associations_req_body import SearchResourceShareAssociationsReqBody
|
63
71
|
from huaweicloudsdkram.v1.model.search_resource_share_associations_request import SearchResourceShareAssociationsRequest
|
64
72
|
from huaweicloudsdkram.v1.model.search_resource_share_associations_response import SearchResourceShareAssociationsResponse
|
@@ -0,0 +1,144 @@
|
|
1
|
+
# coding: utf-8
|
2
|
+
|
3
|
+
import six
|
4
|
+
|
5
|
+
from huaweicloudsdkcore.utils.http_utils import sanitize_for_serialization
|
6
|
+
|
7
|
+
|
8
|
+
class DistinctSharedPrincipal:
|
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
|
+
'updated_at': 'datetime'
|
22
|
+
}
|
23
|
+
|
24
|
+
attribute_map = {
|
25
|
+
'id': 'id',
|
26
|
+
'updated_at': 'updated_at'
|
27
|
+
}
|
28
|
+
|
29
|
+
def __init__(self, id=None, updated_at=None):
|
30
|
+
r"""DistinctSharedPrincipal
|
31
|
+
|
32
|
+
The model defined in huaweicloud sdk
|
33
|
+
|
34
|
+
:param id: 资源共享实例的创建者或使用者的账号ID或URN。
|
35
|
+
:type id: str
|
36
|
+
:param updated_at: 最后一次更新资源共享实例的时间。
|
37
|
+
:type updated_at: datetime
|
38
|
+
"""
|
39
|
+
|
40
|
+
|
41
|
+
|
42
|
+
self._id = None
|
43
|
+
self._updated_at = None
|
44
|
+
self.discriminator = None
|
45
|
+
|
46
|
+
if id is not None:
|
47
|
+
self.id = id
|
48
|
+
if updated_at is not None:
|
49
|
+
self.updated_at = updated_at
|
50
|
+
|
51
|
+
@property
|
52
|
+
def id(self):
|
53
|
+
r"""Gets the id of this DistinctSharedPrincipal.
|
54
|
+
|
55
|
+
资源共享实例的创建者或使用者的账号ID或URN。
|
56
|
+
|
57
|
+
:return: The id of this DistinctSharedPrincipal.
|
58
|
+
:rtype: str
|
59
|
+
"""
|
60
|
+
return self._id
|
61
|
+
|
62
|
+
@id.setter
|
63
|
+
def id(self, id):
|
64
|
+
r"""Sets the id of this DistinctSharedPrincipal.
|
65
|
+
|
66
|
+
资源共享实例的创建者或使用者的账号ID或URN。
|
67
|
+
|
68
|
+
:param id: The id of this DistinctSharedPrincipal.
|
69
|
+
:type id: str
|
70
|
+
"""
|
71
|
+
self._id = id
|
72
|
+
|
73
|
+
@property
|
74
|
+
def updated_at(self):
|
75
|
+
r"""Gets the updated_at of this DistinctSharedPrincipal.
|
76
|
+
|
77
|
+
最后一次更新资源共享实例的时间。
|
78
|
+
|
79
|
+
:return: The updated_at of this DistinctSharedPrincipal.
|
80
|
+
:rtype: datetime
|
81
|
+
"""
|
82
|
+
return self._updated_at
|
83
|
+
|
84
|
+
@updated_at.setter
|
85
|
+
def updated_at(self, updated_at):
|
86
|
+
r"""Sets the updated_at of this DistinctSharedPrincipal.
|
87
|
+
|
88
|
+
最后一次更新资源共享实例的时间。
|
89
|
+
|
90
|
+
:param updated_at: The updated_at of this DistinctSharedPrincipal.
|
91
|
+
:type updated_at: datetime
|
92
|
+
"""
|
93
|
+
self._updated_at = updated_at
|
94
|
+
|
95
|
+
def to_dict(self):
|
96
|
+
"""Returns the model properties as a dict"""
|
97
|
+
result = {}
|
98
|
+
|
99
|
+
for attr, _ in six.iteritems(self.openapi_types):
|
100
|
+
value = getattr(self, attr)
|
101
|
+
if isinstance(value, list):
|
102
|
+
result[attr] = list(map(
|
103
|
+
lambda x: x.to_dict() if hasattr(x, "to_dict") else x,
|
104
|
+
value
|
105
|
+
))
|
106
|
+
elif hasattr(value, "to_dict"):
|
107
|
+
result[attr] = value.to_dict()
|
108
|
+
elif isinstance(value, dict):
|
109
|
+
result[attr] = dict(map(
|
110
|
+
lambda item: (item[0], item[1].to_dict())
|
111
|
+
if hasattr(item[1], "to_dict") else item,
|
112
|
+
value.items()
|
113
|
+
))
|
114
|
+
else:
|
115
|
+
if attr in self.sensitive_list:
|
116
|
+
result[attr] = "****"
|
117
|
+
else:
|
118
|
+
result[attr] = value
|
119
|
+
|
120
|
+
return result
|
121
|
+
|
122
|
+
def to_str(self):
|
123
|
+
"""Returns the string representation of the model"""
|
124
|
+
import simplejson as json
|
125
|
+
if six.PY2:
|
126
|
+
import sys
|
127
|
+
reload(sys)
|
128
|
+
sys.setdefaultencoding("utf-8")
|
129
|
+
return json.dumps(sanitize_for_serialization(self), ensure_ascii=False)
|
130
|
+
|
131
|
+
def __repr__(self):
|
132
|
+
"""For `print`"""
|
133
|
+
return self.to_str()
|
134
|
+
|
135
|
+
def __eq__(self, other):
|
136
|
+
"""Returns true if both objects are equal"""
|
137
|
+
if not isinstance(other, DistinctSharedPrincipal):
|
138
|
+
return False
|
139
|
+
|
140
|
+
return self.__dict__ == other.__dict__
|
141
|
+
|
142
|
+
def __ne__(self, other):
|
143
|
+
"""Returns true if both objects are not equal"""
|
144
|
+
return not self == other
|
@@ -0,0 +1,173 @@
|
|
1
|
+
# coding: utf-8
|
2
|
+
|
3
|
+
import six
|
4
|
+
|
5
|
+
from huaweicloudsdkcore.utils.http_utils import sanitize_for_serialization
|
6
|
+
|
7
|
+
|
8
|
+
class DistinctSharedResource:
|
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
|
+
'resource_type': 'str',
|
22
|
+
'updated_at': 'datetime'
|
23
|
+
}
|
24
|
+
|
25
|
+
attribute_map = {
|
26
|
+
'resource_urn': 'resource_urn',
|
27
|
+
'resource_type': 'resource_type',
|
28
|
+
'updated_at': 'updated_at'
|
29
|
+
}
|
30
|
+
|
31
|
+
def __init__(self, resource_urn=None, resource_type=None, updated_at=None):
|
32
|
+
r"""DistinctSharedResource
|
33
|
+
|
34
|
+
The model defined in huaweicloud sdk
|
35
|
+
|
36
|
+
:param resource_urn: 资源的统一资源名称。
|
37
|
+
:type resource_urn: str
|
38
|
+
:param resource_type: 资源的类型。
|
39
|
+
:type resource_type: str
|
40
|
+
:param updated_at: 最后一次更新资源共享实例的时间。
|
41
|
+
:type updated_at: datetime
|
42
|
+
"""
|
43
|
+
|
44
|
+
|
45
|
+
|
46
|
+
self._resource_urn = None
|
47
|
+
self._resource_type = None
|
48
|
+
self._updated_at = None
|
49
|
+
self.discriminator = None
|
50
|
+
|
51
|
+
if resource_urn is not None:
|
52
|
+
self.resource_urn = resource_urn
|
53
|
+
if resource_type is not None:
|
54
|
+
self.resource_type = resource_type
|
55
|
+
if updated_at is not None:
|
56
|
+
self.updated_at = updated_at
|
57
|
+
|
58
|
+
@property
|
59
|
+
def resource_urn(self):
|
60
|
+
r"""Gets the resource_urn of this DistinctSharedResource.
|
61
|
+
|
62
|
+
资源的统一资源名称。
|
63
|
+
|
64
|
+
:return: The resource_urn of this DistinctSharedResource.
|
65
|
+
:rtype: str
|
66
|
+
"""
|
67
|
+
return self._resource_urn
|
68
|
+
|
69
|
+
@resource_urn.setter
|
70
|
+
def resource_urn(self, resource_urn):
|
71
|
+
r"""Sets the resource_urn of this DistinctSharedResource.
|
72
|
+
|
73
|
+
资源的统一资源名称。
|
74
|
+
|
75
|
+
:param resource_urn: The resource_urn of this DistinctSharedResource.
|
76
|
+
:type resource_urn: str
|
77
|
+
"""
|
78
|
+
self._resource_urn = resource_urn
|
79
|
+
|
80
|
+
@property
|
81
|
+
def resource_type(self):
|
82
|
+
r"""Gets the resource_type of this DistinctSharedResource.
|
83
|
+
|
84
|
+
资源的类型。
|
85
|
+
|
86
|
+
:return: The resource_type of this DistinctSharedResource.
|
87
|
+
:rtype: str
|
88
|
+
"""
|
89
|
+
return self._resource_type
|
90
|
+
|
91
|
+
@resource_type.setter
|
92
|
+
def resource_type(self, resource_type):
|
93
|
+
r"""Sets the resource_type of this DistinctSharedResource.
|
94
|
+
|
95
|
+
资源的类型。
|
96
|
+
|
97
|
+
:param resource_type: The resource_type of this DistinctSharedResource.
|
98
|
+
:type resource_type: str
|
99
|
+
"""
|
100
|
+
self._resource_type = resource_type
|
101
|
+
|
102
|
+
@property
|
103
|
+
def updated_at(self):
|
104
|
+
r"""Gets the updated_at of this DistinctSharedResource.
|
105
|
+
|
106
|
+
最后一次更新资源共享实例的时间。
|
107
|
+
|
108
|
+
:return: The updated_at of this DistinctSharedResource.
|
109
|
+
:rtype: datetime
|
110
|
+
"""
|
111
|
+
return self._updated_at
|
112
|
+
|
113
|
+
@updated_at.setter
|
114
|
+
def updated_at(self, updated_at):
|
115
|
+
r"""Sets the updated_at of this DistinctSharedResource.
|
116
|
+
|
117
|
+
最后一次更新资源共享实例的时间。
|
118
|
+
|
119
|
+
:param updated_at: The updated_at of this DistinctSharedResource.
|
120
|
+
:type updated_at: datetime
|
121
|
+
"""
|
122
|
+
self._updated_at = updated_at
|
123
|
+
|
124
|
+
def to_dict(self):
|
125
|
+
"""Returns the model properties as a dict"""
|
126
|
+
result = {}
|
127
|
+
|
128
|
+
for attr, _ in six.iteritems(self.openapi_types):
|
129
|
+
value = getattr(self, attr)
|
130
|
+
if isinstance(value, list):
|
131
|
+
result[attr] = list(map(
|
132
|
+
lambda x: x.to_dict() if hasattr(x, "to_dict") else x,
|
133
|
+
value
|
134
|
+
))
|
135
|
+
elif hasattr(value, "to_dict"):
|
136
|
+
result[attr] = value.to_dict()
|
137
|
+
elif isinstance(value, dict):
|
138
|
+
result[attr] = dict(map(
|
139
|
+
lambda item: (item[0], item[1].to_dict())
|
140
|
+
if hasattr(item[1], "to_dict") else item,
|
141
|
+
value.items()
|
142
|
+
))
|
143
|
+
else:
|
144
|
+
if attr in self.sensitive_list:
|
145
|
+
result[attr] = "****"
|
146
|
+
else:
|
147
|
+
result[attr] = value
|
148
|
+
|
149
|
+
return result
|
150
|
+
|
151
|
+
def to_str(self):
|
152
|
+
"""Returns the string representation of the model"""
|
153
|
+
import simplejson as json
|
154
|
+
if six.PY2:
|
155
|
+
import sys
|
156
|
+
reload(sys)
|
157
|
+
sys.setdefaultencoding("utf-8")
|
158
|
+
return json.dumps(sanitize_for_serialization(self), ensure_ascii=False)
|
159
|
+
|
160
|
+
def __repr__(self):
|
161
|
+
"""For `print`"""
|
162
|
+
return self.to_str()
|
163
|
+
|
164
|
+
def __eq__(self, other):
|
165
|
+
"""Returns true if both objects are equal"""
|
166
|
+
if not isinstance(other, DistinctSharedResource):
|
167
|
+
return False
|
168
|
+
|
169
|
+
return self.__dict__ == other.__dict__
|
170
|
+
|
171
|
+
def __ne__(self, other):
|
172
|
+
"""Returns true if both objects are not equal"""
|
173
|
+
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 SearchDistinctPrincipalsRequest:
|
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': 'SearchDistinctSharedPrincipalsReqBody'
|
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"""SearchDistinctPrincipalsRequest
|
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 SearchDistinctPrincipalsRequest
|
38
|
+
:type body: :class:`huaweicloudsdkram.v1.SearchDistinctSharedPrincipalsReqBody`
|
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 SearchDistinctPrincipalsRequest.
|
55
|
+
|
56
|
+
如果正在使用临时安全凭据,则此header是必需的,该值是临时安全凭据的安全令牌(会话令牌)。
|
57
|
+
|
58
|
+
:return: The x_security_token of this SearchDistinctPrincipalsRequest.
|
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 SearchDistinctPrincipalsRequest.
|
66
|
+
|
67
|
+
如果正在使用临时安全凭据,则此header是必需的,该值是临时安全凭据的安全令牌(会话令牌)。
|
68
|
+
|
69
|
+
:param x_security_token: The x_security_token of this SearchDistinctPrincipalsRequest.
|
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 SearchDistinctPrincipalsRequest.
|
77
|
+
|
78
|
+
:return: The body of this SearchDistinctPrincipalsRequest.
|
79
|
+
:rtype: :class:`huaweicloudsdkram.v1.SearchDistinctSharedPrincipalsReqBody`
|
80
|
+
"""
|
81
|
+
return self._body
|
82
|
+
|
83
|
+
@body.setter
|
84
|
+
def body(self, body):
|
85
|
+
r"""Sets the body of this SearchDistinctPrincipalsRequest.
|
86
|
+
|
87
|
+
:param body: The body of this SearchDistinctPrincipalsRequest.
|
88
|
+
:type body: :class:`huaweicloudsdkram.v1.SearchDistinctSharedPrincipalsReqBody`
|
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, SearchDistinctPrincipalsRequest):
|
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,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 SearchDistinctPrincipalsResponse(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
|
+
'distinct_shared_principals': 'list[DistinctSharedPrincipal]',
|
22
|
+
'page_info': 'PageInfo'
|
23
|
+
}
|
24
|
+
|
25
|
+
attribute_map = {
|
26
|
+
'distinct_shared_principals': 'distinct_shared_principals',
|
27
|
+
'page_info': 'page_info'
|
28
|
+
}
|
29
|
+
|
30
|
+
def __init__(self, distinct_shared_principals=None, page_info=None):
|
31
|
+
r"""SearchDistinctPrincipalsResponse
|
32
|
+
|
33
|
+
The model defined in huaweicloud sdk
|
34
|
+
|
35
|
+
:param distinct_shared_principals: 不同角色的信息列表。
|
36
|
+
:type distinct_shared_principals: list[:class:`huaweicloudsdkram.v1.DistinctSharedPrincipal`]
|
37
|
+
:param page_info:
|
38
|
+
:type page_info: :class:`huaweicloudsdkram.v1.PageInfo`
|
39
|
+
"""
|
40
|
+
|
41
|
+
super(SearchDistinctPrincipalsResponse, self).__init__()
|
42
|
+
|
43
|
+
self._distinct_shared_principals = None
|
44
|
+
self._page_info = None
|
45
|
+
self.discriminator = None
|
46
|
+
|
47
|
+
if distinct_shared_principals is not None:
|
48
|
+
self.distinct_shared_principals = distinct_shared_principals
|
49
|
+
if page_info is not None:
|
50
|
+
self.page_info = page_info
|
51
|
+
|
52
|
+
@property
|
53
|
+
def distinct_shared_principals(self):
|
54
|
+
r"""Gets the distinct_shared_principals of this SearchDistinctPrincipalsResponse.
|
55
|
+
|
56
|
+
不同角色的信息列表。
|
57
|
+
|
58
|
+
:return: The distinct_shared_principals of this SearchDistinctPrincipalsResponse.
|
59
|
+
:rtype: list[:class:`huaweicloudsdkram.v1.DistinctSharedPrincipal`]
|
60
|
+
"""
|
61
|
+
return self._distinct_shared_principals
|
62
|
+
|
63
|
+
@distinct_shared_principals.setter
|
64
|
+
def distinct_shared_principals(self, distinct_shared_principals):
|
65
|
+
r"""Sets the distinct_shared_principals of this SearchDistinctPrincipalsResponse.
|
66
|
+
|
67
|
+
不同角色的信息列表。
|
68
|
+
|
69
|
+
:param distinct_shared_principals: The distinct_shared_principals of this SearchDistinctPrincipalsResponse.
|
70
|
+
:type distinct_shared_principals: list[:class:`huaweicloudsdkram.v1.DistinctSharedPrincipal`]
|
71
|
+
"""
|
72
|
+
self._distinct_shared_principals = distinct_shared_principals
|
73
|
+
|
74
|
+
@property
|
75
|
+
def page_info(self):
|
76
|
+
r"""Gets the page_info of this SearchDistinctPrincipalsResponse.
|
77
|
+
|
78
|
+
:return: The page_info of this SearchDistinctPrincipalsResponse.
|
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 SearchDistinctPrincipalsResponse.
|
86
|
+
|
87
|
+
:param page_info: The page_info of this SearchDistinctPrincipalsResponse.
|
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, SearchDistinctPrincipalsResponse):
|
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
|