1#[non_exhaustive]
4#[derive(::std::fmt::Debug)]
5pub enum Error {
6 ConflictException(crate::types::error::ConflictException),
8 InternalServerException(crate::types::error::InternalServerException),
10 OcuLimitExceededException(crate::types::error::OcuLimitExceededException),
12 ResourceNotFoundException(crate::types::error::ResourceNotFoundException),
14 ServiceQuotaExceededException(crate::types::error::ServiceQuotaExceededException),
16 ValidationException(crate::types::error::ValidationException),
18 #[deprecated(note = "Matching `Unhandled` directly is not forwards compatible. Instead, match using a \
20 variable wildcard pattern and check `.code()`:
21 \
22 `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> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::batch_get_collection_group::BatchGetCollectionGroupError, R>>
91 for Error
92where
93 R: Send + Sync + std::fmt::Debug + 'static,
94{
95 fn from(
96 err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::batch_get_collection_group::BatchGetCollectionGroupError, R>,
97 ) -> Self {
98 match err {
99 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
100 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
101 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
102 source: err.into(),
103 }),
104 }
105 }
106}
107impl From<crate::operation::batch_get_collection_group::BatchGetCollectionGroupError> for Error {
108 fn from(err: crate::operation::batch_get_collection_group::BatchGetCollectionGroupError) -> Self {
109 match err {
110 crate::operation::batch_get_collection_group::BatchGetCollectionGroupError::InternalServerException(inner) => {
111 Error::InternalServerException(inner)
112 }
113 crate::operation::batch_get_collection_group::BatchGetCollectionGroupError::ValidationException(inner) => {
114 Error::ValidationException(inner)
115 }
116 crate::operation::batch_get_collection_group::BatchGetCollectionGroupError::Unhandled(inner) => Error::Unhandled(inner),
117 }
118 }
119}
120impl<R>
121 From<
122 ::aws_smithy_runtime_api::client::result::SdkError<
123 crate::operation::batch_get_effective_lifecycle_policy::BatchGetEffectiveLifecyclePolicyError,
124 R,
125 >,
126 > for Error
127where
128 R: Send + Sync + std::fmt::Debug + 'static,
129{
130 fn from(
131 err: ::aws_smithy_runtime_api::client::result::SdkError<
132 crate::operation::batch_get_effective_lifecycle_policy::BatchGetEffectiveLifecyclePolicyError,
133 R,
134 >,
135 ) -> Self {
136 match err {
137 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
138 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
139 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
140 source: err.into(),
141 }),
142 }
143 }
144}
145impl From<crate::operation::batch_get_effective_lifecycle_policy::BatchGetEffectiveLifecyclePolicyError> for Error {
146 fn from(err: crate::operation::batch_get_effective_lifecycle_policy::BatchGetEffectiveLifecyclePolicyError) -> Self {
147 match err {
148 crate::operation::batch_get_effective_lifecycle_policy::BatchGetEffectiveLifecyclePolicyError::InternalServerException(inner) => {
149 Error::InternalServerException(inner)
150 }
151 crate::operation::batch_get_effective_lifecycle_policy::BatchGetEffectiveLifecyclePolicyError::ValidationException(inner) => {
152 Error::ValidationException(inner)
153 }
154 crate::operation::batch_get_effective_lifecycle_policy::BatchGetEffectiveLifecyclePolicyError::Unhandled(inner) => {
155 Error::Unhandled(inner)
156 }
157 }
158 }
159}
160impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::batch_get_lifecycle_policy::BatchGetLifecyclePolicyError, R>>
161 for Error
162where
163 R: Send + Sync + std::fmt::Debug + 'static,
164{
165 fn from(
166 err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::batch_get_lifecycle_policy::BatchGetLifecyclePolicyError, R>,
167 ) -> Self {
168 match err {
169 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
170 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
171 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
172 source: err.into(),
173 }),
174 }
175 }
176}
177impl From<crate::operation::batch_get_lifecycle_policy::BatchGetLifecyclePolicyError> for Error {
178 fn from(err: crate::operation::batch_get_lifecycle_policy::BatchGetLifecyclePolicyError) -> Self {
179 match err {
180 crate::operation::batch_get_lifecycle_policy::BatchGetLifecyclePolicyError::InternalServerException(inner) => {
181 Error::InternalServerException(inner)
182 }
183 crate::operation::batch_get_lifecycle_policy::BatchGetLifecyclePolicyError::ValidationException(inner) => {
184 Error::ValidationException(inner)
185 }
186 crate::operation::batch_get_lifecycle_policy::BatchGetLifecyclePolicyError::Unhandled(inner) => Error::Unhandled(inner),
187 }
188 }
189}
190impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::batch_get_vpc_endpoint::BatchGetVpcEndpointError, R>> for Error
191where
192 R: Send + Sync + std::fmt::Debug + 'static,
193{
194 fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::batch_get_vpc_endpoint::BatchGetVpcEndpointError, R>) -> Self {
195 match err {
196 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
197 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
198 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
199 source: err.into(),
200 }),
201 }
202 }
203}
204impl From<crate::operation::batch_get_vpc_endpoint::BatchGetVpcEndpointError> for Error {
205 fn from(err: crate::operation::batch_get_vpc_endpoint::BatchGetVpcEndpointError) -> Self {
206 match err {
207 crate::operation::batch_get_vpc_endpoint::BatchGetVpcEndpointError::InternalServerException(inner) => {
208 Error::InternalServerException(inner)
209 }
210 crate::operation::batch_get_vpc_endpoint::BatchGetVpcEndpointError::ValidationException(inner) => Error::ValidationException(inner),
211 crate::operation::batch_get_vpc_endpoint::BatchGetVpcEndpointError::Unhandled(inner) => Error::Unhandled(inner),
212 }
213 }
214}
215impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::create_access_policy::CreateAccessPolicyError, R>> for Error
216where
217 R: Send + Sync + std::fmt::Debug + 'static,
218{
219 fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::create_access_policy::CreateAccessPolicyError, R>) -> Self {
220 match err {
221 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
222 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
223 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
224 source: err.into(),
225 }),
226 }
227 }
228}
229impl From<crate::operation::create_access_policy::CreateAccessPolicyError> for Error {
230 fn from(err: crate::operation::create_access_policy::CreateAccessPolicyError) -> Self {
231 match err {
232 crate::operation::create_access_policy::CreateAccessPolicyError::ConflictException(inner) => Error::ConflictException(inner),
233 crate::operation::create_access_policy::CreateAccessPolicyError::InternalServerException(inner) => Error::InternalServerException(inner),
234 crate::operation::create_access_policy::CreateAccessPolicyError::ServiceQuotaExceededException(inner) => {
235 Error::ServiceQuotaExceededException(inner)
236 }
237 crate::operation::create_access_policy::CreateAccessPolicyError::ValidationException(inner) => Error::ValidationException(inner),
238 crate::operation::create_access_policy::CreateAccessPolicyError::Unhandled(inner) => Error::Unhandled(inner),
239 }
240 }
241}
242impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::create_collection::CreateCollectionError, R>> for Error
243where
244 R: Send + Sync + std::fmt::Debug + 'static,
245{
246 fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::create_collection::CreateCollectionError, R>) -> Self {
247 match err {
248 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
249 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
250 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
251 source: err.into(),
252 }),
253 }
254 }
255}
256impl From<crate::operation::create_collection::CreateCollectionError> for Error {
257 fn from(err: crate::operation::create_collection::CreateCollectionError) -> Self {
258 match err {
259 crate::operation::create_collection::CreateCollectionError::ConflictException(inner) => Error::ConflictException(inner),
260 crate::operation::create_collection::CreateCollectionError::InternalServerException(inner) => Error::InternalServerException(inner),
261 crate::operation::create_collection::CreateCollectionError::OcuLimitExceededException(inner) => Error::OcuLimitExceededException(inner),
262 crate::operation::create_collection::CreateCollectionError::ServiceQuotaExceededException(inner) => {
263 Error::ServiceQuotaExceededException(inner)
264 }
265 crate::operation::create_collection::CreateCollectionError::ValidationException(inner) => Error::ValidationException(inner),
266 crate::operation::create_collection::CreateCollectionError::Unhandled(inner) => Error::Unhandled(inner),
267 }
268 }
269}
270impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::create_collection_group::CreateCollectionGroupError, R>> for Error
271where
272 R: Send + Sync + std::fmt::Debug + 'static,
273{
274 fn from(
275 err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::create_collection_group::CreateCollectionGroupError, R>,
276 ) -> Self {
277 match err {
278 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
279 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
280 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
281 source: err.into(),
282 }),
283 }
284 }
285}
286impl From<crate::operation::create_collection_group::CreateCollectionGroupError> for Error {
287 fn from(err: crate::operation::create_collection_group::CreateCollectionGroupError) -> Self {
288 match err {
289 crate::operation::create_collection_group::CreateCollectionGroupError::ConflictException(inner) => Error::ConflictException(inner),
290 crate::operation::create_collection_group::CreateCollectionGroupError::InternalServerException(inner) => {
291 Error::InternalServerException(inner)
292 }
293 crate::operation::create_collection_group::CreateCollectionGroupError::ServiceQuotaExceededException(inner) => {
294 Error::ServiceQuotaExceededException(inner)
295 }
296 crate::operation::create_collection_group::CreateCollectionGroupError::ValidationException(inner) => Error::ValidationException(inner),
297 crate::operation::create_collection_group::CreateCollectionGroupError::Unhandled(inner) => Error::Unhandled(inner),
298 }
299 }
300}
301impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::create_index::CreateIndexError, R>> for Error
302where
303 R: Send + Sync + std::fmt::Debug + 'static,
304{
305 fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::create_index::CreateIndexError, R>) -> Self {
306 match err {
307 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
308 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
309 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
310 source: err.into(),
311 }),
312 }
313 }
314}
315impl From<crate::operation::create_index::CreateIndexError> for Error {
316 fn from(err: crate::operation::create_index::CreateIndexError) -> Self {
317 match err {
318 crate::operation::create_index::CreateIndexError::ConflictException(inner) => Error::ConflictException(inner),
319 crate::operation::create_index::CreateIndexError::InternalServerException(inner) => Error::InternalServerException(inner),
320 crate::operation::create_index::CreateIndexError::ResourceNotFoundException(inner) => Error::ResourceNotFoundException(inner),
321 crate::operation::create_index::CreateIndexError::ValidationException(inner) => Error::ValidationException(inner),
322 crate::operation::create_index::CreateIndexError::Unhandled(inner) => Error::Unhandled(inner),
323 }
324 }
325}
326impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::create_lifecycle_policy::CreateLifecyclePolicyError, R>> for Error
327where
328 R: Send + Sync + std::fmt::Debug + 'static,
329{
330 fn from(
331 err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::create_lifecycle_policy::CreateLifecyclePolicyError, R>,
332 ) -> Self {
333 match err {
334 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
335 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
336 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
337 source: err.into(),
338 }),
339 }
340 }
341}
342impl From<crate::operation::create_lifecycle_policy::CreateLifecyclePolicyError> for Error {
343 fn from(err: crate::operation::create_lifecycle_policy::CreateLifecyclePolicyError) -> Self {
344 match err {
345 crate::operation::create_lifecycle_policy::CreateLifecyclePolicyError::ConflictException(inner) => Error::ConflictException(inner),
346 crate::operation::create_lifecycle_policy::CreateLifecyclePolicyError::InternalServerException(inner) => {
347 Error::InternalServerException(inner)
348 }
349 crate::operation::create_lifecycle_policy::CreateLifecyclePolicyError::ServiceQuotaExceededException(inner) => {
350 Error::ServiceQuotaExceededException(inner)
351 }
352 crate::operation::create_lifecycle_policy::CreateLifecyclePolicyError::ValidationException(inner) => Error::ValidationException(inner),
353 crate::operation::create_lifecycle_policy::CreateLifecyclePolicyError::Unhandled(inner) => Error::Unhandled(inner),
354 }
355 }
356}
357impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::create_security_config::CreateSecurityConfigError, R>> for Error
358where
359 R: Send + Sync + std::fmt::Debug + 'static,
360{
361 fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::create_security_config::CreateSecurityConfigError, R>) -> Self {
362 match err {
363 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
364 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
365 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
366 source: err.into(),
367 }),
368 }
369 }
370}
371impl From<crate::operation::create_security_config::CreateSecurityConfigError> for Error {
372 fn from(err: crate::operation::create_security_config::CreateSecurityConfigError) -> Self {
373 match err {
374 crate::operation::create_security_config::CreateSecurityConfigError::ConflictException(inner) => Error::ConflictException(inner),
375 crate::operation::create_security_config::CreateSecurityConfigError::InternalServerException(inner) => {
376 Error::InternalServerException(inner)
377 }
378 crate::operation::create_security_config::CreateSecurityConfigError::ServiceQuotaExceededException(inner) => {
379 Error::ServiceQuotaExceededException(inner)
380 }
381 crate::operation::create_security_config::CreateSecurityConfigError::ValidationException(inner) => Error::ValidationException(inner),
382 crate::operation::create_security_config::CreateSecurityConfigError::Unhandled(inner) => Error::Unhandled(inner),
383 }
384 }
385}
386impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::create_security_policy::CreateSecurityPolicyError, R>> for Error
387where
388 R: Send + Sync + std::fmt::Debug + 'static,
389{
390 fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::create_security_policy::CreateSecurityPolicyError, R>) -> Self {
391 match err {
392 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
393 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
394 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
395 source: err.into(),
396 }),
397 }
398 }
399}
400impl From<crate::operation::create_security_policy::CreateSecurityPolicyError> for Error {
401 fn from(err: crate::operation::create_security_policy::CreateSecurityPolicyError) -> Self {
402 match err {
403 crate::operation::create_security_policy::CreateSecurityPolicyError::ConflictException(inner) => Error::ConflictException(inner),
404 crate::operation::create_security_policy::CreateSecurityPolicyError::InternalServerException(inner) => {
405 Error::InternalServerException(inner)
406 }
407 crate::operation::create_security_policy::CreateSecurityPolicyError::ServiceQuotaExceededException(inner) => {
408 Error::ServiceQuotaExceededException(inner)
409 }
410 crate::operation::create_security_policy::CreateSecurityPolicyError::ValidationException(inner) => Error::ValidationException(inner),
411 crate::operation::create_security_policy::CreateSecurityPolicyError::Unhandled(inner) => Error::Unhandled(inner),
412 }
413 }
414}
415impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::create_vpc_endpoint::CreateVpcEndpointError, R>> for Error
416where
417 R: Send + Sync + std::fmt::Debug + 'static,
418{
419 fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::create_vpc_endpoint::CreateVpcEndpointError, R>) -> Self {
420 match err {
421 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
422 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
423 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
424 source: err.into(),
425 }),
426 }
427 }
428}
429impl From<crate::operation::create_vpc_endpoint::CreateVpcEndpointError> for Error {
430 fn from(err: crate::operation::create_vpc_endpoint::CreateVpcEndpointError) -> Self {
431 match err {
432 crate::operation::create_vpc_endpoint::CreateVpcEndpointError::ConflictException(inner) => Error::ConflictException(inner),
433 crate::operation::create_vpc_endpoint::CreateVpcEndpointError::InternalServerException(inner) => Error::InternalServerException(inner),
434 crate::operation::create_vpc_endpoint::CreateVpcEndpointError::ServiceQuotaExceededException(inner) => {
435 Error::ServiceQuotaExceededException(inner)
436 }
437 crate::operation::create_vpc_endpoint::CreateVpcEndpointError::ValidationException(inner) => Error::ValidationException(inner),
438 crate::operation::create_vpc_endpoint::CreateVpcEndpointError::Unhandled(inner) => Error::Unhandled(inner),
439 }
440 }
441}
442impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::delete_access_policy::DeleteAccessPolicyError, R>> for Error
443where
444 R: Send + Sync + std::fmt::Debug + 'static,
445{
446 fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::delete_access_policy::DeleteAccessPolicyError, R>) -> Self {
447 match err {
448 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
449 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
450 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
451 source: err.into(),
452 }),
453 }
454 }
455}
456impl From<crate::operation::delete_access_policy::DeleteAccessPolicyError> for Error {
457 fn from(err: crate::operation::delete_access_policy::DeleteAccessPolicyError) -> Self {
458 match err {
459 crate::operation::delete_access_policy::DeleteAccessPolicyError::ConflictException(inner) => Error::ConflictException(inner),
460 crate::operation::delete_access_policy::DeleteAccessPolicyError::InternalServerException(inner) => Error::InternalServerException(inner),
461 crate::operation::delete_access_policy::DeleteAccessPolicyError::ResourceNotFoundException(inner) => {
462 Error::ResourceNotFoundException(inner)
463 }
464 crate::operation::delete_access_policy::DeleteAccessPolicyError::ValidationException(inner) => Error::ValidationException(inner),
465 crate::operation::delete_access_policy::DeleteAccessPolicyError::Unhandled(inner) => Error::Unhandled(inner),
466 }
467 }
468}
469impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::delete_collection::DeleteCollectionError, R>> for Error
470where
471 R: Send + Sync + std::fmt::Debug + 'static,
472{
473 fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::delete_collection::DeleteCollectionError, R>) -> Self {
474 match err {
475 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
476 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
477 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
478 source: err.into(),
479 }),
480 }
481 }
482}
483impl From<crate::operation::delete_collection::DeleteCollectionError> for Error {
484 fn from(err: crate::operation::delete_collection::DeleteCollectionError) -> Self {
485 match err {
486 crate::operation::delete_collection::DeleteCollectionError::ConflictException(inner) => Error::ConflictException(inner),
487 crate::operation::delete_collection::DeleteCollectionError::InternalServerException(inner) => Error::InternalServerException(inner),
488 crate::operation::delete_collection::DeleteCollectionError::ResourceNotFoundException(inner) => Error::ResourceNotFoundException(inner),
489 crate::operation::delete_collection::DeleteCollectionError::ValidationException(inner) => Error::ValidationException(inner),
490 crate::operation::delete_collection::DeleteCollectionError::Unhandled(inner) => Error::Unhandled(inner),
491 }
492 }
493}
494impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::delete_collection_group::DeleteCollectionGroupError, R>> for Error
495where
496 R: Send + Sync + std::fmt::Debug + 'static,
497{
498 fn from(
499 err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::delete_collection_group::DeleteCollectionGroupError, R>,
500 ) -> Self {
501 match err {
502 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
503 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
504 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
505 source: err.into(),
506 }),
507 }
508 }
509}
510impl From<crate::operation::delete_collection_group::DeleteCollectionGroupError> for Error {
511 fn from(err: crate::operation::delete_collection_group::DeleteCollectionGroupError) -> Self {
512 match err {
513 crate::operation::delete_collection_group::DeleteCollectionGroupError::ConflictException(inner) => Error::ConflictException(inner),
514 crate::operation::delete_collection_group::DeleteCollectionGroupError::InternalServerException(inner) => {
515 Error::InternalServerException(inner)
516 }
517 crate::operation::delete_collection_group::DeleteCollectionGroupError::ResourceNotFoundException(inner) => {
518 Error::ResourceNotFoundException(inner)
519 }
520 crate::operation::delete_collection_group::DeleteCollectionGroupError::ValidationException(inner) => Error::ValidationException(inner),
521 crate::operation::delete_collection_group::DeleteCollectionGroupError::Unhandled(inner) => Error::Unhandled(inner),
522 }
523 }
524}
525impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::delete_index::DeleteIndexError, R>> for Error
526where
527 R: Send + Sync + std::fmt::Debug + 'static,
528{
529 fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::delete_index::DeleteIndexError, R>) -> Self {
530 match err {
531 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
532 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
533 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
534 source: err.into(),
535 }),
536 }
537 }
538}
539impl From<crate::operation::delete_index::DeleteIndexError> for Error {
540 fn from(err: crate::operation::delete_index::DeleteIndexError) -> Self {
541 match err {
542 crate::operation::delete_index::DeleteIndexError::InternalServerException(inner) => Error::InternalServerException(inner),
543 crate::operation::delete_index::DeleteIndexError::ResourceNotFoundException(inner) => Error::ResourceNotFoundException(inner),
544 crate::operation::delete_index::DeleteIndexError::ValidationException(inner) => Error::ValidationException(inner),
545 crate::operation::delete_index::DeleteIndexError::Unhandled(inner) => Error::Unhandled(inner),
546 }
547 }
548}
549impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::delete_lifecycle_policy::DeleteLifecyclePolicyError, R>> for Error
550where
551 R: Send + Sync + std::fmt::Debug + 'static,
552{
553 fn from(
554 err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::delete_lifecycle_policy::DeleteLifecyclePolicyError, R>,
555 ) -> Self {
556 match err {
557 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
558 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
559 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
560 source: err.into(),
561 }),
562 }
563 }
564}
565impl From<crate::operation::delete_lifecycle_policy::DeleteLifecyclePolicyError> for Error {
566 fn from(err: crate::operation::delete_lifecycle_policy::DeleteLifecyclePolicyError) -> Self {
567 match err {
568 crate::operation::delete_lifecycle_policy::DeleteLifecyclePolicyError::ConflictException(inner) => Error::ConflictException(inner),
569 crate::operation::delete_lifecycle_policy::DeleteLifecyclePolicyError::InternalServerException(inner) => {
570 Error::InternalServerException(inner)
571 }
572 crate::operation::delete_lifecycle_policy::DeleteLifecyclePolicyError::ResourceNotFoundException(inner) => {
573 Error::ResourceNotFoundException(inner)
574 }
575 crate::operation::delete_lifecycle_policy::DeleteLifecyclePolicyError::ValidationException(inner) => Error::ValidationException(inner),
576 crate::operation::delete_lifecycle_policy::DeleteLifecyclePolicyError::Unhandled(inner) => Error::Unhandled(inner),
577 }
578 }
579}
580impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::delete_security_config::DeleteSecurityConfigError, R>> for Error
581where
582 R: Send + Sync + std::fmt::Debug + 'static,
583{
584 fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::delete_security_config::DeleteSecurityConfigError, R>) -> Self {
585 match err {
586 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
587 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
588 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
589 source: err.into(),
590 }),
591 }
592 }
593}
594impl From<crate::operation::delete_security_config::DeleteSecurityConfigError> for Error {
595 fn from(err: crate::operation::delete_security_config::DeleteSecurityConfigError) -> Self {
596 match err {
597 crate::operation::delete_security_config::DeleteSecurityConfigError::ConflictException(inner) => Error::ConflictException(inner),
598 crate::operation::delete_security_config::DeleteSecurityConfigError::InternalServerException(inner) => {
599 Error::InternalServerException(inner)
600 }
601 crate::operation::delete_security_config::DeleteSecurityConfigError::ResourceNotFoundException(inner) => {
602 Error::ResourceNotFoundException(inner)
603 }
604 crate::operation::delete_security_config::DeleteSecurityConfigError::ValidationException(inner) => Error::ValidationException(inner),
605 crate::operation::delete_security_config::DeleteSecurityConfigError::Unhandled(inner) => Error::Unhandled(inner),
606 }
607 }
608}
609impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::delete_security_policy::DeleteSecurityPolicyError, R>> for Error
610where
611 R: Send + Sync + std::fmt::Debug + 'static,
612{
613 fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::delete_security_policy::DeleteSecurityPolicyError, R>) -> Self {
614 match err {
615 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
616 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
617 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
618 source: err.into(),
619 }),
620 }
621 }
622}
623impl From<crate::operation::delete_security_policy::DeleteSecurityPolicyError> for Error {
624 fn from(err: crate::operation::delete_security_policy::DeleteSecurityPolicyError) -> Self {
625 match err {
626 crate::operation::delete_security_policy::DeleteSecurityPolicyError::ConflictException(inner) => Error::ConflictException(inner),
627 crate::operation::delete_security_policy::DeleteSecurityPolicyError::InternalServerException(inner) => {
628 Error::InternalServerException(inner)
629 }
630 crate::operation::delete_security_policy::DeleteSecurityPolicyError::ResourceNotFoundException(inner) => {
631 Error::ResourceNotFoundException(inner)
632 }
633 crate::operation::delete_security_policy::DeleteSecurityPolicyError::ValidationException(inner) => Error::ValidationException(inner),
634 crate::operation::delete_security_policy::DeleteSecurityPolicyError::Unhandled(inner) => Error::Unhandled(inner),
635 }
636 }
637}
638impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::delete_vpc_endpoint::DeleteVpcEndpointError, R>> for Error
639where
640 R: Send + Sync + std::fmt::Debug + 'static,
641{
642 fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::delete_vpc_endpoint::DeleteVpcEndpointError, R>) -> Self {
643 match err {
644 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
645 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
646 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
647 source: err.into(),
648 }),
649 }
650 }
651}
652impl From<crate::operation::delete_vpc_endpoint::DeleteVpcEndpointError> for Error {
653 fn from(err: crate::operation::delete_vpc_endpoint::DeleteVpcEndpointError) -> Self {
654 match err {
655 crate::operation::delete_vpc_endpoint::DeleteVpcEndpointError::ConflictException(inner) => Error::ConflictException(inner),
656 crate::operation::delete_vpc_endpoint::DeleteVpcEndpointError::InternalServerException(inner) => Error::InternalServerException(inner),
657 crate::operation::delete_vpc_endpoint::DeleteVpcEndpointError::ResourceNotFoundException(inner) => {
658 Error::ResourceNotFoundException(inner)
659 }
660 crate::operation::delete_vpc_endpoint::DeleteVpcEndpointError::ValidationException(inner) => Error::ValidationException(inner),
661 crate::operation::delete_vpc_endpoint::DeleteVpcEndpointError::Unhandled(inner) => Error::Unhandled(inner),
662 }
663 }
664}
665impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::get_access_policy::GetAccessPolicyError, R>> for Error
666where
667 R: Send + Sync + std::fmt::Debug + 'static,
668{
669 fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::get_access_policy::GetAccessPolicyError, R>) -> Self {
670 match err {
671 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
672 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
673 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
674 source: err.into(),
675 }),
676 }
677 }
678}
679impl From<crate::operation::get_access_policy::GetAccessPolicyError> for Error {
680 fn from(err: crate::operation::get_access_policy::GetAccessPolicyError) -> Self {
681 match err {
682 crate::operation::get_access_policy::GetAccessPolicyError::InternalServerException(inner) => Error::InternalServerException(inner),
683 crate::operation::get_access_policy::GetAccessPolicyError::ResourceNotFoundException(inner) => Error::ResourceNotFoundException(inner),
684 crate::operation::get_access_policy::GetAccessPolicyError::ValidationException(inner) => Error::ValidationException(inner),
685 crate::operation::get_access_policy::GetAccessPolicyError::Unhandled(inner) => Error::Unhandled(inner),
686 }
687 }
688}
689impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::get_account_settings::GetAccountSettingsError, R>> for Error
690where
691 R: Send + Sync + std::fmt::Debug + 'static,
692{
693 fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::get_account_settings::GetAccountSettingsError, R>) -> Self {
694 match err {
695 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
696 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
697 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
698 source: err.into(),
699 }),
700 }
701 }
702}
703impl From<crate::operation::get_account_settings::GetAccountSettingsError> for Error {
704 fn from(err: crate::operation::get_account_settings::GetAccountSettingsError) -> Self {
705 match err {
706 crate::operation::get_account_settings::GetAccountSettingsError::InternalServerException(inner) => Error::InternalServerException(inner),
707 crate::operation::get_account_settings::GetAccountSettingsError::ValidationException(inner) => Error::ValidationException(inner),
708 crate::operation::get_account_settings::GetAccountSettingsError::Unhandled(inner) => Error::Unhandled(inner),
709 }
710 }
711}
712impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::get_index::GetIndexError, R>> for Error
713where
714 R: Send + Sync + std::fmt::Debug + 'static,
715{
716 fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::get_index::GetIndexError, R>) -> Self {
717 match err {
718 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
719 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
720 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
721 source: err.into(),
722 }),
723 }
724 }
725}
726impl From<crate::operation::get_index::GetIndexError> for Error {
727 fn from(err: crate::operation::get_index::GetIndexError) -> Self {
728 match err {
729 crate::operation::get_index::GetIndexError::InternalServerException(inner) => Error::InternalServerException(inner),
730 crate::operation::get_index::GetIndexError::ResourceNotFoundException(inner) => Error::ResourceNotFoundException(inner),
731 crate::operation::get_index::GetIndexError::ValidationException(inner) => Error::ValidationException(inner),
732 crate::operation::get_index::GetIndexError::Unhandled(inner) => Error::Unhandled(inner),
733 }
734 }
735}
736impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::get_policies_stats::GetPoliciesStatsError, R>> for Error
737where
738 R: Send + Sync + std::fmt::Debug + 'static,
739{
740 fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::get_policies_stats::GetPoliciesStatsError, R>) -> Self {
741 match err {
742 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
743 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
744 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
745 source: err.into(),
746 }),
747 }
748 }
749}
750impl From<crate::operation::get_policies_stats::GetPoliciesStatsError> for Error {
751 fn from(err: crate::operation::get_policies_stats::GetPoliciesStatsError) -> Self {
752 match err {
753 crate::operation::get_policies_stats::GetPoliciesStatsError::InternalServerException(inner) => Error::InternalServerException(inner),
754 crate::operation::get_policies_stats::GetPoliciesStatsError::Unhandled(inner) => Error::Unhandled(inner),
755 }
756 }
757}
758impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::get_security_config::GetSecurityConfigError, R>> for Error
759where
760 R: Send + Sync + std::fmt::Debug + 'static,
761{
762 fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::get_security_config::GetSecurityConfigError, R>) -> Self {
763 match err {
764 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
765 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
766 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
767 source: err.into(),
768 }),
769 }
770 }
771}
772impl From<crate::operation::get_security_config::GetSecurityConfigError> for Error {
773 fn from(err: crate::operation::get_security_config::GetSecurityConfigError) -> Self {
774 match err {
775 crate::operation::get_security_config::GetSecurityConfigError::InternalServerException(inner) => Error::InternalServerException(inner),
776 crate::operation::get_security_config::GetSecurityConfigError::ResourceNotFoundException(inner) => {
777 Error::ResourceNotFoundException(inner)
778 }
779 crate::operation::get_security_config::GetSecurityConfigError::ValidationException(inner) => Error::ValidationException(inner),
780 crate::operation::get_security_config::GetSecurityConfigError::Unhandled(inner) => Error::Unhandled(inner),
781 }
782 }
783}
784impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::get_security_policy::GetSecurityPolicyError, R>> for Error
785where
786 R: Send + Sync + std::fmt::Debug + 'static,
787{
788 fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::get_security_policy::GetSecurityPolicyError, R>) -> Self {
789 match err {
790 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
791 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
792 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
793 source: err.into(),
794 }),
795 }
796 }
797}
798impl From<crate::operation::get_security_policy::GetSecurityPolicyError> for Error {
799 fn from(err: crate::operation::get_security_policy::GetSecurityPolicyError) -> Self {
800 match err {
801 crate::operation::get_security_policy::GetSecurityPolicyError::InternalServerException(inner) => Error::InternalServerException(inner),
802 crate::operation::get_security_policy::GetSecurityPolicyError::ResourceNotFoundException(inner) => {
803 Error::ResourceNotFoundException(inner)
804 }
805 crate::operation::get_security_policy::GetSecurityPolicyError::ValidationException(inner) => Error::ValidationException(inner),
806 crate::operation::get_security_policy::GetSecurityPolicyError::Unhandled(inner) => Error::Unhandled(inner),
807 }
808 }
809}
810impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::list_access_policies::ListAccessPoliciesError, R>> for Error
811where
812 R: Send + Sync + std::fmt::Debug + 'static,
813{
814 fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::list_access_policies::ListAccessPoliciesError, R>) -> Self {
815 match err {
816 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
817 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
818 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
819 source: err.into(),
820 }),
821 }
822 }
823}
824impl From<crate::operation::list_access_policies::ListAccessPoliciesError> for Error {
825 fn from(err: crate::operation::list_access_policies::ListAccessPoliciesError) -> Self {
826 match err {
827 crate::operation::list_access_policies::ListAccessPoliciesError::InternalServerException(inner) => Error::InternalServerException(inner),
828 crate::operation::list_access_policies::ListAccessPoliciesError::ValidationException(inner) => Error::ValidationException(inner),
829 crate::operation::list_access_policies::ListAccessPoliciesError::Unhandled(inner) => Error::Unhandled(inner),
830 }
831 }
832}
833impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::list_collection_groups::ListCollectionGroupsError, R>> for Error
834where
835 R: Send + Sync + std::fmt::Debug + 'static,
836{
837 fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::list_collection_groups::ListCollectionGroupsError, R>) -> Self {
838 match err {
839 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
840 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
841 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
842 source: err.into(),
843 }),
844 }
845 }
846}
847impl From<crate::operation::list_collection_groups::ListCollectionGroupsError> for Error {
848 fn from(err: crate::operation::list_collection_groups::ListCollectionGroupsError) -> Self {
849 match err {
850 crate::operation::list_collection_groups::ListCollectionGroupsError::InternalServerException(inner) => {
851 Error::InternalServerException(inner)
852 }
853 crate::operation::list_collection_groups::ListCollectionGroupsError::ValidationException(inner) => Error::ValidationException(inner),
854 crate::operation::list_collection_groups::ListCollectionGroupsError::Unhandled(inner) => Error::Unhandled(inner),
855 }
856 }
857}
858impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::list_collections::ListCollectionsError, R>> for Error
859where
860 R: Send + Sync + std::fmt::Debug + 'static,
861{
862 fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::list_collections::ListCollectionsError, R>) -> Self {
863 match err {
864 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
865 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
866 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
867 source: err.into(),
868 }),
869 }
870 }
871}
872impl From<crate::operation::list_collections::ListCollectionsError> for Error {
873 fn from(err: crate::operation::list_collections::ListCollectionsError) -> Self {
874 match err {
875 crate::operation::list_collections::ListCollectionsError::InternalServerException(inner) => Error::InternalServerException(inner),
876 crate::operation::list_collections::ListCollectionsError::ValidationException(inner) => Error::ValidationException(inner),
877 crate::operation::list_collections::ListCollectionsError::Unhandled(inner) => Error::Unhandled(inner),
878 }
879 }
880}
881impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::list_lifecycle_policies::ListLifecyclePoliciesError, R>> for Error
882where
883 R: Send + Sync + std::fmt::Debug + 'static,
884{
885 fn from(
886 err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::list_lifecycle_policies::ListLifecyclePoliciesError, R>,
887 ) -> Self {
888 match err {
889 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
890 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
891 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
892 source: err.into(),
893 }),
894 }
895 }
896}
897impl From<crate::operation::list_lifecycle_policies::ListLifecyclePoliciesError> for Error {
898 fn from(err: crate::operation::list_lifecycle_policies::ListLifecyclePoliciesError) -> Self {
899 match err {
900 crate::operation::list_lifecycle_policies::ListLifecyclePoliciesError::InternalServerException(inner) => {
901 Error::InternalServerException(inner)
902 }
903 crate::operation::list_lifecycle_policies::ListLifecyclePoliciesError::ValidationException(inner) => Error::ValidationException(inner),
904 crate::operation::list_lifecycle_policies::ListLifecyclePoliciesError::Unhandled(inner) => Error::Unhandled(inner),
905 }
906 }
907}
908impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::list_security_configs::ListSecurityConfigsError, R>> for Error
909where
910 R: Send + Sync + std::fmt::Debug + 'static,
911{
912 fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::list_security_configs::ListSecurityConfigsError, R>) -> Self {
913 match err {
914 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
915 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
916 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
917 source: err.into(),
918 }),
919 }
920 }
921}
922impl From<crate::operation::list_security_configs::ListSecurityConfigsError> for Error {
923 fn from(err: crate::operation::list_security_configs::ListSecurityConfigsError) -> Self {
924 match err {
925 crate::operation::list_security_configs::ListSecurityConfigsError::InternalServerException(inner) => {
926 Error::InternalServerException(inner)
927 }
928 crate::operation::list_security_configs::ListSecurityConfigsError::ValidationException(inner) => Error::ValidationException(inner),
929 crate::operation::list_security_configs::ListSecurityConfigsError::Unhandled(inner) => Error::Unhandled(inner),
930 }
931 }
932}
933impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::list_security_policies::ListSecurityPoliciesError, R>> for Error
934where
935 R: Send + Sync + std::fmt::Debug + 'static,
936{
937 fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::list_security_policies::ListSecurityPoliciesError, R>) -> Self {
938 match err {
939 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
940 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
941 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
942 source: err.into(),
943 }),
944 }
945 }
946}
947impl From<crate::operation::list_security_policies::ListSecurityPoliciesError> for Error {
948 fn from(err: crate::operation::list_security_policies::ListSecurityPoliciesError) -> Self {
949 match err {
950 crate::operation::list_security_policies::ListSecurityPoliciesError::InternalServerException(inner) => {
951 Error::InternalServerException(inner)
952 }
953 crate::operation::list_security_policies::ListSecurityPoliciesError::ValidationException(inner) => Error::ValidationException(inner),
954 crate::operation::list_security_policies::ListSecurityPoliciesError::Unhandled(inner) => Error::Unhandled(inner),
955 }
956 }
957}
958impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::list_tags_for_resource::ListTagsForResourceError, R>> for Error
959where
960 R: Send + Sync + std::fmt::Debug + 'static,
961{
962 fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::list_tags_for_resource::ListTagsForResourceError, R>) -> Self {
963 match err {
964 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
965 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
966 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
967 source: err.into(),
968 }),
969 }
970 }
971}
972impl From<crate::operation::list_tags_for_resource::ListTagsForResourceError> for Error {
973 fn from(err: crate::operation::list_tags_for_resource::ListTagsForResourceError) -> Self {
974 match err {
975 crate::operation::list_tags_for_resource::ListTagsForResourceError::InternalServerException(inner) => {
976 Error::InternalServerException(inner)
977 }
978 crate::operation::list_tags_for_resource::ListTagsForResourceError::ResourceNotFoundException(inner) => {
979 Error::ResourceNotFoundException(inner)
980 }
981 crate::operation::list_tags_for_resource::ListTagsForResourceError::ValidationException(inner) => Error::ValidationException(inner),
982 crate::operation::list_tags_for_resource::ListTagsForResourceError::Unhandled(inner) => Error::Unhandled(inner),
983 }
984 }
985}
986impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::list_vpc_endpoints::ListVpcEndpointsError, R>> for Error
987where
988 R: Send + Sync + std::fmt::Debug + 'static,
989{
990 fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::list_vpc_endpoints::ListVpcEndpointsError, R>) -> Self {
991 match err {
992 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
993 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
994 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
995 source: err.into(),
996 }),
997 }
998 }
999}
1000impl From<crate::operation::list_vpc_endpoints::ListVpcEndpointsError> for Error {
1001 fn from(err: crate::operation::list_vpc_endpoints::ListVpcEndpointsError) -> Self {
1002 match err {
1003 crate::operation::list_vpc_endpoints::ListVpcEndpointsError::InternalServerException(inner) => Error::InternalServerException(inner),
1004 crate::operation::list_vpc_endpoints::ListVpcEndpointsError::ValidationException(inner) => Error::ValidationException(inner),
1005 crate::operation::list_vpc_endpoints::ListVpcEndpointsError::Unhandled(inner) => Error::Unhandled(inner),
1006 }
1007 }
1008}
1009impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::tag_resource::TagResourceError, R>> for Error
1010where
1011 R: Send + Sync + std::fmt::Debug + 'static,
1012{
1013 fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::tag_resource::TagResourceError, R>) -> Self {
1014 match err {
1015 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
1016 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
1017 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
1018 source: err.into(),
1019 }),
1020 }
1021 }
1022}
1023impl From<crate::operation::tag_resource::TagResourceError> for Error {
1024 fn from(err: crate::operation::tag_resource::TagResourceError) -> Self {
1025 match err {
1026 crate::operation::tag_resource::TagResourceError::ConflictException(inner) => Error::ConflictException(inner),
1027 crate::operation::tag_resource::TagResourceError::InternalServerException(inner) => Error::InternalServerException(inner),
1028 crate::operation::tag_resource::TagResourceError::ResourceNotFoundException(inner) => Error::ResourceNotFoundException(inner),
1029 crate::operation::tag_resource::TagResourceError::ServiceQuotaExceededException(inner) => Error::ServiceQuotaExceededException(inner),
1030 crate::operation::tag_resource::TagResourceError::ValidationException(inner) => Error::ValidationException(inner),
1031 crate::operation::tag_resource::TagResourceError::Unhandled(inner) => Error::Unhandled(inner),
1032 }
1033 }
1034}
1035impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::untag_resource::UntagResourceError, R>> for Error
1036where
1037 R: Send + Sync + std::fmt::Debug + 'static,
1038{
1039 fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::untag_resource::UntagResourceError, R>) -> Self {
1040 match err {
1041 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
1042 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
1043 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
1044 source: err.into(),
1045 }),
1046 }
1047 }
1048}
1049impl From<crate::operation::untag_resource::UntagResourceError> for Error {
1050 fn from(err: crate::operation::untag_resource::UntagResourceError) -> Self {
1051 match err {
1052 crate::operation::untag_resource::UntagResourceError::ConflictException(inner) => Error::ConflictException(inner),
1053 crate::operation::untag_resource::UntagResourceError::InternalServerException(inner) => Error::InternalServerException(inner),
1054 crate::operation::untag_resource::UntagResourceError::ResourceNotFoundException(inner) => Error::ResourceNotFoundException(inner),
1055 crate::operation::untag_resource::UntagResourceError::ValidationException(inner) => Error::ValidationException(inner),
1056 crate::operation::untag_resource::UntagResourceError::Unhandled(inner) => Error::Unhandled(inner),
1057 }
1058 }
1059}
1060impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::update_access_policy::UpdateAccessPolicyError, R>> for Error
1061where
1062 R: Send + Sync + std::fmt::Debug + 'static,
1063{
1064 fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::update_access_policy::UpdateAccessPolicyError, R>) -> Self {
1065 match err {
1066 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
1067 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
1068 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
1069 source: err.into(),
1070 }),
1071 }
1072 }
1073}
1074impl From<crate::operation::update_access_policy::UpdateAccessPolicyError> for Error {
1075 fn from(err: crate::operation::update_access_policy::UpdateAccessPolicyError) -> Self {
1076 match err {
1077 crate::operation::update_access_policy::UpdateAccessPolicyError::ConflictException(inner) => Error::ConflictException(inner),
1078 crate::operation::update_access_policy::UpdateAccessPolicyError::InternalServerException(inner) => Error::InternalServerException(inner),
1079 crate::operation::update_access_policy::UpdateAccessPolicyError::ResourceNotFoundException(inner) => {
1080 Error::ResourceNotFoundException(inner)
1081 }
1082 crate::operation::update_access_policy::UpdateAccessPolicyError::ValidationException(inner) => Error::ValidationException(inner),
1083 crate::operation::update_access_policy::UpdateAccessPolicyError::Unhandled(inner) => Error::Unhandled(inner),
1084 }
1085 }
1086}
1087impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::update_account_settings::UpdateAccountSettingsError, R>> for Error
1088where
1089 R: Send + Sync + std::fmt::Debug + 'static,
1090{
1091 fn from(
1092 err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::update_account_settings::UpdateAccountSettingsError, R>,
1093 ) -> Self {
1094 match err {
1095 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
1096 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
1097 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
1098 source: err.into(),
1099 }),
1100 }
1101 }
1102}
1103impl From<crate::operation::update_account_settings::UpdateAccountSettingsError> for Error {
1104 fn from(err: crate::operation::update_account_settings::UpdateAccountSettingsError) -> Self {
1105 match err {
1106 crate::operation::update_account_settings::UpdateAccountSettingsError::InternalServerException(inner) => {
1107 Error::InternalServerException(inner)
1108 }
1109 crate::operation::update_account_settings::UpdateAccountSettingsError::ServiceQuotaExceededException(inner) => {
1110 Error::ServiceQuotaExceededException(inner)
1111 }
1112 crate::operation::update_account_settings::UpdateAccountSettingsError::ValidationException(inner) => Error::ValidationException(inner),
1113 crate::operation::update_account_settings::UpdateAccountSettingsError::Unhandled(inner) => Error::Unhandled(inner),
1114 }
1115 }
1116}
1117impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::update_collection::UpdateCollectionError, R>> for Error
1118where
1119 R: Send + Sync + std::fmt::Debug + 'static,
1120{
1121 fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::update_collection::UpdateCollectionError, R>) -> Self {
1122 match err {
1123 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
1124 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
1125 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
1126 source: err.into(),
1127 }),
1128 }
1129 }
1130}
1131impl From<crate::operation::update_collection::UpdateCollectionError> for Error {
1132 fn from(err: crate::operation::update_collection::UpdateCollectionError) -> Self {
1133 match err {
1134 crate::operation::update_collection::UpdateCollectionError::ConflictException(inner) => Error::ConflictException(inner),
1135 crate::operation::update_collection::UpdateCollectionError::InternalServerException(inner) => Error::InternalServerException(inner),
1136 crate::operation::update_collection::UpdateCollectionError::ValidationException(inner) => Error::ValidationException(inner),
1137 crate::operation::update_collection::UpdateCollectionError::Unhandled(inner) => Error::Unhandled(inner),
1138 }
1139 }
1140}
1141impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::update_collection_group::UpdateCollectionGroupError, R>> for Error
1142where
1143 R: Send + Sync + std::fmt::Debug + 'static,
1144{
1145 fn from(
1146 err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::update_collection_group::UpdateCollectionGroupError, R>,
1147 ) -> Self {
1148 match err {
1149 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
1150 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
1151 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
1152 source: err.into(),
1153 }),
1154 }
1155 }
1156}
1157impl From<crate::operation::update_collection_group::UpdateCollectionGroupError> for Error {
1158 fn from(err: crate::operation::update_collection_group::UpdateCollectionGroupError) -> Self {
1159 match err {
1160 crate::operation::update_collection_group::UpdateCollectionGroupError::ConflictException(inner) => Error::ConflictException(inner),
1161 crate::operation::update_collection_group::UpdateCollectionGroupError::InternalServerException(inner) => {
1162 Error::InternalServerException(inner)
1163 }
1164 crate::operation::update_collection_group::UpdateCollectionGroupError::ServiceQuotaExceededException(inner) => {
1165 Error::ServiceQuotaExceededException(inner)
1166 }
1167 crate::operation::update_collection_group::UpdateCollectionGroupError::ValidationException(inner) => Error::ValidationException(inner),
1168 crate::operation::update_collection_group::UpdateCollectionGroupError::Unhandled(inner) => Error::Unhandled(inner),
1169 }
1170 }
1171}
1172impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::update_index::UpdateIndexError, R>> for Error
1173where
1174 R: Send + Sync + std::fmt::Debug + 'static,
1175{
1176 fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::update_index::UpdateIndexError, R>) -> Self {
1177 match err {
1178 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
1179 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
1180 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
1181 source: err.into(),
1182 }),
1183 }
1184 }
1185}
1186impl From<crate::operation::update_index::UpdateIndexError> for Error {
1187 fn from(err: crate::operation::update_index::UpdateIndexError) -> Self {
1188 match err {
1189 crate::operation::update_index::UpdateIndexError::InternalServerException(inner) => Error::InternalServerException(inner),
1190 crate::operation::update_index::UpdateIndexError::ResourceNotFoundException(inner) => Error::ResourceNotFoundException(inner),
1191 crate::operation::update_index::UpdateIndexError::ValidationException(inner) => Error::ValidationException(inner),
1192 crate::operation::update_index::UpdateIndexError::Unhandled(inner) => Error::Unhandled(inner),
1193 }
1194 }
1195}
1196impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::update_lifecycle_policy::UpdateLifecyclePolicyError, R>> for Error
1197where
1198 R: Send + Sync + std::fmt::Debug + 'static,
1199{
1200 fn from(
1201 err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::update_lifecycle_policy::UpdateLifecyclePolicyError, R>,
1202 ) -> Self {
1203 match err {
1204 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
1205 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
1206 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
1207 source: err.into(),
1208 }),
1209 }
1210 }
1211}
1212impl From<crate::operation::update_lifecycle_policy::UpdateLifecyclePolicyError> for Error {
1213 fn from(err: crate::operation::update_lifecycle_policy::UpdateLifecyclePolicyError) -> Self {
1214 match err {
1215 crate::operation::update_lifecycle_policy::UpdateLifecyclePolicyError::ConflictException(inner) => Error::ConflictException(inner),
1216 crate::operation::update_lifecycle_policy::UpdateLifecyclePolicyError::InternalServerException(inner) => {
1217 Error::InternalServerException(inner)
1218 }
1219 crate::operation::update_lifecycle_policy::UpdateLifecyclePolicyError::ResourceNotFoundException(inner) => {
1220 Error::ResourceNotFoundException(inner)
1221 }
1222 crate::operation::update_lifecycle_policy::UpdateLifecyclePolicyError::ServiceQuotaExceededException(inner) => {
1223 Error::ServiceQuotaExceededException(inner)
1224 }
1225 crate::operation::update_lifecycle_policy::UpdateLifecyclePolicyError::ValidationException(inner) => Error::ValidationException(inner),
1226 crate::operation::update_lifecycle_policy::UpdateLifecyclePolicyError::Unhandled(inner) => Error::Unhandled(inner),
1227 }
1228 }
1229}
1230impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::update_security_config::UpdateSecurityConfigError, R>> for Error
1231where
1232 R: Send + Sync + std::fmt::Debug + 'static,
1233{
1234 fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::update_security_config::UpdateSecurityConfigError, R>) -> Self {
1235 match err {
1236 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
1237 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
1238 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
1239 source: err.into(),
1240 }),
1241 }
1242 }
1243}
1244impl From<crate::operation::update_security_config::UpdateSecurityConfigError> for Error {
1245 fn from(err: crate::operation::update_security_config::UpdateSecurityConfigError) -> Self {
1246 match err {
1247 crate::operation::update_security_config::UpdateSecurityConfigError::ConflictException(inner) => Error::ConflictException(inner),
1248 crate::operation::update_security_config::UpdateSecurityConfigError::InternalServerException(inner) => {
1249 Error::InternalServerException(inner)
1250 }
1251 crate::operation::update_security_config::UpdateSecurityConfigError::ResourceNotFoundException(inner) => {
1252 Error::ResourceNotFoundException(inner)
1253 }
1254 crate::operation::update_security_config::UpdateSecurityConfigError::ValidationException(inner) => Error::ValidationException(inner),
1255 crate::operation::update_security_config::UpdateSecurityConfigError::Unhandled(inner) => Error::Unhandled(inner),
1256 }
1257 }
1258}
1259impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::update_security_policy::UpdateSecurityPolicyError, R>> for Error
1260where
1261 R: Send + Sync + std::fmt::Debug + 'static,
1262{
1263 fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::update_security_policy::UpdateSecurityPolicyError, R>) -> Self {
1264 match err {
1265 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
1266 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
1267 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
1268 source: err.into(),
1269 }),
1270 }
1271 }
1272}
1273impl From<crate::operation::update_security_policy::UpdateSecurityPolicyError> for Error {
1274 fn from(err: crate::operation::update_security_policy::UpdateSecurityPolicyError) -> Self {
1275 match err {
1276 crate::operation::update_security_policy::UpdateSecurityPolicyError::ConflictException(inner) => Error::ConflictException(inner),
1277 crate::operation::update_security_policy::UpdateSecurityPolicyError::InternalServerException(inner) => {
1278 Error::InternalServerException(inner)
1279 }
1280 crate::operation::update_security_policy::UpdateSecurityPolicyError::ResourceNotFoundException(inner) => {
1281 Error::ResourceNotFoundException(inner)
1282 }
1283 crate::operation::update_security_policy::UpdateSecurityPolicyError::ServiceQuotaExceededException(inner) => {
1284 Error::ServiceQuotaExceededException(inner)
1285 }
1286 crate::operation::update_security_policy::UpdateSecurityPolicyError::ValidationException(inner) => Error::ValidationException(inner),
1287 crate::operation::update_security_policy::UpdateSecurityPolicyError::Unhandled(inner) => Error::Unhandled(inner),
1288 }
1289 }
1290}
1291impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::update_vpc_endpoint::UpdateVpcEndpointError, R>> for Error
1292where
1293 R: Send + Sync + std::fmt::Debug + 'static,
1294{
1295 fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::update_vpc_endpoint::UpdateVpcEndpointError, R>) -> Self {
1296 match err {
1297 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
1298 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
1299 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
1300 source: err.into(),
1301 }),
1302 }
1303 }
1304}
1305impl From<crate::operation::update_vpc_endpoint::UpdateVpcEndpointError> for Error {
1306 fn from(err: crate::operation::update_vpc_endpoint::UpdateVpcEndpointError) -> Self {
1307 match err {
1308 crate::operation::update_vpc_endpoint::UpdateVpcEndpointError::ConflictException(inner) => Error::ConflictException(inner),
1309 crate::operation::update_vpc_endpoint::UpdateVpcEndpointError::InternalServerException(inner) => Error::InternalServerException(inner),
1310 crate::operation::update_vpc_endpoint::UpdateVpcEndpointError::ValidationException(inner) => Error::ValidationException(inner),
1311 crate::operation::update_vpc_endpoint::UpdateVpcEndpointError::Unhandled(inner) => Error::Unhandled(inner),
1312 }
1313 }
1314}
1315impl ::std::error::Error for Error {
1316 fn source(&self) -> std::option::Option<&(dyn ::std::error::Error + 'static)> {
1317 match self {
1318 Error::ConflictException(inner) => inner.source(),
1319 Error::InternalServerException(inner) => inner.source(),
1320 Error::OcuLimitExceededException(inner) => inner.source(),
1321 Error::ResourceNotFoundException(inner) => inner.source(),
1322 Error::ServiceQuotaExceededException(inner) => inner.source(),
1323 Error::ValidationException(inner) => inner.source(),
1324 Error::Unhandled(inner) => ::std::option::Option::Some(&*inner.source),
1325 }
1326 }
1327}
1328impl ::aws_types::request_id::RequestId for Error {
1329 fn request_id(&self) -> Option<&str> {
1330 match self {
1331 Self::ConflictException(e) => e.request_id(),
1332 Self::InternalServerException(e) => e.request_id(),
1333 Self::OcuLimitExceededException(e) => e.request_id(),
1334 Self::ResourceNotFoundException(e) => e.request_id(),
1335 Self::ServiceQuotaExceededException(e) => e.request_id(),
1336 Self::ValidationException(e) => e.request_id(),
1337 Self::Unhandled(e) => e.meta.request_id(),
1338 }
1339 }
1340}