Skip to main content

aws_sdk_iotdataplane/
error_meta.rs

1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2/// All possible error types for this service.
3#[non_exhaustive]
4#[derive(::std::fmt::Debug)]
5pub enum Error {
6    /// <p>The specified version does not match the version of the document.</p>
7    ConflictException(crate::types::error::ConflictException),
8    /// <p>The caller isn't authorized to make the request.</p>
9    ForbiddenException(crate::types::error::ForbiddenException),
10    /// <p>The delivery confirmation was not received from the client within the specified timeout period.</p>
11    GatewayTimeoutException(crate::types::error::GatewayTimeoutException),
12    /// <p>An unexpected error has occurred.</p>
13    InternalFailureException(crate::types::error::InternalFailureException),
14    /// <p>The request is not valid.</p>
15    InvalidRequestException(crate::types::error::InvalidRequestException),
16    /// <p>The specified combination of HTTP verb and URI is not supported.</p>
17    MethodNotAllowedException(crate::types::error::MethodNotAllowedException),
18    /// <p>The payload exceeds the maximum size allowed.</p>
19    RequestEntityTooLargeException(crate::types::error::RequestEntityTooLargeException),
20    /// <p>The specified resource does not exist.</p>
21    ResourceNotFoundException(crate::types::error::ResourceNotFoundException),
22    /// <p>The service is temporarily unavailable.</p>
23    ServiceUnavailableException(crate::types::error::ServiceUnavailableException),
24    /// <p>The rate exceeds the limit.</p>
25    ThrottlingException(crate::types::error::ThrottlingException),
26    /// <p>You are not authorized to perform this operation.</p>
27    UnauthorizedException(crate::types::error::UnauthorizedException),
28    /// <p>The document encoding is not supported.</p>
29    UnsupportedDocumentEncodingException(crate::types::error::UnsupportedDocumentEncodingException),
30    /// An unexpected error occurred (e.g., invalid JSON returned by the service or an unknown error code).
31    #[deprecated(note = "Matching `Unhandled` directly is not forwards compatible. Instead, match using a \
32    variable wildcard pattern and check `.code()`:
33     \
34    &nbsp;&nbsp;&nbsp;`err if err.code() == Some(\"SpecificExceptionCode\") => { /* handle the error */ }`
35     \
36    See [`ProvideErrorMetadata`](#impl-ProvideErrorMetadata-for-Error) for what information is available for the error.")]
37    Unhandled(crate::error::sealed_unhandled::Unhandled),
38}
39impl ::std::fmt::Display for Error {
40    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
41        match self {
42            Error::ConflictException(inner) => inner.fmt(f),
43            Error::ForbiddenException(inner) => inner.fmt(f),
44            Error::GatewayTimeoutException(inner) => inner.fmt(f),
45            Error::InternalFailureException(inner) => inner.fmt(f),
46            Error::InvalidRequestException(inner) => inner.fmt(f),
47            Error::MethodNotAllowedException(inner) => inner.fmt(f),
48            Error::RequestEntityTooLargeException(inner) => inner.fmt(f),
49            Error::ResourceNotFoundException(inner) => inner.fmt(f),
50            Error::ServiceUnavailableException(inner) => inner.fmt(f),
51            Error::ThrottlingException(inner) => inner.fmt(f),
52            Error::UnauthorizedException(inner) => inner.fmt(f),
53            Error::UnsupportedDocumentEncodingException(inner) => inner.fmt(f),
54            Error::Unhandled(_) => {
55                if let ::std::option::Option::Some(code) = ::aws_smithy_types::error::metadata::ProvideErrorMetadata::code(self) {
56                    write!(f, "unhandled error ({code})")
57                } else {
58                    f.write_str("unhandled error")
59                }
60            }
61        }
62    }
63}
64impl From<::aws_smithy_types::error::operation::BuildError> for Error {
65    fn from(value: ::aws_smithy_types::error::operation::BuildError) -> Self {
66        Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
67            source: value.into(),
68            meta: ::std::default::Default::default(),
69        })
70    }
71}
72impl ::aws_smithy_types::error::metadata::ProvideErrorMetadata for Error {
73    fn meta(&self) -> &::aws_smithy_types::error::metadata::ErrorMetadata {
74        match self {
75            Self::ConflictException(inner) => inner.meta(),
76            Self::ForbiddenException(inner) => inner.meta(),
77            Self::GatewayTimeoutException(inner) => inner.meta(),
78            Self::InternalFailureException(inner) => inner.meta(),
79            Self::InvalidRequestException(inner) => inner.meta(),
80            Self::MethodNotAllowedException(inner) => inner.meta(),
81            Self::RequestEntityTooLargeException(inner) => inner.meta(),
82            Self::ResourceNotFoundException(inner) => inner.meta(),
83            Self::ServiceUnavailableException(inner) => inner.meta(),
84            Self::ThrottlingException(inner) => inner.meta(),
85            Self::UnauthorizedException(inner) => inner.meta(),
86            Self::UnsupportedDocumentEncodingException(inner) => inner.meta(),
87            Self::Unhandled(inner) => &inner.meta,
88        }
89    }
90}
91impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::delete_connection::DeleteConnectionError, R>> for Error
92where
93    R: Send + Sync + std::fmt::Debug + 'static,
94{
95    fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::delete_connection::DeleteConnectionError, R>) -> Self {
96        match err {
97            ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
98            _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
99                meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
100                source: err.into(),
101            }),
102        }
103    }
104}
105impl From<crate::operation::delete_connection::DeleteConnectionError> for Error {
106    fn from(err: crate::operation::delete_connection::DeleteConnectionError) -> Self {
107        match err {
108            crate::operation::delete_connection::DeleteConnectionError::ForbiddenException(inner) => Error::ForbiddenException(inner),
109            crate::operation::delete_connection::DeleteConnectionError::InternalFailureException(inner) => Error::InternalFailureException(inner),
110            crate::operation::delete_connection::DeleteConnectionError::InvalidRequestException(inner) => Error::InvalidRequestException(inner),
111            crate::operation::delete_connection::DeleteConnectionError::ResourceNotFoundException(inner) => Error::ResourceNotFoundException(inner),
112            crate::operation::delete_connection::DeleteConnectionError::ThrottlingException(inner) => Error::ThrottlingException(inner),
113            crate::operation::delete_connection::DeleteConnectionError::Unhandled(inner) => Error::Unhandled(inner),
114        }
115    }
116}
117impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::delete_thing_shadow::DeleteThingShadowError, R>> for Error
118where
119    R: Send + Sync + std::fmt::Debug + 'static,
120{
121    fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::delete_thing_shadow::DeleteThingShadowError, R>) -> Self {
122        match err {
123            ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
124            _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
125                meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
126                source: err.into(),
127            }),
128        }
129    }
130}
131impl From<crate::operation::delete_thing_shadow::DeleteThingShadowError> for Error {
132    fn from(err: crate::operation::delete_thing_shadow::DeleteThingShadowError) -> Self {
133        match err {
134            crate::operation::delete_thing_shadow::DeleteThingShadowError::InternalFailureException(inner) => Error::InternalFailureException(inner),
135            crate::operation::delete_thing_shadow::DeleteThingShadowError::InvalidRequestException(inner) => Error::InvalidRequestException(inner),
136            crate::operation::delete_thing_shadow::DeleteThingShadowError::MethodNotAllowedException(inner) => {
137                Error::MethodNotAllowedException(inner)
138            }
139            crate::operation::delete_thing_shadow::DeleteThingShadowError::ResourceNotFoundException(inner) => {
140                Error::ResourceNotFoundException(inner)
141            }
142            crate::operation::delete_thing_shadow::DeleteThingShadowError::ServiceUnavailableException(inner) => {
143                Error::ServiceUnavailableException(inner)
144            }
145            crate::operation::delete_thing_shadow::DeleteThingShadowError::ThrottlingException(inner) => Error::ThrottlingException(inner),
146            crate::operation::delete_thing_shadow::DeleteThingShadowError::UnauthorizedException(inner) => Error::UnauthorizedException(inner),
147            crate::operation::delete_thing_shadow::DeleteThingShadowError::UnsupportedDocumentEncodingException(inner) => {
148                Error::UnsupportedDocumentEncodingException(inner)
149            }
150            crate::operation::delete_thing_shadow::DeleteThingShadowError::Unhandled(inner) => Error::Unhandled(inner),
151        }
152    }
153}
154impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::get_connection::GetConnectionError, R>> for Error
155where
156    R: Send + Sync + std::fmt::Debug + 'static,
157{
158    fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::get_connection::GetConnectionError, R>) -> Self {
159        match err {
160            ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
161            _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
162                meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
163                source: err.into(),
164            }),
165        }
166    }
167}
168impl From<crate::operation::get_connection::GetConnectionError> for Error {
169    fn from(err: crate::operation::get_connection::GetConnectionError) -> Self {
170        match err {
171            crate::operation::get_connection::GetConnectionError::ForbiddenException(inner) => Error::ForbiddenException(inner),
172            crate::operation::get_connection::GetConnectionError::InternalFailureException(inner) => Error::InternalFailureException(inner),
173            crate::operation::get_connection::GetConnectionError::InvalidRequestException(inner) => Error::InvalidRequestException(inner),
174            crate::operation::get_connection::GetConnectionError::ResourceNotFoundException(inner) => Error::ResourceNotFoundException(inner),
175            crate::operation::get_connection::GetConnectionError::ThrottlingException(inner) => Error::ThrottlingException(inner),
176            crate::operation::get_connection::GetConnectionError::Unhandled(inner) => Error::Unhandled(inner),
177        }
178    }
179}
180impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::get_retained_message::GetRetainedMessageError, R>> for Error
181where
182    R: Send + Sync + std::fmt::Debug + 'static,
183{
184    fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::get_retained_message::GetRetainedMessageError, R>) -> Self {
185        match err {
186            ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
187            _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
188                meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
189                source: err.into(),
190            }),
191        }
192    }
193}
194impl From<crate::operation::get_retained_message::GetRetainedMessageError> for Error {
195    fn from(err: crate::operation::get_retained_message::GetRetainedMessageError) -> Self {
196        match err {
197            crate::operation::get_retained_message::GetRetainedMessageError::InternalFailureException(inner) => {
198                Error::InternalFailureException(inner)
199            }
200            crate::operation::get_retained_message::GetRetainedMessageError::InvalidRequestException(inner) => Error::InvalidRequestException(inner),
201            crate::operation::get_retained_message::GetRetainedMessageError::MethodNotAllowedException(inner) => {
202                Error::MethodNotAllowedException(inner)
203            }
204            crate::operation::get_retained_message::GetRetainedMessageError::ResourceNotFoundException(inner) => {
205                Error::ResourceNotFoundException(inner)
206            }
207            crate::operation::get_retained_message::GetRetainedMessageError::ServiceUnavailableException(inner) => {
208                Error::ServiceUnavailableException(inner)
209            }
210            crate::operation::get_retained_message::GetRetainedMessageError::ThrottlingException(inner) => Error::ThrottlingException(inner),
211            crate::operation::get_retained_message::GetRetainedMessageError::UnauthorizedException(inner) => Error::UnauthorizedException(inner),
212            crate::operation::get_retained_message::GetRetainedMessageError::Unhandled(inner) => Error::Unhandled(inner),
213        }
214    }
215}
216impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::get_thing_shadow::GetThingShadowError, R>> for Error
217where
218    R: Send + Sync + std::fmt::Debug + 'static,
219{
220    fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::get_thing_shadow::GetThingShadowError, R>) -> 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::get_thing_shadow::GetThingShadowError> for Error {
231    fn from(err: crate::operation::get_thing_shadow::GetThingShadowError) -> Self {
232        match err {
233            crate::operation::get_thing_shadow::GetThingShadowError::InternalFailureException(inner) => Error::InternalFailureException(inner),
234            crate::operation::get_thing_shadow::GetThingShadowError::InvalidRequestException(inner) => Error::InvalidRequestException(inner),
235            crate::operation::get_thing_shadow::GetThingShadowError::MethodNotAllowedException(inner) => Error::MethodNotAllowedException(inner),
236            crate::operation::get_thing_shadow::GetThingShadowError::ResourceNotFoundException(inner) => Error::ResourceNotFoundException(inner),
237            crate::operation::get_thing_shadow::GetThingShadowError::ServiceUnavailableException(inner) => Error::ServiceUnavailableException(inner),
238            crate::operation::get_thing_shadow::GetThingShadowError::ThrottlingException(inner) => Error::ThrottlingException(inner),
239            crate::operation::get_thing_shadow::GetThingShadowError::UnauthorizedException(inner) => Error::UnauthorizedException(inner),
240            crate::operation::get_thing_shadow::GetThingShadowError::UnsupportedDocumentEncodingException(inner) => {
241                Error::UnsupportedDocumentEncodingException(inner)
242            }
243            crate::operation::get_thing_shadow::GetThingShadowError::Unhandled(inner) => Error::Unhandled(inner),
244        }
245    }
246}
247impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::list_named_shadows_for_thing::ListNamedShadowsForThingError, R>>
248    for Error
249where
250    R: Send + Sync + std::fmt::Debug + 'static,
251{
252    fn from(
253        err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::list_named_shadows_for_thing::ListNamedShadowsForThingError, R>,
254    ) -> Self {
255        match err {
256            ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
257            _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
258                meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
259                source: err.into(),
260            }),
261        }
262    }
263}
264impl From<crate::operation::list_named_shadows_for_thing::ListNamedShadowsForThingError> for Error {
265    fn from(err: crate::operation::list_named_shadows_for_thing::ListNamedShadowsForThingError) -> Self {
266        match err {
267            crate::operation::list_named_shadows_for_thing::ListNamedShadowsForThingError::InternalFailureException(inner) => {
268                Error::InternalFailureException(inner)
269            }
270            crate::operation::list_named_shadows_for_thing::ListNamedShadowsForThingError::InvalidRequestException(inner) => {
271                Error::InvalidRequestException(inner)
272            }
273            crate::operation::list_named_shadows_for_thing::ListNamedShadowsForThingError::MethodNotAllowedException(inner) => {
274                Error::MethodNotAllowedException(inner)
275            }
276            crate::operation::list_named_shadows_for_thing::ListNamedShadowsForThingError::ResourceNotFoundException(inner) => {
277                Error::ResourceNotFoundException(inner)
278            }
279            crate::operation::list_named_shadows_for_thing::ListNamedShadowsForThingError::ServiceUnavailableException(inner) => {
280                Error::ServiceUnavailableException(inner)
281            }
282            crate::operation::list_named_shadows_for_thing::ListNamedShadowsForThingError::ThrottlingException(inner) => {
283                Error::ThrottlingException(inner)
284            }
285            crate::operation::list_named_shadows_for_thing::ListNamedShadowsForThingError::UnauthorizedException(inner) => {
286                Error::UnauthorizedException(inner)
287            }
288            crate::operation::list_named_shadows_for_thing::ListNamedShadowsForThingError::Unhandled(inner) => Error::Unhandled(inner),
289        }
290    }
291}
292impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::list_retained_messages::ListRetainedMessagesError, R>> for Error
293where
294    R: Send + Sync + std::fmt::Debug + 'static,
295{
296    fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::list_retained_messages::ListRetainedMessagesError, R>) -> Self {
297        match err {
298            ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
299            _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
300                meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
301                source: err.into(),
302            }),
303        }
304    }
305}
306impl From<crate::operation::list_retained_messages::ListRetainedMessagesError> for Error {
307    fn from(err: crate::operation::list_retained_messages::ListRetainedMessagesError) -> Self {
308        match err {
309            crate::operation::list_retained_messages::ListRetainedMessagesError::InternalFailureException(inner) => {
310                Error::InternalFailureException(inner)
311            }
312            crate::operation::list_retained_messages::ListRetainedMessagesError::InvalidRequestException(inner) => {
313                Error::InvalidRequestException(inner)
314            }
315            crate::operation::list_retained_messages::ListRetainedMessagesError::MethodNotAllowedException(inner) => {
316                Error::MethodNotAllowedException(inner)
317            }
318            crate::operation::list_retained_messages::ListRetainedMessagesError::ServiceUnavailableException(inner) => {
319                Error::ServiceUnavailableException(inner)
320            }
321            crate::operation::list_retained_messages::ListRetainedMessagesError::ThrottlingException(inner) => Error::ThrottlingException(inner),
322            crate::operation::list_retained_messages::ListRetainedMessagesError::UnauthorizedException(inner) => Error::UnauthorizedException(inner),
323            crate::operation::list_retained_messages::ListRetainedMessagesError::Unhandled(inner) => Error::Unhandled(inner),
324        }
325    }
326}
327impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::list_subscriptions::ListSubscriptionsError, R>> for Error
328where
329    R: Send + Sync + std::fmt::Debug + 'static,
330{
331    fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::list_subscriptions::ListSubscriptionsError, R>) -> Self {
332        match err {
333            ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
334            _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
335                meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
336                source: err.into(),
337            }),
338        }
339    }
340}
341impl From<crate::operation::list_subscriptions::ListSubscriptionsError> for Error {
342    fn from(err: crate::operation::list_subscriptions::ListSubscriptionsError) -> Self {
343        match err {
344            crate::operation::list_subscriptions::ListSubscriptionsError::ForbiddenException(inner) => Error::ForbiddenException(inner),
345            crate::operation::list_subscriptions::ListSubscriptionsError::InternalFailureException(inner) => Error::InternalFailureException(inner),
346            crate::operation::list_subscriptions::ListSubscriptionsError::InvalidRequestException(inner) => Error::InvalidRequestException(inner),
347            crate::operation::list_subscriptions::ListSubscriptionsError::ResourceNotFoundException(inner) => Error::ResourceNotFoundException(inner),
348            crate::operation::list_subscriptions::ListSubscriptionsError::ThrottlingException(inner) => Error::ThrottlingException(inner),
349            crate::operation::list_subscriptions::ListSubscriptionsError::Unhandled(inner) => Error::Unhandled(inner),
350        }
351    }
352}
353impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::publish::PublishError, R>> for Error
354where
355    R: Send + Sync + std::fmt::Debug + 'static,
356{
357    fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::publish::PublishError, R>) -> Self {
358        match err {
359            ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
360            _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
361                meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
362                source: err.into(),
363            }),
364        }
365    }
366}
367impl From<crate::operation::publish::PublishError> for Error {
368    fn from(err: crate::operation::publish::PublishError) -> Self {
369        match err {
370            crate::operation::publish::PublishError::InternalFailureException(inner) => Error::InternalFailureException(inner),
371            crate::operation::publish::PublishError::InvalidRequestException(inner) => Error::InvalidRequestException(inner),
372            crate::operation::publish::PublishError::MethodNotAllowedException(inner) => Error::MethodNotAllowedException(inner),
373            crate::operation::publish::PublishError::ThrottlingException(inner) => Error::ThrottlingException(inner),
374            crate::operation::publish::PublishError::UnauthorizedException(inner) => Error::UnauthorizedException(inner),
375            crate::operation::publish::PublishError::Unhandled(inner) => Error::Unhandled(inner),
376        }
377    }
378}
379impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::send_direct_message::SendDirectMessageError, R>> for Error
380where
381    R: Send + Sync + std::fmt::Debug + 'static,
382{
383    fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::send_direct_message::SendDirectMessageError, R>) -> Self {
384        match err {
385            ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
386            _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
387                meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
388                source: err.into(),
389            }),
390        }
391    }
392}
393impl From<crate::operation::send_direct_message::SendDirectMessageError> for Error {
394    fn from(err: crate::operation::send_direct_message::SendDirectMessageError) -> Self {
395        match err {
396            crate::operation::send_direct_message::SendDirectMessageError::ForbiddenException(inner) => Error::ForbiddenException(inner),
397            crate::operation::send_direct_message::SendDirectMessageError::GatewayTimeoutException(inner) => Error::GatewayTimeoutException(inner),
398            crate::operation::send_direct_message::SendDirectMessageError::InternalFailureException(inner) => Error::InternalFailureException(inner),
399            crate::operation::send_direct_message::SendDirectMessageError::InvalidRequestException(inner) => Error::InvalidRequestException(inner),
400            crate::operation::send_direct_message::SendDirectMessageError::RequestEntityTooLargeException(inner) => {
401                Error::RequestEntityTooLargeException(inner)
402            }
403            crate::operation::send_direct_message::SendDirectMessageError::ResourceNotFoundException(inner) => {
404                Error::ResourceNotFoundException(inner)
405            }
406            crate::operation::send_direct_message::SendDirectMessageError::ThrottlingException(inner) => Error::ThrottlingException(inner),
407            crate::operation::send_direct_message::SendDirectMessageError::UnauthorizedException(inner) => Error::UnauthorizedException(inner),
408            crate::operation::send_direct_message::SendDirectMessageError::Unhandled(inner) => Error::Unhandled(inner),
409        }
410    }
411}
412impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::update_thing_shadow::UpdateThingShadowError, R>> for Error
413where
414    R: Send + Sync + std::fmt::Debug + 'static,
415{
416    fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::update_thing_shadow::UpdateThingShadowError, R>) -> Self {
417        match err {
418            ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
419            _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
420                meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
421                source: err.into(),
422            }),
423        }
424    }
425}
426impl From<crate::operation::update_thing_shadow::UpdateThingShadowError> for Error {
427    fn from(err: crate::operation::update_thing_shadow::UpdateThingShadowError) -> Self {
428        match err {
429            crate::operation::update_thing_shadow::UpdateThingShadowError::ConflictException(inner) => Error::ConflictException(inner),
430            crate::operation::update_thing_shadow::UpdateThingShadowError::InternalFailureException(inner) => Error::InternalFailureException(inner),
431            crate::operation::update_thing_shadow::UpdateThingShadowError::InvalidRequestException(inner) => Error::InvalidRequestException(inner),
432            crate::operation::update_thing_shadow::UpdateThingShadowError::MethodNotAllowedException(inner) => {
433                Error::MethodNotAllowedException(inner)
434            }
435            crate::operation::update_thing_shadow::UpdateThingShadowError::RequestEntityTooLargeException(inner) => {
436                Error::RequestEntityTooLargeException(inner)
437            }
438            crate::operation::update_thing_shadow::UpdateThingShadowError::ServiceUnavailableException(inner) => {
439                Error::ServiceUnavailableException(inner)
440            }
441            crate::operation::update_thing_shadow::UpdateThingShadowError::ThrottlingException(inner) => Error::ThrottlingException(inner),
442            crate::operation::update_thing_shadow::UpdateThingShadowError::UnauthorizedException(inner) => Error::UnauthorizedException(inner),
443            crate::operation::update_thing_shadow::UpdateThingShadowError::UnsupportedDocumentEncodingException(inner) => {
444                Error::UnsupportedDocumentEncodingException(inner)
445            }
446            crate::operation::update_thing_shadow::UpdateThingShadowError::Unhandled(inner) => Error::Unhandled(inner),
447        }
448    }
449}
450impl ::std::error::Error for Error {
451    fn source(&self) -> std::option::Option<&(dyn ::std::error::Error + 'static)> {
452        match self {
453            Error::ConflictException(inner) => inner.source(),
454            Error::ForbiddenException(inner) => inner.source(),
455            Error::GatewayTimeoutException(inner) => inner.source(),
456            Error::InternalFailureException(inner) => inner.source(),
457            Error::InvalidRequestException(inner) => inner.source(),
458            Error::MethodNotAllowedException(inner) => inner.source(),
459            Error::RequestEntityTooLargeException(inner) => inner.source(),
460            Error::ResourceNotFoundException(inner) => inner.source(),
461            Error::ServiceUnavailableException(inner) => inner.source(),
462            Error::ThrottlingException(inner) => inner.source(),
463            Error::UnauthorizedException(inner) => inner.source(),
464            Error::UnsupportedDocumentEncodingException(inner) => inner.source(),
465            Error::Unhandled(inner) => ::std::option::Option::Some(&*inner.source),
466        }
467    }
468}
469impl ::aws_types::request_id::RequestId for Error {
470    fn request_id(&self) -> Option<&str> {
471        match self {
472            Self::ConflictException(e) => e.request_id(),
473            Self::ForbiddenException(e) => e.request_id(),
474            Self::GatewayTimeoutException(e) => e.request_id(),
475            Self::InternalFailureException(e) => e.request_id(),
476            Self::InvalidRequestException(e) => e.request_id(),
477            Self::MethodNotAllowedException(e) => e.request_id(),
478            Self::RequestEntityTooLargeException(e) => e.request_id(),
479            Self::ResourceNotFoundException(e) => e.request_id(),
480            Self::ServiceUnavailableException(e) => e.request_id(),
481            Self::ThrottlingException(e) => e.request_id(),
482            Self::UnauthorizedException(e) => e.request_id(),
483            Self::UnsupportedDocumentEncodingException(e) => e.request_id(),
484            Self::Unhandled(e) => e.meta.request_id(),
485        }
486    }
487}