aws_sdk_ssmsap/
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>A conflict has occurred.</p>
7    ConflictException(crate::types::error::ConflictException),
8    /// <p>An internal error has occurred.</p>
9    InternalServerException(crate::types::error::InternalServerException),
10    /// <p>The resource is not available.</p>
11    ResourceNotFoundException(crate::types::error::ResourceNotFoundException),
12    /// <p>The request is not authorized.</p>
13    UnauthorizedException(crate::types::error::UnauthorizedException),
14    /// <p>The input fails to satisfy the constraints specified by an AWS service.</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::ConflictException(inner) => inner.fmt(f),
29            Error::InternalServerException(inner) => inner.fmt(f),
30            Error::ResourceNotFoundException(inner) => inner.fmt(f),
31            Error::UnauthorizedException(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::ConflictException(inner) => inner.meta(),
55            Self::InternalServerException(inner) => inner.meta(),
56            Self::ResourceNotFoundException(inner) => inner.meta(),
57            Self::UnauthorizedException(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::delete_resource_permission::DeleteResourcePermissionError, R>>
64    for Error
65where
66    R: Send + Sync + std::fmt::Debug + 'static,
67{
68    fn from(
69        err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::delete_resource_permission::DeleteResourcePermissionError, R>,
70    ) -> Self {
71        match err {
72            ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
73            _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
74                meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
75                source: err.into(),
76            }),
77        }
78    }
79}
80impl From<crate::operation::delete_resource_permission::DeleteResourcePermissionError> for Error {
81    fn from(err: crate::operation::delete_resource_permission::DeleteResourcePermissionError) -> Self {
82        match err {
83            crate::operation::delete_resource_permission::DeleteResourcePermissionError::InternalServerException(inner) => {
84                Error::InternalServerException(inner)
85            }
86            crate::operation::delete_resource_permission::DeleteResourcePermissionError::ResourceNotFoundException(inner) => {
87                Error::ResourceNotFoundException(inner)
88            }
89            crate::operation::delete_resource_permission::DeleteResourcePermissionError::ValidationException(inner) => {
90                Error::ValidationException(inner)
91            }
92            crate::operation::delete_resource_permission::DeleteResourcePermissionError::Unhandled(inner) => Error::Unhandled(inner),
93        }
94    }
95}
96impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::deregister_application::DeregisterApplicationError, R>> for Error
97where
98    R: Send + Sync + std::fmt::Debug + 'static,
99{
100    fn from(
101        err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::deregister_application::DeregisterApplicationError, R>,
102    ) -> Self {
103        match err {
104            ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
105            _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
106                meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
107                source: err.into(),
108            }),
109        }
110    }
111}
112impl From<crate::operation::deregister_application::DeregisterApplicationError> for Error {
113    fn from(err: crate::operation::deregister_application::DeregisterApplicationError) -> Self {
114        match err {
115            crate::operation::deregister_application::DeregisterApplicationError::InternalServerException(inner) => {
116                Error::InternalServerException(inner)
117            }
118            crate::operation::deregister_application::DeregisterApplicationError::UnauthorizedException(inner) => Error::UnauthorizedException(inner),
119            crate::operation::deregister_application::DeregisterApplicationError::ValidationException(inner) => Error::ValidationException(inner),
120            crate::operation::deregister_application::DeregisterApplicationError::Unhandled(inner) => Error::Unhandled(inner),
121        }
122    }
123}
124impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::get_application::GetApplicationError, R>> for Error
125where
126    R: Send + Sync + std::fmt::Debug + 'static,
127{
128    fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::get_application::GetApplicationError, R>) -> Self {
129        match err {
130            ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
131            _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
132                meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
133                source: err.into(),
134            }),
135        }
136    }
137}
138impl From<crate::operation::get_application::GetApplicationError> for Error {
139    fn from(err: crate::operation::get_application::GetApplicationError) -> Self {
140        match err {
141            crate::operation::get_application::GetApplicationError::InternalServerException(inner) => Error::InternalServerException(inner),
142            crate::operation::get_application::GetApplicationError::ValidationException(inner) => Error::ValidationException(inner),
143            crate::operation::get_application::GetApplicationError::Unhandled(inner) => Error::Unhandled(inner),
144        }
145    }
146}
147impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::get_component::GetComponentError, R>> for Error
148where
149    R: Send + Sync + std::fmt::Debug + 'static,
150{
151    fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::get_component::GetComponentError, R>) -> Self {
152        match err {
153            ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
154            _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
155                meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
156                source: err.into(),
157            }),
158        }
159    }
160}
161impl From<crate::operation::get_component::GetComponentError> for Error {
162    fn from(err: crate::operation::get_component::GetComponentError) -> Self {
163        match err {
164            crate::operation::get_component::GetComponentError::InternalServerException(inner) => Error::InternalServerException(inner),
165            crate::operation::get_component::GetComponentError::UnauthorizedException(inner) => Error::UnauthorizedException(inner),
166            crate::operation::get_component::GetComponentError::ValidationException(inner) => Error::ValidationException(inner),
167            crate::operation::get_component::GetComponentError::Unhandled(inner) => Error::Unhandled(inner),
168        }
169    }
170}
171impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::get_database::GetDatabaseError, R>> for Error
172where
173    R: Send + Sync + std::fmt::Debug + 'static,
174{
175    fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::get_database::GetDatabaseError, R>) -> Self {
176        match err {
177            ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
178            _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
179                meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
180                source: err.into(),
181            }),
182        }
183    }
184}
185impl From<crate::operation::get_database::GetDatabaseError> for Error {
186    fn from(err: crate::operation::get_database::GetDatabaseError) -> Self {
187        match err {
188            crate::operation::get_database::GetDatabaseError::InternalServerException(inner) => Error::InternalServerException(inner),
189            crate::operation::get_database::GetDatabaseError::ValidationException(inner) => Error::ValidationException(inner),
190            crate::operation::get_database::GetDatabaseError::Unhandled(inner) => Error::Unhandled(inner),
191        }
192    }
193}
194impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::get_operation::GetOperationError, R>> for Error
195where
196    R: Send + Sync + std::fmt::Debug + 'static,
197{
198    fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::get_operation::GetOperationError, R>) -> Self {
199        match err {
200            ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
201            _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
202                meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
203                source: err.into(),
204            }),
205        }
206    }
207}
208impl From<crate::operation::get_operation::GetOperationError> for Error {
209    fn from(err: crate::operation::get_operation::GetOperationError) -> Self {
210        match err {
211            crate::operation::get_operation::GetOperationError::InternalServerException(inner) => Error::InternalServerException(inner),
212            crate::operation::get_operation::GetOperationError::ValidationException(inner) => Error::ValidationException(inner),
213            crate::operation::get_operation::GetOperationError::Unhandled(inner) => Error::Unhandled(inner),
214        }
215    }
216}
217impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::get_resource_permission::GetResourcePermissionError, R>> for Error
218where
219    R: Send + Sync + std::fmt::Debug + 'static,
220{
221    fn from(
222        err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::get_resource_permission::GetResourcePermissionError, R>,
223    ) -> Self {
224        match err {
225            ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
226            _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
227                meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
228                source: err.into(),
229            }),
230        }
231    }
232}
233impl From<crate::operation::get_resource_permission::GetResourcePermissionError> for Error {
234    fn from(err: crate::operation::get_resource_permission::GetResourcePermissionError) -> Self {
235        match err {
236            crate::operation::get_resource_permission::GetResourcePermissionError::InternalServerException(inner) => {
237                Error::InternalServerException(inner)
238            }
239            crate::operation::get_resource_permission::GetResourcePermissionError::ResourceNotFoundException(inner) => {
240                Error::ResourceNotFoundException(inner)
241            }
242            crate::operation::get_resource_permission::GetResourcePermissionError::ValidationException(inner) => Error::ValidationException(inner),
243            crate::operation::get_resource_permission::GetResourcePermissionError::Unhandled(inner) => Error::Unhandled(inner),
244        }
245    }
246}
247impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::list_applications::ListApplicationsError, R>> for Error
248where
249    R: Send + Sync + std::fmt::Debug + 'static,
250{
251    fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::list_applications::ListApplicationsError, R>) -> Self {
252        match err {
253            ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
254            _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
255                meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
256                source: err.into(),
257            }),
258        }
259    }
260}
261impl From<crate::operation::list_applications::ListApplicationsError> for Error {
262    fn from(err: crate::operation::list_applications::ListApplicationsError) -> Self {
263        match err {
264            crate::operation::list_applications::ListApplicationsError::InternalServerException(inner) => Error::InternalServerException(inner),
265            crate::operation::list_applications::ListApplicationsError::ResourceNotFoundException(inner) => Error::ResourceNotFoundException(inner),
266            crate::operation::list_applications::ListApplicationsError::ValidationException(inner) => Error::ValidationException(inner),
267            crate::operation::list_applications::ListApplicationsError::Unhandled(inner) => Error::Unhandled(inner),
268        }
269    }
270}
271impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::list_components::ListComponentsError, R>> for Error
272where
273    R: Send + Sync + std::fmt::Debug + 'static,
274{
275    fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::list_components::ListComponentsError, R>) -> Self {
276        match err {
277            ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
278            _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
279                meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
280                source: err.into(),
281            }),
282        }
283    }
284}
285impl From<crate::operation::list_components::ListComponentsError> for Error {
286    fn from(err: crate::operation::list_components::ListComponentsError) -> Self {
287        match err {
288            crate::operation::list_components::ListComponentsError::InternalServerException(inner) => Error::InternalServerException(inner),
289            crate::operation::list_components::ListComponentsError::ResourceNotFoundException(inner) => Error::ResourceNotFoundException(inner),
290            crate::operation::list_components::ListComponentsError::UnauthorizedException(inner) => Error::UnauthorizedException(inner),
291            crate::operation::list_components::ListComponentsError::ValidationException(inner) => Error::ValidationException(inner),
292            crate::operation::list_components::ListComponentsError::Unhandled(inner) => Error::Unhandled(inner),
293        }
294    }
295}
296impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::list_databases::ListDatabasesError, R>> for Error
297where
298    R: Send + Sync + std::fmt::Debug + 'static,
299{
300    fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::list_databases::ListDatabasesError, R>) -> Self {
301        match err {
302            ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
303            _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
304                meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
305                source: err.into(),
306            }),
307        }
308    }
309}
310impl From<crate::operation::list_databases::ListDatabasesError> for Error {
311    fn from(err: crate::operation::list_databases::ListDatabasesError) -> Self {
312        match err {
313            crate::operation::list_databases::ListDatabasesError::InternalServerException(inner) => Error::InternalServerException(inner),
314            crate::operation::list_databases::ListDatabasesError::ResourceNotFoundException(inner) => Error::ResourceNotFoundException(inner),
315            crate::operation::list_databases::ListDatabasesError::ValidationException(inner) => Error::ValidationException(inner),
316            crate::operation::list_databases::ListDatabasesError::Unhandled(inner) => Error::Unhandled(inner),
317        }
318    }
319}
320impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::list_operation_events::ListOperationEventsError, R>> for Error
321where
322    R: Send + Sync + std::fmt::Debug + 'static,
323{
324    fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::list_operation_events::ListOperationEventsError, R>) -> Self {
325        match err {
326            ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
327            _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
328                meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
329                source: err.into(),
330            }),
331        }
332    }
333}
334impl From<crate::operation::list_operation_events::ListOperationEventsError> for Error {
335    fn from(err: crate::operation::list_operation_events::ListOperationEventsError) -> Self {
336        match err {
337            crate::operation::list_operation_events::ListOperationEventsError::InternalServerException(inner) => {
338                Error::InternalServerException(inner)
339            }
340            crate::operation::list_operation_events::ListOperationEventsError::ValidationException(inner) => Error::ValidationException(inner),
341            crate::operation::list_operation_events::ListOperationEventsError::Unhandled(inner) => Error::Unhandled(inner),
342        }
343    }
344}
345impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::list_operations::ListOperationsError, R>> for Error
346where
347    R: Send + Sync + std::fmt::Debug + 'static,
348{
349    fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::list_operations::ListOperationsError, R>) -> Self {
350        match err {
351            ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
352            _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
353                meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
354                source: err.into(),
355            }),
356        }
357    }
358}
359impl From<crate::operation::list_operations::ListOperationsError> for Error {
360    fn from(err: crate::operation::list_operations::ListOperationsError) -> Self {
361        match err {
362            crate::operation::list_operations::ListOperationsError::InternalServerException(inner) => Error::InternalServerException(inner),
363            crate::operation::list_operations::ListOperationsError::ValidationException(inner) => Error::ValidationException(inner),
364            crate::operation::list_operations::ListOperationsError::Unhandled(inner) => Error::Unhandled(inner),
365        }
366    }
367}
368impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::list_tags_for_resource::ListTagsForResourceError, R>> for Error
369where
370    R: Send + Sync + std::fmt::Debug + 'static,
371{
372    fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::list_tags_for_resource::ListTagsForResourceError, R>) -> Self {
373        match err {
374            ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
375            _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
376                meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
377                source: err.into(),
378            }),
379        }
380    }
381}
382impl From<crate::operation::list_tags_for_resource::ListTagsForResourceError> for Error {
383    fn from(err: crate::operation::list_tags_for_resource::ListTagsForResourceError) -> Self {
384        match err {
385            crate::operation::list_tags_for_resource::ListTagsForResourceError::ConflictException(inner) => Error::ConflictException(inner),
386            crate::operation::list_tags_for_resource::ListTagsForResourceError::ResourceNotFoundException(inner) => {
387                Error::ResourceNotFoundException(inner)
388            }
389            crate::operation::list_tags_for_resource::ListTagsForResourceError::ValidationException(inner) => Error::ValidationException(inner),
390            crate::operation::list_tags_for_resource::ListTagsForResourceError::Unhandled(inner) => Error::Unhandled(inner),
391        }
392    }
393}
394impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::put_resource_permission::PutResourcePermissionError, R>> for Error
395where
396    R: Send + Sync + std::fmt::Debug + 'static,
397{
398    fn from(
399        err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::put_resource_permission::PutResourcePermissionError, R>,
400    ) -> Self {
401        match err {
402            ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
403            _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
404                meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
405                source: err.into(),
406            }),
407        }
408    }
409}
410impl From<crate::operation::put_resource_permission::PutResourcePermissionError> for Error {
411    fn from(err: crate::operation::put_resource_permission::PutResourcePermissionError) -> Self {
412        match err {
413            crate::operation::put_resource_permission::PutResourcePermissionError::InternalServerException(inner) => {
414                Error::InternalServerException(inner)
415            }
416            crate::operation::put_resource_permission::PutResourcePermissionError::ResourceNotFoundException(inner) => {
417                Error::ResourceNotFoundException(inner)
418            }
419            crate::operation::put_resource_permission::PutResourcePermissionError::ValidationException(inner) => Error::ValidationException(inner),
420            crate::operation::put_resource_permission::PutResourcePermissionError::Unhandled(inner) => Error::Unhandled(inner),
421        }
422    }
423}
424impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::register_application::RegisterApplicationError, R>> for Error
425where
426    R: Send + Sync + std::fmt::Debug + 'static,
427{
428    fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::register_application::RegisterApplicationError, R>) -> Self {
429        match err {
430            ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
431            _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
432                meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
433                source: err.into(),
434            }),
435        }
436    }
437}
438impl From<crate::operation::register_application::RegisterApplicationError> for Error {
439    fn from(err: crate::operation::register_application::RegisterApplicationError) -> Self {
440        match err {
441            crate::operation::register_application::RegisterApplicationError::ConflictException(inner) => Error::ConflictException(inner),
442            crate::operation::register_application::RegisterApplicationError::InternalServerException(inner) => Error::InternalServerException(inner),
443            crate::operation::register_application::RegisterApplicationError::ResourceNotFoundException(inner) => {
444                Error::ResourceNotFoundException(inner)
445            }
446            crate::operation::register_application::RegisterApplicationError::ValidationException(inner) => Error::ValidationException(inner),
447            crate::operation::register_application::RegisterApplicationError::Unhandled(inner) => Error::Unhandled(inner),
448        }
449    }
450}
451impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::start_application::StartApplicationError, R>> for Error
452where
453    R: Send + Sync + std::fmt::Debug + 'static,
454{
455    fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::start_application::StartApplicationError, R>) -> Self {
456        match err {
457            ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
458            _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
459                meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
460                source: err.into(),
461            }),
462        }
463    }
464}
465impl From<crate::operation::start_application::StartApplicationError> for Error {
466    fn from(err: crate::operation::start_application::StartApplicationError) -> Self {
467        match err {
468            crate::operation::start_application::StartApplicationError::ConflictException(inner) => Error::ConflictException(inner),
469            crate::operation::start_application::StartApplicationError::InternalServerException(inner) => Error::InternalServerException(inner),
470            crate::operation::start_application::StartApplicationError::ResourceNotFoundException(inner) => Error::ResourceNotFoundException(inner),
471            crate::operation::start_application::StartApplicationError::ValidationException(inner) => Error::ValidationException(inner),
472            crate::operation::start_application::StartApplicationError::Unhandled(inner) => Error::Unhandled(inner),
473        }
474    }
475}
476impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::start_application_refresh::StartApplicationRefreshError, R>>
477    for Error
478where
479    R: Send + Sync + std::fmt::Debug + 'static,
480{
481    fn from(
482        err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::start_application_refresh::StartApplicationRefreshError, R>,
483    ) -> Self {
484        match err {
485            ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
486            _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
487                meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
488                source: err.into(),
489            }),
490        }
491    }
492}
493impl From<crate::operation::start_application_refresh::StartApplicationRefreshError> for Error {
494    fn from(err: crate::operation::start_application_refresh::StartApplicationRefreshError) -> Self {
495        match err {
496            crate::operation::start_application_refresh::StartApplicationRefreshError::ConflictException(inner) => Error::ConflictException(inner),
497            crate::operation::start_application_refresh::StartApplicationRefreshError::InternalServerException(inner) => {
498                Error::InternalServerException(inner)
499            }
500            crate::operation::start_application_refresh::StartApplicationRefreshError::ResourceNotFoundException(inner) => {
501                Error::ResourceNotFoundException(inner)
502            }
503            crate::operation::start_application_refresh::StartApplicationRefreshError::UnauthorizedException(inner) => {
504                Error::UnauthorizedException(inner)
505            }
506            crate::operation::start_application_refresh::StartApplicationRefreshError::ValidationException(inner) => {
507                Error::ValidationException(inner)
508            }
509            crate::operation::start_application_refresh::StartApplicationRefreshError::Unhandled(inner) => Error::Unhandled(inner),
510        }
511    }
512}
513impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::stop_application::StopApplicationError, R>> for Error
514where
515    R: Send + Sync + std::fmt::Debug + 'static,
516{
517    fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::stop_application::StopApplicationError, R>) -> Self {
518        match err {
519            ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
520            _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
521                meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
522                source: err.into(),
523            }),
524        }
525    }
526}
527impl From<crate::operation::stop_application::StopApplicationError> for Error {
528    fn from(err: crate::operation::stop_application::StopApplicationError) -> Self {
529        match err {
530            crate::operation::stop_application::StopApplicationError::ConflictException(inner) => Error::ConflictException(inner),
531            crate::operation::stop_application::StopApplicationError::InternalServerException(inner) => Error::InternalServerException(inner),
532            crate::operation::stop_application::StopApplicationError::ResourceNotFoundException(inner) => Error::ResourceNotFoundException(inner),
533            crate::operation::stop_application::StopApplicationError::ValidationException(inner) => Error::ValidationException(inner),
534            crate::operation::stop_application::StopApplicationError::Unhandled(inner) => Error::Unhandled(inner),
535        }
536    }
537}
538impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::tag_resource::TagResourceError, R>> for Error
539where
540    R: Send + Sync + std::fmt::Debug + 'static,
541{
542    fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::tag_resource::TagResourceError, R>) -> Self {
543        match err {
544            ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
545            _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
546                meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
547                source: err.into(),
548            }),
549        }
550    }
551}
552impl From<crate::operation::tag_resource::TagResourceError> for Error {
553    fn from(err: crate::operation::tag_resource::TagResourceError) -> Self {
554        match err {
555            crate::operation::tag_resource::TagResourceError::ConflictException(inner) => Error::ConflictException(inner),
556            crate::operation::tag_resource::TagResourceError::ResourceNotFoundException(inner) => Error::ResourceNotFoundException(inner),
557            crate::operation::tag_resource::TagResourceError::ValidationException(inner) => Error::ValidationException(inner),
558            crate::operation::tag_resource::TagResourceError::Unhandled(inner) => Error::Unhandled(inner),
559        }
560    }
561}
562impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::untag_resource::UntagResourceError, R>> for Error
563where
564    R: Send + Sync + std::fmt::Debug + 'static,
565{
566    fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::untag_resource::UntagResourceError, R>) -> Self {
567        match err {
568            ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
569            _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
570                meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
571                source: err.into(),
572            }),
573        }
574    }
575}
576impl From<crate::operation::untag_resource::UntagResourceError> for Error {
577    fn from(err: crate::operation::untag_resource::UntagResourceError) -> Self {
578        match err {
579            crate::operation::untag_resource::UntagResourceError::ConflictException(inner) => Error::ConflictException(inner),
580            crate::operation::untag_resource::UntagResourceError::ResourceNotFoundException(inner) => Error::ResourceNotFoundException(inner),
581            crate::operation::untag_resource::UntagResourceError::ValidationException(inner) => Error::ValidationException(inner),
582            crate::operation::untag_resource::UntagResourceError::Unhandled(inner) => Error::Unhandled(inner),
583        }
584    }
585}
586impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::update_application_settings::UpdateApplicationSettingsError, R>>
587    for Error
588where
589    R: Send + Sync + std::fmt::Debug + 'static,
590{
591    fn from(
592        err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::update_application_settings::UpdateApplicationSettingsError, R>,
593    ) -> Self {
594        match err {
595            ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
596            _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
597                meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
598                source: err.into(),
599            }),
600        }
601    }
602}
603impl From<crate::operation::update_application_settings::UpdateApplicationSettingsError> for Error {
604    fn from(err: crate::operation::update_application_settings::UpdateApplicationSettingsError) -> Self {
605        match err {
606            crate::operation::update_application_settings::UpdateApplicationSettingsError::ConflictException(inner) => {
607                Error::ConflictException(inner)
608            }
609            crate::operation::update_application_settings::UpdateApplicationSettingsError::InternalServerException(inner) => {
610                Error::InternalServerException(inner)
611            }
612            crate::operation::update_application_settings::UpdateApplicationSettingsError::ResourceNotFoundException(inner) => {
613                Error::ResourceNotFoundException(inner)
614            }
615            crate::operation::update_application_settings::UpdateApplicationSettingsError::UnauthorizedException(inner) => {
616                Error::UnauthorizedException(inner)
617            }
618            crate::operation::update_application_settings::UpdateApplicationSettingsError::ValidationException(inner) => {
619                Error::ValidationException(inner)
620            }
621            crate::operation::update_application_settings::UpdateApplicationSettingsError::Unhandled(inner) => Error::Unhandled(inner),
622        }
623    }
624}
625impl ::std::error::Error for Error {
626    fn source(&self) -> std::option::Option<&(dyn ::std::error::Error + 'static)> {
627        match self {
628            Error::ConflictException(inner) => inner.source(),
629            Error::InternalServerException(inner) => inner.source(),
630            Error::ResourceNotFoundException(inner) => inner.source(),
631            Error::UnauthorizedException(inner) => inner.source(),
632            Error::ValidationException(inner) => inner.source(),
633            Error::Unhandled(inner) => ::std::option::Option::Some(&*inner.source),
634        }
635    }
636}
637impl ::aws_types::request_id::RequestId for Error {
638    fn request_id(&self) -> Option<&str> {
639        match self {
640            Self::ConflictException(e) => e.request_id(),
641            Self::InternalServerException(e) => e.request_id(),
642            Self::ResourceNotFoundException(e) => e.request_id(),
643            Self::UnauthorizedException(e) => e.request_id(),
644            Self::ValidationException(e) => e.request_id(),
645            Self::Unhandled(e) => e.meta.request_id(),
646        }
647    }
648}