Skip to main content

aws_sdk_glue/operation/
batch_get_crawlers.rs

1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2/// Orchestration and serialization glue logic for `BatchGetCrawlers`.
3#[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
4#[non_exhaustive]
5pub struct BatchGetCrawlers;
6impl BatchGetCrawlers {
7    /// Creates a new `BatchGetCrawlers`
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::batch_get_crawlers::BatchGetCrawlersInput::SCHEMA;
13    /// The schema for this operation's output shape.
14    pub const OUTPUT_SCHEMA: &'static ::aws_smithy_schema::Schema<'static> = crate::operation::batch_get_crawlers::BatchGetCrawlersOutput::SCHEMA;
15    pub(crate) async fn orchestrate(
16        runtime_plugins: &::aws_smithy_runtime_api::client::runtime_plugin::RuntimePlugins,
17        input: crate::operation::batch_get_crawlers::BatchGetCrawlersInput,
18    ) -> ::std::result::Result<
19        crate::operation::batch_get_crawlers::BatchGetCrawlersOutput,
20        ::aws_smithy_runtime_api::client::result::SdkError<
21            crate::operation::batch_get_crawlers::BatchGetCrawlersError,
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::batch_get_crawlers::BatchGetCrawlersError>()
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::batch_get_crawlers::BatchGetCrawlersOutput>()
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::batch_get_crawlers::BatchGetCrawlersInput,
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", "BatchGetCrawlers", 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.BatchGetCrawlers",
63                "rpc.service" = "Glue",
64                "rpc.method" = "BatchGetCrawlers",
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::InvalidInputException::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::InvalidInputException::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::InvalidInputException::deserialize(d)?))
109                        },
110                    )
111.insert_error_shape(
112                        crate::types::error::OperationTimeoutException::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::OperationTimeoutException::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::OperationTimeoutException::deserialize(d)?))
118                        },
119                    )
120                            .build()
121    });
122}
123impl ::aws_smithy_runtime_api::client::runtime_plugin::RuntimePlugin for BatchGetCrawlers {
124    fn config(&self) -> ::std::option::Option<::aws_smithy_types::config_bag::FrozenLayer> {
125        let mut cfg = ::aws_smithy_types::config_bag::Layer::new("BatchGetCrawlers");
126
127        cfg.store_put(::aws_smithy_runtime_api::client::ser_de::SharedRequestSerializer::new(
128            BatchGetCrawlersRequestSerializer,
129        ));
130        cfg.store_put(::aws_smithy_runtime_api::client::ser_de::SharedResponseDeserializer::new(
131            BatchGetCrawlersResponseDeserializer,
132        ));
133
134        cfg.store_put(::aws_smithy_runtime_api::client::auth::AuthSchemeOptionResolverParams::new(
135            crate::config::auth::Params::builder()
136                .operation_name("BatchGetCrawlers")
137                .build()
138                .expect("required fields set"),
139        ));
140
141        cfg.store_put(::aws_smithy_runtime_api::client::orchestrator::Metadata::new("BatchGetCrawlers", "Glue"));
142        let mut signing_options = ::aws_runtime::auth::SigningOptions::default();
143        signing_options.double_uri_encode = true;
144        signing_options.content_sha256_header = false;
145        signing_options.normalize_uri_path = true;
146        signing_options.payload_override = None;
147
148        cfg.store_put(::aws_runtime::auth::SigV4OperationSigningConfig {
149            signing_options,
150            ..::std::default::Default::default()
151        });
152
153        ::std::option::Option::Some(cfg.freeze())
154    }
155
156    fn runtime_components(
157        &self,
158        _: &::aws_smithy_runtime_api::client::runtime_components::RuntimeComponentsBuilder,
159    ) -> ::std::borrow::Cow<'_, ::aws_smithy_runtime_api::client::runtime_components::RuntimeComponentsBuilder> {
160        #[allow(unused_mut)]
161        let mut rcb = ::aws_smithy_runtime_api::client::runtime_components::RuntimeComponentsBuilder::new("BatchGetCrawlers")
162            .with_interceptor(::aws_smithy_runtime_api::client::interceptors::SharedInterceptor::permanent(
163                ::aws_smithy_runtime::client::stalled_stream_protection::StalledStreamProtectionInterceptor::default(),
164            ))
165            .with_interceptor(::aws_smithy_runtime_api::client::interceptors::SharedInterceptor::permanent(
166                BatchGetCrawlersEndpointParamsInterceptor,
167            ))
168            .with_retry_classifier(::aws_smithy_runtime::client::retries::classifiers::TransientErrorClassifier::<
169                crate::operation::batch_get_crawlers::BatchGetCrawlersError,
170            >::new())
171            .with_retry_classifier(::aws_smithy_runtime::client::retries::classifiers::ModeledAsRetryableClassifier::<
172                crate::operation::batch_get_crawlers::BatchGetCrawlersError,
173            >::new())
174            .with_retry_classifier(::aws_runtime::retries::classifiers::AwsErrorCodeClassifier::<
175                crate::operation::batch_get_crawlers::BatchGetCrawlersError,
176            >::new())
177            .with_retry_classifier(::aws_runtime::service_clock_skew::ServiceClockSkewClassifier::<
178                crate::operation::batch_get_crawlers::BatchGetCrawlersError,
179            >::new());
180
181        ::std::borrow::Cow::Owned(rcb)
182    }
183}
184
185#[derive(Debug)]
186struct BatchGetCrawlersResponseDeserializer;
187impl ::aws_smithy_runtime_api::client::ser_de::DeserializeResponse for BatchGetCrawlersResponseDeserializer {
188    fn deserialize_nonstreaming_with_config(
189        &self,
190        response: &::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
191        _cfg: &::aws_smithy_types::config_bag::ConfigBag,
192    ) -> ::aws_smithy_runtime_api::client::interceptors::context::OutputOrError {
193        let (success, status) = (response.status().is_success(), response.status().as_u16());
194        // Load body and headers BEFORE BeforeParseResponse so customizations
195        // (e.g., S3's `body_is_error` check that detects errors returned with
196        // HTTP 200) can inspect them. The legacy non-streaming path also
197        // loads `body` before firing this hook.
198        #[allow(unused_variables)]
199        let body = response.body().bytes().expect("body loaded");
200        let headers = response.headers();
201        #[allow(unused_mut)]
202        let mut force_error = false;
203        ::tracing::debug!(request_id = ?::aws_types::request_id::RequestId::request_id(response));
204        if !success && status != 200 || force_error {
205            let protocol = _cfg
206                .load::<::aws_smithy_schema::protocol::SharedClientProtocol>()
207                .expect("a SharedClientProtocol is required");
208            #[allow(unused_mut)]
209            let mut generic_builder = protocol.parse_error_metadata(response, _cfg).map_err(|e| {
210                ::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(::aws_smithy_runtime_api::box_error::BoxError::from(e))
211            })?;
212            generic_builder = ::aws_types::request_id::apply_request_id(generic_builder, headers);
213            let generic = generic_builder.build();
214            let error_code = match generic.code() {
215                ::std::option::Option::Some(code) => code,
216                ::std::option::Option::None => {
217                    return ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(
218                        ::aws_smithy_runtime_api::box_error::BoxError::from(crate::operation::batch_get_crawlers::BatchGetCrawlersError::unhandled(
219                            generic,
220                        )),
221                    ))
222                }
223            };
224            let _error_message = generic.message().map(|msg| msg.to_owned());
225            let err = match error_code {
226                "InvalidInputException" => crate::operation::batch_get_crawlers::BatchGetCrawlersError::InvalidInputException({
227                    let mut deser = protocol.deserialize_error_response(response, _cfg).map_err(|e| {
228                        ::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(::aws_smithy_runtime_api::box_error::BoxError::from(
229                            e,
230                        ))
231                    })?;
232                    let mut tmp = <crate::types::error::builders::InvalidInputExceptionBuilder>::default();
233                    tmp.deserialize_members(&mut *deser).map_err(|e| {
234                        ::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(::aws_smithy_runtime_api::box_error::BoxError::from(
235                            e,
236                        ))
237                    })?;
238                    if tmp.message.is_none() {
239                        tmp.message = _error_message;
240                    }
241                    let tmp = tmp.meta(generic);
242                    tmp.build()
243                }),
244                "OperationTimeoutException" => crate::operation::batch_get_crawlers::BatchGetCrawlersError::OperationTimeoutException({
245                    let mut deser = protocol.deserialize_error_response(response, _cfg).map_err(|e| {
246                        ::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(::aws_smithy_runtime_api::box_error::BoxError::from(
247                            e,
248                        ))
249                    })?;
250                    let mut tmp = <crate::types::error::builders::OperationTimeoutExceptionBuilder>::default();
251                    tmp.deserialize_members(&mut *deser).map_err(|e| {
252                        ::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(::aws_smithy_runtime_api::box_error::BoxError::from(
253                            e,
254                        ))
255                    })?;
256                    if tmp.message.is_none() {
257                        tmp.message = _error_message;
258                    }
259                    let tmp = tmp.meta(generic);
260                    tmp.build()
261                }),
262                _ => {
263                    // Registry-backed, operation-scoped reification of an error whose
264                    // code this operation does not model directly: the operation's own
265                    // error registry is consulted first, then the lookup widens to the
266                    // service-wide error registry. On a hit, the reified error is attached
267                    // as the source of the returned unhandled error while its metadata
268                    // (code, message, request id) is preserved; on a miss the generic
269                    // error is returned unchanged.
270                    match protocol
271                        .deserialize_error_response(response, _cfg)
272                        .ok()
273                        .and_then(|mut deser| {
274                            ::aws_smithy_schema::registry::reify_error(
275                                crate::operation::batch_get_crawlers::error_registry::REGISTRY
276                                    .or(&crate::error_type_registry::REGISTRY),
277                                error_code,
278                                &mut *deser,
279                            )
280                        }) {
281                        ::std::option::Option::Some(source) => <crate::operation::batch_get_crawlers::BatchGetCrawlersError as ::aws_smithy_runtime_api::client::result::CreateUnhandledError>::create_unhandled_error(source, ::std::option::Option::Some(generic)),
282                        ::std::option::Option::None => crate::operation::batch_get_crawlers::BatchGetCrawlersError::generic(generic),
283                    }
284                }
285            };
286            ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::operation(
287                ::aws_smithy_runtime_api::client::interceptors::context::Error::erase(err),
288            ))
289        } else {
290            let protocol = _cfg
291                .load::<::aws_smithy_schema::protocol::SharedClientProtocol>()
292                .expect("a SharedClientProtocol is required");
293            let mut deser = protocol
294                .deserialize_response(response, BatchGetCrawlers::OUTPUT_SCHEMA, _cfg)
295                .map_err(|e| {
296                    ::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(::aws_smithy_runtime_api::box_error::BoxError::from(e))
297                })?;
298            // `headers` is already in scope from the top of the function; alias it as
299            // `_response_headers` so MutateOutput customizations have a stable name to
300            // read from.
301            let _response_headers = headers;
302            // `mut` is required because `deserialize_members` and the `MutateOutput`
303            // builder setters take `&mut self`. Marked `allow(unused_mut)` because an
304            // empty output has no members and no customizations to run.
305            #[allow(unused_mut)]
306            let mut output = <crate::operation::batch_get_crawlers::builders::BatchGetCrawlersOutputBuilder>::default();
307            output.deserialize_members(&mut *deser).map_err(|e| {
308                ::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(::aws_smithy_runtime_api::box_error::BoxError::from(e))
309            })?;
310            output._set_request_id(::aws_types::request_id::RequestId::request_id(_response_headers).map(str::to_string));
311            let output = output.build();
312            ::std::result::Result::Ok(::aws_smithy_runtime_api::client::interceptors::context::Output::erase(output))
313        }
314    }
315}
316#[derive(Debug)]
317struct BatchGetCrawlersRequestSerializer;
318impl ::aws_smithy_runtime_api::client::ser_de::SerializeRequest for BatchGetCrawlersRequestSerializer {
319    #[allow(unused_mut, clippy::let_and_return, clippy::needless_borrow, clippy::useless_conversion)]
320    fn serialize_input(
321        &self,
322        input: ::aws_smithy_runtime_api::client::interceptors::context::Input,
323        _cfg: &mut ::aws_smithy_types::config_bag::ConfigBag,
324    ) -> ::std::result::Result<::aws_smithy_runtime_api::client::orchestrator::HttpRequest, ::aws_smithy_runtime_api::box_error::BoxError> {
325        let input = input
326            .downcast::<crate::operation::batch_get_crawlers::BatchGetCrawlersInput>()
327            .expect("correct type");
328
329        let protocol = _cfg
330            .load::<::aws_smithy_schema::protocol::SharedClientProtocol>()
331            .expect("a SharedClientProtocol is required");
332        let mut request = protocol
333            .serialize_request(&input, BatchGetCrawlers::INPUT_SCHEMA, "/", _cfg)
334            .map_err(::aws_smithy_runtime_api::box_error::BoxError::from)?;
335
336        return ::std::result::Result::Ok(request);
337    }
338}
339#[derive(Debug)]
340struct BatchGetCrawlersEndpointParamsInterceptor;
341
342#[::aws_smithy_runtime_api::client::interceptors::dyn_dispatch_hint]
343impl ::aws_smithy_runtime_api::client::interceptors::Intercept for BatchGetCrawlersEndpointParamsInterceptor {
344    fn name(&self) -> &'static str {
345        "BatchGetCrawlersEndpointParamsInterceptor"
346    }
347
348    fn read_before_execution(
349        &self,
350        context: &::aws_smithy_runtime_api::client::interceptors::context::BeforeSerializationInterceptorContextRef<
351            '_,
352            ::aws_smithy_runtime_api::client::interceptors::context::Input,
353            ::aws_smithy_runtime_api::client::interceptors::context::Output,
354            ::aws_smithy_runtime_api::client::interceptors::context::Error,
355        >,
356        cfg: &mut ::aws_smithy_types::config_bag::ConfigBag,
357    ) -> ::std::result::Result<(), ::aws_smithy_runtime_api::box_error::BoxError> {
358        let _input = context
359            .input()
360            .downcast_ref::<BatchGetCrawlersInput>()
361            .ok_or("failed to downcast to BatchGetCrawlersInput")?;
362
363        let params = crate::config::endpoint::Params::builder()
364            .set_region(cfg.load::<::aws_types::region::Region>().map(|r| r.as_ref().to_owned()))
365            .set_use_dual_stack(cfg.load::<::aws_types::endpoint_config::UseDualStack>().map(|ty| ty.0))
366            .set_use_fips(cfg.load::<::aws_types::endpoint_config::UseFips>().map(|ty| ty.0))
367            .set_endpoint(cfg.load::<::aws_types::endpoint_config::EndpointUrl>().map(|ty| ty.0.clone()))
368            .build()
369            .map_err(|err| {
370                ::aws_smithy_runtime_api::client::interceptors::error::ContextAttachedError::new("endpoint params could not be built", err)
371            })?;
372        cfg.interceptor_state()
373            .store_put(::aws_smithy_runtime_api::client::endpoint::EndpointResolverParams::new(params));
374        ::std::result::Result::Ok(())
375    }
376}
377
378// The get_* functions below are generated from JMESPath expressions in the
379// operationContextParams trait. They target the operation's input shape.
380
381/// Error type for the `BatchGetCrawlersError` operation.
382#[non_exhaustive]
383#[derive(::std::fmt::Debug)]
384pub enum BatchGetCrawlersError {
385    /// <p>The input provided was not valid.</p>
386    InvalidInputException(crate::types::error::InvalidInputException),
387    /// <p>The operation timed out.</p>
388    OperationTimeoutException(crate::types::error::OperationTimeoutException),
389    /// An unexpected error occurred (e.g., invalid JSON returned by the service or an unknown error code).
390    #[deprecated(note = "Matching `Unhandled` directly is not forwards compatible. Instead, match using a \
391    variable wildcard pattern and check `.code()`:
392     \
393    &nbsp;&nbsp;&nbsp;`err if err.code() == Some(\"SpecificExceptionCode\") => { /* handle the error */ }`
394     \
395    See [`ProvideErrorMetadata`](#impl-ProvideErrorMetadata-for-BatchGetCrawlersError) for what information is available for the error.")]
396    Unhandled(crate::error::sealed_unhandled::Unhandled),
397}
398impl BatchGetCrawlersError {
399    /// Creates the `BatchGetCrawlersError::Unhandled` variant from any error type.
400    pub fn unhandled(
401        err: impl ::std::convert::Into<::std::boxed::Box<dyn ::std::error::Error + ::std::marker::Send + ::std::marker::Sync + 'static>>,
402    ) -> Self {
403        Self::Unhandled(crate::error::sealed_unhandled::Unhandled {
404            source: err.into(),
405            meta: ::std::default::Default::default(),
406        })
407    }
408
409    /// Creates the `BatchGetCrawlersError::Unhandled` variant from an [`ErrorMetadata`](::aws_smithy_types::error::ErrorMetadata).
410    pub fn generic(err: ::aws_smithy_types::error::ErrorMetadata) -> Self {
411        Self::Unhandled(crate::error::sealed_unhandled::Unhandled {
412            source: err.clone().into(),
413            meta: err,
414        })
415    }
416    ///
417    /// Returns error metadata, which includes the error code, message,
418    /// request ID, and potentially additional information.
419    ///
420    pub fn meta(&self) -> &::aws_smithy_types::error::ErrorMetadata {
421        match self {
422            Self::InvalidInputException(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
423            Self::OperationTimeoutException(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
424            Self::Unhandled(e) => &e.meta,
425        }
426    }
427    /// Returns `true` if the error kind is `BatchGetCrawlersError::InvalidInputException`.
428    pub fn is_invalid_input_exception(&self) -> bool {
429        matches!(self, Self::InvalidInputException(_))
430    }
431    /// Returns `true` if the error kind is `BatchGetCrawlersError::OperationTimeoutException`.
432    pub fn is_operation_timeout_exception(&self) -> bool {
433        matches!(self, Self::OperationTimeoutException(_))
434    }
435}
436impl ::std::error::Error for BatchGetCrawlersError {
437    fn source(&self) -> ::std::option::Option<&(dyn ::std::error::Error + 'static)> {
438        match self {
439            Self::InvalidInputException(_inner) => ::std::option::Option::Some(_inner),
440            Self::OperationTimeoutException(_inner) => ::std::option::Option::Some(_inner),
441            Self::Unhandled(_inner) => ::std::option::Option::Some(&*_inner.source),
442        }
443    }
444}
445impl ::std::fmt::Display for BatchGetCrawlersError {
446    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
447        match self {
448            Self::InvalidInputException(_inner) => _inner.fmt(f),
449            Self::OperationTimeoutException(_inner) => _inner.fmt(f),
450            Self::Unhandled(_inner) => {
451                if let ::std::option::Option::Some(code) = ::aws_smithy_types::error::metadata::ProvideErrorMetadata::code(self) {
452                    write!(f, "unhandled error ({code})")
453                } else {
454                    f.write_str("unhandled error")
455                }
456            }
457        }
458    }
459}
460impl ::aws_smithy_types::retry::ProvideErrorKind for BatchGetCrawlersError {
461    fn code(&self) -> ::std::option::Option<&str> {
462        ::aws_smithy_types::error::metadata::ProvideErrorMetadata::code(self)
463    }
464    fn retryable_error_kind(&self) -> ::std::option::Option<::aws_smithy_types::retry::ErrorKind> {
465        ::std::option::Option::None
466    }
467}
468impl ::aws_smithy_types::error::metadata::ProvideErrorMetadata for BatchGetCrawlersError {
469    fn meta(&self) -> &::aws_smithy_types::error::ErrorMetadata {
470        match self {
471            Self::InvalidInputException(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
472            Self::OperationTimeoutException(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
473            Self::Unhandled(_inner) => &_inner.meta,
474        }
475    }
476}
477impl ::aws_smithy_runtime_api::client::result::CreateUnhandledError for BatchGetCrawlersError {
478    fn create_unhandled_error(
479        source: ::std::boxed::Box<dyn ::std::error::Error + ::std::marker::Send + ::std::marker::Sync + 'static>,
480        meta: ::std::option::Option<::aws_smithy_types::error::ErrorMetadata>,
481    ) -> Self {
482        Self::Unhandled(crate::error::sealed_unhandled::Unhandled {
483            source,
484            meta: meta.unwrap_or_default(),
485        })
486    }
487}
488impl ::aws_types::request_id::RequestId for crate::operation::batch_get_crawlers::BatchGetCrawlersError {
489    fn request_id(&self) -> Option<&str> {
490        self.meta().request_id()
491    }
492}
493
494pub use crate::operation::batch_get_crawlers::_batch_get_crawlers_input::BatchGetCrawlersInput;
495
496pub use crate::operation::batch_get_crawlers::_batch_get_crawlers_output::BatchGetCrawlersOutput;
497
498mod _batch_get_crawlers_input;
499
500mod _batch_get_crawlers_output;
501
502/// Builders
503pub mod builders;