aws_sdk_s3/operation/copy_object/
builders.rs

1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2pub use crate::operation::copy_object::_copy_object_output::CopyObjectOutputBuilder;
3
4pub use crate::operation::copy_object::_copy_object_input::CopyObjectInputBuilder;
5
6impl crate::operation::copy_object::builders::CopyObjectInputBuilder {
7    /// Sends a request with this input using the given client.
8    pub async fn send_with(
9        self,
10        client: &crate::Client,
11    ) -> ::std::result::Result<
12        crate::operation::copy_object::CopyObjectOutput,
13        ::aws_smithy_runtime_api::client::result::SdkError<
14            crate::operation::copy_object::CopyObjectError,
15            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
16        >,
17    > {
18        let mut fluent_builder = client.copy_object();
19        fluent_builder.inner = self;
20        fluent_builder.send().await
21    }
22}
23/// Fluent builder constructing a request to `CopyObject`.
24///
25/// <important>
26/// <p>End of support notice: Beginning October 1, 2025, Amazon S3 will discontinue support for creating new Email Grantee Access Control Lists (ACL). Email Grantee ACLs created prior to this date will continue to work and remain accessible through the Amazon Web Services Management Console, Command Line Interface (CLI), SDKs, and REST API. However, you will no longer be able to create new Email Grantee ACLs.</p>
27/// <p>This change affects the following Amazon Web Services Regions: US East (N. Virginia) Region, US West (N. California) Region, US West (Oregon) Region, Asia Pacific (Singapore) Region, Asia Pacific (Sydney) Region, Asia Pacific (Tokyo) Region, Europe (Ireland) Region, and South America (São Paulo) Region.</p>
28/// </important>
29/// <p>Creates a copy of an object that is already stored in Amazon S3.</p><note>
30/// <p>You can store individual objects of up to 5 TB in Amazon S3. You create a copy of your object up to 5 GB in size in a single atomic action using this API. However, to copy an object greater than 5 GB, you must use the multipart upload Upload Part - Copy (UploadPartCopy) API. For more information, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/CopyingObjctsUsingRESTMPUapi.html">Copy Object Using the REST Multipart Upload API</a>.</p>
31/// </note>
32/// <p>You can copy individual objects between general purpose buckets, between directory buckets, and between general purpose buckets and directory buckets.</p><note>
33/// <ul>
34/// <li>
35/// <p>Amazon S3 supports copy operations using Multi-Region Access Points only as a destination when using the Multi-Region Access Point ARN.</p></li>
36/// <li>
37/// <p><b>Directory buckets </b> - For directory buckets, you must make requests for this API operation to the Zonal endpoint. These endpoints support virtual-hosted-style requests in the format <code>https://<i>amzn-s3-demo-bucket</i>.s3express-<i>zone-id</i>.<i>region-code</i>.amazonaws.com/<i>key-name</i> </code>. Path-style requests are not supported. For more information about endpoints in Availability Zones, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/endpoint-directory-buckets-AZ.html">Regional and Zonal endpoints for directory buckets in Availability Zones</a> in the <i>Amazon S3 User Guide</i>. For more information about endpoints in Local Zones, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/s3-lzs-for-directory-buckets.html">Concepts for directory buckets in Local Zones</a> in the <i>Amazon S3 User Guide</i>.</p></li>
38/// <li>
39/// <p>VPC endpoints don't support cross-Region requests (including copies). If you're using VPC endpoints, your source and destination buckets should be in the same Amazon Web Services Region as your VPC endpoint.</p></li>
40/// </ul>
41/// </note>
42/// <p>Both the Region that you want to copy the object from and the Region that you want to copy the object to must be enabled for your account. For more information about how to enable a Region for your account, see <a href="https://docs.aws.amazon.com/accounts/latest/reference/manage-acct-regions.html#manage-acct-regions-enable-standalone">Enable or disable a Region for standalone accounts</a> in the <i>Amazon Web Services Account Management Guide</i>.</p><important>
43/// <p>Amazon S3 transfer acceleration does not support cross-Region copies. If you request a cross-Region copy using a transfer acceleration endpoint, you get a <code>400 Bad Request</code> error. For more information, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/transfer-acceleration.html">Transfer Acceleration</a>.</p>
44/// </important>
45/// <dl>
46/// <dt>
47/// Authentication and authorization
48/// </dt>
49/// <dd>
50/// <p>All <code>CopyObject</code> requests must be authenticated and signed by using IAM credentials (access key ID and secret access key for the IAM identities). All headers with the <code>x-amz-</code> prefix, including <code>x-amz-copy-source</code>, must be signed. For more information, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/RESTAuthentication.html">REST Authentication</a>.</p>
51/// <p><b>Directory buckets</b> - You must use the IAM credentials to authenticate and authorize your access to the <code>CopyObject</code> API operation, instead of using the temporary security credentials through the <code>CreateSession</code> API operation.</p>
52/// <p>Amazon Web Services CLI or SDKs handles authentication and authorization on your behalf.</p>
53/// </dd>
54/// <dt>
55/// Permissions
56/// </dt>
57/// <dd>
58/// <p>You must have <i>read</i> access to the source object and <i>write</i> access to the destination bucket.</p>
59/// <ul>
60/// <li>
61/// <p><b>General purpose bucket permissions</b> - You must have permissions in an IAM policy based on the source and destination bucket types in a <code>CopyObject</code> operation.</p>
62/// <ul>
63/// <li>
64/// <p>If the source object is in a general purpose bucket, you must have <b> <code>s3:GetObject</code> </b> permission to read the source object that is being copied.</p></li>
65/// <li>
66/// <p>If the destination bucket is a general purpose bucket, you must have <b> <code>s3:PutObject</code> </b> permission to write the object copy to the destination bucket.</p></li>
67/// </ul></li>
68/// <li>
69/// <p><b>Directory bucket permissions</b> - You must have permissions in a bucket policy or an IAM identity-based policy based on the source and destination bucket types in a <code>CopyObject</code> operation.</p>
70/// <ul>
71/// <li>
72/// <p>If the source object that you want to copy is in a directory bucket, you must have the <b> <code>s3express:CreateSession</code> </b> permission in the <code>Action</code> element of a policy to read the object. By default, the session is in the <code>ReadWrite</code> mode. If you want to restrict the access, you can explicitly set the <code>s3express:SessionMode</code> condition key to <code>ReadOnly</code> on the copy source bucket.</p></li>
73/// <li>
74/// <p>If the copy destination is a directory bucket, you must have the <b> <code>s3express:CreateSession</code> </b> permission in the <code>Action</code> element of a policy to write the object to the destination. The <code>s3express:SessionMode</code> condition key can't be set to <code>ReadOnly</code> on the copy destination bucket.</p></li>
75/// </ul>
76/// <p>If the object is encrypted with SSE-KMS, you must also have the <code>kms:GenerateDataKey</code> and <code>kms:Decrypt</code> permissions in IAM identity-based policies and KMS key policies for the KMS key.</p>
77/// <p>For example policies, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/s3-express-security-iam-example-bucket-policies.html">Example bucket policies for S3 Express One Zone</a> and <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/s3-express-security-iam-identity-policies.html">Amazon Web Services Identity and Access Management (IAM) identity-based policies for S3 Express One Zone</a> in the <i>Amazon S3 User Guide</i>.</p></li>
78/// </ul>
79/// </dd>
80/// <dt>
81/// Response and special errors
82/// </dt>
83/// <dd>
84/// <p>When the request is an HTTP 1.1 request, the response is chunk encoded. When the request is not an HTTP 1.1 request, the response would not contain the <code>Content-Length</code>. You always need to read the entire response body to check if the copy succeeds.</p>
85/// <ul>
86/// <li>
87/// <p>If the copy is successful, you receive a response with information about the copied object.</p></li>
88/// <li>
89/// <p>A copy request might return an error when Amazon S3 receives the copy request or while Amazon S3 is copying the files. A <code>200 OK</code> response can contain either a success or an error.</p>
90/// <ul>
91/// <li>
92/// <p>If the error occurs before the copy action starts, you receive a standard Amazon S3 error.</p></li>
93/// <li>
94/// <p>If the error occurs during the copy operation, the error response is embedded in the <code>200 OK</code> response. For example, in a cross-region copy, you may encounter throttling and receive a <code>200 OK</code> response. For more information, see <a href="https://repost.aws/knowledge-center/s3-resolve-200-internalerror">Resolve the Error 200 response when copying objects to Amazon S3</a>. The <code>200 OK</code> status code means the copy was accepted, but it doesn't mean the copy is complete. Another example is when you disconnect from Amazon S3 before the copy is complete, Amazon S3 might cancel the copy and you may receive a <code>200 OK</code> response. You must stay connected to Amazon S3 until the entire response is successfully received and processed.</p>
95/// <p>If you call this API operation directly, make sure to design your application to parse the content of the response and handle it appropriately. If you use Amazon Web Services SDKs, SDKs handle this condition. The SDKs detect the embedded error and apply error handling per your configuration settings (including automatically retrying the request as appropriate). If the condition persists, the SDKs throw an exception (or, for the SDKs that don't use exceptions, they return an error).</p></li>
96/// </ul></li>
97/// </ul>
98/// </dd>
99/// <dt>
100/// Charge
101/// </dt>
102/// <dd>
103/// <p>The copy request charge is based on the storage class and Region that you specify for the destination object. The request can also result in a data retrieval charge for the source if the source storage class bills for data retrieval. If the copy source is in a different region, the data transfer is billed to the copy source account. For pricing information, see <a href="http://aws.amazon.com/s3/pricing/">Amazon S3 pricing</a>.</p>
104/// </dd>
105/// <dt>
106/// HTTP Host header syntax
107/// </dt>
108/// <dd>
109/// <ul>
110/// <li>
111/// <p><b>Directory buckets </b> - The HTTP Host header syntax is <code> <i>Bucket-name</i>.s3express-<i>zone-id</i>.<i>region-code</i>.amazonaws.com</code>.</p></li>
112/// <li>
113/// <p><b>Amazon S3 on Outposts</b> - When you use this action with S3 on Outposts through the REST API, you must direct requests to the S3 on Outposts hostname. The S3 on Outposts hostname takes the form <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></li>
114/// </ul>
115/// </dd>
116/// </dl>
117/// <p>The following operations are related to <code>CopyObject</code>:</p>
118/// <ul>
119/// <li>
120/// <p><a href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_PutObject.html">PutObject</a></p></li>
121/// <li>
122/// <p><a href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetObject.html">GetObject</a></p></li>
123/// </ul>
124#[derive(::std::clone::Clone, ::std::fmt::Debug)]
125pub struct CopyObjectFluentBuilder {
126    handle: ::std::sync::Arc<crate::client::Handle>,
127    inner: crate::operation::copy_object::builders::CopyObjectInputBuilder,
128    config_override: ::std::option::Option<crate::config::Builder>,
129}
130impl
131    crate::client::customize::internal::CustomizableSend<
132        crate::operation::copy_object::CopyObjectOutput,
133        crate::operation::copy_object::CopyObjectError,
134    > for CopyObjectFluentBuilder
135{
136    fn send(
137        self,
138        config_override: crate::config::Builder,
139    ) -> crate::client::customize::internal::BoxFuture<
140        crate::client::customize::internal::SendResult<
141            crate::operation::copy_object::CopyObjectOutput,
142            crate::operation::copy_object::CopyObjectError,
143        >,
144    > {
145        ::std::boxed::Box::pin(async move { self.config_override(config_override).send().await })
146    }
147}
148impl CopyObjectFluentBuilder {
149    /// Creates a new `CopyObjectFluentBuilder`.
150    pub(crate) fn new(handle: ::std::sync::Arc<crate::client::Handle>) -> Self {
151        Self {
152            handle,
153            inner: ::std::default::Default::default(),
154            config_override: ::std::option::Option::None,
155        }
156    }
157    /// Access the CopyObject as a reference.
158    pub fn as_input(&self) -> &crate::operation::copy_object::builders::CopyObjectInputBuilder {
159        &self.inner
160    }
161    /// Sends the request and returns the response.
162    ///
163    /// If an error occurs, an `SdkError` will be returned with additional details that
164    /// can be matched against.
165    ///
166    /// By default, any retryable failures will be retried twice. Retry behavior
167    /// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
168    /// set when configuring the client.
169    pub async fn send(
170        self,
171    ) -> ::std::result::Result<
172        crate::operation::copy_object::CopyObjectOutput,
173        ::aws_smithy_runtime_api::client::result::SdkError<
174            crate::operation::copy_object::CopyObjectError,
175            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
176        >,
177    > {
178        let input = self
179            .inner
180            .build()
181            .map_err(::aws_smithy_runtime_api::client::result::SdkError::construction_failure)?;
182        let runtime_plugins = crate::operation::copy_object::CopyObject::operation_runtime_plugins(
183            self.handle.runtime_plugins.clone(),
184            &self.handle.conf,
185            self.config_override,
186        );
187        crate::operation::copy_object::CopyObject::orchestrate(&runtime_plugins, input).await
188    }
189
190    /// Consumes this builder, creating a customizable operation that can be modified before being sent.
191    pub fn customize(
192        self,
193    ) -> crate::client::customize::CustomizableOperation<
194        crate::operation::copy_object::CopyObjectOutput,
195        crate::operation::copy_object::CopyObjectError,
196        Self,
197    > {
198        crate::client::customize::CustomizableOperation::new(self)
199    }
200    pub(crate) fn config_override(mut self, config_override: impl ::std::convert::Into<crate::config::Builder>) -> Self {
201        self.set_config_override(::std::option::Option::Some(config_override.into()));
202        self
203    }
204
205    pub(crate) fn set_config_override(&mut self, config_override: ::std::option::Option<crate::config::Builder>) -> &mut Self {
206        self.config_override = config_override;
207        self
208    }
209    /// <p>The canned access control list (ACL) to apply to the object.</p>
210    /// <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>
211    /// <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>
212    /// <ul>
213    /// <li>
214    /// <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>
215    /// <li>
216    /// <p>This functionality is not supported for directory buckets.</p></li>
217    /// <li>
218    /// <p>This functionality is not supported for Amazon S3 on Outposts.</p></li>
219    /// </ul>
220    /// </note>
221    pub fn acl(mut self, input: crate::types::ObjectCannedAcl) -> Self {
222        self.inner = self.inner.acl(input);
223        self
224    }
225    /// <p>The canned access control list (ACL) to apply to the object.</p>
226    /// <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>
227    /// <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>
228    /// <ul>
229    /// <li>
230    /// <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>
231    /// <li>
232    /// <p>This functionality is not supported for directory buckets.</p></li>
233    /// <li>
234    /// <p>This functionality is not supported for Amazon S3 on Outposts.</p></li>
235    /// </ul>
236    /// </note>
237    pub fn set_acl(mut self, input: ::std::option::Option<crate::types::ObjectCannedAcl>) -> Self {
238        self.inner = self.inner.set_acl(input);
239        self
240    }
241    /// <p>The canned access control list (ACL) to apply to the object.</p>
242    /// <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>
243    /// <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>
244    /// <ul>
245    /// <li>
246    /// <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>
247    /// <li>
248    /// <p>This functionality is not supported for directory buckets.</p></li>
249    /// <li>
250    /// <p>This functionality is not supported for Amazon S3 on Outposts.</p></li>
251    /// </ul>
252    /// </note>
253    pub fn get_acl(&self) -> &::std::option::Option<crate::types::ObjectCannedAcl> {
254        self.inner.get_acl()
255    }
256    /// <p>The name of the destination bucket.</p>
257    /// <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>
258    /// <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>
259    /// </note>
260    /// <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>
261    /// <p>Object Lambda access points are not supported by directory buckets.</p>
262    /// </note>
263    /// <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>
264    pub fn bucket(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
265        self.inner = self.inner.bucket(input.into());
266        self
267    }
268    /// <p>The name of the destination bucket.</p>
269    /// <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>
270    /// <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>
271    /// </note>
272    /// <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>
273    /// <p>Object Lambda access points are not supported by directory buckets.</p>
274    /// </note>
275    /// <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>
276    pub fn set_bucket(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
277        self.inner = self.inner.set_bucket(input);
278        self
279    }
280    /// <p>The name of the destination bucket.</p>
281    /// <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>
282    /// <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>
283    /// </note>
284    /// <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>
285    /// <p>Object Lambda access points are not supported by directory buckets.</p>
286    /// </note>
287    /// <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>
288    pub fn get_bucket(&self) -> &::std::option::Option<::std::string::String> {
289        self.inner.get_bucket()
290    }
291    /// <p>Specifies the caching behavior along the request/reply chain.</p>
292    pub fn cache_control(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
293        self.inner = self.inner.cache_control(input.into());
294        self
295    }
296    /// <p>Specifies the caching behavior along the request/reply chain.</p>
297    pub fn set_cache_control(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
298        self.inner = self.inner.set_cache_control(input);
299        self
300    }
301    /// <p>Specifies the caching behavior along the request/reply chain.</p>
302    pub fn get_cache_control(&self) -> &::std::option::Option<::std::string::String> {
303        self.inner.get_cache_control()
304    }
305    /// <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>
306    /// <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>
307    /// <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>
308    /// </note>
309    pub fn checksum_algorithm(mut self, input: crate::types::ChecksumAlgorithm) -> Self {
310        self.inner = self.inner.checksum_algorithm(input);
311        self
312    }
313    /// <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>
314    /// <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>
315    /// <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>
316    /// </note>
317    pub fn set_checksum_algorithm(mut self, input: ::std::option::Option<crate::types::ChecksumAlgorithm>) -> Self {
318        self.inner = self.inner.set_checksum_algorithm(input);
319        self
320    }
321    /// <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>
322    /// <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>
323    /// <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>
324    /// </note>
325    pub fn get_checksum_algorithm(&self) -> &::std::option::Option<crate::types::ChecksumAlgorithm> {
326        self.inner.get_checksum_algorithm()
327    }
328    /// <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>
329    pub fn content_disposition(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
330        self.inner = self.inner.content_disposition(input.into());
331        self
332    }
333    /// <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>
334    pub fn set_content_disposition(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
335        self.inner = self.inner.set_content_disposition(input);
336        self
337    }
338    /// <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>
339    pub fn get_content_disposition(&self) -> &::std::option::Option<::std::string::String> {
340        self.inner.get_content_disposition()
341    }
342    /// <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>
343    /// <p>For directory buckets, only the <code>aws-chunked</code> value is supported in this header field.</p>
344    /// </note>
345    pub fn content_encoding(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
346        self.inner = self.inner.content_encoding(input.into());
347        self
348    }
349    /// <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>
350    /// <p>For directory buckets, only the <code>aws-chunked</code> value is supported in this header field.</p>
351    /// </note>
352    pub fn set_content_encoding(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
353        self.inner = self.inner.set_content_encoding(input);
354        self
355    }
356    /// <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>
357    /// <p>For directory buckets, only the <code>aws-chunked</code> value is supported in this header field.</p>
358    /// </note>
359    pub fn get_content_encoding(&self) -> &::std::option::Option<::std::string::String> {
360        self.inner.get_content_encoding()
361    }
362    /// <p>The language the content is in.</p>
363    pub fn content_language(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
364        self.inner = self.inner.content_language(input.into());
365        self
366    }
367    /// <p>The language the content is in.</p>
368    pub fn set_content_language(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
369        self.inner = self.inner.set_content_language(input);
370        self
371    }
372    /// <p>The language the content is in.</p>
373    pub fn get_content_language(&self) -> &::std::option::Option<::std::string::String> {
374        self.inner.get_content_language()
375    }
376    /// <p>A standard MIME type that describes the format of the object data.</p>
377    pub fn content_type(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
378        self.inner = self.inner.content_type(input.into());
379        self
380    }
381    /// <p>A standard MIME type that describes the format of the object data.</p>
382    pub fn set_content_type(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
383        self.inner = self.inner.set_content_type(input);
384        self
385    }
386    /// <p>A standard MIME type that describes the format of the object data.</p>
387    pub fn get_content_type(&self) -> &::std::option::Option<::std::string::String> {
388        self.inner.get_content_type()
389    }
390    /// <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>
391    /// <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>
392    /// <ul>
393    /// <li>
394    /// <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>
395    /// <li>
396    /// <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>
397    /// :
398    /// <account-id>
399    /// :accesspoint/
400    /// <access-point-name>
401    /// /object/
402    /// <key></key>
403    /// </access-point-name>
404    /// </account-id>
405    /// </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>
406    /// <ul>
407    /// <li>
408    /// <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>
409    /// <li>
410    /// <p>Access points are not supported by directory buckets.</p></li>
411    /// </ul>
412    /// </note>
413    /// <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>
414    /// :
415    /// <account-id>
416    /// :outpost/
417    /// <outpost-id>
418    /// /object/
419    /// <key></key>
420    /// </outpost-id>
421    /// </account-id>
422    /// </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>
423    /// </ul>
424    /// <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>
425    /// <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>
426    /// <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>
427    /// <p><b>Directory buckets</b> - S3 Versioning isn't enabled and supported for directory buckets.</p>
428    /// </note>
429    pub fn copy_source(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
430        self.inner = self.inner.copy_source(input.into());
431        self
432    }
433    /// <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>
434    /// <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>
435    /// <ul>
436    /// <li>
437    /// <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>
438    /// <li>
439    /// <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>
440    /// :
441    /// <account-id>
442    /// :accesspoint/
443    /// <access-point-name>
444    /// /object/
445    /// <key></key>
446    /// </access-point-name>
447    /// </account-id>
448    /// </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>
449    /// <ul>
450    /// <li>
451    /// <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>
452    /// <li>
453    /// <p>Access points are not supported by directory buckets.</p></li>
454    /// </ul>
455    /// </note>
456    /// <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>
457    /// :
458    /// <account-id>
459    /// :outpost/
460    /// <outpost-id>
461    /// /object/
462    /// <key></key>
463    /// </outpost-id>
464    /// </account-id>
465    /// </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>
466    /// </ul>
467    /// <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>
468    /// <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>
469    /// <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>
470    /// <p><b>Directory buckets</b> - S3 Versioning isn't enabled and supported for directory buckets.</p>
471    /// </note>
472    pub fn set_copy_source(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
473        self.inner = self.inner.set_copy_source(input);
474        self
475    }
476    /// <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>
477    /// <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>
478    /// <ul>
479    /// <li>
480    /// <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>
481    /// <li>
482    /// <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>
483    /// :
484    /// <account-id>
485    /// :accesspoint/
486    /// <access-point-name>
487    /// /object/
488    /// <key></key>
489    /// </access-point-name>
490    /// </account-id>
491    /// </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>
492    /// <ul>
493    /// <li>
494    /// <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>
495    /// <li>
496    /// <p>Access points are not supported by directory buckets.</p></li>
497    /// </ul>
498    /// </note>
499    /// <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>
500    /// :
501    /// <account-id>
502    /// :outpost/
503    /// <outpost-id>
504    /// /object/
505    /// <key></key>
506    /// </outpost-id>
507    /// </account-id>
508    /// </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>
509    /// </ul>
510    /// <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>
511    /// <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>
512    /// <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>
513    /// <p><b>Directory buckets</b> - S3 Versioning isn't enabled and supported for directory buckets.</p>
514    /// </note>
515    pub fn get_copy_source(&self) -> &::std::option::Option<::std::string::String> {
516        self.inner.get_copy_source()
517    }
518    /// <p>Copies the object if its entity tag (ETag) matches the specified tag.</p>
519    /// <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>
520    /// <ul>
521    /// <li>
522    /// <p><code>x-amz-copy-source-if-match</code> condition evaluates to true</p></li>
523    /// <li>
524    /// <p><code>x-amz-copy-source-if-unmodified-since</code> condition evaluates to false</p></li>
525    /// </ul>
526    pub fn copy_source_if_match(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
527        self.inner = self.inner.copy_source_if_match(input.into());
528        self
529    }
530    /// <p>Copies the object if its entity tag (ETag) matches the specified tag.</p>
531    /// <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>
532    /// <ul>
533    /// <li>
534    /// <p><code>x-amz-copy-source-if-match</code> condition evaluates to true</p></li>
535    /// <li>
536    /// <p><code>x-amz-copy-source-if-unmodified-since</code> condition evaluates to false</p></li>
537    /// </ul>
538    pub fn set_copy_source_if_match(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
539        self.inner = self.inner.set_copy_source_if_match(input);
540        self
541    }
542    /// <p>Copies the object if its entity tag (ETag) matches the specified tag.</p>
543    /// <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>
544    /// <ul>
545    /// <li>
546    /// <p><code>x-amz-copy-source-if-match</code> condition evaluates to true</p></li>
547    /// <li>
548    /// <p><code>x-amz-copy-source-if-unmodified-since</code> condition evaluates to false</p></li>
549    /// </ul>
550    pub fn get_copy_source_if_match(&self) -> &::std::option::Option<::std::string::String> {
551        self.inner.get_copy_source_if_match()
552    }
553    /// <p>Copies the object if it has been modified since the specified time.</p>
554    /// <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>
555    /// <ul>
556    /// <li>
557    /// <p><code>x-amz-copy-source-if-none-match</code> condition evaluates to false</p></li>
558    /// <li>
559    /// <p><code>x-amz-copy-source-if-modified-since</code> condition evaluates to true</p></li>
560    /// </ul>
561    pub fn copy_source_if_modified_since(mut self, input: ::aws_smithy_types::DateTime) -> Self {
562        self.inner = self.inner.copy_source_if_modified_since(input);
563        self
564    }
565    /// <p>Copies the object if it has been modified since the specified time.</p>
566    /// <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>
567    /// <ul>
568    /// <li>
569    /// <p><code>x-amz-copy-source-if-none-match</code> condition evaluates to false</p></li>
570    /// <li>
571    /// <p><code>x-amz-copy-source-if-modified-since</code> condition evaluates to true</p></li>
572    /// </ul>
573    pub fn set_copy_source_if_modified_since(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
574        self.inner = self.inner.set_copy_source_if_modified_since(input);
575        self
576    }
577    /// <p>Copies the object if it has been modified since the specified time.</p>
578    /// <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>
579    /// <ul>
580    /// <li>
581    /// <p><code>x-amz-copy-source-if-none-match</code> condition evaluates to false</p></li>
582    /// <li>
583    /// <p><code>x-amz-copy-source-if-modified-since</code> condition evaluates to true</p></li>
584    /// </ul>
585    pub fn get_copy_source_if_modified_since(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
586        self.inner.get_copy_source_if_modified_since()
587    }
588    /// <p>Copies the object if its entity tag (ETag) is different than the specified ETag.</p>
589    /// <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>
590    /// <ul>
591    /// <li>
592    /// <p><code>x-amz-copy-source-if-none-match</code> condition evaluates to false</p></li>
593    /// <li>
594    /// <p><code>x-amz-copy-source-if-modified-since</code> condition evaluates to true</p></li>
595    /// </ul>
596    pub fn copy_source_if_none_match(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
597        self.inner = self.inner.copy_source_if_none_match(input.into());
598        self
599    }
600    /// <p>Copies the object if its entity tag (ETag) is different than the specified ETag.</p>
601    /// <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>
602    /// <ul>
603    /// <li>
604    /// <p><code>x-amz-copy-source-if-none-match</code> condition evaluates to false</p></li>
605    /// <li>
606    /// <p><code>x-amz-copy-source-if-modified-since</code> condition evaluates to true</p></li>
607    /// </ul>
608    pub fn set_copy_source_if_none_match(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
609        self.inner = self.inner.set_copy_source_if_none_match(input);
610        self
611    }
612    /// <p>Copies the object if its entity tag (ETag) is different than the specified ETag.</p>
613    /// <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>
614    /// <ul>
615    /// <li>
616    /// <p><code>x-amz-copy-source-if-none-match</code> condition evaluates to false</p></li>
617    /// <li>
618    /// <p><code>x-amz-copy-source-if-modified-since</code> condition evaluates to true</p></li>
619    /// </ul>
620    pub fn get_copy_source_if_none_match(&self) -> &::std::option::Option<::std::string::String> {
621        self.inner.get_copy_source_if_none_match()
622    }
623    /// <p>Copies the object if it hasn't been modified since the specified time.</p>
624    /// <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>
625    /// <ul>
626    /// <li>
627    /// <p><code>x-amz-copy-source-if-match</code> condition evaluates to true</p></li>
628    /// <li>
629    /// <p><code>x-amz-copy-source-if-unmodified-since</code> condition evaluates to false</p></li>
630    /// </ul>
631    pub fn copy_source_if_unmodified_since(mut self, input: ::aws_smithy_types::DateTime) -> Self {
632        self.inner = self.inner.copy_source_if_unmodified_since(input);
633        self
634    }
635    /// <p>Copies the object if it hasn't been modified since the specified time.</p>
636    /// <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>
637    /// <ul>
638    /// <li>
639    /// <p><code>x-amz-copy-source-if-match</code> condition evaluates to true</p></li>
640    /// <li>
641    /// <p><code>x-amz-copy-source-if-unmodified-since</code> condition evaluates to false</p></li>
642    /// </ul>
643    pub fn set_copy_source_if_unmodified_since(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
644        self.inner = self.inner.set_copy_source_if_unmodified_since(input);
645        self
646    }
647    /// <p>Copies the object if it hasn't been modified since the specified time.</p>
648    /// <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>
649    /// <ul>
650    /// <li>
651    /// <p><code>x-amz-copy-source-if-match</code> condition evaluates to true</p></li>
652    /// <li>
653    /// <p><code>x-amz-copy-source-if-unmodified-since</code> condition evaluates to false</p></li>
654    /// </ul>
655    pub fn get_copy_source_if_unmodified_since(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
656        self.inner.get_copy_source_if_unmodified_since()
657    }
658    /// <p>The date and time at which the object is no longer cacheable.</p>
659    pub fn expires(mut self, input: ::aws_smithy_types::DateTime) -> Self {
660        self.inner = self.inner.expires(input);
661        self
662    }
663    /// <p>The date and time at which the object is no longer cacheable.</p>
664    pub fn set_expires(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
665        self.inner = self.inner.set_expires(input);
666        self
667    }
668    /// <p>The date and time at which the object is no longer cacheable.</p>
669    pub fn get_expires(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
670        self.inner.get_expires()
671    }
672    /// <p>Gives the grantee READ, READ_ACP, and WRITE_ACP permissions on the object.</p><note>
673    /// <ul>
674    /// <li>
675    /// <p>This functionality is not supported for directory buckets.</p></li>
676    /// <li>
677    /// <p>This functionality is not supported for Amazon S3 on Outposts.</p></li>
678    /// </ul>
679    /// </note>
680    pub fn grant_full_control(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
681        self.inner = self.inner.grant_full_control(input.into());
682        self
683    }
684    /// <p>Gives the grantee READ, READ_ACP, and WRITE_ACP permissions on the object.</p><note>
685    /// <ul>
686    /// <li>
687    /// <p>This functionality is not supported for directory buckets.</p></li>
688    /// <li>
689    /// <p>This functionality is not supported for Amazon S3 on Outposts.</p></li>
690    /// </ul>
691    /// </note>
692    pub fn set_grant_full_control(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
693        self.inner = self.inner.set_grant_full_control(input);
694        self
695    }
696    /// <p>Gives the grantee READ, READ_ACP, and WRITE_ACP permissions on the object.</p><note>
697    /// <ul>
698    /// <li>
699    /// <p>This functionality is not supported for directory buckets.</p></li>
700    /// <li>
701    /// <p>This functionality is not supported for Amazon S3 on Outposts.</p></li>
702    /// </ul>
703    /// </note>
704    pub fn get_grant_full_control(&self) -> &::std::option::Option<::std::string::String> {
705        self.inner.get_grant_full_control()
706    }
707    /// <p>Allows grantee to read the object data and its metadata.</p><note>
708    /// <ul>
709    /// <li>
710    /// <p>This functionality is not supported for directory buckets.</p></li>
711    /// <li>
712    /// <p>This functionality is not supported for Amazon S3 on Outposts.</p></li>
713    /// </ul>
714    /// </note>
715    pub fn grant_read(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
716        self.inner = self.inner.grant_read(input.into());
717        self
718    }
719    /// <p>Allows grantee to read the object data and its metadata.</p><note>
720    /// <ul>
721    /// <li>
722    /// <p>This functionality is not supported for directory buckets.</p></li>
723    /// <li>
724    /// <p>This functionality is not supported for Amazon S3 on Outposts.</p></li>
725    /// </ul>
726    /// </note>
727    pub fn set_grant_read(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
728        self.inner = self.inner.set_grant_read(input);
729        self
730    }
731    /// <p>Allows grantee to read the object data and its metadata.</p><note>
732    /// <ul>
733    /// <li>
734    /// <p>This functionality is not supported for directory buckets.</p></li>
735    /// <li>
736    /// <p>This functionality is not supported for Amazon S3 on Outposts.</p></li>
737    /// </ul>
738    /// </note>
739    pub fn get_grant_read(&self) -> &::std::option::Option<::std::string::String> {
740        self.inner.get_grant_read()
741    }
742    /// <p>Allows grantee to read the object ACL.</p><note>
743    /// <ul>
744    /// <li>
745    /// <p>This functionality is not supported for directory buckets.</p></li>
746    /// <li>
747    /// <p>This functionality is not supported for Amazon S3 on Outposts.</p></li>
748    /// </ul>
749    /// </note>
750    pub fn grant_read_acp(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
751        self.inner = self.inner.grant_read_acp(input.into());
752        self
753    }
754    /// <p>Allows grantee to read the object ACL.</p><note>
755    /// <ul>
756    /// <li>
757    /// <p>This functionality is not supported for directory buckets.</p></li>
758    /// <li>
759    /// <p>This functionality is not supported for Amazon S3 on Outposts.</p></li>
760    /// </ul>
761    /// </note>
762    pub fn set_grant_read_acp(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
763        self.inner = self.inner.set_grant_read_acp(input);
764        self
765    }
766    /// <p>Allows grantee to read the object ACL.</p><note>
767    /// <ul>
768    /// <li>
769    /// <p>This functionality is not supported for directory buckets.</p></li>
770    /// <li>
771    /// <p>This functionality is not supported for Amazon S3 on Outposts.</p></li>
772    /// </ul>
773    /// </note>
774    pub fn get_grant_read_acp(&self) -> &::std::option::Option<::std::string::String> {
775        self.inner.get_grant_read_acp()
776    }
777    /// <p>Allows grantee to write the ACL for the applicable object.</p><note>
778    /// <ul>
779    /// <li>
780    /// <p>This functionality is not supported for directory buckets.</p></li>
781    /// <li>
782    /// <p>This functionality is not supported for Amazon S3 on Outposts.</p></li>
783    /// </ul>
784    /// </note>
785    pub fn grant_write_acp(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
786        self.inner = self.inner.grant_write_acp(input.into());
787        self
788    }
789    /// <p>Allows grantee to write the ACL for the applicable object.</p><note>
790    /// <ul>
791    /// <li>
792    /// <p>This functionality is not supported for directory buckets.</p></li>
793    /// <li>
794    /// <p>This functionality is not supported for Amazon S3 on Outposts.</p></li>
795    /// </ul>
796    /// </note>
797    pub fn set_grant_write_acp(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
798        self.inner = self.inner.set_grant_write_acp(input);
799        self
800    }
801    /// <p>Allows grantee to write the ACL for the applicable object.</p><note>
802    /// <ul>
803    /// <li>
804    /// <p>This functionality is not supported for directory buckets.</p></li>
805    /// <li>
806    /// <p>This functionality is not supported for Amazon S3 on Outposts.</p></li>
807    /// </ul>
808    /// </note>
809    pub fn get_grant_write_acp(&self) -> &::std::option::Option<::std::string::String> {
810        self.inner.get_grant_write_acp()
811    }
812    /// <p>The key of the destination object.</p>
813    pub fn key(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
814        self.inner = self.inner.key(input.into());
815        self
816    }
817    /// <p>The key of the destination object.</p>
818    pub fn set_key(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
819        self.inner = self.inner.set_key(input);
820        self
821    }
822    /// <p>The key of the destination object.</p>
823    pub fn get_key(&self) -> &::std::option::Option<::std::string::String> {
824        self.inner.get_key()
825    }
826    ///
827    /// Adds a key-value pair to `Metadata`.
828    ///
829    /// To override the contents of this collection use [`set_metadata`](Self::set_metadata).
830    ///
831    /// <p>A map of metadata to store with the object in S3.</p>
832    pub fn metadata(mut self, k: impl ::std::convert::Into<::std::string::String>, v: impl ::std::convert::Into<::std::string::String>) -> Self {
833        self.inner = self.inner.metadata(k.into(), v.into());
834        self
835    }
836    /// <p>A map of metadata to store with the object in S3.</p>
837    pub fn set_metadata(mut self, input: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>) -> Self {
838        self.inner = self.inner.set_metadata(input);
839        self
840    }
841    /// <p>A map of metadata to store with the object in S3.</p>
842    pub fn get_metadata(&self) -> &::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>> {
843        self.inner.get_metadata()
844    }
845    /// <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>
846    /// <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>
847    /// <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>
848    /// </note>
849    pub fn metadata_directive(mut self, input: crate::types::MetadataDirective) -> Self {
850        self.inner = self.inner.metadata_directive(input);
851        self
852    }
853    /// <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>
854    /// <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>
855    /// <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>
856    /// </note>
857    pub fn set_metadata_directive(mut self, input: ::std::option::Option<crate::types::MetadataDirective>) -> Self {
858        self.inner = self.inner.set_metadata_directive(input);
859        self
860    }
861    /// <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>
862    /// <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>
863    /// <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>
864    /// </note>
865    pub fn get_metadata_directive(&self) -> &::std::option::Option<crate::types::MetadataDirective> {
866        self.inner.get_metadata_directive()
867    }
868    /// <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>
869    /// <p>The default value is <code>COPY</code>.</p><note>
870    /// <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>
871    /// <ul>
872    /// <li>
873    /// <p>When you attempt to <code>COPY</code> the tag-set from an S3 source object that has non-empty tags.</p></li>
874    /// <li>
875    /// <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>
876    /// <li>
877    /// <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>
878    /// </ul>
879    /// <p>Because only the empty tag-set is supported for directory buckets in a <code>CopyObject</code> operation, the following situations are allowed:</p>
880    /// <ul>
881    /// <li>
882    /// <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>
883    /// <li>
884    /// <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>
885    /// <li>
886    /// <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>
887    /// <li>
888    /// <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>
889    /// </ul>
890    /// </note>
891    pub fn tagging_directive(mut self, input: crate::types::TaggingDirective) -> Self {
892        self.inner = self.inner.tagging_directive(input);
893        self
894    }
895    /// <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>
896    /// <p>The default value is <code>COPY</code>.</p><note>
897    /// <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>
898    /// <ul>
899    /// <li>
900    /// <p>When you attempt to <code>COPY</code> the tag-set from an S3 source object that has non-empty tags.</p></li>
901    /// <li>
902    /// <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>
903    /// <li>
904    /// <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>
905    /// </ul>
906    /// <p>Because only the empty tag-set is supported for directory buckets in a <code>CopyObject</code> operation, the following situations are allowed:</p>
907    /// <ul>
908    /// <li>
909    /// <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>
910    /// <li>
911    /// <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>
912    /// <li>
913    /// <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>
914    /// <li>
915    /// <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>
916    /// </ul>
917    /// </note>
918    pub fn set_tagging_directive(mut self, input: ::std::option::Option<crate::types::TaggingDirective>) -> Self {
919        self.inner = self.inner.set_tagging_directive(input);
920        self
921    }
922    /// <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>
923    /// <p>The default value is <code>COPY</code>.</p><note>
924    /// <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>
925    /// <ul>
926    /// <li>
927    /// <p>When you attempt to <code>COPY</code> the tag-set from an S3 source object that has non-empty tags.</p></li>
928    /// <li>
929    /// <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>
930    /// <li>
931    /// <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>
932    /// </ul>
933    /// <p>Because only the empty tag-set is supported for directory buckets in a <code>CopyObject</code> operation, the following situations are allowed:</p>
934    /// <ul>
935    /// <li>
936    /// <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>
937    /// <li>
938    /// <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>
939    /// <li>
940    /// <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>
941    /// <li>
942    /// <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>
943    /// </ul>
944    /// </note>
945    pub fn get_tagging_directive(&self) -> &::std::option::Option<crate::types::TaggingDirective> {
946        self.inner.get_tagging_directive()
947    }
948    /// <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>
949    /// <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>
950    /// <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>
951    /// <p><b>General purpose buckets </b></p>
952    /// <ul>
953    /// <li>
954    /// <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>
955    /// <li>
956    /// <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>
957    /// </ul>
958    /// <p><b>Directory buckets </b></p>
959    /// <ul>
960    /// <li>
961    /// <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>
962    /// <li>
963    /// <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>
964    /// </ul>
965    pub fn server_side_encryption(mut self, input: crate::types::ServerSideEncryption) -> Self {
966        self.inner = self.inner.server_side_encryption(input);
967        self
968    }
969    /// <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>
970    /// <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>
971    /// <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>
972    /// <p><b>General purpose buckets </b></p>
973    /// <ul>
974    /// <li>
975    /// <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>
976    /// <li>
977    /// <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>
978    /// </ul>
979    /// <p><b>Directory buckets </b></p>
980    /// <ul>
981    /// <li>
982    /// <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>
983    /// <li>
984    /// <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>
985    /// </ul>
986    pub fn set_server_side_encryption(mut self, input: ::std::option::Option<crate::types::ServerSideEncryption>) -> Self {
987        self.inner = self.inner.set_server_side_encryption(input);
988        self
989    }
990    /// <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>
991    /// <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>
992    /// <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>
993    /// <p><b>General purpose buckets </b></p>
994    /// <ul>
995    /// <li>
996    /// <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>
997    /// <li>
998    /// <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>
999    /// </ul>
1000    /// <p><b>Directory buckets </b></p>
1001    /// <ul>
1002    /// <li>
1003    /// <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>
1004    /// <li>
1005    /// <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>
1006    /// </ul>
1007    pub fn get_server_side_encryption(&self) -> &::std::option::Option<crate::types::ServerSideEncryption> {
1008        self.inner.get_server_side_encryption()
1009    }
1010    /// <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>
1011    /// <ul>
1012    /// <li>
1013    /// <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>
1014    /// <li>
1015    /// <p><b>Amazon S3 on Outposts </b> - S3 on Outposts only uses the <code>OUTPOSTS</code> Storage Class.</p></li>
1016    /// </ul>
1017    /// </note>
1018    /// <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>
1019    /// <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>
1020    /// <ul>
1021    /// <li>
1022    /// <p>The storage class of the source object is <code>GLACIER</code> or <code>DEEP_ARCHIVE</code>.</p></li>
1023    /// <li>
1024    /// <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>
1025    /// </ul>
1026    /// <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>
1027    pub fn storage_class(mut self, input: crate::types::StorageClass) -> Self {
1028        self.inner = self.inner.storage_class(input);
1029        self
1030    }
1031    /// <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>
1032    /// <ul>
1033    /// <li>
1034    /// <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>
1035    /// <li>
1036    /// <p><b>Amazon S3 on Outposts </b> - S3 on Outposts only uses the <code>OUTPOSTS</code> Storage Class.</p></li>
1037    /// </ul>
1038    /// </note>
1039    /// <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>
1040    /// <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>
1041    /// <ul>
1042    /// <li>
1043    /// <p>The storage class of the source object is <code>GLACIER</code> or <code>DEEP_ARCHIVE</code>.</p></li>
1044    /// <li>
1045    /// <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>
1046    /// </ul>
1047    /// <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>
1048    pub fn set_storage_class(mut self, input: ::std::option::Option<crate::types::StorageClass>) -> Self {
1049        self.inner = self.inner.set_storage_class(input);
1050        self
1051    }
1052    /// <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>
1053    /// <ul>
1054    /// <li>
1055    /// <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>
1056    /// <li>
1057    /// <p><b>Amazon S3 on Outposts </b> - S3 on Outposts only uses the <code>OUTPOSTS</code> Storage Class.</p></li>
1058    /// </ul>
1059    /// </note>
1060    /// <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>
1061    /// <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>
1062    /// <ul>
1063    /// <li>
1064    /// <p>The storage class of the source object is <code>GLACIER</code> or <code>DEEP_ARCHIVE</code>.</p></li>
1065    /// <li>
1066    /// <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>
1067    /// </ul>
1068    /// <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>
1069    pub fn get_storage_class(&self) -> &::std::option::Option<crate::types::StorageClass> {
1070        self.inner.get_storage_class()
1071    }
1072    /// <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>
1073    /// <p>This functionality is not supported for directory buckets.</p>
1074    /// </note>
1075    pub fn website_redirect_location(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
1076        self.inner = self.inner.website_redirect_location(input.into());
1077        self
1078    }
1079    /// <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>
1080    /// <p>This functionality is not supported for directory buckets.</p>
1081    /// </note>
1082    pub fn set_website_redirect_location(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
1083        self.inner = self.inner.set_website_redirect_location(input);
1084        self
1085    }
1086    /// <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>
1087    /// <p>This functionality is not supported for directory buckets.</p>
1088    /// </note>
1089    pub fn get_website_redirect_location(&self) -> &::std::option::Option<::std::string::String> {
1090        self.inner.get_website_redirect_location()
1091    }
1092    /// <p>Specifies the algorithm to use when encrypting the object (for example, <code>AES256</code>).</p>
1093    /// <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>
1094    /// <p>This functionality is not supported when the destination bucket is a directory bucket.</p>
1095    /// </note>
1096    pub fn sse_customer_algorithm(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
1097        self.inner = self.inner.sse_customer_algorithm(input.into());
1098        self
1099    }
1100    /// <p>Specifies the algorithm to use when encrypting the object (for example, <code>AES256</code>).</p>
1101    /// <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>
1102    /// <p>This functionality is not supported when the destination bucket is a directory bucket.</p>
1103    /// </note>
1104    pub fn set_sse_customer_algorithm(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
1105        self.inner = self.inner.set_sse_customer_algorithm(input);
1106        self
1107    }
1108    /// <p>Specifies the algorithm to use when encrypting the object (for example, <code>AES256</code>).</p>
1109    /// <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>
1110    /// <p>This functionality is not supported when the destination bucket is a directory bucket.</p>
1111    /// </note>
1112    pub fn get_sse_customer_algorithm(&self) -> &::std::option::Option<::std::string::String> {
1113        self.inner.get_sse_customer_algorithm()
1114    }
1115    /// <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>
1116    /// <p>This functionality is not supported when the destination bucket is a directory bucket.</p>
1117    /// </note>
1118    pub fn sse_customer_key(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
1119        self.inner = self.inner.sse_customer_key(input.into());
1120        self
1121    }
1122    /// <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>
1123    /// <p>This functionality is not supported when the destination bucket is a directory bucket.</p>
1124    /// </note>
1125    pub fn set_sse_customer_key(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
1126        self.inner = self.inner.set_sse_customer_key(input);
1127        self
1128    }
1129    /// <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>
1130    /// <p>This functionality is not supported when the destination bucket is a directory bucket.</p>
1131    /// </note>
1132    pub fn get_sse_customer_key(&self) -> &::std::option::Option<::std::string::String> {
1133        self.inner.get_sse_customer_key()
1134    }
1135    /// <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>
1136    /// <p>This functionality is not supported when the destination bucket is a directory bucket.</p>
1137    /// </note>
1138    pub fn sse_customer_key_md5(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
1139        self.inner = self.inner.sse_customer_key_md5(input.into());
1140        self
1141    }
1142    /// <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>
1143    /// <p>This functionality is not supported when the destination bucket is a directory bucket.</p>
1144    /// </note>
1145    pub fn set_sse_customer_key_md5(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
1146        self.inner = self.inner.set_sse_customer_key_md5(input);
1147        self
1148    }
1149    /// <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>
1150    /// <p>This functionality is not supported when the destination bucket is a directory bucket.</p>
1151    /// </note>
1152    pub fn get_sse_customer_key_md5(&self) -> &::std::option::Option<::std::string::String> {
1153        self.inner.get_sse_customer_key_md5()
1154    }
1155    /// <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>
1156    /// <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>
1157    pub fn ssekms_key_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
1158        self.inner = self.inner.ssekms_key_id(input.into());
1159        self
1160    }
1161    /// <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>
1162    /// <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>
1163    pub fn set_ssekms_key_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
1164        self.inner = self.inner.set_ssekms_key_id(input);
1165        self
1166    }
1167    /// <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>
1168    /// <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>
1169    pub fn get_ssekms_key_id(&self) -> &::std::option::Option<::std::string::String> {
1170        self.inner.get_ssekms_key_id()
1171    }
1172    /// <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>
1173    /// <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>
1174    /// <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>
1175    pub fn ssekms_encryption_context(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
1176        self.inner = self.inner.ssekms_encryption_context(input.into());
1177        self
1178    }
1179    /// <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>
1180    /// <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>
1181    /// <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>
1182    pub fn set_ssekms_encryption_context(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
1183        self.inner = self.inner.set_ssekms_encryption_context(input);
1184        self
1185    }
1186    /// <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>
1187    /// <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>
1188    /// <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>
1189    pub fn get_ssekms_encryption_context(&self) -> &::std::option::Option<::std::string::String> {
1190        self.inner.get_ssekms_encryption_context()
1191    }
1192    /// <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>
1193    /// <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>
1194    /// <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>
1195    /// <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>
1196    /// </note>
1197    pub fn bucket_key_enabled(mut self, input: bool) -> Self {
1198        self.inner = self.inner.bucket_key_enabled(input);
1199        self
1200    }
1201    /// <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>
1202    /// <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>
1203    /// <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>
1204    /// <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>
1205    /// </note>
1206    pub fn set_bucket_key_enabled(mut self, input: ::std::option::Option<bool>) -> Self {
1207        self.inner = self.inner.set_bucket_key_enabled(input);
1208        self
1209    }
1210    /// <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>
1211    /// <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>
1212    /// <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>
1213    /// <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>
1214    /// </note>
1215    pub fn get_bucket_key_enabled(&self) -> &::std::option::Option<bool> {
1216        self.inner.get_bucket_key_enabled()
1217    }
1218    /// <p>Specifies the algorithm to use when decrypting the source object (for example, <code>AES256</code>).</p>
1219    /// <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>
1220    /// <p>This functionality is not supported when the source object is in a directory bucket.</p>
1221    /// </note>
1222    pub fn copy_source_sse_customer_algorithm(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
1223        self.inner = self.inner.copy_source_sse_customer_algorithm(input.into());
1224        self
1225    }
1226    /// <p>Specifies the algorithm to use when decrypting the source object (for example, <code>AES256</code>).</p>
1227    /// <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>
1228    /// <p>This functionality is not supported when the source object is in a directory bucket.</p>
1229    /// </note>
1230    pub fn set_copy_source_sse_customer_algorithm(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
1231        self.inner = self.inner.set_copy_source_sse_customer_algorithm(input);
1232        self
1233    }
1234    /// <p>Specifies the algorithm to use when decrypting the source object (for example, <code>AES256</code>).</p>
1235    /// <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>
1236    /// <p>This functionality is not supported when the source object is in a directory bucket.</p>
1237    /// </note>
1238    pub fn get_copy_source_sse_customer_algorithm(&self) -> &::std::option::Option<::std::string::String> {
1239        self.inner.get_copy_source_sse_customer_algorithm()
1240    }
1241    /// <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>
1242    /// <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>
1243    /// <p>This functionality is not supported when the source object is in a directory bucket.</p>
1244    /// </note>
1245    pub fn copy_source_sse_customer_key(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
1246        self.inner = self.inner.copy_source_sse_customer_key(input.into());
1247        self
1248    }
1249    /// <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>
1250    /// <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>
1251    /// <p>This functionality is not supported when the source object is in a directory bucket.</p>
1252    /// </note>
1253    pub fn set_copy_source_sse_customer_key(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
1254        self.inner = self.inner.set_copy_source_sse_customer_key(input);
1255        self
1256    }
1257    /// <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>
1258    /// <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>
1259    /// <p>This functionality is not supported when the source object is in a directory bucket.</p>
1260    /// </note>
1261    pub fn get_copy_source_sse_customer_key(&self) -> &::std::option::Option<::std::string::String> {
1262        self.inner.get_copy_source_sse_customer_key()
1263    }
1264    /// <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>
1265    /// <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>
1266    /// <p>This functionality is not supported when the source object is in a directory bucket.</p>
1267    /// </note>
1268    pub fn copy_source_sse_customer_key_md5(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
1269        self.inner = self.inner.copy_source_sse_customer_key_md5(input.into());
1270        self
1271    }
1272    /// <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>
1273    /// <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>
1274    /// <p>This functionality is not supported when the source object is in a directory bucket.</p>
1275    /// </note>
1276    pub fn set_copy_source_sse_customer_key_md5(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
1277        self.inner = self.inner.set_copy_source_sse_customer_key_md5(input);
1278        self
1279    }
1280    /// <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>
1281    /// <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>
1282    /// <p>This functionality is not supported when the source object is in a directory bucket.</p>
1283    /// </note>
1284    pub fn get_copy_source_sse_customer_key_md5(&self) -> &::std::option::Option<::std::string::String> {
1285        self.inner.get_copy_source_sse_customer_key_md5()
1286    }
1287    /// <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>
1288    /// <p>This functionality is not supported for directory buckets.</p>
1289    /// </note>
1290    pub fn request_payer(mut self, input: crate::types::RequestPayer) -> Self {
1291        self.inner = self.inner.request_payer(input);
1292        self
1293    }
1294    /// <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>
1295    /// <p>This functionality is not supported for directory buckets.</p>
1296    /// </note>
1297    pub fn set_request_payer(mut self, input: ::std::option::Option<crate::types::RequestPayer>) -> Self {
1298        self.inner = self.inner.set_request_payer(input);
1299        self
1300    }
1301    /// <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>
1302    /// <p>This functionality is not supported for directory buckets.</p>
1303    /// </note>
1304    pub fn get_request_payer(&self) -> &::std::option::Option<crate::types::RequestPayer> {
1305        self.inner.get_request_payer()
1306    }
1307    /// <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>
1308    /// <p>The default value is the empty value.</p><note>
1309    /// <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>
1310    /// <ul>
1311    /// <li>
1312    /// <p>When you attempt to <code>COPY</code> the tag-set from an S3 source object that has non-empty tags.</p></li>
1313    /// <li>
1314    /// <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>
1315    /// <li>
1316    /// <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>
1317    /// </ul>
1318    /// <p>Because only the empty tag-set is supported for directory buckets in a <code>CopyObject</code> operation, the following situations are allowed:</p>
1319    /// <ul>
1320    /// <li>
1321    /// <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>
1322    /// <li>
1323    /// <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>
1324    /// <li>
1325    /// <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>
1326    /// <li>
1327    /// <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>
1328    /// </ul>
1329    /// </note>
1330    pub fn tagging(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
1331        self.inner = self.inner.tagging(input.into());
1332        self
1333    }
1334    /// <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>
1335    /// <p>The default value is the empty value.</p><note>
1336    /// <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>
1337    /// <ul>
1338    /// <li>
1339    /// <p>When you attempt to <code>COPY</code> the tag-set from an S3 source object that has non-empty tags.</p></li>
1340    /// <li>
1341    /// <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>
1342    /// <li>
1343    /// <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>
1344    /// </ul>
1345    /// <p>Because only the empty tag-set is supported for directory buckets in a <code>CopyObject</code> operation, the following situations are allowed:</p>
1346    /// <ul>
1347    /// <li>
1348    /// <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>
1349    /// <li>
1350    /// <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>
1351    /// <li>
1352    /// <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>
1353    /// <li>
1354    /// <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>
1355    /// </ul>
1356    /// </note>
1357    pub fn set_tagging(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
1358        self.inner = self.inner.set_tagging(input);
1359        self
1360    }
1361    /// <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>
1362    /// <p>The default value is the empty value.</p><note>
1363    /// <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>
1364    /// <ul>
1365    /// <li>
1366    /// <p>When you attempt to <code>COPY</code> the tag-set from an S3 source object that has non-empty tags.</p></li>
1367    /// <li>
1368    /// <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>
1369    /// <li>
1370    /// <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>
1371    /// </ul>
1372    /// <p>Because only the empty tag-set is supported for directory buckets in a <code>CopyObject</code> operation, the following situations are allowed:</p>
1373    /// <ul>
1374    /// <li>
1375    /// <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>
1376    /// <li>
1377    /// <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>
1378    /// <li>
1379    /// <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>
1380    /// <li>
1381    /// <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>
1382    /// </ul>
1383    /// </note>
1384    pub fn get_tagging(&self) -> &::std::option::Option<::std::string::String> {
1385        self.inner.get_tagging()
1386    }
1387    /// <p>The Object Lock mode that you want to apply to the object copy.</p><note>
1388    /// <p>This functionality is not supported for directory buckets.</p>
1389    /// </note>
1390    pub fn object_lock_mode(mut self, input: crate::types::ObjectLockMode) -> Self {
1391        self.inner = self.inner.object_lock_mode(input);
1392        self
1393    }
1394    /// <p>The Object Lock mode that you want to apply to the object copy.</p><note>
1395    /// <p>This functionality is not supported for directory buckets.</p>
1396    /// </note>
1397    pub fn set_object_lock_mode(mut self, input: ::std::option::Option<crate::types::ObjectLockMode>) -> Self {
1398        self.inner = self.inner.set_object_lock_mode(input);
1399        self
1400    }
1401    /// <p>The Object Lock mode that you want to apply to the object copy.</p><note>
1402    /// <p>This functionality is not supported for directory buckets.</p>
1403    /// </note>
1404    pub fn get_object_lock_mode(&self) -> &::std::option::Option<crate::types::ObjectLockMode> {
1405        self.inner.get_object_lock_mode()
1406    }
1407    /// <p>The date and time when you want the Object Lock of the object copy to expire.</p><note>
1408    /// <p>This functionality is not supported for directory buckets.</p>
1409    /// </note>
1410    pub fn object_lock_retain_until_date(mut self, input: ::aws_smithy_types::DateTime) -> Self {
1411        self.inner = self.inner.object_lock_retain_until_date(input);
1412        self
1413    }
1414    /// <p>The date and time when you want the Object Lock of the object copy to expire.</p><note>
1415    /// <p>This functionality is not supported for directory buckets.</p>
1416    /// </note>
1417    pub fn set_object_lock_retain_until_date(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
1418        self.inner = self.inner.set_object_lock_retain_until_date(input);
1419        self
1420    }
1421    /// <p>The date and time when you want the Object Lock of the object copy to expire.</p><note>
1422    /// <p>This functionality is not supported for directory buckets.</p>
1423    /// </note>
1424    pub fn get_object_lock_retain_until_date(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
1425        self.inner.get_object_lock_retain_until_date()
1426    }
1427    /// <p>Specifies whether you want to apply a legal hold to the object copy.</p><note>
1428    /// <p>This functionality is not supported for directory buckets.</p>
1429    /// </note>
1430    pub fn object_lock_legal_hold_status(mut self, input: crate::types::ObjectLockLegalHoldStatus) -> Self {
1431        self.inner = self.inner.object_lock_legal_hold_status(input);
1432        self
1433    }
1434    /// <p>Specifies whether you want to apply a legal hold to the object copy.</p><note>
1435    /// <p>This functionality is not supported for directory buckets.</p>
1436    /// </note>
1437    pub fn set_object_lock_legal_hold_status(mut self, input: ::std::option::Option<crate::types::ObjectLockLegalHoldStatus>) -> Self {
1438        self.inner = self.inner.set_object_lock_legal_hold_status(input);
1439        self
1440    }
1441    /// <p>Specifies whether you want to apply a legal hold to the object copy.</p><note>
1442    /// <p>This functionality is not supported for directory buckets.</p>
1443    /// </note>
1444    pub fn get_object_lock_legal_hold_status(&self) -> &::std::option::Option<crate::types::ObjectLockLegalHoldStatus> {
1445        self.inner.get_object_lock_legal_hold_status()
1446    }
1447    /// <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>
1448    pub fn expected_bucket_owner(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
1449        self.inner = self.inner.expected_bucket_owner(input.into());
1450        self
1451    }
1452    /// <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>
1453    pub fn set_expected_bucket_owner(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
1454        self.inner = self.inner.set_expected_bucket_owner(input);
1455        self
1456    }
1457    /// <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>
1458    pub fn get_expected_bucket_owner(&self) -> &::std::option::Option<::std::string::String> {
1459        self.inner.get_expected_bucket_owner()
1460    }
1461    /// <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>
1462    pub fn expected_source_bucket_owner(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
1463        self.inner = self.inner.expected_source_bucket_owner(input.into());
1464        self
1465    }
1466    /// <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>
1467    pub fn set_expected_source_bucket_owner(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
1468        self.inner = self.inner.set_expected_source_bucket_owner(input);
1469        self
1470    }
1471    /// <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>
1472    pub fn get_expected_source_bucket_owner(&self) -> &::std::option::Option<::std::string::String> {
1473        self.inner.get_expected_source_bucket_owner()
1474    }
1475}