aws_sdk_timestreaminfluxdb/
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 access to perform this action.</p>
7    AccessDeniedException(crate::types::error::AccessDeniedException),
8    /// <p>The request conflicts with an existing resource in Timestream for InfluxDB.</p>
9    ConflictException(crate::types::error::ConflictException),
10    /// <p>The request processing has failed because of an unknown error, exception or failure.</p>
11    InternalServerException(crate::types::error::InternalServerException),
12    /// <p>The requested resource was not found or does not exist.</p>
13    ResourceNotFoundException(crate::types::error::ResourceNotFoundException),
14    /// <p>The request exceeds the service quota.</p>
15    ServiceQuotaExceededException(crate::types::error::ServiceQuotaExceededException),
16    /// <p>The request was denied due to request throttling.</p>
17    ThrottlingException(crate::types::error::ThrottlingException),
18    /// <p>The input fails to satisfy the constraints specified by Timestream for InfluxDB.</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> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::create_db_cluster::CreateDbClusterError, R>> for Error
72where
73    R: Send + Sync + std::fmt::Debug + 'static,
74{
75    fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::create_db_cluster::CreateDbClusterError, R>) -> Self {
76        match err {
77            ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
78            _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
79                meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
80                source: err.into(),
81            }),
82        }
83    }
84}
85impl From<crate::operation::create_db_cluster::CreateDbClusterError> for Error {
86    fn from(err: crate::operation::create_db_cluster::CreateDbClusterError) -> Self {
87        match err {
88            crate::operation::create_db_cluster::CreateDbClusterError::AccessDeniedException(inner) => Error::AccessDeniedException(inner),
89            crate::operation::create_db_cluster::CreateDbClusterError::ConflictException(inner) => Error::ConflictException(inner),
90            crate::operation::create_db_cluster::CreateDbClusterError::InternalServerException(inner) => Error::InternalServerException(inner),
91            crate::operation::create_db_cluster::CreateDbClusterError::ResourceNotFoundException(inner) => Error::ResourceNotFoundException(inner),
92            crate::operation::create_db_cluster::CreateDbClusterError::ServiceQuotaExceededException(inner) => {
93                Error::ServiceQuotaExceededException(inner)
94            }
95            crate::operation::create_db_cluster::CreateDbClusterError::ThrottlingException(inner) => Error::ThrottlingException(inner),
96            crate::operation::create_db_cluster::CreateDbClusterError::ValidationException(inner) => Error::ValidationException(inner),
97            crate::operation::create_db_cluster::CreateDbClusterError::Unhandled(inner) => Error::Unhandled(inner),
98        }
99    }
100}
101impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::create_db_instance::CreateDbInstanceError, R>> for Error
102where
103    R: Send + Sync + std::fmt::Debug + 'static,
104{
105    fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::create_db_instance::CreateDbInstanceError, R>) -> Self {
106        match err {
107            ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
108            _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
109                meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
110                source: err.into(),
111            }),
112        }
113    }
114}
115impl From<crate::operation::create_db_instance::CreateDbInstanceError> for Error {
116    fn from(err: crate::operation::create_db_instance::CreateDbInstanceError) -> Self {
117        match err {
118            crate::operation::create_db_instance::CreateDbInstanceError::AccessDeniedException(inner) => Error::AccessDeniedException(inner),
119            crate::operation::create_db_instance::CreateDbInstanceError::ConflictException(inner) => Error::ConflictException(inner),
120            crate::operation::create_db_instance::CreateDbInstanceError::InternalServerException(inner) => Error::InternalServerException(inner),
121            crate::operation::create_db_instance::CreateDbInstanceError::ResourceNotFoundException(inner) => Error::ResourceNotFoundException(inner),
122            crate::operation::create_db_instance::CreateDbInstanceError::ServiceQuotaExceededException(inner) => {
123                Error::ServiceQuotaExceededException(inner)
124            }
125            crate::operation::create_db_instance::CreateDbInstanceError::ThrottlingException(inner) => Error::ThrottlingException(inner),
126            crate::operation::create_db_instance::CreateDbInstanceError::ValidationException(inner) => Error::ValidationException(inner),
127            crate::operation::create_db_instance::CreateDbInstanceError::Unhandled(inner) => Error::Unhandled(inner),
128        }
129    }
130}
131impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::create_db_parameter_group::CreateDbParameterGroupError, R>>
132    for Error
133where
134    R: Send + Sync + std::fmt::Debug + 'static,
135{
136    fn from(
137        err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::create_db_parameter_group::CreateDbParameterGroupError, R>,
138    ) -> Self {
139        match err {
140            ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
141            _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
142                meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
143                source: err.into(),
144            }),
145        }
146    }
147}
148impl From<crate::operation::create_db_parameter_group::CreateDbParameterGroupError> for Error {
149    fn from(err: crate::operation::create_db_parameter_group::CreateDbParameterGroupError) -> Self {
150        match err {
151            crate::operation::create_db_parameter_group::CreateDbParameterGroupError::AccessDeniedException(inner) => {
152                Error::AccessDeniedException(inner)
153            }
154            crate::operation::create_db_parameter_group::CreateDbParameterGroupError::ConflictException(inner) => Error::ConflictException(inner),
155            crate::operation::create_db_parameter_group::CreateDbParameterGroupError::InternalServerException(inner) => {
156                Error::InternalServerException(inner)
157            }
158            crate::operation::create_db_parameter_group::CreateDbParameterGroupError::ResourceNotFoundException(inner) => {
159                Error::ResourceNotFoundException(inner)
160            }
161            crate::operation::create_db_parameter_group::CreateDbParameterGroupError::ServiceQuotaExceededException(inner) => {
162                Error::ServiceQuotaExceededException(inner)
163            }
164            crate::operation::create_db_parameter_group::CreateDbParameterGroupError::ThrottlingException(inner) => Error::ThrottlingException(inner),
165            crate::operation::create_db_parameter_group::CreateDbParameterGroupError::ValidationException(inner) => Error::ValidationException(inner),
166            crate::operation::create_db_parameter_group::CreateDbParameterGroupError::Unhandled(inner) => Error::Unhandled(inner),
167        }
168    }
169}
170impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::delete_db_cluster::DeleteDbClusterError, R>> for Error
171where
172    R: Send + Sync + std::fmt::Debug + 'static,
173{
174    fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::delete_db_cluster::DeleteDbClusterError, R>) -> Self {
175        match err {
176            ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
177            _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
178                meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
179                source: err.into(),
180            }),
181        }
182    }
183}
184impl From<crate::operation::delete_db_cluster::DeleteDbClusterError> for Error {
185    fn from(err: crate::operation::delete_db_cluster::DeleteDbClusterError) -> Self {
186        match err {
187            crate::operation::delete_db_cluster::DeleteDbClusterError::AccessDeniedException(inner) => Error::AccessDeniedException(inner),
188            crate::operation::delete_db_cluster::DeleteDbClusterError::ConflictException(inner) => Error::ConflictException(inner),
189            crate::operation::delete_db_cluster::DeleteDbClusterError::InternalServerException(inner) => Error::InternalServerException(inner),
190            crate::operation::delete_db_cluster::DeleteDbClusterError::ResourceNotFoundException(inner) => Error::ResourceNotFoundException(inner),
191            crate::operation::delete_db_cluster::DeleteDbClusterError::ThrottlingException(inner) => Error::ThrottlingException(inner),
192            crate::operation::delete_db_cluster::DeleteDbClusterError::ValidationException(inner) => Error::ValidationException(inner),
193            crate::operation::delete_db_cluster::DeleteDbClusterError::Unhandled(inner) => Error::Unhandled(inner),
194        }
195    }
196}
197impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::delete_db_instance::DeleteDbInstanceError, R>> for Error
198where
199    R: Send + Sync + std::fmt::Debug + 'static,
200{
201    fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::delete_db_instance::DeleteDbInstanceError, R>) -> Self {
202        match err {
203            ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
204            _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
205                meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
206                source: err.into(),
207            }),
208        }
209    }
210}
211impl From<crate::operation::delete_db_instance::DeleteDbInstanceError> for Error {
212    fn from(err: crate::operation::delete_db_instance::DeleteDbInstanceError) -> Self {
213        match err {
214            crate::operation::delete_db_instance::DeleteDbInstanceError::AccessDeniedException(inner) => Error::AccessDeniedException(inner),
215            crate::operation::delete_db_instance::DeleteDbInstanceError::ConflictException(inner) => Error::ConflictException(inner),
216            crate::operation::delete_db_instance::DeleteDbInstanceError::InternalServerException(inner) => Error::InternalServerException(inner),
217            crate::operation::delete_db_instance::DeleteDbInstanceError::ResourceNotFoundException(inner) => Error::ResourceNotFoundException(inner),
218            crate::operation::delete_db_instance::DeleteDbInstanceError::ThrottlingException(inner) => Error::ThrottlingException(inner),
219            crate::operation::delete_db_instance::DeleteDbInstanceError::ValidationException(inner) => Error::ValidationException(inner),
220            crate::operation::delete_db_instance::DeleteDbInstanceError::Unhandled(inner) => Error::Unhandled(inner),
221        }
222    }
223}
224impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::get_db_cluster::GetDbClusterError, R>> for Error
225where
226    R: Send + Sync + std::fmt::Debug + 'static,
227{
228    fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::get_db_cluster::GetDbClusterError, R>) -> Self {
229        match err {
230            ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
231            _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
232                meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
233                source: err.into(),
234            }),
235        }
236    }
237}
238impl From<crate::operation::get_db_cluster::GetDbClusterError> for Error {
239    fn from(err: crate::operation::get_db_cluster::GetDbClusterError) -> Self {
240        match err {
241            crate::operation::get_db_cluster::GetDbClusterError::AccessDeniedException(inner) => Error::AccessDeniedException(inner),
242            crate::operation::get_db_cluster::GetDbClusterError::InternalServerException(inner) => Error::InternalServerException(inner),
243            crate::operation::get_db_cluster::GetDbClusterError::ResourceNotFoundException(inner) => Error::ResourceNotFoundException(inner),
244            crate::operation::get_db_cluster::GetDbClusterError::ThrottlingException(inner) => Error::ThrottlingException(inner),
245            crate::operation::get_db_cluster::GetDbClusterError::ValidationException(inner) => Error::ValidationException(inner),
246            crate::operation::get_db_cluster::GetDbClusterError::Unhandled(inner) => Error::Unhandled(inner),
247        }
248    }
249}
250impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::get_db_instance::GetDbInstanceError, R>> for Error
251where
252    R: Send + Sync + std::fmt::Debug + 'static,
253{
254    fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::get_db_instance::GetDbInstanceError, R>) -> Self {
255        match err {
256            ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
257            _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
258                meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
259                source: err.into(),
260            }),
261        }
262    }
263}
264impl From<crate::operation::get_db_instance::GetDbInstanceError> for Error {
265    fn from(err: crate::operation::get_db_instance::GetDbInstanceError) -> Self {
266        match err {
267            crate::operation::get_db_instance::GetDbInstanceError::AccessDeniedException(inner) => Error::AccessDeniedException(inner),
268            crate::operation::get_db_instance::GetDbInstanceError::InternalServerException(inner) => Error::InternalServerException(inner),
269            crate::operation::get_db_instance::GetDbInstanceError::ResourceNotFoundException(inner) => Error::ResourceNotFoundException(inner),
270            crate::operation::get_db_instance::GetDbInstanceError::ThrottlingException(inner) => Error::ThrottlingException(inner),
271            crate::operation::get_db_instance::GetDbInstanceError::ValidationException(inner) => Error::ValidationException(inner),
272            crate::operation::get_db_instance::GetDbInstanceError::Unhandled(inner) => Error::Unhandled(inner),
273        }
274    }
275}
276impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::get_db_parameter_group::GetDbParameterGroupError, R>> for Error
277where
278    R: Send + Sync + std::fmt::Debug + 'static,
279{
280    fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::get_db_parameter_group::GetDbParameterGroupError, R>) -> Self {
281        match err {
282            ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
283            _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
284                meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
285                source: err.into(),
286            }),
287        }
288    }
289}
290impl From<crate::operation::get_db_parameter_group::GetDbParameterGroupError> for Error {
291    fn from(err: crate::operation::get_db_parameter_group::GetDbParameterGroupError) -> Self {
292        match err {
293            crate::operation::get_db_parameter_group::GetDbParameterGroupError::AccessDeniedException(inner) => Error::AccessDeniedException(inner),
294            crate::operation::get_db_parameter_group::GetDbParameterGroupError::InternalServerException(inner) => {
295                Error::InternalServerException(inner)
296            }
297            crate::operation::get_db_parameter_group::GetDbParameterGroupError::ResourceNotFoundException(inner) => {
298                Error::ResourceNotFoundException(inner)
299            }
300            crate::operation::get_db_parameter_group::GetDbParameterGroupError::ThrottlingException(inner) => Error::ThrottlingException(inner),
301            crate::operation::get_db_parameter_group::GetDbParameterGroupError::ValidationException(inner) => Error::ValidationException(inner),
302            crate::operation::get_db_parameter_group::GetDbParameterGroupError::Unhandled(inner) => Error::Unhandled(inner),
303        }
304    }
305}
306impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::list_db_clusters::ListDbClustersError, R>> for Error
307where
308    R: Send + Sync + std::fmt::Debug + 'static,
309{
310    fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::list_db_clusters::ListDbClustersError, R>) -> Self {
311        match err {
312            ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
313            _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
314                meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
315                source: err.into(),
316            }),
317        }
318    }
319}
320impl From<crate::operation::list_db_clusters::ListDbClustersError> for Error {
321    fn from(err: crate::operation::list_db_clusters::ListDbClustersError) -> Self {
322        match err {
323            crate::operation::list_db_clusters::ListDbClustersError::AccessDeniedException(inner) => Error::AccessDeniedException(inner),
324            crate::operation::list_db_clusters::ListDbClustersError::InternalServerException(inner) => Error::InternalServerException(inner),
325            crate::operation::list_db_clusters::ListDbClustersError::ResourceNotFoundException(inner) => Error::ResourceNotFoundException(inner),
326            crate::operation::list_db_clusters::ListDbClustersError::ThrottlingException(inner) => Error::ThrottlingException(inner),
327            crate::operation::list_db_clusters::ListDbClustersError::ValidationException(inner) => Error::ValidationException(inner),
328            crate::operation::list_db_clusters::ListDbClustersError::Unhandled(inner) => Error::Unhandled(inner),
329        }
330    }
331}
332impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::list_db_instances::ListDbInstancesError, R>> for Error
333where
334    R: Send + Sync + std::fmt::Debug + 'static,
335{
336    fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::list_db_instances::ListDbInstancesError, R>) -> Self {
337        match err {
338            ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
339            _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
340                meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
341                source: err.into(),
342            }),
343        }
344    }
345}
346impl From<crate::operation::list_db_instances::ListDbInstancesError> for Error {
347    fn from(err: crate::operation::list_db_instances::ListDbInstancesError) -> Self {
348        match err {
349            crate::operation::list_db_instances::ListDbInstancesError::AccessDeniedException(inner) => Error::AccessDeniedException(inner),
350            crate::operation::list_db_instances::ListDbInstancesError::InternalServerException(inner) => Error::InternalServerException(inner),
351            crate::operation::list_db_instances::ListDbInstancesError::ResourceNotFoundException(inner) => Error::ResourceNotFoundException(inner),
352            crate::operation::list_db_instances::ListDbInstancesError::ThrottlingException(inner) => Error::ThrottlingException(inner),
353            crate::operation::list_db_instances::ListDbInstancesError::ValidationException(inner) => Error::ValidationException(inner),
354            crate::operation::list_db_instances::ListDbInstancesError::Unhandled(inner) => Error::Unhandled(inner),
355        }
356    }
357}
358impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::list_db_instances_for_cluster::ListDbInstancesForClusterError, R>>
359    for Error
360where
361    R: Send + Sync + std::fmt::Debug + 'static,
362{
363    fn from(
364        err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::list_db_instances_for_cluster::ListDbInstancesForClusterError, R>,
365    ) -> Self {
366        match err {
367            ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
368            _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
369                meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
370                source: err.into(),
371            }),
372        }
373    }
374}
375impl From<crate::operation::list_db_instances_for_cluster::ListDbInstancesForClusterError> for Error {
376    fn from(err: crate::operation::list_db_instances_for_cluster::ListDbInstancesForClusterError) -> Self {
377        match err {
378            crate::operation::list_db_instances_for_cluster::ListDbInstancesForClusterError::AccessDeniedException(inner) => {
379                Error::AccessDeniedException(inner)
380            }
381            crate::operation::list_db_instances_for_cluster::ListDbInstancesForClusterError::InternalServerException(inner) => {
382                Error::InternalServerException(inner)
383            }
384            crate::operation::list_db_instances_for_cluster::ListDbInstancesForClusterError::ResourceNotFoundException(inner) => {
385                Error::ResourceNotFoundException(inner)
386            }
387            crate::operation::list_db_instances_for_cluster::ListDbInstancesForClusterError::ThrottlingException(inner) => {
388                Error::ThrottlingException(inner)
389            }
390            crate::operation::list_db_instances_for_cluster::ListDbInstancesForClusterError::ValidationException(inner) => {
391                Error::ValidationException(inner)
392            }
393            crate::operation::list_db_instances_for_cluster::ListDbInstancesForClusterError::Unhandled(inner) => Error::Unhandled(inner),
394        }
395    }
396}
397impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::list_db_parameter_groups::ListDbParameterGroupsError, R>> for Error
398where
399    R: Send + Sync + std::fmt::Debug + 'static,
400{
401    fn from(
402        err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::list_db_parameter_groups::ListDbParameterGroupsError, R>,
403    ) -> Self {
404        match err {
405            ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
406            _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
407                meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
408                source: err.into(),
409            }),
410        }
411    }
412}
413impl From<crate::operation::list_db_parameter_groups::ListDbParameterGroupsError> for Error {
414    fn from(err: crate::operation::list_db_parameter_groups::ListDbParameterGroupsError) -> Self {
415        match err {
416            crate::operation::list_db_parameter_groups::ListDbParameterGroupsError::AccessDeniedException(inner) => {
417                Error::AccessDeniedException(inner)
418            }
419            crate::operation::list_db_parameter_groups::ListDbParameterGroupsError::InternalServerException(inner) => {
420                Error::InternalServerException(inner)
421            }
422            crate::operation::list_db_parameter_groups::ListDbParameterGroupsError::ResourceNotFoundException(inner) => {
423                Error::ResourceNotFoundException(inner)
424            }
425            crate::operation::list_db_parameter_groups::ListDbParameterGroupsError::ThrottlingException(inner) => Error::ThrottlingException(inner),
426            crate::operation::list_db_parameter_groups::ListDbParameterGroupsError::ValidationException(inner) => Error::ValidationException(inner),
427            crate::operation::list_db_parameter_groups::ListDbParameterGroupsError::Unhandled(inner) => Error::Unhandled(inner),
428        }
429    }
430}
431impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::list_tags_for_resource::ListTagsForResourceError, R>> for Error
432where
433    R: Send + Sync + std::fmt::Debug + 'static,
434{
435    fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::list_tags_for_resource::ListTagsForResourceError, R>) -> Self {
436        match err {
437            ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
438            _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
439                meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
440                source: err.into(),
441            }),
442        }
443    }
444}
445impl From<crate::operation::list_tags_for_resource::ListTagsForResourceError> for Error {
446    fn from(err: crate::operation::list_tags_for_resource::ListTagsForResourceError) -> Self {
447        match err {
448            crate::operation::list_tags_for_resource::ListTagsForResourceError::ResourceNotFoundException(inner) => {
449                Error::ResourceNotFoundException(inner)
450            }
451            crate::operation::list_tags_for_resource::ListTagsForResourceError::Unhandled(inner) => Error::Unhandled(inner),
452        }
453    }
454}
455impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::tag_resource::TagResourceError, R>> for Error
456where
457    R: Send + Sync + std::fmt::Debug + 'static,
458{
459    fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::tag_resource::TagResourceError, R>) -> Self {
460        match err {
461            ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
462            _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
463                meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
464                source: err.into(),
465            }),
466        }
467    }
468}
469impl From<crate::operation::tag_resource::TagResourceError> for Error {
470    fn from(err: crate::operation::tag_resource::TagResourceError) -> Self {
471        match err {
472            crate::operation::tag_resource::TagResourceError::ResourceNotFoundException(inner) => Error::ResourceNotFoundException(inner),
473            crate::operation::tag_resource::TagResourceError::ServiceQuotaExceededException(inner) => Error::ServiceQuotaExceededException(inner),
474            crate::operation::tag_resource::TagResourceError::Unhandled(inner) => Error::Unhandled(inner),
475        }
476    }
477}
478impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::untag_resource::UntagResourceError, R>> for Error
479where
480    R: Send + Sync + std::fmt::Debug + 'static,
481{
482    fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::untag_resource::UntagResourceError, R>) -> Self {
483        match err {
484            ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
485            _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
486                meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
487                source: err.into(),
488            }),
489        }
490    }
491}
492impl From<crate::operation::untag_resource::UntagResourceError> for Error {
493    fn from(err: crate::operation::untag_resource::UntagResourceError) -> Self {
494        match err {
495            crate::operation::untag_resource::UntagResourceError::ResourceNotFoundException(inner) => Error::ResourceNotFoundException(inner),
496            crate::operation::untag_resource::UntagResourceError::Unhandled(inner) => Error::Unhandled(inner),
497        }
498    }
499}
500impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::update_db_cluster::UpdateDbClusterError, R>> for Error
501where
502    R: Send + Sync + std::fmt::Debug + 'static,
503{
504    fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::update_db_cluster::UpdateDbClusterError, R>) -> Self {
505        match err {
506            ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
507            _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
508                meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
509                source: err.into(),
510            }),
511        }
512    }
513}
514impl From<crate::operation::update_db_cluster::UpdateDbClusterError> for Error {
515    fn from(err: crate::operation::update_db_cluster::UpdateDbClusterError) -> Self {
516        match err {
517            crate::operation::update_db_cluster::UpdateDbClusterError::AccessDeniedException(inner) => Error::AccessDeniedException(inner),
518            crate::operation::update_db_cluster::UpdateDbClusterError::ConflictException(inner) => Error::ConflictException(inner),
519            crate::operation::update_db_cluster::UpdateDbClusterError::InternalServerException(inner) => Error::InternalServerException(inner),
520            crate::operation::update_db_cluster::UpdateDbClusterError::ResourceNotFoundException(inner) => Error::ResourceNotFoundException(inner),
521            crate::operation::update_db_cluster::UpdateDbClusterError::ThrottlingException(inner) => Error::ThrottlingException(inner),
522            crate::operation::update_db_cluster::UpdateDbClusterError::ValidationException(inner) => Error::ValidationException(inner),
523            crate::operation::update_db_cluster::UpdateDbClusterError::Unhandled(inner) => Error::Unhandled(inner),
524        }
525    }
526}
527impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::update_db_instance::UpdateDbInstanceError, R>> for Error
528where
529    R: Send + Sync + std::fmt::Debug + 'static,
530{
531    fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::update_db_instance::UpdateDbInstanceError, R>) -> Self {
532        match err {
533            ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
534            _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
535                meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
536                source: err.into(),
537            }),
538        }
539    }
540}
541impl From<crate::operation::update_db_instance::UpdateDbInstanceError> for Error {
542    fn from(err: crate::operation::update_db_instance::UpdateDbInstanceError) -> Self {
543        match err {
544            crate::operation::update_db_instance::UpdateDbInstanceError::AccessDeniedException(inner) => Error::AccessDeniedException(inner),
545            crate::operation::update_db_instance::UpdateDbInstanceError::ConflictException(inner) => Error::ConflictException(inner),
546            crate::operation::update_db_instance::UpdateDbInstanceError::InternalServerException(inner) => Error::InternalServerException(inner),
547            crate::operation::update_db_instance::UpdateDbInstanceError::ResourceNotFoundException(inner) => Error::ResourceNotFoundException(inner),
548            crate::operation::update_db_instance::UpdateDbInstanceError::ThrottlingException(inner) => Error::ThrottlingException(inner),
549            crate::operation::update_db_instance::UpdateDbInstanceError::ValidationException(inner) => Error::ValidationException(inner),
550            crate::operation::update_db_instance::UpdateDbInstanceError::Unhandled(inner) => Error::Unhandled(inner),
551        }
552    }
553}
554impl ::std::error::Error for Error {
555    fn source(&self) -> std::option::Option<&(dyn ::std::error::Error + 'static)> {
556        match self {
557            Error::AccessDeniedException(inner) => inner.source(),
558            Error::ConflictException(inner) => inner.source(),
559            Error::InternalServerException(inner) => inner.source(),
560            Error::ResourceNotFoundException(inner) => inner.source(),
561            Error::ServiceQuotaExceededException(inner) => inner.source(),
562            Error::ThrottlingException(inner) => inner.source(),
563            Error::ValidationException(inner) => inner.source(),
564            Error::Unhandled(inner) => ::std::option::Option::Some(&*inner.source),
565        }
566    }
567}
568impl ::aws_types::request_id::RequestId for Error {
569    fn request_id(&self) -> Option<&str> {
570        match self {
571            Self::AccessDeniedException(e) => e.request_id(),
572            Self::ConflictException(e) => e.request_id(),
573            Self::InternalServerException(e) => e.request_id(),
574            Self::ResourceNotFoundException(e) => e.request_id(),
575            Self::ServiceQuotaExceededException(e) => e.request_id(),
576            Self::ThrottlingException(e) => e.request_id(),
577            Self::ValidationException(e) => e.request_id(),
578            Self::Unhandled(e) => e.meta.request_id(),
579        }
580    }
581}