aws_sdk_batch/
error_meta.rs

1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2/// All possible error types for this service.
3#[non_exhaustive]
4#[derive(::std::fmt::Debug)]
5pub enum Error {
6    /// <p>These errors are usually caused by a client action. One example cause is using an action or resource on behalf of a user that doesn't have permissions to use the action or resource. Another cause is specifying an identifier that's not valid.</p>
7    ClientException(crate::types::error::ClientException),
8    /// <p>These errors are usually caused by a server issue.</p>
9    ServerException(crate::types::error::ServerException),
10    /// An unexpected error occurred (e.g., invalid JSON returned by the service or an unknown error code).
11    #[deprecated(note = "Matching `Unhandled` directly is not forwards compatible. Instead, match using a \
12    variable wildcard pattern and check `.code()`:
13     \
14    &nbsp;&nbsp;&nbsp;`err if err.code() == Some(\"SpecificExceptionCode\") => { /* handle the error */ }`
15     \
16    See [`ProvideErrorMetadata`](#impl-ProvideErrorMetadata-for-Error) for what information is available for the error.")]
17    Unhandled(crate::error::sealed_unhandled::Unhandled),
18}
19impl ::std::fmt::Display for Error {
20    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
21        match self {
22            Error::ClientException(inner) => inner.fmt(f),
23            Error::ServerException(inner) => inner.fmt(f),
24            Error::Unhandled(_) => {
25                if let ::std::option::Option::Some(code) = ::aws_smithy_types::error::metadata::ProvideErrorMetadata::code(self) {
26                    write!(f, "unhandled error ({code})")
27                } else {
28                    f.write_str("unhandled error")
29                }
30            }
31        }
32    }
33}
34impl From<::aws_smithy_types::error::operation::BuildError> for Error {
35    fn from(value: ::aws_smithy_types::error::operation::BuildError) -> Self {
36        Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
37            source: value.into(),
38            meta: ::std::default::Default::default(),
39        })
40    }
41}
42impl ::aws_smithy_types::error::metadata::ProvideErrorMetadata for Error {
43    fn meta(&self) -> &::aws_smithy_types::error::metadata::ErrorMetadata {
44        match self {
45            Self::ClientException(inner) => inner.meta(),
46            Self::ServerException(inner) => inner.meta(),
47            Self::Unhandled(inner) => &inner.meta,
48        }
49    }
50}
51impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::cancel_job::CancelJobError, R>> for Error
52where
53    R: Send + Sync + std::fmt::Debug + 'static,
54{
55    fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::cancel_job::CancelJobError, R>) -> Self {
56        match err {
57            ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
58            _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
59                meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
60                source: err.into(),
61            }),
62        }
63    }
64}
65impl From<crate::operation::cancel_job::CancelJobError> for Error {
66    fn from(err: crate::operation::cancel_job::CancelJobError) -> Self {
67        match err {
68            crate::operation::cancel_job::CancelJobError::ClientException(inner) => Error::ClientException(inner),
69            crate::operation::cancel_job::CancelJobError::ServerException(inner) => Error::ServerException(inner),
70            crate::operation::cancel_job::CancelJobError::Unhandled(inner) => Error::Unhandled(inner),
71        }
72    }
73}
74impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::create_compute_environment::CreateComputeEnvironmentError, R>>
75    for Error
76where
77    R: Send + Sync + std::fmt::Debug + 'static,
78{
79    fn from(
80        err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::create_compute_environment::CreateComputeEnvironmentError, R>,
81    ) -> Self {
82        match err {
83            ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
84            _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
85                meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
86                source: err.into(),
87            }),
88        }
89    }
90}
91impl From<crate::operation::create_compute_environment::CreateComputeEnvironmentError> for Error {
92    fn from(err: crate::operation::create_compute_environment::CreateComputeEnvironmentError) -> Self {
93        match err {
94            crate::operation::create_compute_environment::CreateComputeEnvironmentError::ClientException(inner) => Error::ClientException(inner),
95            crate::operation::create_compute_environment::CreateComputeEnvironmentError::ServerException(inner) => Error::ServerException(inner),
96            crate::operation::create_compute_environment::CreateComputeEnvironmentError::Unhandled(inner) => Error::Unhandled(inner),
97        }
98    }
99}
100impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::create_consumable_resource::CreateConsumableResourceError, R>>
101    for Error
102where
103    R: Send + Sync + std::fmt::Debug + 'static,
104{
105    fn from(
106        err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::create_consumable_resource::CreateConsumableResourceError, R>,
107    ) -> Self {
108        match err {
109            ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
110            _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
111                meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
112                source: err.into(),
113            }),
114        }
115    }
116}
117impl From<crate::operation::create_consumable_resource::CreateConsumableResourceError> for Error {
118    fn from(err: crate::operation::create_consumable_resource::CreateConsumableResourceError) -> Self {
119        match err {
120            crate::operation::create_consumable_resource::CreateConsumableResourceError::ClientException(inner) => Error::ClientException(inner),
121            crate::operation::create_consumable_resource::CreateConsumableResourceError::ServerException(inner) => Error::ServerException(inner),
122            crate::operation::create_consumable_resource::CreateConsumableResourceError::Unhandled(inner) => Error::Unhandled(inner),
123        }
124    }
125}
126impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::create_job_queue::CreateJobQueueError, R>> for Error
127where
128    R: Send + Sync + std::fmt::Debug + 'static,
129{
130    fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::create_job_queue::CreateJobQueueError, R>) -> Self {
131        match err {
132            ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
133            _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
134                meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
135                source: err.into(),
136            }),
137        }
138    }
139}
140impl From<crate::operation::create_job_queue::CreateJobQueueError> for Error {
141    fn from(err: crate::operation::create_job_queue::CreateJobQueueError) -> Self {
142        match err {
143            crate::operation::create_job_queue::CreateJobQueueError::ClientException(inner) => Error::ClientException(inner),
144            crate::operation::create_job_queue::CreateJobQueueError::ServerException(inner) => Error::ServerException(inner),
145            crate::operation::create_job_queue::CreateJobQueueError::Unhandled(inner) => Error::Unhandled(inner),
146        }
147    }
148}
149impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::create_scheduling_policy::CreateSchedulingPolicyError, R>> for Error
150where
151    R: Send + Sync + std::fmt::Debug + 'static,
152{
153    fn from(
154        err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::create_scheduling_policy::CreateSchedulingPolicyError, R>,
155    ) -> Self {
156        match err {
157            ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
158            _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
159                meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
160                source: err.into(),
161            }),
162        }
163    }
164}
165impl From<crate::operation::create_scheduling_policy::CreateSchedulingPolicyError> for Error {
166    fn from(err: crate::operation::create_scheduling_policy::CreateSchedulingPolicyError) -> Self {
167        match err {
168            crate::operation::create_scheduling_policy::CreateSchedulingPolicyError::ClientException(inner) => Error::ClientException(inner),
169            crate::operation::create_scheduling_policy::CreateSchedulingPolicyError::ServerException(inner) => Error::ServerException(inner),
170            crate::operation::create_scheduling_policy::CreateSchedulingPolicyError::Unhandled(inner) => Error::Unhandled(inner),
171        }
172    }
173}
174impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::create_service_environment::CreateServiceEnvironmentError, R>>
175    for Error
176where
177    R: Send + Sync + std::fmt::Debug + 'static,
178{
179    fn from(
180        err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::create_service_environment::CreateServiceEnvironmentError, R>,
181    ) -> Self {
182        match err {
183            ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
184            _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
185                meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
186                source: err.into(),
187            }),
188        }
189    }
190}
191impl From<crate::operation::create_service_environment::CreateServiceEnvironmentError> for Error {
192    fn from(err: crate::operation::create_service_environment::CreateServiceEnvironmentError) -> Self {
193        match err {
194            crate::operation::create_service_environment::CreateServiceEnvironmentError::ClientException(inner) => Error::ClientException(inner),
195            crate::operation::create_service_environment::CreateServiceEnvironmentError::ServerException(inner) => Error::ServerException(inner),
196            crate::operation::create_service_environment::CreateServiceEnvironmentError::Unhandled(inner) => Error::Unhandled(inner),
197        }
198    }
199}
200impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::delete_compute_environment::DeleteComputeEnvironmentError, R>>
201    for Error
202where
203    R: Send + Sync + std::fmt::Debug + 'static,
204{
205    fn from(
206        err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::delete_compute_environment::DeleteComputeEnvironmentError, R>,
207    ) -> Self {
208        match err {
209            ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
210            _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
211                meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
212                source: err.into(),
213            }),
214        }
215    }
216}
217impl From<crate::operation::delete_compute_environment::DeleteComputeEnvironmentError> for Error {
218    fn from(err: crate::operation::delete_compute_environment::DeleteComputeEnvironmentError) -> Self {
219        match err {
220            crate::operation::delete_compute_environment::DeleteComputeEnvironmentError::ClientException(inner) => Error::ClientException(inner),
221            crate::operation::delete_compute_environment::DeleteComputeEnvironmentError::ServerException(inner) => Error::ServerException(inner),
222            crate::operation::delete_compute_environment::DeleteComputeEnvironmentError::Unhandled(inner) => Error::Unhandled(inner),
223        }
224    }
225}
226impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::delete_consumable_resource::DeleteConsumableResourceError, R>>
227    for Error
228where
229    R: Send + Sync + std::fmt::Debug + 'static,
230{
231    fn from(
232        err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::delete_consumable_resource::DeleteConsumableResourceError, R>,
233    ) -> Self {
234        match err {
235            ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
236            _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
237                meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
238                source: err.into(),
239            }),
240        }
241    }
242}
243impl From<crate::operation::delete_consumable_resource::DeleteConsumableResourceError> for Error {
244    fn from(err: crate::operation::delete_consumable_resource::DeleteConsumableResourceError) -> Self {
245        match err {
246            crate::operation::delete_consumable_resource::DeleteConsumableResourceError::ClientException(inner) => Error::ClientException(inner),
247            crate::operation::delete_consumable_resource::DeleteConsumableResourceError::ServerException(inner) => Error::ServerException(inner),
248            crate::operation::delete_consumable_resource::DeleteConsumableResourceError::Unhandled(inner) => Error::Unhandled(inner),
249        }
250    }
251}
252impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::delete_job_queue::DeleteJobQueueError, R>> for Error
253where
254    R: Send + Sync + std::fmt::Debug + 'static,
255{
256    fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::delete_job_queue::DeleteJobQueueError, R>) -> Self {
257        match err {
258            ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
259            _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
260                meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
261                source: err.into(),
262            }),
263        }
264    }
265}
266impl From<crate::operation::delete_job_queue::DeleteJobQueueError> for Error {
267    fn from(err: crate::operation::delete_job_queue::DeleteJobQueueError) -> Self {
268        match err {
269            crate::operation::delete_job_queue::DeleteJobQueueError::ClientException(inner) => Error::ClientException(inner),
270            crate::operation::delete_job_queue::DeleteJobQueueError::ServerException(inner) => Error::ServerException(inner),
271            crate::operation::delete_job_queue::DeleteJobQueueError::Unhandled(inner) => Error::Unhandled(inner),
272        }
273    }
274}
275impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::delete_scheduling_policy::DeleteSchedulingPolicyError, R>> for Error
276where
277    R: Send + Sync + std::fmt::Debug + 'static,
278{
279    fn from(
280        err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::delete_scheduling_policy::DeleteSchedulingPolicyError, R>,
281    ) -> Self {
282        match err {
283            ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
284            _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
285                meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
286                source: err.into(),
287            }),
288        }
289    }
290}
291impl From<crate::operation::delete_scheduling_policy::DeleteSchedulingPolicyError> for Error {
292    fn from(err: crate::operation::delete_scheduling_policy::DeleteSchedulingPolicyError) -> Self {
293        match err {
294            crate::operation::delete_scheduling_policy::DeleteSchedulingPolicyError::ClientException(inner) => Error::ClientException(inner),
295            crate::operation::delete_scheduling_policy::DeleteSchedulingPolicyError::ServerException(inner) => Error::ServerException(inner),
296            crate::operation::delete_scheduling_policy::DeleteSchedulingPolicyError::Unhandled(inner) => Error::Unhandled(inner),
297        }
298    }
299}
300impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::delete_service_environment::DeleteServiceEnvironmentError, R>>
301    for Error
302where
303    R: Send + Sync + std::fmt::Debug + 'static,
304{
305    fn from(
306        err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::delete_service_environment::DeleteServiceEnvironmentError, R>,
307    ) -> Self {
308        match err {
309            ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
310            _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
311                meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
312                source: err.into(),
313            }),
314        }
315    }
316}
317impl From<crate::operation::delete_service_environment::DeleteServiceEnvironmentError> for Error {
318    fn from(err: crate::operation::delete_service_environment::DeleteServiceEnvironmentError) -> Self {
319        match err {
320            crate::operation::delete_service_environment::DeleteServiceEnvironmentError::ClientException(inner) => Error::ClientException(inner),
321            crate::operation::delete_service_environment::DeleteServiceEnvironmentError::ServerException(inner) => Error::ServerException(inner),
322            crate::operation::delete_service_environment::DeleteServiceEnvironmentError::Unhandled(inner) => Error::Unhandled(inner),
323        }
324    }
325}
326impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::deregister_job_definition::DeregisterJobDefinitionError, R>>
327    for Error
328where
329    R: Send + Sync + std::fmt::Debug + 'static,
330{
331    fn from(
332        err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::deregister_job_definition::DeregisterJobDefinitionError, R>,
333    ) -> Self {
334        match err {
335            ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
336            _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
337                meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
338                source: err.into(),
339            }),
340        }
341    }
342}
343impl From<crate::operation::deregister_job_definition::DeregisterJobDefinitionError> for Error {
344    fn from(err: crate::operation::deregister_job_definition::DeregisterJobDefinitionError) -> Self {
345        match err {
346            crate::operation::deregister_job_definition::DeregisterJobDefinitionError::ClientException(inner) => Error::ClientException(inner),
347            crate::operation::deregister_job_definition::DeregisterJobDefinitionError::ServerException(inner) => Error::ServerException(inner),
348            crate::operation::deregister_job_definition::DeregisterJobDefinitionError::Unhandled(inner) => Error::Unhandled(inner),
349        }
350    }
351}
352impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::describe_compute_environments::DescribeComputeEnvironmentsError, R>>
353    for Error
354where
355    R: Send + Sync + std::fmt::Debug + 'static,
356{
357    fn from(
358        err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::describe_compute_environments::DescribeComputeEnvironmentsError, R>,
359    ) -> Self {
360        match err {
361            ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
362            _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
363                meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
364                source: err.into(),
365            }),
366        }
367    }
368}
369impl From<crate::operation::describe_compute_environments::DescribeComputeEnvironmentsError> for Error {
370    fn from(err: crate::operation::describe_compute_environments::DescribeComputeEnvironmentsError) -> Self {
371        match err {
372            crate::operation::describe_compute_environments::DescribeComputeEnvironmentsError::ClientException(inner) => {
373                Error::ClientException(inner)
374            }
375            crate::operation::describe_compute_environments::DescribeComputeEnvironmentsError::ServerException(inner) => {
376                Error::ServerException(inner)
377            }
378            crate::operation::describe_compute_environments::DescribeComputeEnvironmentsError::Unhandled(inner) => Error::Unhandled(inner),
379        }
380    }
381}
382impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::describe_consumable_resource::DescribeConsumableResourceError, R>>
383    for Error
384where
385    R: Send + Sync + std::fmt::Debug + 'static,
386{
387    fn from(
388        err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::describe_consumable_resource::DescribeConsumableResourceError, R>,
389    ) -> Self {
390        match err {
391            ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
392            _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
393                meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
394                source: err.into(),
395            }),
396        }
397    }
398}
399impl From<crate::operation::describe_consumable_resource::DescribeConsumableResourceError> for Error {
400    fn from(err: crate::operation::describe_consumable_resource::DescribeConsumableResourceError) -> Self {
401        match err {
402            crate::operation::describe_consumable_resource::DescribeConsumableResourceError::ClientException(inner) => Error::ClientException(inner),
403            crate::operation::describe_consumable_resource::DescribeConsumableResourceError::ServerException(inner) => Error::ServerException(inner),
404            crate::operation::describe_consumable_resource::DescribeConsumableResourceError::Unhandled(inner) => Error::Unhandled(inner),
405        }
406    }
407}
408impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::describe_job_definitions::DescribeJobDefinitionsError, R>> for Error
409where
410    R: Send + Sync + std::fmt::Debug + 'static,
411{
412    fn from(
413        err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::describe_job_definitions::DescribeJobDefinitionsError, R>,
414    ) -> Self {
415        match err {
416            ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
417            _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
418                meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
419                source: err.into(),
420            }),
421        }
422    }
423}
424impl From<crate::operation::describe_job_definitions::DescribeJobDefinitionsError> for Error {
425    fn from(err: crate::operation::describe_job_definitions::DescribeJobDefinitionsError) -> Self {
426        match err {
427            crate::operation::describe_job_definitions::DescribeJobDefinitionsError::ClientException(inner) => Error::ClientException(inner),
428            crate::operation::describe_job_definitions::DescribeJobDefinitionsError::ServerException(inner) => Error::ServerException(inner),
429            crate::operation::describe_job_definitions::DescribeJobDefinitionsError::Unhandled(inner) => Error::Unhandled(inner),
430        }
431    }
432}
433impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::describe_job_queues::DescribeJobQueuesError, R>> for Error
434where
435    R: Send + Sync + std::fmt::Debug + 'static,
436{
437    fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::describe_job_queues::DescribeJobQueuesError, R>) -> Self {
438        match err {
439            ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
440            _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
441                meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
442                source: err.into(),
443            }),
444        }
445    }
446}
447impl From<crate::operation::describe_job_queues::DescribeJobQueuesError> for Error {
448    fn from(err: crate::operation::describe_job_queues::DescribeJobQueuesError) -> Self {
449        match err {
450            crate::operation::describe_job_queues::DescribeJobQueuesError::ClientException(inner) => Error::ClientException(inner),
451            crate::operation::describe_job_queues::DescribeJobQueuesError::ServerException(inner) => Error::ServerException(inner),
452            crate::operation::describe_job_queues::DescribeJobQueuesError::Unhandled(inner) => Error::Unhandled(inner),
453        }
454    }
455}
456impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::describe_jobs::DescribeJobsError, R>> for Error
457where
458    R: Send + Sync + std::fmt::Debug + 'static,
459{
460    fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::describe_jobs::DescribeJobsError, R>) -> Self {
461        match err {
462            ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
463            _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
464                meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
465                source: err.into(),
466            }),
467        }
468    }
469}
470impl From<crate::operation::describe_jobs::DescribeJobsError> for Error {
471    fn from(err: crate::operation::describe_jobs::DescribeJobsError) -> Self {
472        match err {
473            crate::operation::describe_jobs::DescribeJobsError::ClientException(inner) => Error::ClientException(inner),
474            crate::operation::describe_jobs::DescribeJobsError::ServerException(inner) => Error::ServerException(inner),
475            crate::operation::describe_jobs::DescribeJobsError::Unhandled(inner) => Error::Unhandled(inner),
476        }
477    }
478}
479impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::describe_scheduling_policies::DescribeSchedulingPoliciesError, R>>
480    for Error
481where
482    R: Send + Sync + std::fmt::Debug + 'static,
483{
484    fn from(
485        err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::describe_scheduling_policies::DescribeSchedulingPoliciesError, R>,
486    ) -> Self {
487        match err {
488            ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
489            _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
490                meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
491                source: err.into(),
492            }),
493        }
494    }
495}
496impl From<crate::operation::describe_scheduling_policies::DescribeSchedulingPoliciesError> for Error {
497    fn from(err: crate::operation::describe_scheduling_policies::DescribeSchedulingPoliciesError) -> Self {
498        match err {
499            crate::operation::describe_scheduling_policies::DescribeSchedulingPoliciesError::ClientException(inner) => Error::ClientException(inner),
500            crate::operation::describe_scheduling_policies::DescribeSchedulingPoliciesError::ServerException(inner) => Error::ServerException(inner),
501            crate::operation::describe_scheduling_policies::DescribeSchedulingPoliciesError::Unhandled(inner) => Error::Unhandled(inner),
502        }
503    }
504}
505impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::describe_service_environments::DescribeServiceEnvironmentsError, R>>
506    for Error
507where
508    R: Send + Sync + std::fmt::Debug + 'static,
509{
510    fn from(
511        err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::describe_service_environments::DescribeServiceEnvironmentsError, R>,
512    ) -> Self {
513        match err {
514            ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
515            _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
516                meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
517                source: err.into(),
518            }),
519        }
520    }
521}
522impl From<crate::operation::describe_service_environments::DescribeServiceEnvironmentsError> for Error {
523    fn from(err: crate::operation::describe_service_environments::DescribeServiceEnvironmentsError) -> Self {
524        match err {
525            crate::operation::describe_service_environments::DescribeServiceEnvironmentsError::ClientException(inner) => {
526                Error::ClientException(inner)
527            }
528            crate::operation::describe_service_environments::DescribeServiceEnvironmentsError::ServerException(inner) => {
529                Error::ServerException(inner)
530            }
531            crate::operation::describe_service_environments::DescribeServiceEnvironmentsError::Unhandled(inner) => Error::Unhandled(inner),
532        }
533    }
534}
535impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::describe_service_job::DescribeServiceJobError, R>> for Error
536where
537    R: Send + Sync + std::fmt::Debug + 'static,
538{
539    fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::describe_service_job::DescribeServiceJobError, R>) -> Self {
540        match err {
541            ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
542            _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
543                meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
544                source: err.into(),
545            }),
546        }
547    }
548}
549impl From<crate::operation::describe_service_job::DescribeServiceJobError> for Error {
550    fn from(err: crate::operation::describe_service_job::DescribeServiceJobError) -> Self {
551        match err {
552            crate::operation::describe_service_job::DescribeServiceJobError::ClientException(inner) => Error::ClientException(inner),
553            crate::operation::describe_service_job::DescribeServiceJobError::ServerException(inner) => Error::ServerException(inner),
554            crate::operation::describe_service_job::DescribeServiceJobError::Unhandled(inner) => Error::Unhandled(inner),
555        }
556    }
557}
558impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::get_job_queue_snapshot::GetJobQueueSnapshotError, R>> for Error
559where
560    R: Send + Sync + std::fmt::Debug + 'static,
561{
562    fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::get_job_queue_snapshot::GetJobQueueSnapshotError, R>) -> Self {
563        match err {
564            ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
565            _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
566                meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
567                source: err.into(),
568            }),
569        }
570    }
571}
572impl From<crate::operation::get_job_queue_snapshot::GetJobQueueSnapshotError> for Error {
573    fn from(err: crate::operation::get_job_queue_snapshot::GetJobQueueSnapshotError) -> Self {
574        match err {
575            crate::operation::get_job_queue_snapshot::GetJobQueueSnapshotError::ClientException(inner) => Error::ClientException(inner),
576            crate::operation::get_job_queue_snapshot::GetJobQueueSnapshotError::ServerException(inner) => Error::ServerException(inner),
577            crate::operation::get_job_queue_snapshot::GetJobQueueSnapshotError::Unhandled(inner) => Error::Unhandled(inner),
578        }
579    }
580}
581impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::list_consumable_resources::ListConsumableResourcesError, R>>
582    for Error
583where
584    R: Send + Sync + std::fmt::Debug + 'static,
585{
586    fn from(
587        err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::list_consumable_resources::ListConsumableResourcesError, R>,
588    ) -> Self {
589        match err {
590            ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
591            _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
592                meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
593                source: err.into(),
594            }),
595        }
596    }
597}
598impl From<crate::operation::list_consumable_resources::ListConsumableResourcesError> for Error {
599    fn from(err: crate::operation::list_consumable_resources::ListConsumableResourcesError) -> Self {
600        match err {
601            crate::operation::list_consumable_resources::ListConsumableResourcesError::ClientException(inner) => Error::ClientException(inner),
602            crate::operation::list_consumable_resources::ListConsumableResourcesError::ServerException(inner) => Error::ServerException(inner),
603            crate::operation::list_consumable_resources::ListConsumableResourcesError::Unhandled(inner) => Error::Unhandled(inner),
604        }
605    }
606}
607impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::list_jobs::ListJobsError, R>> for Error
608where
609    R: Send + Sync + std::fmt::Debug + 'static,
610{
611    fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::list_jobs::ListJobsError, R>) -> Self {
612        match err {
613            ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
614            _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
615                meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
616                source: err.into(),
617            }),
618        }
619    }
620}
621impl From<crate::operation::list_jobs::ListJobsError> for Error {
622    fn from(err: crate::operation::list_jobs::ListJobsError) -> Self {
623        match err {
624            crate::operation::list_jobs::ListJobsError::ClientException(inner) => Error::ClientException(inner),
625            crate::operation::list_jobs::ListJobsError::ServerException(inner) => Error::ServerException(inner),
626            crate::operation::list_jobs::ListJobsError::Unhandled(inner) => Error::Unhandled(inner),
627        }
628    }
629}
630impl<R>
631    From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::list_jobs_by_consumable_resource::ListJobsByConsumableResourceError, R>>
632    for Error
633where
634    R: Send + Sync + std::fmt::Debug + 'static,
635{
636    fn from(
637        err: ::aws_smithy_runtime_api::client::result::SdkError<
638            crate::operation::list_jobs_by_consumable_resource::ListJobsByConsumableResourceError,
639            R,
640        >,
641    ) -> Self {
642        match err {
643            ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
644            _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
645                meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
646                source: err.into(),
647            }),
648        }
649    }
650}
651impl From<crate::operation::list_jobs_by_consumable_resource::ListJobsByConsumableResourceError> for Error {
652    fn from(err: crate::operation::list_jobs_by_consumable_resource::ListJobsByConsumableResourceError) -> Self {
653        match err {
654            crate::operation::list_jobs_by_consumable_resource::ListJobsByConsumableResourceError::ClientException(inner) => {
655                Error::ClientException(inner)
656            }
657            crate::operation::list_jobs_by_consumable_resource::ListJobsByConsumableResourceError::ServerException(inner) => {
658                Error::ServerException(inner)
659            }
660            crate::operation::list_jobs_by_consumable_resource::ListJobsByConsumableResourceError::Unhandled(inner) => Error::Unhandled(inner),
661        }
662    }
663}
664impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::list_scheduling_policies::ListSchedulingPoliciesError, R>> for Error
665where
666    R: Send + Sync + std::fmt::Debug + 'static,
667{
668    fn from(
669        err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::list_scheduling_policies::ListSchedulingPoliciesError, R>,
670    ) -> Self {
671        match err {
672            ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
673            _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
674                meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
675                source: err.into(),
676            }),
677        }
678    }
679}
680impl From<crate::operation::list_scheduling_policies::ListSchedulingPoliciesError> for Error {
681    fn from(err: crate::operation::list_scheduling_policies::ListSchedulingPoliciesError) -> Self {
682        match err {
683            crate::operation::list_scheduling_policies::ListSchedulingPoliciesError::ClientException(inner) => Error::ClientException(inner),
684            crate::operation::list_scheduling_policies::ListSchedulingPoliciesError::ServerException(inner) => Error::ServerException(inner),
685            crate::operation::list_scheduling_policies::ListSchedulingPoliciesError::Unhandled(inner) => Error::Unhandled(inner),
686        }
687    }
688}
689impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::list_service_jobs::ListServiceJobsError, R>> for Error
690where
691    R: Send + Sync + std::fmt::Debug + 'static,
692{
693    fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::list_service_jobs::ListServiceJobsError, R>) -> Self {
694        match err {
695            ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
696            _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
697                meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
698                source: err.into(),
699            }),
700        }
701    }
702}
703impl From<crate::operation::list_service_jobs::ListServiceJobsError> for Error {
704    fn from(err: crate::operation::list_service_jobs::ListServiceJobsError) -> Self {
705        match err {
706            crate::operation::list_service_jobs::ListServiceJobsError::ClientException(inner) => Error::ClientException(inner),
707            crate::operation::list_service_jobs::ListServiceJobsError::ServerException(inner) => Error::ServerException(inner),
708            crate::operation::list_service_jobs::ListServiceJobsError::Unhandled(inner) => Error::Unhandled(inner),
709        }
710    }
711}
712impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::list_tags_for_resource::ListTagsForResourceError, R>> for Error
713where
714    R: Send + Sync + std::fmt::Debug + 'static,
715{
716    fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::list_tags_for_resource::ListTagsForResourceError, R>) -> Self {
717        match err {
718            ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
719            _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
720                meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
721                source: err.into(),
722            }),
723        }
724    }
725}
726impl From<crate::operation::list_tags_for_resource::ListTagsForResourceError> for Error {
727    fn from(err: crate::operation::list_tags_for_resource::ListTagsForResourceError) -> Self {
728        match err {
729            crate::operation::list_tags_for_resource::ListTagsForResourceError::ClientException(inner) => Error::ClientException(inner),
730            crate::operation::list_tags_for_resource::ListTagsForResourceError::ServerException(inner) => Error::ServerException(inner),
731            crate::operation::list_tags_for_resource::ListTagsForResourceError::Unhandled(inner) => Error::Unhandled(inner),
732        }
733    }
734}
735impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::register_job_definition::RegisterJobDefinitionError, R>> for Error
736where
737    R: Send + Sync + std::fmt::Debug + 'static,
738{
739    fn from(
740        err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::register_job_definition::RegisterJobDefinitionError, R>,
741    ) -> Self {
742        match err {
743            ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
744            _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
745                meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
746                source: err.into(),
747            }),
748        }
749    }
750}
751impl From<crate::operation::register_job_definition::RegisterJobDefinitionError> for Error {
752    fn from(err: crate::operation::register_job_definition::RegisterJobDefinitionError) -> Self {
753        match err {
754            crate::operation::register_job_definition::RegisterJobDefinitionError::ClientException(inner) => Error::ClientException(inner),
755            crate::operation::register_job_definition::RegisterJobDefinitionError::ServerException(inner) => Error::ServerException(inner),
756            crate::operation::register_job_definition::RegisterJobDefinitionError::Unhandled(inner) => Error::Unhandled(inner),
757        }
758    }
759}
760impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::submit_job::SubmitJobError, R>> for Error
761where
762    R: Send + Sync + std::fmt::Debug + 'static,
763{
764    fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::submit_job::SubmitJobError, R>) -> Self {
765        match err {
766            ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
767            _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
768                meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
769                source: err.into(),
770            }),
771        }
772    }
773}
774impl From<crate::operation::submit_job::SubmitJobError> for Error {
775    fn from(err: crate::operation::submit_job::SubmitJobError) -> Self {
776        match err {
777            crate::operation::submit_job::SubmitJobError::ClientException(inner) => Error::ClientException(inner),
778            crate::operation::submit_job::SubmitJobError::ServerException(inner) => Error::ServerException(inner),
779            crate::operation::submit_job::SubmitJobError::Unhandled(inner) => Error::Unhandled(inner),
780        }
781    }
782}
783impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::submit_service_job::SubmitServiceJobError, R>> for Error
784where
785    R: Send + Sync + std::fmt::Debug + 'static,
786{
787    fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::submit_service_job::SubmitServiceJobError, R>) -> Self {
788        match err {
789            ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
790            _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
791                meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
792                source: err.into(),
793            }),
794        }
795    }
796}
797impl From<crate::operation::submit_service_job::SubmitServiceJobError> for Error {
798    fn from(err: crate::operation::submit_service_job::SubmitServiceJobError) -> Self {
799        match err {
800            crate::operation::submit_service_job::SubmitServiceJobError::ClientException(inner) => Error::ClientException(inner),
801            crate::operation::submit_service_job::SubmitServiceJobError::ServerException(inner) => Error::ServerException(inner),
802            crate::operation::submit_service_job::SubmitServiceJobError::Unhandled(inner) => Error::Unhandled(inner),
803        }
804    }
805}
806impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::tag_resource::TagResourceError, R>> for Error
807where
808    R: Send + Sync + std::fmt::Debug + 'static,
809{
810    fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::tag_resource::TagResourceError, R>) -> Self {
811        match err {
812            ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
813            _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
814                meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
815                source: err.into(),
816            }),
817        }
818    }
819}
820impl From<crate::operation::tag_resource::TagResourceError> for Error {
821    fn from(err: crate::operation::tag_resource::TagResourceError) -> Self {
822        match err {
823            crate::operation::tag_resource::TagResourceError::ClientException(inner) => Error::ClientException(inner),
824            crate::operation::tag_resource::TagResourceError::ServerException(inner) => Error::ServerException(inner),
825            crate::operation::tag_resource::TagResourceError::Unhandled(inner) => Error::Unhandled(inner),
826        }
827    }
828}
829impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::terminate_job::TerminateJobError, R>> for Error
830where
831    R: Send + Sync + std::fmt::Debug + 'static,
832{
833    fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::terminate_job::TerminateJobError, R>) -> Self {
834        match err {
835            ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
836            _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
837                meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
838                source: err.into(),
839            }),
840        }
841    }
842}
843impl From<crate::operation::terminate_job::TerminateJobError> for Error {
844    fn from(err: crate::operation::terminate_job::TerminateJobError) -> Self {
845        match err {
846            crate::operation::terminate_job::TerminateJobError::ClientException(inner) => Error::ClientException(inner),
847            crate::operation::terminate_job::TerminateJobError::ServerException(inner) => Error::ServerException(inner),
848            crate::operation::terminate_job::TerminateJobError::Unhandled(inner) => Error::Unhandled(inner),
849        }
850    }
851}
852impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::terminate_service_job::TerminateServiceJobError, R>> for Error
853where
854    R: Send + Sync + std::fmt::Debug + 'static,
855{
856    fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::terminate_service_job::TerminateServiceJobError, R>) -> Self {
857        match err {
858            ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
859            _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
860                meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
861                source: err.into(),
862            }),
863        }
864    }
865}
866impl From<crate::operation::terminate_service_job::TerminateServiceJobError> for Error {
867    fn from(err: crate::operation::terminate_service_job::TerminateServiceJobError) -> Self {
868        match err {
869            crate::operation::terminate_service_job::TerminateServiceJobError::ClientException(inner) => Error::ClientException(inner),
870            crate::operation::terminate_service_job::TerminateServiceJobError::ServerException(inner) => Error::ServerException(inner),
871            crate::operation::terminate_service_job::TerminateServiceJobError::Unhandled(inner) => Error::Unhandled(inner),
872        }
873    }
874}
875impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::untag_resource::UntagResourceError, R>> for Error
876where
877    R: Send + Sync + std::fmt::Debug + 'static,
878{
879    fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::untag_resource::UntagResourceError, R>) -> Self {
880        match err {
881            ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
882            _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
883                meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
884                source: err.into(),
885            }),
886        }
887    }
888}
889impl From<crate::operation::untag_resource::UntagResourceError> for Error {
890    fn from(err: crate::operation::untag_resource::UntagResourceError) -> Self {
891        match err {
892            crate::operation::untag_resource::UntagResourceError::ClientException(inner) => Error::ClientException(inner),
893            crate::operation::untag_resource::UntagResourceError::ServerException(inner) => Error::ServerException(inner),
894            crate::operation::untag_resource::UntagResourceError::Unhandled(inner) => Error::Unhandled(inner),
895        }
896    }
897}
898impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::update_compute_environment::UpdateComputeEnvironmentError, R>>
899    for Error
900where
901    R: Send + Sync + std::fmt::Debug + 'static,
902{
903    fn from(
904        err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::update_compute_environment::UpdateComputeEnvironmentError, R>,
905    ) -> Self {
906        match err {
907            ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
908            _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
909                meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
910                source: err.into(),
911            }),
912        }
913    }
914}
915impl From<crate::operation::update_compute_environment::UpdateComputeEnvironmentError> for Error {
916    fn from(err: crate::operation::update_compute_environment::UpdateComputeEnvironmentError) -> Self {
917        match err {
918            crate::operation::update_compute_environment::UpdateComputeEnvironmentError::ClientException(inner) => Error::ClientException(inner),
919            crate::operation::update_compute_environment::UpdateComputeEnvironmentError::ServerException(inner) => Error::ServerException(inner),
920            crate::operation::update_compute_environment::UpdateComputeEnvironmentError::Unhandled(inner) => Error::Unhandled(inner),
921        }
922    }
923}
924impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::update_consumable_resource::UpdateConsumableResourceError, R>>
925    for Error
926where
927    R: Send + Sync + std::fmt::Debug + 'static,
928{
929    fn from(
930        err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::update_consumable_resource::UpdateConsumableResourceError, R>,
931    ) -> Self {
932        match err {
933            ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
934            _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
935                meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
936                source: err.into(),
937            }),
938        }
939    }
940}
941impl From<crate::operation::update_consumable_resource::UpdateConsumableResourceError> for Error {
942    fn from(err: crate::operation::update_consumable_resource::UpdateConsumableResourceError) -> Self {
943        match err {
944            crate::operation::update_consumable_resource::UpdateConsumableResourceError::ClientException(inner) => Error::ClientException(inner),
945            crate::operation::update_consumable_resource::UpdateConsumableResourceError::ServerException(inner) => Error::ServerException(inner),
946            crate::operation::update_consumable_resource::UpdateConsumableResourceError::Unhandled(inner) => Error::Unhandled(inner),
947        }
948    }
949}
950impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::update_job_queue::UpdateJobQueueError, R>> for Error
951where
952    R: Send + Sync + std::fmt::Debug + 'static,
953{
954    fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::update_job_queue::UpdateJobQueueError, R>) -> Self {
955        match err {
956            ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
957            _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
958                meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
959                source: err.into(),
960            }),
961        }
962    }
963}
964impl From<crate::operation::update_job_queue::UpdateJobQueueError> for Error {
965    fn from(err: crate::operation::update_job_queue::UpdateJobQueueError) -> Self {
966        match err {
967            crate::operation::update_job_queue::UpdateJobQueueError::ClientException(inner) => Error::ClientException(inner),
968            crate::operation::update_job_queue::UpdateJobQueueError::ServerException(inner) => Error::ServerException(inner),
969            crate::operation::update_job_queue::UpdateJobQueueError::Unhandled(inner) => Error::Unhandled(inner),
970        }
971    }
972}
973impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::update_scheduling_policy::UpdateSchedulingPolicyError, R>> for Error
974where
975    R: Send + Sync + std::fmt::Debug + 'static,
976{
977    fn from(
978        err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::update_scheduling_policy::UpdateSchedulingPolicyError, R>,
979    ) -> Self {
980        match err {
981            ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
982            _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
983                meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
984                source: err.into(),
985            }),
986        }
987    }
988}
989impl From<crate::operation::update_scheduling_policy::UpdateSchedulingPolicyError> for Error {
990    fn from(err: crate::operation::update_scheduling_policy::UpdateSchedulingPolicyError) -> Self {
991        match err {
992            crate::operation::update_scheduling_policy::UpdateSchedulingPolicyError::ClientException(inner) => Error::ClientException(inner),
993            crate::operation::update_scheduling_policy::UpdateSchedulingPolicyError::ServerException(inner) => Error::ServerException(inner),
994            crate::operation::update_scheduling_policy::UpdateSchedulingPolicyError::Unhandled(inner) => Error::Unhandled(inner),
995        }
996    }
997}
998impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::update_service_environment::UpdateServiceEnvironmentError, R>>
999    for Error
1000where
1001    R: Send + Sync + std::fmt::Debug + 'static,
1002{
1003    fn from(
1004        err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::update_service_environment::UpdateServiceEnvironmentError, R>,
1005    ) -> Self {
1006        match err {
1007            ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
1008            _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
1009                meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
1010                source: err.into(),
1011            }),
1012        }
1013    }
1014}
1015impl From<crate::operation::update_service_environment::UpdateServiceEnvironmentError> for Error {
1016    fn from(err: crate::operation::update_service_environment::UpdateServiceEnvironmentError) -> Self {
1017        match err {
1018            crate::operation::update_service_environment::UpdateServiceEnvironmentError::ClientException(inner) => Error::ClientException(inner),
1019            crate::operation::update_service_environment::UpdateServiceEnvironmentError::ServerException(inner) => Error::ServerException(inner),
1020            crate::operation::update_service_environment::UpdateServiceEnvironmentError::Unhandled(inner) => Error::Unhandled(inner),
1021        }
1022    }
1023}
1024impl ::std::error::Error for Error {
1025    fn source(&self) -> std::option::Option<&(dyn ::std::error::Error + 'static)> {
1026        match self {
1027            Error::ClientException(inner) => inner.source(),
1028            Error::ServerException(inner) => inner.source(),
1029            Error::Unhandled(inner) => ::std::option::Option::Some(&*inner.source),
1030        }
1031    }
1032}
1033impl ::aws_types::request_id::RequestId for Error {
1034    fn request_id(&self) -> Option<&str> {
1035        match self {
1036            Self::ClientException(e) => e.request_id(),
1037            Self::ServerException(e) => e.request_id(),
1038            Self::Unhandled(e) => e.meta.request_id(),
1039        }
1040    }
1041}