aws_sdk_docdbelastic/
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>An exception that occurs when there are not sufficient permissions to perform an action.</p>
7    AccessDeniedException(crate::types::error::AccessDeniedException),
8    /// <p>There was an access conflict.</p>
9    ConflictException(crate::types::error::ConflictException),
10    /// <p>There was an internal server error.</p>
11    InternalServerException(crate::types::error::InternalServerException),
12    /// <p>The specified resource could not be located.</p>
13    ResourceNotFoundException(crate::types::error::ResourceNotFoundException),
14    /// <p>The service quota for the action was exceeded.</p>
15    ServiceQuotaExceededException(crate::types::error::ServiceQuotaExceededException),
16    /// <p>ThrottlingException will be thrown when request was denied due to request throttling.</p>
17    ThrottlingException(crate::types::error::ThrottlingException),
18    /// <p>A structure defining a validation exception.</p>
19    ValidationException(crate::types::error::ValidationException),
20    /// An unexpected error occurred (e.g., invalid JSON returned by the service or an unknown error code).
21    #[deprecated(note = "Matching `Unhandled` directly is not forwards compatible. Instead, match using a \
22    variable wildcard pattern and check `.code()`:
23     \
24    &nbsp;&nbsp;&nbsp;`err if err.code() == Some(\"SpecificExceptionCode\") => { /* handle the error */ }`
25     \
26    See [`ProvideErrorMetadata`](#impl-ProvideErrorMetadata-for-Error) for what information is available for the error.")]
27    Unhandled(crate::error::sealed_unhandled::Unhandled),
28}
29impl ::std::fmt::Display for Error {
30    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
31        match self {
32            Error::AccessDeniedException(inner) => inner.fmt(f),
33            Error::ConflictException(inner) => inner.fmt(f),
34            Error::InternalServerException(inner) => inner.fmt(f),
35            Error::ResourceNotFoundException(inner) => inner.fmt(f),
36            Error::ServiceQuotaExceededException(inner) => inner.fmt(f),
37            Error::ThrottlingException(inner) => inner.fmt(f),
38            Error::ValidationException(inner) => inner.fmt(f),
39            Error::Unhandled(_) => {
40                if let ::std::option::Option::Some(code) = ::aws_smithy_types::error::metadata::ProvideErrorMetadata::code(self) {
41                    write!(f, "unhandled error ({code})")
42                } else {
43                    f.write_str("unhandled error")
44                }
45            }
46        }
47    }
48}
49impl From<::aws_smithy_types::error::operation::BuildError> for Error {
50    fn from(value: ::aws_smithy_types::error::operation::BuildError) -> Self {
51        Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
52            source: value.into(),
53            meta: ::std::default::Default::default(),
54        })
55    }
56}
57impl ::aws_smithy_types::error::metadata::ProvideErrorMetadata for Error {
58    fn meta(&self) -> &::aws_smithy_types::error::metadata::ErrorMetadata {
59        match self {
60            Self::AccessDeniedException(inner) => inner.meta(),
61            Self::ConflictException(inner) => inner.meta(),
62            Self::InternalServerException(inner) => inner.meta(),
63            Self::ResourceNotFoundException(inner) => inner.meta(),
64            Self::ServiceQuotaExceededException(inner) => inner.meta(),
65            Self::ThrottlingException(inner) => inner.meta(),
66            Self::ValidationException(inner) => inner.meta(),
67            Self::Unhandled(inner) => &inner.meta,
68        }
69    }
70}
71impl<R>
72    From<
73        ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::apply_pending_maintenance_action::ApplyPendingMaintenanceActionError, R>,
74    > for Error
75where
76    R: Send + Sync + std::fmt::Debug + 'static,
77{
78    fn from(
79        err: ::aws_smithy_runtime_api::client::result::SdkError<
80            crate::operation::apply_pending_maintenance_action::ApplyPendingMaintenanceActionError,
81            R,
82        >,
83    ) -> Self {
84        match err {
85            ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
86            _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
87                meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
88                source: err.into(),
89            }),
90        }
91    }
92}
93impl From<crate::operation::apply_pending_maintenance_action::ApplyPendingMaintenanceActionError> for Error {
94    fn from(err: crate::operation::apply_pending_maintenance_action::ApplyPendingMaintenanceActionError) -> Self {
95        match err {
96            crate::operation::apply_pending_maintenance_action::ApplyPendingMaintenanceActionError::AccessDeniedException(inner) => {
97                Error::AccessDeniedException(inner)
98            }
99            crate::operation::apply_pending_maintenance_action::ApplyPendingMaintenanceActionError::ConflictException(inner) => {
100                Error::ConflictException(inner)
101            }
102            crate::operation::apply_pending_maintenance_action::ApplyPendingMaintenanceActionError::InternalServerException(inner) => {
103                Error::InternalServerException(inner)
104            }
105            crate::operation::apply_pending_maintenance_action::ApplyPendingMaintenanceActionError::ResourceNotFoundException(inner) => {
106                Error::ResourceNotFoundException(inner)
107            }
108            crate::operation::apply_pending_maintenance_action::ApplyPendingMaintenanceActionError::ThrottlingException(inner) => {
109                Error::ThrottlingException(inner)
110            }
111            crate::operation::apply_pending_maintenance_action::ApplyPendingMaintenanceActionError::ValidationException(inner) => {
112                Error::ValidationException(inner)
113            }
114            crate::operation::apply_pending_maintenance_action::ApplyPendingMaintenanceActionError::Unhandled(inner) => Error::Unhandled(inner),
115        }
116    }
117}
118impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::copy_cluster_snapshot::CopyClusterSnapshotError, R>> for Error
119where
120    R: Send + Sync + std::fmt::Debug + 'static,
121{
122    fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::copy_cluster_snapshot::CopyClusterSnapshotError, R>) -> Self {
123        match err {
124            ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
125            _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
126                meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
127                source: err.into(),
128            }),
129        }
130    }
131}
132impl From<crate::operation::copy_cluster_snapshot::CopyClusterSnapshotError> for Error {
133    fn from(err: crate::operation::copy_cluster_snapshot::CopyClusterSnapshotError) -> Self {
134        match err {
135            crate::operation::copy_cluster_snapshot::CopyClusterSnapshotError::AccessDeniedException(inner) => Error::AccessDeniedException(inner),
136            crate::operation::copy_cluster_snapshot::CopyClusterSnapshotError::ConflictException(inner) => Error::ConflictException(inner),
137            crate::operation::copy_cluster_snapshot::CopyClusterSnapshotError::InternalServerException(inner) => {
138                Error::InternalServerException(inner)
139            }
140            crate::operation::copy_cluster_snapshot::CopyClusterSnapshotError::ResourceNotFoundException(inner) => {
141                Error::ResourceNotFoundException(inner)
142            }
143            crate::operation::copy_cluster_snapshot::CopyClusterSnapshotError::ServiceQuotaExceededException(inner) => {
144                Error::ServiceQuotaExceededException(inner)
145            }
146            crate::operation::copy_cluster_snapshot::CopyClusterSnapshotError::ThrottlingException(inner) => Error::ThrottlingException(inner),
147            crate::operation::copy_cluster_snapshot::CopyClusterSnapshotError::ValidationException(inner) => Error::ValidationException(inner),
148            crate::operation::copy_cluster_snapshot::CopyClusterSnapshotError::Unhandled(inner) => Error::Unhandled(inner),
149        }
150    }
151}
152impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::create_cluster::CreateClusterError, R>> for Error
153where
154    R: Send + Sync + std::fmt::Debug + 'static,
155{
156    fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::create_cluster::CreateClusterError, R>) -> Self {
157        match err {
158            ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
159            _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
160                meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
161                source: err.into(),
162            }),
163        }
164    }
165}
166impl From<crate::operation::create_cluster::CreateClusterError> for Error {
167    fn from(err: crate::operation::create_cluster::CreateClusterError) -> Self {
168        match err {
169            crate::operation::create_cluster::CreateClusterError::AccessDeniedException(inner) => Error::AccessDeniedException(inner),
170            crate::operation::create_cluster::CreateClusterError::ConflictException(inner) => Error::ConflictException(inner),
171            crate::operation::create_cluster::CreateClusterError::InternalServerException(inner) => Error::InternalServerException(inner),
172            crate::operation::create_cluster::CreateClusterError::ServiceQuotaExceededException(inner) => Error::ServiceQuotaExceededException(inner),
173            crate::operation::create_cluster::CreateClusterError::ThrottlingException(inner) => Error::ThrottlingException(inner),
174            crate::operation::create_cluster::CreateClusterError::ValidationException(inner) => Error::ValidationException(inner),
175            crate::operation::create_cluster::CreateClusterError::Unhandled(inner) => Error::Unhandled(inner),
176        }
177    }
178}
179impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::create_cluster_snapshot::CreateClusterSnapshotError, R>> for Error
180where
181    R: Send + Sync + std::fmt::Debug + 'static,
182{
183    fn from(
184        err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::create_cluster_snapshot::CreateClusterSnapshotError, R>,
185    ) -> Self {
186        match err {
187            ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
188            _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
189                meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
190                source: err.into(),
191            }),
192        }
193    }
194}
195impl From<crate::operation::create_cluster_snapshot::CreateClusterSnapshotError> for Error {
196    fn from(err: crate::operation::create_cluster_snapshot::CreateClusterSnapshotError) -> Self {
197        match err {
198            crate::operation::create_cluster_snapshot::CreateClusterSnapshotError::AccessDeniedException(inner) => {
199                Error::AccessDeniedException(inner)
200            }
201            crate::operation::create_cluster_snapshot::CreateClusterSnapshotError::ConflictException(inner) => Error::ConflictException(inner),
202            crate::operation::create_cluster_snapshot::CreateClusterSnapshotError::InternalServerException(inner) => {
203                Error::InternalServerException(inner)
204            }
205            crate::operation::create_cluster_snapshot::CreateClusterSnapshotError::ResourceNotFoundException(inner) => {
206                Error::ResourceNotFoundException(inner)
207            }
208            crate::operation::create_cluster_snapshot::CreateClusterSnapshotError::ServiceQuotaExceededException(inner) => {
209                Error::ServiceQuotaExceededException(inner)
210            }
211            crate::operation::create_cluster_snapshot::CreateClusterSnapshotError::ThrottlingException(inner) => Error::ThrottlingException(inner),
212            crate::operation::create_cluster_snapshot::CreateClusterSnapshotError::ValidationException(inner) => Error::ValidationException(inner),
213            crate::operation::create_cluster_snapshot::CreateClusterSnapshotError::Unhandled(inner) => Error::Unhandled(inner),
214        }
215    }
216}
217impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::delete_cluster::DeleteClusterError, R>> for Error
218where
219    R: Send + Sync + std::fmt::Debug + 'static,
220{
221    fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::delete_cluster::DeleteClusterError, R>) -> Self {
222        match err {
223            ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
224            _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
225                meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
226                source: err.into(),
227            }),
228        }
229    }
230}
231impl From<crate::operation::delete_cluster::DeleteClusterError> for Error {
232    fn from(err: crate::operation::delete_cluster::DeleteClusterError) -> Self {
233        match err {
234            crate::operation::delete_cluster::DeleteClusterError::AccessDeniedException(inner) => Error::AccessDeniedException(inner),
235            crate::operation::delete_cluster::DeleteClusterError::ConflictException(inner) => Error::ConflictException(inner),
236            crate::operation::delete_cluster::DeleteClusterError::InternalServerException(inner) => Error::InternalServerException(inner),
237            crate::operation::delete_cluster::DeleteClusterError::ResourceNotFoundException(inner) => Error::ResourceNotFoundException(inner),
238            crate::operation::delete_cluster::DeleteClusterError::ThrottlingException(inner) => Error::ThrottlingException(inner),
239            crate::operation::delete_cluster::DeleteClusterError::ValidationException(inner) => Error::ValidationException(inner),
240            crate::operation::delete_cluster::DeleteClusterError::Unhandled(inner) => Error::Unhandled(inner),
241        }
242    }
243}
244impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::delete_cluster_snapshot::DeleteClusterSnapshotError, R>> for Error
245where
246    R: Send + Sync + std::fmt::Debug + 'static,
247{
248    fn from(
249        err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::delete_cluster_snapshot::DeleteClusterSnapshotError, R>,
250    ) -> Self {
251        match err {
252            ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
253            _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
254                meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
255                source: err.into(),
256            }),
257        }
258    }
259}
260impl From<crate::operation::delete_cluster_snapshot::DeleteClusterSnapshotError> for Error {
261    fn from(err: crate::operation::delete_cluster_snapshot::DeleteClusterSnapshotError) -> Self {
262        match err {
263            crate::operation::delete_cluster_snapshot::DeleteClusterSnapshotError::AccessDeniedException(inner) => {
264                Error::AccessDeniedException(inner)
265            }
266            crate::operation::delete_cluster_snapshot::DeleteClusterSnapshotError::ConflictException(inner) => Error::ConflictException(inner),
267            crate::operation::delete_cluster_snapshot::DeleteClusterSnapshotError::InternalServerException(inner) => {
268                Error::InternalServerException(inner)
269            }
270            crate::operation::delete_cluster_snapshot::DeleteClusterSnapshotError::ResourceNotFoundException(inner) => {
271                Error::ResourceNotFoundException(inner)
272            }
273            crate::operation::delete_cluster_snapshot::DeleteClusterSnapshotError::ThrottlingException(inner) => Error::ThrottlingException(inner),
274            crate::operation::delete_cluster_snapshot::DeleteClusterSnapshotError::ValidationException(inner) => Error::ValidationException(inner),
275            crate::operation::delete_cluster_snapshot::DeleteClusterSnapshotError::Unhandled(inner) => Error::Unhandled(inner),
276        }
277    }
278}
279impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::get_cluster::GetClusterError, R>> for Error
280where
281    R: Send + Sync + std::fmt::Debug + 'static,
282{
283    fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::get_cluster::GetClusterError, R>) -> Self {
284        match err {
285            ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
286            _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
287                meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
288                source: err.into(),
289            }),
290        }
291    }
292}
293impl From<crate::operation::get_cluster::GetClusterError> for Error {
294    fn from(err: crate::operation::get_cluster::GetClusterError) -> Self {
295        match err {
296            crate::operation::get_cluster::GetClusterError::AccessDeniedException(inner) => Error::AccessDeniedException(inner),
297            crate::operation::get_cluster::GetClusterError::InternalServerException(inner) => Error::InternalServerException(inner),
298            crate::operation::get_cluster::GetClusterError::ResourceNotFoundException(inner) => Error::ResourceNotFoundException(inner),
299            crate::operation::get_cluster::GetClusterError::ThrottlingException(inner) => Error::ThrottlingException(inner),
300            crate::operation::get_cluster::GetClusterError::ValidationException(inner) => Error::ValidationException(inner),
301            crate::operation::get_cluster::GetClusterError::Unhandled(inner) => Error::Unhandled(inner),
302        }
303    }
304}
305impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::get_cluster_snapshot::GetClusterSnapshotError, R>> for Error
306where
307    R: Send + Sync + std::fmt::Debug + 'static,
308{
309    fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::get_cluster_snapshot::GetClusterSnapshotError, R>) -> Self {
310        match err {
311            ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
312            _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
313                meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
314                source: err.into(),
315            }),
316        }
317    }
318}
319impl From<crate::operation::get_cluster_snapshot::GetClusterSnapshotError> for Error {
320    fn from(err: crate::operation::get_cluster_snapshot::GetClusterSnapshotError) -> Self {
321        match err {
322            crate::operation::get_cluster_snapshot::GetClusterSnapshotError::AccessDeniedException(inner) => Error::AccessDeniedException(inner),
323            crate::operation::get_cluster_snapshot::GetClusterSnapshotError::InternalServerException(inner) => Error::InternalServerException(inner),
324            crate::operation::get_cluster_snapshot::GetClusterSnapshotError::ResourceNotFoundException(inner) => {
325                Error::ResourceNotFoundException(inner)
326            }
327            crate::operation::get_cluster_snapshot::GetClusterSnapshotError::ThrottlingException(inner) => Error::ThrottlingException(inner),
328            crate::operation::get_cluster_snapshot::GetClusterSnapshotError::ValidationException(inner) => Error::ValidationException(inner),
329            crate::operation::get_cluster_snapshot::GetClusterSnapshotError::Unhandled(inner) => Error::Unhandled(inner),
330        }
331    }
332}
333impl<R>
334    From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::get_pending_maintenance_action::GetPendingMaintenanceActionError, R>>
335    for Error
336where
337    R: Send + Sync + std::fmt::Debug + 'static,
338{
339    fn from(
340        err: ::aws_smithy_runtime_api::client::result::SdkError<
341            crate::operation::get_pending_maintenance_action::GetPendingMaintenanceActionError,
342            R,
343        >,
344    ) -> Self {
345        match err {
346            ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
347            _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
348                meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
349                source: err.into(),
350            }),
351        }
352    }
353}
354impl From<crate::operation::get_pending_maintenance_action::GetPendingMaintenanceActionError> for Error {
355    fn from(err: crate::operation::get_pending_maintenance_action::GetPendingMaintenanceActionError) -> Self {
356        match err {
357            crate::operation::get_pending_maintenance_action::GetPendingMaintenanceActionError::AccessDeniedException(inner) => {
358                Error::AccessDeniedException(inner)
359            }
360            crate::operation::get_pending_maintenance_action::GetPendingMaintenanceActionError::ConflictException(inner) => {
361                Error::ConflictException(inner)
362            }
363            crate::operation::get_pending_maintenance_action::GetPendingMaintenanceActionError::InternalServerException(inner) => {
364                Error::InternalServerException(inner)
365            }
366            crate::operation::get_pending_maintenance_action::GetPendingMaintenanceActionError::ResourceNotFoundException(inner) => {
367                Error::ResourceNotFoundException(inner)
368            }
369            crate::operation::get_pending_maintenance_action::GetPendingMaintenanceActionError::ThrottlingException(inner) => {
370                Error::ThrottlingException(inner)
371            }
372            crate::operation::get_pending_maintenance_action::GetPendingMaintenanceActionError::ValidationException(inner) => {
373                Error::ValidationException(inner)
374            }
375            crate::operation::get_pending_maintenance_action::GetPendingMaintenanceActionError::Unhandled(inner) => Error::Unhandled(inner),
376        }
377    }
378}
379impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::list_clusters::ListClustersError, R>> for Error
380where
381    R: Send + Sync + std::fmt::Debug + 'static,
382{
383    fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::list_clusters::ListClustersError, R>) -> Self {
384        match err {
385            ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
386            _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
387                meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
388                source: err.into(),
389            }),
390        }
391    }
392}
393impl From<crate::operation::list_clusters::ListClustersError> for Error {
394    fn from(err: crate::operation::list_clusters::ListClustersError) -> Self {
395        match err {
396            crate::operation::list_clusters::ListClustersError::AccessDeniedException(inner) => Error::AccessDeniedException(inner),
397            crate::operation::list_clusters::ListClustersError::InternalServerException(inner) => Error::InternalServerException(inner),
398            crate::operation::list_clusters::ListClustersError::ThrottlingException(inner) => Error::ThrottlingException(inner),
399            crate::operation::list_clusters::ListClustersError::ValidationException(inner) => Error::ValidationException(inner),
400            crate::operation::list_clusters::ListClustersError::Unhandled(inner) => Error::Unhandled(inner),
401        }
402    }
403}
404impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::list_cluster_snapshots::ListClusterSnapshotsError, R>> for Error
405where
406    R: Send + Sync + std::fmt::Debug + 'static,
407{
408    fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::list_cluster_snapshots::ListClusterSnapshotsError, R>) -> Self {
409        match err {
410            ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
411            _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
412                meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
413                source: err.into(),
414            }),
415        }
416    }
417}
418impl From<crate::operation::list_cluster_snapshots::ListClusterSnapshotsError> for Error {
419    fn from(err: crate::operation::list_cluster_snapshots::ListClusterSnapshotsError) -> Self {
420        match err {
421            crate::operation::list_cluster_snapshots::ListClusterSnapshotsError::AccessDeniedException(inner) => Error::AccessDeniedException(inner),
422            crate::operation::list_cluster_snapshots::ListClusterSnapshotsError::InternalServerException(inner) => {
423                Error::InternalServerException(inner)
424            }
425            crate::operation::list_cluster_snapshots::ListClusterSnapshotsError::ThrottlingException(inner) => Error::ThrottlingException(inner),
426            crate::operation::list_cluster_snapshots::ListClusterSnapshotsError::ValidationException(inner) => Error::ValidationException(inner),
427            crate::operation::list_cluster_snapshots::ListClusterSnapshotsError::Unhandled(inner) => Error::Unhandled(inner),
428        }
429    }
430}
431impl<R>
432    From<
433        ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::list_pending_maintenance_actions::ListPendingMaintenanceActionsError, R>,
434    > for Error
435where
436    R: Send + Sync + std::fmt::Debug + 'static,
437{
438    fn from(
439        err: ::aws_smithy_runtime_api::client::result::SdkError<
440            crate::operation::list_pending_maintenance_actions::ListPendingMaintenanceActionsError,
441            R,
442        >,
443    ) -> Self {
444        match err {
445            ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
446            _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
447                meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
448                source: err.into(),
449            }),
450        }
451    }
452}
453impl From<crate::operation::list_pending_maintenance_actions::ListPendingMaintenanceActionsError> for Error {
454    fn from(err: crate::operation::list_pending_maintenance_actions::ListPendingMaintenanceActionsError) -> Self {
455        match err {
456            crate::operation::list_pending_maintenance_actions::ListPendingMaintenanceActionsError::AccessDeniedException(inner) => {
457                Error::AccessDeniedException(inner)
458            }
459            crate::operation::list_pending_maintenance_actions::ListPendingMaintenanceActionsError::InternalServerException(inner) => {
460                Error::InternalServerException(inner)
461            }
462            crate::operation::list_pending_maintenance_actions::ListPendingMaintenanceActionsError::ThrottlingException(inner) => {
463                Error::ThrottlingException(inner)
464            }
465            crate::operation::list_pending_maintenance_actions::ListPendingMaintenanceActionsError::ValidationException(inner) => {
466                Error::ValidationException(inner)
467            }
468            crate::operation::list_pending_maintenance_actions::ListPendingMaintenanceActionsError::Unhandled(inner) => Error::Unhandled(inner),
469        }
470    }
471}
472impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::list_tags_for_resource::ListTagsForResourceError, R>> for Error
473where
474    R: Send + Sync + std::fmt::Debug + 'static,
475{
476    fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::list_tags_for_resource::ListTagsForResourceError, R>) -> Self {
477        match err {
478            ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
479            _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
480                meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
481                source: err.into(),
482            }),
483        }
484    }
485}
486impl From<crate::operation::list_tags_for_resource::ListTagsForResourceError> for Error {
487    fn from(err: crate::operation::list_tags_for_resource::ListTagsForResourceError) -> Self {
488        match err {
489            crate::operation::list_tags_for_resource::ListTagsForResourceError::InternalServerException(inner) => {
490                Error::InternalServerException(inner)
491            }
492            crate::operation::list_tags_for_resource::ListTagsForResourceError::ResourceNotFoundException(inner) => {
493                Error::ResourceNotFoundException(inner)
494            }
495            crate::operation::list_tags_for_resource::ListTagsForResourceError::ThrottlingException(inner) => Error::ThrottlingException(inner),
496            crate::operation::list_tags_for_resource::ListTagsForResourceError::ValidationException(inner) => Error::ValidationException(inner),
497            crate::operation::list_tags_for_resource::ListTagsForResourceError::Unhandled(inner) => Error::Unhandled(inner),
498        }
499    }
500}
501impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::restore_cluster_from_snapshot::RestoreClusterFromSnapshotError, R>>
502    for Error
503where
504    R: Send + Sync + std::fmt::Debug + 'static,
505{
506    fn from(
507        err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::restore_cluster_from_snapshot::RestoreClusterFromSnapshotError, R>,
508    ) -> Self {
509        match err {
510            ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
511            _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
512                meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
513                source: err.into(),
514            }),
515        }
516    }
517}
518impl From<crate::operation::restore_cluster_from_snapshot::RestoreClusterFromSnapshotError> for Error {
519    fn from(err: crate::operation::restore_cluster_from_snapshot::RestoreClusterFromSnapshotError) -> Self {
520        match err {
521            crate::operation::restore_cluster_from_snapshot::RestoreClusterFromSnapshotError::AccessDeniedException(inner) => {
522                Error::AccessDeniedException(inner)
523            }
524            crate::operation::restore_cluster_from_snapshot::RestoreClusterFromSnapshotError::ConflictException(inner) => {
525                Error::ConflictException(inner)
526            }
527            crate::operation::restore_cluster_from_snapshot::RestoreClusterFromSnapshotError::InternalServerException(inner) => {
528                Error::InternalServerException(inner)
529            }
530            crate::operation::restore_cluster_from_snapshot::RestoreClusterFromSnapshotError::ResourceNotFoundException(inner) => {
531                Error::ResourceNotFoundException(inner)
532            }
533            crate::operation::restore_cluster_from_snapshot::RestoreClusterFromSnapshotError::ServiceQuotaExceededException(inner) => {
534                Error::ServiceQuotaExceededException(inner)
535            }
536            crate::operation::restore_cluster_from_snapshot::RestoreClusterFromSnapshotError::ThrottlingException(inner) => {
537                Error::ThrottlingException(inner)
538            }
539            crate::operation::restore_cluster_from_snapshot::RestoreClusterFromSnapshotError::ValidationException(inner) => {
540                Error::ValidationException(inner)
541            }
542            crate::operation::restore_cluster_from_snapshot::RestoreClusterFromSnapshotError::Unhandled(inner) => Error::Unhandled(inner),
543        }
544    }
545}
546impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::start_cluster::StartClusterError, R>> for Error
547where
548    R: Send + Sync + std::fmt::Debug + 'static,
549{
550    fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::start_cluster::StartClusterError, R>) -> Self {
551        match err {
552            ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
553            _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
554                meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
555                source: err.into(),
556            }),
557        }
558    }
559}
560impl From<crate::operation::start_cluster::StartClusterError> for Error {
561    fn from(err: crate::operation::start_cluster::StartClusterError) -> Self {
562        match err {
563            crate::operation::start_cluster::StartClusterError::AccessDeniedException(inner) => Error::AccessDeniedException(inner),
564            crate::operation::start_cluster::StartClusterError::InternalServerException(inner) => Error::InternalServerException(inner),
565            crate::operation::start_cluster::StartClusterError::ResourceNotFoundException(inner) => Error::ResourceNotFoundException(inner),
566            crate::operation::start_cluster::StartClusterError::ThrottlingException(inner) => Error::ThrottlingException(inner),
567            crate::operation::start_cluster::StartClusterError::ValidationException(inner) => Error::ValidationException(inner),
568            crate::operation::start_cluster::StartClusterError::Unhandled(inner) => Error::Unhandled(inner),
569        }
570    }
571}
572impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::stop_cluster::StopClusterError, R>> for Error
573where
574    R: Send + Sync + std::fmt::Debug + 'static,
575{
576    fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::stop_cluster::StopClusterError, R>) -> Self {
577        match err {
578            ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
579            _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
580                meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
581                source: err.into(),
582            }),
583        }
584    }
585}
586impl From<crate::operation::stop_cluster::StopClusterError> for Error {
587    fn from(err: crate::operation::stop_cluster::StopClusterError) -> Self {
588        match err {
589            crate::operation::stop_cluster::StopClusterError::AccessDeniedException(inner) => Error::AccessDeniedException(inner),
590            crate::operation::stop_cluster::StopClusterError::InternalServerException(inner) => Error::InternalServerException(inner),
591            crate::operation::stop_cluster::StopClusterError::ResourceNotFoundException(inner) => Error::ResourceNotFoundException(inner),
592            crate::operation::stop_cluster::StopClusterError::ThrottlingException(inner) => Error::ThrottlingException(inner),
593            crate::operation::stop_cluster::StopClusterError::ValidationException(inner) => Error::ValidationException(inner),
594            crate::operation::stop_cluster::StopClusterError::Unhandled(inner) => Error::Unhandled(inner),
595        }
596    }
597}
598impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::tag_resource::TagResourceError, R>> for Error
599where
600    R: Send + Sync + std::fmt::Debug + 'static,
601{
602    fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::tag_resource::TagResourceError, R>) -> Self {
603        match err {
604            ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
605            _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
606                meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
607                source: err.into(),
608            }),
609        }
610    }
611}
612impl From<crate::operation::tag_resource::TagResourceError> for Error {
613    fn from(err: crate::operation::tag_resource::TagResourceError) -> Self {
614        match err {
615            crate::operation::tag_resource::TagResourceError::InternalServerException(inner) => Error::InternalServerException(inner),
616            crate::operation::tag_resource::TagResourceError::ResourceNotFoundException(inner) => Error::ResourceNotFoundException(inner),
617            crate::operation::tag_resource::TagResourceError::ThrottlingException(inner) => Error::ThrottlingException(inner),
618            crate::operation::tag_resource::TagResourceError::ValidationException(inner) => Error::ValidationException(inner),
619            crate::operation::tag_resource::TagResourceError::Unhandled(inner) => Error::Unhandled(inner),
620        }
621    }
622}
623impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::untag_resource::UntagResourceError, R>> for Error
624where
625    R: Send + Sync + std::fmt::Debug + 'static,
626{
627    fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::untag_resource::UntagResourceError, R>) -> Self {
628        match err {
629            ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
630            _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
631                meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
632                source: err.into(),
633            }),
634        }
635    }
636}
637impl From<crate::operation::untag_resource::UntagResourceError> for Error {
638    fn from(err: crate::operation::untag_resource::UntagResourceError) -> Self {
639        match err {
640            crate::operation::untag_resource::UntagResourceError::InternalServerException(inner) => Error::InternalServerException(inner),
641            crate::operation::untag_resource::UntagResourceError::ResourceNotFoundException(inner) => Error::ResourceNotFoundException(inner),
642            crate::operation::untag_resource::UntagResourceError::ThrottlingException(inner) => Error::ThrottlingException(inner),
643            crate::operation::untag_resource::UntagResourceError::ValidationException(inner) => Error::ValidationException(inner),
644            crate::operation::untag_resource::UntagResourceError::Unhandled(inner) => Error::Unhandled(inner),
645        }
646    }
647}
648impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::update_cluster::UpdateClusterError, 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::update_cluster::UpdateClusterError, 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::update_cluster::UpdateClusterError> for Error {
663    fn from(err: crate::operation::update_cluster::UpdateClusterError) -> Self {
664        match err {
665            crate::operation::update_cluster::UpdateClusterError::AccessDeniedException(inner) => Error::AccessDeniedException(inner),
666            crate::operation::update_cluster::UpdateClusterError::ConflictException(inner) => Error::ConflictException(inner),
667            crate::operation::update_cluster::UpdateClusterError::InternalServerException(inner) => Error::InternalServerException(inner),
668            crate::operation::update_cluster::UpdateClusterError::ResourceNotFoundException(inner) => Error::ResourceNotFoundException(inner),
669            crate::operation::update_cluster::UpdateClusterError::ThrottlingException(inner) => Error::ThrottlingException(inner),
670            crate::operation::update_cluster::UpdateClusterError::ValidationException(inner) => Error::ValidationException(inner),
671            crate::operation::update_cluster::UpdateClusterError::Unhandled(inner) => Error::Unhandled(inner),
672        }
673    }
674}
675impl ::std::error::Error for Error {
676    fn source(&self) -> std::option::Option<&(dyn ::std::error::Error + 'static)> {
677        match self {
678            Error::AccessDeniedException(inner) => inner.source(),
679            Error::ConflictException(inner) => inner.source(),
680            Error::InternalServerException(inner) => inner.source(),
681            Error::ResourceNotFoundException(inner) => inner.source(),
682            Error::ServiceQuotaExceededException(inner) => inner.source(),
683            Error::ThrottlingException(inner) => inner.source(),
684            Error::ValidationException(inner) => inner.source(),
685            Error::Unhandled(inner) => ::std::option::Option::Some(&*inner.source),
686        }
687    }
688}
689impl ::aws_types::request_id::RequestId for Error {
690    fn request_id(&self) -> Option<&str> {
691        match self {
692            Self::AccessDeniedException(e) => e.request_id(),
693            Self::ConflictException(e) => e.request_id(),
694            Self::InternalServerException(e) => e.request_id(),
695            Self::ResourceNotFoundException(e) => e.request_id(),
696            Self::ServiceQuotaExceededException(e) => e.request_id(),
697            Self::ThrottlingException(e) => e.request_id(),
698            Self::ValidationException(e) => e.request_id(),
699            Self::Unhandled(e) => e.meta.request_id(),
700        }
701    }
702}