Skip to main content

aws_sdk_cloudextensions/
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    /// The caller does not have permission to perform the operation.
7    AccessDeniedException(crate::types::error::AccessDeniedException),
8    /// The request conflicts with the current state of the resource.
9    ConflictException(crate::types::error::ConflictException),
10    /// The service couldn't process the request because of an internal error. Retry with capped exponential backoff and jitter.
11    InternalServerException(crate::types::error::InternalServerException),
12    /// The specified resource does not exist or the caller does not have permission to access it.
13    ResourceNotFoundException(crate::types::error::ResourceNotFoundException),
14    /// The request would exceed a service quota for the account.
15    ServiceQuotaExceededException(crate::types::error::ServiceQuotaExceededException),
16    /// The request rate exceeded a limit. Retry with capped exponential backoff and jitter.
17    ThrottlingException(crate::types::error::ThrottlingException),
18    /// The request was malformed or contained invalid parameter values.
19    ValidationException(crate::types::error::ValidationException),
20    /// An unexpected error occurred (e.g., invalid JSON returned by the service or an unknown error code).
21    #[deprecated(note = "Matching `Unhandled` directly is not forwards compatible. Instead, match using a \
22    variable wildcard pattern and check `.code()`:
23     \
24       `err if err.code() == Some(\"SpecificExceptionCode\") => { /* handle the error */ }`
25     \
26    See [`ProvideErrorMetadata`](#impl-ProvideErrorMetadata-for-Error) for what information is available for the error.")]
27    Unhandled(crate::error::sealed_unhandled::Unhandled),
28}
29impl ::std::fmt::Display for Error {
30    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
31        match self {
32            Error::AccessDeniedException(inner) => inner.fmt(f),
33            Error::ConflictException(inner) => inner.fmt(f),
34            Error::InternalServerException(inner) => inner.fmt(f),
35            Error::ResourceNotFoundException(inner) => inner.fmt(f),
36            Error::ServiceQuotaExceededException(inner) => inner.fmt(f),
37            Error::ThrottlingException(inner) => inner.fmt(f),
38            Error::ValidationException(inner) => inner.fmt(f),
39            Error::Unhandled(_) => {
40                if let ::std::option::Option::Some(code) = ::aws_smithy_types::error::metadata::ProvideErrorMetadata::code(self) {
41                    write!(f, "unhandled error ({code})")
42                } else {
43                    f.write_str("unhandled error")
44                }
45            }
46        }
47    }
48}
49impl From<::aws_smithy_types::error::operation::BuildError> for Error {
50    fn from(value: ::aws_smithy_types::error::operation::BuildError) -> Self {
51        Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
52            source: value.into(),
53            meta: ::std::default::Default::default(),
54        })
55    }
56}
57impl ::aws_smithy_types::error::metadata::ProvideErrorMetadata for Error {
58    fn meta(&self) -> &::aws_smithy_types::error::metadata::ErrorMetadata {
59        match self {
60            Self::AccessDeniedException(inner) => inner.meta(),
61            Self::ConflictException(inner) => inner.meta(),
62            Self::InternalServerException(inner) => inner.meta(),
63            Self::ResourceNotFoundException(inner) => inner.meta(),
64            Self::ServiceQuotaExceededException(inner) => inner.meta(),
65            Self::ThrottlingException(inner) => inner.meta(),
66            Self::ValidationException(inner) => inner.meta(),
67            Self::Unhandled(inner) => &inner.meta,
68        }
69    }
70}
71impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::create_profile::CreateProfileError, R>> for Error
72where
73    R: Send + Sync + std::fmt::Debug + 'static,
74{
75    fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::create_profile::CreateProfileError, R>) -> Self {
76        match err {
77            ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
78            _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
79                meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
80                source: err.into(),
81            }),
82        }
83    }
84}
85impl From<crate::operation::create_profile::CreateProfileError> for Error {
86    fn from(err: crate::operation::create_profile::CreateProfileError) -> Self {
87        match err {
88            crate::operation::create_profile::CreateProfileError::ConflictException(inner) => Error::ConflictException(inner),
89            crate::operation::create_profile::CreateProfileError::ServiceQuotaExceededException(inner) => Error::ServiceQuotaExceededException(inner),
90            crate::operation::create_profile::CreateProfileError::ValidationException(inner) => Error::ValidationException(inner),
91            crate::operation::create_profile::CreateProfileError::AccessDeniedException(inner) => Error::AccessDeniedException(inner),
92            crate::operation::create_profile::CreateProfileError::InternalServerException(inner) => Error::InternalServerException(inner),
93            crate::operation::create_profile::CreateProfileError::ThrottlingException(inner) => Error::ThrottlingException(inner),
94            crate::operation::create_profile::CreateProfileError::Unhandled(inner) => Error::Unhandled(inner),
95        }
96    }
97}
98impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::create_profile_entry::CreateProfileEntryError, R>> for Error
99where
100    R: Send + Sync + std::fmt::Debug + 'static,
101{
102    fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::create_profile_entry::CreateProfileEntryError, R>) -> 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::create_profile_entry::CreateProfileEntryError> for Error {
113    fn from(err: crate::operation::create_profile_entry::CreateProfileEntryError) -> Self {
114        match err {
115            crate::operation::create_profile_entry::CreateProfileEntryError::ConflictException(inner) => Error::ConflictException(inner),
116            crate::operation::create_profile_entry::CreateProfileEntryError::ResourceNotFoundException(inner) => {
117                Error::ResourceNotFoundException(inner)
118            }
119            crate::operation::create_profile_entry::CreateProfileEntryError::ServiceQuotaExceededException(inner) => {
120                Error::ServiceQuotaExceededException(inner)
121            }
122            crate::operation::create_profile_entry::CreateProfileEntryError::ValidationException(inner) => Error::ValidationException(inner),
123            crate::operation::create_profile_entry::CreateProfileEntryError::AccessDeniedException(inner) => Error::AccessDeniedException(inner),
124            crate::operation::create_profile_entry::CreateProfileEntryError::InternalServerException(inner) => Error::InternalServerException(inner),
125            crate::operation::create_profile_entry::CreateProfileEntryError::ThrottlingException(inner) => Error::ThrottlingException(inner),
126            crate::operation::create_profile_entry::CreateProfileEntryError::Unhandled(inner) => Error::Unhandled(inner),
127        }
128    }
129}
130impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::delete_profile::DeleteProfileError, R>> for Error
131where
132    R: Send + Sync + std::fmt::Debug + 'static,
133{
134    fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::delete_profile::DeleteProfileError, R>) -> Self {
135        match err {
136            ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
137            _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
138                meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
139                source: err.into(),
140            }),
141        }
142    }
143}
144impl From<crate::operation::delete_profile::DeleteProfileError> for Error {
145    fn from(err: crate::operation::delete_profile::DeleteProfileError) -> Self {
146        match err {
147            crate::operation::delete_profile::DeleteProfileError::ConflictException(inner) => Error::ConflictException(inner),
148            crate::operation::delete_profile::DeleteProfileError::ResourceNotFoundException(inner) => Error::ResourceNotFoundException(inner),
149            crate::operation::delete_profile::DeleteProfileError::ValidationException(inner) => Error::ValidationException(inner),
150            crate::operation::delete_profile::DeleteProfileError::AccessDeniedException(inner) => Error::AccessDeniedException(inner),
151            crate::operation::delete_profile::DeleteProfileError::InternalServerException(inner) => Error::InternalServerException(inner),
152            crate::operation::delete_profile::DeleteProfileError::ThrottlingException(inner) => Error::ThrottlingException(inner),
153            crate::operation::delete_profile::DeleteProfileError::Unhandled(inner) => Error::Unhandled(inner),
154        }
155    }
156}
157impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::delete_profile_entry::DeleteProfileEntryError, R>> for Error
158where
159    R: Send + Sync + std::fmt::Debug + 'static,
160{
161    fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::delete_profile_entry::DeleteProfileEntryError, R>) -> Self {
162        match err {
163            ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
164            _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
165                meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
166                source: err.into(),
167            }),
168        }
169    }
170}
171impl From<crate::operation::delete_profile_entry::DeleteProfileEntryError> for Error {
172    fn from(err: crate::operation::delete_profile_entry::DeleteProfileEntryError) -> Self {
173        match err {
174            crate::operation::delete_profile_entry::DeleteProfileEntryError::ConflictException(inner) => Error::ConflictException(inner),
175            crate::operation::delete_profile_entry::DeleteProfileEntryError::ResourceNotFoundException(inner) => {
176                Error::ResourceNotFoundException(inner)
177            }
178            crate::operation::delete_profile_entry::DeleteProfileEntryError::ValidationException(inner) => Error::ValidationException(inner),
179            crate::operation::delete_profile_entry::DeleteProfileEntryError::AccessDeniedException(inner) => Error::AccessDeniedException(inner),
180            crate::operation::delete_profile_entry::DeleteProfileEntryError::InternalServerException(inner) => Error::InternalServerException(inner),
181            crate::operation::delete_profile_entry::DeleteProfileEntryError::ThrottlingException(inner) => Error::ThrottlingException(inner),
182            crate::operation::delete_profile_entry::DeleteProfileEntryError::Unhandled(inner) => Error::Unhandled(inner),
183        }
184    }
185}
186impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::get_extension::GetExtensionError, R>> for Error
187where
188    R: Send + Sync + std::fmt::Debug + 'static,
189{
190    fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::get_extension::GetExtensionError, R>) -> Self {
191        match err {
192            ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
193            _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
194                meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
195                source: err.into(),
196            }),
197        }
198    }
199}
200impl From<crate::operation::get_extension::GetExtensionError> for Error {
201    fn from(err: crate::operation::get_extension::GetExtensionError) -> Self {
202        match err {
203            crate::operation::get_extension::GetExtensionError::ResourceNotFoundException(inner) => Error::ResourceNotFoundException(inner),
204            crate::operation::get_extension::GetExtensionError::ValidationException(inner) => Error::ValidationException(inner),
205            crate::operation::get_extension::GetExtensionError::AccessDeniedException(inner) => Error::AccessDeniedException(inner),
206            crate::operation::get_extension::GetExtensionError::InternalServerException(inner) => Error::InternalServerException(inner),
207            crate::operation::get_extension::GetExtensionError::ThrottlingException(inner) => Error::ThrottlingException(inner),
208            crate::operation::get_extension::GetExtensionError::Unhandled(inner) => Error::Unhandled(inner),
209        }
210    }
211}
212impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::get_profile::GetProfileError, R>> for Error
213where
214    R: Send + Sync + std::fmt::Debug + 'static,
215{
216    fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::get_profile::GetProfileError, R>) -> Self {
217        match err {
218            ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
219            _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
220                meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
221                source: err.into(),
222            }),
223        }
224    }
225}
226impl From<crate::operation::get_profile::GetProfileError> for Error {
227    fn from(err: crate::operation::get_profile::GetProfileError) -> Self {
228        match err {
229            crate::operation::get_profile::GetProfileError::ResourceNotFoundException(inner) => Error::ResourceNotFoundException(inner),
230            crate::operation::get_profile::GetProfileError::ValidationException(inner) => Error::ValidationException(inner),
231            crate::operation::get_profile::GetProfileError::AccessDeniedException(inner) => Error::AccessDeniedException(inner),
232            crate::operation::get_profile::GetProfileError::InternalServerException(inner) => Error::InternalServerException(inner),
233            crate::operation::get_profile::GetProfileError::ThrottlingException(inner) => Error::ThrottlingException(inner),
234            crate::operation::get_profile::GetProfileError::Unhandled(inner) => Error::Unhandled(inner),
235        }
236    }
237}
238impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::get_profile_entry::GetProfileEntryError, R>> for Error
239where
240    R: Send + Sync + std::fmt::Debug + 'static,
241{
242    fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::get_profile_entry::GetProfileEntryError, R>) -> Self {
243        match err {
244            ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
245            _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
246                meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
247                source: err.into(),
248            }),
249        }
250    }
251}
252impl From<crate::operation::get_profile_entry::GetProfileEntryError> for Error {
253    fn from(err: crate::operation::get_profile_entry::GetProfileEntryError) -> Self {
254        match err {
255            crate::operation::get_profile_entry::GetProfileEntryError::ResourceNotFoundException(inner) => Error::ResourceNotFoundException(inner),
256            crate::operation::get_profile_entry::GetProfileEntryError::ValidationException(inner) => Error::ValidationException(inner),
257            crate::operation::get_profile_entry::GetProfileEntryError::AccessDeniedException(inner) => Error::AccessDeniedException(inner),
258            crate::operation::get_profile_entry::GetProfileEntryError::InternalServerException(inner) => Error::InternalServerException(inner),
259            crate::operation::get_profile_entry::GetProfileEntryError::ThrottlingException(inner) => Error::ThrottlingException(inner),
260            crate::operation::get_profile_entry::GetProfileEntryError::Unhandled(inner) => Error::Unhandled(inner),
261        }
262    }
263}
264impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::list_extensions::ListExtensionsError, R>> for Error
265where
266    R: Send + Sync + std::fmt::Debug + 'static,
267{
268    fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::list_extensions::ListExtensionsError, R>) -> 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_extensions::ListExtensionsError> for Error {
279    fn from(err: crate::operation::list_extensions::ListExtensionsError) -> Self {
280        match err {
281            crate::operation::list_extensions::ListExtensionsError::ValidationException(inner) => Error::ValidationException(inner),
282            crate::operation::list_extensions::ListExtensionsError::AccessDeniedException(inner) => Error::AccessDeniedException(inner),
283            crate::operation::list_extensions::ListExtensionsError::InternalServerException(inner) => Error::InternalServerException(inner),
284            crate::operation::list_extensions::ListExtensionsError::ThrottlingException(inner) => Error::ThrottlingException(inner),
285            crate::operation::list_extensions::ListExtensionsError::Unhandled(inner) => Error::Unhandled(inner),
286        }
287    }
288}
289impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::list_extension_versions::ListExtensionVersionsError, R>> for Error
290where
291    R: Send + Sync + std::fmt::Debug + 'static,
292{
293    fn from(
294        err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::list_extension_versions::ListExtensionVersionsError, R>,
295    ) -> Self {
296        match err {
297            ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
298            _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
299                meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
300                source: err.into(),
301            }),
302        }
303    }
304}
305impl From<crate::operation::list_extension_versions::ListExtensionVersionsError> for Error {
306    fn from(err: crate::operation::list_extension_versions::ListExtensionVersionsError) -> Self {
307        match err {
308            crate::operation::list_extension_versions::ListExtensionVersionsError::ResourceNotFoundException(inner) => {
309                Error::ResourceNotFoundException(inner)
310            }
311            crate::operation::list_extension_versions::ListExtensionVersionsError::ValidationException(inner) => Error::ValidationException(inner),
312            crate::operation::list_extension_versions::ListExtensionVersionsError::AccessDeniedException(inner) => {
313                Error::AccessDeniedException(inner)
314            }
315            crate::operation::list_extension_versions::ListExtensionVersionsError::InternalServerException(inner) => {
316                Error::InternalServerException(inner)
317            }
318            crate::operation::list_extension_versions::ListExtensionVersionsError::ThrottlingException(inner) => Error::ThrottlingException(inner),
319            crate::operation::list_extension_versions::ListExtensionVersionsError::Unhandled(inner) => Error::Unhandled(inner),
320        }
321    }
322}
323impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::list_profile_entries::ListProfileEntriesError, R>> for Error
324where
325    R: Send + Sync + std::fmt::Debug + 'static,
326{
327    fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::list_profile_entries::ListProfileEntriesError, R>) -> Self {
328        match err {
329            ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
330            _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
331                meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
332                source: err.into(),
333            }),
334        }
335    }
336}
337impl From<crate::operation::list_profile_entries::ListProfileEntriesError> for Error {
338    fn from(err: crate::operation::list_profile_entries::ListProfileEntriesError) -> Self {
339        match err {
340            crate::operation::list_profile_entries::ListProfileEntriesError::ResourceNotFoundException(inner) => {
341                Error::ResourceNotFoundException(inner)
342            }
343            crate::operation::list_profile_entries::ListProfileEntriesError::ValidationException(inner) => Error::ValidationException(inner),
344            crate::operation::list_profile_entries::ListProfileEntriesError::AccessDeniedException(inner) => Error::AccessDeniedException(inner),
345            crate::operation::list_profile_entries::ListProfileEntriesError::InternalServerException(inner) => Error::InternalServerException(inner),
346            crate::operation::list_profile_entries::ListProfileEntriesError::ThrottlingException(inner) => Error::ThrottlingException(inner),
347            crate::operation::list_profile_entries::ListProfileEntriesError::Unhandled(inner) => Error::Unhandled(inner),
348        }
349    }
350}
351impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::list_profiles::ListProfilesError, R>> for Error
352where
353    R: Send + Sync + std::fmt::Debug + 'static,
354{
355    fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::list_profiles::ListProfilesError, R>) -> Self {
356        match err {
357            ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
358            _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
359                meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
360                source: err.into(),
361            }),
362        }
363    }
364}
365impl From<crate::operation::list_profiles::ListProfilesError> for Error {
366    fn from(err: crate::operation::list_profiles::ListProfilesError) -> Self {
367        match err {
368            crate::operation::list_profiles::ListProfilesError::ValidationException(inner) => Error::ValidationException(inner),
369            crate::operation::list_profiles::ListProfilesError::AccessDeniedException(inner) => Error::AccessDeniedException(inner),
370            crate::operation::list_profiles::ListProfilesError::InternalServerException(inner) => Error::InternalServerException(inner),
371            crate::operation::list_profiles::ListProfilesError::ThrottlingException(inner) => Error::ThrottlingException(inner),
372            crate::operation::list_profiles::ListProfilesError::Unhandled(inner) => Error::Unhandled(inner),
373        }
374    }
375}
376impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::list_tags_for_resource::ListTagsForResourceError, R>> for Error
377where
378    R: Send + Sync + std::fmt::Debug + 'static,
379{
380    fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::list_tags_for_resource::ListTagsForResourceError, R>) -> Self {
381        match err {
382            ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
383            _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
384                meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
385                source: err.into(),
386            }),
387        }
388    }
389}
390impl From<crate::operation::list_tags_for_resource::ListTagsForResourceError> for Error {
391    fn from(err: crate::operation::list_tags_for_resource::ListTagsForResourceError) -> Self {
392        match err {
393            crate::operation::list_tags_for_resource::ListTagsForResourceError::ResourceNotFoundException(inner) => {
394                Error::ResourceNotFoundException(inner)
395            }
396            crate::operation::list_tags_for_resource::ListTagsForResourceError::ValidationException(inner) => Error::ValidationException(inner),
397            crate::operation::list_tags_for_resource::ListTagsForResourceError::AccessDeniedException(inner) => Error::AccessDeniedException(inner),
398            crate::operation::list_tags_for_resource::ListTagsForResourceError::InternalServerException(inner) => {
399                Error::InternalServerException(inner)
400            }
401            crate::operation::list_tags_for_resource::ListTagsForResourceError::ThrottlingException(inner) => Error::ThrottlingException(inner),
402            crate::operation::list_tags_for_resource::ListTagsForResourceError::Unhandled(inner) => Error::Unhandled(inner),
403        }
404    }
405}
406impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::tag_resource::TagResourceError, R>> for Error
407where
408    R: Send + Sync + std::fmt::Debug + 'static,
409{
410    fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::tag_resource::TagResourceError, R>) -> Self {
411        match err {
412            ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
413            _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
414                meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
415                source: err.into(),
416            }),
417        }
418    }
419}
420impl From<crate::operation::tag_resource::TagResourceError> for Error {
421    fn from(err: crate::operation::tag_resource::TagResourceError) -> Self {
422        match err {
423            crate::operation::tag_resource::TagResourceError::ResourceNotFoundException(inner) => Error::ResourceNotFoundException(inner),
424            crate::operation::tag_resource::TagResourceError::ValidationException(inner) => Error::ValidationException(inner),
425            crate::operation::tag_resource::TagResourceError::AccessDeniedException(inner) => Error::AccessDeniedException(inner),
426            crate::operation::tag_resource::TagResourceError::InternalServerException(inner) => Error::InternalServerException(inner),
427            crate::operation::tag_resource::TagResourceError::ThrottlingException(inner) => Error::ThrottlingException(inner),
428            crate::operation::tag_resource::TagResourceError::Unhandled(inner) => Error::Unhandled(inner),
429        }
430    }
431}
432impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::untag_resource::UntagResourceError, R>> for Error
433where
434    R: Send + Sync + std::fmt::Debug + 'static,
435{
436    fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::untag_resource::UntagResourceError, R>) -> Self {
437        match err {
438            ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
439            _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
440                meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
441                source: err.into(),
442            }),
443        }
444    }
445}
446impl From<crate::operation::untag_resource::UntagResourceError> for Error {
447    fn from(err: crate::operation::untag_resource::UntagResourceError) -> Self {
448        match err {
449            crate::operation::untag_resource::UntagResourceError::ResourceNotFoundException(inner) => Error::ResourceNotFoundException(inner),
450            crate::operation::untag_resource::UntagResourceError::ValidationException(inner) => Error::ValidationException(inner),
451            crate::operation::untag_resource::UntagResourceError::AccessDeniedException(inner) => Error::AccessDeniedException(inner),
452            crate::operation::untag_resource::UntagResourceError::InternalServerException(inner) => Error::InternalServerException(inner),
453            crate::operation::untag_resource::UntagResourceError::ThrottlingException(inner) => Error::ThrottlingException(inner),
454            crate::operation::untag_resource::UntagResourceError::Unhandled(inner) => Error::Unhandled(inner),
455        }
456    }
457}
458impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::update_profile::UpdateProfileError, R>> for Error
459where
460    R: Send + Sync + std::fmt::Debug + 'static,
461{
462    fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::update_profile::UpdateProfileError, R>) -> Self {
463        match err {
464            ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
465            _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
466                meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
467                source: err.into(),
468            }),
469        }
470    }
471}
472impl From<crate::operation::update_profile::UpdateProfileError> for Error {
473    fn from(err: crate::operation::update_profile::UpdateProfileError) -> Self {
474        match err {
475            crate::operation::update_profile::UpdateProfileError::ConflictException(inner) => Error::ConflictException(inner),
476            crate::operation::update_profile::UpdateProfileError::ResourceNotFoundException(inner) => Error::ResourceNotFoundException(inner),
477            crate::operation::update_profile::UpdateProfileError::ValidationException(inner) => Error::ValidationException(inner),
478            crate::operation::update_profile::UpdateProfileError::AccessDeniedException(inner) => Error::AccessDeniedException(inner),
479            crate::operation::update_profile::UpdateProfileError::InternalServerException(inner) => Error::InternalServerException(inner),
480            crate::operation::update_profile::UpdateProfileError::ThrottlingException(inner) => Error::ThrottlingException(inner),
481            crate::operation::update_profile::UpdateProfileError::Unhandled(inner) => Error::Unhandled(inner),
482        }
483    }
484}
485impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::update_profile_entry::UpdateProfileEntryError, R>> for Error
486where
487    R: Send + Sync + std::fmt::Debug + 'static,
488{
489    fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::update_profile_entry::UpdateProfileEntryError, R>) -> Self {
490        match err {
491            ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
492            _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
493                meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
494                source: err.into(),
495            }),
496        }
497    }
498}
499impl From<crate::operation::update_profile_entry::UpdateProfileEntryError> for Error {
500    fn from(err: crate::operation::update_profile_entry::UpdateProfileEntryError) -> Self {
501        match err {
502            crate::operation::update_profile_entry::UpdateProfileEntryError::ConflictException(inner) => Error::ConflictException(inner),
503            crate::operation::update_profile_entry::UpdateProfileEntryError::ResourceNotFoundException(inner) => {
504                Error::ResourceNotFoundException(inner)
505            }
506            crate::operation::update_profile_entry::UpdateProfileEntryError::ValidationException(inner) => Error::ValidationException(inner),
507            crate::operation::update_profile_entry::UpdateProfileEntryError::AccessDeniedException(inner) => Error::AccessDeniedException(inner),
508            crate::operation::update_profile_entry::UpdateProfileEntryError::InternalServerException(inner) => Error::InternalServerException(inner),
509            crate::operation::update_profile_entry::UpdateProfileEntryError::ThrottlingException(inner) => Error::ThrottlingException(inner),
510            crate::operation::update_profile_entry::UpdateProfileEntryError::Unhandled(inner) => Error::Unhandled(inner),
511        }
512    }
513}
514impl ::std::error::Error for Error {
515    fn source(&self) -> std::option::Option<&(dyn ::std::error::Error + 'static)> {
516        match self {
517            Error::AccessDeniedException(inner) => inner.source(),
518            Error::ConflictException(inner) => inner.source(),
519            Error::InternalServerException(inner) => inner.source(),
520            Error::ResourceNotFoundException(inner) => inner.source(),
521            Error::ServiceQuotaExceededException(inner) => inner.source(),
522            Error::ThrottlingException(inner) => inner.source(),
523            Error::ValidationException(inner) => inner.source(),
524            Error::Unhandled(inner) => ::std::option::Option::Some(&*inner.source),
525        }
526    }
527}
528impl ::aws_types::request_id::RequestId for Error {
529    fn request_id(&self) -> Option<&str> {
530        match self {
531            Self::AccessDeniedException(e) => e.request_id(),
532            Self::ConflictException(e) => e.request_id(),
533            Self::InternalServerException(e) => e.request_id(),
534            Self::ResourceNotFoundException(e) => e.request_id(),
535            Self::ServiceQuotaExceededException(e) => e.request_id(),
536            Self::ThrottlingException(e) => e.request_id(),
537            Self::ValidationException(e) => e.request_id(),
538            Self::Unhandled(e) => e.meta.request_id(),
539        }
540    }
541}