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