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