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