aws_sdk_cognitosync/
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    /// An exception thrown when a bulk publish operation is requested less than 24 hours after a previous bulk publish operation completed successfully.
7    AlreadyStreamedException(crate::types::error::AlreadyStreamedException),
8    /// <p>Thrown if there are parallel requests to modify a resource.</p>
9    ConcurrentModificationException(crate::types::error::ConcurrentModificationException),
10    /// An exception thrown when there is an IN_PROGRESS bulk publish operation for the given identity pool.
11    DuplicateRequestException(crate::types::error::DuplicateRequestException),
12    /// Indicates an internal service error.
13    InternalErrorException(crate::types::error::InternalErrorException),
14    #[allow(missing_docs)] // documentation missing in model
15    InvalidConfigurationException(crate::types::error::InvalidConfigurationException),
16    /// <p>The AWS Lambda function returned invalid output or an exception.</p>
17    InvalidLambdaFunctionOutputException(crate::types::error::InvalidLambdaFunctionOutputException),
18    /// Thrown when a request parameter does not comply with the associated constraints.
19    InvalidParameterException(crate::types::error::InvalidParameterException),
20    /// <p>AWS Lambda throttled your account, please contact AWS Support</p>
21    LambdaThrottledException(crate::types::error::LambdaThrottledException),
22    /// Thrown when the limit on the number of objects or operations has been exceeded.
23    LimitExceededException(crate::types::error::LimitExceededException),
24    /// Thrown when a user is not authorized to access the requested resource.
25    NotAuthorizedException(crate::types::error::NotAuthorizedException),
26    /// Thrown if an update can't be applied because the resource was changed by another call and this would result in a conflict.
27    ResourceConflictException(crate::types::error::ResourceConflictException),
28    /// Thrown if the resource doesn't exist.
29    ResourceNotFoundException(crate::types::error::ResourceNotFoundException),
30    /// Thrown if the request is throttled.
31    TooManyRequestsException(crate::types::error::TooManyRequestsException),
32    /// An unexpected error occurred (e.g., invalid JSON returned by the service or an unknown error code).
33    #[deprecated(note = "Matching `Unhandled` directly is not forwards compatible. Instead, match using a \
34    variable wildcard pattern and check `.code()`:
35     \
36    &nbsp;&nbsp;&nbsp;`err if err.code() == Some(\"SpecificExceptionCode\") => { /* handle the error */ }`
37     \
38    See [`ProvideErrorMetadata`](#impl-ProvideErrorMetadata-for-Error) for what information is available for the error.")]
39    Unhandled(crate::error::sealed_unhandled::Unhandled),
40}
41impl ::std::fmt::Display for Error {
42    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
43        match self {
44            Error::AlreadyStreamedException(inner) => inner.fmt(f),
45            Error::ConcurrentModificationException(inner) => inner.fmt(f),
46            Error::DuplicateRequestException(inner) => inner.fmt(f),
47            Error::InternalErrorException(inner) => inner.fmt(f),
48            Error::InvalidConfigurationException(inner) => inner.fmt(f),
49            Error::InvalidLambdaFunctionOutputException(inner) => inner.fmt(f),
50            Error::InvalidParameterException(inner) => inner.fmt(f),
51            Error::LambdaThrottledException(inner) => inner.fmt(f),
52            Error::LimitExceededException(inner) => inner.fmt(f),
53            Error::NotAuthorizedException(inner) => inner.fmt(f),
54            Error::ResourceConflictException(inner) => inner.fmt(f),
55            Error::ResourceNotFoundException(inner) => inner.fmt(f),
56            Error::TooManyRequestsException(inner) => inner.fmt(f),
57            Error::Unhandled(_) => {
58                if let ::std::option::Option::Some(code) = ::aws_smithy_types::error::metadata::ProvideErrorMetadata::code(self) {
59                    write!(f, "unhandled error ({code})")
60                } else {
61                    f.write_str("unhandled error")
62                }
63            }
64        }
65    }
66}
67impl From<::aws_smithy_types::error::operation::BuildError> for Error {
68    fn from(value: ::aws_smithy_types::error::operation::BuildError) -> Self {
69        Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
70            source: value.into(),
71            meta: ::std::default::Default::default(),
72        })
73    }
74}
75impl ::aws_smithy_types::error::metadata::ProvideErrorMetadata for Error {
76    fn meta(&self) -> &::aws_smithy_types::error::metadata::ErrorMetadata {
77        match self {
78            Self::AlreadyStreamedException(inner) => inner.meta(),
79            Self::ConcurrentModificationException(inner) => inner.meta(),
80            Self::DuplicateRequestException(inner) => inner.meta(),
81            Self::InternalErrorException(inner) => inner.meta(),
82            Self::InvalidConfigurationException(inner) => inner.meta(),
83            Self::InvalidLambdaFunctionOutputException(inner) => inner.meta(),
84            Self::InvalidParameterException(inner) => inner.meta(),
85            Self::LambdaThrottledException(inner) => inner.meta(),
86            Self::LimitExceededException(inner) => inner.meta(),
87            Self::NotAuthorizedException(inner) => inner.meta(),
88            Self::ResourceConflictException(inner) => inner.meta(),
89            Self::ResourceNotFoundException(inner) => inner.meta(),
90            Self::TooManyRequestsException(inner) => inner.meta(),
91            Self::Unhandled(inner) => &inner.meta,
92        }
93    }
94}
95impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::bulk_publish::BulkPublishError, R>> for Error
96where
97    R: Send + Sync + std::fmt::Debug + 'static,
98{
99    fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::bulk_publish::BulkPublishError, R>) -> Self {
100        match err {
101            ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
102            _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
103                meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
104                source: err.into(),
105            }),
106        }
107    }
108}
109impl From<crate::operation::bulk_publish::BulkPublishError> for Error {
110    fn from(err: crate::operation::bulk_publish::BulkPublishError) -> Self {
111        match err {
112            crate::operation::bulk_publish::BulkPublishError::AlreadyStreamedException(inner) => Error::AlreadyStreamedException(inner),
113            crate::operation::bulk_publish::BulkPublishError::DuplicateRequestException(inner) => Error::DuplicateRequestException(inner),
114            crate::operation::bulk_publish::BulkPublishError::InternalErrorException(inner) => Error::InternalErrorException(inner),
115            crate::operation::bulk_publish::BulkPublishError::InvalidParameterException(inner) => Error::InvalidParameterException(inner),
116            crate::operation::bulk_publish::BulkPublishError::NotAuthorizedException(inner) => Error::NotAuthorizedException(inner),
117            crate::operation::bulk_publish::BulkPublishError::ResourceNotFoundException(inner) => Error::ResourceNotFoundException(inner),
118            crate::operation::bulk_publish::BulkPublishError::Unhandled(inner) => Error::Unhandled(inner),
119        }
120    }
121}
122impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::delete_dataset::DeleteDatasetError, R>> for Error
123where
124    R: Send + Sync + std::fmt::Debug + 'static,
125{
126    fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::delete_dataset::DeleteDatasetError, R>) -> Self {
127        match err {
128            ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
129            _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
130                meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
131                source: err.into(),
132            }),
133        }
134    }
135}
136impl From<crate::operation::delete_dataset::DeleteDatasetError> for Error {
137    fn from(err: crate::operation::delete_dataset::DeleteDatasetError) -> Self {
138        match err {
139            crate::operation::delete_dataset::DeleteDatasetError::InternalErrorException(inner) => Error::InternalErrorException(inner),
140            crate::operation::delete_dataset::DeleteDatasetError::InvalidParameterException(inner) => Error::InvalidParameterException(inner),
141            crate::operation::delete_dataset::DeleteDatasetError::NotAuthorizedException(inner) => Error::NotAuthorizedException(inner),
142            crate::operation::delete_dataset::DeleteDatasetError::ResourceConflictException(inner) => Error::ResourceConflictException(inner),
143            crate::operation::delete_dataset::DeleteDatasetError::ResourceNotFoundException(inner) => Error::ResourceNotFoundException(inner),
144            crate::operation::delete_dataset::DeleteDatasetError::TooManyRequestsException(inner) => Error::TooManyRequestsException(inner),
145            crate::operation::delete_dataset::DeleteDatasetError::Unhandled(inner) => Error::Unhandled(inner),
146        }
147    }
148}
149impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::describe_dataset::DescribeDatasetError, R>> for Error
150where
151    R: Send + Sync + std::fmt::Debug + 'static,
152{
153    fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::describe_dataset::DescribeDatasetError, R>) -> Self {
154        match err {
155            ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
156            _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
157                meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
158                source: err.into(),
159            }),
160        }
161    }
162}
163impl From<crate::operation::describe_dataset::DescribeDatasetError> for Error {
164    fn from(err: crate::operation::describe_dataset::DescribeDatasetError) -> Self {
165        match err {
166            crate::operation::describe_dataset::DescribeDatasetError::InternalErrorException(inner) => Error::InternalErrorException(inner),
167            crate::operation::describe_dataset::DescribeDatasetError::InvalidParameterException(inner) => Error::InvalidParameterException(inner),
168            crate::operation::describe_dataset::DescribeDatasetError::NotAuthorizedException(inner) => Error::NotAuthorizedException(inner),
169            crate::operation::describe_dataset::DescribeDatasetError::ResourceNotFoundException(inner) => Error::ResourceNotFoundException(inner),
170            crate::operation::describe_dataset::DescribeDatasetError::TooManyRequestsException(inner) => Error::TooManyRequestsException(inner),
171            crate::operation::describe_dataset::DescribeDatasetError::Unhandled(inner) => Error::Unhandled(inner),
172        }
173    }
174}
175impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::describe_identity_pool_usage::DescribeIdentityPoolUsageError, R>>
176    for Error
177where
178    R: Send + Sync + std::fmt::Debug + 'static,
179{
180    fn from(
181        err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::describe_identity_pool_usage::DescribeIdentityPoolUsageError, R>,
182    ) -> Self {
183        match err {
184            ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
185            _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
186                meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
187                source: err.into(),
188            }),
189        }
190    }
191}
192impl From<crate::operation::describe_identity_pool_usage::DescribeIdentityPoolUsageError> for Error {
193    fn from(err: crate::operation::describe_identity_pool_usage::DescribeIdentityPoolUsageError) -> Self {
194        match err {
195            crate::operation::describe_identity_pool_usage::DescribeIdentityPoolUsageError::InternalErrorException(inner) => {
196                Error::InternalErrorException(inner)
197            }
198            crate::operation::describe_identity_pool_usage::DescribeIdentityPoolUsageError::InvalidParameterException(inner) => {
199                Error::InvalidParameterException(inner)
200            }
201            crate::operation::describe_identity_pool_usage::DescribeIdentityPoolUsageError::NotAuthorizedException(inner) => {
202                Error::NotAuthorizedException(inner)
203            }
204            crate::operation::describe_identity_pool_usage::DescribeIdentityPoolUsageError::ResourceNotFoundException(inner) => {
205                Error::ResourceNotFoundException(inner)
206            }
207            crate::operation::describe_identity_pool_usage::DescribeIdentityPoolUsageError::TooManyRequestsException(inner) => {
208                Error::TooManyRequestsException(inner)
209            }
210            crate::operation::describe_identity_pool_usage::DescribeIdentityPoolUsageError::Unhandled(inner) => Error::Unhandled(inner),
211        }
212    }
213}
214impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::describe_identity_usage::DescribeIdentityUsageError, R>> for Error
215where
216    R: Send + Sync + std::fmt::Debug + 'static,
217{
218    fn from(
219        err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::describe_identity_usage::DescribeIdentityUsageError, R>,
220    ) -> Self {
221        match err {
222            ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
223            _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
224                meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
225                source: err.into(),
226            }),
227        }
228    }
229}
230impl From<crate::operation::describe_identity_usage::DescribeIdentityUsageError> for Error {
231    fn from(err: crate::operation::describe_identity_usage::DescribeIdentityUsageError) -> Self {
232        match err {
233            crate::operation::describe_identity_usage::DescribeIdentityUsageError::InternalErrorException(inner) => {
234                Error::InternalErrorException(inner)
235            }
236            crate::operation::describe_identity_usage::DescribeIdentityUsageError::InvalidParameterException(inner) => {
237                Error::InvalidParameterException(inner)
238            }
239            crate::operation::describe_identity_usage::DescribeIdentityUsageError::NotAuthorizedException(inner) => {
240                Error::NotAuthorizedException(inner)
241            }
242            crate::operation::describe_identity_usage::DescribeIdentityUsageError::ResourceNotFoundException(inner) => {
243                Error::ResourceNotFoundException(inner)
244            }
245            crate::operation::describe_identity_usage::DescribeIdentityUsageError::TooManyRequestsException(inner) => {
246                Error::TooManyRequestsException(inner)
247            }
248            crate::operation::describe_identity_usage::DescribeIdentityUsageError::Unhandled(inner) => Error::Unhandled(inner),
249        }
250    }
251}
252impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::get_bulk_publish_details::GetBulkPublishDetailsError, R>> for Error
253where
254    R: Send + Sync + std::fmt::Debug + 'static,
255{
256    fn from(
257        err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::get_bulk_publish_details::GetBulkPublishDetailsError, R>,
258    ) -> Self {
259        match err {
260            ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
261            _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
262                meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
263                source: err.into(),
264            }),
265        }
266    }
267}
268impl From<crate::operation::get_bulk_publish_details::GetBulkPublishDetailsError> for Error {
269    fn from(err: crate::operation::get_bulk_publish_details::GetBulkPublishDetailsError) -> Self {
270        match err {
271            crate::operation::get_bulk_publish_details::GetBulkPublishDetailsError::InternalErrorException(inner) => {
272                Error::InternalErrorException(inner)
273            }
274            crate::operation::get_bulk_publish_details::GetBulkPublishDetailsError::InvalidParameterException(inner) => {
275                Error::InvalidParameterException(inner)
276            }
277            crate::operation::get_bulk_publish_details::GetBulkPublishDetailsError::NotAuthorizedException(inner) => {
278                Error::NotAuthorizedException(inner)
279            }
280            crate::operation::get_bulk_publish_details::GetBulkPublishDetailsError::ResourceNotFoundException(inner) => {
281                Error::ResourceNotFoundException(inner)
282            }
283            crate::operation::get_bulk_publish_details::GetBulkPublishDetailsError::Unhandled(inner) => Error::Unhandled(inner),
284        }
285    }
286}
287impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::get_cognito_events::GetCognitoEventsError, R>> for Error
288where
289    R: Send + Sync + std::fmt::Debug + 'static,
290{
291    fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::get_cognito_events::GetCognitoEventsError, R>) -> Self {
292        match err {
293            ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
294            _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
295                meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
296                source: err.into(),
297            }),
298        }
299    }
300}
301impl From<crate::operation::get_cognito_events::GetCognitoEventsError> for Error {
302    fn from(err: crate::operation::get_cognito_events::GetCognitoEventsError) -> Self {
303        match err {
304            crate::operation::get_cognito_events::GetCognitoEventsError::InternalErrorException(inner) => Error::InternalErrorException(inner),
305            crate::operation::get_cognito_events::GetCognitoEventsError::InvalidParameterException(inner) => Error::InvalidParameterException(inner),
306            crate::operation::get_cognito_events::GetCognitoEventsError::NotAuthorizedException(inner) => Error::NotAuthorizedException(inner),
307            crate::operation::get_cognito_events::GetCognitoEventsError::ResourceNotFoundException(inner) => Error::ResourceNotFoundException(inner),
308            crate::operation::get_cognito_events::GetCognitoEventsError::TooManyRequestsException(inner) => Error::TooManyRequestsException(inner),
309            crate::operation::get_cognito_events::GetCognitoEventsError::Unhandled(inner) => Error::Unhandled(inner),
310        }
311    }
312}
313impl<R>
314    From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::get_identity_pool_configuration::GetIdentityPoolConfigurationError, R>>
315    for Error
316where
317    R: Send + Sync + std::fmt::Debug + 'static,
318{
319    fn from(
320        err: ::aws_smithy_runtime_api::client::result::SdkError<
321            crate::operation::get_identity_pool_configuration::GetIdentityPoolConfigurationError,
322            R,
323        >,
324    ) -> Self {
325        match err {
326            ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
327            _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
328                meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
329                source: err.into(),
330            }),
331        }
332    }
333}
334impl From<crate::operation::get_identity_pool_configuration::GetIdentityPoolConfigurationError> for Error {
335    fn from(err: crate::operation::get_identity_pool_configuration::GetIdentityPoolConfigurationError) -> Self {
336        match err {
337            crate::operation::get_identity_pool_configuration::GetIdentityPoolConfigurationError::InternalErrorException(inner) => {
338                Error::InternalErrorException(inner)
339            }
340            crate::operation::get_identity_pool_configuration::GetIdentityPoolConfigurationError::InvalidParameterException(inner) => {
341                Error::InvalidParameterException(inner)
342            }
343            crate::operation::get_identity_pool_configuration::GetIdentityPoolConfigurationError::NotAuthorizedException(inner) => {
344                Error::NotAuthorizedException(inner)
345            }
346            crate::operation::get_identity_pool_configuration::GetIdentityPoolConfigurationError::ResourceNotFoundException(inner) => {
347                Error::ResourceNotFoundException(inner)
348            }
349            crate::operation::get_identity_pool_configuration::GetIdentityPoolConfigurationError::TooManyRequestsException(inner) => {
350                Error::TooManyRequestsException(inner)
351            }
352            crate::operation::get_identity_pool_configuration::GetIdentityPoolConfigurationError::Unhandled(inner) => Error::Unhandled(inner),
353        }
354    }
355}
356impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::list_datasets::ListDatasetsError, R>> for Error
357where
358    R: Send + Sync + std::fmt::Debug + 'static,
359{
360    fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::list_datasets::ListDatasetsError, R>) -> Self {
361        match err {
362            ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
363            _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
364                meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
365                source: err.into(),
366            }),
367        }
368    }
369}
370impl From<crate::operation::list_datasets::ListDatasetsError> for Error {
371    fn from(err: crate::operation::list_datasets::ListDatasetsError) -> Self {
372        match err {
373            crate::operation::list_datasets::ListDatasetsError::InternalErrorException(inner) => Error::InternalErrorException(inner),
374            crate::operation::list_datasets::ListDatasetsError::InvalidParameterException(inner) => Error::InvalidParameterException(inner),
375            crate::operation::list_datasets::ListDatasetsError::NotAuthorizedException(inner) => Error::NotAuthorizedException(inner),
376            crate::operation::list_datasets::ListDatasetsError::TooManyRequestsException(inner) => Error::TooManyRequestsException(inner),
377            crate::operation::list_datasets::ListDatasetsError::Unhandled(inner) => Error::Unhandled(inner),
378        }
379    }
380}
381impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::list_identity_pool_usage::ListIdentityPoolUsageError, R>> for Error
382where
383    R: Send + Sync + std::fmt::Debug + 'static,
384{
385    fn from(
386        err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::list_identity_pool_usage::ListIdentityPoolUsageError, R>,
387    ) -> Self {
388        match err {
389            ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
390            _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
391                meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
392                source: err.into(),
393            }),
394        }
395    }
396}
397impl From<crate::operation::list_identity_pool_usage::ListIdentityPoolUsageError> for Error {
398    fn from(err: crate::operation::list_identity_pool_usage::ListIdentityPoolUsageError) -> Self {
399        match err {
400            crate::operation::list_identity_pool_usage::ListIdentityPoolUsageError::InternalErrorException(inner) => {
401                Error::InternalErrorException(inner)
402            }
403            crate::operation::list_identity_pool_usage::ListIdentityPoolUsageError::InvalidParameterException(inner) => {
404                Error::InvalidParameterException(inner)
405            }
406            crate::operation::list_identity_pool_usage::ListIdentityPoolUsageError::NotAuthorizedException(inner) => {
407                Error::NotAuthorizedException(inner)
408            }
409            crate::operation::list_identity_pool_usage::ListIdentityPoolUsageError::TooManyRequestsException(inner) => {
410                Error::TooManyRequestsException(inner)
411            }
412            crate::operation::list_identity_pool_usage::ListIdentityPoolUsageError::Unhandled(inner) => Error::Unhandled(inner),
413        }
414    }
415}
416impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::list_records::ListRecordsError, R>> for Error
417where
418    R: Send + Sync + std::fmt::Debug + 'static,
419{
420    fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::list_records::ListRecordsError, R>) -> Self {
421        match err {
422            ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
423            _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
424                meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
425                source: err.into(),
426            }),
427        }
428    }
429}
430impl From<crate::operation::list_records::ListRecordsError> for Error {
431    fn from(err: crate::operation::list_records::ListRecordsError) -> Self {
432        match err {
433            crate::operation::list_records::ListRecordsError::InternalErrorException(inner) => Error::InternalErrorException(inner),
434            crate::operation::list_records::ListRecordsError::InvalidParameterException(inner) => Error::InvalidParameterException(inner),
435            crate::operation::list_records::ListRecordsError::NotAuthorizedException(inner) => Error::NotAuthorizedException(inner),
436            crate::operation::list_records::ListRecordsError::TooManyRequestsException(inner) => Error::TooManyRequestsException(inner),
437            crate::operation::list_records::ListRecordsError::Unhandled(inner) => Error::Unhandled(inner),
438        }
439    }
440}
441impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::register_device::RegisterDeviceError, R>> for Error
442where
443    R: Send + Sync + std::fmt::Debug + 'static,
444{
445    fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::register_device::RegisterDeviceError, R>) -> Self {
446        match err {
447            ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
448            _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
449                meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
450                source: err.into(),
451            }),
452        }
453    }
454}
455impl From<crate::operation::register_device::RegisterDeviceError> for Error {
456    fn from(err: crate::operation::register_device::RegisterDeviceError) -> Self {
457        match err {
458            crate::operation::register_device::RegisterDeviceError::InternalErrorException(inner) => Error::InternalErrorException(inner),
459            crate::operation::register_device::RegisterDeviceError::InvalidConfigurationException(inner) => {
460                Error::InvalidConfigurationException(inner)
461            }
462            crate::operation::register_device::RegisterDeviceError::InvalidParameterException(inner) => Error::InvalidParameterException(inner),
463            crate::operation::register_device::RegisterDeviceError::NotAuthorizedException(inner) => Error::NotAuthorizedException(inner),
464            crate::operation::register_device::RegisterDeviceError::ResourceNotFoundException(inner) => Error::ResourceNotFoundException(inner),
465            crate::operation::register_device::RegisterDeviceError::TooManyRequestsException(inner) => Error::TooManyRequestsException(inner),
466            crate::operation::register_device::RegisterDeviceError::Unhandled(inner) => Error::Unhandled(inner),
467        }
468    }
469}
470impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::set_cognito_events::SetCognitoEventsError, R>> for Error
471where
472    R: Send + Sync + std::fmt::Debug + 'static,
473{
474    fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::set_cognito_events::SetCognitoEventsError, R>) -> Self {
475        match err {
476            ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
477            _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
478                meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
479                source: err.into(),
480            }),
481        }
482    }
483}
484impl From<crate::operation::set_cognito_events::SetCognitoEventsError> for Error {
485    fn from(err: crate::operation::set_cognito_events::SetCognitoEventsError) -> Self {
486        match err {
487            crate::operation::set_cognito_events::SetCognitoEventsError::InternalErrorException(inner) => Error::InternalErrorException(inner),
488            crate::operation::set_cognito_events::SetCognitoEventsError::InvalidParameterException(inner) => Error::InvalidParameterException(inner),
489            crate::operation::set_cognito_events::SetCognitoEventsError::NotAuthorizedException(inner) => Error::NotAuthorizedException(inner),
490            crate::operation::set_cognito_events::SetCognitoEventsError::ResourceNotFoundException(inner) => Error::ResourceNotFoundException(inner),
491            crate::operation::set_cognito_events::SetCognitoEventsError::TooManyRequestsException(inner) => Error::TooManyRequestsException(inner),
492            crate::operation::set_cognito_events::SetCognitoEventsError::Unhandled(inner) => Error::Unhandled(inner),
493        }
494    }
495}
496impl<R>
497    From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::set_identity_pool_configuration::SetIdentityPoolConfigurationError, R>>
498    for Error
499where
500    R: Send + Sync + std::fmt::Debug + 'static,
501{
502    fn from(
503        err: ::aws_smithy_runtime_api::client::result::SdkError<
504            crate::operation::set_identity_pool_configuration::SetIdentityPoolConfigurationError,
505            R,
506        >,
507    ) -> Self {
508        match err {
509            ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
510            _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
511                meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
512                source: err.into(),
513            }),
514        }
515    }
516}
517impl From<crate::operation::set_identity_pool_configuration::SetIdentityPoolConfigurationError> for Error {
518    fn from(err: crate::operation::set_identity_pool_configuration::SetIdentityPoolConfigurationError) -> Self {
519        match err {
520            crate::operation::set_identity_pool_configuration::SetIdentityPoolConfigurationError::ConcurrentModificationException(inner) => {
521                Error::ConcurrentModificationException(inner)
522            }
523            crate::operation::set_identity_pool_configuration::SetIdentityPoolConfigurationError::InternalErrorException(inner) => {
524                Error::InternalErrorException(inner)
525            }
526            crate::operation::set_identity_pool_configuration::SetIdentityPoolConfigurationError::InvalidParameterException(inner) => {
527                Error::InvalidParameterException(inner)
528            }
529            crate::operation::set_identity_pool_configuration::SetIdentityPoolConfigurationError::NotAuthorizedException(inner) => {
530                Error::NotAuthorizedException(inner)
531            }
532            crate::operation::set_identity_pool_configuration::SetIdentityPoolConfigurationError::ResourceNotFoundException(inner) => {
533                Error::ResourceNotFoundException(inner)
534            }
535            crate::operation::set_identity_pool_configuration::SetIdentityPoolConfigurationError::TooManyRequestsException(inner) => {
536                Error::TooManyRequestsException(inner)
537            }
538            crate::operation::set_identity_pool_configuration::SetIdentityPoolConfigurationError::Unhandled(inner) => Error::Unhandled(inner),
539        }
540    }
541}
542impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::subscribe_to_dataset::SubscribeToDatasetError, R>> for Error
543where
544    R: Send + Sync + std::fmt::Debug + 'static,
545{
546    fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::subscribe_to_dataset::SubscribeToDatasetError, R>) -> Self {
547        match err {
548            ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
549            _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
550                meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
551                source: err.into(),
552            }),
553        }
554    }
555}
556impl From<crate::operation::subscribe_to_dataset::SubscribeToDatasetError> for Error {
557    fn from(err: crate::operation::subscribe_to_dataset::SubscribeToDatasetError) -> Self {
558        match err {
559            crate::operation::subscribe_to_dataset::SubscribeToDatasetError::InternalErrorException(inner) => Error::InternalErrorException(inner),
560            crate::operation::subscribe_to_dataset::SubscribeToDatasetError::InvalidConfigurationException(inner) => {
561                Error::InvalidConfigurationException(inner)
562            }
563            crate::operation::subscribe_to_dataset::SubscribeToDatasetError::InvalidParameterException(inner) => {
564                Error::InvalidParameterException(inner)
565            }
566            crate::operation::subscribe_to_dataset::SubscribeToDatasetError::NotAuthorizedException(inner) => Error::NotAuthorizedException(inner),
567            crate::operation::subscribe_to_dataset::SubscribeToDatasetError::ResourceNotFoundException(inner) => {
568                Error::ResourceNotFoundException(inner)
569            }
570            crate::operation::subscribe_to_dataset::SubscribeToDatasetError::TooManyRequestsException(inner) => {
571                Error::TooManyRequestsException(inner)
572            }
573            crate::operation::subscribe_to_dataset::SubscribeToDatasetError::Unhandled(inner) => Error::Unhandled(inner),
574        }
575    }
576}
577impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::unsubscribe_from_dataset::UnsubscribeFromDatasetError, R>> for Error
578where
579    R: Send + Sync + std::fmt::Debug + 'static,
580{
581    fn from(
582        err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::unsubscribe_from_dataset::UnsubscribeFromDatasetError, R>,
583    ) -> Self {
584        match err {
585            ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
586            _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
587                meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
588                source: err.into(),
589            }),
590        }
591    }
592}
593impl From<crate::operation::unsubscribe_from_dataset::UnsubscribeFromDatasetError> for Error {
594    fn from(err: crate::operation::unsubscribe_from_dataset::UnsubscribeFromDatasetError) -> Self {
595        match err {
596            crate::operation::unsubscribe_from_dataset::UnsubscribeFromDatasetError::InternalErrorException(inner) => {
597                Error::InternalErrorException(inner)
598            }
599            crate::operation::unsubscribe_from_dataset::UnsubscribeFromDatasetError::InvalidConfigurationException(inner) => {
600                Error::InvalidConfigurationException(inner)
601            }
602            crate::operation::unsubscribe_from_dataset::UnsubscribeFromDatasetError::InvalidParameterException(inner) => {
603                Error::InvalidParameterException(inner)
604            }
605            crate::operation::unsubscribe_from_dataset::UnsubscribeFromDatasetError::NotAuthorizedException(inner) => {
606                Error::NotAuthorizedException(inner)
607            }
608            crate::operation::unsubscribe_from_dataset::UnsubscribeFromDatasetError::ResourceNotFoundException(inner) => {
609                Error::ResourceNotFoundException(inner)
610            }
611            crate::operation::unsubscribe_from_dataset::UnsubscribeFromDatasetError::TooManyRequestsException(inner) => {
612                Error::TooManyRequestsException(inner)
613            }
614            crate::operation::unsubscribe_from_dataset::UnsubscribeFromDatasetError::Unhandled(inner) => Error::Unhandled(inner),
615        }
616    }
617}
618impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::update_records::UpdateRecordsError, R>> for Error
619where
620    R: Send + Sync + std::fmt::Debug + 'static,
621{
622    fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::update_records::UpdateRecordsError, R>) -> Self {
623        match err {
624            ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
625            _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
626                meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
627                source: err.into(),
628            }),
629        }
630    }
631}
632impl From<crate::operation::update_records::UpdateRecordsError> for Error {
633    fn from(err: crate::operation::update_records::UpdateRecordsError) -> Self {
634        match err {
635            crate::operation::update_records::UpdateRecordsError::InternalErrorException(inner) => Error::InternalErrorException(inner),
636            crate::operation::update_records::UpdateRecordsError::InvalidLambdaFunctionOutputException(inner) => {
637                Error::InvalidLambdaFunctionOutputException(inner)
638            }
639            crate::operation::update_records::UpdateRecordsError::InvalidParameterException(inner) => Error::InvalidParameterException(inner),
640            crate::operation::update_records::UpdateRecordsError::LambdaThrottledException(inner) => Error::LambdaThrottledException(inner),
641            crate::operation::update_records::UpdateRecordsError::LimitExceededException(inner) => Error::LimitExceededException(inner),
642            crate::operation::update_records::UpdateRecordsError::NotAuthorizedException(inner) => Error::NotAuthorizedException(inner),
643            crate::operation::update_records::UpdateRecordsError::ResourceConflictException(inner) => Error::ResourceConflictException(inner),
644            crate::operation::update_records::UpdateRecordsError::ResourceNotFoundException(inner) => Error::ResourceNotFoundException(inner),
645            crate::operation::update_records::UpdateRecordsError::TooManyRequestsException(inner) => Error::TooManyRequestsException(inner),
646            crate::operation::update_records::UpdateRecordsError::Unhandled(inner) => Error::Unhandled(inner),
647        }
648    }
649}
650impl ::std::error::Error for Error {
651    fn source(&self) -> std::option::Option<&(dyn ::std::error::Error + 'static)> {
652        match self {
653            Error::AlreadyStreamedException(inner) => inner.source(),
654            Error::ConcurrentModificationException(inner) => inner.source(),
655            Error::DuplicateRequestException(inner) => inner.source(),
656            Error::InternalErrorException(inner) => inner.source(),
657            Error::InvalidConfigurationException(inner) => inner.source(),
658            Error::InvalidLambdaFunctionOutputException(inner) => inner.source(),
659            Error::InvalidParameterException(inner) => inner.source(),
660            Error::LambdaThrottledException(inner) => inner.source(),
661            Error::LimitExceededException(inner) => inner.source(),
662            Error::NotAuthorizedException(inner) => inner.source(),
663            Error::ResourceConflictException(inner) => inner.source(),
664            Error::ResourceNotFoundException(inner) => inner.source(),
665            Error::TooManyRequestsException(inner) => inner.source(),
666            Error::Unhandled(inner) => ::std::option::Option::Some(&*inner.source),
667        }
668    }
669}
670impl ::aws_types::request_id::RequestId for Error {
671    fn request_id(&self) -> Option<&str> {
672        match self {
673            Self::AlreadyStreamedException(e) => e.request_id(),
674            Self::ConcurrentModificationException(e) => e.request_id(),
675            Self::DuplicateRequestException(e) => e.request_id(),
676            Self::InternalErrorException(e) => e.request_id(),
677            Self::InvalidConfigurationException(e) => e.request_id(),
678            Self::InvalidLambdaFunctionOutputException(e) => e.request_id(),
679            Self::InvalidParameterException(e) => e.request_id(),
680            Self::LambdaThrottledException(e) => e.request_id(),
681            Self::LimitExceededException(e) => e.request_id(),
682            Self::NotAuthorizedException(e) => e.request_id(),
683            Self::ResourceConflictException(e) => e.request_id(),
684            Self::ResourceNotFoundException(e) => e.request_id(),
685            Self::TooManyRequestsException(e) => e.request_id(),
686            Self::Unhandled(e) => e.meta.request_id(),
687        }
688    }
689}