aws_sdk_resourceexplorer2/
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>The credentials that you used to call this operation don't have the minimum required permissions.</p>
7    AccessDeniedException(crate::types::error::AccessDeniedException),
8    /// <p>If you attempted to create a view, then the request failed because either you specified parameters that didn’t match the original request, or you attempted to create a view with a name that already exists in this Amazon Web Services Region.</p>
9    /// <p>If you attempted to create an index, then the request failed because either you specified parameters that didn't match the original request, or an index already exists in the current Amazon Web Services Region.</p>
10    /// <p>If you attempted to update an index type to <code>AGGREGATOR</code>, then the request failed because you already have an <code>AGGREGATOR</code> index in a different Amazon Web Services Region.</p>
11    ConflictException(crate::types::error::ConflictException),
12    /// <p>The request failed because of internal service error. Try your request again later.</p>
13    InternalServerException(crate::types::error::InternalServerException),
14    /// <p>You specified a resource that doesn't exist. Check the ID or ARN that you used to identity the resource, and try again.</p>
15    ResourceNotFoundException(crate::types::error::ResourceNotFoundException),
16    /// <p>The request failed because it exceeds a service quota.</p>
17    ServiceQuotaExceededException(crate::types::error::ServiceQuotaExceededException),
18    /// <p>The request failed because you exceeded a rate limit for this operation. For more information, see <a href="https://docs.aws.amazon.com/resource-explorer/latest/userguide/quotas.html">Quotas for Resource Explorer</a>.</p>
19    ThrottlingException(crate::types::error::ThrottlingException),
20    /// <p>The principal making the request isn't permitted to perform the operation.</p>
21    UnauthorizedException(crate::types::error::UnauthorizedException),
22    /// <p>You provided an invalid value for one of the operation's parameters. Check the syntax for the operation, and try again.</p>
23    ValidationException(crate::types::error::ValidationException),
24    /// An unexpected error occurred (e.g., invalid JSON returned by the service or an unknown error code).
25    #[deprecated(note = "Matching `Unhandled` directly is not forwards compatible. Instead, match using a \
26    variable wildcard pattern and check `.code()`:
27     \
28    &nbsp;&nbsp;&nbsp;`err if err.code() == Some(\"SpecificExceptionCode\") => { /* handle the error */ }`
29     \
30    See [`ProvideErrorMetadata`](#impl-ProvideErrorMetadata-for-Error) for what information is available for the error.")]
31    Unhandled(crate::error::sealed_unhandled::Unhandled),
32}
33impl ::std::fmt::Display for Error {
34    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
35        match self {
36            Error::AccessDeniedException(inner) => inner.fmt(f),
37            Error::ConflictException(inner) => inner.fmt(f),
38            Error::InternalServerException(inner) => inner.fmt(f),
39            Error::ResourceNotFoundException(inner) => inner.fmt(f),
40            Error::ServiceQuotaExceededException(inner) => inner.fmt(f),
41            Error::ThrottlingException(inner) => inner.fmt(f),
42            Error::UnauthorizedException(inner) => inner.fmt(f),
43            Error::ValidationException(inner) => inner.fmt(f),
44            Error::Unhandled(_) => {
45                if let ::std::option::Option::Some(code) = ::aws_smithy_types::error::metadata::ProvideErrorMetadata::code(self) {
46                    write!(f, "unhandled error ({code})")
47                } else {
48                    f.write_str("unhandled error")
49                }
50            }
51        }
52    }
53}
54impl From<::aws_smithy_types::error::operation::BuildError> for Error {
55    fn from(value: ::aws_smithy_types::error::operation::BuildError) -> Self {
56        Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
57            source: value.into(),
58            meta: ::std::default::Default::default(),
59        })
60    }
61}
62impl ::aws_smithy_types::error::metadata::ProvideErrorMetadata for Error {
63    fn meta(&self) -> &::aws_smithy_types::error::metadata::ErrorMetadata {
64        match self {
65            Self::AccessDeniedException(inner) => inner.meta(),
66            Self::ConflictException(inner) => inner.meta(),
67            Self::InternalServerException(inner) => inner.meta(),
68            Self::ResourceNotFoundException(inner) => inner.meta(),
69            Self::ServiceQuotaExceededException(inner) => inner.meta(),
70            Self::ThrottlingException(inner) => inner.meta(),
71            Self::UnauthorizedException(inner) => inner.meta(),
72            Self::ValidationException(inner) => inner.meta(),
73            Self::Unhandled(inner) => &inner.meta,
74        }
75    }
76}
77impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::associate_default_view::AssociateDefaultViewError, R>> for Error
78where
79    R: Send + Sync + std::fmt::Debug + 'static,
80{
81    fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::associate_default_view::AssociateDefaultViewError, R>) -> Self {
82        match err {
83            ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
84            _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
85                meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
86                source: err.into(),
87            }),
88        }
89    }
90}
91impl From<crate::operation::associate_default_view::AssociateDefaultViewError> for Error {
92    fn from(err: crate::operation::associate_default_view::AssociateDefaultViewError) -> Self {
93        match err {
94            crate::operation::associate_default_view::AssociateDefaultViewError::AccessDeniedException(inner) => Error::AccessDeniedException(inner),
95            crate::operation::associate_default_view::AssociateDefaultViewError::InternalServerException(inner) => {
96                Error::InternalServerException(inner)
97            }
98            crate::operation::associate_default_view::AssociateDefaultViewError::ResourceNotFoundException(inner) => {
99                Error::ResourceNotFoundException(inner)
100            }
101            crate::operation::associate_default_view::AssociateDefaultViewError::ThrottlingException(inner) => Error::ThrottlingException(inner),
102            crate::operation::associate_default_view::AssociateDefaultViewError::ValidationException(inner) => Error::ValidationException(inner),
103            crate::operation::associate_default_view::AssociateDefaultViewError::Unhandled(inner) => Error::Unhandled(inner),
104        }
105    }
106}
107impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::batch_get_view::BatchGetViewError, R>> for Error
108where
109    R: Send + Sync + std::fmt::Debug + 'static,
110{
111    fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::batch_get_view::BatchGetViewError, R>) -> Self {
112        match err {
113            ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
114            _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
115                meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
116                source: err.into(),
117            }),
118        }
119    }
120}
121impl From<crate::operation::batch_get_view::BatchGetViewError> for Error {
122    fn from(err: crate::operation::batch_get_view::BatchGetViewError) -> Self {
123        match err {
124            crate::operation::batch_get_view::BatchGetViewError::AccessDeniedException(inner) => Error::AccessDeniedException(inner),
125            crate::operation::batch_get_view::BatchGetViewError::InternalServerException(inner) => Error::InternalServerException(inner),
126            crate::operation::batch_get_view::BatchGetViewError::ThrottlingException(inner) => Error::ThrottlingException(inner),
127            crate::operation::batch_get_view::BatchGetViewError::UnauthorizedException(inner) => Error::UnauthorizedException(inner),
128            crate::operation::batch_get_view::BatchGetViewError::ValidationException(inner) => Error::ValidationException(inner),
129            crate::operation::batch_get_view::BatchGetViewError::Unhandled(inner) => Error::Unhandled(inner),
130        }
131    }
132}
133impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::create_index::CreateIndexError, R>> for Error
134where
135    R: Send + Sync + std::fmt::Debug + 'static,
136{
137    fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::create_index::CreateIndexError, R>) -> Self {
138        match err {
139            ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
140            _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
141                meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
142                source: err.into(),
143            }),
144        }
145    }
146}
147impl From<crate::operation::create_index::CreateIndexError> for Error {
148    fn from(err: crate::operation::create_index::CreateIndexError) -> Self {
149        match err {
150            crate::operation::create_index::CreateIndexError::AccessDeniedException(inner) => Error::AccessDeniedException(inner),
151            crate::operation::create_index::CreateIndexError::ConflictException(inner) => Error::ConflictException(inner),
152            crate::operation::create_index::CreateIndexError::InternalServerException(inner) => Error::InternalServerException(inner),
153            crate::operation::create_index::CreateIndexError::ThrottlingException(inner) => Error::ThrottlingException(inner),
154            crate::operation::create_index::CreateIndexError::ValidationException(inner) => Error::ValidationException(inner),
155            crate::operation::create_index::CreateIndexError::Unhandled(inner) => Error::Unhandled(inner),
156        }
157    }
158}
159impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::create_view::CreateViewError, R>> for Error
160where
161    R: Send + Sync + std::fmt::Debug + 'static,
162{
163    fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::create_view::CreateViewError, R>) -> Self {
164        match err {
165            ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
166            _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
167                meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
168                source: err.into(),
169            }),
170        }
171    }
172}
173impl From<crate::operation::create_view::CreateViewError> for Error {
174    fn from(err: crate::operation::create_view::CreateViewError) -> Self {
175        match err {
176            crate::operation::create_view::CreateViewError::AccessDeniedException(inner) => Error::AccessDeniedException(inner),
177            crate::operation::create_view::CreateViewError::ConflictException(inner) => Error::ConflictException(inner),
178            crate::operation::create_view::CreateViewError::InternalServerException(inner) => Error::InternalServerException(inner),
179            crate::operation::create_view::CreateViewError::ServiceQuotaExceededException(inner) => Error::ServiceQuotaExceededException(inner),
180            crate::operation::create_view::CreateViewError::ThrottlingException(inner) => Error::ThrottlingException(inner),
181            crate::operation::create_view::CreateViewError::UnauthorizedException(inner) => Error::UnauthorizedException(inner),
182            crate::operation::create_view::CreateViewError::ValidationException(inner) => Error::ValidationException(inner),
183            crate::operation::create_view::CreateViewError::Unhandled(inner) => Error::Unhandled(inner),
184        }
185    }
186}
187impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::delete_index::DeleteIndexError, R>> for Error
188where
189    R: Send + Sync + std::fmt::Debug + 'static,
190{
191    fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::delete_index::DeleteIndexError, R>) -> Self {
192        match err {
193            ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
194            _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
195                meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
196                source: err.into(),
197            }),
198        }
199    }
200}
201impl From<crate::operation::delete_index::DeleteIndexError> for Error {
202    fn from(err: crate::operation::delete_index::DeleteIndexError) -> Self {
203        match err {
204            crate::operation::delete_index::DeleteIndexError::AccessDeniedException(inner) => Error::AccessDeniedException(inner),
205            crate::operation::delete_index::DeleteIndexError::InternalServerException(inner) => Error::InternalServerException(inner),
206            crate::operation::delete_index::DeleteIndexError::ResourceNotFoundException(inner) => Error::ResourceNotFoundException(inner),
207            crate::operation::delete_index::DeleteIndexError::ThrottlingException(inner) => Error::ThrottlingException(inner),
208            crate::operation::delete_index::DeleteIndexError::ValidationException(inner) => Error::ValidationException(inner),
209            crate::operation::delete_index::DeleteIndexError::Unhandled(inner) => Error::Unhandled(inner),
210        }
211    }
212}
213impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::delete_view::DeleteViewError, R>> for Error
214where
215    R: Send + Sync + std::fmt::Debug + 'static,
216{
217    fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::delete_view::DeleteViewError, R>) -> Self {
218        match err {
219            ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
220            _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
221                meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
222                source: err.into(),
223            }),
224        }
225    }
226}
227impl From<crate::operation::delete_view::DeleteViewError> for Error {
228    fn from(err: crate::operation::delete_view::DeleteViewError) -> Self {
229        match err {
230            crate::operation::delete_view::DeleteViewError::AccessDeniedException(inner) => Error::AccessDeniedException(inner),
231            crate::operation::delete_view::DeleteViewError::InternalServerException(inner) => Error::InternalServerException(inner),
232            crate::operation::delete_view::DeleteViewError::ResourceNotFoundException(inner) => Error::ResourceNotFoundException(inner),
233            crate::operation::delete_view::DeleteViewError::ThrottlingException(inner) => Error::ThrottlingException(inner),
234            crate::operation::delete_view::DeleteViewError::UnauthorizedException(inner) => Error::UnauthorizedException(inner),
235            crate::operation::delete_view::DeleteViewError::ValidationException(inner) => Error::ValidationException(inner),
236            crate::operation::delete_view::DeleteViewError::Unhandled(inner) => Error::Unhandled(inner),
237        }
238    }
239}
240impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::disassociate_default_view::DisassociateDefaultViewError, R>>
241    for Error
242where
243    R: Send + Sync + std::fmt::Debug + 'static,
244{
245    fn from(
246        err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::disassociate_default_view::DisassociateDefaultViewError, R>,
247    ) -> Self {
248        match err {
249            ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
250            _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
251                meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
252                source: err.into(),
253            }),
254        }
255    }
256}
257impl From<crate::operation::disassociate_default_view::DisassociateDefaultViewError> for Error {
258    fn from(err: crate::operation::disassociate_default_view::DisassociateDefaultViewError) -> Self {
259        match err {
260            crate::operation::disassociate_default_view::DisassociateDefaultViewError::AccessDeniedException(inner) => {
261                Error::AccessDeniedException(inner)
262            }
263            crate::operation::disassociate_default_view::DisassociateDefaultViewError::InternalServerException(inner) => {
264                Error::InternalServerException(inner)
265            }
266            crate::operation::disassociate_default_view::DisassociateDefaultViewError::ResourceNotFoundException(inner) => {
267                Error::ResourceNotFoundException(inner)
268            }
269            crate::operation::disassociate_default_view::DisassociateDefaultViewError::ThrottlingException(inner) => {
270                Error::ThrottlingException(inner)
271            }
272            crate::operation::disassociate_default_view::DisassociateDefaultViewError::ValidationException(inner) => {
273                Error::ValidationException(inner)
274            }
275            crate::operation::disassociate_default_view::DisassociateDefaultViewError::Unhandled(inner) => Error::Unhandled(inner),
276        }
277    }
278}
279impl<R>
280    From<
281        ::aws_smithy_runtime_api::client::result::SdkError<
282            crate::operation::get_account_level_service_configuration::GetAccountLevelServiceConfigurationError,
283            R,
284        >,
285    > for Error
286where
287    R: Send + Sync + std::fmt::Debug + 'static,
288{
289    fn from(
290        err: ::aws_smithy_runtime_api::client::result::SdkError<
291            crate::operation::get_account_level_service_configuration::GetAccountLevelServiceConfigurationError,
292            R,
293        >,
294    ) -> Self {
295        match err {
296            ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
297            _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
298                meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
299                source: err.into(),
300            }),
301        }
302    }
303}
304impl From<crate::operation::get_account_level_service_configuration::GetAccountLevelServiceConfigurationError> for Error {
305    fn from(err: crate::operation::get_account_level_service_configuration::GetAccountLevelServiceConfigurationError) -> Self {
306        match err {
307            crate::operation::get_account_level_service_configuration::GetAccountLevelServiceConfigurationError::AccessDeniedException(inner) => {
308                Error::AccessDeniedException(inner)
309            }
310            crate::operation::get_account_level_service_configuration::GetAccountLevelServiceConfigurationError::InternalServerException(inner) => {
311                Error::InternalServerException(inner)
312            }
313            crate::operation::get_account_level_service_configuration::GetAccountLevelServiceConfigurationError::ResourceNotFoundException(inner) => {
314                Error::ResourceNotFoundException(inner)
315            }
316            crate::operation::get_account_level_service_configuration::GetAccountLevelServiceConfigurationError::ThrottlingException(inner) => {
317                Error::ThrottlingException(inner)
318            }
319            crate::operation::get_account_level_service_configuration::GetAccountLevelServiceConfigurationError::Unhandled(inner) => {
320                Error::Unhandled(inner)
321            }
322        }
323    }
324}
325impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::get_default_view::GetDefaultViewError, R>> for Error
326where
327    R: Send + Sync + std::fmt::Debug + 'static,
328{
329    fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::get_default_view::GetDefaultViewError, R>) -> Self {
330        match err {
331            ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
332            _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
333                meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
334                source: err.into(),
335            }),
336        }
337    }
338}
339impl From<crate::operation::get_default_view::GetDefaultViewError> for Error {
340    fn from(err: crate::operation::get_default_view::GetDefaultViewError) -> Self {
341        match err {
342            crate::operation::get_default_view::GetDefaultViewError::AccessDeniedException(inner) => Error::AccessDeniedException(inner),
343            crate::operation::get_default_view::GetDefaultViewError::InternalServerException(inner) => Error::InternalServerException(inner),
344            crate::operation::get_default_view::GetDefaultViewError::ResourceNotFoundException(inner) => Error::ResourceNotFoundException(inner),
345            crate::operation::get_default_view::GetDefaultViewError::ThrottlingException(inner) => Error::ThrottlingException(inner),
346            crate::operation::get_default_view::GetDefaultViewError::ValidationException(inner) => Error::ValidationException(inner),
347            crate::operation::get_default_view::GetDefaultViewError::Unhandled(inner) => Error::Unhandled(inner),
348        }
349    }
350}
351impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::get_index::GetIndexError, R>> for Error
352where
353    R: Send + Sync + std::fmt::Debug + 'static,
354{
355    fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::get_index::GetIndexError, R>) -> Self {
356        match err {
357            ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
358            _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
359                meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
360                source: err.into(),
361            }),
362        }
363    }
364}
365impl From<crate::operation::get_index::GetIndexError> for Error {
366    fn from(err: crate::operation::get_index::GetIndexError) -> Self {
367        match err {
368            crate::operation::get_index::GetIndexError::AccessDeniedException(inner) => Error::AccessDeniedException(inner),
369            crate::operation::get_index::GetIndexError::InternalServerException(inner) => Error::InternalServerException(inner),
370            crate::operation::get_index::GetIndexError::ResourceNotFoundException(inner) => Error::ResourceNotFoundException(inner),
371            crate::operation::get_index::GetIndexError::ThrottlingException(inner) => Error::ThrottlingException(inner),
372            crate::operation::get_index::GetIndexError::ValidationException(inner) => Error::ValidationException(inner),
373            crate::operation::get_index::GetIndexError::Unhandled(inner) => Error::Unhandled(inner),
374        }
375    }
376}
377impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::get_managed_view::GetManagedViewError, R>> for Error
378where
379    R: Send + Sync + std::fmt::Debug + 'static,
380{
381    fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::get_managed_view::GetManagedViewError, R>) -> Self {
382        match err {
383            ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
384            _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
385                meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
386                source: err.into(),
387            }),
388        }
389    }
390}
391impl From<crate::operation::get_managed_view::GetManagedViewError> for Error {
392    fn from(err: crate::operation::get_managed_view::GetManagedViewError) -> Self {
393        match err {
394            crate::operation::get_managed_view::GetManagedViewError::AccessDeniedException(inner) => Error::AccessDeniedException(inner),
395            crate::operation::get_managed_view::GetManagedViewError::InternalServerException(inner) => Error::InternalServerException(inner),
396            crate::operation::get_managed_view::GetManagedViewError::ResourceNotFoundException(inner) => Error::ResourceNotFoundException(inner),
397            crate::operation::get_managed_view::GetManagedViewError::ThrottlingException(inner) => Error::ThrottlingException(inner),
398            crate::operation::get_managed_view::GetManagedViewError::UnauthorizedException(inner) => Error::UnauthorizedException(inner),
399            crate::operation::get_managed_view::GetManagedViewError::ValidationException(inner) => Error::ValidationException(inner),
400            crate::operation::get_managed_view::GetManagedViewError::Unhandled(inner) => Error::Unhandled(inner),
401        }
402    }
403}
404impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::get_view::GetViewError, R>> for Error
405where
406    R: Send + Sync + std::fmt::Debug + 'static,
407{
408    fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::get_view::GetViewError, R>) -> Self {
409        match err {
410            ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
411            _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
412                meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
413                source: err.into(),
414            }),
415        }
416    }
417}
418impl From<crate::operation::get_view::GetViewError> for Error {
419    fn from(err: crate::operation::get_view::GetViewError) -> Self {
420        match err {
421            crate::operation::get_view::GetViewError::AccessDeniedException(inner) => Error::AccessDeniedException(inner),
422            crate::operation::get_view::GetViewError::InternalServerException(inner) => Error::InternalServerException(inner),
423            crate::operation::get_view::GetViewError::ResourceNotFoundException(inner) => Error::ResourceNotFoundException(inner),
424            crate::operation::get_view::GetViewError::ThrottlingException(inner) => Error::ThrottlingException(inner),
425            crate::operation::get_view::GetViewError::UnauthorizedException(inner) => Error::UnauthorizedException(inner),
426            crate::operation::get_view::GetViewError::ValidationException(inner) => Error::ValidationException(inner),
427            crate::operation::get_view::GetViewError::Unhandled(inner) => Error::Unhandled(inner),
428        }
429    }
430}
431impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::list_indexes::ListIndexesError, R>> for Error
432where
433    R: Send + Sync + std::fmt::Debug + 'static,
434{
435    fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::list_indexes::ListIndexesError, R>) -> Self {
436        match err {
437            ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
438            _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
439                meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
440                source: err.into(),
441            }),
442        }
443    }
444}
445impl From<crate::operation::list_indexes::ListIndexesError> for Error {
446    fn from(err: crate::operation::list_indexes::ListIndexesError) -> Self {
447        match err {
448            crate::operation::list_indexes::ListIndexesError::AccessDeniedException(inner) => Error::AccessDeniedException(inner),
449            crate::operation::list_indexes::ListIndexesError::InternalServerException(inner) => Error::InternalServerException(inner),
450            crate::operation::list_indexes::ListIndexesError::ThrottlingException(inner) => Error::ThrottlingException(inner),
451            crate::operation::list_indexes::ListIndexesError::ValidationException(inner) => Error::ValidationException(inner),
452            crate::operation::list_indexes::ListIndexesError::Unhandled(inner) => Error::Unhandled(inner),
453        }
454    }
455}
456impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::list_indexes_for_members::ListIndexesForMembersError, R>> for Error
457where
458    R: Send + Sync + std::fmt::Debug + 'static,
459{
460    fn from(
461        err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::list_indexes_for_members::ListIndexesForMembersError, R>,
462    ) -> Self {
463        match err {
464            ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
465            _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
466                meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
467                source: err.into(),
468            }),
469        }
470    }
471}
472impl From<crate::operation::list_indexes_for_members::ListIndexesForMembersError> for Error {
473    fn from(err: crate::operation::list_indexes_for_members::ListIndexesForMembersError) -> Self {
474        match err {
475            crate::operation::list_indexes_for_members::ListIndexesForMembersError::AccessDeniedException(inner) => {
476                Error::AccessDeniedException(inner)
477            }
478            crate::operation::list_indexes_for_members::ListIndexesForMembersError::InternalServerException(inner) => {
479                Error::InternalServerException(inner)
480            }
481            crate::operation::list_indexes_for_members::ListIndexesForMembersError::ThrottlingException(inner) => Error::ThrottlingException(inner),
482            crate::operation::list_indexes_for_members::ListIndexesForMembersError::ValidationException(inner) => Error::ValidationException(inner),
483            crate::operation::list_indexes_for_members::ListIndexesForMembersError::Unhandled(inner) => Error::Unhandled(inner),
484        }
485    }
486}
487impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::list_managed_views::ListManagedViewsError, R>> for Error
488where
489    R: Send + Sync + std::fmt::Debug + 'static,
490{
491    fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::list_managed_views::ListManagedViewsError, R>) -> Self {
492        match err {
493            ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
494            _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
495                meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
496                source: err.into(),
497            }),
498        }
499    }
500}
501impl From<crate::operation::list_managed_views::ListManagedViewsError> for Error {
502    fn from(err: crate::operation::list_managed_views::ListManagedViewsError) -> Self {
503        match err {
504            crate::operation::list_managed_views::ListManagedViewsError::AccessDeniedException(inner) => Error::AccessDeniedException(inner),
505            crate::operation::list_managed_views::ListManagedViewsError::InternalServerException(inner) => Error::InternalServerException(inner),
506            crate::operation::list_managed_views::ListManagedViewsError::ThrottlingException(inner) => Error::ThrottlingException(inner),
507            crate::operation::list_managed_views::ListManagedViewsError::UnauthorizedException(inner) => Error::UnauthorizedException(inner),
508            crate::operation::list_managed_views::ListManagedViewsError::ValidationException(inner) => Error::ValidationException(inner),
509            crate::operation::list_managed_views::ListManagedViewsError::Unhandled(inner) => Error::Unhandled(inner),
510        }
511    }
512}
513impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::list_resources::ListResourcesError, R>> for Error
514where
515    R: Send + Sync + std::fmt::Debug + 'static,
516{
517    fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::list_resources::ListResourcesError, R>) -> Self {
518        match err {
519            ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
520            _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
521                meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
522                source: err.into(),
523            }),
524        }
525    }
526}
527impl From<crate::operation::list_resources::ListResourcesError> for Error {
528    fn from(err: crate::operation::list_resources::ListResourcesError) -> Self {
529        match err {
530            crate::operation::list_resources::ListResourcesError::AccessDeniedException(inner) => Error::AccessDeniedException(inner),
531            crate::operation::list_resources::ListResourcesError::InternalServerException(inner) => Error::InternalServerException(inner),
532            crate::operation::list_resources::ListResourcesError::ResourceNotFoundException(inner) => Error::ResourceNotFoundException(inner),
533            crate::operation::list_resources::ListResourcesError::ThrottlingException(inner) => Error::ThrottlingException(inner),
534            crate::operation::list_resources::ListResourcesError::UnauthorizedException(inner) => Error::UnauthorizedException(inner),
535            crate::operation::list_resources::ListResourcesError::ValidationException(inner) => Error::ValidationException(inner),
536            crate::operation::list_resources::ListResourcesError::Unhandled(inner) => Error::Unhandled(inner),
537        }
538    }
539}
540impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::list_supported_resource_types::ListSupportedResourceTypesError, R>>
541    for Error
542where
543    R: Send + Sync + std::fmt::Debug + 'static,
544{
545    fn from(
546        err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::list_supported_resource_types::ListSupportedResourceTypesError, R>,
547    ) -> Self {
548        match err {
549            ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
550            _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
551                meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
552                source: err.into(),
553            }),
554        }
555    }
556}
557impl From<crate::operation::list_supported_resource_types::ListSupportedResourceTypesError> for Error {
558    fn from(err: crate::operation::list_supported_resource_types::ListSupportedResourceTypesError) -> Self {
559        match err {
560            crate::operation::list_supported_resource_types::ListSupportedResourceTypesError::AccessDeniedException(inner) => {
561                Error::AccessDeniedException(inner)
562            }
563            crate::operation::list_supported_resource_types::ListSupportedResourceTypesError::InternalServerException(inner) => {
564                Error::InternalServerException(inner)
565            }
566            crate::operation::list_supported_resource_types::ListSupportedResourceTypesError::ThrottlingException(inner) => {
567                Error::ThrottlingException(inner)
568            }
569            crate::operation::list_supported_resource_types::ListSupportedResourceTypesError::ValidationException(inner) => {
570                Error::ValidationException(inner)
571            }
572            crate::operation::list_supported_resource_types::ListSupportedResourceTypesError::Unhandled(inner) => Error::Unhandled(inner),
573        }
574    }
575}
576impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::list_tags_for_resource::ListTagsForResourceError, R>> for Error
577where
578    R: Send + Sync + std::fmt::Debug + 'static,
579{
580    fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::list_tags_for_resource::ListTagsForResourceError, R>) -> Self {
581        match err {
582            ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
583            _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
584                meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
585                source: err.into(),
586            }),
587        }
588    }
589}
590impl From<crate::operation::list_tags_for_resource::ListTagsForResourceError> for Error {
591    fn from(err: crate::operation::list_tags_for_resource::ListTagsForResourceError) -> Self {
592        match err {
593            crate::operation::list_tags_for_resource::ListTagsForResourceError::AccessDeniedException(inner) => Error::AccessDeniedException(inner),
594            crate::operation::list_tags_for_resource::ListTagsForResourceError::InternalServerException(inner) => {
595                Error::InternalServerException(inner)
596            }
597            crate::operation::list_tags_for_resource::ListTagsForResourceError::ResourceNotFoundException(inner) => {
598                Error::ResourceNotFoundException(inner)
599            }
600            crate::operation::list_tags_for_resource::ListTagsForResourceError::ThrottlingException(inner) => Error::ThrottlingException(inner),
601            crate::operation::list_tags_for_resource::ListTagsForResourceError::UnauthorizedException(inner) => Error::UnauthorizedException(inner),
602            crate::operation::list_tags_for_resource::ListTagsForResourceError::ValidationException(inner) => Error::ValidationException(inner),
603            crate::operation::list_tags_for_resource::ListTagsForResourceError::Unhandled(inner) => Error::Unhandled(inner),
604        }
605    }
606}
607impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::list_views::ListViewsError, R>> for Error
608where
609    R: Send + Sync + std::fmt::Debug + 'static,
610{
611    fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::list_views::ListViewsError, R>) -> Self {
612        match err {
613            ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
614            _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
615                meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
616                source: err.into(),
617            }),
618        }
619    }
620}
621impl From<crate::operation::list_views::ListViewsError> for Error {
622    fn from(err: crate::operation::list_views::ListViewsError) -> Self {
623        match err {
624            crate::operation::list_views::ListViewsError::AccessDeniedException(inner) => Error::AccessDeniedException(inner),
625            crate::operation::list_views::ListViewsError::InternalServerException(inner) => Error::InternalServerException(inner),
626            crate::operation::list_views::ListViewsError::ThrottlingException(inner) => Error::ThrottlingException(inner),
627            crate::operation::list_views::ListViewsError::ValidationException(inner) => Error::ValidationException(inner),
628            crate::operation::list_views::ListViewsError::Unhandled(inner) => Error::Unhandled(inner),
629        }
630    }
631}
632impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::search::SearchError, R>> for Error
633where
634    R: Send + Sync + std::fmt::Debug + 'static,
635{
636    fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::search::SearchError, R>) -> Self {
637        match err {
638            ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
639            _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
640                meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
641                source: err.into(),
642            }),
643        }
644    }
645}
646impl From<crate::operation::search::SearchError> for Error {
647    fn from(err: crate::operation::search::SearchError) -> Self {
648        match err {
649            crate::operation::search::SearchError::AccessDeniedException(inner) => Error::AccessDeniedException(inner),
650            crate::operation::search::SearchError::InternalServerException(inner) => Error::InternalServerException(inner),
651            crate::operation::search::SearchError::ResourceNotFoundException(inner) => Error::ResourceNotFoundException(inner),
652            crate::operation::search::SearchError::ThrottlingException(inner) => Error::ThrottlingException(inner),
653            crate::operation::search::SearchError::UnauthorizedException(inner) => Error::UnauthorizedException(inner),
654            crate::operation::search::SearchError::ValidationException(inner) => Error::ValidationException(inner),
655            crate::operation::search::SearchError::Unhandled(inner) => Error::Unhandled(inner),
656        }
657    }
658}
659impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::tag_resource::TagResourceError, R>> for Error
660where
661    R: Send + Sync + std::fmt::Debug + 'static,
662{
663    fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::tag_resource::TagResourceError, R>) -> Self {
664        match err {
665            ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
666            _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
667                meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
668                source: err.into(),
669            }),
670        }
671    }
672}
673impl From<crate::operation::tag_resource::TagResourceError> for Error {
674    fn from(err: crate::operation::tag_resource::TagResourceError) -> Self {
675        match err {
676            crate::operation::tag_resource::TagResourceError::AccessDeniedException(inner) => Error::AccessDeniedException(inner),
677            crate::operation::tag_resource::TagResourceError::ConflictException(inner) => Error::ConflictException(inner),
678            crate::operation::tag_resource::TagResourceError::InternalServerException(inner) => Error::InternalServerException(inner),
679            crate::operation::tag_resource::TagResourceError::ThrottlingException(inner) => Error::ThrottlingException(inner),
680            crate::operation::tag_resource::TagResourceError::UnauthorizedException(inner) => Error::UnauthorizedException(inner),
681            crate::operation::tag_resource::TagResourceError::ValidationException(inner) => Error::ValidationException(inner),
682            crate::operation::tag_resource::TagResourceError::Unhandled(inner) => Error::Unhandled(inner),
683        }
684    }
685}
686impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::untag_resource::UntagResourceError, R>> for Error
687where
688    R: Send + Sync + std::fmt::Debug + 'static,
689{
690    fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::untag_resource::UntagResourceError, R>) -> Self {
691        match err {
692            ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
693            _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
694                meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
695                source: err.into(),
696            }),
697        }
698    }
699}
700impl From<crate::operation::untag_resource::UntagResourceError> for Error {
701    fn from(err: crate::operation::untag_resource::UntagResourceError) -> Self {
702        match err {
703            crate::operation::untag_resource::UntagResourceError::AccessDeniedException(inner) => Error::AccessDeniedException(inner),
704            crate::operation::untag_resource::UntagResourceError::InternalServerException(inner) => Error::InternalServerException(inner),
705            crate::operation::untag_resource::UntagResourceError::ResourceNotFoundException(inner) => Error::ResourceNotFoundException(inner),
706            crate::operation::untag_resource::UntagResourceError::ThrottlingException(inner) => Error::ThrottlingException(inner),
707            crate::operation::untag_resource::UntagResourceError::UnauthorizedException(inner) => Error::UnauthorizedException(inner),
708            crate::operation::untag_resource::UntagResourceError::ValidationException(inner) => Error::ValidationException(inner),
709            crate::operation::untag_resource::UntagResourceError::Unhandled(inner) => Error::Unhandled(inner),
710        }
711    }
712}
713impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::update_index_type::UpdateIndexTypeError, R>> for Error
714where
715    R: Send + Sync + std::fmt::Debug + 'static,
716{
717    fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::update_index_type::UpdateIndexTypeError, R>) -> Self {
718        match err {
719            ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
720            _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
721                meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
722                source: err.into(),
723            }),
724        }
725    }
726}
727impl From<crate::operation::update_index_type::UpdateIndexTypeError> for Error {
728    fn from(err: crate::operation::update_index_type::UpdateIndexTypeError) -> Self {
729        match err {
730            crate::operation::update_index_type::UpdateIndexTypeError::AccessDeniedException(inner) => Error::AccessDeniedException(inner),
731            crate::operation::update_index_type::UpdateIndexTypeError::ConflictException(inner) => Error::ConflictException(inner),
732            crate::operation::update_index_type::UpdateIndexTypeError::InternalServerException(inner) => Error::InternalServerException(inner),
733            crate::operation::update_index_type::UpdateIndexTypeError::ResourceNotFoundException(inner) => Error::ResourceNotFoundException(inner),
734            crate::operation::update_index_type::UpdateIndexTypeError::ServiceQuotaExceededException(inner) => {
735                Error::ServiceQuotaExceededException(inner)
736            }
737            crate::operation::update_index_type::UpdateIndexTypeError::ThrottlingException(inner) => Error::ThrottlingException(inner),
738            crate::operation::update_index_type::UpdateIndexTypeError::ValidationException(inner) => Error::ValidationException(inner),
739            crate::operation::update_index_type::UpdateIndexTypeError::Unhandled(inner) => Error::Unhandled(inner),
740        }
741    }
742}
743impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::update_view::UpdateViewError, R>> for Error
744where
745    R: Send + Sync + std::fmt::Debug + 'static,
746{
747    fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::update_view::UpdateViewError, R>) -> Self {
748        match err {
749            ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
750            _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
751                meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
752                source: err.into(),
753            }),
754        }
755    }
756}
757impl From<crate::operation::update_view::UpdateViewError> for Error {
758    fn from(err: crate::operation::update_view::UpdateViewError) -> Self {
759        match err {
760            crate::operation::update_view::UpdateViewError::AccessDeniedException(inner) => Error::AccessDeniedException(inner),
761            crate::operation::update_view::UpdateViewError::InternalServerException(inner) => Error::InternalServerException(inner),
762            crate::operation::update_view::UpdateViewError::ServiceQuotaExceededException(inner) => Error::ServiceQuotaExceededException(inner),
763            crate::operation::update_view::UpdateViewError::ThrottlingException(inner) => Error::ThrottlingException(inner),
764            crate::operation::update_view::UpdateViewError::UnauthorizedException(inner) => Error::UnauthorizedException(inner),
765            crate::operation::update_view::UpdateViewError::ValidationException(inner) => Error::ValidationException(inner),
766            crate::operation::update_view::UpdateViewError::Unhandled(inner) => Error::Unhandled(inner),
767        }
768    }
769}
770impl ::std::error::Error for Error {
771    fn source(&self) -> std::option::Option<&(dyn ::std::error::Error + 'static)> {
772        match self {
773            Error::AccessDeniedException(inner) => inner.source(),
774            Error::ConflictException(inner) => inner.source(),
775            Error::InternalServerException(inner) => inner.source(),
776            Error::ResourceNotFoundException(inner) => inner.source(),
777            Error::ServiceQuotaExceededException(inner) => inner.source(),
778            Error::ThrottlingException(inner) => inner.source(),
779            Error::UnauthorizedException(inner) => inner.source(),
780            Error::ValidationException(inner) => inner.source(),
781            Error::Unhandled(inner) => ::std::option::Option::Some(&*inner.source),
782        }
783    }
784}
785impl ::aws_types::request_id::RequestId for Error {
786    fn request_id(&self) -> Option<&str> {
787        match self {
788            Self::AccessDeniedException(e) => e.request_id(),
789            Self::ConflictException(e) => e.request_id(),
790            Self::InternalServerException(e) => e.request_id(),
791            Self::ResourceNotFoundException(e) => e.request_id(),
792            Self::ServiceQuotaExceededException(e) => e.request_id(),
793            Self::ThrottlingException(e) => e.request_id(),
794            Self::UnauthorizedException(e) => e.request_id(),
795            Self::ValidationException(e) => e.request_id(),
796            Self::Unhandled(e) => e.meta.request_id(),
797        }
798    }
799}