aws_sdk_opensearchserverless/
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>When creating a resource, thrown when a resource with the same name already exists or is being created. When deleting a resource, thrown when the resource is not in the ACTIVE or FAILED state.</p>
7    ConflictException(crate::types::error::ConflictException),
8    /// <p>Thrown when an error internal to the service occurs while processing a request.</p>
9    InternalServerException(crate::types::error::InternalServerException),
10    /// <p>Thrown when the collection you're attempting to create results in a number of search or indexing OCUs that exceeds the account limit.</p>
11    OcuLimitExceededException(crate::types::error::OcuLimitExceededException),
12    /// <p>Thrown when accessing or deleting a resource that does not exist.</p>
13    ResourceNotFoundException(crate::types::error::ResourceNotFoundException),
14    /// <p>Thrown when you attempt to create more resources than the service allows based on service quotas.</p>
15    ServiceQuotaExceededException(crate::types::error::ServiceQuotaExceededException),
16    /// <p>Thrown when the HTTP request contains invalid input or is missing required input.</p>
17    ValidationException(crate::types::error::ValidationException),
18    /// An unexpected error occurred (e.g., invalid JSON returned by the service or an unknown error code).
19    #[deprecated(note = "Matching `Unhandled` directly is not forwards compatible. Instead, match using a \
20    variable wildcard pattern and check `.code()`:
21     \
22    &nbsp;&nbsp;&nbsp;`err if err.code() == Some(\"SpecificExceptionCode\") => { /* handle the error */ }`
23     \
24    See [`ProvideErrorMetadata`](#impl-ProvideErrorMetadata-for-Error) for what information is available for the error.")]
25    Unhandled(crate::error::sealed_unhandled::Unhandled),
26}
27impl ::std::fmt::Display for Error {
28    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
29        match self {
30            Error::ConflictException(inner) => inner.fmt(f),
31            Error::InternalServerException(inner) => inner.fmt(f),
32            Error::OcuLimitExceededException(inner) => inner.fmt(f),
33            Error::ResourceNotFoundException(inner) => inner.fmt(f),
34            Error::ServiceQuotaExceededException(inner) => inner.fmt(f),
35            Error::ValidationException(inner) => inner.fmt(f),
36            Error::Unhandled(_) => {
37                if let ::std::option::Option::Some(code) = ::aws_smithy_types::error::metadata::ProvideErrorMetadata::code(self) {
38                    write!(f, "unhandled error ({code})")
39                } else {
40                    f.write_str("unhandled error")
41                }
42            }
43        }
44    }
45}
46impl From<::aws_smithy_types::error::operation::BuildError> for Error {
47    fn from(value: ::aws_smithy_types::error::operation::BuildError) -> Self {
48        Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
49            source: value.into(),
50            meta: ::std::default::Default::default(),
51        })
52    }
53}
54impl ::aws_smithy_types::error::metadata::ProvideErrorMetadata for Error {
55    fn meta(&self) -> &::aws_smithy_types::error::metadata::ErrorMetadata {
56        match self {
57            Self::ConflictException(inner) => inner.meta(),
58            Self::InternalServerException(inner) => inner.meta(),
59            Self::OcuLimitExceededException(inner) => inner.meta(),
60            Self::ResourceNotFoundException(inner) => inner.meta(),
61            Self::ServiceQuotaExceededException(inner) => inner.meta(),
62            Self::ValidationException(inner) => inner.meta(),
63            Self::Unhandled(inner) => &inner.meta,
64        }
65    }
66}
67impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::batch_get_collection::BatchGetCollectionError, R>> for Error
68where
69    R: Send + Sync + std::fmt::Debug + 'static,
70{
71    fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::batch_get_collection::BatchGetCollectionError, R>) -> Self {
72        match err {
73            ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
74            _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
75                meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
76                source: err.into(),
77            }),
78        }
79    }
80}
81impl From<crate::operation::batch_get_collection::BatchGetCollectionError> for Error {
82    fn from(err: crate::operation::batch_get_collection::BatchGetCollectionError) -> Self {
83        match err {
84            crate::operation::batch_get_collection::BatchGetCollectionError::InternalServerException(inner) => Error::InternalServerException(inner),
85            crate::operation::batch_get_collection::BatchGetCollectionError::ValidationException(inner) => Error::ValidationException(inner),
86            crate::operation::batch_get_collection::BatchGetCollectionError::Unhandled(inner) => Error::Unhandled(inner),
87        }
88    }
89}
90impl<R>
91    From<
92        ::aws_smithy_runtime_api::client::result::SdkError<
93            crate::operation::batch_get_effective_lifecycle_policy::BatchGetEffectiveLifecyclePolicyError,
94            R,
95        >,
96    > for Error
97where
98    R: Send + Sync + std::fmt::Debug + 'static,
99{
100    fn from(
101        err: ::aws_smithy_runtime_api::client::result::SdkError<
102            crate::operation::batch_get_effective_lifecycle_policy::BatchGetEffectiveLifecyclePolicyError,
103            R,
104        >,
105    ) -> Self {
106        match err {
107            ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
108            _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
109                meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
110                source: err.into(),
111            }),
112        }
113    }
114}
115impl From<crate::operation::batch_get_effective_lifecycle_policy::BatchGetEffectiveLifecyclePolicyError> for Error {
116    fn from(err: crate::operation::batch_get_effective_lifecycle_policy::BatchGetEffectiveLifecyclePolicyError) -> Self {
117        match err {
118            crate::operation::batch_get_effective_lifecycle_policy::BatchGetEffectiveLifecyclePolicyError::InternalServerException(inner) => {
119                Error::InternalServerException(inner)
120            }
121            crate::operation::batch_get_effective_lifecycle_policy::BatchGetEffectiveLifecyclePolicyError::ValidationException(inner) => {
122                Error::ValidationException(inner)
123            }
124            crate::operation::batch_get_effective_lifecycle_policy::BatchGetEffectiveLifecyclePolicyError::Unhandled(inner) => {
125                Error::Unhandled(inner)
126            }
127        }
128    }
129}
130impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::batch_get_lifecycle_policy::BatchGetLifecyclePolicyError, R>>
131    for Error
132where
133    R: Send + Sync + std::fmt::Debug + 'static,
134{
135    fn from(
136        err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::batch_get_lifecycle_policy::BatchGetLifecyclePolicyError, R>,
137    ) -> 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::batch_get_lifecycle_policy::BatchGetLifecyclePolicyError> for Error {
148    fn from(err: crate::operation::batch_get_lifecycle_policy::BatchGetLifecyclePolicyError) -> Self {
149        match err {
150            crate::operation::batch_get_lifecycle_policy::BatchGetLifecyclePolicyError::InternalServerException(inner) => {
151                Error::InternalServerException(inner)
152            }
153            crate::operation::batch_get_lifecycle_policy::BatchGetLifecyclePolicyError::ValidationException(inner) => {
154                Error::ValidationException(inner)
155            }
156            crate::operation::batch_get_lifecycle_policy::BatchGetLifecyclePolicyError::Unhandled(inner) => Error::Unhandled(inner),
157        }
158    }
159}
160impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::batch_get_vpc_endpoint::BatchGetVpcEndpointError, R>> for Error
161where
162    R: Send + Sync + std::fmt::Debug + 'static,
163{
164    fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::batch_get_vpc_endpoint::BatchGetVpcEndpointError, R>) -> Self {
165        match err {
166            ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
167            _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
168                meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
169                source: err.into(),
170            }),
171        }
172    }
173}
174impl From<crate::operation::batch_get_vpc_endpoint::BatchGetVpcEndpointError> for Error {
175    fn from(err: crate::operation::batch_get_vpc_endpoint::BatchGetVpcEndpointError) -> Self {
176        match err {
177            crate::operation::batch_get_vpc_endpoint::BatchGetVpcEndpointError::InternalServerException(inner) => {
178                Error::InternalServerException(inner)
179            }
180            crate::operation::batch_get_vpc_endpoint::BatchGetVpcEndpointError::ValidationException(inner) => Error::ValidationException(inner),
181            crate::operation::batch_get_vpc_endpoint::BatchGetVpcEndpointError::Unhandled(inner) => Error::Unhandled(inner),
182        }
183    }
184}
185impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::create_access_policy::CreateAccessPolicyError, R>> for Error
186where
187    R: Send + Sync + std::fmt::Debug + 'static,
188{
189    fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::create_access_policy::CreateAccessPolicyError, R>) -> Self {
190        match err {
191            ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
192            _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
193                meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
194                source: err.into(),
195            }),
196        }
197    }
198}
199impl From<crate::operation::create_access_policy::CreateAccessPolicyError> for Error {
200    fn from(err: crate::operation::create_access_policy::CreateAccessPolicyError) -> Self {
201        match err {
202            crate::operation::create_access_policy::CreateAccessPolicyError::ConflictException(inner) => Error::ConflictException(inner),
203            crate::operation::create_access_policy::CreateAccessPolicyError::InternalServerException(inner) => Error::InternalServerException(inner),
204            crate::operation::create_access_policy::CreateAccessPolicyError::ServiceQuotaExceededException(inner) => {
205                Error::ServiceQuotaExceededException(inner)
206            }
207            crate::operation::create_access_policy::CreateAccessPolicyError::ValidationException(inner) => Error::ValidationException(inner),
208            crate::operation::create_access_policy::CreateAccessPolicyError::Unhandled(inner) => Error::Unhandled(inner),
209        }
210    }
211}
212impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::create_collection::CreateCollectionError, R>> for Error
213where
214    R: Send + Sync + std::fmt::Debug + 'static,
215{
216    fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::create_collection::CreateCollectionError, R>) -> Self {
217        match err {
218            ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
219            _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
220                meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
221                source: err.into(),
222            }),
223        }
224    }
225}
226impl From<crate::operation::create_collection::CreateCollectionError> for Error {
227    fn from(err: crate::operation::create_collection::CreateCollectionError) -> Self {
228        match err {
229            crate::operation::create_collection::CreateCollectionError::ConflictException(inner) => Error::ConflictException(inner),
230            crate::operation::create_collection::CreateCollectionError::InternalServerException(inner) => Error::InternalServerException(inner),
231            crate::operation::create_collection::CreateCollectionError::OcuLimitExceededException(inner) => Error::OcuLimitExceededException(inner),
232            crate::operation::create_collection::CreateCollectionError::ServiceQuotaExceededException(inner) => {
233                Error::ServiceQuotaExceededException(inner)
234            }
235            crate::operation::create_collection::CreateCollectionError::ValidationException(inner) => Error::ValidationException(inner),
236            crate::operation::create_collection::CreateCollectionError::Unhandled(inner) => Error::Unhandled(inner),
237        }
238    }
239}
240impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::create_index::CreateIndexError, R>> for Error
241where
242    R: Send + Sync + std::fmt::Debug + 'static,
243{
244    fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::create_index::CreateIndexError, R>) -> Self {
245        match err {
246            ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
247            _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
248                meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
249                source: err.into(),
250            }),
251        }
252    }
253}
254impl From<crate::operation::create_index::CreateIndexError> for Error {
255    fn from(err: crate::operation::create_index::CreateIndexError) -> Self {
256        match err {
257            crate::operation::create_index::CreateIndexError::ConflictException(inner) => Error::ConflictException(inner),
258            crate::operation::create_index::CreateIndexError::InternalServerException(inner) => Error::InternalServerException(inner),
259            crate::operation::create_index::CreateIndexError::ResourceNotFoundException(inner) => Error::ResourceNotFoundException(inner),
260            crate::operation::create_index::CreateIndexError::ValidationException(inner) => Error::ValidationException(inner),
261            crate::operation::create_index::CreateIndexError::Unhandled(inner) => Error::Unhandled(inner),
262        }
263    }
264}
265impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::create_lifecycle_policy::CreateLifecyclePolicyError, R>> for Error
266where
267    R: Send + Sync + std::fmt::Debug + 'static,
268{
269    fn from(
270        err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::create_lifecycle_policy::CreateLifecyclePolicyError, R>,
271    ) -> Self {
272        match err {
273            ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
274            _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
275                meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
276                source: err.into(),
277            }),
278        }
279    }
280}
281impl From<crate::operation::create_lifecycle_policy::CreateLifecyclePolicyError> for Error {
282    fn from(err: crate::operation::create_lifecycle_policy::CreateLifecyclePolicyError) -> Self {
283        match err {
284            crate::operation::create_lifecycle_policy::CreateLifecyclePolicyError::ConflictException(inner) => Error::ConflictException(inner),
285            crate::operation::create_lifecycle_policy::CreateLifecyclePolicyError::InternalServerException(inner) => {
286                Error::InternalServerException(inner)
287            }
288            crate::operation::create_lifecycle_policy::CreateLifecyclePolicyError::ServiceQuotaExceededException(inner) => {
289                Error::ServiceQuotaExceededException(inner)
290            }
291            crate::operation::create_lifecycle_policy::CreateLifecyclePolicyError::ValidationException(inner) => Error::ValidationException(inner),
292            crate::operation::create_lifecycle_policy::CreateLifecyclePolicyError::Unhandled(inner) => Error::Unhandled(inner),
293        }
294    }
295}
296impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::create_security_config::CreateSecurityConfigError, R>> for Error
297where
298    R: Send + Sync + std::fmt::Debug + 'static,
299{
300    fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::create_security_config::CreateSecurityConfigError, R>) -> Self {
301        match err {
302            ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
303            _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
304                meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
305                source: err.into(),
306            }),
307        }
308    }
309}
310impl From<crate::operation::create_security_config::CreateSecurityConfigError> for Error {
311    fn from(err: crate::operation::create_security_config::CreateSecurityConfigError) -> Self {
312        match err {
313            crate::operation::create_security_config::CreateSecurityConfigError::ConflictException(inner) => Error::ConflictException(inner),
314            crate::operation::create_security_config::CreateSecurityConfigError::InternalServerException(inner) => {
315                Error::InternalServerException(inner)
316            }
317            crate::operation::create_security_config::CreateSecurityConfigError::ServiceQuotaExceededException(inner) => {
318                Error::ServiceQuotaExceededException(inner)
319            }
320            crate::operation::create_security_config::CreateSecurityConfigError::ValidationException(inner) => Error::ValidationException(inner),
321            crate::operation::create_security_config::CreateSecurityConfigError::Unhandled(inner) => Error::Unhandled(inner),
322        }
323    }
324}
325impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::create_security_policy::CreateSecurityPolicyError, 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::create_security_policy::CreateSecurityPolicyError, 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::create_security_policy::CreateSecurityPolicyError> for Error {
340    fn from(err: crate::operation::create_security_policy::CreateSecurityPolicyError) -> Self {
341        match err {
342            crate::operation::create_security_policy::CreateSecurityPolicyError::ConflictException(inner) => Error::ConflictException(inner),
343            crate::operation::create_security_policy::CreateSecurityPolicyError::InternalServerException(inner) => {
344                Error::InternalServerException(inner)
345            }
346            crate::operation::create_security_policy::CreateSecurityPolicyError::ServiceQuotaExceededException(inner) => {
347                Error::ServiceQuotaExceededException(inner)
348            }
349            crate::operation::create_security_policy::CreateSecurityPolicyError::ValidationException(inner) => Error::ValidationException(inner),
350            crate::operation::create_security_policy::CreateSecurityPolicyError::Unhandled(inner) => Error::Unhandled(inner),
351        }
352    }
353}
354impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::create_vpc_endpoint::CreateVpcEndpointError, R>> for Error
355where
356    R: Send + Sync + std::fmt::Debug + 'static,
357{
358    fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::create_vpc_endpoint::CreateVpcEndpointError, R>) -> Self {
359        match err {
360            ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
361            _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
362                meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
363                source: err.into(),
364            }),
365        }
366    }
367}
368impl From<crate::operation::create_vpc_endpoint::CreateVpcEndpointError> for Error {
369    fn from(err: crate::operation::create_vpc_endpoint::CreateVpcEndpointError) -> Self {
370        match err {
371            crate::operation::create_vpc_endpoint::CreateVpcEndpointError::ConflictException(inner) => Error::ConflictException(inner),
372            crate::operation::create_vpc_endpoint::CreateVpcEndpointError::InternalServerException(inner) => Error::InternalServerException(inner),
373            crate::operation::create_vpc_endpoint::CreateVpcEndpointError::ServiceQuotaExceededException(inner) => {
374                Error::ServiceQuotaExceededException(inner)
375            }
376            crate::operation::create_vpc_endpoint::CreateVpcEndpointError::ValidationException(inner) => Error::ValidationException(inner),
377            crate::operation::create_vpc_endpoint::CreateVpcEndpointError::Unhandled(inner) => Error::Unhandled(inner),
378        }
379    }
380}
381impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::delete_access_policy::DeleteAccessPolicyError, R>> for Error
382where
383    R: Send + Sync + std::fmt::Debug + 'static,
384{
385    fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::delete_access_policy::DeleteAccessPolicyError, R>) -> Self {
386        match err {
387            ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
388            _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
389                meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
390                source: err.into(),
391            }),
392        }
393    }
394}
395impl From<crate::operation::delete_access_policy::DeleteAccessPolicyError> for Error {
396    fn from(err: crate::operation::delete_access_policy::DeleteAccessPolicyError) -> Self {
397        match err {
398            crate::operation::delete_access_policy::DeleteAccessPolicyError::ConflictException(inner) => Error::ConflictException(inner),
399            crate::operation::delete_access_policy::DeleteAccessPolicyError::InternalServerException(inner) => Error::InternalServerException(inner),
400            crate::operation::delete_access_policy::DeleteAccessPolicyError::ResourceNotFoundException(inner) => {
401                Error::ResourceNotFoundException(inner)
402            }
403            crate::operation::delete_access_policy::DeleteAccessPolicyError::ValidationException(inner) => Error::ValidationException(inner),
404            crate::operation::delete_access_policy::DeleteAccessPolicyError::Unhandled(inner) => Error::Unhandled(inner),
405        }
406    }
407}
408impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::delete_collection::DeleteCollectionError, R>> for Error
409where
410    R: Send + Sync + std::fmt::Debug + 'static,
411{
412    fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::delete_collection::DeleteCollectionError, R>) -> Self {
413        match err {
414            ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
415            _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
416                meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
417                source: err.into(),
418            }),
419        }
420    }
421}
422impl From<crate::operation::delete_collection::DeleteCollectionError> for Error {
423    fn from(err: crate::operation::delete_collection::DeleteCollectionError) -> Self {
424        match err {
425            crate::operation::delete_collection::DeleteCollectionError::ConflictException(inner) => Error::ConflictException(inner),
426            crate::operation::delete_collection::DeleteCollectionError::InternalServerException(inner) => Error::InternalServerException(inner),
427            crate::operation::delete_collection::DeleteCollectionError::ResourceNotFoundException(inner) => Error::ResourceNotFoundException(inner),
428            crate::operation::delete_collection::DeleteCollectionError::ValidationException(inner) => Error::ValidationException(inner),
429            crate::operation::delete_collection::DeleteCollectionError::Unhandled(inner) => Error::Unhandled(inner),
430        }
431    }
432}
433impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::delete_index::DeleteIndexError, R>> for Error
434where
435    R: Send + Sync + std::fmt::Debug + 'static,
436{
437    fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::delete_index::DeleteIndexError, R>) -> Self {
438        match err {
439            ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
440            _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
441                meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
442                source: err.into(),
443            }),
444        }
445    }
446}
447impl From<crate::operation::delete_index::DeleteIndexError> for Error {
448    fn from(err: crate::operation::delete_index::DeleteIndexError) -> Self {
449        match err {
450            crate::operation::delete_index::DeleteIndexError::InternalServerException(inner) => Error::InternalServerException(inner),
451            crate::operation::delete_index::DeleteIndexError::ResourceNotFoundException(inner) => Error::ResourceNotFoundException(inner),
452            crate::operation::delete_index::DeleteIndexError::ValidationException(inner) => Error::ValidationException(inner),
453            crate::operation::delete_index::DeleteIndexError::Unhandled(inner) => Error::Unhandled(inner),
454        }
455    }
456}
457impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::delete_lifecycle_policy::DeleteLifecyclePolicyError, R>> for Error
458where
459    R: Send + Sync + std::fmt::Debug + 'static,
460{
461    fn from(
462        err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::delete_lifecycle_policy::DeleteLifecyclePolicyError, R>,
463    ) -> Self {
464        match err {
465            ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
466            _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
467                meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
468                source: err.into(),
469            }),
470        }
471    }
472}
473impl From<crate::operation::delete_lifecycle_policy::DeleteLifecyclePolicyError> for Error {
474    fn from(err: crate::operation::delete_lifecycle_policy::DeleteLifecyclePolicyError) -> Self {
475        match err {
476            crate::operation::delete_lifecycle_policy::DeleteLifecyclePolicyError::ConflictException(inner) => Error::ConflictException(inner),
477            crate::operation::delete_lifecycle_policy::DeleteLifecyclePolicyError::InternalServerException(inner) => {
478                Error::InternalServerException(inner)
479            }
480            crate::operation::delete_lifecycle_policy::DeleteLifecyclePolicyError::ResourceNotFoundException(inner) => {
481                Error::ResourceNotFoundException(inner)
482            }
483            crate::operation::delete_lifecycle_policy::DeleteLifecyclePolicyError::ValidationException(inner) => Error::ValidationException(inner),
484            crate::operation::delete_lifecycle_policy::DeleteLifecyclePolicyError::Unhandled(inner) => Error::Unhandled(inner),
485        }
486    }
487}
488impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::delete_security_config::DeleteSecurityConfigError, R>> for Error
489where
490    R: Send + Sync + std::fmt::Debug + 'static,
491{
492    fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::delete_security_config::DeleteSecurityConfigError, R>) -> Self {
493        match err {
494            ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
495            _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
496                meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
497                source: err.into(),
498            }),
499        }
500    }
501}
502impl From<crate::operation::delete_security_config::DeleteSecurityConfigError> for Error {
503    fn from(err: crate::operation::delete_security_config::DeleteSecurityConfigError) -> Self {
504        match err {
505            crate::operation::delete_security_config::DeleteSecurityConfigError::ConflictException(inner) => Error::ConflictException(inner),
506            crate::operation::delete_security_config::DeleteSecurityConfigError::InternalServerException(inner) => {
507                Error::InternalServerException(inner)
508            }
509            crate::operation::delete_security_config::DeleteSecurityConfigError::ResourceNotFoundException(inner) => {
510                Error::ResourceNotFoundException(inner)
511            }
512            crate::operation::delete_security_config::DeleteSecurityConfigError::ValidationException(inner) => Error::ValidationException(inner),
513            crate::operation::delete_security_config::DeleteSecurityConfigError::Unhandled(inner) => Error::Unhandled(inner),
514        }
515    }
516}
517impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::delete_security_policy::DeleteSecurityPolicyError, R>> for Error
518where
519    R: Send + Sync + std::fmt::Debug + 'static,
520{
521    fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::delete_security_policy::DeleteSecurityPolicyError, R>) -> Self {
522        match err {
523            ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
524            _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
525                meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
526                source: err.into(),
527            }),
528        }
529    }
530}
531impl From<crate::operation::delete_security_policy::DeleteSecurityPolicyError> for Error {
532    fn from(err: crate::operation::delete_security_policy::DeleteSecurityPolicyError) -> Self {
533        match err {
534            crate::operation::delete_security_policy::DeleteSecurityPolicyError::ConflictException(inner) => Error::ConflictException(inner),
535            crate::operation::delete_security_policy::DeleteSecurityPolicyError::InternalServerException(inner) => {
536                Error::InternalServerException(inner)
537            }
538            crate::operation::delete_security_policy::DeleteSecurityPolicyError::ResourceNotFoundException(inner) => {
539                Error::ResourceNotFoundException(inner)
540            }
541            crate::operation::delete_security_policy::DeleteSecurityPolicyError::ValidationException(inner) => Error::ValidationException(inner),
542            crate::operation::delete_security_policy::DeleteSecurityPolicyError::Unhandled(inner) => Error::Unhandled(inner),
543        }
544    }
545}
546impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::delete_vpc_endpoint::DeleteVpcEndpointError, 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::delete_vpc_endpoint::DeleteVpcEndpointError, 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::delete_vpc_endpoint::DeleteVpcEndpointError> for Error {
561    fn from(err: crate::operation::delete_vpc_endpoint::DeleteVpcEndpointError) -> Self {
562        match err {
563            crate::operation::delete_vpc_endpoint::DeleteVpcEndpointError::ConflictException(inner) => Error::ConflictException(inner),
564            crate::operation::delete_vpc_endpoint::DeleteVpcEndpointError::InternalServerException(inner) => Error::InternalServerException(inner),
565            crate::operation::delete_vpc_endpoint::DeleteVpcEndpointError::ResourceNotFoundException(inner) => {
566                Error::ResourceNotFoundException(inner)
567            }
568            crate::operation::delete_vpc_endpoint::DeleteVpcEndpointError::ValidationException(inner) => Error::ValidationException(inner),
569            crate::operation::delete_vpc_endpoint::DeleteVpcEndpointError::Unhandled(inner) => Error::Unhandled(inner),
570        }
571    }
572}
573impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::get_access_policy::GetAccessPolicyError, 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::get_access_policy::GetAccessPolicyError, 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::get_access_policy::GetAccessPolicyError> for Error {
588    fn from(err: crate::operation::get_access_policy::GetAccessPolicyError) -> Self {
589        match err {
590            crate::operation::get_access_policy::GetAccessPolicyError::InternalServerException(inner) => Error::InternalServerException(inner),
591            crate::operation::get_access_policy::GetAccessPolicyError::ResourceNotFoundException(inner) => Error::ResourceNotFoundException(inner),
592            crate::operation::get_access_policy::GetAccessPolicyError::ValidationException(inner) => Error::ValidationException(inner),
593            crate::operation::get_access_policy::GetAccessPolicyError::Unhandled(inner) => Error::Unhandled(inner),
594        }
595    }
596}
597impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::get_account_settings::GetAccountSettingsError, R>> for Error
598where
599    R: Send + Sync + std::fmt::Debug + 'static,
600{
601    fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::get_account_settings::GetAccountSettingsError, R>) -> Self {
602        match err {
603            ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
604            _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
605                meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
606                source: err.into(),
607            }),
608        }
609    }
610}
611impl From<crate::operation::get_account_settings::GetAccountSettingsError> for Error {
612    fn from(err: crate::operation::get_account_settings::GetAccountSettingsError) -> Self {
613        match err {
614            crate::operation::get_account_settings::GetAccountSettingsError::InternalServerException(inner) => Error::InternalServerException(inner),
615            crate::operation::get_account_settings::GetAccountSettingsError::ValidationException(inner) => Error::ValidationException(inner),
616            crate::operation::get_account_settings::GetAccountSettingsError::Unhandled(inner) => Error::Unhandled(inner),
617        }
618    }
619}
620impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::get_index::GetIndexError, R>> for Error
621where
622    R: Send + Sync + std::fmt::Debug + 'static,
623{
624    fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::get_index::GetIndexError, R>) -> Self {
625        match err {
626            ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
627            _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
628                meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
629                source: err.into(),
630            }),
631        }
632    }
633}
634impl From<crate::operation::get_index::GetIndexError> for Error {
635    fn from(err: crate::operation::get_index::GetIndexError) -> Self {
636        match err {
637            crate::operation::get_index::GetIndexError::InternalServerException(inner) => Error::InternalServerException(inner),
638            crate::operation::get_index::GetIndexError::ResourceNotFoundException(inner) => Error::ResourceNotFoundException(inner),
639            crate::operation::get_index::GetIndexError::ValidationException(inner) => Error::ValidationException(inner),
640            crate::operation::get_index::GetIndexError::Unhandled(inner) => Error::Unhandled(inner),
641        }
642    }
643}
644impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::get_policies_stats::GetPoliciesStatsError, R>> for Error
645where
646    R: Send + Sync + std::fmt::Debug + 'static,
647{
648    fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::get_policies_stats::GetPoliciesStatsError, R>) -> Self {
649        match err {
650            ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
651            _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
652                meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
653                source: err.into(),
654            }),
655        }
656    }
657}
658impl From<crate::operation::get_policies_stats::GetPoliciesStatsError> for Error {
659    fn from(err: crate::operation::get_policies_stats::GetPoliciesStatsError) -> Self {
660        match err {
661            crate::operation::get_policies_stats::GetPoliciesStatsError::InternalServerException(inner) => Error::InternalServerException(inner),
662            crate::operation::get_policies_stats::GetPoliciesStatsError::Unhandled(inner) => Error::Unhandled(inner),
663        }
664    }
665}
666impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::get_security_config::GetSecurityConfigError, R>> for Error
667where
668    R: Send + Sync + std::fmt::Debug + 'static,
669{
670    fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::get_security_config::GetSecurityConfigError, R>) -> Self {
671        match err {
672            ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
673            _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
674                meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
675                source: err.into(),
676            }),
677        }
678    }
679}
680impl From<crate::operation::get_security_config::GetSecurityConfigError> for Error {
681    fn from(err: crate::operation::get_security_config::GetSecurityConfigError) -> Self {
682        match err {
683            crate::operation::get_security_config::GetSecurityConfigError::InternalServerException(inner) => Error::InternalServerException(inner),
684            crate::operation::get_security_config::GetSecurityConfigError::ResourceNotFoundException(inner) => {
685                Error::ResourceNotFoundException(inner)
686            }
687            crate::operation::get_security_config::GetSecurityConfigError::ValidationException(inner) => Error::ValidationException(inner),
688            crate::operation::get_security_config::GetSecurityConfigError::Unhandled(inner) => Error::Unhandled(inner),
689        }
690    }
691}
692impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::get_security_policy::GetSecurityPolicyError, R>> for Error
693where
694    R: Send + Sync + std::fmt::Debug + 'static,
695{
696    fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::get_security_policy::GetSecurityPolicyError, R>) -> Self {
697        match err {
698            ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
699            _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
700                meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
701                source: err.into(),
702            }),
703        }
704    }
705}
706impl From<crate::operation::get_security_policy::GetSecurityPolicyError> for Error {
707    fn from(err: crate::operation::get_security_policy::GetSecurityPolicyError) -> Self {
708        match err {
709            crate::operation::get_security_policy::GetSecurityPolicyError::InternalServerException(inner) => Error::InternalServerException(inner),
710            crate::operation::get_security_policy::GetSecurityPolicyError::ResourceNotFoundException(inner) => {
711                Error::ResourceNotFoundException(inner)
712            }
713            crate::operation::get_security_policy::GetSecurityPolicyError::ValidationException(inner) => Error::ValidationException(inner),
714            crate::operation::get_security_policy::GetSecurityPolicyError::Unhandled(inner) => Error::Unhandled(inner),
715        }
716    }
717}
718impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::list_access_policies::ListAccessPoliciesError, R>> for Error
719where
720    R: Send + Sync + std::fmt::Debug + 'static,
721{
722    fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::list_access_policies::ListAccessPoliciesError, R>) -> Self {
723        match err {
724            ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
725            _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
726                meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
727                source: err.into(),
728            }),
729        }
730    }
731}
732impl From<crate::operation::list_access_policies::ListAccessPoliciesError> for Error {
733    fn from(err: crate::operation::list_access_policies::ListAccessPoliciesError) -> Self {
734        match err {
735            crate::operation::list_access_policies::ListAccessPoliciesError::InternalServerException(inner) => Error::InternalServerException(inner),
736            crate::operation::list_access_policies::ListAccessPoliciesError::ValidationException(inner) => Error::ValidationException(inner),
737            crate::operation::list_access_policies::ListAccessPoliciesError::Unhandled(inner) => Error::Unhandled(inner),
738        }
739    }
740}
741impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::list_collections::ListCollectionsError, R>> for Error
742where
743    R: Send + Sync + std::fmt::Debug + 'static,
744{
745    fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::list_collections::ListCollectionsError, R>) -> Self {
746        match err {
747            ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
748            _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
749                meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
750                source: err.into(),
751            }),
752        }
753    }
754}
755impl From<crate::operation::list_collections::ListCollectionsError> for Error {
756    fn from(err: crate::operation::list_collections::ListCollectionsError) -> Self {
757        match err {
758            crate::operation::list_collections::ListCollectionsError::InternalServerException(inner) => Error::InternalServerException(inner),
759            crate::operation::list_collections::ListCollectionsError::ValidationException(inner) => Error::ValidationException(inner),
760            crate::operation::list_collections::ListCollectionsError::Unhandled(inner) => Error::Unhandled(inner),
761        }
762    }
763}
764impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::list_lifecycle_policies::ListLifecyclePoliciesError, R>> for Error
765where
766    R: Send + Sync + std::fmt::Debug + 'static,
767{
768    fn from(
769        err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::list_lifecycle_policies::ListLifecyclePoliciesError, R>,
770    ) -> Self {
771        match err {
772            ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
773            _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
774                meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
775                source: err.into(),
776            }),
777        }
778    }
779}
780impl From<crate::operation::list_lifecycle_policies::ListLifecyclePoliciesError> for Error {
781    fn from(err: crate::operation::list_lifecycle_policies::ListLifecyclePoliciesError) -> Self {
782        match err {
783            crate::operation::list_lifecycle_policies::ListLifecyclePoliciesError::InternalServerException(inner) => {
784                Error::InternalServerException(inner)
785            }
786            crate::operation::list_lifecycle_policies::ListLifecyclePoliciesError::ValidationException(inner) => Error::ValidationException(inner),
787            crate::operation::list_lifecycle_policies::ListLifecyclePoliciesError::Unhandled(inner) => Error::Unhandled(inner),
788        }
789    }
790}
791impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::list_security_configs::ListSecurityConfigsError, R>> for Error
792where
793    R: Send + Sync + std::fmt::Debug + 'static,
794{
795    fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::list_security_configs::ListSecurityConfigsError, R>) -> Self {
796        match err {
797            ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
798            _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
799                meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
800                source: err.into(),
801            }),
802        }
803    }
804}
805impl From<crate::operation::list_security_configs::ListSecurityConfigsError> for Error {
806    fn from(err: crate::operation::list_security_configs::ListSecurityConfigsError) -> Self {
807        match err {
808            crate::operation::list_security_configs::ListSecurityConfigsError::InternalServerException(inner) => {
809                Error::InternalServerException(inner)
810            }
811            crate::operation::list_security_configs::ListSecurityConfigsError::ValidationException(inner) => Error::ValidationException(inner),
812            crate::operation::list_security_configs::ListSecurityConfigsError::Unhandled(inner) => Error::Unhandled(inner),
813        }
814    }
815}
816impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::list_security_policies::ListSecurityPoliciesError, R>> for Error
817where
818    R: Send + Sync + std::fmt::Debug + 'static,
819{
820    fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::list_security_policies::ListSecurityPoliciesError, R>) -> Self {
821        match err {
822            ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
823            _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
824                meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
825                source: err.into(),
826            }),
827        }
828    }
829}
830impl From<crate::operation::list_security_policies::ListSecurityPoliciesError> for Error {
831    fn from(err: crate::operation::list_security_policies::ListSecurityPoliciesError) -> Self {
832        match err {
833            crate::operation::list_security_policies::ListSecurityPoliciesError::InternalServerException(inner) => {
834                Error::InternalServerException(inner)
835            }
836            crate::operation::list_security_policies::ListSecurityPoliciesError::ValidationException(inner) => Error::ValidationException(inner),
837            crate::operation::list_security_policies::ListSecurityPoliciesError::Unhandled(inner) => Error::Unhandled(inner),
838        }
839    }
840}
841impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::list_tags_for_resource::ListTagsForResourceError, R>> for Error
842where
843    R: Send + Sync + std::fmt::Debug + 'static,
844{
845    fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::list_tags_for_resource::ListTagsForResourceError, R>) -> Self {
846        match err {
847            ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
848            _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
849                meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
850                source: err.into(),
851            }),
852        }
853    }
854}
855impl From<crate::operation::list_tags_for_resource::ListTagsForResourceError> for Error {
856    fn from(err: crate::operation::list_tags_for_resource::ListTagsForResourceError) -> Self {
857        match err {
858            crate::operation::list_tags_for_resource::ListTagsForResourceError::InternalServerException(inner) => {
859                Error::InternalServerException(inner)
860            }
861            crate::operation::list_tags_for_resource::ListTagsForResourceError::ResourceNotFoundException(inner) => {
862                Error::ResourceNotFoundException(inner)
863            }
864            crate::operation::list_tags_for_resource::ListTagsForResourceError::ValidationException(inner) => Error::ValidationException(inner),
865            crate::operation::list_tags_for_resource::ListTagsForResourceError::Unhandled(inner) => Error::Unhandled(inner),
866        }
867    }
868}
869impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::list_vpc_endpoints::ListVpcEndpointsError, R>> for Error
870where
871    R: Send + Sync + std::fmt::Debug + 'static,
872{
873    fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::list_vpc_endpoints::ListVpcEndpointsError, R>) -> Self {
874        match err {
875            ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
876            _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
877                meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
878                source: err.into(),
879            }),
880        }
881    }
882}
883impl From<crate::operation::list_vpc_endpoints::ListVpcEndpointsError> for Error {
884    fn from(err: crate::operation::list_vpc_endpoints::ListVpcEndpointsError) -> Self {
885        match err {
886            crate::operation::list_vpc_endpoints::ListVpcEndpointsError::InternalServerException(inner) => Error::InternalServerException(inner),
887            crate::operation::list_vpc_endpoints::ListVpcEndpointsError::ValidationException(inner) => Error::ValidationException(inner),
888            crate::operation::list_vpc_endpoints::ListVpcEndpointsError::Unhandled(inner) => Error::Unhandled(inner),
889        }
890    }
891}
892impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::tag_resource::TagResourceError, R>> for Error
893where
894    R: Send + Sync + std::fmt::Debug + 'static,
895{
896    fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::tag_resource::TagResourceError, R>) -> Self {
897        match err {
898            ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
899            _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
900                meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
901                source: err.into(),
902            }),
903        }
904    }
905}
906impl From<crate::operation::tag_resource::TagResourceError> for Error {
907    fn from(err: crate::operation::tag_resource::TagResourceError) -> Self {
908        match err {
909            crate::operation::tag_resource::TagResourceError::ConflictException(inner) => Error::ConflictException(inner),
910            crate::operation::tag_resource::TagResourceError::InternalServerException(inner) => Error::InternalServerException(inner),
911            crate::operation::tag_resource::TagResourceError::ResourceNotFoundException(inner) => Error::ResourceNotFoundException(inner),
912            crate::operation::tag_resource::TagResourceError::ServiceQuotaExceededException(inner) => Error::ServiceQuotaExceededException(inner),
913            crate::operation::tag_resource::TagResourceError::ValidationException(inner) => Error::ValidationException(inner),
914            crate::operation::tag_resource::TagResourceError::Unhandled(inner) => Error::Unhandled(inner),
915        }
916    }
917}
918impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::untag_resource::UntagResourceError, R>> for Error
919where
920    R: Send + Sync + std::fmt::Debug + 'static,
921{
922    fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::untag_resource::UntagResourceError, R>) -> Self {
923        match err {
924            ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
925            _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
926                meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
927                source: err.into(),
928            }),
929        }
930    }
931}
932impl From<crate::operation::untag_resource::UntagResourceError> for Error {
933    fn from(err: crate::operation::untag_resource::UntagResourceError) -> Self {
934        match err {
935            crate::operation::untag_resource::UntagResourceError::ConflictException(inner) => Error::ConflictException(inner),
936            crate::operation::untag_resource::UntagResourceError::InternalServerException(inner) => Error::InternalServerException(inner),
937            crate::operation::untag_resource::UntagResourceError::ResourceNotFoundException(inner) => Error::ResourceNotFoundException(inner),
938            crate::operation::untag_resource::UntagResourceError::ValidationException(inner) => Error::ValidationException(inner),
939            crate::operation::untag_resource::UntagResourceError::Unhandled(inner) => Error::Unhandled(inner),
940        }
941    }
942}
943impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::update_access_policy::UpdateAccessPolicyError, R>> for Error
944where
945    R: Send + Sync + std::fmt::Debug + 'static,
946{
947    fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::update_access_policy::UpdateAccessPolicyError, R>) -> Self {
948        match err {
949            ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
950            _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
951                meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
952                source: err.into(),
953            }),
954        }
955    }
956}
957impl From<crate::operation::update_access_policy::UpdateAccessPolicyError> for Error {
958    fn from(err: crate::operation::update_access_policy::UpdateAccessPolicyError) -> Self {
959        match err {
960            crate::operation::update_access_policy::UpdateAccessPolicyError::ConflictException(inner) => Error::ConflictException(inner),
961            crate::operation::update_access_policy::UpdateAccessPolicyError::InternalServerException(inner) => Error::InternalServerException(inner),
962            crate::operation::update_access_policy::UpdateAccessPolicyError::ResourceNotFoundException(inner) => {
963                Error::ResourceNotFoundException(inner)
964            }
965            crate::operation::update_access_policy::UpdateAccessPolicyError::ValidationException(inner) => Error::ValidationException(inner),
966            crate::operation::update_access_policy::UpdateAccessPolicyError::Unhandled(inner) => Error::Unhandled(inner),
967        }
968    }
969}
970impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::update_account_settings::UpdateAccountSettingsError, R>> for Error
971where
972    R: Send + Sync + std::fmt::Debug + 'static,
973{
974    fn from(
975        err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::update_account_settings::UpdateAccountSettingsError, R>,
976    ) -> Self {
977        match err {
978            ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
979            _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
980                meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
981                source: err.into(),
982            }),
983        }
984    }
985}
986impl From<crate::operation::update_account_settings::UpdateAccountSettingsError> for Error {
987    fn from(err: crate::operation::update_account_settings::UpdateAccountSettingsError) -> Self {
988        match err {
989            crate::operation::update_account_settings::UpdateAccountSettingsError::InternalServerException(inner) => {
990                Error::InternalServerException(inner)
991            }
992            crate::operation::update_account_settings::UpdateAccountSettingsError::ValidationException(inner) => Error::ValidationException(inner),
993            crate::operation::update_account_settings::UpdateAccountSettingsError::Unhandled(inner) => Error::Unhandled(inner),
994        }
995    }
996}
997impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::update_collection::UpdateCollectionError, R>> for Error
998where
999    R: Send + Sync + std::fmt::Debug + 'static,
1000{
1001    fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::update_collection::UpdateCollectionError, R>) -> Self {
1002        match err {
1003            ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
1004            _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
1005                meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
1006                source: err.into(),
1007            }),
1008        }
1009    }
1010}
1011impl From<crate::operation::update_collection::UpdateCollectionError> for Error {
1012    fn from(err: crate::operation::update_collection::UpdateCollectionError) -> Self {
1013        match err {
1014            crate::operation::update_collection::UpdateCollectionError::ConflictException(inner) => Error::ConflictException(inner),
1015            crate::operation::update_collection::UpdateCollectionError::InternalServerException(inner) => Error::InternalServerException(inner),
1016            crate::operation::update_collection::UpdateCollectionError::ValidationException(inner) => Error::ValidationException(inner),
1017            crate::operation::update_collection::UpdateCollectionError::Unhandled(inner) => Error::Unhandled(inner),
1018        }
1019    }
1020}
1021impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::update_index::UpdateIndexError, R>> for Error
1022where
1023    R: Send + Sync + std::fmt::Debug + 'static,
1024{
1025    fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::update_index::UpdateIndexError, R>) -> Self {
1026        match err {
1027            ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
1028            _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
1029                meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
1030                source: err.into(),
1031            }),
1032        }
1033    }
1034}
1035impl From<crate::operation::update_index::UpdateIndexError> for Error {
1036    fn from(err: crate::operation::update_index::UpdateIndexError) -> Self {
1037        match err {
1038            crate::operation::update_index::UpdateIndexError::InternalServerException(inner) => Error::InternalServerException(inner),
1039            crate::operation::update_index::UpdateIndexError::ResourceNotFoundException(inner) => Error::ResourceNotFoundException(inner),
1040            crate::operation::update_index::UpdateIndexError::ValidationException(inner) => Error::ValidationException(inner),
1041            crate::operation::update_index::UpdateIndexError::Unhandled(inner) => Error::Unhandled(inner),
1042        }
1043    }
1044}
1045impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::update_lifecycle_policy::UpdateLifecyclePolicyError, R>> for Error
1046where
1047    R: Send + Sync + std::fmt::Debug + 'static,
1048{
1049    fn from(
1050        err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::update_lifecycle_policy::UpdateLifecyclePolicyError, R>,
1051    ) -> Self {
1052        match err {
1053            ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
1054            _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
1055                meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
1056                source: err.into(),
1057            }),
1058        }
1059    }
1060}
1061impl From<crate::operation::update_lifecycle_policy::UpdateLifecyclePolicyError> for Error {
1062    fn from(err: crate::operation::update_lifecycle_policy::UpdateLifecyclePolicyError) -> Self {
1063        match err {
1064            crate::operation::update_lifecycle_policy::UpdateLifecyclePolicyError::ConflictException(inner) => Error::ConflictException(inner),
1065            crate::operation::update_lifecycle_policy::UpdateLifecyclePolicyError::InternalServerException(inner) => {
1066                Error::InternalServerException(inner)
1067            }
1068            crate::operation::update_lifecycle_policy::UpdateLifecyclePolicyError::ResourceNotFoundException(inner) => {
1069                Error::ResourceNotFoundException(inner)
1070            }
1071            crate::operation::update_lifecycle_policy::UpdateLifecyclePolicyError::ServiceQuotaExceededException(inner) => {
1072                Error::ServiceQuotaExceededException(inner)
1073            }
1074            crate::operation::update_lifecycle_policy::UpdateLifecyclePolicyError::ValidationException(inner) => Error::ValidationException(inner),
1075            crate::operation::update_lifecycle_policy::UpdateLifecyclePolicyError::Unhandled(inner) => Error::Unhandled(inner),
1076        }
1077    }
1078}
1079impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::update_security_config::UpdateSecurityConfigError, R>> for Error
1080where
1081    R: Send + Sync + std::fmt::Debug + 'static,
1082{
1083    fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::update_security_config::UpdateSecurityConfigError, R>) -> Self {
1084        match err {
1085            ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
1086            _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
1087                meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
1088                source: err.into(),
1089            }),
1090        }
1091    }
1092}
1093impl From<crate::operation::update_security_config::UpdateSecurityConfigError> for Error {
1094    fn from(err: crate::operation::update_security_config::UpdateSecurityConfigError) -> Self {
1095        match err {
1096            crate::operation::update_security_config::UpdateSecurityConfigError::ConflictException(inner) => Error::ConflictException(inner),
1097            crate::operation::update_security_config::UpdateSecurityConfigError::InternalServerException(inner) => {
1098                Error::InternalServerException(inner)
1099            }
1100            crate::operation::update_security_config::UpdateSecurityConfigError::ResourceNotFoundException(inner) => {
1101                Error::ResourceNotFoundException(inner)
1102            }
1103            crate::operation::update_security_config::UpdateSecurityConfigError::ValidationException(inner) => Error::ValidationException(inner),
1104            crate::operation::update_security_config::UpdateSecurityConfigError::Unhandled(inner) => Error::Unhandled(inner),
1105        }
1106    }
1107}
1108impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::update_security_policy::UpdateSecurityPolicyError, R>> for Error
1109where
1110    R: Send + Sync + std::fmt::Debug + 'static,
1111{
1112    fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::update_security_policy::UpdateSecurityPolicyError, R>) -> Self {
1113        match err {
1114            ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
1115            _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
1116                meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
1117                source: err.into(),
1118            }),
1119        }
1120    }
1121}
1122impl From<crate::operation::update_security_policy::UpdateSecurityPolicyError> for Error {
1123    fn from(err: crate::operation::update_security_policy::UpdateSecurityPolicyError) -> Self {
1124        match err {
1125            crate::operation::update_security_policy::UpdateSecurityPolicyError::ConflictException(inner) => Error::ConflictException(inner),
1126            crate::operation::update_security_policy::UpdateSecurityPolicyError::InternalServerException(inner) => {
1127                Error::InternalServerException(inner)
1128            }
1129            crate::operation::update_security_policy::UpdateSecurityPolicyError::ResourceNotFoundException(inner) => {
1130                Error::ResourceNotFoundException(inner)
1131            }
1132            crate::operation::update_security_policy::UpdateSecurityPolicyError::ServiceQuotaExceededException(inner) => {
1133                Error::ServiceQuotaExceededException(inner)
1134            }
1135            crate::operation::update_security_policy::UpdateSecurityPolicyError::ValidationException(inner) => Error::ValidationException(inner),
1136            crate::operation::update_security_policy::UpdateSecurityPolicyError::Unhandled(inner) => Error::Unhandled(inner),
1137        }
1138    }
1139}
1140impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::update_vpc_endpoint::UpdateVpcEndpointError, R>> for Error
1141where
1142    R: Send + Sync + std::fmt::Debug + 'static,
1143{
1144    fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::update_vpc_endpoint::UpdateVpcEndpointError, R>) -> Self {
1145        match err {
1146            ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
1147            _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
1148                meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
1149                source: err.into(),
1150            }),
1151        }
1152    }
1153}
1154impl From<crate::operation::update_vpc_endpoint::UpdateVpcEndpointError> for Error {
1155    fn from(err: crate::operation::update_vpc_endpoint::UpdateVpcEndpointError) -> Self {
1156        match err {
1157            crate::operation::update_vpc_endpoint::UpdateVpcEndpointError::ConflictException(inner) => Error::ConflictException(inner),
1158            crate::operation::update_vpc_endpoint::UpdateVpcEndpointError::InternalServerException(inner) => Error::InternalServerException(inner),
1159            crate::operation::update_vpc_endpoint::UpdateVpcEndpointError::ValidationException(inner) => Error::ValidationException(inner),
1160            crate::operation::update_vpc_endpoint::UpdateVpcEndpointError::Unhandled(inner) => Error::Unhandled(inner),
1161        }
1162    }
1163}
1164impl ::std::error::Error for Error {
1165    fn source(&self) -> std::option::Option<&(dyn ::std::error::Error + 'static)> {
1166        match self {
1167            Error::ConflictException(inner) => inner.source(),
1168            Error::InternalServerException(inner) => inner.source(),
1169            Error::OcuLimitExceededException(inner) => inner.source(),
1170            Error::ResourceNotFoundException(inner) => inner.source(),
1171            Error::ServiceQuotaExceededException(inner) => inner.source(),
1172            Error::ValidationException(inner) => inner.source(),
1173            Error::Unhandled(inner) => ::std::option::Option::Some(&*inner.source),
1174        }
1175    }
1176}
1177impl ::aws_types::request_id::RequestId for Error {
1178    fn request_id(&self) -> Option<&str> {
1179        match self {
1180            Self::ConflictException(e) => e.request_id(),
1181            Self::InternalServerException(e) => e.request_id(),
1182            Self::OcuLimitExceededException(e) => e.request_id(),
1183            Self::ResourceNotFoundException(e) => e.request_id(),
1184            Self::ServiceQuotaExceededException(e) => e.request_id(),
1185            Self::ValidationException(e) => e.request_id(),
1186            Self::Unhandled(e) => e.meta.request_id(),
1187        }
1188    }
1189}