aws_sdk_launchwizard/
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>An internal error has occurred. Retry your request, but if the problem persists, contact us with details by posting a question on <a href="https://repost.aws/">re:Post</a>.</p>
7    InternalServerException(crate::types::error::InternalServerException),
8    /// <p>You have exceeded an Launch Wizard resource limit. For example, you might have too many deployments in progress.</p>
9    ResourceLimitException(crate::types::error::ResourceLimitException),
10    /// <p>The specified workload or deployment resource can't be found.</p>
11    ResourceNotFoundException(crate::types::error::ResourceNotFoundException),
12    /// <p>The input fails to satisfy the constraints specified by an Amazon Web Services service.</p>
13    ValidationException(crate::types::error::ValidationException),
14    /// An unexpected error occurred (e.g., invalid JSON returned by the service or an unknown error code).
15    #[deprecated(note = "Matching `Unhandled` directly is not forwards compatible. Instead, match using a \
16    variable wildcard pattern and check `.code()`:
17     \
18    &nbsp;&nbsp;&nbsp;`err if err.code() == Some(\"SpecificExceptionCode\") => { /* handle the error */ }`
19     \
20    See [`ProvideErrorMetadata`](#impl-ProvideErrorMetadata-for-Error) for what information is available for the error.")]
21    Unhandled(crate::error::sealed_unhandled::Unhandled),
22}
23impl ::std::fmt::Display for Error {
24    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
25        match self {
26            Error::InternalServerException(inner) => inner.fmt(f),
27            Error::ResourceLimitException(inner) => inner.fmt(f),
28            Error::ResourceNotFoundException(inner) => inner.fmt(f),
29            Error::ValidationException(inner) => inner.fmt(f),
30            Error::Unhandled(_) => {
31                if let ::std::option::Option::Some(code) = ::aws_smithy_types::error::metadata::ProvideErrorMetadata::code(self) {
32                    write!(f, "unhandled error ({code})")
33                } else {
34                    f.write_str("unhandled error")
35                }
36            }
37        }
38    }
39}
40impl From<::aws_smithy_types::error::operation::BuildError> for Error {
41    fn from(value: ::aws_smithy_types::error::operation::BuildError) -> Self {
42        Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
43            source: value.into(),
44            meta: ::std::default::Default::default(),
45        })
46    }
47}
48impl ::aws_smithy_types::error::metadata::ProvideErrorMetadata for Error {
49    fn meta(&self) -> &::aws_smithy_types::error::metadata::ErrorMetadata {
50        match self {
51            Self::InternalServerException(inner) => inner.meta(),
52            Self::ResourceLimitException(inner) => inner.meta(),
53            Self::ResourceNotFoundException(inner) => inner.meta(),
54            Self::ValidationException(inner) => inner.meta(),
55            Self::Unhandled(inner) => &inner.meta,
56        }
57    }
58}
59impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::create_deployment::CreateDeploymentError, R>> for Error
60where
61    R: Send + Sync + std::fmt::Debug + 'static,
62{
63    fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::create_deployment::CreateDeploymentError, R>) -> Self {
64        match err {
65            ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
66            _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
67                meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
68                source: err.into(),
69            }),
70        }
71    }
72}
73impl From<crate::operation::create_deployment::CreateDeploymentError> for Error {
74    fn from(err: crate::operation::create_deployment::CreateDeploymentError) -> Self {
75        match err {
76            crate::operation::create_deployment::CreateDeploymentError::InternalServerException(inner) => Error::InternalServerException(inner),
77            crate::operation::create_deployment::CreateDeploymentError::ResourceLimitException(inner) => Error::ResourceLimitException(inner),
78            crate::operation::create_deployment::CreateDeploymentError::ResourceNotFoundException(inner) => Error::ResourceNotFoundException(inner),
79            crate::operation::create_deployment::CreateDeploymentError::ValidationException(inner) => Error::ValidationException(inner),
80            crate::operation::create_deployment::CreateDeploymentError::Unhandled(inner) => Error::Unhandled(inner),
81        }
82    }
83}
84impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::delete_deployment::DeleteDeploymentError, R>> for Error
85where
86    R: Send + Sync + std::fmt::Debug + 'static,
87{
88    fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::delete_deployment::DeleteDeploymentError, R>) -> Self {
89        match err {
90            ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
91            _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
92                meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
93                source: err.into(),
94            }),
95        }
96    }
97}
98impl From<crate::operation::delete_deployment::DeleteDeploymentError> for Error {
99    fn from(err: crate::operation::delete_deployment::DeleteDeploymentError) -> Self {
100        match err {
101            crate::operation::delete_deployment::DeleteDeploymentError::InternalServerException(inner) => Error::InternalServerException(inner),
102            crate::operation::delete_deployment::DeleteDeploymentError::ResourceLimitException(inner) => Error::ResourceLimitException(inner),
103            crate::operation::delete_deployment::DeleteDeploymentError::ResourceNotFoundException(inner) => Error::ResourceNotFoundException(inner),
104            crate::operation::delete_deployment::DeleteDeploymentError::ValidationException(inner) => Error::ValidationException(inner),
105            crate::operation::delete_deployment::DeleteDeploymentError::Unhandled(inner) => Error::Unhandled(inner),
106        }
107    }
108}
109impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::get_deployment::GetDeploymentError, R>> for Error
110where
111    R: Send + Sync + std::fmt::Debug + 'static,
112{
113    fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::get_deployment::GetDeploymentError, R>) -> Self {
114        match err {
115            ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
116            _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
117                meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
118                source: err.into(),
119            }),
120        }
121    }
122}
123impl From<crate::operation::get_deployment::GetDeploymentError> for Error {
124    fn from(err: crate::operation::get_deployment::GetDeploymentError) -> Self {
125        match err {
126            crate::operation::get_deployment::GetDeploymentError::InternalServerException(inner) => Error::InternalServerException(inner),
127            crate::operation::get_deployment::GetDeploymentError::ResourceNotFoundException(inner) => Error::ResourceNotFoundException(inner),
128            crate::operation::get_deployment::GetDeploymentError::ValidationException(inner) => Error::ValidationException(inner),
129            crate::operation::get_deployment::GetDeploymentError::Unhandled(inner) => Error::Unhandled(inner),
130        }
131    }
132}
133impl<R>
134    From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::get_deployment_pattern_version::GetDeploymentPatternVersionError, R>>
135    for Error
136where
137    R: Send + Sync + std::fmt::Debug + 'static,
138{
139    fn from(
140        err: ::aws_smithy_runtime_api::client::result::SdkError<
141            crate::operation::get_deployment_pattern_version::GetDeploymentPatternVersionError,
142            R,
143        >,
144    ) -> Self {
145        match err {
146            ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
147            _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
148                meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
149                source: err.into(),
150            }),
151        }
152    }
153}
154impl From<crate::operation::get_deployment_pattern_version::GetDeploymentPatternVersionError> for Error {
155    fn from(err: crate::operation::get_deployment_pattern_version::GetDeploymentPatternVersionError) -> Self {
156        match err {
157            crate::operation::get_deployment_pattern_version::GetDeploymentPatternVersionError::InternalServerException(inner) => {
158                Error::InternalServerException(inner)
159            }
160            crate::operation::get_deployment_pattern_version::GetDeploymentPatternVersionError::ResourceNotFoundException(inner) => {
161                Error::ResourceNotFoundException(inner)
162            }
163            crate::operation::get_deployment_pattern_version::GetDeploymentPatternVersionError::Unhandled(inner) => Error::Unhandled(inner),
164        }
165    }
166}
167impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::get_workload::GetWorkloadError, R>> for Error
168where
169    R: Send + Sync + std::fmt::Debug + 'static,
170{
171    fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::get_workload::GetWorkloadError, R>) -> Self {
172        match err {
173            ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
174            _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
175                meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
176                source: err.into(),
177            }),
178        }
179    }
180}
181impl From<crate::operation::get_workload::GetWorkloadError> for Error {
182    fn from(err: crate::operation::get_workload::GetWorkloadError) -> Self {
183        match err {
184            crate::operation::get_workload::GetWorkloadError::InternalServerException(inner) => Error::InternalServerException(inner),
185            crate::operation::get_workload::GetWorkloadError::ResourceNotFoundException(inner) => Error::ResourceNotFoundException(inner),
186            crate::operation::get_workload::GetWorkloadError::ValidationException(inner) => Error::ValidationException(inner),
187            crate::operation::get_workload::GetWorkloadError::Unhandled(inner) => Error::Unhandled(inner),
188        }
189    }
190}
191impl<R>
192    From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::get_workload_deployment_pattern::GetWorkloadDeploymentPatternError, R>>
193    for Error
194where
195    R: Send + Sync + std::fmt::Debug + 'static,
196{
197    fn from(
198        err: ::aws_smithy_runtime_api::client::result::SdkError<
199            crate::operation::get_workload_deployment_pattern::GetWorkloadDeploymentPatternError,
200            R,
201        >,
202    ) -> Self {
203        match err {
204            ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
205            _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
206                meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
207                source: err.into(),
208            }),
209        }
210    }
211}
212impl From<crate::operation::get_workload_deployment_pattern::GetWorkloadDeploymentPatternError> for Error {
213    fn from(err: crate::operation::get_workload_deployment_pattern::GetWorkloadDeploymentPatternError) -> Self {
214        match err {
215            crate::operation::get_workload_deployment_pattern::GetWorkloadDeploymentPatternError::InternalServerException(inner) => {
216                Error::InternalServerException(inner)
217            }
218            crate::operation::get_workload_deployment_pattern::GetWorkloadDeploymentPatternError::ResourceNotFoundException(inner) => {
219                Error::ResourceNotFoundException(inner)
220            }
221            crate::operation::get_workload_deployment_pattern::GetWorkloadDeploymentPatternError::ValidationException(inner) => {
222                Error::ValidationException(inner)
223            }
224            crate::operation::get_workload_deployment_pattern::GetWorkloadDeploymentPatternError::Unhandled(inner) => Error::Unhandled(inner),
225        }
226    }
227}
228impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::list_deployment_events::ListDeploymentEventsError, R>> for Error
229where
230    R: Send + Sync + std::fmt::Debug + 'static,
231{
232    fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::list_deployment_events::ListDeploymentEventsError, R>) -> 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::list_deployment_events::ListDeploymentEventsError> for Error {
243    fn from(err: crate::operation::list_deployment_events::ListDeploymentEventsError) -> Self {
244        match err {
245            crate::operation::list_deployment_events::ListDeploymentEventsError::InternalServerException(inner) => {
246                Error::InternalServerException(inner)
247            }
248            crate::operation::list_deployment_events::ListDeploymentEventsError::ResourceNotFoundException(inner) => {
249                Error::ResourceNotFoundException(inner)
250            }
251            crate::operation::list_deployment_events::ListDeploymentEventsError::ValidationException(inner) => Error::ValidationException(inner),
252            crate::operation::list_deployment_events::ListDeploymentEventsError::Unhandled(inner) => Error::Unhandled(inner),
253        }
254    }
255}
256impl<R>
257    From<
258        ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::list_deployment_pattern_versions::ListDeploymentPatternVersionsError, R>,
259    > for Error
260where
261    R: Send + Sync + std::fmt::Debug + 'static,
262{
263    fn from(
264        err: ::aws_smithy_runtime_api::client::result::SdkError<
265            crate::operation::list_deployment_pattern_versions::ListDeploymentPatternVersionsError,
266            R,
267        >,
268    ) -> Self {
269        match err {
270            ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
271            _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
272                meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
273                source: err.into(),
274            }),
275        }
276    }
277}
278impl From<crate::operation::list_deployment_pattern_versions::ListDeploymentPatternVersionsError> for Error {
279    fn from(err: crate::operation::list_deployment_pattern_versions::ListDeploymentPatternVersionsError) -> Self {
280        match err {
281            crate::operation::list_deployment_pattern_versions::ListDeploymentPatternVersionsError::InternalServerException(inner) => {
282                Error::InternalServerException(inner)
283            }
284            crate::operation::list_deployment_pattern_versions::ListDeploymentPatternVersionsError::ResourceNotFoundException(inner) => {
285                Error::ResourceNotFoundException(inner)
286            }
287            crate::operation::list_deployment_pattern_versions::ListDeploymentPatternVersionsError::ValidationException(inner) => {
288                Error::ValidationException(inner)
289            }
290            crate::operation::list_deployment_pattern_versions::ListDeploymentPatternVersionsError::Unhandled(inner) => Error::Unhandled(inner),
291        }
292    }
293}
294impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::list_deployments::ListDeploymentsError, R>> for Error
295where
296    R: Send + Sync + std::fmt::Debug + 'static,
297{
298    fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::list_deployments::ListDeploymentsError, R>) -> Self {
299        match err {
300            ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
301            _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
302                meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
303                source: err.into(),
304            }),
305        }
306    }
307}
308impl From<crate::operation::list_deployments::ListDeploymentsError> for Error {
309    fn from(err: crate::operation::list_deployments::ListDeploymentsError) -> Self {
310        match err {
311            crate::operation::list_deployments::ListDeploymentsError::InternalServerException(inner) => Error::InternalServerException(inner),
312            crate::operation::list_deployments::ListDeploymentsError::ValidationException(inner) => Error::ValidationException(inner),
313            crate::operation::list_deployments::ListDeploymentsError::Unhandled(inner) => Error::Unhandled(inner),
314        }
315    }
316}
317impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::list_tags_for_resource::ListTagsForResourceError, R>> for Error
318where
319    R: Send + Sync + std::fmt::Debug + 'static,
320{
321    fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::list_tags_for_resource::ListTagsForResourceError, R>) -> Self {
322        match err {
323            ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
324            _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
325                meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
326                source: err.into(),
327            }),
328        }
329    }
330}
331impl From<crate::operation::list_tags_for_resource::ListTagsForResourceError> for Error {
332    fn from(err: crate::operation::list_tags_for_resource::ListTagsForResourceError) -> Self {
333        match err {
334            crate::operation::list_tags_for_resource::ListTagsForResourceError::InternalServerException(inner) => {
335                Error::InternalServerException(inner)
336            }
337            crate::operation::list_tags_for_resource::ListTagsForResourceError::ResourceNotFoundException(inner) => {
338                Error::ResourceNotFoundException(inner)
339            }
340            crate::operation::list_tags_for_resource::ListTagsForResourceError::ValidationException(inner) => Error::ValidationException(inner),
341            crate::operation::list_tags_for_resource::ListTagsForResourceError::Unhandled(inner) => Error::Unhandled(inner),
342        }
343    }
344}
345impl<R>
346    From<
347        ::aws_smithy_runtime_api::client::result::SdkError<
348            crate::operation::list_workload_deployment_patterns::ListWorkloadDeploymentPatternsError,
349            R,
350        >,
351    > for Error
352where
353    R: Send + Sync + std::fmt::Debug + 'static,
354{
355    fn from(
356        err: ::aws_smithy_runtime_api::client::result::SdkError<
357            crate::operation::list_workload_deployment_patterns::ListWorkloadDeploymentPatternsError,
358            R,
359        >,
360    ) -> Self {
361        match err {
362            ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
363            _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
364                meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
365                source: err.into(),
366            }),
367        }
368    }
369}
370impl From<crate::operation::list_workload_deployment_patterns::ListWorkloadDeploymentPatternsError> for Error {
371    fn from(err: crate::operation::list_workload_deployment_patterns::ListWorkloadDeploymentPatternsError) -> Self {
372        match err {
373            crate::operation::list_workload_deployment_patterns::ListWorkloadDeploymentPatternsError::InternalServerException(inner) => {
374                Error::InternalServerException(inner)
375            }
376            crate::operation::list_workload_deployment_patterns::ListWorkloadDeploymentPatternsError::ResourceNotFoundException(inner) => {
377                Error::ResourceNotFoundException(inner)
378            }
379            crate::operation::list_workload_deployment_patterns::ListWorkloadDeploymentPatternsError::ValidationException(inner) => {
380                Error::ValidationException(inner)
381            }
382            crate::operation::list_workload_deployment_patterns::ListWorkloadDeploymentPatternsError::Unhandled(inner) => Error::Unhandled(inner),
383        }
384    }
385}
386impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::list_workloads::ListWorkloadsError, R>> for Error
387where
388    R: Send + Sync + std::fmt::Debug + 'static,
389{
390    fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::list_workloads::ListWorkloadsError, R>) -> Self {
391        match err {
392            ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
393            _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
394                meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
395                source: err.into(),
396            }),
397        }
398    }
399}
400impl From<crate::operation::list_workloads::ListWorkloadsError> for Error {
401    fn from(err: crate::operation::list_workloads::ListWorkloadsError) -> Self {
402        match err {
403            crate::operation::list_workloads::ListWorkloadsError::InternalServerException(inner) => Error::InternalServerException(inner),
404            crate::operation::list_workloads::ListWorkloadsError::ValidationException(inner) => Error::ValidationException(inner),
405            crate::operation::list_workloads::ListWorkloadsError::Unhandled(inner) => Error::Unhandled(inner),
406        }
407    }
408}
409impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::tag_resource::TagResourceError, R>> for Error
410where
411    R: Send + Sync + std::fmt::Debug + 'static,
412{
413    fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::tag_resource::TagResourceError, R>) -> Self {
414        match err {
415            ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
416            _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
417                meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
418                source: err.into(),
419            }),
420        }
421    }
422}
423impl From<crate::operation::tag_resource::TagResourceError> for Error {
424    fn from(err: crate::operation::tag_resource::TagResourceError) -> Self {
425        match err {
426            crate::operation::tag_resource::TagResourceError::InternalServerException(inner) => Error::InternalServerException(inner),
427            crate::operation::tag_resource::TagResourceError::ResourceNotFoundException(inner) => Error::ResourceNotFoundException(inner),
428            crate::operation::tag_resource::TagResourceError::ValidationException(inner) => Error::ValidationException(inner),
429            crate::operation::tag_resource::TagResourceError::Unhandled(inner) => Error::Unhandled(inner),
430        }
431    }
432}
433impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::untag_resource::UntagResourceError, 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::untag_resource::UntagResourceError, 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::untag_resource::UntagResourceError> for Error {
448    fn from(err: crate::operation::untag_resource::UntagResourceError) -> Self {
449        match err {
450            crate::operation::untag_resource::UntagResourceError::InternalServerException(inner) => Error::InternalServerException(inner),
451            crate::operation::untag_resource::UntagResourceError::ResourceNotFoundException(inner) => Error::ResourceNotFoundException(inner),
452            crate::operation::untag_resource::UntagResourceError::ValidationException(inner) => Error::ValidationException(inner),
453            crate::operation::untag_resource::UntagResourceError::Unhandled(inner) => Error::Unhandled(inner),
454        }
455    }
456}
457impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::update_deployment::UpdateDeploymentError, R>> for Error
458where
459    R: Send + Sync + std::fmt::Debug + 'static,
460{
461    fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::update_deployment::UpdateDeploymentError, R>) -> Self {
462        match err {
463            ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
464            _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
465                meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
466                source: err.into(),
467            }),
468        }
469    }
470}
471impl From<crate::operation::update_deployment::UpdateDeploymentError> for Error {
472    fn from(err: crate::operation::update_deployment::UpdateDeploymentError) -> Self {
473        match err {
474            crate::operation::update_deployment::UpdateDeploymentError::InternalServerException(inner) => Error::InternalServerException(inner),
475            crate::operation::update_deployment::UpdateDeploymentError::ResourceLimitException(inner) => Error::ResourceLimitException(inner),
476            crate::operation::update_deployment::UpdateDeploymentError::ResourceNotFoundException(inner) => Error::ResourceNotFoundException(inner),
477            crate::operation::update_deployment::UpdateDeploymentError::ValidationException(inner) => Error::ValidationException(inner),
478            crate::operation::update_deployment::UpdateDeploymentError::Unhandled(inner) => Error::Unhandled(inner),
479        }
480    }
481}
482impl ::std::error::Error for Error {
483    fn source(&self) -> std::option::Option<&(dyn ::std::error::Error + 'static)> {
484        match self {
485            Error::InternalServerException(inner) => inner.source(),
486            Error::ResourceLimitException(inner) => inner.source(),
487            Error::ResourceNotFoundException(inner) => inner.source(),
488            Error::ValidationException(inner) => inner.source(),
489            Error::Unhandled(inner) => ::std::option::Option::Some(&*inner.source),
490        }
491    }
492}
493impl ::aws_types::request_id::RequestId for Error {
494    fn request_id(&self) -> Option<&str> {
495        match self {
496            Self::InternalServerException(e) => e.request_id(),
497            Self::ResourceLimitException(e) => e.request_id(),
498            Self::ResourceNotFoundException(e) => e.request_id(),
499            Self::ValidationException(e) => e.request_id(),
500            Self::Unhandled(e) => e.meta.request_id(),
501        }
502    }
503}