Skip to main content

aws_sdk_pi/
error_meta.rs

1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2/// All possible error types for this service.
3#[non_exhaustive]
4#[derive(::std::fmt::Debug)]
5pub enum Error {
6    /// <p>The request failed due to an unknown error.</p>
7    InternalServiceError(crate::types::error::InternalServiceError),
8    /// <p>One of the arguments provided is invalid for this request.</p>
9    InvalidArgumentException(crate::types::error::InvalidArgumentException),
10    /// <p>The user is not authorized to perform this request.</p>
11    NotAuthorizedException(crate::types::error::NotAuthorizedException),
12    /// An unexpected error occurred (e.g., invalid JSON returned by the service or an unknown error code).
13    #[deprecated(note = "Matching `Unhandled` directly is not forwards compatible. Instead, match using a \
14    variable wildcard pattern and check `.code()`:
15     \
16    &nbsp;&nbsp;&nbsp;`err if err.code() == Some(\"SpecificExceptionCode\") => { /* handle the error */ }`
17     \
18    See [`ProvideErrorMetadata`](#impl-ProvideErrorMetadata-for-Error) for what information is available for the error.")]
19    Unhandled(crate::error::sealed_unhandled::Unhandled),
20}
21impl ::std::fmt::Display for Error {
22    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
23        match self {
24            Error::InternalServiceError(inner) => inner.fmt(f),
25            Error::InvalidArgumentException(inner) => inner.fmt(f),
26            Error::NotAuthorizedException(inner) => inner.fmt(f),
27            Error::Unhandled(_) => {
28                if let ::std::option::Option::Some(code) = ::aws_smithy_types::error::metadata::ProvideErrorMetadata::code(self) {
29                    write!(f, "unhandled error ({code})")
30                } else {
31                    f.write_str("unhandled error")
32                }
33            }
34        }
35    }
36}
37impl From<::aws_smithy_types::error::operation::BuildError> for Error {
38    fn from(value: ::aws_smithy_types::error::operation::BuildError) -> Self {
39        Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
40            source: value.into(),
41            meta: ::std::default::Default::default(),
42        })
43    }
44}
45impl ::aws_smithy_types::error::metadata::ProvideErrorMetadata for Error {
46    fn meta(&self) -> &::aws_smithy_types::error::metadata::ErrorMetadata {
47        match self {
48            Self::InternalServiceError(inner) => inner.meta(),
49            Self::InvalidArgumentException(inner) => inner.meta(),
50            Self::NotAuthorizedException(inner) => inner.meta(),
51            Self::Unhandled(inner) => &inner.meta,
52        }
53    }
54}
55impl<R>
56    From<
57        ::aws_smithy_runtime_api::client::result::SdkError<
58            crate::operation::create_performance_analysis_report::CreatePerformanceAnalysisReportError,
59            R,
60        >,
61    > for Error
62where
63    R: Send + Sync + std::fmt::Debug + 'static,
64{
65    fn from(
66        err: ::aws_smithy_runtime_api::client::result::SdkError<
67            crate::operation::create_performance_analysis_report::CreatePerformanceAnalysisReportError,
68            R,
69        >,
70    ) -> Self {
71        match err {
72            ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
73            _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
74                meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
75                source: err.into(),
76            }),
77        }
78    }
79}
80impl From<crate::operation::create_performance_analysis_report::CreatePerformanceAnalysisReportError> for Error {
81    fn from(err: crate::operation::create_performance_analysis_report::CreatePerformanceAnalysisReportError) -> Self {
82        match err {
83            crate::operation::create_performance_analysis_report::CreatePerformanceAnalysisReportError::InternalServiceError(inner) => {
84                Error::InternalServiceError(inner)
85            }
86            crate::operation::create_performance_analysis_report::CreatePerformanceAnalysisReportError::InvalidArgumentException(inner) => {
87                Error::InvalidArgumentException(inner)
88            }
89            crate::operation::create_performance_analysis_report::CreatePerformanceAnalysisReportError::NotAuthorizedException(inner) => {
90                Error::NotAuthorizedException(inner)
91            }
92            crate::operation::create_performance_analysis_report::CreatePerformanceAnalysisReportError::Unhandled(inner) => Error::Unhandled(inner),
93        }
94    }
95}
96impl<R>
97    From<
98        ::aws_smithy_runtime_api::client::result::SdkError<
99            crate::operation::delete_performance_analysis_report::DeletePerformanceAnalysisReportError,
100            R,
101        >,
102    > for Error
103where
104    R: Send + Sync + std::fmt::Debug + 'static,
105{
106    fn from(
107        err: ::aws_smithy_runtime_api::client::result::SdkError<
108            crate::operation::delete_performance_analysis_report::DeletePerformanceAnalysisReportError,
109            R,
110        >,
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::delete_performance_analysis_report::DeletePerformanceAnalysisReportError> for Error {
122    fn from(err: crate::operation::delete_performance_analysis_report::DeletePerformanceAnalysisReportError) -> Self {
123        match err {
124            crate::operation::delete_performance_analysis_report::DeletePerformanceAnalysisReportError::InternalServiceError(inner) => {
125                Error::InternalServiceError(inner)
126            }
127            crate::operation::delete_performance_analysis_report::DeletePerformanceAnalysisReportError::InvalidArgumentException(inner) => {
128                Error::InvalidArgumentException(inner)
129            }
130            crate::operation::delete_performance_analysis_report::DeletePerformanceAnalysisReportError::NotAuthorizedException(inner) => {
131                Error::NotAuthorizedException(inner)
132            }
133            crate::operation::delete_performance_analysis_report::DeletePerformanceAnalysisReportError::Unhandled(inner) => Error::Unhandled(inner),
134        }
135    }
136}
137impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::describe_dimension_keys::DescribeDimensionKeysError, R>> for Error
138where
139    R: Send + Sync + std::fmt::Debug + 'static,
140{
141    fn from(
142        err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::describe_dimension_keys::DescribeDimensionKeysError, R>,
143    ) -> Self {
144        match err {
145            ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
146            _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
147                meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
148                source: err.into(),
149            }),
150        }
151    }
152}
153impl From<crate::operation::describe_dimension_keys::DescribeDimensionKeysError> for Error {
154    fn from(err: crate::operation::describe_dimension_keys::DescribeDimensionKeysError) -> Self {
155        match err {
156            crate::operation::describe_dimension_keys::DescribeDimensionKeysError::InternalServiceError(inner) => Error::InternalServiceError(inner),
157            crate::operation::describe_dimension_keys::DescribeDimensionKeysError::InvalidArgumentException(inner) => {
158                Error::InvalidArgumentException(inner)
159            }
160            crate::operation::describe_dimension_keys::DescribeDimensionKeysError::NotAuthorizedException(inner) => {
161                Error::NotAuthorizedException(inner)
162            }
163            crate::operation::describe_dimension_keys::DescribeDimensionKeysError::Unhandled(inner) => Error::Unhandled(inner),
164        }
165    }
166}
167impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::get_dimension_key_details::GetDimensionKeyDetailsError, R>>
168    for Error
169where
170    R: Send + Sync + std::fmt::Debug + 'static,
171{
172    fn from(
173        err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::get_dimension_key_details::GetDimensionKeyDetailsError, R>,
174    ) -> Self {
175        match err {
176            ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
177            _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
178                meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
179                source: err.into(),
180            }),
181        }
182    }
183}
184impl From<crate::operation::get_dimension_key_details::GetDimensionKeyDetailsError> for Error {
185    fn from(err: crate::operation::get_dimension_key_details::GetDimensionKeyDetailsError) -> Self {
186        match err {
187            crate::operation::get_dimension_key_details::GetDimensionKeyDetailsError::InternalServiceError(inner) => {
188                Error::InternalServiceError(inner)
189            }
190            crate::operation::get_dimension_key_details::GetDimensionKeyDetailsError::InvalidArgumentException(inner) => {
191                Error::InvalidArgumentException(inner)
192            }
193            crate::operation::get_dimension_key_details::GetDimensionKeyDetailsError::NotAuthorizedException(inner) => {
194                Error::NotAuthorizedException(inner)
195            }
196            crate::operation::get_dimension_key_details::GetDimensionKeyDetailsError::Unhandled(inner) => Error::Unhandled(inner),
197        }
198    }
199}
200impl<R>
201    From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::get_performance_analysis_report::GetPerformanceAnalysisReportError, R>>
202    for Error
203where
204    R: Send + Sync + std::fmt::Debug + 'static,
205{
206    fn from(
207        err: ::aws_smithy_runtime_api::client::result::SdkError<
208            crate::operation::get_performance_analysis_report::GetPerformanceAnalysisReportError,
209            R,
210        >,
211    ) -> Self {
212        match err {
213            ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
214            _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
215                meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
216                source: err.into(),
217            }),
218        }
219    }
220}
221impl From<crate::operation::get_performance_analysis_report::GetPerformanceAnalysisReportError> for Error {
222    fn from(err: crate::operation::get_performance_analysis_report::GetPerformanceAnalysisReportError) -> Self {
223        match err {
224            crate::operation::get_performance_analysis_report::GetPerformanceAnalysisReportError::InternalServiceError(inner) => {
225                Error::InternalServiceError(inner)
226            }
227            crate::operation::get_performance_analysis_report::GetPerformanceAnalysisReportError::InvalidArgumentException(inner) => {
228                Error::InvalidArgumentException(inner)
229            }
230            crate::operation::get_performance_analysis_report::GetPerformanceAnalysisReportError::NotAuthorizedException(inner) => {
231                Error::NotAuthorizedException(inner)
232            }
233            crate::operation::get_performance_analysis_report::GetPerformanceAnalysisReportError::Unhandled(inner) => Error::Unhandled(inner),
234        }
235    }
236}
237impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::get_resource_metadata::GetResourceMetadataError, R>> for Error
238where
239    R: Send + Sync + std::fmt::Debug + 'static,
240{
241    fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::get_resource_metadata::GetResourceMetadataError, R>) -> Self {
242        match err {
243            ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
244            _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
245                meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
246                source: err.into(),
247            }),
248        }
249    }
250}
251impl From<crate::operation::get_resource_metadata::GetResourceMetadataError> for Error {
252    fn from(err: crate::operation::get_resource_metadata::GetResourceMetadataError) -> Self {
253        match err {
254            crate::operation::get_resource_metadata::GetResourceMetadataError::InternalServiceError(inner) => Error::InternalServiceError(inner),
255            crate::operation::get_resource_metadata::GetResourceMetadataError::InvalidArgumentException(inner) => {
256                Error::InvalidArgumentException(inner)
257            }
258            crate::operation::get_resource_metadata::GetResourceMetadataError::NotAuthorizedException(inner) => Error::NotAuthorizedException(inner),
259            crate::operation::get_resource_metadata::GetResourceMetadataError::Unhandled(inner) => Error::Unhandled(inner),
260        }
261    }
262}
263impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::get_resource_metrics::GetResourceMetricsError, R>> for Error
264where
265    R: Send + Sync + std::fmt::Debug + 'static,
266{
267    fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::get_resource_metrics::GetResourceMetricsError, R>) -> Self {
268        match err {
269            ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
270            _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
271                meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
272                source: err.into(),
273            }),
274        }
275    }
276}
277impl From<crate::operation::get_resource_metrics::GetResourceMetricsError> for Error {
278    fn from(err: crate::operation::get_resource_metrics::GetResourceMetricsError) -> Self {
279        match err {
280            crate::operation::get_resource_metrics::GetResourceMetricsError::InternalServiceError(inner) => Error::InternalServiceError(inner),
281            crate::operation::get_resource_metrics::GetResourceMetricsError::InvalidArgumentException(inner) => {
282                Error::InvalidArgumentException(inner)
283            }
284            crate::operation::get_resource_metrics::GetResourceMetricsError::NotAuthorizedException(inner) => Error::NotAuthorizedException(inner),
285            crate::operation::get_resource_metrics::GetResourceMetricsError::Unhandled(inner) => Error::Unhandled(inner),
286        }
287    }
288}
289impl<R>
290    From<
291        ::aws_smithy_runtime_api::client::result::SdkError<
292            crate::operation::list_available_resource_dimensions::ListAvailableResourceDimensionsError,
293            R,
294        >,
295    > for Error
296where
297    R: Send + Sync + std::fmt::Debug + 'static,
298{
299    fn from(
300        err: ::aws_smithy_runtime_api::client::result::SdkError<
301            crate::operation::list_available_resource_dimensions::ListAvailableResourceDimensionsError,
302            R,
303        >,
304    ) -> Self {
305        match err {
306            ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
307            _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
308                meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
309                source: err.into(),
310            }),
311        }
312    }
313}
314impl From<crate::operation::list_available_resource_dimensions::ListAvailableResourceDimensionsError> for Error {
315    fn from(err: crate::operation::list_available_resource_dimensions::ListAvailableResourceDimensionsError) -> Self {
316        match err {
317            crate::operation::list_available_resource_dimensions::ListAvailableResourceDimensionsError::InternalServiceError(inner) => {
318                Error::InternalServiceError(inner)
319            }
320            crate::operation::list_available_resource_dimensions::ListAvailableResourceDimensionsError::InvalidArgumentException(inner) => {
321                Error::InvalidArgumentException(inner)
322            }
323            crate::operation::list_available_resource_dimensions::ListAvailableResourceDimensionsError::NotAuthorizedException(inner) => {
324                Error::NotAuthorizedException(inner)
325            }
326            crate::operation::list_available_resource_dimensions::ListAvailableResourceDimensionsError::Unhandled(inner) => Error::Unhandled(inner),
327        }
328    }
329}
330impl<R>
331    From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::list_available_resource_metrics::ListAvailableResourceMetricsError, 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::list_available_resource_metrics::ListAvailableResourceMetricsError,
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::list_available_resource_metrics::ListAvailableResourceMetricsError> for Error {
352    fn from(err: crate::operation::list_available_resource_metrics::ListAvailableResourceMetricsError) -> Self {
353        match err {
354            crate::operation::list_available_resource_metrics::ListAvailableResourceMetricsError::InternalServiceError(inner) => {
355                Error::InternalServiceError(inner)
356            }
357            crate::operation::list_available_resource_metrics::ListAvailableResourceMetricsError::InvalidArgumentException(inner) => {
358                Error::InvalidArgumentException(inner)
359            }
360            crate::operation::list_available_resource_metrics::ListAvailableResourceMetricsError::NotAuthorizedException(inner) => {
361                Error::NotAuthorizedException(inner)
362            }
363            crate::operation::list_available_resource_metrics::ListAvailableResourceMetricsError::Unhandled(inner) => Error::Unhandled(inner),
364        }
365    }
366}
367impl<R>
368    From<
369        ::aws_smithy_runtime_api::client::result::SdkError<
370            crate::operation::list_performance_analysis_report_recommendations::ListPerformanceAnalysisReportRecommendationsError,
371            R,
372        >,
373    > for Error
374where
375    R: Send + Sync + std::fmt::Debug + 'static,
376{
377    fn from(
378        err: ::aws_smithy_runtime_api::client::result::SdkError<
379            crate::operation::list_performance_analysis_report_recommendations::ListPerformanceAnalysisReportRecommendationsError,
380            R,
381        >,
382    ) -> Self {
383        match err {
384            ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
385            _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
386                meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
387                source: err.into(),
388            }),
389        }
390    }
391}
392impl From<crate::operation::list_performance_analysis_report_recommendations::ListPerformanceAnalysisReportRecommendationsError> for Error {
393    fn from(err: crate::operation::list_performance_analysis_report_recommendations::ListPerformanceAnalysisReportRecommendationsError) -> Self {
394        match err {
395            crate::operation::list_performance_analysis_report_recommendations::ListPerformanceAnalysisReportRecommendationsError::InternalServiceError(inner) => Error::InternalServiceError(inner),
396            crate::operation::list_performance_analysis_report_recommendations::ListPerformanceAnalysisReportRecommendationsError::InvalidArgumentException(inner) => Error::InvalidArgumentException(inner),
397            crate::operation::list_performance_analysis_report_recommendations::ListPerformanceAnalysisReportRecommendationsError::NotAuthorizedException(inner) => Error::NotAuthorizedException(inner),
398            crate::operation::list_performance_analysis_report_recommendations::ListPerformanceAnalysisReportRecommendationsError::Unhandled(inner) => Error::Unhandled(inner),
399        }
400    }
401}
402impl<R>
403    From<
404        ::aws_smithy_runtime_api::client::result::SdkError<
405            crate::operation::list_performance_analysis_reports::ListPerformanceAnalysisReportsError,
406            R,
407        >,
408    > for Error
409where
410    R: Send + Sync + std::fmt::Debug + 'static,
411{
412    fn from(
413        err: ::aws_smithy_runtime_api::client::result::SdkError<
414            crate::operation::list_performance_analysis_reports::ListPerformanceAnalysisReportsError,
415            R,
416        >,
417    ) -> Self {
418        match err {
419            ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
420            _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
421                meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
422                source: err.into(),
423            }),
424        }
425    }
426}
427impl From<crate::operation::list_performance_analysis_reports::ListPerformanceAnalysisReportsError> for Error {
428    fn from(err: crate::operation::list_performance_analysis_reports::ListPerformanceAnalysisReportsError) -> Self {
429        match err {
430            crate::operation::list_performance_analysis_reports::ListPerformanceAnalysisReportsError::InternalServiceError(inner) => {
431                Error::InternalServiceError(inner)
432            }
433            crate::operation::list_performance_analysis_reports::ListPerformanceAnalysisReportsError::InvalidArgumentException(inner) => {
434                Error::InvalidArgumentException(inner)
435            }
436            crate::operation::list_performance_analysis_reports::ListPerformanceAnalysisReportsError::NotAuthorizedException(inner) => {
437                Error::NotAuthorizedException(inner)
438            }
439            crate::operation::list_performance_analysis_reports::ListPerformanceAnalysisReportsError::Unhandled(inner) => Error::Unhandled(inner),
440        }
441    }
442}
443impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::list_tags_for_resource::ListTagsForResourceError, R>> for Error
444where
445    R: Send + Sync + std::fmt::Debug + 'static,
446{
447    fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::list_tags_for_resource::ListTagsForResourceError, R>) -> Self {
448        match err {
449            ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
450            _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
451                meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
452                source: err.into(),
453            }),
454        }
455    }
456}
457impl From<crate::operation::list_tags_for_resource::ListTagsForResourceError> for Error {
458    fn from(err: crate::operation::list_tags_for_resource::ListTagsForResourceError) -> Self {
459        match err {
460            crate::operation::list_tags_for_resource::ListTagsForResourceError::InternalServiceError(inner) => Error::InternalServiceError(inner),
461            crate::operation::list_tags_for_resource::ListTagsForResourceError::InvalidArgumentException(inner) => {
462                Error::InvalidArgumentException(inner)
463            }
464            crate::operation::list_tags_for_resource::ListTagsForResourceError::NotAuthorizedException(inner) => Error::NotAuthorizedException(inner),
465            crate::operation::list_tags_for_resource::ListTagsForResourceError::Unhandled(inner) => Error::Unhandled(inner),
466        }
467    }
468}
469impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::tag_resource::TagResourceError, R>> for Error
470where
471    R: Send + Sync + std::fmt::Debug + 'static,
472{
473    fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::tag_resource::TagResourceError, R>) -> Self {
474        match err {
475            ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
476            _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
477                meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
478                source: err.into(),
479            }),
480        }
481    }
482}
483impl From<crate::operation::tag_resource::TagResourceError> for Error {
484    fn from(err: crate::operation::tag_resource::TagResourceError) -> Self {
485        match err {
486            crate::operation::tag_resource::TagResourceError::InternalServiceError(inner) => Error::InternalServiceError(inner),
487            crate::operation::tag_resource::TagResourceError::InvalidArgumentException(inner) => Error::InvalidArgumentException(inner),
488            crate::operation::tag_resource::TagResourceError::NotAuthorizedException(inner) => Error::NotAuthorizedException(inner),
489            crate::operation::tag_resource::TagResourceError::Unhandled(inner) => Error::Unhandled(inner),
490        }
491    }
492}
493impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::untag_resource::UntagResourceError, R>> for Error
494where
495    R: Send + Sync + std::fmt::Debug + 'static,
496{
497    fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::untag_resource::UntagResourceError, R>) -> Self {
498        match err {
499            ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
500            _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
501                meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
502                source: err.into(),
503            }),
504        }
505    }
506}
507impl From<crate::operation::untag_resource::UntagResourceError> for Error {
508    fn from(err: crate::operation::untag_resource::UntagResourceError) -> Self {
509        match err {
510            crate::operation::untag_resource::UntagResourceError::InternalServiceError(inner) => Error::InternalServiceError(inner),
511            crate::operation::untag_resource::UntagResourceError::InvalidArgumentException(inner) => Error::InvalidArgumentException(inner),
512            crate::operation::untag_resource::UntagResourceError::NotAuthorizedException(inner) => Error::NotAuthorizedException(inner),
513            crate::operation::untag_resource::UntagResourceError::Unhandled(inner) => Error::Unhandled(inner),
514        }
515    }
516}
517impl ::std::error::Error for Error {
518    fn source(&self) -> std::option::Option<&(dyn ::std::error::Error + 'static)> {
519        match self {
520            Error::InternalServiceError(inner) => inner.source(),
521            Error::InvalidArgumentException(inner) => inner.source(),
522            Error::NotAuthorizedException(inner) => inner.source(),
523            Error::Unhandled(inner) => ::std::option::Option::Some(&*inner.source),
524        }
525    }
526}
527impl ::aws_types::request_id::RequestId for Error {
528    fn request_id(&self) -> Option<&str> {
529        match self {
530            Self::InternalServiceError(e) => e.request_id(),
531            Self::InvalidArgumentException(e) => e.request_id(),
532            Self::NotAuthorizedException(e) => e.request_id(),
533            Self::Unhandled(e) => e.meta.request_id(),
534        }
535    }
536}