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