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,839 @@
1
+ # coding: utf-8
2
+
3
+ import six
4
+
5
+ from huaweicloudsdkcore.utils.http_utils import sanitize_for_serialization
6
+
7
+
8
+ class CopyObjectRequest:
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 = "CopyObjectRequest"
18
+
19
+ sensitive_list = []
20
+
21
+ openapi_types = {
22
+ 'date': 'str',
23
+ 'bucket_name': 'str',
24
+ 'object_key': 'str',
25
+ 'x_obs_acl': 'str',
26
+ 'x_obs_grant_read': 'str',
27
+ 'x_obs_grant_read_acp': 'str',
28
+ 'x_obs_grant_write_acp': 'str',
29
+ 'x_obs_grant_full_control': 'str',
30
+ 'x_obs_copy_source': 'str',
31
+ 'x_obs_metadata_directive': 'str',
32
+ 'x_obs_copy_source_if_match': 'str',
33
+ 'x_obs_copy_source_if_none_match': 'str',
34
+ 'x_obs_copy_source_if_unmodified_since': 'str',
35
+ 'x_obs_copy_source_if_modified_since': 'str',
36
+ 'x_obs_storage_class': 'str',
37
+ 'x_obs_persistent_headers': 'str',
38
+ 'x_obs_website_redirect_location': 'str',
39
+ 'x_obs_server_side_encryption': 'str',
40
+ 'x_obs_server_side_encryption_kms_key_id': 'str',
41
+ 'x_obs_server_side_encryption_customer_algorithm': 'str',
42
+ 'x_obs_server_side_encryption_customer_key': 'str',
43
+ 'x_obs_server_side_encryption_customer_key_md5': 'str',
44
+ 'x_obs_copy_source_server_side_encryption_customer_algorithm': 'str',
45
+ 'x_obs_copy_source_server_side_encryption_customer_key': 'str',
46
+ 'x_obs_copy_source_server_side_encryption_customer_key_md5': 'str',
47
+ 'success_action_redirect': 'str'
48
+ }
49
+
50
+ attribute_map = {
51
+ 'date': 'Date',
52
+ 'bucket_name': 'bucket_name',
53
+ 'object_key': 'object_key',
54
+ 'x_obs_acl': 'x-obs-acl',
55
+ 'x_obs_grant_read': 'x-obs-grant-read',
56
+ 'x_obs_grant_read_acp': 'x-obs-grant-read-acp',
57
+ 'x_obs_grant_write_acp': 'x-obs-grant-write-acp',
58
+ 'x_obs_grant_full_control': 'x-obs-grant-full-control',
59
+ 'x_obs_copy_source': 'x-obs-copy-source',
60
+ 'x_obs_metadata_directive': 'x-obs-metadata-directive',
61
+ 'x_obs_copy_source_if_match': 'x-obs-copy-source-if-match',
62
+ 'x_obs_copy_source_if_none_match': 'x-obs-copy-source-if-none-match',
63
+ 'x_obs_copy_source_if_unmodified_since': 'x-obs-copy-source-if-unmodified-since',
64
+ 'x_obs_copy_source_if_modified_since': 'x-obs-copy-source-if-modified-since',
65
+ 'x_obs_storage_class': 'x-obs-storage-class',
66
+ 'x_obs_persistent_headers': 'x-obs-persistent-headers',
67
+ 'x_obs_website_redirect_location': 'x-obs-website-redirect-location',
68
+ 'x_obs_server_side_encryption': 'x-obs-server-side-encryption',
69
+ 'x_obs_server_side_encryption_kms_key_id': 'x-obs-server-side-encryption-kms-key-id',
70
+ 'x_obs_server_side_encryption_customer_algorithm': 'x-obs-server-side-encryption-customer-algorithm',
71
+ 'x_obs_server_side_encryption_customer_key': 'x-obs-server-side-encryption-customer-key',
72
+ 'x_obs_server_side_encryption_customer_key_md5': 'x-obs-server-side-encryption-customer-key-MD5',
73
+ 'x_obs_copy_source_server_side_encryption_customer_algorithm': 'x-obs-copy-source-server-side-encryption-customer-algorithm',
74
+ 'x_obs_copy_source_server_side_encryption_customer_key': 'x-obs-copy-source-server-side-encryption-customer-key',
75
+ 'x_obs_copy_source_server_side_encryption_customer_key_md5': 'x-obs-copy-source-server-side-encryption-customer-key-MD5',
76
+ 'success_action_redirect': 'success_action_redirect'
77
+ }
78
+
79
+ def __init__(self, date=None, bucket_name=None, object_key=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_copy_source=None, x_obs_metadata_directive=None, x_obs_copy_source_if_match=None, x_obs_copy_source_if_none_match=None, x_obs_copy_source_if_unmodified_since=None, x_obs_copy_source_if_modified_since=None, x_obs_storage_class=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, x_obs_copy_source_server_side_encryption_customer_algorithm=None, x_obs_copy_source_server_side_encryption_customer_key=None, x_obs_copy_source_server_side_encryption_customer_key_md5=None, success_action_redirect=None):
80
+ r"""CopyObjectRequest
81
+
82
+ The model defined in huaweicloud sdk
83
+
84
+ :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.
85
+ :type date: str
86
+ :param bucket_name: Name of the requested bucket
87
+ :type bucket_name: str
88
+ :param object_key: Name of the object copy.
89
+ :type object_key: str
90
+ :param x_obs_acl: When copying the object, you can add this header to configure access control policies for the object. The frequently used predefined policies include **private**, **public-read**, and **public-read-write**. For more information, see the ACL configuration using header fields in the ACLs section. Example: x-obs-acl: acl
91
+ :type x_obs_acl: str
92
+ :param x_obs_grant_read: When creating an object, you can use this header to grant all users in a domain the permissions to read the object and obtain object metadata.
93
+ :type x_obs_grant_read: str
94
+ :param x_obs_grant_read_acp: When creating an object, you can use this header to grant all users in a domain the permissions to obtain the object ACL.
95
+ :type x_obs_grant_read_acp: str
96
+ :param x_obs_grant_write_acp: When creating an object, you can use this header to grant all users in a domain the permissions to write the object ACL.
97
+ :type x_obs_grant_write_acp: str
98
+ :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.
99
+ :type x_obs_grant_full_control: str
100
+ :param x_obs_copy_source: Indicates names of the source bucket and object in a copy request. If the source object has multiple versions, use the **versionId** parameter to specify an object version. Restriction: URL encoding is required for handling Chinese characters. Example: x-obs-copy-source: /source_bucket/sourceObject
101
+ :type x_obs_copy_source: str
102
+ :param x_obs_metadata_directive: Indicates whether the metadata of the target object is copied from the source object or replaced with the metadata provided in the request. Valid values: **COPY** and **REPLACE** Default value: **COPY** Example: x-obs-metadata-directive: metadata_directive Restriction: Values other than **COPY** or **REPLACE** result in an immediate 400-based error response. If you need to modify the metadata (for both the source and target objects), this parameter must be set to **REPLACE**, otherwise, the request is invalid and the server returns a 400 error. This parameter cannot change an encrypted object to a non-encrypted one (for both the source and target objects). If you use this parameter to change the encrypted object, OBS returns a 400 error.
103
+ :type x_obs_metadata_directive: str
104
+ :param x_obs_copy_source_if_match: Copies the source object only if its ETag matches the one specified by this header. Otherwise, a 412 HTTP status code error (failed precondition) is returned. Example: x-obs-copy-source-if-match: etag Restriction: This parameter can be used with **x-obs-copy-source-if-unmodified-since** but not other conditional copy parameters.
105
+ :type x_obs_copy_source_if_match: str
106
+ :param x_obs_copy_source_if_none_match: Copies the object only if its ETag does not match the one specified in this header. Otherwise, a 412 HTTP status code error (failed precondition) is returned. Example: x-obs-copy-source-if-none-match: etag Restriction: This parameter can be used with **x-obs-copy-source-if-modified-since** but not other conditional copy parameters.
107
+ :type x_obs_copy_source_if_none_match: str
108
+ :param x_obs_copy_source_if_unmodified_since: Copies the source object only if it has not been modified since the time specified by this header. Otherwise, a 412 HTTP status code error (failed precondition) is returned. This header can be used with **x-obs-copy-source-if-match**, but cannot be used with other conditional copy headers. Type: HTTP time string complying with the format specified at **http://www.ietf.org/rfc/rfc2616.txt** Example: x-obs-copy-source-if-unmodified -since: time-sta
109
+ :type x_obs_copy_source_if_unmodified_since: str
110
+ :param x_obs_copy_source_if_modified_since: Copies the source object only if it has been modified since the time specified by this header. Otherwise, a 412 HTTP status code error (failed precondition) is returned. This header can be used with **x-obs-copy-source-if-none-match**, but cannot be used with other conditional copy headers. Type: HTTP time string complying with the format specified at **http://www.ietf.org/rfc/rfc2616.txt** Example: x-obs-copy-source-if-modified-since: time-sta
111
+ :type x_obs_copy_source_if_modified_since: str
112
+ :param x_obs_storage_class: When copying an object, you can use this header to specify a storage class for the target object. If you do not have this header configured, the target object inherits the default storage class of the bucket. Type: string 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
113
+ :type x_obs_storage_class: str
114
+ :param x_obs_persistent_headers: When copying 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 target object or query the object metadata, the custom headers will be returned in the response message. Type: string 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:dmFsdWUy When you download the target 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. + If the source object already has custom response headers, such response headers will not be copied to the target object.
115
+ :type x_obs_persistent_headers: str
116
+ :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. Type: string Default value: none Restriction: The value must start with a slash (/), **http://**, or **https://**, with a length of no more than 2 KB.
117
+ :type x_obs_website_redirect_location: str
118
+ :param x_obs_server_side_encryption: Indicates that SSE-KMS is used. The target object is encrypted using SSE-KMS. Type: string Example: x-obs-server-side-encryption: kms This header is required when SSE-KMS is used.
119
+ :type x_obs_server_side_encryption: str
120
+ :param x_obs_server_side_encryption_kms_key_id: The master key ID used to encrypt the target object when SSE-KMS is used. If the customer does not provide this ID, the default master key ID will be used. Type: string 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 on 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
121
+ :type x_obs_server_side_encryption_kms_key_id: str
122
+ :param x_obs_server_side_encryption_customer_algorithm: The algorithm used to encrypt a target object when SSE-C is used. Type: string Example: x-obs-server-side-encryption-customer-algorithm: AES256 Restriction: This header must be used together with **x-obs-server-side-encryption-customer-key** and **x-obs-server-side-encryption-customer-key-MD5**. This header is required when SSE-C is used.
123
+ :type x_obs_server_side_encryption_customer_algorithm: str
124
+ :param x_obs_server_side_encryption_customer_key: The key used to encrypt a target object when SSE-C is used. Type: string 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**. This header is required when SSE-C is used.
125
+ :type x_obs_server_side_encryption_customer_key: str
126
+ :param x_obs_server_side_encryption_customer_key_md5: The MD5 value of a key used to encrypt a target object when SSE-C is used. An MD5 value is used to ensure that there is no error during the key transmission. Type: string 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**. This header is required when SSE-C is used.
127
+ :type x_obs_server_side_encryption_customer_key_md5: str
128
+ :param x_obs_copy_source_server_side_encryption_customer_algorithm: The algorithm used to decrypt the source object when SSE-C is used. Type: string Example: x-obs-copy-source-server-side-encryption-customer-algorithm: AES256 Restriction: This header must be used together with **x-obs-copy-source-server-side-encryption-customer-key** and **x-obs-copy-source-server-side-encryption-customer-key-MD5**. This header is required when SSE-C is used during the copy of the source object.
129
+ :type x_obs_copy_source_server_side_encryption_customer_algorithm: str
130
+ :param x_obs_copy_source_server_side_encryption_customer_key: The key used to decrypt the source object when SSE-C is used. This header decrypts the source object. Type: string Example: x-obs-copy-source-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-copy-source-server-side-encryption-customer-algorithm** and **x-obs-copy-source-server-side-encryption-customer-key-MD5**. This header is required when SSE-C is used during the copy of the source object.
131
+ :type x_obs_copy_source_server_side_encryption_customer_key: str
132
+ :param x_obs_copy_source_server_side_encryption_customer_key_md5: The MD5 value of the key used to decrypt the source object when SSE-C is used. An MD5 value is used to ensure that there is no error during the key transmission. Type: string Example: x-obs-copy-source-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-copy-source-server-side-encryption-customer-algorithm** and **x-obs-copy-source-server-side-encryption-customer-key**. This header is required when SSE-C is used during the copy of the source object.
133
+ :type x_obs_copy_source_server_side_encryption_customer_key_md5: str
134
+ :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. Type: string
135
+ :type success_action_redirect: str
136
+ """
137
+
138
+
139
+
140
+ self._date = None
141
+ self._bucket_name = None
142
+ self._object_key = None
143
+ self._x_obs_acl = None
144
+ self._x_obs_grant_read = None
145
+ self._x_obs_grant_read_acp = None
146
+ self._x_obs_grant_write_acp = None
147
+ self._x_obs_grant_full_control = None
148
+ self._x_obs_copy_source = None
149
+ self._x_obs_metadata_directive = None
150
+ self._x_obs_copy_source_if_match = None
151
+ self._x_obs_copy_source_if_none_match = None
152
+ self._x_obs_copy_source_if_unmodified_since = None
153
+ self._x_obs_copy_source_if_modified_since = None
154
+ self._x_obs_storage_class = None
155
+ self._x_obs_persistent_headers = None
156
+ self._x_obs_website_redirect_location = None
157
+ self._x_obs_server_side_encryption = None
158
+ self._x_obs_server_side_encryption_kms_key_id = None
159
+ self._x_obs_server_side_encryption_customer_algorithm = None
160
+ self._x_obs_server_side_encryption_customer_key = None
161
+ self._x_obs_server_side_encryption_customer_key_md5 = None
162
+ self._x_obs_copy_source_server_side_encryption_customer_algorithm = None
163
+ self._x_obs_copy_source_server_side_encryption_customer_key = None
164
+ self._x_obs_copy_source_server_side_encryption_customer_key_md5 = None
165
+ self._success_action_redirect = None
166
+ self.discriminator = None
167
+
168
+ if date is not None:
169
+ self.date = date
170
+ self.bucket_name = bucket_name
171
+ self.object_key = object_key
172
+ if x_obs_acl is not None:
173
+ self.x_obs_acl = x_obs_acl
174
+ if x_obs_grant_read is not None:
175
+ self.x_obs_grant_read = x_obs_grant_read
176
+ if x_obs_grant_read_acp is not None:
177
+ self.x_obs_grant_read_acp = x_obs_grant_read_acp
178
+ if x_obs_grant_write_acp is not None:
179
+ self.x_obs_grant_write_acp = x_obs_grant_write_acp
180
+ if x_obs_grant_full_control is not None:
181
+ self.x_obs_grant_full_control = x_obs_grant_full_control
182
+ self.x_obs_copy_source = x_obs_copy_source
183
+ if x_obs_metadata_directive is not None:
184
+ self.x_obs_metadata_directive = x_obs_metadata_directive
185
+ if x_obs_copy_source_if_match is not None:
186
+ self.x_obs_copy_source_if_match = x_obs_copy_source_if_match
187
+ if x_obs_copy_source_if_none_match is not None:
188
+ self.x_obs_copy_source_if_none_match = x_obs_copy_source_if_none_match
189
+ if x_obs_copy_source_if_unmodified_since is not None:
190
+ self.x_obs_copy_source_if_unmodified_since = x_obs_copy_source_if_unmodified_since
191
+ if x_obs_copy_source_if_modified_since is not None:
192
+ self.x_obs_copy_source_if_modified_since = x_obs_copy_source_if_modified_since
193
+ if x_obs_storage_class is not None:
194
+ self.x_obs_storage_class = x_obs_storage_class
195
+ if x_obs_persistent_headers is not None:
196
+ self.x_obs_persistent_headers = x_obs_persistent_headers
197
+ if x_obs_website_redirect_location is not None:
198
+ self.x_obs_website_redirect_location = x_obs_website_redirect_location
199
+ if x_obs_server_side_encryption is not None:
200
+ self.x_obs_server_side_encryption = x_obs_server_side_encryption
201
+ if x_obs_server_side_encryption_kms_key_id is not None:
202
+ self.x_obs_server_side_encryption_kms_key_id = x_obs_server_side_encryption_kms_key_id
203
+ if x_obs_server_side_encryption_customer_algorithm is not None:
204
+ self.x_obs_server_side_encryption_customer_algorithm = x_obs_server_side_encryption_customer_algorithm
205
+ if x_obs_server_side_encryption_customer_key is not None:
206
+ self.x_obs_server_side_encryption_customer_key = x_obs_server_side_encryption_customer_key
207
+ if x_obs_server_side_encryption_customer_key_md5 is not None:
208
+ self.x_obs_server_side_encryption_customer_key_md5 = x_obs_server_side_encryption_customer_key_md5
209
+ if x_obs_copy_source_server_side_encryption_customer_algorithm is not None:
210
+ self.x_obs_copy_source_server_side_encryption_customer_algorithm = x_obs_copy_source_server_side_encryption_customer_algorithm
211
+ if x_obs_copy_source_server_side_encryption_customer_key is not None:
212
+ self.x_obs_copy_source_server_side_encryption_customer_key = x_obs_copy_source_server_side_encryption_customer_key
213
+ if x_obs_copy_source_server_side_encryption_customer_key_md5 is not None:
214
+ self.x_obs_copy_source_server_side_encryption_customer_key_md5 = x_obs_copy_source_server_side_encryption_customer_key_md5
215
+ if success_action_redirect is not None:
216
+ self.success_action_redirect = success_action_redirect
217
+
218
+ @property
219
+ def date(self):
220
+ r"""Gets the date of this CopyObjectRequest.
221
+
222
+ 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.
223
+
224
+ :return: The date of this CopyObjectRequest.
225
+ :rtype: str
226
+ """
227
+ return self._date
228
+
229
+ @date.setter
230
+ def date(self, date):
231
+ r"""Sets the date of this CopyObjectRequest.
232
+
233
+ 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.
234
+
235
+ :param date: The date of this CopyObjectRequest.
236
+ :type date: str
237
+ """
238
+ self._date = date
239
+
240
+ @property
241
+ def bucket_name(self):
242
+ r"""Gets the bucket_name of this CopyObjectRequest.
243
+
244
+ Name of the requested bucket
245
+
246
+ :return: The bucket_name of this CopyObjectRequest.
247
+ :rtype: str
248
+ """
249
+ return self._bucket_name
250
+
251
+ @bucket_name.setter
252
+ def bucket_name(self, bucket_name):
253
+ r"""Sets the bucket_name of this CopyObjectRequest.
254
+
255
+ Name of the requested bucket
256
+
257
+ :param bucket_name: The bucket_name of this CopyObjectRequest.
258
+ :type bucket_name: str
259
+ """
260
+ self._bucket_name = bucket_name
261
+
262
+ @property
263
+ def object_key(self):
264
+ r"""Gets the object_key of this CopyObjectRequest.
265
+
266
+ Name of the object copy.
267
+
268
+ :return: The object_key of this CopyObjectRequest.
269
+ :rtype: str
270
+ """
271
+ return self._object_key
272
+
273
+ @object_key.setter
274
+ def object_key(self, object_key):
275
+ r"""Sets the object_key of this CopyObjectRequest.
276
+
277
+ Name of the object copy.
278
+
279
+ :param object_key: The object_key of this CopyObjectRequest.
280
+ :type object_key: str
281
+ """
282
+ self._object_key = object_key
283
+
284
+ @property
285
+ def x_obs_acl(self):
286
+ r"""Gets the x_obs_acl of this CopyObjectRequest.
287
+
288
+ When copying the object, you can add this header to configure access control policies for the object. The frequently used predefined policies include **private**, **public-read**, and **public-read-write**. For more information, see the ACL configuration using header fields in the ACLs section. Example: x-obs-acl: acl
289
+
290
+ :return: The x_obs_acl of this CopyObjectRequest.
291
+ :rtype: str
292
+ """
293
+ return self._x_obs_acl
294
+
295
+ @x_obs_acl.setter
296
+ def x_obs_acl(self, x_obs_acl):
297
+ r"""Sets the x_obs_acl of this CopyObjectRequest.
298
+
299
+ When copying the object, you can add this header to configure access control policies for the object. The frequently used predefined policies include **private**, **public-read**, and **public-read-write**. For more information, see the ACL configuration using header fields in the ACLs section. Example: x-obs-acl: acl
300
+
301
+ :param x_obs_acl: The x_obs_acl of this CopyObjectRequest.
302
+ :type x_obs_acl: str
303
+ """
304
+ self._x_obs_acl = x_obs_acl
305
+
306
+ @property
307
+ def x_obs_grant_read(self):
308
+ r"""Gets the x_obs_grant_read of this CopyObjectRequest.
309
+
310
+ When creating an object, you can use this header to grant all users in a domain the permissions to read the object and obtain object metadata.
311
+
312
+ :return: The x_obs_grant_read of this CopyObjectRequest.
313
+ :rtype: str
314
+ """
315
+ return self._x_obs_grant_read
316
+
317
+ @x_obs_grant_read.setter
318
+ def x_obs_grant_read(self, x_obs_grant_read):
319
+ r"""Sets the x_obs_grant_read of this CopyObjectRequest.
320
+
321
+ When creating an object, you can use this header to grant all users in a domain the permissions to read the object and obtain object metadata.
322
+
323
+ :param x_obs_grant_read: The x_obs_grant_read of this CopyObjectRequest.
324
+ :type x_obs_grant_read: str
325
+ """
326
+ self._x_obs_grant_read = x_obs_grant_read
327
+
328
+ @property
329
+ def x_obs_grant_read_acp(self):
330
+ r"""Gets the x_obs_grant_read_acp of this CopyObjectRequest.
331
+
332
+ When creating an object, you can use this header to grant all users in a domain the permissions to obtain the object ACL.
333
+
334
+ :return: The x_obs_grant_read_acp of this CopyObjectRequest.
335
+ :rtype: str
336
+ """
337
+ return self._x_obs_grant_read_acp
338
+
339
+ @x_obs_grant_read_acp.setter
340
+ def x_obs_grant_read_acp(self, x_obs_grant_read_acp):
341
+ r"""Sets the x_obs_grant_read_acp of this CopyObjectRequest.
342
+
343
+ When creating an object, you can use this header to grant all users in a domain the permissions to obtain the object ACL.
344
+
345
+ :param x_obs_grant_read_acp: The x_obs_grant_read_acp of this CopyObjectRequest.
346
+ :type x_obs_grant_read_acp: str
347
+ """
348
+ self._x_obs_grant_read_acp = x_obs_grant_read_acp
349
+
350
+ @property
351
+ def x_obs_grant_write_acp(self):
352
+ r"""Gets the x_obs_grant_write_acp of this CopyObjectRequest.
353
+
354
+ When creating an object, you can use this header to grant all users in a domain the permissions to write the object ACL.
355
+
356
+ :return: The x_obs_grant_write_acp of this CopyObjectRequest.
357
+ :rtype: str
358
+ """
359
+ return self._x_obs_grant_write_acp
360
+
361
+ @x_obs_grant_write_acp.setter
362
+ def x_obs_grant_write_acp(self, x_obs_grant_write_acp):
363
+ r"""Sets the x_obs_grant_write_acp of this CopyObjectRequest.
364
+
365
+ When creating an object, you can use this header to grant all users in a domain the permissions to write the object ACL.
366
+
367
+ :param x_obs_grant_write_acp: The x_obs_grant_write_acp of this CopyObjectRequest.
368
+ :type x_obs_grant_write_acp: str
369
+ """
370
+ self._x_obs_grant_write_acp = x_obs_grant_write_acp
371
+
372
+ @property
373
+ def x_obs_grant_full_control(self):
374
+ r"""Gets the x_obs_grant_full_control of this CopyObjectRequest.
375
+
376
+ 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.
377
+
378
+ :return: The x_obs_grant_full_control of this CopyObjectRequest.
379
+ :rtype: str
380
+ """
381
+ return self._x_obs_grant_full_control
382
+
383
+ @x_obs_grant_full_control.setter
384
+ def x_obs_grant_full_control(self, x_obs_grant_full_control):
385
+ r"""Sets the x_obs_grant_full_control of this CopyObjectRequest.
386
+
387
+ 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.
388
+
389
+ :param x_obs_grant_full_control: The x_obs_grant_full_control of this CopyObjectRequest.
390
+ :type x_obs_grant_full_control: str
391
+ """
392
+ self._x_obs_grant_full_control = x_obs_grant_full_control
393
+
394
+ @property
395
+ def x_obs_copy_source(self):
396
+ r"""Gets the x_obs_copy_source of this CopyObjectRequest.
397
+
398
+ Indicates names of the source bucket and object in a copy request. If the source object has multiple versions, use the **versionId** parameter to specify an object version. Restriction: URL encoding is required for handling Chinese characters. Example: x-obs-copy-source: /source_bucket/sourceObject
399
+
400
+ :return: The x_obs_copy_source of this CopyObjectRequest.
401
+ :rtype: str
402
+ """
403
+ return self._x_obs_copy_source
404
+
405
+ @x_obs_copy_source.setter
406
+ def x_obs_copy_source(self, x_obs_copy_source):
407
+ r"""Sets the x_obs_copy_source of this CopyObjectRequest.
408
+
409
+ Indicates names of the source bucket and object in a copy request. If the source object has multiple versions, use the **versionId** parameter to specify an object version. Restriction: URL encoding is required for handling Chinese characters. Example: x-obs-copy-source: /source_bucket/sourceObject
410
+
411
+ :param x_obs_copy_source: The x_obs_copy_source of this CopyObjectRequest.
412
+ :type x_obs_copy_source: str
413
+ """
414
+ self._x_obs_copy_source = x_obs_copy_source
415
+
416
+ @property
417
+ def x_obs_metadata_directive(self):
418
+ r"""Gets the x_obs_metadata_directive of this CopyObjectRequest.
419
+
420
+ Indicates whether the metadata of the target object is copied from the source object or replaced with the metadata provided in the request. Valid values: **COPY** and **REPLACE** Default value: **COPY** Example: x-obs-metadata-directive: metadata_directive Restriction: Values other than **COPY** or **REPLACE** result in an immediate 400-based error response. If you need to modify the metadata (for both the source and target objects), this parameter must be set to **REPLACE**, otherwise, the request is invalid and the server returns a 400 error. This parameter cannot change an encrypted object to a non-encrypted one (for both the source and target objects). If you use this parameter to change the encrypted object, OBS returns a 400 error.
421
+
422
+ :return: The x_obs_metadata_directive of this CopyObjectRequest.
423
+ :rtype: str
424
+ """
425
+ return self._x_obs_metadata_directive
426
+
427
+ @x_obs_metadata_directive.setter
428
+ def x_obs_metadata_directive(self, x_obs_metadata_directive):
429
+ r"""Sets the x_obs_metadata_directive of this CopyObjectRequest.
430
+
431
+ Indicates whether the metadata of the target object is copied from the source object or replaced with the metadata provided in the request. Valid values: **COPY** and **REPLACE** Default value: **COPY** Example: x-obs-metadata-directive: metadata_directive Restriction: Values other than **COPY** or **REPLACE** result in an immediate 400-based error response. If you need to modify the metadata (for both the source and target objects), this parameter must be set to **REPLACE**, otherwise, the request is invalid and the server returns a 400 error. This parameter cannot change an encrypted object to a non-encrypted one (for both the source and target objects). If you use this parameter to change the encrypted object, OBS returns a 400 error.
432
+
433
+ :param x_obs_metadata_directive: The x_obs_metadata_directive of this CopyObjectRequest.
434
+ :type x_obs_metadata_directive: str
435
+ """
436
+ self._x_obs_metadata_directive = x_obs_metadata_directive
437
+
438
+ @property
439
+ def x_obs_copy_source_if_match(self):
440
+ r"""Gets the x_obs_copy_source_if_match of this CopyObjectRequest.
441
+
442
+ Copies the source object only if its ETag matches the one specified by this header. Otherwise, a 412 HTTP status code error (failed precondition) is returned. Example: x-obs-copy-source-if-match: etag Restriction: This parameter can be used with **x-obs-copy-source-if-unmodified-since** but not other conditional copy parameters.
443
+
444
+ :return: The x_obs_copy_source_if_match of this CopyObjectRequest.
445
+ :rtype: str
446
+ """
447
+ return self._x_obs_copy_source_if_match
448
+
449
+ @x_obs_copy_source_if_match.setter
450
+ def x_obs_copy_source_if_match(self, x_obs_copy_source_if_match):
451
+ r"""Sets the x_obs_copy_source_if_match of this CopyObjectRequest.
452
+
453
+ Copies the source object only if its ETag matches the one specified by this header. Otherwise, a 412 HTTP status code error (failed precondition) is returned. Example: x-obs-copy-source-if-match: etag Restriction: This parameter can be used with **x-obs-copy-source-if-unmodified-since** but not other conditional copy parameters.
454
+
455
+ :param x_obs_copy_source_if_match: The x_obs_copy_source_if_match of this CopyObjectRequest.
456
+ :type x_obs_copy_source_if_match: str
457
+ """
458
+ self._x_obs_copy_source_if_match = x_obs_copy_source_if_match
459
+
460
+ @property
461
+ def x_obs_copy_source_if_none_match(self):
462
+ r"""Gets the x_obs_copy_source_if_none_match of this CopyObjectRequest.
463
+
464
+ Copies the object only if its ETag does not match the one specified in this header. Otherwise, a 412 HTTP status code error (failed precondition) is returned. Example: x-obs-copy-source-if-none-match: etag Restriction: This parameter can be used with **x-obs-copy-source-if-modified-since** but not other conditional copy parameters.
465
+
466
+ :return: The x_obs_copy_source_if_none_match of this CopyObjectRequest.
467
+ :rtype: str
468
+ """
469
+ return self._x_obs_copy_source_if_none_match
470
+
471
+ @x_obs_copy_source_if_none_match.setter
472
+ def x_obs_copy_source_if_none_match(self, x_obs_copy_source_if_none_match):
473
+ r"""Sets the x_obs_copy_source_if_none_match of this CopyObjectRequest.
474
+
475
+ Copies the object only if its ETag does not match the one specified in this header. Otherwise, a 412 HTTP status code error (failed precondition) is returned. Example: x-obs-copy-source-if-none-match: etag Restriction: This parameter can be used with **x-obs-copy-source-if-modified-since** but not other conditional copy parameters.
476
+
477
+ :param x_obs_copy_source_if_none_match: The x_obs_copy_source_if_none_match of this CopyObjectRequest.
478
+ :type x_obs_copy_source_if_none_match: str
479
+ """
480
+ self._x_obs_copy_source_if_none_match = x_obs_copy_source_if_none_match
481
+
482
+ @property
483
+ def x_obs_copy_source_if_unmodified_since(self):
484
+ r"""Gets the x_obs_copy_source_if_unmodified_since of this CopyObjectRequest.
485
+
486
+ Copies the source object only if it has not been modified since the time specified by this header. Otherwise, a 412 HTTP status code error (failed precondition) is returned. This header can be used with **x-obs-copy-source-if-match**, but cannot be used with other conditional copy headers. Type: HTTP time string complying with the format specified at **http://www.ietf.org/rfc/rfc2616.txt** Example: x-obs-copy-source-if-unmodified -since: time-sta
487
+
488
+ :return: The x_obs_copy_source_if_unmodified_since of this CopyObjectRequest.
489
+ :rtype: str
490
+ """
491
+ return self._x_obs_copy_source_if_unmodified_since
492
+
493
+ @x_obs_copy_source_if_unmodified_since.setter
494
+ def x_obs_copy_source_if_unmodified_since(self, x_obs_copy_source_if_unmodified_since):
495
+ r"""Sets the x_obs_copy_source_if_unmodified_since of this CopyObjectRequest.
496
+
497
+ Copies the source object only if it has not been modified since the time specified by this header. Otherwise, a 412 HTTP status code error (failed precondition) is returned. This header can be used with **x-obs-copy-source-if-match**, but cannot be used with other conditional copy headers. Type: HTTP time string complying with the format specified at **http://www.ietf.org/rfc/rfc2616.txt** Example: x-obs-copy-source-if-unmodified -since: time-sta
498
+
499
+ :param x_obs_copy_source_if_unmodified_since: The x_obs_copy_source_if_unmodified_since of this CopyObjectRequest.
500
+ :type x_obs_copy_source_if_unmodified_since: str
501
+ """
502
+ self._x_obs_copy_source_if_unmodified_since = x_obs_copy_source_if_unmodified_since
503
+
504
+ @property
505
+ def x_obs_copy_source_if_modified_since(self):
506
+ r"""Gets the x_obs_copy_source_if_modified_since of this CopyObjectRequest.
507
+
508
+ Copies the source object only if it has been modified since the time specified by this header. Otherwise, a 412 HTTP status code error (failed precondition) is returned. This header can be used with **x-obs-copy-source-if-none-match**, but cannot be used with other conditional copy headers. Type: HTTP time string complying with the format specified at **http://www.ietf.org/rfc/rfc2616.txt** Example: x-obs-copy-source-if-modified-since: time-sta
509
+
510
+ :return: The x_obs_copy_source_if_modified_since of this CopyObjectRequest.
511
+ :rtype: str
512
+ """
513
+ return self._x_obs_copy_source_if_modified_since
514
+
515
+ @x_obs_copy_source_if_modified_since.setter
516
+ def x_obs_copy_source_if_modified_since(self, x_obs_copy_source_if_modified_since):
517
+ r"""Sets the x_obs_copy_source_if_modified_since of this CopyObjectRequest.
518
+
519
+ Copies the source object only if it has been modified since the time specified by this header. Otherwise, a 412 HTTP status code error (failed precondition) is returned. This header can be used with **x-obs-copy-source-if-none-match**, but cannot be used with other conditional copy headers. Type: HTTP time string complying with the format specified at **http://www.ietf.org/rfc/rfc2616.txt** Example: x-obs-copy-source-if-modified-since: time-sta
520
+
521
+ :param x_obs_copy_source_if_modified_since: The x_obs_copy_source_if_modified_since of this CopyObjectRequest.
522
+ :type x_obs_copy_source_if_modified_since: str
523
+ """
524
+ self._x_obs_copy_source_if_modified_since = x_obs_copy_source_if_modified_since
525
+
526
+ @property
527
+ def x_obs_storage_class(self):
528
+ r"""Gets the x_obs_storage_class of this CopyObjectRequest.
529
+
530
+ When copying an object, you can use this header to specify a storage class for the target object. If you do not have this header configured, the target object inherits the default storage class of the bucket. Type: string 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
531
+
532
+ :return: The x_obs_storage_class of this CopyObjectRequest.
533
+ :rtype: str
534
+ """
535
+ return self._x_obs_storage_class
536
+
537
+ @x_obs_storage_class.setter
538
+ def x_obs_storage_class(self, x_obs_storage_class):
539
+ r"""Sets the x_obs_storage_class of this CopyObjectRequest.
540
+
541
+ When copying an object, you can use this header to specify a storage class for the target object. If you do not have this header configured, the target object inherits the default storage class of the bucket. Type: string 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
542
+
543
+ :param x_obs_storage_class: The x_obs_storage_class of this CopyObjectRequest.
544
+ :type x_obs_storage_class: str
545
+ """
546
+ self._x_obs_storage_class = x_obs_storage_class
547
+
548
+ @property
549
+ def x_obs_persistent_headers(self):
550
+ r"""Gets the x_obs_persistent_headers of this CopyObjectRequest.
551
+
552
+ When copying 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 target object or query the object metadata, the custom headers will be returned in the response message. Type: string 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:dmFsdWUy When you download the target 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. + If the source object already has custom response headers, such response headers will not be copied to the target object.
553
+
554
+ :return: The x_obs_persistent_headers of this CopyObjectRequest.
555
+ :rtype: str
556
+ """
557
+ return self._x_obs_persistent_headers
558
+
559
+ @x_obs_persistent_headers.setter
560
+ def x_obs_persistent_headers(self, x_obs_persistent_headers):
561
+ r"""Sets the x_obs_persistent_headers of this CopyObjectRequest.
562
+
563
+ When copying 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 target object or query the object metadata, the custom headers will be returned in the response message. Type: string 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:dmFsdWUy When you download the target 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. + If the source object already has custom response headers, such response headers will not be copied to the target object.
564
+
565
+ :param x_obs_persistent_headers: The x_obs_persistent_headers of this CopyObjectRequest.
566
+ :type x_obs_persistent_headers: str
567
+ """
568
+ self._x_obs_persistent_headers = x_obs_persistent_headers
569
+
570
+ @property
571
+ def x_obs_website_redirect_location(self):
572
+ r"""Gets the x_obs_website_redirect_location of this CopyObjectRequest.
573
+
574
+ 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. Type: string Default value: none Restriction: The value must start with a slash (/), **http://**, or **https://**, with a length of no more than 2 KB.
575
+
576
+ :return: The x_obs_website_redirect_location of this CopyObjectRequest.
577
+ :rtype: str
578
+ """
579
+ return self._x_obs_website_redirect_location
580
+
581
+ @x_obs_website_redirect_location.setter
582
+ def x_obs_website_redirect_location(self, x_obs_website_redirect_location):
583
+ r"""Sets the x_obs_website_redirect_location of this CopyObjectRequest.
584
+
585
+ 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. Type: string Default value: none Restriction: The value must start with a slash (/), **http://**, or **https://**, with a length of no more than 2 KB.
586
+
587
+ :param x_obs_website_redirect_location: The x_obs_website_redirect_location of this CopyObjectRequest.
588
+ :type x_obs_website_redirect_location: str
589
+ """
590
+ self._x_obs_website_redirect_location = x_obs_website_redirect_location
591
+
592
+ @property
593
+ def x_obs_server_side_encryption(self):
594
+ r"""Gets the x_obs_server_side_encryption of this CopyObjectRequest.
595
+
596
+ Indicates that SSE-KMS is used. The target object is encrypted using SSE-KMS. Type: string Example: x-obs-server-side-encryption: kms This header is required when SSE-KMS is used.
597
+
598
+ :return: The x_obs_server_side_encryption of this CopyObjectRequest.
599
+ :rtype: str
600
+ """
601
+ return self._x_obs_server_side_encryption
602
+
603
+ @x_obs_server_side_encryption.setter
604
+ def x_obs_server_side_encryption(self, x_obs_server_side_encryption):
605
+ r"""Sets the x_obs_server_side_encryption of this CopyObjectRequest.
606
+
607
+ Indicates that SSE-KMS is used. The target object is encrypted using SSE-KMS. Type: string Example: x-obs-server-side-encryption: kms This header is required when SSE-KMS is used.
608
+
609
+ :param x_obs_server_side_encryption: The x_obs_server_side_encryption of this CopyObjectRequest.
610
+ :type x_obs_server_side_encryption: str
611
+ """
612
+ self._x_obs_server_side_encryption = x_obs_server_side_encryption
613
+
614
+ @property
615
+ def x_obs_server_side_encryption_kms_key_id(self):
616
+ r"""Gets the x_obs_server_side_encryption_kms_key_id of this CopyObjectRequest.
617
+
618
+ The master key ID used to encrypt the target object when SSE-KMS is used. If the customer does not provide this ID, the default master key ID will be used. Type: string 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 on 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
619
+
620
+ :return: The x_obs_server_side_encryption_kms_key_id of this CopyObjectRequest.
621
+ :rtype: str
622
+ """
623
+ return self._x_obs_server_side_encryption_kms_key_id
624
+
625
+ @x_obs_server_side_encryption_kms_key_id.setter
626
+ def x_obs_server_side_encryption_kms_key_id(self, x_obs_server_side_encryption_kms_key_id):
627
+ r"""Sets the x_obs_server_side_encryption_kms_key_id of this CopyObjectRequest.
628
+
629
+ The master key ID used to encrypt the target object when SSE-KMS is used. If the customer does not provide this ID, the default master key ID will be used. Type: string 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 on 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
630
+
631
+ :param x_obs_server_side_encryption_kms_key_id: The x_obs_server_side_encryption_kms_key_id of this CopyObjectRequest.
632
+ :type x_obs_server_side_encryption_kms_key_id: str
633
+ """
634
+ self._x_obs_server_side_encryption_kms_key_id = x_obs_server_side_encryption_kms_key_id
635
+
636
+ @property
637
+ def x_obs_server_side_encryption_customer_algorithm(self):
638
+ r"""Gets the x_obs_server_side_encryption_customer_algorithm of this CopyObjectRequest.
639
+
640
+ The algorithm used to encrypt a target object when SSE-C is used. Type: string Example: x-obs-server-side-encryption-customer-algorithm: AES256 Restriction: This header must be used together with **x-obs-server-side-encryption-customer-key** and **x-obs-server-side-encryption-customer-key-MD5**. This header is required when SSE-C is used.
641
+
642
+ :return: The x_obs_server_side_encryption_customer_algorithm of this CopyObjectRequest.
643
+ :rtype: str
644
+ """
645
+ return self._x_obs_server_side_encryption_customer_algorithm
646
+
647
+ @x_obs_server_side_encryption_customer_algorithm.setter
648
+ def x_obs_server_side_encryption_customer_algorithm(self, x_obs_server_side_encryption_customer_algorithm):
649
+ r"""Sets the x_obs_server_side_encryption_customer_algorithm of this CopyObjectRequest.
650
+
651
+ The algorithm used to encrypt a target object when SSE-C is used. Type: string Example: x-obs-server-side-encryption-customer-algorithm: AES256 Restriction: This header must be used together with **x-obs-server-side-encryption-customer-key** and **x-obs-server-side-encryption-customer-key-MD5**. This header is required when SSE-C is used.
652
+
653
+ :param x_obs_server_side_encryption_customer_algorithm: The x_obs_server_side_encryption_customer_algorithm of this CopyObjectRequest.
654
+ :type x_obs_server_side_encryption_customer_algorithm: str
655
+ """
656
+ self._x_obs_server_side_encryption_customer_algorithm = x_obs_server_side_encryption_customer_algorithm
657
+
658
+ @property
659
+ def x_obs_server_side_encryption_customer_key(self):
660
+ r"""Gets the x_obs_server_side_encryption_customer_key of this CopyObjectRequest.
661
+
662
+ The key used to encrypt a target object when SSE-C is used. Type: string 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**. This header is required when SSE-C is used.
663
+
664
+ :return: The x_obs_server_side_encryption_customer_key of this CopyObjectRequest.
665
+ :rtype: str
666
+ """
667
+ return self._x_obs_server_side_encryption_customer_key
668
+
669
+ @x_obs_server_side_encryption_customer_key.setter
670
+ def x_obs_server_side_encryption_customer_key(self, x_obs_server_side_encryption_customer_key):
671
+ r"""Sets the x_obs_server_side_encryption_customer_key of this CopyObjectRequest.
672
+
673
+ The key used to encrypt a target object when SSE-C is used. Type: string 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**. This header is required when SSE-C is used.
674
+
675
+ :param x_obs_server_side_encryption_customer_key: The x_obs_server_side_encryption_customer_key of this CopyObjectRequest.
676
+ :type x_obs_server_side_encryption_customer_key: str
677
+ """
678
+ self._x_obs_server_side_encryption_customer_key = x_obs_server_side_encryption_customer_key
679
+
680
+ @property
681
+ def x_obs_server_side_encryption_customer_key_md5(self):
682
+ r"""Gets the x_obs_server_side_encryption_customer_key_md5 of this CopyObjectRequest.
683
+
684
+ The MD5 value of a key used to encrypt a target object when SSE-C is used. An MD5 value is used to ensure that there is no error during the key transmission. Type: string 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**. This header is required when SSE-C is used.
685
+
686
+ :return: The x_obs_server_side_encryption_customer_key_md5 of this CopyObjectRequest.
687
+ :rtype: str
688
+ """
689
+ return self._x_obs_server_side_encryption_customer_key_md5
690
+
691
+ @x_obs_server_side_encryption_customer_key_md5.setter
692
+ def x_obs_server_side_encryption_customer_key_md5(self, x_obs_server_side_encryption_customer_key_md5):
693
+ r"""Sets the x_obs_server_side_encryption_customer_key_md5 of this CopyObjectRequest.
694
+
695
+ The MD5 value of a key used to encrypt a target object when SSE-C is used. An MD5 value is used to ensure that there is no error during the key transmission. Type: string 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**. This header is required when SSE-C is used.
696
+
697
+ :param x_obs_server_side_encryption_customer_key_md5: The x_obs_server_side_encryption_customer_key_md5 of this CopyObjectRequest.
698
+ :type x_obs_server_side_encryption_customer_key_md5: str
699
+ """
700
+ self._x_obs_server_side_encryption_customer_key_md5 = x_obs_server_side_encryption_customer_key_md5
701
+
702
+ @property
703
+ def x_obs_copy_source_server_side_encryption_customer_algorithm(self):
704
+ r"""Gets the x_obs_copy_source_server_side_encryption_customer_algorithm of this CopyObjectRequest.
705
+
706
+ The algorithm used to decrypt the source object when SSE-C is used. Type: string Example: x-obs-copy-source-server-side-encryption-customer-algorithm: AES256 Restriction: This header must be used together with **x-obs-copy-source-server-side-encryption-customer-key** and **x-obs-copy-source-server-side-encryption-customer-key-MD5**. This header is required when SSE-C is used during the copy of the source object.
707
+
708
+ :return: The x_obs_copy_source_server_side_encryption_customer_algorithm of this CopyObjectRequest.
709
+ :rtype: str
710
+ """
711
+ return self._x_obs_copy_source_server_side_encryption_customer_algorithm
712
+
713
+ @x_obs_copy_source_server_side_encryption_customer_algorithm.setter
714
+ def x_obs_copy_source_server_side_encryption_customer_algorithm(self, x_obs_copy_source_server_side_encryption_customer_algorithm):
715
+ r"""Sets the x_obs_copy_source_server_side_encryption_customer_algorithm of this CopyObjectRequest.
716
+
717
+ The algorithm used to decrypt the source object when SSE-C is used. Type: string Example: x-obs-copy-source-server-side-encryption-customer-algorithm: AES256 Restriction: This header must be used together with **x-obs-copy-source-server-side-encryption-customer-key** and **x-obs-copy-source-server-side-encryption-customer-key-MD5**. This header is required when SSE-C is used during the copy of the source object.
718
+
719
+ :param x_obs_copy_source_server_side_encryption_customer_algorithm: The x_obs_copy_source_server_side_encryption_customer_algorithm of this CopyObjectRequest.
720
+ :type x_obs_copy_source_server_side_encryption_customer_algorithm: str
721
+ """
722
+ self._x_obs_copy_source_server_side_encryption_customer_algorithm = x_obs_copy_source_server_side_encryption_customer_algorithm
723
+
724
+ @property
725
+ def x_obs_copy_source_server_side_encryption_customer_key(self):
726
+ r"""Gets the x_obs_copy_source_server_side_encryption_customer_key of this CopyObjectRequest.
727
+
728
+ The key used to decrypt the source object when SSE-C is used. This header decrypts the source object. Type: string Example: x-obs-copy-source-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-copy-source-server-side-encryption-customer-algorithm** and **x-obs-copy-source-server-side-encryption-customer-key-MD5**. This header is required when SSE-C is used during the copy of the source object.
729
+
730
+ :return: The x_obs_copy_source_server_side_encryption_customer_key of this CopyObjectRequest.
731
+ :rtype: str
732
+ """
733
+ return self._x_obs_copy_source_server_side_encryption_customer_key
734
+
735
+ @x_obs_copy_source_server_side_encryption_customer_key.setter
736
+ def x_obs_copy_source_server_side_encryption_customer_key(self, x_obs_copy_source_server_side_encryption_customer_key):
737
+ r"""Sets the x_obs_copy_source_server_side_encryption_customer_key of this CopyObjectRequest.
738
+
739
+ The key used to decrypt the source object when SSE-C is used. This header decrypts the source object. Type: string Example: x-obs-copy-source-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-copy-source-server-side-encryption-customer-algorithm** and **x-obs-copy-source-server-side-encryption-customer-key-MD5**. This header is required when SSE-C is used during the copy of the source object.
740
+
741
+ :param x_obs_copy_source_server_side_encryption_customer_key: The x_obs_copy_source_server_side_encryption_customer_key of this CopyObjectRequest.
742
+ :type x_obs_copy_source_server_side_encryption_customer_key: str
743
+ """
744
+ self._x_obs_copy_source_server_side_encryption_customer_key = x_obs_copy_source_server_side_encryption_customer_key
745
+
746
+ @property
747
+ def x_obs_copy_source_server_side_encryption_customer_key_md5(self):
748
+ r"""Gets the x_obs_copy_source_server_side_encryption_customer_key_md5 of this CopyObjectRequest.
749
+
750
+ The MD5 value of the key used to decrypt the source object when SSE-C is used. An MD5 value is used to ensure that there is no error during the key transmission. Type: string Example: x-obs-copy-source-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-copy-source-server-side-encryption-customer-algorithm** and **x-obs-copy-source-server-side-encryption-customer-key**. This header is required when SSE-C is used during the copy of the source object.
751
+
752
+ :return: The x_obs_copy_source_server_side_encryption_customer_key_md5 of this CopyObjectRequest.
753
+ :rtype: str
754
+ """
755
+ return self._x_obs_copy_source_server_side_encryption_customer_key_md5
756
+
757
+ @x_obs_copy_source_server_side_encryption_customer_key_md5.setter
758
+ def x_obs_copy_source_server_side_encryption_customer_key_md5(self, x_obs_copy_source_server_side_encryption_customer_key_md5):
759
+ r"""Sets the x_obs_copy_source_server_side_encryption_customer_key_md5 of this CopyObjectRequest.
760
+
761
+ The MD5 value of the key used to decrypt the source object when SSE-C is used. An MD5 value is used to ensure that there is no error during the key transmission. Type: string Example: x-obs-copy-source-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-copy-source-server-side-encryption-customer-algorithm** and **x-obs-copy-source-server-side-encryption-customer-key**. This header is required when SSE-C is used during the copy of the source object.
762
+
763
+ :param x_obs_copy_source_server_side_encryption_customer_key_md5: The x_obs_copy_source_server_side_encryption_customer_key_md5 of this CopyObjectRequest.
764
+ :type x_obs_copy_source_server_side_encryption_customer_key_md5: str
765
+ """
766
+ self._x_obs_copy_source_server_side_encryption_customer_key_md5 = x_obs_copy_source_server_side_encryption_customer_key_md5
767
+
768
+ @property
769
+ def success_action_redirect(self):
770
+ r"""Gets the success_action_redirect of this CopyObjectRequest.
771
+
772
+ 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. Type: string
773
+
774
+ :return: The success_action_redirect of this CopyObjectRequest.
775
+ :rtype: str
776
+ """
777
+ return self._success_action_redirect
778
+
779
+ @success_action_redirect.setter
780
+ def success_action_redirect(self, success_action_redirect):
781
+ r"""Sets the success_action_redirect of this CopyObjectRequest.
782
+
783
+ 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. Type: string
784
+
785
+ :param success_action_redirect: The success_action_redirect of this CopyObjectRequest.
786
+ :type success_action_redirect: str
787
+ """
788
+ self._success_action_redirect = success_action_redirect
789
+
790
+ def to_dict(self):
791
+ """Returns the model properties as a dict"""
792
+ result = {}
793
+
794
+ for attr, _ in six.iteritems(self.openapi_types):
795
+ value = getattr(self, attr)
796
+ if isinstance(value, list):
797
+ result[attr] = list(map(
798
+ lambda x: x.to_dict() if hasattr(x, "to_dict") else x,
799
+ value
800
+ ))
801
+ elif hasattr(value, "to_dict"):
802
+ result[attr] = value.to_dict()
803
+ elif isinstance(value, dict):
804
+ result[attr] = dict(map(
805
+ lambda item: (item[0], item[1].to_dict())
806
+ if hasattr(item[1], "to_dict") else item,
807
+ value.items()
808
+ ))
809
+ else:
810
+ if attr in self.sensitive_list:
811
+ result[attr] = "****"
812
+ else:
813
+ result[attr] = value
814
+
815
+ return result
816
+
817
+ def to_str(self):
818
+ """Returns the string representation of the model"""
819
+ import simplejson as json
820
+ if six.PY2:
821
+ import sys
822
+ reload(sys)
823
+ sys.setdefaultencoding("utf-8")
824
+ return json.dumps(sanitize_for_serialization(self), ensure_ascii=False)
825
+
826
+ def __repr__(self):
827
+ """For `print`"""
828
+ return self.to_str()
829
+
830
+ def __eq__(self, other):
831
+ """Returns true if both objects are equal"""
832
+ if not isinstance(other, CopyObjectRequest):
833
+ return False
834
+
835
+ return self.__dict__ == other.__dict__
836
+
837
+ def __ne__(self, other):
838
+ """Returns true if both objects are not equal"""
839
+ return not self == other