1#[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
4#[non_exhaustive]
5pub struct ListJobs;
6impl ListJobs {
7 pub fn new() -> Self {
9 Self
10 }
11 pub const INPUT_SCHEMA: &'static ::aws_smithy_schema::Schema<'static> = crate::operation::list_jobs::ListJobsInput::SCHEMA;
13 pub const OUTPUT_SCHEMA: &'static ::aws_smithy_schema::Schema<'static> = crate::operation::list_jobs::ListJobsOutput::SCHEMA;
15 pub(crate) async fn orchestrate(
16 runtime_plugins: &::aws_smithy_runtime_api::client::runtime_plugin::RuntimePlugins,
17 input: crate::operation::list_jobs::ListJobsInput,
18 ) -> ::std::result::Result<
19 crate::operation::list_jobs::ListJobsOutput,
20 ::aws_smithy_runtime_api::client::result::SdkError<
21 crate::operation::list_jobs::ListJobsError,
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::list_jobs::ListJobsError>().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::list_jobs::ListJobsOutput>()
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::list_jobs::ListJobsInput,
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", "ListJobs", input, runtime_plugins, stop_point)
55 .instrument(::tracing::debug_span!(
58 "Glue.ListJobs",
59 "rpc.service" = "Glue",
60 "rpc.method" = "ListJobs",
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}
87pub(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 ListJobs {
138 fn config(&self) -> ::std::option::Option<::aws_smithy_types::config_bag::FrozenLayer> {
139 let mut cfg = ::aws_smithy_types::config_bag::Layer::new("ListJobs");
140
141 cfg.store_put(::aws_smithy_runtime_api::client::ser_de::SharedRequestSerializer::new(
142 ListJobsRequestSerializer,
143 ));
144 cfg.store_put(::aws_smithy_runtime_api::client::ser_de::SharedResponseDeserializer::new(
145 ListJobsResponseDeserializer,
146 ));
147
148 cfg.store_put(::aws_smithy_runtime_api::client::auth::AuthSchemeOptionResolverParams::new(
149 crate::config::auth::Params::builder()
150 .operation_name("ListJobs")
151 .build()
152 .expect("required fields set"),
153 ));
154
155 cfg.store_put(::aws_smithy_runtime_api::client::orchestrator::Metadata::new("ListJobs", "Glue"));
156 let mut signing_options = ::aws_runtime::auth::SigningOptions::default();
157 signing_options.double_uri_encode = true;
158 signing_options.content_sha256_header = false;
159 signing_options.normalize_uri_path = true;
160 signing_options.payload_override = None;
161
162 cfg.store_put(::aws_runtime::auth::SigV4OperationSigningConfig {
163 signing_options,
164 ..::std::default::Default::default()
165 });
166
167 ::std::option::Option::Some(cfg.freeze())
168 }
169
170 fn runtime_components(
171 &self,
172 _: &::aws_smithy_runtime_api::client::runtime_components::RuntimeComponentsBuilder,
173 ) -> ::std::borrow::Cow<'_, ::aws_smithy_runtime_api::client::runtime_components::RuntimeComponentsBuilder> {
174 #[allow(unused_mut)]
175 let mut rcb = ::aws_smithy_runtime_api::client::runtime_components::RuntimeComponentsBuilder::new("ListJobs")
176 .with_interceptor(::aws_smithy_runtime_api::client::interceptors::SharedInterceptor::permanent(
177 ListJobsTelemetryInputCaptureInterceptor,
178 ))
179 .with_interceptor(::aws_smithy_runtime_api::client::interceptors::SharedInterceptor::permanent(
180 ::aws_smithy_runtime::client::stalled_stream_protection::StalledStreamProtectionInterceptor::default(),
181 ))
182 .with_interceptor(::aws_smithy_runtime_api::client::interceptors::SharedInterceptor::permanent(
183 ListJobsEndpointParamsInterceptor,
184 ))
185 .with_retry_classifier(::aws_smithy_runtime::client::retries::classifiers::TransientErrorClassifier::<
186 crate::operation::list_jobs::ListJobsError,
187 >::new())
188 .with_retry_classifier(::aws_smithy_runtime::client::retries::classifiers::ModeledAsRetryableClassifier::<
189 crate::operation::list_jobs::ListJobsError,
190 >::new())
191 .with_retry_classifier(::aws_runtime::retries::classifiers::AwsErrorCodeClassifier::<
192 crate::operation::list_jobs::ListJobsError,
193 >::new())
194 .with_retry_classifier(::aws_runtime::service_clock_skew::ServiceClockSkewClassifier::<
195 crate::operation::list_jobs::ListJobsError,
196 >::new());
197
198 ::std::borrow::Cow::Owned(rcb)
199 }
200}
201
202#[derive(Debug)]
203struct ListJobsTelemetryInputCaptureInterceptor;
204
205#[::aws_smithy_runtime_api::client::interceptors::dyn_dispatch_hint]
206impl ::aws_smithy_runtime_api::client::interceptors::Intercept for ListJobsTelemetryInputCaptureInterceptor {
207 fn name(&self) -> &'static str {
208 "ListJobsTelemetryInputCaptureInterceptor"
209 }
210
211 fn read_before_execution(
212 &self,
213 context: &::aws_smithy_runtime_api::client::interceptors::context::BeforeSerializationInterceptorContextRef<
214 '_,
215 ::aws_smithy_runtime_api::client::interceptors::context::Input,
216 ::aws_smithy_runtime_api::client::interceptors::context::Output,
217 ::aws_smithy_runtime_api::client::interceptors::context::Error,
218 >,
219 cfg: &mut ::aws_smithy_types::config_bag::ConfigBag,
220 ) -> ::std::result::Result<(), ::aws_smithy_runtime_api::box_error::BoxError> {
221 let ::std::option::Option::Some(requested) = cfg
223 .load::<::aws_smithy_types::telemetry::RequestedTelemetryAttributes>()
224 .filter(|r| !r.is_empty())
225 else {
226 return ::std::result::Result::Ok(());
227 };
228
229 let ::std::option::Option::Some(input) = context.input().downcast_ref::<ListJobsInput>() else {
230 return ::std::result::Result::Ok(());
232 };
233
234 let mut captured = ::aws_smithy_types::telemetry::CapturedTelemetryAttributes::default();
235 if requested.should_capture("NextToken") {
236 if let ::std::option::Option::Some(value) = input.next_token.as_deref() {
237 captured.insert("NextToken", value);
238 }
239 }
240
241 cfg.interceptor_state().store_put(captured);
242 ::std::result::Result::Ok(())
243 }
244}
245#[derive(Debug)]
246struct ListJobsResponseDeserializer;
247impl ::aws_smithy_runtime_api::client::ser_de::DeserializeResponse for ListJobsResponseDeserializer {
248 fn deserialize_nonstreaming_with_config(
249 &self,
250 response: &::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
251 _cfg: &::aws_smithy_types::config_bag::ConfigBag,
252 ) -> ::aws_smithy_runtime_api::client::interceptors::context::OutputOrError {
253 let (success, status) = (response.status().is_success(), response.status().as_u16());
254 #[allow(unused_variables)]
259 let body = response.body().bytes().expect("body loaded");
260 let headers = response.headers();
261 #[allow(unused_mut)]
262 let mut force_error = false;
263 ::tracing::debug!(request_id = ?::aws_types::request_id::RequestId::request_id(response));
264 if !success && status != 200 || force_error {
265 let protocol = _cfg
266 .load::<::aws_smithy_schema::protocol::SharedClientProtocol>()
267 .expect("a SharedClientProtocol is required");
268 #[allow(unused_mut)]
269 let mut generic_builder = protocol.parse_error_metadata(response, _cfg).map_err(|e| {
270 ::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(::aws_smithy_runtime_api::box_error::BoxError::from(e))
271 })?;
272 generic_builder = ::aws_types::request_id::apply_request_id(generic_builder, headers);
273 let generic = generic_builder.build();
274 let error_code = match generic.code() {
275 ::std::option::Option::Some(code) => code,
276 ::std::option::Option::None => {
277 return ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(
278 ::aws_smithy_runtime_api::box_error::BoxError::from(crate::operation::list_jobs::ListJobsError::unhandled(generic)),
279 ))
280 }
281 };
282 let _error_message = generic.message().map(|msg| msg.to_owned());
283 let err = match error_code {
284 "EntityNotFoundException" => crate::operation::list_jobs::ListJobsError::EntityNotFoundException({
285 let mut deser = protocol.deserialize_error_response(response, _cfg).map_err(|e| {
286 ::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(::aws_smithy_runtime_api::box_error::BoxError::from(
287 e,
288 ))
289 })?;
290 let mut tmp = <crate::types::error::builders::EntityNotFoundExceptionBuilder>::default();
291 tmp.deserialize_members(&mut *deser).map_err(|e| {
292 ::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(::aws_smithy_runtime_api::box_error::BoxError::from(
293 e,
294 ))
295 })?;
296 if tmp.message.is_none() {
297 tmp.message = _error_message;
298 }
299 let tmp = tmp.meta(generic);
300 tmp.build()
301 }),
302 "InternalServiceException" => crate::operation::list_jobs::ListJobsError::InternalServiceException({
303 let mut deser = protocol.deserialize_error_response(response, _cfg).map_err(|e| {
304 ::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(::aws_smithy_runtime_api::box_error::BoxError::from(
305 e,
306 ))
307 })?;
308 let mut tmp = <crate::types::error::builders::InternalServiceExceptionBuilder>::default();
309 tmp.deserialize_members(&mut *deser).map_err(|e| {
310 ::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(::aws_smithy_runtime_api::box_error::BoxError::from(
311 e,
312 ))
313 })?;
314 if tmp.message.is_none() {
315 tmp.message = _error_message;
316 }
317 let tmp = tmp.meta(generic);
318 tmp.build()
319 }),
320 "InvalidInputException" => crate::operation::list_jobs::ListJobsError::InvalidInputException({
321 let mut deser = protocol.deserialize_error_response(response, _cfg).map_err(|e| {
322 ::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(::aws_smithy_runtime_api::box_error::BoxError::from(
323 e,
324 ))
325 })?;
326 let mut tmp = <crate::types::error::builders::InvalidInputExceptionBuilder>::default();
327 tmp.deserialize_members(&mut *deser).map_err(|e| {
328 ::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(::aws_smithy_runtime_api::box_error::BoxError::from(
329 e,
330 ))
331 })?;
332 if tmp.message.is_none() {
333 tmp.message = _error_message;
334 }
335 let tmp = tmp.meta(generic);
336 tmp.build()
337 }),
338 "OperationTimeoutException" => crate::operation::list_jobs::ListJobsError::OperationTimeoutException({
339 let mut deser = protocol.deserialize_error_response(response, _cfg).map_err(|e| {
340 ::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(::aws_smithy_runtime_api::box_error::BoxError::from(
341 e,
342 ))
343 })?;
344 let mut tmp = <crate::types::error::builders::OperationTimeoutExceptionBuilder>::default();
345 tmp.deserialize_members(&mut *deser).map_err(|e| {
346 ::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(::aws_smithy_runtime_api::box_error::BoxError::from(
347 e,
348 ))
349 })?;
350 if tmp.message.is_none() {
351 tmp.message = _error_message;
352 }
353 let tmp = tmp.meta(generic);
354 tmp.build()
355 }),
356 _ => {
357 match protocol
365 .deserialize_error_response(response, _cfg)
366 .ok()
367 .and_then(|mut deser| {
368 ::aws_smithy_schema::registry::reify_error(
369 crate::operation::list_jobs::error_registry::REGISTRY
370 .or(&crate::error_type_registry::REGISTRY),
371 error_code,
372 &mut *deser,
373 )
374 }) {
375 ::std::option::Option::Some(source) => <crate::operation::list_jobs::ListJobsError as ::aws_smithy_runtime_api::client::result::CreateUnhandledError>::create_unhandled_error(source, ::std::option::Option::Some(generic)),
376 ::std::option::Option::None => crate::operation::list_jobs::ListJobsError::generic(generic),
377 }
378 }
379 };
380 ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::operation(
381 ::aws_smithy_runtime_api::client::interceptors::context::Error::erase(err),
382 ))
383 } else {
384 let protocol = _cfg
385 .load::<::aws_smithy_schema::protocol::SharedClientProtocol>()
386 .expect("a SharedClientProtocol is required");
387 let mut deser = protocol.deserialize_response(response, ListJobs::OUTPUT_SCHEMA, _cfg).map_err(|e| {
388 ::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(::aws_smithy_runtime_api::box_error::BoxError::from(e))
389 })?;
390 let _response_headers = headers;
394 #[allow(unused_mut)]
398 let mut output = <crate::operation::list_jobs::builders::ListJobsOutputBuilder>::default();
399 output.deserialize_members(&mut *deser).map_err(|e| {
400 ::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(::aws_smithy_runtime_api::box_error::BoxError::from(e))
401 })?;
402 output._set_request_id(::aws_types::request_id::RequestId::request_id(_response_headers).map(str::to_string));
403 let output = output.build();
404 ::std::result::Result::Ok(::aws_smithy_runtime_api::client::interceptors::context::Output::erase(output))
405 }
406 }
407}
408#[derive(Debug)]
409struct ListJobsRequestSerializer;
410impl ::aws_smithy_runtime_api::client::ser_de::SerializeRequest for ListJobsRequestSerializer {
411 #[allow(unused_mut, clippy::let_and_return, clippy::needless_borrow, clippy::useless_conversion)]
412 fn serialize_input(
413 &self,
414 input: ::aws_smithy_runtime_api::client::interceptors::context::Input,
415 _cfg: &mut ::aws_smithy_types::config_bag::ConfigBag,
416 ) -> ::std::result::Result<::aws_smithy_runtime_api::client::orchestrator::HttpRequest, ::aws_smithy_runtime_api::box_error::BoxError> {
417 let input = input.downcast::<crate::operation::list_jobs::ListJobsInput>().expect("correct type");
418
419 let protocol = _cfg
420 .load::<::aws_smithy_schema::protocol::SharedClientProtocol>()
421 .expect("a SharedClientProtocol is required");
422 let mut request = protocol
423 .serialize_request(&input, ListJobs::INPUT_SCHEMA, "/", _cfg)
424 .map_err(::aws_smithy_runtime_api::box_error::BoxError::from)?;
425
426 return ::std::result::Result::Ok(request);
427 }
428}
429#[derive(Debug)]
430struct ListJobsEndpointParamsInterceptor;
431
432#[::aws_smithy_runtime_api::client::interceptors::dyn_dispatch_hint]
433impl ::aws_smithy_runtime_api::client::interceptors::Intercept for ListJobsEndpointParamsInterceptor {
434 fn name(&self) -> &'static str {
435 "ListJobsEndpointParamsInterceptor"
436 }
437
438 fn read_before_execution(
439 &self,
440 context: &::aws_smithy_runtime_api::client::interceptors::context::BeforeSerializationInterceptorContextRef<
441 '_,
442 ::aws_smithy_runtime_api::client::interceptors::context::Input,
443 ::aws_smithy_runtime_api::client::interceptors::context::Output,
444 ::aws_smithy_runtime_api::client::interceptors::context::Error,
445 >,
446 cfg: &mut ::aws_smithy_types::config_bag::ConfigBag,
447 ) -> ::std::result::Result<(), ::aws_smithy_runtime_api::box_error::BoxError> {
448 let _input = context
449 .input()
450 .downcast_ref::<ListJobsInput>()
451 .ok_or("failed to downcast to ListJobsInput")?;
452
453 let params = crate::config::endpoint::Params::builder()
454 .set_region(cfg.load::<::aws_types::region::Region>().map(|r| r.as_ref().to_owned()))
455 .set_use_dual_stack(cfg.load::<::aws_types::endpoint_config::UseDualStack>().map(|ty| ty.0))
456 .set_use_fips(cfg.load::<::aws_types::endpoint_config::UseFips>().map(|ty| ty.0))
457 .set_endpoint(cfg.load::<::aws_types::endpoint_config::EndpointUrl>().map(|ty| ty.0.clone()))
458 .build()
459 .map_err(|err| {
460 ::aws_smithy_runtime_api::client::interceptors::error::ContextAttachedError::new("endpoint params could not be built", err)
461 })?;
462 cfg.interceptor_state()
463 .store_put(::aws_smithy_runtime_api::client::endpoint::EndpointResolverParams::new(params));
464 ::std::result::Result::Ok(())
465 }
466}
467
468#[non_exhaustive]
473#[derive(::std::fmt::Debug)]
474pub enum ListJobsError {
475 EntityNotFoundException(crate::types::error::EntityNotFoundException),
477 InternalServiceException(crate::types::error::InternalServiceException),
479 InvalidInputException(crate::types::error::InvalidInputException),
481 OperationTimeoutException(crate::types::error::OperationTimeoutException),
483 #[deprecated(note = "Matching `Unhandled` directly is not forwards compatible. Instead, match using a \
485 variable wildcard pattern and check `.code()`:
486 \
487 `err if err.code() == Some(\"SpecificExceptionCode\") => { /* handle the error */ }`
488 \
489 See [`ProvideErrorMetadata`](#impl-ProvideErrorMetadata-for-ListJobsError) for what information is available for the error.")]
490 Unhandled(crate::error::sealed_unhandled::Unhandled),
491}
492impl ListJobsError {
493 pub fn unhandled(
495 err: impl ::std::convert::Into<::std::boxed::Box<dyn ::std::error::Error + ::std::marker::Send + ::std::marker::Sync + 'static>>,
496 ) -> Self {
497 Self::Unhandled(crate::error::sealed_unhandled::Unhandled {
498 source: err.into(),
499 meta: ::std::default::Default::default(),
500 })
501 }
502
503 pub fn generic(err: ::aws_smithy_types::error::ErrorMetadata) -> Self {
505 Self::Unhandled(crate::error::sealed_unhandled::Unhandled {
506 source: err.clone().into(),
507 meta: err,
508 })
509 }
510 pub fn meta(&self) -> &::aws_smithy_types::error::ErrorMetadata {
515 match self {
516 Self::EntityNotFoundException(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
517 Self::InternalServiceException(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
518 Self::InvalidInputException(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
519 Self::OperationTimeoutException(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
520 Self::Unhandled(e) => &e.meta,
521 }
522 }
523 pub fn is_entity_not_found_exception(&self) -> bool {
525 matches!(self, Self::EntityNotFoundException(_))
526 }
527 pub fn is_internal_service_exception(&self) -> bool {
529 matches!(self, Self::InternalServiceException(_))
530 }
531 pub fn is_invalid_input_exception(&self) -> bool {
533 matches!(self, Self::InvalidInputException(_))
534 }
535 pub fn is_operation_timeout_exception(&self) -> bool {
537 matches!(self, Self::OperationTimeoutException(_))
538 }
539}
540impl ::std::error::Error for ListJobsError {
541 fn source(&self) -> ::std::option::Option<&(dyn ::std::error::Error + 'static)> {
542 match self {
543 Self::EntityNotFoundException(_inner) => ::std::option::Option::Some(_inner),
544 Self::InternalServiceException(_inner) => ::std::option::Option::Some(_inner),
545 Self::InvalidInputException(_inner) => ::std::option::Option::Some(_inner),
546 Self::OperationTimeoutException(_inner) => ::std::option::Option::Some(_inner),
547 Self::Unhandled(_inner) => ::std::option::Option::Some(&*_inner.source),
548 }
549 }
550}
551impl ::std::fmt::Display for ListJobsError {
552 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
553 match self {
554 Self::EntityNotFoundException(_inner) => _inner.fmt(f),
555 Self::InternalServiceException(_inner) => _inner.fmt(f),
556 Self::InvalidInputException(_inner) => _inner.fmt(f),
557 Self::OperationTimeoutException(_inner) => _inner.fmt(f),
558 Self::Unhandled(_inner) => {
559 if let ::std::option::Option::Some(code) = ::aws_smithy_types::error::metadata::ProvideErrorMetadata::code(self) {
560 write!(f, "unhandled error ({code})")
561 } else {
562 f.write_str("unhandled error")
563 }
564 }
565 }
566 }
567}
568impl ::aws_smithy_types::retry::ProvideErrorKind for ListJobsError {
569 fn code(&self) -> ::std::option::Option<&str> {
570 ::aws_smithy_types::error::metadata::ProvideErrorMetadata::code(self)
571 }
572 fn retryable_error_kind(&self) -> ::std::option::Option<::aws_smithy_types::retry::ErrorKind> {
573 ::std::option::Option::None
574 }
575}
576impl ::aws_smithy_types::error::metadata::ProvideErrorMetadata for ListJobsError {
577 fn meta(&self) -> &::aws_smithy_types::error::ErrorMetadata {
578 match self {
579 Self::EntityNotFoundException(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
580 Self::InternalServiceException(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
581 Self::InvalidInputException(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
582 Self::OperationTimeoutException(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
583 Self::Unhandled(_inner) => &_inner.meta,
584 }
585 }
586}
587impl ::aws_smithy_runtime_api::client::result::CreateUnhandledError for ListJobsError {
588 fn create_unhandled_error(
589 source: ::std::boxed::Box<dyn ::std::error::Error + ::std::marker::Send + ::std::marker::Sync + 'static>,
590 meta: ::std::option::Option<::aws_smithy_types::error::ErrorMetadata>,
591 ) -> Self {
592 Self::Unhandled(crate::error::sealed_unhandled::Unhandled {
593 source,
594 meta: meta.unwrap_or_default(),
595 })
596 }
597}
598impl ::aws_types::request_id::RequestId for crate::operation::list_jobs::ListJobsError {
599 fn request_id(&self) -> Option<&str> {
600 self.meta().request_id()
601 }
602}
603
604pub use crate::operation::list_jobs::_list_jobs_input::ListJobsInput;
605
606pub use crate::operation::list_jobs::_list_jobs_output::ListJobsOutput;
607
608mod _list_jobs_input;
609
610mod _list_jobs_output;
611
612pub mod builders;
614
615pub mod paginator;