1#[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
4#[non_exhaustive]
5pub struct UpdateObjectEncryption;
6impl UpdateObjectEncryption {
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::update_object_encryption::UpdateObjectEncryptionInput,
14 ) -> ::std::result::Result<
15 crate::operation::update_object_encryption::UpdateObjectEncryptionOutput,
16 ::aws_smithy_runtime_api::client::result::SdkError<
17 crate::operation::update_object_encryption::UpdateObjectEncryptionError,
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::update_object_encryption::UpdateObjectEncryptionError>()
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::update_object_encryption::UpdateObjectEncryptionOutput>()
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::update_object_encryption::UpdateObjectEncryptionInput,
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", "UpdateObjectEncryption", input, runtime_plugins, stop_point)
55 .instrument(::tracing::debug_span!(
58 "S3.UpdateObjectEncryption",
59 "rpc.service" = "S3",
60 "rpc.method" = "UpdateObjectEncryption",
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 UpdateObjectEncryption {
88 fn config(&self) -> ::std::option::Option<::aws_smithy_types::config_bag::FrozenLayer> {
89 let mut cfg = ::aws_smithy_types::config_bag::Layer::new("UpdateObjectEncryption");
90
91 cfg.store_put(::aws_smithy_runtime_api::client::ser_de::SharedRequestSerializer::new(
92 UpdateObjectEncryptionRequestSerializer,
93 ));
94 cfg.store_put(::aws_smithy_runtime_api::client::ser_de::SharedResponseDeserializer::new(
95 UpdateObjectEncryptionResponseDeserializer,
96 ));
97
98 cfg.store_put(::aws_smithy_runtime_api::client::auth::AuthSchemeOptionResolverParams::new(
99 crate::config::auth::Params::builder()
100 .operation_name("UpdateObjectEncryption")
101 .build()
102 .expect("required fields set"),
103 ));
104
105 cfg.store_put(::aws_smithy_runtime_api::client::orchestrator::Metadata::new(
106 "UpdateObjectEncryption",
107 "S3",
108 ));
109 cfg.store_put(crate::s3_express::checksum::provide_default_checksum_algorithm());
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 =
130 ::aws_smithy_runtime_api::client::runtime_components::RuntimeComponentsBuilder::new("UpdateObjectEncryption")
131 .with_interceptor(::aws_smithy_runtime_api::client::interceptors::SharedInterceptor::permanent(
132 UpdateObjectEncryptionTelemetryInputCaptureInterceptor,
133 ))
134 .with_interceptor(::aws_smithy_runtime_api::client::interceptors::SharedInterceptor::permanent(
135 ::aws_smithy_runtime::client::stalled_stream_protection::StalledStreamProtectionInterceptor::default(),
136 ))
137 .with_interceptor(::aws_smithy_runtime_api::client::interceptors::SharedInterceptor::permanent(
138 UpdateObjectEncryptionEndpointParamsInterceptor,
139 ))
140 .with_interceptor(::aws_smithy_runtime_api::client::interceptors::SharedInterceptor::permanent(
141 crate::http_request_checksum::RequestChecksumInterceptor::new(
142 |input: &::aws_smithy_runtime_api::client::interceptors::context::Input| {
143 let input: &crate::operation::update_object_encryption::UpdateObjectEncryptionInput =
144 input.downcast_ref().expect("correct type");
145 let checksum_algorithm = input.checksum_algorithm();
146 let checksum_algorithm = checksum_algorithm.map(|algorithm| algorithm.as_str());
147 (checksum_algorithm.map(|s| s.to_string()), true)
148 },
149 |request: &mut ::aws_smithy_runtime_api::http::Request, cfg: &::aws_smithy_types::config_bag::ConfigBag| {
150 let mut user_set_checksum_value = false;
152 let headers_to_check =
153 request.headers().iter().filter_map(
154 |(name, _val)| {
155 if name.starts_with("x-amz-checksum-") {
156 Some(name)
157 } else {
158 None
159 }
160 },
161 );
162 for algo_header in headers_to_check {
163 if request.headers().get(algo_header).is_some() {
164 user_set_checksum_value = true;
165 }
166 }
167
168 let user_set_checksum_algo = request.headers().get("x-amz-sdk-checksum-algorithm").is_some();
170
171 let request_checksum_calculation = cfg
173 .load::<::aws_smithy_types::checksum_config::RequestChecksumCalculation>()
174 .unwrap_or(&::aws_smithy_types::checksum_config::RequestChecksumCalculation::WhenSupported);
175
176 let http_checksum_required = true;
178
179 let is_presigned_req = cfg.load::<crate::presigning::PresigningMarker>().is_some();
180
181 match (
186 request_checksum_calculation,
187 http_checksum_required,
188 user_set_checksum_value,
189 user_set_checksum_algo,
190 is_presigned_req,
191 ) {
192 (_, _, _, _, true) => {}
193 (::aws_smithy_types::checksum_config::RequestChecksumCalculation::WhenSupported, _, false, false, _)
194 | (::aws_smithy_types::checksum_config::RequestChecksumCalculation::WhenRequired, true, false, false, _) => {
195 request.headers_mut().insert("x-amz-sdk-checksum-algorithm", "CRC32");
196 }
197 _ => {}
198 }
199
200 Ok(user_set_checksum_value)
203 },
204 ),
205 ))
206 .with_retry_classifier(::aws_smithy_runtime::client::retries::classifiers::TransientErrorClassifier::<
207 crate::operation::update_object_encryption::UpdateObjectEncryptionError,
208 >::new())
209 .with_retry_classifier(::aws_smithy_runtime::client::retries::classifiers::ModeledAsRetryableClassifier::<
210 crate::operation::update_object_encryption::UpdateObjectEncryptionError,
211 >::new())
212 .with_retry_classifier(
213 ::aws_runtime::retries::classifiers::AwsErrorCodeClassifier::<
214 crate::operation::update_object_encryption::UpdateObjectEncryptionError,
215 >::builder()
216 .transient_errors({
217 let mut transient_errors: Vec<&'static str> = ::aws_runtime::retries::classifiers::TRANSIENT_ERRORS.into();
218 transient_errors.push("InternalError");
219 ::std::borrow::Cow::Owned(transient_errors)
220 })
221 .build(),
222 );
223
224 ::std::borrow::Cow::Owned(rcb)
225 }
226}
227
228#[derive(Debug)]
229struct UpdateObjectEncryptionTelemetryInputCaptureInterceptor;
230
231#[::aws_smithy_runtime_api::client::interceptors::dyn_dispatch_hint]
232impl ::aws_smithy_runtime_api::client::interceptors::Intercept for UpdateObjectEncryptionTelemetryInputCaptureInterceptor {
233 fn name(&self) -> &'static str {
234 "UpdateObjectEncryptionTelemetryInputCaptureInterceptor"
235 }
236
237 fn read_before_execution(
238 &self,
239 context: &::aws_smithy_runtime_api::client::interceptors::context::BeforeSerializationInterceptorContextRef<
240 '_,
241 ::aws_smithy_runtime_api::client::interceptors::context::Input,
242 ::aws_smithy_runtime_api::client::interceptors::context::Output,
243 ::aws_smithy_runtime_api::client::interceptors::context::Error,
244 >,
245 cfg: &mut ::aws_smithy_types::config_bag::ConfigBag,
246 ) -> ::std::result::Result<(), ::aws_smithy_runtime_api::box_error::BoxError> {
247 let ::std::option::Option::Some(requested) = cfg
249 .load::<::aws_smithy_types::telemetry::RequestedTelemetryAttributes>()
250 .filter(|r| !r.is_empty())
251 else {
252 return ::std::result::Result::Ok(());
253 };
254
255 let ::std::option::Option::Some(input) = context.input().downcast_ref::<UpdateObjectEncryptionInput>() else {
256 return ::std::result::Result::Ok(());
258 };
259
260 let mut captured = ::aws_smithy_types::telemetry::CapturedTelemetryAttributes::default();
261 if requested.should_capture("Bucket") {
262 if let ::std::option::Option::Some(value) = input.bucket.as_deref() {
263 captured.insert("Bucket", value);
264 }
265 }
266 if requested.should_capture("Key") {
267 if let ::std::option::Option::Some(value) = input.key.as_deref() {
268 captured.insert("Key", value);
269 }
270 }
271 if requested.should_capture("VersionId") {
272 if let ::std::option::Option::Some(value) = input.version_id.as_deref() {
273 captured.insert("VersionId", value);
274 }
275 }
276 if requested.should_capture("ExpectedBucketOwner") {
277 if let ::std::option::Option::Some(value) = input.expected_bucket_owner.as_deref() {
278 captured.insert("ExpectedBucketOwner", value);
279 }
280 }
281 if requested.should_capture("ContentMD5") {
282 if let ::std::option::Option::Some(value) = input.content_md5.as_deref() {
283 captured.insert("ContentMD5", value);
284 }
285 }
286
287 cfg.interceptor_state().store_put(captured);
288 ::std::result::Result::Ok(())
289 }
290}
291#[derive(Debug)]
292struct UpdateObjectEncryptionResponseDeserializer;
293impl ::aws_smithy_runtime_api::client::ser_de::DeserializeResponse for UpdateObjectEncryptionResponseDeserializer {
294 fn deserialize_nonstreaming_with_config(
295 &self,
296 response: &::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
297 _cfg: &::aws_smithy_types::config_bag::ConfigBag,
298 ) -> ::aws_smithy_runtime_api::client::interceptors::context::OutputOrError {
299 let (success, status) = (response.status().is_success(), response.status().as_u16());
300 let headers = response.headers();
301 let body = response.body().bytes().expect("body loaded");
302 #[allow(unused_mut)]
303 let mut force_error = false;
304 ::tracing::debug!(extended_request_id = ?crate::s3_request_id::RequestIdExt::extended_request_id(response));
305 if matches!(crate::rest_xml_unwrapped_errors::body_is_error(body), Ok(true)) {
306 force_error = true;
307 }
308 ::tracing::debug!(request_id = ?::aws_types::request_id::RequestId::request_id(response));
309 let parse_result = if !success && status != 200 || force_error {
310 crate::protocol_serde::shape_update_object_encryption::de_update_object_encryption_http_error(status, headers, body)
311 } else {
312 crate::protocol_serde::shape_update_object_encryption::de_update_object_encryption_http_response(status, headers, body)
313 };
314 crate::protocol_serde::type_erase_result(parse_result)
315 }
316}
317#[derive(Debug)]
318struct UpdateObjectEncryptionRequestSerializer;
319impl ::aws_smithy_runtime_api::client::ser_de::SerializeRequest for UpdateObjectEncryptionRequestSerializer {
320 #[allow(unused_mut, clippy::let_and_return, clippy::needless_borrow, clippy::useless_conversion)]
321 fn serialize_input(
322 &self,
323 input: ::aws_smithy_runtime_api::client::interceptors::context::Input,
324 _cfg: &mut ::aws_smithy_types::config_bag::ConfigBag,
325 ) -> ::std::result::Result<::aws_smithy_runtime_api::client::orchestrator::HttpRequest, ::aws_smithy_runtime_api::box_error::BoxError> {
326 let input = input
327 .downcast::<crate::operation::update_object_encryption::UpdateObjectEncryptionInput>()
328 .expect("correct type");
329 let _header_serialization_settings = _cfg
330 .load::<crate::serialization_settings::HeaderSerializationSettings>()
331 .cloned()
332 .unwrap_or_default();
333 let mut request_builder = {
334 #[allow(clippy::uninlined_format_args)]
335 fn uri_base(
336 _input: &crate::operation::update_object_encryption::UpdateObjectEncryptionInput,
337 output: &mut ::std::string::String,
338 ) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> {
339 use ::std::fmt::Write as _;
340 let input_1 = &_input.key;
341 let input_1 = input_1
342 .as_ref()
343 .ok_or_else(|| ::aws_smithy_types::error::operation::BuildError::missing_field("key", "cannot be empty or unset"))?;
344 let key = ::aws_smithy_http::label::fmt_string(input_1, ::aws_smithy_http::label::EncodingStrategy::Greedy);
345 if key.is_empty() {
346 return ::std::result::Result::Err(::aws_smithy_types::error::operation::BuildError::missing_field(
347 "key",
348 "cannot be empty or unset",
349 ));
350 }
351 ::std::write!(output, "/{Key}", Key = key).expect("formatting should succeed");
352 ::std::result::Result::Ok(())
353 }
354 fn uri_query(
355 _input: &crate::operation::update_object_encryption::UpdateObjectEncryptionInput,
356 mut output: &mut ::std::string::String,
357 ) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> {
358 let mut query = ::aws_smithy_http::query::Writer::new(output);
359 query.push_v("encryption");
360 if let ::std::option::Option::Some(inner_2) = &_input.version_id {
361 {
362 query.push_kv("versionId", &::aws_smithy_http::query::fmt_string(inner_2));
363 }
364 }
365 ::std::result::Result::Ok(())
366 }
367 #[allow(clippy::unnecessary_wraps)]
368 fn update_http_builder(
369 input: &crate::operation::update_object_encryption::UpdateObjectEncryptionInput,
370 builder: ::http_1x::request::Builder,
371 ) -> ::std::result::Result<::http_1x::request::Builder, ::aws_smithy_types::error::operation::BuildError> {
372 let mut uri = ::std::string::String::new();
373 uri_base(input, &mut uri)?;
374 uri_query(input, &mut uri)?;
375 let builder = crate::protocol_serde::shape_update_object_encryption::ser_update_object_encryption_headers(input, builder)?;
376 ::std::result::Result::Ok(builder.method("PUT").uri(uri))
377 }
378 let mut builder = update_http_builder(&input, ::http_1x::request::Builder::new())?;
379 builder = _header_serialization_settings.set_default_header(builder, ::http_1x::header::CONTENT_TYPE, "application/xml");
380 builder
381 };
382 let body = ::aws_smithy_types::body::SdkBody::from(
383 crate::protocol_serde::shape_update_object_encryption_input::ser_object_encryption_http_payload(&input.object_encryption)?,
384 );
385 if let Some(content_length) = body.content_length() {
386 let content_length = content_length.to_string();
387 request_builder = _header_serialization_settings.set_default_header(request_builder, ::http_1x::header::CONTENT_LENGTH, &content_length);
388 }
389 ::std::result::Result::Ok(request_builder.body(body).expect("valid request").try_into().unwrap())
390 }
391}
392#[derive(Debug)]
393struct UpdateObjectEncryptionEndpointParamsInterceptor;
394
395#[::aws_smithy_runtime_api::client::interceptors::dyn_dispatch_hint]
396impl ::aws_smithy_runtime_api::client::interceptors::Intercept for UpdateObjectEncryptionEndpointParamsInterceptor {
397 fn name(&self) -> &'static str {
398 "UpdateObjectEncryptionEndpointParamsInterceptor"
399 }
400
401 fn read_before_execution(
402 &self,
403 context: &::aws_smithy_runtime_api::client::interceptors::context::BeforeSerializationInterceptorContextRef<
404 '_,
405 ::aws_smithy_runtime_api::client::interceptors::context::Input,
406 ::aws_smithy_runtime_api::client::interceptors::context::Output,
407 ::aws_smithy_runtime_api::client::interceptors::context::Error,
408 >,
409 cfg: &mut ::aws_smithy_types::config_bag::ConfigBag,
410 ) -> ::std::result::Result<(), ::aws_smithy_runtime_api::box_error::BoxError> {
411 let _input = context
412 .input()
413 .downcast_ref::<UpdateObjectEncryptionInput>()
414 .ok_or("failed to downcast to UpdateObjectEncryptionInput")?;
415
416 let params = crate::config::endpoint::Params::builder()
417 .set_region(cfg.load::<::aws_types::region::Region>().map(|r| r.as_ref().to_owned()))
418 .set_use_fips(cfg.load::<::aws_types::endpoint_config::UseFips>().map(|ty| ty.0))
419 .set_use_dual_stack(cfg.load::<::aws_types::endpoint_config::UseDualStack>().map(|ty| ty.0))
420 .set_endpoint(cfg.load::<::aws_types::endpoint_config::EndpointUrl>().map(|ty| ty.0.clone()))
421 .set_force_path_style(cfg.load::<crate::config::ForcePathStyle>().map(|ty| ty.0))
422 .set_use_arn_region(cfg.load::<crate::config::UseArnRegion>().map(|ty| ty.0))
423 .set_disable_multi_region_access_points(cfg.load::<crate::config::DisableMultiRegionAccessPoints>().map(|ty| ty.0))
424 .set_accelerate(cfg.load::<crate::config::Accelerate>().map(|ty| ty.0))
425 .set_disable_s3_express_session_auth(cfg.load::<crate::config::DisableS3ExpressSessionAuth>().map(|ty| ty.0))
426 .set_bucket(Some(
427 _input
428 .bucket
429 .clone()
430 .filter(|f| !AsRef::<str>::as_ref(f).trim().is_empty())
431 .ok_or_else(|| ::aws_smithy_types::error::operation::BuildError::missing_field("bucket", "A required field was not set"))?,
432 ))
433 .build()
434 .map_err(|err| {
435 ::aws_smithy_runtime_api::client::interceptors::error::ContextAttachedError::new("endpoint params could not be built", err)
436 })?;
437 cfg.interceptor_state()
438 .store_put(::aws_smithy_runtime_api::client::endpoint::EndpointResolverParams::new(params));
439 ::std::result::Result::Ok(())
440 }
441}
442
443#[non_exhaustive]
448#[derive(::std::fmt::Debug)]
449pub enum UpdateObjectEncryptionError {
450 AccessDenied(crate::types::error::AccessDenied),
452 InvalidRequest(crate::types::error::InvalidRequest),
454 NoSuchKey(crate::types::error::NoSuchKey),
456 #[deprecated(note = "Matching `Unhandled` directly is not forwards compatible. Instead, match using a \
458 variable wildcard pattern and check `.code()`:
459 \
460 `err if err.code() == Some(\"SpecificExceptionCode\") => { /* handle the error */ }`
461 \
462 See [`ProvideErrorMetadata`](#impl-ProvideErrorMetadata-for-UpdateObjectEncryptionError) for what information is available for the error.")]
463 Unhandled(crate::error::sealed_unhandled::Unhandled),
464}
465impl UpdateObjectEncryptionError {
466 pub fn unhandled(
468 err: impl ::std::convert::Into<::std::boxed::Box<dyn ::std::error::Error + ::std::marker::Send + ::std::marker::Sync + 'static>>,
469 ) -> Self {
470 Self::Unhandled(crate::error::sealed_unhandled::Unhandled {
471 source: err.into(),
472 meta: ::std::default::Default::default(),
473 })
474 }
475
476 pub fn generic(err: ::aws_smithy_types::error::ErrorMetadata) -> Self {
478 Self::Unhandled(crate::error::sealed_unhandled::Unhandled {
479 source: err.clone().into(),
480 meta: err,
481 })
482 }
483 pub fn meta(&self) -> &::aws_smithy_types::error::ErrorMetadata {
488 match self {
489 Self::AccessDenied(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
490 Self::InvalidRequest(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
491 Self::NoSuchKey(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
492 Self::Unhandled(e) => &e.meta,
493 }
494 }
495 pub fn is_access_denied(&self) -> bool {
497 matches!(self, Self::AccessDenied(_))
498 }
499 pub fn is_invalid_request(&self) -> bool {
501 matches!(self, Self::InvalidRequest(_))
502 }
503 pub fn is_no_such_key(&self) -> bool {
505 matches!(self, Self::NoSuchKey(_))
506 }
507}
508impl ::std::error::Error for UpdateObjectEncryptionError {
509 fn source(&self) -> ::std::option::Option<&(dyn ::std::error::Error + 'static)> {
510 match self {
511 Self::AccessDenied(_inner) => ::std::option::Option::Some(_inner),
512 Self::InvalidRequest(_inner) => ::std::option::Option::Some(_inner),
513 Self::NoSuchKey(_inner) => ::std::option::Option::Some(_inner),
514 Self::Unhandled(_inner) => ::std::option::Option::Some(&*_inner.source),
515 }
516 }
517}
518impl ::std::fmt::Display for UpdateObjectEncryptionError {
519 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
520 match self {
521 Self::AccessDenied(_inner) => _inner.fmt(f),
522 Self::InvalidRequest(_inner) => _inner.fmt(f),
523 Self::NoSuchKey(_inner) => _inner.fmt(f),
524 Self::Unhandled(_inner) => {
525 if let ::std::option::Option::Some(code) = ::aws_smithy_types::error::metadata::ProvideErrorMetadata::code(self) {
526 write!(f, "unhandled error ({code})")
527 } else {
528 f.write_str("unhandled error")
529 }
530 }
531 }
532 }
533}
534impl ::aws_smithy_types::retry::ProvideErrorKind for UpdateObjectEncryptionError {
535 fn code(&self) -> ::std::option::Option<&str> {
536 ::aws_smithy_types::error::metadata::ProvideErrorMetadata::code(self)
537 }
538 fn retryable_error_kind(&self) -> ::std::option::Option<::aws_smithy_types::retry::ErrorKind> {
539 ::std::option::Option::None
540 }
541}
542impl ::aws_smithy_types::error::metadata::ProvideErrorMetadata for UpdateObjectEncryptionError {
543 fn meta(&self) -> &::aws_smithy_types::error::ErrorMetadata {
544 match self {
545 Self::AccessDenied(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
546 Self::InvalidRequest(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
547 Self::NoSuchKey(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
548 Self::Unhandled(_inner) => &_inner.meta,
549 }
550 }
551}
552impl ::aws_smithy_runtime_api::client::result::CreateUnhandledError for UpdateObjectEncryptionError {
553 fn create_unhandled_error(
554 source: ::std::boxed::Box<dyn ::std::error::Error + ::std::marker::Send + ::std::marker::Sync + 'static>,
555 meta: ::std::option::Option<::aws_smithy_types::error::ErrorMetadata>,
556 ) -> Self {
557 Self::Unhandled(crate::error::sealed_unhandled::Unhandled {
558 source,
559 meta: meta.unwrap_or_default(),
560 })
561 }
562}
563impl crate::s3_request_id::RequestIdExt for crate::operation::update_object_encryption::UpdateObjectEncryptionError {
564 fn extended_request_id(&self) -> Option<&str> {
565 self.meta().extended_request_id()
566 }
567}
568impl ::aws_types::request_id::RequestId for crate::operation::update_object_encryption::UpdateObjectEncryptionError {
569 fn request_id(&self) -> Option<&str> {
570 self.meta().request_id()
571 }
572}
573
574pub use crate::operation::update_object_encryption::_update_object_encryption_input::UpdateObjectEncryptionInput;
575
576pub use crate::operation::update_object_encryption::_update_object_encryption_output::UpdateObjectEncryptionOutput;
577
578mod _update_object_encryption_input;
579
580mod _update_object_encryption_output;
581
582pub mod builders;