aws_sdk_xray/
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>A policy revision id was provided which does not match the latest policy revision. This exception is also if a policy revision id of 0 is provided via <code>PutResourcePolicy</code> and a policy with the same name already exists.</p>
7    InvalidPolicyRevisionIdException(crate::types::error::InvalidPolicyRevisionIdException),
8    /// <p>The request is missing required parameters or has invalid parameters.</p>
9    InvalidRequestException(crate::types::error::InvalidRequestException),
10    /// <p>The provided resource policy would prevent the caller of this request from calling PutResourcePolicy in the future.</p>
11    LockoutPreventionException(crate::types::error::LockoutPreventionException),
12    /// <p>Invalid policy document provided in request.</p>
13    MalformedPolicyDocumentException(crate::types::error::MalformedPolicyDocumentException),
14    /// <p>Exceeded the maximum number of resource policies for a target Amazon Web Services account.</p>
15    PolicyCountLimitExceededException(crate::types::error::PolicyCountLimitExceededException),
16    /// <p>Exceeded the maximum size for a resource policy.</p>
17    PolicySizeLimitExceededException(crate::types::error::PolicySizeLimitExceededException),
18    /// <p>The resource was not found. Verify that the name or Amazon Resource Name (ARN) of the resource is correct.</p>
19    ResourceNotFoundException(crate::types::error::ResourceNotFoundException),
20    /// <p>You have reached the maximum number of sampling rules.</p>
21    RuleLimitExceededException(crate::types::error::RuleLimitExceededException),
22    /// <p>The request exceeds the maximum number of requests per second.</p>
23    ThrottledException(crate::types::error::ThrottledException),
24    /// <p>You have exceeded the maximum number of tags you can apply to this resource.</p>
25    TooManyTagsException(crate::types::error::TooManyTagsException),
26    /// An unexpected error occurred (e.g., invalid JSON returned by the service or an unknown error code).
27    #[deprecated(note = "Matching `Unhandled` directly is not forwards compatible. Instead, match using a \
28    variable wildcard pattern and check `.code()`:
29     \
30    &nbsp;&nbsp;&nbsp;`err if err.code() == Some(\"SpecificExceptionCode\") => { /* handle the error */ }`
31     \
32    See [`ProvideErrorMetadata`](#impl-ProvideErrorMetadata-for-Error) for what information is available for the error.")]
33    Unhandled(crate::error::sealed_unhandled::Unhandled),
34}
35impl ::std::fmt::Display for Error {
36    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
37        match self {
38            Error::InvalidPolicyRevisionIdException(inner) => inner.fmt(f),
39            Error::InvalidRequestException(inner) => inner.fmt(f),
40            Error::LockoutPreventionException(inner) => inner.fmt(f),
41            Error::MalformedPolicyDocumentException(inner) => inner.fmt(f),
42            Error::PolicyCountLimitExceededException(inner) => inner.fmt(f),
43            Error::PolicySizeLimitExceededException(inner) => inner.fmt(f),
44            Error::ResourceNotFoundException(inner) => inner.fmt(f),
45            Error::RuleLimitExceededException(inner) => inner.fmt(f),
46            Error::ThrottledException(inner) => inner.fmt(f),
47            Error::TooManyTagsException(inner) => inner.fmt(f),
48            Error::Unhandled(_) => {
49                if let ::std::option::Option::Some(code) = ::aws_smithy_types::error::metadata::ProvideErrorMetadata::code(self) {
50                    write!(f, "unhandled error ({code})")
51                } else {
52                    f.write_str("unhandled error")
53                }
54            }
55        }
56    }
57}
58impl From<::aws_smithy_types::error::operation::BuildError> for Error {
59    fn from(value: ::aws_smithy_types::error::operation::BuildError) -> Self {
60        Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
61            source: value.into(),
62            meta: ::std::default::Default::default(),
63        })
64    }
65}
66impl ::aws_smithy_types::error::metadata::ProvideErrorMetadata for Error {
67    fn meta(&self) -> &::aws_smithy_types::error::metadata::ErrorMetadata {
68        match self {
69            Self::InvalidPolicyRevisionIdException(inner) => inner.meta(),
70            Self::InvalidRequestException(inner) => inner.meta(),
71            Self::LockoutPreventionException(inner) => inner.meta(),
72            Self::MalformedPolicyDocumentException(inner) => inner.meta(),
73            Self::PolicyCountLimitExceededException(inner) => inner.meta(),
74            Self::PolicySizeLimitExceededException(inner) => inner.meta(),
75            Self::ResourceNotFoundException(inner) => inner.meta(),
76            Self::RuleLimitExceededException(inner) => inner.meta(),
77            Self::ThrottledException(inner) => inner.meta(),
78            Self::TooManyTagsException(inner) => inner.meta(),
79            Self::Unhandled(inner) => &inner.meta,
80        }
81    }
82}
83impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::batch_get_traces::BatchGetTracesError, R>> for Error
84where
85    R: Send + Sync + std::fmt::Debug + 'static,
86{
87    fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::batch_get_traces::BatchGetTracesError, R>) -> Self {
88        match err {
89            ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
90            _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
91                meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
92                source: err.into(),
93            }),
94        }
95    }
96}
97impl From<crate::operation::batch_get_traces::BatchGetTracesError> for Error {
98    fn from(err: crate::operation::batch_get_traces::BatchGetTracesError) -> Self {
99        match err {
100            crate::operation::batch_get_traces::BatchGetTracesError::InvalidRequestException(inner) => Error::InvalidRequestException(inner),
101            crate::operation::batch_get_traces::BatchGetTracesError::ThrottledException(inner) => Error::ThrottledException(inner),
102            crate::operation::batch_get_traces::BatchGetTracesError::Unhandled(inner) => Error::Unhandled(inner),
103        }
104    }
105}
106impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::cancel_trace_retrieval::CancelTraceRetrievalError, R>> for Error
107where
108    R: Send + Sync + std::fmt::Debug + 'static,
109{
110    fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::cancel_trace_retrieval::CancelTraceRetrievalError, R>) -> Self {
111        match err {
112            ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
113            _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
114                meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
115                source: err.into(),
116            }),
117        }
118    }
119}
120impl From<crate::operation::cancel_trace_retrieval::CancelTraceRetrievalError> for Error {
121    fn from(err: crate::operation::cancel_trace_retrieval::CancelTraceRetrievalError) -> Self {
122        match err {
123            crate::operation::cancel_trace_retrieval::CancelTraceRetrievalError::InvalidRequestException(inner) => {
124                Error::InvalidRequestException(inner)
125            }
126            crate::operation::cancel_trace_retrieval::CancelTraceRetrievalError::ResourceNotFoundException(inner) => {
127                Error::ResourceNotFoundException(inner)
128            }
129            crate::operation::cancel_trace_retrieval::CancelTraceRetrievalError::ThrottledException(inner) => Error::ThrottledException(inner),
130            crate::operation::cancel_trace_retrieval::CancelTraceRetrievalError::Unhandled(inner) => Error::Unhandled(inner),
131        }
132    }
133}
134impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::create_group::CreateGroupError, R>> for Error
135where
136    R: Send + Sync + std::fmt::Debug + 'static,
137{
138    fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::create_group::CreateGroupError, R>) -> Self {
139        match err {
140            ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
141            _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
142                meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
143                source: err.into(),
144            }),
145        }
146    }
147}
148impl From<crate::operation::create_group::CreateGroupError> for Error {
149    fn from(err: crate::operation::create_group::CreateGroupError) -> Self {
150        match err {
151            crate::operation::create_group::CreateGroupError::InvalidRequestException(inner) => Error::InvalidRequestException(inner),
152            crate::operation::create_group::CreateGroupError::ThrottledException(inner) => Error::ThrottledException(inner),
153            crate::operation::create_group::CreateGroupError::Unhandled(inner) => Error::Unhandled(inner),
154        }
155    }
156}
157impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::create_sampling_rule::CreateSamplingRuleError, R>> for Error
158where
159    R: Send + Sync + std::fmt::Debug + 'static,
160{
161    fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::create_sampling_rule::CreateSamplingRuleError, R>) -> Self {
162        match err {
163            ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
164            _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
165                meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
166                source: err.into(),
167            }),
168        }
169    }
170}
171impl From<crate::operation::create_sampling_rule::CreateSamplingRuleError> for Error {
172    fn from(err: crate::operation::create_sampling_rule::CreateSamplingRuleError) -> Self {
173        match err {
174            crate::operation::create_sampling_rule::CreateSamplingRuleError::InvalidRequestException(inner) => Error::InvalidRequestException(inner),
175            crate::operation::create_sampling_rule::CreateSamplingRuleError::RuleLimitExceededException(inner) => {
176                Error::RuleLimitExceededException(inner)
177            }
178            crate::operation::create_sampling_rule::CreateSamplingRuleError::ThrottledException(inner) => Error::ThrottledException(inner),
179            crate::operation::create_sampling_rule::CreateSamplingRuleError::Unhandled(inner) => Error::Unhandled(inner),
180        }
181    }
182}
183impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::delete_group::DeleteGroupError, R>> for Error
184where
185    R: Send + Sync + std::fmt::Debug + 'static,
186{
187    fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::delete_group::DeleteGroupError, R>) -> Self {
188        match err {
189            ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
190            _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
191                meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
192                source: err.into(),
193            }),
194        }
195    }
196}
197impl From<crate::operation::delete_group::DeleteGroupError> for Error {
198    fn from(err: crate::operation::delete_group::DeleteGroupError) -> Self {
199        match err {
200            crate::operation::delete_group::DeleteGroupError::InvalidRequestException(inner) => Error::InvalidRequestException(inner),
201            crate::operation::delete_group::DeleteGroupError::ThrottledException(inner) => Error::ThrottledException(inner),
202            crate::operation::delete_group::DeleteGroupError::Unhandled(inner) => Error::Unhandled(inner),
203        }
204    }
205}
206impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::delete_resource_policy::DeleteResourcePolicyError, R>> for Error
207where
208    R: Send + Sync + std::fmt::Debug + 'static,
209{
210    fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::delete_resource_policy::DeleteResourcePolicyError, R>) -> Self {
211        match err {
212            ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
213            _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
214                meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
215                source: err.into(),
216            }),
217        }
218    }
219}
220impl From<crate::operation::delete_resource_policy::DeleteResourcePolicyError> for Error {
221    fn from(err: crate::operation::delete_resource_policy::DeleteResourcePolicyError) -> Self {
222        match err {
223            crate::operation::delete_resource_policy::DeleteResourcePolicyError::InvalidPolicyRevisionIdException(inner) => {
224                Error::InvalidPolicyRevisionIdException(inner)
225            }
226            crate::operation::delete_resource_policy::DeleteResourcePolicyError::InvalidRequestException(inner) => {
227                Error::InvalidRequestException(inner)
228            }
229            crate::operation::delete_resource_policy::DeleteResourcePolicyError::ThrottledException(inner) => Error::ThrottledException(inner),
230            crate::operation::delete_resource_policy::DeleteResourcePolicyError::Unhandled(inner) => Error::Unhandled(inner),
231        }
232    }
233}
234impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::delete_sampling_rule::DeleteSamplingRuleError, R>> for Error
235where
236    R: Send + Sync + std::fmt::Debug + 'static,
237{
238    fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::delete_sampling_rule::DeleteSamplingRuleError, R>) -> Self {
239        match err {
240            ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
241            _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
242                meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
243                source: err.into(),
244            }),
245        }
246    }
247}
248impl From<crate::operation::delete_sampling_rule::DeleteSamplingRuleError> for Error {
249    fn from(err: crate::operation::delete_sampling_rule::DeleteSamplingRuleError) -> Self {
250        match err {
251            crate::operation::delete_sampling_rule::DeleteSamplingRuleError::InvalidRequestException(inner) => Error::InvalidRequestException(inner),
252            crate::operation::delete_sampling_rule::DeleteSamplingRuleError::ThrottledException(inner) => Error::ThrottledException(inner),
253            crate::operation::delete_sampling_rule::DeleteSamplingRuleError::Unhandled(inner) => Error::Unhandled(inner),
254        }
255    }
256}
257impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::get_encryption_config::GetEncryptionConfigError, R>> for Error
258where
259    R: Send + Sync + std::fmt::Debug + 'static,
260{
261    fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::get_encryption_config::GetEncryptionConfigError, R>) -> Self {
262        match err {
263            ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
264            _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
265                meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
266                source: err.into(),
267            }),
268        }
269    }
270}
271impl From<crate::operation::get_encryption_config::GetEncryptionConfigError> for Error {
272    fn from(err: crate::operation::get_encryption_config::GetEncryptionConfigError) -> Self {
273        match err {
274            crate::operation::get_encryption_config::GetEncryptionConfigError::InvalidRequestException(inner) => {
275                Error::InvalidRequestException(inner)
276            }
277            crate::operation::get_encryption_config::GetEncryptionConfigError::ThrottledException(inner) => Error::ThrottledException(inner),
278            crate::operation::get_encryption_config::GetEncryptionConfigError::Unhandled(inner) => Error::Unhandled(inner),
279        }
280    }
281}
282impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::get_group::GetGroupError, R>> for Error
283where
284    R: Send + Sync + std::fmt::Debug + 'static,
285{
286    fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::get_group::GetGroupError, R>) -> Self {
287        match err {
288            ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
289            _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
290                meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
291                source: err.into(),
292            }),
293        }
294    }
295}
296impl From<crate::operation::get_group::GetGroupError> for Error {
297    fn from(err: crate::operation::get_group::GetGroupError) -> Self {
298        match err {
299            crate::operation::get_group::GetGroupError::InvalidRequestException(inner) => Error::InvalidRequestException(inner),
300            crate::operation::get_group::GetGroupError::ThrottledException(inner) => Error::ThrottledException(inner),
301            crate::operation::get_group::GetGroupError::Unhandled(inner) => Error::Unhandled(inner),
302        }
303    }
304}
305impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::get_groups::GetGroupsError, R>> for Error
306where
307    R: Send + Sync + std::fmt::Debug + 'static,
308{
309    fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::get_groups::GetGroupsError, R>) -> Self {
310        match err {
311            ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
312            _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
313                meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
314                source: err.into(),
315            }),
316        }
317    }
318}
319impl From<crate::operation::get_groups::GetGroupsError> for Error {
320    fn from(err: crate::operation::get_groups::GetGroupsError) -> Self {
321        match err {
322            crate::operation::get_groups::GetGroupsError::InvalidRequestException(inner) => Error::InvalidRequestException(inner),
323            crate::operation::get_groups::GetGroupsError::ThrottledException(inner) => Error::ThrottledException(inner),
324            crate::operation::get_groups::GetGroupsError::Unhandled(inner) => Error::Unhandled(inner),
325        }
326    }
327}
328impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::get_indexing_rules::GetIndexingRulesError, R>> for Error
329where
330    R: Send + Sync + std::fmt::Debug + 'static,
331{
332    fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::get_indexing_rules::GetIndexingRulesError, R>) -> Self {
333        match err {
334            ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
335            _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
336                meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
337                source: err.into(),
338            }),
339        }
340    }
341}
342impl From<crate::operation::get_indexing_rules::GetIndexingRulesError> for Error {
343    fn from(err: crate::operation::get_indexing_rules::GetIndexingRulesError) -> Self {
344        match err {
345            crate::operation::get_indexing_rules::GetIndexingRulesError::InvalidRequestException(inner) => Error::InvalidRequestException(inner),
346            crate::operation::get_indexing_rules::GetIndexingRulesError::ThrottledException(inner) => Error::ThrottledException(inner),
347            crate::operation::get_indexing_rules::GetIndexingRulesError::Unhandled(inner) => Error::Unhandled(inner),
348        }
349    }
350}
351impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::get_insight::GetInsightError, R>> for Error
352where
353    R: Send + Sync + std::fmt::Debug + 'static,
354{
355    fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::get_insight::GetInsightError, R>) -> Self {
356        match err {
357            ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
358            _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
359                meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
360                source: err.into(),
361            }),
362        }
363    }
364}
365impl From<crate::operation::get_insight::GetInsightError> for Error {
366    fn from(err: crate::operation::get_insight::GetInsightError) -> Self {
367        match err {
368            crate::operation::get_insight::GetInsightError::InvalidRequestException(inner) => Error::InvalidRequestException(inner),
369            crate::operation::get_insight::GetInsightError::ThrottledException(inner) => Error::ThrottledException(inner),
370            crate::operation::get_insight::GetInsightError::Unhandled(inner) => Error::Unhandled(inner),
371        }
372    }
373}
374impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::get_insight_events::GetInsightEventsError, R>> for Error
375where
376    R: Send + Sync + std::fmt::Debug + 'static,
377{
378    fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::get_insight_events::GetInsightEventsError, R>) -> Self {
379        match err {
380            ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
381            _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
382                meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
383                source: err.into(),
384            }),
385        }
386    }
387}
388impl From<crate::operation::get_insight_events::GetInsightEventsError> for Error {
389    fn from(err: crate::operation::get_insight_events::GetInsightEventsError) -> Self {
390        match err {
391            crate::operation::get_insight_events::GetInsightEventsError::InvalidRequestException(inner) => Error::InvalidRequestException(inner),
392            crate::operation::get_insight_events::GetInsightEventsError::ThrottledException(inner) => Error::ThrottledException(inner),
393            crate::operation::get_insight_events::GetInsightEventsError::Unhandled(inner) => Error::Unhandled(inner),
394        }
395    }
396}
397impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::get_insight_impact_graph::GetInsightImpactGraphError, R>> for Error
398where
399    R: Send + Sync + std::fmt::Debug + 'static,
400{
401    fn from(
402        err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::get_insight_impact_graph::GetInsightImpactGraphError, R>,
403    ) -> Self {
404        match err {
405            ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
406            _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
407                meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
408                source: err.into(),
409            }),
410        }
411    }
412}
413impl From<crate::operation::get_insight_impact_graph::GetInsightImpactGraphError> for Error {
414    fn from(err: crate::operation::get_insight_impact_graph::GetInsightImpactGraphError) -> Self {
415        match err {
416            crate::operation::get_insight_impact_graph::GetInsightImpactGraphError::InvalidRequestException(inner) => {
417                Error::InvalidRequestException(inner)
418            }
419            crate::operation::get_insight_impact_graph::GetInsightImpactGraphError::ThrottledException(inner) => Error::ThrottledException(inner),
420            crate::operation::get_insight_impact_graph::GetInsightImpactGraphError::Unhandled(inner) => Error::Unhandled(inner),
421        }
422    }
423}
424impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::get_insight_summaries::GetInsightSummariesError, R>> for Error
425where
426    R: Send + Sync + std::fmt::Debug + 'static,
427{
428    fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::get_insight_summaries::GetInsightSummariesError, R>) -> Self {
429        match err {
430            ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
431            _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
432                meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
433                source: err.into(),
434            }),
435        }
436    }
437}
438impl From<crate::operation::get_insight_summaries::GetInsightSummariesError> for Error {
439    fn from(err: crate::operation::get_insight_summaries::GetInsightSummariesError) -> Self {
440        match err {
441            crate::operation::get_insight_summaries::GetInsightSummariesError::InvalidRequestException(inner) => {
442                Error::InvalidRequestException(inner)
443            }
444            crate::operation::get_insight_summaries::GetInsightSummariesError::ThrottledException(inner) => Error::ThrottledException(inner),
445            crate::operation::get_insight_summaries::GetInsightSummariesError::Unhandled(inner) => Error::Unhandled(inner),
446        }
447    }
448}
449impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::get_retrieved_traces_graph::GetRetrievedTracesGraphError, R>>
450    for Error
451where
452    R: Send + Sync + std::fmt::Debug + 'static,
453{
454    fn from(
455        err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::get_retrieved_traces_graph::GetRetrievedTracesGraphError, R>,
456    ) -> Self {
457        match err {
458            ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
459            _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
460                meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
461                source: err.into(),
462            }),
463        }
464    }
465}
466impl From<crate::operation::get_retrieved_traces_graph::GetRetrievedTracesGraphError> for Error {
467    fn from(err: crate::operation::get_retrieved_traces_graph::GetRetrievedTracesGraphError) -> Self {
468        match err {
469            crate::operation::get_retrieved_traces_graph::GetRetrievedTracesGraphError::InvalidRequestException(inner) => {
470                Error::InvalidRequestException(inner)
471            }
472            crate::operation::get_retrieved_traces_graph::GetRetrievedTracesGraphError::ResourceNotFoundException(inner) => {
473                Error::ResourceNotFoundException(inner)
474            }
475            crate::operation::get_retrieved_traces_graph::GetRetrievedTracesGraphError::ThrottledException(inner) => Error::ThrottledException(inner),
476            crate::operation::get_retrieved_traces_graph::GetRetrievedTracesGraphError::Unhandled(inner) => Error::Unhandled(inner),
477        }
478    }
479}
480impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::get_sampling_rules::GetSamplingRulesError, R>> for Error
481where
482    R: Send + Sync + std::fmt::Debug + 'static,
483{
484    fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::get_sampling_rules::GetSamplingRulesError, R>) -> Self {
485        match err {
486            ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
487            _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
488                meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
489                source: err.into(),
490            }),
491        }
492    }
493}
494impl From<crate::operation::get_sampling_rules::GetSamplingRulesError> for Error {
495    fn from(err: crate::operation::get_sampling_rules::GetSamplingRulesError) -> Self {
496        match err {
497            crate::operation::get_sampling_rules::GetSamplingRulesError::InvalidRequestException(inner) => Error::InvalidRequestException(inner),
498            crate::operation::get_sampling_rules::GetSamplingRulesError::ThrottledException(inner) => Error::ThrottledException(inner),
499            crate::operation::get_sampling_rules::GetSamplingRulesError::Unhandled(inner) => Error::Unhandled(inner),
500        }
501    }
502}
503impl<R>
504    From<
505        ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::get_sampling_statistic_summaries::GetSamplingStatisticSummariesError, R>,
506    > for Error
507where
508    R: Send + Sync + std::fmt::Debug + 'static,
509{
510    fn from(
511        err: ::aws_smithy_runtime_api::client::result::SdkError<
512            crate::operation::get_sampling_statistic_summaries::GetSamplingStatisticSummariesError,
513            R,
514        >,
515    ) -> Self {
516        match err {
517            ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
518            _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
519                meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
520                source: err.into(),
521            }),
522        }
523    }
524}
525impl From<crate::operation::get_sampling_statistic_summaries::GetSamplingStatisticSummariesError> for Error {
526    fn from(err: crate::operation::get_sampling_statistic_summaries::GetSamplingStatisticSummariesError) -> Self {
527        match err {
528            crate::operation::get_sampling_statistic_summaries::GetSamplingStatisticSummariesError::InvalidRequestException(inner) => {
529                Error::InvalidRequestException(inner)
530            }
531            crate::operation::get_sampling_statistic_summaries::GetSamplingStatisticSummariesError::ThrottledException(inner) => {
532                Error::ThrottledException(inner)
533            }
534            crate::operation::get_sampling_statistic_summaries::GetSamplingStatisticSummariesError::Unhandled(inner) => Error::Unhandled(inner),
535        }
536    }
537}
538impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::get_sampling_targets::GetSamplingTargetsError, R>> for Error
539where
540    R: Send + Sync + std::fmt::Debug + 'static,
541{
542    fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::get_sampling_targets::GetSamplingTargetsError, R>) -> Self {
543        match err {
544            ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
545            _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
546                meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
547                source: err.into(),
548            }),
549        }
550    }
551}
552impl From<crate::operation::get_sampling_targets::GetSamplingTargetsError> for Error {
553    fn from(err: crate::operation::get_sampling_targets::GetSamplingTargetsError) -> Self {
554        match err {
555            crate::operation::get_sampling_targets::GetSamplingTargetsError::InvalidRequestException(inner) => Error::InvalidRequestException(inner),
556            crate::operation::get_sampling_targets::GetSamplingTargetsError::ThrottledException(inner) => Error::ThrottledException(inner),
557            crate::operation::get_sampling_targets::GetSamplingTargetsError::Unhandled(inner) => Error::Unhandled(inner),
558        }
559    }
560}
561impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::get_service_graph::GetServiceGraphError, R>> for Error
562where
563    R: Send + Sync + std::fmt::Debug + 'static,
564{
565    fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::get_service_graph::GetServiceGraphError, R>) -> Self {
566        match err {
567            ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
568            _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
569                meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
570                source: err.into(),
571            }),
572        }
573    }
574}
575impl From<crate::operation::get_service_graph::GetServiceGraphError> for Error {
576    fn from(err: crate::operation::get_service_graph::GetServiceGraphError) -> Self {
577        match err {
578            crate::operation::get_service_graph::GetServiceGraphError::InvalidRequestException(inner) => Error::InvalidRequestException(inner),
579            crate::operation::get_service_graph::GetServiceGraphError::ThrottledException(inner) => Error::ThrottledException(inner),
580            crate::operation::get_service_graph::GetServiceGraphError::Unhandled(inner) => Error::Unhandled(inner),
581        }
582    }
583}
584impl<R>
585    From<
586        ::aws_smithy_runtime_api::client::result::SdkError<
587            crate::operation::get_time_series_service_statistics::GetTimeSeriesServiceStatisticsError,
588            R,
589        >,
590    > for Error
591where
592    R: Send + Sync + std::fmt::Debug + 'static,
593{
594    fn from(
595        err: ::aws_smithy_runtime_api::client::result::SdkError<
596            crate::operation::get_time_series_service_statistics::GetTimeSeriesServiceStatisticsError,
597            R,
598        >,
599    ) -> Self {
600        match err {
601            ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
602            _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
603                meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
604                source: err.into(),
605            }),
606        }
607    }
608}
609impl From<crate::operation::get_time_series_service_statistics::GetTimeSeriesServiceStatisticsError> for Error {
610    fn from(err: crate::operation::get_time_series_service_statistics::GetTimeSeriesServiceStatisticsError) -> Self {
611        match err {
612            crate::operation::get_time_series_service_statistics::GetTimeSeriesServiceStatisticsError::InvalidRequestException(inner) => {
613                Error::InvalidRequestException(inner)
614            }
615            crate::operation::get_time_series_service_statistics::GetTimeSeriesServiceStatisticsError::ThrottledException(inner) => {
616                Error::ThrottledException(inner)
617            }
618            crate::operation::get_time_series_service_statistics::GetTimeSeriesServiceStatisticsError::Unhandled(inner) => Error::Unhandled(inner),
619        }
620    }
621}
622impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::get_trace_graph::GetTraceGraphError, R>> for Error
623where
624    R: Send + Sync + std::fmt::Debug + 'static,
625{
626    fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::get_trace_graph::GetTraceGraphError, R>) -> Self {
627        match err {
628            ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
629            _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
630                meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
631                source: err.into(),
632            }),
633        }
634    }
635}
636impl From<crate::operation::get_trace_graph::GetTraceGraphError> for Error {
637    fn from(err: crate::operation::get_trace_graph::GetTraceGraphError) -> Self {
638        match err {
639            crate::operation::get_trace_graph::GetTraceGraphError::InvalidRequestException(inner) => Error::InvalidRequestException(inner),
640            crate::operation::get_trace_graph::GetTraceGraphError::ThrottledException(inner) => Error::ThrottledException(inner),
641            crate::operation::get_trace_graph::GetTraceGraphError::Unhandled(inner) => Error::Unhandled(inner),
642        }
643    }
644}
645impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::get_trace_segment_destination::GetTraceSegmentDestinationError, R>>
646    for Error
647where
648    R: Send + Sync + std::fmt::Debug + 'static,
649{
650    fn from(
651        err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::get_trace_segment_destination::GetTraceSegmentDestinationError, R>,
652    ) -> Self {
653        match err {
654            ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
655            _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
656                meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
657                source: err.into(),
658            }),
659        }
660    }
661}
662impl From<crate::operation::get_trace_segment_destination::GetTraceSegmentDestinationError> for Error {
663    fn from(err: crate::operation::get_trace_segment_destination::GetTraceSegmentDestinationError) -> Self {
664        match err {
665            crate::operation::get_trace_segment_destination::GetTraceSegmentDestinationError::InvalidRequestException(inner) => {
666                Error::InvalidRequestException(inner)
667            }
668            crate::operation::get_trace_segment_destination::GetTraceSegmentDestinationError::ThrottledException(inner) => {
669                Error::ThrottledException(inner)
670            }
671            crate::operation::get_trace_segment_destination::GetTraceSegmentDestinationError::Unhandled(inner) => Error::Unhandled(inner),
672        }
673    }
674}
675impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::get_trace_summaries::GetTraceSummariesError, R>> for Error
676where
677    R: Send + Sync + std::fmt::Debug + 'static,
678{
679    fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::get_trace_summaries::GetTraceSummariesError, R>) -> Self {
680        match err {
681            ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
682            _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
683                meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
684                source: err.into(),
685            }),
686        }
687    }
688}
689impl From<crate::operation::get_trace_summaries::GetTraceSummariesError> for Error {
690    fn from(err: crate::operation::get_trace_summaries::GetTraceSummariesError) -> Self {
691        match err {
692            crate::operation::get_trace_summaries::GetTraceSummariesError::InvalidRequestException(inner) => Error::InvalidRequestException(inner),
693            crate::operation::get_trace_summaries::GetTraceSummariesError::ThrottledException(inner) => Error::ThrottledException(inner),
694            crate::operation::get_trace_summaries::GetTraceSummariesError::Unhandled(inner) => Error::Unhandled(inner),
695        }
696    }
697}
698impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::list_resource_policies::ListResourcePoliciesError, R>> for Error
699where
700    R: Send + Sync + std::fmt::Debug + 'static,
701{
702    fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::list_resource_policies::ListResourcePoliciesError, R>) -> Self {
703        match err {
704            ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
705            _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
706                meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
707                source: err.into(),
708            }),
709        }
710    }
711}
712impl From<crate::operation::list_resource_policies::ListResourcePoliciesError> for Error {
713    fn from(err: crate::operation::list_resource_policies::ListResourcePoliciesError) -> Self {
714        match err {
715            crate::operation::list_resource_policies::ListResourcePoliciesError::InvalidRequestException(inner) => {
716                Error::InvalidRequestException(inner)
717            }
718            crate::operation::list_resource_policies::ListResourcePoliciesError::ThrottledException(inner) => Error::ThrottledException(inner),
719            crate::operation::list_resource_policies::ListResourcePoliciesError::Unhandled(inner) => Error::Unhandled(inner),
720        }
721    }
722}
723impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::list_retrieved_traces::ListRetrievedTracesError, 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::list_retrieved_traces::ListRetrievedTracesError, 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::list_retrieved_traces::ListRetrievedTracesError> for Error {
738    fn from(err: crate::operation::list_retrieved_traces::ListRetrievedTracesError) -> Self {
739        match err {
740            crate::operation::list_retrieved_traces::ListRetrievedTracesError::InvalidRequestException(inner) => {
741                Error::InvalidRequestException(inner)
742            }
743            crate::operation::list_retrieved_traces::ListRetrievedTracesError::ResourceNotFoundException(inner) => {
744                Error::ResourceNotFoundException(inner)
745            }
746            crate::operation::list_retrieved_traces::ListRetrievedTracesError::ThrottledException(inner) => Error::ThrottledException(inner),
747            crate::operation::list_retrieved_traces::ListRetrievedTracesError::Unhandled(inner) => Error::Unhandled(inner),
748        }
749    }
750}
751impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::list_tags_for_resource::ListTagsForResourceError, R>> for Error
752where
753    R: Send + Sync + std::fmt::Debug + 'static,
754{
755    fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::list_tags_for_resource::ListTagsForResourceError, R>) -> Self {
756        match err {
757            ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
758            _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
759                meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
760                source: err.into(),
761            }),
762        }
763    }
764}
765impl From<crate::operation::list_tags_for_resource::ListTagsForResourceError> for Error {
766    fn from(err: crate::operation::list_tags_for_resource::ListTagsForResourceError) -> Self {
767        match err {
768            crate::operation::list_tags_for_resource::ListTagsForResourceError::InvalidRequestException(inner) => {
769                Error::InvalidRequestException(inner)
770            }
771            crate::operation::list_tags_for_resource::ListTagsForResourceError::ResourceNotFoundException(inner) => {
772                Error::ResourceNotFoundException(inner)
773            }
774            crate::operation::list_tags_for_resource::ListTagsForResourceError::ThrottledException(inner) => Error::ThrottledException(inner),
775            crate::operation::list_tags_for_resource::ListTagsForResourceError::Unhandled(inner) => Error::Unhandled(inner),
776        }
777    }
778}
779impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::put_encryption_config::PutEncryptionConfigError, R>> for Error
780where
781    R: Send + Sync + std::fmt::Debug + 'static,
782{
783    fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::put_encryption_config::PutEncryptionConfigError, R>) -> Self {
784        match err {
785            ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
786            _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
787                meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
788                source: err.into(),
789            }),
790        }
791    }
792}
793impl From<crate::operation::put_encryption_config::PutEncryptionConfigError> for Error {
794    fn from(err: crate::operation::put_encryption_config::PutEncryptionConfigError) -> Self {
795        match err {
796            crate::operation::put_encryption_config::PutEncryptionConfigError::InvalidRequestException(inner) => {
797                Error::InvalidRequestException(inner)
798            }
799            crate::operation::put_encryption_config::PutEncryptionConfigError::ThrottledException(inner) => Error::ThrottledException(inner),
800            crate::operation::put_encryption_config::PutEncryptionConfigError::Unhandled(inner) => Error::Unhandled(inner),
801        }
802    }
803}
804impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::put_resource_policy::PutResourcePolicyError, R>> for Error
805where
806    R: Send + Sync + std::fmt::Debug + 'static,
807{
808    fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::put_resource_policy::PutResourcePolicyError, R>) -> Self {
809        match err {
810            ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
811            _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
812                meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
813                source: err.into(),
814            }),
815        }
816    }
817}
818impl From<crate::operation::put_resource_policy::PutResourcePolicyError> for Error {
819    fn from(err: crate::operation::put_resource_policy::PutResourcePolicyError) -> Self {
820        match err {
821            crate::operation::put_resource_policy::PutResourcePolicyError::InvalidPolicyRevisionIdException(inner) => {
822                Error::InvalidPolicyRevisionIdException(inner)
823            }
824            crate::operation::put_resource_policy::PutResourcePolicyError::LockoutPreventionException(inner) => {
825                Error::LockoutPreventionException(inner)
826            }
827            crate::operation::put_resource_policy::PutResourcePolicyError::MalformedPolicyDocumentException(inner) => {
828                Error::MalformedPolicyDocumentException(inner)
829            }
830            crate::operation::put_resource_policy::PutResourcePolicyError::PolicyCountLimitExceededException(inner) => {
831                Error::PolicyCountLimitExceededException(inner)
832            }
833            crate::operation::put_resource_policy::PutResourcePolicyError::PolicySizeLimitExceededException(inner) => {
834                Error::PolicySizeLimitExceededException(inner)
835            }
836            crate::operation::put_resource_policy::PutResourcePolicyError::ThrottledException(inner) => Error::ThrottledException(inner),
837            crate::operation::put_resource_policy::PutResourcePolicyError::Unhandled(inner) => Error::Unhandled(inner),
838        }
839    }
840}
841impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::put_telemetry_records::PutTelemetryRecordsError, R>> for Error
842where
843    R: Send + Sync + std::fmt::Debug + 'static,
844{
845    fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::put_telemetry_records::PutTelemetryRecordsError, R>) -> Self {
846        match err {
847            ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
848            _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
849                meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
850                source: err.into(),
851            }),
852        }
853    }
854}
855impl From<crate::operation::put_telemetry_records::PutTelemetryRecordsError> for Error {
856    fn from(err: crate::operation::put_telemetry_records::PutTelemetryRecordsError) -> Self {
857        match err {
858            crate::operation::put_telemetry_records::PutTelemetryRecordsError::InvalidRequestException(inner) => {
859                Error::InvalidRequestException(inner)
860            }
861            crate::operation::put_telemetry_records::PutTelemetryRecordsError::ThrottledException(inner) => Error::ThrottledException(inner),
862            crate::operation::put_telemetry_records::PutTelemetryRecordsError::Unhandled(inner) => Error::Unhandled(inner),
863        }
864    }
865}
866impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::put_trace_segments::PutTraceSegmentsError, R>> for Error
867where
868    R: Send + Sync + std::fmt::Debug + 'static,
869{
870    fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::put_trace_segments::PutTraceSegmentsError, R>) -> Self {
871        match err {
872            ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
873            _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
874                meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
875                source: err.into(),
876            }),
877        }
878    }
879}
880impl From<crate::operation::put_trace_segments::PutTraceSegmentsError> for Error {
881    fn from(err: crate::operation::put_trace_segments::PutTraceSegmentsError) -> Self {
882        match err {
883            crate::operation::put_trace_segments::PutTraceSegmentsError::InvalidRequestException(inner) => Error::InvalidRequestException(inner),
884            crate::operation::put_trace_segments::PutTraceSegmentsError::ThrottledException(inner) => Error::ThrottledException(inner),
885            crate::operation::put_trace_segments::PutTraceSegmentsError::Unhandled(inner) => Error::Unhandled(inner),
886        }
887    }
888}
889impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::start_trace_retrieval::StartTraceRetrievalError, R>> for Error
890where
891    R: Send + Sync + std::fmt::Debug + 'static,
892{
893    fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::start_trace_retrieval::StartTraceRetrievalError, R>) -> Self {
894        match err {
895            ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
896            _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
897                meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
898                source: err.into(),
899            }),
900        }
901    }
902}
903impl From<crate::operation::start_trace_retrieval::StartTraceRetrievalError> for Error {
904    fn from(err: crate::operation::start_trace_retrieval::StartTraceRetrievalError) -> Self {
905        match err {
906            crate::operation::start_trace_retrieval::StartTraceRetrievalError::InvalidRequestException(inner) => {
907                Error::InvalidRequestException(inner)
908            }
909            crate::operation::start_trace_retrieval::StartTraceRetrievalError::ResourceNotFoundException(inner) => {
910                Error::ResourceNotFoundException(inner)
911            }
912            crate::operation::start_trace_retrieval::StartTraceRetrievalError::ThrottledException(inner) => Error::ThrottledException(inner),
913            crate::operation::start_trace_retrieval::StartTraceRetrievalError::Unhandled(inner) => Error::Unhandled(inner),
914        }
915    }
916}
917impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::tag_resource::TagResourceError, R>> for Error
918where
919    R: Send + Sync + std::fmt::Debug + 'static,
920{
921    fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::tag_resource::TagResourceError, R>) -> Self {
922        match err {
923            ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
924            _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
925                meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
926                source: err.into(),
927            }),
928        }
929    }
930}
931impl From<crate::operation::tag_resource::TagResourceError> for Error {
932    fn from(err: crate::operation::tag_resource::TagResourceError) -> Self {
933        match err {
934            crate::operation::tag_resource::TagResourceError::InvalidRequestException(inner) => Error::InvalidRequestException(inner),
935            crate::operation::tag_resource::TagResourceError::ResourceNotFoundException(inner) => Error::ResourceNotFoundException(inner),
936            crate::operation::tag_resource::TagResourceError::ThrottledException(inner) => Error::ThrottledException(inner),
937            crate::operation::tag_resource::TagResourceError::TooManyTagsException(inner) => Error::TooManyTagsException(inner),
938            crate::operation::tag_resource::TagResourceError::Unhandled(inner) => Error::Unhandled(inner),
939        }
940    }
941}
942impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::untag_resource::UntagResourceError, R>> for Error
943where
944    R: Send + Sync + std::fmt::Debug + 'static,
945{
946    fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::untag_resource::UntagResourceError, R>) -> Self {
947        match err {
948            ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
949            _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
950                meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
951                source: err.into(),
952            }),
953        }
954    }
955}
956impl From<crate::operation::untag_resource::UntagResourceError> for Error {
957    fn from(err: crate::operation::untag_resource::UntagResourceError) -> Self {
958        match err {
959            crate::operation::untag_resource::UntagResourceError::InvalidRequestException(inner) => Error::InvalidRequestException(inner),
960            crate::operation::untag_resource::UntagResourceError::ResourceNotFoundException(inner) => Error::ResourceNotFoundException(inner),
961            crate::operation::untag_resource::UntagResourceError::ThrottledException(inner) => Error::ThrottledException(inner),
962            crate::operation::untag_resource::UntagResourceError::Unhandled(inner) => Error::Unhandled(inner),
963        }
964    }
965}
966impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::update_group::UpdateGroupError, R>> for Error
967where
968    R: Send + Sync + std::fmt::Debug + 'static,
969{
970    fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::update_group::UpdateGroupError, R>) -> Self {
971        match err {
972            ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
973            _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
974                meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
975                source: err.into(),
976            }),
977        }
978    }
979}
980impl From<crate::operation::update_group::UpdateGroupError> for Error {
981    fn from(err: crate::operation::update_group::UpdateGroupError) -> Self {
982        match err {
983            crate::operation::update_group::UpdateGroupError::InvalidRequestException(inner) => Error::InvalidRequestException(inner),
984            crate::operation::update_group::UpdateGroupError::ThrottledException(inner) => Error::ThrottledException(inner),
985            crate::operation::update_group::UpdateGroupError::Unhandled(inner) => Error::Unhandled(inner),
986        }
987    }
988}
989impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::update_indexing_rule::UpdateIndexingRuleError, R>> for Error
990where
991    R: Send + Sync + std::fmt::Debug + 'static,
992{
993    fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::update_indexing_rule::UpdateIndexingRuleError, R>) -> Self {
994        match err {
995            ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
996            _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
997                meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
998                source: err.into(),
999            }),
1000        }
1001    }
1002}
1003impl From<crate::operation::update_indexing_rule::UpdateIndexingRuleError> for Error {
1004    fn from(err: crate::operation::update_indexing_rule::UpdateIndexingRuleError) -> Self {
1005        match err {
1006            crate::operation::update_indexing_rule::UpdateIndexingRuleError::InvalidRequestException(inner) => Error::InvalidRequestException(inner),
1007            crate::operation::update_indexing_rule::UpdateIndexingRuleError::ResourceNotFoundException(inner) => {
1008                Error::ResourceNotFoundException(inner)
1009            }
1010            crate::operation::update_indexing_rule::UpdateIndexingRuleError::ThrottledException(inner) => Error::ThrottledException(inner),
1011            crate::operation::update_indexing_rule::UpdateIndexingRuleError::Unhandled(inner) => Error::Unhandled(inner),
1012        }
1013    }
1014}
1015impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::update_sampling_rule::UpdateSamplingRuleError, R>> for Error
1016where
1017    R: Send + Sync + std::fmt::Debug + 'static,
1018{
1019    fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::update_sampling_rule::UpdateSamplingRuleError, R>) -> Self {
1020        match err {
1021            ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
1022            _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
1023                meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
1024                source: err.into(),
1025            }),
1026        }
1027    }
1028}
1029impl From<crate::operation::update_sampling_rule::UpdateSamplingRuleError> for Error {
1030    fn from(err: crate::operation::update_sampling_rule::UpdateSamplingRuleError) -> Self {
1031        match err {
1032            crate::operation::update_sampling_rule::UpdateSamplingRuleError::InvalidRequestException(inner) => Error::InvalidRequestException(inner),
1033            crate::operation::update_sampling_rule::UpdateSamplingRuleError::ThrottledException(inner) => Error::ThrottledException(inner),
1034            crate::operation::update_sampling_rule::UpdateSamplingRuleError::Unhandled(inner) => Error::Unhandled(inner),
1035        }
1036    }
1037}
1038impl<R>
1039    From<
1040        ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::update_trace_segment_destination::UpdateTraceSegmentDestinationError, R>,
1041    > for Error
1042where
1043    R: Send + Sync + std::fmt::Debug + 'static,
1044{
1045    fn from(
1046        err: ::aws_smithy_runtime_api::client::result::SdkError<
1047            crate::operation::update_trace_segment_destination::UpdateTraceSegmentDestinationError,
1048            R,
1049        >,
1050    ) -> Self {
1051        match err {
1052            ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
1053            _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
1054                meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
1055                source: err.into(),
1056            }),
1057        }
1058    }
1059}
1060impl From<crate::operation::update_trace_segment_destination::UpdateTraceSegmentDestinationError> for Error {
1061    fn from(err: crate::operation::update_trace_segment_destination::UpdateTraceSegmentDestinationError) -> Self {
1062        match err {
1063            crate::operation::update_trace_segment_destination::UpdateTraceSegmentDestinationError::InvalidRequestException(inner) => {
1064                Error::InvalidRequestException(inner)
1065            }
1066            crate::operation::update_trace_segment_destination::UpdateTraceSegmentDestinationError::ThrottledException(inner) => {
1067                Error::ThrottledException(inner)
1068            }
1069            crate::operation::update_trace_segment_destination::UpdateTraceSegmentDestinationError::Unhandled(inner) => Error::Unhandled(inner),
1070        }
1071    }
1072}
1073impl ::std::error::Error for Error {
1074    fn source(&self) -> std::option::Option<&(dyn ::std::error::Error + 'static)> {
1075        match self {
1076            Error::InvalidPolicyRevisionIdException(inner) => inner.source(),
1077            Error::InvalidRequestException(inner) => inner.source(),
1078            Error::LockoutPreventionException(inner) => inner.source(),
1079            Error::MalformedPolicyDocumentException(inner) => inner.source(),
1080            Error::PolicyCountLimitExceededException(inner) => inner.source(),
1081            Error::PolicySizeLimitExceededException(inner) => inner.source(),
1082            Error::ResourceNotFoundException(inner) => inner.source(),
1083            Error::RuleLimitExceededException(inner) => inner.source(),
1084            Error::ThrottledException(inner) => inner.source(),
1085            Error::TooManyTagsException(inner) => inner.source(),
1086            Error::Unhandled(inner) => ::std::option::Option::Some(&*inner.source),
1087        }
1088    }
1089}
1090impl ::aws_types::request_id::RequestId for Error {
1091    fn request_id(&self) -> Option<&str> {
1092        match self {
1093            Self::InvalidPolicyRevisionIdException(e) => e.request_id(),
1094            Self::InvalidRequestException(e) => e.request_id(),
1095            Self::LockoutPreventionException(e) => e.request_id(),
1096            Self::MalformedPolicyDocumentException(e) => e.request_id(),
1097            Self::PolicyCountLimitExceededException(e) => e.request_id(),
1098            Self::PolicySizeLimitExceededException(e) => e.request_id(),
1099            Self::ResourceNotFoundException(e) => e.request_id(),
1100            Self::RuleLimitExceededException(e) => e.request_id(),
1101            Self::ThrottledException(e) => e.request_id(),
1102            Self::TooManyTagsException(e) => e.request_id(),
1103            Self::Unhandled(e) => e.meta.request_id(),
1104        }
1105    }
1106}