Skip to main content

aws_sdk_opensearchmemory/
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 to perform this operation. To use this operation, you must have AWS Identity and Access Management (IAM) permissions for the operation, and on the resource it acts on. If the space uses a customer managed AWS Key Management Service (AWS KMS) key, you must also have permission to use the key.</p>
7    AccessDeniedException(crate::types::error::AccessDeniedException),
8    /// <p>The request conflicts with the current state of the resource. For example, the space is being created, updated, or deleted, a space with the same name already exists, or you reused a client token with different parameters. Wait for the space to finish being created, updated, or deleted, or use a different name or client token, and then retry.</p>
9    ConflictException(crate::types::error::ConflictException),
10    /// <p>The service couldn't process the request because of an internal error. Retry the request.</p>
11    InternalServerException(crate::types::error::InternalServerException),
12    /// <p>The specified resource doesn't exist. Check the IDs in the request.</p>
13    ResourceNotFoundException(crate::types::error::ResourceNotFoundException),
14    /// <p>The request would exceed a quota, such as the number of spaces in your account or the number of strategies in a space.</p>
15    ServiceQuotaExceededException(crate::types::error::ServiceQuotaExceededException),
16    /// <p>The service throttled the request. Retry the request with exponential backoff.</p>
17    ThrottlingException(crate::types::error::ThrottlingException),
18    /// <p>The request isn't valid. The <code>reason</code>, <code>message</code>, and <code>fieldList</code> members describe the problem. Fix the request, and then try again.</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::batch_get_event::BatchGetEventError, 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::batch_get_event::BatchGetEventError, 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::batch_get_event::BatchGetEventError> for Error {
86    fn from(err: crate::operation::batch_get_event::BatchGetEventError) -> Self {
87        match err {
88            crate::operation::batch_get_event::BatchGetEventError::AccessDeniedException(inner) => Error::AccessDeniedException(inner),
89            crate::operation::batch_get_event::BatchGetEventError::InternalServerException(inner) => Error::InternalServerException(inner),
90            crate::operation::batch_get_event::BatchGetEventError::ResourceNotFoundException(inner) => Error::ResourceNotFoundException(inner),
91            crate::operation::batch_get_event::BatchGetEventError::ThrottlingException(inner) => Error::ThrottlingException(inner),
92            crate::operation::batch_get_event::BatchGetEventError::ValidationException(inner) => Error::ValidationException(inner),
93            crate::operation::batch_get_event::BatchGetEventError::Unhandled(inner) => Error::Unhandled(inner),
94        }
95    }
96}
97impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::create_event::CreateEventError, R>> for Error
98where
99    R: Send + Sync + std::fmt::Debug + 'static,
100{
101    fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::create_event::CreateEventError, R>) -> Self {
102        match err {
103            ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
104            _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
105                meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
106                source: err.into(),
107            }),
108        }
109    }
110}
111impl From<crate::operation::create_event::CreateEventError> for Error {
112    fn from(err: crate::operation::create_event::CreateEventError) -> Self {
113        match err {
114            crate::operation::create_event::CreateEventError::AccessDeniedException(inner) => Error::AccessDeniedException(inner),
115            crate::operation::create_event::CreateEventError::ConflictException(inner) => Error::ConflictException(inner),
116            crate::operation::create_event::CreateEventError::InternalServerException(inner) => Error::InternalServerException(inner),
117            crate::operation::create_event::CreateEventError::ResourceNotFoundException(inner) => Error::ResourceNotFoundException(inner),
118            crate::operation::create_event::CreateEventError::ThrottlingException(inner) => Error::ThrottlingException(inner),
119            crate::operation::create_event::CreateEventError::ValidationException(inner) => Error::ValidationException(inner),
120            crate::operation::create_event::CreateEventError::Unhandled(inner) => Error::Unhandled(inner),
121        }
122    }
123}
124impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::create_memory::CreateMemoryError, R>> for Error
125where
126    R: Send + Sync + std::fmt::Debug + 'static,
127{
128    fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::create_memory::CreateMemoryError, R>) -> Self {
129        match err {
130            ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
131            _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
132                meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
133                source: err.into(),
134            }),
135        }
136    }
137}
138impl From<crate::operation::create_memory::CreateMemoryError> for Error {
139    fn from(err: crate::operation::create_memory::CreateMemoryError) -> Self {
140        match err {
141            crate::operation::create_memory::CreateMemoryError::AccessDeniedException(inner) => Error::AccessDeniedException(inner),
142            crate::operation::create_memory::CreateMemoryError::ConflictException(inner) => Error::ConflictException(inner),
143            crate::operation::create_memory::CreateMemoryError::InternalServerException(inner) => Error::InternalServerException(inner),
144            crate::operation::create_memory::CreateMemoryError::ResourceNotFoundException(inner) => Error::ResourceNotFoundException(inner),
145            crate::operation::create_memory::CreateMemoryError::ThrottlingException(inner) => Error::ThrottlingException(inner),
146            crate::operation::create_memory::CreateMemoryError::ValidationException(inner) => Error::ValidationException(inner),
147            crate::operation::create_memory::CreateMemoryError::Unhandled(inner) => Error::Unhandled(inner),
148        }
149    }
150}
151impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::create_space::CreateSpaceError, R>> for Error
152where
153    R: Send + Sync + std::fmt::Debug + 'static,
154{
155    fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::create_space::CreateSpaceError, R>) -> Self {
156        match err {
157            ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
158            _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
159                meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
160                source: err.into(),
161            }),
162        }
163    }
164}
165impl From<crate::operation::create_space::CreateSpaceError> for Error {
166    fn from(err: crate::operation::create_space::CreateSpaceError) -> Self {
167        match err {
168            crate::operation::create_space::CreateSpaceError::AccessDeniedException(inner) => Error::AccessDeniedException(inner),
169            crate::operation::create_space::CreateSpaceError::ConflictException(inner) => Error::ConflictException(inner),
170            crate::operation::create_space::CreateSpaceError::InternalServerException(inner) => Error::InternalServerException(inner),
171            crate::operation::create_space::CreateSpaceError::ServiceQuotaExceededException(inner) => Error::ServiceQuotaExceededException(inner),
172            crate::operation::create_space::CreateSpaceError::ThrottlingException(inner) => Error::ThrottlingException(inner),
173            crate::operation::create_space::CreateSpaceError::ValidationException(inner) => Error::ValidationException(inner),
174            crate::operation::create_space::CreateSpaceError::Unhandled(inner) => Error::Unhandled(inner),
175        }
176    }
177}
178impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::delete_event::DeleteEventError, 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_event::DeleteEventError, 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_event::DeleteEventError> for Error {
193    fn from(err: crate::operation::delete_event::DeleteEventError) -> Self {
194        match err {
195            crate::operation::delete_event::DeleteEventError::AccessDeniedException(inner) => Error::AccessDeniedException(inner),
196            crate::operation::delete_event::DeleteEventError::InternalServerException(inner) => Error::InternalServerException(inner),
197            crate::operation::delete_event::DeleteEventError::ResourceNotFoundException(inner) => Error::ResourceNotFoundException(inner),
198            crate::operation::delete_event::DeleteEventError::ThrottlingException(inner) => Error::ThrottlingException(inner),
199            crate::operation::delete_event::DeleteEventError::ValidationException(inner) => Error::ValidationException(inner),
200            crate::operation::delete_event::DeleteEventError::Unhandled(inner) => Error::Unhandled(inner),
201        }
202    }
203}
204impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::delete_memory::DeleteMemoryError, R>> for Error
205where
206    R: Send + Sync + std::fmt::Debug + 'static,
207{
208    fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::delete_memory::DeleteMemoryError, R>) -> Self {
209        match err {
210            ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
211            _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
212                meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
213                source: err.into(),
214            }),
215        }
216    }
217}
218impl From<crate::operation::delete_memory::DeleteMemoryError> for Error {
219    fn from(err: crate::operation::delete_memory::DeleteMemoryError) -> Self {
220        match err {
221            crate::operation::delete_memory::DeleteMemoryError::AccessDeniedException(inner) => Error::AccessDeniedException(inner),
222            crate::operation::delete_memory::DeleteMemoryError::InternalServerException(inner) => Error::InternalServerException(inner),
223            crate::operation::delete_memory::DeleteMemoryError::ResourceNotFoundException(inner) => Error::ResourceNotFoundException(inner),
224            crate::operation::delete_memory::DeleteMemoryError::ThrottlingException(inner) => Error::ThrottlingException(inner),
225            crate::operation::delete_memory::DeleteMemoryError::ValidationException(inner) => Error::ValidationException(inner),
226            crate::operation::delete_memory::DeleteMemoryError::Unhandled(inner) => Error::Unhandled(inner),
227        }
228    }
229}
230impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::delete_space::DeleteSpaceError, R>> for Error
231where
232    R: Send + Sync + std::fmt::Debug + 'static,
233{
234    fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::delete_space::DeleteSpaceError, R>) -> Self {
235        match err {
236            ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
237            _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
238                meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
239                source: err.into(),
240            }),
241        }
242    }
243}
244impl From<crate::operation::delete_space::DeleteSpaceError> for Error {
245    fn from(err: crate::operation::delete_space::DeleteSpaceError) -> Self {
246        match err {
247            crate::operation::delete_space::DeleteSpaceError::AccessDeniedException(inner) => Error::AccessDeniedException(inner),
248            crate::operation::delete_space::DeleteSpaceError::ConflictException(inner) => Error::ConflictException(inner),
249            crate::operation::delete_space::DeleteSpaceError::InternalServerException(inner) => Error::InternalServerException(inner),
250            crate::operation::delete_space::DeleteSpaceError::ResourceNotFoundException(inner) => Error::ResourceNotFoundException(inner),
251            crate::operation::delete_space::DeleteSpaceError::ThrottlingException(inner) => Error::ThrottlingException(inner),
252            crate::operation::delete_space::DeleteSpaceError::ValidationException(inner) => Error::ValidationException(inner),
253            crate::operation::delete_space::DeleteSpaceError::Unhandled(inner) => Error::Unhandled(inner),
254        }
255    }
256}
257impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::get_event::GetEventError, R>> for Error
258where
259    R: Send + Sync + std::fmt::Debug + 'static,
260{
261    fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::get_event::GetEventError, R>) -> Self {
262        match err {
263            ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
264            _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
265                meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
266                source: err.into(),
267            }),
268        }
269    }
270}
271impl From<crate::operation::get_event::GetEventError> for Error {
272    fn from(err: crate::operation::get_event::GetEventError) -> Self {
273        match err {
274            crate::operation::get_event::GetEventError::AccessDeniedException(inner) => Error::AccessDeniedException(inner),
275            crate::operation::get_event::GetEventError::InternalServerException(inner) => Error::InternalServerException(inner),
276            crate::operation::get_event::GetEventError::ResourceNotFoundException(inner) => Error::ResourceNotFoundException(inner),
277            crate::operation::get_event::GetEventError::ThrottlingException(inner) => Error::ThrottlingException(inner),
278            crate::operation::get_event::GetEventError::ValidationException(inner) => Error::ValidationException(inner),
279            crate::operation::get_event::GetEventError::Unhandled(inner) => Error::Unhandled(inner),
280        }
281    }
282}
283impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::get_memory::GetMemoryError, R>> for Error
284where
285    R: Send + Sync + std::fmt::Debug + 'static,
286{
287    fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::get_memory::GetMemoryError, R>) -> Self {
288        match err {
289            ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
290            _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
291                meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
292                source: err.into(),
293            }),
294        }
295    }
296}
297impl From<crate::operation::get_memory::GetMemoryError> for Error {
298    fn from(err: crate::operation::get_memory::GetMemoryError) -> Self {
299        match err {
300            crate::operation::get_memory::GetMemoryError::AccessDeniedException(inner) => Error::AccessDeniedException(inner),
301            crate::operation::get_memory::GetMemoryError::InternalServerException(inner) => Error::InternalServerException(inner),
302            crate::operation::get_memory::GetMemoryError::ResourceNotFoundException(inner) => Error::ResourceNotFoundException(inner),
303            crate::operation::get_memory::GetMemoryError::ThrottlingException(inner) => Error::ThrottlingException(inner),
304            crate::operation::get_memory::GetMemoryError::ValidationException(inner) => Error::ValidationException(inner),
305            crate::operation::get_memory::GetMemoryError::Unhandled(inner) => Error::Unhandled(inner),
306        }
307    }
308}
309impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::get_space::GetSpaceError, R>> for Error
310where
311    R: Send + Sync + std::fmt::Debug + 'static,
312{
313    fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::get_space::GetSpaceError, R>) -> Self {
314        match err {
315            ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
316            _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
317                meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
318                source: err.into(),
319            }),
320        }
321    }
322}
323impl From<crate::operation::get_space::GetSpaceError> for Error {
324    fn from(err: crate::operation::get_space::GetSpaceError) -> Self {
325        match err {
326            crate::operation::get_space::GetSpaceError::AccessDeniedException(inner) => Error::AccessDeniedException(inner),
327            crate::operation::get_space::GetSpaceError::InternalServerException(inner) => Error::InternalServerException(inner),
328            crate::operation::get_space::GetSpaceError::ResourceNotFoundException(inner) => Error::ResourceNotFoundException(inner),
329            crate::operation::get_space::GetSpaceError::ThrottlingException(inner) => Error::ThrottlingException(inner),
330            crate::operation::get_space::GetSpaceError::ValidationException(inner) => Error::ValidationException(inner),
331            crate::operation::get_space::GetSpaceError::Unhandled(inner) => Error::Unhandled(inner),
332        }
333    }
334}
335impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::list_events::ListEventsError, R>> for Error
336where
337    R: Send + Sync + std::fmt::Debug + 'static,
338{
339    fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::list_events::ListEventsError, R>) -> Self {
340        match err {
341            ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
342            _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
343                meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
344                source: err.into(),
345            }),
346        }
347    }
348}
349impl From<crate::operation::list_events::ListEventsError> for Error {
350    fn from(err: crate::operation::list_events::ListEventsError) -> Self {
351        match err {
352            crate::operation::list_events::ListEventsError::AccessDeniedException(inner) => Error::AccessDeniedException(inner),
353            crate::operation::list_events::ListEventsError::InternalServerException(inner) => Error::InternalServerException(inner),
354            crate::operation::list_events::ListEventsError::ResourceNotFoundException(inner) => Error::ResourceNotFoundException(inner),
355            crate::operation::list_events::ListEventsError::ThrottlingException(inner) => Error::ThrottlingException(inner),
356            crate::operation::list_events::ListEventsError::ValidationException(inner) => Error::ValidationException(inner),
357            crate::operation::list_events::ListEventsError::Unhandled(inner) => Error::Unhandled(inner),
358        }
359    }
360}
361impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::list_memories::ListMemoriesError, R>> for Error
362where
363    R: Send + Sync + std::fmt::Debug + 'static,
364{
365    fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::list_memories::ListMemoriesError, R>) -> Self {
366        match err {
367            ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
368            _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
369                meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
370                source: err.into(),
371            }),
372        }
373    }
374}
375impl From<crate::operation::list_memories::ListMemoriesError> for Error {
376    fn from(err: crate::operation::list_memories::ListMemoriesError) -> Self {
377        match err {
378            crate::operation::list_memories::ListMemoriesError::AccessDeniedException(inner) => Error::AccessDeniedException(inner),
379            crate::operation::list_memories::ListMemoriesError::InternalServerException(inner) => Error::InternalServerException(inner),
380            crate::operation::list_memories::ListMemoriesError::ResourceNotFoundException(inner) => Error::ResourceNotFoundException(inner),
381            crate::operation::list_memories::ListMemoriesError::ThrottlingException(inner) => Error::ThrottlingException(inner),
382            crate::operation::list_memories::ListMemoriesError::ValidationException(inner) => Error::ValidationException(inner),
383            crate::operation::list_memories::ListMemoriesError::Unhandled(inner) => Error::Unhandled(inner),
384        }
385    }
386}
387impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::list_spaces::ListSpacesError, R>> for Error
388where
389    R: Send + Sync + std::fmt::Debug + 'static,
390{
391    fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::list_spaces::ListSpacesError, R>) -> Self {
392        match err {
393            ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
394            _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
395                meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
396                source: err.into(),
397            }),
398        }
399    }
400}
401impl From<crate::operation::list_spaces::ListSpacesError> for Error {
402    fn from(err: crate::operation::list_spaces::ListSpacesError) -> Self {
403        match err {
404            crate::operation::list_spaces::ListSpacesError::AccessDeniedException(inner) => Error::AccessDeniedException(inner),
405            crate::operation::list_spaces::ListSpacesError::InternalServerException(inner) => Error::InternalServerException(inner),
406            crate::operation::list_spaces::ListSpacesError::ThrottlingException(inner) => Error::ThrottlingException(inner),
407            crate::operation::list_spaces::ListSpacesError::ValidationException(inner) => Error::ValidationException(inner),
408            crate::operation::list_spaces::ListSpacesError::Unhandled(inner) => Error::Unhandled(inner),
409        }
410    }
411}
412impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::list_tags_for_resource::ListTagsForResourceError, R>> for Error
413where
414    R: Send + Sync + std::fmt::Debug + 'static,
415{
416    fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::list_tags_for_resource::ListTagsForResourceError, R>) -> Self {
417        match err {
418            ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
419            _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
420                meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
421                source: err.into(),
422            }),
423        }
424    }
425}
426impl From<crate::operation::list_tags_for_resource::ListTagsForResourceError> for Error {
427    fn from(err: crate::operation::list_tags_for_resource::ListTagsForResourceError) -> Self {
428        match err {
429            crate::operation::list_tags_for_resource::ListTagsForResourceError::AccessDeniedException(inner) => Error::AccessDeniedException(inner),
430            crate::operation::list_tags_for_resource::ListTagsForResourceError::InternalServerException(inner) => {
431                Error::InternalServerException(inner)
432            }
433            crate::operation::list_tags_for_resource::ListTagsForResourceError::ResourceNotFoundException(inner) => {
434                Error::ResourceNotFoundException(inner)
435            }
436            crate::operation::list_tags_for_resource::ListTagsForResourceError::ThrottlingException(inner) => Error::ThrottlingException(inner),
437            crate::operation::list_tags_for_resource::ListTagsForResourceError::ValidationException(inner) => Error::ValidationException(inner),
438            crate::operation::list_tags_for_resource::ListTagsForResourceError::Unhandled(inner) => Error::Unhandled(inner),
439        }
440    }
441}
442impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::search_events::SearchEventsError, R>> for Error
443where
444    R: Send + Sync + std::fmt::Debug + 'static,
445{
446    fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::search_events::SearchEventsError, R>) -> Self {
447        match err {
448            ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
449            _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
450                meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
451                source: err.into(),
452            }),
453        }
454    }
455}
456impl From<crate::operation::search_events::SearchEventsError> for Error {
457    fn from(err: crate::operation::search_events::SearchEventsError) -> Self {
458        match err {
459            crate::operation::search_events::SearchEventsError::AccessDeniedException(inner) => Error::AccessDeniedException(inner),
460            crate::operation::search_events::SearchEventsError::InternalServerException(inner) => Error::InternalServerException(inner),
461            crate::operation::search_events::SearchEventsError::ResourceNotFoundException(inner) => Error::ResourceNotFoundException(inner),
462            crate::operation::search_events::SearchEventsError::ThrottlingException(inner) => Error::ThrottlingException(inner),
463            crate::operation::search_events::SearchEventsError::ValidationException(inner) => Error::ValidationException(inner),
464            crate::operation::search_events::SearchEventsError::Unhandled(inner) => Error::Unhandled(inner),
465        }
466    }
467}
468impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::search_memories::SearchMemoriesError, R>> for Error
469where
470    R: Send + Sync + std::fmt::Debug + 'static,
471{
472    fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::search_memories::SearchMemoriesError, R>) -> Self {
473        match err {
474            ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
475            _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
476                meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
477                source: err.into(),
478            }),
479        }
480    }
481}
482impl From<crate::operation::search_memories::SearchMemoriesError> for Error {
483    fn from(err: crate::operation::search_memories::SearchMemoriesError) -> Self {
484        match err {
485            crate::operation::search_memories::SearchMemoriesError::AccessDeniedException(inner) => Error::AccessDeniedException(inner),
486            crate::operation::search_memories::SearchMemoriesError::InternalServerException(inner) => Error::InternalServerException(inner),
487            crate::operation::search_memories::SearchMemoriesError::ResourceNotFoundException(inner) => Error::ResourceNotFoundException(inner),
488            crate::operation::search_memories::SearchMemoriesError::ThrottlingException(inner) => Error::ThrottlingException(inner),
489            crate::operation::search_memories::SearchMemoriesError::ValidationException(inner) => Error::ValidationException(inner),
490            crate::operation::search_memories::SearchMemoriesError::Unhandled(inner) => Error::Unhandled(inner),
491        }
492    }
493}
494impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::tag_resource::TagResourceError, R>> for Error
495where
496    R: Send + Sync + std::fmt::Debug + 'static,
497{
498    fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::tag_resource::TagResourceError, R>) -> Self {
499        match err {
500            ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
501            _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
502                meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
503                source: err.into(),
504            }),
505        }
506    }
507}
508impl From<crate::operation::tag_resource::TagResourceError> for Error {
509    fn from(err: crate::operation::tag_resource::TagResourceError) -> Self {
510        match err {
511            crate::operation::tag_resource::TagResourceError::AccessDeniedException(inner) => Error::AccessDeniedException(inner),
512            crate::operation::tag_resource::TagResourceError::InternalServerException(inner) => Error::InternalServerException(inner),
513            crate::operation::tag_resource::TagResourceError::ResourceNotFoundException(inner) => Error::ResourceNotFoundException(inner),
514            crate::operation::tag_resource::TagResourceError::ThrottlingException(inner) => Error::ThrottlingException(inner),
515            crate::operation::tag_resource::TagResourceError::ValidationException(inner) => Error::ValidationException(inner),
516            crate::operation::tag_resource::TagResourceError::Unhandled(inner) => Error::Unhandled(inner),
517        }
518    }
519}
520impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::untag_resource::UntagResourceError, R>> for Error
521where
522    R: Send + Sync + std::fmt::Debug + 'static,
523{
524    fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::untag_resource::UntagResourceError, R>) -> Self {
525        match err {
526            ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
527            _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
528                meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
529                source: err.into(),
530            }),
531        }
532    }
533}
534impl From<crate::operation::untag_resource::UntagResourceError> for Error {
535    fn from(err: crate::operation::untag_resource::UntagResourceError) -> Self {
536        match err {
537            crate::operation::untag_resource::UntagResourceError::AccessDeniedException(inner) => Error::AccessDeniedException(inner),
538            crate::operation::untag_resource::UntagResourceError::InternalServerException(inner) => Error::InternalServerException(inner),
539            crate::operation::untag_resource::UntagResourceError::ResourceNotFoundException(inner) => Error::ResourceNotFoundException(inner),
540            crate::operation::untag_resource::UntagResourceError::ThrottlingException(inner) => Error::ThrottlingException(inner),
541            crate::operation::untag_resource::UntagResourceError::ValidationException(inner) => Error::ValidationException(inner),
542            crate::operation::untag_resource::UntagResourceError::Unhandled(inner) => Error::Unhandled(inner),
543        }
544    }
545}
546impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::update_memory::UpdateMemoryError, R>> for Error
547where
548    R: Send + Sync + std::fmt::Debug + 'static,
549{
550    fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::update_memory::UpdateMemoryError, R>) -> Self {
551        match err {
552            ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
553            _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
554                meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
555                source: err.into(),
556            }),
557        }
558    }
559}
560impl From<crate::operation::update_memory::UpdateMemoryError> for Error {
561    fn from(err: crate::operation::update_memory::UpdateMemoryError) -> Self {
562        match err {
563            crate::operation::update_memory::UpdateMemoryError::AccessDeniedException(inner) => Error::AccessDeniedException(inner),
564            crate::operation::update_memory::UpdateMemoryError::ConflictException(inner) => Error::ConflictException(inner),
565            crate::operation::update_memory::UpdateMemoryError::InternalServerException(inner) => Error::InternalServerException(inner),
566            crate::operation::update_memory::UpdateMemoryError::ResourceNotFoundException(inner) => Error::ResourceNotFoundException(inner),
567            crate::operation::update_memory::UpdateMemoryError::ThrottlingException(inner) => Error::ThrottlingException(inner),
568            crate::operation::update_memory::UpdateMemoryError::ValidationException(inner) => Error::ValidationException(inner),
569            crate::operation::update_memory::UpdateMemoryError::Unhandled(inner) => Error::Unhandled(inner),
570        }
571    }
572}
573impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::update_space::UpdateSpaceError, 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_space::UpdateSpaceError, 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_space::UpdateSpaceError> for Error {
588    fn from(err: crate::operation::update_space::UpdateSpaceError) -> Self {
589        match err {
590            crate::operation::update_space::UpdateSpaceError::AccessDeniedException(inner) => Error::AccessDeniedException(inner),
591            crate::operation::update_space::UpdateSpaceError::ConflictException(inner) => Error::ConflictException(inner),
592            crate::operation::update_space::UpdateSpaceError::InternalServerException(inner) => Error::InternalServerException(inner),
593            crate::operation::update_space::UpdateSpaceError::ResourceNotFoundException(inner) => Error::ResourceNotFoundException(inner),
594            crate::operation::update_space::UpdateSpaceError::ServiceQuotaExceededException(inner) => Error::ServiceQuotaExceededException(inner),
595            crate::operation::update_space::UpdateSpaceError::ThrottlingException(inner) => Error::ThrottlingException(inner),
596            crate::operation::update_space::UpdateSpaceError::ValidationException(inner) => Error::ValidationException(inner),
597            crate::operation::update_space::UpdateSpaceError::Unhandled(inner) => Error::Unhandled(inner),
598        }
599    }
600}
601impl<O, E> ::std::convert::From<::aws_smithy_runtime_api::client::waiters::error::WaiterError<O, E>> for Error
602where
603    O: ::std::fmt::Debug + ::std::marker::Send + ::std::marker::Sync + 'static,
604    E: ::std::error::Error + ::std::marker::Send + ::std::marker::Sync + 'static,
605{
606    fn from(err: ::aws_smithy_runtime_api::client::waiters::error::WaiterError<O, E>) -> Self {
607        Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
608            meta: ::std::default::Default::default(),
609            source: err.into(),
610        })
611    }
612}
613impl ::std::error::Error for Error {
614    fn source(&self) -> std::option::Option<&(dyn ::std::error::Error + 'static)> {
615        match self {
616            Error::AccessDeniedException(inner) => inner.source(),
617            Error::ConflictException(inner) => inner.source(),
618            Error::InternalServerException(inner) => inner.source(),
619            Error::ResourceNotFoundException(inner) => inner.source(),
620            Error::ServiceQuotaExceededException(inner) => inner.source(),
621            Error::ThrottlingException(inner) => inner.source(),
622            Error::ValidationException(inner) => inner.source(),
623            Error::Unhandled(inner) => ::std::option::Option::Some(&*inner.source),
624        }
625    }
626}
627impl ::aws_types::request_id::RequestId for Error {
628    fn request_id(&self) -> Option<&str> {
629        match self {
630            Self::AccessDeniedException(e) => e.request_id(),
631            Self::ConflictException(e) => e.request_id(),
632            Self::InternalServerException(e) => e.request_id(),
633            Self::ResourceNotFoundException(e) => e.request_id(),
634            Self::ServiceQuotaExceededException(e) => e.request_id(),
635            Self::ThrottlingException(e) => e.request_id(),
636            Self::ValidationException(e) => e.request_id(),
637            Self::Unhandled(e) => e.meta.request_id(),
638        }
639    }
640}