aws_sdk_identitystore/
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>You do not have sufficient access to perform this action.</p>
7    AccessDeniedException(crate::types::error::AccessDeniedException),
8    /// <p>This request cannot be completed for one of the following reasons:</p>
9    /// <ul>
10    /// <li>
11    /// <p>Performing the requested operation would violate an existing uniqueness claim in the identity store. Resolve the conflict before retrying this request.</p></li>
12    /// <li>
13    /// <p>The requested resource was being concurrently modified by another request.</p></li>
14    /// </ul>
15    ConflictException(crate::types::error::ConflictException),
16    /// <p>The request processing has failed because of an unknown error, exception or failure with an internal server.</p>
17    InternalServerException(crate::types::error::InternalServerException),
18    /// <p>Indicates that a requested resource is not found.</p>
19    ResourceNotFoundException(crate::types::error::ResourceNotFoundException),
20    /// <p>The request would cause the number of users or groups in the identity store to exceed the maximum allowed.</p>
21    ServiceQuotaExceededException(crate::types::error::ServiceQuotaExceededException),
22    /// <p>Indicates that the principal has crossed the throttling limits of the API operations.</p>
23    ThrottlingException(crate::types::error::ThrottlingException),
24    /// <p>The request failed because it contains a syntax error.</p>
25    ValidationException(crate::types::error::ValidationException),
26    /// An unexpected error occurred (e.g., invalid JSON returned by the service or an unknown error code).
27    #[deprecated(note = "Matching `Unhandled` directly is not forwards compatible. Instead, match using a \
28    variable wildcard pattern and check `.code()`:
29     \
30    &nbsp;&nbsp;&nbsp;`err if err.code() == Some(\"SpecificExceptionCode\") => { /* handle the error */ }`
31     \
32    See [`ProvideErrorMetadata`](#impl-ProvideErrorMetadata-for-Error) for what information is available for the error.")]
33    Unhandled(crate::error::sealed_unhandled::Unhandled),
34}
35impl ::std::fmt::Display for Error {
36    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
37        match self {
38            Error::AccessDeniedException(inner) => inner.fmt(f),
39            Error::ConflictException(inner) => inner.fmt(f),
40            Error::InternalServerException(inner) => inner.fmt(f),
41            Error::ResourceNotFoundException(inner) => inner.fmt(f),
42            Error::ServiceQuotaExceededException(inner) => inner.fmt(f),
43            Error::ThrottlingException(inner) => inner.fmt(f),
44            Error::ValidationException(inner) => inner.fmt(f),
45            Error::Unhandled(_) => {
46                if let ::std::option::Option::Some(code) = ::aws_smithy_types::error::metadata::ProvideErrorMetadata::code(self) {
47                    write!(f, "unhandled error ({code})")
48                } else {
49                    f.write_str("unhandled error")
50                }
51            }
52        }
53    }
54}
55impl From<::aws_smithy_types::error::operation::BuildError> for Error {
56    fn from(value: ::aws_smithy_types::error::operation::BuildError) -> Self {
57        Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
58            source: value.into(),
59            meta: ::std::default::Default::default(),
60        })
61    }
62}
63impl ::aws_smithy_types::error::metadata::ProvideErrorMetadata for Error {
64    fn meta(&self) -> &::aws_smithy_types::error::metadata::ErrorMetadata {
65        match self {
66            Self::AccessDeniedException(inner) => inner.meta(),
67            Self::ConflictException(inner) => inner.meta(),
68            Self::InternalServerException(inner) => inner.meta(),
69            Self::ResourceNotFoundException(inner) => inner.meta(),
70            Self::ServiceQuotaExceededException(inner) => inner.meta(),
71            Self::ThrottlingException(inner) => inner.meta(),
72            Self::ValidationException(inner) => inner.meta(),
73            Self::Unhandled(inner) => &inner.meta,
74        }
75    }
76}
77impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::create_group::CreateGroupError, R>> for Error
78where
79    R: Send + Sync + std::fmt::Debug + 'static,
80{
81    fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::create_group::CreateGroupError, R>) -> Self {
82        match err {
83            ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
84            _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
85                meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
86                source: err.into(),
87            }),
88        }
89    }
90}
91impl From<crate::operation::create_group::CreateGroupError> for Error {
92    fn from(err: crate::operation::create_group::CreateGroupError) -> Self {
93        match err {
94            crate::operation::create_group::CreateGroupError::ConflictException(inner) => Error::ConflictException(inner),
95            crate::operation::create_group::CreateGroupError::ResourceNotFoundException(inner) => Error::ResourceNotFoundException(inner),
96            crate::operation::create_group::CreateGroupError::ServiceQuotaExceededException(inner) => Error::ServiceQuotaExceededException(inner),
97            crate::operation::create_group::CreateGroupError::ValidationException(inner) => Error::ValidationException(inner),
98            crate::operation::create_group::CreateGroupError::AccessDeniedException(inner) => Error::AccessDeniedException(inner),
99            crate::operation::create_group::CreateGroupError::InternalServerException(inner) => Error::InternalServerException(inner),
100            crate::operation::create_group::CreateGroupError::ThrottlingException(inner) => Error::ThrottlingException(inner),
101            crate::operation::create_group::CreateGroupError::Unhandled(inner) => Error::Unhandled(inner),
102        }
103    }
104}
105impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::create_group_membership::CreateGroupMembershipError, R>> for Error
106where
107    R: Send + Sync + std::fmt::Debug + 'static,
108{
109    fn from(
110        err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::create_group_membership::CreateGroupMembershipError, R>,
111    ) -> Self {
112        match err {
113            ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
114            _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
115                meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
116                source: err.into(),
117            }),
118        }
119    }
120}
121impl From<crate::operation::create_group_membership::CreateGroupMembershipError> for Error {
122    fn from(err: crate::operation::create_group_membership::CreateGroupMembershipError) -> Self {
123        match err {
124            crate::operation::create_group_membership::CreateGroupMembershipError::ConflictException(inner) => Error::ConflictException(inner),
125            crate::operation::create_group_membership::CreateGroupMembershipError::ResourceNotFoundException(inner) => {
126                Error::ResourceNotFoundException(inner)
127            }
128            crate::operation::create_group_membership::CreateGroupMembershipError::ServiceQuotaExceededException(inner) => {
129                Error::ServiceQuotaExceededException(inner)
130            }
131            crate::operation::create_group_membership::CreateGroupMembershipError::ValidationException(inner) => Error::ValidationException(inner),
132            crate::operation::create_group_membership::CreateGroupMembershipError::AccessDeniedException(inner) => {
133                Error::AccessDeniedException(inner)
134            }
135            crate::operation::create_group_membership::CreateGroupMembershipError::InternalServerException(inner) => {
136                Error::InternalServerException(inner)
137            }
138            crate::operation::create_group_membership::CreateGroupMembershipError::ThrottlingException(inner) => Error::ThrottlingException(inner),
139            crate::operation::create_group_membership::CreateGroupMembershipError::Unhandled(inner) => Error::Unhandled(inner),
140        }
141    }
142}
143impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::create_user::CreateUserError, R>> for Error
144where
145    R: Send + Sync + std::fmt::Debug + 'static,
146{
147    fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::create_user::CreateUserError, R>) -> Self {
148        match err {
149            ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
150            _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
151                meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
152                source: err.into(),
153            }),
154        }
155    }
156}
157impl From<crate::operation::create_user::CreateUserError> for Error {
158    fn from(err: crate::operation::create_user::CreateUserError) -> Self {
159        match err {
160            crate::operation::create_user::CreateUserError::ConflictException(inner) => Error::ConflictException(inner),
161            crate::operation::create_user::CreateUserError::ResourceNotFoundException(inner) => Error::ResourceNotFoundException(inner),
162            crate::operation::create_user::CreateUserError::ServiceQuotaExceededException(inner) => Error::ServiceQuotaExceededException(inner),
163            crate::operation::create_user::CreateUserError::ValidationException(inner) => Error::ValidationException(inner),
164            crate::operation::create_user::CreateUserError::AccessDeniedException(inner) => Error::AccessDeniedException(inner),
165            crate::operation::create_user::CreateUserError::InternalServerException(inner) => Error::InternalServerException(inner),
166            crate::operation::create_user::CreateUserError::ThrottlingException(inner) => Error::ThrottlingException(inner),
167            crate::operation::create_user::CreateUserError::Unhandled(inner) => Error::Unhandled(inner),
168        }
169    }
170}
171impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::delete_group::DeleteGroupError, 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::delete_group::DeleteGroupError, 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::delete_group::DeleteGroupError> for Error {
186    fn from(err: crate::operation::delete_group::DeleteGroupError) -> Self {
187        match err {
188            crate::operation::delete_group::DeleteGroupError::ConflictException(inner) => Error::ConflictException(inner),
189            crate::operation::delete_group::DeleteGroupError::ResourceNotFoundException(inner) => Error::ResourceNotFoundException(inner),
190            crate::operation::delete_group::DeleteGroupError::ValidationException(inner) => Error::ValidationException(inner),
191            crate::operation::delete_group::DeleteGroupError::AccessDeniedException(inner) => Error::AccessDeniedException(inner),
192            crate::operation::delete_group::DeleteGroupError::InternalServerException(inner) => Error::InternalServerException(inner),
193            crate::operation::delete_group::DeleteGroupError::ThrottlingException(inner) => Error::ThrottlingException(inner),
194            crate::operation::delete_group::DeleteGroupError::Unhandled(inner) => Error::Unhandled(inner),
195        }
196    }
197}
198impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::delete_group_membership::DeleteGroupMembershipError, R>> for Error
199where
200    R: Send + Sync + std::fmt::Debug + 'static,
201{
202    fn from(
203        err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::delete_group_membership::DeleteGroupMembershipError, R>,
204    ) -> Self {
205        match err {
206            ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
207            _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
208                meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
209                source: err.into(),
210            }),
211        }
212    }
213}
214impl From<crate::operation::delete_group_membership::DeleteGroupMembershipError> for Error {
215    fn from(err: crate::operation::delete_group_membership::DeleteGroupMembershipError) -> Self {
216        match err {
217            crate::operation::delete_group_membership::DeleteGroupMembershipError::ConflictException(inner) => Error::ConflictException(inner),
218            crate::operation::delete_group_membership::DeleteGroupMembershipError::ResourceNotFoundException(inner) => {
219                Error::ResourceNotFoundException(inner)
220            }
221            crate::operation::delete_group_membership::DeleteGroupMembershipError::ValidationException(inner) => Error::ValidationException(inner),
222            crate::operation::delete_group_membership::DeleteGroupMembershipError::AccessDeniedException(inner) => {
223                Error::AccessDeniedException(inner)
224            }
225            crate::operation::delete_group_membership::DeleteGroupMembershipError::InternalServerException(inner) => {
226                Error::InternalServerException(inner)
227            }
228            crate::operation::delete_group_membership::DeleteGroupMembershipError::ThrottlingException(inner) => Error::ThrottlingException(inner),
229            crate::operation::delete_group_membership::DeleteGroupMembershipError::Unhandled(inner) => Error::Unhandled(inner),
230        }
231    }
232}
233impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::delete_user::DeleteUserError, R>> for Error
234where
235    R: Send + Sync + std::fmt::Debug + 'static,
236{
237    fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::delete_user::DeleteUserError, R>) -> Self {
238        match err {
239            ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
240            _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
241                meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
242                source: err.into(),
243            }),
244        }
245    }
246}
247impl From<crate::operation::delete_user::DeleteUserError> for Error {
248    fn from(err: crate::operation::delete_user::DeleteUserError) -> Self {
249        match err {
250            crate::operation::delete_user::DeleteUserError::ConflictException(inner) => Error::ConflictException(inner),
251            crate::operation::delete_user::DeleteUserError::ResourceNotFoundException(inner) => Error::ResourceNotFoundException(inner),
252            crate::operation::delete_user::DeleteUserError::ValidationException(inner) => Error::ValidationException(inner),
253            crate::operation::delete_user::DeleteUserError::AccessDeniedException(inner) => Error::AccessDeniedException(inner),
254            crate::operation::delete_user::DeleteUserError::InternalServerException(inner) => Error::InternalServerException(inner),
255            crate::operation::delete_user::DeleteUserError::ThrottlingException(inner) => Error::ThrottlingException(inner),
256            crate::operation::delete_user::DeleteUserError::Unhandled(inner) => Error::Unhandled(inner),
257        }
258    }
259}
260impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::describe_group::DescribeGroupError, R>> for Error
261where
262    R: Send + Sync + std::fmt::Debug + 'static,
263{
264    fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::describe_group::DescribeGroupError, R>) -> Self {
265        match err {
266            ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
267            _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
268                meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
269                source: err.into(),
270            }),
271        }
272    }
273}
274impl From<crate::operation::describe_group::DescribeGroupError> for Error {
275    fn from(err: crate::operation::describe_group::DescribeGroupError) -> Self {
276        match err {
277            crate::operation::describe_group::DescribeGroupError::ResourceNotFoundException(inner) => Error::ResourceNotFoundException(inner),
278            crate::operation::describe_group::DescribeGroupError::ValidationException(inner) => Error::ValidationException(inner),
279            crate::operation::describe_group::DescribeGroupError::AccessDeniedException(inner) => Error::AccessDeniedException(inner),
280            crate::operation::describe_group::DescribeGroupError::InternalServerException(inner) => Error::InternalServerException(inner),
281            crate::operation::describe_group::DescribeGroupError::ThrottlingException(inner) => Error::ThrottlingException(inner),
282            crate::operation::describe_group::DescribeGroupError::Unhandled(inner) => Error::Unhandled(inner),
283        }
284    }
285}
286impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::describe_group_membership::DescribeGroupMembershipError, R>>
287    for Error
288where
289    R: Send + Sync + std::fmt::Debug + 'static,
290{
291    fn from(
292        err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::describe_group_membership::DescribeGroupMembershipError, R>,
293    ) -> Self {
294        match err {
295            ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
296            _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
297                meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
298                source: err.into(),
299            }),
300        }
301    }
302}
303impl From<crate::operation::describe_group_membership::DescribeGroupMembershipError> for Error {
304    fn from(err: crate::operation::describe_group_membership::DescribeGroupMembershipError) -> Self {
305        match err {
306            crate::operation::describe_group_membership::DescribeGroupMembershipError::ResourceNotFoundException(inner) => {
307                Error::ResourceNotFoundException(inner)
308            }
309            crate::operation::describe_group_membership::DescribeGroupMembershipError::ValidationException(inner) => {
310                Error::ValidationException(inner)
311            }
312            crate::operation::describe_group_membership::DescribeGroupMembershipError::AccessDeniedException(inner) => {
313                Error::AccessDeniedException(inner)
314            }
315            crate::operation::describe_group_membership::DescribeGroupMembershipError::InternalServerException(inner) => {
316                Error::InternalServerException(inner)
317            }
318            crate::operation::describe_group_membership::DescribeGroupMembershipError::ThrottlingException(inner) => {
319                Error::ThrottlingException(inner)
320            }
321            crate::operation::describe_group_membership::DescribeGroupMembershipError::Unhandled(inner) => Error::Unhandled(inner),
322        }
323    }
324}
325impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::describe_user::DescribeUserError, R>> for Error
326where
327    R: Send + Sync + std::fmt::Debug + 'static,
328{
329    fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::describe_user::DescribeUserError, R>) -> Self {
330        match err {
331            ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
332            _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
333                meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
334                source: err.into(),
335            }),
336        }
337    }
338}
339impl From<crate::operation::describe_user::DescribeUserError> for Error {
340    fn from(err: crate::operation::describe_user::DescribeUserError) -> Self {
341        match err {
342            crate::operation::describe_user::DescribeUserError::ResourceNotFoundException(inner) => Error::ResourceNotFoundException(inner),
343            crate::operation::describe_user::DescribeUserError::ValidationException(inner) => Error::ValidationException(inner),
344            crate::operation::describe_user::DescribeUserError::AccessDeniedException(inner) => Error::AccessDeniedException(inner),
345            crate::operation::describe_user::DescribeUserError::InternalServerException(inner) => Error::InternalServerException(inner),
346            crate::operation::describe_user::DescribeUserError::ThrottlingException(inner) => Error::ThrottlingException(inner),
347            crate::operation::describe_user::DescribeUserError::Unhandled(inner) => Error::Unhandled(inner),
348        }
349    }
350}
351impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::get_group_id::GetGroupIdError, 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::get_group_id::GetGroupIdError, 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::get_group_id::GetGroupIdError> for Error {
366    fn from(err: crate::operation::get_group_id::GetGroupIdError) -> Self {
367        match err {
368            crate::operation::get_group_id::GetGroupIdError::ResourceNotFoundException(inner) => Error::ResourceNotFoundException(inner),
369            crate::operation::get_group_id::GetGroupIdError::ValidationException(inner) => Error::ValidationException(inner),
370            crate::operation::get_group_id::GetGroupIdError::AccessDeniedException(inner) => Error::AccessDeniedException(inner),
371            crate::operation::get_group_id::GetGroupIdError::InternalServerException(inner) => Error::InternalServerException(inner),
372            crate::operation::get_group_id::GetGroupIdError::ThrottlingException(inner) => Error::ThrottlingException(inner),
373            crate::operation::get_group_id::GetGroupIdError::Unhandled(inner) => Error::Unhandled(inner),
374        }
375    }
376}
377impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::get_group_membership_id::GetGroupMembershipIdError, R>> for Error
378where
379    R: Send + Sync + std::fmt::Debug + 'static,
380{
381    fn from(
382        err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::get_group_membership_id::GetGroupMembershipIdError, R>,
383    ) -> Self {
384        match err {
385            ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
386            _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
387                meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
388                source: err.into(),
389            }),
390        }
391    }
392}
393impl From<crate::operation::get_group_membership_id::GetGroupMembershipIdError> for Error {
394    fn from(err: crate::operation::get_group_membership_id::GetGroupMembershipIdError) -> Self {
395        match err {
396            crate::operation::get_group_membership_id::GetGroupMembershipIdError::ResourceNotFoundException(inner) => {
397                Error::ResourceNotFoundException(inner)
398            }
399            crate::operation::get_group_membership_id::GetGroupMembershipIdError::ValidationException(inner) => Error::ValidationException(inner),
400            crate::operation::get_group_membership_id::GetGroupMembershipIdError::AccessDeniedException(inner) => Error::AccessDeniedException(inner),
401            crate::operation::get_group_membership_id::GetGroupMembershipIdError::InternalServerException(inner) => {
402                Error::InternalServerException(inner)
403            }
404            crate::operation::get_group_membership_id::GetGroupMembershipIdError::ThrottlingException(inner) => Error::ThrottlingException(inner),
405            crate::operation::get_group_membership_id::GetGroupMembershipIdError::Unhandled(inner) => Error::Unhandled(inner),
406        }
407    }
408}
409impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::get_user_id::GetUserIdError, 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::get_user_id::GetUserIdError, 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::get_user_id::GetUserIdError> for Error {
424    fn from(err: crate::operation::get_user_id::GetUserIdError) -> Self {
425        match err {
426            crate::operation::get_user_id::GetUserIdError::ResourceNotFoundException(inner) => Error::ResourceNotFoundException(inner),
427            crate::operation::get_user_id::GetUserIdError::ValidationException(inner) => Error::ValidationException(inner),
428            crate::operation::get_user_id::GetUserIdError::AccessDeniedException(inner) => Error::AccessDeniedException(inner),
429            crate::operation::get_user_id::GetUserIdError::InternalServerException(inner) => Error::InternalServerException(inner),
430            crate::operation::get_user_id::GetUserIdError::ThrottlingException(inner) => Error::ThrottlingException(inner),
431            crate::operation::get_user_id::GetUserIdError::Unhandled(inner) => Error::Unhandled(inner),
432        }
433    }
434}
435impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::is_member_in_groups::IsMemberInGroupsError, R>> for Error
436where
437    R: Send + Sync + std::fmt::Debug + 'static,
438{
439    fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::is_member_in_groups::IsMemberInGroupsError, R>) -> Self {
440        match err {
441            ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
442            _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
443                meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
444                source: err.into(),
445            }),
446        }
447    }
448}
449impl From<crate::operation::is_member_in_groups::IsMemberInGroupsError> for Error {
450    fn from(err: crate::operation::is_member_in_groups::IsMemberInGroupsError) -> Self {
451        match err {
452            crate::operation::is_member_in_groups::IsMemberInGroupsError::ResourceNotFoundException(inner) => Error::ResourceNotFoundException(inner),
453            crate::operation::is_member_in_groups::IsMemberInGroupsError::ValidationException(inner) => Error::ValidationException(inner),
454            crate::operation::is_member_in_groups::IsMemberInGroupsError::AccessDeniedException(inner) => Error::AccessDeniedException(inner),
455            crate::operation::is_member_in_groups::IsMemberInGroupsError::InternalServerException(inner) => Error::InternalServerException(inner),
456            crate::operation::is_member_in_groups::IsMemberInGroupsError::ThrottlingException(inner) => Error::ThrottlingException(inner),
457            crate::operation::is_member_in_groups::IsMemberInGroupsError::Unhandled(inner) => Error::Unhandled(inner),
458        }
459    }
460}
461impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::list_group_memberships::ListGroupMembershipsError, R>> for Error
462where
463    R: Send + Sync + std::fmt::Debug + 'static,
464{
465    fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::list_group_memberships::ListGroupMembershipsError, R>) -> Self {
466        match err {
467            ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
468            _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
469                meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
470                source: err.into(),
471            }),
472        }
473    }
474}
475impl From<crate::operation::list_group_memberships::ListGroupMembershipsError> for Error {
476    fn from(err: crate::operation::list_group_memberships::ListGroupMembershipsError) -> Self {
477        match err {
478            crate::operation::list_group_memberships::ListGroupMembershipsError::ResourceNotFoundException(inner) => {
479                Error::ResourceNotFoundException(inner)
480            }
481            crate::operation::list_group_memberships::ListGroupMembershipsError::ValidationException(inner) => Error::ValidationException(inner),
482            crate::operation::list_group_memberships::ListGroupMembershipsError::AccessDeniedException(inner) => Error::AccessDeniedException(inner),
483            crate::operation::list_group_memberships::ListGroupMembershipsError::InternalServerException(inner) => {
484                Error::InternalServerException(inner)
485            }
486            crate::operation::list_group_memberships::ListGroupMembershipsError::ThrottlingException(inner) => Error::ThrottlingException(inner),
487            crate::operation::list_group_memberships::ListGroupMembershipsError::Unhandled(inner) => Error::Unhandled(inner),
488        }
489    }
490}
491impl<R>
492    From<
493        ::aws_smithy_runtime_api::client::result::SdkError<
494            crate::operation::list_group_memberships_for_member::ListGroupMembershipsForMemberError,
495            R,
496        >,
497    > for Error
498where
499    R: Send + Sync + std::fmt::Debug + 'static,
500{
501    fn from(
502        err: ::aws_smithy_runtime_api::client::result::SdkError<
503            crate::operation::list_group_memberships_for_member::ListGroupMembershipsForMemberError,
504            R,
505        >,
506    ) -> Self {
507        match err {
508            ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
509            _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
510                meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
511                source: err.into(),
512            }),
513        }
514    }
515}
516impl From<crate::operation::list_group_memberships_for_member::ListGroupMembershipsForMemberError> for Error {
517    fn from(err: crate::operation::list_group_memberships_for_member::ListGroupMembershipsForMemberError) -> Self {
518        match err {
519            crate::operation::list_group_memberships_for_member::ListGroupMembershipsForMemberError::ResourceNotFoundException(inner) => {
520                Error::ResourceNotFoundException(inner)
521            }
522            crate::operation::list_group_memberships_for_member::ListGroupMembershipsForMemberError::ValidationException(inner) => {
523                Error::ValidationException(inner)
524            }
525            crate::operation::list_group_memberships_for_member::ListGroupMembershipsForMemberError::AccessDeniedException(inner) => {
526                Error::AccessDeniedException(inner)
527            }
528            crate::operation::list_group_memberships_for_member::ListGroupMembershipsForMemberError::InternalServerException(inner) => {
529                Error::InternalServerException(inner)
530            }
531            crate::operation::list_group_memberships_for_member::ListGroupMembershipsForMemberError::ThrottlingException(inner) => {
532                Error::ThrottlingException(inner)
533            }
534            crate::operation::list_group_memberships_for_member::ListGroupMembershipsForMemberError::Unhandled(inner) => Error::Unhandled(inner),
535        }
536    }
537}
538impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::list_groups::ListGroupsError, 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::list_groups::ListGroupsError, 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::list_groups::ListGroupsError> for Error {
553    fn from(err: crate::operation::list_groups::ListGroupsError) -> Self {
554        match err {
555            crate::operation::list_groups::ListGroupsError::ResourceNotFoundException(inner) => Error::ResourceNotFoundException(inner),
556            crate::operation::list_groups::ListGroupsError::ValidationException(inner) => Error::ValidationException(inner),
557            crate::operation::list_groups::ListGroupsError::AccessDeniedException(inner) => Error::AccessDeniedException(inner),
558            crate::operation::list_groups::ListGroupsError::InternalServerException(inner) => Error::InternalServerException(inner),
559            crate::operation::list_groups::ListGroupsError::ThrottlingException(inner) => Error::ThrottlingException(inner),
560            crate::operation::list_groups::ListGroupsError::Unhandled(inner) => Error::Unhandled(inner),
561        }
562    }
563}
564impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::list_users::ListUsersError, R>> for Error
565where
566    R: Send + Sync + std::fmt::Debug + 'static,
567{
568    fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::list_users::ListUsersError, R>) -> Self {
569        match err {
570            ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
571            _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
572                meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
573                source: err.into(),
574            }),
575        }
576    }
577}
578impl From<crate::operation::list_users::ListUsersError> for Error {
579    fn from(err: crate::operation::list_users::ListUsersError) -> Self {
580        match err {
581            crate::operation::list_users::ListUsersError::ResourceNotFoundException(inner) => Error::ResourceNotFoundException(inner),
582            crate::operation::list_users::ListUsersError::ValidationException(inner) => Error::ValidationException(inner),
583            crate::operation::list_users::ListUsersError::AccessDeniedException(inner) => Error::AccessDeniedException(inner),
584            crate::operation::list_users::ListUsersError::InternalServerException(inner) => Error::InternalServerException(inner),
585            crate::operation::list_users::ListUsersError::ThrottlingException(inner) => Error::ThrottlingException(inner),
586            crate::operation::list_users::ListUsersError::Unhandled(inner) => Error::Unhandled(inner),
587        }
588    }
589}
590impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::update_group::UpdateGroupError, R>> for Error
591where
592    R: Send + Sync + std::fmt::Debug + 'static,
593{
594    fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::update_group::UpdateGroupError, R>) -> Self {
595        match err {
596            ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
597            _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
598                meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
599                source: err.into(),
600            }),
601        }
602    }
603}
604impl From<crate::operation::update_group::UpdateGroupError> for Error {
605    fn from(err: crate::operation::update_group::UpdateGroupError) -> Self {
606        match err {
607            crate::operation::update_group::UpdateGroupError::ConflictException(inner) => Error::ConflictException(inner),
608            crate::operation::update_group::UpdateGroupError::ResourceNotFoundException(inner) => Error::ResourceNotFoundException(inner),
609            crate::operation::update_group::UpdateGroupError::ServiceQuotaExceededException(inner) => Error::ServiceQuotaExceededException(inner),
610            crate::operation::update_group::UpdateGroupError::ValidationException(inner) => Error::ValidationException(inner),
611            crate::operation::update_group::UpdateGroupError::AccessDeniedException(inner) => Error::AccessDeniedException(inner),
612            crate::operation::update_group::UpdateGroupError::InternalServerException(inner) => Error::InternalServerException(inner),
613            crate::operation::update_group::UpdateGroupError::ThrottlingException(inner) => Error::ThrottlingException(inner),
614            crate::operation::update_group::UpdateGroupError::Unhandled(inner) => Error::Unhandled(inner),
615        }
616    }
617}
618impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::update_user::UpdateUserError, R>> for Error
619where
620    R: Send + Sync + std::fmt::Debug + 'static,
621{
622    fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::update_user::UpdateUserError, R>) -> Self {
623        match err {
624            ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
625            _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
626                meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
627                source: err.into(),
628            }),
629        }
630    }
631}
632impl From<crate::operation::update_user::UpdateUserError> for Error {
633    fn from(err: crate::operation::update_user::UpdateUserError) -> Self {
634        match err {
635            crate::operation::update_user::UpdateUserError::ConflictException(inner) => Error::ConflictException(inner),
636            crate::operation::update_user::UpdateUserError::ResourceNotFoundException(inner) => Error::ResourceNotFoundException(inner),
637            crate::operation::update_user::UpdateUserError::ServiceQuotaExceededException(inner) => Error::ServiceQuotaExceededException(inner),
638            crate::operation::update_user::UpdateUserError::ValidationException(inner) => Error::ValidationException(inner),
639            crate::operation::update_user::UpdateUserError::AccessDeniedException(inner) => Error::AccessDeniedException(inner),
640            crate::operation::update_user::UpdateUserError::InternalServerException(inner) => Error::InternalServerException(inner),
641            crate::operation::update_user::UpdateUserError::ThrottlingException(inner) => Error::ThrottlingException(inner),
642            crate::operation::update_user::UpdateUserError::Unhandled(inner) => Error::Unhandled(inner),
643        }
644    }
645}
646impl ::std::error::Error for Error {
647    fn source(&self) -> std::option::Option<&(dyn ::std::error::Error + 'static)> {
648        match self {
649            Error::AccessDeniedException(inner) => inner.source(),
650            Error::ConflictException(inner) => inner.source(),
651            Error::InternalServerException(inner) => inner.source(),
652            Error::ResourceNotFoundException(inner) => inner.source(),
653            Error::ServiceQuotaExceededException(inner) => inner.source(),
654            Error::ThrottlingException(inner) => inner.source(),
655            Error::ValidationException(inner) => inner.source(),
656            Error::Unhandled(inner) => ::std::option::Option::Some(&*inner.source),
657        }
658    }
659}
660impl ::aws_types::request_id::RequestId for Error {
661    fn request_id(&self) -> Option<&str> {
662        match self {
663            Self::AccessDeniedException(e) => e.request_id(),
664            Self::ConflictException(e) => e.request_id(),
665            Self::InternalServerException(e) => e.request_id(),
666            Self::ResourceNotFoundException(e) => e.request_id(),
667            Self::ServiceQuotaExceededException(e) => e.request_id(),
668            Self::ThrottlingException(e) => e.request_id(),
669            Self::ValidationException(e) => e.request_id(),
670            Self::Unhandled(e) => e.meta.request_id(),
671        }
672    }
673}