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 ResourceNotFoundException(crate::types::error::ResourceNotFoundException),
14 ThrottlingException(crate::types::error::ThrottlingException),
16 ValidationException(crate::types::error::ValidationException),
18 #[deprecated(note = "Matching `Unhandled` directly is not forwards compatible. Instead, match using a \
20 variable wildcard pattern and check `.code()`:
21 \
22 `err if err.code() == Some(\"SpecificExceptionCode\") => { /* handle the error */ }`
23 \
24 See [`ProvideErrorMetadata`](#impl-ProvideErrorMetadata-for-Error) for what information is available for the error.")]
25 Unhandled(crate::error::sealed_unhandled::Unhandled),
26}
27impl ::std::fmt::Display for Error {
28 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
29 match self {
30 Error::AccessDeniedException(inner) => inner.fmt(f),
31 Error::ConflictException(inner) => inner.fmt(f),
32 Error::InternalServerException(inner) => inner.fmt(f),
33 Error::ResourceNotFoundException(inner) => inner.fmt(f),
34 Error::ThrottlingException(inner) => inner.fmt(f),
35 Error::ValidationException(inner) => inner.fmt(f),
36 Error::Unhandled(_) => {
37 if let ::std::option::Option::Some(code) = ::aws_smithy_types::error::metadata::ProvideErrorMetadata::code(self) {
38 write!(f, "unhandled error ({code})")
39 } else {
40 f.write_str("unhandled error")
41 }
42 }
43 }
44 }
45}
46impl From<::aws_smithy_types::error::operation::BuildError> for Error {
47 fn from(value: ::aws_smithy_types::error::operation::BuildError) -> Self {
48 Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
49 source: value.into(),
50 meta: ::std::default::Default::default(),
51 })
52 }
53}
54impl ::aws_smithy_types::error::metadata::ProvideErrorMetadata for Error {
55 fn meta(&self) -> &::aws_smithy_types::error::metadata::ErrorMetadata {
56 match self {
57 Self::AccessDeniedException(inner) => inner.meta(),
58 Self::ConflictException(inner) => inner.meta(),
59 Self::InternalServerException(inner) => inner.meta(),
60 Self::ResourceNotFoundException(inner) => inner.meta(),
61 Self::ThrottlingException(inner) => inner.meta(),
62 Self::ValidationException(inner) => inner.meta(),
63 Self::Unhandled(inner) => &inner.meta,
64 }
65 }
66}
67impl<R>
68 From<
69 ::aws_smithy_runtime_api::client::result::SdkError<
70 crate::operation::batch_update_recommendation_resource_exclusion::BatchUpdateRecommendationResourceExclusionError,
71 R,
72 >,
73 > for Error
74where
75 R: Send + Sync + std::fmt::Debug + 'static,
76{
77 fn from(
78 err: ::aws_smithy_runtime_api::client::result::SdkError<
79 crate::operation::batch_update_recommendation_resource_exclusion::BatchUpdateRecommendationResourceExclusionError,
80 R,
81 >,
82 ) -> Self {
83 match err {
84 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
85 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
86 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
87 source: err.into(),
88 }),
89 }
90 }
91}
92impl From<crate::operation::batch_update_recommendation_resource_exclusion::BatchUpdateRecommendationResourceExclusionError> for Error {
93 fn from(err: crate::operation::batch_update_recommendation_resource_exclusion::BatchUpdateRecommendationResourceExclusionError) -> Self {
94 match err {
95 crate::operation::batch_update_recommendation_resource_exclusion::BatchUpdateRecommendationResourceExclusionError::AccessDeniedException(inner) => Error::AccessDeniedException(inner),
96 crate::operation::batch_update_recommendation_resource_exclusion::BatchUpdateRecommendationResourceExclusionError::ConflictException(inner) => Error::ConflictException(inner),
97 crate::operation::batch_update_recommendation_resource_exclusion::BatchUpdateRecommendationResourceExclusionError::InternalServerException(inner) => Error::InternalServerException(inner),
98 crate::operation::batch_update_recommendation_resource_exclusion::BatchUpdateRecommendationResourceExclusionError::ThrottlingException(inner) => Error::ThrottlingException(inner),
99 crate::operation::batch_update_recommendation_resource_exclusion::BatchUpdateRecommendationResourceExclusionError::ValidationException(inner) => Error::ValidationException(inner),
100 crate::operation::batch_update_recommendation_resource_exclusion::BatchUpdateRecommendationResourceExclusionError::Unhandled(inner) => Error::Unhandled(inner),
101 }
102 }
103}
104impl<R>
105 From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::get_organization_recommendation::GetOrganizationRecommendationError, R>>
106 for Error
107where
108 R: Send + Sync + std::fmt::Debug + 'static,
109{
110 fn from(
111 err: ::aws_smithy_runtime_api::client::result::SdkError<
112 crate::operation::get_organization_recommendation::GetOrganizationRecommendationError,
113 R,
114 >,
115 ) -> Self {
116 match err {
117 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
118 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
119 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
120 source: err.into(),
121 }),
122 }
123 }
124}
125impl From<crate::operation::get_organization_recommendation::GetOrganizationRecommendationError> for Error {
126 fn from(err: crate::operation::get_organization_recommendation::GetOrganizationRecommendationError) -> Self {
127 match err {
128 crate::operation::get_organization_recommendation::GetOrganizationRecommendationError::AccessDeniedException(inner) => {
129 Error::AccessDeniedException(inner)
130 }
131 crate::operation::get_organization_recommendation::GetOrganizationRecommendationError::InternalServerException(inner) => {
132 Error::InternalServerException(inner)
133 }
134 crate::operation::get_organization_recommendation::GetOrganizationRecommendationError::ResourceNotFoundException(inner) => {
135 Error::ResourceNotFoundException(inner)
136 }
137 crate::operation::get_organization_recommendation::GetOrganizationRecommendationError::ThrottlingException(inner) => {
138 Error::ThrottlingException(inner)
139 }
140 crate::operation::get_organization_recommendation::GetOrganizationRecommendationError::ValidationException(inner) => {
141 Error::ValidationException(inner)
142 }
143 crate::operation::get_organization_recommendation::GetOrganizationRecommendationError::Unhandled(inner) => Error::Unhandled(inner),
144 }
145 }
146}
147impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::get_recommendation::GetRecommendationError, R>> for Error
148where
149 R: Send + Sync + std::fmt::Debug + 'static,
150{
151 fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::get_recommendation::GetRecommendationError, R>) -> Self {
152 match err {
153 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
154 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
155 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
156 source: err.into(),
157 }),
158 }
159 }
160}
161impl From<crate::operation::get_recommendation::GetRecommendationError> for Error {
162 fn from(err: crate::operation::get_recommendation::GetRecommendationError) -> Self {
163 match err {
164 crate::operation::get_recommendation::GetRecommendationError::AccessDeniedException(inner) => Error::AccessDeniedException(inner),
165 crate::operation::get_recommendation::GetRecommendationError::InternalServerException(inner) => Error::InternalServerException(inner),
166 crate::operation::get_recommendation::GetRecommendationError::ResourceNotFoundException(inner) => Error::ResourceNotFoundException(inner),
167 crate::operation::get_recommendation::GetRecommendationError::ThrottlingException(inner) => Error::ThrottlingException(inner),
168 crate::operation::get_recommendation::GetRecommendationError::ValidationException(inner) => Error::ValidationException(inner),
169 crate::operation::get_recommendation::GetRecommendationError::Unhandled(inner) => Error::Unhandled(inner),
170 }
171 }
172}
173impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::list_checks::ListChecksError, 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::list_checks::ListChecksError, 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::list_checks::ListChecksError> for Error {
188 fn from(err: crate::operation::list_checks::ListChecksError) -> Self {
189 match err {
190 crate::operation::list_checks::ListChecksError::AccessDeniedException(inner) => Error::AccessDeniedException(inner),
191 crate::operation::list_checks::ListChecksError::InternalServerException(inner) => Error::InternalServerException(inner),
192 crate::operation::list_checks::ListChecksError::ThrottlingException(inner) => Error::ThrottlingException(inner),
193 crate::operation::list_checks::ListChecksError::ValidationException(inner) => Error::ValidationException(inner),
194 crate::operation::list_checks::ListChecksError::Unhandled(inner) => Error::Unhandled(inner),
195 }
196 }
197}
198impl<R>
199 From<
200 ::aws_smithy_runtime_api::client::result::SdkError<
201 crate::operation::list_organization_recommendation_accounts::ListOrganizationRecommendationAccountsError,
202 R,
203 >,
204 > for Error
205where
206 R: Send + Sync + std::fmt::Debug + 'static,
207{
208 fn from(
209 err: ::aws_smithy_runtime_api::client::result::SdkError<
210 crate::operation::list_organization_recommendation_accounts::ListOrganizationRecommendationAccountsError,
211 R,
212 >,
213 ) -> Self {
214 match err {
215 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
216 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
217 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
218 source: err.into(),
219 }),
220 }
221 }
222}
223impl From<crate::operation::list_organization_recommendation_accounts::ListOrganizationRecommendationAccountsError> for Error {
224 fn from(err: crate::operation::list_organization_recommendation_accounts::ListOrganizationRecommendationAccountsError) -> Self {
225 match err {
226 crate::operation::list_organization_recommendation_accounts::ListOrganizationRecommendationAccountsError::AccessDeniedException(
227 inner,
228 ) => Error::AccessDeniedException(inner),
229 crate::operation::list_organization_recommendation_accounts::ListOrganizationRecommendationAccountsError::InternalServerException(
230 inner,
231 ) => Error::InternalServerException(inner),
232 crate::operation::list_organization_recommendation_accounts::ListOrganizationRecommendationAccountsError::ResourceNotFoundException(
233 inner,
234 ) => Error::ResourceNotFoundException(inner),
235 crate::operation::list_organization_recommendation_accounts::ListOrganizationRecommendationAccountsError::ThrottlingException(inner) => {
236 Error::ThrottlingException(inner)
237 }
238 crate::operation::list_organization_recommendation_accounts::ListOrganizationRecommendationAccountsError::ValidationException(inner) => {
239 Error::ValidationException(inner)
240 }
241 crate::operation::list_organization_recommendation_accounts::ListOrganizationRecommendationAccountsError::Unhandled(inner) => {
242 Error::Unhandled(inner)
243 }
244 }
245 }
246}
247impl<R>
248 From<
249 ::aws_smithy_runtime_api::client::result::SdkError<
250 crate::operation::list_organization_recommendation_resources::ListOrganizationRecommendationResourcesError,
251 R,
252 >,
253 > for Error
254where
255 R: Send + Sync + std::fmt::Debug + 'static,
256{
257 fn from(
258 err: ::aws_smithy_runtime_api::client::result::SdkError<
259 crate::operation::list_organization_recommendation_resources::ListOrganizationRecommendationResourcesError,
260 R,
261 >,
262 ) -> Self {
263 match err {
264 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
265 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
266 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
267 source: err.into(),
268 }),
269 }
270 }
271}
272impl From<crate::operation::list_organization_recommendation_resources::ListOrganizationRecommendationResourcesError> for Error {
273 fn from(err: crate::operation::list_organization_recommendation_resources::ListOrganizationRecommendationResourcesError) -> Self {
274 match err {
275 crate::operation::list_organization_recommendation_resources::ListOrganizationRecommendationResourcesError::AccessDeniedException(
276 inner,
277 ) => Error::AccessDeniedException(inner),
278 crate::operation::list_organization_recommendation_resources::ListOrganizationRecommendationResourcesError::InternalServerException(
279 inner,
280 ) => Error::InternalServerException(inner),
281 crate::operation::list_organization_recommendation_resources::ListOrganizationRecommendationResourcesError::ResourceNotFoundException(
282 inner,
283 ) => Error::ResourceNotFoundException(inner),
284 crate::operation::list_organization_recommendation_resources::ListOrganizationRecommendationResourcesError::ThrottlingException(
285 inner,
286 ) => Error::ThrottlingException(inner),
287 crate::operation::list_organization_recommendation_resources::ListOrganizationRecommendationResourcesError::ValidationException(
288 inner,
289 ) => Error::ValidationException(inner),
290 crate::operation::list_organization_recommendation_resources::ListOrganizationRecommendationResourcesError::Unhandled(inner) => {
291 Error::Unhandled(inner)
292 }
293 }
294 }
295}
296impl<R>
297 From<
298 ::aws_smithy_runtime_api::client::result::SdkError<
299 crate::operation::list_organization_recommendations::ListOrganizationRecommendationsError,
300 R,
301 >,
302 > for Error
303where
304 R: Send + Sync + std::fmt::Debug + 'static,
305{
306 fn from(
307 err: ::aws_smithy_runtime_api::client::result::SdkError<
308 crate::operation::list_organization_recommendations::ListOrganizationRecommendationsError,
309 R,
310 >,
311 ) -> Self {
312 match err {
313 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
314 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
315 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
316 source: err.into(),
317 }),
318 }
319 }
320}
321impl From<crate::operation::list_organization_recommendations::ListOrganizationRecommendationsError> for Error {
322 fn from(err: crate::operation::list_organization_recommendations::ListOrganizationRecommendationsError) -> Self {
323 match err {
324 crate::operation::list_organization_recommendations::ListOrganizationRecommendationsError::AccessDeniedException(inner) => {
325 Error::AccessDeniedException(inner)
326 }
327 crate::operation::list_organization_recommendations::ListOrganizationRecommendationsError::InternalServerException(inner) => {
328 Error::InternalServerException(inner)
329 }
330 crate::operation::list_organization_recommendations::ListOrganizationRecommendationsError::ThrottlingException(inner) => {
331 Error::ThrottlingException(inner)
332 }
333 crate::operation::list_organization_recommendations::ListOrganizationRecommendationsError::ValidationException(inner) => {
334 Error::ValidationException(inner)
335 }
336 crate::operation::list_organization_recommendations::ListOrganizationRecommendationsError::Unhandled(inner) => Error::Unhandled(inner),
337 }
338 }
339}
340impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::list_recommendation_resources::ListRecommendationResourcesError, R>>
341 for Error
342where
343 R: Send + Sync + std::fmt::Debug + 'static,
344{
345 fn from(
346 err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::list_recommendation_resources::ListRecommendationResourcesError, R>,
347 ) -> Self {
348 match err {
349 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
350 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
351 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
352 source: err.into(),
353 }),
354 }
355 }
356}
357impl From<crate::operation::list_recommendation_resources::ListRecommendationResourcesError> for Error {
358 fn from(err: crate::operation::list_recommendation_resources::ListRecommendationResourcesError) -> Self {
359 match err {
360 crate::operation::list_recommendation_resources::ListRecommendationResourcesError::AccessDeniedException(inner) => {
361 Error::AccessDeniedException(inner)
362 }
363 crate::operation::list_recommendation_resources::ListRecommendationResourcesError::InternalServerException(inner) => {
364 Error::InternalServerException(inner)
365 }
366 crate::operation::list_recommendation_resources::ListRecommendationResourcesError::ResourceNotFoundException(inner) => {
367 Error::ResourceNotFoundException(inner)
368 }
369 crate::operation::list_recommendation_resources::ListRecommendationResourcesError::ThrottlingException(inner) => {
370 Error::ThrottlingException(inner)
371 }
372 crate::operation::list_recommendation_resources::ListRecommendationResourcesError::ValidationException(inner) => {
373 Error::ValidationException(inner)
374 }
375 crate::operation::list_recommendation_resources::ListRecommendationResourcesError::Unhandled(inner) => Error::Unhandled(inner),
376 }
377 }
378}
379impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::list_recommendations::ListRecommendationsError, R>> for Error
380where
381 R: Send + Sync + std::fmt::Debug + 'static,
382{
383 fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::list_recommendations::ListRecommendationsError, R>) -> Self {
384 match err {
385 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
386 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
387 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
388 source: err.into(),
389 }),
390 }
391 }
392}
393impl From<crate::operation::list_recommendations::ListRecommendationsError> for Error {
394 fn from(err: crate::operation::list_recommendations::ListRecommendationsError) -> Self {
395 match err {
396 crate::operation::list_recommendations::ListRecommendationsError::AccessDeniedException(inner) => Error::AccessDeniedException(inner),
397 crate::operation::list_recommendations::ListRecommendationsError::InternalServerException(inner) => Error::InternalServerException(inner),
398 crate::operation::list_recommendations::ListRecommendationsError::ThrottlingException(inner) => Error::ThrottlingException(inner),
399 crate::operation::list_recommendations::ListRecommendationsError::ValidationException(inner) => Error::ValidationException(inner),
400 crate::operation::list_recommendations::ListRecommendationsError::Unhandled(inner) => Error::Unhandled(inner),
401 }
402 }
403}
404impl<R>
405 From<
406 ::aws_smithy_runtime_api::client::result::SdkError<
407 crate::operation::update_organization_recommendation_lifecycle::UpdateOrganizationRecommendationLifecycleError,
408 R,
409 >,
410 > for Error
411where
412 R: Send + Sync + std::fmt::Debug + 'static,
413{
414 fn from(
415 err: ::aws_smithy_runtime_api::client::result::SdkError<
416 crate::operation::update_organization_recommendation_lifecycle::UpdateOrganizationRecommendationLifecycleError,
417 R,
418 >,
419 ) -> Self {
420 match err {
421 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
422 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
423 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
424 source: err.into(),
425 }),
426 }
427 }
428}
429impl From<crate::operation::update_organization_recommendation_lifecycle::UpdateOrganizationRecommendationLifecycleError> for Error {
430 fn from(err: crate::operation::update_organization_recommendation_lifecycle::UpdateOrganizationRecommendationLifecycleError) -> Self {
431 match err {
432 crate::operation::update_organization_recommendation_lifecycle::UpdateOrganizationRecommendationLifecycleError::AccessDeniedException(inner) => Error::AccessDeniedException(inner),
433 crate::operation::update_organization_recommendation_lifecycle::UpdateOrganizationRecommendationLifecycleError::ConflictException(inner) => Error::ConflictException(inner),
434 crate::operation::update_organization_recommendation_lifecycle::UpdateOrganizationRecommendationLifecycleError::InternalServerException(inner) => Error::InternalServerException(inner),
435 crate::operation::update_organization_recommendation_lifecycle::UpdateOrganizationRecommendationLifecycleError::ResourceNotFoundException(inner) => Error::ResourceNotFoundException(inner),
436 crate::operation::update_organization_recommendation_lifecycle::UpdateOrganizationRecommendationLifecycleError::ThrottlingException(inner) => Error::ThrottlingException(inner),
437 crate::operation::update_organization_recommendation_lifecycle::UpdateOrganizationRecommendationLifecycleError::ValidationException(inner) => Error::ValidationException(inner),
438 crate::operation::update_organization_recommendation_lifecycle::UpdateOrganizationRecommendationLifecycleError::Unhandled(inner) => Error::Unhandled(inner),
439 }
440 }
441}
442impl<R>
443 From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::update_recommendation_lifecycle::UpdateRecommendationLifecycleError, R>>
444 for Error
445where
446 R: Send + Sync + std::fmt::Debug + 'static,
447{
448 fn from(
449 err: ::aws_smithy_runtime_api::client::result::SdkError<
450 crate::operation::update_recommendation_lifecycle::UpdateRecommendationLifecycleError,
451 R,
452 >,
453 ) -> Self {
454 match err {
455 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
456 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
457 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
458 source: err.into(),
459 }),
460 }
461 }
462}
463impl From<crate::operation::update_recommendation_lifecycle::UpdateRecommendationLifecycleError> for Error {
464 fn from(err: crate::operation::update_recommendation_lifecycle::UpdateRecommendationLifecycleError) -> Self {
465 match err {
466 crate::operation::update_recommendation_lifecycle::UpdateRecommendationLifecycleError::AccessDeniedException(inner) => {
467 Error::AccessDeniedException(inner)
468 }
469 crate::operation::update_recommendation_lifecycle::UpdateRecommendationLifecycleError::ConflictException(inner) => {
470 Error::ConflictException(inner)
471 }
472 crate::operation::update_recommendation_lifecycle::UpdateRecommendationLifecycleError::InternalServerException(inner) => {
473 Error::InternalServerException(inner)
474 }
475 crate::operation::update_recommendation_lifecycle::UpdateRecommendationLifecycleError::ResourceNotFoundException(inner) => {
476 Error::ResourceNotFoundException(inner)
477 }
478 crate::operation::update_recommendation_lifecycle::UpdateRecommendationLifecycleError::ThrottlingException(inner) => {
479 Error::ThrottlingException(inner)
480 }
481 crate::operation::update_recommendation_lifecycle::UpdateRecommendationLifecycleError::ValidationException(inner) => {
482 Error::ValidationException(inner)
483 }
484 crate::operation::update_recommendation_lifecycle::UpdateRecommendationLifecycleError::Unhandled(inner) => Error::Unhandled(inner),
485 }
486 }
487}
488impl ::std::error::Error for Error {
489 fn source(&self) -> std::option::Option<&(dyn ::std::error::Error + 'static)> {
490 match self {
491 Error::AccessDeniedException(inner) => inner.source(),
492 Error::ConflictException(inner) => inner.source(),
493 Error::InternalServerException(inner) => inner.source(),
494 Error::ResourceNotFoundException(inner) => inner.source(),
495 Error::ThrottlingException(inner) => inner.source(),
496 Error::ValidationException(inner) => inner.source(),
497 Error::Unhandled(inner) => ::std::option::Option::Some(&*inner.source),
498 }
499 }
500}
501impl ::aws_types::request_id::RequestId for Error {
502 fn request_id(&self) -> Option<&str> {
503 match self {
504 Self::AccessDeniedException(e) => e.request_id(),
505 Self::ConflictException(e) => e.request_id(),
506 Self::InternalServerException(e) => e.request_id(),
507 Self::ResourceNotFoundException(e) => e.request_id(),
508 Self::ThrottlingException(e) => e.request_id(),
509 Self::ValidationException(e) => e.request_id(),
510 Self::Unhandled(e) => e.meta.request_id(),
511 }
512 }
513}