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><note>
77/// <p>If you have server-side encryption with customer-provided keys (SSE-C) blocked for your general purpose bucket, you will get an HTTP 403 Access Denied error when you specify the SSE-C request headers while writing new data to your bucket. For more information, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/blocking-unblocking-s3-c-encryption-gpb.html">Blocking or unblocking SSE-C for a general purpose bucket</a>.</p>
78/// </note></li>
79/// <li>
80/// <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>
81/// <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>
82/// </note>
83/// <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>
84/// </ul>
85/// </dd>
86/// <dt>
87/// Special errors
88/// </dt>
89/// <dd>
90/// <ul>
91/// <li>
92/// <p>Error Code: <code>NoSuchUpload</code></p>
93/// <ul>
94/// <li>
95/// <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>
96/// <li>
97/// <p>HTTP Status Code: 404 Not Found</p></li>
98/// </ul></li>
99/// <li>
100/// <p>Error Code: <code>InvalidRequest</code></p>
101/// <ul>
102/// <li>
103/// <p>Description: The specified copy source is not supported as a byte-range copy source.</p></li>
104/// <li>
105/// <p>HTTP Status Code: 400 Bad Request</p></li>
106/// </ul></li>
107/// </ul>
108/// </dd>
109/// <dt>
110/// HTTP Host header syntax
111/// </dt>
112/// <dd>
113/// <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>
114/// </dd>
115/// </dl>
116/// <p>The following operations are related to <code>UploadPartCopy</code>:</p>
117/// <ul>
118/// <li>
119/// <p><a href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_CreateMultipartUpload.html">CreateMultipartUpload</a></p></li>
120/// <li>
121/// <p><a href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_UploadPart.html">UploadPart</a></p></li>
122/// <li>
123/// <p><a href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_CompleteMultipartUpload.html">CompleteMultipartUpload</a></p></li>
124/// <li>
125/// <p><a href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_AbortMultipartUpload.html">AbortMultipartUpload</a></p></li>
126/// <li>
127/// <p><a href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_ListParts.html">ListParts</a></p></li>
128/// <li>
129/// <p><a href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_ListMultipartUploads.html">ListMultipartUploads</a></p></li>
130/// </ul><important>
131/// <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>
132/// </important>
133#[derive(::std::clone::Clone, ::std::fmt::Debug)]
134pub struct UploadPartCopyFluentBuilder {
135    handle: ::std::sync::Arc<crate::client::Handle>,
136    inner: crate::operation::upload_part_copy::builders::UploadPartCopyInputBuilder,
137    config_override: ::std::option::Option<crate::config::Builder>,
138}
139impl
140    crate::client::customize::internal::CustomizableSend<
141        crate::operation::upload_part_copy::UploadPartCopyOutput,
142        crate::operation::upload_part_copy::UploadPartCopyError,
143    > for UploadPartCopyFluentBuilder
144{
145    fn send(
146        self,
147        config_override: crate::config::Builder,
148    ) -> crate::client::customize::internal::BoxFuture<
149        crate::client::customize::internal::SendResult<
150            crate::operation::upload_part_copy::UploadPartCopyOutput,
151            crate::operation::upload_part_copy::UploadPartCopyError,
152        >,
153    > {
154        ::std::boxed::Box::pin(async move { self.config_override(config_override).send().await })
155    }
156}
157impl UploadPartCopyFluentBuilder {
158    /// Creates a new `UploadPartCopyFluentBuilder`.
159    pub(crate) fn new(handle: ::std::sync::Arc<crate::client::Handle>) -> Self {
160        Self {
161            handle,
162            inner: ::std::default::Default::default(),
163            config_override: ::std::option::Option::None,
164        }
165    }
166    /// Access the UploadPartCopy as a reference.
167    pub fn as_input(&self) -> &crate::operation::upload_part_copy::builders::UploadPartCopyInputBuilder {
168        &self.inner
169    }
170    /// Sends the request and returns the response.
171    ///
172    /// If an error occurs, an `SdkError` will be returned with additional details that
173    /// can be matched against.
174    ///
175    /// By default, any retryable failures will be retried twice. Retry behavior
176    /// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
177    /// set when configuring the client.
178    pub async fn send(
179        self,
180    ) -> ::std::result::Result<
181        crate::operation::upload_part_copy::UploadPartCopyOutput,
182        ::aws_smithy_runtime_api::client::result::SdkError<
183            crate::operation::upload_part_copy::UploadPartCopyError,
184            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
185        >,
186    > {
187        let input = self
188            .inner
189            .build()
190            .map_err(::aws_smithy_runtime_api::client::result::SdkError::construction_failure)?;
191        let runtime_plugins = crate::operation::upload_part_copy::UploadPartCopy::operation_runtime_plugins(
192            self.handle.runtime_plugins.clone(),
193            &self.handle.conf,
194            self.config_override,
195        );
196        crate::operation::upload_part_copy::UploadPartCopy::orchestrate(&runtime_plugins, input).await
197    }
198
199    /// Consumes this builder, creating a customizable operation that can be modified before being sent.
200    pub fn customize(
201        self,
202    ) -> crate::client::customize::CustomizableOperation<
203        crate::operation::upload_part_copy::UploadPartCopyOutput,
204        crate::operation::upload_part_copy::UploadPartCopyError,
205        Self,
206    > {
207        crate::client::customize::CustomizableOperation::new(self)
208    }
209    pub(crate) fn config_override(mut self, config_override: impl ::std::convert::Into<crate::config::Builder>) -> Self {
210        self.set_config_override(::std::option::Option::Some(config_override.into()));
211        self
212    }
213
214    pub(crate) fn set_config_override(&mut self, config_override: ::std::option::Option<crate::config::Builder>) -> &mut Self {
215        self.config_override = config_override;
216        self
217    }
218    /// <p>The bucket name.</p>
219    /// <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>
220    /// <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>
221    /// </note>
222    /// <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>
223    /// <p>Object Lambda access points are not supported by directory buckets.</p>
224    /// </note>
225    /// <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>
226    pub fn bucket(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
227        self.inner = self.inner.bucket(input.into());
228        self
229    }
230    /// <p>The bucket name.</p>
231    /// <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>
232    /// <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>
233    /// </note>
234    /// <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>
235    /// <p>Object Lambda access points are not supported by directory buckets.</p>
236    /// </note>
237    /// <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>
238    pub fn set_bucket(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
239        self.inner = self.inner.set_bucket(input);
240        self
241    }
242    /// <p>The bucket name.</p>
243    /// <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>
244    /// <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>
245    /// </note>
246    /// <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>
247    /// <p>Object Lambda access points are not supported by directory buckets.</p>
248    /// </note>
249    /// <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>
250    pub fn get_bucket(&self) -> &::std::option::Option<::std::string::String> {
251        self.inner.get_bucket()
252    }
253    /// <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>
254    /// <ul>
255    /// <li>
256    /// <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>
257    /// <li>
258    /// <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>
259    /// :
260    /// <account-id>
261    /// :accesspoint/
262    /// <access-point-name>
263    /// /object/
264    /// <key></key>
265    /// </access-point-name>
266    /// </account-id>
267    /// </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>
268    /// <ul>
269    /// <li>
270    /// <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>
271    /// <li>
272    /// <p>Access points are not supported by directory buckets.</p></li>
273    /// </ul>
274    /// </note>
275    /// <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>
276    /// :
277    /// <account-id>
278    /// :outpost/
279    /// <outpost-id>
280    /// /object/
281    /// <key></key>
282    /// </outpost-id>
283    /// </account-id>
284    /// </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>
285    /// </ul>
286    /// <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>
287    /// <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>
288    /// <p><b>Directory buckets</b> - S3 Versioning isn't enabled and supported for directory buckets.</p>
289    /// </note>
290    pub fn copy_source(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
291        self.inner = self.inner.copy_source(input.into());
292        self
293    }
294    /// <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>
295    /// <ul>
296    /// <li>
297    /// <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>
298    /// <li>
299    /// <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>
300    /// :
301    /// <account-id>
302    /// :accesspoint/
303    /// <access-point-name>
304    /// /object/
305    /// <key></key>
306    /// </access-point-name>
307    /// </account-id>
308    /// </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>
309    /// <ul>
310    /// <li>
311    /// <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>
312    /// <li>
313    /// <p>Access points are not supported by directory buckets.</p></li>
314    /// </ul>
315    /// </note>
316    /// <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>
317    /// :
318    /// <account-id>
319    /// :outpost/
320    /// <outpost-id>
321    /// /object/
322    /// <key></key>
323    /// </outpost-id>
324    /// </account-id>
325    /// </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>
326    /// </ul>
327    /// <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>
328    /// <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>
329    /// <p><b>Directory buckets</b> - S3 Versioning isn't enabled and supported for directory buckets.</p>
330    /// </note>
331    pub fn set_copy_source(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
332        self.inner = self.inner.set_copy_source(input);
333        self
334    }
335    /// <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>
336    /// <ul>
337    /// <li>
338    /// <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>
339    /// <li>
340    /// <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>
341    /// :
342    /// <account-id>
343    /// :accesspoint/
344    /// <access-point-name>
345    /// /object/
346    /// <key></key>
347    /// </access-point-name>
348    /// </account-id>
349    /// </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>
350    /// <ul>
351    /// <li>
352    /// <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>
353    /// <li>
354    /// <p>Access points are not supported by directory buckets.</p></li>
355    /// </ul>
356    /// </note>
357    /// <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>
358    /// :
359    /// <account-id>
360    /// :outpost/
361    /// <outpost-id>
362    /// /object/
363    /// <key></key>
364    /// </outpost-id>
365    /// </account-id>
366    /// </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>
367    /// </ul>
368    /// <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>
369    /// <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>
370    /// <p><b>Directory buckets</b> - S3 Versioning isn't enabled and supported for directory buckets.</p>
371    /// </note>
372    pub fn get_copy_source(&self) -> &::std::option::Option<::std::string::String> {
373        self.inner.get_copy_source()
374    }
375    /// <p>Copies the object if its entity tag (ETag) matches the specified tag.</p>
376    /// <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>
377    /// <p><code>x-amz-copy-source-if-match</code> condition evaluates to <code>true</code>, and;</p>
378    /// <p><code>x-amz-copy-source-if-unmodified-since</code> condition evaluates to <code>false</code>;</p>
379    /// <p>Amazon S3 returns <code>200 OK</code> and copies the data.</p>
380    pub fn copy_source_if_match(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
381        self.inner = self.inner.copy_source_if_match(input.into());
382        self
383    }
384    /// <p>Copies the object if its entity tag (ETag) matches the specified tag.</p>
385    /// <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>
386    /// <p><code>x-amz-copy-source-if-match</code> condition evaluates to <code>true</code>, and;</p>
387    /// <p><code>x-amz-copy-source-if-unmodified-since</code> condition evaluates to <code>false</code>;</p>
388    /// <p>Amazon S3 returns <code>200 OK</code> and copies the data.</p>
389    pub fn set_copy_source_if_match(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
390        self.inner = self.inner.set_copy_source_if_match(input);
391        self
392    }
393    /// <p>Copies the object if its entity tag (ETag) matches the specified tag.</p>
394    /// <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>
395    /// <p><code>x-amz-copy-source-if-match</code> condition evaluates to <code>true</code>, and;</p>
396    /// <p><code>x-amz-copy-source-if-unmodified-since</code> condition evaluates to <code>false</code>;</p>
397    /// <p>Amazon S3 returns <code>200 OK</code> and copies the data.</p>
398    pub fn get_copy_source_if_match(&self) -> &::std::option::Option<::std::string::String> {
399        self.inner.get_copy_source_if_match()
400    }
401    /// <p>Copies the object if it has been modified since the specified time.</p>
402    /// <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>
403    /// <p><code>x-amz-copy-source-if-none-match</code> condition evaluates to <code>false</code>, and;</p>
404    /// <p><code>x-amz-copy-source-if-modified-since</code> condition evaluates to <code>true</code>;</p>
405    /// <p>Amazon S3 returns <code>412 Precondition Failed</code> response code.</p>
406    pub fn copy_source_if_modified_since(mut self, input: ::aws_smithy_types::DateTime) -> Self {
407        self.inner = self.inner.copy_source_if_modified_since(input);
408        self
409    }
410    /// <p>Copies the object if it has been modified since the specified time.</p>
411    /// <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>
412    /// <p><code>x-amz-copy-source-if-none-match</code> condition evaluates to <code>false</code>, and;</p>
413    /// <p><code>x-amz-copy-source-if-modified-since</code> condition evaluates to <code>true</code>;</p>
414    /// <p>Amazon S3 returns <code>412 Precondition Failed</code> response code.</p>
415    pub fn set_copy_source_if_modified_since(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
416        self.inner = self.inner.set_copy_source_if_modified_since(input);
417        self
418    }
419    /// <p>Copies the object if it has been modified since the specified time.</p>
420    /// <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>
421    /// <p><code>x-amz-copy-source-if-none-match</code> condition evaluates to <code>false</code>, and;</p>
422    /// <p><code>x-amz-copy-source-if-modified-since</code> condition evaluates to <code>true</code>;</p>
423    /// <p>Amazon S3 returns <code>412 Precondition Failed</code> response code.</p>
424    pub fn get_copy_source_if_modified_since(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
425        self.inner.get_copy_source_if_modified_since()
426    }
427    /// <p>Copies the object if its entity tag (ETag) is different than the specified ETag.</p>
428    /// <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>
429    /// <p><code>x-amz-copy-source-if-none-match</code> condition evaluates to <code>false</code>, and;</p>
430    /// <p><code>x-amz-copy-source-if-modified-since</code> condition evaluates to <code>true</code>;</p>
431    /// <p>Amazon S3 returns <code>412 Precondition Failed</code> response code.</p>
432    pub fn copy_source_if_none_match(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
433        self.inner = self.inner.copy_source_if_none_match(input.into());
434        self
435    }
436    /// <p>Copies the object if its entity tag (ETag) is different than the specified ETag.</p>
437    /// <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>
438    /// <p><code>x-amz-copy-source-if-none-match</code> condition evaluates to <code>false</code>, and;</p>
439    /// <p><code>x-amz-copy-source-if-modified-since</code> condition evaluates to <code>true</code>;</p>
440    /// <p>Amazon S3 returns <code>412 Precondition Failed</code> response code.</p>
441    pub fn set_copy_source_if_none_match(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
442        self.inner = self.inner.set_copy_source_if_none_match(input);
443        self
444    }
445    /// <p>Copies the object if its entity tag (ETag) is different than the specified ETag.</p>
446    /// <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>
447    /// <p><code>x-amz-copy-source-if-none-match</code> condition evaluates to <code>false</code>, and;</p>
448    /// <p><code>x-amz-copy-source-if-modified-since</code> condition evaluates to <code>true</code>;</p>
449    /// <p>Amazon S3 returns <code>412 Precondition Failed</code> response code.</p>
450    pub fn get_copy_source_if_none_match(&self) -> &::std::option::Option<::std::string::String> {
451        self.inner.get_copy_source_if_none_match()
452    }
453    /// <p>Copies the object if it hasn't been modified since the specified time.</p>
454    /// <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>
455    /// <p><code>x-amz-copy-source-if-match</code> condition evaluates to <code>true</code>, and;</p>
456    /// <p><code>x-amz-copy-source-if-unmodified-since</code> condition evaluates to <code>false</code>;</p>
457    /// <p>Amazon S3 returns <code>200 OK</code> and copies the data.</p>
458    pub fn copy_source_if_unmodified_since(mut self, input: ::aws_smithy_types::DateTime) -> Self {
459        self.inner = self.inner.copy_source_if_unmodified_since(input);
460        self
461    }
462    /// <p>Copies the object if it hasn't been modified since the specified time.</p>
463    /// <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>
464    /// <p><code>x-amz-copy-source-if-match</code> condition evaluates to <code>true</code>, and;</p>
465    /// <p><code>x-amz-copy-source-if-unmodified-since</code> condition evaluates to <code>false</code>;</p>
466    /// <p>Amazon S3 returns <code>200 OK</code> and copies the data.</p>
467    pub fn set_copy_source_if_unmodified_since(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
468        self.inner = self.inner.set_copy_source_if_unmodified_since(input);
469        self
470    }
471    /// <p>Copies the object if it hasn't been modified since the specified time.</p>
472    /// <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>
473    /// <p><code>x-amz-copy-source-if-match</code> condition evaluates to <code>true</code>, and;</p>
474    /// <p><code>x-amz-copy-source-if-unmodified-since</code> condition evaluates to <code>false</code>;</p>
475    /// <p>Amazon S3 returns <code>200 OK</code> and copies the data.</p>
476    pub fn get_copy_source_if_unmodified_since(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
477        self.inner.get_copy_source_if_unmodified_since()
478    }
479    /// <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>
480    pub fn copy_source_range(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
481        self.inner = self.inner.copy_source_range(input.into());
482        self
483    }
484    /// <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>
485    pub fn set_copy_source_range(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
486        self.inner = self.inner.set_copy_source_range(input);
487        self
488    }
489    /// <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>
490    pub fn get_copy_source_range(&self) -> &::std::option::Option<::std::string::String> {
491        self.inner.get_copy_source_range()
492    }
493    /// <p>Object key for which the multipart upload was initiated.</p>
494    pub fn key(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
495        self.inner = self.inner.key(input.into());
496        self
497    }
498    /// <p>Object key for which the multipart upload was initiated.</p>
499    pub fn set_key(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
500        self.inner = self.inner.set_key(input);
501        self
502    }
503    /// <p>Object key for which the multipart upload was initiated.</p>
504    pub fn get_key(&self) -> &::std::option::Option<::std::string::String> {
505        self.inner.get_key()
506    }
507    /// <p>Part number of part being copied. This is a positive integer between 1 and 10,000.</p>
508    pub fn part_number(mut self, input: i32) -> Self {
509        self.inner = self.inner.part_number(input);
510        self
511    }
512    /// <p>Part number of part being copied. This is a positive integer between 1 and 10,000.</p>
513    pub fn set_part_number(mut self, input: ::std::option::Option<i32>) -> Self {
514        self.inner = self.inner.set_part_number(input);
515        self
516    }
517    /// <p>Part number of part being copied. This is a positive integer between 1 and 10,000.</p>
518    pub fn get_part_number(&self) -> &::std::option::Option<i32> {
519        self.inner.get_part_number()
520    }
521    /// <p>Upload ID identifying the multipart upload whose part is being copied.</p>
522    pub fn upload_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
523        self.inner = self.inner.upload_id(input.into());
524        self
525    }
526    /// <p>Upload ID identifying the multipart upload whose part is being copied.</p>
527    pub fn set_upload_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
528        self.inner = self.inner.set_upload_id(input);
529        self
530    }
531    /// <p>Upload ID identifying the multipart upload whose part is being copied.</p>
532    pub fn get_upload_id(&self) -> &::std::option::Option<::std::string::String> {
533        self.inner.get_upload_id()
534    }
535    /// <p>Specifies the algorithm to use when encrypting the object (for example, AES256).</p><note>
536    /// <p>This functionality is not supported when the destination bucket is a directory bucket.</p>
537    /// </note>
538    pub fn sse_customer_algorithm(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
539        self.inner = self.inner.sse_customer_algorithm(input.into());
540        self
541    }
542    /// <p>Specifies the algorithm to use when encrypting the object (for example, AES256).</p><note>
543    /// <p>This functionality is not supported when the destination bucket is a directory bucket.</p>
544    /// </note>
545    pub fn set_sse_customer_algorithm(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
546        self.inner = self.inner.set_sse_customer_algorithm(input);
547        self
548    }
549    /// <p>Specifies the algorithm to use when encrypting the object (for example, AES256).</p><note>
550    /// <p>This functionality is not supported when the destination bucket is a directory bucket.</p>
551    /// </note>
552    pub fn get_sse_customer_algorithm(&self) -> &::std::option::Option<::std::string::String> {
553        self.inner.get_sse_customer_algorithm()
554    }
555    /// <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>
556    /// <p>This functionality is not supported when the destination bucket is a directory bucket.</p>
557    /// </note>
558    pub fn sse_customer_key(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
559        self.inner = self.inner.sse_customer_key(input.into());
560        self
561    }
562    /// <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>
563    /// <p>This functionality is not supported when the destination bucket is a directory bucket.</p>
564    /// </note>
565    pub fn set_sse_customer_key(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
566        self.inner = self.inner.set_sse_customer_key(input);
567        self
568    }
569    /// <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>
570    /// <p>This functionality is not supported when the destination bucket is a directory bucket.</p>
571    /// </note>
572    pub fn get_sse_customer_key(&self) -> &::std::option::Option<::std::string::String> {
573        self.inner.get_sse_customer_key()
574    }
575    /// <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>
576    /// <p>This functionality is not supported when the destination bucket is a directory bucket.</p>
577    /// </note>
578    pub fn sse_customer_key_md5(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
579        self.inner = self.inner.sse_customer_key_md5(input.into());
580        self
581    }
582    /// <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>
583    /// <p>This functionality is not supported when the destination bucket is a directory bucket.</p>
584    /// </note>
585    pub fn set_sse_customer_key_md5(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
586        self.inner = self.inner.set_sse_customer_key_md5(input);
587        self
588    }
589    /// <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>
590    /// <p>This functionality is not supported when the destination bucket is a directory bucket.</p>
591    /// </note>
592    pub fn get_sse_customer_key_md5(&self) -> &::std::option::Option<::std::string::String> {
593        self.inner.get_sse_customer_key_md5()
594    }
595    /// <p>Specifies the algorithm to use when decrypting the source object (for example, <code>AES256</code>).</p><note>
596    /// <p>This functionality is not supported when the source object is in a directory bucket.</p>
597    /// </note>
598    pub fn copy_source_sse_customer_algorithm(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
599        self.inner = self.inner.copy_source_sse_customer_algorithm(input.into());
600        self
601    }
602    /// <p>Specifies the algorithm to use when decrypting the source object (for example, <code>AES256</code>).</p><note>
603    /// <p>This functionality is not supported when the source object is in a directory bucket.</p>
604    /// </note>
605    pub fn set_copy_source_sse_customer_algorithm(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
606        self.inner = self.inner.set_copy_source_sse_customer_algorithm(input);
607        self
608    }
609    /// <p>Specifies the algorithm to use when decrypting the source object (for example, <code>AES256</code>).</p><note>
610    /// <p>This functionality is not supported when the source object is in a directory bucket.</p>
611    /// </note>
612    pub fn get_copy_source_sse_customer_algorithm(&self) -> &::std::option::Option<::std::string::String> {
613        self.inner.get_copy_source_sse_customer_algorithm()
614    }
615    /// <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>
616    /// <p>This functionality is not supported when the source object is in a directory bucket.</p>
617    /// </note>
618    pub fn copy_source_sse_customer_key(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
619        self.inner = self.inner.copy_source_sse_customer_key(input.into());
620        self
621    }
622    /// <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>
623    /// <p>This functionality is not supported when the source object is in a directory bucket.</p>
624    /// </note>
625    pub fn set_copy_source_sse_customer_key(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
626        self.inner = self.inner.set_copy_source_sse_customer_key(input);
627        self
628    }
629    /// <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>
630    /// <p>This functionality is not supported when the source object is in a directory bucket.</p>
631    /// </note>
632    pub fn get_copy_source_sse_customer_key(&self) -> &::std::option::Option<::std::string::String> {
633        self.inner.get_copy_source_sse_customer_key()
634    }
635    /// <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>
636    /// <p>This functionality is not supported when the source object is in a directory bucket.</p>
637    /// </note>
638    pub fn copy_source_sse_customer_key_md5(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
639        self.inner = self.inner.copy_source_sse_customer_key_md5(input.into());
640        self
641    }
642    /// <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>
643    /// <p>This functionality is not supported when the source object is in a directory bucket.</p>
644    /// </note>
645    pub fn set_copy_source_sse_customer_key_md5(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
646        self.inner = self.inner.set_copy_source_sse_customer_key_md5(input);
647        self
648    }
649    /// <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>
650    /// <p>This functionality is not supported when the source object is in a directory bucket.</p>
651    /// </note>
652    pub fn get_copy_source_sse_customer_key_md5(&self) -> &::std::option::Option<::std::string::String> {
653        self.inner.get_copy_source_sse_customer_key_md5()
654    }
655    /// <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>
656    /// <p>This functionality is not supported for directory buckets.</p>
657    /// </note>
658    pub fn request_payer(mut self, input: crate::types::RequestPayer) -> Self {
659        self.inner = self.inner.request_payer(input);
660        self
661    }
662    /// <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>
663    /// <p>This functionality is not supported for directory buckets.</p>
664    /// </note>
665    pub fn set_request_payer(mut self, input: ::std::option::Option<crate::types::RequestPayer>) -> Self {
666        self.inner = self.inner.set_request_payer(input);
667        self
668    }
669    /// <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>
670    /// <p>This functionality is not supported for directory buckets.</p>
671    /// </note>
672    pub fn get_request_payer(&self) -> &::std::option::Option<crate::types::RequestPayer> {
673        self.inner.get_request_payer()
674    }
675    /// <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>
676    pub fn expected_bucket_owner(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
677        self.inner = self.inner.expected_bucket_owner(input.into());
678        self
679    }
680    /// <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>
681    pub fn set_expected_bucket_owner(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
682        self.inner = self.inner.set_expected_bucket_owner(input);
683        self
684    }
685    /// <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>
686    pub fn get_expected_bucket_owner(&self) -> &::std::option::Option<::std::string::String> {
687        self.inner.get_expected_bucket_owner()
688    }
689    /// <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>
690    pub fn expected_source_bucket_owner(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
691        self.inner = self.inner.expected_source_bucket_owner(input.into());
692        self
693    }
694    /// <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>
695    pub fn set_expected_source_bucket_owner(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
696        self.inner = self.inner.set_expected_source_bucket_owner(input);
697        self
698    }
699    /// <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>
700    pub fn get_expected_source_bucket_owner(&self) -> &::std::option::Option<::std::string::String> {
701        self.inner.get_expected_source_bucket_owner()
702    }
703}