aws_sdk_s3/operation/upload_part/
builders.rs

1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2pub use crate::operation::upload_part::_upload_part_output::UploadPartOutputBuilder;
3
4pub use crate::operation::upload_part::_upload_part_input::UploadPartInputBuilder;
5
6impl crate::operation::upload_part::builders::UploadPartInputBuilder {
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::UploadPartOutput,
13        ::aws_smithy_runtime_api::client::result::SdkError<
14            crate::operation::upload_part::UploadPartError,
15            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
16        >,
17    > {
18        let mut fluent_builder = client.upload_part();
19        fluent_builder.inner = self;
20        fluent_builder.send().await
21    }
22}
23/// Fluent builder constructing a request to `UploadPart`.
24///
25/// <p>Uploads a part in a multipart upload.</p><note>
26/// <p>In this operation, you provide new data as a part of an object in your request. However, you have an option to specify your existing Amazon S3 object as a data source for the part you are uploading. To upload a part from an existing object, you use the <a href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_UploadPartCopy.html">UploadPartCopy</a> operation.</p>
27/// </note>
28/// <p>You must initiate a multipart upload (see <a href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_CreateMultipartUpload.html">CreateMultipartUpload</a>) before you can upload any part. In response to your initiate request, Amazon S3 returns an upload ID, a unique identifier that you must include in your upload part request.</p>
29/// <p>Part numbers can be any number from 1 to 10,000, inclusive. A part number uniquely identifies a part and also defines its position within the object being created. If you upload a new part using the same part number that was used with a previous part, the previously uploaded part is overwritten.</p>
30/// <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>
31/// <p>After you initiate multipart upload and upload one or more parts, you must either complete or abort multipart upload in order to stop getting charged for storage of the uploaded parts. Only after you either complete or abort multipart upload, Amazon S3 frees up the parts storage and stops charging you for the parts storage.</p>
32/// </note>
33/// <p>For more information on multipart uploads, go to <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/mpuoverview.html">Multipart Upload Overview</a> in the <i>Amazon S3 User Guide </i>.</p><note>
34/// <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>
35/// </note>
36/// <dl>
37/// <dt>
38/// Permissions
39/// </dt>
40/// <dd>
41/// <ul>
42/// <li>
43/// <p><b>General purpose bucket permissions</b> - 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.</p>
44/// <p>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>
45/// <li>
46/// <p><b>Directory bucket permissions</b> - To grant access to this API operation on a directory bucket, we recommend that you use the <a href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_CreateSession.html"> <code>CreateSession</code> </a> API operation for session-based authorization. Specifically, you grant the <code>s3express:CreateSession</code> permission to the directory bucket in a bucket policy or an IAM identity-based policy. Then, you make the <code>CreateSession</code> API call on the bucket to obtain a session token. With the session token in your request header, you can make API requests to this operation. After the session token expires, you make another <code>CreateSession</code> API call to generate a new session token for use. Amazon Web Services CLI or SDKs create session and refresh the session token automatically to avoid service interruptions when a session expires. For more information about authorization, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_CreateSession.html"> <code>CreateSession</code> </a>.</p>
47/// <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></li>
48/// </ul>
49/// </dd>
50/// <dt>
51/// Data integrity
52/// </dt>
53/// <dd>
54/// <p><b>General purpose bucket</b> - To ensure that data is not corrupted traversing the network, specify the <code>Content-MD5</code> header in the upload part request. Amazon S3 checks the part data against the provided MD5 value. If they do not match, Amazon S3 returns an error. If the upload request is signed with Signature Version 4, then Amazon Web Services S3 uses the <code>x-amz-content-sha256</code> header as a checksum instead of <code>Content-MD5</code>. For more information see <a href="https://docs.aws.amazon.com/AmazonS3/latest/API/sigv4-auth-using-authorization-header.html">Authenticating Requests: Using the Authorization Header (Amazon Web Services Signature Version 4)</a>.</p><note>
55/// <p><b>Directory buckets</b> - MD5 is not supported by directory buckets. You can use checksum algorithms to check object integrity.</p>
56/// </note>
57/// </dd>
58/// <dt>
59/// Encryption
60/// </dt>
61/// <dd>
62/// <ul>
63/// <li>
64/// <p><b>General purpose bucket</b> - Server-side encryption is for data encryption at rest. Amazon S3 encrypts your data as it writes it to disks in its data centers and decrypts it when you access it. You have mutually exclusive options to protect data using server-side encryption in Amazon S3, depending on how you choose to manage the encryption keys. Specifically, the encryption key options are Amazon S3 managed keys (SSE-S3), Amazon Web Services KMS keys (SSE-KMS), and Customer-Provided Keys (SSE-C). Amazon S3 encrypts data with server-side encryption using Amazon S3 managed keys (SSE-S3) by default. You can optionally tell Amazon S3 to encrypt data at rest using server-side encryption with other key options. The option you use depends on whether you want to use KMS keys (SSE-KMS) or provide your own encryption key (SSE-C).</p>
65/// <p>Server-side encryption is supported by the S3 Multipart Upload operations. Unless you are using a customer-provided encryption key (SSE-C), you don't need to specify the encryption parameters in each UploadPart request. Instead, you only need to specify the server-side encryption parameters in the initial Initiate Multipart request. For more information, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_CreateMultipartUpload.html">CreateMultipartUpload</a>.</p>
66/// <p>If you request server-side encryption using a customer-provided encryption key (SSE-C) in your initiate multipart upload request, you must provide identical encryption information in each part upload using the following request headers.</p>
67/// <ul>
68/// <li>
69/// <p>x-amz-server-side-encryption-customer-algorithm</p></li>
70/// <li>
71/// <p>x-amz-server-side-encryption-customer-key</p></li>
72/// <li>
73/// <p>x-amz-server-side-encryption-customer-key-MD5</p></li>
74/// </ul>
75/// <p>For more information, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/UsingServerSideEncryption.html">Using Server-Side Encryption</a> in the <i>Amazon S3 User Guide</i>.</p></li>
76/// <li>
77/// <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>).</p></li>
78/// </ul>
79/// </dd>
80/// <dt>
81/// Special errors
82/// </dt>
83/// <dd>
84/// <ul>
85/// <li>
86/// <p>Error Code: <code>NoSuchUpload</code></p>
87/// <ul>
88/// <li>
89/// <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>
90/// <li>
91/// <p>HTTP Status Code: 404 Not Found</p></li>
92/// <li>
93/// <p>SOAP Fault Code Prefix: Client</p></li>
94/// </ul></li>
95/// </ul>
96/// </dd>
97/// <dt>
98/// HTTP Host header syntax
99/// </dt>
100/// <dd>
101/// <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>
102/// </dd>
103/// </dl>
104/// <p>The following operations are related to <code>UploadPart</code>:</p>
105/// <ul>
106/// <li>
107/// <p><a href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_CreateMultipartUpload.html">CreateMultipartUpload</a></p></li>
108/// <li>
109/// <p><a href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_CompleteMultipartUpload.html">CompleteMultipartUpload</a></p></li>
110/// <li>
111/// <p><a href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_AbortMultipartUpload.html">AbortMultipartUpload</a></p></li>
112/// <li>
113/// <p><a href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_ListParts.html">ListParts</a></p></li>
114/// <li>
115/// <p><a href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_ListMultipartUploads.html">ListMultipartUploads</a></p></li>
116/// </ul>
117#[derive(::std::fmt::Debug)]
118pub struct UploadPartFluentBuilder {
119    handle: ::std::sync::Arc<crate::client::Handle>,
120    inner: crate::operation::upload_part::builders::UploadPartInputBuilder,
121    config_override: ::std::option::Option<crate::config::Builder>,
122}
123impl
124    crate::client::customize::internal::CustomizableSend<
125        crate::operation::upload_part::UploadPartOutput,
126        crate::operation::upload_part::UploadPartError,
127    > for UploadPartFluentBuilder
128{
129    fn send(
130        self,
131        config_override: crate::config::Builder,
132    ) -> crate::client::customize::internal::BoxFuture<
133        crate::client::customize::internal::SendResult<
134            crate::operation::upload_part::UploadPartOutput,
135            crate::operation::upload_part::UploadPartError,
136        >,
137    > {
138        ::std::boxed::Box::pin(async move { self.config_override(config_override).send().await })
139    }
140}
141impl UploadPartFluentBuilder {
142    /// Creates a new `UploadPartFluentBuilder`.
143    pub(crate) fn new(handle: ::std::sync::Arc<crate::client::Handle>) -> Self {
144        Self {
145            handle,
146            inner: ::std::default::Default::default(),
147            config_override: ::std::option::Option::None,
148        }
149    }
150    /// Access the UploadPart as a reference.
151    pub fn as_input(&self) -> &crate::operation::upload_part::builders::UploadPartInputBuilder {
152        &self.inner
153    }
154    /// Sends the request and returns the response.
155    ///
156    /// If an error occurs, an `SdkError` will be returned with additional details that
157    /// can be matched against.
158    ///
159    /// By default, any retryable failures will be retried twice. Retry behavior
160    /// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
161    /// set when configuring the client.
162    pub async fn send(
163        self,
164    ) -> ::std::result::Result<
165        crate::operation::upload_part::UploadPartOutput,
166        ::aws_smithy_runtime_api::client::result::SdkError<
167            crate::operation::upload_part::UploadPartError,
168            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
169        >,
170    > {
171        let input = self
172            .inner
173            .build()
174            .map_err(::aws_smithy_runtime_api::client::result::SdkError::construction_failure)?;
175        let runtime_plugins = crate::operation::upload_part::UploadPart::operation_runtime_plugins(
176            self.handle.runtime_plugins.clone(),
177            &self.handle.conf,
178            self.config_override,
179        );
180        crate::operation::upload_part::UploadPart::orchestrate(&runtime_plugins, input).await
181    }
182
183    /// Consumes this builder, creating a customizable operation that can be modified before being sent.
184    pub fn customize(
185        self,
186    ) -> crate::client::customize::CustomizableOperation<
187        crate::operation::upload_part::UploadPartOutput,
188        crate::operation::upload_part::UploadPartError,
189        Self,
190    > {
191        crate::client::customize::CustomizableOperation::new(self)
192    }
193    pub(crate) fn config_override(mut self, config_override: impl ::std::convert::Into<crate::config::Builder>) -> Self {
194        self.set_config_override(::std::option::Option::Some(config_override.into()));
195        self
196    }
197
198    pub(crate) fn set_config_override(&mut self, config_override: ::std::option::Option<crate::config::Builder>) -> &mut Self {
199        self.config_override = config_override;
200        self
201    }
202    ///
203    /// Creates a presigned request for this operation.
204    ///
205    /// The `presigning_config` provides additional presigning-specific config values, such as the
206    /// amount of time the request should be valid for after creation.
207    ///
208    /// Presigned requests can be given to other users or applications to access a resource or perform
209    /// an operation without having access to the AWS security credentials.
210    ///
211    /// _Important:_ If you're using credentials that can expire, such as those from STS AssumeRole or SSO, then
212    /// the presigned request can only be valid for as long as the credentials used to create it are.
213    ///
214    #[allow(unused_mut)]
215    pub async fn presigned(
216        mut self,
217        presigning_config: crate::presigning::PresigningConfig,
218    ) -> ::std::result::Result<
219        crate::presigning::PresignedRequest,
220        ::aws_smithy_runtime_api::client::result::SdkError<
221            crate::operation::upload_part::UploadPartError,
222            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
223        >,
224    > {
225        let runtime_plugins = crate::operation::upload_part::UploadPart::operation_runtime_plugins(
226            self.handle.runtime_plugins.clone(),
227            &self.handle.conf,
228            self.config_override,
229        )
230        .with_client_plugin(crate::presigning_interceptors::SigV4PresigningRuntimePlugin::new(
231            presigning_config,
232            ::aws_sigv4::http_request::SignableBody::UnsignedPayload,
233        ));
234
235        let input = self
236            .inner
237            .build()
238            .map_err(::aws_smithy_runtime_api::client::result::SdkError::construction_failure)?;
239        let mut context = crate::operation::upload_part::UploadPart::orchestrate_with_stop_point(
240            &runtime_plugins,
241            input,
242            ::aws_smithy_runtime::client::orchestrator::StopPoint::BeforeTransmit,
243        )
244        .await
245        .map_err(|err| {
246            err.map_service_error(|err| {
247                err.downcast::<crate::operation::upload_part::UploadPartError>()
248                    .expect("correct error type")
249            })
250        })?;
251        let request = context.take_request().expect("request set before transmit");
252        crate::presigning::PresignedRequest::new(request).map_err(::aws_smithy_runtime_api::client::result::SdkError::construction_failure)
253    }
254    /// <p>Object data.</p>
255    pub fn body(mut self, input: ::aws_smithy_types::byte_stream::ByteStream) -> Self {
256        self.inner = self.inner.body(input);
257        self
258    }
259    /// <p>Object data.</p>
260    pub fn set_body(mut self, input: ::std::option::Option<::aws_smithy_types::byte_stream::ByteStream>) -> Self {
261        self.inner = self.inner.set_body(input);
262        self
263    }
264    /// <p>Object data.</p>
265    pub fn get_body(&self) -> &::std::option::Option<::aws_smithy_types::byte_stream::ByteStream> {
266        self.inner.get_body()
267    }
268    /// <p>The name of the bucket to which the multipart upload was initiated.</p>
269    /// <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>
270    /// <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>
271    /// <p>Access points and Object Lambda access points are not supported by directory buckets.</p>
272    /// </note>
273    /// <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>
274    pub fn bucket(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
275        self.inner = self.inner.bucket(input.into());
276        self
277    }
278    /// <p>The name of the bucket to which the multipart upload was initiated.</p>
279    /// <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>
280    /// <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>
281    /// <p>Access points and Object Lambda access points are not supported by directory buckets.</p>
282    /// </note>
283    /// <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>
284    pub fn set_bucket(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
285        self.inner = self.inner.set_bucket(input);
286        self
287    }
288    /// <p>The name of the bucket to which the multipart upload was initiated.</p>
289    /// <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>
290    /// <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>
291    /// <p>Access points and Object Lambda access points are not supported by directory buckets.</p>
292    /// </note>
293    /// <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>
294    pub fn get_bucket(&self) -> &::std::option::Option<::std::string::String> {
295        self.inner.get_bucket()
296    }
297    /// <p>Size of the body in bytes. This parameter is useful when the size of the body cannot be determined automatically.</p>
298    pub fn content_length(mut self, input: i64) -> Self {
299        self.inner = self.inner.content_length(input);
300        self
301    }
302    /// <p>Size of the body in bytes. This parameter is useful when the size of the body cannot be determined automatically.</p>
303    pub fn set_content_length(mut self, input: ::std::option::Option<i64>) -> Self {
304        self.inner = self.inner.set_content_length(input);
305        self
306    }
307    /// <p>Size of the body in bytes. This parameter is useful when the size of the body cannot be determined automatically.</p>
308    pub fn get_content_length(&self) -> &::std::option::Option<i64> {
309        self.inner.get_content_length()
310    }
311    /// <p>The Base64 encoded 128-bit MD5 digest of the part data. This parameter is auto-populated when using the command from the CLI. This parameter is required if object lock parameters are specified.</p><note>
312    /// <p>This functionality is not supported for directory buckets.</p>
313    /// </note>
314    pub fn content_md5(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
315        self.inner = self.inner.content_md5(input.into());
316        self
317    }
318    /// <p>The Base64 encoded 128-bit MD5 digest of the part data. This parameter is auto-populated when using the command from the CLI. This parameter is required if object lock parameters are specified.</p><note>
319    /// <p>This functionality is not supported for directory buckets.</p>
320    /// </note>
321    pub fn set_content_md5(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
322        self.inner = self.inner.set_content_md5(input);
323        self
324    }
325    /// <p>The Base64 encoded 128-bit MD5 digest of the part data. This parameter is auto-populated when using the command from the CLI. This parameter is required if object lock parameters are specified.</p><note>
326    /// <p>This functionality is not supported for directory buckets.</p>
327    /// </note>
328    pub fn get_content_md5(&self) -> &::std::option::Option<::std::string::String> {
329        self.inner.get_content_md5()
330    }
331    /// <p>Indicates the algorithm used to create the checksum for the object when you use the SDK. This header will not provide any additional functionality if you don't use the SDK. When you send this header, there must be a corresponding <code>x-amz-checksum</code> or <code>x-amz-trailer</code> header sent. Otherwise, Amazon S3 fails the request with the HTTP status code <code>400 Bad Request</code>. For more information, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html">Checking object integrity</a> in the <i>Amazon S3 User Guide</i>.</p>
332    /// <p>If you provide an individual checksum, Amazon S3 ignores any provided <code>ChecksumAlgorithm</code> parameter.</p>
333    /// <p>This checksum algorithm must be the same for all parts and it match the checksum value supplied in the <code>CreateMultipartUpload</code> request.</p>
334    pub fn checksum_algorithm(mut self, input: crate::types::ChecksumAlgorithm) -> Self {
335        self.inner = self.inner.checksum_algorithm(input);
336        self
337    }
338    /// <p>Indicates the algorithm used to create the checksum for the object when you use the SDK. This header will not provide any additional functionality if you don't use the SDK. When you send this header, there must be a corresponding <code>x-amz-checksum</code> or <code>x-amz-trailer</code> header sent. Otherwise, Amazon S3 fails the request with the HTTP status code <code>400 Bad Request</code>. For more information, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html">Checking object integrity</a> in the <i>Amazon S3 User Guide</i>.</p>
339    /// <p>If you provide an individual checksum, Amazon S3 ignores any provided <code>ChecksumAlgorithm</code> parameter.</p>
340    /// <p>This checksum algorithm must be the same for all parts and it match the checksum value supplied in the <code>CreateMultipartUpload</code> request.</p>
341    pub fn set_checksum_algorithm(mut self, input: ::std::option::Option<crate::types::ChecksumAlgorithm>) -> Self {
342        self.inner = self.inner.set_checksum_algorithm(input);
343        self
344    }
345    /// <p>Indicates the algorithm used to create the checksum for the object when you use the SDK. This header will not provide any additional functionality if you don't use the SDK. When you send this header, there must be a corresponding <code>x-amz-checksum</code> or <code>x-amz-trailer</code> header sent. Otherwise, Amazon S3 fails the request with the HTTP status code <code>400 Bad Request</code>. For more information, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html">Checking object integrity</a> in the <i>Amazon S3 User Guide</i>.</p>
346    /// <p>If you provide an individual checksum, Amazon S3 ignores any provided <code>ChecksumAlgorithm</code> parameter.</p>
347    /// <p>This checksum algorithm must be the same for all parts and it match the checksum value supplied in the <code>CreateMultipartUpload</code> request.</p>
348    pub fn get_checksum_algorithm(&self) -> &::std::option::Option<crate::types::ChecksumAlgorithm> {
349        self.inner.get_checksum_algorithm()
350    }
351    /// <p>This header can be used as a data integrity check to verify that the data received is the same data that was originally sent. This header specifies the Base64 encoded, 32-bit <code>CRC32</code> checksum of the object. For more information, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html">Checking object integrity</a> in the <i>Amazon S3 User Guide</i>.</p>
352    pub fn checksum_crc32(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
353        self.inner = self.inner.checksum_crc32(input.into());
354        self
355    }
356    /// <p>This header can be used as a data integrity check to verify that the data received is the same data that was originally sent. This header specifies the Base64 encoded, 32-bit <code>CRC32</code> checksum of the object. For more information, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html">Checking object integrity</a> in the <i>Amazon S3 User Guide</i>.</p>
357    pub fn set_checksum_crc32(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
358        self.inner = self.inner.set_checksum_crc32(input);
359        self
360    }
361    /// <p>This header can be used as a data integrity check to verify that the data received is the same data that was originally sent. This header specifies the Base64 encoded, 32-bit <code>CRC32</code> checksum of the object. For more information, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html">Checking object integrity</a> in the <i>Amazon S3 User Guide</i>.</p>
362    pub fn get_checksum_crc32(&self) -> &::std::option::Option<::std::string::String> {
363        self.inner.get_checksum_crc32()
364    }
365    /// <p>This header can be used as a data integrity check to verify that the data received is the same data that was originally sent. This header specifies the Base64 encoded, 32-bit <code>CRC32C</code> checksum of the object. For more information, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html">Checking object integrity</a> in the <i>Amazon S3 User Guide</i>.</p>
366    pub fn checksum_crc32_c(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
367        self.inner = self.inner.checksum_crc32_c(input.into());
368        self
369    }
370    /// <p>This header can be used as a data integrity check to verify that the data received is the same data that was originally sent. This header specifies the Base64 encoded, 32-bit <code>CRC32C</code> checksum of the object. For more information, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html">Checking object integrity</a> in the <i>Amazon S3 User Guide</i>.</p>
371    pub fn set_checksum_crc32_c(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
372        self.inner = self.inner.set_checksum_crc32_c(input);
373        self
374    }
375    /// <p>This header can be used as a data integrity check to verify that the data received is the same data that was originally sent. This header specifies the Base64 encoded, 32-bit <code>CRC32C</code> checksum of the object. For more information, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html">Checking object integrity</a> in the <i>Amazon S3 User Guide</i>.</p>
376    pub fn get_checksum_crc32_c(&self) -> &::std::option::Option<::std::string::String> {
377        self.inner.get_checksum_crc32_c()
378    }
379    /// <p>This header can be used as a data integrity check to verify that the data received is the same data that was originally sent. This header specifies the Base64 encoded, 64-bit <code>CRC64NVME</code> checksum of the part. For more information, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html">Checking object integrity</a> in the <i>Amazon S3 User Guide</i>.</p>
380    pub fn checksum_crc64_nvme(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
381        self.inner = self.inner.checksum_crc64_nvme(input.into());
382        self
383    }
384    /// <p>This header can be used as a data integrity check to verify that the data received is the same data that was originally sent. This header specifies the Base64 encoded, 64-bit <code>CRC64NVME</code> checksum of the part. For more information, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html">Checking object integrity</a> in the <i>Amazon S3 User Guide</i>.</p>
385    pub fn set_checksum_crc64_nvme(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
386        self.inner = self.inner.set_checksum_crc64_nvme(input);
387        self
388    }
389    /// <p>This header can be used as a data integrity check to verify that the data received is the same data that was originally sent. This header specifies the Base64 encoded, 64-bit <code>CRC64NVME</code> checksum of the part. For more information, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html">Checking object integrity</a> in the <i>Amazon S3 User Guide</i>.</p>
390    pub fn get_checksum_crc64_nvme(&self) -> &::std::option::Option<::std::string::String> {
391        self.inner.get_checksum_crc64_nvme()
392    }
393    /// <p>This header can be used as a data integrity check to verify that the data received is the same data that was originally sent. This header specifies the Base64 encoded, 160-bit <code>SHA1</code> digest of the object. For more information, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html">Checking object integrity</a> in the <i>Amazon S3 User Guide</i>.</p>
394    pub fn checksum_sha1(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
395        self.inner = self.inner.checksum_sha1(input.into());
396        self
397    }
398    /// <p>This header can be used as a data integrity check to verify that the data received is the same data that was originally sent. This header specifies the Base64 encoded, 160-bit <code>SHA1</code> digest of the object. For more information, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html">Checking object integrity</a> in the <i>Amazon S3 User Guide</i>.</p>
399    pub fn set_checksum_sha1(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
400        self.inner = self.inner.set_checksum_sha1(input);
401        self
402    }
403    /// <p>This header can be used as a data integrity check to verify that the data received is the same data that was originally sent. This header specifies the Base64 encoded, 160-bit <code>SHA1</code> digest of the object. For more information, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html">Checking object integrity</a> in the <i>Amazon S3 User Guide</i>.</p>
404    pub fn get_checksum_sha1(&self) -> &::std::option::Option<::std::string::String> {
405        self.inner.get_checksum_sha1()
406    }
407    /// <p>This header can be used as a data integrity check to verify that the data received is the same data that was originally sent. This header specifies the Base64 encoded, 256-bit <code>SHA256</code> digest of the object. For more information, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html">Checking object integrity</a> in the <i>Amazon S3 User Guide</i>.</p>
408    pub fn checksum_sha256(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
409        self.inner = self.inner.checksum_sha256(input.into());
410        self
411    }
412    /// <p>This header can be used as a data integrity check to verify that the data received is the same data that was originally sent. This header specifies the Base64 encoded, 256-bit <code>SHA256</code> digest of the object. For more information, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html">Checking object integrity</a> in the <i>Amazon S3 User Guide</i>.</p>
413    pub fn set_checksum_sha256(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
414        self.inner = self.inner.set_checksum_sha256(input);
415        self
416    }
417    /// <p>This header can be used as a data integrity check to verify that the data received is the same data that was originally sent. This header specifies the Base64 encoded, 256-bit <code>SHA256</code> digest of the object. For more information, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html">Checking object integrity</a> in the <i>Amazon S3 User Guide</i>.</p>
418    pub fn get_checksum_sha256(&self) -> &::std::option::Option<::std::string::String> {
419        self.inner.get_checksum_sha256()
420    }
421    /// <p>Object key for which the multipart upload was initiated.</p>
422    pub fn key(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
423        self.inner = self.inner.key(input.into());
424        self
425    }
426    /// <p>Object key for which the multipart upload was initiated.</p>
427    pub fn set_key(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
428        self.inner = self.inner.set_key(input);
429        self
430    }
431    /// <p>Object key for which the multipart upload was initiated.</p>
432    pub fn get_key(&self) -> &::std::option::Option<::std::string::String> {
433        self.inner.get_key()
434    }
435    /// <p>Part number of part being uploaded. This is a positive integer between 1 and 10,000.</p>
436    pub fn part_number(mut self, input: i32) -> Self {
437        self.inner = self.inner.part_number(input);
438        self
439    }
440    /// <p>Part number of part being uploaded. This is a positive integer between 1 and 10,000.</p>
441    pub fn set_part_number(mut self, input: ::std::option::Option<i32>) -> Self {
442        self.inner = self.inner.set_part_number(input);
443        self
444    }
445    /// <p>Part number of part being uploaded. This is a positive integer between 1 and 10,000.</p>
446    pub fn get_part_number(&self) -> &::std::option::Option<i32> {
447        self.inner.get_part_number()
448    }
449    /// <p>Upload ID identifying the multipart upload whose part is being uploaded.</p>
450    pub fn upload_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
451        self.inner = self.inner.upload_id(input.into());
452        self
453    }
454    /// <p>Upload ID identifying the multipart upload whose part is being uploaded.</p>
455    pub fn set_upload_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
456        self.inner = self.inner.set_upload_id(input);
457        self
458    }
459    /// <p>Upload ID identifying the multipart upload whose part is being uploaded.</p>
460    pub fn get_upload_id(&self) -> &::std::option::Option<::std::string::String> {
461        self.inner.get_upload_id()
462    }
463    /// <p>Specifies the algorithm to use when encrypting the object (for example, AES256).</p><note>
464    /// <p>This functionality is not supported for directory buckets.</p>
465    /// </note>
466    pub fn sse_customer_algorithm(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
467        self.inner = self.inner.sse_customer_algorithm(input.into());
468        self
469    }
470    /// <p>Specifies the algorithm to use when encrypting the object (for example, AES256).</p><note>
471    /// <p>This functionality is not supported for directory buckets.</p>
472    /// </note>
473    pub fn set_sse_customer_algorithm(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
474        self.inner = self.inner.set_sse_customer_algorithm(input);
475        self
476    }
477    /// <p>Specifies the algorithm to use when encrypting the object (for example, AES256).</p><note>
478    /// <p>This functionality is not supported for directory buckets.</p>
479    /// </note>
480    pub fn get_sse_customer_algorithm(&self) -> &::std::option::Option<::std::string::String> {
481        self.inner.get_sse_customer_algorithm()
482    }
483    /// <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 header</code>. This must be the same encryption key specified in the initiate multipart upload request.</p><note>
484    /// <p>This functionality is not supported for directory buckets.</p>
485    /// </note>
486    pub fn sse_customer_key(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
487        self.inner = self.inner.sse_customer_key(input.into());
488        self
489    }
490    /// <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 header</code>. This must be the same encryption key specified in the initiate multipart upload request.</p><note>
491    /// <p>This functionality is not supported for directory buckets.</p>
492    /// </note>
493    pub fn set_sse_customer_key(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
494        self.inner = self.inner.set_sse_customer_key(input);
495        self
496    }
497    /// <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 header</code>. This must be the same encryption key specified in the initiate multipart upload request.</p><note>
498    /// <p>This functionality is not supported for directory buckets.</p>
499    /// </note>
500    pub fn get_sse_customer_key(&self) -> &::std::option::Option<::std::string::String> {
501        self.inner.get_sse_customer_key()
502    }
503    /// <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>
504    /// <p>This functionality is not supported for directory buckets.</p>
505    /// </note>
506    pub fn sse_customer_key_md5(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
507        self.inner = self.inner.sse_customer_key_md5(input.into());
508        self
509    }
510    /// <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>
511    /// <p>This functionality is not supported for directory buckets.</p>
512    /// </note>
513    pub fn set_sse_customer_key_md5(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
514        self.inner = self.inner.set_sse_customer_key_md5(input);
515        self
516    }
517    /// <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>
518    /// <p>This functionality is not supported for directory buckets.</p>
519    /// </note>
520    pub fn get_sse_customer_key_md5(&self) -> &::std::option::Option<::std::string::String> {
521        self.inner.get_sse_customer_key_md5()
522    }
523    /// <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>
524    /// <p>This functionality is not supported for directory buckets.</p>
525    /// </note>
526    pub fn request_payer(mut self, input: crate::types::RequestPayer) -> Self {
527        self.inner = self.inner.request_payer(input);
528        self
529    }
530    /// <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>
531    /// <p>This functionality is not supported for directory buckets.</p>
532    /// </note>
533    pub fn set_request_payer(mut self, input: ::std::option::Option<crate::types::RequestPayer>) -> Self {
534        self.inner = self.inner.set_request_payer(input);
535        self
536    }
537    /// <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>
538    /// <p>This functionality is not supported for directory buckets.</p>
539    /// </note>
540    pub fn get_request_payer(&self) -> &::std::option::Option<crate::types::RequestPayer> {
541        self.inner.get_request_payer()
542    }
543    /// <p>The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code <code>403 Forbidden</code> (access denied).</p>
544    pub fn expected_bucket_owner(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
545        self.inner = self.inner.expected_bucket_owner(input.into());
546        self
547    }
548    /// <p>The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code <code>403 Forbidden</code> (access denied).</p>
549    pub fn set_expected_bucket_owner(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
550        self.inner = self.inner.set_expected_bucket_owner(input);
551        self
552    }
553    /// <p>The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code <code>403 Forbidden</code> (access denied).</p>
554    pub fn get_expected_bucket_owner(&self) -> &::std::option::Option<::std::string::String> {
555        self.inner.get_expected_bucket_owner()
556    }
557}
558
559impl crate::client::customize::internal::CustomizablePresigned<crate::operation::upload_part::UploadPartError> for UploadPartFluentBuilder {
560    fn presign(
561        self,
562        config_override: crate::config::Builder,
563        presigning_config: crate::presigning::PresigningConfig,
564    ) -> crate::client::customize::internal::BoxFuture<
565        crate::client::customize::internal::SendResult<crate::presigning::PresignedRequest, crate::operation::upload_part::UploadPartError>,
566    > {
567        ::std::boxed::Box::pin(async move { self.config_override(config_override).presigned(presigning_config).await })
568    }
569}