aws_sdk_accessanalyzer/
error_meta.rs

1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2/// All possible error types for this service.
3#[non_exhaustive]
4#[derive(::std::fmt::Debug)]
5pub enum Error {
6    /// <p>You do not have sufficient access to perform this action.</p>
7    AccessDeniedException(crate::types::error::AccessDeniedException),
8    /// <p>A conflict exception error.</p>
9    ConflictException(crate::types::error::ConflictException),
10    /// <p>Internal server error.</p>
11    InternalServerException(crate::types::error::InternalServerException),
12    /// <p>The specified parameter is invalid.</p>
13    InvalidParameterException(crate::types::error::InvalidParameterException),
14    /// <p>The specified resource could not be found.</p>
15    ResourceNotFoundException(crate::types::error::ResourceNotFoundException),
16    /// <p>Service quote met error.</p>
17    ServiceQuotaExceededException(crate::types::error::ServiceQuotaExceededException),
18    /// <p>Throttling limit exceeded error.</p>
19    ThrottlingException(crate::types::error::ThrottlingException),
20    /// <p>The specified entity could not be processed.</p>
21    UnprocessableEntityException(crate::types::error::UnprocessableEntityException),
22    /// <p>Validation exception error.</p>
23    ValidationException(crate::types::error::ValidationException),
24    /// An unexpected error occurred (e.g., invalid JSON returned by the service or an unknown error code).
25    #[deprecated(note = "Matching `Unhandled` directly is not forwards compatible. Instead, match using a \
26    variable wildcard pattern and check `.code()`:
27     \
28    &nbsp;&nbsp;&nbsp;`err if err.code() == Some(\"SpecificExceptionCode\") => { /* handle the error */ }`
29     \
30    See [`ProvideErrorMetadata`](#impl-ProvideErrorMetadata-for-Error) for what information is available for the error.")]
31    Unhandled(crate::error::sealed_unhandled::Unhandled),
32}
33impl ::std::fmt::Display for Error {
34    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
35        match self {
36            Error::AccessDeniedException(inner) => inner.fmt(f),
37            Error::ConflictException(inner) => inner.fmt(f),
38            Error::InternalServerException(inner) => inner.fmt(f),
39            Error::InvalidParameterException(inner) => inner.fmt(f),
40            Error::ResourceNotFoundException(inner) => inner.fmt(f),
41            Error::ServiceQuotaExceededException(inner) => inner.fmt(f),
42            Error::ThrottlingException(inner) => inner.fmt(f),
43            Error::UnprocessableEntityException(inner) => inner.fmt(f),
44            Error::ValidationException(inner) => inner.fmt(f),
45            Error::Unhandled(_) => {
46                if let ::std::option::Option::Some(code) = ::aws_smithy_types::error::metadata::ProvideErrorMetadata::code(self) {
47                    write!(f, "unhandled error ({code})")
48                } else {
49                    f.write_str("unhandled error")
50                }
51            }
52        }
53    }
54}
55impl From<::aws_smithy_types::error::operation::BuildError> for Error {
56    fn from(value: ::aws_smithy_types::error::operation::BuildError) -> Self {
57        Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
58            source: value.into(),
59            meta: ::std::default::Default::default(),
60        })
61    }
62}
63impl ::aws_smithy_types::error::metadata::ProvideErrorMetadata for Error {
64    fn meta(&self) -> &::aws_smithy_types::error::metadata::ErrorMetadata {
65        match self {
66            Self::AccessDeniedException(inner) => inner.meta(),
67            Self::ConflictException(inner) => inner.meta(),
68            Self::InternalServerException(inner) => inner.meta(),
69            Self::InvalidParameterException(inner) => inner.meta(),
70            Self::ResourceNotFoundException(inner) => inner.meta(),
71            Self::ServiceQuotaExceededException(inner) => inner.meta(),
72            Self::ThrottlingException(inner) => inner.meta(),
73            Self::UnprocessableEntityException(inner) => inner.meta(),
74            Self::ValidationException(inner) => inner.meta(),
75            Self::Unhandled(inner) => &inner.meta,
76        }
77    }
78}
79impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::apply_archive_rule::ApplyArchiveRuleError, R>> for Error
80where
81    R: Send + Sync + std::fmt::Debug + 'static,
82{
83    fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::apply_archive_rule::ApplyArchiveRuleError, R>) -> Self {
84        match err {
85            ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
86            _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
87                meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
88                source: err.into(),
89            }),
90        }
91    }
92}
93impl From<crate::operation::apply_archive_rule::ApplyArchiveRuleError> for Error {
94    fn from(err: crate::operation::apply_archive_rule::ApplyArchiveRuleError) -> Self {
95        match err {
96            crate::operation::apply_archive_rule::ApplyArchiveRuleError::AccessDeniedException(inner) => Error::AccessDeniedException(inner),
97            crate::operation::apply_archive_rule::ApplyArchiveRuleError::InternalServerException(inner) => Error::InternalServerException(inner),
98            crate::operation::apply_archive_rule::ApplyArchiveRuleError::ResourceNotFoundException(inner) => Error::ResourceNotFoundException(inner),
99            crate::operation::apply_archive_rule::ApplyArchiveRuleError::ThrottlingException(inner) => Error::ThrottlingException(inner),
100            crate::operation::apply_archive_rule::ApplyArchiveRuleError::ValidationException(inner) => Error::ValidationException(inner),
101            crate::operation::apply_archive_rule::ApplyArchiveRuleError::Unhandled(inner) => Error::Unhandled(inner),
102        }
103    }
104}
105impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::cancel_policy_generation::CancelPolicyGenerationError, R>> for Error
106where
107    R: Send + Sync + std::fmt::Debug + 'static,
108{
109    fn from(
110        err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::cancel_policy_generation::CancelPolicyGenerationError, R>,
111    ) -> Self {
112        match err {
113            ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
114            _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
115                meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
116                source: err.into(),
117            }),
118        }
119    }
120}
121impl From<crate::operation::cancel_policy_generation::CancelPolicyGenerationError> for Error {
122    fn from(err: crate::operation::cancel_policy_generation::CancelPolicyGenerationError) -> Self {
123        match err {
124            crate::operation::cancel_policy_generation::CancelPolicyGenerationError::AccessDeniedException(inner) => {
125                Error::AccessDeniedException(inner)
126            }
127            crate::operation::cancel_policy_generation::CancelPolicyGenerationError::InternalServerException(inner) => {
128                Error::InternalServerException(inner)
129            }
130            crate::operation::cancel_policy_generation::CancelPolicyGenerationError::ThrottlingException(inner) => Error::ThrottlingException(inner),
131            crate::operation::cancel_policy_generation::CancelPolicyGenerationError::ValidationException(inner) => Error::ValidationException(inner),
132            crate::operation::cancel_policy_generation::CancelPolicyGenerationError::Unhandled(inner) => Error::Unhandled(inner),
133        }
134    }
135}
136impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::check_access_not_granted::CheckAccessNotGrantedError, R>> for Error
137where
138    R: Send + Sync + std::fmt::Debug + 'static,
139{
140    fn from(
141        err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::check_access_not_granted::CheckAccessNotGrantedError, R>,
142    ) -> Self {
143        match err {
144            ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
145            _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
146                meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
147                source: err.into(),
148            }),
149        }
150    }
151}
152impl From<crate::operation::check_access_not_granted::CheckAccessNotGrantedError> for Error {
153    fn from(err: crate::operation::check_access_not_granted::CheckAccessNotGrantedError) -> Self {
154        match err {
155            crate::operation::check_access_not_granted::CheckAccessNotGrantedError::AccessDeniedException(inner) => {
156                Error::AccessDeniedException(inner)
157            }
158            crate::operation::check_access_not_granted::CheckAccessNotGrantedError::InternalServerException(inner) => {
159                Error::InternalServerException(inner)
160            }
161            crate::operation::check_access_not_granted::CheckAccessNotGrantedError::InvalidParameterException(inner) => {
162                Error::InvalidParameterException(inner)
163            }
164            crate::operation::check_access_not_granted::CheckAccessNotGrantedError::ThrottlingException(inner) => Error::ThrottlingException(inner),
165            crate::operation::check_access_not_granted::CheckAccessNotGrantedError::UnprocessableEntityException(inner) => {
166                Error::UnprocessableEntityException(inner)
167            }
168            crate::operation::check_access_not_granted::CheckAccessNotGrantedError::ValidationException(inner) => Error::ValidationException(inner),
169            crate::operation::check_access_not_granted::CheckAccessNotGrantedError::Unhandled(inner) => Error::Unhandled(inner),
170        }
171    }
172}
173impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::check_no_new_access::CheckNoNewAccessError, R>> for Error
174where
175    R: Send + Sync + std::fmt::Debug + 'static,
176{
177    fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::check_no_new_access::CheckNoNewAccessError, R>) -> Self {
178        match err {
179            ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
180            _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
181                meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
182                source: err.into(),
183            }),
184        }
185    }
186}
187impl From<crate::operation::check_no_new_access::CheckNoNewAccessError> for Error {
188    fn from(err: crate::operation::check_no_new_access::CheckNoNewAccessError) -> Self {
189        match err {
190            crate::operation::check_no_new_access::CheckNoNewAccessError::AccessDeniedException(inner) => Error::AccessDeniedException(inner),
191            crate::operation::check_no_new_access::CheckNoNewAccessError::InternalServerException(inner) => Error::InternalServerException(inner),
192            crate::operation::check_no_new_access::CheckNoNewAccessError::InvalidParameterException(inner) => Error::InvalidParameterException(inner),
193            crate::operation::check_no_new_access::CheckNoNewAccessError::ThrottlingException(inner) => Error::ThrottlingException(inner),
194            crate::operation::check_no_new_access::CheckNoNewAccessError::UnprocessableEntityException(inner) => {
195                Error::UnprocessableEntityException(inner)
196            }
197            crate::operation::check_no_new_access::CheckNoNewAccessError::ValidationException(inner) => Error::ValidationException(inner),
198            crate::operation::check_no_new_access::CheckNoNewAccessError::Unhandled(inner) => Error::Unhandled(inner),
199        }
200    }
201}
202impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::check_no_public_access::CheckNoPublicAccessError, R>> for Error
203where
204    R: Send + Sync + std::fmt::Debug + 'static,
205{
206    fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::check_no_public_access::CheckNoPublicAccessError, R>) -> Self {
207        match err {
208            ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
209            _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
210                meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
211                source: err.into(),
212            }),
213        }
214    }
215}
216impl From<crate::operation::check_no_public_access::CheckNoPublicAccessError> for Error {
217    fn from(err: crate::operation::check_no_public_access::CheckNoPublicAccessError) -> Self {
218        match err {
219            crate::operation::check_no_public_access::CheckNoPublicAccessError::AccessDeniedException(inner) => Error::AccessDeniedException(inner),
220            crate::operation::check_no_public_access::CheckNoPublicAccessError::InternalServerException(inner) => {
221                Error::InternalServerException(inner)
222            }
223            crate::operation::check_no_public_access::CheckNoPublicAccessError::InvalidParameterException(inner) => {
224                Error::InvalidParameterException(inner)
225            }
226            crate::operation::check_no_public_access::CheckNoPublicAccessError::ThrottlingException(inner) => Error::ThrottlingException(inner),
227            crate::operation::check_no_public_access::CheckNoPublicAccessError::UnprocessableEntityException(inner) => {
228                Error::UnprocessableEntityException(inner)
229            }
230            crate::operation::check_no_public_access::CheckNoPublicAccessError::ValidationException(inner) => Error::ValidationException(inner),
231            crate::operation::check_no_public_access::CheckNoPublicAccessError::Unhandled(inner) => Error::Unhandled(inner),
232        }
233    }
234}
235impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::create_access_preview::CreateAccessPreviewError, R>> for Error
236where
237    R: Send + Sync + std::fmt::Debug + 'static,
238{
239    fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::create_access_preview::CreateAccessPreviewError, R>) -> Self {
240        match err {
241            ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
242            _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
243                meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
244                source: err.into(),
245            }),
246        }
247    }
248}
249impl From<crate::operation::create_access_preview::CreateAccessPreviewError> for Error {
250    fn from(err: crate::operation::create_access_preview::CreateAccessPreviewError) -> Self {
251        match err {
252            crate::operation::create_access_preview::CreateAccessPreviewError::AccessDeniedException(inner) => Error::AccessDeniedException(inner),
253            crate::operation::create_access_preview::CreateAccessPreviewError::ConflictException(inner) => Error::ConflictException(inner),
254            crate::operation::create_access_preview::CreateAccessPreviewError::InternalServerException(inner) => {
255                Error::InternalServerException(inner)
256            }
257            crate::operation::create_access_preview::CreateAccessPreviewError::ResourceNotFoundException(inner) => {
258                Error::ResourceNotFoundException(inner)
259            }
260            crate::operation::create_access_preview::CreateAccessPreviewError::ServiceQuotaExceededException(inner) => {
261                Error::ServiceQuotaExceededException(inner)
262            }
263            crate::operation::create_access_preview::CreateAccessPreviewError::ThrottlingException(inner) => Error::ThrottlingException(inner),
264            crate::operation::create_access_preview::CreateAccessPreviewError::ValidationException(inner) => Error::ValidationException(inner),
265            crate::operation::create_access_preview::CreateAccessPreviewError::Unhandled(inner) => Error::Unhandled(inner),
266        }
267    }
268}
269impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::create_analyzer::CreateAnalyzerError, R>> for Error
270where
271    R: Send + Sync + std::fmt::Debug + 'static,
272{
273    fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::create_analyzer::CreateAnalyzerError, R>) -> Self {
274        match err {
275            ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
276            _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
277                meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
278                source: err.into(),
279            }),
280        }
281    }
282}
283impl From<crate::operation::create_analyzer::CreateAnalyzerError> for Error {
284    fn from(err: crate::operation::create_analyzer::CreateAnalyzerError) -> Self {
285        match err {
286            crate::operation::create_analyzer::CreateAnalyzerError::AccessDeniedException(inner) => Error::AccessDeniedException(inner),
287            crate::operation::create_analyzer::CreateAnalyzerError::ConflictException(inner) => Error::ConflictException(inner),
288            crate::operation::create_analyzer::CreateAnalyzerError::InternalServerException(inner) => Error::InternalServerException(inner),
289            crate::operation::create_analyzer::CreateAnalyzerError::ServiceQuotaExceededException(inner) => {
290                Error::ServiceQuotaExceededException(inner)
291            }
292            crate::operation::create_analyzer::CreateAnalyzerError::ThrottlingException(inner) => Error::ThrottlingException(inner),
293            crate::operation::create_analyzer::CreateAnalyzerError::ValidationException(inner) => Error::ValidationException(inner),
294            crate::operation::create_analyzer::CreateAnalyzerError::Unhandled(inner) => Error::Unhandled(inner),
295        }
296    }
297}
298impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::create_archive_rule::CreateArchiveRuleError, R>> for Error
299where
300    R: Send + Sync + std::fmt::Debug + 'static,
301{
302    fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::create_archive_rule::CreateArchiveRuleError, R>) -> Self {
303        match err {
304            ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
305            _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
306                meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
307                source: err.into(),
308            }),
309        }
310    }
311}
312impl From<crate::operation::create_archive_rule::CreateArchiveRuleError> for Error {
313    fn from(err: crate::operation::create_archive_rule::CreateArchiveRuleError) -> Self {
314        match err {
315            crate::operation::create_archive_rule::CreateArchiveRuleError::AccessDeniedException(inner) => Error::AccessDeniedException(inner),
316            crate::operation::create_archive_rule::CreateArchiveRuleError::ConflictException(inner) => Error::ConflictException(inner),
317            crate::operation::create_archive_rule::CreateArchiveRuleError::InternalServerException(inner) => Error::InternalServerException(inner),
318            crate::operation::create_archive_rule::CreateArchiveRuleError::ResourceNotFoundException(inner) => {
319                Error::ResourceNotFoundException(inner)
320            }
321            crate::operation::create_archive_rule::CreateArchiveRuleError::ServiceQuotaExceededException(inner) => {
322                Error::ServiceQuotaExceededException(inner)
323            }
324            crate::operation::create_archive_rule::CreateArchiveRuleError::ThrottlingException(inner) => Error::ThrottlingException(inner),
325            crate::operation::create_archive_rule::CreateArchiveRuleError::ValidationException(inner) => Error::ValidationException(inner),
326            crate::operation::create_archive_rule::CreateArchiveRuleError::Unhandled(inner) => Error::Unhandled(inner),
327        }
328    }
329}
330impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::delete_analyzer::DeleteAnalyzerError, R>> for Error
331where
332    R: Send + Sync + std::fmt::Debug + 'static,
333{
334    fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::delete_analyzer::DeleteAnalyzerError, R>) -> Self {
335        match err {
336            ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
337            _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
338                meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
339                source: err.into(),
340            }),
341        }
342    }
343}
344impl From<crate::operation::delete_analyzer::DeleteAnalyzerError> for Error {
345    fn from(err: crate::operation::delete_analyzer::DeleteAnalyzerError) -> Self {
346        match err {
347            crate::operation::delete_analyzer::DeleteAnalyzerError::AccessDeniedException(inner) => Error::AccessDeniedException(inner),
348            crate::operation::delete_analyzer::DeleteAnalyzerError::InternalServerException(inner) => Error::InternalServerException(inner),
349            crate::operation::delete_analyzer::DeleteAnalyzerError::ResourceNotFoundException(inner) => Error::ResourceNotFoundException(inner),
350            crate::operation::delete_analyzer::DeleteAnalyzerError::ThrottlingException(inner) => Error::ThrottlingException(inner),
351            crate::operation::delete_analyzer::DeleteAnalyzerError::ValidationException(inner) => Error::ValidationException(inner),
352            crate::operation::delete_analyzer::DeleteAnalyzerError::Unhandled(inner) => Error::Unhandled(inner),
353        }
354    }
355}
356impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::delete_archive_rule::DeleteArchiveRuleError, 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_archive_rule::DeleteArchiveRuleError, 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_archive_rule::DeleteArchiveRuleError> for Error {
371    fn from(err: crate::operation::delete_archive_rule::DeleteArchiveRuleError) -> Self {
372        match err {
373            crate::operation::delete_archive_rule::DeleteArchiveRuleError::AccessDeniedException(inner) => Error::AccessDeniedException(inner),
374            crate::operation::delete_archive_rule::DeleteArchiveRuleError::InternalServerException(inner) => Error::InternalServerException(inner),
375            crate::operation::delete_archive_rule::DeleteArchiveRuleError::ResourceNotFoundException(inner) => {
376                Error::ResourceNotFoundException(inner)
377            }
378            crate::operation::delete_archive_rule::DeleteArchiveRuleError::ThrottlingException(inner) => Error::ThrottlingException(inner),
379            crate::operation::delete_archive_rule::DeleteArchiveRuleError::ValidationException(inner) => Error::ValidationException(inner),
380            crate::operation::delete_archive_rule::DeleteArchiveRuleError::Unhandled(inner) => Error::Unhandled(inner),
381        }
382    }
383}
384impl<R>
385    From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::generate_finding_recommendation::GenerateFindingRecommendationError, R>>
386    for Error
387where
388    R: Send + Sync + std::fmt::Debug + 'static,
389{
390    fn from(
391        err: ::aws_smithy_runtime_api::client::result::SdkError<
392            crate::operation::generate_finding_recommendation::GenerateFindingRecommendationError,
393            R,
394        >,
395    ) -> Self {
396        match err {
397            ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
398            _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
399                meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
400                source: err.into(),
401            }),
402        }
403    }
404}
405impl From<crate::operation::generate_finding_recommendation::GenerateFindingRecommendationError> for Error {
406    fn from(err: crate::operation::generate_finding_recommendation::GenerateFindingRecommendationError) -> Self {
407        match err {
408            crate::operation::generate_finding_recommendation::GenerateFindingRecommendationError::AccessDeniedException(inner) => {
409                Error::AccessDeniedException(inner)
410            }
411            crate::operation::generate_finding_recommendation::GenerateFindingRecommendationError::InternalServerException(inner) => {
412                Error::InternalServerException(inner)
413            }
414            crate::operation::generate_finding_recommendation::GenerateFindingRecommendationError::ThrottlingException(inner) => {
415                Error::ThrottlingException(inner)
416            }
417            crate::operation::generate_finding_recommendation::GenerateFindingRecommendationError::ValidationException(inner) => {
418                Error::ValidationException(inner)
419            }
420            crate::operation::generate_finding_recommendation::GenerateFindingRecommendationError::Unhandled(inner) => Error::Unhandled(inner),
421        }
422    }
423}
424impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::get_access_preview::GetAccessPreviewError, R>> for Error
425where
426    R: Send + Sync + std::fmt::Debug + 'static,
427{
428    fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::get_access_preview::GetAccessPreviewError, R>) -> Self {
429        match err {
430            ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
431            _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
432                meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
433                source: err.into(),
434            }),
435        }
436    }
437}
438impl From<crate::operation::get_access_preview::GetAccessPreviewError> for Error {
439    fn from(err: crate::operation::get_access_preview::GetAccessPreviewError) -> Self {
440        match err {
441            crate::operation::get_access_preview::GetAccessPreviewError::AccessDeniedException(inner) => Error::AccessDeniedException(inner),
442            crate::operation::get_access_preview::GetAccessPreviewError::InternalServerException(inner) => Error::InternalServerException(inner),
443            crate::operation::get_access_preview::GetAccessPreviewError::ResourceNotFoundException(inner) => Error::ResourceNotFoundException(inner),
444            crate::operation::get_access_preview::GetAccessPreviewError::ThrottlingException(inner) => Error::ThrottlingException(inner),
445            crate::operation::get_access_preview::GetAccessPreviewError::ValidationException(inner) => Error::ValidationException(inner),
446            crate::operation::get_access_preview::GetAccessPreviewError::Unhandled(inner) => Error::Unhandled(inner),
447        }
448    }
449}
450impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::get_analyzed_resource::GetAnalyzedResourceError, R>> for Error
451where
452    R: Send + Sync + std::fmt::Debug + 'static,
453{
454    fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::get_analyzed_resource::GetAnalyzedResourceError, R>) -> Self {
455        match err {
456            ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
457            _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
458                meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
459                source: err.into(),
460            }),
461        }
462    }
463}
464impl From<crate::operation::get_analyzed_resource::GetAnalyzedResourceError> for Error {
465    fn from(err: crate::operation::get_analyzed_resource::GetAnalyzedResourceError) -> Self {
466        match err {
467            crate::operation::get_analyzed_resource::GetAnalyzedResourceError::AccessDeniedException(inner) => Error::AccessDeniedException(inner),
468            crate::operation::get_analyzed_resource::GetAnalyzedResourceError::InternalServerException(inner) => {
469                Error::InternalServerException(inner)
470            }
471            crate::operation::get_analyzed_resource::GetAnalyzedResourceError::ResourceNotFoundException(inner) => {
472                Error::ResourceNotFoundException(inner)
473            }
474            crate::operation::get_analyzed_resource::GetAnalyzedResourceError::ThrottlingException(inner) => Error::ThrottlingException(inner),
475            crate::operation::get_analyzed_resource::GetAnalyzedResourceError::ValidationException(inner) => Error::ValidationException(inner),
476            crate::operation::get_analyzed_resource::GetAnalyzedResourceError::Unhandled(inner) => Error::Unhandled(inner),
477        }
478    }
479}
480impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::get_analyzer::GetAnalyzerError, R>> for Error
481where
482    R: Send + Sync + std::fmt::Debug + 'static,
483{
484    fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::get_analyzer::GetAnalyzerError, R>) -> Self {
485        match err {
486            ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
487            _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
488                meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
489                source: err.into(),
490            }),
491        }
492    }
493}
494impl From<crate::operation::get_analyzer::GetAnalyzerError> for Error {
495    fn from(err: crate::operation::get_analyzer::GetAnalyzerError) -> Self {
496        match err {
497            crate::operation::get_analyzer::GetAnalyzerError::AccessDeniedException(inner) => Error::AccessDeniedException(inner),
498            crate::operation::get_analyzer::GetAnalyzerError::InternalServerException(inner) => Error::InternalServerException(inner),
499            crate::operation::get_analyzer::GetAnalyzerError::ResourceNotFoundException(inner) => Error::ResourceNotFoundException(inner),
500            crate::operation::get_analyzer::GetAnalyzerError::ThrottlingException(inner) => Error::ThrottlingException(inner),
501            crate::operation::get_analyzer::GetAnalyzerError::ValidationException(inner) => Error::ValidationException(inner),
502            crate::operation::get_analyzer::GetAnalyzerError::Unhandled(inner) => Error::Unhandled(inner),
503        }
504    }
505}
506impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::get_archive_rule::GetArchiveRuleError, R>> for Error
507where
508    R: Send + Sync + std::fmt::Debug + 'static,
509{
510    fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::get_archive_rule::GetArchiveRuleError, R>) -> Self {
511        match err {
512            ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
513            _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
514                meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
515                source: err.into(),
516            }),
517        }
518    }
519}
520impl From<crate::operation::get_archive_rule::GetArchiveRuleError> for Error {
521    fn from(err: crate::operation::get_archive_rule::GetArchiveRuleError) -> Self {
522        match err {
523            crate::operation::get_archive_rule::GetArchiveRuleError::AccessDeniedException(inner) => Error::AccessDeniedException(inner),
524            crate::operation::get_archive_rule::GetArchiveRuleError::InternalServerException(inner) => Error::InternalServerException(inner),
525            crate::operation::get_archive_rule::GetArchiveRuleError::ResourceNotFoundException(inner) => Error::ResourceNotFoundException(inner),
526            crate::operation::get_archive_rule::GetArchiveRuleError::ThrottlingException(inner) => Error::ThrottlingException(inner),
527            crate::operation::get_archive_rule::GetArchiveRuleError::ValidationException(inner) => Error::ValidationException(inner),
528            crate::operation::get_archive_rule::GetArchiveRuleError::Unhandled(inner) => Error::Unhandled(inner),
529        }
530    }
531}
532impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::get_finding::GetFindingError, R>> for Error
533where
534    R: Send + Sync + std::fmt::Debug + 'static,
535{
536    fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::get_finding::GetFindingError, R>) -> Self {
537        match err {
538            ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
539            _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
540                meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
541                source: err.into(),
542            }),
543        }
544    }
545}
546impl From<crate::operation::get_finding::GetFindingError> for Error {
547    fn from(err: crate::operation::get_finding::GetFindingError) -> Self {
548        match err {
549            crate::operation::get_finding::GetFindingError::AccessDeniedException(inner) => Error::AccessDeniedException(inner),
550            crate::operation::get_finding::GetFindingError::InternalServerException(inner) => Error::InternalServerException(inner),
551            crate::operation::get_finding::GetFindingError::ResourceNotFoundException(inner) => Error::ResourceNotFoundException(inner),
552            crate::operation::get_finding::GetFindingError::ThrottlingException(inner) => Error::ThrottlingException(inner),
553            crate::operation::get_finding::GetFindingError::ValidationException(inner) => Error::ValidationException(inner),
554            crate::operation::get_finding::GetFindingError::Unhandled(inner) => Error::Unhandled(inner),
555        }
556    }
557}
558impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::get_finding_recommendation::GetFindingRecommendationError, R>>
559    for Error
560where
561    R: Send + Sync + std::fmt::Debug + 'static,
562{
563    fn from(
564        err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::get_finding_recommendation::GetFindingRecommendationError, R>,
565    ) -> Self {
566        match err {
567            ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
568            _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
569                meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
570                source: err.into(),
571            }),
572        }
573    }
574}
575impl From<crate::operation::get_finding_recommendation::GetFindingRecommendationError> for Error {
576    fn from(err: crate::operation::get_finding_recommendation::GetFindingRecommendationError) -> Self {
577        match err {
578            crate::operation::get_finding_recommendation::GetFindingRecommendationError::AccessDeniedException(inner) => {
579                Error::AccessDeniedException(inner)
580            }
581            crate::operation::get_finding_recommendation::GetFindingRecommendationError::InternalServerException(inner) => {
582                Error::InternalServerException(inner)
583            }
584            crate::operation::get_finding_recommendation::GetFindingRecommendationError::ResourceNotFoundException(inner) => {
585                Error::ResourceNotFoundException(inner)
586            }
587            crate::operation::get_finding_recommendation::GetFindingRecommendationError::ThrottlingException(inner) => {
588                Error::ThrottlingException(inner)
589            }
590            crate::operation::get_finding_recommendation::GetFindingRecommendationError::ValidationException(inner) => {
591                Error::ValidationException(inner)
592            }
593            crate::operation::get_finding_recommendation::GetFindingRecommendationError::Unhandled(inner) => Error::Unhandled(inner),
594        }
595    }
596}
597impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::get_findings_statistics::GetFindingsStatisticsError, R>> for Error
598where
599    R: Send + Sync + std::fmt::Debug + 'static,
600{
601    fn from(
602        err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::get_findings_statistics::GetFindingsStatisticsError, R>,
603    ) -> Self {
604        match err {
605            ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
606            _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
607                meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
608                source: err.into(),
609            }),
610        }
611    }
612}
613impl From<crate::operation::get_findings_statistics::GetFindingsStatisticsError> for Error {
614    fn from(err: crate::operation::get_findings_statistics::GetFindingsStatisticsError) -> Self {
615        match err {
616            crate::operation::get_findings_statistics::GetFindingsStatisticsError::AccessDeniedException(inner) => {
617                Error::AccessDeniedException(inner)
618            }
619            crate::operation::get_findings_statistics::GetFindingsStatisticsError::InternalServerException(inner) => {
620                Error::InternalServerException(inner)
621            }
622            crate::operation::get_findings_statistics::GetFindingsStatisticsError::ResourceNotFoundException(inner) => {
623                Error::ResourceNotFoundException(inner)
624            }
625            crate::operation::get_findings_statistics::GetFindingsStatisticsError::ThrottlingException(inner) => Error::ThrottlingException(inner),
626            crate::operation::get_findings_statistics::GetFindingsStatisticsError::ValidationException(inner) => Error::ValidationException(inner),
627            crate::operation::get_findings_statistics::GetFindingsStatisticsError::Unhandled(inner) => Error::Unhandled(inner),
628        }
629    }
630}
631impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::get_finding_v2::GetFindingV2Error, R>> for Error
632where
633    R: Send + Sync + std::fmt::Debug + 'static,
634{
635    fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::get_finding_v2::GetFindingV2Error, R>) -> Self {
636        match err {
637            ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
638            _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
639                meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
640                source: err.into(),
641            }),
642        }
643    }
644}
645impl From<crate::operation::get_finding_v2::GetFindingV2Error> for Error {
646    fn from(err: crate::operation::get_finding_v2::GetFindingV2Error) -> Self {
647        match err {
648            crate::operation::get_finding_v2::GetFindingV2Error::AccessDeniedException(inner) => Error::AccessDeniedException(inner),
649            crate::operation::get_finding_v2::GetFindingV2Error::InternalServerException(inner) => Error::InternalServerException(inner),
650            crate::operation::get_finding_v2::GetFindingV2Error::ResourceNotFoundException(inner) => Error::ResourceNotFoundException(inner),
651            crate::operation::get_finding_v2::GetFindingV2Error::ThrottlingException(inner) => Error::ThrottlingException(inner),
652            crate::operation::get_finding_v2::GetFindingV2Error::ValidationException(inner) => Error::ValidationException(inner),
653            crate::operation::get_finding_v2::GetFindingV2Error::Unhandled(inner) => Error::Unhandled(inner),
654        }
655    }
656}
657impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::get_generated_policy::GetGeneratedPolicyError, R>> for Error
658where
659    R: Send + Sync + std::fmt::Debug + 'static,
660{
661    fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::get_generated_policy::GetGeneratedPolicyError, R>) -> Self {
662        match err {
663            ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
664            _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
665                meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
666                source: err.into(),
667            }),
668        }
669    }
670}
671impl From<crate::operation::get_generated_policy::GetGeneratedPolicyError> for Error {
672    fn from(err: crate::operation::get_generated_policy::GetGeneratedPolicyError) -> Self {
673        match err {
674            crate::operation::get_generated_policy::GetGeneratedPolicyError::AccessDeniedException(inner) => Error::AccessDeniedException(inner),
675            crate::operation::get_generated_policy::GetGeneratedPolicyError::InternalServerException(inner) => Error::InternalServerException(inner),
676            crate::operation::get_generated_policy::GetGeneratedPolicyError::ThrottlingException(inner) => Error::ThrottlingException(inner),
677            crate::operation::get_generated_policy::GetGeneratedPolicyError::ValidationException(inner) => Error::ValidationException(inner),
678            crate::operation::get_generated_policy::GetGeneratedPolicyError::Unhandled(inner) => Error::Unhandled(inner),
679        }
680    }
681}
682impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::list_access_preview_findings::ListAccessPreviewFindingsError, R>>
683    for Error
684where
685    R: Send + Sync + std::fmt::Debug + 'static,
686{
687    fn from(
688        err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::list_access_preview_findings::ListAccessPreviewFindingsError, R>,
689    ) -> Self {
690        match err {
691            ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
692            _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
693                meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
694                source: err.into(),
695            }),
696        }
697    }
698}
699impl From<crate::operation::list_access_preview_findings::ListAccessPreviewFindingsError> for Error {
700    fn from(err: crate::operation::list_access_preview_findings::ListAccessPreviewFindingsError) -> Self {
701        match err {
702            crate::operation::list_access_preview_findings::ListAccessPreviewFindingsError::AccessDeniedException(inner) => {
703                Error::AccessDeniedException(inner)
704            }
705            crate::operation::list_access_preview_findings::ListAccessPreviewFindingsError::ConflictException(inner) => {
706                Error::ConflictException(inner)
707            }
708            crate::operation::list_access_preview_findings::ListAccessPreviewFindingsError::InternalServerException(inner) => {
709                Error::InternalServerException(inner)
710            }
711            crate::operation::list_access_preview_findings::ListAccessPreviewFindingsError::ResourceNotFoundException(inner) => {
712                Error::ResourceNotFoundException(inner)
713            }
714            crate::operation::list_access_preview_findings::ListAccessPreviewFindingsError::ThrottlingException(inner) => {
715                Error::ThrottlingException(inner)
716            }
717            crate::operation::list_access_preview_findings::ListAccessPreviewFindingsError::ValidationException(inner) => {
718                Error::ValidationException(inner)
719            }
720            crate::operation::list_access_preview_findings::ListAccessPreviewFindingsError::Unhandled(inner) => Error::Unhandled(inner),
721        }
722    }
723}
724impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::list_access_previews::ListAccessPreviewsError, R>> for Error
725where
726    R: Send + Sync + std::fmt::Debug + 'static,
727{
728    fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::list_access_previews::ListAccessPreviewsError, R>) -> Self {
729        match err {
730            ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
731            _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
732                meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
733                source: err.into(),
734            }),
735        }
736    }
737}
738impl From<crate::operation::list_access_previews::ListAccessPreviewsError> for Error {
739    fn from(err: crate::operation::list_access_previews::ListAccessPreviewsError) -> Self {
740        match err {
741            crate::operation::list_access_previews::ListAccessPreviewsError::AccessDeniedException(inner) => Error::AccessDeniedException(inner),
742            crate::operation::list_access_previews::ListAccessPreviewsError::InternalServerException(inner) => Error::InternalServerException(inner),
743            crate::operation::list_access_previews::ListAccessPreviewsError::ResourceNotFoundException(inner) => {
744                Error::ResourceNotFoundException(inner)
745            }
746            crate::operation::list_access_previews::ListAccessPreviewsError::ThrottlingException(inner) => Error::ThrottlingException(inner),
747            crate::operation::list_access_previews::ListAccessPreviewsError::ValidationException(inner) => Error::ValidationException(inner),
748            crate::operation::list_access_previews::ListAccessPreviewsError::Unhandled(inner) => Error::Unhandled(inner),
749        }
750    }
751}
752impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::list_analyzed_resources::ListAnalyzedResourcesError, R>> for Error
753where
754    R: Send + Sync + std::fmt::Debug + 'static,
755{
756    fn from(
757        err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::list_analyzed_resources::ListAnalyzedResourcesError, R>,
758    ) -> Self {
759        match err {
760            ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
761            _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
762                meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
763                source: err.into(),
764            }),
765        }
766    }
767}
768impl From<crate::operation::list_analyzed_resources::ListAnalyzedResourcesError> for Error {
769    fn from(err: crate::operation::list_analyzed_resources::ListAnalyzedResourcesError) -> Self {
770        match err {
771            crate::operation::list_analyzed_resources::ListAnalyzedResourcesError::AccessDeniedException(inner) => {
772                Error::AccessDeniedException(inner)
773            }
774            crate::operation::list_analyzed_resources::ListAnalyzedResourcesError::InternalServerException(inner) => {
775                Error::InternalServerException(inner)
776            }
777            crate::operation::list_analyzed_resources::ListAnalyzedResourcesError::ResourceNotFoundException(inner) => {
778                Error::ResourceNotFoundException(inner)
779            }
780            crate::operation::list_analyzed_resources::ListAnalyzedResourcesError::ThrottlingException(inner) => Error::ThrottlingException(inner),
781            crate::operation::list_analyzed_resources::ListAnalyzedResourcesError::ValidationException(inner) => Error::ValidationException(inner),
782            crate::operation::list_analyzed_resources::ListAnalyzedResourcesError::Unhandled(inner) => Error::Unhandled(inner),
783        }
784    }
785}
786impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::list_analyzers::ListAnalyzersError, R>> for Error
787where
788    R: Send + Sync + std::fmt::Debug + 'static,
789{
790    fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::list_analyzers::ListAnalyzersError, R>) -> Self {
791        match err {
792            ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
793            _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
794                meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
795                source: err.into(),
796            }),
797        }
798    }
799}
800impl From<crate::operation::list_analyzers::ListAnalyzersError> for Error {
801    fn from(err: crate::operation::list_analyzers::ListAnalyzersError) -> Self {
802        match err {
803            crate::operation::list_analyzers::ListAnalyzersError::AccessDeniedException(inner) => Error::AccessDeniedException(inner),
804            crate::operation::list_analyzers::ListAnalyzersError::InternalServerException(inner) => Error::InternalServerException(inner),
805            crate::operation::list_analyzers::ListAnalyzersError::ThrottlingException(inner) => Error::ThrottlingException(inner),
806            crate::operation::list_analyzers::ListAnalyzersError::ValidationException(inner) => Error::ValidationException(inner),
807            crate::operation::list_analyzers::ListAnalyzersError::Unhandled(inner) => Error::Unhandled(inner),
808        }
809    }
810}
811impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::list_archive_rules::ListArchiveRulesError, R>> for Error
812where
813    R: Send + Sync + std::fmt::Debug + 'static,
814{
815    fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::list_archive_rules::ListArchiveRulesError, R>) -> Self {
816        match err {
817            ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
818            _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
819                meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
820                source: err.into(),
821            }),
822        }
823    }
824}
825impl From<crate::operation::list_archive_rules::ListArchiveRulesError> for Error {
826    fn from(err: crate::operation::list_archive_rules::ListArchiveRulesError) -> Self {
827        match err {
828            crate::operation::list_archive_rules::ListArchiveRulesError::AccessDeniedException(inner) => Error::AccessDeniedException(inner),
829            crate::operation::list_archive_rules::ListArchiveRulesError::InternalServerException(inner) => Error::InternalServerException(inner),
830            crate::operation::list_archive_rules::ListArchiveRulesError::ThrottlingException(inner) => Error::ThrottlingException(inner),
831            crate::operation::list_archive_rules::ListArchiveRulesError::ValidationException(inner) => Error::ValidationException(inner),
832            crate::operation::list_archive_rules::ListArchiveRulesError::Unhandled(inner) => Error::Unhandled(inner),
833        }
834    }
835}
836impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::list_findings::ListFindingsError, R>> for Error
837where
838    R: Send + Sync + std::fmt::Debug + 'static,
839{
840    fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::list_findings::ListFindingsError, R>) -> Self {
841        match err {
842            ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
843            _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
844                meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
845                source: err.into(),
846            }),
847        }
848    }
849}
850impl From<crate::operation::list_findings::ListFindingsError> for Error {
851    fn from(err: crate::operation::list_findings::ListFindingsError) -> Self {
852        match err {
853            crate::operation::list_findings::ListFindingsError::AccessDeniedException(inner) => Error::AccessDeniedException(inner),
854            crate::operation::list_findings::ListFindingsError::InternalServerException(inner) => Error::InternalServerException(inner),
855            crate::operation::list_findings::ListFindingsError::ResourceNotFoundException(inner) => Error::ResourceNotFoundException(inner),
856            crate::operation::list_findings::ListFindingsError::ThrottlingException(inner) => Error::ThrottlingException(inner),
857            crate::operation::list_findings::ListFindingsError::ValidationException(inner) => Error::ValidationException(inner),
858            crate::operation::list_findings::ListFindingsError::Unhandled(inner) => Error::Unhandled(inner),
859        }
860    }
861}
862impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::list_findings_v2::ListFindingsV2Error, R>> for Error
863where
864    R: Send + Sync + std::fmt::Debug + 'static,
865{
866    fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::list_findings_v2::ListFindingsV2Error, R>) -> Self {
867        match err {
868            ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
869            _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
870                meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
871                source: err.into(),
872            }),
873        }
874    }
875}
876impl From<crate::operation::list_findings_v2::ListFindingsV2Error> for Error {
877    fn from(err: crate::operation::list_findings_v2::ListFindingsV2Error) -> Self {
878        match err {
879            crate::operation::list_findings_v2::ListFindingsV2Error::AccessDeniedException(inner) => Error::AccessDeniedException(inner),
880            crate::operation::list_findings_v2::ListFindingsV2Error::InternalServerException(inner) => Error::InternalServerException(inner),
881            crate::operation::list_findings_v2::ListFindingsV2Error::ResourceNotFoundException(inner) => Error::ResourceNotFoundException(inner),
882            crate::operation::list_findings_v2::ListFindingsV2Error::ThrottlingException(inner) => Error::ThrottlingException(inner),
883            crate::operation::list_findings_v2::ListFindingsV2Error::ValidationException(inner) => Error::ValidationException(inner),
884            crate::operation::list_findings_v2::ListFindingsV2Error::Unhandled(inner) => Error::Unhandled(inner),
885        }
886    }
887}
888impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::list_policy_generations::ListPolicyGenerationsError, R>> for Error
889where
890    R: Send + Sync + std::fmt::Debug + 'static,
891{
892    fn from(
893        err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::list_policy_generations::ListPolicyGenerationsError, R>,
894    ) -> Self {
895        match err {
896            ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
897            _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
898                meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
899                source: err.into(),
900            }),
901        }
902    }
903}
904impl From<crate::operation::list_policy_generations::ListPolicyGenerationsError> for Error {
905    fn from(err: crate::operation::list_policy_generations::ListPolicyGenerationsError) -> Self {
906        match err {
907            crate::operation::list_policy_generations::ListPolicyGenerationsError::AccessDeniedException(inner) => {
908                Error::AccessDeniedException(inner)
909            }
910            crate::operation::list_policy_generations::ListPolicyGenerationsError::InternalServerException(inner) => {
911                Error::InternalServerException(inner)
912            }
913            crate::operation::list_policy_generations::ListPolicyGenerationsError::ThrottlingException(inner) => Error::ThrottlingException(inner),
914            crate::operation::list_policy_generations::ListPolicyGenerationsError::ValidationException(inner) => Error::ValidationException(inner),
915            crate::operation::list_policy_generations::ListPolicyGenerationsError::Unhandled(inner) => Error::Unhandled(inner),
916        }
917    }
918}
919impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::list_tags_for_resource::ListTagsForResourceError, R>> for Error
920where
921    R: Send + Sync + std::fmt::Debug + 'static,
922{
923    fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::list_tags_for_resource::ListTagsForResourceError, R>) -> Self {
924        match err {
925            ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
926            _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
927                meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
928                source: err.into(),
929            }),
930        }
931    }
932}
933impl From<crate::operation::list_tags_for_resource::ListTagsForResourceError> for Error {
934    fn from(err: crate::operation::list_tags_for_resource::ListTagsForResourceError) -> Self {
935        match err {
936            crate::operation::list_tags_for_resource::ListTagsForResourceError::AccessDeniedException(inner) => Error::AccessDeniedException(inner),
937            crate::operation::list_tags_for_resource::ListTagsForResourceError::InternalServerException(inner) => {
938                Error::InternalServerException(inner)
939            }
940            crate::operation::list_tags_for_resource::ListTagsForResourceError::ResourceNotFoundException(inner) => {
941                Error::ResourceNotFoundException(inner)
942            }
943            crate::operation::list_tags_for_resource::ListTagsForResourceError::ThrottlingException(inner) => Error::ThrottlingException(inner),
944            crate::operation::list_tags_for_resource::ListTagsForResourceError::ValidationException(inner) => Error::ValidationException(inner),
945            crate::operation::list_tags_for_resource::ListTagsForResourceError::Unhandled(inner) => Error::Unhandled(inner),
946        }
947    }
948}
949impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::start_policy_generation::StartPolicyGenerationError, R>> for Error
950where
951    R: Send + Sync + std::fmt::Debug + 'static,
952{
953    fn from(
954        err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::start_policy_generation::StartPolicyGenerationError, R>,
955    ) -> Self {
956        match err {
957            ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
958            _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
959                meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
960                source: err.into(),
961            }),
962        }
963    }
964}
965impl From<crate::operation::start_policy_generation::StartPolicyGenerationError> for Error {
966    fn from(err: crate::operation::start_policy_generation::StartPolicyGenerationError) -> Self {
967        match err {
968            crate::operation::start_policy_generation::StartPolicyGenerationError::AccessDeniedException(inner) => {
969                Error::AccessDeniedException(inner)
970            }
971            crate::operation::start_policy_generation::StartPolicyGenerationError::ConflictException(inner) => Error::ConflictException(inner),
972            crate::operation::start_policy_generation::StartPolicyGenerationError::InternalServerException(inner) => {
973                Error::InternalServerException(inner)
974            }
975            crate::operation::start_policy_generation::StartPolicyGenerationError::ServiceQuotaExceededException(inner) => {
976                Error::ServiceQuotaExceededException(inner)
977            }
978            crate::operation::start_policy_generation::StartPolicyGenerationError::ThrottlingException(inner) => Error::ThrottlingException(inner),
979            crate::operation::start_policy_generation::StartPolicyGenerationError::ValidationException(inner) => Error::ValidationException(inner),
980            crate::operation::start_policy_generation::StartPolicyGenerationError::Unhandled(inner) => Error::Unhandled(inner),
981        }
982    }
983}
984impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::start_resource_scan::StartResourceScanError, R>> for Error
985where
986    R: Send + Sync + std::fmt::Debug + 'static,
987{
988    fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::start_resource_scan::StartResourceScanError, R>) -> Self {
989        match err {
990            ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
991            _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
992                meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
993                source: err.into(),
994            }),
995        }
996    }
997}
998impl From<crate::operation::start_resource_scan::StartResourceScanError> for Error {
999    fn from(err: crate::operation::start_resource_scan::StartResourceScanError) -> Self {
1000        match err {
1001            crate::operation::start_resource_scan::StartResourceScanError::AccessDeniedException(inner) => Error::AccessDeniedException(inner),
1002            crate::operation::start_resource_scan::StartResourceScanError::InternalServerException(inner) => Error::InternalServerException(inner),
1003            crate::operation::start_resource_scan::StartResourceScanError::ResourceNotFoundException(inner) => {
1004                Error::ResourceNotFoundException(inner)
1005            }
1006            crate::operation::start_resource_scan::StartResourceScanError::ThrottlingException(inner) => Error::ThrottlingException(inner),
1007            crate::operation::start_resource_scan::StartResourceScanError::ValidationException(inner) => Error::ValidationException(inner),
1008            crate::operation::start_resource_scan::StartResourceScanError::Unhandled(inner) => Error::Unhandled(inner),
1009        }
1010    }
1011}
1012impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::tag_resource::TagResourceError, R>> for Error
1013where
1014    R: Send + Sync + std::fmt::Debug + 'static,
1015{
1016    fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::tag_resource::TagResourceError, R>) -> Self {
1017        match err {
1018            ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
1019            _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
1020                meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
1021                source: err.into(),
1022            }),
1023        }
1024    }
1025}
1026impl From<crate::operation::tag_resource::TagResourceError> for Error {
1027    fn from(err: crate::operation::tag_resource::TagResourceError) -> Self {
1028        match err {
1029            crate::operation::tag_resource::TagResourceError::AccessDeniedException(inner) => Error::AccessDeniedException(inner),
1030            crate::operation::tag_resource::TagResourceError::InternalServerException(inner) => Error::InternalServerException(inner),
1031            crate::operation::tag_resource::TagResourceError::ResourceNotFoundException(inner) => Error::ResourceNotFoundException(inner),
1032            crate::operation::tag_resource::TagResourceError::ThrottlingException(inner) => Error::ThrottlingException(inner),
1033            crate::operation::tag_resource::TagResourceError::ValidationException(inner) => Error::ValidationException(inner),
1034            crate::operation::tag_resource::TagResourceError::Unhandled(inner) => Error::Unhandled(inner),
1035        }
1036    }
1037}
1038impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::untag_resource::UntagResourceError, R>> for Error
1039where
1040    R: Send + Sync + std::fmt::Debug + 'static,
1041{
1042    fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::untag_resource::UntagResourceError, R>) -> Self {
1043        match err {
1044            ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
1045            _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
1046                meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
1047                source: err.into(),
1048            }),
1049        }
1050    }
1051}
1052impl From<crate::operation::untag_resource::UntagResourceError> for Error {
1053    fn from(err: crate::operation::untag_resource::UntagResourceError) -> Self {
1054        match err {
1055            crate::operation::untag_resource::UntagResourceError::AccessDeniedException(inner) => Error::AccessDeniedException(inner),
1056            crate::operation::untag_resource::UntagResourceError::InternalServerException(inner) => Error::InternalServerException(inner),
1057            crate::operation::untag_resource::UntagResourceError::ResourceNotFoundException(inner) => Error::ResourceNotFoundException(inner),
1058            crate::operation::untag_resource::UntagResourceError::ThrottlingException(inner) => Error::ThrottlingException(inner),
1059            crate::operation::untag_resource::UntagResourceError::ValidationException(inner) => Error::ValidationException(inner),
1060            crate::operation::untag_resource::UntagResourceError::Unhandled(inner) => Error::Unhandled(inner),
1061        }
1062    }
1063}
1064impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::update_analyzer::UpdateAnalyzerError, R>> for Error
1065where
1066    R: Send + Sync + std::fmt::Debug + 'static,
1067{
1068    fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::update_analyzer::UpdateAnalyzerError, R>) -> Self {
1069        match err {
1070            ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
1071            _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
1072                meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
1073                source: err.into(),
1074            }),
1075        }
1076    }
1077}
1078impl From<crate::operation::update_analyzer::UpdateAnalyzerError> for Error {
1079    fn from(err: crate::operation::update_analyzer::UpdateAnalyzerError) -> Self {
1080        match err {
1081            crate::operation::update_analyzer::UpdateAnalyzerError::AccessDeniedException(inner) => Error::AccessDeniedException(inner),
1082            crate::operation::update_analyzer::UpdateAnalyzerError::ConflictException(inner) => Error::ConflictException(inner),
1083            crate::operation::update_analyzer::UpdateAnalyzerError::InternalServerException(inner) => Error::InternalServerException(inner),
1084            crate::operation::update_analyzer::UpdateAnalyzerError::ResourceNotFoundException(inner) => Error::ResourceNotFoundException(inner),
1085            crate::operation::update_analyzer::UpdateAnalyzerError::ThrottlingException(inner) => Error::ThrottlingException(inner),
1086            crate::operation::update_analyzer::UpdateAnalyzerError::ValidationException(inner) => Error::ValidationException(inner),
1087            crate::operation::update_analyzer::UpdateAnalyzerError::Unhandled(inner) => Error::Unhandled(inner),
1088        }
1089    }
1090}
1091impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::update_archive_rule::UpdateArchiveRuleError, R>> for Error
1092where
1093    R: Send + Sync + std::fmt::Debug + 'static,
1094{
1095    fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::update_archive_rule::UpdateArchiveRuleError, R>) -> Self {
1096        match err {
1097            ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
1098            _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
1099                meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
1100                source: err.into(),
1101            }),
1102        }
1103    }
1104}
1105impl From<crate::operation::update_archive_rule::UpdateArchiveRuleError> for Error {
1106    fn from(err: crate::operation::update_archive_rule::UpdateArchiveRuleError) -> Self {
1107        match err {
1108            crate::operation::update_archive_rule::UpdateArchiveRuleError::AccessDeniedException(inner) => Error::AccessDeniedException(inner),
1109            crate::operation::update_archive_rule::UpdateArchiveRuleError::InternalServerException(inner) => Error::InternalServerException(inner),
1110            crate::operation::update_archive_rule::UpdateArchiveRuleError::ResourceNotFoundException(inner) => {
1111                Error::ResourceNotFoundException(inner)
1112            }
1113            crate::operation::update_archive_rule::UpdateArchiveRuleError::ThrottlingException(inner) => Error::ThrottlingException(inner),
1114            crate::operation::update_archive_rule::UpdateArchiveRuleError::ValidationException(inner) => Error::ValidationException(inner),
1115            crate::operation::update_archive_rule::UpdateArchiveRuleError::Unhandled(inner) => Error::Unhandled(inner),
1116        }
1117    }
1118}
1119impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::update_findings::UpdateFindingsError, R>> for Error
1120where
1121    R: Send + Sync + std::fmt::Debug + 'static,
1122{
1123    fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::update_findings::UpdateFindingsError, R>) -> Self {
1124        match err {
1125            ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
1126            _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
1127                meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
1128                source: err.into(),
1129            }),
1130        }
1131    }
1132}
1133impl From<crate::operation::update_findings::UpdateFindingsError> for Error {
1134    fn from(err: crate::operation::update_findings::UpdateFindingsError) -> Self {
1135        match err {
1136            crate::operation::update_findings::UpdateFindingsError::AccessDeniedException(inner) => Error::AccessDeniedException(inner),
1137            crate::operation::update_findings::UpdateFindingsError::InternalServerException(inner) => Error::InternalServerException(inner),
1138            crate::operation::update_findings::UpdateFindingsError::ResourceNotFoundException(inner) => Error::ResourceNotFoundException(inner),
1139            crate::operation::update_findings::UpdateFindingsError::ThrottlingException(inner) => Error::ThrottlingException(inner),
1140            crate::operation::update_findings::UpdateFindingsError::ValidationException(inner) => Error::ValidationException(inner),
1141            crate::operation::update_findings::UpdateFindingsError::Unhandled(inner) => Error::Unhandled(inner),
1142        }
1143    }
1144}
1145impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::validate_policy::ValidatePolicyError, R>> for Error
1146where
1147    R: Send + Sync + std::fmt::Debug + 'static,
1148{
1149    fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::validate_policy::ValidatePolicyError, R>) -> Self {
1150        match err {
1151            ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
1152            _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
1153                meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
1154                source: err.into(),
1155            }),
1156        }
1157    }
1158}
1159impl From<crate::operation::validate_policy::ValidatePolicyError> for Error {
1160    fn from(err: crate::operation::validate_policy::ValidatePolicyError) -> Self {
1161        match err {
1162            crate::operation::validate_policy::ValidatePolicyError::AccessDeniedException(inner) => Error::AccessDeniedException(inner),
1163            crate::operation::validate_policy::ValidatePolicyError::InternalServerException(inner) => Error::InternalServerException(inner),
1164            crate::operation::validate_policy::ValidatePolicyError::ThrottlingException(inner) => Error::ThrottlingException(inner),
1165            crate::operation::validate_policy::ValidatePolicyError::ValidationException(inner) => Error::ValidationException(inner),
1166            crate::operation::validate_policy::ValidatePolicyError::Unhandled(inner) => Error::Unhandled(inner),
1167        }
1168    }
1169}
1170impl ::std::error::Error for Error {
1171    fn source(&self) -> std::option::Option<&(dyn ::std::error::Error + 'static)> {
1172        match self {
1173            Error::AccessDeniedException(inner) => inner.source(),
1174            Error::ConflictException(inner) => inner.source(),
1175            Error::InternalServerException(inner) => inner.source(),
1176            Error::InvalidParameterException(inner) => inner.source(),
1177            Error::ResourceNotFoundException(inner) => inner.source(),
1178            Error::ServiceQuotaExceededException(inner) => inner.source(),
1179            Error::ThrottlingException(inner) => inner.source(),
1180            Error::UnprocessableEntityException(inner) => inner.source(),
1181            Error::ValidationException(inner) => inner.source(),
1182            Error::Unhandled(inner) => ::std::option::Option::Some(&*inner.source),
1183        }
1184    }
1185}
1186impl ::aws_types::request_id::RequestId for Error {
1187    fn request_id(&self) -> Option<&str> {
1188        match self {
1189            Self::AccessDeniedException(e) => e.request_id(),
1190            Self::ConflictException(e) => e.request_id(),
1191            Self::InternalServerException(e) => e.request_id(),
1192            Self::InvalidParameterException(e) => e.request_id(),
1193            Self::ResourceNotFoundException(e) => e.request_id(),
1194            Self::ServiceQuotaExceededException(e) => e.request_id(),
1195            Self::ThrottlingException(e) => e.request_id(),
1196            Self::UnprocessableEntityException(e) => e.request_id(),
1197            Self::ValidationException(e) => e.request_id(),
1198            Self::Unhandled(e) => e.meta.request_id(),
1199        }
1200    }
1201}