aws_sdk_medicalimaging/
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 user does not have sufficient access to perform this action.</p>
7    AccessDeniedException(crate::types::error::AccessDeniedException),
8    /// <p>Updating or deleting a resource can cause an inconsistent state.</p>
9    ConflictException(crate::types::error::ConflictException),
10    /// <p>An unexpected error occurred during processing of the request.</p>
11    InternalServerException(crate::types::error::InternalServerException),
12    /// <p>The request references a resource which does not exist.</p>
13    ResourceNotFoundException(crate::types::error::ResourceNotFoundException),
14    /// <p>The request caused a service quota to be exceeded.</p>
15    ServiceQuotaExceededException(crate::types::error::ServiceQuotaExceededException),
16    /// <p>The request was denied due to throttling.</p>
17    ThrottlingException(crate::types::error::ThrottlingException),
18    /// <p>The input fails to satisfy the constraints set by the service.</p>
19    ValidationException(crate::types::error::ValidationException),
20    /// An unexpected error occurred (e.g., invalid JSON returned by the service or an unknown error code).
21    #[deprecated(note = "Matching `Unhandled` directly is not forwards compatible. Instead, match using a \
22    variable wildcard pattern and check `.code()`:
23     \
24    &nbsp;&nbsp;&nbsp;`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::copy_image_set::CopyImageSetError, 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::copy_image_set::CopyImageSetError, 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::copy_image_set::CopyImageSetError> for Error {
86    fn from(err: crate::operation::copy_image_set::CopyImageSetError) -> Self {
87        match err {
88            crate::operation::copy_image_set::CopyImageSetError::AccessDeniedException(inner) => Error::AccessDeniedException(inner),
89            crate::operation::copy_image_set::CopyImageSetError::ConflictException(inner) => Error::ConflictException(inner),
90            crate::operation::copy_image_set::CopyImageSetError::InternalServerException(inner) => Error::InternalServerException(inner),
91            crate::operation::copy_image_set::CopyImageSetError::ResourceNotFoundException(inner) => Error::ResourceNotFoundException(inner),
92            crate::operation::copy_image_set::CopyImageSetError::ServiceQuotaExceededException(inner) => Error::ServiceQuotaExceededException(inner),
93            crate::operation::copy_image_set::CopyImageSetError::ThrottlingException(inner) => Error::ThrottlingException(inner),
94            crate::operation::copy_image_set::CopyImageSetError::ValidationException(inner) => Error::ValidationException(inner),
95            crate::operation::copy_image_set::CopyImageSetError::Unhandled(inner) => Error::Unhandled(inner),
96        }
97    }
98}
99impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::create_datastore::CreateDatastoreError, R>> for Error
100where
101    R: Send + Sync + std::fmt::Debug + 'static,
102{
103    fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::create_datastore::CreateDatastoreError, R>) -> Self {
104        match err {
105            ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
106            _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
107                meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
108                source: err.into(),
109            }),
110        }
111    }
112}
113impl From<crate::operation::create_datastore::CreateDatastoreError> for Error {
114    fn from(err: crate::operation::create_datastore::CreateDatastoreError) -> Self {
115        match err {
116            crate::operation::create_datastore::CreateDatastoreError::AccessDeniedException(inner) => Error::AccessDeniedException(inner),
117            crate::operation::create_datastore::CreateDatastoreError::ConflictException(inner) => Error::ConflictException(inner),
118            crate::operation::create_datastore::CreateDatastoreError::InternalServerException(inner) => Error::InternalServerException(inner),
119            crate::operation::create_datastore::CreateDatastoreError::ResourceNotFoundException(inner) => Error::ResourceNotFoundException(inner),
120            crate::operation::create_datastore::CreateDatastoreError::ServiceQuotaExceededException(inner) => {
121                Error::ServiceQuotaExceededException(inner)
122            }
123            crate::operation::create_datastore::CreateDatastoreError::ThrottlingException(inner) => Error::ThrottlingException(inner),
124            crate::operation::create_datastore::CreateDatastoreError::ValidationException(inner) => Error::ValidationException(inner),
125            crate::operation::create_datastore::CreateDatastoreError::Unhandled(inner) => Error::Unhandled(inner),
126        }
127    }
128}
129impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::delete_datastore::DeleteDatastoreError, R>> for Error
130where
131    R: Send + Sync + std::fmt::Debug + 'static,
132{
133    fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::delete_datastore::DeleteDatastoreError, R>) -> Self {
134        match err {
135            ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
136            _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
137                meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
138                source: err.into(),
139            }),
140        }
141    }
142}
143impl From<crate::operation::delete_datastore::DeleteDatastoreError> for Error {
144    fn from(err: crate::operation::delete_datastore::DeleteDatastoreError) -> Self {
145        match err {
146            crate::operation::delete_datastore::DeleteDatastoreError::AccessDeniedException(inner) => Error::AccessDeniedException(inner),
147            crate::operation::delete_datastore::DeleteDatastoreError::ConflictException(inner) => Error::ConflictException(inner),
148            crate::operation::delete_datastore::DeleteDatastoreError::InternalServerException(inner) => Error::InternalServerException(inner),
149            crate::operation::delete_datastore::DeleteDatastoreError::ResourceNotFoundException(inner) => Error::ResourceNotFoundException(inner),
150            crate::operation::delete_datastore::DeleteDatastoreError::ThrottlingException(inner) => Error::ThrottlingException(inner),
151            crate::operation::delete_datastore::DeleteDatastoreError::ValidationException(inner) => Error::ValidationException(inner),
152            crate::operation::delete_datastore::DeleteDatastoreError::Unhandled(inner) => Error::Unhandled(inner),
153        }
154    }
155}
156impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::delete_image_set::DeleteImageSetError, R>> for Error
157where
158    R: Send + Sync + std::fmt::Debug + 'static,
159{
160    fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::delete_image_set::DeleteImageSetError, R>) -> Self {
161        match err {
162            ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
163            _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
164                meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
165                source: err.into(),
166            }),
167        }
168    }
169}
170impl From<crate::operation::delete_image_set::DeleteImageSetError> for Error {
171    fn from(err: crate::operation::delete_image_set::DeleteImageSetError) -> Self {
172        match err {
173            crate::operation::delete_image_set::DeleteImageSetError::AccessDeniedException(inner) => Error::AccessDeniedException(inner),
174            crate::operation::delete_image_set::DeleteImageSetError::ConflictException(inner) => Error::ConflictException(inner),
175            crate::operation::delete_image_set::DeleteImageSetError::InternalServerException(inner) => Error::InternalServerException(inner),
176            crate::operation::delete_image_set::DeleteImageSetError::ResourceNotFoundException(inner) => Error::ResourceNotFoundException(inner),
177            crate::operation::delete_image_set::DeleteImageSetError::ThrottlingException(inner) => Error::ThrottlingException(inner),
178            crate::operation::delete_image_set::DeleteImageSetError::ValidationException(inner) => Error::ValidationException(inner),
179            crate::operation::delete_image_set::DeleteImageSetError::Unhandled(inner) => Error::Unhandled(inner),
180        }
181    }
182}
183impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::get_datastore::GetDatastoreError, R>> for Error
184where
185    R: Send + Sync + std::fmt::Debug + 'static,
186{
187    fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::get_datastore::GetDatastoreError, R>) -> Self {
188        match err {
189            ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
190            _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
191                meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
192                source: err.into(),
193            }),
194        }
195    }
196}
197impl From<crate::operation::get_datastore::GetDatastoreError> for Error {
198    fn from(err: crate::operation::get_datastore::GetDatastoreError) -> Self {
199        match err {
200            crate::operation::get_datastore::GetDatastoreError::AccessDeniedException(inner) => Error::AccessDeniedException(inner),
201            crate::operation::get_datastore::GetDatastoreError::InternalServerException(inner) => Error::InternalServerException(inner),
202            crate::operation::get_datastore::GetDatastoreError::ResourceNotFoundException(inner) => Error::ResourceNotFoundException(inner),
203            crate::operation::get_datastore::GetDatastoreError::ThrottlingException(inner) => Error::ThrottlingException(inner),
204            crate::operation::get_datastore::GetDatastoreError::ValidationException(inner) => Error::ValidationException(inner),
205            crate::operation::get_datastore::GetDatastoreError::Unhandled(inner) => Error::Unhandled(inner),
206        }
207    }
208}
209impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::get_dicom_import_job::GetDICOMImportJobError, R>> for Error
210where
211    R: Send + Sync + std::fmt::Debug + 'static,
212{
213    fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::get_dicom_import_job::GetDICOMImportJobError, R>) -> Self {
214        match err {
215            ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
216            _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
217                meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
218                source: err.into(),
219            }),
220        }
221    }
222}
223impl From<crate::operation::get_dicom_import_job::GetDICOMImportJobError> for Error {
224    fn from(err: crate::operation::get_dicom_import_job::GetDICOMImportJobError) -> Self {
225        match err {
226            crate::operation::get_dicom_import_job::GetDICOMImportJobError::AccessDeniedException(inner) => Error::AccessDeniedException(inner),
227            crate::operation::get_dicom_import_job::GetDICOMImportJobError::ConflictException(inner) => Error::ConflictException(inner),
228            crate::operation::get_dicom_import_job::GetDICOMImportJobError::InternalServerException(inner) => Error::InternalServerException(inner),
229            crate::operation::get_dicom_import_job::GetDICOMImportJobError::ResourceNotFoundException(inner) => {
230                Error::ResourceNotFoundException(inner)
231            }
232            crate::operation::get_dicom_import_job::GetDICOMImportJobError::ThrottlingException(inner) => Error::ThrottlingException(inner),
233            crate::operation::get_dicom_import_job::GetDICOMImportJobError::ValidationException(inner) => Error::ValidationException(inner),
234            crate::operation::get_dicom_import_job::GetDICOMImportJobError::Unhandled(inner) => Error::Unhandled(inner),
235        }
236    }
237}
238impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::get_image_frame::GetImageFrameError, R>> for Error
239where
240    R: Send + Sync + std::fmt::Debug + 'static,
241{
242    fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::get_image_frame::GetImageFrameError, R>) -> Self {
243        match err {
244            ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
245            _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
246                meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
247                source: err.into(),
248            }),
249        }
250    }
251}
252impl From<crate::operation::get_image_frame::GetImageFrameError> for Error {
253    fn from(err: crate::operation::get_image_frame::GetImageFrameError) -> Self {
254        match err {
255            crate::operation::get_image_frame::GetImageFrameError::AccessDeniedException(inner) => Error::AccessDeniedException(inner),
256            crate::operation::get_image_frame::GetImageFrameError::ConflictException(inner) => Error::ConflictException(inner),
257            crate::operation::get_image_frame::GetImageFrameError::InternalServerException(inner) => Error::InternalServerException(inner),
258            crate::operation::get_image_frame::GetImageFrameError::ResourceNotFoundException(inner) => Error::ResourceNotFoundException(inner),
259            crate::operation::get_image_frame::GetImageFrameError::ThrottlingException(inner) => Error::ThrottlingException(inner),
260            crate::operation::get_image_frame::GetImageFrameError::ValidationException(inner) => Error::ValidationException(inner),
261            crate::operation::get_image_frame::GetImageFrameError::Unhandled(inner) => Error::Unhandled(inner),
262        }
263    }
264}
265impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::get_image_set::GetImageSetError, R>> for Error
266where
267    R: Send + Sync + std::fmt::Debug + 'static,
268{
269    fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::get_image_set::GetImageSetError, R>) -> Self {
270        match err {
271            ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
272            _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
273                meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
274                source: err.into(),
275            }),
276        }
277    }
278}
279impl From<crate::operation::get_image_set::GetImageSetError> for Error {
280    fn from(err: crate::operation::get_image_set::GetImageSetError) -> Self {
281        match err {
282            crate::operation::get_image_set::GetImageSetError::AccessDeniedException(inner) => Error::AccessDeniedException(inner),
283            crate::operation::get_image_set::GetImageSetError::ConflictException(inner) => Error::ConflictException(inner),
284            crate::operation::get_image_set::GetImageSetError::InternalServerException(inner) => Error::InternalServerException(inner),
285            crate::operation::get_image_set::GetImageSetError::ResourceNotFoundException(inner) => Error::ResourceNotFoundException(inner),
286            crate::operation::get_image_set::GetImageSetError::ThrottlingException(inner) => Error::ThrottlingException(inner),
287            crate::operation::get_image_set::GetImageSetError::ValidationException(inner) => Error::ValidationException(inner),
288            crate::operation::get_image_set::GetImageSetError::Unhandled(inner) => Error::Unhandled(inner),
289        }
290    }
291}
292impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::get_image_set_metadata::GetImageSetMetadataError, 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::get_image_set_metadata::GetImageSetMetadataError, 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::get_image_set_metadata::GetImageSetMetadataError> for Error {
307    fn from(err: crate::operation::get_image_set_metadata::GetImageSetMetadataError) -> Self {
308        match err {
309            crate::operation::get_image_set_metadata::GetImageSetMetadataError::AccessDeniedException(inner) => Error::AccessDeniedException(inner),
310            crate::operation::get_image_set_metadata::GetImageSetMetadataError::ConflictException(inner) => Error::ConflictException(inner),
311            crate::operation::get_image_set_metadata::GetImageSetMetadataError::InternalServerException(inner) => {
312                Error::InternalServerException(inner)
313            }
314            crate::operation::get_image_set_metadata::GetImageSetMetadataError::ResourceNotFoundException(inner) => {
315                Error::ResourceNotFoundException(inner)
316            }
317            crate::operation::get_image_set_metadata::GetImageSetMetadataError::ThrottlingException(inner) => Error::ThrottlingException(inner),
318            crate::operation::get_image_set_metadata::GetImageSetMetadataError::ValidationException(inner) => Error::ValidationException(inner),
319            crate::operation::get_image_set_metadata::GetImageSetMetadataError::Unhandled(inner) => Error::Unhandled(inner),
320        }
321    }
322}
323impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::list_datastores::ListDatastoresError, R>> for Error
324where
325    R: Send + Sync + std::fmt::Debug + 'static,
326{
327    fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::list_datastores::ListDatastoresError, R>) -> Self {
328        match err {
329            ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
330            _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
331                meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
332                source: err.into(),
333            }),
334        }
335    }
336}
337impl From<crate::operation::list_datastores::ListDatastoresError> for Error {
338    fn from(err: crate::operation::list_datastores::ListDatastoresError) -> Self {
339        match err {
340            crate::operation::list_datastores::ListDatastoresError::AccessDeniedException(inner) => Error::AccessDeniedException(inner),
341            crate::operation::list_datastores::ListDatastoresError::InternalServerException(inner) => Error::InternalServerException(inner),
342            crate::operation::list_datastores::ListDatastoresError::ThrottlingException(inner) => Error::ThrottlingException(inner),
343            crate::operation::list_datastores::ListDatastoresError::ValidationException(inner) => Error::ValidationException(inner),
344            crate::operation::list_datastores::ListDatastoresError::Unhandled(inner) => Error::Unhandled(inner),
345        }
346    }
347}
348impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::list_dicom_import_jobs::ListDICOMImportJobsError, R>> for Error
349where
350    R: Send + Sync + std::fmt::Debug + 'static,
351{
352    fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::list_dicom_import_jobs::ListDICOMImportJobsError, R>) -> Self {
353        match err {
354            ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
355            _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
356                meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
357                source: err.into(),
358            }),
359        }
360    }
361}
362impl From<crate::operation::list_dicom_import_jobs::ListDICOMImportJobsError> for Error {
363    fn from(err: crate::operation::list_dicom_import_jobs::ListDICOMImportJobsError) -> Self {
364        match err {
365            crate::operation::list_dicom_import_jobs::ListDICOMImportJobsError::AccessDeniedException(inner) => Error::AccessDeniedException(inner),
366            crate::operation::list_dicom_import_jobs::ListDICOMImportJobsError::ConflictException(inner) => Error::ConflictException(inner),
367            crate::operation::list_dicom_import_jobs::ListDICOMImportJobsError::InternalServerException(inner) => {
368                Error::InternalServerException(inner)
369            }
370            crate::operation::list_dicom_import_jobs::ListDICOMImportJobsError::ResourceNotFoundException(inner) => {
371                Error::ResourceNotFoundException(inner)
372            }
373            crate::operation::list_dicom_import_jobs::ListDICOMImportJobsError::ThrottlingException(inner) => Error::ThrottlingException(inner),
374            crate::operation::list_dicom_import_jobs::ListDICOMImportJobsError::ValidationException(inner) => Error::ValidationException(inner),
375            crate::operation::list_dicom_import_jobs::ListDICOMImportJobsError::Unhandled(inner) => Error::Unhandled(inner),
376        }
377    }
378}
379impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::list_image_set_versions::ListImageSetVersionsError, R>> for Error
380where
381    R: Send + Sync + std::fmt::Debug + 'static,
382{
383    fn from(
384        err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::list_image_set_versions::ListImageSetVersionsError, R>,
385    ) -> Self {
386        match err {
387            ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
388            _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
389                meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
390                source: err.into(),
391            }),
392        }
393    }
394}
395impl From<crate::operation::list_image_set_versions::ListImageSetVersionsError> for Error {
396    fn from(err: crate::operation::list_image_set_versions::ListImageSetVersionsError) -> Self {
397        match err {
398            crate::operation::list_image_set_versions::ListImageSetVersionsError::AccessDeniedException(inner) => Error::AccessDeniedException(inner),
399            crate::operation::list_image_set_versions::ListImageSetVersionsError::ConflictException(inner) => Error::ConflictException(inner),
400            crate::operation::list_image_set_versions::ListImageSetVersionsError::InternalServerException(inner) => {
401                Error::InternalServerException(inner)
402            }
403            crate::operation::list_image_set_versions::ListImageSetVersionsError::ResourceNotFoundException(inner) => {
404                Error::ResourceNotFoundException(inner)
405            }
406            crate::operation::list_image_set_versions::ListImageSetVersionsError::ThrottlingException(inner) => Error::ThrottlingException(inner),
407            crate::operation::list_image_set_versions::ListImageSetVersionsError::ValidationException(inner) => Error::ValidationException(inner),
408            crate::operation::list_image_set_versions::ListImageSetVersionsError::Unhandled(inner) => Error::Unhandled(inner),
409        }
410    }
411}
412impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::list_tags_for_resource::ListTagsForResourceError, 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::list_tags_for_resource::ListTagsForResourceError, 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::list_tags_for_resource::ListTagsForResourceError> for Error {
427    fn from(err: crate::operation::list_tags_for_resource::ListTagsForResourceError) -> Self {
428        match err {
429            crate::operation::list_tags_for_resource::ListTagsForResourceError::AccessDeniedException(inner) => Error::AccessDeniedException(inner),
430            crate::operation::list_tags_for_resource::ListTagsForResourceError::InternalServerException(inner) => {
431                Error::InternalServerException(inner)
432            }
433            crate::operation::list_tags_for_resource::ListTagsForResourceError::ResourceNotFoundException(inner) => {
434                Error::ResourceNotFoundException(inner)
435            }
436            crate::operation::list_tags_for_resource::ListTagsForResourceError::ThrottlingException(inner) => Error::ThrottlingException(inner),
437            crate::operation::list_tags_for_resource::ListTagsForResourceError::ValidationException(inner) => Error::ValidationException(inner),
438            crate::operation::list_tags_for_resource::ListTagsForResourceError::Unhandled(inner) => Error::Unhandled(inner),
439        }
440    }
441}
442impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::search_image_sets::SearchImageSetsError, R>> for Error
443where
444    R: Send + Sync + std::fmt::Debug + 'static,
445{
446    fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::search_image_sets::SearchImageSetsError, R>) -> Self {
447        match err {
448            ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
449            _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
450                meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
451                source: err.into(),
452            }),
453        }
454    }
455}
456impl From<crate::operation::search_image_sets::SearchImageSetsError> for Error {
457    fn from(err: crate::operation::search_image_sets::SearchImageSetsError) -> Self {
458        match err {
459            crate::operation::search_image_sets::SearchImageSetsError::AccessDeniedException(inner) => Error::AccessDeniedException(inner),
460            crate::operation::search_image_sets::SearchImageSetsError::ConflictException(inner) => Error::ConflictException(inner),
461            crate::operation::search_image_sets::SearchImageSetsError::InternalServerException(inner) => Error::InternalServerException(inner),
462            crate::operation::search_image_sets::SearchImageSetsError::ResourceNotFoundException(inner) => Error::ResourceNotFoundException(inner),
463            crate::operation::search_image_sets::SearchImageSetsError::ThrottlingException(inner) => Error::ThrottlingException(inner),
464            crate::operation::search_image_sets::SearchImageSetsError::ValidationException(inner) => Error::ValidationException(inner),
465            crate::operation::search_image_sets::SearchImageSetsError::Unhandled(inner) => Error::Unhandled(inner),
466        }
467    }
468}
469impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::start_dicom_import_job::StartDICOMImportJobError, R>> for Error
470where
471    R: Send + Sync + std::fmt::Debug + 'static,
472{
473    fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::start_dicom_import_job::StartDICOMImportJobError, R>) -> Self {
474        match err {
475            ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
476            _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
477                meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
478                source: err.into(),
479            }),
480        }
481    }
482}
483impl From<crate::operation::start_dicom_import_job::StartDICOMImportJobError> for Error {
484    fn from(err: crate::operation::start_dicom_import_job::StartDICOMImportJobError) -> Self {
485        match err {
486            crate::operation::start_dicom_import_job::StartDICOMImportJobError::AccessDeniedException(inner) => Error::AccessDeniedException(inner),
487            crate::operation::start_dicom_import_job::StartDICOMImportJobError::ConflictException(inner) => Error::ConflictException(inner),
488            crate::operation::start_dicom_import_job::StartDICOMImportJobError::InternalServerException(inner) => {
489                Error::InternalServerException(inner)
490            }
491            crate::operation::start_dicom_import_job::StartDICOMImportJobError::ResourceNotFoundException(inner) => {
492                Error::ResourceNotFoundException(inner)
493            }
494            crate::operation::start_dicom_import_job::StartDICOMImportJobError::ServiceQuotaExceededException(inner) => {
495                Error::ServiceQuotaExceededException(inner)
496            }
497            crate::operation::start_dicom_import_job::StartDICOMImportJobError::ThrottlingException(inner) => Error::ThrottlingException(inner),
498            crate::operation::start_dicom_import_job::StartDICOMImportJobError::ValidationException(inner) => Error::ValidationException(inner),
499            crate::operation::start_dicom_import_job::StartDICOMImportJobError::Unhandled(inner) => Error::Unhandled(inner),
500        }
501    }
502}
503impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::tag_resource::TagResourceError, R>> for Error
504where
505    R: Send + Sync + std::fmt::Debug + 'static,
506{
507    fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::tag_resource::TagResourceError, R>) -> Self {
508        match err {
509            ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
510            _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
511                meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
512                source: err.into(),
513            }),
514        }
515    }
516}
517impl From<crate::operation::tag_resource::TagResourceError> for Error {
518    fn from(err: crate::operation::tag_resource::TagResourceError) -> Self {
519        match err {
520            crate::operation::tag_resource::TagResourceError::AccessDeniedException(inner) => Error::AccessDeniedException(inner),
521            crate::operation::tag_resource::TagResourceError::InternalServerException(inner) => Error::InternalServerException(inner),
522            crate::operation::tag_resource::TagResourceError::ResourceNotFoundException(inner) => Error::ResourceNotFoundException(inner),
523            crate::operation::tag_resource::TagResourceError::ThrottlingException(inner) => Error::ThrottlingException(inner),
524            crate::operation::tag_resource::TagResourceError::ValidationException(inner) => Error::ValidationException(inner),
525            crate::operation::tag_resource::TagResourceError::Unhandled(inner) => Error::Unhandled(inner),
526        }
527    }
528}
529impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::untag_resource::UntagResourceError, R>> for Error
530where
531    R: Send + Sync + std::fmt::Debug + 'static,
532{
533    fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::untag_resource::UntagResourceError, R>) -> Self {
534        match err {
535            ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
536            _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
537                meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
538                source: err.into(),
539            }),
540        }
541    }
542}
543impl From<crate::operation::untag_resource::UntagResourceError> for Error {
544    fn from(err: crate::operation::untag_resource::UntagResourceError) -> Self {
545        match err {
546            crate::operation::untag_resource::UntagResourceError::AccessDeniedException(inner) => Error::AccessDeniedException(inner),
547            crate::operation::untag_resource::UntagResourceError::InternalServerException(inner) => Error::InternalServerException(inner),
548            crate::operation::untag_resource::UntagResourceError::ResourceNotFoundException(inner) => Error::ResourceNotFoundException(inner),
549            crate::operation::untag_resource::UntagResourceError::ThrottlingException(inner) => Error::ThrottlingException(inner),
550            crate::operation::untag_resource::UntagResourceError::ValidationException(inner) => Error::ValidationException(inner),
551            crate::operation::untag_resource::UntagResourceError::Unhandled(inner) => Error::Unhandled(inner),
552        }
553    }
554}
555impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::update_image_set_metadata::UpdateImageSetMetadataError, R>>
556    for Error
557where
558    R: Send + Sync + std::fmt::Debug + 'static,
559{
560    fn from(
561        err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::update_image_set_metadata::UpdateImageSetMetadataError, R>,
562    ) -> Self {
563        match err {
564            ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
565            _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
566                meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
567                source: err.into(),
568            }),
569        }
570    }
571}
572impl From<crate::operation::update_image_set_metadata::UpdateImageSetMetadataError> for Error {
573    fn from(err: crate::operation::update_image_set_metadata::UpdateImageSetMetadataError) -> Self {
574        match err {
575            crate::operation::update_image_set_metadata::UpdateImageSetMetadataError::AccessDeniedException(inner) => {
576                Error::AccessDeniedException(inner)
577            }
578            crate::operation::update_image_set_metadata::UpdateImageSetMetadataError::ConflictException(inner) => Error::ConflictException(inner),
579            crate::operation::update_image_set_metadata::UpdateImageSetMetadataError::InternalServerException(inner) => {
580                Error::InternalServerException(inner)
581            }
582            crate::operation::update_image_set_metadata::UpdateImageSetMetadataError::ResourceNotFoundException(inner) => {
583                Error::ResourceNotFoundException(inner)
584            }
585            crate::operation::update_image_set_metadata::UpdateImageSetMetadataError::ServiceQuotaExceededException(inner) => {
586                Error::ServiceQuotaExceededException(inner)
587            }
588            crate::operation::update_image_set_metadata::UpdateImageSetMetadataError::ThrottlingException(inner) => Error::ThrottlingException(inner),
589            crate::operation::update_image_set_metadata::UpdateImageSetMetadataError::ValidationException(inner) => Error::ValidationException(inner),
590            crate::operation::update_image_set_metadata::UpdateImageSetMetadataError::Unhandled(inner) => Error::Unhandled(inner),
591        }
592    }
593}
594impl ::std::error::Error for Error {
595    fn source(&self) -> std::option::Option<&(dyn ::std::error::Error + 'static)> {
596        match self {
597            Error::AccessDeniedException(inner) => inner.source(),
598            Error::ConflictException(inner) => inner.source(),
599            Error::InternalServerException(inner) => inner.source(),
600            Error::ResourceNotFoundException(inner) => inner.source(),
601            Error::ServiceQuotaExceededException(inner) => inner.source(),
602            Error::ThrottlingException(inner) => inner.source(),
603            Error::ValidationException(inner) => inner.source(),
604            Error::Unhandled(inner) => ::std::option::Option::Some(&*inner.source),
605        }
606    }
607}
608impl ::aws_types::request_id::RequestId for Error {
609    fn request_id(&self) -> Option<&str> {
610        match self {
611            Self::AccessDeniedException(e) => e.request_id(),
612            Self::ConflictException(e) => e.request_id(),
613            Self::InternalServerException(e) => e.request_id(),
614            Self::ResourceNotFoundException(e) => e.request_id(),
615            Self::ServiceQuotaExceededException(e) => e.request_id(),
616            Self::ThrottlingException(e) => e.request_id(),
617            Self::ValidationException(e) => e.request_id(),
618            Self::Unhandled(e) => e.meta.request_id(),
619        }
620    }
621}