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>The key of the destination object.</p>
160    pub key: ::std::option::Option<::std::string::String>,
161    /// <p>A map of metadata to store with the object in S3.</p>
162    pub metadata: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>,
163    /// <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>
164    /// <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>
165    /// <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>
166    /// </note>
167    pub metadata_directive: ::std::option::Option<crate::types::MetadataDirective>,
168    /// <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>
169    /// <p>The default value is <code>COPY</code>.</p><note>
170    /// <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>
171    /// <ul>
172    /// <li>
173    /// <p>When you attempt to <code>COPY</code> the tag-set from an S3 source object that has non-empty tags.</p></li>
174    /// <li>
175    /// <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>
176    /// <li>
177    /// <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>
178    /// </ul>
179    /// <p>Because only the empty tag-set is supported for directory buckets in a <code>CopyObject</code> operation, the following situations are allowed:</p>
180    /// <ul>
181    /// <li>
182    /// <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>
183    /// <li>
184    /// <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>
185    /// <li>
186    /// <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>
187    /// <li>
188    /// <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>
189    /// </ul>
190    /// </note>
191    pub tagging_directive: ::std::option::Option<crate::types::TaggingDirective>,
192    /// <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>
193    /// <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>
194    /// <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>
195    /// <p><b>General purpose buckets </b></p>
196    /// <ul>
197    /// <li>
198    /// <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>
199    /// <li>
200    /// <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>
201    /// </ul>
202    /// <p><b>Directory buckets </b></p>
203    /// <ul>
204    /// <li>
205    /// <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>
206    /// <li>
207    /// <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>
208    /// <li>
209    /// <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>
210    /// </ul>
211    pub server_side_encryption: ::std::option::Option<crate::types::ServerSideEncryption>,
212    /// <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>
213    /// <ul>
214    /// <li>
215    /// <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>
216    /// <li>
217    /// <p><b>Amazon S3 on Outposts </b> - S3 on Outposts only uses the <code>OUTPOSTS</code> Storage Class.</p></li>
218    /// </ul>
219    /// </note>
220    /// <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>
221    /// <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>
222    /// <ul>
223    /// <li>
224    /// <p>The storage class of the source object is <code>GLACIER</code> or <code>DEEP_ARCHIVE</code>.</p></li>
225    /// <li>
226    /// <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>
227    /// </ul>
228    /// <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>
229    pub storage_class: ::std::option::Option<crate::types::StorageClass>,
230    /// <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>
231    /// <p>This functionality is not supported for directory buckets.</p>
232    /// </note>
233    pub website_redirect_location: ::std::option::Option<::std::string::String>,
234    /// <p>Specifies the algorithm to use when encrypting the object (for example, <code>AES256</code>).</p>
235    /// <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>
236    /// <p>This functionality is not supported when the destination bucket is a directory bucket.</p>
237    /// </note>
238    pub sse_customer_algorithm: ::std::option::Option<::std::string::String>,
239    /// <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>
240    /// <p>This functionality is not supported when the destination bucket is a directory bucket.</p>
241    /// </note>
242    pub sse_customer_key: ::std::option::Option<::std::string::String>,
243    /// <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>
244    /// <p>This functionality is not supported when the destination bucket is a directory bucket.</p>
245    /// </note>
246    pub sse_customer_key_md5: ::std::option::Option<::std::string::String>,
247    /// <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>
248    /// <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>
249    pub ssekms_key_id: ::std::option::Option<::std::string::String>,
250    /// <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>
251    /// <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>
252    /// <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>
253    pub ssekms_encryption_context: ::std::option::Option<::std::string::String>,
254    /// <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>
255    /// <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>
256    /// <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>
257    /// <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>
258    /// </note>
259    pub bucket_key_enabled: ::std::option::Option<bool>,
260    /// <p>Specifies the algorithm to use when decrypting the source object (for example, <code>AES256</code>).</p>
261    /// <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>
262    /// <p>This functionality is not supported when the source object is in a directory bucket.</p>
263    /// </note>
264    pub copy_source_sse_customer_algorithm: ::std::option::Option<::std::string::String>,
265    /// <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>
266    /// <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>
267    /// <p>This functionality is not supported when the source object is in a directory bucket.</p>
268    /// </note>
269    pub copy_source_sse_customer_key: ::std::option::Option<::std::string::String>,
270    /// <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>
271    /// <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>
272    /// <p>This functionality is not supported when the source object is in a directory bucket.</p>
273    /// </note>
274    pub copy_source_sse_customer_key_md5: ::std::option::Option<::std::string::String>,
275    /// <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 corresponding charges to copy the object. 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>
276    /// <p>This functionality is not supported for directory buckets.</p>
277    /// </note>
278    pub request_payer: ::std::option::Option<crate::types::RequestPayer>,
279    /// <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>
280    /// <p>The default value is the empty value.</p><note>
281    /// <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>
282    /// <ul>
283    /// <li>
284    /// <p>When you attempt to <code>COPY</code> the tag-set from an S3 source object that has non-empty tags.</p></li>
285    /// <li>
286    /// <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>
287    /// <li>
288    /// <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>
289    /// </ul>
290    /// <p>Because only the empty tag-set is supported for directory buckets in a <code>CopyObject</code> operation, the following situations are allowed:</p>
291    /// <ul>
292    /// <li>
293    /// <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>
294    /// <li>
295    /// <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>
296    /// <li>
297    /// <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>
298    /// <li>
299    /// <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>
300    /// </ul>
301    /// </note>
302    pub tagging: ::std::option::Option<::std::string::String>,
303    /// <p>The Object Lock mode that you want to apply to the object copy.</p><note>
304    /// <p>This functionality is not supported for directory buckets.</p>
305    /// </note>
306    pub object_lock_mode: ::std::option::Option<crate::types::ObjectLockMode>,
307    /// <p>The date and time when you want the Object Lock of the object copy to expire.</p><note>
308    /// <p>This functionality is not supported for directory buckets.</p>
309    /// </note>
310    pub object_lock_retain_until_date: ::std::option::Option<::aws_smithy_types::DateTime>,
311    /// <p>Specifies whether you want to apply a legal hold to the object copy.</p><note>
312    /// <p>This functionality is not supported for directory buckets.</p>
313    /// </note>
314    pub object_lock_legal_hold_status: ::std::option::Option<crate::types::ObjectLockLegalHoldStatus>,
315    /// <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>
316    pub expected_bucket_owner: ::std::option::Option<::std::string::String>,
317    /// <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>
318    pub expected_source_bucket_owner: ::std::option::Option<::std::string::String>,
319}
320impl CopyObjectInput {
321    /// <p>The canned access control list (ACL) to apply to the object.</p>
322    /// <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>
323    /// <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>
324    /// <ul>
325    /// <li>
326    /// <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>
327    /// <li>
328    /// <p>This functionality is not supported for directory buckets.</p></li>
329    /// <li>
330    /// <p>This functionality is not supported for Amazon S3 on Outposts.</p></li>
331    /// </ul>
332    /// </note>
333    pub fn acl(&self) -> ::std::option::Option<&crate::types::ObjectCannedAcl> {
334        self.acl.as_ref()
335    }
336    /// <p>The name of the destination bucket.</p>
337    /// <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>
338    /// <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>
339    /// </note>
340    /// <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>
341    /// <p>Object Lambda access points are not supported by directory buckets.</p>
342    /// </note>
343    /// <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>
344    pub fn bucket(&self) -> ::std::option::Option<&str> {
345        self.bucket.as_deref()
346    }
347    /// <p>Specifies the caching behavior along the request/reply chain.</p>
348    pub fn cache_control(&self) -> ::std::option::Option<&str> {
349        self.cache_control.as_deref()
350    }
351    /// <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>
352    /// <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>
353    /// <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>
354    /// </note>
355    pub fn checksum_algorithm(&self) -> ::std::option::Option<&crate::types::ChecksumAlgorithm> {
356        self.checksum_algorithm.as_ref()
357    }
358    /// <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>
359    pub fn content_disposition(&self) -> ::std::option::Option<&str> {
360        self.content_disposition.as_deref()
361    }
362    /// <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>
363    /// <p>For directory buckets, only the <code>aws-chunked</code> value is supported in this header field.</p>
364    /// </note>
365    pub fn content_encoding(&self) -> ::std::option::Option<&str> {
366        self.content_encoding.as_deref()
367    }
368    /// <p>The language the content is in.</p>
369    pub fn content_language(&self) -> ::std::option::Option<&str> {
370        self.content_language.as_deref()
371    }
372    /// <p>A standard MIME type that describes the format of the object data.</p>
373    pub fn content_type(&self) -> ::std::option::Option<&str> {
374        self.content_type.as_deref()
375    }
376    /// <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>
377    /// <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>
378    /// <ul>
379    /// <li>
380    /// <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>
381    /// <li>
382    /// <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>
383    /// :
384    /// <account-id>
385    /// :accesspoint/
386    /// <access-point-name>
387    /// /object/
388    /// <key></key>
389    /// </access-point-name>
390    /// </account-id>
391    /// </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>
392    /// <ul>
393    /// <li>
394    /// <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>
395    /// <li>
396    /// <p>Access points are not supported by directory buckets.</p></li>
397    /// </ul>
398    /// </note>
399    /// <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>
400    /// :
401    /// <account-id>
402    /// :outpost/
403    /// <outpost-id>
404    /// /object/
405    /// <key></key>
406    /// </outpost-id>
407    /// </account-id>
408    /// </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>
409    /// </ul>
410    /// <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>
411    /// <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>
412    /// <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>
413    /// <p><b>Directory buckets</b> - S3 Versioning isn't enabled and supported for directory buckets.</p>
414    /// </note>
415    pub fn copy_source(&self) -> ::std::option::Option<&str> {
416        self.copy_source.as_deref()
417    }
418    /// <p>Copies the object if its entity tag (ETag) matches the specified tag.</p>
419    /// <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>
420    /// <ul>
421    /// <li>
422    /// <p><code>x-amz-copy-source-if-match</code> condition evaluates to true</p></li>
423    /// <li>
424    /// <p><code>x-amz-copy-source-if-unmodified-since</code> condition evaluates to false</p></li>
425    /// </ul>
426    pub fn copy_source_if_match(&self) -> ::std::option::Option<&str> {
427        self.copy_source_if_match.as_deref()
428    }
429    /// <p>Copies the object if it has been modified since the specified time.</p>
430    /// <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>
431    /// <ul>
432    /// <li>
433    /// <p><code>x-amz-copy-source-if-none-match</code> condition evaluates to false</p></li>
434    /// <li>
435    /// <p><code>x-amz-copy-source-if-modified-since</code> condition evaluates to true</p></li>
436    /// </ul>
437    pub fn copy_source_if_modified_since(&self) -> ::std::option::Option<&::aws_smithy_types::DateTime> {
438        self.copy_source_if_modified_since.as_ref()
439    }
440    /// <p>Copies the object if its entity tag (ETag) is different than the specified ETag.</p>
441    /// <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>
442    /// <ul>
443    /// <li>
444    /// <p><code>x-amz-copy-source-if-none-match</code> condition evaluates to false</p></li>
445    /// <li>
446    /// <p><code>x-amz-copy-source-if-modified-since</code> condition evaluates to true</p></li>
447    /// </ul>
448    pub fn copy_source_if_none_match(&self) -> ::std::option::Option<&str> {
449        self.copy_source_if_none_match.as_deref()
450    }
451    /// <p>Copies the object if it hasn't been modified since the specified time.</p>
452    /// <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>
453    /// <ul>
454    /// <li>
455    /// <p><code>x-amz-copy-source-if-match</code> condition evaluates to true</p></li>
456    /// <li>
457    /// <p><code>x-amz-copy-source-if-unmodified-since</code> condition evaluates to false</p></li>
458    /// </ul>
459    pub fn copy_source_if_unmodified_since(&self) -> ::std::option::Option<&::aws_smithy_types::DateTime> {
460        self.copy_source_if_unmodified_since.as_ref()
461    }
462    /// <p>The date and time at which the object is no longer cacheable.</p>
463    pub fn expires(&self) -> ::std::option::Option<&::aws_smithy_types::DateTime> {
464        self.expires.as_ref()
465    }
466    /// <p>Gives the grantee READ, READ_ACP, and WRITE_ACP permissions on the object.</p><note>
467    /// <ul>
468    /// <li>
469    /// <p>This functionality is not supported for directory buckets.</p></li>
470    /// <li>
471    /// <p>This functionality is not supported for Amazon S3 on Outposts.</p></li>
472    /// </ul>
473    /// </note>
474    pub fn grant_full_control(&self) -> ::std::option::Option<&str> {
475        self.grant_full_control.as_deref()
476    }
477    /// <p>Allows grantee to read the object data and its metadata.</p><note>
478    /// <ul>
479    /// <li>
480    /// <p>This functionality is not supported for directory buckets.</p></li>
481    /// <li>
482    /// <p>This functionality is not supported for Amazon S3 on Outposts.</p></li>
483    /// </ul>
484    /// </note>
485    pub fn grant_read(&self) -> ::std::option::Option<&str> {
486        self.grant_read.as_deref()
487    }
488    /// <p>Allows grantee to read the object ACL.</p><note>
489    /// <ul>
490    /// <li>
491    /// <p>This functionality is not supported for directory buckets.</p></li>
492    /// <li>
493    /// <p>This functionality is not supported for Amazon S3 on Outposts.</p></li>
494    /// </ul>
495    /// </note>
496    pub fn grant_read_acp(&self) -> ::std::option::Option<&str> {
497        self.grant_read_acp.as_deref()
498    }
499    /// <p>Allows grantee to write the ACL for the applicable object.</p><note>
500    /// <ul>
501    /// <li>
502    /// <p>This functionality is not supported for directory buckets.</p></li>
503    /// <li>
504    /// <p>This functionality is not supported for Amazon S3 on Outposts.</p></li>
505    /// </ul>
506    /// </note>
507    pub fn grant_write_acp(&self) -> ::std::option::Option<&str> {
508        self.grant_write_acp.as_deref()
509    }
510    /// <p>The key of the destination object.</p>
511    pub fn key(&self) -> ::std::option::Option<&str> {
512        self.key.as_deref()
513    }
514    /// <p>A map of metadata to store with the object in S3.</p>
515    pub fn metadata(&self) -> ::std::option::Option<&::std::collections::HashMap<::std::string::String, ::std::string::String>> {
516        self.metadata.as_ref()
517    }
518    /// <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>
519    /// <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>
520    /// <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>
521    /// </note>
522    pub fn metadata_directive(&self) -> ::std::option::Option<&crate::types::MetadataDirective> {
523        self.metadata_directive.as_ref()
524    }
525    /// <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>
526    /// <p>The default value is <code>COPY</code>.</p><note>
527    /// <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>
528    /// <ul>
529    /// <li>
530    /// <p>When you attempt to <code>COPY</code> the tag-set from an S3 source object that has non-empty tags.</p></li>
531    /// <li>
532    /// <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>
533    /// <li>
534    /// <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>
535    /// </ul>
536    /// <p>Because only the empty tag-set is supported for directory buckets in a <code>CopyObject</code> operation, the following situations are allowed:</p>
537    /// <ul>
538    /// <li>
539    /// <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>
540    /// <li>
541    /// <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>
542    /// <li>
543    /// <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>
544    /// <li>
545    /// <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>
546    /// </ul>
547    /// </note>
548    pub fn tagging_directive(&self) -> ::std::option::Option<&crate::types::TaggingDirective> {
549        self.tagging_directive.as_ref()
550    }
551    /// <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>
552    /// <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>
553    /// <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>
554    /// <p><b>General purpose buckets </b></p>
555    /// <ul>
556    /// <li>
557    /// <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>
558    /// <li>
559    /// <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>
560    /// </ul>
561    /// <p><b>Directory buckets </b></p>
562    /// <ul>
563    /// <li>
564    /// <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>
565    /// <li>
566    /// <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>
567    /// <li>
568    /// <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>
569    /// </ul>
570    pub fn server_side_encryption(&self) -> ::std::option::Option<&crate::types::ServerSideEncryption> {
571        self.server_side_encryption.as_ref()
572    }
573    /// <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>
574    /// <ul>
575    /// <li>
576    /// <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>
577    /// <li>
578    /// <p><b>Amazon S3 on Outposts </b> - S3 on Outposts only uses the <code>OUTPOSTS</code> Storage Class.</p></li>
579    /// </ul>
580    /// </note>
581    /// <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>
582    /// <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>
583    /// <ul>
584    /// <li>
585    /// <p>The storage class of the source object is <code>GLACIER</code> or <code>DEEP_ARCHIVE</code>.</p></li>
586    /// <li>
587    /// <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>
588    /// </ul>
589    /// <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>
590    pub fn storage_class(&self) -> ::std::option::Option<&crate::types::StorageClass> {
591        self.storage_class.as_ref()
592    }
593    /// <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>
594    /// <p>This functionality is not supported for directory buckets.</p>
595    /// </note>
596    pub fn website_redirect_location(&self) -> ::std::option::Option<&str> {
597        self.website_redirect_location.as_deref()
598    }
599    /// <p>Specifies the algorithm to use when encrypting the object (for example, <code>AES256</code>).</p>
600    /// <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>
601    /// <p>This functionality is not supported when the destination bucket is a directory bucket.</p>
602    /// </note>
603    pub fn sse_customer_algorithm(&self) -> ::std::option::Option<&str> {
604        self.sse_customer_algorithm.as_deref()
605    }
606    /// <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>
607    /// <p>This functionality is not supported when the destination bucket is a directory bucket.</p>
608    /// </note>
609    pub fn sse_customer_key(&self) -> ::std::option::Option<&str> {
610        self.sse_customer_key.as_deref()
611    }
612    /// <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>
613    /// <p>This functionality is not supported when the destination bucket is a directory bucket.</p>
614    /// </note>
615    pub fn sse_customer_key_md5(&self) -> ::std::option::Option<&str> {
616        self.sse_customer_key_md5.as_deref()
617    }
618    /// <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>
619    /// <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>
620    pub fn ssekms_key_id(&self) -> ::std::option::Option<&str> {
621        self.ssekms_key_id.as_deref()
622    }
623    /// <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>
624    /// <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>
625    /// <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>
626    pub fn ssekms_encryption_context(&self) -> ::std::option::Option<&str> {
627        self.ssekms_encryption_context.as_deref()
628    }
629    /// <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>
630    /// <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>
631    /// <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>
632    /// <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>
633    /// </note>
634    pub fn bucket_key_enabled(&self) -> ::std::option::Option<bool> {
635        self.bucket_key_enabled
636    }
637    /// <p>Specifies the algorithm to use when decrypting the source object (for example, <code>AES256</code>).</p>
638    /// <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>
639    /// <p>This functionality is not supported when the source object is in a directory bucket.</p>
640    /// </note>
641    pub fn copy_source_sse_customer_algorithm(&self) -> ::std::option::Option<&str> {
642        self.copy_source_sse_customer_algorithm.as_deref()
643    }
644    /// <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>
645    /// <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>
646    /// <p>This functionality is not supported when the source object is in a directory bucket.</p>
647    /// </note>
648    pub fn copy_source_sse_customer_key(&self) -> ::std::option::Option<&str> {
649        self.copy_source_sse_customer_key.as_deref()
650    }
651    /// <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>
652    /// <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>
653    /// <p>This functionality is not supported when the source object is in a directory bucket.</p>
654    /// </note>
655    pub fn copy_source_sse_customer_key_md5(&self) -> ::std::option::Option<&str> {
656        self.copy_source_sse_customer_key_md5.as_deref()
657    }
658    /// <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 corresponding charges to copy the object. 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>
659    /// <p>This functionality is not supported for directory buckets.</p>
660    /// </note>
661    pub fn request_payer(&self) -> ::std::option::Option<&crate::types::RequestPayer> {
662        self.request_payer.as_ref()
663    }
664    /// <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>
665    /// <p>The default value is the empty value.</p><note>
666    /// <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>
667    /// <ul>
668    /// <li>
669    /// <p>When you attempt to <code>COPY</code> the tag-set from an S3 source object that has non-empty tags.</p></li>
670    /// <li>
671    /// <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>
672    /// <li>
673    /// <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>
674    /// </ul>
675    /// <p>Because only the empty tag-set is supported for directory buckets in a <code>CopyObject</code> operation, the following situations are allowed:</p>
676    /// <ul>
677    /// <li>
678    /// <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>
679    /// <li>
680    /// <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>
681    /// <li>
682    /// <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>
683    /// <li>
684    /// <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>
685    /// </ul>
686    /// </note>
687    pub fn tagging(&self) -> ::std::option::Option<&str> {
688        self.tagging.as_deref()
689    }
690    /// <p>The Object Lock mode that you want to apply to the object copy.</p><note>
691    /// <p>This functionality is not supported for directory buckets.</p>
692    /// </note>
693    pub fn object_lock_mode(&self) -> ::std::option::Option<&crate::types::ObjectLockMode> {
694        self.object_lock_mode.as_ref()
695    }
696    /// <p>The date and time when you want the Object Lock of the object copy to expire.</p><note>
697    /// <p>This functionality is not supported for directory buckets.</p>
698    /// </note>
699    pub fn object_lock_retain_until_date(&self) -> ::std::option::Option<&::aws_smithy_types::DateTime> {
700        self.object_lock_retain_until_date.as_ref()
701    }
702    /// <p>Specifies whether you want to apply a legal hold to the object copy.</p><note>
703    /// <p>This functionality is not supported for directory buckets.</p>
704    /// </note>
705    pub fn object_lock_legal_hold_status(&self) -> ::std::option::Option<&crate::types::ObjectLockLegalHoldStatus> {
706        self.object_lock_legal_hold_status.as_ref()
707    }
708    /// <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>
709    pub fn expected_bucket_owner(&self) -> ::std::option::Option<&str> {
710        self.expected_bucket_owner.as_deref()
711    }
712    /// <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>
713    pub fn expected_source_bucket_owner(&self) -> ::std::option::Option<&str> {
714        self.expected_source_bucket_owner.as_deref()
715    }
716}
717impl ::std::fmt::Debug for CopyObjectInput {
718    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
719        let mut formatter = f.debug_struct("CopyObjectInput");
720        formatter.field("acl", &self.acl);
721        formatter.field("bucket", &self.bucket);
722        formatter.field("cache_control", &self.cache_control);
723        formatter.field("checksum_algorithm", &self.checksum_algorithm);
724        formatter.field("content_disposition", &self.content_disposition);
725        formatter.field("content_encoding", &self.content_encoding);
726        formatter.field("content_language", &self.content_language);
727        formatter.field("content_type", &self.content_type);
728        formatter.field("copy_source", &self.copy_source);
729        formatter.field("copy_source_if_match", &self.copy_source_if_match);
730        formatter.field("copy_source_if_modified_since", &self.copy_source_if_modified_since);
731        formatter.field("copy_source_if_none_match", &self.copy_source_if_none_match);
732        formatter.field("copy_source_if_unmodified_since", &self.copy_source_if_unmodified_since);
733        formatter.field("expires", &self.expires);
734        formatter.field("grant_full_control", &self.grant_full_control);
735        formatter.field("grant_read", &self.grant_read);
736        formatter.field("grant_read_acp", &self.grant_read_acp);
737        formatter.field("grant_write_acp", &self.grant_write_acp);
738        formatter.field("key", &self.key);
739        formatter.field("metadata", &self.metadata);
740        formatter.field("metadata_directive", &self.metadata_directive);
741        formatter.field("tagging_directive", &self.tagging_directive);
742        formatter.field("server_side_encryption", &self.server_side_encryption);
743        formatter.field("storage_class", &self.storage_class);
744        formatter.field("website_redirect_location", &self.website_redirect_location);
745        formatter.field("sse_customer_algorithm", &self.sse_customer_algorithm);
746        formatter.field("sse_customer_key", &"*** Sensitive Data Redacted ***");
747        formatter.field("sse_customer_key_md5", &self.sse_customer_key_md5);
748        formatter.field("ssekms_key_id", &"*** Sensitive Data Redacted ***");
749        formatter.field("ssekms_encryption_context", &"*** Sensitive Data Redacted ***");
750        formatter.field("bucket_key_enabled", &self.bucket_key_enabled);
751        formatter.field("copy_source_sse_customer_algorithm", &self.copy_source_sse_customer_algorithm);
752        formatter.field("copy_source_sse_customer_key", &"*** Sensitive Data Redacted ***");
753        formatter.field("copy_source_sse_customer_key_md5", &self.copy_source_sse_customer_key_md5);
754        formatter.field("request_payer", &self.request_payer);
755        formatter.field("tagging", &self.tagging);
756        formatter.field("object_lock_mode", &self.object_lock_mode);
757        formatter.field("object_lock_retain_until_date", &self.object_lock_retain_until_date);
758        formatter.field("object_lock_legal_hold_status", &self.object_lock_legal_hold_status);
759        formatter.field("expected_bucket_owner", &self.expected_bucket_owner);
760        formatter.field("expected_source_bucket_owner", &self.expected_source_bucket_owner);
761        formatter.finish()
762    }
763}
764impl CopyObjectInput {
765    /// Creates a new builder-style object to manufacture [`CopyObjectInput`](crate::operation::copy_object::CopyObjectInput).
766    pub fn builder() -> crate::operation::copy_object::builders::CopyObjectInputBuilder {
767        crate::operation::copy_object::builders::CopyObjectInputBuilder::default()
768    }
769}
770
771/// A builder for [`CopyObjectInput`](crate::operation::copy_object::CopyObjectInput).
772#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default)]
773#[non_exhaustive]
774pub struct CopyObjectInputBuilder {
775    pub(crate) acl: ::std::option::Option<crate::types::ObjectCannedAcl>,
776    pub(crate) bucket: ::std::option::Option<::std::string::String>,
777    pub(crate) cache_control: ::std::option::Option<::std::string::String>,
778    pub(crate) checksum_algorithm: ::std::option::Option<crate::types::ChecksumAlgorithm>,
779    pub(crate) content_disposition: ::std::option::Option<::std::string::String>,
780    pub(crate) content_encoding: ::std::option::Option<::std::string::String>,
781    pub(crate) content_language: ::std::option::Option<::std::string::String>,
782    pub(crate) content_type: ::std::option::Option<::std::string::String>,
783    pub(crate) copy_source: ::std::option::Option<::std::string::String>,
784    pub(crate) copy_source_if_match: ::std::option::Option<::std::string::String>,
785    pub(crate) copy_source_if_modified_since: ::std::option::Option<::aws_smithy_types::DateTime>,
786    pub(crate) copy_source_if_none_match: ::std::option::Option<::std::string::String>,
787    pub(crate) copy_source_if_unmodified_since: ::std::option::Option<::aws_smithy_types::DateTime>,
788    pub(crate) expires: ::std::option::Option<::aws_smithy_types::DateTime>,
789    pub(crate) grant_full_control: ::std::option::Option<::std::string::String>,
790    pub(crate) grant_read: ::std::option::Option<::std::string::String>,
791    pub(crate) grant_read_acp: ::std::option::Option<::std::string::String>,
792    pub(crate) grant_write_acp: ::std::option::Option<::std::string::String>,
793    pub(crate) key: ::std::option::Option<::std::string::String>,
794    pub(crate) metadata: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>,
795    pub(crate) metadata_directive: ::std::option::Option<crate::types::MetadataDirective>,
796    pub(crate) tagging_directive: ::std::option::Option<crate::types::TaggingDirective>,
797    pub(crate) server_side_encryption: ::std::option::Option<crate::types::ServerSideEncryption>,
798    pub(crate) storage_class: ::std::option::Option<crate::types::StorageClass>,
799    pub(crate) website_redirect_location: ::std::option::Option<::std::string::String>,
800    pub(crate) sse_customer_algorithm: ::std::option::Option<::std::string::String>,
801    pub(crate) sse_customer_key: ::std::option::Option<::std::string::String>,
802    pub(crate) sse_customer_key_md5: ::std::option::Option<::std::string::String>,
803    pub(crate) ssekms_key_id: ::std::option::Option<::std::string::String>,
804    pub(crate) ssekms_encryption_context: ::std::option::Option<::std::string::String>,
805    pub(crate) bucket_key_enabled: ::std::option::Option<bool>,
806    pub(crate) copy_source_sse_customer_algorithm: ::std::option::Option<::std::string::String>,
807    pub(crate) copy_source_sse_customer_key: ::std::option::Option<::std::string::String>,
808    pub(crate) copy_source_sse_customer_key_md5: ::std::option::Option<::std::string::String>,
809    pub(crate) request_payer: ::std::option::Option<crate::types::RequestPayer>,
810    pub(crate) tagging: ::std::option::Option<::std::string::String>,
811    pub(crate) object_lock_mode: ::std::option::Option<crate::types::ObjectLockMode>,
812    pub(crate) object_lock_retain_until_date: ::std::option::Option<::aws_smithy_types::DateTime>,
813    pub(crate) object_lock_legal_hold_status: ::std::option::Option<crate::types::ObjectLockLegalHoldStatus>,
814    pub(crate) expected_bucket_owner: ::std::option::Option<::std::string::String>,
815    pub(crate) expected_source_bucket_owner: ::std::option::Option<::std::string::String>,
816}
817impl CopyObjectInputBuilder {
818    /// <p>The canned access control list (ACL) to apply to the object.</p>
819    /// <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>
820    /// <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>
821    /// <ul>
822    /// <li>
823    /// <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>
824    /// <li>
825    /// <p>This functionality is not supported for directory buckets.</p></li>
826    /// <li>
827    /// <p>This functionality is not supported for Amazon S3 on Outposts.</p></li>
828    /// </ul>
829    /// </note>
830    pub fn acl(mut self, input: crate::types::ObjectCannedAcl) -> Self {
831        self.acl = ::std::option::Option::Some(input);
832        self
833    }
834    /// <p>The canned access control list (ACL) to apply to the object.</p>
835    /// <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>
836    /// <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>
837    /// <ul>
838    /// <li>
839    /// <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>
840    /// <li>
841    /// <p>This functionality is not supported for directory buckets.</p></li>
842    /// <li>
843    /// <p>This functionality is not supported for Amazon S3 on Outposts.</p></li>
844    /// </ul>
845    /// </note>
846    pub fn set_acl(mut self, input: ::std::option::Option<crate::types::ObjectCannedAcl>) -> Self {
847        self.acl = input;
848        self
849    }
850    /// <p>The canned access control list (ACL) to apply to the object.</p>
851    /// <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>
852    /// <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>
853    /// <ul>
854    /// <li>
855    /// <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>
856    /// <li>
857    /// <p>This functionality is not supported for directory buckets.</p></li>
858    /// <li>
859    /// <p>This functionality is not supported for Amazon S3 on Outposts.</p></li>
860    /// </ul>
861    /// </note>
862    pub fn get_acl(&self) -> &::std::option::Option<crate::types::ObjectCannedAcl> {
863        &self.acl
864    }
865    /// <p>The name of the destination bucket.</p>
866    /// <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>
867    /// <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>
868    /// </note>
869    /// <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>
870    /// <p>Object Lambda access points are not supported by directory buckets.</p>
871    /// </note>
872    /// <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>
873    /// This field is required.
874    pub fn bucket(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
875        self.bucket = ::std::option::Option::Some(input.into());
876        self
877    }
878    /// <p>The name of the destination bucket.</p>
879    /// <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>
880    /// <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>
881    /// </note>
882    /// <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>
883    /// <p>Object Lambda access points are not supported by directory buckets.</p>
884    /// </note>
885    /// <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>
886    pub fn set_bucket(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
887        self.bucket = input;
888        self
889    }
890    /// <p>The name of the destination bucket.</p>
891    /// <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>
892    /// <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>
893    /// </note>
894    /// <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>
895    /// <p>Object Lambda access points are not supported by directory buckets.</p>
896    /// </note>
897    /// <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>
898    pub fn get_bucket(&self) -> &::std::option::Option<::std::string::String> {
899        &self.bucket
900    }
901    /// <p>Specifies the caching behavior along the request/reply chain.</p>
902    pub fn cache_control(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
903        self.cache_control = ::std::option::Option::Some(input.into());
904        self
905    }
906    /// <p>Specifies the caching behavior along the request/reply chain.</p>
907    pub fn set_cache_control(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
908        self.cache_control = input;
909        self
910    }
911    /// <p>Specifies the caching behavior along the request/reply chain.</p>
912    pub fn get_cache_control(&self) -> &::std::option::Option<::std::string::String> {
913        &self.cache_control
914    }
915    /// <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>
916    /// <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>
917    /// <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>
918    /// </note>
919    pub fn checksum_algorithm(mut self, input: crate::types::ChecksumAlgorithm) -> Self {
920        self.checksum_algorithm = ::std::option::Option::Some(input);
921        self
922    }
923    /// <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>
924    /// <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>
925    /// <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>
926    /// </note>
927    pub fn set_checksum_algorithm(mut self, input: ::std::option::Option<crate::types::ChecksumAlgorithm>) -> Self {
928        self.checksum_algorithm = input;
929        self
930    }
931    /// <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>
932    /// <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>
933    /// <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>
934    /// </note>
935    pub fn get_checksum_algorithm(&self) -> &::std::option::Option<crate::types::ChecksumAlgorithm> {
936        &self.checksum_algorithm
937    }
938    /// <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>
939    pub fn content_disposition(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
940        self.content_disposition = ::std::option::Option::Some(input.into());
941        self
942    }
943    /// <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>
944    pub fn set_content_disposition(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
945        self.content_disposition = input;
946        self
947    }
948    /// <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>
949    pub fn get_content_disposition(&self) -> &::std::option::Option<::std::string::String> {
950        &self.content_disposition
951    }
952    /// <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>
953    /// <p>For directory buckets, only the <code>aws-chunked</code> value is supported in this header field.</p>
954    /// </note>
955    pub fn content_encoding(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
956        self.content_encoding = ::std::option::Option::Some(input.into());
957        self
958    }
959    /// <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>
960    /// <p>For directory buckets, only the <code>aws-chunked</code> value is supported in this header field.</p>
961    /// </note>
962    pub fn set_content_encoding(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
963        self.content_encoding = input;
964        self
965    }
966    /// <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>
967    /// <p>For directory buckets, only the <code>aws-chunked</code> value is supported in this header field.</p>
968    /// </note>
969    pub fn get_content_encoding(&self) -> &::std::option::Option<::std::string::String> {
970        &self.content_encoding
971    }
972    /// <p>The language the content is in.</p>
973    pub fn content_language(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
974        self.content_language = ::std::option::Option::Some(input.into());
975        self
976    }
977    /// <p>The language the content is in.</p>
978    pub fn set_content_language(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
979        self.content_language = input;
980        self
981    }
982    /// <p>The language the content is in.</p>
983    pub fn get_content_language(&self) -> &::std::option::Option<::std::string::String> {
984        &self.content_language
985    }
986    /// <p>A standard MIME type that describes the format of the object data.</p>
987    pub fn content_type(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
988        self.content_type = ::std::option::Option::Some(input.into());
989        self
990    }
991    /// <p>A standard MIME type that describes the format of the object data.</p>
992    pub fn set_content_type(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
993        self.content_type = input;
994        self
995    }
996    /// <p>A standard MIME type that describes the format of the object data.</p>
997    pub fn get_content_type(&self) -> &::std::option::Option<::std::string::String> {
998        &self.content_type
999    }
1000    /// <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>
1001    /// <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>
1002    /// <ul>
1003    /// <li>
1004    /// <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>
1005    /// <li>
1006    /// <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>
1007    /// :
1008    /// <account-id>
1009    /// :accesspoint/
1010    /// <access-point-name>
1011    /// /object/
1012    /// <key></key>
1013    /// </access-point-name>
1014    /// </account-id>
1015    /// </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>
1016    /// <ul>
1017    /// <li>
1018    /// <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>
1019    /// <li>
1020    /// <p>Access points are not supported by directory buckets.</p></li>
1021    /// </ul>
1022    /// </note>
1023    /// <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>
1024    /// :
1025    /// <account-id>
1026    /// :outpost/
1027    /// <outpost-id>
1028    /// /object/
1029    /// <key></key>
1030    /// </outpost-id>
1031    /// </account-id>
1032    /// </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>
1033    /// </ul>
1034    /// <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>
1035    /// <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>
1036    /// <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>
1037    /// <p><b>Directory buckets</b> - S3 Versioning isn't enabled and supported for directory buckets.</p>
1038    /// </note>
1039    /// This field is required.
1040    pub fn copy_source(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
1041        self.copy_source = ::std::option::Option::Some(input.into());
1042        self
1043    }
1044    /// <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>
1045    /// <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>
1046    /// <ul>
1047    /// <li>
1048    /// <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>
1049    /// <li>
1050    /// <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>
1051    /// :
1052    /// <account-id>
1053    /// :accesspoint/
1054    /// <access-point-name>
1055    /// /object/
1056    /// <key></key>
1057    /// </access-point-name>
1058    /// </account-id>
1059    /// </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>
1060    /// <ul>
1061    /// <li>
1062    /// <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>
1063    /// <li>
1064    /// <p>Access points are not supported by directory buckets.</p></li>
1065    /// </ul>
1066    /// </note>
1067    /// <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>
1068    /// :
1069    /// <account-id>
1070    /// :outpost/
1071    /// <outpost-id>
1072    /// /object/
1073    /// <key></key>
1074    /// </outpost-id>
1075    /// </account-id>
1076    /// </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>
1077    /// </ul>
1078    /// <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>
1079    /// <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>
1080    /// <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>
1081    /// <p><b>Directory buckets</b> - S3 Versioning isn't enabled and supported for directory buckets.</p>
1082    /// </note>
1083    pub fn set_copy_source(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
1084        self.copy_source = input;
1085        self
1086    }
1087    /// <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>
1088    /// <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>
1089    /// <ul>
1090    /// <li>
1091    /// <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>
1092    /// <li>
1093    /// <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>
1094    /// :
1095    /// <account-id>
1096    /// :accesspoint/
1097    /// <access-point-name>
1098    /// /object/
1099    /// <key></key>
1100    /// </access-point-name>
1101    /// </account-id>
1102    /// </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>
1103    /// <ul>
1104    /// <li>
1105    /// <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>
1106    /// <li>
1107    /// <p>Access points are not supported by directory buckets.</p></li>
1108    /// </ul>
1109    /// </note>
1110    /// <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>
1111    /// :
1112    /// <account-id>
1113    /// :outpost/
1114    /// <outpost-id>
1115    /// /object/
1116    /// <key></key>
1117    /// </outpost-id>
1118    /// </account-id>
1119    /// </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>
1120    /// </ul>
1121    /// <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>
1122    /// <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>
1123    /// <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>
1124    /// <p><b>Directory buckets</b> - S3 Versioning isn't enabled and supported for directory buckets.</p>
1125    /// </note>
1126    pub fn get_copy_source(&self) -> &::std::option::Option<::std::string::String> {
1127        &self.copy_source
1128    }
1129    /// <p>Copies the object if its entity tag (ETag) matches the specified tag.</p>
1130    /// <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>
1131    /// <ul>
1132    /// <li>
1133    /// <p><code>x-amz-copy-source-if-match</code> condition evaluates to true</p></li>
1134    /// <li>
1135    /// <p><code>x-amz-copy-source-if-unmodified-since</code> condition evaluates to false</p></li>
1136    /// </ul>
1137    pub fn copy_source_if_match(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
1138        self.copy_source_if_match = ::std::option::Option::Some(input.into());
1139        self
1140    }
1141    /// <p>Copies the object if its entity tag (ETag) matches the specified tag.</p>
1142    /// <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>
1143    /// <ul>
1144    /// <li>
1145    /// <p><code>x-amz-copy-source-if-match</code> condition evaluates to true</p></li>
1146    /// <li>
1147    /// <p><code>x-amz-copy-source-if-unmodified-since</code> condition evaluates to false</p></li>
1148    /// </ul>
1149    pub fn set_copy_source_if_match(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
1150        self.copy_source_if_match = input;
1151        self
1152    }
1153    /// <p>Copies the object if its entity tag (ETag) matches the specified tag.</p>
1154    /// <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>
1155    /// <ul>
1156    /// <li>
1157    /// <p><code>x-amz-copy-source-if-match</code> condition evaluates to true</p></li>
1158    /// <li>
1159    /// <p><code>x-amz-copy-source-if-unmodified-since</code> condition evaluates to false</p></li>
1160    /// </ul>
1161    pub fn get_copy_source_if_match(&self) -> &::std::option::Option<::std::string::String> {
1162        &self.copy_source_if_match
1163    }
1164    /// <p>Copies the object if it has been modified since the specified time.</p>
1165    /// <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>
1166    /// <ul>
1167    /// <li>
1168    /// <p><code>x-amz-copy-source-if-none-match</code> condition evaluates to false</p></li>
1169    /// <li>
1170    /// <p><code>x-amz-copy-source-if-modified-since</code> condition evaluates to true</p></li>
1171    /// </ul>
1172    pub fn copy_source_if_modified_since(mut self, input: ::aws_smithy_types::DateTime) -> Self {
1173        self.copy_source_if_modified_since = ::std::option::Option::Some(input);
1174        self
1175    }
1176    /// <p>Copies the object if it has been modified since the specified time.</p>
1177    /// <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>
1178    /// <ul>
1179    /// <li>
1180    /// <p><code>x-amz-copy-source-if-none-match</code> condition evaluates to false</p></li>
1181    /// <li>
1182    /// <p><code>x-amz-copy-source-if-modified-since</code> condition evaluates to true</p></li>
1183    /// </ul>
1184    pub fn set_copy_source_if_modified_since(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
1185        self.copy_source_if_modified_since = input;
1186        self
1187    }
1188    /// <p>Copies the object if it has been modified since the specified time.</p>
1189    /// <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>
1190    /// <ul>
1191    /// <li>
1192    /// <p><code>x-amz-copy-source-if-none-match</code> condition evaluates to false</p></li>
1193    /// <li>
1194    /// <p><code>x-amz-copy-source-if-modified-since</code> condition evaluates to true</p></li>
1195    /// </ul>
1196    pub fn get_copy_source_if_modified_since(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
1197        &self.copy_source_if_modified_since
1198    }
1199    /// <p>Copies the object if its entity tag (ETag) is different than the specified ETag.</p>
1200    /// <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>
1201    /// <ul>
1202    /// <li>
1203    /// <p><code>x-amz-copy-source-if-none-match</code> condition evaluates to false</p></li>
1204    /// <li>
1205    /// <p><code>x-amz-copy-source-if-modified-since</code> condition evaluates to true</p></li>
1206    /// </ul>
1207    pub fn copy_source_if_none_match(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
1208        self.copy_source_if_none_match = ::std::option::Option::Some(input.into());
1209        self
1210    }
1211    /// <p>Copies the object if its entity tag (ETag) is different than the specified ETag.</p>
1212    /// <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>
1213    /// <ul>
1214    /// <li>
1215    /// <p><code>x-amz-copy-source-if-none-match</code> condition evaluates to false</p></li>
1216    /// <li>
1217    /// <p><code>x-amz-copy-source-if-modified-since</code> condition evaluates to true</p></li>
1218    /// </ul>
1219    pub fn set_copy_source_if_none_match(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
1220        self.copy_source_if_none_match = input;
1221        self
1222    }
1223    /// <p>Copies the object if its entity tag (ETag) is different than the specified ETag.</p>
1224    /// <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>
1225    /// <ul>
1226    /// <li>
1227    /// <p><code>x-amz-copy-source-if-none-match</code> condition evaluates to false</p></li>
1228    /// <li>
1229    /// <p><code>x-amz-copy-source-if-modified-since</code> condition evaluates to true</p></li>
1230    /// </ul>
1231    pub fn get_copy_source_if_none_match(&self) -> &::std::option::Option<::std::string::String> {
1232        &self.copy_source_if_none_match
1233    }
1234    /// <p>Copies the object if it hasn't been modified since the specified time.</p>
1235    /// <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>
1236    /// <ul>
1237    /// <li>
1238    /// <p><code>x-amz-copy-source-if-match</code> condition evaluates to true</p></li>
1239    /// <li>
1240    /// <p><code>x-amz-copy-source-if-unmodified-since</code> condition evaluates to false</p></li>
1241    /// </ul>
1242    pub fn copy_source_if_unmodified_since(mut self, input: ::aws_smithy_types::DateTime) -> Self {
1243        self.copy_source_if_unmodified_since = ::std::option::Option::Some(input);
1244        self
1245    }
1246    /// <p>Copies the object if it hasn't been modified since the specified time.</p>
1247    /// <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>
1248    /// <ul>
1249    /// <li>
1250    /// <p><code>x-amz-copy-source-if-match</code> condition evaluates to true</p></li>
1251    /// <li>
1252    /// <p><code>x-amz-copy-source-if-unmodified-since</code> condition evaluates to false</p></li>
1253    /// </ul>
1254    pub fn set_copy_source_if_unmodified_since(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
1255        self.copy_source_if_unmodified_since = input;
1256        self
1257    }
1258    /// <p>Copies the object if it hasn't been modified since the specified time.</p>
1259    /// <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>
1260    /// <ul>
1261    /// <li>
1262    /// <p><code>x-amz-copy-source-if-match</code> condition evaluates to true</p></li>
1263    /// <li>
1264    /// <p><code>x-amz-copy-source-if-unmodified-since</code> condition evaluates to false</p></li>
1265    /// </ul>
1266    pub fn get_copy_source_if_unmodified_since(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
1267        &self.copy_source_if_unmodified_since
1268    }
1269    /// <p>The date and time at which the object is no longer cacheable.</p>
1270    pub fn expires(mut self, input: ::aws_smithy_types::DateTime) -> Self {
1271        self.expires = ::std::option::Option::Some(input);
1272        self
1273    }
1274    /// <p>The date and time at which the object is no longer cacheable.</p>
1275    pub fn set_expires(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
1276        self.expires = input;
1277        self
1278    }
1279    /// <p>The date and time at which the object is no longer cacheable.</p>
1280    pub fn get_expires(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
1281        &self.expires
1282    }
1283    /// <p>Gives the grantee READ, READ_ACP, and WRITE_ACP permissions on the object.</p><note>
1284    /// <ul>
1285    /// <li>
1286    /// <p>This functionality is not supported for directory buckets.</p></li>
1287    /// <li>
1288    /// <p>This functionality is not supported for Amazon S3 on Outposts.</p></li>
1289    /// </ul>
1290    /// </note>
1291    pub fn grant_full_control(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
1292        self.grant_full_control = ::std::option::Option::Some(input.into());
1293        self
1294    }
1295    /// <p>Gives the grantee READ, READ_ACP, and WRITE_ACP permissions on the object.</p><note>
1296    /// <ul>
1297    /// <li>
1298    /// <p>This functionality is not supported for directory buckets.</p></li>
1299    /// <li>
1300    /// <p>This functionality is not supported for Amazon S3 on Outposts.</p></li>
1301    /// </ul>
1302    /// </note>
1303    pub fn set_grant_full_control(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
1304        self.grant_full_control = input;
1305        self
1306    }
1307    /// <p>Gives the grantee READ, READ_ACP, and WRITE_ACP permissions on the object.</p><note>
1308    /// <ul>
1309    /// <li>
1310    /// <p>This functionality is not supported for directory buckets.</p></li>
1311    /// <li>
1312    /// <p>This functionality is not supported for Amazon S3 on Outposts.</p></li>
1313    /// </ul>
1314    /// </note>
1315    pub fn get_grant_full_control(&self) -> &::std::option::Option<::std::string::String> {
1316        &self.grant_full_control
1317    }
1318    /// <p>Allows grantee to read the object data and its metadata.</p><note>
1319    /// <ul>
1320    /// <li>
1321    /// <p>This functionality is not supported for directory buckets.</p></li>
1322    /// <li>
1323    /// <p>This functionality is not supported for Amazon S3 on Outposts.</p></li>
1324    /// </ul>
1325    /// </note>
1326    pub fn grant_read(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
1327        self.grant_read = ::std::option::Option::Some(input.into());
1328        self
1329    }
1330    /// <p>Allows grantee to read the object data and its metadata.</p><note>
1331    /// <ul>
1332    /// <li>
1333    /// <p>This functionality is not supported for directory buckets.</p></li>
1334    /// <li>
1335    /// <p>This functionality is not supported for Amazon S3 on Outposts.</p></li>
1336    /// </ul>
1337    /// </note>
1338    pub fn set_grant_read(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
1339        self.grant_read = input;
1340        self
1341    }
1342    /// <p>Allows grantee to read the object data and its metadata.</p><note>
1343    /// <ul>
1344    /// <li>
1345    /// <p>This functionality is not supported for directory buckets.</p></li>
1346    /// <li>
1347    /// <p>This functionality is not supported for Amazon S3 on Outposts.</p></li>
1348    /// </ul>
1349    /// </note>
1350    pub fn get_grant_read(&self) -> &::std::option::Option<::std::string::String> {
1351        &self.grant_read
1352    }
1353    /// <p>Allows grantee to read the object ACL.</p><note>
1354    /// <ul>
1355    /// <li>
1356    /// <p>This functionality is not supported for directory buckets.</p></li>
1357    /// <li>
1358    /// <p>This functionality is not supported for Amazon S3 on Outposts.</p></li>
1359    /// </ul>
1360    /// </note>
1361    pub fn grant_read_acp(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
1362        self.grant_read_acp = ::std::option::Option::Some(input.into());
1363        self
1364    }
1365    /// <p>Allows grantee to read the object ACL.</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 set_grant_read_acp(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
1374        self.grant_read_acp = input;
1375        self
1376    }
1377    /// <p>Allows grantee to read the object ACL.</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 get_grant_read_acp(&self) -> &::std::option::Option<::std::string::String> {
1386        &self.grant_read_acp
1387    }
1388    /// <p>Allows grantee to write the ACL for the applicable object.</p><note>
1389    /// <ul>
1390    /// <li>
1391    /// <p>This functionality is not supported for directory buckets.</p></li>
1392    /// <li>
1393    /// <p>This functionality is not supported for Amazon S3 on Outposts.</p></li>
1394    /// </ul>
1395    /// </note>
1396    pub fn grant_write_acp(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
1397        self.grant_write_acp = ::std::option::Option::Some(input.into());
1398        self
1399    }
1400    /// <p>Allows grantee to write the ACL for the applicable object.</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 set_grant_write_acp(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
1409        self.grant_write_acp = input;
1410        self
1411    }
1412    /// <p>Allows grantee to write the ACL for the applicable object.</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 get_grant_write_acp(&self) -> &::std::option::Option<::std::string::String> {
1421        &self.grant_write_acp
1422    }
1423    /// <p>The key of the destination object.</p>
1424    /// This field is required.
1425    pub fn key(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
1426        self.key = ::std::option::Option::Some(input.into());
1427        self
1428    }
1429    /// <p>The key of the destination object.</p>
1430    pub fn set_key(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
1431        self.key = input;
1432        self
1433    }
1434    /// <p>The key of the destination object.</p>
1435    pub fn get_key(&self) -> &::std::option::Option<::std::string::String> {
1436        &self.key
1437    }
1438    /// Adds a key-value pair to `metadata`.
1439    ///
1440    /// To override the contents of this collection use [`set_metadata`](Self::set_metadata).
1441    ///
1442    /// <p>A map of metadata to store with the object in S3.</p>
1443    pub fn metadata(mut self, k: impl ::std::convert::Into<::std::string::String>, v: impl ::std::convert::Into<::std::string::String>) -> Self {
1444        let mut hash_map = self.metadata.unwrap_or_default();
1445        hash_map.insert(k.into(), v.into());
1446        self.metadata = ::std::option::Option::Some(hash_map);
1447        self
1448    }
1449    /// <p>A map of metadata to store with the object in S3.</p>
1450    pub fn set_metadata(mut self, input: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>) -> Self {
1451        self.metadata = input;
1452        self
1453    }
1454    /// <p>A map of metadata to store with the object in S3.</p>
1455    pub fn get_metadata(&self) -> &::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>> {
1456        &self.metadata
1457    }
1458    /// <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>
1459    /// <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>
1460    /// <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>
1461    /// </note>
1462    pub fn metadata_directive(mut self, input: crate::types::MetadataDirective) -> Self {
1463        self.metadata_directive = ::std::option::Option::Some(input);
1464        self
1465    }
1466    /// <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>
1467    /// <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>
1468    /// <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>
1469    /// </note>
1470    pub fn set_metadata_directive(mut self, input: ::std::option::Option<crate::types::MetadataDirective>) -> Self {
1471        self.metadata_directive = input;
1472        self
1473    }
1474    /// <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>
1475    /// <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>
1476    /// <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>
1477    /// </note>
1478    pub fn get_metadata_directive(&self) -> &::std::option::Option<crate::types::MetadataDirective> {
1479        &self.metadata_directive
1480    }
1481    /// <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>
1482    /// <p>The default value is <code>COPY</code>.</p><note>
1483    /// <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>
1484    /// <ul>
1485    /// <li>
1486    /// <p>When you attempt to <code>COPY</code> the tag-set from an S3 source object that has non-empty tags.</p></li>
1487    /// <li>
1488    /// <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>
1489    /// <li>
1490    /// <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>
1491    /// </ul>
1492    /// <p>Because only the empty tag-set is supported for directory buckets in a <code>CopyObject</code> operation, the following situations are allowed:</p>
1493    /// <ul>
1494    /// <li>
1495    /// <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>
1496    /// <li>
1497    /// <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>
1498    /// <li>
1499    /// <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>
1500    /// <li>
1501    /// <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>
1502    /// </ul>
1503    /// </note>
1504    pub fn tagging_directive(mut self, input: crate::types::TaggingDirective) -> Self {
1505        self.tagging_directive = ::std::option::Option::Some(input);
1506        self
1507    }
1508    /// <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>
1509    /// <p>The default value is <code>COPY</code>.</p><note>
1510    /// <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>
1511    /// <ul>
1512    /// <li>
1513    /// <p>When you attempt to <code>COPY</code> the tag-set from an S3 source object that has non-empty tags.</p></li>
1514    /// <li>
1515    /// <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>
1516    /// <li>
1517    /// <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>
1518    /// </ul>
1519    /// <p>Because only the empty tag-set is supported for directory buckets in a <code>CopyObject</code> operation, the following situations are allowed:</p>
1520    /// <ul>
1521    /// <li>
1522    /// <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>
1523    /// <li>
1524    /// <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>
1525    /// <li>
1526    /// <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>
1527    /// <li>
1528    /// <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>
1529    /// </ul>
1530    /// </note>
1531    pub fn set_tagging_directive(mut self, input: ::std::option::Option<crate::types::TaggingDirective>) -> Self {
1532        self.tagging_directive = input;
1533        self
1534    }
1535    /// <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>
1536    /// <p>The default value is <code>COPY</code>.</p><note>
1537    /// <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>
1538    /// <ul>
1539    /// <li>
1540    /// <p>When you attempt to <code>COPY</code> the tag-set from an S3 source object that has non-empty tags.</p></li>
1541    /// <li>
1542    /// <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>
1543    /// <li>
1544    /// <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>
1545    /// </ul>
1546    /// <p>Because only the empty tag-set is supported for directory buckets in a <code>CopyObject</code> operation, the following situations are allowed:</p>
1547    /// <ul>
1548    /// <li>
1549    /// <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>
1550    /// <li>
1551    /// <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>
1552    /// <li>
1553    /// <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>
1554    /// <li>
1555    /// <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>
1556    /// </ul>
1557    /// </note>
1558    pub fn get_tagging_directive(&self) -> &::std::option::Option<crate::types::TaggingDirective> {
1559        &self.tagging_directive
1560    }
1561    /// <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>
1562    /// <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>
1563    /// <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>
1564    /// <p><b>General purpose buckets </b></p>
1565    /// <ul>
1566    /// <li>
1567    /// <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>
1568    /// <li>
1569    /// <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>
1570    /// </ul>
1571    /// <p><b>Directory buckets </b></p>
1572    /// <ul>
1573    /// <li>
1574    /// <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>
1575    /// <li>
1576    /// <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>
1577    /// <li>
1578    /// <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>
1579    /// </ul>
1580    pub fn server_side_encryption(mut self, input: crate::types::ServerSideEncryption) -> Self {
1581        self.server_side_encryption = ::std::option::Option::Some(input);
1582        self
1583    }
1584    /// <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>
1585    /// <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>
1586    /// <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>
1587    /// <p><b>General purpose buckets </b></p>
1588    /// <ul>
1589    /// <li>
1590    /// <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>
1591    /// <li>
1592    /// <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>
1593    /// </ul>
1594    /// <p><b>Directory buckets </b></p>
1595    /// <ul>
1596    /// <li>
1597    /// <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>
1598    /// <li>
1599    /// <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>
1600    /// <li>
1601    /// <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>
1602    /// </ul>
1603    pub fn set_server_side_encryption(mut self, input: ::std::option::Option<crate::types::ServerSideEncryption>) -> Self {
1604        self.server_side_encryption = input;
1605        self
1606    }
1607    /// <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>
1608    /// <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>
1609    /// <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>
1610    /// <p><b>General purpose buckets </b></p>
1611    /// <ul>
1612    /// <li>
1613    /// <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>
1614    /// <li>
1615    /// <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>
1616    /// </ul>
1617    /// <p><b>Directory buckets </b></p>
1618    /// <ul>
1619    /// <li>
1620    /// <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>
1621    /// <li>
1622    /// <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>
1623    /// <li>
1624    /// <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>
1625    /// </ul>
1626    pub fn get_server_side_encryption(&self) -> &::std::option::Option<crate::types::ServerSideEncryption> {
1627        &self.server_side_encryption
1628    }
1629    /// <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>
1630    /// <ul>
1631    /// <li>
1632    /// <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>
1633    /// <li>
1634    /// <p><b>Amazon S3 on Outposts </b> - S3 on Outposts only uses the <code>OUTPOSTS</code> Storage Class.</p></li>
1635    /// </ul>
1636    /// </note>
1637    /// <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>
1638    /// <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>
1639    /// <ul>
1640    /// <li>
1641    /// <p>The storage class of the source object is <code>GLACIER</code> or <code>DEEP_ARCHIVE</code>.</p></li>
1642    /// <li>
1643    /// <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>
1644    /// </ul>
1645    /// <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>
1646    pub fn storage_class(mut self, input: crate::types::StorageClass) -> Self {
1647        self.storage_class = ::std::option::Option::Some(input);
1648        self
1649    }
1650    /// <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>
1651    /// <ul>
1652    /// <li>
1653    /// <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>
1654    /// <li>
1655    /// <p><b>Amazon S3 on Outposts </b> - S3 on Outposts only uses the <code>OUTPOSTS</code> Storage Class.</p></li>
1656    /// </ul>
1657    /// </note>
1658    /// <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>
1659    /// <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>
1660    /// <ul>
1661    /// <li>
1662    /// <p>The storage class of the source object is <code>GLACIER</code> or <code>DEEP_ARCHIVE</code>.</p></li>
1663    /// <li>
1664    /// <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>
1665    /// </ul>
1666    /// <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>
1667    pub fn set_storage_class(mut self, input: ::std::option::Option<crate::types::StorageClass>) -> Self {
1668        self.storage_class = input;
1669        self
1670    }
1671    /// <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>
1672    /// <ul>
1673    /// <li>
1674    /// <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>
1675    /// <li>
1676    /// <p><b>Amazon S3 on Outposts </b> - S3 on Outposts only uses the <code>OUTPOSTS</code> Storage Class.</p></li>
1677    /// </ul>
1678    /// </note>
1679    /// <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>
1680    /// <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>
1681    /// <ul>
1682    /// <li>
1683    /// <p>The storage class of the source object is <code>GLACIER</code> or <code>DEEP_ARCHIVE</code>.</p></li>
1684    /// <li>
1685    /// <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>
1686    /// </ul>
1687    /// <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>
1688    pub fn get_storage_class(&self) -> &::std::option::Option<crate::types::StorageClass> {
1689        &self.storage_class
1690    }
1691    /// <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>
1692    /// <p>This functionality is not supported for directory buckets.</p>
1693    /// </note>
1694    pub fn website_redirect_location(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
1695        self.website_redirect_location = ::std::option::Option::Some(input.into());
1696        self
1697    }
1698    /// <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>
1699    /// <p>This functionality is not supported for directory buckets.</p>
1700    /// </note>
1701    pub fn set_website_redirect_location(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
1702        self.website_redirect_location = input;
1703        self
1704    }
1705    /// <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>
1706    /// <p>This functionality is not supported for directory buckets.</p>
1707    /// </note>
1708    pub fn get_website_redirect_location(&self) -> &::std::option::Option<::std::string::String> {
1709        &self.website_redirect_location
1710    }
1711    /// <p>Specifies the algorithm to use when encrypting the object (for example, <code>AES256</code>).</p>
1712    /// <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>
1713    /// <p>This functionality is not supported when the destination bucket is a directory bucket.</p>
1714    /// </note>
1715    pub fn sse_customer_algorithm(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
1716        self.sse_customer_algorithm = ::std::option::Option::Some(input.into());
1717        self
1718    }
1719    /// <p>Specifies the algorithm to use when encrypting the object (for example, <code>AES256</code>).</p>
1720    /// <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>
1721    /// <p>This functionality is not supported when the destination bucket is a directory bucket.</p>
1722    /// </note>
1723    pub fn set_sse_customer_algorithm(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
1724        self.sse_customer_algorithm = input;
1725        self
1726    }
1727    /// <p>Specifies the algorithm to use when encrypting the object (for example, <code>AES256</code>).</p>
1728    /// <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>
1729    /// <p>This functionality is not supported when the destination bucket is a directory bucket.</p>
1730    /// </note>
1731    pub fn get_sse_customer_algorithm(&self) -> &::std::option::Option<::std::string::String> {
1732        &self.sse_customer_algorithm
1733    }
1734    /// <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>
1735    /// <p>This functionality is not supported when the destination bucket is a directory bucket.</p>
1736    /// </note>
1737    pub fn sse_customer_key(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
1738        self.sse_customer_key = ::std::option::Option::Some(input.into());
1739        self
1740    }
1741    /// <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>
1742    /// <p>This functionality is not supported when the destination bucket is a directory bucket.</p>
1743    /// </note>
1744    pub fn set_sse_customer_key(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
1745        self.sse_customer_key = input;
1746        self
1747    }
1748    /// <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>
1749    /// <p>This functionality is not supported when the destination bucket is a directory bucket.</p>
1750    /// </note>
1751    pub fn get_sse_customer_key(&self) -> &::std::option::Option<::std::string::String> {
1752        &self.sse_customer_key
1753    }
1754    /// <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>
1755    /// <p>This functionality is not supported when the destination bucket is a directory bucket.</p>
1756    /// </note>
1757    pub fn sse_customer_key_md5(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
1758        self.sse_customer_key_md5 = ::std::option::Option::Some(input.into());
1759        self
1760    }
1761    /// <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>
1762    /// <p>This functionality is not supported when the destination bucket is a directory bucket.</p>
1763    /// </note>
1764    pub fn set_sse_customer_key_md5(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
1765        self.sse_customer_key_md5 = input;
1766        self
1767    }
1768    /// <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>
1769    /// <p>This functionality is not supported when the destination bucket is a directory bucket.</p>
1770    /// </note>
1771    pub fn get_sse_customer_key_md5(&self) -> &::std::option::Option<::std::string::String> {
1772        &self.sse_customer_key_md5
1773    }
1774    /// <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>
1775    /// <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>
1776    pub fn ssekms_key_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
1777        self.ssekms_key_id = ::std::option::Option::Some(input.into());
1778        self
1779    }
1780    /// <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>
1781    /// <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>
1782    pub fn set_ssekms_key_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
1783        self.ssekms_key_id = input;
1784        self
1785    }
1786    /// <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>
1787    /// <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>
1788    pub fn get_ssekms_key_id(&self) -> &::std::option::Option<::std::string::String> {
1789        &self.ssekms_key_id
1790    }
1791    /// <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>
1792    /// <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>
1793    /// <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>
1794    pub fn ssekms_encryption_context(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
1795        self.ssekms_encryption_context = ::std::option::Option::Some(input.into());
1796        self
1797    }
1798    /// <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>
1799    /// <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>
1800    /// <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>
1801    pub fn set_ssekms_encryption_context(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
1802        self.ssekms_encryption_context = input;
1803        self
1804    }
1805    /// <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>
1806    /// <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>
1807    /// <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>
1808    pub fn get_ssekms_encryption_context(&self) -> &::std::option::Option<::std::string::String> {
1809        &self.ssekms_encryption_context
1810    }
1811    /// <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>
1812    /// <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>
1813    /// <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>
1814    /// <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>
1815    /// </note>
1816    pub fn bucket_key_enabled(mut self, input: bool) -> Self {
1817        self.bucket_key_enabled = ::std::option::Option::Some(input);
1818        self
1819    }
1820    /// <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>
1821    /// <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>
1822    /// <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>
1823    /// <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>
1824    /// </note>
1825    pub fn set_bucket_key_enabled(mut self, input: ::std::option::Option<bool>) -> Self {
1826        self.bucket_key_enabled = input;
1827        self
1828    }
1829    /// <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>
1830    /// <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>
1831    /// <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>
1832    /// <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>
1833    /// </note>
1834    pub fn get_bucket_key_enabled(&self) -> &::std::option::Option<bool> {
1835        &self.bucket_key_enabled
1836    }
1837    /// <p>Specifies the algorithm to use when decrypting the source object (for example, <code>AES256</code>).</p>
1838    /// <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>
1839    /// <p>This functionality is not supported when the source object is in a directory bucket.</p>
1840    /// </note>
1841    pub fn copy_source_sse_customer_algorithm(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
1842        self.copy_source_sse_customer_algorithm = ::std::option::Option::Some(input.into());
1843        self
1844    }
1845    /// <p>Specifies the algorithm to use when decrypting the source object (for example, <code>AES256</code>).</p>
1846    /// <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>
1847    /// <p>This functionality is not supported when the source object is in a directory bucket.</p>
1848    /// </note>
1849    pub fn set_copy_source_sse_customer_algorithm(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
1850        self.copy_source_sse_customer_algorithm = input;
1851        self
1852    }
1853    /// <p>Specifies the algorithm to use when decrypting the source object (for example, <code>AES256</code>).</p>
1854    /// <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>
1855    /// <p>This functionality is not supported when the source object is in a directory bucket.</p>
1856    /// </note>
1857    pub fn get_copy_source_sse_customer_algorithm(&self) -> &::std::option::Option<::std::string::String> {
1858        &self.copy_source_sse_customer_algorithm
1859    }
1860    /// <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>
1861    /// <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>
1862    /// <p>This functionality is not supported when the source object is in a directory bucket.</p>
1863    /// </note>
1864    pub fn copy_source_sse_customer_key(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
1865        self.copy_source_sse_customer_key = ::std::option::Option::Some(input.into());
1866        self
1867    }
1868    /// <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>
1869    /// <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>
1870    /// <p>This functionality is not supported when the source object is in a directory bucket.</p>
1871    /// </note>
1872    pub fn set_copy_source_sse_customer_key(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
1873        self.copy_source_sse_customer_key = input;
1874        self
1875    }
1876    /// <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>
1877    /// <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>
1878    /// <p>This functionality is not supported when the source object is in a directory bucket.</p>
1879    /// </note>
1880    pub fn get_copy_source_sse_customer_key(&self) -> &::std::option::Option<::std::string::String> {
1881        &self.copy_source_sse_customer_key
1882    }
1883    /// <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>
1884    /// <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>
1885    /// <p>This functionality is not supported when the source object is in a directory bucket.</p>
1886    /// </note>
1887    pub fn copy_source_sse_customer_key_md5(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
1888        self.copy_source_sse_customer_key_md5 = ::std::option::Option::Some(input.into());
1889        self
1890    }
1891    /// <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>
1892    /// <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>
1893    /// <p>This functionality is not supported when the source object is in a directory bucket.</p>
1894    /// </note>
1895    pub fn set_copy_source_sse_customer_key_md5(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
1896        self.copy_source_sse_customer_key_md5 = input;
1897        self
1898    }
1899    /// <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>
1900    /// <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>
1901    /// <p>This functionality is not supported when the source object is in a directory bucket.</p>
1902    /// </note>
1903    pub fn get_copy_source_sse_customer_key_md5(&self) -> &::std::option::Option<::std::string::String> {
1904        &self.copy_source_sse_customer_key_md5
1905    }
1906    /// <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 corresponding charges to copy the object. 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>
1907    /// <p>This functionality is not supported for directory buckets.</p>
1908    /// </note>
1909    pub fn request_payer(mut self, input: crate::types::RequestPayer) -> Self {
1910        self.request_payer = ::std::option::Option::Some(input);
1911        self
1912    }
1913    /// <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 corresponding charges to copy the object. 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>
1914    /// <p>This functionality is not supported for directory buckets.</p>
1915    /// </note>
1916    pub fn set_request_payer(mut self, input: ::std::option::Option<crate::types::RequestPayer>) -> Self {
1917        self.request_payer = input;
1918        self
1919    }
1920    /// <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 corresponding charges to copy the object. 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>
1921    /// <p>This functionality is not supported for directory buckets.</p>
1922    /// </note>
1923    pub fn get_request_payer(&self) -> &::std::option::Option<crate::types::RequestPayer> {
1924        &self.request_payer
1925    }
1926    /// <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>
1927    /// <p>The default value is the empty value.</p><note>
1928    /// <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>
1929    /// <ul>
1930    /// <li>
1931    /// <p>When you attempt to <code>COPY</code> the tag-set from an S3 source object that has non-empty tags.</p></li>
1932    /// <li>
1933    /// <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>
1934    /// <li>
1935    /// <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>
1936    /// </ul>
1937    /// <p>Because only the empty tag-set is supported for directory buckets in a <code>CopyObject</code> operation, the following situations are allowed:</p>
1938    /// <ul>
1939    /// <li>
1940    /// <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>
1941    /// <li>
1942    /// <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>
1943    /// <li>
1944    /// <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>
1945    /// <li>
1946    /// <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>
1947    /// </ul>
1948    /// </note>
1949    pub fn tagging(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
1950        self.tagging = ::std::option::Option::Some(input.into());
1951        self
1952    }
1953    /// <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>
1954    /// <p>The default value is the empty value.</p><note>
1955    /// <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>
1956    /// <ul>
1957    /// <li>
1958    /// <p>When you attempt to <code>COPY</code> the tag-set from an S3 source object that has non-empty tags.</p></li>
1959    /// <li>
1960    /// <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>
1961    /// <li>
1962    /// <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>
1963    /// </ul>
1964    /// <p>Because only the empty tag-set is supported for directory buckets in a <code>CopyObject</code> operation, the following situations are allowed:</p>
1965    /// <ul>
1966    /// <li>
1967    /// <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>
1968    /// <li>
1969    /// <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>
1970    /// <li>
1971    /// <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>
1972    /// <li>
1973    /// <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>
1974    /// </ul>
1975    /// </note>
1976    pub fn set_tagging(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
1977        self.tagging = input;
1978        self
1979    }
1980    /// <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>
1981    /// <p>The default value is the empty value.</p><note>
1982    /// <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>
1983    /// <ul>
1984    /// <li>
1985    /// <p>When you attempt to <code>COPY</code> the tag-set from an S3 source object that has non-empty tags.</p></li>
1986    /// <li>
1987    /// <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>
1988    /// <li>
1989    /// <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>
1990    /// </ul>
1991    /// <p>Because only the empty tag-set is supported for directory buckets in a <code>CopyObject</code> operation, the following situations are allowed:</p>
1992    /// <ul>
1993    /// <li>
1994    /// <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>
1995    /// <li>
1996    /// <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>
1997    /// <li>
1998    /// <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>
1999    /// <li>
2000    /// <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>
2001    /// </ul>
2002    /// </note>
2003    pub fn get_tagging(&self) -> &::std::option::Option<::std::string::String> {
2004        &self.tagging
2005    }
2006    /// <p>The Object Lock mode that you want to apply to the object copy.</p><note>
2007    /// <p>This functionality is not supported for directory buckets.</p>
2008    /// </note>
2009    pub fn object_lock_mode(mut self, input: crate::types::ObjectLockMode) -> Self {
2010        self.object_lock_mode = ::std::option::Option::Some(input);
2011        self
2012    }
2013    /// <p>The Object Lock mode that you want to apply to the object copy.</p><note>
2014    /// <p>This functionality is not supported for directory buckets.</p>
2015    /// </note>
2016    pub fn set_object_lock_mode(mut self, input: ::std::option::Option<crate::types::ObjectLockMode>) -> Self {
2017        self.object_lock_mode = input;
2018        self
2019    }
2020    /// <p>The Object Lock mode that you want to apply to the object copy.</p><note>
2021    /// <p>This functionality is not supported for directory buckets.</p>
2022    /// </note>
2023    pub fn get_object_lock_mode(&self) -> &::std::option::Option<crate::types::ObjectLockMode> {
2024        &self.object_lock_mode
2025    }
2026    /// <p>The date and time when you want the Object Lock of the object copy to expire.</p><note>
2027    /// <p>This functionality is not supported for directory buckets.</p>
2028    /// </note>
2029    pub fn object_lock_retain_until_date(mut self, input: ::aws_smithy_types::DateTime) -> Self {
2030        self.object_lock_retain_until_date = ::std::option::Option::Some(input);
2031        self
2032    }
2033    /// <p>The date and time when you want the Object Lock of the object copy to expire.</p><note>
2034    /// <p>This functionality is not supported for directory buckets.</p>
2035    /// </note>
2036    pub fn set_object_lock_retain_until_date(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
2037        self.object_lock_retain_until_date = input;
2038        self
2039    }
2040    /// <p>The date and time when you want the Object Lock of the object copy to expire.</p><note>
2041    /// <p>This functionality is not supported for directory buckets.</p>
2042    /// </note>
2043    pub fn get_object_lock_retain_until_date(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
2044        &self.object_lock_retain_until_date
2045    }
2046    /// <p>Specifies whether you want to apply a legal hold to the object copy.</p><note>
2047    /// <p>This functionality is not supported for directory buckets.</p>
2048    /// </note>
2049    pub fn object_lock_legal_hold_status(mut self, input: crate::types::ObjectLockLegalHoldStatus) -> Self {
2050        self.object_lock_legal_hold_status = ::std::option::Option::Some(input);
2051        self
2052    }
2053    /// <p>Specifies whether you want to apply a legal hold to the object copy.</p><note>
2054    /// <p>This functionality is not supported for directory buckets.</p>
2055    /// </note>
2056    pub fn set_object_lock_legal_hold_status(mut self, input: ::std::option::Option<crate::types::ObjectLockLegalHoldStatus>) -> Self {
2057        self.object_lock_legal_hold_status = input;
2058        self
2059    }
2060    /// <p>Specifies whether you want to apply a legal hold to the object copy.</p><note>
2061    /// <p>This functionality is not supported for directory buckets.</p>
2062    /// </note>
2063    pub fn get_object_lock_legal_hold_status(&self) -> &::std::option::Option<crate::types::ObjectLockLegalHoldStatus> {
2064        &self.object_lock_legal_hold_status
2065    }
2066    /// <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>
2067    pub fn expected_bucket_owner(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
2068        self.expected_bucket_owner = ::std::option::Option::Some(input.into());
2069        self
2070    }
2071    /// <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>
2072    pub fn set_expected_bucket_owner(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
2073        self.expected_bucket_owner = input;
2074        self
2075    }
2076    /// <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>
2077    pub fn get_expected_bucket_owner(&self) -> &::std::option::Option<::std::string::String> {
2078        &self.expected_bucket_owner
2079    }
2080    /// <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>
2081    pub fn expected_source_bucket_owner(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
2082        self.expected_source_bucket_owner = ::std::option::Option::Some(input.into());
2083        self
2084    }
2085    /// <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>
2086    pub fn set_expected_source_bucket_owner(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
2087        self.expected_source_bucket_owner = input;
2088        self
2089    }
2090    /// <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>
2091    pub fn get_expected_source_bucket_owner(&self) -> &::std::option::Option<::std::string::String> {
2092        &self.expected_source_bucket_owner
2093    }
2094    /// Consumes the builder and constructs a [`CopyObjectInput`](crate::operation::copy_object::CopyObjectInput).
2095    pub fn build(self) -> ::std::result::Result<crate::operation::copy_object::CopyObjectInput, ::aws_smithy_types::error::operation::BuildError> {
2096        ::std::result::Result::Ok(crate::operation::copy_object::CopyObjectInput {
2097            acl: self.acl,
2098            bucket: self.bucket,
2099            cache_control: self.cache_control,
2100            checksum_algorithm: self.checksum_algorithm,
2101            content_disposition: self.content_disposition,
2102            content_encoding: self.content_encoding,
2103            content_language: self.content_language,
2104            content_type: self.content_type,
2105            copy_source: self.copy_source,
2106            copy_source_if_match: self.copy_source_if_match,
2107            copy_source_if_modified_since: self.copy_source_if_modified_since,
2108            copy_source_if_none_match: self.copy_source_if_none_match,
2109            copy_source_if_unmodified_since: self.copy_source_if_unmodified_since,
2110            expires: self.expires,
2111            grant_full_control: self.grant_full_control,
2112            grant_read: self.grant_read,
2113            grant_read_acp: self.grant_read_acp,
2114            grant_write_acp: self.grant_write_acp,
2115            key: self.key,
2116            metadata: self.metadata,
2117            metadata_directive: self.metadata_directive,
2118            tagging_directive: self.tagging_directive,
2119            server_side_encryption: self.server_side_encryption,
2120            storage_class: self.storage_class,
2121            website_redirect_location: self.website_redirect_location,
2122            sse_customer_algorithm: self.sse_customer_algorithm,
2123            sse_customer_key: self.sse_customer_key,
2124            sse_customer_key_md5: self.sse_customer_key_md5,
2125            ssekms_key_id: self.ssekms_key_id,
2126            ssekms_encryption_context: self.ssekms_encryption_context,
2127            bucket_key_enabled: self.bucket_key_enabled,
2128            copy_source_sse_customer_algorithm: self.copy_source_sse_customer_algorithm,
2129            copy_source_sse_customer_key: self.copy_source_sse_customer_key,
2130            copy_source_sse_customer_key_md5: self.copy_source_sse_customer_key_md5,
2131            request_payer: self.request_payer,
2132            tagging: self.tagging,
2133            object_lock_mode: self.object_lock_mode,
2134            object_lock_retain_until_date: self.object_lock_retain_until_date,
2135            object_lock_legal_hold_status: self.object_lock_legal_hold_status,
2136            expected_bucket_owner: self.expected_bucket_owner,
2137            expected_source_bucket_owner: self.expected_source_bucket_owner,
2138        })
2139    }
2140}
2141impl ::std::fmt::Debug for CopyObjectInputBuilder {
2142    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
2143        let mut formatter = f.debug_struct("CopyObjectInputBuilder");
2144        formatter.field("acl", &self.acl);
2145        formatter.field("bucket", &self.bucket);
2146        formatter.field("cache_control", &self.cache_control);
2147        formatter.field("checksum_algorithm", &self.checksum_algorithm);
2148        formatter.field("content_disposition", &self.content_disposition);
2149        formatter.field("content_encoding", &self.content_encoding);
2150        formatter.field("content_language", &self.content_language);
2151        formatter.field("content_type", &self.content_type);
2152        formatter.field("copy_source", &self.copy_source);
2153        formatter.field("copy_source_if_match", &self.copy_source_if_match);
2154        formatter.field("copy_source_if_modified_since", &self.copy_source_if_modified_since);
2155        formatter.field("copy_source_if_none_match", &self.copy_source_if_none_match);
2156        formatter.field("copy_source_if_unmodified_since", &self.copy_source_if_unmodified_since);
2157        formatter.field("expires", &self.expires);
2158        formatter.field("grant_full_control", &self.grant_full_control);
2159        formatter.field("grant_read", &self.grant_read);
2160        formatter.field("grant_read_acp", &self.grant_read_acp);
2161        formatter.field("grant_write_acp", &self.grant_write_acp);
2162        formatter.field("key", &self.key);
2163        formatter.field("metadata", &self.metadata);
2164        formatter.field("metadata_directive", &self.metadata_directive);
2165        formatter.field("tagging_directive", &self.tagging_directive);
2166        formatter.field("server_side_encryption", &self.server_side_encryption);
2167        formatter.field("storage_class", &self.storage_class);
2168        formatter.field("website_redirect_location", &self.website_redirect_location);
2169        formatter.field("sse_customer_algorithm", &self.sse_customer_algorithm);
2170        formatter.field("sse_customer_key", &"*** Sensitive Data Redacted ***");
2171        formatter.field("sse_customer_key_md5", &self.sse_customer_key_md5);
2172        formatter.field("ssekms_key_id", &"*** Sensitive Data Redacted ***");
2173        formatter.field("ssekms_encryption_context", &"*** Sensitive Data Redacted ***");
2174        formatter.field("bucket_key_enabled", &self.bucket_key_enabled);
2175        formatter.field("copy_source_sse_customer_algorithm", &self.copy_source_sse_customer_algorithm);
2176        formatter.field("copy_source_sse_customer_key", &"*** Sensitive Data Redacted ***");
2177        formatter.field("copy_source_sse_customer_key_md5", &self.copy_source_sse_customer_key_md5);
2178        formatter.field("request_payer", &self.request_payer);
2179        formatter.field("tagging", &self.tagging);
2180        formatter.field("object_lock_mode", &self.object_lock_mode);
2181        formatter.field("object_lock_retain_until_date", &self.object_lock_retain_until_date);
2182        formatter.field("object_lock_legal_hold_status", &self.object_lock_legal_hold_status);
2183        formatter.field("expected_bucket_owner", &self.expected_bucket_owner);
2184        formatter.field("expected_source_bucket_owner", &self.expected_source_bucket_owner);
2185        formatter.finish()
2186    }
2187}