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