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 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>bucket_name</i>.s3express-<i>az_id</i>.<i>region</i>.amazonaws.com/<i>key-name</i> </code>. Path-style requests are not supported. For more information, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/s3-express-Regions-and-Zones.html">Regional and Zonal endpoints</a> in the <i>Amazon S3 User Guide</i>.</p>
35/// </note>
36/// <dl>
37/// <dt>
38/// Permissions
39/// </dt>
40/// <dd>
41/// <ul>
42/// <li>
43/// <p><b>General purpose bucket permissions</b> - For information on 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> in the <i>Amazon S3 User Guide</i>.</p></li>
44/// <li>
45/// <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></li>
46/// </ul>
47/// </dd>
48/// <dt>
49/// Data integrity
50/// </dt>
51/// <dd>
52/// <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>
53/// <p><b>Directory buckets</b> - MD5 is not supported by directory buckets. You can use checksum algorithms to check object integrity.</p>
54/// </note>
55/// </dd>
56/// <dt>
57/// Encryption
58/// </dt>
59/// <dd>
60/// <ul>
61/// <li>
62/// <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>
63/// <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>
64/// <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>
65/// <ul>
66/// <li>
67/// <p>x-amz-server-side-encryption-customer-algorithm</p></li>
68/// <li>
69/// <p>x-amz-server-side-encryption-customer-key</p></li>
70/// <li>
71/// <p>x-amz-server-side-encryption-customer-key-MD5</p></li>
72/// </ul></li>
73/// <li>
74/// <p><b>Directory bucket</b> - For directory buckets, only server-side encryption with Amazon S3 managed keys (SSE-S3) (<code>AES256</code>) is supported.</p></li>
75/// </ul>
76/// <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>
77/// </dd>
78/// <dt>
79/// Special errors
80/// </dt>
81/// <dd>
82/// <ul>
83/// <li>
84/// <p>Error Code: <code>NoSuchUpload</code></p>
85/// <ul>
86/// <li>
87/// <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>
88/// <li>
89/// <p>HTTP Status Code: 404 Not Found</p></li>
90/// <li>
91/// <p>SOAP Fault Code Prefix: Client</p></li>
92/// </ul></li>
93/// </ul>
94/// </dd>
95/// <dt>
96/// HTTP Host header syntax
97/// </dt>
98/// <dd>
99/// <p><b>Directory buckets </b> - The HTTP Host header syntax is <code> <i>Bucket_name</i>.s3express-<i>az_id</i>.<i>region</i>.amazonaws.com</code>.</p>
100/// </dd>
101/// </dl>
102/// <p>The following operations are related to <code>UploadPart</code>:</p>
103/// <ul>
104/// <li>
105/// <p><a href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_CreateMultipartUpload.html">CreateMultipartUpload</a></p></li>
106/// <li>
107/// <p><a href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_CompleteMultipartUpload.html">CompleteMultipartUpload</a></p></li>
108/// <li>
109/// <p><a href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_AbortMultipartUpload.html">AbortMultipartUpload</a></p></li>
110/// <li>
111/// <p><a href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_ListParts.html">ListParts</a></p></li>
112/// <li>
113/// <p><a href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_ListMultipartUploads.html">ListMultipartUploads</a></p></li>
114/// </ul>
115#[derive(::std::fmt::Debug)]
116pub struct UploadPartFluentBuilder {
117    handle: ::std::sync::Arc<crate::client::Handle>,
118    inner: crate::operation::upload_part::builders::UploadPartInputBuilder,
119    config_override: ::std::option::Option<crate::config::Builder>,
120}
121impl
122    crate::client::customize::internal::CustomizableSend<
123        crate::operation::upload_part::UploadPartOutput,
124        crate::operation::upload_part::UploadPartError,
125    > for UploadPartFluentBuilder
126{
127    fn send(
128        self,
129        config_override: crate::config::Builder,
130    ) -> crate::client::customize::internal::BoxFuture<
131        crate::client::customize::internal::SendResult<
132            crate::operation::upload_part::UploadPartOutput,
133            crate::operation::upload_part::UploadPartError,
134        >,
135    > {
136        ::std::boxed::Box::pin(async move { self.config_override(config_override).send().await })
137    }
138}
139impl UploadPartFluentBuilder {
140    /// Creates a new `UploadPart`.
141    pub(crate) fn new(handle: ::std::sync::Arc<crate::client::Handle>) -> Self {
142        Self {
143            handle,
144            inner: ::std::default::Default::default(),
145            config_override: ::std::option::Option::None,
146        }
147    }
148    /// Access the UploadPart as a reference.
149    pub fn as_input(&self) -> &crate::operation::upload_part::builders::UploadPartInputBuilder {
150        &self.inner
151    }
152    /// Sends the request and returns the response.
153    ///
154    /// If an error occurs, an `SdkError` will be returned with additional details that
155    /// can be matched against.
156    ///
157    /// By default, any retryable failures will be retried twice. Retry behavior
158    /// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
159    /// set when configuring the client.
160    pub async fn send(
161        self,
162    ) -> ::std::result::Result<
163        crate::operation::upload_part::UploadPartOutput,
164        ::aws_smithy_runtime_api::client::result::SdkError<
165            crate::operation::upload_part::UploadPartError,
166            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
167        >,
168    > {
169        let input = self
170            .inner
171            .build()
172            .map_err(::aws_smithy_runtime_api::client::result::SdkError::construction_failure)?;
173        let runtime_plugins = crate::operation::upload_part::UploadPart::operation_runtime_plugins(
174            self.handle.runtime_plugins.clone(),
175            &self.handle.conf,
176            self.config_override,
177        );
178        crate::operation::upload_part::UploadPart::orchestrate(&runtime_plugins, input).await
179    }
180
181    /// Consumes this builder, creating a customizable operation that can be modified before being sent.
182    pub fn customize(
183        self,
184    ) -> crate::client::customize::CustomizableOperation<
185        crate::operation::upload_part::UploadPartOutput,
186        crate::operation::upload_part::UploadPartError,
187        Self,
188    > {
189        crate::client::customize::CustomizableOperation::new(self)
190    }
191    pub(crate) fn config_override(mut self, config_override: impl Into<crate::config::Builder>) -> Self {
192        self.set_config_override(Some(config_override.into()));
193        self
194    }
195
196    pub(crate) fn set_config_override(&mut self, config_override: Option<crate::config::Builder>) -> &mut Self {
197        self.config_override = config_override;
198        self
199    }
200    ///
201    /// Creates a presigned request for this operation.
202    ///
203    /// The `presigning_config` provides additional presigning-specific config values, such as the
204    /// amount of time the request should be valid for after creation.
205    ///
206    /// Presigned requests can be given to other users or applications to access a resource or perform
207    /// an operation without having access to the AWS security credentials.
208    ///
209    /// _Important:_ If you're using credentials that can expire, such as those from STS AssumeRole or SSO, then
210    /// the presigned request can only be valid for as long as the credentials used to create it are.
211    ///
212    #[allow(unused_mut)]
213    pub async fn presigned(
214        mut self,
215        presigning_config: crate::presigning::PresigningConfig,
216    ) -> ::std::result::Result<
217        crate::presigning::PresignedRequest,
218        ::aws_smithy_runtime_api::client::result::SdkError<
219            crate::operation::upload_part::UploadPartError,
220            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
221        >,
222    > {
223        let runtime_plugins = crate::operation::upload_part::UploadPart::operation_runtime_plugins(
224            self.handle.runtime_plugins.clone(),
225            &self.handle.conf,
226            self.config_override,
227        )
228        .with_client_plugin(crate::presigning_interceptors::SigV4PresigningRuntimePlugin::new(
229            presigning_config,
230            ::aws_sigv4::http_request::SignableBody::UnsignedPayload,
231        ));
232
233        let input = self
234            .inner
235            .build()
236            .map_err(::aws_smithy_runtime_api::client::result::SdkError::construction_failure)?;
237        let mut context = crate::operation::upload_part::UploadPart::orchestrate_with_stop_point(
238            &runtime_plugins,
239            input,
240            ::aws_smithy_runtime::client::orchestrator::StopPoint::BeforeTransmit,
241        )
242        .await
243        .map_err(|err| {
244            err.map_service_error(|err| {
245                err.downcast::<crate::operation::upload_part::UploadPartError>()
246                    .expect("correct error type")
247            })
248        })?;
249        let request = context.take_request().expect("request set before transmit");
250        crate::presigning::PresignedRequest::new(request).map_err(::aws_smithy_runtime_api::client::result::SdkError::construction_failure)
251    }
252    /// <p>Object data.</p>
253    pub fn body(mut self, input: ::aws_smithy_types::byte_stream::ByteStream) -> Self {
254        self.inner = self.inner.body(input);
255        self
256    }
257    /// <p>Object data.</p>
258    pub fn set_body(mut self, input: ::std::option::Option<::aws_smithy_types::byte_stream::ByteStream>) -> Self {
259        self.inner = self.inner.set_body(input);
260        self
261    }
262    /// <p>Object data.</p>
263    pub fn get_body(&self) -> &::std::option::Option<::aws_smithy_types::byte_stream::ByteStream> {
264        self.inner.get_body()
265    }
266    /// <p>The name of the bucket to which the multipart upload was initiated.</p>
267    /// <p><b>Directory buckets</b> - When you use this operation with a directory bucket, you must use virtual-hosted-style requests in the format <code> <i>Bucket_name</i>.s3express-<i>az_id</i>.<i>region</i>.amazonaws.com</code>. Path-style requests are not supported. Directory bucket names must be unique in the chosen Availability Zone. Bucket names must follow the format <code> <i>bucket_base_name</i>--<i>az-id</i>--x-s3</code> (for example, <code> <i>DOC-EXAMPLE-BUCKET</i>--<i>usw2-az1</i>--x-s3</code>). For information about bucket naming restrictions, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/directory-bucket-naming-rules.html">Directory bucket naming rules</a> in the <i>Amazon S3 User Guide</i>.</p>
268    /// <p><b>Access points</b> - When you use this action with an access point, you must provide the alias of the access point in place of the bucket name or specify the access point ARN. When using the access point ARN, you must direct requests to the access point hostname. The access point hostname takes the form <i>AccessPointName</i>-<i>AccountId</i>.s3-accesspoint.<i>Region</i>.amazonaws.com. When using this action with an access point through the Amazon Web Services SDKs, you provide the access point ARN in place of the bucket name. For more information about access point ARNs, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/using-access-points.html">Using access points</a> in the <i>Amazon S3 User Guide</i>.</p><note>
269    /// <p>Access points and Object Lambda access points are not supported by directory buckets.</p>
270    /// </note>
271    /// <p><b>S3 on Outposts</b> - When you use this action with Amazon S3 on Outposts, you must direct requests to the S3 on Outposts hostname. The S3 on Outposts hostname takes the form <code> <i>AccessPointName</i>-<i>AccountId</i>.<i>outpostID</i>.s3-outposts.<i>Region</i>.amazonaws.com</code>. When you use this action with S3 on Outposts through the Amazon Web Services SDKs, you provide the Outposts access point ARN in place of the bucket name. For more information about S3 on Outposts ARNs, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/S3onOutposts.html">What is S3 on Outposts?</a> in the <i>Amazon S3 User Guide</i>.</p>
272    pub fn bucket(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
273        self.inner = self.inner.bucket(input.into());
274        self
275    }
276    /// <p>The name of the bucket to which the multipart upload was initiated.</p>
277    /// <p><b>Directory buckets</b> - When you use this operation with a directory bucket, you must use virtual-hosted-style requests in the format <code> <i>Bucket_name</i>.s3express-<i>az_id</i>.<i>region</i>.amazonaws.com</code>. Path-style requests are not supported. Directory bucket names must be unique in the chosen Availability Zone. Bucket names must follow the format <code> <i>bucket_base_name</i>--<i>az-id</i>--x-s3</code> (for example, <code> <i>DOC-EXAMPLE-BUCKET</i>--<i>usw2-az1</i>--x-s3</code>). For information about bucket naming restrictions, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/directory-bucket-naming-rules.html">Directory bucket naming rules</a> in the <i>Amazon S3 User Guide</i>.</p>
278    /// <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>
279    /// <p>Access points and Object Lambda access points are not supported by directory buckets.</p>
280    /// </note>
281    /// <p><b>S3 on Outposts</b> - When you use this action with Amazon S3 on Outposts, you must direct requests to the S3 on Outposts hostname. The S3 on Outposts hostname takes the form <code> <i>AccessPointName</i>-<i>AccountId</i>.<i>outpostID</i>.s3-outposts.<i>Region</i>.amazonaws.com</code>. When you use this action with S3 on Outposts through the Amazon Web Services SDKs, you provide the Outposts access point ARN in place of the bucket name. For more information about S3 on Outposts ARNs, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/S3onOutposts.html">What is S3 on Outposts?</a> in the <i>Amazon S3 User Guide</i>.</p>
282    pub fn set_bucket(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
283        self.inner = self.inner.set_bucket(input);
284        self
285    }
286    /// <p>The name of the bucket to which the multipart upload was initiated.</p>
287    /// <p><b>Directory buckets</b> - When you use this operation with a directory bucket, you must use virtual-hosted-style requests in the format <code> <i>Bucket_name</i>.s3express-<i>az_id</i>.<i>region</i>.amazonaws.com</code>. Path-style requests are not supported. Directory bucket names must be unique in the chosen Availability Zone. Bucket names must follow the format <code> <i>bucket_base_name</i>--<i>az-id</i>--x-s3</code> (for example, <code> <i>DOC-EXAMPLE-BUCKET</i>--<i>usw2-az1</i>--x-s3</code>). For information about bucket naming restrictions, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/directory-bucket-naming-rules.html">Directory bucket naming rules</a> in the <i>Amazon S3 User Guide</i>.</p>
288    /// <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>
289    /// <p>Access points and Object Lambda access points are not supported by directory buckets.</p>
290    /// </note>
291    /// <p><b>S3 on Outposts</b> - When you use this action with Amazon S3 on Outposts, you must direct requests to the S3 on Outposts hostname. The S3 on Outposts hostname takes the form <code> <i>AccessPointName</i>-<i>AccountId</i>.<i>outpostID</i>.s3-outposts.<i>Region</i>.amazonaws.com</code>. When you use this action with S3 on Outposts through the Amazon Web Services SDKs, you provide the Outposts access point ARN in place of the bucket name. For more information about S3 on Outposts ARNs, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/S3onOutposts.html">What is S3 on Outposts?</a> in the <i>Amazon S3 User Guide</i>.</p>
292    pub fn get_bucket(&self) -> &::std::option::Option<::std::string::String> {
293        self.inner.get_bucket()
294    }
295    /// <p>Size of the body in bytes. This parameter is useful when the size of the body cannot be determined automatically.</p>
296    pub fn content_length(mut self, input: i64) -> Self {
297        self.inner = self.inner.content_length(input);
298        self
299    }
300    /// <p>Size of the body in bytes. This parameter is useful when the size of the body cannot be determined automatically.</p>
301    pub fn set_content_length(mut self, input: ::std::option::Option<i64>) -> Self {
302        self.inner = self.inner.set_content_length(input);
303        self
304    }
305    /// <p>Size of the body in bytes. This parameter is useful when the size of the body cannot be determined automatically.</p>
306    pub fn get_content_length(&self) -> &::std::option::Option<i64> {
307        self.inner.get_content_length()
308    }
309    /// <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>
310    /// <p>This functionality is not supported for directory buckets.</p>
311    /// </note>
312    pub fn content_md5(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
313        self.inner = self.inner.content_md5(input.into());
314        self
315    }
316    /// <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>
317    /// <p>This functionality is not supported for directory buckets.</p>
318    /// </note>
319    pub fn set_content_md5(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
320        self.inner = self.inner.set_content_md5(input);
321        self
322    }
323    /// <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>
324    /// <p>This functionality is not supported for directory buckets.</p>
325    /// </note>
326    pub fn get_content_md5(&self) -> &::std::option::Option<::std::string::String> {
327        self.inner.get_content_md5()
328    }
329    /// <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>
330    /// <p>If you provide an individual checksum, Amazon S3 ignores any provided <code>ChecksumAlgorithm</code> parameter.</p>
331    /// <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>
332    pub fn checksum_algorithm(mut self, input: crate::types::ChecksumAlgorithm) -> Self {
333        self.inner = self.inner.checksum_algorithm(input);
334        self
335    }
336    /// <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>
337    /// <p>If you provide an individual checksum, Amazon S3 ignores any provided <code>ChecksumAlgorithm</code> parameter.</p>
338    /// <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>
339    pub fn set_checksum_algorithm(mut self, input: ::std::option::Option<crate::types::ChecksumAlgorithm>) -> Self {
340        self.inner = self.inner.set_checksum_algorithm(input);
341        self
342    }
343    /// <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>
344    /// <p>If you provide an individual checksum, Amazon S3 ignores any provided <code>ChecksumAlgorithm</code> parameter.</p>
345    /// <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>
346    pub fn get_checksum_algorithm(&self) -> &::std::option::Option<crate::types::ChecksumAlgorithm> {
347        self.inner.get_checksum_algorithm()
348    }
349    /// <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 CRC32 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>
350    pub fn checksum_crc32(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
351        self.inner = self.inner.checksum_crc32(input.into());
352        self
353    }
354    /// <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 CRC32 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>
355    pub fn set_checksum_crc32(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
356        self.inner = self.inner.set_checksum_crc32(input);
357        self
358    }
359    /// <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 CRC32 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>
360    pub fn get_checksum_crc32(&self) -> &::std::option::Option<::std::string::String> {
361        self.inner.get_checksum_crc32()
362    }
363    /// <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 CRC32C 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>
364    pub fn checksum_crc32_c(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
365        self.inner = self.inner.checksum_crc32_c(input.into());
366        self
367    }
368    /// <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 CRC32C 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>
369    pub fn set_checksum_crc32_c(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
370        self.inner = self.inner.set_checksum_crc32_c(input);
371        self
372    }
373    /// <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 CRC32C 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>
374    pub fn get_checksum_crc32_c(&self) -> &::std::option::Option<::std::string::String> {
375        self.inner.get_checksum_crc32_c()
376    }
377    /// <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 SHA-1 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>
378    pub fn checksum_sha1(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
379        self.inner = self.inner.checksum_sha1(input.into());
380        self
381    }
382    /// <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 SHA-1 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>
383    pub fn set_checksum_sha1(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
384        self.inner = self.inner.set_checksum_sha1(input);
385        self
386    }
387    /// <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 SHA-1 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>
388    pub fn get_checksum_sha1(&self) -> &::std::option::Option<::std::string::String> {
389        self.inner.get_checksum_sha1()
390    }
391    /// <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 SHA-256 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>
392    pub fn checksum_sha256(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
393        self.inner = self.inner.checksum_sha256(input.into());
394        self
395    }
396    /// <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 SHA-256 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>
397    pub fn set_checksum_sha256(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
398        self.inner = self.inner.set_checksum_sha256(input);
399        self
400    }
401    /// <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 SHA-256 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>
402    pub fn get_checksum_sha256(&self) -> &::std::option::Option<::std::string::String> {
403        self.inner.get_checksum_sha256()
404    }
405    /// <p>Object key for which the multipart upload was initiated.</p>
406    pub fn key(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
407        self.inner = self.inner.key(input.into());
408        self
409    }
410    /// <p>Object key for which the multipart upload was initiated.</p>
411    pub fn set_key(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
412        self.inner = self.inner.set_key(input);
413        self
414    }
415    /// <p>Object key for which the multipart upload was initiated.</p>
416    pub fn get_key(&self) -> &::std::option::Option<::std::string::String> {
417        self.inner.get_key()
418    }
419    /// <p>Part number of part being uploaded. This is a positive integer between 1 and 10,000.</p>
420    pub fn part_number(mut self, input: i32) -> Self {
421        self.inner = self.inner.part_number(input);
422        self
423    }
424    /// <p>Part number of part being uploaded. This is a positive integer between 1 and 10,000.</p>
425    pub fn set_part_number(mut self, input: ::std::option::Option<i32>) -> Self {
426        self.inner = self.inner.set_part_number(input);
427        self
428    }
429    /// <p>Part number of part being uploaded. This is a positive integer between 1 and 10,000.</p>
430    pub fn get_part_number(&self) -> &::std::option::Option<i32> {
431        self.inner.get_part_number()
432    }
433    /// <p>Upload ID identifying the multipart upload whose part is being uploaded.</p>
434    pub fn upload_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
435        self.inner = self.inner.upload_id(input.into());
436        self
437    }
438    /// <p>Upload ID identifying the multipart upload whose part is being uploaded.</p>
439    pub fn set_upload_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
440        self.inner = self.inner.set_upload_id(input);
441        self
442    }
443    /// <p>Upload ID identifying the multipart upload whose part is being uploaded.</p>
444    pub fn get_upload_id(&self) -> &::std::option::Option<::std::string::String> {
445        self.inner.get_upload_id()
446    }
447    /// <p>Specifies the algorithm to use when encrypting the object (for example, AES256).</p><note>
448    /// <p>This functionality is not supported for directory buckets.</p>
449    /// </note>
450    pub fn sse_customer_algorithm(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
451        self.inner = self.inner.sse_customer_algorithm(input.into());
452        self
453    }
454    /// <p>Specifies the algorithm to use when encrypting the object (for example, AES256).</p><note>
455    /// <p>This functionality is not supported for directory buckets.</p>
456    /// </note>
457    pub fn set_sse_customer_algorithm(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
458        self.inner = self.inner.set_sse_customer_algorithm(input);
459        self
460    }
461    /// <p>Specifies the algorithm to use when encrypting the object (for example, AES256).</p><note>
462    /// <p>This functionality is not supported for directory buckets.</p>
463    /// </note>
464    pub fn get_sse_customer_algorithm(&self) -> &::std::option::Option<::std::string::String> {
465        self.inner.get_sse_customer_algorithm()
466    }
467    /// <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>
468    /// <p>This functionality is not supported for directory buckets.</p>
469    /// </note>
470    pub fn sse_customer_key(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
471        self.inner = self.inner.sse_customer_key(input.into());
472        self
473    }
474    /// <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>
475    /// <p>This functionality is not supported for directory buckets.</p>
476    /// </note>
477    pub fn set_sse_customer_key(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
478        self.inner = self.inner.set_sse_customer_key(input);
479        self
480    }
481    /// <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>
482    /// <p>This functionality is not supported for directory buckets.</p>
483    /// </note>
484    pub fn get_sse_customer_key(&self) -> &::std::option::Option<::std::string::String> {
485        self.inner.get_sse_customer_key()
486    }
487    /// <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>
488    /// <p>This functionality is not supported for directory buckets.</p>
489    /// </note>
490    pub fn sse_customer_key_md5(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
491        self.inner = self.inner.sse_customer_key_md5(input.into());
492        self
493    }
494    /// <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>
495    /// <p>This functionality is not supported for directory buckets.</p>
496    /// </note>
497    pub fn set_sse_customer_key_md5(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
498        self.inner = self.inner.set_sse_customer_key_md5(input);
499        self
500    }
501    /// <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>
502    /// <p>This functionality is not supported for directory buckets.</p>
503    /// </note>
504    pub fn get_sse_customer_key_md5(&self) -> &::std::option::Option<::std::string::String> {
505        self.inner.get_sse_customer_key_md5()
506    }
507    /// <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>
508    /// <p>This functionality is not supported for directory buckets.</p>
509    /// </note>
510    pub fn request_payer(mut self, input: crate::types::RequestPayer) -> Self {
511        self.inner = self.inner.request_payer(input);
512        self
513    }
514    /// <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>
515    /// <p>This functionality is not supported for directory buckets.</p>
516    /// </note>
517    pub fn set_request_payer(mut self, input: ::std::option::Option<crate::types::RequestPayer>) -> Self {
518        self.inner = self.inner.set_request_payer(input);
519        self
520    }
521    /// <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>
522    /// <p>This functionality is not supported for directory buckets.</p>
523    /// </note>
524    pub fn get_request_payer(&self) -> &::std::option::Option<crate::types::RequestPayer> {
525        self.inner.get_request_payer()
526    }
527    /// <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>
528    pub fn expected_bucket_owner(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
529        self.inner = self.inner.expected_bucket_owner(input.into());
530        self
531    }
532    /// <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>
533    pub fn set_expected_bucket_owner(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
534        self.inner = self.inner.set_expected_bucket_owner(input);
535        self
536    }
537    /// <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>
538    pub fn get_expected_bucket_owner(&self) -> &::std::option::Option<::std::string::String> {
539        self.inner.get_expected_bucket_owner()
540    }
541}
542
543impl crate::client::customize::internal::CustomizablePresigned<crate::operation::upload_part::UploadPartError> for UploadPartFluentBuilder {
544    fn presign(
545        self,
546        config_override: crate::config::Builder,
547        presigning_config: crate::presigning::PresigningConfig,
548    ) -> crate::client::customize::internal::BoxFuture<
549        crate::client::customize::internal::SendResult<crate::presigning::PresignedRequest, crate::operation::upload_part::UploadPartError>,
550    > {
551        ::std::boxed::Box::pin(async move { self.config_override(config_override).presigned(presigning_config).await })
552    }
553}