aws_sdk_verifiedpermissions/
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 sufficient access to perform this action.</p>
7    AccessDeniedException(crate::types::error::AccessDeniedException),
8    /// <p>The request failed because another request to modify a resource occurred at the same.</p>
9    ConflictException(crate::types::error::ConflictException),
10    /// <p>The request failed because of an internal error. Try your request again later</p>
11    InternalServerException(crate::types::error::InternalServerException),
12    /// <p>The policy store can't be deleted because deletion protection is enabled. To delete this policy store, disable deletion protection.</p>
13    InvalidStateException(crate::types::error::InvalidStateException),
14    /// <p>The request failed because it references a resource that doesn't exist.</p>
15    ResourceNotFoundException(crate::types::error::ResourceNotFoundException),
16    /// <p>The request failed because it would cause a service quota to be exceeded.</p>
17    ServiceQuotaExceededException(crate::types::error::ServiceQuotaExceededException),
18    /// <p>The request failed because it exceeded a throttling quota.</p>
19    ThrottlingException(crate::types::error::ThrottlingException),
20    /// <p>The request failed because one or more input parameters don't satisfy their constraint requirements. The output is provided as a list of fields and a reason for each field that isn't valid.</p>
21    /// <p>The possible reasons include the following:</p>
22    /// <ul>
23    /// <li>
24    /// <p><b>UnrecognizedEntityType</b></p>
25    /// <p>The policy includes an entity type that isn't found in the schema.</p></li>
26    /// <li>
27    /// <p><b>UnrecognizedActionId</b></p>
28    /// <p>The policy includes an action id that isn't found in the schema.</p></li>
29    /// <li>
30    /// <p><b>InvalidActionApplication</b></p>
31    /// <p>The policy includes an action that, according to the schema, doesn't support the specified principal and resource.</p></li>
32    /// <li>
33    /// <p><b>UnexpectedType</b></p>
34    /// <p>The policy included an operand that isn't a valid type for the specified operation.</p></li>
35    /// <li>
36    /// <p><b>IncompatibleTypes</b></p>
37    /// <p>The types of elements included in a <code>set</code>, or the types of expressions used in an <code>if...then...else</code> clause aren't compatible in this context.</p></li>
38    /// <li>
39    /// <p><b>MissingAttribute</b></p>
40    /// <p>The policy attempts to access a record or entity attribute that isn't specified in the schema. Test for the existence of the attribute first before attempting to access its value. For more information, see the <a href="https://docs.cedarpolicy.com/policies/syntax-operators.html#has-presence-of-attribute-test">has (presence of attribute test) operator</a> in the <i>Cedar Policy Language Guide</i>.</p></li>
41    /// <li>
42    /// <p><b>UnsafeOptionalAttributeAccess</b></p>
43    /// <p>The policy attempts to access a record or entity attribute that is optional and isn't guaranteed to be present. Test for the existence of the attribute first before attempting to access its value. For more information, see the <a href="https://docs.cedarpolicy.com/policies/syntax-operators.html#has-presence-of-attribute-test">has (presence of attribute test) operator</a> in the <i>Cedar Policy Language Guide</i>.</p></li>
44    /// <li>
45    /// <p><b>ImpossiblePolicy</b></p>
46    /// <p>Cedar has determined that a policy condition always evaluates to false. If the policy is always false, it can never apply to any query, and so it can never affect an authorization decision.</p></li>
47    /// <li>
48    /// <p><b>WrongNumberArguments</b></p>
49    /// <p>The policy references an extension type with the wrong number of arguments.</p></li>
50    /// <li>
51    /// <p><b>FunctionArgumentValidationError</b></p>
52    /// <p>Cedar couldn't parse the argument passed to an extension type. For example, a string that is to be parsed as an IPv4 address can contain only digits and the period character.</p></li>
53    /// </ul>
54    ValidationException(crate::types::error::ValidationException),
55    /// An unexpected error occurred (e.g., invalid JSON returned by the service or an unknown error code).
56    #[deprecated(note = "Matching `Unhandled` directly is not forwards compatible. Instead, match using a \
57    variable wildcard pattern and check `.code()`:
58     \
59    &nbsp;&nbsp;&nbsp;`err if err.code() == Some(\"SpecificExceptionCode\") => { /* handle the error */ }`
60     \
61    See [`ProvideErrorMetadata`](#impl-ProvideErrorMetadata-for-Error) for what information is available for the error.")]
62    Unhandled(crate::error::sealed_unhandled::Unhandled),
63}
64impl ::std::fmt::Display for Error {
65    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
66        match self {
67            Error::AccessDeniedException(inner) => inner.fmt(f),
68            Error::ConflictException(inner) => inner.fmt(f),
69            Error::InternalServerException(inner) => inner.fmt(f),
70            Error::InvalidStateException(inner) => inner.fmt(f),
71            Error::ResourceNotFoundException(inner) => inner.fmt(f),
72            Error::ServiceQuotaExceededException(inner) => inner.fmt(f),
73            Error::ThrottlingException(inner) => inner.fmt(f),
74            Error::ValidationException(inner) => inner.fmt(f),
75            Error::Unhandled(_) => {
76                if let ::std::option::Option::Some(code) = ::aws_smithy_types::error::metadata::ProvideErrorMetadata::code(self) {
77                    write!(f, "unhandled error ({code})")
78                } else {
79                    f.write_str("unhandled error")
80                }
81            }
82        }
83    }
84}
85impl From<::aws_smithy_types::error::operation::BuildError> for Error {
86    fn from(value: ::aws_smithy_types::error::operation::BuildError) -> Self {
87        Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
88            source: value.into(),
89            meta: ::std::default::Default::default(),
90        })
91    }
92}
93impl ::aws_smithy_types::error::metadata::ProvideErrorMetadata for Error {
94    fn meta(&self) -> &::aws_smithy_types::error::metadata::ErrorMetadata {
95        match self {
96            Self::AccessDeniedException(inner) => inner.meta(),
97            Self::ConflictException(inner) => inner.meta(),
98            Self::InternalServerException(inner) => inner.meta(),
99            Self::InvalidStateException(inner) => inner.meta(),
100            Self::ResourceNotFoundException(inner) => inner.meta(),
101            Self::ServiceQuotaExceededException(inner) => inner.meta(),
102            Self::ThrottlingException(inner) => inner.meta(),
103            Self::ValidationException(inner) => inner.meta(),
104            Self::Unhandled(inner) => &inner.meta,
105        }
106    }
107}
108impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::batch_get_policy::BatchGetPolicyError, R>> for Error
109where
110    R: Send + Sync + std::fmt::Debug + 'static,
111{
112    fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::batch_get_policy::BatchGetPolicyError, R>) -> Self {
113        match err {
114            ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
115            _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
116                meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
117                source: err.into(),
118            }),
119        }
120    }
121}
122impl From<crate::operation::batch_get_policy::BatchGetPolicyError> for Error {
123    fn from(err: crate::operation::batch_get_policy::BatchGetPolicyError) -> Self {
124        match err {
125            crate::operation::batch_get_policy::BatchGetPolicyError::AccessDeniedException(inner) => Error::AccessDeniedException(inner),
126            crate::operation::batch_get_policy::BatchGetPolicyError::InternalServerException(inner) => Error::InternalServerException(inner),
127            crate::operation::batch_get_policy::BatchGetPolicyError::ThrottlingException(inner) => Error::ThrottlingException(inner),
128            crate::operation::batch_get_policy::BatchGetPolicyError::ValidationException(inner) => Error::ValidationException(inner),
129            crate::operation::batch_get_policy::BatchGetPolicyError::Unhandled(inner) => Error::Unhandled(inner),
130        }
131    }
132}
133impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::batch_is_authorized::BatchIsAuthorizedError, R>> for Error
134where
135    R: Send + Sync + std::fmt::Debug + 'static,
136{
137    fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::batch_is_authorized::BatchIsAuthorizedError, R>) -> Self {
138        match err {
139            ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
140            _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
141                meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
142                source: err.into(),
143            }),
144        }
145    }
146}
147impl From<crate::operation::batch_is_authorized::BatchIsAuthorizedError> for Error {
148    fn from(err: crate::operation::batch_is_authorized::BatchIsAuthorizedError) -> Self {
149        match err {
150            crate::operation::batch_is_authorized::BatchIsAuthorizedError::ResourceNotFoundException(inner) => {
151                Error::ResourceNotFoundException(inner)
152            }
153            crate::operation::batch_is_authorized::BatchIsAuthorizedError::AccessDeniedException(inner) => Error::AccessDeniedException(inner),
154            crate::operation::batch_is_authorized::BatchIsAuthorizedError::InternalServerException(inner) => Error::InternalServerException(inner),
155            crate::operation::batch_is_authorized::BatchIsAuthorizedError::ThrottlingException(inner) => Error::ThrottlingException(inner),
156            crate::operation::batch_is_authorized::BatchIsAuthorizedError::ValidationException(inner) => Error::ValidationException(inner),
157            crate::operation::batch_is_authorized::BatchIsAuthorizedError::Unhandled(inner) => Error::Unhandled(inner),
158        }
159    }
160}
161impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::batch_is_authorized_with_token::BatchIsAuthorizedWithTokenError, R>>
162    for Error
163where
164    R: Send + Sync + std::fmt::Debug + 'static,
165{
166    fn from(
167        err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::batch_is_authorized_with_token::BatchIsAuthorizedWithTokenError, R>,
168    ) -> Self {
169        match err {
170            ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
171            _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
172                meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
173                source: err.into(),
174            }),
175        }
176    }
177}
178impl From<crate::operation::batch_is_authorized_with_token::BatchIsAuthorizedWithTokenError> for Error {
179    fn from(err: crate::operation::batch_is_authorized_with_token::BatchIsAuthorizedWithTokenError) -> Self {
180        match err {
181            crate::operation::batch_is_authorized_with_token::BatchIsAuthorizedWithTokenError::ResourceNotFoundException(inner) => {
182                Error::ResourceNotFoundException(inner)
183            }
184            crate::operation::batch_is_authorized_with_token::BatchIsAuthorizedWithTokenError::AccessDeniedException(inner) => {
185                Error::AccessDeniedException(inner)
186            }
187            crate::operation::batch_is_authorized_with_token::BatchIsAuthorizedWithTokenError::InternalServerException(inner) => {
188                Error::InternalServerException(inner)
189            }
190            crate::operation::batch_is_authorized_with_token::BatchIsAuthorizedWithTokenError::ThrottlingException(inner) => {
191                Error::ThrottlingException(inner)
192            }
193            crate::operation::batch_is_authorized_with_token::BatchIsAuthorizedWithTokenError::ValidationException(inner) => {
194                Error::ValidationException(inner)
195            }
196            crate::operation::batch_is_authorized_with_token::BatchIsAuthorizedWithTokenError::Unhandled(inner) => Error::Unhandled(inner),
197        }
198    }
199}
200impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::create_identity_source::CreateIdentitySourceError, R>> for Error
201where
202    R: Send + Sync + std::fmt::Debug + 'static,
203{
204    fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::create_identity_source::CreateIdentitySourceError, R>) -> 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::create_identity_source::CreateIdentitySourceError> for Error {
215    fn from(err: crate::operation::create_identity_source::CreateIdentitySourceError) -> Self {
216        match err {
217            crate::operation::create_identity_source::CreateIdentitySourceError::ConflictException(inner) => Error::ConflictException(inner),
218            crate::operation::create_identity_source::CreateIdentitySourceError::ResourceNotFoundException(inner) => {
219                Error::ResourceNotFoundException(inner)
220            }
221            crate::operation::create_identity_source::CreateIdentitySourceError::ServiceQuotaExceededException(inner) => {
222                Error::ServiceQuotaExceededException(inner)
223            }
224            crate::operation::create_identity_source::CreateIdentitySourceError::AccessDeniedException(inner) => Error::AccessDeniedException(inner),
225            crate::operation::create_identity_source::CreateIdentitySourceError::InternalServerException(inner) => {
226                Error::InternalServerException(inner)
227            }
228            crate::operation::create_identity_source::CreateIdentitySourceError::ThrottlingException(inner) => Error::ThrottlingException(inner),
229            crate::operation::create_identity_source::CreateIdentitySourceError::ValidationException(inner) => Error::ValidationException(inner),
230            crate::operation::create_identity_source::CreateIdentitySourceError::Unhandled(inner) => Error::Unhandled(inner),
231        }
232    }
233}
234impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::create_policy::CreatePolicyError, R>> for Error
235where
236    R: Send + Sync + std::fmt::Debug + 'static,
237{
238    fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::create_policy::CreatePolicyError, R>) -> Self {
239        match err {
240            ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
241            _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
242                meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
243                source: err.into(),
244            }),
245        }
246    }
247}
248impl From<crate::operation::create_policy::CreatePolicyError> for Error {
249    fn from(err: crate::operation::create_policy::CreatePolicyError) -> Self {
250        match err {
251            crate::operation::create_policy::CreatePolicyError::ConflictException(inner) => Error::ConflictException(inner),
252            crate::operation::create_policy::CreatePolicyError::ResourceNotFoundException(inner) => Error::ResourceNotFoundException(inner),
253            crate::operation::create_policy::CreatePolicyError::ServiceQuotaExceededException(inner) => Error::ServiceQuotaExceededException(inner),
254            crate::operation::create_policy::CreatePolicyError::AccessDeniedException(inner) => Error::AccessDeniedException(inner),
255            crate::operation::create_policy::CreatePolicyError::InternalServerException(inner) => Error::InternalServerException(inner),
256            crate::operation::create_policy::CreatePolicyError::ThrottlingException(inner) => Error::ThrottlingException(inner),
257            crate::operation::create_policy::CreatePolicyError::ValidationException(inner) => Error::ValidationException(inner),
258            crate::operation::create_policy::CreatePolicyError::Unhandled(inner) => Error::Unhandled(inner),
259        }
260    }
261}
262impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::create_policy_store::CreatePolicyStoreError, R>> for Error
263where
264    R: Send + Sync + std::fmt::Debug + 'static,
265{
266    fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::create_policy_store::CreatePolicyStoreError, R>) -> Self {
267        match err {
268            ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
269            _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
270                meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
271                source: err.into(),
272            }),
273        }
274    }
275}
276impl From<crate::operation::create_policy_store::CreatePolicyStoreError> for Error {
277    fn from(err: crate::operation::create_policy_store::CreatePolicyStoreError) -> Self {
278        match err {
279            crate::operation::create_policy_store::CreatePolicyStoreError::ConflictException(inner) => Error::ConflictException(inner),
280            crate::operation::create_policy_store::CreatePolicyStoreError::ServiceQuotaExceededException(inner) => {
281                Error::ServiceQuotaExceededException(inner)
282            }
283            crate::operation::create_policy_store::CreatePolicyStoreError::AccessDeniedException(inner) => Error::AccessDeniedException(inner),
284            crate::operation::create_policy_store::CreatePolicyStoreError::InternalServerException(inner) => Error::InternalServerException(inner),
285            crate::operation::create_policy_store::CreatePolicyStoreError::ThrottlingException(inner) => Error::ThrottlingException(inner),
286            crate::operation::create_policy_store::CreatePolicyStoreError::ValidationException(inner) => Error::ValidationException(inner),
287            crate::operation::create_policy_store::CreatePolicyStoreError::Unhandled(inner) => Error::Unhandled(inner),
288        }
289    }
290}
291impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::create_policy_template::CreatePolicyTemplateError, R>> for Error
292where
293    R: Send + Sync + std::fmt::Debug + 'static,
294{
295    fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::create_policy_template::CreatePolicyTemplateError, R>) -> 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::create_policy_template::CreatePolicyTemplateError> for Error {
306    fn from(err: crate::operation::create_policy_template::CreatePolicyTemplateError) -> Self {
307        match err {
308            crate::operation::create_policy_template::CreatePolicyTemplateError::ConflictException(inner) => Error::ConflictException(inner),
309            crate::operation::create_policy_template::CreatePolicyTemplateError::ResourceNotFoundException(inner) => {
310                Error::ResourceNotFoundException(inner)
311            }
312            crate::operation::create_policy_template::CreatePolicyTemplateError::ServiceQuotaExceededException(inner) => {
313                Error::ServiceQuotaExceededException(inner)
314            }
315            crate::operation::create_policy_template::CreatePolicyTemplateError::AccessDeniedException(inner) => Error::AccessDeniedException(inner),
316            crate::operation::create_policy_template::CreatePolicyTemplateError::InternalServerException(inner) => {
317                Error::InternalServerException(inner)
318            }
319            crate::operation::create_policy_template::CreatePolicyTemplateError::ThrottlingException(inner) => Error::ThrottlingException(inner),
320            crate::operation::create_policy_template::CreatePolicyTemplateError::ValidationException(inner) => Error::ValidationException(inner),
321            crate::operation::create_policy_template::CreatePolicyTemplateError::Unhandled(inner) => Error::Unhandled(inner),
322        }
323    }
324}
325impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::delete_identity_source::DeleteIdentitySourceError, 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::delete_identity_source::DeleteIdentitySourceError, 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::delete_identity_source::DeleteIdentitySourceError> for Error {
340    fn from(err: crate::operation::delete_identity_source::DeleteIdentitySourceError) -> Self {
341        match err {
342            crate::operation::delete_identity_source::DeleteIdentitySourceError::ConflictException(inner) => Error::ConflictException(inner),
343            crate::operation::delete_identity_source::DeleteIdentitySourceError::ResourceNotFoundException(inner) => {
344                Error::ResourceNotFoundException(inner)
345            }
346            crate::operation::delete_identity_source::DeleteIdentitySourceError::AccessDeniedException(inner) => Error::AccessDeniedException(inner),
347            crate::operation::delete_identity_source::DeleteIdentitySourceError::InternalServerException(inner) => {
348                Error::InternalServerException(inner)
349            }
350            crate::operation::delete_identity_source::DeleteIdentitySourceError::ThrottlingException(inner) => Error::ThrottlingException(inner),
351            crate::operation::delete_identity_source::DeleteIdentitySourceError::ValidationException(inner) => Error::ValidationException(inner),
352            crate::operation::delete_identity_source::DeleteIdentitySourceError::Unhandled(inner) => Error::Unhandled(inner),
353        }
354    }
355}
356impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::delete_policy::DeletePolicyError, R>> for Error
357where
358    R: Send + Sync + std::fmt::Debug + 'static,
359{
360    fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::delete_policy::DeletePolicyError, R>) -> Self {
361        match err {
362            ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
363            _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
364                meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
365                source: err.into(),
366            }),
367        }
368    }
369}
370impl From<crate::operation::delete_policy::DeletePolicyError> for Error {
371    fn from(err: crate::operation::delete_policy::DeletePolicyError) -> Self {
372        match err {
373            crate::operation::delete_policy::DeletePolicyError::ConflictException(inner) => Error::ConflictException(inner),
374            crate::operation::delete_policy::DeletePolicyError::ResourceNotFoundException(inner) => Error::ResourceNotFoundException(inner),
375            crate::operation::delete_policy::DeletePolicyError::AccessDeniedException(inner) => Error::AccessDeniedException(inner),
376            crate::operation::delete_policy::DeletePolicyError::InternalServerException(inner) => Error::InternalServerException(inner),
377            crate::operation::delete_policy::DeletePolicyError::ThrottlingException(inner) => Error::ThrottlingException(inner),
378            crate::operation::delete_policy::DeletePolicyError::ValidationException(inner) => Error::ValidationException(inner),
379            crate::operation::delete_policy::DeletePolicyError::Unhandled(inner) => Error::Unhandled(inner),
380        }
381    }
382}
383impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::delete_policy_store::DeletePolicyStoreError, 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::delete_policy_store::DeletePolicyStoreError, 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::delete_policy_store::DeletePolicyStoreError> for Error {
398    fn from(err: crate::operation::delete_policy_store::DeletePolicyStoreError) -> Self {
399        match err {
400            crate::operation::delete_policy_store::DeletePolicyStoreError::InvalidStateException(inner) => Error::InvalidStateException(inner),
401            crate::operation::delete_policy_store::DeletePolicyStoreError::AccessDeniedException(inner) => Error::AccessDeniedException(inner),
402            crate::operation::delete_policy_store::DeletePolicyStoreError::InternalServerException(inner) => Error::InternalServerException(inner),
403            crate::operation::delete_policy_store::DeletePolicyStoreError::ThrottlingException(inner) => Error::ThrottlingException(inner),
404            crate::operation::delete_policy_store::DeletePolicyStoreError::ValidationException(inner) => Error::ValidationException(inner),
405            crate::operation::delete_policy_store::DeletePolicyStoreError::Unhandled(inner) => Error::Unhandled(inner),
406        }
407    }
408}
409impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::delete_policy_template::DeletePolicyTemplateError, 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::delete_policy_template::DeletePolicyTemplateError, 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::delete_policy_template::DeletePolicyTemplateError> for Error {
424    fn from(err: crate::operation::delete_policy_template::DeletePolicyTemplateError) -> Self {
425        match err {
426            crate::operation::delete_policy_template::DeletePolicyTemplateError::ConflictException(inner) => Error::ConflictException(inner),
427            crate::operation::delete_policy_template::DeletePolicyTemplateError::ResourceNotFoundException(inner) => {
428                Error::ResourceNotFoundException(inner)
429            }
430            crate::operation::delete_policy_template::DeletePolicyTemplateError::AccessDeniedException(inner) => Error::AccessDeniedException(inner),
431            crate::operation::delete_policy_template::DeletePolicyTemplateError::InternalServerException(inner) => {
432                Error::InternalServerException(inner)
433            }
434            crate::operation::delete_policy_template::DeletePolicyTemplateError::ThrottlingException(inner) => Error::ThrottlingException(inner),
435            crate::operation::delete_policy_template::DeletePolicyTemplateError::ValidationException(inner) => Error::ValidationException(inner),
436            crate::operation::delete_policy_template::DeletePolicyTemplateError::Unhandled(inner) => Error::Unhandled(inner),
437        }
438    }
439}
440impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::get_identity_source::GetIdentitySourceError, R>> for Error
441where
442    R: Send + Sync + std::fmt::Debug + 'static,
443{
444    fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::get_identity_source::GetIdentitySourceError, R>) -> Self {
445        match err {
446            ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
447            _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
448                meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
449                source: err.into(),
450            }),
451        }
452    }
453}
454impl From<crate::operation::get_identity_source::GetIdentitySourceError> for Error {
455    fn from(err: crate::operation::get_identity_source::GetIdentitySourceError) -> Self {
456        match err {
457            crate::operation::get_identity_source::GetIdentitySourceError::ResourceNotFoundException(inner) => {
458                Error::ResourceNotFoundException(inner)
459            }
460            crate::operation::get_identity_source::GetIdentitySourceError::AccessDeniedException(inner) => Error::AccessDeniedException(inner),
461            crate::operation::get_identity_source::GetIdentitySourceError::InternalServerException(inner) => Error::InternalServerException(inner),
462            crate::operation::get_identity_source::GetIdentitySourceError::ThrottlingException(inner) => Error::ThrottlingException(inner),
463            crate::operation::get_identity_source::GetIdentitySourceError::ValidationException(inner) => Error::ValidationException(inner),
464            crate::operation::get_identity_source::GetIdentitySourceError::Unhandled(inner) => Error::Unhandled(inner),
465        }
466    }
467}
468impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::get_policy::GetPolicyError, R>> for Error
469where
470    R: Send + Sync + std::fmt::Debug + 'static,
471{
472    fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::get_policy::GetPolicyError, R>) -> Self {
473        match err {
474            ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
475            _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
476                meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
477                source: err.into(),
478            }),
479        }
480    }
481}
482impl From<crate::operation::get_policy::GetPolicyError> for Error {
483    fn from(err: crate::operation::get_policy::GetPolicyError) -> Self {
484        match err {
485            crate::operation::get_policy::GetPolicyError::ResourceNotFoundException(inner) => Error::ResourceNotFoundException(inner),
486            crate::operation::get_policy::GetPolicyError::AccessDeniedException(inner) => Error::AccessDeniedException(inner),
487            crate::operation::get_policy::GetPolicyError::InternalServerException(inner) => Error::InternalServerException(inner),
488            crate::operation::get_policy::GetPolicyError::ThrottlingException(inner) => Error::ThrottlingException(inner),
489            crate::operation::get_policy::GetPolicyError::ValidationException(inner) => Error::ValidationException(inner),
490            crate::operation::get_policy::GetPolicyError::Unhandled(inner) => Error::Unhandled(inner),
491        }
492    }
493}
494impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::get_policy_store::GetPolicyStoreError, R>> for Error
495where
496    R: Send + Sync + std::fmt::Debug + 'static,
497{
498    fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::get_policy_store::GetPolicyStoreError, R>) -> Self {
499        match err {
500            ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
501            _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
502                meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
503                source: err.into(),
504            }),
505        }
506    }
507}
508impl From<crate::operation::get_policy_store::GetPolicyStoreError> for Error {
509    fn from(err: crate::operation::get_policy_store::GetPolicyStoreError) -> Self {
510        match err {
511            crate::operation::get_policy_store::GetPolicyStoreError::ResourceNotFoundException(inner) => Error::ResourceNotFoundException(inner),
512            crate::operation::get_policy_store::GetPolicyStoreError::AccessDeniedException(inner) => Error::AccessDeniedException(inner),
513            crate::operation::get_policy_store::GetPolicyStoreError::InternalServerException(inner) => Error::InternalServerException(inner),
514            crate::operation::get_policy_store::GetPolicyStoreError::ThrottlingException(inner) => Error::ThrottlingException(inner),
515            crate::operation::get_policy_store::GetPolicyStoreError::ValidationException(inner) => Error::ValidationException(inner),
516            crate::operation::get_policy_store::GetPolicyStoreError::Unhandled(inner) => Error::Unhandled(inner),
517        }
518    }
519}
520impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::get_policy_template::GetPolicyTemplateError, R>> for Error
521where
522    R: Send + Sync + std::fmt::Debug + 'static,
523{
524    fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::get_policy_template::GetPolicyTemplateError, R>) -> Self {
525        match err {
526            ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
527            _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
528                meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
529                source: err.into(),
530            }),
531        }
532    }
533}
534impl From<crate::operation::get_policy_template::GetPolicyTemplateError> for Error {
535    fn from(err: crate::operation::get_policy_template::GetPolicyTemplateError) -> Self {
536        match err {
537            crate::operation::get_policy_template::GetPolicyTemplateError::ResourceNotFoundException(inner) => {
538                Error::ResourceNotFoundException(inner)
539            }
540            crate::operation::get_policy_template::GetPolicyTemplateError::AccessDeniedException(inner) => Error::AccessDeniedException(inner),
541            crate::operation::get_policy_template::GetPolicyTemplateError::InternalServerException(inner) => Error::InternalServerException(inner),
542            crate::operation::get_policy_template::GetPolicyTemplateError::ThrottlingException(inner) => Error::ThrottlingException(inner),
543            crate::operation::get_policy_template::GetPolicyTemplateError::ValidationException(inner) => Error::ValidationException(inner),
544            crate::operation::get_policy_template::GetPolicyTemplateError::Unhandled(inner) => Error::Unhandled(inner),
545        }
546    }
547}
548impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::get_schema::GetSchemaError, R>> for Error
549where
550    R: Send + Sync + std::fmt::Debug + 'static,
551{
552    fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::get_schema::GetSchemaError, R>) -> Self {
553        match err {
554            ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
555            _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
556                meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
557                source: err.into(),
558            }),
559        }
560    }
561}
562impl From<crate::operation::get_schema::GetSchemaError> for Error {
563    fn from(err: crate::operation::get_schema::GetSchemaError) -> Self {
564        match err {
565            crate::operation::get_schema::GetSchemaError::ResourceNotFoundException(inner) => Error::ResourceNotFoundException(inner),
566            crate::operation::get_schema::GetSchemaError::AccessDeniedException(inner) => Error::AccessDeniedException(inner),
567            crate::operation::get_schema::GetSchemaError::InternalServerException(inner) => Error::InternalServerException(inner),
568            crate::operation::get_schema::GetSchemaError::ThrottlingException(inner) => Error::ThrottlingException(inner),
569            crate::operation::get_schema::GetSchemaError::ValidationException(inner) => Error::ValidationException(inner),
570            crate::operation::get_schema::GetSchemaError::Unhandled(inner) => Error::Unhandled(inner),
571        }
572    }
573}
574impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::is_authorized::IsAuthorizedError, R>> for Error
575where
576    R: Send + Sync + std::fmt::Debug + 'static,
577{
578    fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::is_authorized::IsAuthorizedError, R>) -> Self {
579        match err {
580            ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
581            _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
582                meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
583                source: err.into(),
584            }),
585        }
586    }
587}
588impl From<crate::operation::is_authorized::IsAuthorizedError> for Error {
589    fn from(err: crate::operation::is_authorized::IsAuthorizedError) -> Self {
590        match err {
591            crate::operation::is_authorized::IsAuthorizedError::ResourceNotFoundException(inner) => Error::ResourceNotFoundException(inner),
592            crate::operation::is_authorized::IsAuthorizedError::AccessDeniedException(inner) => Error::AccessDeniedException(inner),
593            crate::operation::is_authorized::IsAuthorizedError::InternalServerException(inner) => Error::InternalServerException(inner),
594            crate::operation::is_authorized::IsAuthorizedError::ThrottlingException(inner) => Error::ThrottlingException(inner),
595            crate::operation::is_authorized::IsAuthorizedError::ValidationException(inner) => Error::ValidationException(inner),
596            crate::operation::is_authorized::IsAuthorizedError::Unhandled(inner) => Error::Unhandled(inner),
597        }
598    }
599}
600impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::is_authorized_with_token::IsAuthorizedWithTokenError, R>> for Error
601where
602    R: Send + Sync + std::fmt::Debug + 'static,
603{
604    fn from(
605        err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::is_authorized_with_token::IsAuthorizedWithTokenError, R>,
606    ) -> Self {
607        match err {
608            ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
609            _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
610                meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
611                source: err.into(),
612            }),
613        }
614    }
615}
616impl From<crate::operation::is_authorized_with_token::IsAuthorizedWithTokenError> for Error {
617    fn from(err: crate::operation::is_authorized_with_token::IsAuthorizedWithTokenError) -> Self {
618        match err {
619            crate::operation::is_authorized_with_token::IsAuthorizedWithTokenError::ResourceNotFoundException(inner) => {
620                Error::ResourceNotFoundException(inner)
621            }
622            crate::operation::is_authorized_with_token::IsAuthorizedWithTokenError::AccessDeniedException(inner) => {
623                Error::AccessDeniedException(inner)
624            }
625            crate::operation::is_authorized_with_token::IsAuthorizedWithTokenError::InternalServerException(inner) => {
626                Error::InternalServerException(inner)
627            }
628            crate::operation::is_authorized_with_token::IsAuthorizedWithTokenError::ThrottlingException(inner) => Error::ThrottlingException(inner),
629            crate::operation::is_authorized_with_token::IsAuthorizedWithTokenError::ValidationException(inner) => Error::ValidationException(inner),
630            crate::operation::is_authorized_with_token::IsAuthorizedWithTokenError::Unhandled(inner) => Error::Unhandled(inner),
631        }
632    }
633}
634impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::list_identity_sources::ListIdentitySourcesError, R>> for Error
635where
636    R: Send + Sync + std::fmt::Debug + 'static,
637{
638    fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::list_identity_sources::ListIdentitySourcesError, R>) -> Self {
639        match err {
640            ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
641            _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
642                meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
643                source: err.into(),
644            }),
645        }
646    }
647}
648impl From<crate::operation::list_identity_sources::ListIdentitySourcesError> for Error {
649    fn from(err: crate::operation::list_identity_sources::ListIdentitySourcesError) -> Self {
650        match err {
651            crate::operation::list_identity_sources::ListIdentitySourcesError::ResourceNotFoundException(inner) => {
652                Error::ResourceNotFoundException(inner)
653            }
654            crate::operation::list_identity_sources::ListIdentitySourcesError::AccessDeniedException(inner) => Error::AccessDeniedException(inner),
655            crate::operation::list_identity_sources::ListIdentitySourcesError::InternalServerException(inner) => {
656                Error::InternalServerException(inner)
657            }
658            crate::operation::list_identity_sources::ListIdentitySourcesError::ThrottlingException(inner) => Error::ThrottlingException(inner),
659            crate::operation::list_identity_sources::ListIdentitySourcesError::ValidationException(inner) => Error::ValidationException(inner),
660            crate::operation::list_identity_sources::ListIdentitySourcesError::Unhandled(inner) => Error::Unhandled(inner),
661        }
662    }
663}
664impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::list_policies::ListPoliciesError, R>> for Error
665where
666    R: Send + Sync + std::fmt::Debug + 'static,
667{
668    fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::list_policies::ListPoliciesError, R>) -> Self {
669        match err {
670            ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
671            _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
672                meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
673                source: err.into(),
674            }),
675        }
676    }
677}
678impl From<crate::operation::list_policies::ListPoliciesError> for Error {
679    fn from(err: crate::operation::list_policies::ListPoliciesError) -> Self {
680        match err {
681            crate::operation::list_policies::ListPoliciesError::ResourceNotFoundException(inner) => Error::ResourceNotFoundException(inner),
682            crate::operation::list_policies::ListPoliciesError::AccessDeniedException(inner) => Error::AccessDeniedException(inner),
683            crate::operation::list_policies::ListPoliciesError::InternalServerException(inner) => Error::InternalServerException(inner),
684            crate::operation::list_policies::ListPoliciesError::ThrottlingException(inner) => Error::ThrottlingException(inner),
685            crate::operation::list_policies::ListPoliciesError::ValidationException(inner) => Error::ValidationException(inner),
686            crate::operation::list_policies::ListPoliciesError::Unhandled(inner) => Error::Unhandled(inner),
687        }
688    }
689}
690impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::list_policy_stores::ListPolicyStoresError, R>> for Error
691where
692    R: Send + Sync + std::fmt::Debug + 'static,
693{
694    fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::list_policy_stores::ListPolicyStoresError, R>) -> Self {
695        match err {
696            ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
697            _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
698                meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
699                source: err.into(),
700            }),
701        }
702    }
703}
704impl From<crate::operation::list_policy_stores::ListPolicyStoresError> for Error {
705    fn from(err: crate::operation::list_policy_stores::ListPolicyStoresError) -> Self {
706        match err {
707            crate::operation::list_policy_stores::ListPolicyStoresError::AccessDeniedException(inner) => Error::AccessDeniedException(inner),
708            crate::operation::list_policy_stores::ListPolicyStoresError::InternalServerException(inner) => Error::InternalServerException(inner),
709            crate::operation::list_policy_stores::ListPolicyStoresError::ThrottlingException(inner) => Error::ThrottlingException(inner),
710            crate::operation::list_policy_stores::ListPolicyStoresError::ValidationException(inner) => Error::ValidationException(inner),
711            crate::operation::list_policy_stores::ListPolicyStoresError::Unhandled(inner) => Error::Unhandled(inner),
712        }
713    }
714}
715impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::list_policy_templates::ListPolicyTemplatesError, R>> for Error
716where
717    R: Send + Sync + std::fmt::Debug + 'static,
718{
719    fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::list_policy_templates::ListPolicyTemplatesError, R>) -> Self {
720        match err {
721            ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
722            _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
723                meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
724                source: err.into(),
725            }),
726        }
727    }
728}
729impl From<crate::operation::list_policy_templates::ListPolicyTemplatesError> for Error {
730    fn from(err: crate::operation::list_policy_templates::ListPolicyTemplatesError) -> Self {
731        match err {
732            crate::operation::list_policy_templates::ListPolicyTemplatesError::ResourceNotFoundException(inner) => {
733                Error::ResourceNotFoundException(inner)
734            }
735            crate::operation::list_policy_templates::ListPolicyTemplatesError::AccessDeniedException(inner) => Error::AccessDeniedException(inner),
736            crate::operation::list_policy_templates::ListPolicyTemplatesError::InternalServerException(inner) => {
737                Error::InternalServerException(inner)
738            }
739            crate::operation::list_policy_templates::ListPolicyTemplatesError::ThrottlingException(inner) => Error::ThrottlingException(inner),
740            crate::operation::list_policy_templates::ListPolicyTemplatesError::ValidationException(inner) => Error::ValidationException(inner),
741            crate::operation::list_policy_templates::ListPolicyTemplatesError::Unhandled(inner) => Error::Unhandled(inner),
742        }
743    }
744}
745impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::put_schema::PutSchemaError, R>> for Error
746where
747    R: Send + Sync + std::fmt::Debug + 'static,
748{
749    fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::put_schema::PutSchemaError, R>) -> Self {
750        match err {
751            ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
752            _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
753                meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
754                source: err.into(),
755            }),
756        }
757    }
758}
759impl From<crate::operation::put_schema::PutSchemaError> for Error {
760    fn from(err: crate::operation::put_schema::PutSchemaError) -> Self {
761        match err {
762            crate::operation::put_schema::PutSchemaError::ConflictException(inner) => Error::ConflictException(inner),
763            crate::operation::put_schema::PutSchemaError::ResourceNotFoundException(inner) => Error::ResourceNotFoundException(inner),
764            crate::operation::put_schema::PutSchemaError::ServiceQuotaExceededException(inner) => Error::ServiceQuotaExceededException(inner),
765            crate::operation::put_schema::PutSchemaError::AccessDeniedException(inner) => Error::AccessDeniedException(inner),
766            crate::operation::put_schema::PutSchemaError::InternalServerException(inner) => Error::InternalServerException(inner),
767            crate::operation::put_schema::PutSchemaError::ThrottlingException(inner) => Error::ThrottlingException(inner),
768            crate::operation::put_schema::PutSchemaError::ValidationException(inner) => Error::ValidationException(inner),
769            crate::operation::put_schema::PutSchemaError::Unhandled(inner) => Error::Unhandled(inner),
770        }
771    }
772}
773impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::update_identity_source::UpdateIdentitySourceError, R>> for Error
774where
775    R: Send + Sync + std::fmt::Debug + 'static,
776{
777    fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::update_identity_source::UpdateIdentitySourceError, R>) -> Self {
778        match err {
779            ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
780            _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
781                meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
782                source: err.into(),
783            }),
784        }
785    }
786}
787impl From<crate::operation::update_identity_source::UpdateIdentitySourceError> for Error {
788    fn from(err: crate::operation::update_identity_source::UpdateIdentitySourceError) -> Self {
789        match err {
790            crate::operation::update_identity_source::UpdateIdentitySourceError::ConflictException(inner) => Error::ConflictException(inner),
791            crate::operation::update_identity_source::UpdateIdentitySourceError::ResourceNotFoundException(inner) => {
792                Error::ResourceNotFoundException(inner)
793            }
794            crate::operation::update_identity_source::UpdateIdentitySourceError::AccessDeniedException(inner) => Error::AccessDeniedException(inner),
795            crate::operation::update_identity_source::UpdateIdentitySourceError::InternalServerException(inner) => {
796                Error::InternalServerException(inner)
797            }
798            crate::operation::update_identity_source::UpdateIdentitySourceError::ThrottlingException(inner) => Error::ThrottlingException(inner),
799            crate::operation::update_identity_source::UpdateIdentitySourceError::ValidationException(inner) => Error::ValidationException(inner),
800            crate::operation::update_identity_source::UpdateIdentitySourceError::Unhandled(inner) => Error::Unhandled(inner),
801        }
802    }
803}
804impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::update_policy::UpdatePolicyError, R>> for Error
805where
806    R: Send + Sync + std::fmt::Debug + 'static,
807{
808    fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::update_policy::UpdatePolicyError, R>) -> Self {
809        match err {
810            ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
811            _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
812                meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
813                source: err.into(),
814            }),
815        }
816    }
817}
818impl From<crate::operation::update_policy::UpdatePolicyError> for Error {
819    fn from(err: crate::operation::update_policy::UpdatePolicyError) -> Self {
820        match err {
821            crate::operation::update_policy::UpdatePolicyError::ConflictException(inner) => Error::ConflictException(inner),
822            crate::operation::update_policy::UpdatePolicyError::ResourceNotFoundException(inner) => Error::ResourceNotFoundException(inner),
823            crate::operation::update_policy::UpdatePolicyError::ServiceQuotaExceededException(inner) => Error::ServiceQuotaExceededException(inner),
824            crate::operation::update_policy::UpdatePolicyError::AccessDeniedException(inner) => Error::AccessDeniedException(inner),
825            crate::operation::update_policy::UpdatePolicyError::InternalServerException(inner) => Error::InternalServerException(inner),
826            crate::operation::update_policy::UpdatePolicyError::ThrottlingException(inner) => Error::ThrottlingException(inner),
827            crate::operation::update_policy::UpdatePolicyError::ValidationException(inner) => Error::ValidationException(inner),
828            crate::operation::update_policy::UpdatePolicyError::Unhandled(inner) => Error::Unhandled(inner),
829        }
830    }
831}
832impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::update_policy_store::UpdatePolicyStoreError, R>> for Error
833where
834    R: Send + Sync + std::fmt::Debug + 'static,
835{
836    fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::update_policy_store::UpdatePolicyStoreError, R>) -> Self {
837        match err {
838            ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
839            _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
840                meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
841                source: err.into(),
842            }),
843        }
844    }
845}
846impl From<crate::operation::update_policy_store::UpdatePolicyStoreError> for Error {
847    fn from(err: crate::operation::update_policy_store::UpdatePolicyStoreError) -> Self {
848        match err {
849            crate::operation::update_policy_store::UpdatePolicyStoreError::ConflictException(inner) => Error::ConflictException(inner),
850            crate::operation::update_policy_store::UpdatePolicyStoreError::ResourceNotFoundException(inner) => {
851                Error::ResourceNotFoundException(inner)
852            }
853            crate::operation::update_policy_store::UpdatePolicyStoreError::AccessDeniedException(inner) => Error::AccessDeniedException(inner),
854            crate::operation::update_policy_store::UpdatePolicyStoreError::InternalServerException(inner) => Error::InternalServerException(inner),
855            crate::operation::update_policy_store::UpdatePolicyStoreError::ThrottlingException(inner) => Error::ThrottlingException(inner),
856            crate::operation::update_policy_store::UpdatePolicyStoreError::ValidationException(inner) => Error::ValidationException(inner),
857            crate::operation::update_policy_store::UpdatePolicyStoreError::Unhandled(inner) => Error::Unhandled(inner),
858        }
859    }
860}
861impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::update_policy_template::UpdatePolicyTemplateError, R>> for Error
862where
863    R: Send + Sync + std::fmt::Debug + 'static,
864{
865    fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::update_policy_template::UpdatePolicyTemplateError, R>) -> Self {
866        match err {
867            ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
868            _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
869                meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
870                source: err.into(),
871            }),
872        }
873    }
874}
875impl From<crate::operation::update_policy_template::UpdatePolicyTemplateError> for Error {
876    fn from(err: crate::operation::update_policy_template::UpdatePolicyTemplateError) -> Self {
877        match err {
878            crate::operation::update_policy_template::UpdatePolicyTemplateError::ConflictException(inner) => Error::ConflictException(inner),
879            crate::operation::update_policy_template::UpdatePolicyTemplateError::ResourceNotFoundException(inner) => {
880                Error::ResourceNotFoundException(inner)
881            }
882            crate::operation::update_policy_template::UpdatePolicyTemplateError::AccessDeniedException(inner) => Error::AccessDeniedException(inner),
883            crate::operation::update_policy_template::UpdatePolicyTemplateError::InternalServerException(inner) => {
884                Error::InternalServerException(inner)
885            }
886            crate::operation::update_policy_template::UpdatePolicyTemplateError::ThrottlingException(inner) => Error::ThrottlingException(inner),
887            crate::operation::update_policy_template::UpdatePolicyTemplateError::ValidationException(inner) => Error::ValidationException(inner),
888            crate::operation::update_policy_template::UpdatePolicyTemplateError::Unhandled(inner) => Error::Unhandled(inner),
889        }
890    }
891}
892impl ::std::error::Error for Error {
893    fn source(&self) -> std::option::Option<&(dyn ::std::error::Error + 'static)> {
894        match self {
895            Error::AccessDeniedException(inner) => inner.source(),
896            Error::ConflictException(inner) => inner.source(),
897            Error::InternalServerException(inner) => inner.source(),
898            Error::InvalidStateException(inner) => inner.source(),
899            Error::ResourceNotFoundException(inner) => inner.source(),
900            Error::ServiceQuotaExceededException(inner) => inner.source(),
901            Error::ThrottlingException(inner) => inner.source(),
902            Error::ValidationException(inner) => inner.source(),
903            Error::Unhandled(inner) => ::std::option::Option::Some(&*inner.source),
904        }
905    }
906}
907impl ::aws_types::request_id::RequestId for Error {
908    fn request_id(&self) -> Option<&str> {
909        match self {
910            Self::AccessDeniedException(e) => e.request_id(),
911            Self::ConflictException(e) => e.request_id(),
912            Self::InternalServerException(e) => e.request_id(),
913            Self::InvalidStateException(e) => e.request_id(),
914            Self::ResourceNotFoundException(e) => e.request_id(),
915            Self::ServiceQuotaExceededException(e) => e.request_id(),
916            Self::ThrottlingException(e) => e.request_id(),
917            Self::ValidationException(e) => e.request_id(),
918            Self::Unhandled(e) => e.meta.request_id(),
919        }
920    }
921}