Skip to main content

aws_sdk_dsql/
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 submitted action has conflicts.</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 resource could not be found.</p>
13    ResourceNotFoundException(crate::types::error::ResourceNotFoundException),
14    /// <p>The service limit was exceeded.</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 failed to satisfy the constraints specified by an Amazon Web Services service.</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_cluster::CreateClusterError, 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_cluster::CreateClusterError, 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_cluster::CreateClusterError> for Error {
86    fn from(err: crate::operation::create_cluster::CreateClusterError) -> Self {
87        match err {
88            crate::operation::create_cluster::CreateClusterError::ConflictException(inner) => Error::ConflictException(inner),
89            crate::operation::create_cluster::CreateClusterError::ServiceQuotaExceededException(inner) => Error::ServiceQuotaExceededException(inner),
90            crate::operation::create_cluster::CreateClusterError::ValidationException(inner) => Error::ValidationException(inner),
91            crate::operation::create_cluster::CreateClusterError::AccessDeniedException(inner) => Error::AccessDeniedException(inner),
92            crate::operation::create_cluster::CreateClusterError::InternalServerException(inner) => Error::InternalServerException(inner),
93            crate::operation::create_cluster::CreateClusterError::ThrottlingException(inner) => Error::ThrottlingException(inner),
94            crate::operation::create_cluster::CreateClusterError::Unhandled(inner) => Error::Unhandled(inner),
95        }
96    }
97}
98impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::create_stream::CreateStreamError, R>> for Error
99where
100    R: Send + Sync + std::fmt::Debug + 'static,
101{
102    fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::create_stream::CreateStreamError, R>) -> Self {
103        match err {
104            ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
105            _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
106                meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
107                source: err.into(),
108            }),
109        }
110    }
111}
112impl From<crate::operation::create_stream::CreateStreamError> for Error {
113    fn from(err: crate::operation::create_stream::CreateStreamError) -> Self {
114        match err {
115            crate::operation::create_stream::CreateStreamError::ConflictException(inner) => Error::ConflictException(inner),
116            crate::operation::create_stream::CreateStreamError::ResourceNotFoundException(inner) => Error::ResourceNotFoundException(inner),
117            crate::operation::create_stream::CreateStreamError::ServiceQuotaExceededException(inner) => Error::ServiceQuotaExceededException(inner),
118            crate::operation::create_stream::CreateStreamError::ValidationException(inner) => Error::ValidationException(inner),
119            crate::operation::create_stream::CreateStreamError::AccessDeniedException(inner) => Error::AccessDeniedException(inner),
120            crate::operation::create_stream::CreateStreamError::InternalServerException(inner) => Error::InternalServerException(inner),
121            crate::operation::create_stream::CreateStreamError::ThrottlingException(inner) => Error::ThrottlingException(inner),
122            crate::operation::create_stream::CreateStreamError::Unhandled(inner) => Error::Unhandled(inner),
123        }
124    }
125}
126impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::delete_cluster::DeleteClusterError, R>> for Error
127where
128    R: Send + Sync + std::fmt::Debug + 'static,
129{
130    fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::delete_cluster::DeleteClusterError, R>) -> Self {
131        match err {
132            ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
133            _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
134                meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
135                source: err.into(),
136            }),
137        }
138    }
139}
140impl From<crate::operation::delete_cluster::DeleteClusterError> for Error {
141    fn from(err: crate::operation::delete_cluster::DeleteClusterError) -> Self {
142        match err {
143            crate::operation::delete_cluster::DeleteClusterError::ConflictException(inner) => Error::ConflictException(inner),
144            crate::operation::delete_cluster::DeleteClusterError::ResourceNotFoundException(inner) => Error::ResourceNotFoundException(inner),
145            crate::operation::delete_cluster::DeleteClusterError::AccessDeniedException(inner) => Error::AccessDeniedException(inner),
146            crate::operation::delete_cluster::DeleteClusterError::InternalServerException(inner) => Error::InternalServerException(inner),
147            crate::operation::delete_cluster::DeleteClusterError::ThrottlingException(inner) => Error::ThrottlingException(inner),
148            crate::operation::delete_cluster::DeleteClusterError::ValidationException(inner) => Error::ValidationException(inner),
149            crate::operation::delete_cluster::DeleteClusterError::Unhandled(inner) => Error::Unhandled(inner),
150        }
151    }
152}
153impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::delete_cluster_policy::DeleteClusterPolicyError, R>> for Error
154where
155    R: Send + Sync + std::fmt::Debug + 'static,
156{
157    fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::delete_cluster_policy::DeleteClusterPolicyError, R>) -> Self {
158        match err {
159            ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
160            _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
161                meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
162                source: err.into(),
163            }),
164        }
165    }
166}
167impl From<crate::operation::delete_cluster_policy::DeleteClusterPolicyError> for Error {
168    fn from(err: crate::operation::delete_cluster_policy::DeleteClusterPolicyError) -> Self {
169        match err {
170            crate::operation::delete_cluster_policy::DeleteClusterPolicyError::ConflictException(inner) => Error::ConflictException(inner),
171            crate::operation::delete_cluster_policy::DeleteClusterPolicyError::ResourceNotFoundException(inner) => {
172                Error::ResourceNotFoundException(inner)
173            }
174            crate::operation::delete_cluster_policy::DeleteClusterPolicyError::ValidationException(inner) => Error::ValidationException(inner),
175            crate::operation::delete_cluster_policy::DeleteClusterPolicyError::AccessDeniedException(inner) => Error::AccessDeniedException(inner),
176            crate::operation::delete_cluster_policy::DeleteClusterPolicyError::InternalServerException(inner) => {
177                Error::InternalServerException(inner)
178            }
179            crate::operation::delete_cluster_policy::DeleteClusterPolicyError::ThrottlingException(inner) => Error::ThrottlingException(inner),
180            crate::operation::delete_cluster_policy::DeleteClusterPolicyError::Unhandled(inner) => Error::Unhandled(inner),
181        }
182    }
183}
184impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::delete_stream::DeleteStreamError, R>> for Error
185where
186    R: Send + Sync + std::fmt::Debug + 'static,
187{
188    fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::delete_stream::DeleteStreamError, R>) -> Self {
189        match err {
190            ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
191            _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
192                meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
193                source: err.into(),
194            }),
195        }
196    }
197}
198impl From<crate::operation::delete_stream::DeleteStreamError> for Error {
199    fn from(err: crate::operation::delete_stream::DeleteStreamError) -> Self {
200        match err {
201            crate::operation::delete_stream::DeleteStreamError::ConflictException(inner) => Error::ConflictException(inner),
202            crate::operation::delete_stream::DeleteStreamError::ResourceNotFoundException(inner) => Error::ResourceNotFoundException(inner),
203            crate::operation::delete_stream::DeleteStreamError::AccessDeniedException(inner) => Error::AccessDeniedException(inner),
204            crate::operation::delete_stream::DeleteStreamError::InternalServerException(inner) => Error::InternalServerException(inner),
205            crate::operation::delete_stream::DeleteStreamError::ThrottlingException(inner) => Error::ThrottlingException(inner),
206            crate::operation::delete_stream::DeleteStreamError::ValidationException(inner) => Error::ValidationException(inner),
207            crate::operation::delete_stream::DeleteStreamError::Unhandled(inner) => Error::Unhandled(inner),
208        }
209    }
210}
211impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::get_cluster::GetClusterError, R>> for Error
212where
213    R: Send + Sync + std::fmt::Debug + 'static,
214{
215    fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::get_cluster::GetClusterError, R>) -> Self {
216        match err {
217            ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
218            _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
219                meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
220                source: err.into(),
221            }),
222        }
223    }
224}
225impl From<crate::operation::get_cluster::GetClusterError> for Error {
226    fn from(err: crate::operation::get_cluster::GetClusterError) -> Self {
227        match err {
228            crate::operation::get_cluster::GetClusterError::ResourceNotFoundException(inner) => Error::ResourceNotFoundException(inner),
229            crate::operation::get_cluster::GetClusterError::AccessDeniedException(inner) => Error::AccessDeniedException(inner),
230            crate::operation::get_cluster::GetClusterError::InternalServerException(inner) => Error::InternalServerException(inner),
231            crate::operation::get_cluster::GetClusterError::ThrottlingException(inner) => Error::ThrottlingException(inner),
232            crate::operation::get_cluster::GetClusterError::ValidationException(inner) => Error::ValidationException(inner),
233            crate::operation::get_cluster::GetClusterError::Unhandled(inner) => Error::Unhandled(inner),
234        }
235    }
236}
237impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::get_cluster_policy::GetClusterPolicyError, R>> for Error
238where
239    R: Send + Sync + std::fmt::Debug + 'static,
240{
241    fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::get_cluster_policy::GetClusterPolicyError, R>) -> Self {
242        match err {
243            ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
244            _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
245                meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
246                source: err.into(),
247            }),
248        }
249    }
250}
251impl From<crate::operation::get_cluster_policy::GetClusterPolicyError> for Error {
252    fn from(err: crate::operation::get_cluster_policy::GetClusterPolicyError) -> Self {
253        match err {
254            crate::operation::get_cluster_policy::GetClusterPolicyError::ResourceNotFoundException(inner) => Error::ResourceNotFoundException(inner),
255            crate::operation::get_cluster_policy::GetClusterPolicyError::ValidationException(inner) => Error::ValidationException(inner),
256            crate::operation::get_cluster_policy::GetClusterPolicyError::AccessDeniedException(inner) => Error::AccessDeniedException(inner),
257            crate::operation::get_cluster_policy::GetClusterPolicyError::InternalServerException(inner) => Error::InternalServerException(inner),
258            crate::operation::get_cluster_policy::GetClusterPolicyError::ThrottlingException(inner) => Error::ThrottlingException(inner),
259            crate::operation::get_cluster_policy::GetClusterPolicyError::Unhandled(inner) => Error::Unhandled(inner),
260        }
261    }
262}
263impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::get_stream::GetStreamError, R>> for Error
264where
265    R: Send + Sync + std::fmt::Debug + 'static,
266{
267    fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::get_stream::GetStreamError, R>) -> Self {
268        match err {
269            ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
270            _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
271                meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
272                source: err.into(),
273            }),
274        }
275    }
276}
277impl From<crate::operation::get_stream::GetStreamError> for Error {
278    fn from(err: crate::operation::get_stream::GetStreamError) -> Self {
279        match err {
280            crate::operation::get_stream::GetStreamError::ResourceNotFoundException(inner) => Error::ResourceNotFoundException(inner),
281            crate::operation::get_stream::GetStreamError::AccessDeniedException(inner) => Error::AccessDeniedException(inner),
282            crate::operation::get_stream::GetStreamError::InternalServerException(inner) => Error::InternalServerException(inner),
283            crate::operation::get_stream::GetStreamError::ThrottlingException(inner) => Error::ThrottlingException(inner),
284            crate::operation::get_stream::GetStreamError::ValidationException(inner) => Error::ValidationException(inner),
285            crate::operation::get_stream::GetStreamError::Unhandled(inner) => Error::Unhandled(inner),
286        }
287    }
288}
289impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::get_vpc_endpoint_service_name::GetVpcEndpointServiceNameError, R>>
290    for Error
291where
292    R: Send + Sync + std::fmt::Debug + 'static,
293{
294    fn from(
295        err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::get_vpc_endpoint_service_name::GetVpcEndpointServiceNameError, R>,
296    ) -> Self {
297        match err {
298            ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
299            _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
300                meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
301                source: err.into(),
302            }),
303        }
304    }
305}
306impl From<crate::operation::get_vpc_endpoint_service_name::GetVpcEndpointServiceNameError> for Error {
307    fn from(err: crate::operation::get_vpc_endpoint_service_name::GetVpcEndpointServiceNameError) -> Self {
308        match err {
309            crate::operation::get_vpc_endpoint_service_name::GetVpcEndpointServiceNameError::InternalServerException(inner) => {
310                Error::InternalServerException(inner)
311            }
312            crate::operation::get_vpc_endpoint_service_name::GetVpcEndpointServiceNameError::ResourceNotFoundException(inner) => {
313                Error::ResourceNotFoundException(inner)
314            }
315            crate::operation::get_vpc_endpoint_service_name::GetVpcEndpointServiceNameError::ThrottlingException(inner) => {
316                Error::ThrottlingException(inner)
317            }
318            crate::operation::get_vpc_endpoint_service_name::GetVpcEndpointServiceNameError::ValidationException(inner) => {
319                Error::ValidationException(inner)
320            }
321            crate::operation::get_vpc_endpoint_service_name::GetVpcEndpointServiceNameError::AccessDeniedException(inner) => {
322                Error::AccessDeniedException(inner)
323            }
324            crate::operation::get_vpc_endpoint_service_name::GetVpcEndpointServiceNameError::Unhandled(inner) => Error::Unhandled(inner),
325        }
326    }
327}
328impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::list_clusters::ListClustersError, R>> for Error
329where
330    R: Send + Sync + std::fmt::Debug + 'static,
331{
332    fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::list_clusters::ListClustersError, R>) -> Self {
333        match err {
334            ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
335            _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
336                meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
337                source: err.into(),
338            }),
339        }
340    }
341}
342impl From<crate::operation::list_clusters::ListClustersError> for Error {
343    fn from(err: crate::operation::list_clusters::ListClustersError) -> Self {
344        match err {
345            crate::operation::list_clusters::ListClustersError::ResourceNotFoundException(inner) => Error::ResourceNotFoundException(inner),
346            crate::operation::list_clusters::ListClustersError::AccessDeniedException(inner) => Error::AccessDeniedException(inner),
347            crate::operation::list_clusters::ListClustersError::InternalServerException(inner) => Error::InternalServerException(inner),
348            crate::operation::list_clusters::ListClustersError::ThrottlingException(inner) => Error::ThrottlingException(inner),
349            crate::operation::list_clusters::ListClustersError::ValidationException(inner) => Error::ValidationException(inner),
350            crate::operation::list_clusters::ListClustersError::Unhandled(inner) => Error::Unhandled(inner),
351        }
352    }
353}
354impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::list_streams::ListStreamsError, R>> for Error
355where
356    R: Send + Sync + std::fmt::Debug + 'static,
357{
358    fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::list_streams::ListStreamsError, R>) -> Self {
359        match err {
360            ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
361            _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
362                meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
363                source: err.into(),
364            }),
365        }
366    }
367}
368impl From<crate::operation::list_streams::ListStreamsError> for Error {
369    fn from(err: crate::operation::list_streams::ListStreamsError) -> Self {
370        match err {
371            crate::operation::list_streams::ListStreamsError::ResourceNotFoundException(inner) => Error::ResourceNotFoundException(inner),
372            crate::operation::list_streams::ListStreamsError::AccessDeniedException(inner) => Error::AccessDeniedException(inner),
373            crate::operation::list_streams::ListStreamsError::InternalServerException(inner) => Error::InternalServerException(inner),
374            crate::operation::list_streams::ListStreamsError::ThrottlingException(inner) => Error::ThrottlingException(inner),
375            crate::operation::list_streams::ListStreamsError::ValidationException(inner) => Error::ValidationException(inner),
376            crate::operation::list_streams::ListStreamsError::Unhandled(inner) => Error::Unhandled(inner),
377        }
378    }
379}
380impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::list_tags_for_resource::ListTagsForResourceError, R>> for Error
381where
382    R: Send + Sync + std::fmt::Debug + 'static,
383{
384    fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::list_tags_for_resource::ListTagsForResourceError, R>) -> Self {
385        match err {
386            ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
387            _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
388                meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
389                source: err.into(),
390            }),
391        }
392    }
393}
394impl From<crate::operation::list_tags_for_resource::ListTagsForResourceError> for Error {
395    fn from(err: crate::operation::list_tags_for_resource::ListTagsForResourceError) -> Self {
396        match err {
397            crate::operation::list_tags_for_resource::ListTagsForResourceError::ResourceNotFoundException(inner) => {
398                Error::ResourceNotFoundException(inner)
399            }
400            crate::operation::list_tags_for_resource::ListTagsForResourceError::AccessDeniedException(inner) => Error::AccessDeniedException(inner),
401            crate::operation::list_tags_for_resource::ListTagsForResourceError::InternalServerException(inner) => {
402                Error::InternalServerException(inner)
403            }
404            crate::operation::list_tags_for_resource::ListTagsForResourceError::ThrottlingException(inner) => Error::ThrottlingException(inner),
405            crate::operation::list_tags_for_resource::ListTagsForResourceError::ValidationException(inner) => Error::ValidationException(inner),
406            crate::operation::list_tags_for_resource::ListTagsForResourceError::Unhandled(inner) => Error::Unhandled(inner),
407        }
408    }
409}
410impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::put_cluster_policy::PutClusterPolicyError, R>> for Error
411where
412    R: Send + Sync + std::fmt::Debug + 'static,
413{
414    fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::put_cluster_policy::PutClusterPolicyError, R>) -> Self {
415        match err {
416            ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
417            _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
418                meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
419                source: err.into(),
420            }),
421        }
422    }
423}
424impl From<crate::operation::put_cluster_policy::PutClusterPolicyError> for Error {
425    fn from(err: crate::operation::put_cluster_policy::PutClusterPolicyError) -> Self {
426        match err {
427            crate::operation::put_cluster_policy::PutClusterPolicyError::ConflictException(inner) => Error::ConflictException(inner),
428            crate::operation::put_cluster_policy::PutClusterPolicyError::ResourceNotFoundException(inner) => Error::ResourceNotFoundException(inner),
429            crate::operation::put_cluster_policy::PutClusterPolicyError::ValidationException(inner) => Error::ValidationException(inner),
430            crate::operation::put_cluster_policy::PutClusterPolicyError::AccessDeniedException(inner) => Error::AccessDeniedException(inner),
431            crate::operation::put_cluster_policy::PutClusterPolicyError::InternalServerException(inner) => Error::InternalServerException(inner),
432            crate::operation::put_cluster_policy::PutClusterPolicyError::ThrottlingException(inner) => Error::ThrottlingException(inner),
433            crate::operation::put_cluster_policy::PutClusterPolicyError::Unhandled(inner) => Error::Unhandled(inner),
434        }
435    }
436}
437impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::tag_resource::TagResourceError, R>> for Error
438where
439    R: Send + Sync + std::fmt::Debug + 'static,
440{
441    fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::tag_resource::TagResourceError, R>) -> Self {
442        match err {
443            ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
444            _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
445                meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
446                source: err.into(),
447            }),
448        }
449    }
450}
451impl From<crate::operation::tag_resource::TagResourceError> for Error {
452    fn from(err: crate::operation::tag_resource::TagResourceError) -> Self {
453        match err {
454            crate::operation::tag_resource::TagResourceError::ResourceNotFoundException(inner) => Error::ResourceNotFoundException(inner),
455            crate::operation::tag_resource::TagResourceError::ServiceQuotaExceededException(inner) => Error::ServiceQuotaExceededException(inner),
456            crate::operation::tag_resource::TagResourceError::AccessDeniedException(inner) => Error::AccessDeniedException(inner),
457            crate::operation::tag_resource::TagResourceError::InternalServerException(inner) => Error::InternalServerException(inner),
458            crate::operation::tag_resource::TagResourceError::ThrottlingException(inner) => Error::ThrottlingException(inner),
459            crate::operation::tag_resource::TagResourceError::ValidationException(inner) => Error::ValidationException(inner),
460            crate::operation::tag_resource::TagResourceError::Unhandled(inner) => Error::Unhandled(inner),
461        }
462    }
463}
464impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::untag_resource::UntagResourceError, R>> for Error
465where
466    R: Send + Sync + std::fmt::Debug + 'static,
467{
468    fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::untag_resource::UntagResourceError, R>) -> Self {
469        match err {
470            ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
471            _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
472                meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
473                source: err.into(),
474            }),
475        }
476    }
477}
478impl From<crate::operation::untag_resource::UntagResourceError> for Error {
479    fn from(err: crate::operation::untag_resource::UntagResourceError) -> Self {
480        match err {
481            crate::operation::untag_resource::UntagResourceError::ResourceNotFoundException(inner) => Error::ResourceNotFoundException(inner),
482            crate::operation::untag_resource::UntagResourceError::AccessDeniedException(inner) => Error::AccessDeniedException(inner),
483            crate::operation::untag_resource::UntagResourceError::InternalServerException(inner) => Error::InternalServerException(inner),
484            crate::operation::untag_resource::UntagResourceError::ThrottlingException(inner) => Error::ThrottlingException(inner),
485            crate::operation::untag_resource::UntagResourceError::ValidationException(inner) => Error::ValidationException(inner),
486            crate::operation::untag_resource::UntagResourceError::Unhandled(inner) => Error::Unhandled(inner),
487        }
488    }
489}
490impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::update_cluster::UpdateClusterError, R>> for Error
491where
492    R: Send + Sync + std::fmt::Debug + 'static,
493{
494    fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::update_cluster::UpdateClusterError, R>) -> Self {
495        match err {
496            ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
497            _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
498                meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
499                source: err.into(),
500            }),
501        }
502    }
503}
504impl From<crate::operation::update_cluster::UpdateClusterError> for Error {
505    fn from(err: crate::operation::update_cluster::UpdateClusterError) -> Self {
506        match err {
507            crate::operation::update_cluster::UpdateClusterError::ConflictException(inner) => Error::ConflictException(inner),
508            crate::operation::update_cluster::UpdateClusterError::ResourceNotFoundException(inner) => Error::ResourceNotFoundException(inner),
509            crate::operation::update_cluster::UpdateClusterError::ValidationException(inner) => Error::ValidationException(inner),
510            crate::operation::update_cluster::UpdateClusterError::AccessDeniedException(inner) => Error::AccessDeniedException(inner),
511            crate::operation::update_cluster::UpdateClusterError::InternalServerException(inner) => Error::InternalServerException(inner),
512            crate::operation::update_cluster::UpdateClusterError::ThrottlingException(inner) => Error::ThrottlingException(inner),
513            crate::operation::update_cluster::UpdateClusterError::Unhandled(inner) => Error::Unhandled(inner),
514        }
515    }
516}
517impl<O, E> ::std::convert::From<::aws_smithy_runtime_api::client::waiters::error::WaiterError<O, E>> for Error
518where
519    O: ::std::fmt::Debug + ::std::marker::Send + ::std::marker::Sync + 'static,
520    E: ::std::error::Error + ::std::marker::Send + ::std::marker::Sync + 'static,
521{
522    fn from(err: ::aws_smithy_runtime_api::client::waiters::error::WaiterError<O, E>) -> Self {
523        Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
524            meta: ::std::default::Default::default(),
525            source: err.into(),
526        })
527    }
528}
529impl ::std::error::Error for Error {
530    fn source(&self) -> std::option::Option<&(dyn ::std::error::Error + 'static)> {
531        match self {
532            Error::AccessDeniedException(inner) => inner.source(),
533            Error::ConflictException(inner) => inner.source(),
534            Error::InternalServerException(inner) => inner.source(),
535            Error::ResourceNotFoundException(inner) => inner.source(),
536            Error::ServiceQuotaExceededException(inner) => inner.source(),
537            Error::ThrottlingException(inner) => inner.source(),
538            Error::ValidationException(inner) => inner.source(),
539            Error::Unhandled(inner) => ::std::option::Option::Some(&*inner.source),
540        }
541    }
542}
543impl ::aws_types::request_id::RequestId for Error {
544    fn request_id(&self) -> Option<&str> {
545        match self {
546            Self::AccessDeniedException(e) => e.request_id(),
547            Self::ConflictException(e) => e.request_id(),
548            Self::InternalServerException(e) => e.request_id(),
549            Self::ResourceNotFoundException(e) => e.request_id(),
550            Self::ServiceQuotaExceededException(e) => e.request_id(),
551            Self::ThrottlingException(e) => e.request_id(),
552            Self::ValidationException(e) => e.request_id(),
553            Self::Unhandled(e) => e.meta.request_id(),
554        }
555    }
556}