aws_sdk_dynamodb/operation/
update_global_table_settings.rs

1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2/// Orchestration and serialization glue logic for `UpdateGlobalTableSettings`.
3#[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
4#[non_exhaustive]
5pub struct UpdateGlobalTableSettings;
6impl UpdateGlobalTableSettings {
7    /// Creates a new `UpdateGlobalTableSettings`
8    pub fn new() -> Self {
9        Self
10    }
11    /// The schema for this operation's input shape.
12                    pub const INPUT_SCHEMA: &'static ::aws_smithy_schema::Schema = crate::operation::update_global_table_settings::UpdateGlobalTableSettingsInput::SCHEMA;
13                    /// The schema for this operation's output shape.
14                    pub const OUTPUT_SCHEMA: &'static ::aws_smithy_schema::Schema = crate::operation::update_global_table_settings::UpdateGlobalTableSettingsOutput::SCHEMA;
15    pub(crate) async fn orchestrate(
16                        runtime_plugins: &::aws_smithy_runtime_api::client::runtime_plugin::RuntimePlugins,
17                        input: crate::operation::update_global_table_settings::UpdateGlobalTableSettingsInput,
18                    ) -> ::std::result::Result<crate::operation::update_global_table_settings::UpdateGlobalTableSettingsOutput, ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::update_global_table_settings::UpdateGlobalTableSettingsError, ::aws_smithy_runtime_api::client::orchestrator::HttpResponse>> {
19                        let map_err = |err: ::aws_smithy_runtime_api::client::result::SdkError<::aws_smithy_runtime_api::client::interceptors::context::Error, ::aws_smithy_runtime_api::client::orchestrator::HttpResponse>| {
20                            err.map_service_error(|err| {
21                                err.downcast::<crate::operation::update_global_table_settings::UpdateGlobalTableSettingsError>().expect("correct error type")
22                            })
23                        };
24                        let context = Self::orchestrate_with_stop_point(runtime_plugins, input, ::aws_smithy_runtime::client::orchestrator::StopPoint::None)
25                            .await
26                            .map_err(map_err)?;
27                        let output = context.finalize().map_err(map_err)?;
28                        ::std::result::Result::Ok(output.downcast::<crate::operation::update_global_table_settings::UpdateGlobalTableSettingsOutput>().expect("correct output type"))
29                    }
30    
31                    pub(crate) async fn orchestrate_with_stop_point(
32                        runtime_plugins: &::aws_smithy_runtime_api::client::runtime_plugin::RuntimePlugins,
33                        input: crate::operation::update_global_table_settings::UpdateGlobalTableSettingsInput,
34                        stop_point: ::aws_smithy_runtime::client::orchestrator::StopPoint,
35                    ) -> ::std::result::Result<::aws_smithy_runtime_api::client::interceptors::context::InterceptorContext, ::aws_smithy_runtime_api::client::result::SdkError<::aws_smithy_runtime_api::client::interceptors::context::Error, ::aws_smithy_runtime_api::client::orchestrator::HttpResponse>> {
36                        let input = ::aws_smithy_runtime_api::client::interceptors::context::Input::erase(input);
37                        use ::tracing::Instrument;
38                        ::aws_smithy_runtime::client::orchestrator::invoke_with_stop_point(
39                            "DynamoDB",
40                            "UpdateGlobalTableSettings",
41                            input,
42                            runtime_plugins,
43                            stop_point
44                        )
45                        // Create a parent span for the entire operation. Includes a random, internal-only,
46                        // seven-digit ID for the operation orchestration so that it can be correlated in the logs.
47                        .instrument(::tracing::debug_span!(
48                                "DynamoDB.UpdateGlobalTableSettings",
49                                "rpc.service" = "DynamoDB",
50                                "rpc.method" = "UpdateGlobalTableSettings",
51                                "sdk_invocation_id" = ::fastrand::u32(1_000_000..10_000_000),
52                                "rpc.system" = "aws-api",
53                            ))
54                        .await
55                    }
56    
57                    pub(crate) fn operation_runtime_plugins(
58                        client_runtime_plugins: ::aws_smithy_runtime_api::client::runtime_plugin::RuntimePlugins,
59                        client_config: &crate::config::Config,
60                        config_override: ::std::option::Option<crate::config::Builder>,
61                    ) -> ::aws_smithy_runtime_api::client::runtime_plugin::RuntimePlugins {
62                        let mut runtime_plugins = client_runtime_plugins.with_operation_plugin(Self::new());
63                        
64                        if let ::std::option::Option::Some(config_override) = config_override {
65                            for plugin in config_override.runtime_plugins.iter().cloned() {
66                                runtime_plugins = runtime_plugins.with_operation_plugin(plugin);
67                            }
68                            runtime_plugins = runtime_plugins.with_operation_plugin(
69                                crate::config::ConfigOverrideRuntimePlugin::new(config_override, client_config.config.clone(), &client_config.runtime_components)
70                            );
71                        }
72                        runtime_plugins
73                    }
74}
75impl ::aws_smithy_runtime_api::client::runtime_plugin::RuntimePlugin for UpdateGlobalTableSettings {
76                fn config(&self) -> ::std::option::Option<::aws_smithy_types::config_bag::FrozenLayer> {
77                    let mut cfg = ::aws_smithy_types::config_bag::Layer::new("UpdateGlobalTableSettings");
78
79                    cfg.store_put(::aws_smithy_runtime_api::client::ser_de::SharedRequestSerializer::new(UpdateGlobalTableSettingsRequestSerializer));
80                    cfg.store_put(::aws_smithy_runtime_api::client::ser_de::SharedResponseDeserializer::new(UpdateGlobalTableSettingsResponseDeserializer));
81
82                    cfg.store_put(::aws_smithy_runtime_api::client::auth::AuthSchemeOptionResolverParams::new(
83                        crate::config::auth::Params::builder()
84                            .operation_name("UpdateGlobalTableSettings")
85                            .build()
86                            .expect("required fields set")
87                    ));
88
89                    cfg.store_put(::aws_smithy_runtime_api::client::orchestrator::Metadata::new(
90                            "UpdateGlobalTableSettings",
91                            "DynamoDB",
92                        ));
93let mut signing_options = ::aws_runtime::auth::SigningOptions::default();
94                            signing_options.double_uri_encode = true;
95                            signing_options.content_sha256_header = false;
96                            signing_options.normalize_uri_path = true;
97                            signing_options.payload_override = None;
98
99                            cfg.store_put(::aws_runtime::auth::SigV4OperationSigningConfig {
100                                signing_options,
101                                ..::std::default::Default::default()
102                            });
103
104                    ::std::option::Option::Some(cfg.freeze())
105                }
106
107                fn runtime_components(&self, _: &::aws_smithy_runtime_api::client::runtime_components::RuntimeComponentsBuilder) -> ::std::borrow::Cow<'_, ::aws_smithy_runtime_api::client::runtime_components::RuntimeComponentsBuilder> {
108                    #[allow(unused_mut)]
109                    let mut rcb = ::aws_smithy_runtime_api::client::runtime_components::RuntimeComponentsBuilder::new("UpdateGlobalTableSettings")
110                            .with_interceptor(::aws_smithy_runtime::client::stalled_stream_protection::StalledStreamProtectionInterceptor::default())
111.with_interceptor(UpdateGlobalTableSettingsEndpointParamsInterceptor)
112                            .with_retry_classifier(::aws_smithy_runtime::client::retries::classifiers::TransientErrorClassifier::<crate::operation::update_global_table_settings::UpdateGlobalTableSettingsError>::new())
113.with_retry_classifier(::aws_smithy_runtime::client::retries::classifiers::ModeledAsRetryableClassifier::<crate::operation::update_global_table_settings::UpdateGlobalTableSettingsError>::new())
114.with_retry_classifier(::aws_runtime::retries::classifiers::AwsErrorCodeClassifier::<crate::operation::update_global_table_settings::UpdateGlobalTableSettingsError>::new());
115
116                    ::std::borrow::Cow::Owned(rcb)
117                }
118            }
119
120            
121#[derive(Debug)]
122            struct UpdateGlobalTableSettingsResponseDeserializer;
123            impl ::aws_smithy_runtime_api::client::ser_de::DeserializeResponse for UpdateGlobalTableSettingsResponseDeserializer {
124                
125
126                fn deserialize_nonstreaming_with_config(&self, response: &::aws_smithy_runtime_api::client::orchestrator::HttpResponse, _cfg: &::aws_smithy_types::config_bag::ConfigBag) -> ::aws_smithy_runtime_api::client::interceptors::context::OutputOrError {
127                    let (success, status) = (response.status().is_success(), response.status().as_u16());
128            #[allow(unused_mut)]
129            let mut force_error = false;
130            ::tracing::debug!(request_id = ?::aws_types::request_id::RequestId::request_id(response));
131            if !success && status != 200 || force_error {
132                let headers = response.headers();
133                let body = response.body().bytes().expect("body loaded");
134#[allow(unused_mut)]
135            let mut generic_builder = crate::protocol_serde::parse_http_error_metadata(status, headers, body)
136                .map_err(|e| ::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(::aws_smithy_runtime_api::box_error::BoxError::from(e)))?;
137            generic_builder = ::aws_types::request_id::apply_request_id(generic_builder, headers);
138            let generic = generic_builder.build();
139let error_code = match generic.code() {
140                    ::std::option::Option::Some(code) => code,
141                    ::std::option::Option::None => return ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(::aws_smithy_runtime_api::box_error::BoxError::from(crate::operation::update_global_table_settings::UpdateGlobalTableSettingsError::unhandled(generic)))),
142                };
143                let _error_message = generic.message().map(|msg| msg.to_owned());
144                let protocol = _cfg.load::<::aws_smithy_schema::protocol::SharedClientProtocol>()
145                    .expect("a SharedClientProtocol is required");
146let err = match error_code {
147"GlobalTableNotFoundException" => crate::operation::update_global_table_settings::UpdateGlobalTableSettingsError::GlobalTableNotFoundException({
148let mut tmp = match protocol.deserialize_response(response, crate::types::error::GlobalTableNotFoundException::SCHEMA, _cfg)
149                        .and_then(|mut deser| crate::types::error::GlobalTableNotFoundException::deserialize_with_response(&mut *deser, response.headers(), response.status().into(), body))
150                    {
151                        ::std::result::Result::Ok(val) => val,
152                        ::std::result::Result::Err(e) => return ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(::aws_smithy_runtime_api::box_error::BoxError::from(e))),
153                    };
154                    tmp.meta = generic;
155if tmp.message.is_none() {
156                                tmp.message = _error_message;
157                            }
158tmp
159}),
160"IndexNotFoundException" => crate::operation::update_global_table_settings::UpdateGlobalTableSettingsError::IndexNotFoundException({
161let mut tmp = match protocol.deserialize_response(response, crate::types::error::IndexNotFoundException::SCHEMA, _cfg)
162                        .and_then(|mut deser| crate::types::error::IndexNotFoundException::deserialize_with_response(&mut *deser, response.headers(), response.status().into(), body))
163                    {
164                        ::std::result::Result::Ok(val) => val,
165                        ::std::result::Result::Err(e) => return ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(::aws_smithy_runtime_api::box_error::BoxError::from(e))),
166                    };
167                    tmp.meta = generic;
168if tmp.message.is_none() {
169                                tmp.message = _error_message;
170                            }
171tmp
172}),
173"InternalServerError" => crate::operation::update_global_table_settings::UpdateGlobalTableSettingsError::InternalServerError({
174let mut tmp = match protocol.deserialize_response(response, crate::types::error::InternalServerError::SCHEMA, _cfg)
175                        .and_then(|mut deser| crate::types::error::InternalServerError::deserialize_with_response(&mut *deser, response.headers(), response.status().into(), body))
176                    {
177                        ::std::result::Result::Ok(val) => val,
178                        ::std::result::Result::Err(e) => return ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(::aws_smithy_runtime_api::box_error::BoxError::from(e))),
179                    };
180                    tmp.meta = generic;
181if tmp.message.is_none() {
182                                tmp.message = _error_message;
183                            }
184tmp
185}),
186"InvalidEndpointException" => crate::operation::update_global_table_settings::UpdateGlobalTableSettingsError::InvalidEndpointException({
187let mut tmp = match protocol.deserialize_response(response, crate::types::error::InvalidEndpointException::SCHEMA, _cfg)
188                        .and_then(|mut deser| crate::types::error::InvalidEndpointException::deserialize_with_response(&mut *deser, response.headers(), response.status().into(), body))
189                    {
190                        ::std::result::Result::Ok(val) => val,
191                        ::std::result::Result::Err(e) => return ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(::aws_smithy_runtime_api::box_error::BoxError::from(e))),
192                    };
193                    tmp.meta = generic;
194if tmp.message.is_none() {
195                                tmp.message = _error_message;
196                            }
197tmp
198}),
199"LimitExceededException" => crate::operation::update_global_table_settings::UpdateGlobalTableSettingsError::LimitExceededException({
200let mut tmp = match protocol.deserialize_response(response, crate::types::error::LimitExceededException::SCHEMA, _cfg)
201                        .and_then(|mut deser| crate::types::error::LimitExceededException::deserialize_with_response(&mut *deser, response.headers(), response.status().into(), body))
202                    {
203                        ::std::result::Result::Ok(val) => val,
204                        ::std::result::Result::Err(e) => return ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(::aws_smithy_runtime_api::box_error::BoxError::from(e))),
205                    };
206                    tmp.meta = generic;
207if tmp.message.is_none() {
208                                tmp.message = _error_message;
209                            }
210tmp
211}),
212"ReplicaNotFoundException" => crate::operation::update_global_table_settings::UpdateGlobalTableSettingsError::ReplicaNotFoundException({
213let mut tmp = match protocol.deserialize_response(response, crate::types::error::ReplicaNotFoundException::SCHEMA, _cfg)
214                        .and_then(|mut deser| crate::types::error::ReplicaNotFoundException::deserialize_with_response(&mut *deser, response.headers(), response.status().into(), body))
215                    {
216                        ::std::result::Result::Ok(val) => val,
217                        ::std::result::Result::Err(e) => return ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(::aws_smithy_runtime_api::box_error::BoxError::from(e))),
218                    };
219                    tmp.meta = generic;
220if tmp.message.is_none() {
221                                tmp.message = _error_message;
222                            }
223tmp
224}),
225"ResourceInUseException" => crate::operation::update_global_table_settings::UpdateGlobalTableSettingsError::ResourceInUseException({
226let mut tmp = match protocol.deserialize_response(response, crate::types::error::ResourceInUseException::SCHEMA, _cfg)
227                        .and_then(|mut deser| crate::types::error::ResourceInUseException::deserialize_with_response(&mut *deser, response.headers(), response.status().into(), body))
228                    {
229                        ::std::result::Result::Ok(val) => val,
230                        ::std::result::Result::Err(e) => return ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(::aws_smithy_runtime_api::box_error::BoxError::from(e))),
231                    };
232                    tmp.meta = generic;
233if tmp.message.is_none() {
234                                tmp.message = _error_message;
235                            }
236tmp
237}),
238_ => crate::operation::update_global_table_settings::UpdateGlobalTableSettingsError::generic(generic)
239};
240                ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::operation(::aws_smithy_runtime_api::client::interceptors::context::Error::erase(err)))
241} else {
242                let protocol = _cfg.load::<::aws_smithy_schema::protocol::SharedClientProtocol>()
243                    .expect("a SharedClientProtocol is required");
244                let mut deser = protocol.deserialize_response(response, UpdateGlobalTableSettings::OUTPUT_SCHEMA, _cfg)
245                    .map_err(|e| ::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(::aws_smithy_runtime_api::box_error::BoxError::from(e)))?;
246                let body = response.body().bytes().expect("body loaded");
247                let output = crate::operation::update_global_table_settings::UpdateGlobalTableSettingsOutput::deserialize_with_response(
248                    &mut *deser,
249                    response.headers(),
250                    response.status().into(),
251                    body,
252                ).map_err(|e| ::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(::aws_smithy_runtime_api::box_error::BoxError::from(e)))?;
253                ::std::result::Result::Ok(::aws_smithy_runtime_api::client::interceptors::context::Output::erase(output))
254            }
255                }
256            }
257#[derive(Debug)]
258            struct UpdateGlobalTableSettingsRequestSerializer;
259            impl ::aws_smithy_runtime_api::client::ser_de::SerializeRequest for UpdateGlobalTableSettingsRequestSerializer {
260                #[allow(unused_mut, clippy::let_and_return, clippy::needless_borrow, clippy::useless_conversion)]
261                fn serialize_input(&self, input: ::aws_smithy_runtime_api::client::interceptors::context::Input, _cfg: &mut ::aws_smithy_types::config_bag::ConfigBag) -> ::std::result::Result<::aws_smithy_runtime_api::client::orchestrator::HttpRequest, ::aws_smithy_runtime_api::box_error::BoxError> {
262                    let input = input.downcast::<crate::operation::update_global_table_settings::UpdateGlobalTableSettingsInput>().expect("correct type");
263                    let protocol = _cfg.load::<::aws_smithy_schema::protocol::SharedClientProtocol>()
264                        .expect("a SharedClientProtocol is required");
265                    let mut request = protocol.serialize_request(
266                            &input, UpdateGlobalTableSettings::INPUT_SCHEMA, "", _cfg,
267                        ).map_err(::aws_smithy_runtime_api::box_error::BoxError::from)?;
268                        
269                        return ::std::result::Result::Ok(request);
270                }
271            }
272#[derive(Debug)]
273            struct UpdateGlobalTableSettingsEndpointParamsInterceptor;
274
275            impl ::aws_smithy_runtime_api::client::interceptors::Intercept for UpdateGlobalTableSettingsEndpointParamsInterceptor {
276                fn name(&self) -> &'static str {
277                    "UpdateGlobalTableSettingsEndpointParamsInterceptor"
278                }
279
280                fn read_before_execution(
281                    &self,
282                    context: &::aws_smithy_runtime_api::client::interceptors::context::BeforeSerializationInterceptorContextRef<'_, ::aws_smithy_runtime_api::client::interceptors::context::Input, ::aws_smithy_runtime_api::client::interceptors::context::Output, ::aws_smithy_runtime_api::client::interceptors::context::Error>,
283                    cfg: &mut ::aws_smithy_types::config_bag::ConfigBag,
284                ) -> ::std::result::Result<(), ::aws_smithy_runtime_api::box_error::BoxError> {
285                    let _input = context.input()
286                        .downcast_ref::<UpdateGlobalTableSettingsInput>()
287                        .ok_or("failed to downcast to UpdateGlobalTableSettingsInput")?;
288
289                    
290
291                    let params = crate::config::endpoint::Params::builder()
292                        .set_region(cfg.load::<::aws_types::region::Region>().map(|r|r.as_ref().to_owned()))
293.set_use_dual_stack(cfg.load::<::aws_types::endpoint_config::UseDualStack>().map(|ty| ty.0))
294.set_use_fips(cfg.load::<::aws_types::endpoint_config::UseFips>().map(|ty| ty.0))
295.set_endpoint(cfg.load::<::aws_types::endpoint_config::EndpointUrl>().map(|ty| ty.0.clone()))
296.set_account_id_endpoint_mode(::std::option::Option::Some(cfg.load::<::aws_types::endpoint_config::AccountIdEndpointMode>().cloned().unwrap_or_default().to_string()))
297.set_resource_arn(Some(_input.global_table_name.clone().filter(|f|!AsRef::<str>::as_ref(f).trim().is_empty()).ok_or_else(||::aws_smithy_types::error::operation::BuildError::missing_field("global_table_name", "A required field was not set"))?))
298                        .build()
299                        .map_err(|err| ::aws_smithy_runtime_api::client::interceptors::error::ContextAttachedError::new("endpoint params could not be built", err))?;
300                    cfg.interceptor_state().store_put(::aws_smithy_runtime_api::client::endpoint::EndpointResolverParams::new(params));
301                    ::std::result::Result::Ok(())
302                }
303            }
304
305            // The get_* functions below are generated from JMESPath expressions in the
306            // operationContextParams trait. They target the operation's input shape.
307
308            
309
310/// Error type for the `UpdateGlobalTableSettingsError` operation.
311#[non_exhaustive]
312#[derive(::std::fmt::Debug)]
313pub enum UpdateGlobalTableSettingsError {
314    /// <p>The specified global table does not exist.</p>
315    GlobalTableNotFoundException(crate::types::error::GlobalTableNotFoundException),
316    /// <p>The operation tried to access a nonexistent index.</p>
317    IndexNotFoundException(crate::types::error::IndexNotFoundException),
318    /// <p>An error occurred on the server side.</p>
319    InternalServerError(crate::types::error::InternalServerError),
320    #[allow(missing_docs)] // documentation missing in model
321    InvalidEndpointException(crate::types::error::InvalidEndpointException),
322    /// <p>There is no limit to the number of daily on-demand backups that can be taken.</p>
323    /// <p>For most purposes, up to 500 simultaneous table operations are allowed per account. These operations include <code>CreateTable</code>, <code>UpdateTable</code>, <code>DeleteTable</code>,<code>UpdateTimeToLive</code>, <code>RestoreTableFromBackup</code>, and <code>RestoreTableToPointInTime</code>.</p>
324    /// <p>When you are creating a table with one or more secondary indexes, you can have up to 250 such requests running at a time. However, if the table or index specifications are complex, then DynamoDB might temporarily reduce the number of concurrent operations.</p>
325    /// <p>When importing into DynamoDB, up to 50 simultaneous import table operations are allowed per account.</p>
326    /// <p>There is a soft account quota of 2,500 tables.</p>
327    /// <p>GetRecords was called with a value of more than 1000 for the limit request parameter.</p>
328    /// <p>More than 2 processes are reading from the same streams shard at the same time. Exceeding this limit may result in request throttling.</p>
329    LimitExceededException(crate::types::error::LimitExceededException),
330    /// <p>The specified replica is no longer part of the global table.</p>
331    ReplicaNotFoundException(crate::types::error::ReplicaNotFoundException),
332    /// <p>The operation conflicts with the resource's availability. For example:</p>
333    /// <ul>
334    /// <li>
335    /// <p>You attempted to recreate an existing table.</p></li>
336    /// <li>
337    /// <p>You tried to delete a table currently in the <code>CREATING</code> state.</p></li>
338    /// <li>
339    /// <p>You tried to update a resource that was already being updated.</p></li>
340    /// </ul>
341    /// <p>When appropriate, wait for the ongoing update to complete and attempt the request again.</p>
342    ResourceInUseException(crate::types::error::ResourceInUseException),
343    /// An unexpected error occurred (e.g., invalid JSON returned by the service or an unknown error code).
344                    #[deprecated(note = "Matching `Unhandled` directly is not forwards compatible. Instead, match using a \
345    variable wildcard pattern and check `.code()`:
346     \
347    &nbsp;&nbsp;&nbsp;`err if err.code() == Some(\"SpecificExceptionCode\") => { /* handle the error */ }`
348     \
349    See [`ProvideErrorMetadata`](#impl-ProvideErrorMetadata-for-UpdateGlobalTableSettingsError) for what information is available for the error.")]
350                    Unhandled(crate::error::sealed_unhandled::Unhandled),
351}
352impl UpdateGlobalTableSettingsError {
353    /// Creates the `UpdateGlobalTableSettingsError::Unhandled` variant from any error type.
354                    pub fn unhandled(err: impl ::std::convert::Into<::std::boxed::Box<dyn ::std::error::Error + ::std::marker::Send + ::std::marker::Sync + 'static>>) -> Self {
355                        Self::Unhandled(crate::error::sealed_unhandled::Unhandled { source: err.into(), meta: ::std::default::Default::default() })
356                    }
357    
358                    /// Creates the `UpdateGlobalTableSettingsError::Unhandled` variant from an [`ErrorMetadata`](::aws_smithy_types::error::ErrorMetadata).
359                    pub fn generic(err: ::aws_smithy_types::error::ErrorMetadata) -> Self {
360                        Self::Unhandled(crate::error::sealed_unhandled::Unhandled { source: err.clone().into(), meta: err })
361                    }
362    /// 
363    /// Returns error metadata, which includes the error code, message,
364    /// request ID, and potentially additional information.
365    /// 
366    pub fn meta(&self) -> &::aws_smithy_types::error::ErrorMetadata {
367        match self {
368            Self::GlobalTableNotFoundException(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
369            Self::IndexNotFoundException(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
370            Self::InternalServerError(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
371            Self::InvalidEndpointException(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
372            Self::LimitExceededException(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
373            Self::ReplicaNotFoundException(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
374            Self::ResourceInUseException(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
375            Self::Unhandled(e) => &e.meta,
376        }
377    }
378    /// Returns `true` if the error kind is `UpdateGlobalTableSettingsError::GlobalTableNotFoundException`.
379    pub fn is_global_table_not_found_exception(&self) -> bool {
380        matches!(self, Self::GlobalTableNotFoundException(_))
381    }
382    /// Returns `true` if the error kind is `UpdateGlobalTableSettingsError::IndexNotFoundException`.
383    pub fn is_index_not_found_exception(&self) -> bool {
384        matches!(self, Self::IndexNotFoundException(_))
385    }
386    /// Returns `true` if the error kind is `UpdateGlobalTableSettingsError::InternalServerError`.
387    pub fn is_internal_server_error(&self) -> bool {
388        matches!(self, Self::InternalServerError(_))
389    }
390    /// Returns `true` if the error kind is `UpdateGlobalTableSettingsError::InvalidEndpointException`.
391    pub fn is_invalid_endpoint_exception(&self) -> bool {
392        matches!(self, Self::InvalidEndpointException(_))
393    }
394    /// Returns `true` if the error kind is `UpdateGlobalTableSettingsError::LimitExceededException`.
395    pub fn is_limit_exceeded_exception(&self) -> bool {
396        matches!(self, Self::LimitExceededException(_))
397    }
398    /// Returns `true` if the error kind is `UpdateGlobalTableSettingsError::ReplicaNotFoundException`.
399    pub fn is_replica_not_found_exception(&self) -> bool {
400        matches!(self, Self::ReplicaNotFoundException(_))
401    }
402    /// Returns `true` if the error kind is `UpdateGlobalTableSettingsError::ResourceInUseException`.
403    pub fn is_resource_in_use_exception(&self) -> bool {
404        matches!(self, Self::ResourceInUseException(_))
405    }
406}
407impl ::std::error::Error for UpdateGlobalTableSettingsError {
408    fn source(&self) -> ::std::option::Option<&(dyn ::std::error::Error + 'static)> {
409        match self {
410            Self::GlobalTableNotFoundException(_inner) =>
411            ::std::option::Option::Some(_inner)
412            ,
413            Self::IndexNotFoundException(_inner) =>
414            ::std::option::Option::Some(_inner)
415            ,
416            Self::InternalServerError(_inner) =>
417            ::std::option::Option::Some(_inner)
418            ,
419            Self::InvalidEndpointException(_inner) =>
420            ::std::option::Option::Some(_inner)
421            ,
422            Self::LimitExceededException(_inner) =>
423            ::std::option::Option::Some(_inner)
424            ,
425            Self::ReplicaNotFoundException(_inner) =>
426            ::std::option::Option::Some(_inner)
427            ,
428            Self::ResourceInUseException(_inner) =>
429            ::std::option::Option::Some(_inner)
430            ,
431            Self::Unhandled(_inner) => {
432                ::std::option::Option::Some(&*_inner.source)
433            }
434        }
435    }
436}
437impl ::std::fmt::Display for UpdateGlobalTableSettingsError {
438    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
439        match self {
440            Self::GlobalTableNotFoundException(_inner) =>
441            _inner.fmt(f)
442            ,
443            Self::IndexNotFoundException(_inner) =>
444            _inner.fmt(f)
445            ,
446            Self::InternalServerError(_inner) =>
447            _inner.fmt(f)
448            ,
449            Self::InvalidEndpointException(_inner) =>
450            _inner.fmt(f)
451            ,
452            Self::LimitExceededException(_inner) =>
453            _inner.fmt(f)
454            ,
455            Self::ReplicaNotFoundException(_inner) =>
456            _inner.fmt(f)
457            ,
458            Self::ResourceInUseException(_inner) =>
459            _inner.fmt(f)
460            ,
461            Self::Unhandled(_inner) => {
462                if let ::std::option::Option::Some(code) = ::aws_smithy_types::error::metadata::ProvideErrorMetadata::code(self) {
463                                                        write!(f, "unhandled error ({code})")
464                                                    } else {
465                                                        f.write_str("unhandled error")
466                                                    }
467            }
468        }
469    }
470}
471impl ::aws_smithy_types::retry::ProvideErrorKind for UpdateGlobalTableSettingsError {
472    fn code(&self) -> ::std::option::Option<&str> {
473        ::aws_smithy_types::error::metadata::ProvideErrorMetadata::code(self)
474    }
475    fn retryable_error_kind(&self) -> ::std::option::Option<::aws_smithy_types::retry::ErrorKind> {
476        ::std::option::Option::None
477    }
478}
479impl ::aws_smithy_types::error::metadata::ProvideErrorMetadata for UpdateGlobalTableSettingsError {
480    fn meta(&self) -> &::aws_smithy_types::error::ErrorMetadata {
481        match self {
482            Self::GlobalTableNotFoundException(_inner) =>
483            ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner)
484            ,
485            Self::IndexNotFoundException(_inner) =>
486            ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner)
487            ,
488            Self::InternalServerError(_inner) =>
489            ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner)
490            ,
491            Self::InvalidEndpointException(_inner) =>
492            ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner)
493            ,
494            Self::LimitExceededException(_inner) =>
495            ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner)
496            ,
497            Self::ReplicaNotFoundException(_inner) =>
498            ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner)
499            ,
500            Self::ResourceInUseException(_inner) =>
501            ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner)
502            ,
503            Self::Unhandled(_inner) => {
504                &_inner.meta
505            }
506        }
507    }
508}
509impl ::aws_smithy_runtime_api::client::result::CreateUnhandledError for UpdateGlobalTableSettingsError {
510    fn create_unhandled_error(
511                        source: ::std::boxed::Box<dyn ::std::error::Error + ::std::marker::Send + ::std::marker::Sync + 'static>,
512                        meta: ::std::option::Option<::aws_smithy_types::error::ErrorMetadata>
513                    ) -> Self {
514        Self::Unhandled(crate::error::sealed_unhandled::Unhandled { source, meta: meta.unwrap_or_default() })
515    }
516}
517impl ::aws_types::request_id::RequestId for crate::operation::update_global_table_settings::UpdateGlobalTableSettingsError {
518                                fn request_id(&self) -> Option<&str> {
519                                    self.meta().request_id()
520                                }
521                            }
522
523pub use crate::operation::update_global_table_settings::_update_global_table_settings_input::UpdateGlobalTableSettingsInput;
524
525pub use crate::operation::update_global_table_settings::_update_global_table_settings_output::UpdateGlobalTableSettingsOutput;
526
527mod _update_global_table_settings_input;
528
529mod _update_global_table_settings_output;
530
531/// Builders
532pub mod builders;
533