aws_sdk_applicationsignals/
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>You don't have sufficient permissions to perform this action.</p>
7    AccessDeniedException(crate::types::error::AccessDeniedException),
8    /// <p>This operation attempted to create a resource that already exists.</p>
9    ConflictException(crate::types::error::ConflictException),
10    /// <p>Resource not found.</p>
11    ResourceNotFoundException(crate::types::error::ResourceNotFoundException),
12    /// <p>This request exceeds a service quota.</p>
13    ServiceQuotaExceededException(crate::types::error::ServiceQuotaExceededException),
14    /// <p>The request was throttled because of quota limits.</p>
15    ThrottlingException(crate::types::error::ThrottlingException),
16    /// <p>The resource is not valid.</p>
17    ValidationException(crate::types::error::ValidationException),
18    /// An unexpected error occurred (e.g., invalid JSON returned by the service or an unknown error code).
19    #[deprecated(note = "Matching `Unhandled` directly is not forwards compatible. Instead, match using a \
20    variable wildcard pattern and check `.code()`:
21     \
22    &nbsp;&nbsp;&nbsp;`err if err.code() == Some(\"SpecificExceptionCode\") => { /* handle the error */ }`
23     \
24    See [`ProvideErrorMetadata`](#impl-ProvideErrorMetadata-for-Error) for what information is available for the error.")]
25    Unhandled(crate::error::sealed_unhandled::Unhandled),
26}
27impl ::std::fmt::Display for Error {
28    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
29        match self {
30            Error::AccessDeniedException(inner) => inner.fmt(f),
31            Error::ConflictException(inner) => inner.fmt(f),
32            Error::ResourceNotFoundException(inner) => inner.fmt(f),
33            Error::ServiceQuotaExceededException(inner) => inner.fmt(f),
34            Error::ThrottlingException(inner) => inner.fmt(f),
35            Error::ValidationException(inner) => inner.fmt(f),
36            Error::Unhandled(_) => {
37                if let ::std::option::Option::Some(code) = ::aws_smithy_types::error::metadata::ProvideErrorMetadata::code(self) {
38                    write!(f, "unhandled error ({code})")
39                } else {
40                    f.write_str("unhandled error")
41                }
42            }
43        }
44    }
45}
46impl From<::aws_smithy_types::error::operation::BuildError> for Error {
47    fn from(value: ::aws_smithy_types::error::operation::BuildError) -> Self {
48        Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
49            source: value.into(),
50            meta: ::std::default::Default::default(),
51        })
52    }
53}
54impl ::aws_smithy_types::error::metadata::ProvideErrorMetadata for Error {
55    fn meta(&self) -> &::aws_smithy_types::error::metadata::ErrorMetadata {
56        match self {
57            Self::AccessDeniedException(inner) => inner.meta(),
58            Self::ConflictException(inner) => inner.meta(),
59            Self::ResourceNotFoundException(inner) => inner.meta(),
60            Self::ServiceQuotaExceededException(inner) => inner.meta(),
61            Self::ThrottlingException(inner) => inner.meta(),
62            Self::ValidationException(inner) => inner.meta(),
63            Self::Unhandled(inner) => &inner.meta,
64        }
65    }
66}
67impl<R>
68    From<
69        ::aws_smithy_runtime_api::client::result::SdkError<
70            crate::operation::batch_get_service_level_objective_budget_report::BatchGetServiceLevelObjectiveBudgetReportError,
71            R,
72        >,
73    > for Error
74where
75    R: Send + Sync + std::fmt::Debug + 'static,
76{
77    fn from(
78        err: ::aws_smithy_runtime_api::client::result::SdkError<
79            crate::operation::batch_get_service_level_objective_budget_report::BatchGetServiceLevelObjectiveBudgetReportError,
80            R,
81        >,
82    ) -> Self {
83        match err {
84            ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
85            _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
86                meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
87                source: err.into(),
88            }),
89        }
90    }
91}
92impl From<crate::operation::batch_get_service_level_objective_budget_report::BatchGetServiceLevelObjectiveBudgetReportError> for Error {
93    fn from(err: crate::operation::batch_get_service_level_objective_budget_report::BatchGetServiceLevelObjectiveBudgetReportError) -> Self {
94        match err {
95            crate::operation::batch_get_service_level_objective_budget_report::BatchGetServiceLevelObjectiveBudgetReportError::ThrottlingException(inner) => Error::ThrottlingException(inner),
96            crate::operation::batch_get_service_level_objective_budget_report::BatchGetServiceLevelObjectiveBudgetReportError::ValidationException(inner) => Error::ValidationException(inner),
97            crate::operation::batch_get_service_level_objective_budget_report::BatchGetServiceLevelObjectiveBudgetReportError::Unhandled(inner) => Error::Unhandled(inner),
98        }
99    }
100}
101impl<R>
102    From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::batch_update_exclusion_windows::BatchUpdateExclusionWindowsError, R>>
103    for Error
104where
105    R: Send + Sync + std::fmt::Debug + 'static,
106{
107    fn from(
108        err: ::aws_smithy_runtime_api::client::result::SdkError<
109            crate::operation::batch_update_exclusion_windows::BatchUpdateExclusionWindowsError,
110            R,
111        >,
112    ) -> Self {
113        match err {
114            ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
115            _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
116                meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
117                source: err.into(),
118            }),
119        }
120    }
121}
122impl From<crate::operation::batch_update_exclusion_windows::BatchUpdateExclusionWindowsError> for Error {
123    fn from(err: crate::operation::batch_update_exclusion_windows::BatchUpdateExclusionWindowsError) -> Self {
124        match err {
125            crate::operation::batch_update_exclusion_windows::BatchUpdateExclusionWindowsError::ResourceNotFoundException(inner) => {
126                Error::ResourceNotFoundException(inner)
127            }
128            crate::operation::batch_update_exclusion_windows::BatchUpdateExclusionWindowsError::ThrottlingException(inner) => {
129                Error::ThrottlingException(inner)
130            }
131            crate::operation::batch_update_exclusion_windows::BatchUpdateExclusionWindowsError::ValidationException(inner) => {
132                Error::ValidationException(inner)
133            }
134            crate::operation::batch_update_exclusion_windows::BatchUpdateExclusionWindowsError::Unhandled(inner) => Error::Unhandled(inner),
135        }
136    }
137}
138impl<R>
139    From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::create_service_level_objective::CreateServiceLevelObjectiveError, R>>
140    for Error
141where
142    R: Send + Sync + std::fmt::Debug + 'static,
143{
144    fn from(
145        err: ::aws_smithy_runtime_api::client::result::SdkError<
146            crate::operation::create_service_level_objective::CreateServiceLevelObjectiveError,
147            R,
148        >,
149    ) -> Self {
150        match err {
151            ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
152            _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
153                meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
154                source: err.into(),
155            }),
156        }
157    }
158}
159impl From<crate::operation::create_service_level_objective::CreateServiceLevelObjectiveError> for Error {
160    fn from(err: crate::operation::create_service_level_objective::CreateServiceLevelObjectiveError) -> Self {
161        match err {
162            crate::operation::create_service_level_objective::CreateServiceLevelObjectiveError::AccessDeniedException(inner) => {
163                Error::AccessDeniedException(inner)
164            }
165            crate::operation::create_service_level_objective::CreateServiceLevelObjectiveError::ConflictException(inner) => {
166                Error::ConflictException(inner)
167            }
168            crate::operation::create_service_level_objective::CreateServiceLevelObjectiveError::ServiceQuotaExceededException(inner) => {
169                Error::ServiceQuotaExceededException(inner)
170            }
171            crate::operation::create_service_level_objective::CreateServiceLevelObjectiveError::ThrottlingException(inner) => {
172                Error::ThrottlingException(inner)
173            }
174            crate::operation::create_service_level_objective::CreateServiceLevelObjectiveError::ValidationException(inner) => {
175                Error::ValidationException(inner)
176            }
177            crate::operation::create_service_level_objective::CreateServiceLevelObjectiveError::Unhandled(inner) => Error::Unhandled(inner),
178        }
179    }
180}
181impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::delete_grouping_configuration::DeleteGroupingConfigurationError, R>>
182    for Error
183where
184    R: Send + Sync + std::fmt::Debug + 'static,
185{
186    fn from(
187        err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::delete_grouping_configuration::DeleteGroupingConfigurationError, R>,
188    ) -> 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_grouping_configuration::DeleteGroupingConfigurationError> for Error {
199    fn from(err: crate::operation::delete_grouping_configuration::DeleteGroupingConfigurationError) -> Self {
200        match err {
201            crate::operation::delete_grouping_configuration::DeleteGroupingConfigurationError::AccessDeniedException(inner) => {
202                Error::AccessDeniedException(inner)
203            }
204            crate::operation::delete_grouping_configuration::DeleteGroupingConfigurationError::ThrottlingException(inner) => {
205                Error::ThrottlingException(inner)
206            }
207            crate::operation::delete_grouping_configuration::DeleteGroupingConfigurationError::ValidationException(inner) => {
208                Error::ValidationException(inner)
209            }
210            crate::operation::delete_grouping_configuration::DeleteGroupingConfigurationError::Unhandled(inner) => Error::Unhandled(inner),
211        }
212    }
213}
214impl<R>
215    From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::delete_service_level_objective::DeleteServiceLevelObjectiveError, R>>
216    for Error
217where
218    R: Send + Sync + std::fmt::Debug + 'static,
219{
220    fn from(
221        err: ::aws_smithy_runtime_api::client::result::SdkError<
222            crate::operation::delete_service_level_objective::DeleteServiceLevelObjectiveError,
223            R,
224        >,
225    ) -> Self {
226        match err {
227            ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
228            _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
229                meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
230                source: err.into(),
231            }),
232        }
233    }
234}
235impl From<crate::operation::delete_service_level_objective::DeleteServiceLevelObjectiveError> for Error {
236    fn from(err: crate::operation::delete_service_level_objective::DeleteServiceLevelObjectiveError) -> Self {
237        match err {
238            crate::operation::delete_service_level_objective::DeleteServiceLevelObjectiveError::ResourceNotFoundException(inner) => {
239                Error::ResourceNotFoundException(inner)
240            }
241            crate::operation::delete_service_level_objective::DeleteServiceLevelObjectiveError::ThrottlingException(inner) => {
242                Error::ThrottlingException(inner)
243            }
244            crate::operation::delete_service_level_objective::DeleteServiceLevelObjectiveError::ValidationException(inner) => {
245                Error::ValidationException(inner)
246            }
247            crate::operation::delete_service_level_objective::DeleteServiceLevelObjectiveError::Unhandled(inner) => Error::Unhandled(inner),
248        }
249    }
250}
251impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::get_service::GetServiceError, R>> for Error
252where
253    R: Send + Sync + std::fmt::Debug + 'static,
254{
255    fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::get_service::GetServiceError, R>) -> Self {
256        match err {
257            ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
258            _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
259                meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
260                source: err.into(),
261            }),
262        }
263    }
264}
265impl From<crate::operation::get_service::GetServiceError> for Error {
266    fn from(err: crate::operation::get_service::GetServiceError) -> Self {
267        match err {
268            crate::operation::get_service::GetServiceError::ThrottlingException(inner) => Error::ThrottlingException(inner),
269            crate::operation::get_service::GetServiceError::ValidationException(inner) => Error::ValidationException(inner),
270            crate::operation::get_service::GetServiceError::Unhandled(inner) => Error::Unhandled(inner),
271        }
272    }
273}
274impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::get_service_level_objective::GetServiceLevelObjectiveError, R>>
275    for Error
276where
277    R: Send + Sync + std::fmt::Debug + 'static,
278{
279    fn from(
280        err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::get_service_level_objective::GetServiceLevelObjectiveError, R>,
281    ) -> Self {
282        match err {
283            ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
284            _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
285                meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
286                source: err.into(),
287            }),
288        }
289    }
290}
291impl From<crate::operation::get_service_level_objective::GetServiceLevelObjectiveError> for Error {
292    fn from(err: crate::operation::get_service_level_objective::GetServiceLevelObjectiveError) -> Self {
293        match err {
294            crate::operation::get_service_level_objective::GetServiceLevelObjectiveError::ResourceNotFoundException(inner) => {
295                Error::ResourceNotFoundException(inner)
296            }
297            crate::operation::get_service_level_objective::GetServiceLevelObjectiveError::ThrottlingException(inner) => {
298                Error::ThrottlingException(inner)
299            }
300            crate::operation::get_service_level_objective::GetServiceLevelObjectiveError::ValidationException(inner) => {
301                Error::ValidationException(inner)
302            }
303            crate::operation::get_service_level_objective::GetServiceLevelObjectiveError::Unhandled(inner) => Error::Unhandled(inner),
304        }
305    }
306}
307impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::list_audit_findings::ListAuditFindingsError, R>> for Error
308where
309    R: Send + Sync + std::fmt::Debug + 'static,
310{
311    fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::list_audit_findings::ListAuditFindingsError, R>) -> Self {
312        match err {
313            ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
314            _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
315                meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
316                source: err.into(),
317            }),
318        }
319    }
320}
321impl From<crate::operation::list_audit_findings::ListAuditFindingsError> for Error {
322    fn from(err: crate::operation::list_audit_findings::ListAuditFindingsError) -> Self {
323        match err {
324            crate::operation::list_audit_findings::ListAuditFindingsError::ThrottlingException(inner) => Error::ThrottlingException(inner),
325            crate::operation::list_audit_findings::ListAuditFindingsError::ValidationException(inner) => Error::ValidationException(inner),
326            crate::operation::list_audit_findings::ListAuditFindingsError::Unhandled(inner) => Error::Unhandled(inner),
327        }
328    }
329}
330impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::list_entity_events::ListEntityEventsError, R>> for Error
331where
332    R: Send + Sync + std::fmt::Debug + 'static,
333{
334    fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::list_entity_events::ListEntityEventsError, R>) -> Self {
335        match err {
336            ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
337            _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
338                meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
339                source: err.into(),
340            }),
341        }
342    }
343}
344impl From<crate::operation::list_entity_events::ListEntityEventsError> for Error {
345    fn from(err: crate::operation::list_entity_events::ListEntityEventsError) -> Self {
346        match err {
347            crate::operation::list_entity_events::ListEntityEventsError::ThrottlingException(inner) => Error::ThrottlingException(inner),
348            crate::operation::list_entity_events::ListEntityEventsError::ValidationException(inner) => Error::ValidationException(inner),
349            crate::operation::list_entity_events::ListEntityEventsError::Unhandled(inner) => Error::Unhandled(inner),
350        }
351    }
352}
353impl<R>
354    From<
355        ::aws_smithy_runtime_api::client::result::SdkError<
356            crate::operation::list_grouping_attribute_definitions::ListGroupingAttributeDefinitionsError,
357            R,
358        >,
359    > for Error
360where
361    R: Send + Sync + std::fmt::Debug + 'static,
362{
363    fn from(
364        err: ::aws_smithy_runtime_api::client::result::SdkError<
365            crate::operation::list_grouping_attribute_definitions::ListGroupingAttributeDefinitionsError,
366            R,
367        >,
368    ) -> Self {
369        match err {
370            ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
371            _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
372                meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
373                source: err.into(),
374            }),
375        }
376    }
377}
378impl From<crate::operation::list_grouping_attribute_definitions::ListGroupingAttributeDefinitionsError> for Error {
379    fn from(err: crate::operation::list_grouping_attribute_definitions::ListGroupingAttributeDefinitionsError) -> Self {
380        match err {
381            crate::operation::list_grouping_attribute_definitions::ListGroupingAttributeDefinitionsError::AccessDeniedException(inner) => {
382                Error::AccessDeniedException(inner)
383            }
384            crate::operation::list_grouping_attribute_definitions::ListGroupingAttributeDefinitionsError::ThrottlingException(inner) => {
385                Error::ThrottlingException(inner)
386            }
387            crate::operation::list_grouping_attribute_definitions::ListGroupingAttributeDefinitionsError::ValidationException(inner) => {
388                Error::ValidationException(inner)
389            }
390            crate::operation::list_grouping_attribute_definitions::ListGroupingAttributeDefinitionsError::Unhandled(inner) => Error::Unhandled(inner),
391        }
392    }
393}
394impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::list_service_dependencies::ListServiceDependenciesError, R>>
395    for Error
396where
397    R: Send + Sync + std::fmt::Debug + 'static,
398{
399    fn from(
400        err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::list_service_dependencies::ListServiceDependenciesError, R>,
401    ) -> Self {
402        match err {
403            ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
404            _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
405                meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
406                source: err.into(),
407            }),
408        }
409    }
410}
411impl From<crate::operation::list_service_dependencies::ListServiceDependenciesError> for Error {
412    fn from(err: crate::operation::list_service_dependencies::ListServiceDependenciesError) -> Self {
413        match err {
414            crate::operation::list_service_dependencies::ListServiceDependenciesError::ThrottlingException(inner) => {
415                Error::ThrottlingException(inner)
416            }
417            crate::operation::list_service_dependencies::ListServiceDependenciesError::ValidationException(inner) => {
418                Error::ValidationException(inner)
419            }
420            crate::operation::list_service_dependencies::ListServiceDependenciesError::Unhandled(inner) => Error::Unhandled(inner),
421        }
422    }
423}
424impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::list_service_dependents::ListServiceDependentsError, R>> for Error
425where
426    R: Send + Sync + std::fmt::Debug + 'static,
427{
428    fn from(
429        err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::list_service_dependents::ListServiceDependentsError, R>,
430    ) -> Self {
431        match err {
432            ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
433            _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
434                meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
435                source: err.into(),
436            }),
437        }
438    }
439}
440impl From<crate::operation::list_service_dependents::ListServiceDependentsError> for Error {
441    fn from(err: crate::operation::list_service_dependents::ListServiceDependentsError) -> Self {
442        match err {
443            crate::operation::list_service_dependents::ListServiceDependentsError::ThrottlingException(inner) => Error::ThrottlingException(inner),
444            crate::operation::list_service_dependents::ListServiceDependentsError::ValidationException(inner) => Error::ValidationException(inner),
445            crate::operation::list_service_dependents::ListServiceDependentsError::Unhandled(inner) => Error::Unhandled(inner),
446        }
447    }
448}
449impl<R>
450    From<
451        ::aws_smithy_runtime_api::client::result::SdkError<
452            crate::operation::list_service_level_objective_exclusion_windows::ListServiceLevelObjectiveExclusionWindowsError,
453            R,
454        >,
455    > for Error
456where
457    R: Send + Sync + std::fmt::Debug + 'static,
458{
459    fn from(
460        err: ::aws_smithy_runtime_api::client::result::SdkError<
461            crate::operation::list_service_level_objective_exclusion_windows::ListServiceLevelObjectiveExclusionWindowsError,
462            R,
463        >,
464    ) -> 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::list_service_level_objective_exclusion_windows::ListServiceLevelObjectiveExclusionWindowsError> for Error {
475    fn from(err: crate::operation::list_service_level_objective_exclusion_windows::ListServiceLevelObjectiveExclusionWindowsError) -> Self {
476        match err {
477            crate::operation::list_service_level_objective_exclusion_windows::ListServiceLevelObjectiveExclusionWindowsError::ResourceNotFoundException(inner) => Error::ResourceNotFoundException(inner),
478            crate::operation::list_service_level_objective_exclusion_windows::ListServiceLevelObjectiveExclusionWindowsError::ThrottlingException(inner) => Error::ThrottlingException(inner),
479            crate::operation::list_service_level_objective_exclusion_windows::ListServiceLevelObjectiveExclusionWindowsError::ValidationException(inner) => Error::ValidationException(inner),
480            crate::operation::list_service_level_objective_exclusion_windows::ListServiceLevelObjectiveExclusionWindowsError::Unhandled(inner) => Error::Unhandled(inner),
481        }
482    }
483}
484impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::list_service_level_objectives::ListServiceLevelObjectivesError, R>>
485    for Error
486where
487    R: Send + Sync + std::fmt::Debug + 'static,
488{
489    fn from(
490        err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::list_service_level_objectives::ListServiceLevelObjectivesError, R>,
491    ) -> Self {
492        match err {
493            ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
494            _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
495                meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
496                source: err.into(),
497            }),
498        }
499    }
500}
501impl From<crate::operation::list_service_level_objectives::ListServiceLevelObjectivesError> for Error {
502    fn from(err: crate::operation::list_service_level_objectives::ListServiceLevelObjectivesError) -> Self {
503        match err {
504            crate::operation::list_service_level_objectives::ListServiceLevelObjectivesError::ThrottlingException(inner) => {
505                Error::ThrottlingException(inner)
506            }
507            crate::operation::list_service_level_objectives::ListServiceLevelObjectivesError::ValidationException(inner) => {
508                Error::ValidationException(inner)
509            }
510            crate::operation::list_service_level_objectives::ListServiceLevelObjectivesError::Unhandled(inner) => Error::Unhandled(inner),
511        }
512    }
513}
514impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::list_service_operations::ListServiceOperationsError, R>> for Error
515where
516    R: Send + Sync + std::fmt::Debug + 'static,
517{
518    fn from(
519        err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::list_service_operations::ListServiceOperationsError, R>,
520    ) -> Self {
521        match err {
522            ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
523            _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
524                meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
525                source: err.into(),
526            }),
527        }
528    }
529}
530impl From<crate::operation::list_service_operations::ListServiceOperationsError> for Error {
531    fn from(err: crate::operation::list_service_operations::ListServiceOperationsError) -> Self {
532        match err {
533            crate::operation::list_service_operations::ListServiceOperationsError::ThrottlingException(inner) => Error::ThrottlingException(inner),
534            crate::operation::list_service_operations::ListServiceOperationsError::ValidationException(inner) => Error::ValidationException(inner),
535            crate::operation::list_service_operations::ListServiceOperationsError::Unhandled(inner) => Error::Unhandled(inner),
536        }
537    }
538}
539impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::list_services::ListServicesError, R>> for Error
540where
541    R: Send + Sync + std::fmt::Debug + 'static,
542{
543    fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::list_services::ListServicesError, R>) -> Self {
544        match err {
545            ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
546            _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
547                meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
548                source: err.into(),
549            }),
550        }
551    }
552}
553impl From<crate::operation::list_services::ListServicesError> for Error {
554    fn from(err: crate::operation::list_services::ListServicesError) -> Self {
555        match err {
556            crate::operation::list_services::ListServicesError::ThrottlingException(inner) => Error::ThrottlingException(inner),
557            crate::operation::list_services::ListServicesError::ValidationException(inner) => Error::ValidationException(inner),
558            crate::operation::list_services::ListServicesError::Unhandled(inner) => Error::Unhandled(inner),
559        }
560    }
561}
562impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::list_service_states::ListServiceStatesError, R>> for Error
563where
564    R: Send + Sync + std::fmt::Debug + 'static,
565{
566    fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::list_service_states::ListServiceStatesError, R>) -> Self {
567        match err {
568            ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
569            _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
570                meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
571                source: err.into(),
572            }),
573        }
574    }
575}
576impl From<crate::operation::list_service_states::ListServiceStatesError> for Error {
577    fn from(err: crate::operation::list_service_states::ListServiceStatesError) -> Self {
578        match err {
579            crate::operation::list_service_states::ListServiceStatesError::ThrottlingException(inner) => Error::ThrottlingException(inner),
580            crate::operation::list_service_states::ListServiceStatesError::ValidationException(inner) => Error::ValidationException(inner),
581            crate::operation::list_service_states::ListServiceStatesError::Unhandled(inner) => Error::Unhandled(inner),
582        }
583    }
584}
585impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::list_tags_for_resource::ListTagsForResourceError, R>> for Error
586where
587    R: Send + Sync + std::fmt::Debug + 'static,
588{
589    fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::list_tags_for_resource::ListTagsForResourceError, R>) -> Self {
590        match err {
591            ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
592            _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
593                meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
594                source: err.into(),
595            }),
596        }
597    }
598}
599impl From<crate::operation::list_tags_for_resource::ListTagsForResourceError> for Error {
600    fn from(err: crate::operation::list_tags_for_resource::ListTagsForResourceError) -> Self {
601        match err {
602            crate::operation::list_tags_for_resource::ListTagsForResourceError::ResourceNotFoundException(inner) => {
603                Error::ResourceNotFoundException(inner)
604            }
605            crate::operation::list_tags_for_resource::ListTagsForResourceError::ThrottlingException(inner) => Error::ThrottlingException(inner),
606            crate::operation::list_tags_for_resource::ListTagsForResourceError::Unhandled(inner) => Error::Unhandled(inner),
607        }
608    }
609}
610impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::put_grouping_configuration::PutGroupingConfigurationError, R>>
611    for Error
612where
613    R: Send + Sync + std::fmt::Debug + 'static,
614{
615    fn from(
616        err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::put_grouping_configuration::PutGroupingConfigurationError, R>,
617    ) -> Self {
618        match err {
619            ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
620            _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
621                meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
622                source: err.into(),
623            }),
624        }
625    }
626}
627impl From<crate::operation::put_grouping_configuration::PutGroupingConfigurationError> for Error {
628    fn from(err: crate::operation::put_grouping_configuration::PutGroupingConfigurationError) -> Self {
629        match err {
630            crate::operation::put_grouping_configuration::PutGroupingConfigurationError::AccessDeniedException(inner) => {
631                Error::AccessDeniedException(inner)
632            }
633            crate::operation::put_grouping_configuration::PutGroupingConfigurationError::ThrottlingException(inner) => {
634                Error::ThrottlingException(inner)
635            }
636            crate::operation::put_grouping_configuration::PutGroupingConfigurationError::ValidationException(inner) => {
637                Error::ValidationException(inner)
638            }
639            crate::operation::put_grouping_configuration::PutGroupingConfigurationError::Unhandled(inner) => Error::Unhandled(inner),
640        }
641    }
642}
643impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::start_discovery::StartDiscoveryError, R>> for Error
644where
645    R: Send + Sync + std::fmt::Debug + 'static,
646{
647    fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::start_discovery::StartDiscoveryError, R>) -> Self {
648        match err {
649            ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
650            _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
651                meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
652                source: err.into(),
653            }),
654        }
655    }
656}
657impl From<crate::operation::start_discovery::StartDiscoveryError> for Error {
658    fn from(err: crate::operation::start_discovery::StartDiscoveryError) -> Self {
659        match err {
660            crate::operation::start_discovery::StartDiscoveryError::AccessDeniedException(inner) => Error::AccessDeniedException(inner),
661            crate::operation::start_discovery::StartDiscoveryError::ThrottlingException(inner) => Error::ThrottlingException(inner),
662            crate::operation::start_discovery::StartDiscoveryError::ValidationException(inner) => Error::ValidationException(inner),
663            crate::operation::start_discovery::StartDiscoveryError::Unhandled(inner) => Error::Unhandled(inner),
664        }
665    }
666}
667impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::tag_resource::TagResourceError, R>> for Error
668where
669    R: Send + Sync + std::fmt::Debug + 'static,
670{
671    fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::tag_resource::TagResourceError, R>) -> Self {
672        match err {
673            ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
674            _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
675                meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
676                source: err.into(),
677            }),
678        }
679    }
680}
681impl From<crate::operation::tag_resource::TagResourceError> for Error {
682    fn from(err: crate::operation::tag_resource::TagResourceError) -> Self {
683        match err {
684            crate::operation::tag_resource::TagResourceError::ResourceNotFoundException(inner) => Error::ResourceNotFoundException(inner),
685            crate::operation::tag_resource::TagResourceError::ServiceQuotaExceededException(inner) => Error::ServiceQuotaExceededException(inner),
686            crate::operation::tag_resource::TagResourceError::ThrottlingException(inner) => Error::ThrottlingException(inner),
687            crate::operation::tag_resource::TagResourceError::Unhandled(inner) => Error::Unhandled(inner),
688        }
689    }
690}
691impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::untag_resource::UntagResourceError, R>> for Error
692where
693    R: Send + Sync + std::fmt::Debug + 'static,
694{
695    fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::untag_resource::UntagResourceError, R>) -> Self {
696        match err {
697            ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
698            _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
699                meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
700                source: err.into(),
701            }),
702        }
703    }
704}
705impl From<crate::operation::untag_resource::UntagResourceError> for Error {
706    fn from(err: crate::operation::untag_resource::UntagResourceError) -> Self {
707        match err {
708            crate::operation::untag_resource::UntagResourceError::ResourceNotFoundException(inner) => Error::ResourceNotFoundException(inner),
709            crate::operation::untag_resource::UntagResourceError::ThrottlingException(inner) => Error::ThrottlingException(inner),
710            crate::operation::untag_resource::UntagResourceError::Unhandled(inner) => Error::Unhandled(inner),
711        }
712    }
713}
714impl<R>
715    From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::update_service_level_objective::UpdateServiceLevelObjectiveError, R>>
716    for Error
717where
718    R: Send + Sync + std::fmt::Debug + 'static,
719{
720    fn from(
721        err: ::aws_smithy_runtime_api::client::result::SdkError<
722            crate::operation::update_service_level_objective::UpdateServiceLevelObjectiveError,
723            R,
724        >,
725    ) -> Self {
726        match err {
727            ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
728            _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
729                meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
730                source: err.into(),
731            }),
732        }
733    }
734}
735impl From<crate::operation::update_service_level_objective::UpdateServiceLevelObjectiveError> for Error {
736    fn from(err: crate::operation::update_service_level_objective::UpdateServiceLevelObjectiveError) -> Self {
737        match err {
738            crate::operation::update_service_level_objective::UpdateServiceLevelObjectiveError::ResourceNotFoundException(inner) => {
739                Error::ResourceNotFoundException(inner)
740            }
741            crate::operation::update_service_level_objective::UpdateServiceLevelObjectiveError::ThrottlingException(inner) => {
742                Error::ThrottlingException(inner)
743            }
744            crate::operation::update_service_level_objective::UpdateServiceLevelObjectiveError::ValidationException(inner) => {
745                Error::ValidationException(inner)
746            }
747            crate::operation::update_service_level_objective::UpdateServiceLevelObjectiveError::Unhandled(inner) => Error::Unhandled(inner),
748        }
749    }
750}
751impl ::std::error::Error for Error {
752    fn source(&self) -> std::option::Option<&(dyn ::std::error::Error + 'static)> {
753        match self {
754            Error::AccessDeniedException(inner) => inner.source(),
755            Error::ConflictException(inner) => inner.source(),
756            Error::ResourceNotFoundException(inner) => inner.source(),
757            Error::ServiceQuotaExceededException(inner) => inner.source(),
758            Error::ThrottlingException(inner) => inner.source(),
759            Error::ValidationException(inner) => inner.source(),
760            Error::Unhandled(inner) => ::std::option::Option::Some(&*inner.source),
761        }
762    }
763}
764impl ::aws_types::request_id::RequestId for Error {
765    fn request_id(&self) -> Option<&str> {
766        match self {
767            Self::AccessDeniedException(e) => e.request_id(),
768            Self::ConflictException(e) => e.request_id(),
769            Self::ResourceNotFoundException(e) => e.request_id(),
770            Self::ServiceQuotaExceededException(e) => e.request_id(),
771            Self::ThrottlingException(e) => e.request_id(),
772            Self::ValidationException(e) => e.request_id(),
773            Self::Unhandled(e) => e.meta.request_id(),
774        }
775    }
776}