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