1#[non_exhaustive]
4#[derive(::std::fmt::Debug)]
5pub enum Error {
6 AccessDeniedException(crate::types::error::AccessDeniedException),
8 ConflictException(crate::types::error::ConflictException),
10 InternalServerException(crate::types::error::InternalServerException),
12 InvalidParameterException(crate::types::error::InvalidParameterException),
14 ResourceNotFoundException(crate::types::error::ResourceNotFoundException),
16 ServiceQuotaExceededException(crate::types::error::ServiceQuotaExceededException),
18 ThrottlingException(crate::types::error::ThrottlingException),
20 UnprocessableEntityException(crate::types::error::UnprocessableEntityException),
22 ValidationException(crate::types::error::ValidationException),
24 #[deprecated(note = "Matching `Unhandled` directly is not forwards compatible. Instead, match using a \
26 variable wildcard pattern and check `.code()`:
27 \
28 `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>
331 From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::create_service_linked_analyzer::CreateServiceLinkedAnalyzerError, R>>
332 for Error
333where
334 R: Send + Sync + std::fmt::Debug + 'static,
335{
336 fn from(
337 err: ::aws_smithy_runtime_api::client::result::SdkError<
338 crate::operation::create_service_linked_analyzer::CreateServiceLinkedAnalyzerError,
339 R,
340 >,
341 ) -> Self {
342 match err {
343 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
344 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
345 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
346 source: err.into(),
347 }),
348 }
349 }
350}
351impl From<crate::operation::create_service_linked_analyzer::CreateServiceLinkedAnalyzerError> for Error {
352 fn from(err: crate::operation::create_service_linked_analyzer::CreateServiceLinkedAnalyzerError) -> Self {
353 match err {
354 crate::operation::create_service_linked_analyzer::CreateServiceLinkedAnalyzerError::AccessDeniedException(inner) => {
355 Error::AccessDeniedException(inner)
356 }
357 crate::operation::create_service_linked_analyzer::CreateServiceLinkedAnalyzerError::ConflictException(inner) => {
358 Error::ConflictException(inner)
359 }
360 crate::operation::create_service_linked_analyzer::CreateServiceLinkedAnalyzerError::InternalServerException(inner) => {
361 Error::InternalServerException(inner)
362 }
363 crate::operation::create_service_linked_analyzer::CreateServiceLinkedAnalyzerError::ServiceQuotaExceededException(inner) => {
364 Error::ServiceQuotaExceededException(inner)
365 }
366 crate::operation::create_service_linked_analyzer::CreateServiceLinkedAnalyzerError::ThrottlingException(inner) => {
367 Error::ThrottlingException(inner)
368 }
369 crate::operation::create_service_linked_analyzer::CreateServiceLinkedAnalyzerError::ValidationException(inner) => {
370 Error::ValidationException(inner)
371 }
372 crate::operation::create_service_linked_analyzer::CreateServiceLinkedAnalyzerError::Unhandled(inner) => Error::Unhandled(inner),
373 }
374 }
375}
376impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::delete_analyzer::DeleteAnalyzerError, R>> for Error
377where
378 R: Send + Sync + std::fmt::Debug + 'static,
379{
380 fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::delete_analyzer::DeleteAnalyzerError, R>) -> Self {
381 match err {
382 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
383 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
384 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
385 source: err.into(),
386 }),
387 }
388 }
389}
390impl From<crate::operation::delete_analyzer::DeleteAnalyzerError> for Error {
391 fn from(err: crate::operation::delete_analyzer::DeleteAnalyzerError) -> Self {
392 match err {
393 crate::operation::delete_analyzer::DeleteAnalyzerError::AccessDeniedException(inner) => Error::AccessDeniedException(inner),
394 crate::operation::delete_analyzer::DeleteAnalyzerError::InternalServerException(inner) => Error::InternalServerException(inner),
395 crate::operation::delete_analyzer::DeleteAnalyzerError::ResourceNotFoundException(inner) => Error::ResourceNotFoundException(inner),
396 crate::operation::delete_analyzer::DeleteAnalyzerError::ThrottlingException(inner) => Error::ThrottlingException(inner),
397 crate::operation::delete_analyzer::DeleteAnalyzerError::ValidationException(inner) => Error::ValidationException(inner),
398 crate::operation::delete_analyzer::DeleteAnalyzerError::Unhandled(inner) => Error::Unhandled(inner),
399 }
400 }
401}
402impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::delete_archive_rule::DeleteArchiveRuleError, R>> for Error
403where
404 R: Send + Sync + std::fmt::Debug + 'static,
405{
406 fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::delete_archive_rule::DeleteArchiveRuleError, R>) -> Self {
407 match err {
408 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
409 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
410 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
411 source: err.into(),
412 }),
413 }
414 }
415}
416impl From<crate::operation::delete_archive_rule::DeleteArchiveRuleError> for Error {
417 fn from(err: crate::operation::delete_archive_rule::DeleteArchiveRuleError) -> Self {
418 match err {
419 crate::operation::delete_archive_rule::DeleteArchiveRuleError::AccessDeniedException(inner) => Error::AccessDeniedException(inner),
420 crate::operation::delete_archive_rule::DeleteArchiveRuleError::InternalServerException(inner) => Error::InternalServerException(inner),
421 crate::operation::delete_archive_rule::DeleteArchiveRuleError::ResourceNotFoundException(inner) => {
422 Error::ResourceNotFoundException(inner)
423 }
424 crate::operation::delete_archive_rule::DeleteArchiveRuleError::ThrottlingException(inner) => Error::ThrottlingException(inner),
425 crate::operation::delete_archive_rule::DeleteArchiveRuleError::ValidationException(inner) => Error::ValidationException(inner),
426 crate::operation::delete_archive_rule::DeleteArchiveRuleError::Unhandled(inner) => Error::Unhandled(inner),
427 }
428 }
429}
430impl<R>
431 From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::delete_service_linked_analyzer::DeleteServiceLinkedAnalyzerError, R>>
432 for Error
433where
434 R: Send + Sync + std::fmt::Debug + 'static,
435{
436 fn from(
437 err: ::aws_smithy_runtime_api::client::result::SdkError<
438 crate::operation::delete_service_linked_analyzer::DeleteServiceLinkedAnalyzerError,
439 R,
440 >,
441 ) -> Self {
442 match err {
443 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
444 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
445 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
446 source: err.into(),
447 }),
448 }
449 }
450}
451impl From<crate::operation::delete_service_linked_analyzer::DeleteServiceLinkedAnalyzerError> for Error {
452 fn from(err: crate::operation::delete_service_linked_analyzer::DeleteServiceLinkedAnalyzerError) -> Self {
453 match err {
454 crate::operation::delete_service_linked_analyzer::DeleteServiceLinkedAnalyzerError::AccessDeniedException(inner) => {
455 Error::AccessDeniedException(inner)
456 }
457 crate::operation::delete_service_linked_analyzer::DeleteServiceLinkedAnalyzerError::ConflictException(inner) => {
458 Error::ConflictException(inner)
459 }
460 crate::operation::delete_service_linked_analyzer::DeleteServiceLinkedAnalyzerError::InternalServerException(inner) => {
461 Error::InternalServerException(inner)
462 }
463 crate::operation::delete_service_linked_analyzer::DeleteServiceLinkedAnalyzerError::ResourceNotFoundException(inner) => {
464 Error::ResourceNotFoundException(inner)
465 }
466 crate::operation::delete_service_linked_analyzer::DeleteServiceLinkedAnalyzerError::ThrottlingException(inner) => {
467 Error::ThrottlingException(inner)
468 }
469 crate::operation::delete_service_linked_analyzer::DeleteServiceLinkedAnalyzerError::ValidationException(inner) => {
470 Error::ValidationException(inner)
471 }
472 crate::operation::delete_service_linked_analyzer::DeleteServiceLinkedAnalyzerError::Unhandled(inner) => Error::Unhandled(inner),
473 }
474 }
475}
476impl<R>
477 From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::generate_finding_recommendation::GenerateFindingRecommendationError, R>>
478 for Error
479where
480 R: Send + Sync + std::fmt::Debug + 'static,
481{
482 fn from(
483 err: ::aws_smithy_runtime_api::client::result::SdkError<
484 crate::operation::generate_finding_recommendation::GenerateFindingRecommendationError,
485 R,
486 >,
487 ) -> Self {
488 match err {
489 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
490 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
491 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
492 source: err.into(),
493 }),
494 }
495 }
496}
497impl From<crate::operation::generate_finding_recommendation::GenerateFindingRecommendationError> for Error {
498 fn from(err: crate::operation::generate_finding_recommendation::GenerateFindingRecommendationError) -> Self {
499 match err {
500 crate::operation::generate_finding_recommendation::GenerateFindingRecommendationError::AccessDeniedException(inner) => {
501 Error::AccessDeniedException(inner)
502 }
503 crate::operation::generate_finding_recommendation::GenerateFindingRecommendationError::InternalServerException(inner) => {
504 Error::InternalServerException(inner)
505 }
506 crate::operation::generate_finding_recommendation::GenerateFindingRecommendationError::ThrottlingException(inner) => {
507 Error::ThrottlingException(inner)
508 }
509 crate::operation::generate_finding_recommendation::GenerateFindingRecommendationError::ValidationException(inner) => {
510 Error::ValidationException(inner)
511 }
512 crate::operation::generate_finding_recommendation::GenerateFindingRecommendationError::Unhandled(inner) => Error::Unhandled(inner),
513 }
514 }
515}
516impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::get_access_preview::GetAccessPreviewError, R>> for Error
517where
518 R: Send + Sync + std::fmt::Debug + 'static,
519{
520 fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::get_access_preview::GetAccessPreviewError, R>) -> Self {
521 match err {
522 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
523 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
524 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
525 source: err.into(),
526 }),
527 }
528 }
529}
530impl From<crate::operation::get_access_preview::GetAccessPreviewError> for Error {
531 fn from(err: crate::operation::get_access_preview::GetAccessPreviewError) -> Self {
532 match err {
533 crate::operation::get_access_preview::GetAccessPreviewError::AccessDeniedException(inner) => Error::AccessDeniedException(inner),
534 crate::operation::get_access_preview::GetAccessPreviewError::InternalServerException(inner) => Error::InternalServerException(inner),
535 crate::operation::get_access_preview::GetAccessPreviewError::ResourceNotFoundException(inner) => Error::ResourceNotFoundException(inner),
536 crate::operation::get_access_preview::GetAccessPreviewError::ThrottlingException(inner) => Error::ThrottlingException(inner),
537 crate::operation::get_access_preview::GetAccessPreviewError::ValidationException(inner) => Error::ValidationException(inner),
538 crate::operation::get_access_preview::GetAccessPreviewError::Unhandled(inner) => Error::Unhandled(inner),
539 }
540 }
541}
542impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::get_analyzed_resource::GetAnalyzedResourceError, R>> for Error
543where
544 R: Send + Sync + std::fmt::Debug + 'static,
545{
546 fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::get_analyzed_resource::GetAnalyzedResourceError, R>) -> Self {
547 match err {
548 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
549 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
550 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
551 source: err.into(),
552 }),
553 }
554 }
555}
556impl From<crate::operation::get_analyzed_resource::GetAnalyzedResourceError> for Error {
557 fn from(err: crate::operation::get_analyzed_resource::GetAnalyzedResourceError) -> Self {
558 match err {
559 crate::operation::get_analyzed_resource::GetAnalyzedResourceError::AccessDeniedException(inner) => Error::AccessDeniedException(inner),
560 crate::operation::get_analyzed_resource::GetAnalyzedResourceError::InternalServerException(inner) => {
561 Error::InternalServerException(inner)
562 }
563 crate::operation::get_analyzed_resource::GetAnalyzedResourceError::ResourceNotFoundException(inner) => {
564 Error::ResourceNotFoundException(inner)
565 }
566 crate::operation::get_analyzed_resource::GetAnalyzedResourceError::ThrottlingException(inner) => Error::ThrottlingException(inner),
567 crate::operation::get_analyzed_resource::GetAnalyzedResourceError::ValidationException(inner) => Error::ValidationException(inner),
568 crate::operation::get_analyzed_resource::GetAnalyzedResourceError::Unhandled(inner) => Error::Unhandled(inner),
569 }
570 }
571}
572impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::get_analyzer::GetAnalyzerError, R>> for Error
573where
574 R: Send + Sync + std::fmt::Debug + 'static,
575{
576 fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::get_analyzer::GetAnalyzerError, R>) -> Self {
577 match err {
578 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
579 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
580 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
581 source: err.into(),
582 }),
583 }
584 }
585}
586impl From<crate::operation::get_analyzer::GetAnalyzerError> for Error {
587 fn from(err: crate::operation::get_analyzer::GetAnalyzerError) -> Self {
588 match err {
589 crate::operation::get_analyzer::GetAnalyzerError::AccessDeniedException(inner) => Error::AccessDeniedException(inner),
590 crate::operation::get_analyzer::GetAnalyzerError::InternalServerException(inner) => Error::InternalServerException(inner),
591 crate::operation::get_analyzer::GetAnalyzerError::ResourceNotFoundException(inner) => Error::ResourceNotFoundException(inner),
592 crate::operation::get_analyzer::GetAnalyzerError::ThrottlingException(inner) => Error::ThrottlingException(inner),
593 crate::operation::get_analyzer::GetAnalyzerError::ValidationException(inner) => Error::ValidationException(inner),
594 crate::operation::get_analyzer::GetAnalyzerError::Unhandled(inner) => Error::Unhandled(inner),
595 }
596 }
597}
598impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::get_archive_rule::GetArchiveRuleError, R>> for Error
599where
600 R: Send + Sync + std::fmt::Debug + 'static,
601{
602 fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::get_archive_rule::GetArchiveRuleError, R>) -> Self {
603 match err {
604 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
605 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
606 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
607 source: err.into(),
608 }),
609 }
610 }
611}
612impl From<crate::operation::get_archive_rule::GetArchiveRuleError> for Error {
613 fn from(err: crate::operation::get_archive_rule::GetArchiveRuleError) -> Self {
614 match err {
615 crate::operation::get_archive_rule::GetArchiveRuleError::AccessDeniedException(inner) => Error::AccessDeniedException(inner),
616 crate::operation::get_archive_rule::GetArchiveRuleError::InternalServerException(inner) => Error::InternalServerException(inner),
617 crate::operation::get_archive_rule::GetArchiveRuleError::ResourceNotFoundException(inner) => Error::ResourceNotFoundException(inner),
618 crate::operation::get_archive_rule::GetArchiveRuleError::ThrottlingException(inner) => Error::ThrottlingException(inner),
619 crate::operation::get_archive_rule::GetArchiveRuleError::ValidationException(inner) => Error::ValidationException(inner),
620 crate::operation::get_archive_rule::GetArchiveRuleError::Unhandled(inner) => Error::Unhandled(inner),
621 }
622 }
623}
624impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::get_finding::GetFindingError, R>> for Error
625where
626 R: Send + Sync + std::fmt::Debug + 'static,
627{
628 fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::get_finding::GetFindingError, R>) -> Self {
629 match err {
630 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
631 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
632 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
633 source: err.into(),
634 }),
635 }
636 }
637}
638impl From<crate::operation::get_finding::GetFindingError> for Error {
639 fn from(err: crate::operation::get_finding::GetFindingError) -> Self {
640 match err {
641 crate::operation::get_finding::GetFindingError::AccessDeniedException(inner) => Error::AccessDeniedException(inner),
642 crate::operation::get_finding::GetFindingError::InternalServerException(inner) => Error::InternalServerException(inner),
643 crate::operation::get_finding::GetFindingError::ResourceNotFoundException(inner) => Error::ResourceNotFoundException(inner),
644 crate::operation::get_finding::GetFindingError::ThrottlingException(inner) => Error::ThrottlingException(inner),
645 crate::operation::get_finding::GetFindingError::ValidationException(inner) => Error::ValidationException(inner),
646 crate::operation::get_finding::GetFindingError::Unhandled(inner) => Error::Unhandled(inner),
647 }
648 }
649}
650impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::get_finding_recommendation::GetFindingRecommendationError, R>>
651 for Error
652where
653 R: Send + Sync + std::fmt::Debug + 'static,
654{
655 fn from(
656 err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::get_finding_recommendation::GetFindingRecommendationError, R>,
657 ) -> Self {
658 match err {
659 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
660 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
661 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
662 source: err.into(),
663 }),
664 }
665 }
666}
667impl From<crate::operation::get_finding_recommendation::GetFindingRecommendationError> for Error {
668 fn from(err: crate::operation::get_finding_recommendation::GetFindingRecommendationError) -> Self {
669 match err {
670 crate::operation::get_finding_recommendation::GetFindingRecommendationError::AccessDeniedException(inner) => {
671 Error::AccessDeniedException(inner)
672 }
673 crate::operation::get_finding_recommendation::GetFindingRecommendationError::InternalServerException(inner) => {
674 Error::InternalServerException(inner)
675 }
676 crate::operation::get_finding_recommendation::GetFindingRecommendationError::ResourceNotFoundException(inner) => {
677 Error::ResourceNotFoundException(inner)
678 }
679 crate::operation::get_finding_recommendation::GetFindingRecommendationError::ThrottlingException(inner) => {
680 Error::ThrottlingException(inner)
681 }
682 crate::operation::get_finding_recommendation::GetFindingRecommendationError::ValidationException(inner) => {
683 Error::ValidationException(inner)
684 }
685 crate::operation::get_finding_recommendation::GetFindingRecommendationError::Unhandled(inner) => Error::Unhandled(inner),
686 }
687 }
688}
689impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::get_findings_statistics::GetFindingsStatisticsError, R>> for Error
690where
691 R: Send + Sync + std::fmt::Debug + 'static,
692{
693 fn from(
694 err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::get_findings_statistics::GetFindingsStatisticsError, R>,
695 ) -> Self {
696 match err {
697 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
698 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
699 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
700 source: err.into(),
701 }),
702 }
703 }
704}
705impl From<crate::operation::get_findings_statistics::GetFindingsStatisticsError> for Error {
706 fn from(err: crate::operation::get_findings_statistics::GetFindingsStatisticsError) -> Self {
707 match err {
708 crate::operation::get_findings_statistics::GetFindingsStatisticsError::AccessDeniedException(inner) => {
709 Error::AccessDeniedException(inner)
710 }
711 crate::operation::get_findings_statistics::GetFindingsStatisticsError::InternalServerException(inner) => {
712 Error::InternalServerException(inner)
713 }
714 crate::operation::get_findings_statistics::GetFindingsStatisticsError::ResourceNotFoundException(inner) => {
715 Error::ResourceNotFoundException(inner)
716 }
717 crate::operation::get_findings_statistics::GetFindingsStatisticsError::ThrottlingException(inner) => Error::ThrottlingException(inner),
718 crate::operation::get_findings_statistics::GetFindingsStatisticsError::ValidationException(inner) => Error::ValidationException(inner),
719 crate::operation::get_findings_statistics::GetFindingsStatisticsError::Unhandled(inner) => Error::Unhandled(inner),
720 }
721 }
722}
723impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::get_finding_v2::GetFindingV2Error, R>> for Error
724where
725 R: Send + Sync + std::fmt::Debug + 'static,
726{
727 fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::get_finding_v2::GetFindingV2Error, R>) -> Self {
728 match err {
729 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
730 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
731 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
732 source: err.into(),
733 }),
734 }
735 }
736}
737impl From<crate::operation::get_finding_v2::GetFindingV2Error> for Error {
738 fn from(err: crate::operation::get_finding_v2::GetFindingV2Error) -> Self {
739 match err {
740 crate::operation::get_finding_v2::GetFindingV2Error::AccessDeniedException(inner) => Error::AccessDeniedException(inner),
741 crate::operation::get_finding_v2::GetFindingV2Error::InternalServerException(inner) => Error::InternalServerException(inner),
742 crate::operation::get_finding_v2::GetFindingV2Error::ResourceNotFoundException(inner) => Error::ResourceNotFoundException(inner),
743 crate::operation::get_finding_v2::GetFindingV2Error::ThrottlingException(inner) => Error::ThrottlingException(inner),
744 crate::operation::get_finding_v2::GetFindingV2Error::ValidationException(inner) => Error::ValidationException(inner),
745 crate::operation::get_finding_v2::GetFindingV2Error::Unhandled(inner) => Error::Unhandled(inner),
746 }
747 }
748}
749impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::get_generated_policy::GetGeneratedPolicyError, R>> for Error
750where
751 R: Send + Sync + std::fmt::Debug + 'static,
752{
753 fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::get_generated_policy::GetGeneratedPolicyError, R>) -> Self {
754 match err {
755 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
756 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
757 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
758 source: err.into(),
759 }),
760 }
761 }
762}
763impl From<crate::operation::get_generated_policy::GetGeneratedPolicyError> for Error {
764 fn from(err: crate::operation::get_generated_policy::GetGeneratedPolicyError) -> Self {
765 match err {
766 crate::operation::get_generated_policy::GetGeneratedPolicyError::AccessDeniedException(inner) => Error::AccessDeniedException(inner),
767 crate::operation::get_generated_policy::GetGeneratedPolicyError::InternalServerException(inner) => Error::InternalServerException(inner),
768 crate::operation::get_generated_policy::GetGeneratedPolicyError::ThrottlingException(inner) => Error::ThrottlingException(inner),
769 crate::operation::get_generated_policy::GetGeneratedPolicyError::ValidationException(inner) => Error::ValidationException(inner),
770 crate::operation::get_generated_policy::GetGeneratedPolicyError::Unhandled(inner) => Error::Unhandled(inner),
771 }
772 }
773}
774impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::list_access_preview_findings::ListAccessPreviewFindingsError, R>>
775 for Error
776where
777 R: Send + Sync + std::fmt::Debug + 'static,
778{
779 fn from(
780 err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::list_access_preview_findings::ListAccessPreviewFindingsError, R>,
781 ) -> Self {
782 match err {
783 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
784 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
785 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
786 source: err.into(),
787 }),
788 }
789 }
790}
791impl From<crate::operation::list_access_preview_findings::ListAccessPreviewFindingsError> for Error {
792 fn from(err: crate::operation::list_access_preview_findings::ListAccessPreviewFindingsError) -> Self {
793 match err {
794 crate::operation::list_access_preview_findings::ListAccessPreviewFindingsError::AccessDeniedException(inner) => {
795 Error::AccessDeniedException(inner)
796 }
797 crate::operation::list_access_preview_findings::ListAccessPreviewFindingsError::ConflictException(inner) => {
798 Error::ConflictException(inner)
799 }
800 crate::operation::list_access_preview_findings::ListAccessPreviewFindingsError::InternalServerException(inner) => {
801 Error::InternalServerException(inner)
802 }
803 crate::operation::list_access_preview_findings::ListAccessPreviewFindingsError::ResourceNotFoundException(inner) => {
804 Error::ResourceNotFoundException(inner)
805 }
806 crate::operation::list_access_preview_findings::ListAccessPreviewFindingsError::ThrottlingException(inner) => {
807 Error::ThrottlingException(inner)
808 }
809 crate::operation::list_access_preview_findings::ListAccessPreviewFindingsError::ValidationException(inner) => {
810 Error::ValidationException(inner)
811 }
812 crate::operation::list_access_preview_findings::ListAccessPreviewFindingsError::Unhandled(inner) => Error::Unhandled(inner),
813 }
814 }
815}
816impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::list_access_previews::ListAccessPreviewsError, R>> for Error
817where
818 R: Send + Sync + std::fmt::Debug + 'static,
819{
820 fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::list_access_previews::ListAccessPreviewsError, R>) -> Self {
821 match err {
822 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
823 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
824 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
825 source: err.into(),
826 }),
827 }
828 }
829}
830impl From<crate::operation::list_access_previews::ListAccessPreviewsError> for Error {
831 fn from(err: crate::operation::list_access_previews::ListAccessPreviewsError) -> Self {
832 match err {
833 crate::operation::list_access_previews::ListAccessPreviewsError::AccessDeniedException(inner) => Error::AccessDeniedException(inner),
834 crate::operation::list_access_previews::ListAccessPreviewsError::InternalServerException(inner) => Error::InternalServerException(inner),
835 crate::operation::list_access_previews::ListAccessPreviewsError::ResourceNotFoundException(inner) => {
836 Error::ResourceNotFoundException(inner)
837 }
838 crate::operation::list_access_previews::ListAccessPreviewsError::ThrottlingException(inner) => Error::ThrottlingException(inner),
839 crate::operation::list_access_previews::ListAccessPreviewsError::ValidationException(inner) => Error::ValidationException(inner),
840 crate::operation::list_access_previews::ListAccessPreviewsError::Unhandled(inner) => Error::Unhandled(inner),
841 }
842 }
843}
844impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::list_analyzed_resources::ListAnalyzedResourcesError, R>> for Error
845where
846 R: Send + Sync + std::fmt::Debug + 'static,
847{
848 fn from(
849 err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::list_analyzed_resources::ListAnalyzedResourcesError, R>,
850 ) -> Self {
851 match err {
852 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
853 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
854 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
855 source: err.into(),
856 }),
857 }
858 }
859}
860impl From<crate::operation::list_analyzed_resources::ListAnalyzedResourcesError> for Error {
861 fn from(err: crate::operation::list_analyzed_resources::ListAnalyzedResourcesError) -> Self {
862 match err {
863 crate::operation::list_analyzed_resources::ListAnalyzedResourcesError::AccessDeniedException(inner) => {
864 Error::AccessDeniedException(inner)
865 }
866 crate::operation::list_analyzed_resources::ListAnalyzedResourcesError::InternalServerException(inner) => {
867 Error::InternalServerException(inner)
868 }
869 crate::operation::list_analyzed_resources::ListAnalyzedResourcesError::ResourceNotFoundException(inner) => {
870 Error::ResourceNotFoundException(inner)
871 }
872 crate::operation::list_analyzed_resources::ListAnalyzedResourcesError::ThrottlingException(inner) => Error::ThrottlingException(inner),
873 crate::operation::list_analyzed_resources::ListAnalyzedResourcesError::ValidationException(inner) => Error::ValidationException(inner),
874 crate::operation::list_analyzed_resources::ListAnalyzedResourcesError::Unhandled(inner) => Error::Unhandled(inner),
875 }
876 }
877}
878impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::list_analyzers::ListAnalyzersError, R>> for Error
879where
880 R: Send + Sync + std::fmt::Debug + 'static,
881{
882 fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::list_analyzers::ListAnalyzersError, R>) -> Self {
883 match err {
884 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
885 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
886 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
887 source: err.into(),
888 }),
889 }
890 }
891}
892impl From<crate::operation::list_analyzers::ListAnalyzersError> for Error {
893 fn from(err: crate::operation::list_analyzers::ListAnalyzersError) -> Self {
894 match err {
895 crate::operation::list_analyzers::ListAnalyzersError::AccessDeniedException(inner) => Error::AccessDeniedException(inner),
896 crate::operation::list_analyzers::ListAnalyzersError::InternalServerException(inner) => Error::InternalServerException(inner),
897 crate::operation::list_analyzers::ListAnalyzersError::ThrottlingException(inner) => Error::ThrottlingException(inner),
898 crate::operation::list_analyzers::ListAnalyzersError::ValidationException(inner) => Error::ValidationException(inner),
899 crate::operation::list_analyzers::ListAnalyzersError::Unhandled(inner) => Error::Unhandled(inner),
900 }
901 }
902}
903impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::list_archive_rules::ListArchiveRulesError, R>> for Error
904where
905 R: Send + Sync + std::fmt::Debug + 'static,
906{
907 fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::list_archive_rules::ListArchiveRulesError, R>) -> Self {
908 match err {
909 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
910 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
911 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
912 source: err.into(),
913 }),
914 }
915 }
916}
917impl From<crate::operation::list_archive_rules::ListArchiveRulesError> for Error {
918 fn from(err: crate::operation::list_archive_rules::ListArchiveRulesError) -> Self {
919 match err {
920 crate::operation::list_archive_rules::ListArchiveRulesError::AccessDeniedException(inner) => Error::AccessDeniedException(inner),
921 crate::operation::list_archive_rules::ListArchiveRulesError::InternalServerException(inner) => Error::InternalServerException(inner),
922 crate::operation::list_archive_rules::ListArchiveRulesError::ThrottlingException(inner) => Error::ThrottlingException(inner),
923 crate::operation::list_archive_rules::ListArchiveRulesError::ValidationException(inner) => Error::ValidationException(inner),
924 crate::operation::list_archive_rules::ListArchiveRulesError::Unhandled(inner) => Error::Unhandled(inner),
925 }
926 }
927}
928impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::list_findings::ListFindingsError, R>> for Error
929where
930 R: Send + Sync + std::fmt::Debug + 'static,
931{
932 fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::list_findings::ListFindingsError, R>) -> Self {
933 match err {
934 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
935 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
936 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
937 source: err.into(),
938 }),
939 }
940 }
941}
942impl From<crate::operation::list_findings::ListFindingsError> for Error {
943 fn from(err: crate::operation::list_findings::ListFindingsError) -> Self {
944 match err {
945 crate::operation::list_findings::ListFindingsError::AccessDeniedException(inner) => Error::AccessDeniedException(inner),
946 crate::operation::list_findings::ListFindingsError::InternalServerException(inner) => Error::InternalServerException(inner),
947 crate::operation::list_findings::ListFindingsError::ResourceNotFoundException(inner) => Error::ResourceNotFoundException(inner),
948 crate::operation::list_findings::ListFindingsError::ThrottlingException(inner) => Error::ThrottlingException(inner),
949 crate::operation::list_findings::ListFindingsError::ValidationException(inner) => Error::ValidationException(inner),
950 crate::operation::list_findings::ListFindingsError::Unhandled(inner) => Error::Unhandled(inner),
951 }
952 }
953}
954impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::list_findings_v2::ListFindingsV2Error, R>> for Error
955where
956 R: Send + Sync + std::fmt::Debug + 'static,
957{
958 fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::list_findings_v2::ListFindingsV2Error, R>) -> Self {
959 match err {
960 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
961 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
962 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
963 source: err.into(),
964 }),
965 }
966 }
967}
968impl From<crate::operation::list_findings_v2::ListFindingsV2Error> for Error {
969 fn from(err: crate::operation::list_findings_v2::ListFindingsV2Error) -> Self {
970 match err {
971 crate::operation::list_findings_v2::ListFindingsV2Error::AccessDeniedException(inner) => Error::AccessDeniedException(inner),
972 crate::operation::list_findings_v2::ListFindingsV2Error::InternalServerException(inner) => Error::InternalServerException(inner),
973 crate::operation::list_findings_v2::ListFindingsV2Error::ResourceNotFoundException(inner) => Error::ResourceNotFoundException(inner),
974 crate::operation::list_findings_v2::ListFindingsV2Error::ThrottlingException(inner) => Error::ThrottlingException(inner),
975 crate::operation::list_findings_v2::ListFindingsV2Error::ValidationException(inner) => Error::ValidationException(inner),
976 crate::operation::list_findings_v2::ListFindingsV2Error::Unhandled(inner) => Error::Unhandled(inner),
977 }
978 }
979}
980impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::list_policy_generations::ListPolicyGenerationsError, R>> for Error
981where
982 R: Send + Sync + std::fmt::Debug + 'static,
983{
984 fn from(
985 err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::list_policy_generations::ListPolicyGenerationsError, R>,
986 ) -> Self {
987 match err {
988 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
989 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
990 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
991 source: err.into(),
992 }),
993 }
994 }
995}
996impl From<crate::operation::list_policy_generations::ListPolicyGenerationsError> for Error {
997 fn from(err: crate::operation::list_policy_generations::ListPolicyGenerationsError) -> Self {
998 match err {
999 crate::operation::list_policy_generations::ListPolicyGenerationsError::AccessDeniedException(inner) => {
1000 Error::AccessDeniedException(inner)
1001 }
1002 crate::operation::list_policy_generations::ListPolicyGenerationsError::InternalServerException(inner) => {
1003 Error::InternalServerException(inner)
1004 }
1005 crate::operation::list_policy_generations::ListPolicyGenerationsError::ThrottlingException(inner) => Error::ThrottlingException(inner),
1006 crate::operation::list_policy_generations::ListPolicyGenerationsError::ValidationException(inner) => Error::ValidationException(inner),
1007 crate::operation::list_policy_generations::ListPolicyGenerationsError::Unhandled(inner) => Error::Unhandled(inner),
1008 }
1009 }
1010}
1011impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::list_tags_for_resource::ListTagsForResourceError, R>> for Error
1012where
1013 R: Send + Sync + std::fmt::Debug + 'static,
1014{
1015 fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::list_tags_for_resource::ListTagsForResourceError, R>) -> Self {
1016 match err {
1017 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
1018 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
1019 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
1020 source: err.into(),
1021 }),
1022 }
1023 }
1024}
1025impl From<crate::operation::list_tags_for_resource::ListTagsForResourceError> for Error {
1026 fn from(err: crate::operation::list_tags_for_resource::ListTagsForResourceError) -> Self {
1027 match err {
1028 crate::operation::list_tags_for_resource::ListTagsForResourceError::AccessDeniedException(inner) => Error::AccessDeniedException(inner),
1029 crate::operation::list_tags_for_resource::ListTagsForResourceError::InternalServerException(inner) => {
1030 Error::InternalServerException(inner)
1031 }
1032 crate::operation::list_tags_for_resource::ListTagsForResourceError::ResourceNotFoundException(inner) => {
1033 Error::ResourceNotFoundException(inner)
1034 }
1035 crate::operation::list_tags_for_resource::ListTagsForResourceError::ThrottlingException(inner) => Error::ThrottlingException(inner),
1036 crate::operation::list_tags_for_resource::ListTagsForResourceError::ValidationException(inner) => Error::ValidationException(inner),
1037 crate::operation::list_tags_for_resource::ListTagsForResourceError::Unhandled(inner) => Error::Unhandled(inner),
1038 }
1039 }
1040}
1041impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::start_policy_generation::StartPolicyGenerationError, R>> for Error
1042where
1043 R: Send + Sync + std::fmt::Debug + 'static,
1044{
1045 fn from(
1046 err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::start_policy_generation::StartPolicyGenerationError, R>,
1047 ) -> Self {
1048 match err {
1049 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
1050 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
1051 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
1052 source: err.into(),
1053 }),
1054 }
1055 }
1056}
1057impl From<crate::operation::start_policy_generation::StartPolicyGenerationError> for Error {
1058 fn from(err: crate::operation::start_policy_generation::StartPolicyGenerationError) -> Self {
1059 match err {
1060 crate::operation::start_policy_generation::StartPolicyGenerationError::AccessDeniedException(inner) => {
1061 Error::AccessDeniedException(inner)
1062 }
1063 crate::operation::start_policy_generation::StartPolicyGenerationError::ConflictException(inner) => Error::ConflictException(inner),
1064 crate::operation::start_policy_generation::StartPolicyGenerationError::InternalServerException(inner) => {
1065 Error::InternalServerException(inner)
1066 }
1067 crate::operation::start_policy_generation::StartPolicyGenerationError::ServiceQuotaExceededException(inner) => {
1068 Error::ServiceQuotaExceededException(inner)
1069 }
1070 crate::operation::start_policy_generation::StartPolicyGenerationError::ThrottlingException(inner) => Error::ThrottlingException(inner),
1071 crate::operation::start_policy_generation::StartPolicyGenerationError::ValidationException(inner) => Error::ValidationException(inner),
1072 crate::operation::start_policy_generation::StartPolicyGenerationError::Unhandled(inner) => Error::Unhandled(inner),
1073 }
1074 }
1075}
1076impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::start_resource_scan::StartResourceScanError, R>> for Error
1077where
1078 R: Send + Sync + std::fmt::Debug + 'static,
1079{
1080 fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::start_resource_scan::StartResourceScanError, R>) -> Self {
1081 match err {
1082 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
1083 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
1084 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
1085 source: err.into(),
1086 }),
1087 }
1088 }
1089}
1090impl From<crate::operation::start_resource_scan::StartResourceScanError> for Error {
1091 fn from(err: crate::operation::start_resource_scan::StartResourceScanError) -> Self {
1092 match err {
1093 crate::operation::start_resource_scan::StartResourceScanError::AccessDeniedException(inner) => Error::AccessDeniedException(inner),
1094 crate::operation::start_resource_scan::StartResourceScanError::InternalServerException(inner) => Error::InternalServerException(inner),
1095 crate::operation::start_resource_scan::StartResourceScanError::ResourceNotFoundException(inner) => {
1096 Error::ResourceNotFoundException(inner)
1097 }
1098 crate::operation::start_resource_scan::StartResourceScanError::ThrottlingException(inner) => Error::ThrottlingException(inner),
1099 crate::operation::start_resource_scan::StartResourceScanError::ValidationException(inner) => Error::ValidationException(inner),
1100 crate::operation::start_resource_scan::StartResourceScanError::Unhandled(inner) => Error::Unhandled(inner),
1101 }
1102 }
1103}
1104impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::tag_resource::TagResourceError, R>> for Error
1105where
1106 R: Send + Sync + std::fmt::Debug + 'static,
1107{
1108 fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::tag_resource::TagResourceError, R>) -> Self {
1109 match err {
1110 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
1111 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
1112 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
1113 source: err.into(),
1114 }),
1115 }
1116 }
1117}
1118impl From<crate::operation::tag_resource::TagResourceError> for Error {
1119 fn from(err: crate::operation::tag_resource::TagResourceError) -> Self {
1120 match err {
1121 crate::operation::tag_resource::TagResourceError::AccessDeniedException(inner) => Error::AccessDeniedException(inner),
1122 crate::operation::tag_resource::TagResourceError::InternalServerException(inner) => Error::InternalServerException(inner),
1123 crate::operation::tag_resource::TagResourceError::ResourceNotFoundException(inner) => Error::ResourceNotFoundException(inner),
1124 crate::operation::tag_resource::TagResourceError::ThrottlingException(inner) => Error::ThrottlingException(inner),
1125 crate::operation::tag_resource::TagResourceError::ValidationException(inner) => Error::ValidationException(inner),
1126 crate::operation::tag_resource::TagResourceError::Unhandled(inner) => Error::Unhandled(inner),
1127 }
1128 }
1129}
1130impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::untag_resource::UntagResourceError, R>> for Error
1131where
1132 R: Send + Sync + std::fmt::Debug + 'static,
1133{
1134 fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::untag_resource::UntagResourceError, R>) -> Self {
1135 match err {
1136 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
1137 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
1138 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
1139 source: err.into(),
1140 }),
1141 }
1142 }
1143}
1144impl From<crate::operation::untag_resource::UntagResourceError> for Error {
1145 fn from(err: crate::operation::untag_resource::UntagResourceError) -> Self {
1146 match err {
1147 crate::operation::untag_resource::UntagResourceError::AccessDeniedException(inner) => Error::AccessDeniedException(inner),
1148 crate::operation::untag_resource::UntagResourceError::InternalServerException(inner) => Error::InternalServerException(inner),
1149 crate::operation::untag_resource::UntagResourceError::ResourceNotFoundException(inner) => Error::ResourceNotFoundException(inner),
1150 crate::operation::untag_resource::UntagResourceError::ThrottlingException(inner) => Error::ThrottlingException(inner),
1151 crate::operation::untag_resource::UntagResourceError::ValidationException(inner) => Error::ValidationException(inner),
1152 crate::operation::untag_resource::UntagResourceError::Unhandled(inner) => Error::Unhandled(inner),
1153 }
1154 }
1155}
1156impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::update_analyzer::UpdateAnalyzerError, R>> for Error
1157where
1158 R: Send + Sync + std::fmt::Debug + 'static,
1159{
1160 fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::update_analyzer::UpdateAnalyzerError, R>) -> Self {
1161 match err {
1162 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
1163 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
1164 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
1165 source: err.into(),
1166 }),
1167 }
1168 }
1169}
1170impl From<crate::operation::update_analyzer::UpdateAnalyzerError> for Error {
1171 fn from(err: crate::operation::update_analyzer::UpdateAnalyzerError) -> Self {
1172 match err {
1173 crate::operation::update_analyzer::UpdateAnalyzerError::AccessDeniedException(inner) => Error::AccessDeniedException(inner),
1174 crate::operation::update_analyzer::UpdateAnalyzerError::ConflictException(inner) => Error::ConflictException(inner),
1175 crate::operation::update_analyzer::UpdateAnalyzerError::InternalServerException(inner) => Error::InternalServerException(inner),
1176 crate::operation::update_analyzer::UpdateAnalyzerError::ResourceNotFoundException(inner) => Error::ResourceNotFoundException(inner),
1177 crate::operation::update_analyzer::UpdateAnalyzerError::ThrottlingException(inner) => Error::ThrottlingException(inner),
1178 crate::operation::update_analyzer::UpdateAnalyzerError::ValidationException(inner) => Error::ValidationException(inner),
1179 crate::operation::update_analyzer::UpdateAnalyzerError::Unhandled(inner) => Error::Unhandled(inner),
1180 }
1181 }
1182}
1183impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::update_archive_rule::UpdateArchiveRuleError, R>> for Error
1184where
1185 R: Send + Sync + std::fmt::Debug + 'static,
1186{
1187 fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::update_archive_rule::UpdateArchiveRuleError, R>) -> Self {
1188 match err {
1189 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
1190 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
1191 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
1192 source: err.into(),
1193 }),
1194 }
1195 }
1196}
1197impl From<crate::operation::update_archive_rule::UpdateArchiveRuleError> for Error {
1198 fn from(err: crate::operation::update_archive_rule::UpdateArchiveRuleError) -> Self {
1199 match err {
1200 crate::operation::update_archive_rule::UpdateArchiveRuleError::AccessDeniedException(inner) => Error::AccessDeniedException(inner),
1201 crate::operation::update_archive_rule::UpdateArchiveRuleError::InternalServerException(inner) => Error::InternalServerException(inner),
1202 crate::operation::update_archive_rule::UpdateArchiveRuleError::ResourceNotFoundException(inner) => {
1203 Error::ResourceNotFoundException(inner)
1204 }
1205 crate::operation::update_archive_rule::UpdateArchiveRuleError::ThrottlingException(inner) => Error::ThrottlingException(inner),
1206 crate::operation::update_archive_rule::UpdateArchiveRuleError::ValidationException(inner) => Error::ValidationException(inner),
1207 crate::operation::update_archive_rule::UpdateArchiveRuleError::Unhandled(inner) => Error::Unhandled(inner),
1208 }
1209 }
1210}
1211impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::update_findings::UpdateFindingsError, R>> for Error
1212where
1213 R: Send + Sync + std::fmt::Debug + 'static,
1214{
1215 fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::update_findings::UpdateFindingsError, R>) -> Self {
1216 match err {
1217 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
1218 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
1219 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
1220 source: err.into(),
1221 }),
1222 }
1223 }
1224}
1225impl From<crate::operation::update_findings::UpdateFindingsError> for Error {
1226 fn from(err: crate::operation::update_findings::UpdateFindingsError) -> Self {
1227 match err {
1228 crate::operation::update_findings::UpdateFindingsError::AccessDeniedException(inner) => Error::AccessDeniedException(inner),
1229 crate::operation::update_findings::UpdateFindingsError::InternalServerException(inner) => Error::InternalServerException(inner),
1230 crate::operation::update_findings::UpdateFindingsError::ResourceNotFoundException(inner) => Error::ResourceNotFoundException(inner),
1231 crate::operation::update_findings::UpdateFindingsError::ThrottlingException(inner) => Error::ThrottlingException(inner),
1232 crate::operation::update_findings::UpdateFindingsError::ValidationException(inner) => Error::ValidationException(inner),
1233 crate::operation::update_findings::UpdateFindingsError::Unhandled(inner) => Error::Unhandled(inner),
1234 }
1235 }
1236}
1237impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::validate_policy::ValidatePolicyError, R>> for Error
1238where
1239 R: Send + Sync + std::fmt::Debug + 'static,
1240{
1241 fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::validate_policy::ValidatePolicyError, R>) -> Self {
1242 match err {
1243 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
1244 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
1245 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
1246 source: err.into(),
1247 }),
1248 }
1249 }
1250}
1251impl From<crate::operation::validate_policy::ValidatePolicyError> for Error {
1252 fn from(err: crate::operation::validate_policy::ValidatePolicyError) -> Self {
1253 match err {
1254 crate::operation::validate_policy::ValidatePolicyError::AccessDeniedException(inner) => Error::AccessDeniedException(inner),
1255 crate::operation::validate_policy::ValidatePolicyError::InternalServerException(inner) => Error::InternalServerException(inner),
1256 crate::operation::validate_policy::ValidatePolicyError::ThrottlingException(inner) => Error::ThrottlingException(inner),
1257 crate::operation::validate_policy::ValidatePolicyError::ValidationException(inner) => Error::ValidationException(inner),
1258 crate::operation::validate_policy::ValidatePolicyError::Unhandled(inner) => Error::Unhandled(inner),
1259 }
1260 }
1261}
1262impl ::std::error::Error for Error {
1263 fn source(&self) -> std::option::Option<&(dyn ::std::error::Error + 'static)> {
1264 match self {
1265 Error::AccessDeniedException(inner) => inner.source(),
1266 Error::ConflictException(inner) => inner.source(),
1267 Error::InternalServerException(inner) => inner.source(),
1268 Error::InvalidParameterException(inner) => inner.source(),
1269 Error::ResourceNotFoundException(inner) => inner.source(),
1270 Error::ServiceQuotaExceededException(inner) => inner.source(),
1271 Error::ThrottlingException(inner) => inner.source(),
1272 Error::UnprocessableEntityException(inner) => inner.source(),
1273 Error::ValidationException(inner) => inner.source(),
1274 Error::Unhandled(inner) => ::std::option::Option::Some(&*inner.source),
1275 }
1276 }
1277}
1278impl ::aws_types::request_id::RequestId for Error {
1279 fn request_id(&self) -> Option<&str> {
1280 match self {
1281 Self::AccessDeniedException(e) => e.request_id(),
1282 Self::ConflictException(e) => e.request_id(),
1283 Self::InternalServerException(e) => e.request_id(),
1284 Self::InvalidParameterException(e) => e.request_id(),
1285 Self::ResourceNotFoundException(e) => e.request_id(),
1286 Self::ServiceQuotaExceededException(e) => e.request_id(),
1287 Self::ThrottlingException(e) => e.request_id(),
1288 Self::UnprocessableEntityException(e) => e.request_id(),
1289 Self::ValidationException(e) => e.request_id(),
1290 Self::Unhandled(e) => e.meta.request_id(),
1291 }
1292 }
1293}