aws_sdk_s3/operation/copy_object/
builders.rs

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