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.
Files changed (72) hide show
  1. huaweicloudsdkobs/__init__.py +0 -0
  2. huaweicloudsdkobs/v1/__init__.py +66 -0
  3. huaweicloudsdkobs/v1/model/__init__.py +63 -0
  4. huaweicloudsdkobs/v1/model/access_control_list.py +113 -0
  5. huaweicloudsdkobs/v1/model/bucket.py +233 -0
  6. huaweicloudsdkobs/v1/model/buckets.py +117 -0
  7. huaweicloudsdkobs/v1/model/common_prefixes.py +113 -0
  8. huaweicloudsdkobs/v1/model/contents.py +287 -0
  9. huaweicloudsdkobs/v1/model/copy_object_request.py +839 -0
  10. huaweicloudsdkobs/v1/model/copy_object_response.py +443 -0
  11. huaweicloudsdkobs/v1/model/create_bucket_request.py +605 -0
  12. huaweicloudsdkobs/v1/model/create_bucket_request_body.py +117 -0
  13. huaweicloudsdkobs/v1/model/create_bucket_response.py +239 -0
  14. huaweicloudsdkobs/v1/model/delete_bucket_customdomain_request.py +173 -0
  15. huaweicloudsdkobs/v1/model/delete_bucket_customdomain_response.py +239 -0
  16. huaweicloudsdkobs/v1/model/delete_bucket_request.py +145 -0
  17. huaweicloudsdkobs/v1/model/delete_bucket_response.py +239 -0
  18. huaweicloudsdkobs/v1/model/delete_object.py +146 -0
  19. huaweicloudsdkobs/v1/model/delete_object_request.py +202 -0
  20. huaweicloudsdkobs/v1/model/delete_object_response.py +289 -0
  21. huaweicloudsdkobs/v1/model/delete_objects_request.py +226 -0
  22. huaweicloudsdkobs/v1/model/delete_objects_request_body.py +171 -0
  23. huaweicloudsdkobs/v1/model/delete_objects_response.py +318 -0
  24. huaweicloudsdkobs/v1/model/delete_result_deleted.py +204 -0
  25. huaweicloudsdkobs/v1/model/delete_result_error.py +175 -0
  26. huaweicloudsdkobs/v1/model/domains.py +173 -0
  27. huaweicloudsdkobs/v1/model/filter_object.py +113 -0
  28. huaweicloudsdkobs/v1/model/filter_rule.py +146 -0
  29. huaweicloudsdkobs/v1/model/function_stage_configuration.py +229 -0
  30. huaweicloudsdkobs/v1/model/get_bucket_acl_request.py +173 -0
  31. huaweicloudsdkobs/v1/model/get_bucket_acl_response.py +289 -0
  32. huaweicloudsdkobs/v1/model/get_bucket_customdomain_request.py +173 -0
  33. huaweicloudsdkobs/v1/model/get_bucket_customdomain_response.py +264 -0
  34. huaweicloudsdkobs/v1/model/get_bucket_metadata_request.py +203 -0
  35. huaweicloudsdkobs/v1/model/get_bucket_metadata_response.py +539 -0
  36. huaweicloudsdkobs/v1/model/get_bucket_notification_request.py +173 -0
  37. huaweicloudsdkobs/v1/model/get_bucket_notification_response.py +264 -0
  38. huaweicloudsdkobs/v1/model/get_object_metadata_request.py +405 -0
  39. huaweicloudsdkobs/v1/model/get_object_metadata_response.py +689 -0
  40. huaweicloudsdkobs/v1/model/get_object_request.py +666 -0
  41. huaweicloudsdkobs/v1/model/get_object_response.py +489 -0
  42. huaweicloudsdkobs/v1/model/grant.py +171 -0
  43. huaweicloudsdkobs/v1/model/grantee.py +146 -0
  44. huaweicloudsdkobs/v1/model/list_buckets_request.py +146 -0
  45. huaweicloudsdkobs/v1/model/list_buckets_response.py +314 -0
  46. huaweicloudsdkobs/v1/model/list_objects_request.py +348 -0
  47. huaweicloudsdkobs/v1/model/list_objects_response.py +546 -0
  48. huaweicloudsdkobs/v1/model/owner.py +117 -0
  49. huaweicloudsdkobs/v1/model/put_object_request.py +667 -0
  50. huaweicloudsdkobs/v1/model/put_object_response.py +389 -0
  51. huaweicloudsdkobs/v1/model/set_bucket_acl_request.py +227 -0
  52. huaweicloudsdkobs/v1/model/set_bucket_acl_request_body.py +138 -0
  53. huaweicloudsdkobs/v1/model/set_bucket_acl_response.py +239 -0
  54. huaweicloudsdkobs/v1/model/set_bucket_custom_domain_body.py +230 -0
  55. huaweicloudsdkobs/v1/model/set_bucket_customedomain_request.py +198 -0
  56. huaweicloudsdkobs/v1/model/set_bucket_customedomain_response.py +239 -0
  57. huaweicloudsdkobs/v1/model/set_bucket_notification_request.py +198 -0
  58. huaweicloudsdkobs/v1/model/set_bucket_notification_request_body.py +138 -0
  59. huaweicloudsdkobs/v1/model/set_bucket_notification_response.py +239 -0
  60. huaweicloudsdkobs/v1/model/topic_configuration.py +200 -0
  61. huaweicloudsdkobs/v1/model/topic_configuration_filter.py +113 -0
  62. huaweicloudsdkobs/v1/obs_async_client.py +1600 -0
  63. huaweicloudsdkobs/v1/obs_client.py +1597 -0
  64. huaweicloudsdkobs/v1/obs_credentials.py +69 -0
  65. huaweicloudsdkobs/v1/obs_signer.py +298 -0
  66. huaweicloudsdkobs/v1/region/__init__.py +0 -0
  67. huaweicloudsdkobs/v1/region/obs_region.py +88 -0
  68. huaweicloudsdkobs-3.1.160.dist-info/LICENSE +13 -0
  69. huaweicloudsdkobs-3.1.160.dist-info/METADATA +26 -0
  70. huaweicloudsdkobs-3.1.160.dist-info/RECORD +72 -0
  71. huaweicloudsdkobs-3.1.160.dist-info/WHEEL +5 -0
  72. huaweicloudsdkobs-3.1.160.dist-info/top_level.txt +1 -0
@@ -0,0 +1,667 @@
1
+ # coding: utf-8
2
+
3
+ import six
4
+
5
+ from huaweicloudsdkcore.sdk_stream_request import SdkStreamRequest
6
+ from huaweicloudsdkcore.utils.http_utils import sanitize_for_serialization
7
+
8
+
9
+ class PutObjectRequest(SdkStreamRequest):
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
+ xml_name = "PutObjectRequest"
19
+
20
+ sensitive_list = []
21
+
22
+ openapi_types = {
23
+ 'bucket_name': 'str',
24
+ 'object_key': 'str',
25
+ 'date': 'str',
26
+ 'content_md5': 'str',
27
+ 'x_obs_acl': 'str',
28
+ 'x_obs_grant_read': 'str',
29
+ 'x_obs_grant_read_acp': 'str',
30
+ 'x_obs_grant_write_acp': 'str',
31
+ 'x_obs_grant_full_control': 'str',
32
+ 'x_obs_storage_class': 'str',
33
+ 'x_obs_meta_xxx': 'str',
34
+ 'x_obs_persistent_headers': 'str',
35
+ 'x_obs_website_redirect_location': 'str',
36
+ 'x_obs_server_side_encryption': 'str',
37
+ 'x_obs_server_side_encryption_kms_key_id': 'str',
38
+ 'x_obs_server_side_encryption_customer_algorithm': 'str',
39
+ 'x_obs_server_side_encryption_customer_key': 'str',
40
+ 'x_obs_server_side_encryption_customer_key_md5': 'str',
41
+ 'success_action_redirect': 'str',
42
+ 'x_obs_expires': 'int'
43
+ }
44
+
45
+ attribute_map = {
46
+ 'bucket_name': 'bucket_name',
47
+ 'object_key': 'object_key',
48
+ 'date': 'Date',
49
+ 'content_md5': 'Content-MD5',
50
+ 'x_obs_acl': 'x-obs-acl',
51
+ 'x_obs_grant_read': 'x-obs-grant-read',
52
+ 'x_obs_grant_read_acp': 'x-obs-grant-read-acp',
53
+ 'x_obs_grant_write_acp': 'x-obs-grant-write-acp',
54
+ 'x_obs_grant_full_control': 'x-obs-grant-full-control',
55
+ 'x_obs_storage_class': 'x-obs-storage-class',
56
+ 'x_obs_meta_xxx': 'x-obs-meta-xxx',
57
+ 'x_obs_persistent_headers': 'x-obs-persistent-headers',
58
+ 'x_obs_website_redirect_location': 'x-obs-website-redirect-location',
59
+ 'x_obs_server_side_encryption': 'x-obs-server-side-encryption',
60
+ 'x_obs_server_side_encryption_kms_key_id': 'x-obs-server-side-encryption-kms-key-id',
61
+ 'x_obs_server_side_encryption_customer_algorithm': 'x-obs-server-side-encryption-customer-algorithm',
62
+ 'x_obs_server_side_encryption_customer_key': 'x-obs-server-side-encryption-customer-key',
63
+ 'x_obs_server_side_encryption_customer_key_md5': 'x-obs-server-side-encryption-customer-key-MD5',
64
+ 'success_action_redirect': 'success-action-redirect',
65
+ 'x_obs_expires': 'x-obs-expires'
66
+ }
67
+
68
+ def __init__(self, stream=None, bucket_name=None, object_key=None, date=None, content_md5=None, x_obs_acl=None, x_obs_grant_read=None, x_obs_grant_read_acp=None, x_obs_grant_write_acp=None, x_obs_grant_full_control=None, x_obs_storage_class=None, x_obs_meta_xxx=None, x_obs_persistent_headers=None, x_obs_website_redirect_location=None, x_obs_server_side_encryption=None, x_obs_server_side_encryption_kms_key_id=None, x_obs_server_side_encryption_customer_algorithm=None, x_obs_server_side_encryption_customer_key=None, x_obs_server_side_encryption_customer_key_md5=None, success_action_redirect=None, x_obs_expires=None):
69
+ r"""PutObjectRequest
70
+
71
+ The model defined in huaweicloud sdk
72
+
73
+ :param bucket_name: Name of the bucket.
74
+ :type bucket_name: str
75
+ :param object_key: Object key for which this operation was initiated.
76
+ :type object_key: str
77
+ :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.
78
+ :type date: str
79
+ :param content_md5: Base64-encoded 128-bit MD5 digest of the message according to RFC 1864. Example: n58IG6hfM7vqI4K0vnWpog==
80
+ :type content_md5: str
81
+ :param x_obs_acl: When creating a bucket, you can add this header to configure access control policies (predefined policies) for the bucket. Example: x-obs-acl: public-read
82
+ :type x_obs_acl: str
83
+ :param x_obs_grant_read: When creating an object, you can use this header to grant all users under a tenant the permissions to read the object and obtain the object metadata. Example: x-obs-grant-read: id=domainID. If multiple tenants are authorized, separate them with commas (,).
84
+ :type x_obs_grant_read: str
85
+ :param x_obs_grant_read_acp: When creating an object, you can use this header to grant all users under a tenant the permissions to obtain the object ACL. Example: x-obs-grant-read-acp: id=domainID. If multiple tenants are authorized, separate them with commas (,).
86
+ :type x_obs_grant_read_acp: str
87
+ :param x_obs_grant_write_acp: When creating an object, you can use this header to grant all users under a tenant the permissions to write the object ACL. Example: x-obs-grant-write-acp: id=domainID. If multiple tenants are authorized, separate them with commas (,).
88
+ :type x_obs_grant_write_acp: str
89
+ :param x_obs_grant_full_control: When creating an object, you can use this header to grant all users in a domain the permissions to read the object, to obtain the object metadata and ACL, and to write the object ACL. Example: x-obs-grant-full-control: id=domainID. If multiple tenants are authorized, separate them with commas (,).
90
+ :type x_obs_grant_full_control: str
91
+ :param x_obs_storage_class: When creating an object, you can use this header to specify a storage class for the object. If you do not have this header configured, the object inherits the default storage class of the bucket.Note: There are three storage classes: Standard (STANDARD), Infrequent Access (WARM), and Archive (COLD), so the value can be **STANDARD**, **WARM**, or **COLD**. The value is case sensitive.Example: x-obs-storage-class: STANDARD
92
+ :type x_obs_storage_class: str
93
+ :param x_obs_meta_xxx: User-defined metadata. Example: x-obs-meta-test: test metadata
94
+ :type x_obs_meta_xxx: str
95
+ :param x_obs_persistent_headers: When creating an object, you can add the **x-obs-persistent-headers** header in an HTTP request to customize one or more response headers. When you retrieve the object or query the object metadata, the custom headers will be returned in the response message.Format: **x-obs-persistent-headers: ****key1:base64_encode(***value1***),****key2:base64_encode(***value2***)...**Note: Items, such as **key1** and **key2**, are user-defined headers. If they contain non-ASCII or unrecognizable characters, they can be encoded using URL or Base64. The server processes these headers as strings, but does not decode them. Items, such as *value1* and *value2* are the values of the corresponding headers. **base64_encode** indicates that the value is encoded using Base64. A user-defined header and its Base64-encoded value are connected using a colon (:) to form a key-value pair. All key-value pairs are separated with a comma (,) and are placed in the **x-obs-persistent-headers** header. The server then decodes the uploaded value.Example: x-obs-persistent-headers: key1:dmFsdWUx,key2:dmFsdWUyWhen you download the object or obtain the object metadata, headers **key1:***value1* and **key2:***value2* will be returned.Restrictions:+ Response headers customized in this way cannot be prefixed with **x-obs-**. For example, you should use **key1**, instead of **x-obs-key1**.+ Standard HTTP headers, such as **host**, **content-md5**, **origin**, **range**, and **Content-Disposition**, cannot be specified as custom headers.+ The total length of this header and the custom metadata cannot exceed 8 KB.+ If the same keys are transferred, values are separated with commas (,) and then returned in one key.
96
+ :type x_obs_persistent_headers: str
97
+ :param x_obs_website_redirect_location: If static website hosting has been configured for a bucket, you can configure this parameter to redirect requests for an object in this bucket to another object in the same bucket or to an external URL. OBS stores the value of this header in the object metadata.Example of redirecting requests to another object in the bucket:x-obs-website-redirect-location:/anotherPage.htmlExample of redirecting requests to an external URL:x-obs-website-redirect-location:http://www.example.com/Default value: noneRestriction: The value must start with a slash (/), **http://**, or **https://**, with a length of no more than 2 KB.
98
+ :type x_obs_website_redirect_location: str
99
+ :param x_obs_server_side_encryption: Indicates that SSE-KMS is used. Example: x-obs-server-side-encryption: kms
100
+ :type x_obs_server_side_encryption: str
101
+ :param x_obs_server_side_encryption_kms_key_id: Master key ID. This header is used for encryption with SSE-KMS. If the customer does not provide the master key ID, the default master key ID will be used.Supported formats:+ *regionID***:***domainID***:key/***key_id* + *key_id**regionID* is the ID of the region to which the key belongs. *domainID* is the account ID of the tenant to which the key belongs. *key_id* is the key ID created in DEW.Examples:+ x-obs-server-side-encryption-kms-key-id:cn-north-4:domainiddomainiddomainiddoma0001:key/4f1cd4de-ab64-4807-920a-47fc42e7f0d0 + x-obs-server-side-encryption-kms-key-id:4f1cd4de-ab64-4807-920a-47fc42e7f0d0
102
+ :type x_obs_server_side_encryption_kms_key_id: str
103
+ :param x_obs_server_side_encryption_customer_algorithm: The encryption algorithm used for SSE-C.Example: x-obs-server-side-encryption-customer-algorithm:AES256Restriction: This header must be used together with **x-obs-server-side-encryption-customer-key** and **x-obs-server-side-encryption-customer-key-MD5**.
104
+ :type x_obs_server_side_encryption_customer_algorithm: str
105
+ :param x_obs_server_side_encryption_customer_key: Encryption key used for SSE-C. This key is used to encrypt objects.Example: x-obs-server-side-encryption-customer-key:K7QkYpBkM5+hca27fsNkUnNVaobncnLht/rCB2o/9Cw=Restriction: This header is a Base64-encoded 256-bit key and must be used together with **x-obs-server-side-encryption-customer-algorithm** and **x-obs-server-side-encryption-customer-key-MD5**.
106
+ :type x_obs_server_side_encryption_customer_key: str
107
+ :param x_obs_server_side_encryption_customer_key_md5: MD5 value of the key used to encrypt objects in SSE-C mode. The MD5 value is used to check whether any error occurs during the transmission of the key. Example: x-obs-server-side-encryption-customer-key-MD5:4XvB3tbNTN+tIEVa0/fGaQ==Restriction: This header is a Base64-encoded 128-bit MD5 value and must be used together with **x-obs-server-side-encryption-customer-algorithm** and **x-obs-server-side-encryption-customer-key**.
108
+ :type x_obs_server_side_encryption_customer_key_md5: str
109
+ :param success_action_redirect: The address (a URL) which a successfully responded request is redirected to. If this parameter value is valid and the request succeeds, OBS returns status code 303. The **Location** header consists of **success_action_redirect** as well as the bucket name, object name, and object ETag. If this parameter is invalid, OBS ignores this parameter and returns status code 204. In such case, the **Location** header is the object address.
110
+ :type success_action_redirect: str
111
+ :param x_obs_expires: When an object expires. It is measured in days. An object will be automatically deleted once it expires. The expiration is calculated from when the object was last modified. This header can be only configured during the object upload, and cannot be modified later by using the metadata API. Example: x-obs-expires:3
112
+ :type x_obs_expires: int
113
+ """
114
+ super(PutObjectRequest, self).__init__(stream)
115
+
116
+
117
+ self._bucket_name = None
118
+ self._object_key = None
119
+ self._date = None
120
+ self._content_md5 = None
121
+ self._x_obs_acl = None
122
+ self._x_obs_grant_read = None
123
+ self._x_obs_grant_read_acp = None
124
+ self._x_obs_grant_write_acp = None
125
+ self._x_obs_grant_full_control = None
126
+ self._x_obs_storage_class = None
127
+ self._x_obs_meta_xxx = None
128
+ self._x_obs_persistent_headers = None
129
+ self._x_obs_website_redirect_location = None
130
+ self._x_obs_server_side_encryption = None
131
+ self._x_obs_server_side_encryption_kms_key_id = None
132
+ self._x_obs_server_side_encryption_customer_algorithm = None
133
+ self._x_obs_server_side_encryption_customer_key = None
134
+ self._x_obs_server_side_encryption_customer_key_md5 = None
135
+ self._success_action_redirect = None
136
+ self._x_obs_expires = None
137
+ self.discriminator = None
138
+
139
+ self.bucket_name = bucket_name
140
+ self.object_key = object_key
141
+ if date is not None:
142
+ self.date = date
143
+ if content_md5 is not None:
144
+ self.content_md5 = content_md5
145
+ if x_obs_acl is not None:
146
+ self.x_obs_acl = x_obs_acl
147
+ if x_obs_grant_read is not None:
148
+ self.x_obs_grant_read = x_obs_grant_read
149
+ if x_obs_grant_read_acp is not None:
150
+ self.x_obs_grant_read_acp = x_obs_grant_read_acp
151
+ if x_obs_grant_write_acp is not None:
152
+ self.x_obs_grant_write_acp = x_obs_grant_write_acp
153
+ if x_obs_grant_full_control is not None:
154
+ self.x_obs_grant_full_control = x_obs_grant_full_control
155
+ if x_obs_storage_class is not None:
156
+ self.x_obs_storage_class = x_obs_storage_class
157
+ if x_obs_meta_xxx is not None:
158
+ self.x_obs_meta_xxx = x_obs_meta_xxx
159
+ if x_obs_persistent_headers is not None:
160
+ self.x_obs_persistent_headers = x_obs_persistent_headers
161
+ if x_obs_website_redirect_location is not None:
162
+ self.x_obs_website_redirect_location = x_obs_website_redirect_location
163
+ if x_obs_server_side_encryption is not None:
164
+ self.x_obs_server_side_encryption = x_obs_server_side_encryption
165
+ if x_obs_server_side_encryption_kms_key_id is not None:
166
+ self.x_obs_server_side_encryption_kms_key_id = x_obs_server_side_encryption_kms_key_id
167
+ if x_obs_server_side_encryption_customer_algorithm is not None:
168
+ self.x_obs_server_side_encryption_customer_algorithm = x_obs_server_side_encryption_customer_algorithm
169
+ if x_obs_server_side_encryption_customer_key is not None:
170
+ self.x_obs_server_side_encryption_customer_key = x_obs_server_side_encryption_customer_key
171
+ if x_obs_server_side_encryption_customer_key_md5 is not None:
172
+ self.x_obs_server_side_encryption_customer_key_md5 = x_obs_server_side_encryption_customer_key_md5
173
+ if success_action_redirect is not None:
174
+ self.success_action_redirect = success_action_redirect
175
+ if x_obs_expires is not None:
176
+ self.x_obs_expires = x_obs_expires
177
+
178
+ @property
179
+ def bucket_name(self):
180
+ r"""Gets the bucket_name of this PutObjectRequest.
181
+
182
+ Name of the bucket.
183
+
184
+ :return: The bucket_name of this PutObjectRequest.
185
+ :rtype: str
186
+ """
187
+ return self._bucket_name
188
+
189
+ @bucket_name.setter
190
+ def bucket_name(self, bucket_name):
191
+ r"""Sets the bucket_name of this PutObjectRequest.
192
+
193
+ Name of the bucket.
194
+
195
+ :param bucket_name: The bucket_name of this PutObjectRequest.
196
+ :type bucket_name: str
197
+ """
198
+ self._bucket_name = bucket_name
199
+
200
+ @property
201
+ def object_key(self):
202
+ r"""Gets the object_key of this PutObjectRequest.
203
+
204
+ Object key for which this operation was initiated.
205
+
206
+ :return: The object_key of this PutObjectRequest.
207
+ :rtype: str
208
+ """
209
+ return self._object_key
210
+
211
+ @object_key.setter
212
+ def object_key(self, object_key):
213
+ r"""Sets the object_key of this PutObjectRequest.
214
+
215
+ Object key for which this operation was initiated.
216
+
217
+ :param object_key: The object_key of this PutObjectRequest.
218
+ :type object_key: str
219
+ """
220
+ self._object_key = object_key
221
+
222
+ @property
223
+ def date(self):
224
+ r"""Gets the date of this PutObjectRequest.
225
+
226
+ 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.
227
+
228
+ :return: The date of this PutObjectRequest.
229
+ :rtype: str
230
+ """
231
+ return self._date
232
+
233
+ @date.setter
234
+ def date(self, date):
235
+ r"""Sets the date of this PutObjectRequest.
236
+
237
+ 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.
238
+
239
+ :param date: The date of this PutObjectRequest.
240
+ :type date: str
241
+ """
242
+ self._date = date
243
+
244
+ @property
245
+ def content_md5(self):
246
+ r"""Gets the content_md5 of this PutObjectRequest.
247
+
248
+ Base64-encoded 128-bit MD5 digest of the message according to RFC 1864. Example: n58IG6hfM7vqI4K0vnWpog==
249
+
250
+ :return: The content_md5 of this PutObjectRequest.
251
+ :rtype: str
252
+ """
253
+ return self._content_md5
254
+
255
+ @content_md5.setter
256
+ def content_md5(self, content_md5):
257
+ r"""Sets the content_md5 of this PutObjectRequest.
258
+
259
+ Base64-encoded 128-bit MD5 digest of the message according to RFC 1864. Example: n58IG6hfM7vqI4K0vnWpog==
260
+
261
+ :param content_md5: The content_md5 of this PutObjectRequest.
262
+ :type content_md5: str
263
+ """
264
+ self._content_md5 = content_md5
265
+
266
+ @property
267
+ def x_obs_acl(self):
268
+ r"""Gets the x_obs_acl of this PutObjectRequest.
269
+
270
+ When creating a bucket, you can add this header to configure access control policies (predefined policies) for the bucket. Example: x-obs-acl: public-read
271
+
272
+ :return: The x_obs_acl of this PutObjectRequest.
273
+ :rtype: str
274
+ """
275
+ return self._x_obs_acl
276
+
277
+ @x_obs_acl.setter
278
+ def x_obs_acl(self, x_obs_acl):
279
+ r"""Sets the x_obs_acl of this PutObjectRequest.
280
+
281
+ When creating a bucket, you can add this header to configure access control policies (predefined policies) for the bucket. Example: x-obs-acl: public-read
282
+
283
+ :param x_obs_acl: The x_obs_acl of this PutObjectRequest.
284
+ :type x_obs_acl: str
285
+ """
286
+ self._x_obs_acl = x_obs_acl
287
+
288
+ @property
289
+ def x_obs_grant_read(self):
290
+ r"""Gets the x_obs_grant_read of this PutObjectRequest.
291
+
292
+ When creating an object, you can use this header to grant all users under a tenant the permissions to read the object and obtain the object metadata. Example: x-obs-grant-read: id=domainID. If multiple tenants are authorized, separate them with commas (,).
293
+
294
+ :return: The x_obs_grant_read of this PutObjectRequest.
295
+ :rtype: str
296
+ """
297
+ return self._x_obs_grant_read
298
+
299
+ @x_obs_grant_read.setter
300
+ def x_obs_grant_read(self, x_obs_grant_read):
301
+ r"""Sets the x_obs_grant_read of this PutObjectRequest.
302
+
303
+ When creating an object, you can use this header to grant all users under a tenant the permissions to read the object and obtain the object metadata. Example: x-obs-grant-read: id=domainID. If multiple tenants are authorized, separate them with commas (,).
304
+
305
+ :param x_obs_grant_read: The x_obs_grant_read of this PutObjectRequest.
306
+ :type x_obs_grant_read: str
307
+ """
308
+ self._x_obs_grant_read = x_obs_grant_read
309
+
310
+ @property
311
+ def x_obs_grant_read_acp(self):
312
+ r"""Gets the x_obs_grant_read_acp of this PutObjectRequest.
313
+
314
+ When creating an object, you can use this header to grant all users under a tenant the permissions to obtain the object ACL. Example: x-obs-grant-read-acp: id=domainID. If multiple tenants are authorized, separate them with commas (,).
315
+
316
+ :return: The x_obs_grant_read_acp of this PutObjectRequest.
317
+ :rtype: str
318
+ """
319
+ return self._x_obs_grant_read_acp
320
+
321
+ @x_obs_grant_read_acp.setter
322
+ def x_obs_grant_read_acp(self, x_obs_grant_read_acp):
323
+ r"""Sets the x_obs_grant_read_acp of this PutObjectRequest.
324
+
325
+ When creating an object, you can use this header to grant all users under a tenant the permissions to obtain the object ACL. Example: x-obs-grant-read-acp: id=domainID. If multiple tenants are authorized, separate them with commas (,).
326
+
327
+ :param x_obs_grant_read_acp: The x_obs_grant_read_acp of this PutObjectRequest.
328
+ :type x_obs_grant_read_acp: str
329
+ """
330
+ self._x_obs_grant_read_acp = x_obs_grant_read_acp
331
+
332
+ @property
333
+ def x_obs_grant_write_acp(self):
334
+ r"""Gets the x_obs_grant_write_acp of this PutObjectRequest.
335
+
336
+ When creating an object, you can use this header to grant all users under a tenant the permissions to write the object ACL. Example: x-obs-grant-write-acp: id=domainID. If multiple tenants are authorized, separate them with commas (,).
337
+
338
+ :return: The x_obs_grant_write_acp of this PutObjectRequest.
339
+ :rtype: str
340
+ """
341
+ return self._x_obs_grant_write_acp
342
+
343
+ @x_obs_grant_write_acp.setter
344
+ def x_obs_grant_write_acp(self, x_obs_grant_write_acp):
345
+ r"""Sets the x_obs_grant_write_acp of this PutObjectRequest.
346
+
347
+ When creating an object, you can use this header to grant all users under a tenant the permissions to write the object ACL. Example: x-obs-grant-write-acp: id=domainID. If multiple tenants are authorized, separate them with commas (,).
348
+
349
+ :param x_obs_grant_write_acp: The x_obs_grant_write_acp of this PutObjectRequest.
350
+ :type x_obs_grant_write_acp: str
351
+ """
352
+ self._x_obs_grant_write_acp = x_obs_grant_write_acp
353
+
354
+ @property
355
+ def x_obs_grant_full_control(self):
356
+ r"""Gets the x_obs_grant_full_control of this PutObjectRequest.
357
+
358
+ When creating an object, you can use this header to grant all users in a domain the permissions to read the object, to obtain the object metadata and ACL, and to write the object ACL. Example: x-obs-grant-full-control: id=domainID. If multiple tenants are authorized, separate them with commas (,).
359
+
360
+ :return: The x_obs_grant_full_control of this PutObjectRequest.
361
+ :rtype: str
362
+ """
363
+ return self._x_obs_grant_full_control
364
+
365
+ @x_obs_grant_full_control.setter
366
+ def x_obs_grant_full_control(self, x_obs_grant_full_control):
367
+ r"""Sets the x_obs_grant_full_control of this PutObjectRequest.
368
+
369
+ When creating an object, you can use this header to grant all users in a domain the permissions to read the object, to obtain the object metadata and ACL, and to write the object ACL. Example: x-obs-grant-full-control: id=domainID. If multiple tenants are authorized, separate them with commas (,).
370
+
371
+ :param x_obs_grant_full_control: The x_obs_grant_full_control of this PutObjectRequest.
372
+ :type x_obs_grant_full_control: str
373
+ """
374
+ self._x_obs_grant_full_control = x_obs_grant_full_control
375
+
376
+ @property
377
+ def x_obs_storage_class(self):
378
+ r"""Gets the x_obs_storage_class of this PutObjectRequest.
379
+
380
+ When creating an object, you can use this header to specify a storage class for the object. If you do not have this header configured, the object inherits the default storage class of the bucket.Note: There are three storage classes: Standard (STANDARD), Infrequent Access (WARM), and Archive (COLD), so the value can be **STANDARD**, **WARM**, or **COLD**. The value is case sensitive.Example: x-obs-storage-class: STANDARD
381
+
382
+ :return: The x_obs_storage_class of this PutObjectRequest.
383
+ :rtype: str
384
+ """
385
+ return self._x_obs_storage_class
386
+
387
+ @x_obs_storage_class.setter
388
+ def x_obs_storage_class(self, x_obs_storage_class):
389
+ r"""Sets the x_obs_storage_class of this PutObjectRequest.
390
+
391
+ When creating an object, you can use this header to specify a storage class for the object. If you do not have this header configured, the object inherits the default storage class of the bucket.Note: There are three storage classes: Standard (STANDARD), Infrequent Access (WARM), and Archive (COLD), so the value can be **STANDARD**, **WARM**, or **COLD**. The value is case sensitive.Example: x-obs-storage-class: STANDARD
392
+
393
+ :param x_obs_storage_class: The x_obs_storage_class of this PutObjectRequest.
394
+ :type x_obs_storage_class: str
395
+ """
396
+ self._x_obs_storage_class = x_obs_storage_class
397
+
398
+ @property
399
+ def x_obs_meta_xxx(self):
400
+ r"""Gets the x_obs_meta_xxx of this PutObjectRequest.
401
+
402
+ User-defined metadata. Example: x-obs-meta-test: test metadata
403
+
404
+ :return: The x_obs_meta_xxx of this PutObjectRequest.
405
+ :rtype: str
406
+ """
407
+ return self._x_obs_meta_xxx
408
+
409
+ @x_obs_meta_xxx.setter
410
+ def x_obs_meta_xxx(self, x_obs_meta_xxx):
411
+ r"""Sets the x_obs_meta_xxx of this PutObjectRequest.
412
+
413
+ User-defined metadata. Example: x-obs-meta-test: test metadata
414
+
415
+ :param x_obs_meta_xxx: The x_obs_meta_xxx of this PutObjectRequest.
416
+ :type x_obs_meta_xxx: str
417
+ """
418
+ self._x_obs_meta_xxx = x_obs_meta_xxx
419
+
420
+ @property
421
+ def x_obs_persistent_headers(self):
422
+ r"""Gets the x_obs_persistent_headers of this PutObjectRequest.
423
+
424
+ When creating an object, you can add the **x-obs-persistent-headers** header in an HTTP request to customize one or more response headers. When you retrieve the object or query the object metadata, the custom headers will be returned in the response message.Format: **x-obs-persistent-headers: ****key1:base64_encode(***value1***),****key2:base64_encode(***value2***)...**Note: Items, such as **key1** and **key2**, are user-defined headers. If they contain non-ASCII or unrecognizable characters, they can be encoded using URL or Base64. The server processes these headers as strings, but does not decode them. Items, such as *value1* and *value2* are the values of the corresponding headers. **base64_encode** indicates that the value is encoded using Base64. A user-defined header and its Base64-encoded value are connected using a colon (:) to form a key-value pair. All key-value pairs are separated with a comma (,) and are placed in the **x-obs-persistent-headers** header. The server then decodes the uploaded value.Example: x-obs-persistent-headers: key1:dmFsdWUx,key2:dmFsdWUyWhen you download the object or obtain the object metadata, headers **key1:***value1* and **key2:***value2* will be returned.Restrictions:+ Response headers customized in this way cannot be prefixed with **x-obs-**. For example, you should use **key1**, instead of **x-obs-key1**.+ Standard HTTP headers, such as **host**, **content-md5**, **origin**, **range**, and **Content-Disposition**, cannot be specified as custom headers.+ The total length of this header and the custom metadata cannot exceed 8 KB.+ If the same keys are transferred, values are separated with commas (,) and then returned in one key.
425
+
426
+ :return: The x_obs_persistent_headers of this PutObjectRequest.
427
+ :rtype: str
428
+ """
429
+ return self._x_obs_persistent_headers
430
+
431
+ @x_obs_persistent_headers.setter
432
+ def x_obs_persistent_headers(self, x_obs_persistent_headers):
433
+ r"""Sets the x_obs_persistent_headers of this PutObjectRequest.
434
+
435
+ When creating an object, you can add the **x-obs-persistent-headers** header in an HTTP request to customize one or more response headers. When you retrieve the object or query the object metadata, the custom headers will be returned in the response message.Format: **x-obs-persistent-headers: ****key1:base64_encode(***value1***),****key2:base64_encode(***value2***)...**Note: Items, such as **key1** and **key2**, are user-defined headers. If they contain non-ASCII or unrecognizable characters, they can be encoded using URL or Base64. The server processes these headers as strings, but does not decode them. Items, such as *value1* and *value2* are the values of the corresponding headers. **base64_encode** indicates that the value is encoded using Base64. A user-defined header and its Base64-encoded value are connected using a colon (:) to form a key-value pair. All key-value pairs are separated with a comma (,) and are placed in the **x-obs-persistent-headers** header. The server then decodes the uploaded value.Example: x-obs-persistent-headers: key1:dmFsdWUx,key2:dmFsdWUyWhen you download the object or obtain the object metadata, headers **key1:***value1* and **key2:***value2* will be returned.Restrictions:+ Response headers customized in this way cannot be prefixed with **x-obs-**. For example, you should use **key1**, instead of **x-obs-key1**.+ Standard HTTP headers, such as **host**, **content-md5**, **origin**, **range**, and **Content-Disposition**, cannot be specified as custom headers.+ The total length of this header and the custom metadata cannot exceed 8 KB.+ If the same keys are transferred, values are separated with commas (,) and then returned in one key.
436
+
437
+ :param x_obs_persistent_headers: The x_obs_persistent_headers of this PutObjectRequest.
438
+ :type x_obs_persistent_headers: str
439
+ """
440
+ self._x_obs_persistent_headers = x_obs_persistent_headers
441
+
442
+ @property
443
+ def x_obs_website_redirect_location(self):
444
+ r"""Gets the x_obs_website_redirect_location of this PutObjectRequest.
445
+
446
+ If static website hosting has been configured for a bucket, you can configure this parameter to redirect requests for an object in this bucket to another object in the same bucket or to an external URL. OBS stores the value of this header in the object metadata.Example of redirecting requests to another object in the bucket:x-obs-website-redirect-location:/anotherPage.htmlExample of redirecting requests to an external URL:x-obs-website-redirect-location:http://www.example.com/Default value: noneRestriction: The value must start with a slash (/), **http://**, or **https://**, with a length of no more than 2 KB.
447
+
448
+ :return: The x_obs_website_redirect_location of this PutObjectRequest.
449
+ :rtype: str
450
+ """
451
+ return self._x_obs_website_redirect_location
452
+
453
+ @x_obs_website_redirect_location.setter
454
+ def x_obs_website_redirect_location(self, x_obs_website_redirect_location):
455
+ r"""Sets the x_obs_website_redirect_location of this PutObjectRequest.
456
+
457
+ If static website hosting has been configured for a bucket, you can configure this parameter to redirect requests for an object in this bucket to another object in the same bucket or to an external URL. OBS stores the value of this header in the object metadata.Example of redirecting requests to another object in the bucket:x-obs-website-redirect-location:/anotherPage.htmlExample of redirecting requests to an external URL:x-obs-website-redirect-location:http://www.example.com/Default value: noneRestriction: The value must start with a slash (/), **http://**, or **https://**, with a length of no more than 2 KB.
458
+
459
+ :param x_obs_website_redirect_location: The x_obs_website_redirect_location of this PutObjectRequest.
460
+ :type x_obs_website_redirect_location: str
461
+ """
462
+ self._x_obs_website_redirect_location = x_obs_website_redirect_location
463
+
464
+ @property
465
+ def x_obs_server_side_encryption(self):
466
+ r"""Gets the x_obs_server_side_encryption of this PutObjectRequest.
467
+
468
+ Indicates that SSE-KMS is used. Example: x-obs-server-side-encryption: kms
469
+
470
+ :return: The x_obs_server_side_encryption of this PutObjectRequest.
471
+ :rtype: str
472
+ """
473
+ return self._x_obs_server_side_encryption
474
+
475
+ @x_obs_server_side_encryption.setter
476
+ def x_obs_server_side_encryption(self, x_obs_server_side_encryption):
477
+ r"""Sets the x_obs_server_side_encryption of this PutObjectRequest.
478
+
479
+ Indicates that SSE-KMS is used. Example: x-obs-server-side-encryption: kms
480
+
481
+ :param x_obs_server_side_encryption: The x_obs_server_side_encryption of this PutObjectRequest.
482
+ :type x_obs_server_side_encryption: str
483
+ """
484
+ self._x_obs_server_side_encryption = x_obs_server_side_encryption
485
+
486
+ @property
487
+ def x_obs_server_side_encryption_kms_key_id(self):
488
+ r"""Gets the x_obs_server_side_encryption_kms_key_id of this PutObjectRequest.
489
+
490
+ Master key ID. This header is used for encryption with SSE-KMS. If the customer does not provide the master key ID, the default master key ID will be used.Supported formats:+ *regionID***:***domainID***:key/***key_id* + *key_id**regionID* is the ID of the region to which the key belongs. *domainID* is the account ID of the tenant to which the key belongs. *key_id* is the key ID created in DEW.Examples:+ x-obs-server-side-encryption-kms-key-id:cn-north-4:domainiddomainiddomainiddoma0001:key/4f1cd4de-ab64-4807-920a-47fc42e7f0d0 + x-obs-server-side-encryption-kms-key-id:4f1cd4de-ab64-4807-920a-47fc42e7f0d0
491
+
492
+ :return: The x_obs_server_side_encryption_kms_key_id of this PutObjectRequest.
493
+ :rtype: str
494
+ """
495
+ return self._x_obs_server_side_encryption_kms_key_id
496
+
497
+ @x_obs_server_side_encryption_kms_key_id.setter
498
+ def x_obs_server_side_encryption_kms_key_id(self, x_obs_server_side_encryption_kms_key_id):
499
+ r"""Sets the x_obs_server_side_encryption_kms_key_id of this PutObjectRequest.
500
+
501
+ Master key ID. This header is used for encryption with SSE-KMS. If the customer does not provide the master key ID, the default master key ID will be used.Supported formats:+ *regionID***:***domainID***:key/***key_id* + *key_id**regionID* is the ID of the region to which the key belongs. *domainID* is the account ID of the tenant to which the key belongs. *key_id* is the key ID created in DEW.Examples:+ x-obs-server-side-encryption-kms-key-id:cn-north-4:domainiddomainiddomainiddoma0001:key/4f1cd4de-ab64-4807-920a-47fc42e7f0d0 + x-obs-server-side-encryption-kms-key-id:4f1cd4de-ab64-4807-920a-47fc42e7f0d0
502
+
503
+ :param x_obs_server_side_encryption_kms_key_id: The x_obs_server_side_encryption_kms_key_id of this PutObjectRequest.
504
+ :type x_obs_server_side_encryption_kms_key_id: str
505
+ """
506
+ self._x_obs_server_side_encryption_kms_key_id = x_obs_server_side_encryption_kms_key_id
507
+
508
+ @property
509
+ def x_obs_server_side_encryption_customer_algorithm(self):
510
+ r"""Gets the x_obs_server_side_encryption_customer_algorithm of this PutObjectRequest.
511
+
512
+ The encryption algorithm used for SSE-C.Example: x-obs-server-side-encryption-customer-algorithm:AES256Restriction: This header must be used together with **x-obs-server-side-encryption-customer-key** and **x-obs-server-side-encryption-customer-key-MD5**.
513
+
514
+ :return: The x_obs_server_side_encryption_customer_algorithm of this PutObjectRequest.
515
+ :rtype: str
516
+ """
517
+ return self._x_obs_server_side_encryption_customer_algorithm
518
+
519
+ @x_obs_server_side_encryption_customer_algorithm.setter
520
+ def x_obs_server_side_encryption_customer_algorithm(self, x_obs_server_side_encryption_customer_algorithm):
521
+ r"""Sets the x_obs_server_side_encryption_customer_algorithm of this PutObjectRequest.
522
+
523
+ The encryption algorithm used for SSE-C.Example: x-obs-server-side-encryption-customer-algorithm:AES256Restriction: This header must be used together with **x-obs-server-side-encryption-customer-key** and **x-obs-server-side-encryption-customer-key-MD5**.
524
+
525
+ :param x_obs_server_side_encryption_customer_algorithm: The x_obs_server_side_encryption_customer_algorithm of this PutObjectRequest.
526
+ :type x_obs_server_side_encryption_customer_algorithm: str
527
+ """
528
+ self._x_obs_server_side_encryption_customer_algorithm = x_obs_server_side_encryption_customer_algorithm
529
+
530
+ @property
531
+ def x_obs_server_side_encryption_customer_key(self):
532
+ r"""Gets the x_obs_server_side_encryption_customer_key of this PutObjectRequest.
533
+
534
+ Encryption key used for SSE-C. This key is used to encrypt objects.Example: x-obs-server-side-encryption-customer-key:K7QkYpBkM5+hca27fsNkUnNVaobncnLht/rCB2o/9Cw=Restriction: This header is a Base64-encoded 256-bit key and must be used together with **x-obs-server-side-encryption-customer-algorithm** and **x-obs-server-side-encryption-customer-key-MD5**.
535
+
536
+ :return: The x_obs_server_side_encryption_customer_key of this PutObjectRequest.
537
+ :rtype: str
538
+ """
539
+ return self._x_obs_server_side_encryption_customer_key
540
+
541
+ @x_obs_server_side_encryption_customer_key.setter
542
+ def x_obs_server_side_encryption_customer_key(self, x_obs_server_side_encryption_customer_key):
543
+ r"""Sets the x_obs_server_side_encryption_customer_key of this PutObjectRequest.
544
+
545
+ Encryption key used for SSE-C. This key is used to encrypt objects.Example: x-obs-server-side-encryption-customer-key:K7QkYpBkM5+hca27fsNkUnNVaobncnLht/rCB2o/9Cw=Restriction: This header is a Base64-encoded 256-bit key and must be used together with **x-obs-server-side-encryption-customer-algorithm** and **x-obs-server-side-encryption-customer-key-MD5**.
546
+
547
+ :param x_obs_server_side_encryption_customer_key: The x_obs_server_side_encryption_customer_key of this PutObjectRequest.
548
+ :type x_obs_server_side_encryption_customer_key: str
549
+ """
550
+ self._x_obs_server_side_encryption_customer_key = x_obs_server_side_encryption_customer_key
551
+
552
+ @property
553
+ def x_obs_server_side_encryption_customer_key_md5(self):
554
+ r"""Gets the x_obs_server_side_encryption_customer_key_md5 of this PutObjectRequest.
555
+
556
+ MD5 value of the key used to encrypt objects in SSE-C mode. The MD5 value is used to check whether any error occurs during the transmission of the key. Example: x-obs-server-side-encryption-customer-key-MD5:4XvB3tbNTN+tIEVa0/fGaQ==Restriction: This header is a Base64-encoded 128-bit MD5 value and must be used together with **x-obs-server-side-encryption-customer-algorithm** and **x-obs-server-side-encryption-customer-key**.
557
+
558
+ :return: The x_obs_server_side_encryption_customer_key_md5 of this PutObjectRequest.
559
+ :rtype: str
560
+ """
561
+ return self._x_obs_server_side_encryption_customer_key_md5
562
+
563
+ @x_obs_server_side_encryption_customer_key_md5.setter
564
+ def x_obs_server_side_encryption_customer_key_md5(self, x_obs_server_side_encryption_customer_key_md5):
565
+ r"""Sets the x_obs_server_side_encryption_customer_key_md5 of this PutObjectRequest.
566
+
567
+ MD5 value of the key used to encrypt objects in SSE-C mode. The MD5 value is used to check whether any error occurs during the transmission of the key. Example: x-obs-server-side-encryption-customer-key-MD5:4XvB3tbNTN+tIEVa0/fGaQ==Restriction: This header is a Base64-encoded 128-bit MD5 value and must be used together with **x-obs-server-side-encryption-customer-algorithm** and **x-obs-server-side-encryption-customer-key**.
568
+
569
+ :param x_obs_server_side_encryption_customer_key_md5: The x_obs_server_side_encryption_customer_key_md5 of this PutObjectRequest.
570
+ :type x_obs_server_side_encryption_customer_key_md5: str
571
+ """
572
+ self._x_obs_server_side_encryption_customer_key_md5 = x_obs_server_side_encryption_customer_key_md5
573
+
574
+ @property
575
+ def success_action_redirect(self):
576
+ r"""Gets the success_action_redirect of this PutObjectRequest.
577
+
578
+ The address (a URL) which a successfully responded request is redirected to. If this parameter value is valid and the request succeeds, OBS returns status code 303. The **Location** header consists of **success_action_redirect** as well as the bucket name, object name, and object ETag. If this parameter is invalid, OBS ignores this parameter and returns status code 204. In such case, the **Location** header is the object address.
579
+
580
+ :return: The success_action_redirect of this PutObjectRequest.
581
+ :rtype: str
582
+ """
583
+ return self._success_action_redirect
584
+
585
+ @success_action_redirect.setter
586
+ def success_action_redirect(self, success_action_redirect):
587
+ r"""Sets the success_action_redirect of this PutObjectRequest.
588
+
589
+ The address (a URL) which a successfully responded request is redirected to. If this parameter value is valid and the request succeeds, OBS returns status code 303. The **Location** header consists of **success_action_redirect** as well as the bucket name, object name, and object ETag. If this parameter is invalid, OBS ignores this parameter and returns status code 204. In such case, the **Location** header is the object address.
590
+
591
+ :param success_action_redirect: The success_action_redirect of this PutObjectRequest.
592
+ :type success_action_redirect: str
593
+ """
594
+ self._success_action_redirect = success_action_redirect
595
+
596
+ @property
597
+ def x_obs_expires(self):
598
+ r"""Gets the x_obs_expires of this PutObjectRequest.
599
+
600
+ When an object expires. It is measured in days. An object will be automatically deleted once it expires. The expiration is calculated from when the object was last modified. This header can be only configured during the object upload, and cannot be modified later by using the metadata API. Example: x-obs-expires:3
601
+
602
+ :return: The x_obs_expires of this PutObjectRequest.
603
+ :rtype: int
604
+ """
605
+ return self._x_obs_expires
606
+
607
+ @x_obs_expires.setter
608
+ def x_obs_expires(self, x_obs_expires):
609
+ r"""Sets the x_obs_expires of this PutObjectRequest.
610
+
611
+ When an object expires. It is measured in days. An object will be automatically deleted once it expires. The expiration is calculated from when the object was last modified. This header can be only configured during the object upload, and cannot be modified later by using the metadata API. Example: x-obs-expires:3
612
+
613
+ :param x_obs_expires: The x_obs_expires of this PutObjectRequest.
614
+ :type x_obs_expires: int
615
+ """
616
+ self._x_obs_expires = x_obs_expires
617
+
618
+ def to_dict(self):
619
+ """Returns the model properties as a dict"""
620
+ result = {}
621
+
622
+ for attr, _ in six.iteritems(self.openapi_types):
623
+ value = getattr(self, attr)
624
+ if isinstance(value, list):
625
+ result[attr] = list(map(
626
+ lambda x: x.to_dict() if hasattr(x, "to_dict") else x,
627
+ value
628
+ ))
629
+ elif hasattr(value, "to_dict"):
630
+ result[attr] = value.to_dict()
631
+ elif isinstance(value, dict):
632
+ result[attr] = dict(map(
633
+ lambda item: (item[0], item[1].to_dict())
634
+ if hasattr(item[1], "to_dict") else item,
635
+ value.items()
636
+ ))
637
+ else:
638
+ if attr in self.sensitive_list:
639
+ result[attr] = "****"
640
+ else:
641
+ result[attr] = value
642
+
643
+ return result
644
+
645
+ def to_str(self):
646
+ """Returns the string representation of the model"""
647
+ import simplejson as json
648
+ if six.PY2:
649
+ import sys
650
+ reload(sys)
651
+ sys.setdefaultencoding("utf-8")
652
+ return json.dumps(sanitize_for_serialization(self), ensure_ascii=False)
653
+
654
+ def __repr__(self):
655
+ """For `print`"""
656
+ return self.to_str()
657
+
658
+ def __eq__(self, other):
659
+ """Returns true if both objects are equal"""
660
+ if not isinstance(other, PutObjectRequest):
661
+ return False
662
+
663
+ return self.__dict__ == other.__dict__
664
+
665
+ def __ne__(self, other):
666
+ """Returns true if both objects are not equal"""
667
+ return not self == other