aws_sdk_emrcontainers/
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>The request exceeded the Amazon EKS API operation limits.</p>
7    EksRequestThrottledException(crate::types::error::EksRequestThrottledException),
8    /// <p>This is an internal server exception.</p>
9    InternalServerException(crate::types::error::InternalServerException),
10    /// <p>The request throttled.</p>
11    RequestThrottledException(crate::types::error::RequestThrottledException),
12    /// <p>The specified resource was not found.</p>
13    ResourceNotFoundException(crate::types::error::ResourceNotFoundException),
14    /// <p>There are invalid parameters in the client request.</p>
15    ValidationException(crate::types::error::ValidationException),
16    /// An unexpected error occurred (e.g., invalid JSON returned by the service or an unknown error code).
17    #[deprecated(note = "Matching `Unhandled` directly is not forwards compatible. Instead, match using a \
18    variable wildcard pattern and check `.code()`:
19     \
20    &nbsp;&nbsp;&nbsp;`err if err.code() == Some(\"SpecificExceptionCode\") => { /* handle the error */ }`
21     \
22    See [`ProvideErrorMetadata`](#impl-ProvideErrorMetadata-for-Error) for what information is available for the error.")]
23    Unhandled(crate::error::sealed_unhandled::Unhandled),
24}
25impl ::std::fmt::Display for Error {
26    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
27        match self {
28            Error::EksRequestThrottledException(inner) => inner.fmt(f),
29            Error::InternalServerException(inner) => inner.fmt(f),
30            Error::RequestThrottledException(inner) => inner.fmt(f),
31            Error::ResourceNotFoundException(inner) => inner.fmt(f),
32            Error::ValidationException(inner) => inner.fmt(f),
33            Error::Unhandled(_) => {
34                if let ::std::option::Option::Some(code) = ::aws_smithy_types::error::metadata::ProvideErrorMetadata::code(self) {
35                    write!(f, "unhandled error ({code})")
36                } else {
37                    f.write_str("unhandled error")
38                }
39            }
40        }
41    }
42}
43impl From<::aws_smithy_types::error::operation::BuildError> for Error {
44    fn from(value: ::aws_smithy_types::error::operation::BuildError) -> Self {
45        Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
46            source: value.into(),
47            meta: ::std::default::Default::default(),
48        })
49    }
50}
51impl ::aws_smithy_types::error::metadata::ProvideErrorMetadata for Error {
52    fn meta(&self) -> &::aws_smithy_types::error::metadata::ErrorMetadata {
53        match self {
54            Self::EksRequestThrottledException(inner) => inner.meta(),
55            Self::InternalServerException(inner) => inner.meta(),
56            Self::RequestThrottledException(inner) => inner.meta(),
57            Self::ResourceNotFoundException(inner) => inner.meta(),
58            Self::ValidationException(inner) => inner.meta(),
59            Self::Unhandled(inner) => &inner.meta,
60        }
61    }
62}
63impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::cancel_job_run::CancelJobRunError, R>> for Error
64where
65    R: Send + Sync + std::fmt::Debug + 'static,
66{
67    fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::cancel_job_run::CancelJobRunError, R>) -> Self {
68        match err {
69            ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
70            _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
71                meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
72                source: err.into(),
73            }),
74        }
75    }
76}
77impl From<crate::operation::cancel_job_run::CancelJobRunError> for Error {
78    fn from(err: crate::operation::cancel_job_run::CancelJobRunError) -> Self {
79        match err {
80            crate::operation::cancel_job_run::CancelJobRunError::InternalServerException(inner) => Error::InternalServerException(inner),
81            crate::operation::cancel_job_run::CancelJobRunError::ValidationException(inner) => Error::ValidationException(inner),
82            crate::operation::cancel_job_run::CancelJobRunError::Unhandled(inner) => Error::Unhandled(inner),
83        }
84    }
85}
86impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::create_job_template::CreateJobTemplateError, R>> for Error
87where
88    R: Send + Sync + std::fmt::Debug + 'static,
89{
90    fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::create_job_template::CreateJobTemplateError, R>) -> Self {
91        match err {
92            ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
93            _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
94                meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
95                source: err.into(),
96            }),
97        }
98    }
99}
100impl From<crate::operation::create_job_template::CreateJobTemplateError> for Error {
101    fn from(err: crate::operation::create_job_template::CreateJobTemplateError) -> Self {
102        match err {
103            crate::operation::create_job_template::CreateJobTemplateError::InternalServerException(inner) => Error::InternalServerException(inner),
104            crate::operation::create_job_template::CreateJobTemplateError::ResourceNotFoundException(inner) => {
105                Error::ResourceNotFoundException(inner)
106            }
107            crate::operation::create_job_template::CreateJobTemplateError::ValidationException(inner) => Error::ValidationException(inner),
108            crate::operation::create_job_template::CreateJobTemplateError::Unhandled(inner) => Error::Unhandled(inner),
109        }
110    }
111}
112impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::create_managed_endpoint::CreateManagedEndpointError, R>> for Error
113where
114    R: Send + Sync + std::fmt::Debug + 'static,
115{
116    fn from(
117        err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::create_managed_endpoint::CreateManagedEndpointError, R>,
118    ) -> Self {
119        match err {
120            ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
121            _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
122                meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
123                source: err.into(),
124            }),
125        }
126    }
127}
128impl From<crate::operation::create_managed_endpoint::CreateManagedEndpointError> for Error {
129    fn from(err: crate::operation::create_managed_endpoint::CreateManagedEndpointError) -> Self {
130        match err {
131            crate::operation::create_managed_endpoint::CreateManagedEndpointError::InternalServerException(inner) => {
132                Error::InternalServerException(inner)
133            }
134            crate::operation::create_managed_endpoint::CreateManagedEndpointError::ResourceNotFoundException(inner) => {
135                Error::ResourceNotFoundException(inner)
136            }
137            crate::operation::create_managed_endpoint::CreateManagedEndpointError::ValidationException(inner) => Error::ValidationException(inner),
138            crate::operation::create_managed_endpoint::CreateManagedEndpointError::Unhandled(inner) => Error::Unhandled(inner),
139        }
140    }
141}
142impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::create_security_configuration::CreateSecurityConfigurationError, R>>
143    for Error
144where
145    R: Send + Sync + std::fmt::Debug + 'static,
146{
147    fn from(
148        err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::create_security_configuration::CreateSecurityConfigurationError, R>,
149    ) -> Self {
150        match err {
151            ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
152            _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
153                meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
154                source: err.into(),
155            }),
156        }
157    }
158}
159impl From<crate::operation::create_security_configuration::CreateSecurityConfigurationError> for Error {
160    fn from(err: crate::operation::create_security_configuration::CreateSecurityConfigurationError) -> Self {
161        match err {
162            crate::operation::create_security_configuration::CreateSecurityConfigurationError::InternalServerException(inner) => {
163                Error::InternalServerException(inner)
164            }
165            crate::operation::create_security_configuration::CreateSecurityConfigurationError::ValidationException(inner) => {
166                Error::ValidationException(inner)
167            }
168            crate::operation::create_security_configuration::CreateSecurityConfigurationError::Unhandled(inner) => Error::Unhandled(inner),
169        }
170    }
171}
172impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::create_virtual_cluster::CreateVirtualClusterError, R>> for Error
173where
174    R: Send + Sync + std::fmt::Debug + 'static,
175{
176    fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::create_virtual_cluster::CreateVirtualClusterError, R>) -> Self {
177        match err {
178            ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
179            _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
180                meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
181                source: err.into(),
182            }),
183        }
184    }
185}
186impl From<crate::operation::create_virtual_cluster::CreateVirtualClusterError> for Error {
187    fn from(err: crate::operation::create_virtual_cluster::CreateVirtualClusterError) -> Self {
188        match err {
189            crate::operation::create_virtual_cluster::CreateVirtualClusterError::EksRequestThrottledException(inner) => {
190                Error::EksRequestThrottledException(inner)
191            }
192            crate::operation::create_virtual_cluster::CreateVirtualClusterError::InternalServerException(inner) => {
193                Error::InternalServerException(inner)
194            }
195            crate::operation::create_virtual_cluster::CreateVirtualClusterError::ResourceNotFoundException(inner) => {
196                Error::ResourceNotFoundException(inner)
197            }
198            crate::operation::create_virtual_cluster::CreateVirtualClusterError::ValidationException(inner) => Error::ValidationException(inner),
199            crate::operation::create_virtual_cluster::CreateVirtualClusterError::Unhandled(inner) => Error::Unhandled(inner),
200        }
201    }
202}
203impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::delete_job_template::DeleteJobTemplateError, R>> for Error
204where
205    R: Send + Sync + std::fmt::Debug + 'static,
206{
207    fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::delete_job_template::DeleteJobTemplateError, R>) -> 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_job_template::DeleteJobTemplateError> for Error {
218    fn from(err: crate::operation::delete_job_template::DeleteJobTemplateError) -> Self {
219        match err {
220            crate::operation::delete_job_template::DeleteJobTemplateError::InternalServerException(inner) => Error::InternalServerException(inner),
221            crate::operation::delete_job_template::DeleteJobTemplateError::ValidationException(inner) => Error::ValidationException(inner),
222            crate::operation::delete_job_template::DeleteJobTemplateError::Unhandled(inner) => Error::Unhandled(inner),
223        }
224    }
225}
226impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::delete_managed_endpoint::DeleteManagedEndpointError, R>> for Error
227where
228    R: Send + Sync + std::fmt::Debug + 'static,
229{
230    fn from(
231        err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::delete_managed_endpoint::DeleteManagedEndpointError, R>,
232    ) -> Self {
233        match err {
234            ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
235            _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
236                meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
237                source: err.into(),
238            }),
239        }
240    }
241}
242impl From<crate::operation::delete_managed_endpoint::DeleteManagedEndpointError> for Error {
243    fn from(err: crate::operation::delete_managed_endpoint::DeleteManagedEndpointError) -> Self {
244        match err {
245            crate::operation::delete_managed_endpoint::DeleteManagedEndpointError::InternalServerException(inner) => {
246                Error::InternalServerException(inner)
247            }
248            crate::operation::delete_managed_endpoint::DeleteManagedEndpointError::ValidationException(inner) => Error::ValidationException(inner),
249            crate::operation::delete_managed_endpoint::DeleteManagedEndpointError::Unhandled(inner) => Error::Unhandled(inner),
250        }
251    }
252}
253impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::delete_virtual_cluster::DeleteVirtualClusterError, R>> for Error
254where
255    R: Send + Sync + std::fmt::Debug + 'static,
256{
257    fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::delete_virtual_cluster::DeleteVirtualClusterError, R>) -> Self {
258        match err {
259            ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
260            _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
261                meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
262                source: err.into(),
263            }),
264        }
265    }
266}
267impl From<crate::operation::delete_virtual_cluster::DeleteVirtualClusterError> for Error {
268    fn from(err: crate::operation::delete_virtual_cluster::DeleteVirtualClusterError) -> Self {
269        match err {
270            crate::operation::delete_virtual_cluster::DeleteVirtualClusterError::InternalServerException(inner) => {
271                Error::InternalServerException(inner)
272            }
273            crate::operation::delete_virtual_cluster::DeleteVirtualClusterError::ValidationException(inner) => Error::ValidationException(inner),
274            crate::operation::delete_virtual_cluster::DeleteVirtualClusterError::Unhandled(inner) => Error::Unhandled(inner),
275        }
276    }
277}
278impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::describe_job_run::DescribeJobRunError, R>> for Error
279where
280    R: Send + Sync + std::fmt::Debug + 'static,
281{
282    fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::describe_job_run::DescribeJobRunError, R>) -> Self {
283        match err {
284            ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
285            _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
286                meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
287                source: err.into(),
288            }),
289        }
290    }
291}
292impl From<crate::operation::describe_job_run::DescribeJobRunError> for Error {
293    fn from(err: crate::operation::describe_job_run::DescribeJobRunError) -> Self {
294        match err {
295            crate::operation::describe_job_run::DescribeJobRunError::InternalServerException(inner) => Error::InternalServerException(inner),
296            crate::operation::describe_job_run::DescribeJobRunError::ResourceNotFoundException(inner) => Error::ResourceNotFoundException(inner),
297            crate::operation::describe_job_run::DescribeJobRunError::ValidationException(inner) => Error::ValidationException(inner),
298            crate::operation::describe_job_run::DescribeJobRunError::Unhandled(inner) => Error::Unhandled(inner),
299        }
300    }
301}
302impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::describe_job_template::DescribeJobTemplateError, R>> for Error
303where
304    R: Send + Sync + std::fmt::Debug + 'static,
305{
306    fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::describe_job_template::DescribeJobTemplateError, R>) -> Self {
307        match err {
308            ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
309            _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
310                meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
311                source: err.into(),
312            }),
313        }
314    }
315}
316impl From<crate::operation::describe_job_template::DescribeJobTemplateError> for Error {
317    fn from(err: crate::operation::describe_job_template::DescribeJobTemplateError) -> Self {
318        match err {
319            crate::operation::describe_job_template::DescribeJobTemplateError::InternalServerException(inner) => {
320                Error::InternalServerException(inner)
321            }
322            crate::operation::describe_job_template::DescribeJobTemplateError::ResourceNotFoundException(inner) => {
323                Error::ResourceNotFoundException(inner)
324            }
325            crate::operation::describe_job_template::DescribeJobTemplateError::ValidationException(inner) => Error::ValidationException(inner),
326            crate::operation::describe_job_template::DescribeJobTemplateError::Unhandled(inner) => Error::Unhandled(inner),
327        }
328    }
329}
330impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::describe_managed_endpoint::DescribeManagedEndpointError, R>>
331    for Error
332where
333    R: Send + Sync + std::fmt::Debug + 'static,
334{
335    fn from(
336        err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::describe_managed_endpoint::DescribeManagedEndpointError, R>,
337    ) -> Self {
338        match err {
339            ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
340            _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
341                meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
342                source: err.into(),
343            }),
344        }
345    }
346}
347impl From<crate::operation::describe_managed_endpoint::DescribeManagedEndpointError> for Error {
348    fn from(err: crate::operation::describe_managed_endpoint::DescribeManagedEndpointError) -> Self {
349        match err {
350            crate::operation::describe_managed_endpoint::DescribeManagedEndpointError::InternalServerException(inner) => {
351                Error::InternalServerException(inner)
352            }
353            crate::operation::describe_managed_endpoint::DescribeManagedEndpointError::ResourceNotFoundException(inner) => {
354                Error::ResourceNotFoundException(inner)
355            }
356            crate::operation::describe_managed_endpoint::DescribeManagedEndpointError::ValidationException(inner) => {
357                Error::ValidationException(inner)
358            }
359            crate::operation::describe_managed_endpoint::DescribeManagedEndpointError::Unhandled(inner) => Error::Unhandled(inner),
360        }
361    }
362}
363impl<R>
364    From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::describe_security_configuration::DescribeSecurityConfigurationError, R>>
365    for Error
366where
367    R: Send + Sync + std::fmt::Debug + 'static,
368{
369    fn from(
370        err: ::aws_smithy_runtime_api::client::result::SdkError<
371            crate::operation::describe_security_configuration::DescribeSecurityConfigurationError,
372            R,
373        >,
374    ) -> Self {
375        match err {
376            ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
377            _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
378                meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
379                source: err.into(),
380            }),
381        }
382    }
383}
384impl From<crate::operation::describe_security_configuration::DescribeSecurityConfigurationError> for Error {
385    fn from(err: crate::operation::describe_security_configuration::DescribeSecurityConfigurationError) -> Self {
386        match err {
387            crate::operation::describe_security_configuration::DescribeSecurityConfigurationError::InternalServerException(inner) => {
388                Error::InternalServerException(inner)
389            }
390            crate::operation::describe_security_configuration::DescribeSecurityConfigurationError::ResourceNotFoundException(inner) => {
391                Error::ResourceNotFoundException(inner)
392            }
393            crate::operation::describe_security_configuration::DescribeSecurityConfigurationError::ValidationException(inner) => {
394                Error::ValidationException(inner)
395            }
396            crate::operation::describe_security_configuration::DescribeSecurityConfigurationError::Unhandled(inner) => Error::Unhandled(inner),
397        }
398    }
399}
400impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::describe_virtual_cluster::DescribeVirtualClusterError, R>> for Error
401where
402    R: Send + Sync + std::fmt::Debug + 'static,
403{
404    fn from(
405        err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::describe_virtual_cluster::DescribeVirtualClusterError, R>,
406    ) -> Self {
407        match err {
408            ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
409            _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
410                meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
411                source: err.into(),
412            }),
413        }
414    }
415}
416impl From<crate::operation::describe_virtual_cluster::DescribeVirtualClusterError> for Error {
417    fn from(err: crate::operation::describe_virtual_cluster::DescribeVirtualClusterError) -> Self {
418        match err {
419            crate::operation::describe_virtual_cluster::DescribeVirtualClusterError::InternalServerException(inner) => {
420                Error::InternalServerException(inner)
421            }
422            crate::operation::describe_virtual_cluster::DescribeVirtualClusterError::ResourceNotFoundException(inner) => {
423                Error::ResourceNotFoundException(inner)
424            }
425            crate::operation::describe_virtual_cluster::DescribeVirtualClusterError::ValidationException(inner) => Error::ValidationException(inner),
426            crate::operation::describe_virtual_cluster::DescribeVirtualClusterError::Unhandled(inner) => Error::Unhandled(inner),
427        }
428    }
429}
430impl<R>
431    From<
432        ::aws_smithy_runtime_api::client::result::SdkError<
433            crate::operation::get_managed_endpoint_session_credentials::GetManagedEndpointSessionCredentialsError,
434            R,
435        >,
436    > for Error
437where
438    R: Send + Sync + std::fmt::Debug + 'static,
439{
440    fn from(
441        err: ::aws_smithy_runtime_api::client::result::SdkError<
442            crate::operation::get_managed_endpoint_session_credentials::GetManagedEndpointSessionCredentialsError,
443            R,
444        >,
445    ) -> Self {
446        match err {
447            ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
448            _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
449                meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
450                source: err.into(),
451            }),
452        }
453    }
454}
455impl From<crate::operation::get_managed_endpoint_session_credentials::GetManagedEndpointSessionCredentialsError> for Error {
456    fn from(err: crate::operation::get_managed_endpoint_session_credentials::GetManagedEndpointSessionCredentialsError) -> Self {
457        match err {
458            crate::operation::get_managed_endpoint_session_credentials::GetManagedEndpointSessionCredentialsError::InternalServerException(inner) => {
459                Error::InternalServerException(inner)
460            }
461            crate::operation::get_managed_endpoint_session_credentials::GetManagedEndpointSessionCredentialsError::RequestThrottledException(
462                inner,
463            ) => Error::RequestThrottledException(inner),
464            crate::operation::get_managed_endpoint_session_credentials::GetManagedEndpointSessionCredentialsError::ResourceNotFoundException(
465                inner,
466            ) => Error::ResourceNotFoundException(inner),
467            crate::operation::get_managed_endpoint_session_credentials::GetManagedEndpointSessionCredentialsError::ValidationException(inner) => {
468                Error::ValidationException(inner)
469            }
470            crate::operation::get_managed_endpoint_session_credentials::GetManagedEndpointSessionCredentialsError::Unhandled(inner) => {
471                Error::Unhandled(inner)
472            }
473        }
474    }
475}
476impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::list_job_runs::ListJobRunsError, R>> for Error
477where
478    R: Send + Sync + std::fmt::Debug + 'static,
479{
480    fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::list_job_runs::ListJobRunsError, R>) -> Self {
481        match err {
482            ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
483            _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
484                meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
485                source: err.into(),
486            }),
487        }
488    }
489}
490impl From<crate::operation::list_job_runs::ListJobRunsError> for Error {
491    fn from(err: crate::operation::list_job_runs::ListJobRunsError) -> Self {
492        match err {
493            crate::operation::list_job_runs::ListJobRunsError::InternalServerException(inner) => Error::InternalServerException(inner),
494            crate::operation::list_job_runs::ListJobRunsError::ValidationException(inner) => Error::ValidationException(inner),
495            crate::operation::list_job_runs::ListJobRunsError::Unhandled(inner) => Error::Unhandled(inner),
496        }
497    }
498}
499impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::list_job_templates::ListJobTemplatesError, R>> for Error
500where
501    R: Send + Sync + std::fmt::Debug + 'static,
502{
503    fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::list_job_templates::ListJobTemplatesError, R>) -> Self {
504        match err {
505            ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
506            _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
507                meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
508                source: err.into(),
509            }),
510        }
511    }
512}
513impl From<crate::operation::list_job_templates::ListJobTemplatesError> for Error {
514    fn from(err: crate::operation::list_job_templates::ListJobTemplatesError) -> Self {
515        match err {
516            crate::operation::list_job_templates::ListJobTemplatesError::InternalServerException(inner) => Error::InternalServerException(inner),
517            crate::operation::list_job_templates::ListJobTemplatesError::ValidationException(inner) => Error::ValidationException(inner),
518            crate::operation::list_job_templates::ListJobTemplatesError::Unhandled(inner) => Error::Unhandled(inner),
519        }
520    }
521}
522impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::list_managed_endpoints::ListManagedEndpointsError, R>> for Error
523where
524    R: Send + Sync + std::fmt::Debug + 'static,
525{
526    fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::list_managed_endpoints::ListManagedEndpointsError, R>) -> Self {
527        match err {
528            ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
529            _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
530                meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
531                source: err.into(),
532            }),
533        }
534    }
535}
536impl From<crate::operation::list_managed_endpoints::ListManagedEndpointsError> for Error {
537    fn from(err: crate::operation::list_managed_endpoints::ListManagedEndpointsError) -> Self {
538        match err {
539            crate::operation::list_managed_endpoints::ListManagedEndpointsError::InternalServerException(inner) => {
540                Error::InternalServerException(inner)
541            }
542            crate::operation::list_managed_endpoints::ListManagedEndpointsError::ValidationException(inner) => Error::ValidationException(inner),
543            crate::operation::list_managed_endpoints::ListManagedEndpointsError::Unhandled(inner) => Error::Unhandled(inner),
544        }
545    }
546}
547impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::list_security_configurations::ListSecurityConfigurationsError, R>>
548    for Error
549where
550    R: Send + Sync + std::fmt::Debug + 'static,
551{
552    fn from(
553        err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::list_security_configurations::ListSecurityConfigurationsError, R>,
554    ) -> Self {
555        match err {
556            ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
557            _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
558                meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
559                source: err.into(),
560            }),
561        }
562    }
563}
564impl From<crate::operation::list_security_configurations::ListSecurityConfigurationsError> for Error {
565    fn from(err: crate::operation::list_security_configurations::ListSecurityConfigurationsError) -> Self {
566        match err {
567            crate::operation::list_security_configurations::ListSecurityConfigurationsError::InternalServerException(inner) => {
568                Error::InternalServerException(inner)
569            }
570            crate::operation::list_security_configurations::ListSecurityConfigurationsError::ValidationException(inner) => {
571                Error::ValidationException(inner)
572            }
573            crate::operation::list_security_configurations::ListSecurityConfigurationsError::Unhandled(inner) => Error::Unhandled(inner),
574        }
575    }
576}
577impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::list_tags_for_resource::ListTagsForResourceError, R>> for Error
578where
579    R: Send + Sync + std::fmt::Debug + 'static,
580{
581    fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::list_tags_for_resource::ListTagsForResourceError, R>) -> Self {
582        match err {
583            ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
584            _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
585                meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
586                source: err.into(),
587            }),
588        }
589    }
590}
591impl From<crate::operation::list_tags_for_resource::ListTagsForResourceError> for Error {
592    fn from(err: crate::operation::list_tags_for_resource::ListTagsForResourceError) -> Self {
593        match err {
594            crate::operation::list_tags_for_resource::ListTagsForResourceError::InternalServerException(inner) => {
595                Error::InternalServerException(inner)
596            }
597            crate::operation::list_tags_for_resource::ListTagsForResourceError::ResourceNotFoundException(inner) => {
598                Error::ResourceNotFoundException(inner)
599            }
600            crate::operation::list_tags_for_resource::ListTagsForResourceError::ValidationException(inner) => Error::ValidationException(inner),
601            crate::operation::list_tags_for_resource::ListTagsForResourceError::Unhandled(inner) => Error::Unhandled(inner),
602        }
603    }
604}
605impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::list_virtual_clusters::ListVirtualClustersError, R>> for Error
606where
607    R: Send + Sync + std::fmt::Debug + 'static,
608{
609    fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::list_virtual_clusters::ListVirtualClustersError, R>) -> Self {
610        match err {
611            ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
612            _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
613                meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
614                source: err.into(),
615            }),
616        }
617    }
618}
619impl From<crate::operation::list_virtual_clusters::ListVirtualClustersError> for Error {
620    fn from(err: crate::operation::list_virtual_clusters::ListVirtualClustersError) -> Self {
621        match err {
622            crate::operation::list_virtual_clusters::ListVirtualClustersError::InternalServerException(inner) => {
623                Error::InternalServerException(inner)
624            }
625            crate::operation::list_virtual_clusters::ListVirtualClustersError::ValidationException(inner) => Error::ValidationException(inner),
626            crate::operation::list_virtual_clusters::ListVirtualClustersError::Unhandled(inner) => Error::Unhandled(inner),
627        }
628    }
629}
630impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::start_job_run::StartJobRunError, R>> for Error
631where
632    R: Send + Sync + std::fmt::Debug + 'static,
633{
634    fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::start_job_run::StartJobRunError, R>) -> Self {
635        match err {
636            ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
637            _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
638                meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
639                source: err.into(),
640            }),
641        }
642    }
643}
644impl From<crate::operation::start_job_run::StartJobRunError> for Error {
645    fn from(err: crate::operation::start_job_run::StartJobRunError) -> Self {
646        match err {
647            crate::operation::start_job_run::StartJobRunError::InternalServerException(inner) => Error::InternalServerException(inner),
648            crate::operation::start_job_run::StartJobRunError::ResourceNotFoundException(inner) => Error::ResourceNotFoundException(inner),
649            crate::operation::start_job_run::StartJobRunError::ValidationException(inner) => Error::ValidationException(inner),
650            crate::operation::start_job_run::StartJobRunError::Unhandled(inner) => Error::Unhandled(inner),
651        }
652    }
653}
654impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::tag_resource::TagResourceError, R>> for Error
655where
656    R: Send + Sync + std::fmt::Debug + 'static,
657{
658    fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::tag_resource::TagResourceError, R>) -> Self {
659        match err {
660            ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
661            _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
662                meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
663                source: err.into(),
664            }),
665        }
666    }
667}
668impl From<crate::operation::tag_resource::TagResourceError> for Error {
669    fn from(err: crate::operation::tag_resource::TagResourceError) -> Self {
670        match err {
671            crate::operation::tag_resource::TagResourceError::InternalServerException(inner) => Error::InternalServerException(inner),
672            crate::operation::tag_resource::TagResourceError::ResourceNotFoundException(inner) => Error::ResourceNotFoundException(inner),
673            crate::operation::tag_resource::TagResourceError::ValidationException(inner) => Error::ValidationException(inner),
674            crate::operation::tag_resource::TagResourceError::Unhandled(inner) => Error::Unhandled(inner),
675        }
676    }
677}
678impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::untag_resource::UntagResourceError, R>> for Error
679where
680    R: Send + Sync + std::fmt::Debug + 'static,
681{
682    fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::untag_resource::UntagResourceError, R>) -> Self {
683        match err {
684            ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
685            _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
686                meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
687                source: err.into(),
688            }),
689        }
690    }
691}
692impl From<crate::operation::untag_resource::UntagResourceError> for Error {
693    fn from(err: crate::operation::untag_resource::UntagResourceError) -> Self {
694        match err {
695            crate::operation::untag_resource::UntagResourceError::InternalServerException(inner) => Error::InternalServerException(inner),
696            crate::operation::untag_resource::UntagResourceError::ResourceNotFoundException(inner) => Error::ResourceNotFoundException(inner),
697            crate::operation::untag_resource::UntagResourceError::ValidationException(inner) => Error::ValidationException(inner),
698            crate::operation::untag_resource::UntagResourceError::Unhandled(inner) => Error::Unhandled(inner),
699        }
700    }
701}
702impl ::std::error::Error for Error {
703    fn source(&self) -> std::option::Option<&(dyn ::std::error::Error + 'static)> {
704        match self {
705            Error::EksRequestThrottledException(inner) => inner.source(),
706            Error::InternalServerException(inner) => inner.source(),
707            Error::RequestThrottledException(inner) => inner.source(),
708            Error::ResourceNotFoundException(inner) => inner.source(),
709            Error::ValidationException(inner) => inner.source(),
710            Error::Unhandled(inner) => ::std::option::Option::Some(&*inner.source),
711        }
712    }
713}
714impl ::aws_types::request_id::RequestId for Error {
715    fn request_id(&self) -> Option<&str> {
716        match self {
717            Self::EksRequestThrottledException(e) => e.request_id(),
718            Self::InternalServerException(e) => e.request_id(),
719            Self::RequestThrottledException(e) => e.request_id(),
720            Self::ResourceNotFoundException(e) => e.request_id(),
721            Self::ValidationException(e) => e.request_id(),
722            Self::Unhandled(e) => e.meta.request_id(),
723        }
724    }
725}