Skip to main content

aws_sdk_glue/operation/
batch_get_jobs.rs

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