1#[non_exhaustive]
4#[derive(::std::fmt::Debug)]
5pub enum Error {
6 AccessDeniedException(crate::types::error::AccessDeniedException),
8 ConflictException(crate::types::error::ConflictException),
10 InternalServerException(crate::types::error::InternalServerException),
12 ResourceNotFoundException(crate::types::error::ResourceNotFoundException),
14 ServiceQuotaExceededException(crate::types::error::ServiceQuotaExceededException),
16 ThrottlingException(crate::types::error::ThrottlingException),
18 ValidationException(crate::types::error::ValidationException),
20 #[deprecated(note = "Matching `Unhandled` directly is not forwards compatible. Instead, match using a \
22 variable wildcard pattern and check `.code()`:
23 \
24 `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::delete_cluster::DeleteClusterError, 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::delete_cluster::DeleteClusterError, 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::delete_cluster::DeleteClusterError> for Error {
113 fn from(err: crate::operation::delete_cluster::DeleteClusterError) -> Self {
114 match err {
115 crate::operation::delete_cluster::DeleteClusterError::ConflictException(inner) => Error::ConflictException(inner),
116 crate::operation::delete_cluster::DeleteClusterError::ResourceNotFoundException(inner) => Error::ResourceNotFoundException(inner),
117 crate::operation::delete_cluster::DeleteClusterError::AccessDeniedException(inner) => Error::AccessDeniedException(inner),
118 crate::operation::delete_cluster::DeleteClusterError::InternalServerException(inner) => Error::InternalServerException(inner),
119 crate::operation::delete_cluster::DeleteClusterError::ThrottlingException(inner) => Error::ThrottlingException(inner),
120 crate::operation::delete_cluster::DeleteClusterError::ValidationException(inner) => Error::ValidationException(inner),
121 crate::operation::delete_cluster::DeleteClusterError::Unhandled(inner) => Error::Unhandled(inner),
122 }
123 }
124}
125impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::delete_cluster_policy::DeleteClusterPolicyError, R>> for Error
126where
127 R: Send + Sync + std::fmt::Debug + 'static,
128{
129 fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::delete_cluster_policy::DeleteClusterPolicyError, R>) -> Self {
130 match err {
131 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
132 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
133 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
134 source: err.into(),
135 }),
136 }
137 }
138}
139impl From<crate::operation::delete_cluster_policy::DeleteClusterPolicyError> for Error {
140 fn from(err: crate::operation::delete_cluster_policy::DeleteClusterPolicyError) -> Self {
141 match err {
142 crate::operation::delete_cluster_policy::DeleteClusterPolicyError::ConflictException(inner) => Error::ConflictException(inner),
143 crate::operation::delete_cluster_policy::DeleteClusterPolicyError::ResourceNotFoundException(inner) => {
144 Error::ResourceNotFoundException(inner)
145 }
146 crate::operation::delete_cluster_policy::DeleteClusterPolicyError::ValidationException(inner) => Error::ValidationException(inner),
147 crate::operation::delete_cluster_policy::DeleteClusterPolicyError::AccessDeniedException(inner) => Error::AccessDeniedException(inner),
148 crate::operation::delete_cluster_policy::DeleteClusterPolicyError::InternalServerException(inner) => {
149 Error::InternalServerException(inner)
150 }
151 crate::operation::delete_cluster_policy::DeleteClusterPolicyError::ThrottlingException(inner) => Error::ThrottlingException(inner),
152 crate::operation::delete_cluster_policy::DeleteClusterPolicyError::Unhandled(inner) => Error::Unhandled(inner),
153 }
154 }
155}
156impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::get_cluster::GetClusterError, R>> for Error
157where
158 R: Send + Sync + std::fmt::Debug + 'static,
159{
160 fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::get_cluster::GetClusterError, R>) -> Self {
161 match err {
162 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
163 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
164 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
165 source: err.into(),
166 }),
167 }
168 }
169}
170impl From<crate::operation::get_cluster::GetClusterError> for Error {
171 fn from(err: crate::operation::get_cluster::GetClusterError) -> Self {
172 match err {
173 crate::operation::get_cluster::GetClusterError::ResourceNotFoundException(inner) => Error::ResourceNotFoundException(inner),
174 crate::operation::get_cluster::GetClusterError::AccessDeniedException(inner) => Error::AccessDeniedException(inner),
175 crate::operation::get_cluster::GetClusterError::InternalServerException(inner) => Error::InternalServerException(inner),
176 crate::operation::get_cluster::GetClusterError::ThrottlingException(inner) => Error::ThrottlingException(inner),
177 crate::operation::get_cluster::GetClusterError::ValidationException(inner) => Error::ValidationException(inner),
178 crate::operation::get_cluster::GetClusterError::Unhandled(inner) => Error::Unhandled(inner),
179 }
180 }
181}
182impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::get_cluster_policy::GetClusterPolicyError, R>> for Error
183where
184 R: Send + Sync + std::fmt::Debug + 'static,
185{
186 fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::get_cluster_policy::GetClusterPolicyError, R>) -> Self {
187 match err {
188 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
189 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
190 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
191 source: err.into(),
192 }),
193 }
194 }
195}
196impl From<crate::operation::get_cluster_policy::GetClusterPolicyError> for Error {
197 fn from(err: crate::operation::get_cluster_policy::GetClusterPolicyError) -> Self {
198 match err {
199 crate::operation::get_cluster_policy::GetClusterPolicyError::ResourceNotFoundException(inner) => Error::ResourceNotFoundException(inner),
200 crate::operation::get_cluster_policy::GetClusterPolicyError::ValidationException(inner) => Error::ValidationException(inner),
201 crate::operation::get_cluster_policy::GetClusterPolicyError::AccessDeniedException(inner) => Error::AccessDeniedException(inner),
202 crate::operation::get_cluster_policy::GetClusterPolicyError::InternalServerException(inner) => Error::InternalServerException(inner),
203 crate::operation::get_cluster_policy::GetClusterPolicyError::ThrottlingException(inner) => Error::ThrottlingException(inner),
204 crate::operation::get_cluster_policy::GetClusterPolicyError::Unhandled(inner) => Error::Unhandled(inner),
205 }
206 }
207}
208impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::get_vpc_endpoint_service_name::GetVpcEndpointServiceNameError, R>>
209 for Error
210where
211 R: Send + Sync + std::fmt::Debug + 'static,
212{
213 fn from(
214 err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::get_vpc_endpoint_service_name::GetVpcEndpointServiceNameError, R>,
215 ) -> 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_vpc_endpoint_service_name::GetVpcEndpointServiceNameError> for Error {
226 fn from(err: crate::operation::get_vpc_endpoint_service_name::GetVpcEndpointServiceNameError) -> Self {
227 match err {
228 crate::operation::get_vpc_endpoint_service_name::GetVpcEndpointServiceNameError::InternalServerException(inner) => {
229 Error::InternalServerException(inner)
230 }
231 crate::operation::get_vpc_endpoint_service_name::GetVpcEndpointServiceNameError::ResourceNotFoundException(inner) => {
232 Error::ResourceNotFoundException(inner)
233 }
234 crate::operation::get_vpc_endpoint_service_name::GetVpcEndpointServiceNameError::ThrottlingException(inner) => {
235 Error::ThrottlingException(inner)
236 }
237 crate::operation::get_vpc_endpoint_service_name::GetVpcEndpointServiceNameError::ValidationException(inner) => {
238 Error::ValidationException(inner)
239 }
240 crate::operation::get_vpc_endpoint_service_name::GetVpcEndpointServiceNameError::AccessDeniedException(inner) => {
241 Error::AccessDeniedException(inner)
242 }
243 crate::operation::get_vpc_endpoint_service_name::GetVpcEndpointServiceNameError::Unhandled(inner) => Error::Unhandled(inner),
244 }
245 }
246}
247impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::list_clusters::ListClustersError, R>> for Error
248where
249 R: Send + Sync + std::fmt::Debug + 'static,
250{
251 fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::list_clusters::ListClustersError, R>) -> Self {
252 match err {
253 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
254 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
255 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
256 source: err.into(),
257 }),
258 }
259 }
260}
261impl From<crate::operation::list_clusters::ListClustersError> for Error {
262 fn from(err: crate::operation::list_clusters::ListClustersError) -> Self {
263 match err {
264 crate::operation::list_clusters::ListClustersError::ResourceNotFoundException(inner) => Error::ResourceNotFoundException(inner),
265 crate::operation::list_clusters::ListClustersError::AccessDeniedException(inner) => Error::AccessDeniedException(inner),
266 crate::operation::list_clusters::ListClustersError::InternalServerException(inner) => Error::InternalServerException(inner),
267 crate::operation::list_clusters::ListClustersError::ThrottlingException(inner) => Error::ThrottlingException(inner),
268 crate::operation::list_clusters::ListClustersError::ValidationException(inner) => Error::ValidationException(inner),
269 crate::operation::list_clusters::ListClustersError::Unhandled(inner) => Error::Unhandled(inner),
270 }
271 }
272}
273impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::list_tags_for_resource::ListTagsForResourceError, R>> for Error
274where
275 R: Send + Sync + std::fmt::Debug + 'static,
276{
277 fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::list_tags_for_resource::ListTagsForResourceError, R>) -> Self {
278 match err {
279 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
280 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
281 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
282 source: err.into(),
283 }),
284 }
285 }
286}
287impl From<crate::operation::list_tags_for_resource::ListTagsForResourceError> for Error {
288 fn from(err: crate::operation::list_tags_for_resource::ListTagsForResourceError) -> Self {
289 match err {
290 crate::operation::list_tags_for_resource::ListTagsForResourceError::ResourceNotFoundException(inner) => {
291 Error::ResourceNotFoundException(inner)
292 }
293 crate::operation::list_tags_for_resource::ListTagsForResourceError::AccessDeniedException(inner) => Error::AccessDeniedException(inner),
294 crate::operation::list_tags_for_resource::ListTagsForResourceError::InternalServerException(inner) => {
295 Error::InternalServerException(inner)
296 }
297 crate::operation::list_tags_for_resource::ListTagsForResourceError::ThrottlingException(inner) => Error::ThrottlingException(inner),
298 crate::operation::list_tags_for_resource::ListTagsForResourceError::ValidationException(inner) => Error::ValidationException(inner),
299 crate::operation::list_tags_for_resource::ListTagsForResourceError::Unhandled(inner) => Error::Unhandled(inner),
300 }
301 }
302}
303impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::put_cluster_policy::PutClusterPolicyError, R>> for Error
304where
305 R: Send + Sync + std::fmt::Debug + 'static,
306{
307 fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::put_cluster_policy::PutClusterPolicyError, R>) -> Self {
308 match err {
309 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
310 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
311 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
312 source: err.into(),
313 }),
314 }
315 }
316}
317impl From<crate::operation::put_cluster_policy::PutClusterPolicyError> for Error {
318 fn from(err: crate::operation::put_cluster_policy::PutClusterPolicyError) -> Self {
319 match err {
320 crate::operation::put_cluster_policy::PutClusterPolicyError::ConflictException(inner) => Error::ConflictException(inner),
321 crate::operation::put_cluster_policy::PutClusterPolicyError::ResourceNotFoundException(inner) => Error::ResourceNotFoundException(inner),
322 crate::operation::put_cluster_policy::PutClusterPolicyError::ValidationException(inner) => Error::ValidationException(inner),
323 crate::operation::put_cluster_policy::PutClusterPolicyError::AccessDeniedException(inner) => Error::AccessDeniedException(inner),
324 crate::operation::put_cluster_policy::PutClusterPolicyError::InternalServerException(inner) => Error::InternalServerException(inner),
325 crate::operation::put_cluster_policy::PutClusterPolicyError::ThrottlingException(inner) => Error::ThrottlingException(inner),
326 crate::operation::put_cluster_policy::PutClusterPolicyError::Unhandled(inner) => Error::Unhandled(inner),
327 }
328 }
329}
330impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::tag_resource::TagResourceError, R>> for Error
331where
332 R: Send + Sync + std::fmt::Debug + 'static,
333{
334 fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::tag_resource::TagResourceError, R>) -> Self {
335 match err {
336 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
337 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
338 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
339 source: err.into(),
340 }),
341 }
342 }
343}
344impl From<crate::operation::tag_resource::TagResourceError> for Error {
345 fn from(err: crate::operation::tag_resource::TagResourceError) -> Self {
346 match err {
347 crate::operation::tag_resource::TagResourceError::ResourceNotFoundException(inner) => Error::ResourceNotFoundException(inner),
348 crate::operation::tag_resource::TagResourceError::ServiceQuotaExceededException(inner) => Error::ServiceQuotaExceededException(inner),
349 crate::operation::tag_resource::TagResourceError::AccessDeniedException(inner) => Error::AccessDeniedException(inner),
350 crate::operation::tag_resource::TagResourceError::InternalServerException(inner) => Error::InternalServerException(inner),
351 crate::operation::tag_resource::TagResourceError::ThrottlingException(inner) => Error::ThrottlingException(inner),
352 crate::operation::tag_resource::TagResourceError::ValidationException(inner) => Error::ValidationException(inner),
353 crate::operation::tag_resource::TagResourceError::Unhandled(inner) => Error::Unhandled(inner),
354 }
355 }
356}
357impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::untag_resource::UntagResourceError, R>> for Error
358where
359 R: Send + Sync + std::fmt::Debug + 'static,
360{
361 fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::untag_resource::UntagResourceError, R>) -> Self {
362 match err {
363 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
364 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
365 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
366 source: err.into(),
367 }),
368 }
369 }
370}
371impl From<crate::operation::untag_resource::UntagResourceError> for Error {
372 fn from(err: crate::operation::untag_resource::UntagResourceError) -> Self {
373 match err {
374 crate::operation::untag_resource::UntagResourceError::ResourceNotFoundException(inner) => Error::ResourceNotFoundException(inner),
375 crate::operation::untag_resource::UntagResourceError::AccessDeniedException(inner) => Error::AccessDeniedException(inner),
376 crate::operation::untag_resource::UntagResourceError::InternalServerException(inner) => Error::InternalServerException(inner),
377 crate::operation::untag_resource::UntagResourceError::ThrottlingException(inner) => Error::ThrottlingException(inner),
378 crate::operation::untag_resource::UntagResourceError::ValidationException(inner) => Error::ValidationException(inner),
379 crate::operation::untag_resource::UntagResourceError::Unhandled(inner) => Error::Unhandled(inner),
380 }
381 }
382}
383impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::update_cluster::UpdateClusterError, R>> for Error
384where
385 R: Send + Sync + std::fmt::Debug + 'static,
386{
387 fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::update_cluster::UpdateClusterError, R>) -> Self {
388 match err {
389 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
390 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
391 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
392 source: err.into(),
393 }),
394 }
395 }
396}
397impl From<crate::operation::update_cluster::UpdateClusterError> for Error {
398 fn from(err: crate::operation::update_cluster::UpdateClusterError) -> Self {
399 match err {
400 crate::operation::update_cluster::UpdateClusterError::ConflictException(inner) => Error::ConflictException(inner),
401 crate::operation::update_cluster::UpdateClusterError::ResourceNotFoundException(inner) => Error::ResourceNotFoundException(inner),
402 crate::operation::update_cluster::UpdateClusterError::ValidationException(inner) => Error::ValidationException(inner),
403 crate::operation::update_cluster::UpdateClusterError::AccessDeniedException(inner) => Error::AccessDeniedException(inner),
404 crate::operation::update_cluster::UpdateClusterError::InternalServerException(inner) => Error::InternalServerException(inner),
405 crate::operation::update_cluster::UpdateClusterError::ThrottlingException(inner) => Error::ThrottlingException(inner),
406 crate::operation::update_cluster::UpdateClusterError::Unhandled(inner) => Error::Unhandled(inner),
407 }
408 }
409}
410impl<O, E> ::std::convert::From<::aws_smithy_runtime_api::client::waiters::error::WaiterError<O, E>> for Error
411where
412 O: ::std::fmt::Debug + ::std::marker::Send + ::std::marker::Sync + 'static,
413 E: ::std::error::Error + ::std::marker::Send + ::std::marker::Sync + 'static,
414{
415 fn from(err: ::aws_smithy_runtime_api::client::waiters::error::WaiterError<O, E>) -> Self {
416 Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
417 meta: ::std::default::Default::default(),
418 source: err.into(),
419 })
420 }
421}
422impl ::std::error::Error for Error {
423 fn source(&self) -> std::option::Option<&(dyn ::std::error::Error + 'static)> {
424 match self {
425 Error::AccessDeniedException(inner) => inner.source(),
426 Error::ConflictException(inner) => inner.source(),
427 Error::InternalServerException(inner) => inner.source(),
428 Error::ResourceNotFoundException(inner) => inner.source(),
429 Error::ServiceQuotaExceededException(inner) => inner.source(),
430 Error::ThrottlingException(inner) => inner.source(),
431 Error::ValidationException(inner) => inner.source(),
432 Error::Unhandled(inner) => ::std::option::Option::Some(&*inner.source),
433 }
434 }
435}
436impl ::aws_types::request_id::RequestId for Error {
437 fn request_id(&self) -> Option<&str> {
438 match self {
439 Self::AccessDeniedException(e) => e.request_id(),
440 Self::ConflictException(e) => e.request_id(),
441 Self::InternalServerException(e) => e.request_id(),
442 Self::ResourceNotFoundException(e) => e.request_id(),
443 Self::ServiceQuotaExceededException(e) => e.request_id(),
444 Self::ThrottlingException(e) => e.request_id(),
445 Self::ValidationException(e) => e.request_id(),
446 Self::Unhandled(e) => e.meta.request_id(),
447 }
448 }
449}