aws_sdk_keyspaces/
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 don't have sufficient access permissions to perform this action.</p>
7    AccessDeniedException(crate::types::error::AccessDeniedException),
8    /// <p>Amazon Keyspaces couldn't complete the requested action. This error may occur if you try to perform an action and the same or a different action is already in progress, or if you try to create a resource that already exists.</p>
9    ConflictException(crate::types::error::ConflictException),
10    /// <p>Amazon Keyspaces was unable to fully process this request because of an internal server error.</p>
11    InternalServerException(crate::types::error::InternalServerException),
12    /// <p>The operation tried to access a keyspace, table, or type that doesn't exist. The resource might not be specified correctly, or its status might not be <code>ACTIVE</code>.</p>
13    ResourceNotFoundException(crate::types::error::ResourceNotFoundException),
14    /// <p>The operation exceeded the service quota for this resource. For more information on service quotas, see <a href="https://docs.aws.amazon.com/keyspaces/latest/devguide/quotas.html">Quotas</a> in the <i>Amazon Keyspaces Developer Guide</i>.</p>
15    ServiceQuotaExceededException(crate::types::error::ServiceQuotaExceededException),
16    /// <p>The operation failed due to an invalid or malformed request.</p>
17    ValidationException(crate::types::error::ValidationException),
18    /// An unexpected error occurred (e.g., invalid JSON returned by the service or an unknown error code).
19    #[deprecated(note = "Matching `Unhandled` directly is not forwards compatible. Instead, match using a \
20    variable wildcard pattern and check `.code()`:
21     \
22    &nbsp;&nbsp;&nbsp;`err if err.code() == Some(\"SpecificExceptionCode\") => { /* handle the error */ }`
23     \
24    See [`ProvideErrorMetadata`](#impl-ProvideErrorMetadata-for-Error) for what information is available for the error.")]
25    Unhandled(crate::error::sealed_unhandled::Unhandled),
26}
27impl ::std::fmt::Display for Error {
28    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
29        match self {
30            Error::AccessDeniedException(inner) => inner.fmt(f),
31            Error::ConflictException(inner) => inner.fmt(f),
32            Error::InternalServerException(inner) => inner.fmt(f),
33            Error::ResourceNotFoundException(inner) => inner.fmt(f),
34            Error::ServiceQuotaExceededException(inner) => inner.fmt(f),
35            Error::ValidationException(inner) => inner.fmt(f),
36            Error::Unhandled(_) => {
37                if let ::std::option::Option::Some(code) = ::aws_smithy_types::error::metadata::ProvideErrorMetadata::code(self) {
38                    write!(f, "unhandled error ({code})")
39                } else {
40                    f.write_str("unhandled error")
41                }
42            }
43        }
44    }
45}
46impl From<::aws_smithy_types::error::operation::BuildError> for Error {
47    fn from(value: ::aws_smithy_types::error::operation::BuildError) -> Self {
48        Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
49            source: value.into(),
50            meta: ::std::default::Default::default(),
51        })
52    }
53}
54impl ::aws_smithy_types::error::metadata::ProvideErrorMetadata for Error {
55    fn meta(&self) -> &::aws_smithy_types::error::metadata::ErrorMetadata {
56        match self {
57            Self::AccessDeniedException(inner) => inner.meta(),
58            Self::ConflictException(inner) => inner.meta(),
59            Self::InternalServerException(inner) => inner.meta(),
60            Self::ResourceNotFoundException(inner) => inner.meta(),
61            Self::ServiceQuotaExceededException(inner) => inner.meta(),
62            Self::ValidationException(inner) => inner.meta(),
63            Self::Unhandled(inner) => &inner.meta,
64        }
65    }
66}
67impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::create_keyspace::CreateKeyspaceError, R>> for Error
68where
69    R: Send + Sync + std::fmt::Debug + 'static,
70{
71    fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::create_keyspace::CreateKeyspaceError, R>) -> Self {
72        match err {
73            ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
74            _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
75                meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
76                source: err.into(),
77            }),
78        }
79    }
80}
81impl From<crate::operation::create_keyspace::CreateKeyspaceError> for Error {
82    fn from(err: crate::operation::create_keyspace::CreateKeyspaceError) -> Self {
83        match err {
84            crate::operation::create_keyspace::CreateKeyspaceError::AccessDeniedException(inner) => Error::AccessDeniedException(inner),
85            crate::operation::create_keyspace::CreateKeyspaceError::ConflictException(inner) => Error::ConflictException(inner),
86            crate::operation::create_keyspace::CreateKeyspaceError::InternalServerException(inner) => Error::InternalServerException(inner),
87            crate::operation::create_keyspace::CreateKeyspaceError::ServiceQuotaExceededException(inner) => {
88                Error::ServiceQuotaExceededException(inner)
89            }
90            crate::operation::create_keyspace::CreateKeyspaceError::ValidationException(inner) => Error::ValidationException(inner),
91            crate::operation::create_keyspace::CreateKeyspaceError::Unhandled(inner) => Error::Unhandled(inner),
92        }
93    }
94}
95impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::create_table::CreateTableError, R>> for Error
96where
97    R: Send + Sync + std::fmt::Debug + 'static,
98{
99    fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::create_table::CreateTableError, R>) -> Self {
100        match err {
101            ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
102            _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
103                meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
104                source: err.into(),
105            }),
106        }
107    }
108}
109impl From<crate::operation::create_table::CreateTableError> for Error {
110    fn from(err: crate::operation::create_table::CreateTableError) -> Self {
111        match err {
112            crate::operation::create_table::CreateTableError::AccessDeniedException(inner) => Error::AccessDeniedException(inner),
113            crate::operation::create_table::CreateTableError::ConflictException(inner) => Error::ConflictException(inner),
114            crate::operation::create_table::CreateTableError::InternalServerException(inner) => Error::InternalServerException(inner),
115            crate::operation::create_table::CreateTableError::ResourceNotFoundException(inner) => Error::ResourceNotFoundException(inner),
116            crate::operation::create_table::CreateTableError::ServiceQuotaExceededException(inner) => Error::ServiceQuotaExceededException(inner),
117            crate::operation::create_table::CreateTableError::ValidationException(inner) => Error::ValidationException(inner),
118            crate::operation::create_table::CreateTableError::Unhandled(inner) => Error::Unhandled(inner),
119        }
120    }
121}
122impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::create_type::CreateTypeError, R>> for Error
123where
124    R: Send + Sync + std::fmt::Debug + 'static,
125{
126    fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::create_type::CreateTypeError, R>) -> Self {
127        match err {
128            ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
129            _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
130                meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
131                source: err.into(),
132            }),
133        }
134    }
135}
136impl From<crate::operation::create_type::CreateTypeError> for Error {
137    fn from(err: crate::operation::create_type::CreateTypeError) -> Self {
138        match err {
139            crate::operation::create_type::CreateTypeError::AccessDeniedException(inner) => Error::AccessDeniedException(inner),
140            crate::operation::create_type::CreateTypeError::ConflictException(inner) => Error::ConflictException(inner),
141            crate::operation::create_type::CreateTypeError::InternalServerException(inner) => Error::InternalServerException(inner),
142            crate::operation::create_type::CreateTypeError::ResourceNotFoundException(inner) => Error::ResourceNotFoundException(inner),
143            crate::operation::create_type::CreateTypeError::ServiceQuotaExceededException(inner) => Error::ServiceQuotaExceededException(inner),
144            crate::operation::create_type::CreateTypeError::ValidationException(inner) => Error::ValidationException(inner),
145            crate::operation::create_type::CreateTypeError::Unhandled(inner) => Error::Unhandled(inner),
146        }
147    }
148}
149impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::delete_keyspace::DeleteKeyspaceError, R>> for Error
150where
151    R: Send + Sync + std::fmt::Debug + 'static,
152{
153    fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::delete_keyspace::DeleteKeyspaceError, R>) -> Self {
154        match err {
155            ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
156            _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
157                meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
158                source: err.into(),
159            }),
160        }
161    }
162}
163impl From<crate::operation::delete_keyspace::DeleteKeyspaceError> for Error {
164    fn from(err: crate::operation::delete_keyspace::DeleteKeyspaceError) -> Self {
165        match err {
166            crate::operation::delete_keyspace::DeleteKeyspaceError::AccessDeniedException(inner) => Error::AccessDeniedException(inner),
167            crate::operation::delete_keyspace::DeleteKeyspaceError::ConflictException(inner) => Error::ConflictException(inner),
168            crate::operation::delete_keyspace::DeleteKeyspaceError::InternalServerException(inner) => Error::InternalServerException(inner),
169            crate::operation::delete_keyspace::DeleteKeyspaceError::ResourceNotFoundException(inner) => Error::ResourceNotFoundException(inner),
170            crate::operation::delete_keyspace::DeleteKeyspaceError::ServiceQuotaExceededException(inner) => {
171                Error::ServiceQuotaExceededException(inner)
172            }
173            crate::operation::delete_keyspace::DeleteKeyspaceError::ValidationException(inner) => Error::ValidationException(inner),
174            crate::operation::delete_keyspace::DeleteKeyspaceError::Unhandled(inner) => Error::Unhandled(inner),
175        }
176    }
177}
178impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::delete_table::DeleteTableError, R>> for Error
179where
180    R: Send + Sync + std::fmt::Debug + 'static,
181{
182    fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::delete_table::DeleteTableError, R>) -> Self {
183        match err {
184            ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
185            _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
186                meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
187                source: err.into(),
188            }),
189        }
190    }
191}
192impl From<crate::operation::delete_table::DeleteTableError> for Error {
193    fn from(err: crate::operation::delete_table::DeleteTableError) -> Self {
194        match err {
195            crate::operation::delete_table::DeleteTableError::AccessDeniedException(inner) => Error::AccessDeniedException(inner),
196            crate::operation::delete_table::DeleteTableError::ConflictException(inner) => Error::ConflictException(inner),
197            crate::operation::delete_table::DeleteTableError::InternalServerException(inner) => Error::InternalServerException(inner),
198            crate::operation::delete_table::DeleteTableError::ResourceNotFoundException(inner) => Error::ResourceNotFoundException(inner),
199            crate::operation::delete_table::DeleteTableError::ServiceQuotaExceededException(inner) => Error::ServiceQuotaExceededException(inner),
200            crate::operation::delete_table::DeleteTableError::ValidationException(inner) => Error::ValidationException(inner),
201            crate::operation::delete_table::DeleteTableError::Unhandled(inner) => Error::Unhandled(inner),
202        }
203    }
204}
205impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::delete_type::DeleteTypeError, R>> for Error
206where
207    R: Send + Sync + std::fmt::Debug + 'static,
208{
209    fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::delete_type::DeleteTypeError, R>) -> Self {
210        match err {
211            ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
212            _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
213                meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
214                source: err.into(),
215            }),
216        }
217    }
218}
219impl From<crate::operation::delete_type::DeleteTypeError> for Error {
220    fn from(err: crate::operation::delete_type::DeleteTypeError) -> Self {
221        match err {
222            crate::operation::delete_type::DeleteTypeError::AccessDeniedException(inner) => Error::AccessDeniedException(inner),
223            crate::operation::delete_type::DeleteTypeError::ConflictException(inner) => Error::ConflictException(inner),
224            crate::operation::delete_type::DeleteTypeError::InternalServerException(inner) => Error::InternalServerException(inner),
225            crate::operation::delete_type::DeleteTypeError::ResourceNotFoundException(inner) => Error::ResourceNotFoundException(inner),
226            crate::operation::delete_type::DeleteTypeError::ServiceQuotaExceededException(inner) => Error::ServiceQuotaExceededException(inner),
227            crate::operation::delete_type::DeleteTypeError::ValidationException(inner) => Error::ValidationException(inner),
228            crate::operation::delete_type::DeleteTypeError::Unhandled(inner) => Error::Unhandled(inner),
229        }
230    }
231}
232impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::get_keyspace::GetKeyspaceError, R>> for Error
233where
234    R: Send + Sync + std::fmt::Debug + 'static,
235{
236    fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::get_keyspace::GetKeyspaceError, R>) -> Self {
237        match err {
238            ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
239            _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
240                meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
241                source: err.into(),
242            }),
243        }
244    }
245}
246impl From<crate::operation::get_keyspace::GetKeyspaceError> for Error {
247    fn from(err: crate::operation::get_keyspace::GetKeyspaceError) -> Self {
248        match err {
249            crate::operation::get_keyspace::GetKeyspaceError::AccessDeniedException(inner) => Error::AccessDeniedException(inner),
250            crate::operation::get_keyspace::GetKeyspaceError::InternalServerException(inner) => Error::InternalServerException(inner),
251            crate::operation::get_keyspace::GetKeyspaceError::ResourceNotFoundException(inner) => Error::ResourceNotFoundException(inner),
252            crate::operation::get_keyspace::GetKeyspaceError::ServiceQuotaExceededException(inner) => Error::ServiceQuotaExceededException(inner),
253            crate::operation::get_keyspace::GetKeyspaceError::ValidationException(inner) => Error::ValidationException(inner),
254            crate::operation::get_keyspace::GetKeyspaceError::Unhandled(inner) => Error::Unhandled(inner),
255        }
256    }
257}
258impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::get_table::GetTableError, R>> for Error
259where
260    R: Send + Sync + std::fmt::Debug + 'static,
261{
262    fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::get_table::GetTableError, R>) -> Self {
263        match err {
264            ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
265            _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
266                meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
267                source: err.into(),
268            }),
269        }
270    }
271}
272impl From<crate::operation::get_table::GetTableError> for Error {
273    fn from(err: crate::operation::get_table::GetTableError) -> Self {
274        match err {
275            crate::operation::get_table::GetTableError::AccessDeniedException(inner) => Error::AccessDeniedException(inner),
276            crate::operation::get_table::GetTableError::InternalServerException(inner) => Error::InternalServerException(inner),
277            crate::operation::get_table::GetTableError::ResourceNotFoundException(inner) => Error::ResourceNotFoundException(inner),
278            crate::operation::get_table::GetTableError::ServiceQuotaExceededException(inner) => Error::ServiceQuotaExceededException(inner),
279            crate::operation::get_table::GetTableError::ValidationException(inner) => Error::ValidationException(inner),
280            crate::operation::get_table::GetTableError::Unhandled(inner) => Error::Unhandled(inner),
281        }
282    }
283}
284impl<R>
285    From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::get_table_auto_scaling_settings::GetTableAutoScalingSettingsError, R>>
286    for Error
287where
288    R: Send + Sync + std::fmt::Debug + 'static,
289{
290    fn from(
291        err: ::aws_smithy_runtime_api::client::result::SdkError<
292            crate::operation::get_table_auto_scaling_settings::GetTableAutoScalingSettingsError,
293            R,
294        >,
295    ) -> Self {
296        match err {
297            ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
298            _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
299                meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
300                source: err.into(),
301            }),
302        }
303    }
304}
305impl From<crate::operation::get_table_auto_scaling_settings::GetTableAutoScalingSettingsError> for Error {
306    fn from(err: crate::operation::get_table_auto_scaling_settings::GetTableAutoScalingSettingsError) -> Self {
307        match err {
308            crate::operation::get_table_auto_scaling_settings::GetTableAutoScalingSettingsError::AccessDeniedException(inner) => {
309                Error::AccessDeniedException(inner)
310            }
311            crate::operation::get_table_auto_scaling_settings::GetTableAutoScalingSettingsError::InternalServerException(inner) => {
312                Error::InternalServerException(inner)
313            }
314            crate::operation::get_table_auto_scaling_settings::GetTableAutoScalingSettingsError::ResourceNotFoundException(inner) => {
315                Error::ResourceNotFoundException(inner)
316            }
317            crate::operation::get_table_auto_scaling_settings::GetTableAutoScalingSettingsError::ServiceQuotaExceededException(inner) => {
318                Error::ServiceQuotaExceededException(inner)
319            }
320            crate::operation::get_table_auto_scaling_settings::GetTableAutoScalingSettingsError::ValidationException(inner) => {
321                Error::ValidationException(inner)
322            }
323            crate::operation::get_table_auto_scaling_settings::GetTableAutoScalingSettingsError::Unhandled(inner) => Error::Unhandled(inner),
324        }
325    }
326}
327impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::get_type::GetTypeError, R>> for Error
328where
329    R: Send + Sync + std::fmt::Debug + 'static,
330{
331    fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::get_type::GetTypeError, R>) -> Self {
332        match err {
333            ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
334            _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
335                meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
336                source: err.into(),
337            }),
338        }
339    }
340}
341impl From<crate::operation::get_type::GetTypeError> for Error {
342    fn from(err: crate::operation::get_type::GetTypeError) -> Self {
343        match err {
344            crate::operation::get_type::GetTypeError::AccessDeniedException(inner) => Error::AccessDeniedException(inner),
345            crate::operation::get_type::GetTypeError::InternalServerException(inner) => Error::InternalServerException(inner),
346            crate::operation::get_type::GetTypeError::ResourceNotFoundException(inner) => Error::ResourceNotFoundException(inner),
347            crate::operation::get_type::GetTypeError::ServiceQuotaExceededException(inner) => Error::ServiceQuotaExceededException(inner),
348            crate::operation::get_type::GetTypeError::ValidationException(inner) => Error::ValidationException(inner),
349            crate::operation::get_type::GetTypeError::Unhandled(inner) => Error::Unhandled(inner),
350        }
351    }
352}
353impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::list_keyspaces::ListKeyspacesError, R>> for Error
354where
355    R: Send + Sync + std::fmt::Debug + 'static,
356{
357    fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::list_keyspaces::ListKeyspacesError, R>) -> Self {
358        match err {
359            ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
360            _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
361                meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
362                source: err.into(),
363            }),
364        }
365    }
366}
367impl From<crate::operation::list_keyspaces::ListKeyspacesError> for Error {
368    fn from(err: crate::operation::list_keyspaces::ListKeyspacesError) -> Self {
369        match err {
370            crate::operation::list_keyspaces::ListKeyspacesError::AccessDeniedException(inner) => Error::AccessDeniedException(inner),
371            crate::operation::list_keyspaces::ListKeyspacesError::InternalServerException(inner) => Error::InternalServerException(inner),
372            crate::operation::list_keyspaces::ListKeyspacesError::ResourceNotFoundException(inner) => Error::ResourceNotFoundException(inner),
373            crate::operation::list_keyspaces::ListKeyspacesError::ServiceQuotaExceededException(inner) => Error::ServiceQuotaExceededException(inner),
374            crate::operation::list_keyspaces::ListKeyspacesError::ValidationException(inner) => Error::ValidationException(inner),
375            crate::operation::list_keyspaces::ListKeyspacesError::Unhandled(inner) => Error::Unhandled(inner),
376        }
377    }
378}
379impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::list_tables::ListTablesError, R>> for Error
380where
381    R: Send + Sync + std::fmt::Debug + 'static,
382{
383    fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::list_tables::ListTablesError, R>) -> Self {
384        match err {
385            ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
386            _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
387                meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
388                source: err.into(),
389            }),
390        }
391    }
392}
393impl From<crate::operation::list_tables::ListTablesError> for Error {
394    fn from(err: crate::operation::list_tables::ListTablesError) -> Self {
395        match err {
396            crate::operation::list_tables::ListTablesError::AccessDeniedException(inner) => Error::AccessDeniedException(inner),
397            crate::operation::list_tables::ListTablesError::InternalServerException(inner) => Error::InternalServerException(inner),
398            crate::operation::list_tables::ListTablesError::ResourceNotFoundException(inner) => Error::ResourceNotFoundException(inner),
399            crate::operation::list_tables::ListTablesError::ServiceQuotaExceededException(inner) => Error::ServiceQuotaExceededException(inner),
400            crate::operation::list_tables::ListTablesError::ValidationException(inner) => Error::ValidationException(inner),
401            crate::operation::list_tables::ListTablesError::Unhandled(inner) => Error::Unhandled(inner),
402        }
403    }
404}
405impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::list_tags_for_resource::ListTagsForResourceError, R>> for Error
406where
407    R: Send + Sync + std::fmt::Debug + 'static,
408{
409    fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::list_tags_for_resource::ListTagsForResourceError, R>) -> Self {
410        match err {
411            ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
412            _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
413                meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
414                source: err.into(),
415            }),
416        }
417    }
418}
419impl From<crate::operation::list_tags_for_resource::ListTagsForResourceError> for Error {
420    fn from(err: crate::operation::list_tags_for_resource::ListTagsForResourceError) -> Self {
421        match err {
422            crate::operation::list_tags_for_resource::ListTagsForResourceError::AccessDeniedException(inner) => Error::AccessDeniedException(inner),
423            crate::operation::list_tags_for_resource::ListTagsForResourceError::InternalServerException(inner) => {
424                Error::InternalServerException(inner)
425            }
426            crate::operation::list_tags_for_resource::ListTagsForResourceError::ResourceNotFoundException(inner) => {
427                Error::ResourceNotFoundException(inner)
428            }
429            crate::operation::list_tags_for_resource::ListTagsForResourceError::ServiceQuotaExceededException(inner) => {
430                Error::ServiceQuotaExceededException(inner)
431            }
432            crate::operation::list_tags_for_resource::ListTagsForResourceError::ValidationException(inner) => Error::ValidationException(inner),
433            crate::operation::list_tags_for_resource::ListTagsForResourceError::Unhandled(inner) => Error::Unhandled(inner),
434        }
435    }
436}
437impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::list_types::ListTypesError, 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::list_types::ListTypesError, 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::list_types::ListTypesError> for Error {
452    fn from(err: crate::operation::list_types::ListTypesError) -> Self {
453        match err {
454            crate::operation::list_types::ListTypesError::AccessDeniedException(inner) => Error::AccessDeniedException(inner),
455            crate::operation::list_types::ListTypesError::InternalServerException(inner) => Error::InternalServerException(inner),
456            crate::operation::list_types::ListTypesError::ResourceNotFoundException(inner) => Error::ResourceNotFoundException(inner),
457            crate::operation::list_types::ListTypesError::ServiceQuotaExceededException(inner) => Error::ServiceQuotaExceededException(inner),
458            crate::operation::list_types::ListTypesError::ValidationException(inner) => Error::ValidationException(inner),
459            crate::operation::list_types::ListTypesError::Unhandled(inner) => Error::Unhandled(inner),
460        }
461    }
462}
463impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::restore_table::RestoreTableError, R>> for Error
464where
465    R: Send + Sync + std::fmt::Debug + 'static,
466{
467    fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::restore_table::RestoreTableError, R>) -> Self {
468        match err {
469            ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
470            _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
471                meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
472                source: err.into(),
473            }),
474        }
475    }
476}
477impl From<crate::operation::restore_table::RestoreTableError> for Error {
478    fn from(err: crate::operation::restore_table::RestoreTableError) -> Self {
479        match err {
480            crate::operation::restore_table::RestoreTableError::AccessDeniedException(inner) => Error::AccessDeniedException(inner),
481            crate::operation::restore_table::RestoreTableError::ConflictException(inner) => Error::ConflictException(inner),
482            crate::operation::restore_table::RestoreTableError::InternalServerException(inner) => Error::InternalServerException(inner),
483            crate::operation::restore_table::RestoreTableError::ResourceNotFoundException(inner) => Error::ResourceNotFoundException(inner),
484            crate::operation::restore_table::RestoreTableError::ServiceQuotaExceededException(inner) => Error::ServiceQuotaExceededException(inner),
485            crate::operation::restore_table::RestoreTableError::ValidationException(inner) => Error::ValidationException(inner),
486            crate::operation::restore_table::RestoreTableError::Unhandled(inner) => Error::Unhandled(inner),
487        }
488    }
489}
490impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::tag_resource::TagResourceError, 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::tag_resource::TagResourceError, 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::tag_resource::TagResourceError> for Error {
505    fn from(err: crate::operation::tag_resource::TagResourceError) -> Self {
506        match err {
507            crate::operation::tag_resource::TagResourceError::AccessDeniedException(inner) => Error::AccessDeniedException(inner),
508            crate::operation::tag_resource::TagResourceError::ConflictException(inner) => Error::ConflictException(inner),
509            crate::operation::tag_resource::TagResourceError::InternalServerException(inner) => Error::InternalServerException(inner),
510            crate::operation::tag_resource::TagResourceError::ResourceNotFoundException(inner) => Error::ResourceNotFoundException(inner),
511            crate::operation::tag_resource::TagResourceError::ServiceQuotaExceededException(inner) => Error::ServiceQuotaExceededException(inner),
512            crate::operation::tag_resource::TagResourceError::ValidationException(inner) => Error::ValidationException(inner),
513            crate::operation::tag_resource::TagResourceError::Unhandled(inner) => Error::Unhandled(inner),
514        }
515    }
516}
517impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::untag_resource::UntagResourceError, R>> for Error
518where
519    R: Send + Sync + std::fmt::Debug + 'static,
520{
521    fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::untag_resource::UntagResourceError, R>) -> Self {
522        match err {
523            ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
524            _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
525                meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
526                source: err.into(),
527            }),
528        }
529    }
530}
531impl From<crate::operation::untag_resource::UntagResourceError> for Error {
532    fn from(err: crate::operation::untag_resource::UntagResourceError) -> Self {
533        match err {
534            crate::operation::untag_resource::UntagResourceError::AccessDeniedException(inner) => Error::AccessDeniedException(inner),
535            crate::operation::untag_resource::UntagResourceError::ConflictException(inner) => Error::ConflictException(inner),
536            crate::operation::untag_resource::UntagResourceError::InternalServerException(inner) => Error::InternalServerException(inner),
537            crate::operation::untag_resource::UntagResourceError::ResourceNotFoundException(inner) => Error::ResourceNotFoundException(inner),
538            crate::operation::untag_resource::UntagResourceError::ServiceQuotaExceededException(inner) => Error::ServiceQuotaExceededException(inner),
539            crate::operation::untag_resource::UntagResourceError::ValidationException(inner) => Error::ValidationException(inner),
540            crate::operation::untag_resource::UntagResourceError::Unhandled(inner) => Error::Unhandled(inner),
541        }
542    }
543}
544impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::update_keyspace::UpdateKeyspaceError, R>> for Error
545where
546    R: Send + Sync + std::fmt::Debug + 'static,
547{
548    fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::update_keyspace::UpdateKeyspaceError, R>) -> Self {
549        match err {
550            ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
551            _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
552                meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
553                source: err.into(),
554            }),
555        }
556    }
557}
558impl From<crate::operation::update_keyspace::UpdateKeyspaceError> for Error {
559    fn from(err: crate::operation::update_keyspace::UpdateKeyspaceError) -> Self {
560        match err {
561            crate::operation::update_keyspace::UpdateKeyspaceError::AccessDeniedException(inner) => Error::AccessDeniedException(inner),
562            crate::operation::update_keyspace::UpdateKeyspaceError::ConflictException(inner) => Error::ConflictException(inner),
563            crate::operation::update_keyspace::UpdateKeyspaceError::InternalServerException(inner) => Error::InternalServerException(inner),
564            crate::operation::update_keyspace::UpdateKeyspaceError::ResourceNotFoundException(inner) => Error::ResourceNotFoundException(inner),
565            crate::operation::update_keyspace::UpdateKeyspaceError::ServiceQuotaExceededException(inner) => {
566                Error::ServiceQuotaExceededException(inner)
567            }
568            crate::operation::update_keyspace::UpdateKeyspaceError::ValidationException(inner) => Error::ValidationException(inner),
569            crate::operation::update_keyspace::UpdateKeyspaceError::Unhandled(inner) => Error::Unhandled(inner),
570        }
571    }
572}
573impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::update_table::UpdateTableError, R>> for Error
574where
575    R: Send + Sync + std::fmt::Debug + 'static,
576{
577    fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::update_table::UpdateTableError, R>) -> Self {
578        match err {
579            ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
580            _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
581                meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
582                source: err.into(),
583            }),
584        }
585    }
586}
587impl From<crate::operation::update_table::UpdateTableError> for Error {
588    fn from(err: crate::operation::update_table::UpdateTableError) -> Self {
589        match err {
590            crate::operation::update_table::UpdateTableError::AccessDeniedException(inner) => Error::AccessDeniedException(inner),
591            crate::operation::update_table::UpdateTableError::ConflictException(inner) => Error::ConflictException(inner),
592            crate::operation::update_table::UpdateTableError::InternalServerException(inner) => Error::InternalServerException(inner),
593            crate::operation::update_table::UpdateTableError::ResourceNotFoundException(inner) => Error::ResourceNotFoundException(inner),
594            crate::operation::update_table::UpdateTableError::ServiceQuotaExceededException(inner) => Error::ServiceQuotaExceededException(inner),
595            crate::operation::update_table::UpdateTableError::ValidationException(inner) => Error::ValidationException(inner),
596            crate::operation::update_table::UpdateTableError::Unhandled(inner) => Error::Unhandled(inner),
597        }
598    }
599}
600impl ::std::error::Error for Error {
601    fn source(&self) -> std::option::Option<&(dyn ::std::error::Error + 'static)> {
602        match self {
603            Error::AccessDeniedException(inner) => inner.source(),
604            Error::ConflictException(inner) => inner.source(),
605            Error::InternalServerException(inner) => inner.source(),
606            Error::ResourceNotFoundException(inner) => inner.source(),
607            Error::ServiceQuotaExceededException(inner) => inner.source(),
608            Error::ValidationException(inner) => inner.source(),
609            Error::Unhandled(inner) => ::std::option::Option::Some(&*inner.source),
610        }
611    }
612}
613impl ::aws_types::request_id::RequestId for Error {
614    fn request_id(&self) -> Option<&str> {
615        match self {
616            Self::AccessDeniedException(e) => e.request_id(),
617            Self::ConflictException(e) => e.request_id(),
618            Self::InternalServerException(e) => e.request_id(),
619            Self::ResourceNotFoundException(e) => e.request_id(),
620            Self::ServiceQuotaExceededException(e) => e.request_id(),
621            Self::ValidationException(e) => e.request_id(),
622            Self::Unhandled(e) => e.meta.request_id(),
623        }
624    }
625}