1#[non_exhaustive]
4#[derive(::std::fmt::Debug)]
5pub enum Error {
6 AccessDeniedException(crate::types::error::AccessDeniedException),
8 ConflictException(crate::types::error::ConflictException),
10 InternalServerException(crate::types::error::InternalServerException),
12 ResourceNotFoundException(crate::types::error::ResourceNotFoundException),
14 ServiceQuotaExceededException(crate::types::error::ServiceQuotaExceededException),
16 ThrottlingException(crate::types::error::ThrottlingException),
18 ValidationException(crate::types::error::ValidationException),
20 #[deprecated(note = "Matching `Unhandled` directly is not forwards compatible. Instead, match using a \
22 variable wildcard pattern and check `.code()`:
23 \
24 `err if err.code() == Some(\"SpecificExceptionCode\") => { /* handle the error */ }`
25 \
26 See [`ProvideErrorMetadata`](#impl-ProvideErrorMetadata-for-Error) for what information is available for the error.")]
27 Unhandled(crate::error::sealed_unhandled::Unhandled),
28}
29impl ::std::fmt::Display for Error {
30 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
31 match self {
32 Error::AccessDeniedException(inner) => inner.fmt(f),
33 Error::ConflictException(inner) => inner.fmt(f),
34 Error::InternalServerException(inner) => inner.fmt(f),
35 Error::ResourceNotFoundException(inner) => inner.fmt(f),
36 Error::ServiceQuotaExceededException(inner) => inner.fmt(f),
37 Error::ThrottlingException(inner) => inner.fmt(f),
38 Error::ValidationException(inner) => inner.fmt(f),
39 Error::Unhandled(_) => {
40 if let ::std::option::Option::Some(code) = ::aws_smithy_types::error::metadata::ProvideErrorMetadata::code(self) {
41 write!(f, "unhandled error ({code})")
42 } else {
43 f.write_str("unhandled error")
44 }
45 }
46 }
47 }
48}
49impl From<::aws_smithy_types::error::operation::BuildError> for Error {
50 fn from(value: ::aws_smithy_types::error::operation::BuildError) -> Self {
51 Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
52 source: value.into(),
53 meta: ::std::default::Default::default(),
54 })
55 }
56}
57impl ::aws_smithy_types::error::metadata::ProvideErrorMetadata for Error {
58 fn meta(&self) -> &::aws_smithy_types::error::metadata::ErrorMetadata {
59 match self {
60 Self::AccessDeniedException(inner) => inner.meta(),
61 Self::ConflictException(inner) => inner.meta(),
62 Self::InternalServerException(inner) => inner.meta(),
63 Self::ResourceNotFoundException(inner) => inner.meta(),
64 Self::ServiceQuotaExceededException(inner) => inner.meta(),
65 Self::ThrottlingException(inner) => inner.meta(),
66 Self::ValidationException(inner) => inner.meta(),
67 Self::Unhandled(inner) => &inner.meta,
68 }
69 }
70}
71impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::create_environment::CreateEnvironmentError, R>> for Error
72where
73 R: Send + Sync + std::fmt::Debug + 'static,
74{
75 fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::create_environment::CreateEnvironmentError, R>) -> Self {
76 match err {
77 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
78 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
79 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
80 source: err.into(),
81 }),
82 }
83 }
84}
85impl From<crate::operation::create_environment::CreateEnvironmentError> for Error {
86 fn from(err: crate::operation::create_environment::CreateEnvironmentError) -> Self {
87 match err {
88 crate::operation::create_environment::CreateEnvironmentError::AccessDeniedException(inner) => Error::AccessDeniedException(inner),
89 crate::operation::create_environment::CreateEnvironmentError::ConflictException(inner) => Error::ConflictException(inner),
90 crate::operation::create_environment::CreateEnvironmentError::InternalServerException(inner) => Error::InternalServerException(inner),
91 crate::operation::create_environment::CreateEnvironmentError::ResourceNotFoundException(inner) => Error::ResourceNotFoundException(inner),
92 crate::operation::create_environment::CreateEnvironmentError::ServiceQuotaExceededException(inner) => {
93 Error::ServiceQuotaExceededException(inner)
94 }
95 crate::operation::create_environment::CreateEnvironmentError::ThrottlingException(inner) => Error::ThrottlingException(inner),
96 crate::operation::create_environment::CreateEnvironmentError::ValidationException(inner) => Error::ValidationException(inner),
97 crate::operation::create_environment::CreateEnvironmentError::Unhandled(inner) => Error::Unhandled(inner),
98 }
99 }
100}
101impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::delete_device::DeleteDeviceError, R>> for Error
102where
103 R: Send + Sync + std::fmt::Debug + 'static,
104{
105 fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::delete_device::DeleteDeviceError, R>) -> Self {
106 match err {
107 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
108 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
109 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
110 source: err.into(),
111 }),
112 }
113 }
114}
115impl From<crate::operation::delete_device::DeleteDeviceError> for Error {
116 fn from(err: crate::operation::delete_device::DeleteDeviceError) -> Self {
117 match err {
118 crate::operation::delete_device::DeleteDeviceError::AccessDeniedException(inner) => Error::AccessDeniedException(inner),
119 crate::operation::delete_device::DeleteDeviceError::ConflictException(inner) => Error::ConflictException(inner),
120 crate::operation::delete_device::DeleteDeviceError::InternalServerException(inner) => Error::InternalServerException(inner),
121 crate::operation::delete_device::DeleteDeviceError::ResourceNotFoundException(inner) => Error::ResourceNotFoundException(inner),
122 crate::operation::delete_device::DeleteDeviceError::ThrottlingException(inner) => Error::ThrottlingException(inner),
123 crate::operation::delete_device::DeleteDeviceError::ValidationException(inner) => Error::ValidationException(inner),
124 crate::operation::delete_device::DeleteDeviceError::Unhandled(inner) => Error::Unhandled(inner),
125 }
126 }
127}
128impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::delete_environment::DeleteEnvironmentError, R>> for Error
129where
130 R: Send + Sync + std::fmt::Debug + 'static,
131{
132 fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::delete_environment::DeleteEnvironmentError, R>) -> Self {
133 match err {
134 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
135 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
136 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
137 source: err.into(),
138 }),
139 }
140 }
141}
142impl From<crate::operation::delete_environment::DeleteEnvironmentError> for Error {
143 fn from(err: crate::operation::delete_environment::DeleteEnvironmentError) -> Self {
144 match err {
145 crate::operation::delete_environment::DeleteEnvironmentError::AccessDeniedException(inner) => Error::AccessDeniedException(inner),
146 crate::operation::delete_environment::DeleteEnvironmentError::ConflictException(inner) => Error::ConflictException(inner),
147 crate::operation::delete_environment::DeleteEnvironmentError::InternalServerException(inner) => Error::InternalServerException(inner),
148 crate::operation::delete_environment::DeleteEnvironmentError::ResourceNotFoundException(inner) => Error::ResourceNotFoundException(inner),
149 crate::operation::delete_environment::DeleteEnvironmentError::ThrottlingException(inner) => Error::ThrottlingException(inner),
150 crate::operation::delete_environment::DeleteEnvironmentError::ValidationException(inner) => Error::ValidationException(inner),
151 crate::operation::delete_environment::DeleteEnvironmentError::Unhandled(inner) => Error::Unhandled(inner),
152 }
153 }
154}
155impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::deregister_device::DeregisterDeviceError, R>> for Error
156where
157 R: Send + Sync + std::fmt::Debug + 'static,
158{
159 fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::deregister_device::DeregisterDeviceError, R>) -> Self {
160 match err {
161 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
162 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
163 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
164 source: err.into(),
165 }),
166 }
167 }
168}
169impl From<crate::operation::deregister_device::DeregisterDeviceError> for Error {
170 fn from(err: crate::operation::deregister_device::DeregisterDeviceError) -> Self {
171 match err {
172 crate::operation::deregister_device::DeregisterDeviceError::AccessDeniedException(inner) => Error::AccessDeniedException(inner),
173 crate::operation::deregister_device::DeregisterDeviceError::ConflictException(inner) => Error::ConflictException(inner),
174 crate::operation::deregister_device::DeregisterDeviceError::InternalServerException(inner) => Error::InternalServerException(inner),
175 crate::operation::deregister_device::DeregisterDeviceError::ResourceNotFoundException(inner) => Error::ResourceNotFoundException(inner),
176 crate::operation::deregister_device::DeregisterDeviceError::ThrottlingException(inner) => Error::ThrottlingException(inner),
177 crate::operation::deregister_device::DeregisterDeviceError::ValidationException(inner) => Error::ValidationException(inner),
178 crate::operation::deregister_device::DeregisterDeviceError::Unhandled(inner) => Error::Unhandled(inner),
179 }
180 }
181}
182impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::get_device::GetDeviceError, R>> for Error
183where
184 R: Send + Sync + std::fmt::Debug + 'static,
185{
186 fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::get_device::GetDeviceError, R>) -> Self {
187 match err {
188 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
189 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
190 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
191 source: err.into(),
192 }),
193 }
194 }
195}
196impl From<crate::operation::get_device::GetDeviceError> for Error {
197 fn from(err: crate::operation::get_device::GetDeviceError) -> Self {
198 match err {
199 crate::operation::get_device::GetDeviceError::AccessDeniedException(inner) => Error::AccessDeniedException(inner),
200 crate::operation::get_device::GetDeviceError::InternalServerException(inner) => Error::InternalServerException(inner),
201 crate::operation::get_device::GetDeviceError::ResourceNotFoundException(inner) => Error::ResourceNotFoundException(inner),
202 crate::operation::get_device::GetDeviceError::ThrottlingException(inner) => Error::ThrottlingException(inner),
203 crate::operation::get_device::GetDeviceError::ValidationException(inner) => Error::ValidationException(inner),
204 crate::operation::get_device::GetDeviceError::Unhandled(inner) => Error::Unhandled(inner),
205 }
206 }
207}
208impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::get_environment::GetEnvironmentError, R>> for Error
209where
210 R: Send + Sync + std::fmt::Debug + 'static,
211{
212 fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::get_environment::GetEnvironmentError, R>) -> Self {
213 match err {
214 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
215 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
216 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
217 source: err.into(),
218 }),
219 }
220 }
221}
222impl From<crate::operation::get_environment::GetEnvironmentError> for Error {
223 fn from(err: crate::operation::get_environment::GetEnvironmentError) -> Self {
224 match err {
225 crate::operation::get_environment::GetEnvironmentError::AccessDeniedException(inner) => Error::AccessDeniedException(inner),
226 crate::operation::get_environment::GetEnvironmentError::InternalServerException(inner) => Error::InternalServerException(inner),
227 crate::operation::get_environment::GetEnvironmentError::ResourceNotFoundException(inner) => Error::ResourceNotFoundException(inner),
228 crate::operation::get_environment::GetEnvironmentError::ThrottlingException(inner) => Error::ThrottlingException(inner),
229 crate::operation::get_environment::GetEnvironmentError::ValidationException(inner) => Error::ValidationException(inner),
230 crate::operation::get_environment::GetEnvironmentError::Unhandled(inner) => Error::Unhandled(inner),
231 }
232 }
233}
234impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::get_software_set::GetSoftwareSetError, R>> for Error
235where
236 R: Send + Sync + std::fmt::Debug + 'static,
237{
238 fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::get_software_set::GetSoftwareSetError, R>) -> Self {
239 match err {
240 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
241 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
242 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
243 source: err.into(),
244 }),
245 }
246 }
247}
248impl From<crate::operation::get_software_set::GetSoftwareSetError> for Error {
249 fn from(err: crate::operation::get_software_set::GetSoftwareSetError) -> Self {
250 match err {
251 crate::operation::get_software_set::GetSoftwareSetError::AccessDeniedException(inner) => Error::AccessDeniedException(inner),
252 crate::operation::get_software_set::GetSoftwareSetError::InternalServerException(inner) => Error::InternalServerException(inner),
253 crate::operation::get_software_set::GetSoftwareSetError::ResourceNotFoundException(inner) => Error::ResourceNotFoundException(inner),
254 crate::operation::get_software_set::GetSoftwareSetError::ThrottlingException(inner) => Error::ThrottlingException(inner),
255 crate::operation::get_software_set::GetSoftwareSetError::ValidationException(inner) => Error::ValidationException(inner),
256 crate::operation::get_software_set::GetSoftwareSetError::Unhandled(inner) => Error::Unhandled(inner),
257 }
258 }
259}
260impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::list_devices::ListDevicesError, R>> for Error
261where
262 R: Send + Sync + std::fmt::Debug + 'static,
263{
264 fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::list_devices::ListDevicesError, R>) -> Self {
265 match err {
266 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
267 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
268 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
269 source: err.into(),
270 }),
271 }
272 }
273}
274impl From<crate::operation::list_devices::ListDevicesError> for Error {
275 fn from(err: crate::operation::list_devices::ListDevicesError) -> Self {
276 match err {
277 crate::operation::list_devices::ListDevicesError::AccessDeniedException(inner) => Error::AccessDeniedException(inner),
278 crate::operation::list_devices::ListDevicesError::InternalServerException(inner) => Error::InternalServerException(inner),
279 crate::operation::list_devices::ListDevicesError::ThrottlingException(inner) => Error::ThrottlingException(inner),
280 crate::operation::list_devices::ListDevicesError::ValidationException(inner) => Error::ValidationException(inner),
281 crate::operation::list_devices::ListDevicesError::Unhandled(inner) => Error::Unhandled(inner),
282 }
283 }
284}
285impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::list_environments::ListEnvironmentsError, R>> for Error
286where
287 R: Send + Sync + std::fmt::Debug + 'static,
288{
289 fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::list_environments::ListEnvironmentsError, R>) -> Self {
290 match err {
291 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
292 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
293 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
294 source: err.into(),
295 }),
296 }
297 }
298}
299impl From<crate::operation::list_environments::ListEnvironmentsError> for Error {
300 fn from(err: crate::operation::list_environments::ListEnvironmentsError) -> Self {
301 match err {
302 crate::operation::list_environments::ListEnvironmentsError::AccessDeniedException(inner) => Error::AccessDeniedException(inner),
303 crate::operation::list_environments::ListEnvironmentsError::InternalServerException(inner) => Error::InternalServerException(inner),
304 crate::operation::list_environments::ListEnvironmentsError::ThrottlingException(inner) => Error::ThrottlingException(inner),
305 crate::operation::list_environments::ListEnvironmentsError::ValidationException(inner) => Error::ValidationException(inner),
306 crate::operation::list_environments::ListEnvironmentsError::Unhandled(inner) => Error::Unhandled(inner),
307 }
308 }
309}
310impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::list_software_sets::ListSoftwareSetsError, R>> for Error
311where
312 R: Send + Sync + std::fmt::Debug + 'static,
313{
314 fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::list_software_sets::ListSoftwareSetsError, R>) -> Self {
315 match err {
316 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
317 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
318 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
319 source: err.into(),
320 }),
321 }
322 }
323}
324impl From<crate::operation::list_software_sets::ListSoftwareSetsError> for Error {
325 fn from(err: crate::operation::list_software_sets::ListSoftwareSetsError) -> Self {
326 match err {
327 crate::operation::list_software_sets::ListSoftwareSetsError::AccessDeniedException(inner) => Error::AccessDeniedException(inner),
328 crate::operation::list_software_sets::ListSoftwareSetsError::InternalServerException(inner) => Error::InternalServerException(inner),
329 crate::operation::list_software_sets::ListSoftwareSetsError::ThrottlingException(inner) => Error::ThrottlingException(inner),
330 crate::operation::list_software_sets::ListSoftwareSetsError::ValidationException(inner) => Error::ValidationException(inner),
331 crate::operation::list_software_sets::ListSoftwareSetsError::Unhandled(inner) => Error::Unhandled(inner),
332 }
333 }
334}
335impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::list_tags_for_resource::ListTagsForResourceError, R>> for Error
336where
337 R: Send + Sync + std::fmt::Debug + 'static,
338{
339 fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::list_tags_for_resource::ListTagsForResourceError, R>) -> Self {
340 match err {
341 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
342 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
343 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
344 source: err.into(),
345 }),
346 }
347 }
348}
349impl From<crate::operation::list_tags_for_resource::ListTagsForResourceError> for Error {
350 fn from(err: crate::operation::list_tags_for_resource::ListTagsForResourceError) -> Self {
351 match err {
352 crate::operation::list_tags_for_resource::ListTagsForResourceError::AccessDeniedException(inner) => Error::AccessDeniedException(inner),
353 crate::operation::list_tags_for_resource::ListTagsForResourceError::InternalServerException(inner) => {
354 Error::InternalServerException(inner)
355 }
356 crate::operation::list_tags_for_resource::ListTagsForResourceError::ResourceNotFoundException(inner) => {
357 Error::ResourceNotFoundException(inner)
358 }
359 crate::operation::list_tags_for_resource::ListTagsForResourceError::ThrottlingException(inner) => Error::ThrottlingException(inner),
360 crate::operation::list_tags_for_resource::ListTagsForResourceError::ValidationException(inner) => Error::ValidationException(inner),
361 crate::operation::list_tags_for_resource::ListTagsForResourceError::Unhandled(inner) => Error::Unhandled(inner),
362 }
363 }
364}
365impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::tag_resource::TagResourceError, R>> for Error
366where
367 R: Send + Sync + std::fmt::Debug + 'static,
368{
369 fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::tag_resource::TagResourceError, R>) -> Self {
370 match err {
371 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
372 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
373 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
374 source: err.into(),
375 }),
376 }
377 }
378}
379impl From<crate::operation::tag_resource::TagResourceError> for Error {
380 fn from(err: crate::operation::tag_resource::TagResourceError) -> Self {
381 match err {
382 crate::operation::tag_resource::TagResourceError::AccessDeniedException(inner) => Error::AccessDeniedException(inner),
383 crate::operation::tag_resource::TagResourceError::ConflictException(inner) => Error::ConflictException(inner),
384 crate::operation::tag_resource::TagResourceError::InternalServerException(inner) => Error::InternalServerException(inner),
385 crate::operation::tag_resource::TagResourceError::ResourceNotFoundException(inner) => Error::ResourceNotFoundException(inner),
386 crate::operation::tag_resource::TagResourceError::ThrottlingException(inner) => Error::ThrottlingException(inner),
387 crate::operation::tag_resource::TagResourceError::ValidationException(inner) => Error::ValidationException(inner),
388 crate::operation::tag_resource::TagResourceError::Unhandled(inner) => Error::Unhandled(inner),
389 }
390 }
391}
392impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::untag_resource::UntagResourceError, R>> for Error
393where
394 R: Send + Sync + std::fmt::Debug + 'static,
395{
396 fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::untag_resource::UntagResourceError, R>) -> Self {
397 match err {
398 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
399 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
400 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
401 source: err.into(),
402 }),
403 }
404 }
405}
406impl From<crate::operation::untag_resource::UntagResourceError> for Error {
407 fn from(err: crate::operation::untag_resource::UntagResourceError) -> Self {
408 match err {
409 crate::operation::untag_resource::UntagResourceError::AccessDeniedException(inner) => Error::AccessDeniedException(inner),
410 crate::operation::untag_resource::UntagResourceError::ConflictException(inner) => Error::ConflictException(inner),
411 crate::operation::untag_resource::UntagResourceError::InternalServerException(inner) => Error::InternalServerException(inner),
412 crate::operation::untag_resource::UntagResourceError::ResourceNotFoundException(inner) => Error::ResourceNotFoundException(inner),
413 crate::operation::untag_resource::UntagResourceError::ThrottlingException(inner) => Error::ThrottlingException(inner),
414 crate::operation::untag_resource::UntagResourceError::ValidationException(inner) => Error::ValidationException(inner),
415 crate::operation::untag_resource::UntagResourceError::Unhandled(inner) => Error::Unhandled(inner),
416 }
417 }
418}
419impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::update_device::UpdateDeviceError, R>> for Error
420where
421 R: Send + Sync + std::fmt::Debug + 'static,
422{
423 fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::update_device::UpdateDeviceError, R>) -> Self {
424 match err {
425 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
426 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
427 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
428 source: err.into(),
429 }),
430 }
431 }
432}
433impl From<crate::operation::update_device::UpdateDeviceError> for Error {
434 fn from(err: crate::operation::update_device::UpdateDeviceError) -> Self {
435 match err {
436 crate::operation::update_device::UpdateDeviceError::AccessDeniedException(inner) => Error::AccessDeniedException(inner),
437 crate::operation::update_device::UpdateDeviceError::InternalServerException(inner) => Error::InternalServerException(inner),
438 crate::operation::update_device::UpdateDeviceError::ResourceNotFoundException(inner) => Error::ResourceNotFoundException(inner),
439 crate::operation::update_device::UpdateDeviceError::ThrottlingException(inner) => Error::ThrottlingException(inner),
440 crate::operation::update_device::UpdateDeviceError::ValidationException(inner) => Error::ValidationException(inner),
441 crate::operation::update_device::UpdateDeviceError::Unhandled(inner) => Error::Unhandled(inner),
442 }
443 }
444}
445impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::update_environment::UpdateEnvironmentError, R>> for Error
446where
447 R: Send + Sync + std::fmt::Debug + 'static,
448{
449 fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::update_environment::UpdateEnvironmentError, R>) -> Self {
450 match err {
451 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
452 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
453 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
454 source: err.into(),
455 }),
456 }
457 }
458}
459impl From<crate::operation::update_environment::UpdateEnvironmentError> for Error {
460 fn from(err: crate::operation::update_environment::UpdateEnvironmentError) -> Self {
461 match err {
462 crate::operation::update_environment::UpdateEnvironmentError::AccessDeniedException(inner) => Error::AccessDeniedException(inner),
463 crate::operation::update_environment::UpdateEnvironmentError::ConflictException(inner) => Error::ConflictException(inner),
464 crate::operation::update_environment::UpdateEnvironmentError::InternalServerException(inner) => Error::InternalServerException(inner),
465 crate::operation::update_environment::UpdateEnvironmentError::ResourceNotFoundException(inner) => Error::ResourceNotFoundException(inner),
466 crate::operation::update_environment::UpdateEnvironmentError::ThrottlingException(inner) => Error::ThrottlingException(inner),
467 crate::operation::update_environment::UpdateEnvironmentError::ValidationException(inner) => Error::ValidationException(inner),
468 crate::operation::update_environment::UpdateEnvironmentError::Unhandled(inner) => Error::Unhandled(inner),
469 }
470 }
471}
472impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::update_software_set::UpdateSoftwareSetError, R>> for Error
473where
474 R: Send + Sync + std::fmt::Debug + 'static,
475{
476 fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::update_software_set::UpdateSoftwareSetError, R>) -> Self {
477 match err {
478 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
479 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
480 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
481 source: err.into(),
482 }),
483 }
484 }
485}
486impl From<crate::operation::update_software_set::UpdateSoftwareSetError> for Error {
487 fn from(err: crate::operation::update_software_set::UpdateSoftwareSetError) -> Self {
488 match err {
489 crate::operation::update_software_set::UpdateSoftwareSetError::AccessDeniedException(inner) => Error::AccessDeniedException(inner),
490 crate::operation::update_software_set::UpdateSoftwareSetError::InternalServerException(inner) => Error::InternalServerException(inner),
491 crate::operation::update_software_set::UpdateSoftwareSetError::ResourceNotFoundException(inner) => {
492 Error::ResourceNotFoundException(inner)
493 }
494 crate::operation::update_software_set::UpdateSoftwareSetError::ThrottlingException(inner) => Error::ThrottlingException(inner),
495 crate::operation::update_software_set::UpdateSoftwareSetError::ValidationException(inner) => Error::ValidationException(inner),
496 crate::operation::update_software_set::UpdateSoftwareSetError::Unhandled(inner) => Error::Unhandled(inner),
497 }
498 }
499}
500impl ::std::error::Error for Error {
501 fn source(&self) -> std::option::Option<&(dyn ::std::error::Error + 'static)> {
502 match self {
503 Error::AccessDeniedException(inner) => inner.source(),
504 Error::ConflictException(inner) => inner.source(),
505 Error::InternalServerException(inner) => inner.source(),
506 Error::ResourceNotFoundException(inner) => inner.source(),
507 Error::ServiceQuotaExceededException(inner) => inner.source(),
508 Error::ThrottlingException(inner) => inner.source(),
509 Error::ValidationException(inner) => inner.source(),
510 Error::Unhandled(inner) => ::std::option::Option::Some(&*inner.source),
511 }
512 }
513}
514impl ::aws_types::request_id::RequestId for Error {
515 fn request_id(&self) -> Option<&str> {
516 match self {
517 Self::AccessDeniedException(e) => e.request_id(),
518 Self::ConflictException(e) => e.request_id(),
519 Self::InternalServerException(e) => e.request_id(),
520 Self::ResourceNotFoundException(e) => e.request_id(),
521 Self::ServiceQuotaExceededException(e) => e.request_id(),
522 Self::ThrottlingException(e) => e.request_id(),
523 Self::ValidationException(e) => e.request_id(),
524 Self::Unhandled(e) => e.meta.request_id(),
525 }
526 }
527}