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