Skip to main content

aws_sdk_s3/operation/
update_bucket_metadata_journal_table_configuration.rs

1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2/// Orchestration and serialization glue logic for `UpdateBucketMetadataJournalTableConfiguration`.
3#[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
4#[non_exhaustive]
5pub struct UpdateBucketMetadataJournalTableConfiguration;
6impl UpdateBucketMetadataJournalTableConfiguration {
7    /// Creates a new `UpdateBucketMetadataJournalTableConfiguration`
8    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_bucket_metadata_journal_table_configuration::UpdateBucketMetadataJournalTableConfigurationInput,
14    ) -> ::std::result::Result<
15        crate::operation::update_bucket_metadata_journal_table_configuration::UpdateBucketMetadataJournalTableConfigurationOutput,
16        ::aws_smithy_runtime_api::client::result::SdkError<
17            crate::operation::update_bucket_metadata_journal_table_configuration::UpdateBucketMetadataJournalTableConfigurationError,
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_bucket_metadata_journal_table_configuration::UpdateBucketMetadataJournalTableConfigurationError>().expect("correct error type")
27                            })
28        };
29        let context = Self::orchestrate_with_stop_point(runtime_plugins, input, ::aws_smithy_runtime::client::orchestrator::StopPoint::None)
30            .await
31            .map_err(map_err)?;
32        let output = context.finalize().map_err(map_err)?;
33        ::std::result::Result::Ok(output.downcast::<crate::operation::update_bucket_metadata_journal_table_configuration::UpdateBucketMetadataJournalTableConfigurationOutput>().expect("correct output type"))
34    }
35
36    pub(crate) async fn orchestrate_with_stop_point(
37        runtime_plugins: &::aws_smithy_runtime_api::client::runtime_plugin::RuntimePlugins,
38        input: crate::operation::update_bucket_metadata_journal_table_configuration::UpdateBucketMetadataJournalTableConfigurationInput,
39        stop_point: ::aws_smithy_runtime::client::orchestrator::StopPoint,
40    ) -> ::std::result::Result<
41        ::aws_smithy_runtime_api::client::interceptors::context::InterceptorContext,
42        ::aws_smithy_runtime_api::client::result::SdkError<
43            ::aws_smithy_runtime_api::client::interceptors::context::Error,
44            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
45        >,
46    > {
47        let input = ::aws_smithy_runtime_api::client::interceptors::context::Input::erase(input);
48        use ::tracing::Instrument;
49        ::aws_smithy_runtime::client::orchestrator::invoke_with_stop_point(
50            "S3",
51            "UpdateBucketMetadataJournalTableConfiguration",
52            input,
53            runtime_plugins,
54            stop_point,
55        )
56        // Create a parent span for the entire operation. Includes a random, internal-only,
57        // seven-digit ID for the operation orchestration so that it can be correlated in the logs.
58        .instrument(::tracing::debug_span!(
59            "S3.UpdateBucketMetadataJournalTableConfiguration",
60            "rpc.service" = "S3",
61            "rpc.method" = "UpdateBucketMetadataJournalTableConfiguration",
62            "sdk_invocation_id" = ::fastrand::u32(1_000_000..10_000_000),
63            "rpc.system" = "aws-api",
64        ))
65        .await
66    }
67
68    pub(crate) fn operation_runtime_plugins(
69        client_runtime_plugins: ::aws_smithy_runtime_api::client::runtime_plugin::RuntimePlugins,
70        client_config: &crate::config::Config,
71        config_override: ::std::option::Option<crate::config::Builder>,
72    ) -> ::aws_smithy_runtime_api::client::runtime_plugin::RuntimePlugins {
73        let mut runtime_plugins = client_runtime_plugins.with_operation_plugin(Self::new());
74
75        if let ::std::option::Option::Some(config_override) = config_override {
76            for plugin in config_override.runtime_plugins.iter().cloned() {
77                runtime_plugins = runtime_plugins.with_operation_plugin(plugin);
78            }
79            runtime_plugins = runtime_plugins.with_operation_plugin(crate::config::ConfigOverrideRuntimePlugin::new(
80                config_override,
81                client_config.config.clone(),
82                &client_config.runtime_components,
83            ));
84        }
85        runtime_plugins
86    }
87}
88impl ::aws_smithy_runtime_api::client::runtime_plugin::RuntimePlugin for UpdateBucketMetadataJournalTableConfiguration {
89    fn config(&self) -> ::std::option::Option<::aws_smithy_types::config_bag::FrozenLayer> {
90        let mut cfg = ::aws_smithy_types::config_bag::Layer::new("UpdateBucketMetadataJournalTableConfiguration");
91
92        cfg.store_put(::aws_smithy_runtime_api::client::ser_de::SharedRequestSerializer::new(
93            UpdateBucketMetadataJournalTableConfigurationRequestSerializer,
94        ));
95        cfg.store_put(::aws_smithy_runtime_api::client::ser_de::SharedResponseDeserializer::new(
96            UpdateBucketMetadataJournalTableConfigurationResponseDeserializer,
97        ));
98
99        cfg.store_put(::aws_smithy_runtime_api::client::auth::AuthSchemeOptionResolverParams::new(
100            crate::config::auth::Params::builder()
101                .operation_name("UpdateBucketMetadataJournalTableConfiguration")
102                .build()
103                .expect("required fields set"),
104        ));
105
106        cfg.store_put(::aws_smithy_runtime_api::client::orchestrator::Metadata::new(
107            "UpdateBucketMetadataJournalTableConfiguration",
108            "S3",
109        ));
110        cfg.store_put(crate::s3_express::checksum::provide_default_checksum_algorithm());
111        let mut signing_options = ::aws_runtime::auth::SigningOptions::default();
112        signing_options.double_uri_encode = false;
113        signing_options.content_sha256_header = true;
114        signing_options.normalize_uri_path = false;
115        signing_options.payload_override = None;
116
117        cfg.store_put(::aws_runtime::auth::SigV4OperationSigningConfig {
118            signing_options,
119            ..::std::default::Default::default()
120        });
121
122        ::std::option::Option::Some(cfg.freeze())
123    }
124
125    fn runtime_components(
126        &self,
127        _: &::aws_smithy_runtime_api::client::runtime_components::RuntimeComponentsBuilder,
128    ) -> ::std::borrow::Cow<'_, ::aws_smithy_runtime_api::client::runtime_components::RuntimeComponentsBuilder> {
129        #[allow(unused_mut)]
130                    let mut rcb = ::aws_smithy_runtime_api::client::runtime_components::RuntimeComponentsBuilder::new("UpdateBucketMetadataJournalTableConfiguration")
131                            .with_interceptor(::aws_smithy_runtime_api::client::interceptors::SharedInterceptor::permanent(UpdateBucketMetadataJournalTableConfigurationTelemetryInputCaptureInterceptor))
132.with_interceptor(::aws_smithy_runtime_api::client::interceptors::SharedInterceptor::permanent(::aws_smithy_runtime::client::stalled_stream_protection::StalledStreamProtectionInterceptor::default()))
133.with_interceptor(::aws_smithy_runtime_api::client::interceptors::SharedInterceptor::permanent(UpdateBucketMetadataJournalTableConfigurationEndpointParamsInterceptor))
134.with_interceptor(::aws_smithy_runtime_api::client::interceptors::SharedInterceptor::permanent(crate::http_request_checksum::RequestChecksumInterceptor::new(
135                                |input: &::aws_smithy_runtime_api::client::interceptors::context::Input| {
136                                    let input: &crate::operation::update_bucket_metadata_journal_table_configuration::UpdateBucketMetadataJournalTableConfigurationInput = input.downcast_ref().expect("correct type");
137                                    let checksum_algorithm = input.checksum_algorithm();
138                                    let checksum_algorithm = checksum_algorithm.map(|algorithm| algorithm.as_str());
139                                    (checksum_algorithm.map(|s| s.to_string()), true)
140                                },
141                                |request: &mut ::aws_smithy_runtime_api::http::Request, cfg: &::aws_smithy_types::config_bag::ConfigBag| {
142                                    // We check if the user has set any of the checksum values manually
143                                    let mut user_set_checksum_value = false;
144                                    let headers_to_check = request.headers().iter().filter_map(|(name, _val)| {
145                                        if name.starts_with("x-amz-checksum-") {
146                                            Some(name)
147                                        } else {
148                                            None
149                                        }
150                                    });
151                                    for algo_header in headers_to_check {
152                                        if request.headers().get(algo_header).is_some() {
153                                            user_set_checksum_value = true;
154                                        }
155                                    }
156
157                                    // We check if the user set the checksum algo manually
158                                    let user_set_checksum_algo = request.headers()
159                                        .get("x-amz-sdk-checksum-algorithm")
160                                        .is_some();
161
162                                    // This value is set by the user on the SdkConfig to indicate their preference
163                                    let request_checksum_calculation = cfg
164                                        .load::<::aws_smithy_types::checksum_config::RequestChecksumCalculation>()
165                                        .unwrap_or(&::aws_smithy_types::checksum_config::RequestChecksumCalculation::WhenSupported);
166
167                                    // From the httpChecksum trait
168                                    let http_checksum_required = true;
169
170                                    let is_presigned_req = cfg.load::<crate::presigning::PresigningMarker>().is_some();
171
172                                    // If the request is presigned we do not set a default.
173                                    // If the RequestChecksumCalculation is WhenSupported and the user has not set a checksum value or algo
174                                    // we set the default. If it is WhenRequired and a checksum is required by the trait and the user has not
175                                    // set a checksum value or algo we also set the default. In all other cases we do nothing.
176                                    match (
177                                        request_checksum_calculation,
178                                        http_checksum_required,
179                                        user_set_checksum_value,
180                                        user_set_checksum_algo,
181                                        is_presigned_req,
182                                    ) {
183                                        (_, _, _, _, true) => {}
184                                        (::aws_smithy_types::checksum_config::RequestChecksumCalculation::WhenSupported, _, false, false, _)
185                                        | (::aws_smithy_types::checksum_config::RequestChecksumCalculation::WhenRequired, true, false, false, _) => {
186                                            request.headers_mut().insert("x-amz-sdk-checksum-algorithm", "CRC32");
187                                        }
188                                        _ => {},
189                                    }
190
191                                    // We return a bool indicating if the user did set the checksum value, if they did
192                                    // we can short circuit and exit the interceptor early.
193                                    Ok(user_set_checksum_value)
194                                }
195                                )))
196                            .with_retry_classifier(::aws_smithy_runtime::client::retries::classifiers::TransientErrorClassifier::<crate::operation::update_bucket_metadata_journal_table_configuration::UpdateBucketMetadataJournalTableConfigurationError>::new())
197.with_retry_classifier(::aws_smithy_runtime::client::retries::classifiers::ModeledAsRetryableClassifier::<crate::operation::update_bucket_metadata_journal_table_configuration::UpdateBucketMetadataJournalTableConfigurationError>::new())
198.with_retry_classifier(::aws_runtime::retries::classifiers::AwsErrorCodeClassifier::<crate::operation::update_bucket_metadata_journal_table_configuration::UpdateBucketMetadataJournalTableConfigurationError>::builder().transient_errors({
199                                            let mut transient_errors: Vec<&'static str> = ::aws_runtime::retries::classifiers::TRANSIENT_ERRORS.into();
200                                            transient_errors.push("InternalError");
201                                            ::std::borrow::Cow::Owned(transient_errors)
202                                            }).build())
203.with_retry_classifier(::aws_runtime::service_clock_skew::ServiceClockSkewClassifier::<crate::operation::update_bucket_metadata_journal_table_configuration::UpdateBucketMetadataJournalTableConfigurationError>::new());
204
205        ::std::borrow::Cow::Owned(rcb)
206    }
207}
208
209#[derive(Debug)]
210struct UpdateBucketMetadataJournalTableConfigurationTelemetryInputCaptureInterceptor;
211
212#[::aws_smithy_runtime_api::client::interceptors::dyn_dispatch_hint]
213impl ::aws_smithy_runtime_api::client::interceptors::Intercept for UpdateBucketMetadataJournalTableConfigurationTelemetryInputCaptureInterceptor {
214    fn name(&self) -> &'static str {
215        "UpdateBucketMetadataJournalTableConfigurationTelemetryInputCaptureInterceptor"
216    }
217
218    fn read_before_execution(
219        &self,
220        context: &::aws_smithy_runtime_api::client::interceptors::context::BeforeSerializationInterceptorContextRef<
221            '_,
222            ::aws_smithy_runtime_api::client::interceptors::context::Input,
223            ::aws_smithy_runtime_api::client::interceptors::context::Output,
224            ::aws_smithy_runtime_api::client::interceptors::context::Error,
225        >,
226        cfg: &mut ::aws_smithy_types::config_bag::ConfigBag,
227    ) -> ::std::result::Result<(), ::aws_smithy_runtime_api::box_error::BoxError> {
228        // Nothing to do unless the customer opted in by naming members to record.
229        let ::std::option::Option::Some(requested) = cfg
230            .load::<::aws_smithy_types::telemetry::RequestedTelemetryAttributes>()
231            .filter(|r| !r.is_empty())
232        else {
233            return ::std::result::Result::Ok(());
234        };
235
236        let ::std::option::Option::Some(input) = context.input().downcast_ref::<UpdateBucketMetadataJournalTableConfigurationInput>() else {
237            // A mismatched input is not this interceptor's concern; skip quietly.
238            return ::std::result::Result::Ok(());
239        };
240
241        let mut captured = ::aws_smithy_types::telemetry::CapturedTelemetryAttributes::default();
242        if requested.should_capture("Bucket") {
243            if let ::std::option::Option::Some(value) = input.bucket.as_deref() {
244                captured.insert("Bucket", value);
245            }
246        }
247        if requested.should_capture("ContentMD5") {
248            if let ::std::option::Option::Some(value) = input.content_md5.as_deref() {
249                captured.insert("ContentMD5", value);
250            }
251        }
252        if requested.should_capture("ExpectedBucketOwner") {
253            if let ::std::option::Option::Some(value) = input.expected_bucket_owner.as_deref() {
254                captured.insert("ExpectedBucketOwner", value);
255            }
256        }
257
258        cfg.interceptor_state().store_put(captured);
259        ::std::result::Result::Ok(())
260    }
261}
262#[derive(Debug)]
263struct UpdateBucketMetadataJournalTableConfigurationResponseDeserializer;
264impl ::aws_smithy_runtime_api::client::ser_de::DeserializeResponse for UpdateBucketMetadataJournalTableConfigurationResponseDeserializer {
265    fn deserialize_nonstreaming_with_config(
266        &self,
267        response: &::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
268        _cfg: &::aws_smithy_types::config_bag::ConfigBag,
269    ) -> ::aws_smithy_runtime_api::client::interceptors::context::OutputOrError {
270        let (success, status) = (response.status().is_success(), response.status().as_u16());
271        let headers = response.headers();
272        let body = response.body().bytes().expect("body loaded");
273        #[allow(unused_mut)]
274        let mut force_error = false;
275        ::tracing::debug!(extended_request_id = ?crate::s3_request_id::RequestIdExt::extended_request_id(response));
276        if matches!(crate::rest_xml_unwrapped_errors::body_is_error(body), Ok(true)) {
277            force_error = true;
278        }
279        ::tracing::debug!(request_id = ?::aws_types::request_id::RequestId::request_id(response));
280        let parse_result = if !success && status != 200 || force_error {
281            crate::protocol_serde::shape_update_bucket_metadata_journal_table_configuration::de_update_bucket_metadata_journal_table_configuration_http_error(status, headers, body, _cfg)
282        } else {
283            crate::protocol_serde::shape_update_bucket_metadata_journal_table_configuration::de_update_bucket_metadata_journal_table_configuration_http_response(status, headers, body, _cfg)
284        };
285        crate::protocol_serde::type_erase_result(parse_result)
286    }
287}
288#[derive(Debug)]
289struct UpdateBucketMetadataJournalTableConfigurationRequestSerializer;
290impl ::aws_smithy_runtime_api::client::ser_de::SerializeRequest for UpdateBucketMetadataJournalTableConfigurationRequestSerializer {
291    #[allow(unused_mut, clippy::let_and_return, clippy::needless_borrow, clippy::useless_conversion)]
292    fn serialize_input(
293        &self,
294        input: ::aws_smithy_runtime_api::client::interceptors::context::Input,
295        _cfg: &mut ::aws_smithy_types::config_bag::ConfigBag,
296    ) -> ::std::result::Result<::aws_smithy_runtime_api::client::orchestrator::HttpRequest, ::aws_smithy_runtime_api::box_error::BoxError> {
297        let input = input
298            .downcast::<crate::operation::update_bucket_metadata_journal_table_configuration::UpdateBucketMetadataJournalTableConfigurationInput>()
299            .expect("correct type");
300        let _header_serialization_settings = _cfg
301            .load::<crate::serialization_settings::HeaderSerializationSettings>()
302            .cloned()
303            .unwrap_or_default();
304        let mut request_builder = {
305            #[allow(clippy::uninlined_format_args)]
306            fn uri_base(
307                _input: &crate::operation::update_bucket_metadata_journal_table_configuration::UpdateBucketMetadataJournalTableConfigurationInput,
308                output: &mut ::std::string::String,
309            ) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> {
310                use ::std::fmt::Write as _;
311                ::std::write!(output, "/").expect("formatting should succeed");
312                ::std::result::Result::Ok(())
313            }
314            fn uri_query(
315                _input: &crate::operation::update_bucket_metadata_journal_table_configuration::UpdateBucketMetadataJournalTableConfigurationInput,
316                mut output: &mut ::std::string::String,
317            ) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> {
318                let mut query = ::aws_smithy_http::query::Writer::new(output);
319                query.push_v("metadataJournalTable");
320                ::std::result::Result::Ok(())
321            }
322            #[allow(clippy::unnecessary_wraps)]
323            fn update_http_builder(
324                input: &crate::operation::update_bucket_metadata_journal_table_configuration::UpdateBucketMetadataJournalTableConfigurationInput,
325                builder: ::http_1x::request::Builder,
326            ) -> ::std::result::Result<::http_1x::request::Builder, ::aws_smithy_types::error::operation::BuildError> {
327                let mut uri = ::std::string::String::new();
328                uri_base(input, &mut uri)?;
329                uri_query(input, &mut uri)?;
330                let builder = crate::protocol_serde::shape_update_bucket_metadata_journal_table_configuration::ser_update_bucket_metadata_journal_table_configuration_headers(input, builder)?;
331                ::std::result::Result::Ok(builder.method("PUT").uri(uri))
332            }
333            let mut builder = update_http_builder(&input, ::http_1x::request::Builder::new())?;
334            builder = _header_serialization_settings.set_default_header(builder, ::http_1x::header::CONTENT_TYPE, "application/xml");
335            builder
336        };
337        let body = ::aws_smithy_types::body::SdkBody::from(
338            crate::protocol_serde::shape_update_bucket_metadata_journal_table_configuration_input::ser_journal_table_configuration_http_payload(
339                &input.journal_table_configuration,
340            )?,
341        );
342        if let Some(content_length) = body.content_length() {
343            let content_length = content_length.to_string();
344            request_builder = _header_serialization_settings.set_default_header(request_builder, ::http_1x::header::CONTENT_LENGTH, &content_length);
345        }
346        ::std::result::Result::Ok(request_builder.body(body).expect("valid request").try_into().unwrap())
347    }
348}
349#[derive(Debug)]
350struct UpdateBucketMetadataJournalTableConfigurationEndpointParamsInterceptor;
351
352#[::aws_smithy_runtime_api::client::interceptors::dyn_dispatch_hint]
353impl ::aws_smithy_runtime_api::client::interceptors::Intercept for UpdateBucketMetadataJournalTableConfigurationEndpointParamsInterceptor {
354    fn name(&self) -> &'static str {
355        "UpdateBucketMetadataJournalTableConfigurationEndpointParamsInterceptor"
356    }
357
358    fn read_before_execution(
359        &self,
360        context: &::aws_smithy_runtime_api::client::interceptors::context::BeforeSerializationInterceptorContextRef<
361            '_,
362            ::aws_smithy_runtime_api::client::interceptors::context::Input,
363            ::aws_smithy_runtime_api::client::interceptors::context::Output,
364            ::aws_smithy_runtime_api::client::interceptors::context::Error,
365        >,
366        cfg: &mut ::aws_smithy_types::config_bag::ConfigBag,
367    ) -> ::std::result::Result<(), ::aws_smithy_runtime_api::box_error::BoxError> {
368        let _input = context
369            .input()
370            .downcast_ref::<UpdateBucketMetadataJournalTableConfigurationInput>()
371            .ok_or("failed to downcast to UpdateBucketMetadataJournalTableConfigurationInput")?;
372
373        let params = crate::config::endpoint::Params::builder()
374            .set_region(cfg.load::<::aws_types::region::Region>().map(|r| r.as_ref().to_owned()))
375            .set_use_fips(cfg.load::<::aws_types::endpoint_config::UseFips>().map(|ty| ty.0))
376            .set_use_dual_stack(cfg.load::<::aws_types::endpoint_config::UseDualStack>().map(|ty| ty.0))
377            .set_endpoint(cfg.load::<::aws_types::endpoint_config::EndpointUrl>().map(|ty| ty.0.clone()))
378            .set_force_path_style(cfg.load::<crate::config::ForcePathStyle>().map(|ty| ty.0))
379            .set_use_arn_region(cfg.load::<crate::config::UseArnRegion>().map(|ty| ty.0))
380            .set_disable_multi_region_access_points(cfg.load::<crate::config::DisableMultiRegionAccessPoints>().map(|ty| ty.0))
381            .set_accelerate(cfg.load::<crate::config::Accelerate>().map(|ty| ty.0))
382            .set_disable_s3_express_session_auth(cfg.load::<crate::config::DisableS3ExpressSessionAuth>().map(|ty| ty.0))
383            .set_use_s3_express_control_endpoint(Some(true))
384            .set_bucket(Some(
385                _input
386                    .bucket
387                    .clone()
388                    .filter(|f| !AsRef::<str>::as_ref(f).trim().is_empty())
389                    .ok_or_else(|| ::aws_smithy_types::error::operation::BuildError::missing_field("bucket", "A required field was not set"))?,
390            ))
391            .build()
392            .map_err(|err| {
393                ::aws_smithy_runtime_api::client::interceptors::error::ContextAttachedError::new("endpoint params could not be built", err)
394            })?;
395        cfg.interceptor_state()
396            .store_put(::aws_smithy_runtime_api::client::endpoint::EndpointResolverParams::new(params));
397        ::std::result::Result::Ok(())
398    }
399}
400
401// The get_* functions below are generated from JMESPath expressions in the
402// operationContextParams trait. They target the operation's input shape.
403
404/// Error type for the `UpdateBucketMetadataJournalTableConfigurationError` operation.
405#[non_exhaustive]
406#[derive(::std::fmt::Debug)]
407pub enum UpdateBucketMetadataJournalTableConfigurationError {
408    /// An unexpected error occurred (e.g., invalid JSON returned by the service or an unknown error code).
409    #[deprecated(note = "Matching `Unhandled` directly is not forwards compatible. Instead, match using a \
410    variable wildcard pattern and check `.code()`:
411     \
412    &nbsp;&nbsp;&nbsp;`err if err.code() == Some(\"SpecificExceptionCode\") => { /* handle the error */ }`
413     \
414    See [`ProvideErrorMetadata`](#impl-ProvideErrorMetadata-for-UpdateBucketMetadataJournalTableConfigurationError) for what information is available for the error.")]
415    Unhandled(crate::error::sealed_unhandled::Unhandled),
416}
417impl UpdateBucketMetadataJournalTableConfigurationError {
418    /// Creates the `UpdateBucketMetadataJournalTableConfigurationError::Unhandled` variant from any error type.
419    pub fn unhandled(
420        err: impl ::std::convert::Into<::std::boxed::Box<dyn ::std::error::Error + ::std::marker::Send + ::std::marker::Sync + 'static>>,
421    ) -> Self {
422        Self::Unhandled(crate::error::sealed_unhandled::Unhandled {
423            source: err.into(),
424            meta: ::std::default::Default::default(),
425        })
426    }
427
428    /// Creates the `UpdateBucketMetadataJournalTableConfigurationError::Unhandled` variant from an [`ErrorMetadata`](::aws_smithy_types::error::ErrorMetadata).
429    pub fn generic(err: ::aws_smithy_types::error::ErrorMetadata) -> Self {
430        Self::Unhandled(crate::error::sealed_unhandled::Unhandled {
431            source: err.clone().into(),
432            meta: err,
433        })
434    }
435    ///
436    /// Returns error metadata, which includes the error code, message,
437    /// request ID, and potentially additional information.
438    ///
439    pub fn meta(&self) -> &::aws_smithy_types::error::ErrorMetadata {
440        match self {
441            Self::Unhandled(e) => &e.meta,
442        }
443    }
444}
445impl ::std::error::Error for UpdateBucketMetadataJournalTableConfigurationError {
446    fn source(&self) -> ::std::option::Option<&(dyn ::std::error::Error + 'static)> {
447        match self {
448            Self::Unhandled(_inner) => ::std::option::Option::Some(&*_inner.source),
449        }
450    }
451}
452impl ::std::fmt::Display for UpdateBucketMetadataJournalTableConfigurationError {
453    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
454        match self {
455            Self::Unhandled(_inner) => {
456                if let ::std::option::Option::Some(code) = ::aws_smithy_types::error::metadata::ProvideErrorMetadata::code(self) {
457                    write!(f, "unhandled error ({code})")
458                } else {
459                    f.write_str("unhandled error")
460                }
461            }
462        }
463    }
464}
465impl ::aws_smithy_types::retry::ProvideErrorKind for UpdateBucketMetadataJournalTableConfigurationError {
466    fn code(&self) -> ::std::option::Option<&str> {
467        ::aws_smithy_types::error::metadata::ProvideErrorMetadata::code(self)
468    }
469    fn retryable_error_kind(&self) -> ::std::option::Option<::aws_smithy_types::retry::ErrorKind> {
470        ::std::option::Option::None
471    }
472}
473impl ::aws_smithy_types::error::metadata::ProvideErrorMetadata for UpdateBucketMetadataJournalTableConfigurationError {
474    fn meta(&self) -> &::aws_smithy_types::error::ErrorMetadata {
475        match self {
476            Self::Unhandled(_inner) => &_inner.meta,
477        }
478    }
479}
480impl ::aws_smithy_runtime_api::client::result::CreateUnhandledError for UpdateBucketMetadataJournalTableConfigurationError {
481    fn create_unhandled_error(
482        source: ::std::boxed::Box<dyn ::std::error::Error + ::std::marker::Send + ::std::marker::Sync + 'static>,
483        meta: ::std::option::Option<::aws_smithy_types::error::ErrorMetadata>,
484    ) -> Self {
485        Self::Unhandled(crate::error::sealed_unhandled::Unhandled {
486            source,
487            meta: meta.unwrap_or_default(),
488        })
489    }
490}
491impl crate::s3_request_id::RequestIdExt
492    for crate::operation::update_bucket_metadata_journal_table_configuration::UpdateBucketMetadataJournalTableConfigurationError
493{
494    fn extended_request_id(&self) -> Option<&str> {
495        self.meta().extended_request_id()
496    }
497}
498impl ::aws_types::request_id::RequestId
499    for crate::operation::update_bucket_metadata_journal_table_configuration::UpdateBucketMetadataJournalTableConfigurationError
500{
501    fn request_id(&self) -> Option<&str> {
502        self.meta().request_id()
503    }
504}
505
506pub use crate::operation::update_bucket_metadata_journal_table_configuration::_update_bucket_metadata_journal_table_configuration_input::UpdateBucketMetadataJournalTableConfigurationInput;
507
508pub use crate::operation::update_bucket_metadata_journal_table_configuration::_update_bucket_metadata_journal_table_configuration_output::UpdateBucketMetadataJournalTableConfigurationOutput;
509
510mod _update_bucket_metadata_journal_table_configuration_input;
511
512mod _update_bucket_metadata_journal_table_configuration_output;
513
514/// Builders
515pub mod builders;