1#[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
4#[non_exhaustive]
5pub struct CompleteMultipartUpload;
6impl CompleteMultipartUpload {
7 pub fn new() -> Self {
9 Self
10 }
11 pub(crate) async fn orchestrate(
12 runtime_plugins: &::aws_smithy_runtime_api::client::runtime_plugin::RuntimePlugins,
13 input: crate::operation::complete_multipart_upload::CompleteMultipartUploadInput,
14 ) -> ::std::result::Result<
15 crate::operation::complete_multipart_upload::CompleteMultipartUploadOutput,
16 ::aws_smithy_runtime_api::client::result::SdkError<
17 crate::operation::complete_multipart_upload::CompleteMultipartUploadError,
18 ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
19 >,
20 > {
21 let map_err = |err: ::aws_smithy_runtime_api::client::result::SdkError<
22 ::aws_smithy_runtime_api::client::interceptors::context::Error,
23 ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
24 >| {
25 err.map_service_error(|err| {
26 err.downcast::<crate::operation::complete_multipart_upload::CompleteMultipartUploadError>()
27 .expect("correct error type")
28 })
29 };
30 let context = Self::orchestrate_with_stop_point(runtime_plugins, input, ::aws_smithy_runtime::client::orchestrator::StopPoint::None)
31 .await
32 .map_err(map_err)?;
33 let output = context.finalize().map_err(map_err)?;
34 ::std::result::Result::Ok(
35 output
36 .downcast::<crate::operation::complete_multipart_upload::CompleteMultipartUploadOutput>()
37 .expect("correct output type"),
38 )
39 }
40
41 pub(crate) async fn orchestrate_with_stop_point(
42 runtime_plugins: &::aws_smithy_runtime_api::client::runtime_plugin::RuntimePlugins,
43 input: crate::operation::complete_multipart_upload::CompleteMultipartUploadInput,
44 stop_point: ::aws_smithy_runtime::client::orchestrator::StopPoint,
45 ) -> ::std::result::Result<
46 ::aws_smithy_runtime_api::client::interceptors::context::InterceptorContext,
47 ::aws_smithy_runtime_api::client::result::SdkError<
48 ::aws_smithy_runtime_api::client::interceptors::context::Error,
49 ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
50 >,
51 > {
52 let input = ::aws_smithy_runtime_api::client::interceptors::context::Input::erase(input);
53 use ::tracing::Instrument;
54 ::aws_smithy_runtime::client::orchestrator::invoke_with_stop_point("S3", "CompleteMultipartUpload", input, runtime_plugins, stop_point)
55 .instrument(::tracing::debug_span!(
58 "S3.CompleteMultipartUpload",
59 "rpc.service" = "S3",
60 "rpc.method" = "CompleteMultipartUpload",
61 "sdk_invocation_id" = ::fastrand::u32(1_000_000..10_000_000),
62 "rpc.system" = "aws-api",
63 ))
64 .await
65 }
66
67 pub(crate) fn operation_runtime_plugins(
68 client_runtime_plugins: ::aws_smithy_runtime_api::client::runtime_plugin::RuntimePlugins,
69 client_config: &crate::config::Config,
70 config_override: ::std::option::Option<crate::config::Builder>,
71 ) -> ::aws_smithy_runtime_api::client::runtime_plugin::RuntimePlugins {
72 let mut runtime_plugins = client_runtime_plugins.with_operation_plugin(Self::new());
73
74 if let ::std::option::Option::Some(config_override) = config_override {
75 for plugin in config_override.runtime_plugins.iter().cloned() {
76 runtime_plugins = runtime_plugins.with_operation_plugin(plugin);
77 }
78 runtime_plugins = runtime_plugins.with_operation_plugin(crate::config::ConfigOverrideRuntimePlugin::new(
79 config_override,
80 client_config.config.clone(),
81 &client_config.runtime_components,
82 ));
83 }
84 runtime_plugins
85 }
86}
87impl ::aws_smithy_runtime_api::client::runtime_plugin::RuntimePlugin for CompleteMultipartUpload {
88 fn config(&self) -> ::std::option::Option<::aws_smithy_types::config_bag::FrozenLayer> {
89 let mut cfg = ::aws_smithy_types::config_bag::Layer::new("CompleteMultipartUpload");
90
91 cfg.store_put(::aws_smithy_runtime_api::client::ser_de::SharedRequestSerializer::new(
92 CompleteMultipartUploadRequestSerializer,
93 ));
94 cfg.store_put(::aws_smithy_runtime_api::client::ser_de::SharedResponseDeserializer::new(
95 CompleteMultipartUploadResponseDeserializer,
96 ));
97
98 cfg.store_put(::aws_smithy_runtime_api::client::auth::AuthSchemeOptionResolverParams::new(
99 crate::config::auth::Params::builder()
100 .operation_name("CompleteMultipartUpload")
101 .build()
102 .expect("required fields set"),
103 ));
104
105 cfg.store_put(::aws_smithy_runtime_api::client::orchestrator::SensitiveOutput);
106 cfg.store_put(::aws_smithy_runtime_api::client::orchestrator::Metadata::new(
107 "CompleteMultipartUpload",
108 "S3",
109 ));
110 let mut signing_options = ::aws_runtime::auth::SigningOptions::default();
111 signing_options.double_uri_encode = false;
112 signing_options.content_sha256_header = true;
113 signing_options.normalize_uri_path = false;
114 signing_options.payload_override = None;
115
116 cfg.store_put(::aws_runtime::auth::SigV4OperationSigningConfig {
117 signing_options,
118 ..::std::default::Default::default()
119 });
120
121 ::std::option::Option::Some(cfg.freeze())
122 }
123
124 fn runtime_components(
125 &self,
126 _: &::aws_smithy_runtime_api::client::runtime_components::RuntimeComponentsBuilder,
127 ) -> ::std::borrow::Cow<'_, ::aws_smithy_runtime_api::client::runtime_components::RuntimeComponentsBuilder> {
128 #[allow(unused_mut)]
129 let mut rcb = ::aws_smithy_runtime_api::client::runtime_components::RuntimeComponentsBuilder::new("CompleteMultipartUpload")
130 .with_interceptor(::aws_smithy_runtime_api::client::interceptors::SharedInterceptor::permanent(
131 CompleteMultipartUploadTelemetryInputCaptureInterceptor,
132 ))
133 .with_interceptor(::aws_smithy_runtime_api::client::interceptors::SharedInterceptor::permanent(
134 ::aws_smithy_runtime::client::stalled_stream_protection::StalledStreamProtectionInterceptor::default(),
135 ))
136 .with_interceptor(::aws_smithy_runtime_api::client::interceptors::SharedInterceptor::permanent(
137 CompleteMultipartUploadEndpointParamsInterceptor,
138 ))
139 .with_retry_classifier(::aws_smithy_runtime::client::retries::classifiers::TransientErrorClassifier::<
140 crate::operation::complete_multipart_upload::CompleteMultipartUploadError,
141 >::new())
142 .with_retry_classifier(::aws_smithy_runtime::client::retries::classifiers::ModeledAsRetryableClassifier::<
143 crate::operation::complete_multipart_upload::CompleteMultipartUploadError,
144 >::new())
145 .with_retry_classifier(
146 ::aws_runtime::retries::classifiers::AwsErrorCodeClassifier::<
147 crate::operation::complete_multipart_upload::CompleteMultipartUploadError,
148 >::builder()
149 .transient_errors({
150 let mut transient_errors: Vec<&'static str> = ::aws_runtime::retries::classifiers::TRANSIENT_ERRORS.into();
151 transient_errors.push("InternalError");
152 ::std::borrow::Cow::Owned(transient_errors)
153 })
154 .build(),
155 )
156 .with_retry_classifier(::aws_runtime::service_clock_skew::ServiceClockSkewClassifier::<
157 crate::operation::complete_multipart_upload::CompleteMultipartUploadError,
158 >::new());
159
160 ::std::borrow::Cow::Owned(rcb)
161 }
162}
163
164#[derive(Debug)]
165struct CompleteMultipartUploadTelemetryInputCaptureInterceptor;
166
167#[::aws_smithy_runtime_api::client::interceptors::dyn_dispatch_hint]
168impl ::aws_smithy_runtime_api::client::interceptors::Intercept for CompleteMultipartUploadTelemetryInputCaptureInterceptor {
169 fn name(&self) -> &'static str {
170 "CompleteMultipartUploadTelemetryInputCaptureInterceptor"
171 }
172
173 fn read_before_execution(
174 &self,
175 context: &::aws_smithy_runtime_api::client::interceptors::context::BeforeSerializationInterceptorContextRef<
176 '_,
177 ::aws_smithy_runtime_api::client::interceptors::context::Input,
178 ::aws_smithy_runtime_api::client::interceptors::context::Output,
179 ::aws_smithy_runtime_api::client::interceptors::context::Error,
180 >,
181 cfg: &mut ::aws_smithy_types::config_bag::ConfigBag,
182 ) -> ::std::result::Result<(), ::aws_smithy_runtime_api::box_error::BoxError> {
183 let ::std::option::Option::Some(requested) = cfg
185 .load::<::aws_smithy_types::telemetry::RequestedTelemetryAttributes>()
186 .filter(|r| !r.is_empty())
187 else {
188 return ::std::result::Result::Ok(());
189 };
190
191 let ::std::option::Option::Some(input) = context.input().downcast_ref::<CompleteMultipartUploadInput>() else {
192 return ::std::result::Result::Ok(());
194 };
195
196 let mut captured = ::aws_smithy_types::telemetry::CapturedTelemetryAttributes::default();
197 if requested.should_capture("Bucket") {
198 if let ::std::option::Option::Some(value) = input.bucket.as_deref() {
199 captured.insert("Bucket", value);
200 }
201 }
202 if requested.should_capture("Key") {
203 if let ::std::option::Option::Some(value) = input.key.as_deref() {
204 captured.insert("Key", value);
205 }
206 }
207 if requested.should_capture("UploadId") {
208 if let ::std::option::Option::Some(value) = input.upload_id.as_deref() {
209 captured.insert("UploadId", value);
210 }
211 }
212 if requested.should_capture("ChecksumCRC32") {
213 if let ::std::option::Option::Some(value) = input.checksum_crc32.as_deref() {
214 captured.insert("ChecksumCRC32", value);
215 }
216 }
217 if requested.should_capture("ChecksumCRC32C") {
218 if let ::std::option::Option::Some(value) = input.checksum_crc32_c.as_deref() {
219 captured.insert("ChecksumCRC32C", value);
220 }
221 }
222 if requested.should_capture("ChecksumCRC64NVME") {
223 if let ::std::option::Option::Some(value) = input.checksum_crc64_nvme.as_deref() {
224 captured.insert("ChecksumCRC64NVME", value);
225 }
226 }
227 if requested.should_capture("ChecksumSHA1") {
228 if let ::std::option::Option::Some(value) = input.checksum_sha1.as_deref() {
229 captured.insert("ChecksumSHA1", value);
230 }
231 }
232 if requested.should_capture("ChecksumSHA256") {
233 if let ::std::option::Option::Some(value) = input.checksum_sha256.as_deref() {
234 captured.insert("ChecksumSHA256", value);
235 }
236 }
237 if requested.should_capture("ChecksumSHA512") {
238 if let ::std::option::Option::Some(value) = input.checksum_sha512.as_deref() {
239 captured.insert("ChecksumSHA512", value);
240 }
241 }
242 if requested.should_capture("ChecksumMD5") {
243 if let ::std::option::Option::Some(value) = input.checksum_md5.as_deref() {
244 captured.insert("ChecksumMD5", value);
245 }
246 }
247 if requested.should_capture("ChecksumXXHASH64") {
248 if let ::std::option::Option::Some(value) = input.checksum_xxhash64.as_deref() {
249 captured.insert("ChecksumXXHASH64", value);
250 }
251 }
252 if requested.should_capture("ChecksumXXHASH3") {
253 if let ::std::option::Option::Some(value) = input.checksum_xxhash3.as_deref() {
254 captured.insert("ChecksumXXHASH3", value);
255 }
256 }
257 if requested.should_capture("ChecksumXXHASH128") {
258 if let ::std::option::Option::Some(value) = input.checksum_xxhash128.as_deref() {
259 captured.insert("ChecksumXXHASH128", value);
260 }
261 }
262 if requested.should_capture("ExpectedBucketOwner") {
263 if let ::std::option::Option::Some(value) = input.expected_bucket_owner.as_deref() {
264 captured.insert("ExpectedBucketOwner", value);
265 }
266 }
267 if requested.should_capture("IfMatch") {
268 if let ::std::option::Option::Some(value) = input.if_match.as_deref() {
269 captured.insert("IfMatch", value);
270 }
271 }
272 if requested.should_capture("IfNoneMatch") {
273 if let ::std::option::Option::Some(value) = input.if_none_match.as_deref() {
274 captured.insert("IfNoneMatch", value);
275 }
276 }
277 if requested.should_capture("SSECustomerAlgorithm") {
278 if let ::std::option::Option::Some(value) = input.sse_customer_algorithm.as_deref() {
279 captured.insert("SSECustomerAlgorithm", value);
280 }
281 }
282 if requested.should_capture("SSECustomerKeyMD5") {
283 if let ::std::option::Option::Some(value) = input.sse_customer_key_md5.as_deref() {
284 captured.insert("SSECustomerKeyMD5", value);
285 }
286 }
287
288 cfg.interceptor_state().store_put(captured);
289 ::std::result::Result::Ok(())
290 }
291}
292#[derive(Debug)]
293struct CompleteMultipartUploadResponseDeserializer;
294impl ::aws_smithy_runtime_api::client::ser_de::DeserializeResponse for CompleteMultipartUploadResponseDeserializer {
295 fn deserialize_nonstreaming_with_config(
296 &self,
297 response: &::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
298 _cfg: &::aws_smithy_types::config_bag::ConfigBag,
299 ) -> ::aws_smithy_runtime_api::client::interceptors::context::OutputOrError {
300 let (success, status) = (response.status().is_success(), response.status().as_u16());
301 let headers = response.headers();
302 let body = response.body().bytes().expect("body loaded");
303 #[allow(unused_mut)]
304 let mut force_error = false;
305 ::tracing::debug!(extended_request_id = ?crate::s3_request_id::RequestIdExt::extended_request_id(response));
306 if matches!(crate::rest_xml_unwrapped_errors::body_is_error(body), Ok(true)) {
307 force_error = true;
308 }
309 ::tracing::debug!(request_id = ?::aws_types::request_id::RequestId::request_id(response));
310 let parse_result = if !success && status != 200 || force_error {
311 crate::protocol_serde::shape_complete_multipart_upload::de_complete_multipart_upload_http_error(status, headers, body, _cfg)
312 } else {
313 crate::protocol_serde::shape_complete_multipart_upload::de_complete_multipart_upload_http_response(status, headers, body, _cfg)
314 };
315 crate::protocol_serde::type_erase_result(parse_result)
316 }
317}
318#[derive(Debug)]
319struct CompleteMultipartUploadRequestSerializer;
320impl ::aws_smithy_runtime_api::client::ser_de::SerializeRequest for CompleteMultipartUploadRequestSerializer {
321 #[allow(unused_mut, clippy::let_and_return, clippy::needless_borrow, clippy::useless_conversion)]
322 fn serialize_input(
323 &self,
324 input: ::aws_smithy_runtime_api::client::interceptors::context::Input,
325 _cfg: &mut ::aws_smithy_types::config_bag::ConfigBag,
326 ) -> ::std::result::Result<::aws_smithy_runtime_api::client::orchestrator::HttpRequest, ::aws_smithy_runtime_api::box_error::BoxError> {
327 let input = input
328 .downcast::<crate::operation::complete_multipart_upload::CompleteMultipartUploadInput>()
329 .expect("correct type");
330 let _header_serialization_settings = _cfg
331 .load::<crate::serialization_settings::HeaderSerializationSettings>()
332 .cloned()
333 .unwrap_or_default();
334 let mut request_builder = {
335 #[allow(clippy::uninlined_format_args)]
336 fn uri_base(
337 _input: &crate::operation::complete_multipart_upload::CompleteMultipartUploadInput,
338 output: &mut ::std::string::String,
339 ) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> {
340 use ::std::fmt::Write as _;
341 let input_1 = &_input.key;
342 let input_1 = input_1
343 .as_ref()
344 .ok_or_else(|| ::aws_smithy_types::error::operation::BuildError::missing_field("key", "cannot be empty or unset"))?;
345 let key = ::aws_smithy_http::label::fmt_string(input_1, ::aws_smithy_http::label::EncodingStrategy::Greedy);
346 if key.is_empty() {
347 return ::std::result::Result::Err(::aws_smithy_types::error::operation::BuildError::missing_field(
348 "key",
349 "cannot be empty or unset",
350 ));
351 }
352 ::std::write!(output, "/{Key}", Key = key).expect("formatting should succeed");
353 ::std::result::Result::Ok(())
354 }
355 fn uri_query(
356 _input: &crate::operation::complete_multipart_upload::CompleteMultipartUploadInput,
357 mut output: &mut ::std::string::String,
358 ) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> {
359 let mut query = ::aws_smithy_http::query::Writer::new(output);
360 let inner_2 = &_input.upload_id;
361 let inner_2 = inner_2
362 .as_ref()
363 .ok_or_else(|| ::aws_smithy_types::error::operation::BuildError::missing_field("upload_id", "cannot be empty or unset"))?;
364 if inner_2.is_empty() {
365 return ::std::result::Result::Err(::aws_smithy_types::error::operation::BuildError::missing_field(
366 "upload_id",
367 "cannot be empty or unset",
368 ));
369 }
370 query.push_kv("uploadId", &::aws_smithy_http::query::fmt_string(inner_2));
371 ::std::result::Result::Ok(())
372 }
373 #[allow(clippy::unnecessary_wraps)]
374 fn update_http_builder(
375 input: &crate::operation::complete_multipart_upload::CompleteMultipartUploadInput,
376 builder: ::http_1x::request::Builder,
377 ) -> ::std::result::Result<::http_1x::request::Builder, ::aws_smithy_types::error::operation::BuildError> {
378 let mut uri = ::std::string::String::new();
379 uri_base(input, &mut uri)?;
380 uri_query(input, &mut uri)?;
381 let builder = crate::protocol_serde::shape_complete_multipart_upload::ser_complete_multipart_upload_headers(input, builder)?;
382 ::std::result::Result::Ok(builder.method("POST").uri(uri))
383 }
384 let mut builder = update_http_builder(&input, ::http_1x::request::Builder::new())?;
385 builder = _header_serialization_settings.set_default_header(builder, ::http_1x::header::CONTENT_TYPE, "application/xml");
386 builder
387 };
388 let body = ::aws_smithy_types::body::SdkBody::from(
389 crate::protocol_serde::shape_complete_multipart_upload_input::ser_multipart_upload_http_payload(&input.multipart_upload)?,
390 );
391 if let Some(content_length) = body.content_length() {
392 let content_length = content_length.to_string();
393 request_builder = _header_serialization_settings.set_default_header(request_builder, ::http_1x::header::CONTENT_LENGTH, &content_length);
394 }
395 ::std::result::Result::Ok(request_builder.body(body).expect("valid request").try_into().unwrap())
396 }
397}
398#[derive(Debug)]
399struct CompleteMultipartUploadEndpointParamsInterceptor;
400
401#[::aws_smithy_runtime_api::client::interceptors::dyn_dispatch_hint]
402impl ::aws_smithy_runtime_api::client::interceptors::Intercept for CompleteMultipartUploadEndpointParamsInterceptor {
403 fn name(&self) -> &'static str {
404 "CompleteMultipartUploadEndpointParamsInterceptor"
405 }
406
407 fn read_before_execution(
408 &self,
409 context: &::aws_smithy_runtime_api::client::interceptors::context::BeforeSerializationInterceptorContextRef<
410 '_,
411 ::aws_smithy_runtime_api::client::interceptors::context::Input,
412 ::aws_smithy_runtime_api::client::interceptors::context::Output,
413 ::aws_smithy_runtime_api::client::interceptors::context::Error,
414 >,
415 cfg: &mut ::aws_smithy_types::config_bag::ConfigBag,
416 ) -> ::std::result::Result<(), ::aws_smithy_runtime_api::box_error::BoxError> {
417 let _input = context
418 .input()
419 .downcast_ref::<CompleteMultipartUploadInput>()
420 .ok_or("failed to downcast to CompleteMultipartUploadInput")?;
421
422 let params = crate::config::endpoint::Params::builder()
423 .set_region(cfg.load::<::aws_types::region::Region>().map(|r| r.as_ref().to_owned()))
424 .set_use_fips(cfg.load::<::aws_types::endpoint_config::UseFips>().map(|ty| ty.0))
425 .set_use_dual_stack(cfg.load::<::aws_types::endpoint_config::UseDualStack>().map(|ty| ty.0))
426 .set_endpoint(cfg.load::<::aws_types::endpoint_config::EndpointUrl>().map(|ty| ty.0.clone()))
427 .set_force_path_style(cfg.load::<crate::config::ForcePathStyle>().map(|ty| ty.0))
428 .set_use_arn_region(cfg.load::<crate::config::UseArnRegion>().map(|ty| ty.0))
429 .set_disable_multi_region_access_points(cfg.load::<crate::config::DisableMultiRegionAccessPoints>().map(|ty| ty.0))
430 .set_accelerate(cfg.load::<crate::config::Accelerate>().map(|ty| ty.0))
431 .set_disable_s3_express_session_auth(cfg.load::<crate::config::DisableS3ExpressSessionAuth>().map(|ty| ty.0))
432 .set_bucket(Some(
433 _input
434 .bucket
435 .clone()
436 .filter(|f| !AsRef::<str>::as_ref(f).trim().is_empty())
437 .ok_or_else(|| ::aws_smithy_types::error::operation::BuildError::missing_field("bucket", "A required field was not set"))?,
438 ))
439 .set_key(Some(
440 _input
441 .key
442 .clone()
443 .filter(|f| !AsRef::<str>::as_ref(f).trim().is_empty())
444 .ok_or_else(|| ::aws_smithy_types::error::operation::BuildError::missing_field("key", "A required field was not set"))?,
445 ))
446 .build()
447 .map_err(|err| {
448 ::aws_smithy_runtime_api::client::interceptors::error::ContextAttachedError::new("endpoint params could not be built", err)
449 })?;
450 cfg.interceptor_state()
451 .store_put(::aws_smithy_runtime_api::client::endpoint::EndpointResolverParams::new(params));
452 ::std::result::Result::Ok(())
453 }
454}
455
456#[non_exhaustive]
461#[derive(::std::fmt::Debug)]
462pub enum CompleteMultipartUploadError {
463 #[deprecated(note = "Matching `Unhandled` directly is not forwards compatible. Instead, match using a \
465 variable wildcard pattern and check `.code()`:
466 \
467 `err if err.code() == Some(\"SpecificExceptionCode\") => { /* handle the error */ }`
468 \
469 See [`ProvideErrorMetadata`](#impl-ProvideErrorMetadata-for-CompleteMultipartUploadError) for what information is available for the error.")]
470 Unhandled(crate::error::sealed_unhandled::Unhandled),
471}
472impl CompleteMultipartUploadError {
473 pub fn unhandled(
475 err: impl ::std::convert::Into<::std::boxed::Box<dyn ::std::error::Error + ::std::marker::Send + ::std::marker::Sync + 'static>>,
476 ) -> Self {
477 Self::Unhandled(crate::error::sealed_unhandled::Unhandled {
478 source: err.into(),
479 meta: ::std::default::Default::default(),
480 })
481 }
482
483 pub fn generic(err: ::aws_smithy_types::error::ErrorMetadata) -> Self {
485 Self::Unhandled(crate::error::sealed_unhandled::Unhandled {
486 source: err.clone().into(),
487 meta: err,
488 })
489 }
490 pub fn meta(&self) -> &::aws_smithy_types::error::ErrorMetadata {
495 match self {
496 Self::Unhandled(e) => &e.meta,
497 }
498 }
499}
500impl ::std::error::Error for CompleteMultipartUploadError {
501 fn source(&self) -> ::std::option::Option<&(dyn ::std::error::Error + 'static)> {
502 match self {
503 Self::Unhandled(_inner) => ::std::option::Option::Some(&*_inner.source),
504 }
505 }
506}
507impl ::std::fmt::Display for CompleteMultipartUploadError {
508 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
509 match self {
510 Self::Unhandled(_inner) => {
511 if let ::std::option::Option::Some(code) = ::aws_smithy_types::error::metadata::ProvideErrorMetadata::code(self) {
512 write!(f, "unhandled error ({code})")
513 } else {
514 f.write_str("unhandled error")
515 }
516 }
517 }
518 }
519}
520impl ::aws_smithy_types::retry::ProvideErrorKind for CompleteMultipartUploadError {
521 fn code(&self) -> ::std::option::Option<&str> {
522 ::aws_smithy_types::error::metadata::ProvideErrorMetadata::code(self)
523 }
524 fn retryable_error_kind(&self) -> ::std::option::Option<::aws_smithy_types::retry::ErrorKind> {
525 ::std::option::Option::None
526 }
527}
528impl ::aws_smithy_types::error::metadata::ProvideErrorMetadata for CompleteMultipartUploadError {
529 fn meta(&self) -> &::aws_smithy_types::error::ErrorMetadata {
530 match self {
531 Self::Unhandled(_inner) => &_inner.meta,
532 }
533 }
534}
535impl ::aws_smithy_runtime_api::client::result::CreateUnhandledError for CompleteMultipartUploadError {
536 fn create_unhandled_error(
537 source: ::std::boxed::Box<dyn ::std::error::Error + ::std::marker::Send + ::std::marker::Sync + 'static>,
538 meta: ::std::option::Option<::aws_smithy_types::error::ErrorMetadata>,
539 ) -> Self {
540 Self::Unhandled(crate::error::sealed_unhandled::Unhandled {
541 source,
542 meta: meta.unwrap_or_default(),
543 })
544 }
545}
546impl crate::s3_request_id::RequestIdExt for crate::operation::complete_multipart_upload::CompleteMultipartUploadError {
547 fn extended_request_id(&self) -> Option<&str> {
548 self.meta().extended_request_id()
549 }
550}
551impl ::aws_types::request_id::RequestId for crate::operation::complete_multipart_upload::CompleteMultipartUploadError {
552 fn request_id(&self) -> Option<&str> {
553 self.meta().request_id()
554 }
555}
556
557pub use crate::operation::complete_multipart_upload::_complete_multipart_upload_input::CompleteMultipartUploadInput;
558
559pub use crate::operation::complete_multipart_upload::_complete_multipart_upload_output::CompleteMultipartUploadOutput;
560
561mod _complete_multipart_upload_input;
562
563mod _complete_multipart_upload_output;
564
565pub mod builders;