Skip to main content

aws_sdk_s3/operation/copy_object/
_copy_object_input.rs

1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2#[allow(missing_docs)] // documentation missing in model
3#[non_exhaustive]
4#[derive(::std::clone::Clone, ::std::cmp::PartialEq)]
5pub struct CopyObjectInput {
6    /// <p>The canned access control list (ACL) to apply to the object.</p>
7    /// <p>When you copy an object, the ACL metadata is not preserved and is set to <code>private</code> by default. Only the owner has full access control. To override the default ACL setting, specify a new ACL when you generate a copy request. For more information, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/S3_ACLs_UsingACLs.html">Using ACLs</a>.</p>
8    /// <p>If the destination bucket that you're copying objects to uses the bucket owner enforced setting for S3 Object Ownership, ACLs are disabled and no longer affect permissions. Buckets that use this setting only accept <code>PUT</code> requests that don't specify an ACL or <code>PUT</code> requests that specify bucket owner full control ACLs, such as the <code>bucket-owner-full-control</code> canned ACL or an equivalent form of this ACL expressed in the XML format. For more information, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/about-object-ownership.html">Controlling ownership of objects and disabling ACLs</a> in the <i>Amazon S3 User Guide</i>.</p><note>
9    /// <ul>
10    /// <li>
11    /// <p>If your destination bucket uses the bucket owner enforced setting for Object Ownership, all objects written to the bucket by any account will be owned by the bucket owner.</p></li>
12    /// <li>
13    /// <p>This functionality is not supported for directory buckets.</p></li>
14    /// <li>
15    /// <p>This functionality is not supported for Amazon S3 on Outposts.</p></li>
16    /// </ul>
17    /// </note>
18    pub acl: ::std::option::Option<crate::types::ObjectCannedAcl>,
19    /// <p>The name of the destination bucket.</p>
20    /// <p><b>Directory buckets</b> - When you use this operation with a directory bucket, you must use virtual-hosted-style requests in the format <code> <i>Bucket-name</i>.s3express-<i>zone-id</i>.<i>region-code</i>.amazonaws.com</code>. Path-style requests are not supported. Directory bucket names must be unique in the chosen Zone (Availability Zone or Local Zone). Bucket names must follow the format <code> <i>bucket-base-name</i>--<i>zone-id</i>--x-s3</code> (for example, <code> <i>amzn-s3-demo-bucket</i>--<i>usw2-az1</i>--x-s3</code>). For information about bucket naming restrictions, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/directory-bucket-naming-rules.html">Directory bucket naming rules</a> in the <i>Amazon S3 User Guide</i>.</p><note>
21    /// <p>Copying objects across different Amazon Web Services Regions isn't supported when the source or destination bucket is in Amazon Web Services Local Zones. The source and destination buckets must have the same parent Amazon Web Services Region. Otherwise, you get an HTTP <code>400 Bad Request</code> error with the error code <code>InvalidRequest</code>.</p>
22    /// </note>
23    /// <p><b>Access points</b> - When you use this action with an access point for general purpose buckets, you must provide the alias of the access point in place of the bucket name or specify the access point ARN. When you use this action with an access point for directory buckets, you must provide the access point name in place of the bucket name. When using the access point ARN, you must direct requests to the access point hostname. The access point hostname takes the form <i>AccessPointName</i>-<i>AccountId</i>.s3-accesspoint.<i>Region</i>.amazonaws.com. When using this action with an access point through the Amazon Web Services SDKs, you provide the access point ARN in place of the bucket name. For more information about access point ARNs, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/using-access-points.html">Using access points</a> in the <i>Amazon S3 User Guide</i>.</p><note>
24    /// <p>Object Lambda access points are not supported by directory buckets.</p>
25    /// </note>
26    /// <p><b>S3 on Outposts</b> - When you use this action with S3 on Outposts, you must use the Outpost bucket access point ARN or the access point alias for the destination bucket. You can only copy objects within the same Outpost bucket. It's not supported to copy objects across different Amazon Web Services Outposts, between buckets on the same Outposts, or between Outposts buckets and any other bucket types. For more information about S3 on Outposts, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/S3onOutposts.html">What is S3 on Outposts?</a> in the <i>S3 on Outposts guide</i>. When you use this action with S3 on Outposts through the REST API, you must direct requests to the S3 on Outposts hostname, in the format <code> <i>AccessPointName</i>-<i>AccountId</i>.<i>outpostID</i>.s3-outposts.<i>Region</i>.amazonaws.com</code>. The hostname isn't required when you use the Amazon Web Services CLI or SDKs.</p>
27    pub bucket: ::std::option::Option<::std::string::String>,
28    /// <p>Specifies the caching behavior along the request/reply chain.</p>
29    pub cache_control: ::std::option::Option<::std::string::String>,
30    /// <p>Indicates the algorithm that you want Amazon S3 to use to create the checksum for the object. For more information, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html">Checking object integrity</a> in the <i>Amazon S3 User Guide</i>.</p>
31    /// <p>When you copy an object, if the source object has a checksum, that checksum value will be copied to the new object by default. If the <code>CopyObject</code> request does not include this <code>x-amz-checksum-algorithm</code> header, the checksum algorithm will be copied from the source object to the destination object (if it's present on the source object). You can optionally specify a different checksum algorithm to use with the <code>x-amz-checksum-algorithm</code> header. Unrecognized or unsupported values will respond with the HTTP status code <code>400 Bad Request</code>.</p><note>
32    /// <p>For directory buckets, when you use Amazon Web Services SDKs, <code>CRC32</code> is the default checksum algorithm that's used for performance.</p>
33    /// </note>
34    pub checksum_algorithm: ::std::option::Option<crate::types::ChecksumAlgorithm>,
35    /// <p>Specifies presentational information for the object. Indicates whether an object should be displayed in a web browser or downloaded as a file. It allows specifying the desired filename for the downloaded file.</p>
36    pub content_disposition: ::std::option::Option<::std::string::String>,
37    /// <p>Specifies what content encodings have been applied to the object and thus what decoding mechanisms must be applied to obtain the media-type referenced by the Content-Type header field.</p><note>
38    /// <p>For directory buckets, only the <code>aws-chunked</code> value is supported in this header field.</p>
39    /// </note>
40    pub content_encoding: ::std::option::Option<::std::string::String>,
41    /// <p>The language the content is in.</p>
42    pub content_language: ::std::option::Option<::std::string::String>,
43    /// <p>A standard MIME type that describes the format of the object data.</p>
44    pub content_type: ::std::option::Option<::std::string::String>,
45    /// <p>Specifies the source object for the copy operation. The source object can be up to 5 GB. If the source object is an object that was uploaded by using a multipart upload, the object copy will be a single part object after the source object is copied to the destination bucket.</p>
46    /// <p>You specify the value of the copy source in one of two formats, depending on whether you want to access the source object through an <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/access-points.html">access point</a>:</p>
47    /// <ul>
48    /// <li>
49    /// <p>For objects not accessed through an access point, specify the name of the source bucket and the key of the source object, separated by a slash (/). For example, to copy the object <code>reports/january.pdf</code> from the general purpose bucket <code>awsexamplebucket</code>, use <code>awsexamplebucket/reports/january.pdf</code>. The value must be URL-encoded. To copy the object <code>reports/january.pdf</code> from the directory bucket <code>awsexamplebucket--use1-az5--x-s3</code>, use <code>awsexamplebucket--use1-az5--x-s3/reports/january.pdf</code>. The value must be URL-encoded.</p></li>
50    /// <li>
51    /// <p>For objects accessed through access points, specify the Amazon Resource Name (ARN) of the object as accessed through the access point, in the format <code>arn:aws:s3:<region>
52    /// :
53    /// <account-id>
54    /// :accesspoint/
55    /// <access-point-name>
56    /// /object/
57    /// <key></key>
58    /// </access-point-name>
59    /// </account-id>
60    /// </region></code>. For example, to copy the object <code>reports/january.pdf</code> through access point <code>my-access-point</code> owned by account <code>123456789012</code> in Region <code>us-west-2</code>, use the URL encoding of <code>arn:aws:s3:us-west-2:123456789012:accesspoint/my-access-point/object/reports/january.pdf</code>. The value must be URL encoded.</p><note>
61    /// <ul>
62    /// <li>
63    /// <p>Amazon S3 supports copy operations using Access points only when the source and destination buckets are in the same Amazon Web Services Region.</p></li>
64    /// <li>
65    /// <p>Access points are not supported by directory buckets.</p></li>
66    /// </ul>
67    /// </note>
68    /// <p>Alternatively, for objects accessed through Amazon S3 on Outposts, specify the ARN of the object as accessed in the format <code>arn:aws:s3-outposts:<region>
69    /// :
70    /// <account-id>
71    /// :outpost/
72    /// <outpost-id>
73    /// /object/
74    /// <key></key>
75    /// </outpost-id>
76    /// </account-id>
77    /// </region></code>. For example, to copy the object <code>reports/january.pdf</code> through outpost <code>my-outpost</code> owned by account <code>123456789012</code> in Region <code>us-west-2</code>, use the URL encoding of <code>arn:aws:s3-outposts:us-west-2:123456789012:outpost/my-outpost/object/reports/january.pdf</code>. The value must be URL-encoded.</p></li>
78    /// </ul>
79    /// <p>If your source bucket versioning is enabled, the <code>x-amz-copy-source</code> header by default identifies the current version of an object to copy. If the current version is a delete marker, Amazon S3 behaves as if the object was deleted. To copy a different version, use the <code>versionId</code> query parameter. Specifically, append <code>?versionId=<version-id></version-id></code> to the value (for example, <code>awsexamplebucket/reports/january.pdf?versionId=QUpfdndhfd8438MNFDN93jdnJFkdmqnh893</code>). If you don't specify a version ID, Amazon S3 copies the latest version of the source object.</p>
80    /// <p>If you enable versioning on the destination bucket, Amazon S3 generates a unique version ID for the copied object. This version ID is different from the version ID of the source object. Amazon S3 returns the version ID of the copied object in the <code>x-amz-version-id</code> response header in the response.</p>
81    /// <p>If you do not enable versioning or suspend it on the destination bucket, the version ID that Amazon S3 generates in the <code>x-amz-version-id</code> response header is always null.</p><note>
82    /// <p><b>Directory buckets</b> - S3 Versioning isn't enabled and supported for directory buckets.</p>
83    /// </note>
84    pub copy_source: ::std::option::Option<::std::string::String>,
85    /// <p>Copies the object if its entity tag (ETag) matches the specified tag.</p>
86    /// <p>If both the <code>x-amz-copy-source-if-match</code> and <code>x-amz-copy-source-if-unmodified-since</code> headers are present in the request and evaluate as follows, Amazon S3 returns <code>200 OK</code> and copies the data:</p>
87    /// <ul>
88    /// <li>
89    /// <p><code>x-amz-copy-source-if-match</code> condition evaluates to true</p></li>
90    /// <li>
91    /// <p><code>x-amz-copy-source-if-unmodified-since</code> condition evaluates to false</p></li>
92    /// </ul>
93    pub copy_source_if_match: ::std::option::Option<::std::string::String>,
94    /// <p>Copies the object if it has been modified since the specified time.</p>
95    /// <p>If both the <code>x-amz-copy-source-if-none-match</code> and <code>x-amz-copy-source-if-modified-since</code> headers are present in the request and evaluate as follows, Amazon S3 returns the <code>412 Precondition Failed</code> response code:</p>
96    /// <ul>
97    /// <li>
98    /// <p><code>x-amz-copy-source-if-none-match</code> condition evaluates to false</p></li>
99    /// <li>
100    /// <p><code>x-amz-copy-source-if-modified-since</code> condition evaluates to true</p></li>
101    /// </ul>
102    pub copy_source_if_modified_since: ::std::option::Option<::aws_smithy_types::DateTime>,
103    /// <p>Copies the object if its entity tag (ETag) is different than the specified ETag.</p>
104    /// <p>If both the <code>x-amz-copy-source-if-none-match</code> and <code>x-amz-copy-source-if-modified-since</code> headers are present in the request and evaluate as follows, Amazon S3 returns the <code>412 Precondition Failed</code> response code:</p>
105    /// <ul>
106    /// <li>
107    /// <p><code>x-amz-copy-source-if-none-match</code> condition evaluates to false</p></li>
108    /// <li>
109    /// <p><code>x-amz-copy-source-if-modified-since</code> condition evaluates to true</p></li>
110    /// </ul>
111    pub copy_source_if_none_match: ::std::option::Option<::std::string::String>,
112    /// <p>Copies the object if it hasn't been modified since the specified time.</p>
113    /// <p>If both the <code>x-amz-copy-source-if-match</code> and <code>x-amz-copy-source-if-unmodified-since</code> headers are present in the request and evaluate as follows, Amazon S3 returns <code>200 OK</code> and copies the data:</p>
114    /// <ul>
115    /// <li>
116    /// <p><code>x-amz-copy-source-if-match</code> condition evaluates to true</p></li>
117    /// <li>
118    /// <p><code>x-amz-copy-source-if-unmodified-since</code> condition evaluates to false</p></li>
119    /// </ul>
120    pub copy_source_if_unmodified_since: ::std::option::Option<::aws_smithy_types::DateTime>,
121    /// <p>The date and time at which the object is no longer cacheable.</p>
122    pub expires: ::std::option::Option<::aws_smithy_types::DateTime>,
123    /// <p>Gives the grantee READ, READ_ACP, and WRITE_ACP permissions on the object.</p><note>
124    /// <ul>
125    /// <li>
126    /// <p>This functionality is not supported for directory buckets.</p></li>
127    /// <li>
128    /// <p>This functionality is not supported for Amazon S3 on Outposts.</p></li>
129    /// </ul>
130    /// </note>
131    pub grant_full_control: ::std::option::Option<::std::string::String>,
132    /// <p>Allows grantee to read the object data and its metadata.</p><note>
133    /// <ul>
134    /// <li>
135    /// <p>This functionality is not supported for directory buckets.</p></li>
136    /// <li>
137    /// <p>This functionality is not supported for Amazon S3 on Outposts.</p></li>
138    /// </ul>
139    /// </note>
140    pub grant_read: ::std::option::Option<::std::string::String>,
141    /// <p>Allows grantee to read the object ACL.</p><note>
142    /// <ul>
143    /// <li>
144    /// <p>This functionality is not supported for directory buckets.</p></li>
145    /// <li>
146    /// <p>This functionality is not supported for Amazon S3 on Outposts.</p></li>
147    /// </ul>
148    /// </note>
149    pub grant_read_acp: ::std::option::Option<::std::string::String>,
150    /// <p>Allows grantee to write the ACL for the applicable object.</p><note>
151    /// <ul>
152    /// <li>
153    /// <p>This functionality is not supported for directory buckets.</p></li>
154    /// <li>
155    /// <p>This functionality is not supported for Amazon S3 on Outposts.</p></li>
156    /// </ul>
157    /// </note>
158    pub grant_write_acp: ::std::option::Option<::std::string::String>,
159    /// <p>Copies the object if the entity tag (ETag) of the destination object matches the specified tag. If the ETag values do not match, the operation returns a <code>412 Precondition Failed</code> error. If a concurrent operation occurs during the upload S3 returns a <code>409 ConditionalRequestConflict</code> response. On a 409 failure you should fetch the object's ETag and retry the upload.</p>
160    /// <p>Expects the ETag value as a string.</p>
161    /// <p>For more information about conditional requests, see <a href="https://tools.ietf.org/html/rfc7232">RFC 7232</a>.</p>
162    pub if_match: ::std::option::Option<::std::string::String>,
163    /// <p>Copies the object only if the object key name at the destination does not already exist in the bucket specified. Otherwise, Amazon S3 returns a <code>412 Precondition Failed</code> error. If a concurrent operation occurs during the upload S3 returns a <code>409 ConditionalRequestConflict</code> response. On a 409 failure you should retry the upload.</p>
164    /// <p>Expects the '*' (asterisk) character.</p>
165    /// <p>For more information about conditional requests, see <a href="https://tools.ietf.org/html/rfc7232">RFC 7232</a>.</p>
166    pub if_none_match: ::std::option::Option<::std::string::String>,
167    /// <p>The key of the destination object.</p>
168    pub key: ::std::option::Option<::std::string::String>,
169    /// <p>A map of metadata to store with the object in S3.</p>
170    pub metadata: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>,
171    /// <p>Specifies whether the metadata is copied from the source object or replaced with metadata that's provided in the request. When copying an object, you can preserve all metadata (the default) or specify new metadata. If this header isn’t specified, <code>COPY</code> is the default behavior.</p>
172    /// <p><b>General purpose bucket</b> - For general purpose buckets, when you grant permissions, you can use the <code>s3:x-amz-metadata-directive</code> condition key to enforce certain metadata behavior when objects are uploaded. For more information, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/amazon-s3-policy-keys.html">Amazon S3 condition key examples</a> in the <i>Amazon S3 User Guide</i>.</p><note>
173    /// <p><code>x-amz-website-redirect-location</code> is unique to each object and is not copied when using the <code>x-amz-metadata-directive</code> header. To copy the value, you must specify <code>x-amz-website-redirect-location</code> in the request header.</p>
174    /// </note>
175    pub metadata_directive: ::std::option::Option<crate::types::MetadataDirective>,
176    /// <p>Specifies whether the object tag-set is copied from the source object or replaced with the tag-set that's provided in the request.</p>
177    /// <p>The default value is <code>COPY</code>.</p><note>
178    /// <p><b>Directory buckets</b> - For directory buckets in a <code>CopyObject</code> operation, only the empty tag-set is supported. Any requests that attempt to write non-empty tags into directory buckets will receive a <code>501 Not Implemented</code> status code. When the destination bucket is a directory bucket, you will receive a <code>501 Not Implemented</code> response in any of the following situations:</p>
179    /// <ul>
180    /// <li>
181    /// <p>When you attempt to <code>COPY</code> the tag-set from an S3 source object that has non-empty tags.</p></li>
182    /// <li>
183    /// <p>When you attempt to <code>REPLACE</code> the tag-set of a source object and set a non-empty value to <code>x-amz-tagging</code>.</p></li>
184    /// <li>
185    /// <p>When you don't set the <code>x-amz-tagging-directive</code> header and the source object has non-empty tags. This is because the default value of <code>x-amz-tagging-directive</code> is <code>COPY</code>.</p></li>
186    /// </ul>
187    /// <p>Because only the empty tag-set is supported for directory buckets in a <code>CopyObject</code> operation, the following situations are allowed:</p>
188    /// <ul>
189    /// <li>
190    /// <p>When you attempt to <code>COPY</code> the tag-set from a directory bucket source object that has no tags to a general purpose bucket. It copies an empty tag-set to the destination object.</p></li>
191    /// <li>
192    /// <p>When you attempt to <code>REPLACE</code> the tag-set of a directory bucket source object and set the <code>x-amz-tagging</code> value of the directory bucket destination object to empty.</p></li>
193    /// <li>
194    /// <p>When you attempt to <code>REPLACE</code> the tag-set of a general purpose bucket source object that has non-empty tags and set the <code>x-amz-tagging</code> value of the directory bucket destination object to empty.</p></li>
195    /// <li>
196    /// <p>When you attempt to <code>REPLACE</code> the tag-set of a directory bucket source object and don't set the <code>x-amz-tagging</code> value of the directory bucket destination object. This is because the default value of <code>x-amz-tagging</code> is the empty value.</p></li>
197    /// </ul>
198    /// </note>
199    pub tagging_directive: ::std::option::Option<crate::types::TaggingDirective>,
200    /// <p>Specifies whether you want to copy annotations from the source object or exclude them. If this header isn't specified, <code>COPY</code> is the default behavior.</p>
201    /// <p>Valid Values: <code>COPY | EXCLUDE</code></p>
202    /// <p>You can specify this directive as either an HTTP header (<code>x-amz-object-annotation-directive</code>) or as a query string parameter. Use the query string form when generating presigned URLs that need to control annotation copy behavior.</p>
203    /// <p>When set to <code>COPY</code>, you must have <code>s3:GetObjectAnnotation</code> permission on the source object and <code>s3:PutObjectAnnotation</code> permission on the destination. Each annotation copied is billed as a separate PUT request. If annotations on the source are modified during the copy, Amazon S3 returns a retryable error.</p><note>
204    /// <p>For directory buckets, annotations are not supported. Use <code>EXCLUDE</code> to copy objects to directory buckets without errors. If you specify <code>COPY</code> for a directory bucket, the request returns HTTP 501 (Not Implemented).</p>
205    /// </note> <note>
206    /// <p>When you copy objects using multipart upload (for example, when the Amazon Web Services CLI or Amazon Web Services SDKs use Transfer Manager for objects larger than approximately 8 MB), annotations are not copied by default. To include annotations, specify <code>--copy-props default</code> in the Amazon Web Services CLI or the equivalent SDK configuration. With this opt-in, the SDK reads source annotations, completes the multipart upload, and then writes each annotation to the destination. Between the upload completion and the last annotation write, the destination object exists without all its annotations.</p>
207    /// </note>
208    pub annotation_directive: ::std::option::Option<crate::types::AnnotationDirective>,
209    /// <p>The server-side encryption algorithm used when storing this object in Amazon S3. Unrecognized or unsupported values won’t write a destination object and will receive a <code>400 Bad Request</code> response.</p>
210    /// <p>Amazon S3 automatically encrypts all new objects that are copied to an S3 bucket. When copying an object, if you don't specify encryption information in your copy request, the encryption setting of the target object is set to the default encryption configuration of the destination bucket. By default, all buckets have a base level of encryption configuration that uses server-side encryption with Amazon S3 managed keys (SSE-S3). If the destination bucket has a different default encryption configuration, Amazon S3 uses the corresponding encryption key to encrypt the target object copy.</p>
211    /// <p>With server-side encryption, Amazon S3 encrypts your data as it writes your data to disks in its data centers and decrypts the data when you access it. For more information about server-side encryption, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/serv-side-encryption.html">Using Server-Side Encryption</a> in the <i>Amazon S3 User Guide</i>.</p>
212    /// <p><b>General purpose buckets </b></p>
213    /// <ul>
214    /// <li>
215    /// <p>For general purpose buckets, there are the following supported options for server-side encryption: server-side encryption with Key Management Service (KMS) keys (SSE-KMS), dual-layer server-side encryption with Amazon Web Services KMS keys (DSSE-KMS), and server-side encryption with customer-provided encryption keys (SSE-C). Amazon S3 uses the corresponding KMS key, or a customer-provided key to encrypt the target object copy.</p></li>
216    /// <li>
217    /// <p>When you perform a <code>CopyObject</code> operation, if you want to use a different type of encryption setting for the target object, you can specify appropriate encryption-related headers to encrypt the target object with an Amazon S3 managed key, a KMS key, or a customer-provided key. If the encryption setting in your request is different from the default encryption configuration of the destination bucket, the encryption setting in your request takes precedence.</p></li>
218    /// </ul>
219    /// <p><b>Directory buckets </b></p>
220    /// <ul>
221    /// <li>
222    /// <p>For directory buckets, there are only two supported options for server-side encryption: server-side encryption with Amazon S3 managed keys (SSE-S3) (<code>AES256</code>) and server-side encryption with KMS keys (SSE-KMS) (<code>aws:kms</code>). We recommend that the bucket's default encryption uses the desired encryption configuration and you don't override the bucket default encryption in your <code>CreateSession</code> requests or <code>PUT</code> object requests. Then, new objects are automatically encrypted with the desired encryption settings. For more information, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/s3-express-serv-side-encryption.html">Protecting data with server-side encryption</a> in the <i>Amazon S3 User Guide</i>. For more information about the encryption overriding behaviors in directory buckets, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/s3-express-specifying-kms-encryption.html">Specifying server-side encryption with KMS for new object uploads</a>.</p></li>
223    /// <li>
224    /// <p>To encrypt new object copies to a directory bucket with SSE-KMS, we recommend you specify SSE-KMS as the directory bucket's default encryption configuration with a KMS key (specifically, a <a href="https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#customer-cmk">customer managed key</a>). The <a href="https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#aws-managed-cmk">Amazon Web Services managed key</a> (<code>aws/s3</code>) isn't supported. Your SSE-KMS configuration can only support 1 <a href="https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#customer-cmk">customer managed key</a> per directory bucket for the lifetime of the bucket. After you specify a customer managed key for SSE-KMS, you can't override the customer managed key for the bucket's SSE-KMS configuration. Then, when you perform a <code>CopyObject</code> operation and want to specify server-side encryption settings for new object copies with SSE-KMS in the encryption-related request headers, you must ensure the encryption key is the same customer managed key that you specified for the directory bucket's default encryption configuration.</p></li>
225    /// <li>
226    /// <p><b>S3 access points for Amazon FSx </b> - When accessing data stored in Amazon FSx file systems using S3 access points, the only valid server side encryption option is <code>aws:fsx</code>. All Amazon FSx file systems have encryption configured by default and are encrypted at rest. Data is automatically encrypted before being written to the file system, and automatically decrypted as it is read. These processes are handled transparently by Amazon FSx.</p></li>
227    /// </ul>
228    pub server_side_encryption: ::std::option::Option<crate::types::ServerSideEncryption>,
229    /// <p>If the <code>x-amz-storage-class</code> header is not used, the copied object will be stored in the <code>STANDARD</code> Storage Class by default. The <code>STANDARD</code> storage class provides high durability and high availability. Depending on performance needs, you can specify a different Storage Class.</p><note>
230    /// <ul>
231    /// <li>
232    /// <p><b>Directory buckets </b> - Directory buckets only support <code>EXPRESS_ONEZONE</code> (the S3 Express One Zone storage class) in Availability Zones and <code>ONEZONE_IA</code> (the S3 One Zone-Infrequent Access storage class) in Dedicated Local Zones. Unsupported storage class values won't write a destination object and will respond with the HTTP status code <code>400 Bad Request</code>.</p></li>
233    /// <li>
234    /// <p><b>Amazon S3 on Outposts </b> - S3 on Outposts only uses the <code>OUTPOSTS</code> Storage Class.</p></li>
235    /// </ul>
236    /// </note>
237    /// <p>You can use the <code>CopyObject</code> action to change the storage class of an object that is already stored in Amazon S3 by using the <code>x-amz-storage-class</code> header. For more information, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/storage-class-intro.html">Storage Classes</a> in the <i>Amazon S3 User Guide</i>.</p>
238    /// <p>Before using an object as a source object for the copy operation, you must restore a copy of it if it meets any of the following conditions:</p>
239    /// <ul>
240    /// <li>
241    /// <p>The storage class of the source object is <code>GLACIER</code> or <code>DEEP_ARCHIVE</code>.</p></li>
242    /// <li>
243    /// <p>The storage class of the source object is <code>INTELLIGENT_TIERING</code> and it's <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/intelligent-tiering-overview.html#intel-tiering-tier-definition">S3 Intelligent-Tiering access tier</a> is <code>Archive Access</code> or <code>Deep Archive Access</code>.</p></li>
244    /// </ul>
245    /// <p>For more information, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_RestoreObject.html">RestoreObject</a> and <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/CopyingObjectsExamples.html">Copying Objects</a> in the <i>Amazon S3 User Guide</i>.</p>
246    pub storage_class: ::std::option::Option<crate::types::StorageClass>,
247    /// <p>If the destination bucket is configured as a website, redirects requests for this object copy to another object in the same bucket or to an external URL. Amazon S3 stores the value of this header in the object metadata. This value is unique to each object and is not copied when using the <code>x-amz-metadata-directive</code> header. Instead, you may opt to provide this header in combination with the <code>x-amz-metadata-directive</code> header.</p><note>
248    /// <p>This functionality is not supported for directory buckets.</p>
249    /// </note>
250    pub website_redirect_location: ::std::option::Option<::std::string::String>,
251    /// <p>Specifies the algorithm to use when encrypting the object (for example, <code>AES256</code>).</p>
252    /// <p>When you perform a <code>CopyObject</code> operation, if you want to use a different type of encryption setting for the target object, you can specify appropriate encryption-related headers to encrypt the target object with an Amazon S3 managed key, a KMS key, or a customer-provided key. If the encryption setting in your request is different from the default encryption configuration of the destination bucket, the encryption setting in your request takes precedence.</p><note>
253    /// <p>This functionality is not supported when the destination bucket is a directory bucket.</p>
254    /// </note>
255    pub sse_customer_algorithm: ::std::option::Option<::std::string::String>,
256    /// <p>Specifies the customer-provided encryption key for Amazon S3 to use in encrypting data. This value is used to store the object and then it is discarded. Amazon S3 does not store the encryption key. The key must be appropriate for use with the algorithm specified in the <code>x-amz-server-side-encryption-customer-algorithm</code> header.</p><note>
257    /// <p>This functionality is not supported when the destination bucket is a directory bucket.</p>
258    /// </note>
259    pub sse_customer_key: ::std::option::Option<::std::string::String>,
260    /// <p>Specifies the 128-bit MD5 digest of the encryption key according to RFC 1321. Amazon S3 uses this header for a message integrity check to ensure that the encryption key was transmitted without error.</p><note>
261    /// <p>This functionality is not supported when the destination bucket is a directory bucket.</p>
262    /// </note>
263    pub sse_customer_key_md5: ::std::option::Option<::std::string::String>,
264    /// <p>Specifies the KMS key ID (Key ID, Key ARN, or Key Alias) to use for object encryption. All GET and PUT requests for an object protected by KMS will fail if they're not made via SSL or using SigV4. For information about configuring any of the officially supported Amazon Web Services SDKs and Amazon Web Services CLI, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/UsingAWSSDK.html#specify-signature-version">Specifying the Signature Version in Request Authentication</a> in the <i>Amazon S3 User Guide</i>.</p>
265    /// <p><b>Directory buckets</b> - To encrypt data using SSE-KMS, it's recommended to specify the <code>x-amz-server-side-encryption</code> header to <code>aws:kms</code>. Then, the <code>x-amz-server-side-encryption-aws-kms-key-id</code> header implicitly uses the bucket's default KMS customer managed key ID. If you want to explicitly set the <code> x-amz-server-side-encryption-aws-kms-key-id</code> header, it must match the bucket's default customer managed key (using key ID or ARN, not alias). Your SSE-KMS configuration can only support 1 <a href="https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#customer-cmk">customer managed key</a> per directory bucket's lifetime. The <a href="https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#aws-managed-cmk">Amazon Web Services managed key</a> (<code>aws/s3</code>) isn't supported. Incorrect key specification results in an HTTP <code>400 Bad Request</code> error.</p>
266    pub ssekms_key_id: ::std::option::Option<::std::string::String>,
267    /// <p>Specifies the Amazon Web Services KMS Encryption Context as an additional encryption context to use for the destination object encryption. The value of this header is a base64-encoded UTF-8 string holding JSON with the encryption context key-value pairs.</p>
268    /// <p><b>General purpose buckets</b> - This value must be explicitly added to specify encryption context for <code>CopyObject</code> requests if you want an additional encryption context for your destination object. The additional encryption context of the source object won't be copied to the destination object. For more information, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/UsingKMSEncryption.html#encryption-context">Encryption context</a> in the <i>Amazon S3 User Guide</i>.</p>
269    /// <p><b>Directory buckets</b> - You can optionally provide an explicit encryption context value. The value must match the default encryption context - the bucket Amazon Resource Name (ARN). An additional encryption context value is not supported.</p>
270    pub ssekms_encryption_context: ::std::option::Option<::std::string::String>,
271    /// <p>Specifies whether Amazon S3 should use an S3 Bucket Key for object encryption with server-side encryption using Key Management Service (KMS) keys (SSE-KMS). If a target object uses SSE-KMS, you can enable an S3 Bucket Key for the object.</p>
272    /// <p>Setting this header to <code>true</code> causes Amazon S3 to use an S3 Bucket Key for object encryption with SSE-KMS. Specifying this header with a COPY action doesn’t affect bucket-level settings for S3 Bucket Key.</p>
273    /// <p>For more information, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/bucket-key.html">Amazon S3 Bucket Keys</a> in the <i>Amazon S3 User Guide</i>.</p><note>
274    /// <p><b>Directory buckets</b> - S3 Bucket Keys aren't supported, when you copy SSE-KMS encrypted objects from general purpose buckets to directory buckets, from directory buckets to general purpose buckets, or between directory buckets, through <a href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_CopyObject.html">CopyObject</a>. In this case, Amazon S3 makes a call to KMS every time a copy request is made for a KMS-encrypted object.</p>
275    /// </note>
276    pub bucket_key_enabled: ::std::option::Option<bool>,
277    /// <p>Specifies the algorithm to use when decrypting the source object (for example, <code>AES256</code>).</p>
278    /// <p>If the source object for the copy is stored in Amazon S3 using SSE-C, you must provide the necessary encryption information in your request so that Amazon S3 can decrypt the object for copying.</p><note>
279    /// <p>This functionality is not supported when the source object is in a directory bucket.</p>
280    /// </note>
281    pub copy_source_sse_customer_algorithm: ::std::option::Option<::std::string::String>,
282    /// <p>Specifies the customer-provided encryption key for Amazon S3 to use to decrypt the source object. The encryption key provided in this header must be the same one that was used when the source object was created.</p>
283    /// <p>If the source object for the copy is stored in Amazon S3 using SSE-C, you must provide the necessary encryption information in your request so that Amazon S3 can decrypt the object for copying.</p><note>
284    /// <p>This functionality is not supported when the source object is in a directory bucket.</p>
285    /// </note>
286    pub copy_source_sse_customer_key: ::std::option::Option<::std::string::String>,
287    /// <p>Specifies the 128-bit MD5 digest of the encryption key according to RFC 1321. Amazon S3 uses this header for a message integrity check to ensure that the encryption key was transmitted without error.</p>
288    /// <p>If the source object for the copy is stored in Amazon S3 using SSE-C, you must provide the necessary encryption information in your request so that Amazon S3 can decrypt the object for copying.</p><note>
289    /// <p>This functionality is not supported when the source object is in a directory bucket.</p>
290    /// </note>
291    pub copy_source_sse_customer_key_md5: ::std::option::Option<::std::string::String>,
292    /// <p>Confirms that the requester knows that they will be charged for the request. Bucket owners need not specify this parameter in their requests. If either the source or destination S3 bucket has Requester Pays enabled, the requester will pay for the corresponding charges. For information about downloading objects from Requester Pays buckets, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/ObjectsinRequesterPaysBuckets.html">Downloading Objects in Requester Pays Buckets</a> in the <i>Amazon S3 User Guide</i>.</p><note>
293    /// <p>This functionality is not supported for directory buckets.</p>
294    /// </note>
295    pub request_payer: ::std::option::Option<crate::types::RequestPayer>,
296    /// <p>The tag-set for the object copy in the destination bucket. This value must be used in conjunction with the <code>x-amz-tagging-directive</code> if you choose <code>REPLACE</code> for the <code>x-amz-tagging-directive</code>. If you choose <code>COPY</code> for the <code>x-amz-tagging-directive</code>, you don't need to set the <code>x-amz-tagging</code> header, because the tag-set will be copied from the source object directly. The tag-set must be encoded as URL Query parameters.</p>
297    /// <p>The default value is the empty value.</p><note>
298    /// <p><b>Directory buckets</b> - For directory buckets in a <code>CopyObject</code> operation, only the empty tag-set is supported. Any requests that attempt to write non-empty tags into directory buckets will receive a <code>501 Not Implemented</code> status code. When the destination bucket is a directory bucket, you will receive a <code>501 Not Implemented</code> response in any of the following situations:</p>
299    /// <ul>
300    /// <li>
301    /// <p>When you attempt to <code>COPY</code> the tag-set from an S3 source object that has non-empty tags.</p></li>
302    /// <li>
303    /// <p>When you attempt to <code>REPLACE</code> the tag-set of a source object and set a non-empty value to <code>x-amz-tagging</code>.</p></li>
304    /// <li>
305    /// <p>When you don't set the <code>x-amz-tagging-directive</code> header and the source object has non-empty tags. This is because the default value of <code>x-amz-tagging-directive</code> is <code>COPY</code>.</p></li>
306    /// </ul>
307    /// <p>Because only the empty tag-set is supported for directory buckets in a <code>CopyObject</code> operation, the following situations are allowed:</p>
308    /// <ul>
309    /// <li>
310    /// <p>When you attempt to <code>COPY</code> the tag-set from a directory bucket source object that has no tags to a general purpose bucket. It copies an empty tag-set to the destination object.</p></li>
311    /// <li>
312    /// <p>When you attempt to <code>REPLACE</code> the tag-set of a directory bucket source object and set the <code>x-amz-tagging</code> value of the directory bucket destination object to empty.</p></li>
313    /// <li>
314    /// <p>When you attempt to <code>REPLACE</code> the tag-set of a general purpose bucket source object that has non-empty tags and set the <code>x-amz-tagging</code> value of the directory bucket destination object to empty.</p></li>
315    /// <li>
316    /// <p>When you attempt to <code>REPLACE</code> the tag-set of a directory bucket source object and don't set the <code>x-amz-tagging</code> value of the directory bucket destination object. This is because the default value of <code>x-amz-tagging</code> is the empty value.</p></li>
317    /// </ul>
318    /// </note>
319    pub tagging: ::std::option::Option<::std::string::String>,
320    /// <p>The Object Lock mode that you want to apply to the object copy.</p><note>
321    /// <p>This functionality is not supported for directory buckets.</p>
322    /// </note>
323    pub object_lock_mode: ::std::option::Option<crate::types::ObjectLockMode>,
324    /// <p>The date and time when you want the Object Lock of the object copy to expire.</p><note>
325    /// <p>This functionality is not supported for directory buckets.</p>
326    /// </note>
327    pub object_lock_retain_until_date: ::std::option::Option<::aws_smithy_types::DateTime>,
328    /// <p>Specifies whether you want to apply a legal hold to the object copy.</p><note>
329    /// <p>This functionality is not supported for directory buckets.</p>
330    /// </note>
331    pub object_lock_legal_hold_status: ::std::option::Option<crate::types::ObjectLockLegalHoldStatus>,
332    /// <p>The event hold status to apply to the object copy. Set to <code>ON</code> to enable or <code>OFF</code> to disable.</p><note>
333    /// <p>This functionality is not supported for directory buckets.</p>
334    /// </note>
335    pub object_lock_event_hold: ::std::option::Option<crate::types::ObjectLockEventHold>,
336    /// <p>The event hold duration in days to apply to the object copy. You cannot specify a duration in both days and years.</p><note>
337    /// <p>This functionality is not supported for directory buckets.</p>
338    /// </note>
339    pub object_lock_event_hold_duration_days: ::std::option::Option<i32>,
340    /// <p>The event hold duration in years to apply to the object copy. You cannot specify a duration in both days and years.</p><note>
341    /// <p>This functionality is not supported for directory buckets.</p>
342    /// </note>
343    pub object_lock_event_hold_duration_years: ::std::option::Option<i32>,
344    /// <p>The account ID of the expected destination bucket owner. If the account ID that you provide does not match the actual owner of the destination bucket, the request fails with the HTTP status code <code>403 Forbidden</code> (access denied).</p>
345    pub expected_bucket_owner: ::std::option::Option<::std::string::String>,
346    /// <p>The account ID of the expected source bucket owner. If the account ID that you provide does not match the actual owner of the source bucket, the request fails with the HTTP status code <code>403 Forbidden</code> (access denied).</p>
347    pub expected_source_bucket_owner: ::std::option::Option<::std::string::String>,
348}
349impl CopyObjectInput {
350    /// <p>The canned access control list (ACL) to apply to the object.</p>
351    /// <p>When you copy an object, the ACL metadata is not preserved and is set to <code>private</code> by default. Only the owner has full access control. To override the default ACL setting, specify a new ACL when you generate a copy request. For more information, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/S3_ACLs_UsingACLs.html">Using ACLs</a>.</p>
352    /// <p>If the destination bucket that you're copying objects to uses the bucket owner enforced setting for S3 Object Ownership, ACLs are disabled and no longer affect permissions. Buckets that use this setting only accept <code>PUT</code> requests that don't specify an ACL or <code>PUT</code> requests that specify bucket owner full control ACLs, such as the <code>bucket-owner-full-control</code> canned ACL or an equivalent form of this ACL expressed in the XML format. For more information, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/about-object-ownership.html">Controlling ownership of objects and disabling ACLs</a> in the <i>Amazon S3 User Guide</i>.</p><note>
353    /// <ul>
354    /// <li>
355    /// <p>If your destination bucket uses the bucket owner enforced setting for Object Ownership, all objects written to the bucket by any account will be owned by the bucket owner.</p></li>
356    /// <li>
357    /// <p>This functionality is not supported for directory buckets.</p></li>
358    /// <li>
359    /// <p>This functionality is not supported for Amazon S3 on Outposts.</p></li>
360    /// </ul>
361    /// </note>
362    pub fn acl(&self) -> ::std::option::Option<&crate::types::ObjectCannedAcl> {
363        self.acl.as_ref()
364    }
365    /// <p>The name of the destination bucket.</p>
366    /// <p><b>Directory buckets</b> - When you use this operation with a directory bucket, you must use virtual-hosted-style requests in the format <code> <i>Bucket-name</i>.s3express-<i>zone-id</i>.<i>region-code</i>.amazonaws.com</code>. Path-style requests are not supported. Directory bucket names must be unique in the chosen Zone (Availability Zone or Local Zone). Bucket names must follow the format <code> <i>bucket-base-name</i>--<i>zone-id</i>--x-s3</code> (for example, <code> <i>amzn-s3-demo-bucket</i>--<i>usw2-az1</i>--x-s3</code>). For information about bucket naming restrictions, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/directory-bucket-naming-rules.html">Directory bucket naming rules</a> in the <i>Amazon S3 User Guide</i>.</p><note>
367    /// <p>Copying objects across different Amazon Web Services Regions isn't supported when the source or destination bucket is in Amazon Web Services Local Zones. The source and destination buckets must have the same parent Amazon Web Services Region. Otherwise, you get an HTTP <code>400 Bad Request</code> error with the error code <code>InvalidRequest</code>.</p>
368    /// </note>
369    /// <p><b>Access points</b> - When you use this action with an access point for general purpose buckets, you must provide the alias of the access point in place of the bucket name or specify the access point ARN. When you use this action with an access point for directory buckets, you must provide the access point name in place of the bucket name. When using the access point ARN, you must direct requests to the access point hostname. The access point hostname takes the form <i>AccessPointName</i>-<i>AccountId</i>.s3-accesspoint.<i>Region</i>.amazonaws.com. When using this action with an access point through the Amazon Web Services SDKs, you provide the access point ARN in place of the bucket name. For more information about access point ARNs, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/using-access-points.html">Using access points</a> in the <i>Amazon S3 User Guide</i>.</p><note>
370    /// <p>Object Lambda access points are not supported by directory buckets.</p>
371    /// </note>
372    /// <p><b>S3 on Outposts</b> - When you use this action with S3 on Outposts, you must use the Outpost bucket access point ARN or the access point alias for the destination bucket. You can only copy objects within the same Outpost bucket. It's not supported to copy objects across different Amazon Web Services Outposts, between buckets on the same Outposts, or between Outposts buckets and any other bucket types. For more information about S3 on Outposts, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/S3onOutposts.html">What is S3 on Outposts?</a> in the <i>S3 on Outposts guide</i>. When you use this action with S3 on Outposts through the REST API, you must direct requests to the S3 on Outposts hostname, in the format <code> <i>AccessPointName</i>-<i>AccountId</i>.<i>outpostID</i>.s3-outposts.<i>Region</i>.amazonaws.com</code>. The hostname isn't required when you use the Amazon Web Services CLI or SDKs.</p>
373    pub fn bucket(&self) -> ::std::option::Option<&str> {
374        self.bucket.as_deref()
375    }
376    /// <p>Specifies the caching behavior along the request/reply chain.</p>
377    pub fn cache_control(&self) -> ::std::option::Option<&str> {
378        self.cache_control.as_deref()
379    }
380    /// <p>Indicates the algorithm that you want Amazon S3 to use to create the checksum for the object. For more information, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html">Checking object integrity</a> in the <i>Amazon S3 User Guide</i>.</p>
381    /// <p>When you copy an object, if the source object has a checksum, that checksum value will be copied to the new object by default. If the <code>CopyObject</code> request does not include this <code>x-amz-checksum-algorithm</code> header, the checksum algorithm will be copied from the source object to the destination object (if it's present on the source object). You can optionally specify a different checksum algorithm to use with the <code>x-amz-checksum-algorithm</code> header. Unrecognized or unsupported values will respond with the HTTP status code <code>400 Bad Request</code>.</p><note>
382    /// <p>For directory buckets, when you use Amazon Web Services SDKs, <code>CRC32</code> is the default checksum algorithm that's used for performance.</p>
383    /// </note>
384    pub fn checksum_algorithm(&self) -> ::std::option::Option<&crate::types::ChecksumAlgorithm> {
385        self.checksum_algorithm.as_ref()
386    }
387    /// <p>Specifies presentational information for the object. Indicates whether an object should be displayed in a web browser or downloaded as a file. It allows specifying the desired filename for the downloaded file.</p>
388    pub fn content_disposition(&self) -> ::std::option::Option<&str> {
389        self.content_disposition.as_deref()
390    }
391    /// <p>Specifies what content encodings have been applied to the object and thus what decoding mechanisms must be applied to obtain the media-type referenced by the Content-Type header field.</p><note>
392    /// <p>For directory buckets, only the <code>aws-chunked</code> value is supported in this header field.</p>
393    /// </note>
394    pub fn content_encoding(&self) -> ::std::option::Option<&str> {
395        self.content_encoding.as_deref()
396    }
397    /// <p>The language the content is in.</p>
398    pub fn content_language(&self) -> ::std::option::Option<&str> {
399        self.content_language.as_deref()
400    }
401    /// <p>A standard MIME type that describes the format of the object data.</p>
402    pub fn content_type(&self) -> ::std::option::Option<&str> {
403        self.content_type.as_deref()
404    }
405    /// <p>Specifies the source object for the copy operation. The source object can be up to 5 GB. If the source object is an object that was uploaded by using a multipart upload, the object copy will be a single part object after the source object is copied to the destination bucket.</p>
406    /// <p>You specify the value of the copy source in one of two formats, depending on whether you want to access the source object through an <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/access-points.html">access point</a>:</p>
407    /// <ul>
408    /// <li>
409    /// <p>For objects not accessed through an access point, specify the name of the source bucket and the key of the source object, separated by a slash (/). For example, to copy the object <code>reports/january.pdf</code> from the general purpose bucket <code>awsexamplebucket</code>, use <code>awsexamplebucket/reports/january.pdf</code>. The value must be URL-encoded. To copy the object <code>reports/january.pdf</code> from the directory bucket <code>awsexamplebucket--use1-az5--x-s3</code>, use <code>awsexamplebucket--use1-az5--x-s3/reports/january.pdf</code>. The value must be URL-encoded.</p></li>
410    /// <li>
411    /// <p>For objects accessed through access points, specify the Amazon Resource Name (ARN) of the object as accessed through the access point, in the format <code>arn:aws:s3:<region>
412    /// :
413    /// <account-id>
414    /// :accesspoint/
415    /// <access-point-name>
416    /// /object/
417    /// <key></key>
418    /// </access-point-name>
419    /// </account-id>
420    /// </region></code>. For example, to copy the object <code>reports/january.pdf</code> through access point <code>my-access-point</code> owned by account <code>123456789012</code> in Region <code>us-west-2</code>, use the URL encoding of <code>arn:aws:s3:us-west-2:123456789012:accesspoint/my-access-point/object/reports/january.pdf</code>. The value must be URL encoded.</p><note>
421    /// <ul>
422    /// <li>
423    /// <p>Amazon S3 supports copy operations using Access points only when the source and destination buckets are in the same Amazon Web Services Region.</p></li>
424    /// <li>
425    /// <p>Access points are not supported by directory buckets.</p></li>
426    /// </ul>
427    /// </note>
428    /// <p>Alternatively, for objects accessed through Amazon S3 on Outposts, specify the ARN of the object as accessed in the format <code>arn:aws:s3-outposts:<region>
429    /// :
430    /// <account-id>
431    /// :outpost/
432    /// <outpost-id>
433    /// /object/
434    /// <key></key>
435    /// </outpost-id>
436    /// </account-id>
437    /// </region></code>. For example, to copy the object <code>reports/january.pdf</code> through outpost <code>my-outpost</code> owned by account <code>123456789012</code> in Region <code>us-west-2</code>, use the URL encoding of <code>arn:aws:s3-outposts:us-west-2:123456789012:outpost/my-outpost/object/reports/january.pdf</code>. The value must be URL-encoded.</p></li>
438    /// </ul>
439    /// <p>If your source bucket versioning is enabled, the <code>x-amz-copy-source</code> header by default identifies the current version of an object to copy. If the current version is a delete marker, Amazon S3 behaves as if the object was deleted. To copy a different version, use the <code>versionId</code> query parameter. Specifically, append <code>?versionId=<version-id></version-id></code> to the value (for example, <code>awsexamplebucket/reports/january.pdf?versionId=QUpfdndhfd8438MNFDN93jdnJFkdmqnh893</code>). If you don't specify a version ID, Amazon S3 copies the latest version of the source object.</p>
440    /// <p>If you enable versioning on the destination bucket, Amazon S3 generates a unique version ID for the copied object. This version ID is different from the version ID of the source object. Amazon S3 returns the version ID of the copied object in the <code>x-amz-version-id</code> response header in the response.</p>
441    /// <p>If you do not enable versioning or suspend it on the destination bucket, the version ID that Amazon S3 generates in the <code>x-amz-version-id</code> response header is always null.</p><note>
442    /// <p><b>Directory buckets</b> - S3 Versioning isn't enabled and supported for directory buckets.</p>
443    /// </note>
444    pub fn copy_source(&self) -> ::std::option::Option<&str> {
445        self.copy_source.as_deref()
446    }
447    /// <p>Copies the object if its entity tag (ETag) matches the specified tag.</p>
448    /// <p>If both the <code>x-amz-copy-source-if-match</code> and <code>x-amz-copy-source-if-unmodified-since</code> headers are present in the request and evaluate as follows, Amazon S3 returns <code>200 OK</code> and copies the data:</p>
449    /// <ul>
450    /// <li>
451    /// <p><code>x-amz-copy-source-if-match</code> condition evaluates to true</p></li>
452    /// <li>
453    /// <p><code>x-amz-copy-source-if-unmodified-since</code> condition evaluates to false</p></li>
454    /// </ul>
455    pub fn copy_source_if_match(&self) -> ::std::option::Option<&str> {
456        self.copy_source_if_match.as_deref()
457    }
458    /// <p>Copies the object if it has been modified since the specified time.</p>
459    /// <p>If both the <code>x-amz-copy-source-if-none-match</code> and <code>x-amz-copy-source-if-modified-since</code> headers are present in the request and evaluate as follows, Amazon S3 returns the <code>412 Precondition Failed</code> response code:</p>
460    /// <ul>
461    /// <li>
462    /// <p><code>x-amz-copy-source-if-none-match</code> condition evaluates to false</p></li>
463    /// <li>
464    /// <p><code>x-amz-copy-source-if-modified-since</code> condition evaluates to true</p></li>
465    /// </ul>
466    pub fn copy_source_if_modified_since(&self) -> ::std::option::Option<&::aws_smithy_types::DateTime> {
467        self.copy_source_if_modified_since.as_ref()
468    }
469    /// <p>Copies the object if its entity tag (ETag) is different than the specified ETag.</p>
470    /// <p>If both the <code>x-amz-copy-source-if-none-match</code> and <code>x-amz-copy-source-if-modified-since</code> headers are present in the request and evaluate as follows, Amazon S3 returns the <code>412 Precondition Failed</code> response code:</p>
471    /// <ul>
472    /// <li>
473    /// <p><code>x-amz-copy-source-if-none-match</code> condition evaluates to false</p></li>
474    /// <li>
475    /// <p><code>x-amz-copy-source-if-modified-since</code> condition evaluates to true</p></li>
476    /// </ul>
477    pub fn copy_source_if_none_match(&self) -> ::std::option::Option<&str> {
478        self.copy_source_if_none_match.as_deref()
479    }
480    /// <p>Copies the object if it hasn't been modified since the specified time.</p>
481    /// <p>If both the <code>x-amz-copy-source-if-match</code> and <code>x-amz-copy-source-if-unmodified-since</code> headers are present in the request and evaluate as follows, Amazon S3 returns <code>200 OK</code> and copies the data:</p>
482    /// <ul>
483    /// <li>
484    /// <p><code>x-amz-copy-source-if-match</code> condition evaluates to true</p></li>
485    /// <li>
486    /// <p><code>x-amz-copy-source-if-unmodified-since</code> condition evaluates to false</p></li>
487    /// </ul>
488    pub fn copy_source_if_unmodified_since(&self) -> ::std::option::Option<&::aws_smithy_types::DateTime> {
489        self.copy_source_if_unmodified_since.as_ref()
490    }
491    /// <p>The date and time at which the object is no longer cacheable.</p>
492    pub fn expires(&self) -> ::std::option::Option<&::aws_smithy_types::DateTime> {
493        self.expires.as_ref()
494    }
495    /// <p>Gives the grantee READ, READ_ACP, and WRITE_ACP permissions on the object.</p><note>
496    /// <ul>
497    /// <li>
498    /// <p>This functionality is not supported for directory buckets.</p></li>
499    /// <li>
500    /// <p>This functionality is not supported for Amazon S3 on Outposts.</p></li>
501    /// </ul>
502    /// </note>
503    pub fn grant_full_control(&self) -> ::std::option::Option<&str> {
504        self.grant_full_control.as_deref()
505    }
506    /// <p>Allows grantee to read the object data and its metadata.</p><note>
507    /// <ul>
508    /// <li>
509    /// <p>This functionality is not supported for directory buckets.</p></li>
510    /// <li>
511    /// <p>This functionality is not supported for Amazon S3 on Outposts.</p></li>
512    /// </ul>
513    /// </note>
514    pub fn grant_read(&self) -> ::std::option::Option<&str> {
515        self.grant_read.as_deref()
516    }
517    /// <p>Allows grantee to read the object ACL.</p><note>
518    /// <ul>
519    /// <li>
520    /// <p>This functionality is not supported for directory buckets.</p></li>
521    /// <li>
522    /// <p>This functionality is not supported for Amazon S3 on Outposts.</p></li>
523    /// </ul>
524    /// </note>
525    pub fn grant_read_acp(&self) -> ::std::option::Option<&str> {
526        self.grant_read_acp.as_deref()
527    }
528    /// <p>Allows grantee to write the ACL for the applicable object.</p><note>
529    /// <ul>
530    /// <li>
531    /// <p>This functionality is not supported for directory buckets.</p></li>
532    /// <li>
533    /// <p>This functionality is not supported for Amazon S3 on Outposts.</p></li>
534    /// </ul>
535    /// </note>
536    pub fn grant_write_acp(&self) -> ::std::option::Option<&str> {
537        self.grant_write_acp.as_deref()
538    }
539    /// <p>Copies the object if the entity tag (ETag) of the destination object matches the specified tag. If the ETag values do not match, the operation returns a <code>412 Precondition Failed</code> error. If a concurrent operation occurs during the upload S3 returns a <code>409 ConditionalRequestConflict</code> response. On a 409 failure you should fetch the object's ETag and retry the upload.</p>
540    /// <p>Expects the ETag value as a string.</p>
541    /// <p>For more information about conditional requests, see <a href="https://tools.ietf.org/html/rfc7232">RFC 7232</a>.</p>
542    pub fn if_match(&self) -> ::std::option::Option<&str> {
543        self.if_match.as_deref()
544    }
545    /// <p>Copies the object only if the object key name at the destination does not already exist in the bucket specified. Otherwise, Amazon S3 returns a <code>412 Precondition Failed</code> error. If a concurrent operation occurs during the upload S3 returns a <code>409 ConditionalRequestConflict</code> response. On a 409 failure you should retry the upload.</p>
546    /// <p>Expects the '*' (asterisk) character.</p>
547    /// <p>For more information about conditional requests, see <a href="https://tools.ietf.org/html/rfc7232">RFC 7232</a>.</p>
548    pub fn if_none_match(&self) -> ::std::option::Option<&str> {
549        self.if_none_match.as_deref()
550    }
551    /// <p>The key of the destination object.</p>
552    pub fn key(&self) -> ::std::option::Option<&str> {
553        self.key.as_deref()
554    }
555    /// <p>A map of metadata to store with the object in S3.</p>
556    pub fn metadata(&self) -> ::std::option::Option<&::std::collections::HashMap<::std::string::String, ::std::string::String>> {
557        self.metadata.as_ref()
558    }
559    /// <p>Specifies whether the metadata is copied from the source object or replaced with metadata that's provided in the request. When copying an object, you can preserve all metadata (the default) or specify new metadata. If this header isn’t specified, <code>COPY</code> is the default behavior.</p>
560    /// <p><b>General purpose bucket</b> - For general purpose buckets, when you grant permissions, you can use the <code>s3:x-amz-metadata-directive</code> condition key to enforce certain metadata behavior when objects are uploaded. For more information, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/amazon-s3-policy-keys.html">Amazon S3 condition key examples</a> in the <i>Amazon S3 User Guide</i>.</p><note>
561    /// <p><code>x-amz-website-redirect-location</code> is unique to each object and is not copied when using the <code>x-amz-metadata-directive</code> header. To copy the value, you must specify <code>x-amz-website-redirect-location</code> in the request header.</p>
562    /// </note>
563    pub fn metadata_directive(&self) -> ::std::option::Option<&crate::types::MetadataDirective> {
564        self.metadata_directive.as_ref()
565    }
566    /// <p>Specifies whether the object tag-set is copied from the source object or replaced with the tag-set that's provided in the request.</p>
567    /// <p>The default value is <code>COPY</code>.</p><note>
568    /// <p><b>Directory buckets</b> - For directory buckets in a <code>CopyObject</code> operation, only the empty tag-set is supported. Any requests that attempt to write non-empty tags into directory buckets will receive a <code>501 Not Implemented</code> status code. When the destination bucket is a directory bucket, you will receive a <code>501 Not Implemented</code> response in any of the following situations:</p>
569    /// <ul>
570    /// <li>
571    /// <p>When you attempt to <code>COPY</code> the tag-set from an S3 source object that has non-empty tags.</p></li>
572    /// <li>
573    /// <p>When you attempt to <code>REPLACE</code> the tag-set of a source object and set a non-empty value to <code>x-amz-tagging</code>.</p></li>
574    /// <li>
575    /// <p>When you don't set the <code>x-amz-tagging-directive</code> header and the source object has non-empty tags. This is because the default value of <code>x-amz-tagging-directive</code> is <code>COPY</code>.</p></li>
576    /// </ul>
577    /// <p>Because only the empty tag-set is supported for directory buckets in a <code>CopyObject</code> operation, the following situations are allowed:</p>
578    /// <ul>
579    /// <li>
580    /// <p>When you attempt to <code>COPY</code> the tag-set from a directory bucket source object that has no tags to a general purpose bucket. It copies an empty tag-set to the destination object.</p></li>
581    /// <li>
582    /// <p>When you attempt to <code>REPLACE</code> the tag-set of a directory bucket source object and set the <code>x-amz-tagging</code> value of the directory bucket destination object to empty.</p></li>
583    /// <li>
584    /// <p>When you attempt to <code>REPLACE</code> the tag-set of a general purpose bucket source object that has non-empty tags and set the <code>x-amz-tagging</code> value of the directory bucket destination object to empty.</p></li>
585    /// <li>
586    /// <p>When you attempt to <code>REPLACE</code> the tag-set of a directory bucket source object and don't set the <code>x-amz-tagging</code> value of the directory bucket destination object. This is because the default value of <code>x-amz-tagging</code> is the empty value.</p></li>
587    /// </ul>
588    /// </note>
589    pub fn tagging_directive(&self) -> ::std::option::Option<&crate::types::TaggingDirective> {
590        self.tagging_directive.as_ref()
591    }
592    /// <p>Specifies whether you want to copy annotations from the source object or exclude them. If this header isn't specified, <code>COPY</code> is the default behavior.</p>
593    /// <p>Valid Values: <code>COPY | EXCLUDE</code></p>
594    /// <p>You can specify this directive as either an HTTP header (<code>x-amz-object-annotation-directive</code>) or as a query string parameter. Use the query string form when generating presigned URLs that need to control annotation copy behavior.</p>
595    /// <p>When set to <code>COPY</code>, you must have <code>s3:GetObjectAnnotation</code> permission on the source object and <code>s3:PutObjectAnnotation</code> permission on the destination. Each annotation copied is billed as a separate PUT request. If annotations on the source are modified during the copy, Amazon S3 returns a retryable error.</p><note>
596    /// <p>For directory buckets, annotations are not supported. Use <code>EXCLUDE</code> to copy objects to directory buckets without errors. If you specify <code>COPY</code> for a directory bucket, the request returns HTTP 501 (Not Implemented).</p>
597    /// </note> <note>
598    /// <p>When you copy objects using multipart upload (for example, when the Amazon Web Services CLI or Amazon Web Services SDKs use Transfer Manager for objects larger than approximately 8 MB), annotations are not copied by default. To include annotations, specify <code>--copy-props default</code> in the Amazon Web Services CLI or the equivalent SDK configuration. With this opt-in, the SDK reads source annotations, completes the multipart upload, and then writes each annotation to the destination. Between the upload completion and the last annotation write, the destination object exists without all its annotations.</p>
599    /// </note>
600    pub fn annotation_directive(&self) -> ::std::option::Option<&crate::types::AnnotationDirective> {
601        self.annotation_directive.as_ref()
602    }
603    /// <p>The server-side encryption algorithm used when storing this object in Amazon S3. Unrecognized or unsupported values won’t write a destination object and will receive a <code>400 Bad Request</code> response.</p>
604    /// <p>Amazon S3 automatically encrypts all new objects that are copied to an S3 bucket. When copying an object, if you don't specify encryption information in your copy request, the encryption setting of the target object is set to the default encryption configuration of the destination bucket. By default, all buckets have a base level of encryption configuration that uses server-side encryption with Amazon S3 managed keys (SSE-S3). If the destination bucket has a different default encryption configuration, Amazon S3 uses the corresponding encryption key to encrypt the target object copy.</p>
605    /// <p>With server-side encryption, Amazon S3 encrypts your data as it writes your data to disks in its data centers and decrypts the data when you access it. For more information about server-side encryption, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/serv-side-encryption.html">Using Server-Side Encryption</a> in the <i>Amazon S3 User Guide</i>.</p>
606    /// <p><b>General purpose buckets </b></p>
607    /// <ul>
608    /// <li>
609    /// <p>For general purpose buckets, there are the following supported options for server-side encryption: server-side encryption with Key Management Service (KMS) keys (SSE-KMS), dual-layer server-side encryption with Amazon Web Services KMS keys (DSSE-KMS), and server-side encryption with customer-provided encryption keys (SSE-C). Amazon S3 uses the corresponding KMS key, or a customer-provided key to encrypt the target object copy.</p></li>
610    /// <li>
611    /// <p>When you perform a <code>CopyObject</code> operation, if you want to use a different type of encryption setting for the target object, you can specify appropriate encryption-related headers to encrypt the target object with an Amazon S3 managed key, a KMS key, or a customer-provided key. If the encryption setting in your request is different from the default encryption configuration of the destination bucket, the encryption setting in your request takes precedence.</p></li>
612    /// </ul>
613    /// <p><b>Directory buckets </b></p>
614    /// <ul>
615    /// <li>
616    /// <p>For directory buckets, there are only two supported options for server-side encryption: server-side encryption with Amazon S3 managed keys (SSE-S3) (<code>AES256</code>) and server-side encryption with KMS keys (SSE-KMS) (<code>aws:kms</code>). We recommend that the bucket's default encryption uses the desired encryption configuration and you don't override the bucket default encryption in your <code>CreateSession</code> requests or <code>PUT</code> object requests. Then, new objects are automatically encrypted with the desired encryption settings. For more information, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/s3-express-serv-side-encryption.html">Protecting data with server-side encryption</a> in the <i>Amazon S3 User Guide</i>. For more information about the encryption overriding behaviors in directory buckets, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/s3-express-specifying-kms-encryption.html">Specifying server-side encryption with KMS for new object uploads</a>.</p></li>
617    /// <li>
618    /// <p>To encrypt new object copies to a directory bucket with SSE-KMS, we recommend you specify SSE-KMS as the directory bucket's default encryption configuration with a KMS key (specifically, a <a href="https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#customer-cmk">customer managed key</a>). The <a href="https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#aws-managed-cmk">Amazon Web Services managed key</a> (<code>aws/s3</code>) isn't supported. Your SSE-KMS configuration can only support 1 <a href="https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#customer-cmk">customer managed key</a> per directory bucket for the lifetime of the bucket. After you specify a customer managed key for SSE-KMS, you can't override the customer managed key for the bucket's SSE-KMS configuration. Then, when you perform a <code>CopyObject</code> operation and want to specify server-side encryption settings for new object copies with SSE-KMS in the encryption-related request headers, you must ensure the encryption key is the same customer managed key that you specified for the directory bucket's default encryption configuration.</p></li>
619    /// <li>
620    /// <p><b>S3 access points for Amazon FSx </b> - When accessing data stored in Amazon FSx file systems using S3 access points, the only valid server side encryption option is <code>aws:fsx</code>. All Amazon FSx file systems have encryption configured by default and are encrypted at rest. Data is automatically encrypted before being written to the file system, and automatically decrypted as it is read. These processes are handled transparently by Amazon FSx.</p></li>
621    /// </ul>
622    pub fn server_side_encryption(&self) -> ::std::option::Option<&crate::types::ServerSideEncryption> {
623        self.server_side_encryption.as_ref()
624    }
625    /// <p>If the <code>x-amz-storage-class</code> header is not used, the copied object will be stored in the <code>STANDARD</code> Storage Class by default. The <code>STANDARD</code> storage class provides high durability and high availability. Depending on performance needs, you can specify a different Storage Class.</p><note>
626    /// <ul>
627    /// <li>
628    /// <p><b>Directory buckets </b> - Directory buckets only support <code>EXPRESS_ONEZONE</code> (the S3 Express One Zone storage class) in Availability Zones and <code>ONEZONE_IA</code> (the S3 One Zone-Infrequent Access storage class) in Dedicated Local Zones. Unsupported storage class values won't write a destination object and will respond with the HTTP status code <code>400 Bad Request</code>.</p></li>
629    /// <li>
630    /// <p><b>Amazon S3 on Outposts </b> - S3 on Outposts only uses the <code>OUTPOSTS</code> Storage Class.</p></li>
631    /// </ul>
632    /// </note>
633    /// <p>You can use the <code>CopyObject</code> action to change the storage class of an object that is already stored in Amazon S3 by using the <code>x-amz-storage-class</code> header. For more information, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/storage-class-intro.html">Storage Classes</a> in the <i>Amazon S3 User Guide</i>.</p>
634    /// <p>Before using an object as a source object for the copy operation, you must restore a copy of it if it meets any of the following conditions:</p>
635    /// <ul>
636    /// <li>
637    /// <p>The storage class of the source object is <code>GLACIER</code> or <code>DEEP_ARCHIVE</code>.</p></li>
638    /// <li>
639    /// <p>The storage class of the source object is <code>INTELLIGENT_TIERING</code> and it's <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/intelligent-tiering-overview.html#intel-tiering-tier-definition">S3 Intelligent-Tiering access tier</a> is <code>Archive Access</code> or <code>Deep Archive Access</code>.</p></li>
640    /// </ul>
641    /// <p>For more information, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_RestoreObject.html">RestoreObject</a> and <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/CopyingObjectsExamples.html">Copying Objects</a> in the <i>Amazon S3 User Guide</i>.</p>
642    pub fn storage_class(&self) -> ::std::option::Option<&crate::types::StorageClass> {
643        self.storage_class.as_ref()
644    }
645    /// <p>If the destination bucket is configured as a website, redirects requests for this object copy to another object in the same bucket or to an external URL. Amazon S3 stores the value of this header in the object metadata. This value is unique to each object and is not copied when using the <code>x-amz-metadata-directive</code> header. Instead, you may opt to provide this header in combination with the <code>x-amz-metadata-directive</code> header.</p><note>
646    /// <p>This functionality is not supported for directory buckets.</p>
647    /// </note>
648    pub fn website_redirect_location(&self) -> ::std::option::Option<&str> {
649        self.website_redirect_location.as_deref()
650    }
651    /// <p>Specifies the algorithm to use when encrypting the object (for example, <code>AES256</code>).</p>
652    /// <p>When you perform a <code>CopyObject</code> operation, if you want to use a different type of encryption setting for the target object, you can specify appropriate encryption-related headers to encrypt the target object with an Amazon S3 managed key, a KMS key, or a customer-provided key. If the encryption setting in your request is different from the default encryption configuration of the destination bucket, the encryption setting in your request takes precedence.</p><note>
653    /// <p>This functionality is not supported when the destination bucket is a directory bucket.</p>
654    /// </note>
655    pub fn sse_customer_algorithm(&self) -> ::std::option::Option<&str> {
656        self.sse_customer_algorithm.as_deref()
657    }
658    /// <p>Specifies the customer-provided encryption key for Amazon S3 to use in encrypting data. This value is used to store the object and then it is discarded. Amazon S3 does not store the encryption key. The key must be appropriate for use with the algorithm specified in the <code>x-amz-server-side-encryption-customer-algorithm</code> header.</p><note>
659    /// <p>This functionality is not supported when the destination bucket is a directory bucket.</p>
660    /// </note>
661    pub fn sse_customer_key(&self) -> ::std::option::Option<&str> {
662        self.sse_customer_key.as_deref()
663    }
664    /// <p>Specifies the 128-bit MD5 digest of the encryption key according to RFC 1321. Amazon S3 uses this header for a message integrity check to ensure that the encryption key was transmitted without error.</p><note>
665    /// <p>This functionality is not supported when the destination bucket is a directory bucket.</p>
666    /// </note>
667    pub fn sse_customer_key_md5(&self) -> ::std::option::Option<&str> {
668        self.sse_customer_key_md5.as_deref()
669    }
670    /// <p>Specifies the KMS key ID (Key ID, Key ARN, or Key Alias) to use for object encryption. All GET and PUT requests for an object protected by KMS will fail if they're not made via SSL or using SigV4. For information about configuring any of the officially supported Amazon Web Services SDKs and Amazon Web Services CLI, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/UsingAWSSDK.html#specify-signature-version">Specifying the Signature Version in Request Authentication</a> in the <i>Amazon S3 User Guide</i>.</p>
671    /// <p><b>Directory buckets</b> - To encrypt data using SSE-KMS, it's recommended to specify the <code>x-amz-server-side-encryption</code> header to <code>aws:kms</code>. Then, the <code>x-amz-server-side-encryption-aws-kms-key-id</code> header implicitly uses the bucket's default KMS customer managed key ID. If you want to explicitly set the <code> x-amz-server-side-encryption-aws-kms-key-id</code> header, it must match the bucket's default customer managed key (using key ID or ARN, not alias). Your SSE-KMS configuration can only support 1 <a href="https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#customer-cmk">customer managed key</a> per directory bucket's lifetime. The <a href="https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#aws-managed-cmk">Amazon Web Services managed key</a> (<code>aws/s3</code>) isn't supported. Incorrect key specification results in an HTTP <code>400 Bad Request</code> error.</p>
672    pub fn ssekms_key_id(&self) -> ::std::option::Option<&str> {
673        self.ssekms_key_id.as_deref()
674    }
675    /// <p>Specifies the Amazon Web Services KMS Encryption Context as an additional encryption context to use for the destination object encryption. The value of this header is a base64-encoded UTF-8 string holding JSON with the encryption context key-value pairs.</p>
676    /// <p><b>General purpose buckets</b> - This value must be explicitly added to specify encryption context for <code>CopyObject</code> requests if you want an additional encryption context for your destination object. The additional encryption context of the source object won't be copied to the destination object. For more information, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/UsingKMSEncryption.html#encryption-context">Encryption context</a> in the <i>Amazon S3 User Guide</i>.</p>
677    /// <p><b>Directory buckets</b> - You can optionally provide an explicit encryption context value. The value must match the default encryption context - the bucket Amazon Resource Name (ARN). An additional encryption context value is not supported.</p>
678    pub fn ssekms_encryption_context(&self) -> ::std::option::Option<&str> {
679        self.ssekms_encryption_context.as_deref()
680    }
681    /// <p>Specifies whether Amazon S3 should use an S3 Bucket Key for object encryption with server-side encryption using Key Management Service (KMS) keys (SSE-KMS). If a target object uses SSE-KMS, you can enable an S3 Bucket Key for the object.</p>
682    /// <p>Setting this header to <code>true</code> causes Amazon S3 to use an S3 Bucket Key for object encryption with SSE-KMS. Specifying this header with a COPY action doesn’t affect bucket-level settings for S3 Bucket Key.</p>
683    /// <p>For more information, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/bucket-key.html">Amazon S3 Bucket Keys</a> in the <i>Amazon S3 User Guide</i>.</p><note>
684    /// <p><b>Directory buckets</b> - S3 Bucket Keys aren't supported, when you copy SSE-KMS encrypted objects from general purpose buckets to directory buckets, from directory buckets to general purpose buckets, or between directory buckets, through <a href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_CopyObject.html">CopyObject</a>. In this case, Amazon S3 makes a call to KMS every time a copy request is made for a KMS-encrypted object.</p>
685    /// </note>
686    pub fn bucket_key_enabled(&self) -> ::std::option::Option<bool> {
687        self.bucket_key_enabled
688    }
689    /// <p>Specifies the algorithm to use when decrypting the source object (for example, <code>AES256</code>).</p>
690    /// <p>If the source object for the copy is stored in Amazon S3 using SSE-C, you must provide the necessary encryption information in your request so that Amazon S3 can decrypt the object for copying.</p><note>
691    /// <p>This functionality is not supported when the source object is in a directory bucket.</p>
692    /// </note>
693    pub fn copy_source_sse_customer_algorithm(&self) -> ::std::option::Option<&str> {
694        self.copy_source_sse_customer_algorithm.as_deref()
695    }
696    /// <p>Specifies the customer-provided encryption key for Amazon S3 to use to decrypt the source object. The encryption key provided in this header must be the same one that was used when the source object was created.</p>
697    /// <p>If the source object for the copy is stored in Amazon S3 using SSE-C, you must provide the necessary encryption information in your request so that Amazon S3 can decrypt the object for copying.</p><note>
698    /// <p>This functionality is not supported when the source object is in a directory bucket.</p>
699    /// </note>
700    pub fn copy_source_sse_customer_key(&self) -> ::std::option::Option<&str> {
701        self.copy_source_sse_customer_key.as_deref()
702    }
703    /// <p>Specifies the 128-bit MD5 digest of the encryption key according to RFC 1321. Amazon S3 uses this header for a message integrity check to ensure that the encryption key was transmitted without error.</p>
704    /// <p>If the source object for the copy is stored in Amazon S3 using SSE-C, you must provide the necessary encryption information in your request so that Amazon S3 can decrypt the object for copying.</p><note>
705    /// <p>This functionality is not supported when the source object is in a directory bucket.</p>
706    /// </note>
707    pub fn copy_source_sse_customer_key_md5(&self) -> ::std::option::Option<&str> {
708        self.copy_source_sse_customer_key_md5.as_deref()
709    }
710    /// <p>Confirms that the requester knows that they will be charged for the request. Bucket owners need not specify this parameter in their requests. If either the source or destination S3 bucket has Requester Pays enabled, the requester will pay for the corresponding charges. For information about downloading objects from Requester Pays buckets, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/ObjectsinRequesterPaysBuckets.html">Downloading Objects in Requester Pays Buckets</a> in the <i>Amazon S3 User Guide</i>.</p><note>
711    /// <p>This functionality is not supported for directory buckets.</p>
712    /// </note>
713    pub fn request_payer(&self) -> ::std::option::Option<&crate::types::RequestPayer> {
714        self.request_payer.as_ref()
715    }
716    /// <p>The tag-set for the object copy in the destination bucket. This value must be used in conjunction with the <code>x-amz-tagging-directive</code> if you choose <code>REPLACE</code> for the <code>x-amz-tagging-directive</code>. If you choose <code>COPY</code> for the <code>x-amz-tagging-directive</code>, you don't need to set the <code>x-amz-tagging</code> header, because the tag-set will be copied from the source object directly. The tag-set must be encoded as URL Query parameters.</p>
717    /// <p>The default value is the empty value.</p><note>
718    /// <p><b>Directory buckets</b> - For directory buckets in a <code>CopyObject</code> operation, only the empty tag-set is supported. Any requests that attempt to write non-empty tags into directory buckets will receive a <code>501 Not Implemented</code> status code. When the destination bucket is a directory bucket, you will receive a <code>501 Not Implemented</code> response in any of the following situations:</p>
719    /// <ul>
720    /// <li>
721    /// <p>When you attempt to <code>COPY</code> the tag-set from an S3 source object that has non-empty tags.</p></li>
722    /// <li>
723    /// <p>When you attempt to <code>REPLACE</code> the tag-set of a source object and set a non-empty value to <code>x-amz-tagging</code>.</p></li>
724    /// <li>
725    /// <p>When you don't set the <code>x-amz-tagging-directive</code> header and the source object has non-empty tags. This is because the default value of <code>x-amz-tagging-directive</code> is <code>COPY</code>.</p></li>
726    /// </ul>
727    /// <p>Because only the empty tag-set is supported for directory buckets in a <code>CopyObject</code> operation, the following situations are allowed:</p>
728    /// <ul>
729    /// <li>
730    /// <p>When you attempt to <code>COPY</code> the tag-set from a directory bucket source object that has no tags to a general purpose bucket. It copies an empty tag-set to the destination object.</p></li>
731    /// <li>
732    /// <p>When you attempt to <code>REPLACE</code> the tag-set of a directory bucket source object and set the <code>x-amz-tagging</code> value of the directory bucket destination object to empty.</p></li>
733    /// <li>
734    /// <p>When you attempt to <code>REPLACE</code> the tag-set of a general purpose bucket source object that has non-empty tags and set the <code>x-amz-tagging</code> value of the directory bucket destination object to empty.</p></li>
735    /// <li>
736    /// <p>When you attempt to <code>REPLACE</code> the tag-set of a directory bucket source object and don't set the <code>x-amz-tagging</code> value of the directory bucket destination object. This is because the default value of <code>x-amz-tagging</code> is the empty value.</p></li>
737    /// </ul>
738    /// </note>
739    pub fn tagging(&self) -> ::std::option::Option<&str> {
740        self.tagging.as_deref()
741    }
742    /// <p>The Object Lock mode that you want to apply to the object copy.</p><note>
743    /// <p>This functionality is not supported for directory buckets.</p>
744    /// </note>
745    pub fn object_lock_mode(&self) -> ::std::option::Option<&crate::types::ObjectLockMode> {
746        self.object_lock_mode.as_ref()
747    }
748    /// <p>The date and time when you want the Object Lock of the object copy to expire.</p><note>
749    /// <p>This functionality is not supported for directory buckets.</p>
750    /// </note>
751    pub fn object_lock_retain_until_date(&self) -> ::std::option::Option<&::aws_smithy_types::DateTime> {
752        self.object_lock_retain_until_date.as_ref()
753    }
754    /// <p>Specifies whether you want to apply a legal hold to the object copy.</p><note>
755    /// <p>This functionality is not supported for directory buckets.</p>
756    /// </note>
757    pub fn object_lock_legal_hold_status(&self) -> ::std::option::Option<&crate::types::ObjectLockLegalHoldStatus> {
758        self.object_lock_legal_hold_status.as_ref()
759    }
760    /// <p>The event hold status to apply to the object copy. Set to <code>ON</code> to enable or <code>OFF</code> to disable.</p><note>
761    /// <p>This functionality is not supported for directory buckets.</p>
762    /// </note>
763    pub fn object_lock_event_hold(&self) -> ::std::option::Option<&crate::types::ObjectLockEventHold> {
764        self.object_lock_event_hold.as_ref()
765    }
766    /// <p>The event hold duration in days to apply to the object copy. You cannot specify a duration in both days and years.</p><note>
767    /// <p>This functionality is not supported for directory buckets.</p>
768    /// </note>
769    pub fn object_lock_event_hold_duration_days(&self) -> ::std::option::Option<i32> {
770        self.object_lock_event_hold_duration_days
771    }
772    /// <p>The event hold duration in years to apply to the object copy. You cannot specify a duration in both days and years.</p><note>
773    /// <p>This functionality is not supported for directory buckets.</p>
774    /// </note>
775    pub fn object_lock_event_hold_duration_years(&self) -> ::std::option::Option<i32> {
776        self.object_lock_event_hold_duration_years
777    }
778    /// <p>The account ID of the expected destination bucket owner. If the account ID that you provide does not match the actual owner of the destination bucket, the request fails with the HTTP status code <code>403 Forbidden</code> (access denied).</p>
779    pub fn expected_bucket_owner(&self) -> ::std::option::Option<&str> {
780        self.expected_bucket_owner.as_deref()
781    }
782    /// <p>The account ID of the expected source bucket owner. If the account ID that you provide does not match the actual owner of the source bucket, the request fails with the HTTP status code <code>403 Forbidden</code> (access denied).</p>
783    pub fn expected_source_bucket_owner(&self) -> ::std::option::Option<&str> {
784        self.expected_source_bucket_owner.as_deref()
785    }
786}
787impl ::std::fmt::Debug for CopyObjectInput {
788    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
789        let mut formatter = f.debug_struct("CopyObjectInput");
790        formatter.field("acl", &self.acl);
791        formatter.field("bucket", &self.bucket);
792        formatter.field("cache_control", &self.cache_control);
793        formatter.field("checksum_algorithm", &self.checksum_algorithm);
794        formatter.field("content_disposition", &self.content_disposition);
795        formatter.field("content_encoding", &self.content_encoding);
796        formatter.field("content_language", &self.content_language);
797        formatter.field("content_type", &self.content_type);
798        formatter.field("copy_source", &self.copy_source);
799        formatter.field("copy_source_if_match", &self.copy_source_if_match);
800        formatter.field("copy_source_if_modified_since", &self.copy_source_if_modified_since);
801        formatter.field("copy_source_if_none_match", &self.copy_source_if_none_match);
802        formatter.field("copy_source_if_unmodified_since", &self.copy_source_if_unmodified_since);
803        formatter.field("expires", &self.expires);
804        formatter.field("grant_full_control", &self.grant_full_control);
805        formatter.field("grant_read", &self.grant_read);
806        formatter.field("grant_read_acp", &self.grant_read_acp);
807        formatter.field("grant_write_acp", &self.grant_write_acp);
808        formatter.field("if_match", &self.if_match);
809        formatter.field("if_none_match", &self.if_none_match);
810        formatter.field("key", &self.key);
811        formatter.field("metadata", &self.metadata);
812        formatter.field("metadata_directive", &self.metadata_directive);
813        formatter.field("tagging_directive", &self.tagging_directive);
814        formatter.field("annotation_directive", &self.annotation_directive);
815        formatter.field("server_side_encryption", &self.server_side_encryption);
816        formatter.field("storage_class", &self.storage_class);
817        formatter.field("website_redirect_location", &self.website_redirect_location);
818        formatter.field("sse_customer_algorithm", &self.sse_customer_algorithm);
819        formatter.field("sse_customer_key", &"*** Sensitive Data Redacted ***");
820        formatter.field("sse_customer_key_md5", &self.sse_customer_key_md5);
821        formatter.field("ssekms_key_id", &"*** Sensitive Data Redacted ***");
822        formatter.field("ssekms_encryption_context", &"*** Sensitive Data Redacted ***");
823        formatter.field("bucket_key_enabled", &self.bucket_key_enabled);
824        formatter.field("copy_source_sse_customer_algorithm", &self.copy_source_sse_customer_algorithm);
825        formatter.field("copy_source_sse_customer_key", &"*** Sensitive Data Redacted ***");
826        formatter.field("copy_source_sse_customer_key_md5", &self.copy_source_sse_customer_key_md5);
827        formatter.field("request_payer", &self.request_payer);
828        formatter.field("tagging", &self.tagging);
829        formatter.field("object_lock_mode", &self.object_lock_mode);
830        formatter.field("object_lock_retain_until_date", &self.object_lock_retain_until_date);
831        formatter.field("object_lock_legal_hold_status", &self.object_lock_legal_hold_status);
832        formatter.field("object_lock_event_hold", &self.object_lock_event_hold);
833        formatter.field("object_lock_event_hold_duration_days", &self.object_lock_event_hold_duration_days);
834        formatter.field("object_lock_event_hold_duration_years", &self.object_lock_event_hold_duration_years);
835        formatter.field("expected_bucket_owner", &self.expected_bucket_owner);
836        formatter.field("expected_source_bucket_owner", &self.expected_source_bucket_owner);
837        formatter.finish()
838    }
839}
840impl CopyObjectInput {
841    /// Creates a new builder-style object to manufacture [`CopyObjectInput`](crate::operation::copy_object::CopyObjectInput).
842    pub fn builder() -> crate::operation::copy_object::builders::CopyObjectInputBuilder {
843        crate::operation::copy_object::builders::CopyObjectInputBuilder::default()
844    }
845}
846
847/// A builder for [`CopyObjectInput`](crate::operation::copy_object::CopyObjectInput).
848#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default)]
849#[non_exhaustive]
850pub struct CopyObjectInputBuilder {
851    pub(crate) acl: ::std::option::Option<crate::types::ObjectCannedAcl>,
852    pub(crate) bucket: ::std::option::Option<::std::string::String>,
853    pub(crate) cache_control: ::std::option::Option<::std::string::String>,
854    pub(crate) checksum_algorithm: ::std::option::Option<crate::types::ChecksumAlgorithm>,
855    pub(crate) content_disposition: ::std::option::Option<::std::string::String>,
856    pub(crate) content_encoding: ::std::option::Option<::std::string::String>,
857    pub(crate) content_language: ::std::option::Option<::std::string::String>,
858    pub(crate) content_type: ::std::option::Option<::std::string::String>,
859    pub(crate) copy_source: ::std::option::Option<::std::string::String>,
860    pub(crate) copy_source_if_match: ::std::option::Option<::std::string::String>,
861    pub(crate) copy_source_if_modified_since: ::std::option::Option<::aws_smithy_types::DateTime>,
862    pub(crate) copy_source_if_none_match: ::std::option::Option<::std::string::String>,
863    pub(crate) copy_source_if_unmodified_since: ::std::option::Option<::aws_smithy_types::DateTime>,
864    pub(crate) expires: ::std::option::Option<::aws_smithy_types::DateTime>,
865    pub(crate) grant_full_control: ::std::option::Option<::std::string::String>,
866    pub(crate) grant_read: ::std::option::Option<::std::string::String>,
867    pub(crate) grant_read_acp: ::std::option::Option<::std::string::String>,
868    pub(crate) grant_write_acp: ::std::option::Option<::std::string::String>,
869    pub(crate) if_match: ::std::option::Option<::std::string::String>,
870    pub(crate) if_none_match: ::std::option::Option<::std::string::String>,
871    pub(crate) key: ::std::option::Option<::std::string::String>,
872    pub(crate) metadata: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>,
873    pub(crate) metadata_directive: ::std::option::Option<crate::types::MetadataDirective>,
874    pub(crate) tagging_directive: ::std::option::Option<crate::types::TaggingDirective>,
875    pub(crate) annotation_directive: ::std::option::Option<crate::types::AnnotationDirective>,
876    pub(crate) server_side_encryption: ::std::option::Option<crate::types::ServerSideEncryption>,
877    pub(crate) storage_class: ::std::option::Option<crate::types::StorageClass>,
878    pub(crate) website_redirect_location: ::std::option::Option<::std::string::String>,
879    pub(crate) sse_customer_algorithm: ::std::option::Option<::std::string::String>,
880    pub(crate) sse_customer_key: ::std::option::Option<::std::string::String>,
881    pub(crate) sse_customer_key_md5: ::std::option::Option<::std::string::String>,
882    pub(crate) ssekms_key_id: ::std::option::Option<::std::string::String>,
883    pub(crate) ssekms_encryption_context: ::std::option::Option<::std::string::String>,
884    pub(crate) bucket_key_enabled: ::std::option::Option<bool>,
885    pub(crate) copy_source_sse_customer_algorithm: ::std::option::Option<::std::string::String>,
886    pub(crate) copy_source_sse_customer_key: ::std::option::Option<::std::string::String>,
887    pub(crate) copy_source_sse_customer_key_md5: ::std::option::Option<::std::string::String>,
888    pub(crate) request_payer: ::std::option::Option<crate::types::RequestPayer>,
889    pub(crate) tagging: ::std::option::Option<::std::string::String>,
890    pub(crate) object_lock_mode: ::std::option::Option<crate::types::ObjectLockMode>,
891    pub(crate) object_lock_retain_until_date: ::std::option::Option<::aws_smithy_types::DateTime>,
892    pub(crate) object_lock_legal_hold_status: ::std::option::Option<crate::types::ObjectLockLegalHoldStatus>,
893    pub(crate) object_lock_event_hold: ::std::option::Option<crate::types::ObjectLockEventHold>,
894    pub(crate) object_lock_event_hold_duration_days: ::std::option::Option<i32>,
895    pub(crate) object_lock_event_hold_duration_years: ::std::option::Option<i32>,
896    pub(crate) expected_bucket_owner: ::std::option::Option<::std::string::String>,
897    pub(crate) expected_source_bucket_owner: ::std::option::Option<::std::string::String>,
898}
899impl CopyObjectInputBuilder {
900    /// <p>The canned access control list (ACL) to apply to the object.</p>
901    /// <p>When you copy an object, the ACL metadata is not preserved and is set to <code>private</code> by default. Only the owner has full access control. To override the default ACL setting, specify a new ACL when you generate a copy request. For more information, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/S3_ACLs_UsingACLs.html">Using ACLs</a>.</p>
902    /// <p>If the destination bucket that you're copying objects to uses the bucket owner enforced setting for S3 Object Ownership, ACLs are disabled and no longer affect permissions. Buckets that use this setting only accept <code>PUT</code> requests that don't specify an ACL or <code>PUT</code> requests that specify bucket owner full control ACLs, such as the <code>bucket-owner-full-control</code> canned ACL or an equivalent form of this ACL expressed in the XML format. For more information, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/about-object-ownership.html">Controlling ownership of objects and disabling ACLs</a> in the <i>Amazon S3 User Guide</i>.</p><note>
903    /// <ul>
904    /// <li>
905    /// <p>If your destination bucket uses the bucket owner enforced setting for Object Ownership, all objects written to the bucket by any account will be owned by the bucket owner.</p></li>
906    /// <li>
907    /// <p>This functionality is not supported for directory buckets.</p></li>
908    /// <li>
909    /// <p>This functionality is not supported for Amazon S3 on Outposts.</p></li>
910    /// </ul>
911    /// </note>
912    pub fn acl(mut self, input: crate::types::ObjectCannedAcl) -> Self {
913        self.acl = ::std::option::Option::Some(input);
914        self
915    }
916    /// <p>The canned access control list (ACL) to apply to the object.</p>
917    /// <p>When you copy an object, the ACL metadata is not preserved and is set to <code>private</code> by default. Only the owner has full access control. To override the default ACL setting, specify a new ACL when you generate a copy request. For more information, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/S3_ACLs_UsingACLs.html">Using ACLs</a>.</p>
918    /// <p>If the destination bucket that you're copying objects to uses the bucket owner enforced setting for S3 Object Ownership, ACLs are disabled and no longer affect permissions. Buckets that use this setting only accept <code>PUT</code> requests that don't specify an ACL or <code>PUT</code> requests that specify bucket owner full control ACLs, such as the <code>bucket-owner-full-control</code> canned ACL or an equivalent form of this ACL expressed in the XML format. For more information, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/about-object-ownership.html">Controlling ownership of objects and disabling ACLs</a> in the <i>Amazon S3 User Guide</i>.</p><note>
919    /// <ul>
920    /// <li>
921    /// <p>If your destination bucket uses the bucket owner enforced setting for Object Ownership, all objects written to the bucket by any account will be owned by the bucket owner.</p></li>
922    /// <li>
923    /// <p>This functionality is not supported for directory buckets.</p></li>
924    /// <li>
925    /// <p>This functionality is not supported for Amazon S3 on Outposts.</p></li>
926    /// </ul>
927    /// </note>
928    pub fn set_acl(mut self, input: ::std::option::Option<crate::types::ObjectCannedAcl>) -> Self {
929        self.acl = input;
930        self
931    }
932    /// <p>The canned access control list (ACL) to apply to the object.</p>
933    /// <p>When you copy an object, the ACL metadata is not preserved and is set to <code>private</code> by default. Only the owner has full access control. To override the default ACL setting, specify a new ACL when you generate a copy request. For more information, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/S3_ACLs_UsingACLs.html">Using ACLs</a>.</p>
934    /// <p>If the destination bucket that you're copying objects to uses the bucket owner enforced setting for S3 Object Ownership, ACLs are disabled and no longer affect permissions. Buckets that use this setting only accept <code>PUT</code> requests that don't specify an ACL or <code>PUT</code> requests that specify bucket owner full control ACLs, such as the <code>bucket-owner-full-control</code> canned ACL or an equivalent form of this ACL expressed in the XML format. For more information, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/about-object-ownership.html">Controlling ownership of objects and disabling ACLs</a> in the <i>Amazon S3 User Guide</i>.</p><note>
935    /// <ul>
936    /// <li>
937    /// <p>If your destination bucket uses the bucket owner enforced setting for Object Ownership, all objects written to the bucket by any account will be owned by the bucket owner.</p></li>
938    /// <li>
939    /// <p>This functionality is not supported for directory buckets.</p></li>
940    /// <li>
941    /// <p>This functionality is not supported for Amazon S3 on Outposts.</p></li>
942    /// </ul>
943    /// </note>
944    pub fn get_acl(&self) -> &::std::option::Option<crate::types::ObjectCannedAcl> {
945        &self.acl
946    }
947    /// <p>The name of the destination bucket.</p>
948    /// <p><b>Directory buckets</b> - When you use this operation with a directory bucket, you must use virtual-hosted-style requests in the format <code> <i>Bucket-name</i>.s3express-<i>zone-id</i>.<i>region-code</i>.amazonaws.com</code>. Path-style requests are not supported. Directory bucket names must be unique in the chosen Zone (Availability Zone or Local Zone). Bucket names must follow the format <code> <i>bucket-base-name</i>--<i>zone-id</i>--x-s3</code> (for example, <code> <i>amzn-s3-demo-bucket</i>--<i>usw2-az1</i>--x-s3</code>). For information about bucket naming restrictions, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/directory-bucket-naming-rules.html">Directory bucket naming rules</a> in the <i>Amazon S3 User Guide</i>.</p><note>
949    /// <p>Copying objects across different Amazon Web Services Regions isn't supported when the source or destination bucket is in Amazon Web Services Local Zones. The source and destination buckets must have the same parent Amazon Web Services Region. Otherwise, you get an HTTP <code>400 Bad Request</code> error with the error code <code>InvalidRequest</code>.</p>
950    /// </note>
951    /// <p><b>Access points</b> - When you use this action with an access point for general purpose buckets, you must provide the alias of the access point in place of the bucket name or specify the access point ARN. When you use this action with an access point for directory buckets, you must provide the access point name in place of the bucket name. When using the access point ARN, you must direct requests to the access point hostname. The access point hostname takes the form <i>AccessPointName</i>-<i>AccountId</i>.s3-accesspoint.<i>Region</i>.amazonaws.com. When using this action with an access point through the Amazon Web Services SDKs, you provide the access point ARN in place of the bucket name. For more information about access point ARNs, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/using-access-points.html">Using access points</a> in the <i>Amazon S3 User Guide</i>.</p><note>
952    /// <p>Object Lambda access points are not supported by directory buckets.</p>
953    /// </note>
954    /// <p><b>S3 on Outposts</b> - When you use this action with S3 on Outposts, you must use the Outpost bucket access point ARN or the access point alias for the destination bucket. You can only copy objects within the same Outpost bucket. It's not supported to copy objects across different Amazon Web Services Outposts, between buckets on the same Outposts, or between Outposts buckets and any other bucket types. For more information about S3 on Outposts, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/S3onOutposts.html">What is S3 on Outposts?</a> in the <i>S3 on Outposts guide</i>. When you use this action with S3 on Outposts through the REST API, you must direct requests to the S3 on Outposts hostname, in the format <code> <i>AccessPointName</i>-<i>AccountId</i>.<i>outpostID</i>.s3-outposts.<i>Region</i>.amazonaws.com</code>. The hostname isn't required when you use the Amazon Web Services CLI or SDKs.</p>
955    /// This field is required.
956    pub fn bucket(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
957        self.bucket = ::std::option::Option::Some(input.into());
958        self
959    }
960    /// <p>The name of the destination bucket.</p>
961    /// <p><b>Directory buckets</b> - When you use this operation with a directory bucket, you must use virtual-hosted-style requests in the format <code> <i>Bucket-name</i>.s3express-<i>zone-id</i>.<i>region-code</i>.amazonaws.com</code>. Path-style requests are not supported. Directory bucket names must be unique in the chosen Zone (Availability Zone or Local Zone). Bucket names must follow the format <code> <i>bucket-base-name</i>--<i>zone-id</i>--x-s3</code> (for example, <code> <i>amzn-s3-demo-bucket</i>--<i>usw2-az1</i>--x-s3</code>). For information about bucket naming restrictions, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/directory-bucket-naming-rules.html">Directory bucket naming rules</a> in the <i>Amazon S3 User Guide</i>.</p><note>
962    /// <p>Copying objects across different Amazon Web Services Regions isn't supported when the source or destination bucket is in Amazon Web Services Local Zones. The source and destination buckets must have the same parent Amazon Web Services Region. Otherwise, you get an HTTP <code>400 Bad Request</code> error with the error code <code>InvalidRequest</code>.</p>
963    /// </note>
964    /// <p><b>Access points</b> - When you use this action with an access point for general purpose buckets, you must provide the alias of the access point in place of the bucket name or specify the access point ARN. When you use this action with an access point for directory buckets, you must provide the access point name in place of the bucket name. When using the access point ARN, you must direct requests to the access point hostname. The access point hostname takes the form <i>AccessPointName</i>-<i>AccountId</i>.s3-accesspoint.<i>Region</i>.amazonaws.com. When using this action with an access point through the Amazon Web Services SDKs, you provide the access point ARN in place of the bucket name. For more information about access point ARNs, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/using-access-points.html">Using access points</a> in the <i>Amazon S3 User Guide</i>.</p><note>
965    /// <p>Object Lambda access points are not supported by directory buckets.</p>
966    /// </note>
967    /// <p><b>S3 on Outposts</b> - When you use this action with S3 on Outposts, you must use the Outpost bucket access point ARN or the access point alias for the destination bucket. You can only copy objects within the same Outpost bucket. It's not supported to copy objects across different Amazon Web Services Outposts, between buckets on the same Outposts, or between Outposts buckets and any other bucket types. For more information about S3 on Outposts, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/S3onOutposts.html">What is S3 on Outposts?</a> in the <i>S3 on Outposts guide</i>. When you use this action with S3 on Outposts through the REST API, you must direct requests to the S3 on Outposts hostname, in the format <code> <i>AccessPointName</i>-<i>AccountId</i>.<i>outpostID</i>.s3-outposts.<i>Region</i>.amazonaws.com</code>. The hostname isn't required when you use the Amazon Web Services CLI or SDKs.</p>
968    pub fn set_bucket(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
969        self.bucket = input;
970        self
971    }
972    /// <p>The name of the destination bucket.</p>
973    /// <p><b>Directory buckets</b> - When you use this operation with a directory bucket, you must use virtual-hosted-style requests in the format <code> <i>Bucket-name</i>.s3express-<i>zone-id</i>.<i>region-code</i>.amazonaws.com</code>. Path-style requests are not supported. Directory bucket names must be unique in the chosen Zone (Availability Zone or Local Zone). Bucket names must follow the format <code> <i>bucket-base-name</i>--<i>zone-id</i>--x-s3</code> (for example, <code> <i>amzn-s3-demo-bucket</i>--<i>usw2-az1</i>--x-s3</code>). For information about bucket naming restrictions, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/directory-bucket-naming-rules.html">Directory bucket naming rules</a> in the <i>Amazon S3 User Guide</i>.</p><note>
974    /// <p>Copying objects across different Amazon Web Services Regions isn't supported when the source or destination bucket is in Amazon Web Services Local Zones. The source and destination buckets must have the same parent Amazon Web Services Region. Otherwise, you get an HTTP <code>400 Bad Request</code> error with the error code <code>InvalidRequest</code>.</p>
975    /// </note>
976    /// <p><b>Access points</b> - When you use this action with an access point for general purpose buckets, you must provide the alias of the access point in place of the bucket name or specify the access point ARN. When you use this action with an access point for directory buckets, you must provide the access point name in place of the bucket name. When using the access point ARN, you must direct requests to the access point hostname. The access point hostname takes the form <i>AccessPointName</i>-<i>AccountId</i>.s3-accesspoint.<i>Region</i>.amazonaws.com. When using this action with an access point through the Amazon Web Services SDKs, you provide the access point ARN in place of the bucket name. For more information about access point ARNs, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/using-access-points.html">Using access points</a> in the <i>Amazon S3 User Guide</i>.</p><note>
977    /// <p>Object Lambda access points are not supported by directory buckets.</p>
978    /// </note>
979    /// <p><b>S3 on Outposts</b> - When you use this action with S3 on Outposts, you must use the Outpost bucket access point ARN or the access point alias for the destination bucket. You can only copy objects within the same Outpost bucket. It's not supported to copy objects across different Amazon Web Services Outposts, between buckets on the same Outposts, or between Outposts buckets and any other bucket types. For more information about S3 on Outposts, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/S3onOutposts.html">What is S3 on Outposts?</a> in the <i>S3 on Outposts guide</i>. When you use this action with S3 on Outposts through the REST API, you must direct requests to the S3 on Outposts hostname, in the format <code> <i>AccessPointName</i>-<i>AccountId</i>.<i>outpostID</i>.s3-outposts.<i>Region</i>.amazonaws.com</code>. The hostname isn't required when you use the Amazon Web Services CLI or SDKs.</p>
980    pub fn get_bucket(&self) -> &::std::option::Option<::std::string::String> {
981        &self.bucket
982    }
983    /// <p>Specifies the caching behavior along the request/reply chain.</p>
984    pub fn cache_control(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
985        self.cache_control = ::std::option::Option::Some(input.into());
986        self
987    }
988    /// <p>Specifies the caching behavior along the request/reply chain.</p>
989    pub fn set_cache_control(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
990        self.cache_control = input;
991        self
992    }
993    /// <p>Specifies the caching behavior along the request/reply chain.</p>
994    pub fn get_cache_control(&self) -> &::std::option::Option<::std::string::String> {
995        &self.cache_control
996    }
997    /// <p>Indicates the algorithm that you want Amazon S3 to use to create the checksum for the object. For more information, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html">Checking object integrity</a> in the <i>Amazon S3 User Guide</i>.</p>
998    /// <p>When you copy an object, if the source object has a checksum, that checksum value will be copied to the new object by default. If the <code>CopyObject</code> request does not include this <code>x-amz-checksum-algorithm</code> header, the checksum algorithm will be copied from the source object to the destination object (if it's present on the source object). You can optionally specify a different checksum algorithm to use with the <code>x-amz-checksum-algorithm</code> header. Unrecognized or unsupported values will respond with the HTTP status code <code>400 Bad Request</code>.</p><note>
999    /// <p>For directory buckets, when you use Amazon Web Services SDKs, <code>CRC32</code> is the default checksum algorithm that's used for performance.</p>
1000    /// </note>
1001    pub fn checksum_algorithm(mut self, input: crate::types::ChecksumAlgorithm) -> Self {
1002        self.checksum_algorithm = ::std::option::Option::Some(input);
1003        self
1004    }
1005    /// <p>Indicates the algorithm that you want Amazon S3 to use to create the checksum for the object. For more information, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html">Checking object integrity</a> in the <i>Amazon S3 User Guide</i>.</p>
1006    /// <p>When you copy an object, if the source object has a checksum, that checksum value will be copied to the new object by default. If the <code>CopyObject</code> request does not include this <code>x-amz-checksum-algorithm</code> header, the checksum algorithm will be copied from the source object to the destination object (if it's present on the source object). You can optionally specify a different checksum algorithm to use with the <code>x-amz-checksum-algorithm</code> header. Unrecognized or unsupported values will respond with the HTTP status code <code>400 Bad Request</code>.</p><note>
1007    /// <p>For directory buckets, when you use Amazon Web Services SDKs, <code>CRC32</code> is the default checksum algorithm that's used for performance.</p>
1008    /// </note>
1009    pub fn set_checksum_algorithm(mut self, input: ::std::option::Option<crate::types::ChecksumAlgorithm>) -> Self {
1010        self.checksum_algorithm = input;
1011        self
1012    }
1013    /// <p>Indicates the algorithm that you want Amazon S3 to use to create the checksum for the object. For more information, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html">Checking object integrity</a> in the <i>Amazon S3 User Guide</i>.</p>
1014    /// <p>When you copy an object, if the source object has a checksum, that checksum value will be copied to the new object by default. If the <code>CopyObject</code> request does not include this <code>x-amz-checksum-algorithm</code> header, the checksum algorithm will be copied from the source object to the destination object (if it's present on the source object). You can optionally specify a different checksum algorithm to use with the <code>x-amz-checksum-algorithm</code> header. Unrecognized or unsupported values will respond with the HTTP status code <code>400 Bad Request</code>.</p><note>
1015    /// <p>For directory buckets, when you use Amazon Web Services SDKs, <code>CRC32</code> is the default checksum algorithm that's used for performance.</p>
1016    /// </note>
1017    pub fn get_checksum_algorithm(&self) -> &::std::option::Option<crate::types::ChecksumAlgorithm> {
1018        &self.checksum_algorithm
1019    }
1020    /// <p>Specifies presentational information for the object. Indicates whether an object should be displayed in a web browser or downloaded as a file. It allows specifying the desired filename for the downloaded file.</p>
1021    pub fn content_disposition(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
1022        self.content_disposition = ::std::option::Option::Some(input.into());
1023        self
1024    }
1025    /// <p>Specifies presentational information for the object. Indicates whether an object should be displayed in a web browser or downloaded as a file. It allows specifying the desired filename for the downloaded file.</p>
1026    pub fn set_content_disposition(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
1027        self.content_disposition = input;
1028        self
1029    }
1030    /// <p>Specifies presentational information for the object. Indicates whether an object should be displayed in a web browser or downloaded as a file. It allows specifying the desired filename for the downloaded file.</p>
1031    pub fn get_content_disposition(&self) -> &::std::option::Option<::std::string::String> {
1032        &self.content_disposition
1033    }
1034    /// <p>Specifies what content encodings have been applied to the object and thus what decoding mechanisms must be applied to obtain the media-type referenced by the Content-Type header field.</p><note>
1035    /// <p>For directory buckets, only the <code>aws-chunked</code> value is supported in this header field.</p>
1036    /// </note>
1037    pub fn content_encoding(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
1038        self.content_encoding = ::std::option::Option::Some(input.into());
1039        self
1040    }
1041    /// <p>Specifies what content encodings have been applied to the object and thus what decoding mechanisms must be applied to obtain the media-type referenced by the Content-Type header field.</p><note>
1042    /// <p>For directory buckets, only the <code>aws-chunked</code> value is supported in this header field.</p>
1043    /// </note>
1044    pub fn set_content_encoding(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
1045        self.content_encoding = input;
1046        self
1047    }
1048    /// <p>Specifies what content encodings have been applied to the object and thus what decoding mechanisms must be applied to obtain the media-type referenced by the Content-Type header field.</p><note>
1049    /// <p>For directory buckets, only the <code>aws-chunked</code> value is supported in this header field.</p>
1050    /// </note>
1051    pub fn get_content_encoding(&self) -> &::std::option::Option<::std::string::String> {
1052        &self.content_encoding
1053    }
1054    /// <p>The language the content is in.</p>
1055    pub fn content_language(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
1056        self.content_language = ::std::option::Option::Some(input.into());
1057        self
1058    }
1059    /// <p>The language the content is in.</p>
1060    pub fn set_content_language(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
1061        self.content_language = input;
1062        self
1063    }
1064    /// <p>The language the content is in.</p>
1065    pub fn get_content_language(&self) -> &::std::option::Option<::std::string::String> {
1066        &self.content_language
1067    }
1068    /// <p>A standard MIME type that describes the format of the object data.</p>
1069    pub fn content_type(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
1070        self.content_type = ::std::option::Option::Some(input.into());
1071        self
1072    }
1073    /// <p>A standard MIME type that describes the format of the object data.</p>
1074    pub fn set_content_type(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
1075        self.content_type = input;
1076        self
1077    }
1078    /// <p>A standard MIME type that describes the format of the object data.</p>
1079    pub fn get_content_type(&self) -> &::std::option::Option<::std::string::String> {
1080        &self.content_type
1081    }
1082    /// <p>Specifies the source object for the copy operation. The source object can be up to 5 GB. If the source object is an object that was uploaded by using a multipart upload, the object copy will be a single part object after the source object is copied to the destination bucket.</p>
1083    /// <p>You specify the value of the copy source in one of two formats, depending on whether you want to access the source object through an <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/access-points.html">access point</a>:</p>
1084    /// <ul>
1085    /// <li>
1086    /// <p>For objects not accessed through an access point, specify the name of the source bucket and the key of the source object, separated by a slash (/). For example, to copy the object <code>reports/january.pdf</code> from the general purpose bucket <code>awsexamplebucket</code>, use <code>awsexamplebucket/reports/january.pdf</code>. The value must be URL-encoded. To copy the object <code>reports/january.pdf</code> from the directory bucket <code>awsexamplebucket--use1-az5--x-s3</code>, use <code>awsexamplebucket--use1-az5--x-s3/reports/january.pdf</code>. The value must be URL-encoded.</p></li>
1087    /// <li>
1088    /// <p>For objects accessed through access points, specify the Amazon Resource Name (ARN) of the object as accessed through the access point, in the format <code>arn:aws:s3:<region>
1089    /// :
1090    /// <account-id>
1091    /// :accesspoint/
1092    /// <access-point-name>
1093    /// /object/
1094    /// <key></key>
1095    /// </access-point-name>
1096    /// </account-id>
1097    /// </region></code>. For example, to copy the object <code>reports/january.pdf</code> through access point <code>my-access-point</code> owned by account <code>123456789012</code> in Region <code>us-west-2</code>, use the URL encoding of <code>arn:aws:s3:us-west-2:123456789012:accesspoint/my-access-point/object/reports/january.pdf</code>. The value must be URL encoded.</p><note>
1098    /// <ul>
1099    /// <li>
1100    /// <p>Amazon S3 supports copy operations using Access points only when the source and destination buckets are in the same Amazon Web Services Region.</p></li>
1101    /// <li>
1102    /// <p>Access points are not supported by directory buckets.</p></li>
1103    /// </ul>
1104    /// </note>
1105    /// <p>Alternatively, for objects accessed through Amazon S3 on Outposts, specify the ARN of the object as accessed in the format <code>arn:aws:s3-outposts:<region>
1106    /// :
1107    /// <account-id>
1108    /// :outpost/
1109    /// <outpost-id>
1110    /// /object/
1111    /// <key></key>
1112    /// </outpost-id>
1113    /// </account-id>
1114    /// </region></code>. For example, to copy the object <code>reports/january.pdf</code> through outpost <code>my-outpost</code> owned by account <code>123456789012</code> in Region <code>us-west-2</code>, use the URL encoding of <code>arn:aws:s3-outposts:us-west-2:123456789012:outpost/my-outpost/object/reports/january.pdf</code>. The value must be URL-encoded.</p></li>
1115    /// </ul>
1116    /// <p>If your source bucket versioning is enabled, the <code>x-amz-copy-source</code> header by default identifies the current version of an object to copy. If the current version is a delete marker, Amazon S3 behaves as if the object was deleted. To copy a different version, use the <code>versionId</code> query parameter. Specifically, append <code>?versionId=<version-id></version-id></code> to the value (for example, <code>awsexamplebucket/reports/january.pdf?versionId=QUpfdndhfd8438MNFDN93jdnJFkdmqnh893</code>). If you don't specify a version ID, Amazon S3 copies the latest version of the source object.</p>
1117    /// <p>If you enable versioning on the destination bucket, Amazon S3 generates a unique version ID for the copied object. This version ID is different from the version ID of the source object. Amazon S3 returns the version ID of the copied object in the <code>x-amz-version-id</code> response header in the response.</p>
1118    /// <p>If you do not enable versioning or suspend it on the destination bucket, the version ID that Amazon S3 generates in the <code>x-amz-version-id</code> response header is always null.</p><note>
1119    /// <p><b>Directory buckets</b> - S3 Versioning isn't enabled and supported for directory buckets.</p>
1120    /// </note>
1121    /// This field is required.
1122    pub fn copy_source(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
1123        self.copy_source = ::std::option::Option::Some(input.into());
1124        self
1125    }
1126    /// <p>Specifies the source object for the copy operation. The source object can be up to 5 GB. If the source object is an object that was uploaded by using a multipart upload, the object copy will be a single part object after the source object is copied to the destination bucket.</p>
1127    /// <p>You specify the value of the copy source in one of two formats, depending on whether you want to access the source object through an <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/access-points.html">access point</a>:</p>
1128    /// <ul>
1129    /// <li>
1130    /// <p>For objects not accessed through an access point, specify the name of the source bucket and the key of the source object, separated by a slash (/). For example, to copy the object <code>reports/january.pdf</code> from the general purpose bucket <code>awsexamplebucket</code>, use <code>awsexamplebucket/reports/january.pdf</code>. The value must be URL-encoded. To copy the object <code>reports/january.pdf</code> from the directory bucket <code>awsexamplebucket--use1-az5--x-s3</code>, use <code>awsexamplebucket--use1-az5--x-s3/reports/january.pdf</code>. The value must be URL-encoded.</p></li>
1131    /// <li>
1132    /// <p>For objects accessed through access points, specify the Amazon Resource Name (ARN) of the object as accessed through the access point, in the format <code>arn:aws:s3:<region>
1133    /// :
1134    /// <account-id>
1135    /// :accesspoint/
1136    /// <access-point-name>
1137    /// /object/
1138    /// <key></key>
1139    /// </access-point-name>
1140    /// </account-id>
1141    /// </region></code>. For example, to copy the object <code>reports/january.pdf</code> through access point <code>my-access-point</code> owned by account <code>123456789012</code> in Region <code>us-west-2</code>, use the URL encoding of <code>arn:aws:s3:us-west-2:123456789012:accesspoint/my-access-point/object/reports/january.pdf</code>. The value must be URL encoded.</p><note>
1142    /// <ul>
1143    /// <li>
1144    /// <p>Amazon S3 supports copy operations using Access points only when the source and destination buckets are in the same Amazon Web Services Region.</p></li>
1145    /// <li>
1146    /// <p>Access points are not supported by directory buckets.</p></li>
1147    /// </ul>
1148    /// </note>
1149    /// <p>Alternatively, for objects accessed through Amazon S3 on Outposts, specify the ARN of the object as accessed in the format <code>arn:aws:s3-outposts:<region>
1150    /// :
1151    /// <account-id>
1152    /// :outpost/
1153    /// <outpost-id>
1154    /// /object/
1155    /// <key></key>
1156    /// </outpost-id>
1157    /// </account-id>
1158    /// </region></code>. For example, to copy the object <code>reports/january.pdf</code> through outpost <code>my-outpost</code> owned by account <code>123456789012</code> in Region <code>us-west-2</code>, use the URL encoding of <code>arn:aws:s3-outposts:us-west-2:123456789012:outpost/my-outpost/object/reports/january.pdf</code>. The value must be URL-encoded.</p></li>
1159    /// </ul>
1160    /// <p>If your source bucket versioning is enabled, the <code>x-amz-copy-source</code> header by default identifies the current version of an object to copy. If the current version is a delete marker, Amazon S3 behaves as if the object was deleted. To copy a different version, use the <code>versionId</code> query parameter. Specifically, append <code>?versionId=<version-id></version-id></code> to the value (for example, <code>awsexamplebucket/reports/january.pdf?versionId=QUpfdndhfd8438MNFDN93jdnJFkdmqnh893</code>). If you don't specify a version ID, Amazon S3 copies the latest version of the source object.</p>
1161    /// <p>If you enable versioning on the destination bucket, Amazon S3 generates a unique version ID for the copied object. This version ID is different from the version ID of the source object. Amazon S3 returns the version ID of the copied object in the <code>x-amz-version-id</code> response header in the response.</p>
1162    /// <p>If you do not enable versioning or suspend it on the destination bucket, the version ID that Amazon S3 generates in the <code>x-amz-version-id</code> response header is always null.</p><note>
1163    /// <p><b>Directory buckets</b> - S3 Versioning isn't enabled and supported for directory buckets.</p>
1164    /// </note>
1165    pub fn set_copy_source(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
1166        self.copy_source = input;
1167        self
1168    }
1169    /// <p>Specifies the source object for the copy operation. The source object can be up to 5 GB. If the source object is an object that was uploaded by using a multipart upload, the object copy will be a single part object after the source object is copied to the destination bucket.</p>
1170    /// <p>You specify the value of the copy source in one of two formats, depending on whether you want to access the source object through an <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/access-points.html">access point</a>:</p>
1171    /// <ul>
1172    /// <li>
1173    /// <p>For objects not accessed through an access point, specify the name of the source bucket and the key of the source object, separated by a slash (/). For example, to copy the object <code>reports/january.pdf</code> from the general purpose bucket <code>awsexamplebucket</code>, use <code>awsexamplebucket/reports/january.pdf</code>. The value must be URL-encoded. To copy the object <code>reports/january.pdf</code> from the directory bucket <code>awsexamplebucket--use1-az5--x-s3</code>, use <code>awsexamplebucket--use1-az5--x-s3/reports/january.pdf</code>. The value must be URL-encoded.</p></li>
1174    /// <li>
1175    /// <p>For objects accessed through access points, specify the Amazon Resource Name (ARN) of the object as accessed through the access point, in the format <code>arn:aws:s3:<region>
1176    /// :
1177    /// <account-id>
1178    /// :accesspoint/
1179    /// <access-point-name>
1180    /// /object/
1181    /// <key></key>
1182    /// </access-point-name>
1183    /// </account-id>
1184    /// </region></code>. For example, to copy the object <code>reports/january.pdf</code> through access point <code>my-access-point</code> owned by account <code>123456789012</code> in Region <code>us-west-2</code>, use the URL encoding of <code>arn:aws:s3:us-west-2:123456789012:accesspoint/my-access-point/object/reports/january.pdf</code>. The value must be URL encoded.</p><note>
1185    /// <ul>
1186    /// <li>
1187    /// <p>Amazon S3 supports copy operations using Access points only when the source and destination buckets are in the same Amazon Web Services Region.</p></li>
1188    /// <li>
1189    /// <p>Access points are not supported by directory buckets.</p></li>
1190    /// </ul>
1191    /// </note>
1192    /// <p>Alternatively, for objects accessed through Amazon S3 on Outposts, specify the ARN of the object as accessed in the format <code>arn:aws:s3-outposts:<region>
1193    /// :
1194    /// <account-id>
1195    /// :outpost/
1196    /// <outpost-id>
1197    /// /object/
1198    /// <key></key>
1199    /// </outpost-id>
1200    /// </account-id>
1201    /// </region></code>. For example, to copy the object <code>reports/january.pdf</code> through outpost <code>my-outpost</code> owned by account <code>123456789012</code> in Region <code>us-west-2</code>, use the URL encoding of <code>arn:aws:s3-outposts:us-west-2:123456789012:outpost/my-outpost/object/reports/january.pdf</code>. The value must be URL-encoded.</p></li>
1202    /// </ul>
1203    /// <p>If your source bucket versioning is enabled, the <code>x-amz-copy-source</code> header by default identifies the current version of an object to copy. If the current version is a delete marker, Amazon S3 behaves as if the object was deleted. To copy a different version, use the <code>versionId</code> query parameter. Specifically, append <code>?versionId=<version-id></version-id></code> to the value (for example, <code>awsexamplebucket/reports/january.pdf?versionId=QUpfdndhfd8438MNFDN93jdnJFkdmqnh893</code>). If you don't specify a version ID, Amazon S3 copies the latest version of the source object.</p>
1204    /// <p>If you enable versioning on the destination bucket, Amazon S3 generates a unique version ID for the copied object. This version ID is different from the version ID of the source object. Amazon S3 returns the version ID of the copied object in the <code>x-amz-version-id</code> response header in the response.</p>
1205    /// <p>If you do not enable versioning or suspend it on the destination bucket, the version ID that Amazon S3 generates in the <code>x-amz-version-id</code> response header is always null.</p><note>
1206    /// <p><b>Directory buckets</b> - S3 Versioning isn't enabled and supported for directory buckets.</p>
1207    /// </note>
1208    pub fn get_copy_source(&self) -> &::std::option::Option<::std::string::String> {
1209        &self.copy_source
1210    }
1211    /// <p>Copies the object if its entity tag (ETag) matches the specified tag.</p>
1212    /// <p>If both the <code>x-amz-copy-source-if-match</code> and <code>x-amz-copy-source-if-unmodified-since</code> headers are present in the request and evaluate as follows, Amazon S3 returns <code>200 OK</code> and copies the data:</p>
1213    /// <ul>
1214    /// <li>
1215    /// <p><code>x-amz-copy-source-if-match</code> condition evaluates to true</p></li>
1216    /// <li>
1217    /// <p><code>x-amz-copy-source-if-unmodified-since</code> condition evaluates to false</p></li>
1218    /// </ul>
1219    pub fn copy_source_if_match(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
1220        self.copy_source_if_match = ::std::option::Option::Some(input.into());
1221        self
1222    }
1223    /// <p>Copies the object if its entity tag (ETag) matches the specified tag.</p>
1224    /// <p>If both the <code>x-amz-copy-source-if-match</code> and <code>x-amz-copy-source-if-unmodified-since</code> headers are present in the request and evaluate as follows, Amazon S3 returns <code>200 OK</code> and copies the data:</p>
1225    /// <ul>
1226    /// <li>
1227    /// <p><code>x-amz-copy-source-if-match</code> condition evaluates to true</p></li>
1228    /// <li>
1229    /// <p><code>x-amz-copy-source-if-unmodified-since</code> condition evaluates to false</p></li>
1230    /// </ul>
1231    pub fn set_copy_source_if_match(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
1232        self.copy_source_if_match = input;
1233        self
1234    }
1235    /// <p>Copies the object if its entity tag (ETag) matches the specified tag.</p>
1236    /// <p>If both the <code>x-amz-copy-source-if-match</code> and <code>x-amz-copy-source-if-unmodified-since</code> headers are present in the request and evaluate as follows, Amazon S3 returns <code>200 OK</code> and copies the data:</p>
1237    /// <ul>
1238    /// <li>
1239    /// <p><code>x-amz-copy-source-if-match</code> condition evaluates to true</p></li>
1240    /// <li>
1241    /// <p><code>x-amz-copy-source-if-unmodified-since</code> condition evaluates to false</p></li>
1242    /// </ul>
1243    pub fn get_copy_source_if_match(&self) -> &::std::option::Option<::std::string::String> {
1244        &self.copy_source_if_match
1245    }
1246    /// <p>Copies the object if it has been modified since the specified time.</p>
1247    /// <p>If both the <code>x-amz-copy-source-if-none-match</code> and <code>x-amz-copy-source-if-modified-since</code> headers are present in the request and evaluate as follows, Amazon S3 returns the <code>412 Precondition Failed</code> response code:</p>
1248    /// <ul>
1249    /// <li>
1250    /// <p><code>x-amz-copy-source-if-none-match</code> condition evaluates to false</p></li>
1251    /// <li>
1252    /// <p><code>x-amz-copy-source-if-modified-since</code> condition evaluates to true</p></li>
1253    /// </ul>
1254    pub fn copy_source_if_modified_since(mut self, input: ::aws_smithy_types::DateTime) -> Self {
1255        self.copy_source_if_modified_since = ::std::option::Option::Some(input);
1256        self
1257    }
1258    /// <p>Copies the object if it has been modified since the specified time.</p>
1259    /// <p>If both the <code>x-amz-copy-source-if-none-match</code> and <code>x-amz-copy-source-if-modified-since</code> headers are present in the request and evaluate as follows, Amazon S3 returns the <code>412 Precondition Failed</code> response code:</p>
1260    /// <ul>
1261    /// <li>
1262    /// <p><code>x-amz-copy-source-if-none-match</code> condition evaluates to false</p></li>
1263    /// <li>
1264    /// <p><code>x-amz-copy-source-if-modified-since</code> condition evaluates to true</p></li>
1265    /// </ul>
1266    pub fn set_copy_source_if_modified_since(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
1267        self.copy_source_if_modified_since = input;
1268        self
1269    }
1270    /// <p>Copies the object if it has been modified since the specified time.</p>
1271    /// <p>If both the <code>x-amz-copy-source-if-none-match</code> and <code>x-amz-copy-source-if-modified-since</code> headers are present in the request and evaluate as follows, Amazon S3 returns the <code>412 Precondition Failed</code> response code:</p>
1272    /// <ul>
1273    /// <li>
1274    /// <p><code>x-amz-copy-source-if-none-match</code> condition evaluates to false</p></li>
1275    /// <li>
1276    /// <p><code>x-amz-copy-source-if-modified-since</code> condition evaluates to true</p></li>
1277    /// </ul>
1278    pub fn get_copy_source_if_modified_since(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
1279        &self.copy_source_if_modified_since
1280    }
1281    /// <p>Copies the object if its entity tag (ETag) is different than the specified ETag.</p>
1282    /// <p>If both the <code>x-amz-copy-source-if-none-match</code> and <code>x-amz-copy-source-if-modified-since</code> headers are present in the request and evaluate as follows, Amazon S3 returns the <code>412 Precondition Failed</code> response code:</p>
1283    /// <ul>
1284    /// <li>
1285    /// <p><code>x-amz-copy-source-if-none-match</code> condition evaluates to false</p></li>
1286    /// <li>
1287    /// <p><code>x-amz-copy-source-if-modified-since</code> condition evaluates to true</p></li>
1288    /// </ul>
1289    pub fn copy_source_if_none_match(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
1290        self.copy_source_if_none_match = ::std::option::Option::Some(input.into());
1291        self
1292    }
1293    /// <p>Copies the object if its entity tag (ETag) is different than the specified ETag.</p>
1294    /// <p>If both the <code>x-amz-copy-source-if-none-match</code> and <code>x-amz-copy-source-if-modified-since</code> headers are present in the request and evaluate as follows, Amazon S3 returns the <code>412 Precondition Failed</code> response code:</p>
1295    /// <ul>
1296    /// <li>
1297    /// <p><code>x-amz-copy-source-if-none-match</code> condition evaluates to false</p></li>
1298    /// <li>
1299    /// <p><code>x-amz-copy-source-if-modified-since</code> condition evaluates to true</p></li>
1300    /// </ul>
1301    pub fn set_copy_source_if_none_match(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
1302        self.copy_source_if_none_match = input;
1303        self
1304    }
1305    /// <p>Copies the object if its entity tag (ETag) is different than the specified ETag.</p>
1306    /// <p>If both the <code>x-amz-copy-source-if-none-match</code> and <code>x-amz-copy-source-if-modified-since</code> headers are present in the request and evaluate as follows, Amazon S3 returns the <code>412 Precondition Failed</code> response code:</p>
1307    /// <ul>
1308    /// <li>
1309    /// <p><code>x-amz-copy-source-if-none-match</code> condition evaluates to false</p></li>
1310    /// <li>
1311    /// <p><code>x-amz-copy-source-if-modified-since</code> condition evaluates to true</p></li>
1312    /// </ul>
1313    pub fn get_copy_source_if_none_match(&self) -> &::std::option::Option<::std::string::String> {
1314        &self.copy_source_if_none_match
1315    }
1316    /// <p>Copies the object if it hasn't been modified since the specified time.</p>
1317    /// <p>If both the <code>x-amz-copy-source-if-match</code> and <code>x-amz-copy-source-if-unmodified-since</code> headers are present in the request and evaluate as follows, Amazon S3 returns <code>200 OK</code> and copies the data:</p>
1318    /// <ul>
1319    /// <li>
1320    /// <p><code>x-amz-copy-source-if-match</code> condition evaluates to true</p></li>
1321    /// <li>
1322    /// <p><code>x-amz-copy-source-if-unmodified-since</code> condition evaluates to false</p></li>
1323    /// </ul>
1324    pub fn copy_source_if_unmodified_since(mut self, input: ::aws_smithy_types::DateTime) -> Self {
1325        self.copy_source_if_unmodified_since = ::std::option::Option::Some(input);
1326        self
1327    }
1328    /// <p>Copies the object if it hasn't been modified since the specified time.</p>
1329    /// <p>If both the <code>x-amz-copy-source-if-match</code> and <code>x-amz-copy-source-if-unmodified-since</code> headers are present in the request and evaluate as follows, Amazon S3 returns <code>200 OK</code> and copies the data:</p>
1330    /// <ul>
1331    /// <li>
1332    /// <p><code>x-amz-copy-source-if-match</code> condition evaluates to true</p></li>
1333    /// <li>
1334    /// <p><code>x-amz-copy-source-if-unmodified-since</code> condition evaluates to false</p></li>
1335    /// </ul>
1336    pub fn set_copy_source_if_unmodified_since(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
1337        self.copy_source_if_unmodified_since = input;
1338        self
1339    }
1340    /// <p>Copies the object if it hasn't been modified since the specified time.</p>
1341    /// <p>If both the <code>x-amz-copy-source-if-match</code> and <code>x-amz-copy-source-if-unmodified-since</code> headers are present in the request and evaluate as follows, Amazon S3 returns <code>200 OK</code> and copies the data:</p>
1342    /// <ul>
1343    /// <li>
1344    /// <p><code>x-amz-copy-source-if-match</code> condition evaluates to true</p></li>
1345    /// <li>
1346    /// <p><code>x-amz-copy-source-if-unmodified-since</code> condition evaluates to false</p></li>
1347    /// </ul>
1348    pub fn get_copy_source_if_unmodified_since(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
1349        &self.copy_source_if_unmodified_since
1350    }
1351    /// <p>The date and time at which the object is no longer cacheable.</p>
1352    pub fn expires(mut self, input: ::aws_smithy_types::DateTime) -> Self {
1353        self.expires = ::std::option::Option::Some(input);
1354        self
1355    }
1356    /// <p>The date and time at which the object is no longer cacheable.</p>
1357    pub fn set_expires(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
1358        self.expires = input;
1359        self
1360    }
1361    /// <p>The date and time at which the object is no longer cacheable.</p>
1362    pub fn get_expires(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
1363        &self.expires
1364    }
1365    /// <p>Gives the grantee READ, READ_ACP, and WRITE_ACP permissions on the object.</p><note>
1366    /// <ul>
1367    /// <li>
1368    /// <p>This functionality is not supported for directory buckets.</p></li>
1369    /// <li>
1370    /// <p>This functionality is not supported for Amazon S3 on Outposts.</p></li>
1371    /// </ul>
1372    /// </note>
1373    pub fn grant_full_control(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
1374        self.grant_full_control = ::std::option::Option::Some(input.into());
1375        self
1376    }
1377    /// <p>Gives the grantee READ, READ_ACP, and WRITE_ACP permissions on the object.</p><note>
1378    /// <ul>
1379    /// <li>
1380    /// <p>This functionality is not supported for directory buckets.</p></li>
1381    /// <li>
1382    /// <p>This functionality is not supported for Amazon S3 on Outposts.</p></li>
1383    /// </ul>
1384    /// </note>
1385    pub fn set_grant_full_control(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
1386        self.grant_full_control = input;
1387        self
1388    }
1389    /// <p>Gives the grantee READ, READ_ACP, and WRITE_ACP permissions on the object.</p><note>
1390    /// <ul>
1391    /// <li>
1392    /// <p>This functionality is not supported for directory buckets.</p></li>
1393    /// <li>
1394    /// <p>This functionality is not supported for Amazon S3 on Outposts.</p></li>
1395    /// </ul>
1396    /// </note>
1397    pub fn get_grant_full_control(&self) -> &::std::option::Option<::std::string::String> {
1398        &self.grant_full_control
1399    }
1400    /// <p>Allows grantee to read the object data and its metadata.</p><note>
1401    /// <ul>
1402    /// <li>
1403    /// <p>This functionality is not supported for directory buckets.</p></li>
1404    /// <li>
1405    /// <p>This functionality is not supported for Amazon S3 on Outposts.</p></li>
1406    /// </ul>
1407    /// </note>
1408    pub fn grant_read(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
1409        self.grant_read = ::std::option::Option::Some(input.into());
1410        self
1411    }
1412    /// <p>Allows grantee to read the object data and its metadata.</p><note>
1413    /// <ul>
1414    /// <li>
1415    /// <p>This functionality is not supported for directory buckets.</p></li>
1416    /// <li>
1417    /// <p>This functionality is not supported for Amazon S3 on Outposts.</p></li>
1418    /// </ul>
1419    /// </note>
1420    pub fn set_grant_read(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
1421        self.grant_read = input;
1422        self
1423    }
1424    /// <p>Allows grantee to read the object data and its metadata.</p><note>
1425    /// <ul>
1426    /// <li>
1427    /// <p>This functionality is not supported for directory buckets.</p></li>
1428    /// <li>
1429    /// <p>This functionality is not supported for Amazon S3 on Outposts.</p></li>
1430    /// </ul>
1431    /// </note>
1432    pub fn get_grant_read(&self) -> &::std::option::Option<::std::string::String> {
1433        &self.grant_read
1434    }
1435    /// <p>Allows grantee to read the object ACL.</p><note>
1436    /// <ul>
1437    /// <li>
1438    /// <p>This functionality is not supported for directory buckets.</p></li>
1439    /// <li>
1440    /// <p>This functionality is not supported for Amazon S3 on Outposts.</p></li>
1441    /// </ul>
1442    /// </note>
1443    pub fn grant_read_acp(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
1444        self.grant_read_acp = ::std::option::Option::Some(input.into());
1445        self
1446    }
1447    /// <p>Allows grantee to read the object ACL.</p><note>
1448    /// <ul>
1449    /// <li>
1450    /// <p>This functionality is not supported for directory buckets.</p></li>
1451    /// <li>
1452    /// <p>This functionality is not supported for Amazon S3 on Outposts.</p></li>
1453    /// </ul>
1454    /// </note>
1455    pub fn set_grant_read_acp(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
1456        self.grant_read_acp = input;
1457        self
1458    }
1459    /// <p>Allows grantee to read the object ACL.</p><note>
1460    /// <ul>
1461    /// <li>
1462    /// <p>This functionality is not supported for directory buckets.</p></li>
1463    /// <li>
1464    /// <p>This functionality is not supported for Amazon S3 on Outposts.</p></li>
1465    /// </ul>
1466    /// </note>
1467    pub fn get_grant_read_acp(&self) -> &::std::option::Option<::std::string::String> {
1468        &self.grant_read_acp
1469    }
1470    /// <p>Allows grantee to write the ACL for the applicable object.</p><note>
1471    /// <ul>
1472    /// <li>
1473    /// <p>This functionality is not supported for directory buckets.</p></li>
1474    /// <li>
1475    /// <p>This functionality is not supported for Amazon S3 on Outposts.</p></li>
1476    /// </ul>
1477    /// </note>
1478    pub fn grant_write_acp(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
1479        self.grant_write_acp = ::std::option::Option::Some(input.into());
1480        self
1481    }
1482    /// <p>Allows grantee to write the ACL for the applicable object.</p><note>
1483    /// <ul>
1484    /// <li>
1485    /// <p>This functionality is not supported for directory buckets.</p></li>
1486    /// <li>
1487    /// <p>This functionality is not supported for Amazon S3 on Outposts.</p></li>
1488    /// </ul>
1489    /// </note>
1490    pub fn set_grant_write_acp(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
1491        self.grant_write_acp = input;
1492        self
1493    }
1494    /// <p>Allows grantee to write the ACL for the applicable object.</p><note>
1495    /// <ul>
1496    /// <li>
1497    /// <p>This functionality is not supported for directory buckets.</p></li>
1498    /// <li>
1499    /// <p>This functionality is not supported for Amazon S3 on Outposts.</p></li>
1500    /// </ul>
1501    /// </note>
1502    pub fn get_grant_write_acp(&self) -> &::std::option::Option<::std::string::String> {
1503        &self.grant_write_acp
1504    }
1505    /// <p>Copies the object if the entity tag (ETag) of the destination object matches the specified tag. If the ETag values do not match, the operation returns a <code>412 Precondition Failed</code> error. If a concurrent operation occurs during the upload S3 returns a <code>409 ConditionalRequestConflict</code> response. On a 409 failure you should fetch the object's ETag and retry the upload.</p>
1506    /// <p>Expects the ETag value as a string.</p>
1507    /// <p>For more information about conditional requests, see <a href="https://tools.ietf.org/html/rfc7232">RFC 7232</a>.</p>
1508    pub fn if_match(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
1509        self.if_match = ::std::option::Option::Some(input.into());
1510        self
1511    }
1512    /// <p>Copies the object if the entity tag (ETag) of the destination object matches the specified tag. If the ETag values do not match, the operation returns a <code>412 Precondition Failed</code> error. If a concurrent operation occurs during the upload S3 returns a <code>409 ConditionalRequestConflict</code> response. On a 409 failure you should fetch the object's ETag and retry the upload.</p>
1513    /// <p>Expects the ETag value as a string.</p>
1514    /// <p>For more information about conditional requests, see <a href="https://tools.ietf.org/html/rfc7232">RFC 7232</a>.</p>
1515    pub fn set_if_match(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
1516        self.if_match = input;
1517        self
1518    }
1519    /// <p>Copies the object if the entity tag (ETag) of the destination object matches the specified tag. If the ETag values do not match, the operation returns a <code>412 Precondition Failed</code> error. If a concurrent operation occurs during the upload S3 returns a <code>409 ConditionalRequestConflict</code> response. On a 409 failure you should fetch the object's ETag and retry the upload.</p>
1520    /// <p>Expects the ETag value as a string.</p>
1521    /// <p>For more information about conditional requests, see <a href="https://tools.ietf.org/html/rfc7232">RFC 7232</a>.</p>
1522    pub fn get_if_match(&self) -> &::std::option::Option<::std::string::String> {
1523        &self.if_match
1524    }
1525    /// <p>Copies the object only if the object key name at the destination does not already exist in the bucket specified. Otherwise, Amazon S3 returns a <code>412 Precondition Failed</code> error. If a concurrent operation occurs during the upload S3 returns a <code>409 ConditionalRequestConflict</code> response. On a 409 failure you should retry the upload.</p>
1526    /// <p>Expects the '*' (asterisk) character.</p>
1527    /// <p>For more information about conditional requests, see <a href="https://tools.ietf.org/html/rfc7232">RFC 7232</a>.</p>
1528    pub fn if_none_match(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
1529        self.if_none_match = ::std::option::Option::Some(input.into());
1530        self
1531    }
1532    /// <p>Copies the object only if the object key name at the destination does not already exist in the bucket specified. Otherwise, Amazon S3 returns a <code>412 Precondition Failed</code> error. If a concurrent operation occurs during the upload S3 returns a <code>409 ConditionalRequestConflict</code> response. On a 409 failure you should retry the upload.</p>
1533    /// <p>Expects the '*' (asterisk) character.</p>
1534    /// <p>For more information about conditional requests, see <a href="https://tools.ietf.org/html/rfc7232">RFC 7232</a>.</p>
1535    pub fn set_if_none_match(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
1536        self.if_none_match = input;
1537        self
1538    }
1539    /// <p>Copies the object only if the object key name at the destination does not already exist in the bucket specified. Otherwise, Amazon S3 returns a <code>412 Precondition Failed</code> error. If a concurrent operation occurs during the upload S3 returns a <code>409 ConditionalRequestConflict</code> response. On a 409 failure you should retry the upload.</p>
1540    /// <p>Expects the '*' (asterisk) character.</p>
1541    /// <p>For more information about conditional requests, see <a href="https://tools.ietf.org/html/rfc7232">RFC 7232</a>.</p>
1542    pub fn get_if_none_match(&self) -> &::std::option::Option<::std::string::String> {
1543        &self.if_none_match
1544    }
1545    /// <p>The key of the destination object.</p>
1546    /// This field is required.
1547    pub fn key(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
1548        self.key = ::std::option::Option::Some(input.into());
1549        self
1550    }
1551    /// <p>The key of the destination object.</p>
1552    pub fn set_key(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
1553        self.key = input;
1554        self
1555    }
1556    /// <p>The key of the destination object.</p>
1557    pub fn get_key(&self) -> &::std::option::Option<::std::string::String> {
1558        &self.key
1559    }
1560    /// Adds a key-value pair to `metadata`.
1561    ///
1562    /// To override the contents of this collection use [`set_metadata`](Self::set_metadata).
1563    ///
1564    /// <p>A map of metadata to store with the object in S3.</p>
1565    pub fn metadata(mut self, k: impl ::std::convert::Into<::std::string::String>, v: impl ::std::convert::Into<::std::string::String>) -> Self {
1566        let mut hash_map = self.metadata.unwrap_or_default();
1567        hash_map.insert(k.into(), v.into());
1568        self.metadata = ::std::option::Option::Some(hash_map);
1569        self
1570    }
1571    /// <p>A map of metadata to store with the object in S3.</p>
1572    pub fn set_metadata(mut self, input: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>) -> Self {
1573        self.metadata = input;
1574        self
1575    }
1576    /// <p>A map of metadata to store with the object in S3.</p>
1577    pub fn get_metadata(&self) -> &::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>> {
1578        &self.metadata
1579    }
1580    /// <p>Specifies whether the metadata is copied from the source object or replaced with metadata that's provided in the request. When copying an object, you can preserve all metadata (the default) or specify new metadata. If this header isn’t specified, <code>COPY</code> is the default behavior.</p>
1581    /// <p><b>General purpose bucket</b> - For general purpose buckets, when you grant permissions, you can use the <code>s3:x-amz-metadata-directive</code> condition key to enforce certain metadata behavior when objects are uploaded. For more information, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/amazon-s3-policy-keys.html">Amazon S3 condition key examples</a> in the <i>Amazon S3 User Guide</i>.</p><note>
1582    /// <p><code>x-amz-website-redirect-location</code> is unique to each object and is not copied when using the <code>x-amz-metadata-directive</code> header. To copy the value, you must specify <code>x-amz-website-redirect-location</code> in the request header.</p>
1583    /// </note>
1584    pub fn metadata_directive(mut self, input: crate::types::MetadataDirective) -> Self {
1585        self.metadata_directive = ::std::option::Option::Some(input);
1586        self
1587    }
1588    /// <p>Specifies whether the metadata is copied from the source object or replaced with metadata that's provided in the request. When copying an object, you can preserve all metadata (the default) or specify new metadata. If this header isn’t specified, <code>COPY</code> is the default behavior.</p>
1589    /// <p><b>General purpose bucket</b> - For general purpose buckets, when you grant permissions, you can use the <code>s3:x-amz-metadata-directive</code> condition key to enforce certain metadata behavior when objects are uploaded. For more information, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/amazon-s3-policy-keys.html">Amazon S3 condition key examples</a> in the <i>Amazon S3 User Guide</i>.</p><note>
1590    /// <p><code>x-amz-website-redirect-location</code> is unique to each object and is not copied when using the <code>x-amz-metadata-directive</code> header. To copy the value, you must specify <code>x-amz-website-redirect-location</code> in the request header.</p>
1591    /// </note>
1592    pub fn set_metadata_directive(mut self, input: ::std::option::Option<crate::types::MetadataDirective>) -> Self {
1593        self.metadata_directive = input;
1594        self
1595    }
1596    /// <p>Specifies whether the metadata is copied from the source object or replaced with metadata that's provided in the request. When copying an object, you can preserve all metadata (the default) or specify new metadata. If this header isn’t specified, <code>COPY</code> is the default behavior.</p>
1597    /// <p><b>General purpose bucket</b> - For general purpose buckets, when you grant permissions, you can use the <code>s3:x-amz-metadata-directive</code> condition key to enforce certain metadata behavior when objects are uploaded. For more information, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/amazon-s3-policy-keys.html">Amazon S3 condition key examples</a> in the <i>Amazon S3 User Guide</i>.</p><note>
1598    /// <p><code>x-amz-website-redirect-location</code> is unique to each object and is not copied when using the <code>x-amz-metadata-directive</code> header. To copy the value, you must specify <code>x-amz-website-redirect-location</code> in the request header.</p>
1599    /// </note>
1600    pub fn get_metadata_directive(&self) -> &::std::option::Option<crate::types::MetadataDirective> {
1601        &self.metadata_directive
1602    }
1603    /// <p>Specifies whether the object tag-set is copied from the source object or replaced with the tag-set that's provided in the request.</p>
1604    /// <p>The default value is <code>COPY</code>.</p><note>
1605    /// <p><b>Directory buckets</b> - For directory buckets in a <code>CopyObject</code> operation, only the empty tag-set is supported. Any requests that attempt to write non-empty tags into directory buckets will receive a <code>501 Not Implemented</code> status code. When the destination bucket is a directory bucket, you will receive a <code>501 Not Implemented</code> response in any of the following situations:</p>
1606    /// <ul>
1607    /// <li>
1608    /// <p>When you attempt to <code>COPY</code> the tag-set from an S3 source object that has non-empty tags.</p></li>
1609    /// <li>
1610    /// <p>When you attempt to <code>REPLACE</code> the tag-set of a source object and set a non-empty value to <code>x-amz-tagging</code>.</p></li>
1611    /// <li>
1612    /// <p>When you don't set the <code>x-amz-tagging-directive</code> header and the source object has non-empty tags. This is because the default value of <code>x-amz-tagging-directive</code> is <code>COPY</code>.</p></li>
1613    /// </ul>
1614    /// <p>Because only the empty tag-set is supported for directory buckets in a <code>CopyObject</code> operation, the following situations are allowed:</p>
1615    /// <ul>
1616    /// <li>
1617    /// <p>When you attempt to <code>COPY</code> the tag-set from a directory bucket source object that has no tags to a general purpose bucket. It copies an empty tag-set to the destination object.</p></li>
1618    /// <li>
1619    /// <p>When you attempt to <code>REPLACE</code> the tag-set of a directory bucket source object and set the <code>x-amz-tagging</code> value of the directory bucket destination object to empty.</p></li>
1620    /// <li>
1621    /// <p>When you attempt to <code>REPLACE</code> the tag-set of a general purpose bucket source object that has non-empty tags and set the <code>x-amz-tagging</code> value of the directory bucket destination object to empty.</p></li>
1622    /// <li>
1623    /// <p>When you attempt to <code>REPLACE</code> the tag-set of a directory bucket source object and don't set the <code>x-amz-tagging</code> value of the directory bucket destination object. This is because the default value of <code>x-amz-tagging</code> is the empty value.</p></li>
1624    /// </ul>
1625    /// </note>
1626    pub fn tagging_directive(mut self, input: crate::types::TaggingDirective) -> Self {
1627        self.tagging_directive = ::std::option::Option::Some(input);
1628        self
1629    }
1630    /// <p>Specifies whether the object tag-set is copied from the source object or replaced with the tag-set that's provided in the request.</p>
1631    /// <p>The default value is <code>COPY</code>.</p><note>
1632    /// <p><b>Directory buckets</b> - For directory buckets in a <code>CopyObject</code> operation, only the empty tag-set is supported. Any requests that attempt to write non-empty tags into directory buckets will receive a <code>501 Not Implemented</code> status code. When the destination bucket is a directory bucket, you will receive a <code>501 Not Implemented</code> response in any of the following situations:</p>
1633    /// <ul>
1634    /// <li>
1635    /// <p>When you attempt to <code>COPY</code> the tag-set from an S3 source object that has non-empty tags.</p></li>
1636    /// <li>
1637    /// <p>When you attempt to <code>REPLACE</code> the tag-set of a source object and set a non-empty value to <code>x-amz-tagging</code>.</p></li>
1638    /// <li>
1639    /// <p>When you don't set the <code>x-amz-tagging-directive</code> header and the source object has non-empty tags. This is because the default value of <code>x-amz-tagging-directive</code> is <code>COPY</code>.</p></li>
1640    /// </ul>
1641    /// <p>Because only the empty tag-set is supported for directory buckets in a <code>CopyObject</code> operation, the following situations are allowed:</p>
1642    /// <ul>
1643    /// <li>
1644    /// <p>When you attempt to <code>COPY</code> the tag-set from a directory bucket source object that has no tags to a general purpose bucket. It copies an empty tag-set to the destination object.</p></li>
1645    /// <li>
1646    /// <p>When you attempt to <code>REPLACE</code> the tag-set of a directory bucket source object and set the <code>x-amz-tagging</code> value of the directory bucket destination object to empty.</p></li>
1647    /// <li>
1648    /// <p>When you attempt to <code>REPLACE</code> the tag-set of a general purpose bucket source object that has non-empty tags and set the <code>x-amz-tagging</code> value of the directory bucket destination object to empty.</p></li>
1649    /// <li>
1650    /// <p>When you attempt to <code>REPLACE</code> the tag-set of a directory bucket source object and don't set the <code>x-amz-tagging</code> value of the directory bucket destination object. This is because the default value of <code>x-amz-tagging</code> is the empty value.</p></li>
1651    /// </ul>
1652    /// </note>
1653    pub fn set_tagging_directive(mut self, input: ::std::option::Option<crate::types::TaggingDirective>) -> Self {
1654        self.tagging_directive = input;
1655        self
1656    }
1657    /// <p>Specifies whether the object tag-set is copied from the source object or replaced with the tag-set that's provided in the request.</p>
1658    /// <p>The default value is <code>COPY</code>.</p><note>
1659    /// <p><b>Directory buckets</b> - For directory buckets in a <code>CopyObject</code> operation, only the empty tag-set is supported. Any requests that attempt to write non-empty tags into directory buckets will receive a <code>501 Not Implemented</code> status code. When the destination bucket is a directory bucket, you will receive a <code>501 Not Implemented</code> response in any of the following situations:</p>
1660    /// <ul>
1661    /// <li>
1662    /// <p>When you attempt to <code>COPY</code> the tag-set from an S3 source object that has non-empty tags.</p></li>
1663    /// <li>
1664    /// <p>When you attempt to <code>REPLACE</code> the tag-set of a source object and set a non-empty value to <code>x-amz-tagging</code>.</p></li>
1665    /// <li>
1666    /// <p>When you don't set the <code>x-amz-tagging-directive</code> header and the source object has non-empty tags. This is because the default value of <code>x-amz-tagging-directive</code> is <code>COPY</code>.</p></li>
1667    /// </ul>
1668    /// <p>Because only the empty tag-set is supported for directory buckets in a <code>CopyObject</code> operation, the following situations are allowed:</p>
1669    /// <ul>
1670    /// <li>
1671    /// <p>When you attempt to <code>COPY</code> the tag-set from a directory bucket source object that has no tags to a general purpose bucket. It copies an empty tag-set to the destination object.</p></li>
1672    /// <li>
1673    /// <p>When you attempt to <code>REPLACE</code> the tag-set of a directory bucket source object and set the <code>x-amz-tagging</code> value of the directory bucket destination object to empty.</p></li>
1674    /// <li>
1675    /// <p>When you attempt to <code>REPLACE</code> the tag-set of a general purpose bucket source object that has non-empty tags and set the <code>x-amz-tagging</code> value of the directory bucket destination object to empty.</p></li>
1676    /// <li>
1677    /// <p>When you attempt to <code>REPLACE</code> the tag-set of a directory bucket source object and don't set the <code>x-amz-tagging</code> value of the directory bucket destination object. This is because the default value of <code>x-amz-tagging</code> is the empty value.</p></li>
1678    /// </ul>
1679    /// </note>
1680    pub fn get_tagging_directive(&self) -> &::std::option::Option<crate::types::TaggingDirective> {
1681        &self.tagging_directive
1682    }
1683    /// <p>Specifies whether you want to copy annotations from the source object or exclude them. If this header isn't specified, <code>COPY</code> is the default behavior.</p>
1684    /// <p>Valid Values: <code>COPY | EXCLUDE</code></p>
1685    /// <p>You can specify this directive as either an HTTP header (<code>x-amz-object-annotation-directive</code>) or as a query string parameter. Use the query string form when generating presigned URLs that need to control annotation copy behavior.</p>
1686    /// <p>When set to <code>COPY</code>, you must have <code>s3:GetObjectAnnotation</code> permission on the source object and <code>s3:PutObjectAnnotation</code> permission on the destination. Each annotation copied is billed as a separate PUT request. If annotations on the source are modified during the copy, Amazon S3 returns a retryable error.</p><note>
1687    /// <p>For directory buckets, annotations are not supported. Use <code>EXCLUDE</code> to copy objects to directory buckets without errors. If you specify <code>COPY</code> for a directory bucket, the request returns HTTP 501 (Not Implemented).</p>
1688    /// </note> <note>
1689    /// <p>When you copy objects using multipart upload (for example, when the Amazon Web Services CLI or Amazon Web Services SDKs use Transfer Manager for objects larger than approximately 8 MB), annotations are not copied by default. To include annotations, specify <code>--copy-props default</code> in the Amazon Web Services CLI or the equivalent SDK configuration. With this opt-in, the SDK reads source annotations, completes the multipart upload, and then writes each annotation to the destination. Between the upload completion and the last annotation write, the destination object exists without all its annotations.</p>
1690    /// </note>
1691    pub fn annotation_directive(mut self, input: crate::types::AnnotationDirective) -> Self {
1692        self.annotation_directive = ::std::option::Option::Some(input);
1693        self
1694    }
1695    /// <p>Specifies whether you want to copy annotations from the source object or exclude them. If this header isn't specified, <code>COPY</code> is the default behavior.</p>
1696    /// <p>Valid Values: <code>COPY | EXCLUDE</code></p>
1697    /// <p>You can specify this directive as either an HTTP header (<code>x-amz-object-annotation-directive</code>) or as a query string parameter. Use the query string form when generating presigned URLs that need to control annotation copy behavior.</p>
1698    /// <p>When set to <code>COPY</code>, you must have <code>s3:GetObjectAnnotation</code> permission on the source object and <code>s3:PutObjectAnnotation</code> permission on the destination. Each annotation copied is billed as a separate PUT request. If annotations on the source are modified during the copy, Amazon S3 returns a retryable error.</p><note>
1699    /// <p>For directory buckets, annotations are not supported. Use <code>EXCLUDE</code> to copy objects to directory buckets without errors. If you specify <code>COPY</code> for a directory bucket, the request returns HTTP 501 (Not Implemented).</p>
1700    /// </note> <note>
1701    /// <p>When you copy objects using multipart upload (for example, when the Amazon Web Services CLI or Amazon Web Services SDKs use Transfer Manager for objects larger than approximately 8 MB), annotations are not copied by default. To include annotations, specify <code>--copy-props default</code> in the Amazon Web Services CLI or the equivalent SDK configuration. With this opt-in, the SDK reads source annotations, completes the multipart upload, and then writes each annotation to the destination. Between the upload completion and the last annotation write, the destination object exists without all its annotations.</p>
1702    /// </note>
1703    pub fn set_annotation_directive(mut self, input: ::std::option::Option<crate::types::AnnotationDirective>) -> Self {
1704        self.annotation_directive = input;
1705        self
1706    }
1707    /// <p>Specifies whether you want to copy annotations from the source object or exclude them. If this header isn't specified, <code>COPY</code> is the default behavior.</p>
1708    /// <p>Valid Values: <code>COPY | EXCLUDE</code></p>
1709    /// <p>You can specify this directive as either an HTTP header (<code>x-amz-object-annotation-directive</code>) or as a query string parameter. Use the query string form when generating presigned URLs that need to control annotation copy behavior.</p>
1710    /// <p>When set to <code>COPY</code>, you must have <code>s3:GetObjectAnnotation</code> permission on the source object and <code>s3:PutObjectAnnotation</code> permission on the destination. Each annotation copied is billed as a separate PUT request. If annotations on the source are modified during the copy, Amazon S3 returns a retryable error.</p><note>
1711    /// <p>For directory buckets, annotations are not supported. Use <code>EXCLUDE</code> to copy objects to directory buckets without errors. If you specify <code>COPY</code> for a directory bucket, the request returns HTTP 501 (Not Implemented).</p>
1712    /// </note> <note>
1713    /// <p>When you copy objects using multipart upload (for example, when the Amazon Web Services CLI or Amazon Web Services SDKs use Transfer Manager for objects larger than approximately 8 MB), annotations are not copied by default. To include annotations, specify <code>--copy-props default</code> in the Amazon Web Services CLI or the equivalent SDK configuration. With this opt-in, the SDK reads source annotations, completes the multipart upload, and then writes each annotation to the destination. Between the upload completion and the last annotation write, the destination object exists without all its annotations.</p>
1714    /// </note>
1715    pub fn get_annotation_directive(&self) -> &::std::option::Option<crate::types::AnnotationDirective> {
1716        &self.annotation_directive
1717    }
1718    /// <p>The server-side encryption algorithm used when storing this object in Amazon S3. Unrecognized or unsupported values won’t write a destination object and will receive a <code>400 Bad Request</code> response.</p>
1719    /// <p>Amazon S3 automatically encrypts all new objects that are copied to an S3 bucket. When copying an object, if you don't specify encryption information in your copy request, the encryption setting of the target object is set to the default encryption configuration of the destination bucket. By default, all buckets have a base level of encryption configuration that uses server-side encryption with Amazon S3 managed keys (SSE-S3). If the destination bucket has a different default encryption configuration, Amazon S3 uses the corresponding encryption key to encrypt the target object copy.</p>
1720    /// <p>With server-side encryption, Amazon S3 encrypts your data as it writes your data to disks in its data centers and decrypts the data when you access it. For more information about server-side encryption, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/serv-side-encryption.html">Using Server-Side Encryption</a> in the <i>Amazon S3 User Guide</i>.</p>
1721    /// <p><b>General purpose buckets </b></p>
1722    /// <ul>
1723    /// <li>
1724    /// <p>For general purpose buckets, there are the following supported options for server-side encryption: server-side encryption with Key Management Service (KMS) keys (SSE-KMS), dual-layer server-side encryption with Amazon Web Services KMS keys (DSSE-KMS), and server-side encryption with customer-provided encryption keys (SSE-C). Amazon S3 uses the corresponding KMS key, or a customer-provided key to encrypt the target object copy.</p></li>
1725    /// <li>
1726    /// <p>When you perform a <code>CopyObject</code> operation, if you want to use a different type of encryption setting for the target object, you can specify appropriate encryption-related headers to encrypt the target object with an Amazon S3 managed key, a KMS key, or a customer-provided key. If the encryption setting in your request is different from the default encryption configuration of the destination bucket, the encryption setting in your request takes precedence.</p></li>
1727    /// </ul>
1728    /// <p><b>Directory buckets </b></p>
1729    /// <ul>
1730    /// <li>
1731    /// <p>For directory buckets, there are only two supported options for server-side encryption: server-side encryption with Amazon S3 managed keys (SSE-S3) (<code>AES256</code>) and server-side encryption with KMS keys (SSE-KMS) (<code>aws:kms</code>). We recommend that the bucket's default encryption uses the desired encryption configuration and you don't override the bucket default encryption in your <code>CreateSession</code> requests or <code>PUT</code> object requests. Then, new objects are automatically encrypted with the desired encryption settings. For more information, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/s3-express-serv-side-encryption.html">Protecting data with server-side encryption</a> in the <i>Amazon S3 User Guide</i>. For more information about the encryption overriding behaviors in directory buckets, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/s3-express-specifying-kms-encryption.html">Specifying server-side encryption with KMS for new object uploads</a>.</p></li>
1732    /// <li>
1733    /// <p>To encrypt new object copies to a directory bucket with SSE-KMS, we recommend you specify SSE-KMS as the directory bucket's default encryption configuration with a KMS key (specifically, a <a href="https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#customer-cmk">customer managed key</a>). The <a href="https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#aws-managed-cmk">Amazon Web Services managed key</a> (<code>aws/s3</code>) isn't supported. Your SSE-KMS configuration can only support 1 <a href="https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#customer-cmk">customer managed key</a> per directory bucket for the lifetime of the bucket. After you specify a customer managed key for SSE-KMS, you can't override the customer managed key for the bucket's SSE-KMS configuration. Then, when you perform a <code>CopyObject</code> operation and want to specify server-side encryption settings for new object copies with SSE-KMS in the encryption-related request headers, you must ensure the encryption key is the same customer managed key that you specified for the directory bucket's default encryption configuration.</p></li>
1734    /// <li>
1735    /// <p><b>S3 access points for Amazon FSx </b> - When accessing data stored in Amazon FSx file systems using S3 access points, the only valid server side encryption option is <code>aws:fsx</code>. All Amazon FSx file systems have encryption configured by default and are encrypted at rest. Data is automatically encrypted before being written to the file system, and automatically decrypted as it is read. These processes are handled transparently by Amazon FSx.</p></li>
1736    /// </ul>
1737    pub fn server_side_encryption(mut self, input: crate::types::ServerSideEncryption) -> Self {
1738        self.server_side_encryption = ::std::option::Option::Some(input);
1739        self
1740    }
1741    /// <p>The server-side encryption algorithm used when storing this object in Amazon S3. Unrecognized or unsupported values won’t write a destination object and will receive a <code>400 Bad Request</code> response.</p>
1742    /// <p>Amazon S3 automatically encrypts all new objects that are copied to an S3 bucket. When copying an object, if you don't specify encryption information in your copy request, the encryption setting of the target object is set to the default encryption configuration of the destination bucket. By default, all buckets have a base level of encryption configuration that uses server-side encryption with Amazon S3 managed keys (SSE-S3). If the destination bucket has a different default encryption configuration, Amazon S3 uses the corresponding encryption key to encrypt the target object copy.</p>
1743    /// <p>With server-side encryption, Amazon S3 encrypts your data as it writes your data to disks in its data centers and decrypts the data when you access it. For more information about server-side encryption, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/serv-side-encryption.html">Using Server-Side Encryption</a> in the <i>Amazon S3 User Guide</i>.</p>
1744    /// <p><b>General purpose buckets </b></p>
1745    /// <ul>
1746    /// <li>
1747    /// <p>For general purpose buckets, there are the following supported options for server-side encryption: server-side encryption with Key Management Service (KMS) keys (SSE-KMS), dual-layer server-side encryption with Amazon Web Services KMS keys (DSSE-KMS), and server-side encryption with customer-provided encryption keys (SSE-C). Amazon S3 uses the corresponding KMS key, or a customer-provided key to encrypt the target object copy.</p></li>
1748    /// <li>
1749    /// <p>When you perform a <code>CopyObject</code> operation, if you want to use a different type of encryption setting for the target object, you can specify appropriate encryption-related headers to encrypt the target object with an Amazon S3 managed key, a KMS key, or a customer-provided key. If the encryption setting in your request is different from the default encryption configuration of the destination bucket, the encryption setting in your request takes precedence.</p></li>
1750    /// </ul>
1751    /// <p><b>Directory buckets </b></p>
1752    /// <ul>
1753    /// <li>
1754    /// <p>For directory buckets, there are only two supported options for server-side encryption: server-side encryption with Amazon S3 managed keys (SSE-S3) (<code>AES256</code>) and server-side encryption with KMS keys (SSE-KMS) (<code>aws:kms</code>). We recommend that the bucket's default encryption uses the desired encryption configuration and you don't override the bucket default encryption in your <code>CreateSession</code> requests or <code>PUT</code> object requests. Then, new objects are automatically encrypted with the desired encryption settings. For more information, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/s3-express-serv-side-encryption.html">Protecting data with server-side encryption</a> in the <i>Amazon S3 User Guide</i>. For more information about the encryption overriding behaviors in directory buckets, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/s3-express-specifying-kms-encryption.html">Specifying server-side encryption with KMS for new object uploads</a>.</p></li>
1755    /// <li>
1756    /// <p>To encrypt new object copies to a directory bucket with SSE-KMS, we recommend you specify SSE-KMS as the directory bucket's default encryption configuration with a KMS key (specifically, a <a href="https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#customer-cmk">customer managed key</a>). The <a href="https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#aws-managed-cmk">Amazon Web Services managed key</a> (<code>aws/s3</code>) isn't supported. Your SSE-KMS configuration can only support 1 <a href="https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#customer-cmk">customer managed key</a> per directory bucket for the lifetime of the bucket. After you specify a customer managed key for SSE-KMS, you can't override the customer managed key for the bucket's SSE-KMS configuration. Then, when you perform a <code>CopyObject</code> operation and want to specify server-side encryption settings for new object copies with SSE-KMS in the encryption-related request headers, you must ensure the encryption key is the same customer managed key that you specified for the directory bucket's default encryption configuration.</p></li>
1757    /// <li>
1758    /// <p><b>S3 access points for Amazon FSx </b> - When accessing data stored in Amazon FSx file systems using S3 access points, the only valid server side encryption option is <code>aws:fsx</code>. All Amazon FSx file systems have encryption configured by default and are encrypted at rest. Data is automatically encrypted before being written to the file system, and automatically decrypted as it is read. These processes are handled transparently by Amazon FSx.</p></li>
1759    /// </ul>
1760    pub fn set_server_side_encryption(mut self, input: ::std::option::Option<crate::types::ServerSideEncryption>) -> Self {
1761        self.server_side_encryption = input;
1762        self
1763    }
1764    /// <p>The server-side encryption algorithm used when storing this object in Amazon S3. Unrecognized or unsupported values won’t write a destination object and will receive a <code>400 Bad Request</code> response.</p>
1765    /// <p>Amazon S3 automatically encrypts all new objects that are copied to an S3 bucket. When copying an object, if you don't specify encryption information in your copy request, the encryption setting of the target object is set to the default encryption configuration of the destination bucket. By default, all buckets have a base level of encryption configuration that uses server-side encryption with Amazon S3 managed keys (SSE-S3). If the destination bucket has a different default encryption configuration, Amazon S3 uses the corresponding encryption key to encrypt the target object copy.</p>
1766    /// <p>With server-side encryption, Amazon S3 encrypts your data as it writes your data to disks in its data centers and decrypts the data when you access it. For more information about server-side encryption, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/serv-side-encryption.html">Using Server-Side Encryption</a> in the <i>Amazon S3 User Guide</i>.</p>
1767    /// <p><b>General purpose buckets </b></p>
1768    /// <ul>
1769    /// <li>
1770    /// <p>For general purpose buckets, there are the following supported options for server-side encryption: server-side encryption with Key Management Service (KMS) keys (SSE-KMS), dual-layer server-side encryption with Amazon Web Services KMS keys (DSSE-KMS), and server-side encryption with customer-provided encryption keys (SSE-C). Amazon S3 uses the corresponding KMS key, or a customer-provided key to encrypt the target object copy.</p></li>
1771    /// <li>
1772    /// <p>When you perform a <code>CopyObject</code> operation, if you want to use a different type of encryption setting for the target object, you can specify appropriate encryption-related headers to encrypt the target object with an Amazon S3 managed key, a KMS key, or a customer-provided key. If the encryption setting in your request is different from the default encryption configuration of the destination bucket, the encryption setting in your request takes precedence.</p></li>
1773    /// </ul>
1774    /// <p><b>Directory buckets </b></p>
1775    /// <ul>
1776    /// <li>
1777    /// <p>For directory buckets, there are only two supported options for server-side encryption: server-side encryption with Amazon S3 managed keys (SSE-S3) (<code>AES256</code>) and server-side encryption with KMS keys (SSE-KMS) (<code>aws:kms</code>). We recommend that the bucket's default encryption uses the desired encryption configuration and you don't override the bucket default encryption in your <code>CreateSession</code> requests or <code>PUT</code> object requests. Then, new objects are automatically encrypted with the desired encryption settings. For more information, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/s3-express-serv-side-encryption.html">Protecting data with server-side encryption</a> in the <i>Amazon S3 User Guide</i>. For more information about the encryption overriding behaviors in directory buckets, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/s3-express-specifying-kms-encryption.html">Specifying server-side encryption with KMS for new object uploads</a>.</p></li>
1778    /// <li>
1779    /// <p>To encrypt new object copies to a directory bucket with SSE-KMS, we recommend you specify SSE-KMS as the directory bucket's default encryption configuration with a KMS key (specifically, a <a href="https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#customer-cmk">customer managed key</a>). The <a href="https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#aws-managed-cmk">Amazon Web Services managed key</a> (<code>aws/s3</code>) isn't supported. Your SSE-KMS configuration can only support 1 <a href="https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#customer-cmk">customer managed key</a> per directory bucket for the lifetime of the bucket. After you specify a customer managed key for SSE-KMS, you can't override the customer managed key for the bucket's SSE-KMS configuration. Then, when you perform a <code>CopyObject</code> operation and want to specify server-side encryption settings for new object copies with SSE-KMS in the encryption-related request headers, you must ensure the encryption key is the same customer managed key that you specified for the directory bucket's default encryption configuration.</p></li>
1780    /// <li>
1781    /// <p><b>S3 access points for Amazon FSx </b> - When accessing data stored in Amazon FSx file systems using S3 access points, the only valid server side encryption option is <code>aws:fsx</code>. All Amazon FSx file systems have encryption configured by default and are encrypted at rest. Data is automatically encrypted before being written to the file system, and automatically decrypted as it is read. These processes are handled transparently by Amazon FSx.</p></li>
1782    /// </ul>
1783    pub fn get_server_side_encryption(&self) -> &::std::option::Option<crate::types::ServerSideEncryption> {
1784        &self.server_side_encryption
1785    }
1786    /// <p>If the <code>x-amz-storage-class</code> header is not used, the copied object will be stored in the <code>STANDARD</code> Storage Class by default. The <code>STANDARD</code> storage class provides high durability and high availability. Depending on performance needs, you can specify a different Storage Class.</p><note>
1787    /// <ul>
1788    /// <li>
1789    /// <p><b>Directory buckets </b> - Directory buckets only support <code>EXPRESS_ONEZONE</code> (the S3 Express One Zone storage class) in Availability Zones and <code>ONEZONE_IA</code> (the S3 One Zone-Infrequent Access storage class) in Dedicated Local Zones. Unsupported storage class values won't write a destination object and will respond with the HTTP status code <code>400 Bad Request</code>.</p></li>
1790    /// <li>
1791    /// <p><b>Amazon S3 on Outposts </b> - S3 on Outposts only uses the <code>OUTPOSTS</code> Storage Class.</p></li>
1792    /// </ul>
1793    /// </note>
1794    /// <p>You can use the <code>CopyObject</code> action to change the storage class of an object that is already stored in Amazon S3 by using the <code>x-amz-storage-class</code> header. For more information, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/storage-class-intro.html">Storage Classes</a> in the <i>Amazon S3 User Guide</i>.</p>
1795    /// <p>Before using an object as a source object for the copy operation, you must restore a copy of it if it meets any of the following conditions:</p>
1796    /// <ul>
1797    /// <li>
1798    /// <p>The storage class of the source object is <code>GLACIER</code> or <code>DEEP_ARCHIVE</code>.</p></li>
1799    /// <li>
1800    /// <p>The storage class of the source object is <code>INTELLIGENT_TIERING</code> and it's <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/intelligent-tiering-overview.html#intel-tiering-tier-definition">S3 Intelligent-Tiering access tier</a> is <code>Archive Access</code> or <code>Deep Archive Access</code>.</p></li>
1801    /// </ul>
1802    /// <p>For more information, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_RestoreObject.html">RestoreObject</a> and <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/CopyingObjectsExamples.html">Copying Objects</a> in the <i>Amazon S3 User Guide</i>.</p>
1803    pub fn storage_class(mut self, input: crate::types::StorageClass) -> Self {
1804        self.storage_class = ::std::option::Option::Some(input);
1805        self
1806    }
1807    /// <p>If the <code>x-amz-storage-class</code> header is not used, the copied object will be stored in the <code>STANDARD</code> Storage Class by default. The <code>STANDARD</code> storage class provides high durability and high availability. Depending on performance needs, you can specify a different Storage Class.</p><note>
1808    /// <ul>
1809    /// <li>
1810    /// <p><b>Directory buckets </b> - Directory buckets only support <code>EXPRESS_ONEZONE</code> (the S3 Express One Zone storage class) in Availability Zones and <code>ONEZONE_IA</code> (the S3 One Zone-Infrequent Access storage class) in Dedicated Local Zones. Unsupported storage class values won't write a destination object and will respond with the HTTP status code <code>400 Bad Request</code>.</p></li>
1811    /// <li>
1812    /// <p><b>Amazon S3 on Outposts </b> - S3 on Outposts only uses the <code>OUTPOSTS</code> Storage Class.</p></li>
1813    /// </ul>
1814    /// </note>
1815    /// <p>You can use the <code>CopyObject</code> action to change the storage class of an object that is already stored in Amazon S3 by using the <code>x-amz-storage-class</code> header. For more information, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/storage-class-intro.html">Storage Classes</a> in the <i>Amazon S3 User Guide</i>.</p>
1816    /// <p>Before using an object as a source object for the copy operation, you must restore a copy of it if it meets any of the following conditions:</p>
1817    /// <ul>
1818    /// <li>
1819    /// <p>The storage class of the source object is <code>GLACIER</code> or <code>DEEP_ARCHIVE</code>.</p></li>
1820    /// <li>
1821    /// <p>The storage class of the source object is <code>INTELLIGENT_TIERING</code> and it's <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/intelligent-tiering-overview.html#intel-tiering-tier-definition">S3 Intelligent-Tiering access tier</a> is <code>Archive Access</code> or <code>Deep Archive Access</code>.</p></li>
1822    /// </ul>
1823    /// <p>For more information, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_RestoreObject.html">RestoreObject</a> and <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/CopyingObjectsExamples.html">Copying Objects</a> in the <i>Amazon S3 User Guide</i>.</p>
1824    pub fn set_storage_class(mut self, input: ::std::option::Option<crate::types::StorageClass>) -> Self {
1825        self.storage_class = input;
1826        self
1827    }
1828    /// <p>If the <code>x-amz-storage-class</code> header is not used, the copied object will be stored in the <code>STANDARD</code> Storage Class by default. The <code>STANDARD</code> storage class provides high durability and high availability. Depending on performance needs, you can specify a different Storage Class.</p><note>
1829    /// <ul>
1830    /// <li>
1831    /// <p><b>Directory buckets </b> - Directory buckets only support <code>EXPRESS_ONEZONE</code> (the S3 Express One Zone storage class) in Availability Zones and <code>ONEZONE_IA</code> (the S3 One Zone-Infrequent Access storage class) in Dedicated Local Zones. Unsupported storage class values won't write a destination object and will respond with the HTTP status code <code>400 Bad Request</code>.</p></li>
1832    /// <li>
1833    /// <p><b>Amazon S3 on Outposts </b> - S3 on Outposts only uses the <code>OUTPOSTS</code> Storage Class.</p></li>
1834    /// </ul>
1835    /// </note>
1836    /// <p>You can use the <code>CopyObject</code> action to change the storage class of an object that is already stored in Amazon S3 by using the <code>x-amz-storage-class</code> header. For more information, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/storage-class-intro.html">Storage Classes</a> in the <i>Amazon S3 User Guide</i>.</p>
1837    /// <p>Before using an object as a source object for the copy operation, you must restore a copy of it if it meets any of the following conditions:</p>
1838    /// <ul>
1839    /// <li>
1840    /// <p>The storage class of the source object is <code>GLACIER</code> or <code>DEEP_ARCHIVE</code>.</p></li>
1841    /// <li>
1842    /// <p>The storage class of the source object is <code>INTELLIGENT_TIERING</code> and it's <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/intelligent-tiering-overview.html#intel-tiering-tier-definition">S3 Intelligent-Tiering access tier</a> is <code>Archive Access</code> or <code>Deep Archive Access</code>.</p></li>
1843    /// </ul>
1844    /// <p>For more information, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_RestoreObject.html">RestoreObject</a> and <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/CopyingObjectsExamples.html">Copying Objects</a> in the <i>Amazon S3 User Guide</i>.</p>
1845    pub fn get_storage_class(&self) -> &::std::option::Option<crate::types::StorageClass> {
1846        &self.storage_class
1847    }
1848    /// <p>If the destination bucket is configured as a website, redirects requests for this object copy to another object in the same bucket or to an external URL. Amazon S3 stores the value of this header in the object metadata. This value is unique to each object and is not copied when using the <code>x-amz-metadata-directive</code> header. Instead, you may opt to provide this header in combination with the <code>x-amz-metadata-directive</code> header.</p><note>
1849    /// <p>This functionality is not supported for directory buckets.</p>
1850    /// </note>
1851    pub fn website_redirect_location(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
1852        self.website_redirect_location = ::std::option::Option::Some(input.into());
1853        self
1854    }
1855    /// <p>If the destination bucket is configured as a website, redirects requests for this object copy to another object in the same bucket or to an external URL. Amazon S3 stores the value of this header in the object metadata. This value is unique to each object and is not copied when using the <code>x-amz-metadata-directive</code> header. Instead, you may opt to provide this header in combination with the <code>x-amz-metadata-directive</code> header.</p><note>
1856    /// <p>This functionality is not supported for directory buckets.</p>
1857    /// </note>
1858    pub fn set_website_redirect_location(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
1859        self.website_redirect_location = input;
1860        self
1861    }
1862    /// <p>If the destination bucket is configured as a website, redirects requests for this object copy to another object in the same bucket or to an external URL. Amazon S3 stores the value of this header in the object metadata. This value is unique to each object and is not copied when using the <code>x-amz-metadata-directive</code> header. Instead, you may opt to provide this header in combination with the <code>x-amz-metadata-directive</code> header.</p><note>
1863    /// <p>This functionality is not supported for directory buckets.</p>
1864    /// </note>
1865    pub fn get_website_redirect_location(&self) -> &::std::option::Option<::std::string::String> {
1866        &self.website_redirect_location
1867    }
1868    /// <p>Specifies the algorithm to use when encrypting the object (for example, <code>AES256</code>).</p>
1869    /// <p>When you perform a <code>CopyObject</code> operation, if you want to use a different type of encryption setting for the target object, you can specify appropriate encryption-related headers to encrypt the target object with an Amazon S3 managed key, a KMS key, or a customer-provided key. If the encryption setting in your request is different from the default encryption configuration of the destination bucket, the encryption setting in your request takes precedence.</p><note>
1870    /// <p>This functionality is not supported when the destination bucket is a directory bucket.</p>
1871    /// </note>
1872    pub fn sse_customer_algorithm(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
1873        self.sse_customer_algorithm = ::std::option::Option::Some(input.into());
1874        self
1875    }
1876    /// <p>Specifies the algorithm to use when encrypting the object (for example, <code>AES256</code>).</p>
1877    /// <p>When you perform a <code>CopyObject</code> operation, if you want to use a different type of encryption setting for the target object, you can specify appropriate encryption-related headers to encrypt the target object with an Amazon S3 managed key, a KMS key, or a customer-provided key. If the encryption setting in your request is different from the default encryption configuration of the destination bucket, the encryption setting in your request takes precedence.</p><note>
1878    /// <p>This functionality is not supported when the destination bucket is a directory bucket.</p>
1879    /// </note>
1880    pub fn set_sse_customer_algorithm(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
1881        self.sse_customer_algorithm = input;
1882        self
1883    }
1884    /// <p>Specifies the algorithm to use when encrypting the object (for example, <code>AES256</code>).</p>
1885    /// <p>When you perform a <code>CopyObject</code> operation, if you want to use a different type of encryption setting for the target object, you can specify appropriate encryption-related headers to encrypt the target object with an Amazon S3 managed key, a KMS key, or a customer-provided key. If the encryption setting in your request is different from the default encryption configuration of the destination bucket, the encryption setting in your request takes precedence.</p><note>
1886    /// <p>This functionality is not supported when the destination bucket is a directory bucket.</p>
1887    /// </note>
1888    pub fn get_sse_customer_algorithm(&self) -> &::std::option::Option<::std::string::String> {
1889        &self.sse_customer_algorithm
1890    }
1891    /// <p>Specifies the customer-provided encryption key for Amazon S3 to use in encrypting data. This value is used to store the object and then it is discarded. Amazon S3 does not store the encryption key. The key must be appropriate for use with the algorithm specified in the <code>x-amz-server-side-encryption-customer-algorithm</code> header.</p><note>
1892    /// <p>This functionality is not supported when the destination bucket is a directory bucket.</p>
1893    /// </note>
1894    pub fn sse_customer_key(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
1895        self.sse_customer_key = ::std::option::Option::Some(input.into());
1896        self
1897    }
1898    /// <p>Specifies the customer-provided encryption key for Amazon S3 to use in encrypting data. This value is used to store the object and then it is discarded. Amazon S3 does not store the encryption key. The key must be appropriate for use with the algorithm specified in the <code>x-amz-server-side-encryption-customer-algorithm</code> header.</p><note>
1899    /// <p>This functionality is not supported when the destination bucket is a directory bucket.</p>
1900    /// </note>
1901    pub fn set_sse_customer_key(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
1902        self.sse_customer_key = input;
1903        self
1904    }
1905    /// <p>Specifies the customer-provided encryption key for Amazon S3 to use in encrypting data. This value is used to store the object and then it is discarded. Amazon S3 does not store the encryption key. The key must be appropriate for use with the algorithm specified in the <code>x-amz-server-side-encryption-customer-algorithm</code> header.</p><note>
1906    /// <p>This functionality is not supported when the destination bucket is a directory bucket.</p>
1907    /// </note>
1908    pub fn get_sse_customer_key(&self) -> &::std::option::Option<::std::string::String> {
1909        &self.sse_customer_key
1910    }
1911    /// <p>Specifies the 128-bit MD5 digest of the encryption key according to RFC 1321. Amazon S3 uses this header for a message integrity check to ensure that the encryption key was transmitted without error.</p><note>
1912    /// <p>This functionality is not supported when the destination bucket is a directory bucket.</p>
1913    /// </note>
1914    pub fn sse_customer_key_md5(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
1915        self.sse_customer_key_md5 = ::std::option::Option::Some(input.into());
1916        self
1917    }
1918    /// <p>Specifies the 128-bit MD5 digest of the encryption key according to RFC 1321. Amazon S3 uses this header for a message integrity check to ensure that the encryption key was transmitted without error.</p><note>
1919    /// <p>This functionality is not supported when the destination bucket is a directory bucket.</p>
1920    /// </note>
1921    pub fn set_sse_customer_key_md5(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
1922        self.sse_customer_key_md5 = input;
1923        self
1924    }
1925    /// <p>Specifies the 128-bit MD5 digest of the encryption key according to RFC 1321. Amazon S3 uses this header for a message integrity check to ensure that the encryption key was transmitted without error.</p><note>
1926    /// <p>This functionality is not supported when the destination bucket is a directory bucket.</p>
1927    /// </note>
1928    pub fn get_sse_customer_key_md5(&self) -> &::std::option::Option<::std::string::String> {
1929        &self.sse_customer_key_md5
1930    }
1931    /// <p>Specifies the KMS key ID (Key ID, Key ARN, or Key Alias) to use for object encryption. All GET and PUT requests for an object protected by KMS will fail if they're not made via SSL or using SigV4. For information about configuring any of the officially supported Amazon Web Services SDKs and Amazon Web Services CLI, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/UsingAWSSDK.html#specify-signature-version">Specifying the Signature Version in Request Authentication</a> in the <i>Amazon S3 User Guide</i>.</p>
1932    /// <p><b>Directory buckets</b> - To encrypt data using SSE-KMS, it's recommended to specify the <code>x-amz-server-side-encryption</code> header to <code>aws:kms</code>. Then, the <code>x-amz-server-side-encryption-aws-kms-key-id</code> header implicitly uses the bucket's default KMS customer managed key ID. If you want to explicitly set the <code> x-amz-server-side-encryption-aws-kms-key-id</code> header, it must match the bucket's default customer managed key (using key ID or ARN, not alias). Your SSE-KMS configuration can only support 1 <a href="https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#customer-cmk">customer managed key</a> per directory bucket's lifetime. The <a href="https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#aws-managed-cmk">Amazon Web Services managed key</a> (<code>aws/s3</code>) isn't supported. Incorrect key specification results in an HTTP <code>400 Bad Request</code> error.</p>
1933    pub fn ssekms_key_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
1934        self.ssekms_key_id = ::std::option::Option::Some(input.into());
1935        self
1936    }
1937    /// <p>Specifies the KMS key ID (Key ID, Key ARN, or Key Alias) to use for object encryption. All GET and PUT requests for an object protected by KMS will fail if they're not made via SSL or using SigV4. For information about configuring any of the officially supported Amazon Web Services SDKs and Amazon Web Services CLI, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/UsingAWSSDK.html#specify-signature-version">Specifying the Signature Version in Request Authentication</a> in the <i>Amazon S3 User Guide</i>.</p>
1938    /// <p><b>Directory buckets</b> - To encrypt data using SSE-KMS, it's recommended to specify the <code>x-amz-server-side-encryption</code> header to <code>aws:kms</code>. Then, the <code>x-amz-server-side-encryption-aws-kms-key-id</code> header implicitly uses the bucket's default KMS customer managed key ID. If you want to explicitly set the <code> x-amz-server-side-encryption-aws-kms-key-id</code> header, it must match the bucket's default customer managed key (using key ID or ARN, not alias). Your SSE-KMS configuration can only support 1 <a href="https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#customer-cmk">customer managed key</a> per directory bucket's lifetime. The <a href="https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#aws-managed-cmk">Amazon Web Services managed key</a> (<code>aws/s3</code>) isn't supported. Incorrect key specification results in an HTTP <code>400 Bad Request</code> error.</p>
1939    pub fn set_ssekms_key_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
1940        self.ssekms_key_id = input;
1941        self
1942    }
1943    /// <p>Specifies the KMS key ID (Key ID, Key ARN, or Key Alias) to use for object encryption. All GET and PUT requests for an object protected by KMS will fail if they're not made via SSL or using SigV4. For information about configuring any of the officially supported Amazon Web Services SDKs and Amazon Web Services CLI, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/UsingAWSSDK.html#specify-signature-version">Specifying the Signature Version in Request Authentication</a> in the <i>Amazon S3 User Guide</i>.</p>
1944    /// <p><b>Directory buckets</b> - To encrypt data using SSE-KMS, it's recommended to specify the <code>x-amz-server-side-encryption</code> header to <code>aws:kms</code>. Then, the <code>x-amz-server-side-encryption-aws-kms-key-id</code> header implicitly uses the bucket's default KMS customer managed key ID. If you want to explicitly set the <code> x-amz-server-side-encryption-aws-kms-key-id</code> header, it must match the bucket's default customer managed key (using key ID or ARN, not alias). Your SSE-KMS configuration can only support 1 <a href="https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#customer-cmk">customer managed key</a> per directory bucket's lifetime. The <a href="https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#aws-managed-cmk">Amazon Web Services managed key</a> (<code>aws/s3</code>) isn't supported. Incorrect key specification results in an HTTP <code>400 Bad Request</code> error.</p>
1945    pub fn get_ssekms_key_id(&self) -> &::std::option::Option<::std::string::String> {
1946        &self.ssekms_key_id
1947    }
1948    /// <p>Specifies the Amazon Web Services KMS Encryption Context as an additional encryption context to use for the destination object encryption. The value of this header is a base64-encoded UTF-8 string holding JSON with the encryption context key-value pairs.</p>
1949    /// <p><b>General purpose buckets</b> - This value must be explicitly added to specify encryption context for <code>CopyObject</code> requests if you want an additional encryption context for your destination object. The additional encryption context of the source object won't be copied to the destination object. For more information, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/UsingKMSEncryption.html#encryption-context">Encryption context</a> in the <i>Amazon S3 User Guide</i>.</p>
1950    /// <p><b>Directory buckets</b> - You can optionally provide an explicit encryption context value. The value must match the default encryption context - the bucket Amazon Resource Name (ARN). An additional encryption context value is not supported.</p>
1951    pub fn ssekms_encryption_context(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
1952        self.ssekms_encryption_context = ::std::option::Option::Some(input.into());
1953        self
1954    }
1955    /// <p>Specifies the Amazon Web Services KMS Encryption Context as an additional encryption context to use for the destination object encryption. The value of this header is a base64-encoded UTF-8 string holding JSON with the encryption context key-value pairs.</p>
1956    /// <p><b>General purpose buckets</b> - This value must be explicitly added to specify encryption context for <code>CopyObject</code> requests if you want an additional encryption context for your destination object. The additional encryption context of the source object won't be copied to the destination object. For more information, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/UsingKMSEncryption.html#encryption-context">Encryption context</a> in the <i>Amazon S3 User Guide</i>.</p>
1957    /// <p><b>Directory buckets</b> - You can optionally provide an explicit encryption context value. The value must match the default encryption context - the bucket Amazon Resource Name (ARN). An additional encryption context value is not supported.</p>
1958    pub fn set_ssekms_encryption_context(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
1959        self.ssekms_encryption_context = input;
1960        self
1961    }
1962    /// <p>Specifies the Amazon Web Services KMS Encryption Context as an additional encryption context to use for the destination object encryption. The value of this header is a base64-encoded UTF-8 string holding JSON with the encryption context key-value pairs.</p>
1963    /// <p><b>General purpose buckets</b> - This value must be explicitly added to specify encryption context for <code>CopyObject</code> requests if you want an additional encryption context for your destination object. The additional encryption context of the source object won't be copied to the destination object. For more information, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/UsingKMSEncryption.html#encryption-context">Encryption context</a> in the <i>Amazon S3 User Guide</i>.</p>
1964    /// <p><b>Directory buckets</b> - You can optionally provide an explicit encryption context value. The value must match the default encryption context - the bucket Amazon Resource Name (ARN). An additional encryption context value is not supported.</p>
1965    pub fn get_ssekms_encryption_context(&self) -> &::std::option::Option<::std::string::String> {
1966        &self.ssekms_encryption_context
1967    }
1968    /// <p>Specifies whether Amazon S3 should use an S3 Bucket Key for object encryption with server-side encryption using Key Management Service (KMS) keys (SSE-KMS). If a target object uses SSE-KMS, you can enable an S3 Bucket Key for the object.</p>
1969    /// <p>Setting this header to <code>true</code> causes Amazon S3 to use an S3 Bucket Key for object encryption with SSE-KMS. Specifying this header with a COPY action doesn’t affect bucket-level settings for S3 Bucket Key.</p>
1970    /// <p>For more information, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/bucket-key.html">Amazon S3 Bucket Keys</a> in the <i>Amazon S3 User Guide</i>.</p><note>
1971    /// <p><b>Directory buckets</b> - S3 Bucket Keys aren't supported, when you copy SSE-KMS encrypted objects from general purpose buckets to directory buckets, from directory buckets to general purpose buckets, or between directory buckets, through <a href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_CopyObject.html">CopyObject</a>. In this case, Amazon S3 makes a call to KMS every time a copy request is made for a KMS-encrypted object.</p>
1972    /// </note>
1973    pub fn bucket_key_enabled(mut self, input: bool) -> Self {
1974        self.bucket_key_enabled = ::std::option::Option::Some(input);
1975        self
1976    }
1977    /// <p>Specifies whether Amazon S3 should use an S3 Bucket Key for object encryption with server-side encryption using Key Management Service (KMS) keys (SSE-KMS). If a target object uses SSE-KMS, you can enable an S3 Bucket Key for the object.</p>
1978    /// <p>Setting this header to <code>true</code> causes Amazon S3 to use an S3 Bucket Key for object encryption with SSE-KMS. Specifying this header with a COPY action doesn’t affect bucket-level settings for S3 Bucket Key.</p>
1979    /// <p>For more information, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/bucket-key.html">Amazon S3 Bucket Keys</a> in the <i>Amazon S3 User Guide</i>.</p><note>
1980    /// <p><b>Directory buckets</b> - S3 Bucket Keys aren't supported, when you copy SSE-KMS encrypted objects from general purpose buckets to directory buckets, from directory buckets to general purpose buckets, or between directory buckets, through <a href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_CopyObject.html">CopyObject</a>. In this case, Amazon S3 makes a call to KMS every time a copy request is made for a KMS-encrypted object.</p>
1981    /// </note>
1982    pub fn set_bucket_key_enabled(mut self, input: ::std::option::Option<bool>) -> Self {
1983        self.bucket_key_enabled = input;
1984        self
1985    }
1986    /// <p>Specifies whether Amazon S3 should use an S3 Bucket Key for object encryption with server-side encryption using Key Management Service (KMS) keys (SSE-KMS). If a target object uses SSE-KMS, you can enable an S3 Bucket Key for the object.</p>
1987    /// <p>Setting this header to <code>true</code> causes Amazon S3 to use an S3 Bucket Key for object encryption with SSE-KMS. Specifying this header with a COPY action doesn’t affect bucket-level settings for S3 Bucket Key.</p>
1988    /// <p>For more information, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/bucket-key.html">Amazon S3 Bucket Keys</a> in the <i>Amazon S3 User Guide</i>.</p><note>
1989    /// <p><b>Directory buckets</b> - S3 Bucket Keys aren't supported, when you copy SSE-KMS encrypted objects from general purpose buckets to directory buckets, from directory buckets to general purpose buckets, or between directory buckets, through <a href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_CopyObject.html">CopyObject</a>. In this case, Amazon S3 makes a call to KMS every time a copy request is made for a KMS-encrypted object.</p>
1990    /// </note>
1991    pub fn get_bucket_key_enabled(&self) -> &::std::option::Option<bool> {
1992        &self.bucket_key_enabled
1993    }
1994    /// <p>Specifies the algorithm to use when decrypting the source object (for example, <code>AES256</code>).</p>
1995    /// <p>If the source object for the copy is stored in Amazon S3 using SSE-C, you must provide the necessary encryption information in your request so that Amazon S3 can decrypt the object for copying.</p><note>
1996    /// <p>This functionality is not supported when the source object is in a directory bucket.</p>
1997    /// </note>
1998    pub fn copy_source_sse_customer_algorithm(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
1999        self.copy_source_sse_customer_algorithm = ::std::option::Option::Some(input.into());
2000        self
2001    }
2002    /// <p>Specifies the algorithm to use when decrypting the source object (for example, <code>AES256</code>).</p>
2003    /// <p>If the source object for the copy is stored in Amazon S3 using SSE-C, you must provide the necessary encryption information in your request so that Amazon S3 can decrypt the object for copying.</p><note>
2004    /// <p>This functionality is not supported when the source object is in a directory bucket.</p>
2005    /// </note>
2006    pub fn set_copy_source_sse_customer_algorithm(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
2007        self.copy_source_sse_customer_algorithm = input;
2008        self
2009    }
2010    /// <p>Specifies the algorithm to use when decrypting the source object (for example, <code>AES256</code>).</p>
2011    /// <p>If the source object for the copy is stored in Amazon S3 using SSE-C, you must provide the necessary encryption information in your request so that Amazon S3 can decrypt the object for copying.</p><note>
2012    /// <p>This functionality is not supported when the source object is in a directory bucket.</p>
2013    /// </note>
2014    pub fn get_copy_source_sse_customer_algorithm(&self) -> &::std::option::Option<::std::string::String> {
2015        &self.copy_source_sse_customer_algorithm
2016    }
2017    /// <p>Specifies the customer-provided encryption key for Amazon S3 to use to decrypt the source object. The encryption key provided in this header must be the same one that was used when the source object was created.</p>
2018    /// <p>If the source object for the copy is stored in Amazon S3 using SSE-C, you must provide the necessary encryption information in your request so that Amazon S3 can decrypt the object for copying.</p><note>
2019    /// <p>This functionality is not supported when the source object is in a directory bucket.</p>
2020    /// </note>
2021    pub fn copy_source_sse_customer_key(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
2022        self.copy_source_sse_customer_key = ::std::option::Option::Some(input.into());
2023        self
2024    }
2025    /// <p>Specifies the customer-provided encryption key for Amazon S3 to use to decrypt the source object. The encryption key provided in this header must be the same one that was used when the source object was created.</p>
2026    /// <p>If the source object for the copy is stored in Amazon S3 using SSE-C, you must provide the necessary encryption information in your request so that Amazon S3 can decrypt the object for copying.</p><note>
2027    /// <p>This functionality is not supported when the source object is in a directory bucket.</p>
2028    /// </note>
2029    pub fn set_copy_source_sse_customer_key(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
2030        self.copy_source_sse_customer_key = input;
2031        self
2032    }
2033    /// <p>Specifies the customer-provided encryption key for Amazon S3 to use to decrypt the source object. The encryption key provided in this header must be the same one that was used when the source object was created.</p>
2034    /// <p>If the source object for the copy is stored in Amazon S3 using SSE-C, you must provide the necessary encryption information in your request so that Amazon S3 can decrypt the object for copying.</p><note>
2035    /// <p>This functionality is not supported when the source object is in a directory bucket.</p>
2036    /// </note>
2037    pub fn get_copy_source_sse_customer_key(&self) -> &::std::option::Option<::std::string::String> {
2038        &self.copy_source_sse_customer_key
2039    }
2040    /// <p>Specifies the 128-bit MD5 digest of the encryption key according to RFC 1321. Amazon S3 uses this header for a message integrity check to ensure that the encryption key was transmitted without error.</p>
2041    /// <p>If the source object for the copy is stored in Amazon S3 using SSE-C, you must provide the necessary encryption information in your request so that Amazon S3 can decrypt the object for copying.</p><note>
2042    /// <p>This functionality is not supported when the source object is in a directory bucket.</p>
2043    /// </note>
2044    pub fn copy_source_sse_customer_key_md5(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
2045        self.copy_source_sse_customer_key_md5 = ::std::option::Option::Some(input.into());
2046        self
2047    }
2048    /// <p>Specifies the 128-bit MD5 digest of the encryption key according to RFC 1321. Amazon S3 uses this header for a message integrity check to ensure that the encryption key was transmitted without error.</p>
2049    /// <p>If the source object for the copy is stored in Amazon S3 using SSE-C, you must provide the necessary encryption information in your request so that Amazon S3 can decrypt the object for copying.</p><note>
2050    /// <p>This functionality is not supported when the source object is in a directory bucket.</p>
2051    /// </note>
2052    pub fn set_copy_source_sse_customer_key_md5(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
2053        self.copy_source_sse_customer_key_md5 = input;
2054        self
2055    }
2056    /// <p>Specifies the 128-bit MD5 digest of the encryption key according to RFC 1321. Amazon S3 uses this header for a message integrity check to ensure that the encryption key was transmitted without error.</p>
2057    /// <p>If the source object for the copy is stored in Amazon S3 using SSE-C, you must provide the necessary encryption information in your request so that Amazon S3 can decrypt the object for copying.</p><note>
2058    /// <p>This functionality is not supported when the source object is in a directory bucket.</p>
2059    /// </note>
2060    pub fn get_copy_source_sse_customer_key_md5(&self) -> &::std::option::Option<::std::string::String> {
2061        &self.copy_source_sse_customer_key_md5
2062    }
2063    /// <p>Confirms that the requester knows that they will be charged for the request. Bucket owners need not specify this parameter in their requests. If either the source or destination S3 bucket has Requester Pays enabled, the requester will pay for the corresponding charges. For information about downloading objects from Requester Pays buckets, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/ObjectsinRequesterPaysBuckets.html">Downloading Objects in Requester Pays Buckets</a> in the <i>Amazon S3 User Guide</i>.</p><note>
2064    /// <p>This functionality is not supported for directory buckets.</p>
2065    /// </note>
2066    pub fn request_payer(mut self, input: crate::types::RequestPayer) -> Self {
2067        self.request_payer = ::std::option::Option::Some(input);
2068        self
2069    }
2070    /// <p>Confirms that the requester knows that they will be charged for the request. Bucket owners need not specify this parameter in their requests. If either the source or destination S3 bucket has Requester Pays enabled, the requester will pay for the corresponding charges. For information about downloading objects from Requester Pays buckets, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/ObjectsinRequesterPaysBuckets.html">Downloading Objects in Requester Pays Buckets</a> in the <i>Amazon S3 User Guide</i>.</p><note>
2071    /// <p>This functionality is not supported for directory buckets.</p>
2072    /// </note>
2073    pub fn set_request_payer(mut self, input: ::std::option::Option<crate::types::RequestPayer>) -> Self {
2074        self.request_payer = input;
2075        self
2076    }
2077    /// <p>Confirms that the requester knows that they will be charged for the request. Bucket owners need not specify this parameter in their requests. If either the source or destination S3 bucket has Requester Pays enabled, the requester will pay for the corresponding charges. For information about downloading objects from Requester Pays buckets, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/ObjectsinRequesterPaysBuckets.html">Downloading Objects in Requester Pays Buckets</a> in the <i>Amazon S3 User Guide</i>.</p><note>
2078    /// <p>This functionality is not supported for directory buckets.</p>
2079    /// </note>
2080    pub fn get_request_payer(&self) -> &::std::option::Option<crate::types::RequestPayer> {
2081        &self.request_payer
2082    }
2083    /// <p>The tag-set for the object copy in the destination bucket. This value must be used in conjunction with the <code>x-amz-tagging-directive</code> if you choose <code>REPLACE</code> for the <code>x-amz-tagging-directive</code>. If you choose <code>COPY</code> for the <code>x-amz-tagging-directive</code>, you don't need to set the <code>x-amz-tagging</code> header, because the tag-set will be copied from the source object directly. The tag-set must be encoded as URL Query parameters.</p>
2084    /// <p>The default value is the empty value.</p><note>
2085    /// <p><b>Directory buckets</b> - For directory buckets in a <code>CopyObject</code> operation, only the empty tag-set is supported. Any requests that attempt to write non-empty tags into directory buckets will receive a <code>501 Not Implemented</code> status code. When the destination bucket is a directory bucket, you will receive a <code>501 Not Implemented</code> response in any of the following situations:</p>
2086    /// <ul>
2087    /// <li>
2088    /// <p>When you attempt to <code>COPY</code> the tag-set from an S3 source object that has non-empty tags.</p></li>
2089    /// <li>
2090    /// <p>When you attempt to <code>REPLACE</code> the tag-set of a source object and set a non-empty value to <code>x-amz-tagging</code>.</p></li>
2091    /// <li>
2092    /// <p>When you don't set the <code>x-amz-tagging-directive</code> header and the source object has non-empty tags. This is because the default value of <code>x-amz-tagging-directive</code> is <code>COPY</code>.</p></li>
2093    /// </ul>
2094    /// <p>Because only the empty tag-set is supported for directory buckets in a <code>CopyObject</code> operation, the following situations are allowed:</p>
2095    /// <ul>
2096    /// <li>
2097    /// <p>When you attempt to <code>COPY</code> the tag-set from a directory bucket source object that has no tags to a general purpose bucket. It copies an empty tag-set to the destination object.</p></li>
2098    /// <li>
2099    /// <p>When you attempt to <code>REPLACE</code> the tag-set of a directory bucket source object and set the <code>x-amz-tagging</code> value of the directory bucket destination object to empty.</p></li>
2100    /// <li>
2101    /// <p>When you attempt to <code>REPLACE</code> the tag-set of a general purpose bucket source object that has non-empty tags and set the <code>x-amz-tagging</code> value of the directory bucket destination object to empty.</p></li>
2102    /// <li>
2103    /// <p>When you attempt to <code>REPLACE</code> the tag-set of a directory bucket source object and don't set the <code>x-amz-tagging</code> value of the directory bucket destination object. This is because the default value of <code>x-amz-tagging</code> is the empty value.</p></li>
2104    /// </ul>
2105    /// </note>
2106    pub fn tagging(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
2107        self.tagging = ::std::option::Option::Some(input.into());
2108        self
2109    }
2110    /// <p>The tag-set for the object copy in the destination bucket. This value must be used in conjunction with the <code>x-amz-tagging-directive</code> if you choose <code>REPLACE</code> for the <code>x-amz-tagging-directive</code>. If you choose <code>COPY</code> for the <code>x-amz-tagging-directive</code>, you don't need to set the <code>x-amz-tagging</code> header, because the tag-set will be copied from the source object directly. The tag-set must be encoded as URL Query parameters.</p>
2111    /// <p>The default value is the empty value.</p><note>
2112    /// <p><b>Directory buckets</b> - For directory buckets in a <code>CopyObject</code> operation, only the empty tag-set is supported. Any requests that attempt to write non-empty tags into directory buckets will receive a <code>501 Not Implemented</code> status code. When the destination bucket is a directory bucket, you will receive a <code>501 Not Implemented</code> response in any of the following situations:</p>
2113    /// <ul>
2114    /// <li>
2115    /// <p>When you attempt to <code>COPY</code> the tag-set from an S3 source object that has non-empty tags.</p></li>
2116    /// <li>
2117    /// <p>When you attempt to <code>REPLACE</code> the tag-set of a source object and set a non-empty value to <code>x-amz-tagging</code>.</p></li>
2118    /// <li>
2119    /// <p>When you don't set the <code>x-amz-tagging-directive</code> header and the source object has non-empty tags. This is because the default value of <code>x-amz-tagging-directive</code> is <code>COPY</code>.</p></li>
2120    /// </ul>
2121    /// <p>Because only the empty tag-set is supported for directory buckets in a <code>CopyObject</code> operation, the following situations are allowed:</p>
2122    /// <ul>
2123    /// <li>
2124    /// <p>When you attempt to <code>COPY</code> the tag-set from a directory bucket source object that has no tags to a general purpose bucket. It copies an empty tag-set to the destination object.</p></li>
2125    /// <li>
2126    /// <p>When you attempt to <code>REPLACE</code> the tag-set of a directory bucket source object and set the <code>x-amz-tagging</code> value of the directory bucket destination object to empty.</p></li>
2127    /// <li>
2128    /// <p>When you attempt to <code>REPLACE</code> the tag-set of a general purpose bucket source object that has non-empty tags and set the <code>x-amz-tagging</code> value of the directory bucket destination object to empty.</p></li>
2129    /// <li>
2130    /// <p>When you attempt to <code>REPLACE</code> the tag-set of a directory bucket source object and don't set the <code>x-amz-tagging</code> value of the directory bucket destination object. This is because the default value of <code>x-amz-tagging</code> is the empty value.</p></li>
2131    /// </ul>
2132    /// </note>
2133    pub fn set_tagging(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
2134        self.tagging = input;
2135        self
2136    }
2137    /// <p>The tag-set for the object copy in the destination bucket. This value must be used in conjunction with the <code>x-amz-tagging-directive</code> if you choose <code>REPLACE</code> for the <code>x-amz-tagging-directive</code>. If you choose <code>COPY</code> for the <code>x-amz-tagging-directive</code>, you don't need to set the <code>x-amz-tagging</code> header, because the tag-set will be copied from the source object directly. The tag-set must be encoded as URL Query parameters.</p>
2138    /// <p>The default value is the empty value.</p><note>
2139    /// <p><b>Directory buckets</b> - For directory buckets in a <code>CopyObject</code> operation, only the empty tag-set is supported. Any requests that attempt to write non-empty tags into directory buckets will receive a <code>501 Not Implemented</code> status code. When the destination bucket is a directory bucket, you will receive a <code>501 Not Implemented</code> response in any of the following situations:</p>
2140    /// <ul>
2141    /// <li>
2142    /// <p>When you attempt to <code>COPY</code> the tag-set from an S3 source object that has non-empty tags.</p></li>
2143    /// <li>
2144    /// <p>When you attempt to <code>REPLACE</code> the tag-set of a source object and set a non-empty value to <code>x-amz-tagging</code>.</p></li>
2145    /// <li>
2146    /// <p>When you don't set the <code>x-amz-tagging-directive</code> header and the source object has non-empty tags. This is because the default value of <code>x-amz-tagging-directive</code> is <code>COPY</code>.</p></li>
2147    /// </ul>
2148    /// <p>Because only the empty tag-set is supported for directory buckets in a <code>CopyObject</code> operation, the following situations are allowed:</p>
2149    /// <ul>
2150    /// <li>
2151    /// <p>When you attempt to <code>COPY</code> the tag-set from a directory bucket source object that has no tags to a general purpose bucket. It copies an empty tag-set to the destination object.</p></li>
2152    /// <li>
2153    /// <p>When you attempt to <code>REPLACE</code> the tag-set of a directory bucket source object and set the <code>x-amz-tagging</code> value of the directory bucket destination object to empty.</p></li>
2154    /// <li>
2155    /// <p>When you attempt to <code>REPLACE</code> the tag-set of a general purpose bucket source object that has non-empty tags and set the <code>x-amz-tagging</code> value of the directory bucket destination object to empty.</p></li>
2156    /// <li>
2157    /// <p>When you attempt to <code>REPLACE</code> the tag-set of a directory bucket source object and don't set the <code>x-amz-tagging</code> value of the directory bucket destination object. This is because the default value of <code>x-amz-tagging</code> is the empty value.</p></li>
2158    /// </ul>
2159    /// </note>
2160    pub fn get_tagging(&self) -> &::std::option::Option<::std::string::String> {
2161        &self.tagging
2162    }
2163    /// <p>The Object Lock mode that you want to apply to the object copy.</p><note>
2164    /// <p>This functionality is not supported for directory buckets.</p>
2165    /// </note>
2166    pub fn object_lock_mode(mut self, input: crate::types::ObjectLockMode) -> Self {
2167        self.object_lock_mode = ::std::option::Option::Some(input);
2168        self
2169    }
2170    /// <p>The Object Lock mode that you want to apply to the object copy.</p><note>
2171    /// <p>This functionality is not supported for directory buckets.</p>
2172    /// </note>
2173    pub fn set_object_lock_mode(mut self, input: ::std::option::Option<crate::types::ObjectLockMode>) -> Self {
2174        self.object_lock_mode = input;
2175        self
2176    }
2177    /// <p>The Object Lock mode that you want to apply to the object copy.</p><note>
2178    /// <p>This functionality is not supported for directory buckets.</p>
2179    /// </note>
2180    pub fn get_object_lock_mode(&self) -> &::std::option::Option<crate::types::ObjectLockMode> {
2181        &self.object_lock_mode
2182    }
2183    /// <p>The date and time when you want the Object Lock of the object copy to expire.</p><note>
2184    /// <p>This functionality is not supported for directory buckets.</p>
2185    /// </note>
2186    pub fn object_lock_retain_until_date(mut self, input: ::aws_smithy_types::DateTime) -> Self {
2187        self.object_lock_retain_until_date = ::std::option::Option::Some(input);
2188        self
2189    }
2190    /// <p>The date and time when you want the Object Lock of the object copy to expire.</p><note>
2191    /// <p>This functionality is not supported for directory buckets.</p>
2192    /// </note>
2193    pub fn set_object_lock_retain_until_date(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
2194        self.object_lock_retain_until_date = input;
2195        self
2196    }
2197    /// <p>The date and time when you want the Object Lock of the object copy to expire.</p><note>
2198    /// <p>This functionality is not supported for directory buckets.</p>
2199    /// </note>
2200    pub fn get_object_lock_retain_until_date(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
2201        &self.object_lock_retain_until_date
2202    }
2203    /// <p>Specifies whether you want to apply a legal hold to the object copy.</p><note>
2204    /// <p>This functionality is not supported for directory buckets.</p>
2205    /// </note>
2206    pub fn object_lock_legal_hold_status(mut self, input: crate::types::ObjectLockLegalHoldStatus) -> Self {
2207        self.object_lock_legal_hold_status = ::std::option::Option::Some(input);
2208        self
2209    }
2210    /// <p>Specifies whether you want to apply a legal hold to the object copy.</p><note>
2211    /// <p>This functionality is not supported for directory buckets.</p>
2212    /// </note>
2213    pub fn set_object_lock_legal_hold_status(mut self, input: ::std::option::Option<crate::types::ObjectLockLegalHoldStatus>) -> Self {
2214        self.object_lock_legal_hold_status = input;
2215        self
2216    }
2217    /// <p>Specifies whether you want to apply a legal hold to the object copy.</p><note>
2218    /// <p>This functionality is not supported for directory buckets.</p>
2219    /// </note>
2220    pub fn get_object_lock_legal_hold_status(&self) -> &::std::option::Option<crate::types::ObjectLockLegalHoldStatus> {
2221        &self.object_lock_legal_hold_status
2222    }
2223    /// <p>The event hold status to apply to the object copy. Set to <code>ON</code> to enable or <code>OFF</code> to disable.</p><note>
2224    /// <p>This functionality is not supported for directory buckets.</p>
2225    /// </note>
2226    pub fn object_lock_event_hold(mut self, input: crate::types::ObjectLockEventHold) -> Self {
2227        self.object_lock_event_hold = ::std::option::Option::Some(input);
2228        self
2229    }
2230    /// <p>The event hold status to apply to the object copy. Set to <code>ON</code> to enable or <code>OFF</code> to disable.</p><note>
2231    /// <p>This functionality is not supported for directory buckets.</p>
2232    /// </note>
2233    pub fn set_object_lock_event_hold(mut self, input: ::std::option::Option<crate::types::ObjectLockEventHold>) -> Self {
2234        self.object_lock_event_hold = input;
2235        self
2236    }
2237    /// <p>The event hold status to apply to the object copy. Set to <code>ON</code> to enable or <code>OFF</code> to disable.</p><note>
2238    /// <p>This functionality is not supported for directory buckets.</p>
2239    /// </note>
2240    pub fn get_object_lock_event_hold(&self) -> &::std::option::Option<crate::types::ObjectLockEventHold> {
2241        &self.object_lock_event_hold
2242    }
2243    /// <p>The event hold duration in days to apply to the object copy. You cannot specify a duration in both days and years.</p><note>
2244    /// <p>This functionality is not supported for directory buckets.</p>
2245    /// </note>
2246    pub fn object_lock_event_hold_duration_days(mut self, input: i32) -> Self {
2247        self.object_lock_event_hold_duration_days = ::std::option::Option::Some(input);
2248        self
2249    }
2250    /// <p>The event hold duration in days to apply to the object copy. You cannot specify a duration in both days and years.</p><note>
2251    /// <p>This functionality is not supported for directory buckets.</p>
2252    /// </note>
2253    pub fn set_object_lock_event_hold_duration_days(mut self, input: ::std::option::Option<i32>) -> Self {
2254        self.object_lock_event_hold_duration_days = input;
2255        self
2256    }
2257    /// <p>The event hold duration in days to apply to the object copy. You cannot specify a duration in both days and years.</p><note>
2258    /// <p>This functionality is not supported for directory buckets.</p>
2259    /// </note>
2260    pub fn get_object_lock_event_hold_duration_days(&self) -> &::std::option::Option<i32> {
2261        &self.object_lock_event_hold_duration_days
2262    }
2263    /// <p>The event hold duration in years to apply to the object copy. You cannot specify a duration in both days and years.</p><note>
2264    /// <p>This functionality is not supported for directory buckets.</p>
2265    /// </note>
2266    pub fn object_lock_event_hold_duration_years(mut self, input: i32) -> Self {
2267        self.object_lock_event_hold_duration_years = ::std::option::Option::Some(input);
2268        self
2269    }
2270    /// <p>The event hold duration in years to apply to the object copy. You cannot specify a duration in both days and years.</p><note>
2271    /// <p>This functionality is not supported for directory buckets.</p>
2272    /// </note>
2273    pub fn set_object_lock_event_hold_duration_years(mut self, input: ::std::option::Option<i32>) -> Self {
2274        self.object_lock_event_hold_duration_years = input;
2275        self
2276    }
2277    /// <p>The event hold duration in years to apply to the object copy. You cannot specify a duration in both days and years.</p><note>
2278    /// <p>This functionality is not supported for directory buckets.</p>
2279    /// </note>
2280    pub fn get_object_lock_event_hold_duration_years(&self) -> &::std::option::Option<i32> {
2281        &self.object_lock_event_hold_duration_years
2282    }
2283    /// <p>The account ID of the expected destination bucket owner. If the account ID that you provide does not match the actual owner of the destination bucket, the request fails with the HTTP status code <code>403 Forbidden</code> (access denied).</p>
2284    pub fn expected_bucket_owner(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
2285        self.expected_bucket_owner = ::std::option::Option::Some(input.into());
2286        self
2287    }
2288    /// <p>The account ID of the expected destination bucket owner. If the account ID that you provide does not match the actual owner of the destination bucket, the request fails with the HTTP status code <code>403 Forbidden</code> (access denied).</p>
2289    pub fn set_expected_bucket_owner(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
2290        self.expected_bucket_owner = input;
2291        self
2292    }
2293    /// <p>The account ID of the expected destination bucket owner. If the account ID that you provide does not match the actual owner of the destination bucket, the request fails with the HTTP status code <code>403 Forbidden</code> (access denied).</p>
2294    pub fn get_expected_bucket_owner(&self) -> &::std::option::Option<::std::string::String> {
2295        &self.expected_bucket_owner
2296    }
2297    /// <p>The account ID of the expected source bucket owner. If the account ID that you provide does not match the actual owner of the source bucket, the request fails with the HTTP status code <code>403 Forbidden</code> (access denied).</p>
2298    pub fn expected_source_bucket_owner(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
2299        self.expected_source_bucket_owner = ::std::option::Option::Some(input.into());
2300        self
2301    }
2302    /// <p>The account ID of the expected source bucket owner. If the account ID that you provide does not match the actual owner of the source bucket, the request fails with the HTTP status code <code>403 Forbidden</code> (access denied).</p>
2303    pub fn set_expected_source_bucket_owner(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
2304        self.expected_source_bucket_owner = input;
2305        self
2306    }
2307    /// <p>The account ID of the expected source bucket owner. If the account ID that you provide does not match the actual owner of the source bucket, the request fails with the HTTP status code <code>403 Forbidden</code> (access denied).</p>
2308    pub fn get_expected_source_bucket_owner(&self) -> &::std::option::Option<::std::string::String> {
2309        &self.expected_source_bucket_owner
2310    }
2311    /// Consumes the builder and constructs a [`CopyObjectInput`](crate::operation::copy_object::CopyObjectInput).
2312    pub fn build(self) -> ::std::result::Result<crate::operation::copy_object::CopyObjectInput, ::aws_smithy_types::error::operation::BuildError> {
2313        ::std::result::Result::Ok(crate::operation::copy_object::CopyObjectInput {
2314            acl: self.acl,
2315            bucket: self.bucket,
2316            cache_control: self.cache_control,
2317            checksum_algorithm: self.checksum_algorithm,
2318            content_disposition: self.content_disposition,
2319            content_encoding: self.content_encoding,
2320            content_language: self.content_language,
2321            content_type: self.content_type,
2322            copy_source: self.copy_source,
2323            copy_source_if_match: self.copy_source_if_match,
2324            copy_source_if_modified_since: self.copy_source_if_modified_since,
2325            copy_source_if_none_match: self.copy_source_if_none_match,
2326            copy_source_if_unmodified_since: self.copy_source_if_unmodified_since,
2327            expires: self.expires,
2328            grant_full_control: self.grant_full_control,
2329            grant_read: self.grant_read,
2330            grant_read_acp: self.grant_read_acp,
2331            grant_write_acp: self.grant_write_acp,
2332            if_match: self.if_match,
2333            if_none_match: self.if_none_match,
2334            key: self.key,
2335            metadata: self.metadata,
2336            metadata_directive: self.metadata_directive,
2337            tagging_directive: self.tagging_directive,
2338            annotation_directive: self.annotation_directive,
2339            server_side_encryption: self.server_side_encryption,
2340            storage_class: self.storage_class,
2341            website_redirect_location: self.website_redirect_location,
2342            sse_customer_algorithm: self.sse_customer_algorithm,
2343            sse_customer_key: self.sse_customer_key,
2344            sse_customer_key_md5: self.sse_customer_key_md5,
2345            ssekms_key_id: self.ssekms_key_id,
2346            ssekms_encryption_context: self.ssekms_encryption_context,
2347            bucket_key_enabled: self.bucket_key_enabled,
2348            copy_source_sse_customer_algorithm: self.copy_source_sse_customer_algorithm,
2349            copy_source_sse_customer_key: self.copy_source_sse_customer_key,
2350            copy_source_sse_customer_key_md5: self.copy_source_sse_customer_key_md5,
2351            request_payer: self.request_payer,
2352            tagging: self.tagging,
2353            object_lock_mode: self.object_lock_mode,
2354            object_lock_retain_until_date: self.object_lock_retain_until_date,
2355            object_lock_legal_hold_status: self.object_lock_legal_hold_status,
2356            object_lock_event_hold: self.object_lock_event_hold,
2357            object_lock_event_hold_duration_days: self.object_lock_event_hold_duration_days,
2358            object_lock_event_hold_duration_years: self.object_lock_event_hold_duration_years,
2359            expected_bucket_owner: self.expected_bucket_owner,
2360            expected_source_bucket_owner: self.expected_source_bucket_owner,
2361        })
2362    }
2363}
2364impl ::std::fmt::Debug for CopyObjectInputBuilder {
2365    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
2366        let mut formatter = f.debug_struct("CopyObjectInputBuilder");
2367        formatter.field("acl", &self.acl);
2368        formatter.field("bucket", &self.bucket);
2369        formatter.field("cache_control", &self.cache_control);
2370        formatter.field("checksum_algorithm", &self.checksum_algorithm);
2371        formatter.field("content_disposition", &self.content_disposition);
2372        formatter.field("content_encoding", &self.content_encoding);
2373        formatter.field("content_language", &self.content_language);
2374        formatter.field("content_type", &self.content_type);
2375        formatter.field("copy_source", &self.copy_source);
2376        formatter.field("copy_source_if_match", &self.copy_source_if_match);
2377        formatter.field("copy_source_if_modified_since", &self.copy_source_if_modified_since);
2378        formatter.field("copy_source_if_none_match", &self.copy_source_if_none_match);
2379        formatter.field("copy_source_if_unmodified_since", &self.copy_source_if_unmodified_since);
2380        formatter.field("expires", &self.expires);
2381        formatter.field("grant_full_control", &self.grant_full_control);
2382        formatter.field("grant_read", &self.grant_read);
2383        formatter.field("grant_read_acp", &self.grant_read_acp);
2384        formatter.field("grant_write_acp", &self.grant_write_acp);
2385        formatter.field("if_match", &self.if_match);
2386        formatter.field("if_none_match", &self.if_none_match);
2387        formatter.field("key", &self.key);
2388        formatter.field("metadata", &self.metadata);
2389        formatter.field("metadata_directive", &self.metadata_directive);
2390        formatter.field("tagging_directive", &self.tagging_directive);
2391        formatter.field("annotation_directive", &self.annotation_directive);
2392        formatter.field("server_side_encryption", &self.server_side_encryption);
2393        formatter.field("storage_class", &self.storage_class);
2394        formatter.field("website_redirect_location", &self.website_redirect_location);
2395        formatter.field("sse_customer_algorithm", &self.sse_customer_algorithm);
2396        formatter.field("sse_customer_key", &"*** Sensitive Data Redacted ***");
2397        formatter.field("sse_customer_key_md5", &self.sse_customer_key_md5);
2398        formatter.field("ssekms_key_id", &"*** Sensitive Data Redacted ***");
2399        formatter.field("ssekms_encryption_context", &"*** Sensitive Data Redacted ***");
2400        formatter.field("bucket_key_enabled", &self.bucket_key_enabled);
2401        formatter.field("copy_source_sse_customer_algorithm", &self.copy_source_sse_customer_algorithm);
2402        formatter.field("copy_source_sse_customer_key", &"*** Sensitive Data Redacted ***");
2403        formatter.field("copy_source_sse_customer_key_md5", &self.copy_source_sse_customer_key_md5);
2404        formatter.field("request_payer", &self.request_payer);
2405        formatter.field("tagging", &self.tagging);
2406        formatter.field("object_lock_mode", &self.object_lock_mode);
2407        formatter.field("object_lock_retain_until_date", &self.object_lock_retain_until_date);
2408        formatter.field("object_lock_legal_hold_status", &self.object_lock_legal_hold_status);
2409        formatter.field("object_lock_event_hold", &self.object_lock_event_hold);
2410        formatter.field("object_lock_event_hold_duration_days", &self.object_lock_event_hold_duration_days);
2411        formatter.field("object_lock_event_hold_duration_years", &self.object_lock_event_hold_duration_years);
2412        formatter.field("expected_bucket_owner", &self.expected_bucket_owner);
2413        formatter.field("expected_source_bucket_owner", &self.expected_source_bucket_owner);
2414        formatter.finish()
2415    }
2416}