Skip to main content

aws_sdk_glue/operation/
create_table.rs

1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2/// Orchestration and serialization glue logic for `CreateTable`.
3#[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
4#[non_exhaustive]
5pub struct CreateTable;
6impl CreateTable {
7    /// Creates a new `CreateTable`
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<'static> = crate::operation::create_table::CreateTableInput::SCHEMA;
13    /// The schema for this operation's output shape.
14    pub const OUTPUT_SCHEMA: &'static ::aws_smithy_schema::Schema<'static> = crate::operation::create_table::CreateTableOutput::SCHEMA;
15    pub(crate) async fn orchestrate(
16        runtime_plugins: &::aws_smithy_runtime_api::client::runtime_plugin::RuntimePlugins,
17        input: crate::operation::create_table::CreateTableInput,
18    ) -> ::std::result::Result<
19        crate::operation::create_table::CreateTableOutput,
20        ::aws_smithy_runtime_api::client::result::SdkError<
21            crate::operation::create_table::CreateTableError,
22            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
23        >,
24    > {
25        let map_err = |err: ::aws_smithy_runtime_api::client::result::SdkError<
26            ::aws_smithy_runtime_api::client::interceptors::context::Error,
27            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
28        >| {
29            err.map_service_error(|err| {
30                err.downcast::<crate::operation::create_table::CreateTableError>()
31                    .expect("correct error type")
32            })
33        };
34        let context = Self::orchestrate_with_stop_point(runtime_plugins, input, ::aws_smithy_runtime::client::orchestrator::StopPoint::None)
35            .await
36            .map_err(map_err)?;
37        let output = context.finalize().map_err(map_err)?;
38        ::std::result::Result::Ok(
39            output
40                .downcast::<crate::operation::create_table::CreateTableOutput>()
41                .expect("correct output type"),
42        )
43    }
44
45    pub(crate) async fn orchestrate_with_stop_point(
46        runtime_plugins: &::aws_smithy_runtime_api::client::runtime_plugin::RuntimePlugins,
47        input: crate::operation::create_table::CreateTableInput,
48        stop_point: ::aws_smithy_runtime::client::orchestrator::StopPoint,
49    ) -> ::std::result::Result<
50        ::aws_smithy_runtime_api::client::interceptors::context::InterceptorContext,
51        ::aws_smithy_runtime_api::client::result::SdkError<
52            ::aws_smithy_runtime_api::client::interceptors::context::Error,
53            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
54        >,
55    > {
56        let input = ::aws_smithy_runtime_api::client::interceptors::context::Input::erase(input);
57        use ::tracing::Instrument;
58        ::aws_smithy_runtime::client::orchestrator::invoke_with_stop_point("Glue", "CreateTable", input, runtime_plugins, stop_point)
59            // Create a parent span for the entire operation. Includes a random, internal-only,
60            // seven-digit ID for the operation orchestration so that it can be correlated in the logs.
61            .instrument(::tracing::debug_span!(
62                "Glue.CreateTable",
63                "rpc.service" = "Glue",
64                "rpc.method" = "CreateTable",
65                "sdk_invocation_id" = ::fastrand::u32(1_000_000..10_000_000),
66                "rpc.system" = "aws-api",
67            ))
68            .await
69    }
70
71    pub(crate) fn operation_runtime_plugins(
72        client_runtime_plugins: ::aws_smithy_runtime_api::client::runtime_plugin::RuntimePlugins,
73        client_config: &crate::config::Config,
74        config_override: ::std::option::Option<crate::config::Builder>,
75    ) -> ::aws_smithy_runtime_api::client::runtime_plugin::RuntimePlugins {
76        let mut runtime_plugins = client_runtime_plugins.with_operation_plugin(Self::new());
77
78        if let ::std::option::Option::Some(config_override) = config_override {
79            for plugin in config_override.runtime_plugins.iter().cloned() {
80                runtime_plugins = runtime_plugins.with_operation_plugin(plugin);
81            }
82            runtime_plugins = runtime_plugins.with_operation_plugin(crate::config::ConfigOverrideRuntimePlugin::new(
83                config_override,
84                client_config.config.clone(),
85                &client_config.runtime_components,
86            ));
87        }
88        runtime_plugins
89    }
90}
91/// Per-operation error registry. Contains an entry for every modeled
92/// error this operation can throw.
93///
94/// Used by the schema-serde error path as the operation-scoped lookup
95/// for registry-backed error reification: an error code that does not
96/// match one of the operation's modeled errors directly is resolved
97/// against this registry first, then widened to the service-wide error
98/// registry.
99pub(crate) mod error_registry {
100    pub(crate) static REGISTRY: ::std::sync::LazyLock<::aws_smithy_schema::registry::TypeRegistry> = ::std::sync::LazyLock::new(|| {
101        ::aws_smithy_schema::registry::TypeRegistry::builder()
102                            .insert_error_shape(
103                        crate::types::error::AlreadyExistsException::SCHEMA,
104                        |d: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer| -> ::std::result::Result<::aws_smithy_types::type_erasure::TypeErasedBox, ::aws_smithy_schema::serde::SerdeError> {
105                            ::std::result::Result::Ok(::aws_smithy_types::type_erasure::TypeErasedBox::new(crate::types::error::AlreadyExistsException::deserialize(d)?))
106                        },
107                        |d: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer| -> ::std::result::Result<::std::boxed::Box<dyn ::std::error::Error + ::std::marker::Send + ::std::marker::Sync>, ::aws_smithy_schema::serde::SerdeError> {
108                            ::std::result::Result::Ok(::std::boxed::Box::new(crate::types::error::AlreadyExistsException::deserialize(d)?))
109                        },
110                    )
111.insert_error_shape(
112                        crate::types::error::ConcurrentModificationException::SCHEMA,
113                        |d: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer| -> ::std::result::Result<::aws_smithy_types::type_erasure::TypeErasedBox, ::aws_smithy_schema::serde::SerdeError> {
114                            ::std::result::Result::Ok(::aws_smithy_types::type_erasure::TypeErasedBox::new(crate::types::error::ConcurrentModificationException::deserialize(d)?))
115                        },
116                        |d: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer| -> ::std::result::Result<::std::boxed::Box<dyn ::std::error::Error + ::std::marker::Send + ::std::marker::Sync>, ::aws_smithy_schema::serde::SerdeError> {
117                            ::std::result::Result::Ok(::std::boxed::Box::new(crate::types::error::ConcurrentModificationException::deserialize(d)?))
118                        },
119                    )
120.insert_error_shape(
121                        crate::types::error::EntityNotFoundException::SCHEMA,
122                        |d: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer| -> ::std::result::Result<::aws_smithy_types::type_erasure::TypeErasedBox, ::aws_smithy_schema::serde::SerdeError> {
123                            ::std::result::Result::Ok(::aws_smithy_types::type_erasure::TypeErasedBox::new(crate::types::error::EntityNotFoundException::deserialize(d)?))
124                        },
125                        |d: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer| -> ::std::result::Result<::std::boxed::Box<dyn ::std::error::Error + ::std::marker::Send + ::std::marker::Sync>, ::aws_smithy_schema::serde::SerdeError> {
126                            ::std::result::Result::Ok(::std::boxed::Box::new(crate::types::error::EntityNotFoundException::deserialize(d)?))
127                        },
128                    )
129.insert_error_shape(
130                        crate::types::error::FederationSourceException::SCHEMA,
131                        |d: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer| -> ::std::result::Result<::aws_smithy_types::type_erasure::TypeErasedBox, ::aws_smithy_schema::serde::SerdeError> {
132                            ::std::result::Result::Ok(::aws_smithy_types::type_erasure::TypeErasedBox::new(crate::types::error::FederationSourceException::deserialize(d)?))
133                        },
134                        |d: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer| -> ::std::result::Result<::std::boxed::Box<dyn ::std::error::Error + ::std::marker::Send + ::std::marker::Sync>, ::aws_smithy_schema::serde::SerdeError> {
135                            ::std::result::Result::Ok(::std::boxed::Box::new(crate::types::error::FederationSourceException::deserialize(d)?))
136                        },
137                    )
138.insert_error_shape(
139                        crate::types::error::FederationSourceRetryableException::SCHEMA,
140                        |d: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer| -> ::std::result::Result<::aws_smithy_types::type_erasure::TypeErasedBox, ::aws_smithy_schema::serde::SerdeError> {
141                            ::std::result::Result::Ok(::aws_smithy_types::type_erasure::TypeErasedBox::new(crate::types::error::FederationSourceRetryableException::deserialize(d)?))
142                        },
143                        |d: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer| -> ::std::result::Result<::std::boxed::Box<dyn ::std::error::Error + ::std::marker::Send + ::std::marker::Sync>, ::aws_smithy_schema::serde::SerdeError> {
144                            ::std::result::Result::Ok(::std::boxed::Box::new(crate::types::error::FederationSourceRetryableException::deserialize(d)?))
145                        },
146                    )
147.insert_error_shape(
148                        crate::types::error::GlueEncryptionException::SCHEMA,
149                        |d: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer| -> ::std::result::Result<::aws_smithy_types::type_erasure::TypeErasedBox, ::aws_smithy_schema::serde::SerdeError> {
150                            ::std::result::Result::Ok(::aws_smithy_types::type_erasure::TypeErasedBox::new(crate::types::error::GlueEncryptionException::deserialize(d)?))
151                        },
152                        |d: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer| -> ::std::result::Result<::std::boxed::Box<dyn ::std::error::Error + ::std::marker::Send + ::std::marker::Sync>, ::aws_smithy_schema::serde::SerdeError> {
153                            ::std::result::Result::Ok(::std::boxed::Box::new(crate::types::error::GlueEncryptionException::deserialize(d)?))
154                        },
155                    )
156.insert_error_shape(
157                        crate::types::error::InternalServiceException::SCHEMA,
158                        |d: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer| -> ::std::result::Result<::aws_smithy_types::type_erasure::TypeErasedBox, ::aws_smithy_schema::serde::SerdeError> {
159                            ::std::result::Result::Ok(::aws_smithy_types::type_erasure::TypeErasedBox::new(crate::types::error::InternalServiceException::deserialize(d)?))
160                        },
161                        |d: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer| -> ::std::result::Result<::std::boxed::Box<dyn ::std::error::Error + ::std::marker::Send + ::std::marker::Sync>, ::aws_smithy_schema::serde::SerdeError> {
162                            ::std::result::Result::Ok(::std::boxed::Box::new(crate::types::error::InternalServiceException::deserialize(d)?))
163                        },
164                    )
165.insert_error_shape(
166                        crate::types::error::InvalidInputException::SCHEMA,
167                        |d: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer| -> ::std::result::Result<::aws_smithy_types::type_erasure::TypeErasedBox, ::aws_smithy_schema::serde::SerdeError> {
168                            ::std::result::Result::Ok(::aws_smithy_types::type_erasure::TypeErasedBox::new(crate::types::error::InvalidInputException::deserialize(d)?))
169                        },
170                        |d: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer| -> ::std::result::Result<::std::boxed::Box<dyn ::std::error::Error + ::std::marker::Send + ::std::marker::Sync>, ::aws_smithy_schema::serde::SerdeError> {
171                            ::std::result::Result::Ok(::std::boxed::Box::new(crate::types::error::InvalidInputException::deserialize(d)?))
172                        },
173                    )
174.insert_error_shape(
175                        crate::types::error::OperationTimeoutException::SCHEMA,
176                        |d: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer| -> ::std::result::Result<::aws_smithy_types::type_erasure::TypeErasedBox, ::aws_smithy_schema::serde::SerdeError> {
177                            ::std::result::Result::Ok(::aws_smithy_types::type_erasure::TypeErasedBox::new(crate::types::error::OperationTimeoutException::deserialize(d)?))
178                        },
179                        |d: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer| -> ::std::result::Result<::std::boxed::Box<dyn ::std::error::Error + ::std::marker::Send + ::std::marker::Sync>, ::aws_smithy_schema::serde::SerdeError> {
180                            ::std::result::Result::Ok(::std::boxed::Box::new(crate::types::error::OperationTimeoutException::deserialize(d)?))
181                        },
182                    )
183.insert_error_shape(
184                        crate::types::error::ResourceNotReadyException::SCHEMA,
185                        |d: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer| -> ::std::result::Result<::aws_smithy_types::type_erasure::TypeErasedBox, ::aws_smithy_schema::serde::SerdeError> {
186                            ::std::result::Result::Ok(::aws_smithy_types::type_erasure::TypeErasedBox::new(crate::types::error::ResourceNotReadyException::deserialize(d)?))
187                        },
188                        |d: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer| -> ::std::result::Result<::std::boxed::Box<dyn ::std::error::Error + ::std::marker::Send + ::std::marker::Sync>, ::aws_smithy_schema::serde::SerdeError> {
189                            ::std::result::Result::Ok(::std::boxed::Box::new(crate::types::error::ResourceNotReadyException::deserialize(d)?))
190                        },
191                    )
192.insert_error_shape(
193                        crate::types::error::ResourceNumberLimitExceededException::SCHEMA,
194                        |d: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer| -> ::std::result::Result<::aws_smithy_types::type_erasure::TypeErasedBox, ::aws_smithy_schema::serde::SerdeError> {
195                            ::std::result::Result::Ok(::aws_smithy_types::type_erasure::TypeErasedBox::new(crate::types::error::ResourceNumberLimitExceededException::deserialize(d)?))
196                        },
197                        |d: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer| -> ::std::result::Result<::std::boxed::Box<dyn ::std::error::Error + ::std::marker::Send + ::std::marker::Sync>, ::aws_smithy_schema::serde::SerdeError> {
198                            ::std::result::Result::Ok(::std::boxed::Box::new(crate::types::error::ResourceNumberLimitExceededException::deserialize(d)?))
199                        },
200                    )
201                            .build()
202    });
203}
204impl ::aws_smithy_runtime_api::client::runtime_plugin::RuntimePlugin for CreateTable {
205    fn config(&self) -> ::std::option::Option<::aws_smithy_types::config_bag::FrozenLayer> {
206        let mut cfg = ::aws_smithy_types::config_bag::Layer::new("CreateTable");
207
208        cfg.store_put(::aws_smithy_runtime_api::client::ser_de::SharedRequestSerializer::new(
209            CreateTableRequestSerializer,
210        ));
211        cfg.store_put(::aws_smithy_runtime_api::client::ser_de::SharedResponseDeserializer::new(
212            CreateTableResponseDeserializer,
213        ));
214
215        cfg.store_put(::aws_smithy_runtime_api::client::auth::AuthSchemeOptionResolverParams::new(
216            crate::config::auth::Params::builder()
217                .operation_name("CreateTable")
218                .build()
219                .expect("required fields set"),
220        ));
221
222        cfg.store_put(::aws_smithy_runtime_api::client::orchestrator::Metadata::new("CreateTable", "Glue"));
223        let mut signing_options = ::aws_runtime::auth::SigningOptions::default();
224        signing_options.double_uri_encode = true;
225        signing_options.content_sha256_header = false;
226        signing_options.normalize_uri_path = true;
227        signing_options.payload_override = None;
228
229        cfg.store_put(::aws_runtime::auth::SigV4OperationSigningConfig {
230            signing_options,
231            ..::std::default::Default::default()
232        });
233
234        ::std::option::Option::Some(cfg.freeze())
235    }
236
237    fn runtime_components(
238        &self,
239        _: &::aws_smithy_runtime_api::client::runtime_components::RuntimeComponentsBuilder,
240    ) -> ::std::borrow::Cow<'_, ::aws_smithy_runtime_api::client::runtime_components::RuntimeComponentsBuilder> {
241        #[allow(unused_mut)]
242        let mut rcb = ::aws_smithy_runtime_api::client::runtime_components::RuntimeComponentsBuilder::new("CreateTable")
243            .with_interceptor(::aws_smithy_runtime_api::client::interceptors::SharedInterceptor::permanent(
244                CreateTableTelemetryInputCaptureInterceptor,
245            ))
246            .with_interceptor(::aws_smithy_runtime_api::client::interceptors::SharedInterceptor::permanent(
247                ::aws_smithy_runtime::client::stalled_stream_protection::StalledStreamProtectionInterceptor::default(),
248            ))
249            .with_interceptor(::aws_smithy_runtime_api::client::interceptors::SharedInterceptor::permanent(
250                CreateTableEndpointParamsInterceptor,
251            ))
252            .with_retry_classifier(::aws_smithy_runtime::client::retries::classifiers::TransientErrorClassifier::<
253                crate::operation::create_table::CreateTableError,
254            >::new())
255            .with_retry_classifier(::aws_smithy_runtime::client::retries::classifiers::ModeledAsRetryableClassifier::<
256                crate::operation::create_table::CreateTableError,
257            >::new())
258            .with_retry_classifier(::aws_runtime::retries::classifiers::AwsErrorCodeClassifier::<
259                crate::operation::create_table::CreateTableError,
260            >::new())
261            .with_retry_classifier(::aws_runtime::service_clock_skew::ServiceClockSkewClassifier::<
262                crate::operation::create_table::CreateTableError,
263            >::new());
264
265        ::std::borrow::Cow::Owned(rcb)
266    }
267}
268
269#[derive(Debug)]
270struct CreateTableTelemetryInputCaptureInterceptor;
271
272#[::aws_smithy_runtime_api::client::interceptors::dyn_dispatch_hint]
273impl ::aws_smithy_runtime_api::client::interceptors::Intercept for CreateTableTelemetryInputCaptureInterceptor {
274    fn name(&self) -> &'static str {
275        "CreateTableTelemetryInputCaptureInterceptor"
276    }
277
278    fn read_before_execution(
279        &self,
280        context: &::aws_smithy_runtime_api::client::interceptors::context::BeforeSerializationInterceptorContextRef<
281            '_,
282            ::aws_smithy_runtime_api::client::interceptors::context::Input,
283            ::aws_smithy_runtime_api::client::interceptors::context::Output,
284            ::aws_smithy_runtime_api::client::interceptors::context::Error,
285        >,
286        cfg: &mut ::aws_smithy_types::config_bag::ConfigBag,
287    ) -> ::std::result::Result<(), ::aws_smithy_runtime_api::box_error::BoxError> {
288        // Nothing to do unless the customer opted in by naming members to record.
289        let ::std::option::Option::Some(requested) = cfg
290            .load::<::aws_smithy_types::telemetry::RequestedTelemetryAttributes>()
291            .filter(|r| !r.is_empty())
292        else {
293            return ::std::result::Result::Ok(());
294        };
295
296        let ::std::option::Option::Some(input) = context.input().downcast_ref::<CreateTableInput>() else {
297            // A mismatched input is not this interceptor's concern; skip quietly.
298            return ::std::result::Result::Ok(());
299        };
300
301        let mut captured = ::aws_smithy_types::telemetry::CapturedTelemetryAttributes::default();
302        if requested.should_capture("CatalogId") {
303            if let ::std::option::Option::Some(value) = input.catalog_id.as_deref() {
304                captured.insert("CatalogId", value);
305            }
306        }
307        if requested.should_capture("DatabaseName") {
308            if let ::std::option::Option::Some(value) = input.database_name.as_deref() {
309                captured.insert("DatabaseName", value);
310            }
311        }
312        if requested.should_capture("Name") {
313            if let ::std::option::Option::Some(value) = input.name.as_deref() {
314                captured.insert("Name", value);
315            }
316        }
317        if requested.should_capture("TransactionId") {
318            if let ::std::option::Option::Some(value) = input.transaction_id.as_deref() {
319                captured.insert("TransactionId", value);
320            }
321        }
322
323        cfg.interceptor_state().store_put(captured);
324        ::std::result::Result::Ok(())
325    }
326}
327#[derive(Debug)]
328struct CreateTableResponseDeserializer;
329impl ::aws_smithy_runtime_api::client::ser_de::DeserializeResponse for CreateTableResponseDeserializer {
330    fn deserialize_nonstreaming_with_config(
331        &self,
332        response: &::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
333        _cfg: &::aws_smithy_types::config_bag::ConfigBag,
334    ) -> ::aws_smithy_runtime_api::client::interceptors::context::OutputOrError {
335        let (success, status) = (response.status().is_success(), response.status().as_u16());
336        // Load body and headers BEFORE BeforeParseResponse so customizations
337        // (e.g., S3's `body_is_error` check that detects errors returned with
338        // HTTP 200) can inspect them. The legacy non-streaming path also
339        // loads `body` before firing this hook.
340        #[allow(unused_variables)]
341        let body = response.body().bytes().expect("body loaded");
342        let headers = response.headers();
343        #[allow(unused_mut)]
344        let mut force_error = false;
345        ::tracing::debug!(request_id = ?::aws_types::request_id::RequestId::request_id(response));
346        if !success && status != 200 || force_error {
347            let protocol = _cfg
348                .load::<::aws_smithy_schema::protocol::SharedClientProtocol>()
349                .expect("a SharedClientProtocol is required");
350            #[allow(unused_mut)]
351            let mut generic_builder = protocol.parse_error_metadata(response, _cfg).map_err(|e| {
352                ::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(::aws_smithy_runtime_api::box_error::BoxError::from(e))
353            })?;
354            generic_builder = ::aws_types::request_id::apply_request_id(generic_builder, headers);
355            let generic = generic_builder.build();
356            let error_code = match generic.code() {
357                ::std::option::Option::Some(code) => code,
358                ::std::option::Option::None => {
359                    return ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(
360                        ::aws_smithy_runtime_api::box_error::BoxError::from(crate::operation::create_table::CreateTableError::unhandled(generic)),
361                    ))
362                }
363            };
364            let _error_message = generic.message().map(|msg| msg.to_owned());
365            let err = match error_code {
366                "AlreadyExistsException" => crate::operation::create_table::CreateTableError::AlreadyExistsException({
367                    let mut deser = protocol.deserialize_error_response(response, _cfg).map_err(|e| {
368                        ::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(::aws_smithy_runtime_api::box_error::BoxError::from(
369                            e,
370                        ))
371                    })?;
372                    let mut tmp = <crate::types::error::builders::AlreadyExistsExceptionBuilder>::default();
373                    tmp.deserialize_members(&mut *deser).map_err(|e| {
374                        ::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(::aws_smithy_runtime_api::box_error::BoxError::from(
375                            e,
376                        ))
377                    })?;
378                    if tmp.message.is_none() {
379                        tmp.message = _error_message;
380                    }
381                    let tmp = tmp.meta(generic);
382                    tmp.build()
383                }),
384                "ConcurrentModificationException" => crate::operation::create_table::CreateTableError::ConcurrentModificationException({
385                    let mut deser = protocol.deserialize_error_response(response, _cfg).map_err(|e| {
386                        ::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(::aws_smithy_runtime_api::box_error::BoxError::from(
387                            e,
388                        ))
389                    })?;
390                    let mut tmp = <crate::types::error::builders::ConcurrentModificationExceptionBuilder>::default();
391                    tmp.deserialize_members(&mut *deser).map_err(|e| {
392                        ::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(::aws_smithy_runtime_api::box_error::BoxError::from(
393                            e,
394                        ))
395                    })?;
396                    if tmp.message.is_none() {
397                        tmp.message = _error_message;
398                    }
399                    let tmp = tmp.meta(generic);
400                    tmp.build()
401                }),
402                "EntityNotFoundException" => crate::operation::create_table::CreateTableError::EntityNotFoundException({
403                    let mut deser = protocol.deserialize_error_response(response, _cfg).map_err(|e| {
404                        ::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(::aws_smithy_runtime_api::box_error::BoxError::from(
405                            e,
406                        ))
407                    })?;
408                    let mut tmp = <crate::types::error::builders::EntityNotFoundExceptionBuilder>::default();
409                    tmp.deserialize_members(&mut *deser).map_err(|e| {
410                        ::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(::aws_smithy_runtime_api::box_error::BoxError::from(
411                            e,
412                        ))
413                    })?;
414                    if tmp.message.is_none() {
415                        tmp.message = _error_message;
416                    }
417                    let tmp = tmp.meta(generic);
418                    tmp.build()
419                }),
420                "FederationSourceException" => crate::operation::create_table::CreateTableError::FederationSourceException({
421                    let mut deser = protocol.deserialize_error_response(response, _cfg).map_err(|e| {
422                        ::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(::aws_smithy_runtime_api::box_error::BoxError::from(
423                            e,
424                        ))
425                    })?;
426                    let mut tmp = <crate::types::error::builders::FederationSourceExceptionBuilder>::default();
427                    tmp.deserialize_members(&mut *deser).map_err(|e| {
428                        ::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(::aws_smithy_runtime_api::box_error::BoxError::from(
429                            e,
430                        ))
431                    })?;
432                    if tmp.message.is_none() {
433                        tmp.message = _error_message;
434                    }
435                    let tmp = tmp.meta(generic);
436                    tmp.build()
437                }),
438                "FederationSourceRetryableException" => crate::operation::create_table::CreateTableError::FederationSourceRetryableException({
439                    let mut deser = protocol.deserialize_error_response(response, _cfg).map_err(|e| {
440                        ::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(::aws_smithy_runtime_api::box_error::BoxError::from(
441                            e,
442                        ))
443                    })?;
444                    let mut tmp = <crate::types::error::builders::FederationSourceRetryableExceptionBuilder>::default();
445                    tmp.deserialize_members(&mut *deser).map_err(|e| {
446                        ::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(::aws_smithy_runtime_api::box_error::BoxError::from(
447                            e,
448                        ))
449                    })?;
450                    if tmp.message.is_none() {
451                        tmp.message = _error_message;
452                    }
453                    let tmp = tmp.meta(generic);
454                    tmp.build()
455                }),
456                "GlueEncryptionException" => crate::operation::create_table::CreateTableError::GlueEncryptionException({
457                    let mut deser = protocol.deserialize_error_response(response, _cfg).map_err(|e| {
458                        ::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(::aws_smithy_runtime_api::box_error::BoxError::from(
459                            e,
460                        ))
461                    })?;
462                    let mut tmp = <crate::types::error::builders::GlueEncryptionExceptionBuilder>::default();
463                    tmp.deserialize_members(&mut *deser).map_err(|e| {
464                        ::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(::aws_smithy_runtime_api::box_error::BoxError::from(
465                            e,
466                        ))
467                    })?;
468                    if tmp.message.is_none() {
469                        tmp.message = _error_message;
470                    }
471                    let tmp = tmp.meta(generic);
472                    tmp.build()
473                }),
474                "InternalServiceException" => crate::operation::create_table::CreateTableError::InternalServiceException({
475                    let mut deser = protocol.deserialize_error_response(response, _cfg).map_err(|e| {
476                        ::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(::aws_smithy_runtime_api::box_error::BoxError::from(
477                            e,
478                        ))
479                    })?;
480                    let mut tmp = <crate::types::error::builders::InternalServiceExceptionBuilder>::default();
481                    tmp.deserialize_members(&mut *deser).map_err(|e| {
482                        ::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(::aws_smithy_runtime_api::box_error::BoxError::from(
483                            e,
484                        ))
485                    })?;
486                    if tmp.message.is_none() {
487                        tmp.message = _error_message;
488                    }
489                    let tmp = tmp.meta(generic);
490                    tmp.build()
491                }),
492                "InvalidInputException" => crate::operation::create_table::CreateTableError::InvalidInputException({
493                    let mut deser = protocol.deserialize_error_response(response, _cfg).map_err(|e| {
494                        ::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(::aws_smithy_runtime_api::box_error::BoxError::from(
495                            e,
496                        ))
497                    })?;
498                    let mut tmp = <crate::types::error::builders::InvalidInputExceptionBuilder>::default();
499                    tmp.deserialize_members(&mut *deser).map_err(|e| {
500                        ::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(::aws_smithy_runtime_api::box_error::BoxError::from(
501                            e,
502                        ))
503                    })?;
504                    if tmp.message.is_none() {
505                        tmp.message = _error_message;
506                    }
507                    let tmp = tmp.meta(generic);
508                    tmp.build()
509                }),
510                "OperationTimeoutException" => crate::operation::create_table::CreateTableError::OperationTimeoutException({
511                    let mut deser = protocol.deserialize_error_response(response, _cfg).map_err(|e| {
512                        ::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(::aws_smithy_runtime_api::box_error::BoxError::from(
513                            e,
514                        ))
515                    })?;
516                    let mut tmp = <crate::types::error::builders::OperationTimeoutExceptionBuilder>::default();
517                    tmp.deserialize_members(&mut *deser).map_err(|e| {
518                        ::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(::aws_smithy_runtime_api::box_error::BoxError::from(
519                            e,
520                        ))
521                    })?;
522                    if tmp.message.is_none() {
523                        tmp.message = _error_message;
524                    }
525                    let tmp = tmp.meta(generic);
526                    tmp.build()
527                }),
528                "ResourceNotReadyException" => crate::operation::create_table::CreateTableError::ResourceNotReadyException({
529                    let mut deser = protocol.deserialize_error_response(response, _cfg).map_err(|e| {
530                        ::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(::aws_smithy_runtime_api::box_error::BoxError::from(
531                            e,
532                        ))
533                    })?;
534                    let mut tmp = <crate::types::error::builders::ResourceNotReadyExceptionBuilder>::default();
535                    tmp.deserialize_members(&mut *deser).map_err(|e| {
536                        ::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(::aws_smithy_runtime_api::box_error::BoxError::from(
537                            e,
538                        ))
539                    })?;
540                    if tmp.message.is_none() {
541                        tmp.message = _error_message;
542                    }
543                    let tmp = tmp.meta(generic);
544                    tmp.build()
545                }),
546                "ResourceNumberLimitExceededException" => crate::operation::create_table::CreateTableError::ResourceNumberLimitExceededException({
547                    let mut deser = protocol.deserialize_error_response(response, _cfg).map_err(|e| {
548                        ::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(::aws_smithy_runtime_api::box_error::BoxError::from(
549                            e,
550                        ))
551                    })?;
552                    let mut tmp = <crate::types::error::builders::ResourceNumberLimitExceededExceptionBuilder>::default();
553                    tmp.deserialize_members(&mut *deser).map_err(|e| {
554                        ::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(::aws_smithy_runtime_api::box_error::BoxError::from(
555                            e,
556                        ))
557                    })?;
558                    if tmp.message.is_none() {
559                        tmp.message = _error_message;
560                    }
561                    let tmp = tmp.meta(generic);
562                    tmp.build()
563                }),
564                _ => {
565                    // Registry-backed, operation-scoped reification of an error whose
566                    // code this operation does not model directly: the operation's own
567                    // error registry is consulted first, then the lookup widens to the
568                    // service-wide error registry. On a hit, the reified error is attached
569                    // as the source of the returned unhandled error while its metadata
570                    // (code, message, request id) is preserved; on a miss the generic
571                    // error is returned unchanged.
572                    match protocol
573                        .deserialize_error_response(response, _cfg)
574                        .ok()
575                        .and_then(|mut deser| {
576                            ::aws_smithy_schema::registry::reify_error(
577                                crate::operation::create_table::error_registry::REGISTRY
578                                    .or(&crate::error_type_registry::REGISTRY),
579                                error_code,
580                                &mut *deser,
581                            )
582                        }) {
583                        ::std::option::Option::Some(source) => <crate::operation::create_table::CreateTableError as ::aws_smithy_runtime_api::client::result::CreateUnhandledError>::create_unhandled_error(source, ::std::option::Option::Some(generic)),
584                        ::std::option::Option::None => crate::operation::create_table::CreateTableError::generic(generic),
585                    }
586                }
587            };
588            ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::operation(
589                ::aws_smithy_runtime_api::client::interceptors::context::Error::erase(err),
590            ))
591        } else {
592            let protocol = _cfg
593                .load::<::aws_smithy_schema::protocol::SharedClientProtocol>()
594                .expect("a SharedClientProtocol is required");
595            let mut deser = protocol.deserialize_response(response, CreateTable::OUTPUT_SCHEMA, _cfg).map_err(|e| {
596                ::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(::aws_smithy_runtime_api::box_error::BoxError::from(e))
597            })?;
598            // `headers` is already in scope from the top of the function; alias it as
599            // `_response_headers` so MutateOutput customizations have a stable name to
600            // read from.
601            let _response_headers = headers;
602            // `mut` is required because `deserialize_members` and the `MutateOutput`
603            // builder setters take `&mut self`. Marked `allow(unused_mut)` because an
604            // empty output has no members and no customizations to run.
605            #[allow(unused_mut)]
606            let mut output = <crate::operation::create_table::builders::CreateTableOutputBuilder>::default();
607            output.deserialize_members(&mut *deser).map_err(|e| {
608                ::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(::aws_smithy_runtime_api::box_error::BoxError::from(e))
609            })?;
610            output._set_request_id(::aws_types::request_id::RequestId::request_id(_response_headers).map(str::to_string));
611            let output = output.build();
612            ::std::result::Result::Ok(::aws_smithy_runtime_api::client::interceptors::context::Output::erase(output))
613        }
614    }
615}
616#[derive(Debug)]
617struct CreateTableRequestSerializer;
618impl ::aws_smithy_runtime_api::client::ser_de::SerializeRequest for CreateTableRequestSerializer {
619    #[allow(unused_mut, clippy::let_and_return, clippy::needless_borrow, clippy::useless_conversion)]
620    fn serialize_input(
621        &self,
622        input: ::aws_smithy_runtime_api::client::interceptors::context::Input,
623        _cfg: &mut ::aws_smithy_types::config_bag::ConfigBag,
624    ) -> ::std::result::Result<::aws_smithy_runtime_api::client::orchestrator::HttpRequest, ::aws_smithy_runtime_api::box_error::BoxError> {
625        let input = input
626            .downcast::<crate::operation::create_table::CreateTableInput>()
627            .expect("correct type");
628
629        let protocol = _cfg
630            .load::<::aws_smithy_schema::protocol::SharedClientProtocol>()
631            .expect("a SharedClientProtocol is required");
632        let mut request = protocol
633            .serialize_request(&input, CreateTable::INPUT_SCHEMA, "/", _cfg)
634            .map_err(::aws_smithy_runtime_api::box_error::BoxError::from)?;
635
636        return ::std::result::Result::Ok(request);
637    }
638}
639#[derive(Debug)]
640struct CreateTableEndpointParamsInterceptor;
641
642#[::aws_smithy_runtime_api::client::interceptors::dyn_dispatch_hint]
643impl ::aws_smithy_runtime_api::client::interceptors::Intercept for CreateTableEndpointParamsInterceptor {
644    fn name(&self) -> &'static str {
645        "CreateTableEndpointParamsInterceptor"
646    }
647
648    fn read_before_execution(
649        &self,
650        context: &::aws_smithy_runtime_api::client::interceptors::context::BeforeSerializationInterceptorContextRef<
651            '_,
652            ::aws_smithy_runtime_api::client::interceptors::context::Input,
653            ::aws_smithy_runtime_api::client::interceptors::context::Output,
654            ::aws_smithy_runtime_api::client::interceptors::context::Error,
655        >,
656        cfg: &mut ::aws_smithy_types::config_bag::ConfigBag,
657    ) -> ::std::result::Result<(), ::aws_smithy_runtime_api::box_error::BoxError> {
658        let _input = context
659            .input()
660            .downcast_ref::<CreateTableInput>()
661            .ok_or("failed to downcast to CreateTableInput")?;
662
663        let params = crate::config::endpoint::Params::builder()
664            .set_region(cfg.load::<::aws_types::region::Region>().map(|r| r.as_ref().to_owned()))
665            .set_use_dual_stack(cfg.load::<::aws_types::endpoint_config::UseDualStack>().map(|ty| ty.0))
666            .set_use_fips(cfg.load::<::aws_types::endpoint_config::UseFips>().map(|ty| ty.0))
667            .set_endpoint(cfg.load::<::aws_types::endpoint_config::EndpointUrl>().map(|ty| ty.0.clone()))
668            .build()
669            .map_err(|err| {
670                ::aws_smithy_runtime_api::client::interceptors::error::ContextAttachedError::new("endpoint params could not be built", err)
671            })?;
672        cfg.interceptor_state()
673            .store_put(::aws_smithy_runtime_api::client::endpoint::EndpointResolverParams::new(params));
674        ::std::result::Result::Ok(())
675    }
676}
677
678// The get_* functions below are generated from JMESPath expressions in the
679// operationContextParams trait. They target the operation's input shape.
680
681/// Error type for the `CreateTableError` operation.
682#[non_exhaustive]
683#[derive(::std::fmt::Debug)]
684pub enum CreateTableError {
685    /// <p>A resource to be created or added already exists.</p>
686    AlreadyExistsException(crate::types::error::AlreadyExistsException),
687    /// <p>Two processes are trying to modify a resource simultaneously.</p>
688    ConcurrentModificationException(crate::types::error::ConcurrentModificationException),
689    /// <p>A specified entity does not exist</p>
690    EntityNotFoundException(crate::types::error::EntityNotFoundException),
691    /// <p>A federation source failed.</p>
692    FederationSourceException(crate::types::error::FederationSourceException),
693    /// <p>A federation source failed, but the operation may be retried.</p>
694    FederationSourceRetryableException(crate::types::error::FederationSourceRetryableException),
695    /// <p>An encryption operation failed.</p>
696    GlueEncryptionException(crate::types::error::GlueEncryptionException),
697    /// <p>An internal service error occurred.</p>
698    InternalServiceException(crate::types::error::InternalServiceException),
699    /// <p>The input provided was not valid.</p>
700    InvalidInputException(crate::types::error::InvalidInputException),
701    /// <p>The operation timed out.</p>
702    OperationTimeoutException(crate::types::error::OperationTimeoutException),
703    /// <p>A resource was not ready for a transaction.</p>
704    ResourceNotReadyException(crate::types::error::ResourceNotReadyException),
705    /// <p>A resource numerical limit was exceeded.</p>
706    ResourceNumberLimitExceededException(crate::types::error::ResourceNumberLimitExceededException),
707    /// An unexpected error occurred (e.g., invalid JSON returned by the service or an unknown error code).
708    #[deprecated(note = "Matching `Unhandled` directly is not forwards compatible. Instead, match using a \
709    variable wildcard pattern and check `.code()`:
710     \
711    &nbsp;&nbsp;&nbsp;`err if err.code() == Some(\"SpecificExceptionCode\") => { /* handle the error */ }`
712     \
713    See [`ProvideErrorMetadata`](#impl-ProvideErrorMetadata-for-CreateTableError) for what information is available for the error.")]
714    Unhandled(crate::error::sealed_unhandled::Unhandled),
715}
716impl CreateTableError {
717    /// Creates the `CreateTableError::Unhandled` variant from any error type.
718    pub fn unhandled(
719        err: impl ::std::convert::Into<::std::boxed::Box<dyn ::std::error::Error + ::std::marker::Send + ::std::marker::Sync + 'static>>,
720    ) -> Self {
721        Self::Unhandled(crate::error::sealed_unhandled::Unhandled {
722            source: err.into(),
723            meta: ::std::default::Default::default(),
724        })
725    }
726
727    /// Creates the `CreateTableError::Unhandled` variant from an [`ErrorMetadata`](::aws_smithy_types::error::ErrorMetadata).
728    pub fn generic(err: ::aws_smithy_types::error::ErrorMetadata) -> Self {
729        Self::Unhandled(crate::error::sealed_unhandled::Unhandled {
730            source: err.clone().into(),
731            meta: err,
732        })
733    }
734    ///
735    /// Returns error metadata, which includes the error code, message,
736    /// request ID, and potentially additional information.
737    ///
738    pub fn meta(&self) -> &::aws_smithy_types::error::ErrorMetadata {
739        match self {
740            Self::AlreadyExistsException(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
741            Self::ConcurrentModificationException(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
742            Self::EntityNotFoundException(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
743            Self::FederationSourceException(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
744            Self::FederationSourceRetryableException(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
745            Self::GlueEncryptionException(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
746            Self::InternalServiceException(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
747            Self::InvalidInputException(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
748            Self::OperationTimeoutException(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
749            Self::ResourceNotReadyException(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
750            Self::ResourceNumberLimitExceededException(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
751            Self::Unhandled(e) => &e.meta,
752        }
753    }
754    /// Returns `true` if the error kind is `CreateTableError::AlreadyExistsException`.
755    pub fn is_already_exists_exception(&self) -> bool {
756        matches!(self, Self::AlreadyExistsException(_))
757    }
758    /// Returns `true` if the error kind is `CreateTableError::ConcurrentModificationException`.
759    pub fn is_concurrent_modification_exception(&self) -> bool {
760        matches!(self, Self::ConcurrentModificationException(_))
761    }
762    /// Returns `true` if the error kind is `CreateTableError::EntityNotFoundException`.
763    pub fn is_entity_not_found_exception(&self) -> bool {
764        matches!(self, Self::EntityNotFoundException(_))
765    }
766    /// Returns `true` if the error kind is `CreateTableError::FederationSourceException`.
767    pub fn is_federation_source_exception(&self) -> bool {
768        matches!(self, Self::FederationSourceException(_))
769    }
770    /// Returns `true` if the error kind is `CreateTableError::FederationSourceRetryableException`.
771    pub fn is_federation_source_retryable_exception(&self) -> bool {
772        matches!(self, Self::FederationSourceRetryableException(_))
773    }
774    /// Returns `true` if the error kind is `CreateTableError::GlueEncryptionException`.
775    pub fn is_glue_encryption_exception(&self) -> bool {
776        matches!(self, Self::GlueEncryptionException(_))
777    }
778    /// Returns `true` if the error kind is `CreateTableError::InternalServiceException`.
779    pub fn is_internal_service_exception(&self) -> bool {
780        matches!(self, Self::InternalServiceException(_))
781    }
782    /// Returns `true` if the error kind is `CreateTableError::InvalidInputException`.
783    pub fn is_invalid_input_exception(&self) -> bool {
784        matches!(self, Self::InvalidInputException(_))
785    }
786    /// Returns `true` if the error kind is `CreateTableError::OperationTimeoutException`.
787    pub fn is_operation_timeout_exception(&self) -> bool {
788        matches!(self, Self::OperationTimeoutException(_))
789    }
790    /// Returns `true` if the error kind is `CreateTableError::ResourceNotReadyException`.
791    pub fn is_resource_not_ready_exception(&self) -> bool {
792        matches!(self, Self::ResourceNotReadyException(_))
793    }
794    /// Returns `true` if the error kind is `CreateTableError::ResourceNumberLimitExceededException`.
795    pub fn is_resource_number_limit_exceeded_exception(&self) -> bool {
796        matches!(self, Self::ResourceNumberLimitExceededException(_))
797    }
798}
799impl ::std::error::Error for CreateTableError {
800    fn source(&self) -> ::std::option::Option<&(dyn ::std::error::Error + 'static)> {
801        match self {
802            Self::AlreadyExistsException(_inner) => ::std::option::Option::Some(_inner),
803            Self::ConcurrentModificationException(_inner) => ::std::option::Option::Some(_inner),
804            Self::EntityNotFoundException(_inner) => ::std::option::Option::Some(_inner),
805            Self::FederationSourceException(_inner) => ::std::option::Option::Some(_inner),
806            Self::FederationSourceRetryableException(_inner) => ::std::option::Option::Some(_inner),
807            Self::GlueEncryptionException(_inner) => ::std::option::Option::Some(_inner),
808            Self::InternalServiceException(_inner) => ::std::option::Option::Some(_inner),
809            Self::InvalidInputException(_inner) => ::std::option::Option::Some(_inner),
810            Self::OperationTimeoutException(_inner) => ::std::option::Option::Some(_inner),
811            Self::ResourceNotReadyException(_inner) => ::std::option::Option::Some(_inner),
812            Self::ResourceNumberLimitExceededException(_inner) => ::std::option::Option::Some(_inner),
813            Self::Unhandled(_inner) => ::std::option::Option::Some(&*_inner.source),
814        }
815    }
816}
817impl ::std::fmt::Display for CreateTableError {
818    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
819        match self {
820            Self::AlreadyExistsException(_inner) => _inner.fmt(f),
821            Self::ConcurrentModificationException(_inner) => _inner.fmt(f),
822            Self::EntityNotFoundException(_inner) => _inner.fmt(f),
823            Self::FederationSourceException(_inner) => _inner.fmt(f),
824            Self::FederationSourceRetryableException(_inner) => _inner.fmt(f),
825            Self::GlueEncryptionException(_inner) => _inner.fmt(f),
826            Self::InternalServiceException(_inner) => _inner.fmt(f),
827            Self::InvalidInputException(_inner) => _inner.fmt(f),
828            Self::OperationTimeoutException(_inner) => _inner.fmt(f),
829            Self::ResourceNotReadyException(_inner) => _inner.fmt(f),
830            Self::ResourceNumberLimitExceededException(_inner) => _inner.fmt(f),
831            Self::Unhandled(_inner) => {
832                if let ::std::option::Option::Some(code) = ::aws_smithy_types::error::metadata::ProvideErrorMetadata::code(self) {
833                    write!(f, "unhandled error ({code})")
834                } else {
835                    f.write_str("unhandled error")
836                }
837            }
838        }
839    }
840}
841impl ::aws_smithy_types::retry::ProvideErrorKind for CreateTableError {
842    fn code(&self) -> ::std::option::Option<&str> {
843        ::aws_smithy_types::error::metadata::ProvideErrorMetadata::code(self)
844    }
845    fn retryable_error_kind(&self) -> ::std::option::Option<::aws_smithy_types::retry::ErrorKind> {
846        ::std::option::Option::None
847    }
848}
849impl ::aws_smithy_types::error::metadata::ProvideErrorMetadata for CreateTableError {
850    fn meta(&self) -> &::aws_smithy_types::error::ErrorMetadata {
851        match self {
852            Self::AlreadyExistsException(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
853            Self::ConcurrentModificationException(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
854            Self::EntityNotFoundException(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
855            Self::FederationSourceException(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
856            Self::FederationSourceRetryableException(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
857            Self::GlueEncryptionException(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
858            Self::InternalServiceException(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
859            Self::InvalidInputException(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
860            Self::OperationTimeoutException(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
861            Self::ResourceNotReadyException(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
862            Self::ResourceNumberLimitExceededException(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
863            Self::Unhandled(_inner) => &_inner.meta,
864        }
865    }
866}
867impl ::aws_smithy_runtime_api::client::result::CreateUnhandledError for CreateTableError {
868    fn create_unhandled_error(
869        source: ::std::boxed::Box<dyn ::std::error::Error + ::std::marker::Send + ::std::marker::Sync + 'static>,
870        meta: ::std::option::Option<::aws_smithy_types::error::ErrorMetadata>,
871    ) -> Self {
872        Self::Unhandled(crate::error::sealed_unhandled::Unhandled {
873            source,
874            meta: meta.unwrap_or_default(),
875        })
876    }
877}
878impl ::aws_types::request_id::RequestId for crate::operation::create_table::CreateTableError {
879    fn request_id(&self) -> Option<&str> {
880        self.meta().request_id()
881    }
882}
883
884pub use crate::operation::create_table::_create_table_input::CreateTableInput;
885
886pub use crate::operation::create_table::_create_table_output::CreateTableOutput;
887
888mod _create_table_input;
889
890mod _create_table_output;
891
892/// Builders
893pub mod builders;