Skip to main content

aws_sdk_directoryservicedata/
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 don't have permission to perform the request or access the directory. It can also occur when the <code>DirectoryId</code> doesn't exist or the user, member, or group might be outside of your organizational unit (OU).</p>
7    /// <p>Make sure that you have the authentication and authorization to perform the action. Review the directory information in the request, and make sure that the object isn't outside of your OU.</p>
8    AccessDeniedException(crate::types::error::AccessDeniedException),
9    /// <p>This error will occur when you try to create a resource that conflicts with an existing object. It can also occur when adding a member to a group that the member is already in.</p>
10    /// <p>This error can be caused by a request sent within the 8-hour idempotency window with the same client token but different input parameters. Client tokens should not be re-used across different requests. After 8 hours, any request with the same client token is treated as a new request.</p>
11    ConflictException(crate::types::error::ConflictException),
12    /// <p>The request could not be completed due to a problem in the configuration or current state of the specified directory.</p>
13    DirectoryUnavailableException(crate::types::error::DirectoryUnavailableException),
14    /// <p>The operation didn't succeed because an internal error occurred. Try again later.</p>
15    InternalServerException(crate::types::error::InternalServerException),
16    /// <p>The resource couldn't be found.</p>
17    ResourceNotFoundException(crate::types::error::ResourceNotFoundException),
18    /// <p>The limit on the number of requests per second has been exceeded.</p>
19    ThrottlingException(crate::types::error::ThrottlingException),
20    /// <p>The request isn't valid. Review the details in the error message to update the invalid parameters or values in your request.</p>
21    ValidationException(crate::types::error::ValidationException),
22    /// An unexpected error occurred (e.g., invalid JSON returned by the service or an unknown error code).
23    #[deprecated(note = "Matching `Unhandled` directly is not forwards compatible. Instead, match using a \
24    variable wildcard pattern and check `.code()`:
25     \
26    &nbsp;&nbsp;&nbsp;`err if err.code() == Some(\"SpecificExceptionCode\") => { /* handle the error */ }`
27     \
28    See [`ProvideErrorMetadata`](#impl-ProvideErrorMetadata-for-Error) for what information is available for the error.")]
29    Unhandled(crate::error::sealed_unhandled::Unhandled),
30}
31impl ::std::fmt::Display for Error {
32    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
33        match self {
34            Error::AccessDeniedException(inner) => inner.fmt(f),
35            Error::ConflictException(inner) => inner.fmt(f),
36            Error::DirectoryUnavailableException(inner) => inner.fmt(f),
37            Error::InternalServerException(inner) => inner.fmt(f),
38            Error::ResourceNotFoundException(inner) => inner.fmt(f),
39            Error::ThrottlingException(inner) => inner.fmt(f),
40            Error::ValidationException(inner) => inner.fmt(f),
41            Error::Unhandled(_) => {
42                if let ::std::option::Option::Some(code) = ::aws_smithy_types::error::metadata::ProvideErrorMetadata::code(self) {
43                    write!(f, "unhandled error ({code})")
44                } else {
45                    f.write_str("unhandled error")
46                }
47            }
48        }
49    }
50}
51impl From<::aws_smithy_types::error::operation::BuildError> for Error {
52    fn from(value: ::aws_smithy_types::error::operation::BuildError) -> Self {
53        Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
54            source: value.into(),
55            meta: ::std::default::Default::default(),
56        })
57    }
58}
59impl ::aws_smithy_types::error::metadata::ProvideErrorMetadata for Error {
60    fn meta(&self) -> &::aws_smithy_types::error::metadata::ErrorMetadata {
61        match self {
62            Self::AccessDeniedException(inner) => inner.meta(),
63            Self::ConflictException(inner) => inner.meta(),
64            Self::DirectoryUnavailableException(inner) => inner.meta(),
65            Self::InternalServerException(inner) => inner.meta(),
66            Self::ResourceNotFoundException(inner) => inner.meta(),
67            Self::ThrottlingException(inner) => inner.meta(),
68            Self::ValidationException(inner) => inner.meta(),
69            Self::Unhandled(inner) => &inner.meta,
70        }
71    }
72}
73impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::add_group_member::AddGroupMemberError, R>> for Error
74where
75    R: Send + Sync + std::fmt::Debug + 'static,
76{
77    fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::add_group_member::AddGroupMemberError, R>) -> Self {
78        match err {
79            ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
80            _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
81                meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
82                source: err.into(),
83            }),
84        }
85    }
86}
87impl From<crate::operation::add_group_member::AddGroupMemberError> for Error {
88    fn from(err: crate::operation::add_group_member::AddGroupMemberError) -> Self {
89        match err {
90            crate::operation::add_group_member::AddGroupMemberError::AccessDeniedException(inner) => Error::AccessDeniedException(inner),
91            crate::operation::add_group_member::AddGroupMemberError::ConflictException(inner) => Error::ConflictException(inner),
92            crate::operation::add_group_member::AddGroupMemberError::DirectoryUnavailableException(inner) => {
93                Error::DirectoryUnavailableException(inner)
94            }
95            crate::operation::add_group_member::AddGroupMemberError::InternalServerException(inner) => Error::InternalServerException(inner),
96            crate::operation::add_group_member::AddGroupMemberError::ResourceNotFoundException(inner) => Error::ResourceNotFoundException(inner),
97            crate::operation::add_group_member::AddGroupMemberError::ThrottlingException(inner) => Error::ThrottlingException(inner),
98            crate::operation::add_group_member::AddGroupMemberError::ValidationException(inner) => Error::ValidationException(inner),
99            crate::operation::add_group_member::AddGroupMemberError::Unhandled(inner) => Error::Unhandled(inner),
100        }
101    }
102}
103impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::create_group::CreateGroupError, R>> for Error
104where
105    R: Send + Sync + std::fmt::Debug + 'static,
106{
107    fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::create_group::CreateGroupError, R>) -> Self {
108        match err {
109            ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
110            _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
111                meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
112                source: err.into(),
113            }),
114        }
115    }
116}
117impl From<crate::operation::create_group::CreateGroupError> for Error {
118    fn from(err: crate::operation::create_group::CreateGroupError) -> Self {
119        match err {
120            crate::operation::create_group::CreateGroupError::AccessDeniedException(inner) => Error::AccessDeniedException(inner),
121            crate::operation::create_group::CreateGroupError::ConflictException(inner) => Error::ConflictException(inner),
122            crate::operation::create_group::CreateGroupError::DirectoryUnavailableException(inner) => Error::DirectoryUnavailableException(inner),
123            crate::operation::create_group::CreateGroupError::InternalServerException(inner) => Error::InternalServerException(inner),
124            crate::operation::create_group::CreateGroupError::ThrottlingException(inner) => Error::ThrottlingException(inner),
125            crate::operation::create_group::CreateGroupError::ValidationException(inner) => Error::ValidationException(inner),
126            crate::operation::create_group::CreateGroupError::Unhandled(inner) => Error::Unhandled(inner),
127        }
128    }
129}
130impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::create_user::CreateUserError, 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::create_user::CreateUserError, 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::create_user::CreateUserError> for Error {
145    fn from(err: crate::operation::create_user::CreateUserError) -> Self {
146        match err {
147            crate::operation::create_user::CreateUserError::AccessDeniedException(inner) => Error::AccessDeniedException(inner),
148            crate::operation::create_user::CreateUserError::ConflictException(inner) => Error::ConflictException(inner),
149            crate::operation::create_user::CreateUserError::DirectoryUnavailableException(inner) => Error::DirectoryUnavailableException(inner),
150            crate::operation::create_user::CreateUserError::InternalServerException(inner) => Error::InternalServerException(inner),
151            crate::operation::create_user::CreateUserError::ThrottlingException(inner) => Error::ThrottlingException(inner),
152            crate::operation::create_user::CreateUserError::ValidationException(inner) => Error::ValidationException(inner),
153            crate::operation::create_user::CreateUserError::Unhandled(inner) => Error::Unhandled(inner),
154        }
155    }
156}
157impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::delete_group::DeleteGroupError, 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_group::DeleteGroupError, 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_group::DeleteGroupError> for Error {
172    fn from(err: crate::operation::delete_group::DeleteGroupError) -> Self {
173        match err {
174            crate::operation::delete_group::DeleteGroupError::AccessDeniedException(inner) => Error::AccessDeniedException(inner),
175            crate::operation::delete_group::DeleteGroupError::ConflictException(inner) => Error::ConflictException(inner),
176            crate::operation::delete_group::DeleteGroupError::DirectoryUnavailableException(inner) => Error::DirectoryUnavailableException(inner),
177            crate::operation::delete_group::DeleteGroupError::InternalServerException(inner) => Error::InternalServerException(inner),
178            crate::operation::delete_group::DeleteGroupError::ResourceNotFoundException(inner) => Error::ResourceNotFoundException(inner),
179            crate::operation::delete_group::DeleteGroupError::ThrottlingException(inner) => Error::ThrottlingException(inner),
180            crate::operation::delete_group::DeleteGroupError::ValidationException(inner) => Error::ValidationException(inner),
181            crate::operation::delete_group::DeleteGroupError::Unhandled(inner) => Error::Unhandled(inner),
182        }
183    }
184}
185impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::delete_user::DeleteUserError, R>> for Error
186where
187    R: Send + Sync + std::fmt::Debug + 'static,
188{
189    fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::delete_user::DeleteUserError, R>) -> Self {
190        match err {
191            ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
192            _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
193                meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
194                source: err.into(),
195            }),
196        }
197    }
198}
199impl From<crate::operation::delete_user::DeleteUserError> for Error {
200    fn from(err: crate::operation::delete_user::DeleteUserError) -> Self {
201        match err {
202            crate::operation::delete_user::DeleteUserError::AccessDeniedException(inner) => Error::AccessDeniedException(inner),
203            crate::operation::delete_user::DeleteUserError::ConflictException(inner) => Error::ConflictException(inner),
204            crate::operation::delete_user::DeleteUserError::DirectoryUnavailableException(inner) => Error::DirectoryUnavailableException(inner),
205            crate::operation::delete_user::DeleteUserError::InternalServerException(inner) => Error::InternalServerException(inner),
206            crate::operation::delete_user::DeleteUserError::ResourceNotFoundException(inner) => Error::ResourceNotFoundException(inner),
207            crate::operation::delete_user::DeleteUserError::ThrottlingException(inner) => Error::ThrottlingException(inner),
208            crate::operation::delete_user::DeleteUserError::ValidationException(inner) => Error::ValidationException(inner),
209            crate::operation::delete_user::DeleteUserError::Unhandled(inner) => Error::Unhandled(inner),
210        }
211    }
212}
213impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::describe_group::DescribeGroupError, R>> for Error
214where
215    R: Send + Sync + std::fmt::Debug + 'static,
216{
217    fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::describe_group::DescribeGroupError, R>) -> Self {
218        match err {
219            ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
220            _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
221                meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
222                source: err.into(),
223            }),
224        }
225    }
226}
227impl From<crate::operation::describe_group::DescribeGroupError> for Error {
228    fn from(err: crate::operation::describe_group::DescribeGroupError) -> Self {
229        match err {
230            crate::operation::describe_group::DescribeGroupError::AccessDeniedException(inner) => Error::AccessDeniedException(inner),
231            crate::operation::describe_group::DescribeGroupError::DirectoryUnavailableException(inner) => Error::DirectoryUnavailableException(inner),
232            crate::operation::describe_group::DescribeGroupError::InternalServerException(inner) => Error::InternalServerException(inner),
233            crate::operation::describe_group::DescribeGroupError::ResourceNotFoundException(inner) => Error::ResourceNotFoundException(inner),
234            crate::operation::describe_group::DescribeGroupError::ThrottlingException(inner) => Error::ThrottlingException(inner),
235            crate::operation::describe_group::DescribeGroupError::ValidationException(inner) => Error::ValidationException(inner),
236            crate::operation::describe_group::DescribeGroupError::Unhandled(inner) => Error::Unhandled(inner),
237        }
238    }
239}
240impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::describe_user::DescribeUserError, R>> for Error
241where
242    R: Send + Sync + std::fmt::Debug + 'static,
243{
244    fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::describe_user::DescribeUserError, R>) -> Self {
245        match err {
246            ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
247            _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
248                meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
249                source: err.into(),
250            }),
251        }
252    }
253}
254impl From<crate::operation::describe_user::DescribeUserError> for Error {
255    fn from(err: crate::operation::describe_user::DescribeUserError) -> Self {
256        match err {
257            crate::operation::describe_user::DescribeUserError::AccessDeniedException(inner) => Error::AccessDeniedException(inner),
258            crate::operation::describe_user::DescribeUserError::DirectoryUnavailableException(inner) => Error::DirectoryUnavailableException(inner),
259            crate::operation::describe_user::DescribeUserError::InternalServerException(inner) => Error::InternalServerException(inner),
260            crate::operation::describe_user::DescribeUserError::ResourceNotFoundException(inner) => Error::ResourceNotFoundException(inner),
261            crate::operation::describe_user::DescribeUserError::ThrottlingException(inner) => Error::ThrottlingException(inner),
262            crate::operation::describe_user::DescribeUserError::ValidationException(inner) => Error::ValidationException(inner),
263            crate::operation::describe_user::DescribeUserError::Unhandled(inner) => Error::Unhandled(inner),
264        }
265    }
266}
267impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::disable_user::DisableUserError, R>> for Error
268where
269    R: Send + Sync + std::fmt::Debug + 'static,
270{
271    fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::disable_user::DisableUserError, R>) -> Self {
272        match err {
273            ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
274            _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
275                meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
276                source: err.into(),
277            }),
278        }
279    }
280}
281impl From<crate::operation::disable_user::DisableUserError> for Error {
282    fn from(err: crate::operation::disable_user::DisableUserError) -> Self {
283        match err {
284            crate::operation::disable_user::DisableUserError::AccessDeniedException(inner) => Error::AccessDeniedException(inner),
285            crate::operation::disable_user::DisableUserError::ConflictException(inner) => Error::ConflictException(inner),
286            crate::operation::disable_user::DisableUserError::DirectoryUnavailableException(inner) => Error::DirectoryUnavailableException(inner),
287            crate::operation::disable_user::DisableUserError::InternalServerException(inner) => Error::InternalServerException(inner),
288            crate::operation::disable_user::DisableUserError::ResourceNotFoundException(inner) => Error::ResourceNotFoundException(inner),
289            crate::operation::disable_user::DisableUserError::ThrottlingException(inner) => Error::ThrottlingException(inner),
290            crate::operation::disable_user::DisableUserError::ValidationException(inner) => Error::ValidationException(inner),
291            crate::operation::disable_user::DisableUserError::Unhandled(inner) => Error::Unhandled(inner),
292        }
293    }
294}
295impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::list_group_members::ListGroupMembersError, R>> for Error
296where
297    R: Send + Sync + std::fmt::Debug + 'static,
298{
299    fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::list_group_members::ListGroupMembersError, R>) -> Self {
300        match err {
301            ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
302            _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
303                meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
304                source: err.into(),
305            }),
306        }
307    }
308}
309impl From<crate::operation::list_group_members::ListGroupMembersError> for Error {
310    fn from(err: crate::operation::list_group_members::ListGroupMembersError) -> Self {
311        match err {
312            crate::operation::list_group_members::ListGroupMembersError::AccessDeniedException(inner) => Error::AccessDeniedException(inner),
313            crate::operation::list_group_members::ListGroupMembersError::DirectoryUnavailableException(inner) => {
314                Error::DirectoryUnavailableException(inner)
315            }
316            crate::operation::list_group_members::ListGroupMembersError::InternalServerException(inner) => Error::InternalServerException(inner),
317            crate::operation::list_group_members::ListGroupMembersError::ResourceNotFoundException(inner) => Error::ResourceNotFoundException(inner),
318            crate::operation::list_group_members::ListGroupMembersError::ThrottlingException(inner) => Error::ThrottlingException(inner),
319            crate::operation::list_group_members::ListGroupMembersError::ValidationException(inner) => Error::ValidationException(inner),
320            crate::operation::list_group_members::ListGroupMembersError::Unhandled(inner) => Error::Unhandled(inner),
321        }
322    }
323}
324impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::list_groups::ListGroupsError, R>> for Error
325where
326    R: Send + Sync + std::fmt::Debug + 'static,
327{
328    fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::list_groups::ListGroupsError, R>) -> Self {
329        match err {
330            ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
331            _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
332                meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
333                source: err.into(),
334            }),
335        }
336    }
337}
338impl From<crate::operation::list_groups::ListGroupsError> for Error {
339    fn from(err: crate::operation::list_groups::ListGroupsError) -> Self {
340        match err {
341            crate::operation::list_groups::ListGroupsError::AccessDeniedException(inner) => Error::AccessDeniedException(inner),
342            crate::operation::list_groups::ListGroupsError::DirectoryUnavailableException(inner) => Error::DirectoryUnavailableException(inner),
343            crate::operation::list_groups::ListGroupsError::InternalServerException(inner) => Error::InternalServerException(inner),
344            crate::operation::list_groups::ListGroupsError::ThrottlingException(inner) => Error::ThrottlingException(inner),
345            crate::operation::list_groups::ListGroupsError::ValidationException(inner) => Error::ValidationException(inner),
346            crate::operation::list_groups::ListGroupsError::Unhandled(inner) => Error::Unhandled(inner),
347        }
348    }
349}
350impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::list_groups_for_member::ListGroupsForMemberError, R>> for Error
351where
352    R: Send + Sync + std::fmt::Debug + 'static,
353{
354    fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::list_groups_for_member::ListGroupsForMemberError, R>) -> Self {
355        match err {
356            ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
357            _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
358                meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
359                source: err.into(),
360            }),
361        }
362    }
363}
364impl From<crate::operation::list_groups_for_member::ListGroupsForMemberError> for Error {
365    fn from(err: crate::operation::list_groups_for_member::ListGroupsForMemberError) -> Self {
366        match err {
367            crate::operation::list_groups_for_member::ListGroupsForMemberError::AccessDeniedException(inner) => Error::AccessDeniedException(inner),
368            crate::operation::list_groups_for_member::ListGroupsForMemberError::DirectoryUnavailableException(inner) => {
369                Error::DirectoryUnavailableException(inner)
370            }
371            crate::operation::list_groups_for_member::ListGroupsForMemberError::InternalServerException(inner) => {
372                Error::InternalServerException(inner)
373            }
374            crate::operation::list_groups_for_member::ListGroupsForMemberError::ResourceNotFoundException(inner) => {
375                Error::ResourceNotFoundException(inner)
376            }
377            crate::operation::list_groups_for_member::ListGroupsForMemberError::ThrottlingException(inner) => Error::ThrottlingException(inner),
378            crate::operation::list_groups_for_member::ListGroupsForMemberError::ValidationException(inner) => Error::ValidationException(inner),
379            crate::operation::list_groups_for_member::ListGroupsForMemberError::Unhandled(inner) => Error::Unhandled(inner),
380        }
381    }
382}
383impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::list_users::ListUsersError, R>> for Error
384where
385    R: Send + Sync + std::fmt::Debug + 'static,
386{
387    fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::list_users::ListUsersError, R>) -> Self {
388        match err {
389            ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
390            _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
391                meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
392                source: err.into(),
393            }),
394        }
395    }
396}
397impl From<crate::operation::list_users::ListUsersError> for Error {
398    fn from(err: crate::operation::list_users::ListUsersError) -> Self {
399        match err {
400            crate::operation::list_users::ListUsersError::AccessDeniedException(inner) => Error::AccessDeniedException(inner),
401            crate::operation::list_users::ListUsersError::DirectoryUnavailableException(inner) => Error::DirectoryUnavailableException(inner),
402            crate::operation::list_users::ListUsersError::InternalServerException(inner) => Error::InternalServerException(inner),
403            crate::operation::list_users::ListUsersError::ThrottlingException(inner) => Error::ThrottlingException(inner),
404            crate::operation::list_users::ListUsersError::ValidationException(inner) => Error::ValidationException(inner),
405            crate::operation::list_users::ListUsersError::Unhandled(inner) => Error::Unhandled(inner),
406        }
407    }
408}
409impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::remove_group_member::RemoveGroupMemberError, 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::remove_group_member::RemoveGroupMemberError, 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::remove_group_member::RemoveGroupMemberError> for Error {
424    fn from(err: crate::operation::remove_group_member::RemoveGroupMemberError) -> Self {
425        match err {
426            crate::operation::remove_group_member::RemoveGroupMemberError::AccessDeniedException(inner) => Error::AccessDeniedException(inner),
427            crate::operation::remove_group_member::RemoveGroupMemberError::ConflictException(inner) => Error::ConflictException(inner),
428            crate::operation::remove_group_member::RemoveGroupMemberError::DirectoryUnavailableException(inner) => {
429                Error::DirectoryUnavailableException(inner)
430            }
431            crate::operation::remove_group_member::RemoveGroupMemberError::InternalServerException(inner) => Error::InternalServerException(inner),
432            crate::operation::remove_group_member::RemoveGroupMemberError::ResourceNotFoundException(inner) => {
433                Error::ResourceNotFoundException(inner)
434            }
435            crate::operation::remove_group_member::RemoveGroupMemberError::ThrottlingException(inner) => Error::ThrottlingException(inner),
436            crate::operation::remove_group_member::RemoveGroupMemberError::ValidationException(inner) => Error::ValidationException(inner),
437            crate::operation::remove_group_member::RemoveGroupMemberError::Unhandled(inner) => Error::Unhandled(inner),
438        }
439    }
440}
441impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::search_groups::SearchGroupsError, R>> for Error
442where
443    R: Send + Sync + std::fmt::Debug + 'static,
444{
445    fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::search_groups::SearchGroupsError, R>) -> Self {
446        match err {
447            ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
448            _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
449                meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
450                source: err.into(),
451            }),
452        }
453    }
454}
455impl From<crate::operation::search_groups::SearchGroupsError> for Error {
456    fn from(err: crate::operation::search_groups::SearchGroupsError) -> Self {
457        match err {
458            crate::operation::search_groups::SearchGroupsError::AccessDeniedException(inner) => Error::AccessDeniedException(inner),
459            crate::operation::search_groups::SearchGroupsError::DirectoryUnavailableException(inner) => Error::DirectoryUnavailableException(inner),
460            crate::operation::search_groups::SearchGroupsError::InternalServerException(inner) => Error::InternalServerException(inner),
461            crate::operation::search_groups::SearchGroupsError::ThrottlingException(inner) => Error::ThrottlingException(inner),
462            crate::operation::search_groups::SearchGroupsError::ValidationException(inner) => Error::ValidationException(inner),
463            crate::operation::search_groups::SearchGroupsError::Unhandled(inner) => Error::Unhandled(inner),
464        }
465    }
466}
467impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::search_users::SearchUsersError, R>> for Error
468where
469    R: Send + Sync + std::fmt::Debug + 'static,
470{
471    fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::search_users::SearchUsersError, R>) -> Self {
472        match err {
473            ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
474            _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
475                meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
476                source: err.into(),
477            }),
478        }
479    }
480}
481impl From<crate::operation::search_users::SearchUsersError> for Error {
482    fn from(err: crate::operation::search_users::SearchUsersError) -> Self {
483        match err {
484            crate::operation::search_users::SearchUsersError::AccessDeniedException(inner) => Error::AccessDeniedException(inner),
485            crate::operation::search_users::SearchUsersError::DirectoryUnavailableException(inner) => Error::DirectoryUnavailableException(inner),
486            crate::operation::search_users::SearchUsersError::InternalServerException(inner) => Error::InternalServerException(inner),
487            crate::operation::search_users::SearchUsersError::ThrottlingException(inner) => Error::ThrottlingException(inner),
488            crate::operation::search_users::SearchUsersError::ValidationException(inner) => Error::ValidationException(inner),
489            crate::operation::search_users::SearchUsersError::Unhandled(inner) => Error::Unhandled(inner),
490        }
491    }
492}
493impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::update_group::UpdateGroupError, R>> for Error
494where
495    R: Send + Sync + std::fmt::Debug + 'static,
496{
497    fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::update_group::UpdateGroupError, R>) -> Self {
498        match err {
499            ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
500            _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
501                meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
502                source: err.into(),
503            }),
504        }
505    }
506}
507impl From<crate::operation::update_group::UpdateGroupError> for Error {
508    fn from(err: crate::operation::update_group::UpdateGroupError) -> Self {
509        match err {
510            crate::operation::update_group::UpdateGroupError::AccessDeniedException(inner) => Error::AccessDeniedException(inner),
511            crate::operation::update_group::UpdateGroupError::ConflictException(inner) => Error::ConflictException(inner),
512            crate::operation::update_group::UpdateGroupError::DirectoryUnavailableException(inner) => Error::DirectoryUnavailableException(inner),
513            crate::operation::update_group::UpdateGroupError::InternalServerException(inner) => Error::InternalServerException(inner),
514            crate::operation::update_group::UpdateGroupError::ResourceNotFoundException(inner) => Error::ResourceNotFoundException(inner),
515            crate::operation::update_group::UpdateGroupError::ThrottlingException(inner) => Error::ThrottlingException(inner),
516            crate::operation::update_group::UpdateGroupError::ValidationException(inner) => Error::ValidationException(inner),
517            crate::operation::update_group::UpdateGroupError::Unhandled(inner) => Error::Unhandled(inner),
518        }
519    }
520}
521impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::update_user::UpdateUserError, R>> for Error
522where
523    R: Send + Sync + std::fmt::Debug + 'static,
524{
525    fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::update_user::UpdateUserError, R>) -> Self {
526        match err {
527            ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
528            _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
529                meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
530                source: err.into(),
531            }),
532        }
533    }
534}
535impl From<crate::operation::update_user::UpdateUserError> for Error {
536    fn from(err: crate::operation::update_user::UpdateUserError) -> Self {
537        match err {
538            crate::operation::update_user::UpdateUserError::AccessDeniedException(inner) => Error::AccessDeniedException(inner),
539            crate::operation::update_user::UpdateUserError::ConflictException(inner) => Error::ConflictException(inner),
540            crate::operation::update_user::UpdateUserError::DirectoryUnavailableException(inner) => Error::DirectoryUnavailableException(inner),
541            crate::operation::update_user::UpdateUserError::InternalServerException(inner) => Error::InternalServerException(inner),
542            crate::operation::update_user::UpdateUserError::ResourceNotFoundException(inner) => Error::ResourceNotFoundException(inner),
543            crate::operation::update_user::UpdateUserError::ThrottlingException(inner) => Error::ThrottlingException(inner),
544            crate::operation::update_user::UpdateUserError::ValidationException(inner) => Error::ValidationException(inner),
545            crate::operation::update_user::UpdateUserError::Unhandled(inner) => Error::Unhandled(inner),
546        }
547    }
548}
549impl ::std::error::Error for Error {
550    fn source(&self) -> std::option::Option<&(dyn ::std::error::Error + 'static)> {
551        match self {
552            Error::AccessDeniedException(inner) => inner.source(),
553            Error::ConflictException(inner) => inner.source(),
554            Error::DirectoryUnavailableException(inner) => inner.source(),
555            Error::InternalServerException(inner) => inner.source(),
556            Error::ResourceNotFoundException(inner) => inner.source(),
557            Error::ThrottlingException(inner) => inner.source(),
558            Error::ValidationException(inner) => inner.source(),
559            Error::Unhandled(inner) => ::std::option::Option::Some(&*inner.source),
560        }
561    }
562}
563impl ::aws_types::request_id::RequestId for Error {
564    fn request_id(&self) -> Option<&str> {
565        match self {
566            Self::AccessDeniedException(e) => e.request_id(),
567            Self::ConflictException(e) => e.request_id(),
568            Self::DirectoryUnavailableException(e) => e.request_id(),
569            Self::InternalServerException(e) => e.request_id(),
570            Self::ResourceNotFoundException(e) => e.request_id(),
571            Self::ThrottlingException(e) => e.request_id(),
572            Self::ValidationException(e) => e.request_id(),
573            Self::Unhandled(e) => e.meta.request_id(),
574        }
575    }
576}