aws_sdk_s3/operation/complete_multipart_upload/builders.rs
1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2pub use crate::operation::complete_multipart_upload::_complete_multipart_upload_output::CompleteMultipartUploadOutputBuilder;
3
4pub use crate::operation::complete_multipart_upload::_complete_multipart_upload_input::CompleteMultipartUploadInputBuilder;
5
6impl crate::operation::complete_multipart_upload::builders::CompleteMultipartUploadInputBuilder {
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::complete_multipart_upload::CompleteMultipartUploadOutput,
13 ::aws_smithy_runtime_api::client::result::SdkError<
14 crate::operation::complete_multipart_upload::CompleteMultipartUploadError,
15 ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
16 >,
17 > {
18 let mut fluent_builder = client.complete_multipart_upload();
19 fluent_builder.inner = self;
20 fluent_builder.send().await
21 }
22}
23/// Fluent builder constructing a request to `CompleteMultipartUpload`.
24///
25/// <p>Completes a multipart upload by assembling previously uploaded parts.</p>
26/// <p>You first initiate the multipart upload and then upload all parts using the <a href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_UploadPart.html">UploadPart</a> operation or the <a href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_UploadPartCopy.html">UploadPartCopy</a> operation. After successfully uploading all relevant parts of an upload, you call this <code>CompleteMultipartUpload</code> operation to complete the upload. Upon receiving this request, Amazon S3 concatenates all the parts in ascending order by part number to create a new object. In the CompleteMultipartUpload request, you must provide the parts list and ensure that the parts list is complete. The CompleteMultipartUpload API operation concatenates the parts that you provide in the list. For each part in the list, you must provide the <code>PartNumber</code> value and the <code>ETag</code> value that are returned after that part was uploaded.</p>
27/// <p>The processing of a CompleteMultipartUpload request could take several minutes to finalize. After Amazon S3 begins processing the request, it sends an HTTP response header that specifies a <code>200 OK</code> response. While processing is in progress, Amazon S3 periodically sends white space characters to keep the connection from timing out. A request could fail after the initial <code>200 OK</code> response has been sent. This means that a <code>200 OK</code> response can contain either a success or an error. The error response might be embedded in the <code>200 OK</code> response. If you call this API operation directly, make sure to design your application to parse the contents of the response and handle it appropriately. If you use Amazon Web Services SDKs, SDKs handle this condition. The SDKs detect the embedded error and apply error handling per your configuration settings (including automatically retrying the request as appropriate). If the condition persists, the SDKs throw an exception (or, for the SDKs that don't use exceptions, they return an error).</p>
28/// <p>Note that if <code>CompleteMultipartUpload</code> fails, applications should be prepared to retry any failed requests (including 500 error responses). For more information, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/ErrorBestPractices.html">Amazon S3 Error Best Practices</a>.</p><important>
29/// <p>You can't use <code>Content-Type: application/x-www-form-urlencoded</code> for the CompleteMultipartUpload requests. Also, if you don't provide a <code>Content-Type</code> header, <code>CompleteMultipartUpload</code> can still return a <code>200 OK</code> response.</p>
30/// </important>
31/// <p>For more information about multipart uploads, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/uploadobjusingmpu.html">Uploading Objects Using Multipart Upload</a> in the <i>Amazon S3 User Guide</i>.</p><note>
32/// <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>
33/// </note>
34/// <dl>
35/// <dt>
36/// Permissions
37/// </dt>
38/// <dd>
39/// <ul>
40/// <li>
41/// <p><b>General purpose bucket permissions</b> - For information about 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>
42/// <p>If you provide an <a href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_Checksum.html">additional checksum value</a> in your <code>MultipartUpload</code> requests and the object is encrypted with Key Management Service, you must have permission to use the <code>kms:Decrypt</code> action for the <code>CompleteMultipartUpload</code> request to succeed.</p></li>
43/// <li>
44/// <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>
45/// <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>
46/// </ul>
47/// </dd>
48/// <dt>
49/// Special errors
50/// </dt>
51/// <dd>
52/// <ul>
53/// <li>
54/// <p>Error Code: <code>EntityTooSmall</code></p>
55/// <ul>
56/// <li>
57/// <p>Description: Your proposed upload is smaller than the minimum allowed object size. Each part must be at least 5 MB in size, except the last part.</p></li>
58/// <li>
59/// <p>HTTP Status Code: 400 Bad Request</p></li>
60/// </ul></li>
61/// <li>
62/// <p>Error Code: <code>InvalidPart</code></p>
63/// <ul>
64/// <li>
65/// <p>Description: One or more of the specified parts could not be found. The part might not have been uploaded, or the specified ETag might not have matched the uploaded part's ETag.</p></li>
66/// <li>
67/// <p>HTTP Status Code: 400 Bad Request</p></li>
68/// </ul></li>
69/// <li>
70/// <p>Error Code: <code>InvalidPartOrder</code></p>
71/// <ul>
72/// <li>
73/// <p>Description: The list of parts was not in ascending order. The parts list must be specified in order by part number.</p></li>
74/// <li>
75/// <p>HTTP Status Code: 400 Bad Request</p></li>
76/// </ul></li>
77/// <li>
78/// <p>Error Code: <code>NoSuchUpload</code></p>
79/// <ul>
80/// <li>
81/// <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>
82/// <li>
83/// <p>HTTP Status Code: 404 Not Found</p></li>
84/// </ul></li>
85/// </ul>
86/// </dd>
87/// <dt>
88/// HTTP Host header syntax
89/// </dt>
90/// <dd>
91/// <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>
92/// </dd>
93/// </dl>
94/// <p>The following operations are related to <code>CompleteMultipartUpload</code>:</p>
95/// <ul>
96/// <li>
97/// <p><a href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_CreateMultipartUpload.html">CreateMultipartUpload</a></p></li>
98/// <li>
99/// <p><a href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_UploadPart.html">UploadPart</a></p></li>
100/// <li>
101/// <p><a href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_AbortMultipartUpload.html">AbortMultipartUpload</a></p></li>
102/// <li>
103/// <p><a href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_ListParts.html">ListParts</a></p></li>
104/// <li>
105/// <p><a href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_ListMultipartUploads.html">ListMultipartUploads</a></p></li>
106/// </ul>
107#[derive(::std::clone::Clone, ::std::fmt::Debug)]
108pub struct CompleteMultipartUploadFluentBuilder {
109 handle: ::std::sync::Arc<crate::client::Handle>,
110 inner: crate::operation::complete_multipart_upload::builders::CompleteMultipartUploadInputBuilder,
111 config_override: ::std::option::Option<crate::config::Builder>,
112}
113impl
114 crate::client::customize::internal::CustomizableSend<
115 crate::operation::complete_multipart_upload::CompleteMultipartUploadOutput,
116 crate::operation::complete_multipart_upload::CompleteMultipartUploadError,
117 > for CompleteMultipartUploadFluentBuilder
118{
119 fn send(
120 self,
121 config_override: crate::config::Builder,
122 ) -> crate::client::customize::internal::BoxFuture<
123 crate::client::customize::internal::SendResult<
124 crate::operation::complete_multipart_upload::CompleteMultipartUploadOutput,
125 crate::operation::complete_multipart_upload::CompleteMultipartUploadError,
126 >,
127 > {
128 ::std::boxed::Box::pin(async move { self.config_override(config_override).send().await })
129 }
130}
131impl CompleteMultipartUploadFluentBuilder {
132 /// Creates a new `CompleteMultipartUploadFluentBuilder`.
133 pub(crate) fn new(handle: ::std::sync::Arc<crate::client::Handle>) -> Self {
134 Self {
135 handle,
136 inner: ::std::default::Default::default(),
137 config_override: ::std::option::Option::None,
138 }
139 }
140 /// Access the CompleteMultipartUpload as a reference.
141 pub fn as_input(&self) -> &crate::operation::complete_multipart_upload::builders::CompleteMultipartUploadInputBuilder {
142 &self.inner
143 }
144 /// Sends the request and returns the response.
145 ///
146 /// If an error occurs, an `SdkError` will be returned with additional details that
147 /// can be matched against.
148 ///
149 /// By default, any retryable failures will be retried twice. Retry behavior
150 /// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
151 /// set when configuring the client.
152 pub async fn send(
153 self,
154 ) -> ::std::result::Result<
155 crate::operation::complete_multipart_upload::CompleteMultipartUploadOutput,
156 ::aws_smithy_runtime_api::client::result::SdkError<
157 crate::operation::complete_multipart_upload::CompleteMultipartUploadError,
158 ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
159 >,
160 > {
161 let input = self
162 .inner
163 .build()
164 .map_err(::aws_smithy_runtime_api::client::result::SdkError::construction_failure)?;
165 let runtime_plugins = crate::operation::complete_multipart_upload::CompleteMultipartUpload::operation_runtime_plugins(
166 self.handle.runtime_plugins.clone(),
167 &self.handle.conf,
168 self.config_override,
169 );
170 crate::operation::complete_multipart_upload::CompleteMultipartUpload::orchestrate(&runtime_plugins, input).await
171 }
172
173 /// Consumes this builder, creating a customizable operation that can be modified before being sent.
174 pub fn customize(
175 self,
176 ) -> crate::client::customize::CustomizableOperation<
177 crate::operation::complete_multipart_upload::CompleteMultipartUploadOutput,
178 crate::operation::complete_multipart_upload::CompleteMultipartUploadError,
179 Self,
180 > {
181 crate::client::customize::CustomizableOperation::new(self)
182 }
183 pub(crate) fn config_override(mut self, config_override: impl ::std::convert::Into<crate::config::Builder>) -> Self {
184 self.set_config_override(::std::option::Option::Some(config_override.into()));
185 self
186 }
187
188 pub(crate) fn set_config_override(&mut self, config_override: ::std::option::Option<crate::config::Builder>) -> &mut Self {
189 self.config_override = config_override;
190 self
191 }
192 /// <p>Name of the bucket to which the multipart upload was initiated.</p>
193 /// <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>
194 /// <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>
195 /// <p>Access points and Object Lambda access points are not supported by directory buckets.</p>
196 /// </note>
197 /// <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>
198 pub fn bucket(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
199 self.inner = self.inner.bucket(input.into());
200 self
201 }
202 /// <p>Name of the bucket to which the multipart upload was initiated.</p>
203 /// <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>
204 /// <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>
205 /// <p>Access points and Object Lambda access points are not supported by directory buckets.</p>
206 /// </note>
207 /// <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>
208 pub fn set_bucket(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
209 self.inner = self.inner.set_bucket(input);
210 self
211 }
212 /// <p>Name of the bucket to which the multipart upload was initiated.</p>
213 /// <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>
214 /// <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>
215 /// <p>Access points and Object Lambda access points are not supported by directory buckets.</p>
216 /// </note>
217 /// <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>
218 pub fn get_bucket(&self) -> &::std::option::Option<::std::string::String> {
219 self.inner.get_bucket()
220 }
221 /// <p>Object key for which the multipart upload was initiated.</p>
222 pub fn key(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
223 self.inner = self.inner.key(input.into());
224 self
225 }
226 /// <p>Object key for which the multipart upload was initiated.</p>
227 pub fn set_key(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
228 self.inner = self.inner.set_key(input);
229 self
230 }
231 /// <p>Object key for which the multipart upload was initiated.</p>
232 pub fn get_key(&self) -> &::std::option::Option<::std::string::String> {
233 self.inner.get_key()
234 }
235 /// <p>The container for the multipart upload request information.</p>
236 pub fn multipart_upload(mut self, input: crate::types::CompletedMultipartUpload) -> Self {
237 self.inner = self.inner.multipart_upload(input);
238 self
239 }
240 /// <p>The container for the multipart upload request information.</p>
241 pub fn set_multipart_upload(mut self, input: ::std::option::Option<crate::types::CompletedMultipartUpload>) -> Self {
242 self.inner = self.inner.set_multipart_upload(input);
243 self
244 }
245 /// <p>The container for the multipart upload request information.</p>
246 pub fn get_multipart_upload(&self) -> &::std::option::Option<crate::types::CompletedMultipartUpload> {
247 self.inner.get_multipart_upload()
248 }
249 /// <p>ID for the initiated multipart upload.</p>
250 pub fn upload_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
251 self.inner = self.inner.upload_id(input.into());
252 self
253 }
254 /// <p>ID for the initiated multipart upload.</p>
255 pub fn set_upload_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
256 self.inner = self.inner.set_upload_id(input);
257 self
258 }
259 /// <p>ID for the initiated multipart upload.</p>
260 pub fn get_upload_id(&self) -> &::std::option::Option<::std::string::String> {
261 self.inner.get_upload_id()
262 }
263 /// <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>
264 pub fn checksum_crc32(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
265 self.inner = self.inner.checksum_crc32(input.into());
266 self
267 }
268 /// <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>
269 pub fn set_checksum_crc32(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
270 self.inner = self.inner.set_checksum_crc32(input);
271 self
272 }
273 /// <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>
274 pub fn get_checksum_crc32(&self) -> &::std::option::Option<::std::string::String> {
275 self.inner.get_checksum_crc32()
276 }
277 /// <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>
278 pub fn checksum_crc32_c(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
279 self.inner = self.inner.checksum_crc32_c(input.into());
280 self
281 }
282 /// <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>
283 pub fn set_checksum_crc32_c(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
284 self.inner = self.inner.set_checksum_crc32_c(input);
285 self
286 }
287 /// <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>
288 pub fn get_checksum_crc32_c(&self) -> &::std::option::Option<::std::string::String> {
289 self.inner.get_checksum_crc32_c()
290 }
291 /// <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 object. The <code>CRC64NVME</code> checksum is always a full object checksum. For more information, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html">Checking object integrity in the Amazon S3 User Guide</a>.</p>
292 pub fn checksum_crc64_nvme(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
293 self.inner = self.inner.checksum_crc64_nvme(input.into());
294 self
295 }
296 /// <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 object. The <code>CRC64NVME</code> checksum is always a full object checksum. For more information, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html">Checking object integrity in the Amazon S3 User Guide</a>.</p>
297 pub fn set_checksum_crc64_nvme(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
298 self.inner = self.inner.set_checksum_crc64_nvme(input);
299 self
300 }
301 /// <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 object. The <code>CRC64NVME</code> checksum is always a full object checksum. For more information, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html">Checking object integrity in the Amazon S3 User Guide</a>.</p>
302 pub fn get_checksum_crc64_nvme(&self) -> &::std::option::Option<::std::string::String> {
303 self.inner.get_checksum_crc64_nvme()
304 }
305 /// <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>
306 pub fn checksum_sha1(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
307 self.inner = self.inner.checksum_sha1(input.into());
308 self
309 }
310 /// <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>
311 pub fn set_checksum_sha1(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
312 self.inner = self.inner.set_checksum_sha1(input);
313 self
314 }
315 /// <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>
316 pub fn get_checksum_sha1(&self) -> &::std::option::Option<::std::string::String> {
317 self.inner.get_checksum_sha1()
318 }
319 /// <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>
320 pub fn checksum_sha256(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
321 self.inner = self.inner.checksum_sha256(input.into());
322 self
323 }
324 /// <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>
325 pub fn set_checksum_sha256(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
326 self.inner = self.inner.set_checksum_sha256(input);
327 self
328 }
329 /// <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>
330 pub fn get_checksum_sha256(&self) -> &::std::option::Option<::std::string::String> {
331 self.inner.get_checksum_sha256()
332 }
333 /// <p>This header specifies the checksum type of the object, which determines how part-level checksums are combined to create an object-level checksum for multipart objects. You can use this header as a data integrity check to verify that the checksum type that is received is the same checksum that was specified. If the checksum type doesn’t match the checksum type that was specified for the object during the <code>CreateMultipartUpload</code> request, it’ll result in a <code>BadDigest</code> error. For more information, see Checking object integrity in the Amazon S3 User Guide.</p>
334 pub fn checksum_type(mut self, input: crate::types::ChecksumType) -> Self {
335 self.inner = self.inner.checksum_type(input);
336 self
337 }
338 /// <p>This header specifies the checksum type of the object, which determines how part-level checksums are combined to create an object-level checksum for multipart objects. You can use this header as a data integrity check to verify that the checksum type that is received is the same checksum that was specified. If the checksum type doesn’t match the checksum type that was specified for the object during the <code>CreateMultipartUpload</code> request, it’ll result in a <code>BadDigest</code> error. For more information, see Checking object integrity in the Amazon S3 User Guide.</p>
339 pub fn set_checksum_type(mut self, input: ::std::option::Option<crate::types::ChecksumType>) -> Self {
340 self.inner = self.inner.set_checksum_type(input);
341 self
342 }
343 /// <p>This header specifies the checksum type of the object, which determines how part-level checksums are combined to create an object-level checksum for multipart objects. You can use this header as a data integrity check to verify that the checksum type that is received is the same checksum that was specified. If the checksum type doesn’t match the checksum type that was specified for the object during the <code>CreateMultipartUpload</code> request, it’ll result in a <code>BadDigest</code> error. For more information, see Checking object integrity in the Amazon S3 User Guide.</p>
344 pub fn get_checksum_type(&self) -> &::std::option::Option<crate::types::ChecksumType> {
345 self.inner.get_checksum_type()
346 }
347 /// <p>The expected total object size of the multipart upload request. If there’s a mismatch between the specified object size value and the actual object size value, it results in an <code>HTTP 400 InvalidRequest</code> error.</p>
348 pub fn mpu_object_size(mut self, input: i64) -> Self {
349 self.inner = self.inner.mpu_object_size(input);
350 self
351 }
352 /// <p>The expected total object size of the multipart upload request. If there’s a mismatch between the specified object size value and the actual object size value, it results in an <code>HTTP 400 InvalidRequest</code> error.</p>
353 pub fn set_mpu_object_size(mut self, input: ::std::option::Option<i64>) -> Self {
354 self.inner = self.inner.set_mpu_object_size(input);
355 self
356 }
357 /// <p>The expected total object size of the multipart upload request. If there’s a mismatch between the specified object size value and the actual object size value, it results in an <code>HTTP 400 InvalidRequest</code> error.</p>
358 pub fn get_mpu_object_size(&self) -> &::std::option::Option<i64> {
359 self.inner.get_mpu_object_size()
360 }
361 /// <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>
362 /// <p>This functionality is not supported for directory buckets.</p>
363 /// </note>
364 pub fn request_payer(mut self, input: crate::types::RequestPayer) -> Self {
365 self.inner = self.inner.request_payer(input);
366 self
367 }
368 /// <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>
369 /// <p>This functionality is not supported for directory buckets.</p>
370 /// </note>
371 pub fn set_request_payer(mut self, input: ::std::option::Option<crate::types::RequestPayer>) -> Self {
372 self.inner = self.inner.set_request_payer(input);
373 self
374 }
375 /// <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>
376 /// <p>This functionality is not supported for directory buckets.</p>
377 /// </note>
378 pub fn get_request_payer(&self) -> &::std::option::Option<crate::types::RequestPayer> {
379 self.inner.get_request_payer()
380 }
381 /// <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>
382 pub fn expected_bucket_owner(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
383 self.inner = self.inner.expected_bucket_owner(input.into());
384 self
385 }
386 /// <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>
387 pub fn set_expected_bucket_owner(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
388 self.inner = self.inner.set_expected_bucket_owner(input);
389 self
390 }
391 /// <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>
392 pub fn get_expected_bucket_owner(&self) -> &::std::option::Option<::std::string::String> {
393 self.inner.get_expected_bucket_owner()
394 }
395 /// <p>Uploads the object only if the ETag (entity tag) value provided during the WRITE operation matches the ETag of the object in S3. If the ETag values do not match, the operation returns a <code>412 Precondition Failed</code> error.</p>
396 /// <p>If a conflicting operation occurs during the upload S3 returns a <code>409 ConditionalRequestConflict</code> response. On a 409 failure you should fetch the object's ETag, re-initiate the multipart upload with <code>CreateMultipartUpload</code>, and re-upload each part.</p>
397 /// <p>Expects the ETag value as a string.</p>
398 /// <p>For more information about conditional requests, see <a href="https://tools.ietf.org/html/rfc7232">RFC 7232</a>, or <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/conditional-requests.html">Conditional requests</a> in the <i>Amazon S3 User Guide</i>.</p>
399 pub fn if_match(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
400 self.inner = self.inner.if_match(input.into());
401 self
402 }
403 /// <p>Uploads the object only if the ETag (entity tag) value provided during the WRITE operation matches the ETag of the object in S3. If the ETag values do not match, the operation returns a <code>412 Precondition Failed</code> error.</p>
404 /// <p>If a conflicting operation occurs during the upload S3 returns a <code>409 ConditionalRequestConflict</code> response. On a 409 failure you should fetch the object's ETag, re-initiate the multipart upload with <code>CreateMultipartUpload</code>, and re-upload each part.</p>
405 /// <p>Expects the ETag value as a string.</p>
406 /// <p>For more information about conditional requests, see <a href="https://tools.ietf.org/html/rfc7232">RFC 7232</a>, or <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/conditional-requests.html">Conditional requests</a> in the <i>Amazon S3 User Guide</i>.</p>
407 pub fn set_if_match(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
408 self.inner = self.inner.set_if_match(input);
409 self
410 }
411 /// <p>Uploads the object only if the ETag (entity tag) value provided during the WRITE operation matches the ETag of the object in S3. If the ETag values do not match, the operation returns a <code>412 Precondition Failed</code> error.</p>
412 /// <p>If a conflicting operation occurs during the upload S3 returns a <code>409 ConditionalRequestConflict</code> response. On a 409 failure you should fetch the object's ETag, re-initiate the multipart upload with <code>CreateMultipartUpload</code>, and re-upload each part.</p>
413 /// <p>Expects the ETag value as a string.</p>
414 /// <p>For more information about conditional requests, see <a href="https://tools.ietf.org/html/rfc7232">RFC 7232</a>, or <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/conditional-requests.html">Conditional requests</a> in the <i>Amazon S3 User Guide</i>.</p>
415 pub fn get_if_match(&self) -> &::std::option::Option<::std::string::String> {
416 self.inner.get_if_match()
417 }
418 /// <p>Uploads the object only if the object key name does not already exist in the bucket specified. Otherwise, Amazon S3 returns a <code>412 Precondition Failed</code> error.</p>
419 /// <p>If a conflicting operation occurs during the upload S3 returns a <code>409 ConditionalRequestConflict</code> response. On a 409 failure you should re-initiate the multipart upload with <code>CreateMultipartUpload</code> and re-upload each part.</p>
420 /// <p>Expects the '*' (asterisk) character.</p>
421 /// <p>For more information about conditional requests, see <a href="https://tools.ietf.org/html/rfc7232">RFC 7232</a>, or <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/conditional-requests.html">Conditional requests</a> in the <i>Amazon S3 User Guide</i>.</p>
422 pub fn if_none_match(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
423 self.inner = self.inner.if_none_match(input.into());
424 self
425 }
426 /// <p>Uploads the object only if the object key name does not already exist in the bucket specified. Otherwise, Amazon S3 returns a <code>412 Precondition Failed</code> error.</p>
427 /// <p>If a conflicting operation occurs during the upload S3 returns a <code>409 ConditionalRequestConflict</code> response. On a 409 failure you should re-initiate the multipart upload with <code>CreateMultipartUpload</code> and re-upload each part.</p>
428 /// <p>Expects the '*' (asterisk) character.</p>
429 /// <p>For more information about conditional requests, see <a href="https://tools.ietf.org/html/rfc7232">RFC 7232</a>, or <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/conditional-requests.html">Conditional requests</a> in the <i>Amazon S3 User Guide</i>.</p>
430 pub fn set_if_none_match(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
431 self.inner = self.inner.set_if_none_match(input);
432 self
433 }
434 /// <p>Uploads the object only if the object key name does not already exist in the bucket specified. Otherwise, Amazon S3 returns a <code>412 Precondition Failed</code> error.</p>
435 /// <p>If a conflicting operation occurs during the upload S3 returns a <code>409 ConditionalRequestConflict</code> response. On a 409 failure you should re-initiate the multipart upload with <code>CreateMultipartUpload</code> and re-upload each part.</p>
436 /// <p>Expects the '*' (asterisk) character.</p>
437 /// <p>For more information about conditional requests, see <a href="https://tools.ietf.org/html/rfc7232">RFC 7232</a>, or <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/conditional-requests.html">Conditional requests</a> in the <i>Amazon S3 User Guide</i>.</p>
438 pub fn get_if_none_match(&self) -> &::std::option::Option<::std::string::String> {
439 self.inner.get_if_none_match()
440 }
441 /// <p>The server-side encryption (SSE) algorithm used to encrypt the object. This parameter is required only when the object was created using a checksum algorithm or if your bucket policy requires the use of SSE-C. For more information, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/ServerSideEncryptionCustomerKeys.html#ssec-require-condition-key">Protecting data using SSE-C keys</a> in the <i>Amazon S3 User Guide</i>.</p><note>
442 /// <p>This functionality is not supported for directory buckets.</p>
443 /// </note>
444 pub fn sse_customer_algorithm(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
445 self.inner = self.inner.sse_customer_algorithm(input.into());
446 self
447 }
448 /// <p>The server-side encryption (SSE) algorithm used to encrypt the object. This parameter is required only when the object was created using a checksum algorithm or if your bucket policy requires the use of SSE-C. For more information, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/ServerSideEncryptionCustomerKeys.html#ssec-require-condition-key">Protecting data using SSE-C keys</a> in the <i>Amazon S3 User Guide</i>.</p><note>
449 /// <p>This functionality is not supported for directory buckets.</p>
450 /// </note>
451 pub fn set_sse_customer_algorithm(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
452 self.inner = self.inner.set_sse_customer_algorithm(input);
453 self
454 }
455 /// <p>The server-side encryption (SSE) algorithm used to encrypt the object. This parameter is required only when the object was created using a checksum algorithm or if your bucket policy requires the use of SSE-C. For more information, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/ServerSideEncryptionCustomerKeys.html#ssec-require-condition-key">Protecting data using SSE-C keys</a> in the <i>Amazon S3 User Guide</i>.</p><note>
456 /// <p>This functionality is not supported for directory buckets.</p>
457 /// </note>
458 pub fn get_sse_customer_algorithm(&self) -> &::std::option::Option<::std::string::String> {
459 self.inner.get_sse_customer_algorithm()
460 }
461 /// <p>The server-side encryption (SSE) customer managed key. This parameter is needed only when the object was created using a checksum algorithm. For more information, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/ServerSideEncryptionCustomerKeys.html">Protecting data using SSE-C keys</a> in the <i>Amazon S3 User Guide</i>.</p><note>
462 /// <p>This functionality is not supported for directory buckets.</p>
463 /// </note>
464 pub fn sse_customer_key(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
465 self.inner = self.inner.sse_customer_key(input.into());
466 self
467 }
468 /// <p>The server-side encryption (SSE) customer managed key. This parameter is needed only when the object was created using a checksum algorithm. For more information, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/ServerSideEncryptionCustomerKeys.html">Protecting data using SSE-C keys</a> in the <i>Amazon S3 User Guide</i>.</p><note>
469 /// <p>This functionality is not supported for directory buckets.</p>
470 /// </note>
471 pub fn set_sse_customer_key(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
472 self.inner = self.inner.set_sse_customer_key(input);
473 self
474 }
475 /// <p>The server-side encryption (SSE) customer managed key. This parameter is needed only when the object was created using a checksum algorithm. For more information, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/ServerSideEncryptionCustomerKeys.html">Protecting data using SSE-C keys</a> in the <i>Amazon S3 User Guide</i>.</p><note>
476 /// <p>This functionality is not supported for directory buckets.</p>
477 /// </note>
478 pub fn get_sse_customer_key(&self) -> &::std::option::Option<::std::string::String> {
479 self.inner.get_sse_customer_key()
480 }
481 /// <p>The MD5 server-side encryption (SSE) customer managed key. This parameter is needed only when the object was created using a checksum algorithm. For more information, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/ServerSideEncryptionCustomerKeys.html">Protecting data using SSE-C keys</a> in the <i>Amazon S3 User Guide</i>.</p><note>
482 /// <p>This functionality is not supported for directory buckets.</p>
483 /// </note>
484 pub fn sse_customer_key_md5(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
485 self.inner = self.inner.sse_customer_key_md5(input.into());
486 self
487 }
488 /// <p>The MD5 server-side encryption (SSE) customer managed key. This parameter is needed only when the object was created using a checksum algorithm. For more information, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/ServerSideEncryptionCustomerKeys.html">Protecting data using SSE-C keys</a> in the <i>Amazon S3 User Guide</i>.</p><note>
489 /// <p>This functionality is not supported for directory buckets.</p>
490 /// </note>
491 pub fn set_sse_customer_key_md5(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
492 self.inner = self.inner.set_sse_customer_key_md5(input);
493 self
494 }
495 /// <p>The MD5 server-side encryption (SSE) customer managed key. This parameter is needed only when the object was created using a checksum algorithm. For more information, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/ServerSideEncryptionCustomerKeys.html">Protecting data using SSE-C keys</a> in the <i>Amazon S3 User Guide</i>.</p><note>
496 /// <p>This functionality is not supported for directory buckets.</p>
497 /// </note>
498 pub fn get_sse_customer_key_md5(&self) -> &::std::option::Option<::std::string::String> {
499 self.inner.get_sse_customer_key_md5()
500 }
501}