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