huaweicloudsdkobs 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.
- huaweicloudsdkobs/__init__.py +0 -0
- huaweicloudsdkobs/v1/__init__.py +66 -0
- huaweicloudsdkobs/v1/model/__init__.py +63 -0
- huaweicloudsdkobs/v1/model/access_control_list.py +113 -0
- huaweicloudsdkobs/v1/model/bucket.py +233 -0
- huaweicloudsdkobs/v1/model/buckets.py +117 -0
- huaweicloudsdkobs/v1/model/common_prefixes.py +113 -0
- huaweicloudsdkobs/v1/model/contents.py +287 -0
- huaweicloudsdkobs/v1/model/copy_object_request.py +839 -0
- huaweicloudsdkobs/v1/model/copy_object_response.py +443 -0
- huaweicloudsdkobs/v1/model/create_bucket_request.py +605 -0
- huaweicloudsdkobs/v1/model/create_bucket_request_body.py +117 -0
- huaweicloudsdkobs/v1/model/create_bucket_response.py +239 -0
- huaweicloudsdkobs/v1/model/delete_bucket_customdomain_request.py +173 -0
- huaweicloudsdkobs/v1/model/delete_bucket_customdomain_response.py +239 -0
- huaweicloudsdkobs/v1/model/delete_bucket_request.py +145 -0
- huaweicloudsdkobs/v1/model/delete_bucket_response.py +239 -0
- huaweicloudsdkobs/v1/model/delete_object.py +146 -0
- huaweicloudsdkobs/v1/model/delete_object_request.py +202 -0
- huaweicloudsdkobs/v1/model/delete_object_response.py +289 -0
- huaweicloudsdkobs/v1/model/delete_objects_request.py +226 -0
- huaweicloudsdkobs/v1/model/delete_objects_request_body.py +171 -0
- huaweicloudsdkobs/v1/model/delete_objects_response.py +318 -0
- huaweicloudsdkobs/v1/model/delete_result_deleted.py +204 -0
- huaweicloudsdkobs/v1/model/delete_result_error.py +175 -0
- huaweicloudsdkobs/v1/model/domains.py +173 -0
- huaweicloudsdkobs/v1/model/filter_object.py +113 -0
- huaweicloudsdkobs/v1/model/filter_rule.py +146 -0
- huaweicloudsdkobs/v1/model/function_stage_configuration.py +229 -0
- huaweicloudsdkobs/v1/model/get_bucket_acl_request.py +173 -0
- huaweicloudsdkobs/v1/model/get_bucket_acl_response.py +289 -0
- huaweicloudsdkobs/v1/model/get_bucket_customdomain_request.py +173 -0
- huaweicloudsdkobs/v1/model/get_bucket_customdomain_response.py +264 -0
- huaweicloudsdkobs/v1/model/get_bucket_metadata_request.py +203 -0
- huaweicloudsdkobs/v1/model/get_bucket_metadata_response.py +539 -0
- huaweicloudsdkobs/v1/model/get_bucket_notification_request.py +173 -0
- huaweicloudsdkobs/v1/model/get_bucket_notification_response.py +264 -0
- huaweicloudsdkobs/v1/model/get_object_metadata_request.py +405 -0
- huaweicloudsdkobs/v1/model/get_object_metadata_response.py +689 -0
- huaweicloudsdkobs/v1/model/get_object_request.py +666 -0
- huaweicloudsdkobs/v1/model/get_object_response.py +489 -0
- huaweicloudsdkobs/v1/model/grant.py +171 -0
- huaweicloudsdkobs/v1/model/grantee.py +146 -0
- huaweicloudsdkobs/v1/model/list_buckets_request.py +146 -0
- huaweicloudsdkobs/v1/model/list_buckets_response.py +314 -0
- huaweicloudsdkobs/v1/model/list_objects_request.py +348 -0
- huaweicloudsdkobs/v1/model/list_objects_response.py +546 -0
- huaweicloudsdkobs/v1/model/owner.py +117 -0
- huaweicloudsdkobs/v1/model/put_object_request.py +667 -0
- huaweicloudsdkobs/v1/model/put_object_response.py +389 -0
- huaweicloudsdkobs/v1/model/set_bucket_acl_request.py +227 -0
- huaweicloudsdkobs/v1/model/set_bucket_acl_request_body.py +138 -0
- huaweicloudsdkobs/v1/model/set_bucket_acl_response.py +239 -0
- huaweicloudsdkobs/v1/model/set_bucket_custom_domain_body.py +230 -0
- huaweicloudsdkobs/v1/model/set_bucket_customedomain_request.py +198 -0
- huaweicloudsdkobs/v1/model/set_bucket_customedomain_response.py +239 -0
- huaweicloudsdkobs/v1/model/set_bucket_notification_request.py +198 -0
- huaweicloudsdkobs/v1/model/set_bucket_notification_request_body.py +138 -0
- huaweicloudsdkobs/v1/model/set_bucket_notification_response.py +239 -0
- huaweicloudsdkobs/v1/model/topic_configuration.py +200 -0
- huaweicloudsdkobs/v1/model/topic_configuration_filter.py +113 -0
- huaweicloudsdkobs/v1/obs_async_client.py +1600 -0
- huaweicloudsdkobs/v1/obs_client.py +1597 -0
- huaweicloudsdkobs/v1/obs_credentials.py +69 -0
- huaweicloudsdkobs/v1/obs_signer.py +298 -0
- huaweicloudsdkobs/v1/region/__init__.py +0 -0
- huaweicloudsdkobs/v1/region/obs_region.py +88 -0
- huaweicloudsdkobs-3.1.160.dist-info/LICENSE +13 -0
- huaweicloudsdkobs-3.1.160.dist-info/METADATA +26 -0
- huaweicloudsdkobs-3.1.160.dist-info/RECORD +72 -0
- huaweicloudsdkobs-3.1.160.dist-info/WHEEL +5 -0
- huaweicloudsdkobs-3.1.160.dist-info/top_level.txt +1 -0
@@ -0,0 +1,348 @@
|
|
1
|
+
# coding: utf-8
|
2
|
+
|
3
|
+
import six
|
4
|
+
|
5
|
+
from huaweicloudsdkcore.utils.http_utils import sanitize_for_serialization
|
6
|
+
|
7
|
+
|
8
|
+
class ListObjectsRequest:
|
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
|
+
xml_name = "ListObjectsRequest"
|
18
|
+
|
19
|
+
sensitive_list = []
|
20
|
+
|
21
|
+
openapi_types = {
|
22
|
+
'date': 'str',
|
23
|
+
'bucket_name': 'str',
|
24
|
+
'prefix': 'str',
|
25
|
+
'marker': 'str',
|
26
|
+
'max_keys': 'int',
|
27
|
+
'delimiter': 'str',
|
28
|
+
'key_marker': 'str',
|
29
|
+
'version_id_marker': 'str',
|
30
|
+
'encoding_type': 'str'
|
31
|
+
}
|
32
|
+
|
33
|
+
attribute_map = {
|
34
|
+
'date': 'Date',
|
35
|
+
'bucket_name': 'bucket_name',
|
36
|
+
'prefix': 'prefix',
|
37
|
+
'marker': 'marker',
|
38
|
+
'max_keys': 'max-keys',
|
39
|
+
'delimiter': 'delimiter',
|
40
|
+
'key_marker': 'key-marker',
|
41
|
+
'version_id_marker': 'version-id-marker',
|
42
|
+
'encoding_type': 'encoding-type'
|
43
|
+
}
|
44
|
+
|
45
|
+
def __init__(self, date=None, bucket_name=None, prefix=None, marker=None, max_keys=None, delimiter=None, key_marker=None, version_id_marker=None, encoding_type=None):
|
46
|
+
r"""ListObjectsRequest
|
47
|
+
|
48
|
+
The model defined in huaweicloud sdk
|
49
|
+
|
50
|
+
:param date: Time when a request was initiated, for example, **Wed, 27 Jun 2018 13:39:15 +0000**. Default value: none Restriction: This header is optional if the **x-obs-date** header is contained in the request, but mandatory in other circumstances.
|
51
|
+
:type date: str
|
52
|
+
:param bucket_name: Name of the requested bucket
|
53
|
+
:type bucket_name: str
|
54
|
+
:param prefix: Lists objects whose name starts with the specified prefix.
|
55
|
+
:type prefix: str
|
56
|
+
:param marker: Specifies a marker when listing objects in a bucket. With a marker configured, objects after this marker will be returned in alphabetical order.
|
57
|
+
:type marker: str
|
58
|
+
:param max_keys: Sets the maximum number of objects returned (in alphabetical order) in the response. The value ranges from 1 to 1000. If there are over 1,000 objects, only 1,000 objects are returned by default.
|
59
|
+
:type max_keys: int
|
60
|
+
:param delimiter: Separator used to group object names. If a prefix is specified, objects with the same string from the prefix to the first delimiter are grouped into one **CommonPrefixes**. If no prefix is specified, objects with the same string from the first character to the first delimiter are grouped into one **CommonPrefixes**. Assume that a bucket has objects **abcd**, **abcde**, and **bbcde** in it. If **delimiter** is set to **d** and **prefix** is set to **a**, objects **abcd** and **abcde** are grouped into a **CommonPrefixes** with **abcd** as the prefix. If only **delimiter** is set to **d**, objects **abcd** and **abcde** are grouped into a **CommonPrefixes** with **abcd** as the prefix, and **bbcde** is grouped separately into another **CommonPrefixes** with **bbcd** as the prefix.
|
61
|
+
:type delimiter: str
|
62
|
+
:param key_marker: Position to start with when objects are listed. Valid value: value of **NextKeyMarker** in the response body of the last request
|
63
|
+
:type key_marker: str
|
64
|
+
:param version_id_marker: This parameter applies only when versioning is enabled. Specifies the version ID to start with when objects in a bucket are listed. Objects are listed in alphabetical order and a maximum of 1,000 objects can be displayed at a time. This parameter is used together with **key-marker**. If the value of **version-id-marker** does not match **key-marker**, **version-id-marker** is invalid. Valid value: object version ID, which is the value of **NextVersionIdMarker** in the response body of the last request
|
65
|
+
:type version_id_marker: str
|
66
|
+
:param encoding_type: Encodes some elements in the response based on the specified type. If **Delimiter**, **Marker** (or **KeyMarker**), **Prefix**, **NextMarker** (or **NextKeyMarker**), and **Key** contain control characters that are not supported by XML 1.0 standards, you can configure **encoding-type** to encode **Delimiter**, **Marker** (or **KeyMarker**), **Prefix** (including the **Prefix** in **CommonPrefixes**), **NextMarker** (or **NextKeyMarker**), and **Key** in the response. Optional value: url
|
67
|
+
:type encoding_type: str
|
68
|
+
"""
|
69
|
+
|
70
|
+
|
71
|
+
|
72
|
+
self._date = None
|
73
|
+
self._bucket_name = None
|
74
|
+
self._prefix = None
|
75
|
+
self._marker = None
|
76
|
+
self._max_keys = None
|
77
|
+
self._delimiter = None
|
78
|
+
self._key_marker = None
|
79
|
+
self._version_id_marker = None
|
80
|
+
self._encoding_type = None
|
81
|
+
self.discriminator = None
|
82
|
+
|
83
|
+
if date is not None:
|
84
|
+
self.date = date
|
85
|
+
self.bucket_name = bucket_name
|
86
|
+
if prefix is not None:
|
87
|
+
self.prefix = prefix
|
88
|
+
if marker is not None:
|
89
|
+
self.marker = marker
|
90
|
+
if max_keys is not None:
|
91
|
+
self.max_keys = max_keys
|
92
|
+
if delimiter is not None:
|
93
|
+
self.delimiter = delimiter
|
94
|
+
if key_marker is not None:
|
95
|
+
self.key_marker = key_marker
|
96
|
+
if version_id_marker is not None:
|
97
|
+
self.version_id_marker = version_id_marker
|
98
|
+
if encoding_type is not None:
|
99
|
+
self.encoding_type = encoding_type
|
100
|
+
|
101
|
+
@property
|
102
|
+
def date(self):
|
103
|
+
r"""Gets the date of this ListObjectsRequest.
|
104
|
+
|
105
|
+
Time when a request was initiated, for example, **Wed, 27 Jun 2018 13:39:15 +0000**. Default value: none Restriction: This header is optional if the **x-obs-date** header is contained in the request, but mandatory in other circumstances.
|
106
|
+
|
107
|
+
:return: The date of this ListObjectsRequest.
|
108
|
+
:rtype: str
|
109
|
+
"""
|
110
|
+
return self._date
|
111
|
+
|
112
|
+
@date.setter
|
113
|
+
def date(self, date):
|
114
|
+
r"""Sets the date of this ListObjectsRequest.
|
115
|
+
|
116
|
+
Time when a request was initiated, for example, **Wed, 27 Jun 2018 13:39:15 +0000**. Default value: none Restriction: This header is optional if the **x-obs-date** header is contained in the request, but mandatory in other circumstances.
|
117
|
+
|
118
|
+
:param date: The date of this ListObjectsRequest.
|
119
|
+
:type date: str
|
120
|
+
"""
|
121
|
+
self._date = date
|
122
|
+
|
123
|
+
@property
|
124
|
+
def bucket_name(self):
|
125
|
+
r"""Gets the bucket_name of this ListObjectsRequest.
|
126
|
+
|
127
|
+
Name of the requested bucket
|
128
|
+
|
129
|
+
:return: The bucket_name of this ListObjectsRequest.
|
130
|
+
:rtype: str
|
131
|
+
"""
|
132
|
+
return self._bucket_name
|
133
|
+
|
134
|
+
@bucket_name.setter
|
135
|
+
def bucket_name(self, bucket_name):
|
136
|
+
r"""Sets the bucket_name of this ListObjectsRequest.
|
137
|
+
|
138
|
+
Name of the requested bucket
|
139
|
+
|
140
|
+
:param bucket_name: The bucket_name of this ListObjectsRequest.
|
141
|
+
:type bucket_name: str
|
142
|
+
"""
|
143
|
+
self._bucket_name = bucket_name
|
144
|
+
|
145
|
+
@property
|
146
|
+
def prefix(self):
|
147
|
+
r"""Gets the prefix of this ListObjectsRequest.
|
148
|
+
|
149
|
+
Lists objects whose name starts with the specified prefix.
|
150
|
+
|
151
|
+
:return: The prefix of this ListObjectsRequest.
|
152
|
+
:rtype: str
|
153
|
+
"""
|
154
|
+
return self._prefix
|
155
|
+
|
156
|
+
@prefix.setter
|
157
|
+
def prefix(self, prefix):
|
158
|
+
r"""Sets the prefix of this ListObjectsRequest.
|
159
|
+
|
160
|
+
Lists objects whose name starts with the specified prefix.
|
161
|
+
|
162
|
+
:param prefix: The prefix of this ListObjectsRequest.
|
163
|
+
:type prefix: str
|
164
|
+
"""
|
165
|
+
self._prefix = prefix
|
166
|
+
|
167
|
+
@property
|
168
|
+
def marker(self):
|
169
|
+
r"""Gets the marker of this ListObjectsRequest.
|
170
|
+
|
171
|
+
Specifies a marker when listing objects in a bucket. With a marker configured, objects after this marker will be returned in alphabetical order.
|
172
|
+
|
173
|
+
:return: The marker of this ListObjectsRequest.
|
174
|
+
:rtype: str
|
175
|
+
"""
|
176
|
+
return self._marker
|
177
|
+
|
178
|
+
@marker.setter
|
179
|
+
def marker(self, marker):
|
180
|
+
r"""Sets the marker of this ListObjectsRequest.
|
181
|
+
|
182
|
+
Specifies a marker when listing objects in a bucket. With a marker configured, objects after this marker will be returned in alphabetical order.
|
183
|
+
|
184
|
+
:param marker: The marker of this ListObjectsRequest.
|
185
|
+
:type marker: str
|
186
|
+
"""
|
187
|
+
self._marker = marker
|
188
|
+
|
189
|
+
@property
|
190
|
+
def max_keys(self):
|
191
|
+
r"""Gets the max_keys of this ListObjectsRequest.
|
192
|
+
|
193
|
+
Sets the maximum number of objects returned (in alphabetical order) in the response. The value ranges from 1 to 1000. If there are over 1,000 objects, only 1,000 objects are returned by default.
|
194
|
+
|
195
|
+
:return: The max_keys of this ListObjectsRequest.
|
196
|
+
:rtype: int
|
197
|
+
"""
|
198
|
+
return self._max_keys
|
199
|
+
|
200
|
+
@max_keys.setter
|
201
|
+
def max_keys(self, max_keys):
|
202
|
+
r"""Sets the max_keys of this ListObjectsRequest.
|
203
|
+
|
204
|
+
Sets the maximum number of objects returned (in alphabetical order) in the response. The value ranges from 1 to 1000. If there are over 1,000 objects, only 1,000 objects are returned by default.
|
205
|
+
|
206
|
+
:param max_keys: The max_keys of this ListObjectsRequest.
|
207
|
+
:type max_keys: int
|
208
|
+
"""
|
209
|
+
self._max_keys = max_keys
|
210
|
+
|
211
|
+
@property
|
212
|
+
def delimiter(self):
|
213
|
+
r"""Gets the delimiter of this ListObjectsRequest.
|
214
|
+
|
215
|
+
Separator used to group object names. If a prefix is specified, objects with the same string from the prefix to the first delimiter are grouped into one **CommonPrefixes**. If no prefix is specified, objects with the same string from the first character to the first delimiter are grouped into one **CommonPrefixes**. Assume that a bucket has objects **abcd**, **abcde**, and **bbcde** in it. If **delimiter** is set to **d** and **prefix** is set to **a**, objects **abcd** and **abcde** are grouped into a **CommonPrefixes** with **abcd** as the prefix. If only **delimiter** is set to **d**, objects **abcd** and **abcde** are grouped into a **CommonPrefixes** with **abcd** as the prefix, and **bbcde** is grouped separately into another **CommonPrefixes** with **bbcd** as the prefix.
|
216
|
+
|
217
|
+
:return: The delimiter of this ListObjectsRequest.
|
218
|
+
:rtype: str
|
219
|
+
"""
|
220
|
+
return self._delimiter
|
221
|
+
|
222
|
+
@delimiter.setter
|
223
|
+
def delimiter(self, delimiter):
|
224
|
+
r"""Sets the delimiter of this ListObjectsRequest.
|
225
|
+
|
226
|
+
Separator used to group object names. If a prefix is specified, objects with the same string from the prefix to the first delimiter are grouped into one **CommonPrefixes**. If no prefix is specified, objects with the same string from the first character to the first delimiter are grouped into one **CommonPrefixes**. Assume that a bucket has objects **abcd**, **abcde**, and **bbcde** in it. If **delimiter** is set to **d** and **prefix** is set to **a**, objects **abcd** and **abcde** are grouped into a **CommonPrefixes** with **abcd** as the prefix. If only **delimiter** is set to **d**, objects **abcd** and **abcde** are grouped into a **CommonPrefixes** with **abcd** as the prefix, and **bbcde** is grouped separately into another **CommonPrefixes** with **bbcd** as the prefix.
|
227
|
+
|
228
|
+
:param delimiter: The delimiter of this ListObjectsRequest.
|
229
|
+
:type delimiter: str
|
230
|
+
"""
|
231
|
+
self._delimiter = delimiter
|
232
|
+
|
233
|
+
@property
|
234
|
+
def key_marker(self):
|
235
|
+
r"""Gets the key_marker of this ListObjectsRequest.
|
236
|
+
|
237
|
+
Position to start with when objects are listed. Valid value: value of **NextKeyMarker** in the response body of the last request
|
238
|
+
|
239
|
+
:return: The key_marker of this ListObjectsRequest.
|
240
|
+
:rtype: str
|
241
|
+
"""
|
242
|
+
return self._key_marker
|
243
|
+
|
244
|
+
@key_marker.setter
|
245
|
+
def key_marker(self, key_marker):
|
246
|
+
r"""Sets the key_marker of this ListObjectsRequest.
|
247
|
+
|
248
|
+
Position to start with when objects are listed. Valid value: value of **NextKeyMarker** in the response body of the last request
|
249
|
+
|
250
|
+
:param key_marker: The key_marker of this ListObjectsRequest.
|
251
|
+
:type key_marker: str
|
252
|
+
"""
|
253
|
+
self._key_marker = key_marker
|
254
|
+
|
255
|
+
@property
|
256
|
+
def version_id_marker(self):
|
257
|
+
r"""Gets the version_id_marker of this ListObjectsRequest.
|
258
|
+
|
259
|
+
This parameter applies only when versioning is enabled. Specifies the version ID to start with when objects in a bucket are listed. Objects are listed in alphabetical order and a maximum of 1,000 objects can be displayed at a time. This parameter is used together with **key-marker**. If the value of **version-id-marker** does not match **key-marker**, **version-id-marker** is invalid. Valid value: object version ID, which is the value of **NextVersionIdMarker** in the response body of the last request
|
260
|
+
|
261
|
+
:return: The version_id_marker of this ListObjectsRequest.
|
262
|
+
:rtype: str
|
263
|
+
"""
|
264
|
+
return self._version_id_marker
|
265
|
+
|
266
|
+
@version_id_marker.setter
|
267
|
+
def version_id_marker(self, version_id_marker):
|
268
|
+
r"""Sets the version_id_marker of this ListObjectsRequest.
|
269
|
+
|
270
|
+
This parameter applies only when versioning is enabled. Specifies the version ID to start with when objects in a bucket are listed. Objects are listed in alphabetical order and a maximum of 1,000 objects can be displayed at a time. This parameter is used together with **key-marker**. If the value of **version-id-marker** does not match **key-marker**, **version-id-marker** is invalid. Valid value: object version ID, which is the value of **NextVersionIdMarker** in the response body of the last request
|
271
|
+
|
272
|
+
:param version_id_marker: The version_id_marker of this ListObjectsRequest.
|
273
|
+
:type version_id_marker: str
|
274
|
+
"""
|
275
|
+
self._version_id_marker = version_id_marker
|
276
|
+
|
277
|
+
@property
|
278
|
+
def encoding_type(self):
|
279
|
+
r"""Gets the encoding_type of this ListObjectsRequest.
|
280
|
+
|
281
|
+
Encodes some elements in the response based on the specified type. If **Delimiter**, **Marker** (or **KeyMarker**), **Prefix**, **NextMarker** (or **NextKeyMarker**), and **Key** contain control characters that are not supported by XML 1.0 standards, you can configure **encoding-type** to encode **Delimiter**, **Marker** (or **KeyMarker**), **Prefix** (including the **Prefix** in **CommonPrefixes**), **NextMarker** (or **NextKeyMarker**), and **Key** in the response. Optional value: url
|
282
|
+
|
283
|
+
:return: The encoding_type of this ListObjectsRequest.
|
284
|
+
:rtype: str
|
285
|
+
"""
|
286
|
+
return self._encoding_type
|
287
|
+
|
288
|
+
@encoding_type.setter
|
289
|
+
def encoding_type(self, encoding_type):
|
290
|
+
r"""Sets the encoding_type of this ListObjectsRequest.
|
291
|
+
|
292
|
+
Encodes some elements in the response based on the specified type. If **Delimiter**, **Marker** (or **KeyMarker**), **Prefix**, **NextMarker** (or **NextKeyMarker**), and **Key** contain control characters that are not supported by XML 1.0 standards, you can configure **encoding-type** to encode **Delimiter**, **Marker** (or **KeyMarker**), **Prefix** (including the **Prefix** in **CommonPrefixes**), **NextMarker** (or **NextKeyMarker**), and **Key** in the response. Optional value: url
|
293
|
+
|
294
|
+
:param encoding_type: The encoding_type of this ListObjectsRequest.
|
295
|
+
:type encoding_type: str
|
296
|
+
"""
|
297
|
+
self._encoding_type = encoding_type
|
298
|
+
|
299
|
+
def to_dict(self):
|
300
|
+
"""Returns the model properties as a dict"""
|
301
|
+
result = {}
|
302
|
+
|
303
|
+
for attr, _ in six.iteritems(self.openapi_types):
|
304
|
+
value = getattr(self, attr)
|
305
|
+
if isinstance(value, list):
|
306
|
+
result[attr] = list(map(
|
307
|
+
lambda x: x.to_dict() if hasattr(x, "to_dict") else x,
|
308
|
+
value
|
309
|
+
))
|
310
|
+
elif hasattr(value, "to_dict"):
|
311
|
+
result[attr] = value.to_dict()
|
312
|
+
elif isinstance(value, dict):
|
313
|
+
result[attr] = dict(map(
|
314
|
+
lambda item: (item[0], item[1].to_dict())
|
315
|
+
if hasattr(item[1], "to_dict") else item,
|
316
|
+
value.items()
|
317
|
+
))
|
318
|
+
else:
|
319
|
+
if attr in self.sensitive_list:
|
320
|
+
result[attr] = "****"
|
321
|
+
else:
|
322
|
+
result[attr] = value
|
323
|
+
|
324
|
+
return result
|
325
|
+
|
326
|
+
def to_str(self):
|
327
|
+
"""Returns the string representation of the model"""
|
328
|
+
import simplejson as json
|
329
|
+
if six.PY2:
|
330
|
+
import sys
|
331
|
+
reload(sys)
|
332
|
+
sys.setdefaultencoding("utf-8")
|
333
|
+
return json.dumps(sanitize_for_serialization(self), ensure_ascii=False)
|
334
|
+
|
335
|
+
def __repr__(self):
|
336
|
+
"""For `print`"""
|
337
|
+
return self.to_str()
|
338
|
+
|
339
|
+
def __eq__(self, other):
|
340
|
+
"""Returns true if both objects are equal"""
|
341
|
+
if not isinstance(other, ListObjectsRequest):
|
342
|
+
return False
|
343
|
+
|
344
|
+
return self.__dict__ == other.__dict__
|
345
|
+
|
346
|
+
def __ne__(self, other):
|
347
|
+
"""Returns true if both objects are not equal"""
|
348
|
+
return not self == other
|