Skip to main content

aws_sdk_glue/operation/
create_catalog.rs

1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2/// Orchestration and serialization glue logic for `CreateCatalog`.
3#[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
4#[non_exhaustive]
5pub struct CreateCatalog;
6impl CreateCatalog {
7    /// Creates a new `CreateCatalog`
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_catalog::CreateCatalogInput::SCHEMA;
13    /// The schema for this operation's output shape.
14    pub const OUTPUT_SCHEMA: &'static ::aws_smithy_schema::Schema<'static> = crate::operation::create_catalog::CreateCatalogOutput::SCHEMA;
15    pub(crate) async fn orchestrate(
16        runtime_plugins: &::aws_smithy_runtime_api::client::runtime_plugin::RuntimePlugins,
17        input: crate::operation::create_catalog::CreateCatalogInput,
18    ) -> ::std::result::Result<
19        crate::operation::create_catalog::CreateCatalogOutput,
20        ::aws_smithy_runtime_api::client::result::SdkError<
21            crate::operation::create_catalog::CreateCatalogError,
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_catalog::CreateCatalogError>()
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_catalog::CreateCatalogOutput>()
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_catalog::CreateCatalogInput,
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", "CreateCatalog", 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.CreateCatalog",
63                "rpc.service" = "Glue",
64                "rpc.method" = "CreateCatalog",
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::AccessDeniedException::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::AccessDeniedException::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::AccessDeniedException::deserialize(d)?))
109                        },
110                    )
111.insert_error_shape(
112                        crate::types::error::AlreadyExistsException::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::AlreadyExistsException::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::AlreadyExistsException::deserialize(d)?))
118                        },
119                    )
120.insert_error_shape(
121                        crate::types::error::ConcurrentModificationException::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::ConcurrentModificationException::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::ConcurrentModificationException::deserialize(d)?))
127                        },
128                    )
129.insert_error_shape(
130                        crate::types::error::EntityNotFoundException::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::EntityNotFoundException::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::EntityNotFoundException::deserialize(d)?))
136                        },
137                    )
138.insert_error_shape(
139                        crate::types::error::FederatedResourceAlreadyExistsException::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::FederatedResourceAlreadyExistsException::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::FederatedResourceAlreadyExistsException::deserialize(d)?))
145                        },
146                    )
147.insert_error_shape(
148                        crate::types::error::FederationSourceException::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::FederationSourceException::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::FederationSourceException::deserialize(d)?))
154                        },
155                    )
156.insert_error_shape(
157                        crate::types::error::GlueEncryptionException::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::GlueEncryptionException::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::GlueEncryptionException::deserialize(d)?))
163                        },
164                    )
165.insert_error_shape(
166                        crate::types::error::InternalServiceException::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::InternalServiceException::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::InternalServiceException::deserialize(d)?))
172                        },
173                    )
174.insert_error_shape(
175                        crate::types::error::InvalidInputException::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::InvalidInputException::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::InvalidInputException::deserialize(d)?))
181                        },
182                    )
183.insert_error_shape(
184                        crate::types::error::OperationTimeoutException::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::OperationTimeoutException::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::OperationTimeoutException::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 CreateCatalog {
205    fn config(&self) -> ::std::option::Option<::aws_smithy_types::config_bag::FrozenLayer> {
206        let mut cfg = ::aws_smithy_types::config_bag::Layer::new("CreateCatalog");
207
208        cfg.store_put(::aws_smithy_runtime_api::client::ser_de::SharedRequestSerializer::new(
209            CreateCatalogRequestSerializer,
210        ));
211        cfg.store_put(::aws_smithy_runtime_api::client::ser_de::SharedResponseDeserializer::new(
212            CreateCatalogResponseDeserializer,
213        ));
214
215        cfg.store_put(::aws_smithy_runtime_api::client::auth::AuthSchemeOptionResolverParams::new(
216            crate::config::auth::Params::builder()
217                .operation_name("CreateCatalog")
218                .build()
219                .expect("required fields set"),
220        ));
221
222        cfg.store_put(::aws_smithy_runtime_api::client::orchestrator::Metadata::new("CreateCatalog", "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("CreateCatalog")
243            .with_interceptor(::aws_smithy_runtime_api::client::interceptors::SharedInterceptor::permanent(
244                CreateCatalogTelemetryInputCaptureInterceptor,
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                CreateCatalogEndpointParamsInterceptor,
251            ))
252            .with_retry_classifier(::aws_smithy_runtime::client::retries::classifiers::TransientErrorClassifier::<
253                crate::operation::create_catalog::CreateCatalogError,
254            >::new())
255            .with_retry_classifier(::aws_smithy_runtime::client::retries::classifiers::ModeledAsRetryableClassifier::<
256                crate::operation::create_catalog::CreateCatalogError,
257            >::new())
258            .with_retry_classifier(::aws_runtime::retries::classifiers::AwsErrorCodeClassifier::<
259                crate::operation::create_catalog::CreateCatalogError,
260            >::new())
261            .with_retry_classifier(::aws_runtime::service_clock_skew::ServiceClockSkewClassifier::<
262                crate::operation::create_catalog::CreateCatalogError,
263            >::new());
264
265        ::std::borrow::Cow::Owned(rcb)
266    }
267}
268
269#[derive(Debug)]
270struct CreateCatalogTelemetryInputCaptureInterceptor;
271
272#[::aws_smithy_runtime_api::client::interceptors::dyn_dispatch_hint]
273impl ::aws_smithy_runtime_api::client::interceptors::Intercept for CreateCatalogTelemetryInputCaptureInterceptor {
274    fn name(&self) -> &'static str {
275        "CreateCatalogTelemetryInputCaptureInterceptor"
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::<CreateCatalogInput>() 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("Name") {
303            if let ::std::option::Option::Some(value) = input.name.as_deref() {
304                captured.insert("Name", value);
305            }
306        }
307
308        cfg.interceptor_state().store_put(captured);
309        ::std::result::Result::Ok(())
310    }
311}
312#[derive(Debug)]
313struct CreateCatalogResponseDeserializer;
314impl ::aws_smithy_runtime_api::client::ser_de::DeserializeResponse for CreateCatalogResponseDeserializer {
315    fn deserialize_nonstreaming_with_config(
316        &self,
317        response: &::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
318        _cfg: &::aws_smithy_types::config_bag::ConfigBag,
319    ) -> ::aws_smithy_runtime_api::client::interceptors::context::OutputOrError {
320        let (success, status) = (response.status().is_success(), response.status().as_u16());
321        // Load body and headers BEFORE BeforeParseResponse so customizations
322        // (e.g., S3's `body_is_error` check that detects errors returned with
323        // HTTP 200) can inspect them. The legacy non-streaming path also
324        // loads `body` before firing this hook.
325        #[allow(unused_variables)]
326        let body = response.body().bytes().expect("body loaded");
327        let headers = response.headers();
328        #[allow(unused_mut)]
329        let mut force_error = false;
330        ::tracing::debug!(request_id = ?::aws_types::request_id::RequestId::request_id(response));
331        if !success && status != 200 || force_error {
332            let protocol = _cfg
333                .load::<::aws_smithy_schema::protocol::SharedClientProtocol>()
334                .expect("a SharedClientProtocol is required");
335            #[allow(unused_mut)]
336            let mut generic_builder = protocol.parse_error_metadata(response, _cfg).map_err(|e| {
337                ::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(::aws_smithy_runtime_api::box_error::BoxError::from(e))
338            })?;
339            generic_builder = ::aws_types::request_id::apply_request_id(generic_builder, headers);
340            let generic = generic_builder.build();
341            let error_code = match generic.code() {
342                ::std::option::Option::Some(code) => code,
343                ::std::option::Option::None => {
344                    return ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(
345                        ::aws_smithy_runtime_api::box_error::BoxError::from(crate::operation::create_catalog::CreateCatalogError::unhandled(generic)),
346                    ))
347                }
348            };
349            let _error_message = generic.message().map(|msg| msg.to_owned());
350            let err = match error_code {
351                "AccessDeniedException" => crate::operation::create_catalog::CreateCatalogError::AccessDeniedException({
352                    let mut deser = protocol.deserialize_error_response(response, _cfg).map_err(|e| {
353                        ::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(::aws_smithy_runtime_api::box_error::BoxError::from(
354                            e,
355                        ))
356                    })?;
357                    let mut tmp = <crate::types::error::builders::AccessDeniedExceptionBuilder>::default();
358                    tmp.deserialize_members(&mut *deser).map_err(|e| {
359                        ::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(::aws_smithy_runtime_api::box_error::BoxError::from(
360                            e,
361                        ))
362                    })?;
363                    if tmp.message.is_none() {
364                        tmp.message = _error_message;
365                    }
366                    let tmp = tmp.meta(generic);
367                    tmp.build()
368                }),
369                "AlreadyExistsException" => crate::operation::create_catalog::CreateCatalogError::AlreadyExistsException({
370                    let mut deser = protocol.deserialize_error_response(response, _cfg).map_err(|e| {
371                        ::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(::aws_smithy_runtime_api::box_error::BoxError::from(
372                            e,
373                        ))
374                    })?;
375                    let mut tmp = <crate::types::error::builders::AlreadyExistsExceptionBuilder>::default();
376                    tmp.deserialize_members(&mut *deser).map_err(|e| {
377                        ::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(::aws_smithy_runtime_api::box_error::BoxError::from(
378                            e,
379                        ))
380                    })?;
381                    if tmp.message.is_none() {
382                        tmp.message = _error_message;
383                    }
384                    let tmp = tmp.meta(generic);
385                    tmp.build()
386                }),
387                "ConcurrentModificationException" => crate::operation::create_catalog::CreateCatalogError::ConcurrentModificationException({
388                    let mut deser = protocol.deserialize_error_response(response, _cfg).map_err(|e| {
389                        ::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(::aws_smithy_runtime_api::box_error::BoxError::from(
390                            e,
391                        ))
392                    })?;
393                    let mut tmp = <crate::types::error::builders::ConcurrentModificationExceptionBuilder>::default();
394                    tmp.deserialize_members(&mut *deser).map_err(|e| {
395                        ::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(::aws_smithy_runtime_api::box_error::BoxError::from(
396                            e,
397                        ))
398                    })?;
399                    if tmp.message.is_none() {
400                        tmp.message = _error_message;
401                    }
402                    let tmp = tmp.meta(generic);
403                    tmp.build()
404                }),
405                "EntityNotFoundException" => crate::operation::create_catalog::CreateCatalogError::EntityNotFoundException({
406                    let mut deser = protocol.deserialize_error_response(response, _cfg).map_err(|e| {
407                        ::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(::aws_smithy_runtime_api::box_error::BoxError::from(
408                            e,
409                        ))
410                    })?;
411                    let mut tmp = <crate::types::error::builders::EntityNotFoundExceptionBuilder>::default();
412                    tmp.deserialize_members(&mut *deser).map_err(|e| {
413                        ::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(::aws_smithy_runtime_api::box_error::BoxError::from(
414                            e,
415                        ))
416                    })?;
417                    if tmp.message.is_none() {
418                        tmp.message = _error_message;
419                    }
420                    let tmp = tmp.meta(generic);
421                    tmp.build()
422                }),
423                "FederatedResourceAlreadyExistsException" => {
424                    crate::operation::create_catalog::CreateCatalogError::FederatedResourceAlreadyExistsException({
425                        let mut deser = protocol.deserialize_error_response(response, _cfg).map_err(|e| {
426                            ::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(
427                                ::aws_smithy_runtime_api::box_error::BoxError::from(e),
428                            )
429                        })?;
430                        let mut tmp = <crate::types::error::builders::FederatedResourceAlreadyExistsExceptionBuilder>::default();
431                        tmp.deserialize_members(&mut *deser).map_err(|e| {
432                            ::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(
433                                ::aws_smithy_runtime_api::box_error::BoxError::from(e),
434                            )
435                        })?;
436                        if tmp.message.is_none() {
437                            tmp.message = _error_message;
438                        }
439                        let tmp = tmp.meta(generic);
440                        tmp.build()
441                    })
442                }
443                "FederationSourceException" => crate::operation::create_catalog::CreateCatalogError::FederationSourceException({
444                    let mut deser = protocol.deserialize_error_response(response, _cfg).map_err(|e| {
445                        ::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(::aws_smithy_runtime_api::box_error::BoxError::from(
446                            e,
447                        ))
448                    })?;
449                    let mut tmp = <crate::types::error::builders::FederationSourceExceptionBuilder>::default();
450                    tmp.deserialize_members(&mut *deser).map_err(|e| {
451                        ::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(::aws_smithy_runtime_api::box_error::BoxError::from(
452                            e,
453                        ))
454                    })?;
455                    if tmp.message.is_none() {
456                        tmp.message = _error_message;
457                    }
458                    let tmp = tmp.meta(generic);
459                    tmp.build()
460                }),
461                "GlueEncryptionException" => crate::operation::create_catalog::CreateCatalogError::GlueEncryptionException({
462                    let mut deser = protocol.deserialize_error_response(response, _cfg).map_err(|e| {
463                        ::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(::aws_smithy_runtime_api::box_error::BoxError::from(
464                            e,
465                        ))
466                    })?;
467                    let mut tmp = <crate::types::error::builders::GlueEncryptionExceptionBuilder>::default();
468                    tmp.deserialize_members(&mut *deser).map_err(|e| {
469                        ::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(::aws_smithy_runtime_api::box_error::BoxError::from(
470                            e,
471                        ))
472                    })?;
473                    if tmp.message.is_none() {
474                        tmp.message = _error_message;
475                    }
476                    let tmp = tmp.meta(generic);
477                    tmp.build()
478                }),
479                "InternalServiceException" => crate::operation::create_catalog::CreateCatalogError::InternalServiceException({
480                    let mut deser = protocol.deserialize_error_response(response, _cfg).map_err(|e| {
481                        ::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(::aws_smithy_runtime_api::box_error::BoxError::from(
482                            e,
483                        ))
484                    })?;
485                    let mut tmp = <crate::types::error::builders::InternalServiceExceptionBuilder>::default();
486                    tmp.deserialize_members(&mut *deser).map_err(|e| {
487                        ::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(::aws_smithy_runtime_api::box_error::BoxError::from(
488                            e,
489                        ))
490                    })?;
491                    if tmp.message.is_none() {
492                        tmp.message = _error_message;
493                    }
494                    let tmp = tmp.meta(generic);
495                    tmp.build()
496                }),
497                "InvalidInputException" => crate::operation::create_catalog::CreateCatalogError::InvalidInputException({
498                    let mut deser = protocol.deserialize_error_response(response, _cfg).map_err(|e| {
499                        ::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(::aws_smithy_runtime_api::box_error::BoxError::from(
500                            e,
501                        ))
502                    })?;
503                    let mut tmp = <crate::types::error::builders::InvalidInputExceptionBuilder>::default();
504                    tmp.deserialize_members(&mut *deser).map_err(|e| {
505                        ::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(::aws_smithy_runtime_api::box_error::BoxError::from(
506                            e,
507                        ))
508                    })?;
509                    if tmp.message.is_none() {
510                        tmp.message = _error_message;
511                    }
512                    let tmp = tmp.meta(generic);
513                    tmp.build()
514                }),
515                "OperationTimeoutException" => crate::operation::create_catalog::CreateCatalogError::OperationTimeoutException({
516                    let mut deser = protocol.deserialize_error_response(response, _cfg).map_err(|e| {
517                        ::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(::aws_smithy_runtime_api::box_error::BoxError::from(
518                            e,
519                        ))
520                    })?;
521                    let mut tmp = <crate::types::error::builders::OperationTimeoutExceptionBuilder>::default();
522                    tmp.deserialize_members(&mut *deser).map_err(|e| {
523                        ::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(::aws_smithy_runtime_api::box_error::BoxError::from(
524                            e,
525                        ))
526                    })?;
527                    if tmp.message.is_none() {
528                        tmp.message = _error_message;
529                    }
530                    let tmp = tmp.meta(generic);
531                    tmp.build()
532                }),
533                "ResourceNumberLimitExceededException" => {
534                    crate::operation::create_catalog::CreateCatalogError::ResourceNumberLimitExceededException({
535                        let mut deser = protocol.deserialize_error_response(response, _cfg).map_err(|e| {
536                            ::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(
537                                ::aws_smithy_runtime_api::box_error::BoxError::from(e),
538                            )
539                        })?;
540                        let mut tmp = <crate::types::error::builders::ResourceNumberLimitExceededExceptionBuilder>::default();
541                        tmp.deserialize_members(&mut *deser).map_err(|e| {
542                            ::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(
543                                ::aws_smithy_runtime_api::box_error::BoxError::from(e),
544                            )
545                        })?;
546                        if tmp.message.is_none() {
547                            tmp.message = _error_message;
548                        }
549                        let tmp = tmp.meta(generic);
550                        tmp.build()
551                    })
552                }
553                _ => {
554                    // Registry-backed, operation-scoped reification of an error whose
555                    // code this operation does not model directly: the operation's own
556                    // error registry is consulted first, then the lookup widens to the
557                    // service-wide error registry. On a hit, the reified error is attached
558                    // as the source of the returned unhandled error while its metadata
559                    // (code, message, request id) is preserved; on a miss the generic
560                    // error is returned unchanged.
561                    match protocol
562                        .deserialize_error_response(response, _cfg)
563                        .ok()
564                        .and_then(|mut deser| {
565                            ::aws_smithy_schema::registry::reify_error(
566                                crate::operation::create_catalog::error_registry::REGISTRY
567                                    .or(&crate::error_type_registry::REGISTRY),
568                                error_code,
569                                &mut *deser,
570                            )
571                        }) {
572                        ::std::option::Option::Some(source) => <crate::operation::create_catalog::CreateCatalogError as ::aws_smithy_runtime_api::client::result::CreateUnhandledError>::create_unhandled_error(source, ::std::option::Option::Some(generic)),
573                        ::std::option::Option::None => crate::operation::create_catalog::CreateCatalogError::generic(generic),
574                    }
575                }
576            };
577            ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::operation(
578                ::aws_smithy_runtime_api::client::interceptors::context::Error::erase(err),
579            ))
580        } else {
581            let protocol = _cfg
582                .load::<::aws_smithy_schema::protocol::SharedClientProtocol>()
583                .expect("a SharedClientProtocol is required");
584            let mut deser = protocol.deserialize_response(response, CreateCatalog::OUTPUT_SCHEMA, _cfg).map_err(|e| {
585                ::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(::aws_smithy_runtime_api::box_error::BoxError::from(e))
586            })?;
587            // `headers` is already in scope from the top of the function; alias it as
588            // `_response_headers` so MutateOutput customizations have a stable name to
589            // read from.
590            let _response_headers = headers;
591            // `mut` is required because `deserialize_members` and the `MutateOutput`
592            // builder setters take `&mut self`. Marked `allow(unused_mut)` because an
593            // empty output has no members and no customizations to run.
594            #[allow(unused_mut)]
595            let mut output = <crate::operation::create_catalog::builders::CreateCatalogOutputBuilder>::default();
596            output.deserialize_members(&mut *deser).map_err(|e| {
597                ::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(::aws_smithy_runtime_api::box_error::BoxError::from(e))
598            })?;
599            output._set_request_id(::aws_types::request_id::RequestId::request_id(_response_headers).map(str::to_string));
600            let output = output.build();
601            ::std::result::Result::Ok(::aws_smithy_runtime_api::client::interceptors::context::Output::erase(output))
602        }
603    }
604}
605#[derive(Debug)]
606struct CreateCatalogRequestSerializer;
607impl ::aws_smithy_runtime_api::client::ser_de::SerializeRequest for CreateCatalogRequestSerializer {
608    #[allow(unused_mut, clippy::let_and_return, clippy::needless_borrow, clippy::useless_conversion)]
609    fn serialize_input(
610        &self,
611        input: ::aws_smithy_runtime_api::client::interceptors::context::Input,
612        _cfg: &mut ::aws_smithy_types::config_bag::ConfigBag,
613    ) -> ::std::result::Result<::aws_smithy_runtime_api::client::orchestrator::HttpRequest, ::aws_smithy_runtime_api::box_error::BoxError> {
614        let input = input
615            .downcast::<crate::operation::create_catalog::CreateCatalogInput>()
616            .expect("correct type");
617
618        let protocol = _cfg
619            .load::<::aws_smithy_schema::protocol::SharedClientProtocol>()
620            .expect("a SharedClientProtocol is required");
621        let mut request = protocol
622            .serialize_request(&input, CreateCatalog::INPUT_SCHEMA, "/", _cfg)
623            .map_err(::aws_smithy_runtime_api::box_error::BoxError::from)?;
624
625        return ::std::result::Result::Ok(request);
626    }
627}
628#[derive(Debug)]
629struct CreateCatalogEndpointParamsInterceptor;
630
631#[::aws_smithy_runtime_api::client::interceptors::dyn_dispatch_hint]
632impl ::aws_smithy_runtime_api::client::interceptors::Intercept for CreateCatalogEndpointParamsInterceptor {
633    fn name(&self) -> &'static str {
634        "CreateCatalogEndpointParamsInterceptor"
635    }
636
637    fn read_before_execution(
638        &self,
639        context: &::aws_smithy_runtime_api::client::interceptors::context::BeforeSerializationInterceptorContextRef<
640            '_,
641            ::aws_smithy_runtime_api::client::interceptors::context::Input,
642            ::aws_smithy_runtime_api::client::interceptors::context::Output,
643            ::aws_smithy_runtime_api::client::interceptors::context::Error,
644        >,
645        cfg: &mut ::aws_smithy_types::config_bag::ConfigBag,
646    ) -> ::std::result::Result<(), ::aws_smithy_runtime_api::box_error::BoxError> {
647        let _input = context
648            .input()
649            .downcast_ref::<CreateCatalogInput>()
650            .ok_or("failed to downcast to CreateCatalogInput")?;
651
652        let params = crate::config::endpoint::Params::builder()
653            .set_region(cfg.load::<::aws_types::region::Region>().map(|r| r.as_ref().to_owned()))
654            .set_use_dual_stack(cfg.load::<::aws_types::endpoint_config::UseDualStack>().map(|ty| ty.0))
655            .set_use_fips(cfg.load::<::aws_types::endpoint_config::UseFips>().map(|ty| ty.0))
656            .set_endpoint(cfg.load::<::aws_types::endpoint_config::EndpointUrl>().map(|ty| ty.0.clone()))
657            .build()
658            .map_err(|err| {
659                ::aws_smithy_runtime_api::client::interceptors::error::ContextAttachedError::new("endpoint params could not be built", err)
660            })?;
661        cfg.interceptor_state()
662            .store_put(::aws_smithy_runtime_api::client::endpoint::EndpointResolverParams::new(params));
663        ::std::result::Result::Ok(())
664    }
665}
666
667// The get_* functions below are generated from JMESPath expressions in the
668// operationContextParams trait. They target the operation's input shape.
669
670/// Error type for the `CreateCatalogError` operation.
671#[non_exhaustive]
672#[derive(::std::fmt::Debug)]
673pub enum CreateCatalogError {
674    /// <p>Access to a resource was denied.</p>
675    AccessDeniedException(crate::types::error::AccessDeniedException),
676    /// <p>A resource to be created or added already exists.</p>
677    AlreadyExistsException(crate::types::error::AlreadyExistsException),
678    /// <p>Two processes are trying to modify a resource simultaneously.</p>
679    ConcurrentModificationException(crate::types::error::ConcurrentModificationException),
680    /// <p>A specified entity does not exist</p>
681    EntityNotFoundException(crate::types::error::EntityNotFoundException),
682    /// <p>A federated resource already exists.</p>
683    FederatedResourceAlreadyExistsException(crate::types::error::FederatedResourceAlreadyExistsException),
684    /// <p>A federation source failed.</p>
685    FederationSourceException(crate::types::error::FederationSourceException),
686    /// <p>An encryption operation failed.</p>
687    GlueEncryptionException(crate::types::error::GlueEncryptionException),
688    /// <p>An internal service error occurred.</p>
689    InternalServiceException(crate::types::error::InternalServiceException),
690    /// <p>The input provided was not valid.</p>
691    InvalidInputException(crate::types::error::InvalidInputException),
692    /// <p>The operation timed out.</p>
693    OperationTimeoutException(crate::types::error::OperationTimeoutException),
694    /// <p>A resource numerical limit was exceeded.</p>
695    ResourceNumberLimitExceededException(crate::types::error::ResourceNumberLimitExceededException),
696    /// An unexpected error occurred (e.g., invalid JSON returned by the service or an unknown error code).
697    #[deprecated(note = "Matching `Unhandled` directly is not forwards compatible. Instead, match using a \
698    variable wildcard pattern and check `.code()`:
699     \
700    &nbsp;&nbsp;&nbsp;`err if err.code() == Some(\"SpecificExceptionCode\") => { /* handle the error */ }`
701     \
702    See [`ProvideErrorMetadata`](#impl-ProvideErrorMetadata-for-CreateCatalogError) for what information is available for the error.")]
703    Unhandled(crate::error::sealed_unhandled::Unhandled),
704}
705impl CreateCatalogError {
706    /// Creates the `CreateCatalogError::Unhandled` variant from any error type.
707    pub fn unhandled(
708        err: impl ::std::convert::Into<::std::boxed::Box<dyn ::std::error::Error + ::std::marker::Send + ::std::marker::Sync + 'static>>,
709    ) -> Self {
710        Self::Unhandled(crate::error::sealed_unhandled::Unhandled {
711            source: err.into(),
712            meta: ::std::default::Default::default(),
713        })
714    }
715
716    /// Creates the `CreateCatalogError::Unhandled` variant from an [`ErrorMetadata`](::aws_smithy_types::error::ErrorMetadata).
717    pub fn generic(err: ::aws_smithy_types::error::ErrorMetadata) -> Self {
718        Self::Unhandled(crate::error::sealed_unhandled::Unhandled {
719            source: err.clone().into(),
720            meta: err,
721        })
722    }
723    ///
724    /// Returns error metadata, which includes the error code, message,
725    /// request ID, and potentially additional information.
726    ///
727    pub fn meta(&self) -> &::aws_smithy_types::error::ErrorMetadata {
728        match self {
729            Self::AccessDeniedException(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
730            Self::AlreadyExistsException(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
731            Self::ConcurrentModificationException(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
732            Self::EntityNotFoundException(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
733            Self::FederatedResourceAlreadyExistsException(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
734            Self::FederationSourceException(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
735            Self::GlueEncryptionException(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
736            Self::InternalServiceException(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
737            Self::InvalidInputException(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
738            Self::OperationTimeoutException(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
739            Self::ResourceNumberLimitExceededException(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
740            Self::Unhandled(e) => &e.meta,
741        }
742    }
743    /// Returns `true` if the error kind is `CreateCatalogError::AccessDeniedException`.
744    pub fn is_access_denied_exception(&self) -> bool {
745        matches!(self, Self::AccessDeniedException(_))
746    }
747    /// Returns `true` if the error kind is `CreateCatalogError::AlreadyExistsException`.
748    pub fn is_already_exists_exception(&self) -> bool {
749        matches!(self, Self::AlreadyExistsException(_))
750    }
751    /// Returns `true` if the error kind is `CreateCatalogError::ConcurrentModificationException`.
752    pub fn is_concurrent_modification_exception(&self) -> bool {
753        matches!(self, Self::ConcurrentModificationException(_))
754    }
755    /// Returns `true` if the error kind is `CreateCatalogError::EntityNotFoundException`.
756    pub fn is_entity_not_found_exception(&self) -> bool {
757        matches!(self, Self::EntityNotFoundException(_))
758    }
759    /// Returns `true` if the error kind is `CreateCatalogError::FederatedResourceAlreadyExistsException`.
760    pub fn is_federated_resource_already_exists_exception(&self) -> bool {
761        matches!(self, Self::FederatedResourceAlreadyExistsException(_))
762    }
763    /// Returns `true` if the error kind is `CreateCatalogError::FederationSourceException`.
764    pub fn is_federation_source_exception(&self) -> bool {
765        matches!(self, Self::FederationSourceException(_))
766    }
767    /// Returns `true` if the error kind is `CreateCatalogError::GlueEncryptionException`.
768    pub fn is_glue_encryption_exception(&self) -> bool {
769        matches!(self, Self::GlueEncryptionException(_))
770    }
771    /// Returns `true` if the error kind is `CreateCatalogError::InternalServiceException`.
772    pub fn is_internal_service_exception(&self) -> bool {
773        matches!(self, Self::InternalServiceException(_))
774    }
775    /// Returns `true` if the error kind is `CreateCatalogError::InvalidInputException`.
776    pub fn is_invalid_input_exception(&self) -> bool {
777        matches!(self, Self::InvalidInputException(_))
778    }
779    /// Returns `true` if the error kind is `CreateCatalogError::OperationTimeoutException`.
780    pub fn is_operation_timeout_exception(&self) -> bool {
781        matches!(self, Self::OperationTimeoutException(_))
782    }
783    /// Returns `true` if the error kind is `CreateCatalogError::ResourceNumberLimitExceededException`.
784    pub fn is_resource_number_limit_exceeded_exception(&self) -> bool {
785        matches!(self, Self::ResourceNumberLimitExceededException(_))
786    }
787}
788impl ::std::error::Error for CreateCatalogError {
789    fn source(&self) -> ::std::option::Option<&(dyn ::std::error::Error + 'static)> {
790        match self {
791            Self::AccessDeniedException(_inner) => ::std::option::Option::Some(_inner),
792            Self::AlreadyExistsException(_inner) => ::std::option::Option::Some(_inner),
793            Self::ConcurrentModificationException(_inner) => ::std::option::Option::Some(_inner),
794            Self::EntityNotFoundException(_inner) => ::std::option::Option::Some(_inner),
795            Self::FederatedResourceAlreadyExistsException(_inner) => ::std::option::Option::Some(_inner),
796            Self::FederationSourceException(_inner) => ::std::option::Option::Some(_inner),
797            Self::GlueEncryptionException(_inner) => ::std::option::Option::Some(_inner),
798            Self::InternalServiceException(_inner) => ::std::option::Option::Some(_inner),
799            Self::InvalidInputException(_inner) => ::std::option::Option::Some(_inner),
800            Self::OperationTimeoutException(_inner) => ::std::option::Option::Some(_inner),
801            Self::ResourceNumberLimitExceededException(_inner) => ::std::option::Option::Some(_inner),
802            Self::Unhandled(_inner) => ::std::option::Option::Some(&*_inner.source),
803        }
804    }
805}
806impl ::std::fmt::Display for CreateCatalogError {
807    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
808        match self {
809            Self::AccessDeniedException(_inner) => _inner.fmt(f),
810            Self::AlreadyExistsException(_inner) => _inner.fmt(f),
811            Self::ConcurrentModificationException(_inner) => _inner.fmt(f),
812            Self::EntityNotFoundException(_inner) => _inner.fmt(f),
813            Self::FederatedResourceAlreadyExistsException(_inner) => _inner.fmt(f),
814            Self::FederationSourceException(_inner) => _inner.fmt(f),
815            Self::GlueEncryptionException(_inner) => _inner.fmt(f),
816            Self::InternalServiceException(_inner) => _inner.fmt(f),
817            Self::InvalidInputException(_inner) => _inner.fmt(f),
818            Self::OperationTimeoutException(_inner) => _inner.fmt(f),
819            Self::ResourceNumberLimitExceededException(_inner) => _inner.fmt(f),
820            Self::Unhandled(_inner) => {
821                if let ::std::option::Option::Some(code) = ::aws_smithy_types::error::metadata::ProvideErrorMetadata::code(self) {
822                    write!(f, "unhandled error ({code})")
823                } else {
824                    f.write_str("unhandled error")
825                }
826            }
827        }
828    }
829}
830impl ::aws_smithy_types::retry::ProvideErrorKind for CreateCatalogError {
831    fn code(&self) -> ::std::option::Option<&str> {
832        ::aws_smithy_types::error::metadata::ProvideErrorMetadata::code(self)
833    }
834    fn retryable_error_kind(&self) -> ::std::option::Option<::aws_smithy_types::retry::ErrorKind> {
835        ::std::option::Option::None
836    }
837}
838impl ::aws_smithy_types::error::metadata::ProvideErrorMetadata for CreateCatalogError {
839    fn meta(&self) -> &::aws_smithy_types::error::ErrorMetadata {
840        match self {
841            Self::AccessDeniedException(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
842            Self::AlreadyExistsException(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
843            Self::ConcurrentModificationException(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
844            Self::EntityNotFoundException(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
845            Self::FederatedResourceAlreadyExistsException(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
846            Self::FederationSourceException(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
847            Self::GlueEncryptionException(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
848            Self::InternalServiceException(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
849            Self::InvalidInputException(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
850            Self::OperationTimeoutException(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
851            Self::ResourceNumberLimitExceededException(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
852            Self::Unhandled(_inner) => &_inner.meta,
853        }
854    }
855}
856impl ::aws_smithy_runtime_api::client::result::CreateUnhandledError for CreateCatalogError {
857    fn create_unhandled_error(
858        source: ::std::boxed::Box<dyn ::std::error::Error + ::std::marker::Send + ::std::marker::Sync + 'static>,
859        meta: ::std::option::Option<::aws_smithy_types::error::ErrorMetadata>,
860    ) -> Self {
861        Self::Unhandled(crate::error::sealed_unhandled::Unhandled {
862            source,
863            meta: meta.unwrap_or_default(),
864        })
865    }
866}
867impl ::aws_types::request_id::RequestId for crate::operation::create_catalog::CreateCatalogError {
868    fn request_id(&self) -> Option<&str> {
869        self.meta().request_id()
870    }
871}
872
873pub use crate::operation::create_catalog::_create_catalog_input::CreateCatalogInput;
874
875pub use crate::operation::create_catalog::_create_catalog_output::CreateCatalogOutput;
876
877mod _create_catalog_input;
878
879mod _create_catalog_output;
880
881/// Builders
882pub mod builders;