Skip to main content

aws_sdk_glue/operation/
get_jobs.rs

1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2/// Orchestration and serialization glue logic for `GetJobs`.
3#[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
4#[non_exhaustive]
5pub struct GetJobs;
6impl GetJobs {
7    /// Creates a new `GetJobs`
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::get_jobs::GetJobsInput::SCHEMA;
13    /// The schema for this operation's output shape.
14    pub const OUTPUT_SCHEMA: &'static ::aws_smithy_schema::Schema<'static> = crate::operation::get_jobs::GetJobsOutput::SCHEMA;
15    pub(crate) async fn orchestrate(
16        runtime_plugins: &::aws_smithy_runtime_api::client::runtime_plugin::RuntimePlugins,
17        input: crate::operation::get_jobs::GetJobsInput,
18    ) -> ::std::result::Result<
19        crate::operation::get_jobs::GetJobsOutput,
20        ::aws_smithy_runtime_api::client::result::SdkError<
21            crate::operation::get_jobs::GetJobsError,
22            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
23        >,
24    > {
25        let map_err =
26            |err: ::aws_smithy_runtime_api::client::result::SdkError<
27                ::aws_smithy_runtime_api::client::interceptors::context::Error,
28                ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
29            >| { err.map_service_error(|err| err.downcast::<crate::operation::get_jobs::GetJobsError>().expect("correct error type")) };
30        let context = Self::orchestrate_with_stop_point(runtime_plugins, input, ::aws_smithy_runtime::client::orchestrator::StopPoint::None)
31            .await
32            .map_err(map_err)?;
33        let output = context.finalize().map_err(map_err)?;
34        ::std::result::Result::Ok(
35            output
36                .downcast::<crate::operation::get_jobs::GetJobsOutput>()
37                .expect("correct output type"),
38        )
39    }
40
41    pub(crate) async fn orchestrate_with_stop_point(
42        runtime_plugins: &::aws_smithy_runtime_api::client::runtime_plugin::RuntimePlugins,
43        input: crate::operation::get_jobs::GetJobsInput,
44        stop_point: ::aws_smithy_runtime::client::orchestrator::StopPoint,
45    ) -> ::std::result::Result<
46        ::aws_smithy_runtime_api::client::interceptors::context::InterceptorContext,
47        ::aws_smithy_runtime_api::client::result::SdkError<
48            ::aws_smithy_runtime_api::client::interceptors::context::Error,
49            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
50        >,
51    > {
52        let input = ::aws_smithy_runtime_api::client::interceptors::context::Input::erase(input);
53        use ::tracing::Instrument;
54        ::aws_smithy_runtime::client::orchestrator::invoke_with_stop_point("Glue", "GetJobs", input, runtime_plugins, stop_point)
55            // Create a parent span for the entire operation. Includes a random, internal-only,
56            // seven-digit ID for the operation orchestration so that it can be correlated in the logs.
57            .instrument(::tracing::debug_span!(
58                "Glue.GetJobs",
59                "rpc.service" = "Glue",
60                "rpc.method" = "GetJobs",
61                "sdk_invocation_id" = ::fastrand::u32(1_000_000..10_000_000),
62                "rpc.system" = "aws-api",
63            ))
64            .await
65    }
66
67    pub(crate) fn operation_runtime_plugins(
68        client_runtime_plugins: ::aws_smithy_runtime_api::client::runtime_plugin::RuntimePlugins,
69        client_config: &crate::config::Config,
70        config_override: ::std::option::Option<crate::config::Builder>,
71    ) -> ::aws_smithy_runtime_api::client::runtime_plugin::RuntimePlugins {
72        let mut runtime_plugins = client_runtime_plugins.with_operation_plugin(Self::new());
73
74        if let ::std::option::Option::Some(config_override) = config_override {
75            for plugin in config_override.runtime_plugins.iter().cloned() {
76                runtime_plugins = runtime_plugins.with_operation_plugin(plugin);
77            }
78            runtime_plugins = runtime_plugins.with_operation_plugin(crate::config::ConfigOverrideRuntimePlugin::new(
79                config_override,
80                client_config.config.clone(),
81                &client_config.runtime_components,
82            ));
83        }
84        runtime_plugins
85    }
86}
87/// Per-operation error registry. Contains an entry for every modeled
88/// error this operation can throw.
89///
90/// Used by the schema-serde error path as the operation-scoped lookup
91/// for registry-backed error reification: an error code that does not
92/// match one of the operation's modeled errors directly is resolved
93/// against this registry first, then widened to the service-wide error
94/// registry.
95pub(crate) mod error_registry {
96    pub(crate) static REGISTRY: ::std::sync::LazyLock<::aws_smithy_schema::registry::TypeRegistry> = ::std::sync::LazyLock::new(|| {
97        ::aws_smithy_schema::registry::TypeRegistry::builder()
98                            .insert_error_shape(
99                        crate::types::error::EntityNotFoundException::SCHEMA,
100                        |d: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer| -> ::std::result::Result<::aws_smithy_types::type_erasure::TypeErasedBox, ::aws_smithy_schema::serde::SerdeError> {
101                            ::std::result::Result::Ok(::aws_smithy_types::type_erasure::TypeErasedBox::new(crate::types::error::EntityNotFoundException::deserialize(d)?))
102                        },
103                        |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> {
104                            ::std::result::Result::Ok(::std::boxed::Box::new(crate::types::error::EntityNotFoundException::deserialize(d)?))
105                        },
106                    )
107.insert_error_shape(
108                        crate::types::error::InternalServiceException::SCHEMA,
109                        |d: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer| -> ::std::result::Result<::aws_smithy_types::type_erasure::TypeErasedBox, ::aws_smithy_schema::serde::SerdeError> {
110                            ::std::result::Result::Ok(::aws_smithy_types::type_erasure::TypeErasedBox::new(crate::types::error::InternalServiceException::deserialize(d)?))
111                        },
112                        |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> {
113                            ::std::result::Result::Ok(::std::boxed::Box::new(crate::types::error::InternalServiceException::deserialize(d)?))
114                        },
115                    )
116.insert_error_shape(
117                        crate::types::error::InvalidInputException::SCHEMA,
118                        |d: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer| -> ::std::result::Result<::aws_smithy_types::type_erasure::TypeErasedBox, ::aws_smithy_schema::serde::SerdeError> {
119                            ::std::result::Result::Ok(::aws_smithy_types::type_erasure::TypeErasedBox::new(crate::types::error::InvalidInputException::deserialize(d)?))
120                        },
121                        |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> {
122                            ::std::result::Result::Ok(::std::boxed::Box::new(crate::types::error::InvalidInputException::deserialize(d)?))
123                        },
124                    )
125.insert_error_shape(
126                        crate::types::error::OperationTimeoutException::SCHEMA,
127                        |d: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer| -> ::std::result::Result<::aws_smithy_types::type_erasure::TypeErasedBox, ::aws_smithy_schema::serde::SerdeError> {
128                            ::std::result::Result::Ok(::aws_smithy_types::type_erasure::TypeErasedBox::new(crate::types::error::OperationTimeoutException::deserialize(d)?))
129                        },
130                        |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> {
131                            ::std::result::Result::Ok(::std::boxed::Box::new(crate::types::error::OperationTimeoutException::deserialize(d)?))
132                        },
133                    )
134                            .build()
135    });
136}
137impl ::aws_smithy_runtime_api::client::runtime_plugin::RuntimePlugin for GetJobs {
138    fn config(&self) -> ::std::option::Option<::aws_smithy_types::config_bag::FrozenLayer> {
139        let mut cfg = ::aws_smithy_types::config_bag::Layer::new("GetJobs");
140
141        cfg.store_put(::aws_smithy_runtime_api::client::ser_de::SharedRequestSerializer::new(
142            GetJobsRequestSerializer,
143        ));
144        cfg.store_put(::aws_smithy_runtime_api::client::ser_de::SharedResponseDeserializer::new(
145            GetJobsResponseDeserializer,
146        ));
147
148        cfg.store_put(::aws_smithy_runtime_api::client::auth::AuthSchemeOptionResolverParams::new(
149            crate::config::auth::Params::builder()
150                .operation_name("GetJobs")
151                .build()
152                .expect("required fields set"),
153        ));
154
155        cfg.store_put(::aws_smithy_runtime_api::client::orchestrator::SensitiveOutput);
156        cfg.store_put(::aws_smithy_runtime_api::client::orchestrator::Metadata::new("GetJobs", "Glue"));
157        let mut signing_options = ::aws_runtime::auth::SigningOptions::default();
158        signing_options.double_uri_encode = true;
159        signing_options.content_sha256_header = false;
160        signing_options.normalize_uri_path = true;
161        signing_options.payload_override = None;
162
163        cfg.store_put(::aws_runtime::auth::SigV4OperationSigningConfig {
164            signing_options,
165            ..::std::default::Default::default()
166        });
167
168        ::std::option::Option::Some(cfg.freeze())
169    }
170
171    fn runtime_components(
172        &self,
173        _: &::aws_smithy_runtime_api::client::runtime_components::RuntimeComponentsBuilder,
174    ) -> ::std::borrow::Cow<'_, ::aws_smithy_runtime_api::client::runtime_components::RuntimeComponentsBuilder> {
175        #[allow(unused_mut)]
176        let mut rcb = ::aws_smithy_runtime_api::client::runtime_components::RuntimeComponentsBuilder::new("GetJobs")
177            .with_interceptor(::aws_smithy_runtime_api::client::interceptors::SharedInterceptor::permanent(
178                GetJobsTelemetryInputCaptureInterceptor,
179            ))
180            .with_interceptor(::aws_smithy_runtime_api::client::interceptors::SharedInterceptor::permanent(
181                ::aws_smithy_runtime::client::stalled_stream_protection::StalledStreamProtectionInterceptor::default(),
182            ))
183            .with_interceptor(::aws_smithy_runtime_api::client::interceptors::SharedInterceptor::permanent(
184                GetJobsEndpointParamsInterceptor,
185            ))
186            .with_retry_classifier(::aws_smithy_runtime::client::retries::classifiers::TransientErrorClassifier::<
187                crate::operation::get_jobs::GetJobsError,
188            >::new())
189            .with_retry_classifier(::aws_smithy_runtime::client::retries::classifiers::ModeledAsRetryableClassifier::<
190                crate::operation::get_jobs::GetJobsError,
191            >::new())
192            .with_retry_classifier(::aws_runtime::retries::classifiers::AwsErrorCodeClassifier::<
193                crate::operation::get_jobs::GetJobsError,
194            >::new())
195            .with_retry_classifier(::aws_runtime::service_clock_skew::ServiceClockSkewClassifier::<
196                crate::operation::get_jobs::GetJobsError,
197            >::new());
198
199        ::std::borrow::Cow::Owned(rcb)
200    }
201}
202
203#[derive(Debug)]
204struct GetJobsTelemetryInputCaptureInterceptor;
205
206#[::aws_smithy_runtime_api::client::interceptors::dyn_dispatch_hint]
207impl ::aws_smithy_runtime_api::client::interceptors::Intercept for GetJobsTelemetryInputCaptureInterceptor {
208    fn name(&self) -> &'static str {
209        "GetJobsTelemetryInputCaptureInterceptor"
210    }
211
212    fn read_before_execution(
213        &self,
214        context: &::aws_smithy_runtime_api::client::interceptors::context::BeforeSerializationInterceptorContextRef<
215            '_,
216            ::aws_smithy_runtime_api::client::interceptors::context::Input,
217            ::aws_smithy_runtime_api::client::interceptors::context::Output,
218            ::aws_smithy_runtime_api::client::interceptors::context::Error,
219        >,
220        cfg: &mut ::aws_smithy_types::config_bag::ConfigBag,
221    ) -> ::std::result::Result<(), ::aws_smithy_runtime_api::box_error::BoxError> {
222        // Nothing to do unless the customer opted in by naming members to record.
223        let ::std::option::Option::Some(requested) = cfg
224            .load::<::aws_smithy_types::telemetry::RequestedTelemetryAttributes>()
225            .filter(|r| !r.is_empty())
226        else {
227            return ::std::result::Result::Ok(());
228        };
229
230        let ::std::option::Option::Some(input) = context.input().downcast_ref::<GetJobsInput>() else {
231            // A mismatched input is not this interceptor's concern; skip quietly.
232            return ::std::result::Result::Ok(());
233        };
234
235        let mut captured = ::aws_smithy_types::telemetry::CapturedTelemetryAttributes::default();
236        if requested.should_capture("NextToken") {
237            if let ::std::option::Option::Some(value) = input.next_token.as_deref() {
238                captured.insert("NextToken", value);
239            }
240        }
241
242        cfg.interceptor_state().store_put(captured);
243        ::std::result::Result::Ok(())
244    }
245}
246#[derive(Debug)]
247struct GetJobsResponseDeserializer;
248impl ::aws_smithy_runtime_api::client::ser_de::DeserializeResponse for GetJobsResponseDeserializer {
249    fn deserialize_nonstreaming_with_config(
250        &self,
251        response: &::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
252        _cfg: &::aws_smithy_types::config_bag::ConfigBag,
253    ) -> ::aws_smithy_runtime_api::client::interceptors::context::OutputOrError {
254        let (success, status) = (response.status().is_success(), response.status().as_u16());
255        // Load body and headers BEFORE BeforeParseResponse so customizations
256        // (e.g., S3's `body_is_error` check that detects errors returned with
257        // HTTP 200) can inspect them. The legacy non-streaming path also
258        // loads `body` before firing this hook.
259        #[allow(unused_variables)]
260        let body = response.body().bytes().expect("body loaded");
261        let headers = response.headers();
262        #[allow(unused_mut)]
263        let mut force_error = false;
264        ::tracing::debug!(request_id = ?::aws_types::request_id::RequestId::request_id(response));
265        if !success && status != 200 || force_error {
266            let protocol = _cfg
267                .load::<::aws_smithy_schema::protocol::SharedClientProtocol>()
268                .expect("a SharedClientProtocol is required");
269            #[allow(unused_mut)]
270            let mut generic_builder = protocol.parse_error_metadata(response, _cfg).map_err(|e| {
271                ::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(::aws_smithy_runtime_api::box_error::BoxError::from(e))
272            })?;
273            generic_builder = ::aws_types::request_id::apply_request_id(generic_builder, headers);
274            let generic = generic_builder.build();
275            let error_code = match generic.code() {
276                ::std::option::Option::Some(code) => code,
277                ::std::option::Option::None => {
278                    return ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(
279                        ::aws_smithy_runtime_api::box_error::BoxError::from(crate::operation::get_jobs::GetJobsError::unhandled(generic)),
280                    ))
281                }
282            };
283            let _error_message = generic.message().map(|msg| msg.to_owned());
284            let err = match error_code {
285                "EntityNotFoundException" => crate::operation::get_jobs::GetJobsError::EntityNotFoundException({
286                    let mut deser = protocol.deserialize_error_response(response, _cfg).map_err(|e| {
287                        ::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(::aws_smithy_runtime_api::box_error::BoxError::from(
288                            e,
289                        ))
290                    })?;
291                    let mut tmp = <crate::types::error::builders::EntityNotFoundExceptionBuilder>::default();
292                    tmp.deserialize_members(&mut *deser).map_err(|e| {
293                        ::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(::aws_smithy_runtime_api::box_error::BoxError::from(
294                            e,
295                        ))
296                    })?;
297                    if tmp.message.is_none() {
298                        tmp.message = _error_message;
299                    }
300                    let tmp = tmp.meta(generic);
301                    tmp.build()
302                }),
303                "InternalServiceException" => crate::operation::get_jobs::GetJobsError::InternalServiceException({
304                    let mut deser = protocol.deserialize_error_response(response, _cfg).map_err(|e| {
305                        ::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(::aws_smithy_runtime_api::box_error::BoxError::from(
306                            e,
307                        ))
308                    })?;
309                    let mut tmp = <crate::types::error::builders::InternalServiceExceptionBuilder>::default();
310                    tmp.deserialize_members(&mut *deser).map_err(|e| {
311                        ::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(::aws_smithy_runtime_api::box_error::BoxError::from(
312                            e,
313                        ))
314                    })?;
315                    if tmp.message.is_none() {
316                        tmp.message = _error_message;
317                    }
318                    let tmp = tmp.meta(generic);
319                    tmp.build()
320                }),
321                "InvalidInputException" => crate::operation::get_jobs::GetJobsError::InvalidInputException({
322                    let mut deser = protocol.deserialize_error_response(response, _cfg).map_err(|e| {
323                        ::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(::aws_smithy_runtime_api::box_error::BoxError::from(
324                            e,
325                        ))
326                    })?;
327                    let mut tmp = <crate::types::error::builders::InvalidInputExceptionBuilder>::default();
328                    tmp.deserialize_members(&mut *deser).map_err(|e| {
329                        ::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(::aws_smithy_runtime_api::box_error::BoxError::from(
330                            e,
331                        ))
332                    })?;
333                    if tmp.message.is_none() {
334                        tmp.message = _error_message;
335                    }
336                    let tmp = tmp.meta(generic);
337                    tmp.build()
338                }),
339                "OperationTimeoutException" => crate::operation::get_jobs::GetJobsError::OperationTimeoutException({
340                    let mut deser = protocol.deserialize_error_response(response, _cfg).map_err(|e| {
341                        ::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(::aws_smithy_runtime_api::box_error::BoxError::from(
342                            e,
343                        ))
344                    })?;
345                    let mut tmp = <crate::types::error::builders::OperationTimeoutExceptionBuilder>::default();
346                    tmp.deserialize_members(&mut *deser).map_err(|e| {
347                        ::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(::aws_smithy_runtime_api::box_error::BoxError::from(
348                            e,
349                        ))
350                    })?;
351                    if tmp.message.is_none() {
352                        tmp.message = _error_message;
353                    }
354                    let tmp = tmp.meta(generic);
355                    tmp.build()
356                }),
357                _ => {
358                    // Registry-backed, operation-scoped reification of an error whose
359                    // code this operation does not model directly: the operation's own
360                    // error registry is consulted first, then the lookup widens to the
361                    // service-wide error registry. On a hit, the reified error is attached
362                    // as the source of the returned unhandled error while its metadata
363                    // (code, message, request id) is preserved; on a miss the generic
364                    // error is returned unchanged.
365                    match protocol
366                        .deserialize_error_response(response, _cfg)
367                        .ok()
368                        .and_then(|mut deser| {
369                            ::aws_smithy_schema::registry::reify_error(
370                                crate::operation::get_jobs::error_registry::REGISTRY
371                                    .or(&crate::error_type_registry::REGISTRY),
372                                error_code,
373                                &mut *deser,
374                            )
375                        }) {
376                        ::std::option::Option::Some(source) => <crate::operation::get_jobs::GetJobsError as ::aws_smithy_runtime_api::client::result::CreateUnhandledError>::create_unhandled_error(source, ::std::option::Option::Some(generic)),
377                        ::std::option::Option::None => crate::operation::get_jobs::GetJobsError::generic(generic),
378                    }
379                }
380            };
381            ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::operation(
382                ::aws_smithy_runtime_api::client::interceptors::context::Error::erase(err),
383            ))
384        } else {
385            let protocol = _cfg
386                .load::<::aws_smithy_schema::protocol::SharedClientProtocol>()
387                .expect("a SharedClientProtocol is required");
388            let mut deser = protocol.deserialize_response(response, GetJobs::OUTPUT_SCHEMA, _cfg).map_err(|e| {
389                ::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(::aws_smithy_runtime_api::box_error::BoxError::from(e))
390            })?;
391            // `headers` is already in scope from the top of the function; alias it as
392            // `_response_headers` so MutateOutput customizations have a stable name to
393            // read from.
394            let _response_headers = headers;
395            // `mut` is required because `deserialize_members` and the `MutateOutput`
396            // builder setters take `&mut self`. Marked `allow(unused_mut)` because an
397            // empty output has no members and no customizations to run.
398            #[allow(unused_mut)]
399            let mut output = <crate::operation::get_jobs::builders::GetJobsOutputBuilder>::default();
400            output.deserialize_members(&mut *deser).map_err(|e| {
401                ::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(::aws_smithy_runtime_api::box_error::BoxError::from(e))
402            })?;
403            output._set_request_id(::aws_types::request_id::RequestId::request_id(_response_headers).map(str::to_string));
404            let output = output.build();
405            ::std::result::Result::Ok(::aws_smithy_runtime_api::client::interceptors::context::Output::erase(output))
406        }
407    }
408}
409#[derive(Debug)]
410struct GetJobsRequestSerializer;
411impl ::aws_smithy_runtime_api::client::ser_de::SerializeRequest for GetJobsRequestSerializer {
412    #[allow(unused_mut, clippy::let_and_return, clippy::needless_borrow, clippy::useless_conversion)]
413    fn serialize_input(
414        &self,
415        input: ::aws_smithy_runtime_api::client::interceptors::context::Input,
416        _cfg: &mut ::aws_smithy_types::config_bag::ConfigBag,
417    ) -> ::std::result::Result<::aws_smithy_runtime_api::client::orchestrator::HttpRequest, ::aws_smithy_runtime_api::box_error::BoxError> {
418        let input = input.downcast::<crate::operation::get_jobs::GetJobsInput>().expect("correct type");
419
420        let protocol = _cfg
421            .load::<::aws_smithy_schema::protocol::SharedClientProtocol>()
422            .expect("a SharedClientProtocol is required");
423        let mut request = protocol
424            .serialize_request(&input, GetJobs::INPUT_SCHEMA, "/", _cfg)
425            .map_err(::aws_smithy_runtime_api::box_error::BoxError::from)?;
426
427        return ::std::result::Result::Ok(request);
428    }
429}
430#[derive(Debug)]
431struct GetJobsEndpointParamsInterceptor;
432
433#[::aws_smithy_runtime_api::client::interceptors::dyn_dispatch_hint]
434impl ::aws_smithy_runtime_api::client::interceptors::Intercept for GetJobsEndpointParamsInterceptor {
435    fn name(&self) -> &'static str {
436        "GetJobsEndpointParamsInterceptor"
437    }
438
439    fn read_before_execution(
440        &self,
441        context: &::aws_smithy_runtime_api::client::interceptors::context::BeforeSerializationInterceptorContextRef<
442            '_,
443            ::aws_smithy_runtime_api::client::interceptors::context::Input,
444            ::aws_smithy_runtime_api::client::interceptors::context::Output,
445            ::aws_smithy_runtime_api::client::interceptors::context::Error,
446        >,
447        cfg: &mut ::aws_smithy_types::config_bag::ConfigBag,
448    ) -> ::std::result::Result<(), ::aws_smithy_runtime_api::box_error::BoxError> {
449        let _input = context
450            .input()
451            .downcast_ref::<GetJobsInput>()
452            .ok_or("failed to downcast to GetJobsInput")?;
453
454        let params = crate::config::endpoint::Params::builder()
455            .set_region(cfg.load::<::aws_types::region::Region>().map(|r| r.as_ref().to_owned()))
456            .set_use_dual_stack(cfg.load::<::aws_types::endpoint_config::UseDualStack>().map(|ty| ty.0))
457            .set_use_fips(cfg.load::<::aws_types::endpoint_config::UseFips>().map(|ty| ty.0))
458            .set_endpoint(cfg.load::<::aws_types::endpoint_config::EndpointUrl>().map(|ty| ty.0.clone()))
459            .build()
460            .map_err(|err| {
461                ::aws_smithy_runtime_api::client::interceptors::error::ContextAttachedError::new("endpoint params could not be built", err)
462            })?;
463        cfg.interceptor_state()
464            .store_put(::aws_smithy_runtime_api::client::endpoint::EndpointResolverParams::new(params));
465        ::std::result::Result::Ok(())
466    }
467}
468
469// The get_* functions below are generated from JMESPath expressions in the
470// operationContextParams trait. They target the operation's input shape.
471
472/// Error type for the `GetJobsError` operation.
473#[non_exhaustive]
474#[derive(::std::fmt::Debug)]
475pub enum GetJobsError {
476    /// <p>A specified entity does not exist</p>
477    EntityNotFoundException(crate::types::error::EntityNotFoundException),
478    /// <p>An internal service error occurred.</p>
479    InternalServiceException(crate::types::error::InternalServiceException),
480    /// <p>The input provided was not valid.</p>
481    InvalidInputException(crate::types::error::InvalidInputException),
482    /// <p>The operation timed out.</p>
483    OperationTimeoutException(crate::types::error::OperationTimeoutException),
484    /// An unexpected error occurred (e.g., invalid JSON returned by the service or an unknown error code).
485    #[deprecated(note = "Matching `Unhandled` directly is not forwards compatible. Instead, match using a \
486    variable wildcard pattern and check `.code()`:
487     \
488    &nbsp;&nbsp;&nbsp;`err if err.code() == Some(\"SpecificExceptionCode\") => { /* handle the error */ }`
489     \
490    See [`ProvideErrorMetadata`](#impl-ProvideErrorMetadata-for-GetJobsError) for what information is available for the error.")]
491    Unhandled(crate::error::sealed_unhandled::Unhandled),
492}
493impl GetJobsError {
494    /// Creates the `GetJobsError::Unhandled` variant from any error type.
495    pub fn unhandled(
496        err: impl ::std::convert::Into<::std::boxed::Box<dyn ::std::error::Error + ::std::marker::Send + ::std::marker::Sync + 'static>>,
497    ) -> Self {
498        Self::Unhandled(crate::error::sealed_unhandled::Unhandled {
499            source: err.into(),
500            meta: ::std::default::Default::default(),
501        })
502    }
503
504    /// Creates the `GetJobsError::Unhandled` variant from an [`ErrorMetadata`](::aws_smithy_types::error::ErrorMetadata).
505    pub fn generic(err: ::aws_smithy_types::error::ErrorMetadata) -> Self {
506        Self::Unhandled(crate::error::sealed_unhandled::Unhandled {
507            source: err.clone().into(),
508            meta: err,
509        })
510    }
511    ///
512    /// Returns error metadata, which includes the error code, message,
513    /// request ID, and potentially additional information.
514    ///
515    pub fn meta(&self) -> &::aws_smithy_types::error::ErrorMetadata {
516        match self {
517            Self::EntityNotFoundException(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
518            Self::InternalServiceException(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
519            Self::InvalidInputException(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
520            Self::OperationTimeoutException(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
521            Self::Unhandled(e) => &e.meta,
522        }
523    }
524    /// Returns `true` if the error kind is `GetJobsError::EntityNotFoundException`.
525    pub fn is_entity_not_found_exception(&self) -> bool {
526        matches!(self, Self::EntityNotFoundException(_))
527    }
528    /// Returns `true` if the error kind is `GetJobsError::InternalServiceException`.
529    pub fn is_internal_service_exception(&self) -> bool {
530        matches!(self, Self::InternalServiceException(_))
531    }
532    /// Returns `true` if the error kind is `GetJobsError::InvalidInputException`.
533    pub fn is_invalid_input_exception(&self) -> bool {
534        matches!(self, Self::InvalidInputException(_))
535    }
536    /// Returns `true` if the error kind is `GetJobsError::OperationTimeoutException`.
537    pub fn is_operation_timeout_exception(&self) -> bool {
538        matches!(self, Self::OperationTimeoutException(_))
539    }
540}
541impl ::std::error::Error for GetJobsError {
542    fn source(&self) -> ::std::option::Option<&(dyn ::std::error::Error + 'static)> {
543        match self {
544            Self::EntityNotFoundException(_inner) => ::std::option::Option::Some(_inner),
545            Self::InternalServiceException(_inner) => ::std::option::Option::Some(_inner),
546            Self::InvalidInputException(_inner) => ::std::option::Option::Some(_inner),
547            Self::OperationTimeoutException(_inner) => ::std::option::Option::Some(_inner),
548            Self::Unhandled(_inner) => ::std::option::Option::Some(&*_inner.source),
549        }
550    }
551}
552impl ::std::fmt::Display for GetJobsError {
553    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
554        match self {
555            Self::EntityNotFoundException(_inner) => _inner.fmt(f),
556            Self::InternalServiceException(_inner) => _inner.fmt(f),
557            Self::InvalidInputException(_inner) => _inner.fmt(f),
558            Self::OperationTimeoutException(_inner) => _inner.fmt(f),
559            Self::Unhandled(_inner) => {
560                if let ::std::option::Option::Some(code) = ::aws_smithy_types::error::metadata::ProvideErrorMetadata::code(self) {
561                    write!(f, "unhandled error ({code})")
562                } else {
563                    f.write_str("unhandled error")
564                }
565            }
566        }
567    }
568}
569impl ::aws_smithy_types::retry::ProvideErrorKind for GetJobsError {
570    fn code(&self) -> ::std::option::Option<&str> {
571        ::aws_smithy_types::error::metadata::ProvideErrorMetadata::code(self)
572    }
573    fn retryable_error_kind(&self) -> ::std::option::Option<::aws_smithy_types::retry::ErrorKind> {
574        ::std::option::Option::None
575    }
576}
577impl ::aws_smithy_types::error::metadata::ProvideErrorMetadata for GetJobsError {
578    fn meta(&self) -> &::aws_smithy_types::error::ErrorMetadata {
579        match self {
580            Self::EntityNotFoundException(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
581            Self::InternalServiceException(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
582            Self::InvalidInputException(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
583            Self::OperationTimeoutException(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
584            Self::Unhandled(_inner) => &_inner.meta,
585        }
586    }
587}
588impl ::aws_smithy_runtime_api::client::result::CreateUnhandledError for GetJobsError {
589    fn create_unhandled_error(
590        source: ::std::boxed::Box<dyn ::std::error::Error + ::std::marker::Send + ::std::marker::Sync + 'static>,
591        meta: ::std::option::Option<::aws_smithy_types::error::ErrorMetadata>,
592    ) -> Self {
593        Self::Unhandled(crate::error::sealed_unhandled::Unhandled {
594            source,
595            meta: meta.unwrap_or_default(),
596        })
597    }
598}
599impl ::aws_types::request_id::RequestId for crate::operation::get_jobs::GetJobsError {
600    fn request_id(&self) -> Option<&str> {
601        self.meta().request_id()
602    }
603}
604
605pub use crate::operation::get_jobs::_get_jobs_input::GetJobsInput;
606
607pub use crate::operation::get_jobs::_get_jobs_output::GetJobsOutput;
608
609mod _get_jobs_input;
610
611mod _get_jobs_output;
612
613/// Builders
614pub mod builders;
615
616/// Paginator for this operation
617pub mod paginator;