aws_sdk_s3/operation/upload_part_copy/
builders.rs

1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2pub use crate::operation::upload_part_copy::_upload_part_copy_output::UploadPartCopyOutputBuilder;
3
4pub use crate::operation::upload_part_copy::_upload_part_copy_input::UploadPartCopyInputBuilder;
5
6impl crate::operation::upload_part_copy::builders::UploadPartCopyInputBuilder {
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::upload_part_copy::UploadPartCopyOutput,
13        ::aws_smithy_runtime_api::client::result::SdkError<
14            crate::operation::upload_part_copy::UploadPartCopyError,
15            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
16        >,
17    > {
18        let mut fluent_builder = client.upload_part_copy();
19        fluent_builder.inner = self;
20        fluent_builder.send().await
21    }
22}
23/// Fluent builder constructing a request to `UploadPartCopy`.
24///
25/// <p>Uploads a part by copying data from an existing object as data source. To specify the data source, you add the request header <code>x-amz-copy-source</code> in your request. To specify a byte range, you add the request header <code>x-amz-copy-source-range</code> in your request.</p>
26/// <p>For information about maximum and minimum part sizes and other multipart upload specifications, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/qfacts.html">Multipart upload limits</a> in the <i>Amazon S3 User Guide</i>.</p><note>
27/// <p>Instead of copying data from an existing object as part data, you might use the <a href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_UploadPart.html">UploadPart</a> action to upload new data as a part of an object in your request.</p>
28/// </note>
29/// <p>You must initiate a multipart upload before you can upload any part. In response to your initiate request, Amazon S3 returns the upload ID, a unique identifier that you must include in your upload part request.</p>
30/// <p>For conceptual information about multipart uploads, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/uploadobjusingmpu.html">Uploading Objects Using Multipart Upload</a> in the <i>Amazon S3 User Guide</i>. For information about copying objects using a single atomic action vs. a multipart upload, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/ObjectOperations.html">Operations on Objects</a> in the <i>Amazon S3 User Guide</i>.</p><note>
31/// <p><b>Directory buckets</b> - For directory buckets, you must make requests for this API operation to the Zonal endpoint. These endpoints support virtual-hosted-style requests in the format <code>https://<i>amzn-s3-demo-bucket</i>.s3express-<i>zone-id</i>.<i>region-code</i>.amazonaws.com/<i>key-name</i> </code>. Path-style requests are not supported. For more information about endpoints in Availability Zones, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/endpoint-directory-buckets-AZ.html">Regional and Zonal endpoints for directory buckets in Availability Zones</a> in the <i>Amazon S3 User Guide</i>. For more information about endpoints in Local Zones, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/s3-lzs-for-directory-buckets.html">Concepts for directory buckets in Local Zones</a> in the <i>Amazon S3 User Guide</i>.</p>
32/// </note>
33/// <dl>
34/// <dt>
35/// Authentication and authorization
36/// </dt>
37/// <dd>
38/// <p>All <code>UploadPartCopy</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>
39/// <p><b>Directory buckets</b> - You must use IAM credentials to authenticate and authorize your access to the <code>UploadPartCopy</code> API operation, instead of using the temporary security credentials through the <code>CreateSession</code> API operation.</p>
40/// <p>Amazon Web Services CLI or SDKs handles authentication and authorization on your behalf.</p>
41/// </dd>
42/// <dt>
43/// Permissions
44/// </dt>
45/// <dd>
46/// <p>You must have <code>READ</code> access to the source object and <code>WRITE</code> access to the destination bucket.</p>
47/// <ul>
48/// <li>
49/// <p><b>General purpose bucket permissions</b> - You must have the permissions in a policy based on the bucket types of your source bucket and destination bucket in an <code>UploadPartCopy</code> operation.</p>
50/// <ul>
51/// <li>
52/// <p>If the source object is in a general purpose bucket, you must have the <b> <code>s3:GetObject</code> </b> permission to read the source object that is being copied.</p></li>
53/// <li>
54/// <p>If the destination bucket is a general purpose bucket, you must have the <b> <code>s3:PutObject</code> </b> permission to write the object copy to the destination bucket.</p></li>
55/// <li>
56/// <p>To perform a multipart upload with encryption using an Key Management Service key, the requester must have permission to the <code>kms:Decrypt</code> and <code>kms:GenerateDataKey</code> actions on the key. The requester must also have permissions for the <code>kms:GenerateDataKey</code> action for the <code>CreateMultipartUpload</code> API. Then, the requester needs permissions for the <code>kms:Decrypt</code> action on the <code>UploadPart</code> and <code>UploadPartCopy</code> APIs. These permissions are required because Amazon S3 must decrypt and read data from the encrypted file parts before it completes the multipart upload. For more information about KMS permissions, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/UsingKMSEncryption.html">Protecting data using server-side encryption with KMS</a> in the <i>Amazon S3 User Guide</i>. For information about the permissions required to use the multipart upload API, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/mpuAndPermissions.html">Multipart upload and permissions</a> and <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/mpuoverview.html#mpuAndPermissions">Multipart upload API and permissions</a> in the <i>Amazon S3 User Guide</i>.</p></li>
57/// </ul></li>
58/// <li>
59/// <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 an <code>UploadPartCopy</code> operation.</p>
60/// <ul>
61/// <li>
62/// <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>
63/// <li>
64/// <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 cannot be set to <code>ReadOnly</code> on the copy destination.</p></li>
65/// </ul>
66/// <p>If the object is encrypted with SSE-KMS, you must also have the <code>kms:GenerateDataKey</code> and <code>kms:Decrypt</code> permissions in IAM identity-based policies and KMS key policies for the KMS key.</p>
67/// <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>
68/// </ul>
69/// </dd>
70/// <dt>
71/// Encryption
72/// </dt>
73/// <dd>
74/// <ul>
75/// <li>
76/// <p><b>General purpose buckets </b> - For information about using server-side encryption with customer-provided encryption keys with the <code>UploadPartCopy</code> operation, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_CopyObject.html">CopyObject</a> and <a href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_UploadPart.html">UploadPart</a>.</p></li>
77/// <li>
78/// <p><b>Directory buckets </b> - For directory buckets, there are only two supported options for server-side encryption: server-side encryption with Amazon S3 managed keys (SSE-S3) (<code>AES256</code>) and server-side encryption with KMS keys (SSE-KMS) (<code>aws:kms</code>). For more information, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/s3-express-serv-side-encryption.html">Protecting data with server-side encryption</a> in the <i>Amazon S3 User Guide</i>.</p><note>
79/// <p>For directory buckets, when you perform a <code>CreateMultipartUpload</code> operation and an <code>UploadPartCopy</code> operation, the request headers you provide in the <code>CreateMultipartUpload</code> request must match the default encryption configuration of the destination bucket.</p>
80/// </note>
81/// <p>S3 Bucket Keys aren't supported, when you copy SSE-KMS encrypted objects from general purpose buckets to directory buckets, from directory buckets to general purpose buckets, or between directory buckets, through <a href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_UploadPartCopy.html">UploadPartCopy</a>. In this case, Amazon S3 makes a call to KMS every time a copy request is made for a KMS-encrypted object.</p></li>
82/// </ul>
83/// </dd>
84/// <dt>
85/// Special errors
86/// </dt>
87/// <dd>
88/// <ul>
89/// <li>
90/// <p>Error Code: <code>NoSuchUpload</code></p>
91/// <ul>
92/// <li>
93/// <p>Description: The specified multipart upload does not exist. The upload ID might be invalid, or the multipart upload might have been aborted or completed.</p></li>
94/// <li>
95/// <p>HTTP Status Code: 404 Not Found</p></li>
96/// </ul></li>
97/// <li>
98/// <p>Error Code: <code>InvalidRequest</code></p>
99/// <ul>
100/// <li>
101/// <p>Description: The specified copy source is not supported as a byte-range copy source.</p></li>
102/// <li>
103/// <p>HTTP Status Code: 400 Bad Request</p></li>
104/// </ul></li>
105/// </ul>
106/// </dd>
107/// <dt>
108/// HTTP Host header syntax
109/// </dt>
110/// <dd>
111/// <p><b>Directory buckets </b> - The HTTP Host header syntax is <code> <i>Bucket-name</i>.s3express-<i>zone-id</i>.<i>region-code</i>.amazonaws.com</code>.</p>
112/// </dd>
113/// </dl>
114/// <p>The following operations are related to <code>UploadPartCopy</code>:</p>
115/// <ul>
116/// <li>
117/// <p><a href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_CreateMultipartUpload.html">CreateMultipartUpload</a></p></li>
118/// <li>
119/// <p><a href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_UploadPart.html">UploadPart</a></p></li>
120/// <li>
121/// <p><a href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_CompleteMultipartUpload.html">CompleteMultipartUpload</a></p></li>
122/// <li>
123/// <p><a href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_AbortMultipartUpload.html">AbortMultipartUpload</a></p></li>
124/// <li>
125/// <p><a href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_ListParts.html">ListParts</a></p></li>
126/// <li>
127/// <p><a href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_ListMultipartUploads.html">ListMultipartUploads</a></p></li>
128/// </ul><important>
129/// <p>You must URL encode any signed header values that contain spaces. For example, if your header value is <code>my file.txt</code>, containing two spaces after <code>my</code>, you must URL encode this value to <code>my%20%20file.txt</code>.</p>
130/// </important>
131#[derive(::std::clone::Clone, ::std::fmt::Debug)]
132pub struct UploadPartCopyFluentBuilder {
133    handle: ::std::sync::Arc<crate::client::Handle>,
134    inner: crate::operation::upload_part_copy::builders::UploadPartCopyInputBuilder,
135    config_override: ::std::option::Option<crate::config::Builder>,
136}
137impl
138    crate::client::customize::internal::CustomizableSend<
139        crate::operation::upload_part_copy::UploadPartCopyOutput,
140        crate::operation::upload_part_copy::UploadPartCopyError,
141    > for UploadPartCopyFluentBuilder
142{
143    fn send(
144        self,
145        config_override: crate::config::Builder,
146    ) -> crate::client::customize::internal::BoxFuture<
147        crate::client::customize::internal::SendResult<
148            crate::operation::upload_part_copy::UploadPartCopyOutput,
149            crate::operation::upload_part_copy::UploadPartCopyError,
150        >,
151    > {
152        ::std::boxed::Box::pin(async move { self.config_override(config_override).send().await })
153    }
154}
155impl UploadPartCopyFluentBuilder {
156    /// Creates a new `UploadPartCopyFluentBuilder`.
157    pub(crate) fn new(handle: ::std::sync::Arc<crate::client::Handle>) -> Self {
158        Self {
159            handle,
160            inner: ::std::default::Default::default(),
161            config_override: ::std::option::Option::None,
162        }
163    }
164    /// Access the UploadPartCopy as a reference.
165    pub fn as_input(&self) -> &crate::operation::upload_part_copy::builders::UploadPartCopyInputBuilder {
166        &self.inner
167    }
168    /// Sends the request and returns the response.
169    ///
170    /// If an error occurs, an `SdkError` will be returned with additional details that
171    /// can be matched against.
172    ///
173    /// By default, any retryable failures will be retried twice. Retry behavior
174    /// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
175    /// set when configuring the client.
176    pub async fn send(
177        self,
178    ) -> ::std::result::Result<
179        crate::operation::upload_part_copy::UploadPartCopyOutput,
180        ::aws_smithy_runtime_api::client::result::SdkError<
181            crate::operation::upload_part_copy::UploadPartCopyError,
182            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
183        >,
184    > {
185        let input = self
186            .inner
187            .build()
188            .map_err(::aws_smithy_runtime_api::client::result::SdkError::construction_failure)?;
189        let runtime_plugins = crate::operation::upload_part_copy::UploadPartCopy::operation_runtime_plugins(
190            self.handle.runtime_plugins.clone(),
191            &self.handle.conf,
192            self.config_override,
193        );
194        crate::operation::upload_part_copy::UploadPartCopy::orchestrate(&runtime_plugins, input).await
195    }
196
197    /// Consumes this builder, creating a customizable operation that can be modified before being sent.
198    pub fn customize(
199        self,
200    ) -> crate::client::customize::CustomizableOperation<
201        crate::operation::upload_part_copy::UploadPartCopyOutput,
202        crate::operation::upload_part_copy::UploadPartCopyError,
203        Self,
204    > {
205        crate::client::customize::CustomizableOperation::new(self)
206    }
207    pub(crate) fn config_override(mut self, config_override: impl ::std::convert::Into<crate::config::Builder>) -> Self {
208        self.set_config_override(::std::option::Option::Some(config_override.into()));
209        self
210    }
211
212    pub(crate) fn set_config_override(&mut self, config_override: ::std::option::Option<crate::config::Builder>) -> &mut Self {
213        self.config_override = config_override;
214        self
215    }
216    /// <p>The bucket name.</p>
217    /// <p><b>Directory buckets</b> - When you use this operation with a directory bucket, you must use virtual-hosted-style requests in the format <code> <i>Bucket-name</i>.s3express-<i>zone-id</i>.<i>region-code</i>.amazonaws.com</code>. Path-style requests are not supported. Directory bucket names must be unique in the chosen Zone (Availability Zone or Local Zone). Bucket names must follow the format <code> <i>bucket-base-name</i>--<i>zone-id</i>--x-s3</code> (for example, <code> <i>amzn-s3-demo-bucket</i>--<i>usw2-az1</i>--x-s3</code>). For information about bucket naming restrictions, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/directory-bucket-naming-rules.html">Directory bucket naming rules</a> in the <i>Amazon S3 User Guide</i>.</p><note>
218    /// <p>Copying objects across different Amazon Web Services Regions isn't supported when the source or destination bucket is in Amazon Web Services Local Zones. The source and destination buckets must have the same parent Amazon Web Services Region. Otherwise, you get an HTTP <code>400 Bad Request</code> error with the error code <code>InvalidRequest</code>.</p>
219    /// </note>
220    /// <p><b>Access points</b> - When you use this action with an access point for general purpose buckets, you must provide the alias of the access point in place of the bucket name or specify the access point ARN. When you use this action with an access point for directory buckets, you must provide the access point name in place of the bucket name. When using the access point ARN, you must direct requests to the access point hostname. The access point hostname takes the form <i>AccessPointName</i>-<i>AccountId</i>.s3-accesspoint.<i>Region</i>.amazonaws.com. When using this action with an access point through the Amazon Web Services SDKs, you provide the access point ARN in place of the bucket name. For more information about access point ARNs, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/using-access-points.html">Using access points</a> in the <i>Amazon S3 User Guide</i>.</p><note>
221    /// <p>Object Lambda access points are not supported by directory buckets.</p>
222    /// </note>
223    /// <p><b>S3 on Outposts</b> - When you use this action with 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, the destination bucket must be the Outposts access point ARN or the access point alias. For more information about S3 on Outposts, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/S3onOutposts.html">What is S3 on Outposts?</a> in the <i>Amazon S3 User Guide</i>.</p>
224    pub fn bucket(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
225        self.inner = self.inner.bucket(input.into());
226        self
227    }
228    /// <p>The bucket name.</p>
229    /// <p><b>Directory buckets</b> - When you use this operation with a directory bucket, you must use virtual-hosted-style requests in the format <code> <i>Bucket-name</i>.s3express-<i>zone-id</i>.<i>region-code</i>.amazonaws.com</code>. Path-style requests are not supported. Directory bucket names must be unique in the chosen Zone (Availability Zone or Local Zone). Bucket names must follow the format <code> <i>bucket-base-name</i>--<i>zone-id</i>--x-s3</code> (for example, <code> <i>amzn-s3-demo-bucket</i>--<i>usw2-az1</i>--x-s3</code>). For information about bucket naming restrictions, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/directory-bucket-naming-rules.html">Directory bucket naming rules</a> in the <i>Amazon S3 User Guide</i>.</p><note>
230    /// <p>Copying objects across different Amazon Web Services Regions isn't supported when the source or destination bucket is in Amazon Web Services Local Zones. The source and destination buckets must have the same parent Amazon Web Services Region. Otherwise, you get an HTTP <code>400 Bad Request</code> error with the error code <code>InvalidRequest</code>.</p>
231    /// </note>
232    /// <p><b>Access points</b> - When you use this action with an access point for general purpose buckets, you must provide the alias of the access point in place of the bucket name or specify the access point ARN. When you use this action with an access point for directory buckets, you must provide the access point name in place of the bucket name. When using the access point ARN, you must direct requests to the access point hostname. The access point hostname takes the form <i>AccessPointName</i>-<i>AccountId</i>.s3-accesspoint.<i>Region</i>.amazonaws.com. When using this action with an access point through the Amazon Web Services SDKs, you provide the access point ARN in place of the bucket name. For more information about access point ARNs, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/using-access-points.html">Using access points</a> in the <i>Amazon S3 User Guide</i>.</p><note>
233    /// <p>Object Lambda access points are not supported by directory buckets.</p>
234    /// </note>
235    /// <p><b>S3 on Outposts</b> - When you use this action with 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, the destination bucket must be the Outposts access point ARN or the access point alias. For more information about S3 on Outposts, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/S3onOutposts.html">What is S3 on Outposts?</a> in the <i>Amazon S3 User Guide</i>.</p>
236    pub fn set_bucket(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
237        self.inner = self.inner.set_bucket(input);
238        self
239    }
240    /// <p>The bucket name.</p>
241    /// <p><b>Directory buckets</b> - When you use this operation with a directory bucket, you must use virtual-hosted-style requests in the format <code> <i>Bucket-name</i>.s3express-<i>zone-id</i>.<i>region-code</i>.amazonaws.com</code>. Path-style requests are not supported. Directory bucket names must be unique in the chosen Zone (Availability Zone or Local Zone). Bucket names must follow the format <code> <i>bucket-base-name</i>--<i>zone-id</i>--x-s3</code> (for example, <code> <i>amzn-s3-demo-bucket</i>--<i>usw2-az1</i>--x-s3</code>). For information about bucket naming restrictions, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/directory-bucket-naming-rules.html">Directory bucket naming rules</a> in the <i>Amazon S3 User Guide</i>.</p><note>
242    /// <p>Copying objects across different Amazon Web Services Regions isn't supported when the source or destination bucket is in Amazon Web Services Local Zones. The source and destination buckets must have the same parent Amazon Web Services Region. Otherwise, you get an HTTP <code>400 Bad Request</code> error with the error code <code>InvalidRequest</code>.</p>
243    /// </note>
244    /// <p><b>Access points</b> - When you use this action with an access point for general purpose buckets, you must provide the alias of the access point in place of the bucket name or specify the access point ARN. When you use this action with an access point for directory buckets, you must provide the access point name in place of the bucket name. When using the access point ARN, you must direct requests to the access point hostname. The access point hostname takes the form <i>AccessPointName</i>-<i>AccountId</i>.s3-accesspoint.<i>Region</i>.amazonaws.com. When using this action with an access point through the Amazon Web Services SDKs, you provide the access point ARN in place of the bucket name. For more information about access point ARNs, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/using-access-points.html">Using access points</a> in the <i>Amazon S3 User Guide</i>.</p><note>
245    /// <p>Object Lambda access points are not supported by directory buckets.</p>
246    /// </note>
247    /// <p><b>S3 on Outposts</b> - When you use this action with 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, the destination bucket must be the Outposts access point ARN or the access point alias. For more information about S3 on Outposts, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/S3onOutposts.html">What is S3 on Outposts?</a> in the <i>Amazon S3 User Guide</i>.</p>
248    pub fn get_bucket(&self) -> &::std::option::Option<::std::string::String> {
249        self.inner.get_bucket()
250    }
251    /// <p>Specifies the source object for the copy operation. You specify the value 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>
252    /// <ul>
253    /// <li>
254    /// <p>For objects not accessed through an access point, specify the name of the source bucket and key of the source object, separated by a slash (/). For example, to copy the object <code>reports/january.pdf</code> from the bucket <code>awsexamplebucket</code>, use <code>awsexamplebucket/reports/january.pdf</code>. The value must be URL-encoded.</p></li>
255    /// <li>
256    /// <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>
257    /// :
258    /// <account-id>
259    /// :accesspoint/
260    /// <access-point-name>
261    /// /object/
262    /// <key></key>
263    /// </access-point-name>
264    /// </account-id>
265    /// </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>
266    /// <ul>
267    /// <li>
268    /// <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>
269    /// <li>
270    /// <p>Access points are not supported by directory buckets.</p></li>
271    /// </ul>
272    /// </note>
273    /// <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>
274    /// :
275    /// <account-id>
276    /// :outpost/
277    /// <outpost-id>
278    /// /object/
279    /// <key></key>
280    /// </outpost-id>
281    /// </account-id>
282    /// </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>
283    /// </ul>
284    /// <p>If your bucket has versioning enabled, you could have multiple versions of the same object. By default, <code>x-amz-copy-source</code> identifies the current version of the source object to copy. To copy a specific version of the source object to copy, append <code>?versionId=<version-id></version-id></code> to the <code>x-amz-copy-source</code> request header (for example, <code>x-amz-copy-source: /awsexamplebucket/reports/january.pdf?versionId=QUpfdndhfd8438MNFDN93jdnJFkdmqnh893</code>).</p>
285    /// <p>If the current version is a delete marker and you don't specify a versionId in the <code>x-amz-copy-source</code> request header, Amazon S3 returns a <code>404 Not Found</code> error, because the object does not exist. If you specify versionId in the <code>x-amz-copy-source</code> and the versionId is a delete marker, Amazon S3 returns an HTTP <code>400 Bad Request</code> error, because you are not allowed to specify a delete marker as a version for the <code>x-amz-copy-source</code>.</p><note>
286    /// <p><b>Directory buckets</b> - S3 Versioning isn't enabled and supported for directory buckets.</p>
287    /// </note>
288    pub fn copy_source(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
289        self.inner = self.inner.copy_source(input.into());
290        self
291    }
292    /// <p>Specifies the source object for the copy operation. You specify the value 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>
293    /// <ul>
294    /// <li>
295    /// <p>For objects not accessed through an access point, specify the name of the source bucket and key of the source object, separated by a slash (/). For example, to copy the object <code>reports/january.pdf</code> from the bucket <code>awsexamplebucket</code>, use <code>awsexamplebucket/reports/january.pdf</code>. The value must be URL-encoded.</p></li>
296    /// <li>
297    /// <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>
298    /// :
299    /// <account-id>
300    /// :accesspoint/
301    /// <access-point-name>
302    /// /object/
303    /// <key></key>
304    /// </access-point-name>
305    /// </account-id>
306    /// </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>
307    /// <ul>
308    /// <li>
309    /// <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>
310    /// <li>
311    /// <p>Access points are not supported by directory buckets.</p></li>
312    /// </ul>
313    /// </note>
314    /// <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>
315    /// :
316    /// <account-id>
317    /// :outpost/
318    /// <outpost-id>
319    /// /object/
320    /// <key></key>
321    /// </outpost-id>
322    /// </account-id>
323    /// </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>
324    /// </ul>
325    /// <p>If your bucket has versioning enabled, you could have multiple versions of the same object. By default, <code>x-amz-copy-source</code> identifies the current version of the source object to copy. To copy a specific version of the source object to copy, append <code>?versionId=<version-id></version-id></code> to the <code>x-amz-copy-source</code> request header (for example, <code>x-amz-copy-source: /awsexamplebucket/reports/january.pdf?versionId=QUpfdndhfd8438MNFDN93jdnJFkdmqnh893</code>).</p>
326    /// <p>If the current version is a delete marker and you don't specify a versionId in the <code>x-amz-copy-source</code> request header, Amazon S3 returns a <code>404 Not Found</code> error, because the object does not exist. If you specify versionId in the <code>x-amz-copy-source</code> and the versionId is a delete marker, Amazon S3 returns an HTTP <code>400 Bad Request</code> error, because you are not allowed to specify a delete marker as a version for the <code>x-amz-copy-source</code>.</p><note>
327    /// <p><b>Directory buckets</b> - S3 Versioning isn't enabled and supported for directory buckets.</p>
328    /// </note>
329    pub fn set_copy_source(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
330        self.inner = self.inner.set_copy_source(input);
331        self
332    }
333    /// <p>Specifies the source object for the copy operation. You specify the value 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>
334    /// <ul>
335    /// <li>
336    /// <p>For objects not accessed through an access point, specify the name of the source bucket and key of the source object, separated by a slash (/). For example, to copy the object <code>reports/january.pdf</code> from the bucket <code>awsexamplebucket</code>, use <code>awsexamplebucket/reports/january.pdf</code>. The value must be URL-encoded.</p></li>
337    /// <li>
338    /// <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>
339    /// :
340    /// <account-id>
341    /// :accesspoint/
342    /// <access-point-name>
343    /// /object/
344    /// <key></key>
345    /// </access-point-name>
346    /// </account-id>
347    /// </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>
348    /// <ul>
349    /// <li>
350    /// <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>
351    /// <li>
352    /// <p>Access points are not supported by directory buckets.</p></li>
353    /// </ul>
354    /// </note>
355    /// <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>
356    /// :
357    /// <account-id>
358    /// :outpost/
359    /// <outpost-id>
360    /// /object/
361    /// <key></key>
362    /// </outpost-id>
363    /// </account-id>
364    /// </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>
365    /// </ul>
366    /// <p>If your bucket has versioning enabled, you could have multiple versions of the same object. By default, <code>x-amz-copy-source</code> identifies the current version of the source object to copy. To copy a specific version of the source object to copy, append <code>?versionId=<version-id></version-id></code> to the <code>x-amz-copy-source</code> request header (for example, <code>x-amz-copy-source: /awsexamplebucket/reports/january.pdf?versionId=QUpfdndhfd8438MNFDN93jdnJFkdmqnh893</code>).</p>
367    /// <p>If the current version is a delete marker and you don't specify a versionId in the <code>x-amz-copy-source</code> request header, Amazon S3 returns a <code>404 Not Found</code> error, because the object does not exist. If you specify versionId in the <code>x-amz-copy-source</code> and the versionId is a delete marker, Amazon S3 returns an HTTP <code>400 Bad Request</code> error, because you are not allowed to specify a delete marker as a version for the <code>x-amz-copy-source</code>.</p><note>
368    /// <p><b>Directory buckets</b> - S3 Versioning isn't enabled and supported for directory buckets.</p>
369    /// </note>
370    pub fn get_copy_source(&self) -> &::std::option::Option<::std::string::String> {
371        self.inner.get_copy_source()
372    }
373    /// <p>Copies the object if its entity tag (ETag) matches the specified tag.</p>
374    /// <p>If both of 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 as follows:</p>
375    /// <p><code>x-amz-copy-source-if-match</code> condition evaluates to <code>true</code>, and;</p>
376    /// <p><code>x-amz-copy-source-if-unmodified-since</code> condition evaluates to <code>false</code>;</p>
377    /// <p>Amazon S3 returns <code>200 OK</code> and copies the data.</p>
378    pub fn copy_source_if_match(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
379        self.inner = self.inner.copy_source_if_match(input.into());
380        self
381    }
382    /// <p>Copies the object if its entity tag (ETag) matches the specified tag.</p>
383    /// <p>If both of 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 as follows:</p>
384    /// <p><code>x-amz-copy-source-if-match</code> condition evaluates to <code>true</code>, and;</p>
385    /// <p><code>x-amz-copy-source-if-unmodified-since</code> condition evaluates to <code>false</code>;</p>
386    /// <p>Amazon S3 returns <code>200 OK</code> and copies the data.</p>
387    pub fn set_copy_source_if_match(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
388        self.inner = self.inner.set_copy_source_if_match(input);
389        self
390    }
391    /// <p>Copies the object if its entity tag (ETag) matches the specified tag.</p>
392    /// <p>If both of 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 as follows:</p>
393    /// <p><code>x-amz-copy-source-if-match</code> condition evaluates to <code>true</code>, and;</p>
394    /// <p><code>x-amz-copy-source-if-unmodified-since</code> condition evaluates to <code>false</code>;</p>
395    /// <p>Amazon S3 returns <code>200 OK</code> and copies the data.</p>
396    pub fn get_copy_source_if_match(&self) -> &::std::option::Option<::std::string::String> {
397        self.inner.get_copy_source_if_match()
398    }
399    /// <p>Copies the object if it has been modified since the specified time.</p>
400    /// <p>If both of 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 as follows:</p>
401    /// <p><code>x-amz-copy-source-if-none-match</code> condition evaluates to <code>false</code>, and;</p>
402    /// <p><code>x-amz-copy-source-if-modified-since</code> condition evaluates to <code>true</code>;</p>
403    /// <p>Amazon S3 returns <code>412 Precondition Failed</code> response code.</p>
404    pub fn copy_source_if_modified_since(mut self, input: ::aws_smithy_types::DateTime) -> Self {
405        self.inner = self.inner.copy_source_if_modified_since(input);
406        self
407    }
408    /// <p>Copies the object if it has been modified since the specified time.</p>
409    /// <p>If both of 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 as follows:</p>
410    /// <p><code>x-amz-copy-source-if-none-match</code> condition evaluates to <code>false</code>, and;</p>
411    /// <p><code>x-amz-copy-source-if-modified-since</code> condition evaluates to <code>true</code>;</p>
412    /// <p>Amazon S3 returns <code>412 Precondition Failed</code> response code.</p>
413    pub fn set_copy_source_if_modified_since(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
414        self.inner = self.inner.set_copy_source_if_modified_since(input);
415        self
416    }
417    /// <p>Copies the object if it has been modified since the specified time.</p>
418    /// <p>If both of 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 as follows:</p>
419    /// <p><code>x-amz-copy-source-if-none-match</code> condition evaluates to <code>false</code>, and;</p>
420    /// <p><code>x-amz-copy-source-if-modified-since</code> condition evaluates to <code>true</code>;</p>
421    /// <p>Amazon S3 returns <code>412 Precondition Failed</code> response code.</p>
422    pub fn get_copy_source_if_modified_since(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
423        self.inner.get_copy_source_if_modified_since()
424    }
425    /// <p>Copies the object if its entity tag (ETag) is different than the specified ETag.</p>
426    /// <p>If both of 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 as follows:</p>
427    /// <p><code>x-amz-copy-source-if-none-match</code> condition evaluates to <code>false</code>, and;</p>
428    /// <p><code>x-amz-copy-source-if-modified-since</code> condition evaluates to <code>true</code>;</p>
429    /// <p>Amazon S3 returns <code>412 Precondition Failed</code> response code.</p>
430    pub fn copy_source_if_none_match(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
431        self.inner = self.inner.copy_source_if_none_match(input.into());
432        self
433    }
434    /// <p>Copies the object if its entity tag (ETag) is different than the specified ETag.</p>
435    /// <p>If both of 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 as follows:</p>
436    /// <p><code>x-amz-copy-source-if-none-match</code> condition evaluates to <code>false</code>, and;</p>
437    /// <p><code>x-amz-copy-source-if-modified-since</code> condition evaluates to <code>true</code>;</p>
438    /// <p>Amazon S3 returns <code>412 Precondition Failed</code> response code.</p>
439    pub fn set_copy_source_if_none_match(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
440        self.inner = self.inner.set_copy_source_if_none_match(input);
441        self
442    }
443    /// <p>Copies the object if its entity tag (ETag) is different than the specified ETag.</p>
444    /// <p>If both of 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 as follows:</p>
445    /// <p><code>x-amz-copy-source-if-none-match</code> condition evaluates to <code>false</code>, and;</p>
446    /// <p><code>x-amz-copy-source-if-modified-since</code> condition evaluates to <code>true</code>;</p>
447    /// <p>Amazon S3 returns <code>412 Precondition Failed</code> response code.</p>
448    pub fn get_copy_source_if_none_match(&self) -> &::std::option::Option<::std::string::String> {
449        self.inner.get_copy_source_if_none_match()
450    }
451    /// <p>Copies the object if it hasn't been modified since the specified time.</p>
452    /// <p>If both of 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 as follows:</p>
453    /// <p><code>x-amz-copy-source-if-match</code> condition evaluates to <code>true</code>, and;</p>
454    /// <p><code>x-amz-copy-source-if-unmodified-since</code> condition evaluates to <code>false</code>;</p>
455    /// <p>Amazon S3 returns <code>200 OK</code> and copies the data.</p>
456    pub fn copy_source_if_unmodified_since(mut self, input: ::aws_smithy_types::DateTime) -> Self {
457        self.inner = self.inner.copy_source_if_unmodified_since(input);
458        self
459    }
460    /// <p>Copies the object if it hasn't been modified since the specified time.</p>
461    /// <p>If both of 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 as follows:</p>
462    /// <p><code>x-amz-copy-source-if-match</code> condition evaluates to <code>true</code>, and;</p>
463    /// <p><code>x-amz-copy-source-if-unmodified-since</code> condition evaluates to <code>false</code>;</p>
464    /// <p>Amazon S3 returns <code>200 OK</code> and copies the data.</p>
465    pub fn set_copy_source_if_unmodified_since(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
466        self.inner = self.inner.set_copy_source_if_unmodified_since(input);
467        self
468    }
469    /// <p>Copies the object if it hasn't been modified since the specified time.</p>
470    /// <p>If both of 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 as follows:</p>
471    /// <p><code>x-amz-copy-source-if-match</code> condition evaluates to <code>true</code>, and;</p>
472    /// <p><code>x-amz-copy-source-if-unmodified-since</code> condition evaluates to <code>false</code>;</p>
473    /// <p>Amazon S3 returns <code>200 OK</code> and copies the data.</p>
474    pub fn get_copy_source_if_unmodified_since(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
475        self.inner.get_copy_source_if_unmodified_since()
476    }
477    /// <p>The range of bytes to copy from the source object. The range value must use the form bytes=first-last, where the first and last are the zero-based byte offsets to copy. For example, bytes=0-9 indicates that you want to copy the first 10 bytes of the source. You can copy a range only if the source object is greater than 5 MB.</p>
478    pub fn copy_source_range(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
479        self.inner = self.inner.copy_source_range(input.into());
480        self
481    }
482    /// <p>The range of bytes to copy from the source object. The range value must use the form bytes=first-last, where the first and last are the zero-based byte offsets to copy. For example, bytes=0-9 indicates that you want to copy the first 10 bytes of the source. You can copy a range only if the source object is greater than 5 MB.</p>
483    pub fn set_copy_source_range(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
484        self.inner = self.inner.set_copy_source_range(input);
485        self
486    }
487    /// <p>The range of bytes to copy from the source object. The range value must use the form bytes=first-last, where the first and last are the zero-based byte offsets to copy. For example, bytes=0-9 indicates that you want to copy the first 10 bytes of the source. You can copy a range only if the source object is greater than 5 MB.</p>
488    pub fn get_copy_source_range(&self) -> &::std::option::Option<::std::string::String> {
489        self.inner.get_copy_source_range()
490    }
491    /// <p>Object key for which the multipart upload was initiated.</p>
492    pub fn key(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
493        self.inner = self.inner.key(input.into());
494        self
495    }
496    /// <p>Object key for which the multipart upload was initiated.</p>
497    pub fn set_key(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
498        self.inner = self.inner.set_key(input);
499        self
500    }
501    /// <p>Object key for which the multipart upload was initiated.</p>
502    pub fn get_key(&self) -> &::std::option::Option<::std::string::String> {
503        self.inner.get_key()
504    }
505    /// <p>Part number of part being copied. This is a positive integer between 1 and 10,000.</p>
506    pub fn part_number(mut self, input: i32) -> Self {
507        self.inner = self.inner.part_number(input);
508        self
509    }
510    /// <p>Part number of part being copied. This is a positive integer between 1 and 10,000.</p>
511    pub fn set_part_number(mut self, input: ::std::option::Option<i32>) -> Self {
512        self.inner = self.inner.set_part_number(input);
513        self
514    }
515    /// <p>Part number of part being copied. This is a positive integer between 1 and 10,000.</p>
516    pub fn get_part_number(&self) -> &::std::option::Option<i32> {
517        self.inner.get_part_number()
518    }
519    /// <p>Upload ID identifying the multipart upload whose part is being copied.</p>
520    pub fn upload_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
521        self.inner = self.inner.upload_id(input.into());
522        self
523    }
524    /// <p>Upload ID identifying the multipart upload whose part is being copied.</p>
525    pub fn set_upload_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
526        self.inner = self.inner.set_upload_id(input);
527        self
528    }
529    /// <p>Upload ID identifying the multipart upload whose part is being copied.</p>
530    pub fn get_upload_id(&self) -> &::std::option::Option<::std::string::String> {
531        self.inner.get_upload_id()
532    }
533    /// <p>Specifies the algorithm to use when encrypting the object (for example, AES256).</p><note>
534    /// <p>This functionality is not supported when the destination bucket is a directory bucket.</p>
535    /// </note>
536    pub fn sse_customer_algorithm(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
537        self.inner = self.inner.sse_customer_algorithm(input.into());
538        self
539    }
540    /// <p>Specifies the algorithm to use when encrypting the object (for example, AES256).</p><note>
541    /// <p>This functionality is not supported when the destination bucket is a directory bucket.</p>
542    /// </note>
543    pub fn set_sse_customer_algorithm(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
544        self.inner = self.inner.set_sse_customer_algorithm(input);
545        self
546    }
547    /// <p>Specifies the algorithm to use when encrypting the object (for example, AES256).</p><note>
548    /// <p>This functionality is not supported when the destination bucket is a directory bucket.</p>
549    /// </note>
550    pub fn get_sse_customer_algorithm(&self) -> &::std::option::Option<::std::string::String> {
551        self.inner.get_sse_customer_algorithm()
552    }
553    /// <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. This must be the same encryption key specified in the initiate multipart upload request.</p><note>
554    /// <p>This functionality is not supported when the destination bucket is a directory bucket.</p>
555    /// </note>
556    pub fn sse_customer_key(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
557        self.inner = self.inner.sse_customer_key(input.into());
558        self
559    }
560    /// <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. This must be the same encryption key specified in the initiate multipart upload request.</p><note>
561    /// <p>This functionality is not supported when the destination bucket is a directory bucket.</p>
562    /// </note>
563    pub fn set_sse_customer_key(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
564        self.inner = self.inner.set_sse_customer_key(input);
565        self
566    }
567    /// <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. This must be the same encryption key specified in the initiate multipart upload request.</p><note>
568    /// <p>This functionality is not supported when the destination bucket is a directory bucket.</p>
569    /// </note>
570    pub fn get_sse_customer_key(&self) -> &::std::option::Option<::std::string::String> {
571        self.inner.get_sse_customer_key()
572    }
573    /// <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>
574    /// <p>This functionality is not supported when the destination bucket is a directory bucket.</p>
575    /// </note>
576    pub fn sse_customer_key_md5(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
577        self.inner = self.inner.sse_customer_key_md5(input.into());
578        self
579    }
580    /// <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>
581    /// <p>This functionality is not supported when the destination bucket is a directory bucket.</p>
582    /// </note>
583    pub fn set_sse_customer_key_md5(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
584        self.inner = self.inner.set_sse_customer_key_md5(input);
585        self
586    }
587    /// <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>
588    /// <p>This functionality is not supported when the destination bucket is a directory bucket.</p>
589    /// </note>
590    pub fn get_sse_customer_key_md5(&self) -> &::std::option::Option<::std::string::String> {
591        self.inner.get_sse_customer_key_md5()
592    }
593    /// <p>Specifies the algorithm to use when decrypting the source object (for example, <code>AES256</code>).</p><note>
594    /// <p>This functionality is not supported when the source object is in a directory bucket.</p>
595    /// </note>
596    pub fn copy_source_sse_customer_algorithm(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
597        self.inner = self.inner.copy_source_sse_customer_algorithm(input.into());
598        self
599    }
600    /// <p>Specifies the algorithm to use when decrypting the source object (for example, <code>AES256</code>).</p><note>
601    /// <p>This functionality is not supported when the source object is in a directory bucket.</p>
602    /// </note>
603    pub fn set_copy_source_sse_customer_algorithm(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
604        self.inner = self.inner.set_copy_source_sse_customer_algorithm(input);
605        self
606    }
607    /// <p>Specifies the algorithm to use when decrypting the source object (for example, <code>AES256</code>).</p><note>
608    /// <p>This functionality is not supported when the source object is in a directory bucket.</p>
609    /// </note>
610    pub fn get_copy_source_sse_customer_algorithm(&self) -> &::std::option::Option<::std::string::String> {
611        self.inner.get_copy_source_sse_customer_algorithm()
612    }
613    /// <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 one that was used when the source object was created.</p><note>
614    /// <p>This functionality is not supported when the source object is in a directory bucket.</p>
615    /// </note>
616    pub fn copy_source_sse_customer_key(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
617        self.inner = self.inner.copy_source_sse_customer_key(input.into());
618        self
619    }
620    /// <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 one that was used when the source object was created.</p><note>
621    /// <p>This functionality is not supported when the source object is in a directory bucket.</p>
622    /// </note>
623    pub fn set_copy_source_sse_customer_key(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
624        self.inner = self.inner.set_copy_source_sse_customer_key(input);
625        self
626    }
627    /// <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 one that was used when the source object was created.</p><note>
628    /// <p>This functionality is not supported when the source object is in a directory bucket.</p>
629    /// </note>
630    pub fn get_copy_source_sse_customer_key(&self) -> &::std::option::Option<::std::string::String> {
631        self.inner.get_copy_source_sse_customer_key()
632    }
633    /// <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>
634    /// <p>This functionality is not supported when the source object is in a directory bucket.</p>
635    /// </note>
636    pub fn copy_source_sse_customer_key_md5(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
637        self.inner = self.inner.copy_source_sse_customer_key_md5(input.into());
638        self
639    }
640    /// <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>
641    /// <p>This functionality is not supported when the source object is in a directory bucket.</p>
642    /// </note>
643    pub fn set_copy_source_sse_customer_key_md5(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
644        self.inner = self.inner.set_copy_source_sse_customer_key_md5(input);
645        self
646    }
647    /// <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>
648    /// <p>This functionality is not supported when the source object is in a directory bucket.</p>
649    /// </note>
650    pub fn get_copy_source_sse_customer_key_md5(&self) -> &::std::option::Option<::std::string::String> {
651        self.inner.get_copy_source_sse_customer_key_md5()
652    }
653    /// <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>
654    /// <p>This functionality is not supported for directory buckets.</p>
655    /// </note>
656    pub fn request_payer(mut self, input: crate::types::RequestPayer) -> Self {
657        self.inner = self.inner.request_payer(input);
658        self
659    }
660    /// <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>
661    /// <p>This functionality is not supported for directory buckets.</p>
662    /// </note>
663    pub fn set_request_payer(mut self, input: ::std::option::Option<crate::types::RequestPayer>) -> Self {
664        self.inner = self.inner.set_request_payer(input);
665        self
666    }
667    /// <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>
668    /// <p>This functionality is not supported for directory buckets.</p>
669    /// </note>
670    pub fn get_request_payer(&self) -> &::std::option::Option<crate::types::RequestPayer> {
671        self.inner.get_request_payer()
672    }
673    /// <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>
674    pub fn expected_bucket_owner(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
675        self.inner = self.inner.expected_bucket_owner(input.into());
676        self
677    }
678    /// <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>
679    pub fn set_expected_bucket_owner(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
680        self.inner = self.inner.set_expected_bucket_owner(input);
681        self
682    }
683    /// <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>
684    pub fn get_expected_bucket_owner(&self) -> &::std::option::Option<::std::string::String> {
685        self.inner.get_expected_bucket_owner()
686    }
687    /// <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>
688    pub fn expected_source_bucket_owner(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
689        self.inner = self.inner.expected_source_bucket_owner(input.into());
690        self
691    }
692    /// <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>
693    pub fn set_expected_source_bucket_owner(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
694        self.inner = self.inner.set_expected_source_bucket_owner(input);
695        self
696    }
697    /// <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>
698    pub fn get_expected_source_bucket_owner(&self) -> &::std::option::Option<::std::string::String> {
699        self.inner.get_expected_source_bucket_owner()
700    }
701}