aws_sdk_taxsettings/
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 access is denied for the Amazon Web ServicesSupport API.</p>
7    AccessDeniedException(crate::types::error::AccessDeniedException),
8    /// <p>Failed to upload the tax exemption document to Amazon Web ServicesSupport case.</p>
9    AttachmentUploadException(crate::types::error::AttachmentUploadException),
10    /// <p>You've exceeded the Amazon Web ServicesSupport case creation limit for your account.</p>
11    CaseCreationLimitExceededException(crate::types::error::CaseCreationLimitExceededException),
12    /// <p>The exception when the input is creating conflict with the given state.</p>
13    ConflictException(crate::types::error::ConflictException),
14    /// <p>The exception thrown when an unexpected error occurs when processing a request.</p>
15    InternalServerException(crate::types::error::InternalServerException),
16    /// <p>The exception thrown when the input doesn't have a resource associated to it.</p>
17    ResourceNotFoundException(crate::types::error::ResourceNotFoundException),
18    /// <p>The exception when the input doesn't pass validation for at least one of the input parameters.</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::AttachmentUploadException(inner) => inner.fmt(f),
34            Error::CaseCreationLimitExceededException(inner) => inner.fmt(f),
35            Error::ConflictException(inner) => inner.fmt(f),
36            Error::InternalServerException(inner) => inner.fmt(f),
37            Error::ResourceNotFoundException(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::AttachmentUploadException(inner) => inner.meta(),
62            Self::CaseCreationLimitExceededException(inner) => inner.meta(),
63            Self::ConflictException(inner) => inner.meta(),
64            Self::InternalServerException(inner) => inner.meta(),
65            Self::ResourceNotFoundException(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::batch_delete_tax_registration::BatchDeleteTaxRegistrationError, R>>
72    for Error
73where
74    R: Send + Sync + std::fmt::Debug + 'static,
75{
76    fn from(
77        err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::batch_delete_tax_registration::BatchDeleteTaxRegistrationError, R>,
78    ) -> Self {
79        match err {
80            ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
81            _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
82                meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
83                source: err.into(),
84            }),
85        }
86    }
87}
88impl From<crate::operation::batch_delete_tax_registration::BatchDeleteTaxRegistrationError> for Error {
89    fn from(err: crate::operation::batch_delete_tax_registration::BatchDeleteTaxRegistrationError) -> Self {
90        match err {
91            crate::operation::batch_delete_tax_registration::BatchDeleteTaxRegistrationError::ConflictException(inner) => {
92                Error::ConflictException(inner)
93            }
94            crate::operation::batch_delete_tax_registration::BatchDeleteTaxRegistrationError::InternalServerException(inner) => {
95                Error::InternalServerException(inner)
96            }
97            crate::operation::batch_delete_tax_registration::BatchDeleteTaxRegistrationError::ValidationException(inner) => {
98                Error::ValidationException(inner)
99            }
100            crate::operation::batch_delete_tax_registration::BatchDeleteTaxRegistrationError::Unhandled(inner) => Error::Unhandled(inner),
101        }
102    }
103}
104impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::batch_get_tax_exemptions::BatchGetTaxExemptionsError, R>> for Error
105where
106    R: Send + Sync + std::fmt::Debug + 'static,
107{
108    fn from(
109        err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::batch_get_tax_exemptions::BatchGetTaxExemptionsError, R>,
110    ) -> Self {
111        match err {
112            ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
113            _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
114                meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
115                source: err.into(),
116            }),
117        }
118    }
119}
120impl From<crate::operation::batch_get_tax_exemptions::BatchGetTaxExemptionsError> for Error {
121    fn from(err: crate::operation::batch_get_tax_exemptions::BatchGetTaxExemptionsError) -> Self {
122        match err {
123            crate::operation::batch_get_tax_exemptions::BatchGetTaxExemptionsError::InternalServerException(inner) => {
124                Error::InternalServerException(inner)
125            }
126            crate::operation::batch_get_tax_exemptions::BatchGetTaxExemptionsError::ResourceNotFoundException(inner) => {
127                Error::ResourceNotFoundException(inner)
128            }
129            crate::operation::batch_get_tax_exemptions::BatchGetTaxExemptionsError::ValidationException(inner) => Error::ValidationException(inner),
130            crate::operation::batch_get_tax_exemptions::BatchGetTaxExemptionsError::Unhandled(inner) => Error::Unhandled(inner),
131        }
132    }
133}
134impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::batch_put_tax_registration::BatchPutTaxRegistrationError, R>>
135    for Error
136where
137    R: Send + Sync + std::fmt::Debug + 'static,
138{
139    fn from(
140        err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::batch_put_tax_registration::BatchPutTaxRegistrationError, R>,
141    ) -> Self {
142        match err {
143            ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
144            _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
145                meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
146                source: err.into(),
147            }),
148        }
149    }
150}
151impl From<crate::operation::batch_put_tax_registration::BatchPutTaxRegistrationError> for Error {
152    fn from(err: crate::operation::batch_put_tax_registration::BatchPutTaxRegistrationError) -> Self {
153        match err {
154            crate::operation::batch_put_tax_registration::BatchPutTaxRegistrationError::ConflictException(inner) => Error::ConflictException(inner),
155            crate::operation::batch_put_tax_registration::BatchPutTaxRegistrationError::InternalServerException(inner) => {
156                Error::InternalServerException(inner)
157            }
158            crate::operation::batch_put_tax_registration::BatchPutTaxRegistrationError::ValidationException(inner) => {
159                Error::ValidationException(inner)
160            }
161            crate::operation::batch_put_tax_registration::BatchPutTaxRegistrationError::Unhandled(inner) => Error::Unhandled(inner),
162        }
163    }
164}
165impl<R>
166    From<
167        ::aws_smithy_runtime_api::client::result::SdkError<
168            crate::operation::delete_supplemental_tax_registration::DeleteSupplementalTaxRegistrationError,
169            R,
170        >,
171    > for Error
172where
173    R: Send + Sync + std::fmt::Debug + 'static,
174{
175    fn from(
176        err: ::aws_smithy_runtime_api::client::result::SdkError<
177            crate::operation::delete_supplemental_tax_registration::DeleteSupplementalTaxRegistrationError,
178            R,
179        >,
180    ) -> Self {
181        match err {
182            ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
183            _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
184                meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
185                source: err.into(),
186            }),
187        }
188    }
189}
190impl From<crate::operation::delete_supplemental_tax_registration::DeleteSupplementalTaxRegistrationError> for Error {
191    fn from(err: crate::operation::delete_supplemental_tax_registration::DeleteSupplementalTaxRegistrationError) -> Self {
192        match err {
193            crate::operation::delete_supplemental_tax_registration::DeleteSupplementalTaxRegistrationError::ConflictException(inner) => {
194                Error::ConflictException(inner)
195            }
196            crate::operation::delete_supplemental_tax_registration::DeleteSupplementalTaxRegistrationError::InternalServerException(inner) => {
197                Error::InternalServerException(inner)
198            }
199            crate::operation::delete_supplemental_tax_registration::DeleteSupplementalTaxRegistrationError::ResourceNotFoundException(inner) => {
200                Error::ResourceNotFoundException(inner)
201            }
202            crate::operation::delete_supplemental_tax_registration::DeleteSupplementalTaxRegistrationError::ValidationException(inner) => {
203                Error::ValidationException(inner)
204            }
205            crate::operation::delete_supplemental_tax_registration::DeleteSupplementalTaxRegistrationError::Unhandled(inner) => {
206                Error::Unhandled(inner)
207            }
208        }
209    }
210}
211impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::delete_tax_registration::DeleteTaxRegistrationError, R>> for Error
212where
213    R: Send + Sync + std::fmt::Debug + 'static,
214{
215    fn from(
216        err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::delete_tax_registration::DeleteTaxRegistrationError, R>,
217    ) -> Self {
218        match err {
219            ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
220            _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
221                meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
222                source: err.into(),
223            }),
224        }
225    }
226}
227impl From<crate::operation::delete_tax_registration::DeleteTaxRegistrationError> for Error {
228    fn from(err: crate::operation::delete_tax_registration::DeleteTaxRegistrationError) -> Self {
229        match err {
230            crate::operation::delete_tax_registration::DeleteTaxRegistrationError::ConflictException(inner) => Error::ConflictException(inner),
231            crate::operation::delete_tax_registration::DeleteTaxRegistrationError::InternalServerException(inner) => {
232                Error::InternalServerException(inner)
233            }
234            crate::operation::delete_tax_registration::DeleteTaxRegistrationError::ResourceNotFoundException(inner) => {
235                Error::ResourceNotFoundException(inner)
236            }
237            crate::operation::delete_tax_registration::DeleteTaxRegistrationError::ValidationException(inner) => Error::ValidationException(inner),
238            crate::operation::delete_tax_registration::DeleteTaxRegistrationError::Unhandled(inner) => Error::Unhandled(inner),
239        }
240    }
241}
242impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::get_tax_exemption_types::GetTaxExemptionTypesError, R>> for Error
243where
244    R: Send + Sync + std::fmt::Debug + 'static,
245{
246    fn from(
247        err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::get_tax_exemption_types::GetTaxExemptionTypesError, R>,
248    ) -> Self {
249        match err {
250            ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
251            _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
252                meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
253                source: err.into(),
254            }),
255        }
256    }
257}
258impl From<crate::operation::get_tax_exemption_types::GetTaxExemptionTypesError> for Error {
259    fn from(err: crate::operation::get_tax_exemption_types::GetTaxExemptionTypesError) -> Self {
260        match err {
261            crate::operation::get_tax_exemption_types::GetTaxExemptionTypesError::InternalServerException(inner) => {
262                Error::InternalServerException(inner)
263            }
264            crate::operation::get_tax_exemption_types::GetTaxExemptionTypesError::ResourceNotFoundException(inner) => {
265                Error::ResourceNotFoundException(inner)
266            }
267            crate::operation::get_tax_exemption_types::GetTaxExemptionTypesError::ValidationException(inner) => Error::ValidationException(inner),
268            crate::operation::get_tax_exemption_types::GetTaxExemptionTypesError::Unhandled(inner) => Error::Unhandled(inner),
269        }
270    }
271}
272impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::get_tax_inheritance::GetTaxInheritanceError, R>> for Error
273where
274    R: Send + Sync + std::fmt::Debug + 'static,
275{
276    fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::get_tax_inheritance::GetTaxInheritanceError, R>) -> Self {
277        match err {
278            ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
279            _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
280                meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
281                source: err.into(),
282            }),
283        }
284    }
285}
286impl From<crate::operation::get_tax_inheritance::GetTaxInheritanceError> for Error {
287    fn from(err: crate::operation::get_tax_inheritance::GetTaxInheritanceError) -> Self {
288        match err {
289            crate::operation::get_tax_inheritance::GetTaxInheritanceError::InternalServerException(inner) => Error::InternalServerException(inner),
290            crate::operation::get_tax_inheritance::GetTaxInheritanceError::ResourceNotFoundException(inner) => {
291                Error::ResourceNotFoundException(inner)
292            }
293            crate::operation::get_tax_inheritance::GetTaxInheritanceError::ValidationException(inner) => Error::ValidationException(inner),
294            crate::operation::get_tax_inheritance::GetTaxInheritanceError::Unhandled(inner) => Error::Unhandled(inner),
295        }
296    }
297}
298impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::get_tax_registration::GetTaxRegistrationError, R>> for Error
299where
300    R: Send + Sync + std::fmt::Debug + 'static,
301{
302    fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::get_tax_registration::GetTaxRegistrationError, R>) -> Self {
303        match err {
304            ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
305            _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
306                meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
307                source: err.into(),
308            }),
309        }
310    }
311}
312impl From<crate::operation::get_tax_registration::GetTaxRegistrationError> for Error {
313    fn from(err: crate::operation::get_tax_registration::GetTaxRegistrationError) -> Self {
314        match err {
315            crate::operation::get_tax_registration::GetTaxRegistrationError::InternalServerException(inner) => Error::InternalServerException(inner),
316            crate::operation::get_tax_registration::GetTaxRegistrationError::ResourceNotFoundException(inner) => {
317                Error::ResourceNotFoundException(inner)
318            }
319            crate::operation::get_tax_registration::GetTaxRegistrationError::ValidationException(inner) => Error::ValidationException(inner),
320            crate::operation::get_tax_registration::GetTaxRegistrationError::Unhandled(inner) => Error::Unhandled(inner),
321        }
322    }
323}
324impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::get_tax_registration_document::GetTaxRegistrationDocumentError, R>>
325    for Error
326where
327    R: Send + Sync + std::fmt::Debug + 'static,
328{
329    fn from(
330        err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::get_tax_registration_document::GetTaxRegistrationDocumentError, R>,
331    ) -> Self {
332        match err {
333            ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
334            _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
335                meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
336                source: err.into(),
337            }),
338        }
339    }
340}
341impl From<crate::operation::get_tax_registration_document::GetTaxRegistrationDocumentError> for Error {
342    fn from(err: crate::operation::get_tax_registration_document::GetTaxRegistrationDocumentError) -> Self {
343        match err {
344            crate::operation::get_tax_registration_document::GetTaxRegistrationDocumentError::InternalServerException(inner) => {
345                Error::InternalServerException(inner)
346            }
347            crate::operation::get_tax_registration_document::GetTaxRegistrationDocumentError::ValidationException(inner) => {
348                Error::ValidationException(inner)
349            }
350            crate::operation::get_tax_registration_document::GetTaxRegistrationDocumentError::Unhandled(inner) => Error::Unhandled(inner),
351        }
352    }
353}
354impl<R>
355    From<
356        ::aws_smithy_runtime_api::client::result::SdkError<
357            crate::operation::list_supplemental_tax_registrations::ListSupplementalTaxRegistrationsError,
358            R,
359        >,
360    > for Error
361where
362    R: Send + Sync + std::fmt::Debug + 'static,
363{
364    fn from(
365        err: ::aws_smithy_runtime_api::client::result::SdkError<
366            crate::operation::list_supplemental_tax_registrations::ListSupplementalTaxRegistrationsError,
367            R,
368        >,
369    ) -> 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::list_supplemental_tax_registrations::ListSupplementalTaxRegistrationsError> for Error {
380    fn from(err: crate::operation::list_supplemental_tax_registrations::ListSupplementalTaxRegistrationsError) -> Self {
381        match err {
382            crate::operation::list_supplemental_tax_registrations::ListSupplementalTaxRegistrationsError::InternalServerException(inner) => {
383                Error::InternalServerException(inner)
384            }
385            crate::operation::list_supplemental_tax_registrations::ListSupplementalTaxRegistrationsError::ResourceNotFoundException(inner) => {
386                Error::ResourceNotFoundException(inner)
387            }
388            crate::operation::list_supplemental_tax_registrations::ListSupplementalTaxRegistrationsError::ValidationException(inner) => {
389                Error::ValidationException(inner)
390            }
391            crate::operation::list_supplemental_tax_registrations::ListSupplementalTaxRegistrationsError::Unhandled(inner) => Error::Unhandled(inner),
392        }
393    }
394}
395impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::list_tax_exemptions::ListTaxExemptionsError, R>> for Error
396where
397    R: Send + Sync + std::fmt::Debug + 'static,
398{
399    fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::list_tax_exemptions::ListTaxExemptionsError, R>) -> Self {
400        match err {
401            ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
402            _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
403                meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
404                source: err.into(),
405            }),
406        }
407    }
408}
409impl From<crate::operation::list_tax_exemptions::ListTaxExemptionsError> for Error {
410    fn from(err: crate::operation::list_tax_exemptions::ListTaxExemptionsError) -> Self {
411        match err {
412            crate::operation::list_tax_exemptions::ListTaxExemptionsError::InternalServerException(inner) => Error::InternalServerException(inner),
413            crate::operation::list_tax_exemptions::ListTaxExemptionsError::ResourceNotFoundException(inner) => {
414                Error::ResourceNotFoundException(inner)
415            }
416            crate::operation::list_tax_exemptions::ListTaxExemptionsError::ValidationException(inner) => Error::ValidationException(inner),
417            crate::operation::list_tax_exemptions::ListTaxExemptionsError::Unhandled(inner) => Error::Unhandled(inner),
418        }
419    }
420}
421impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::list_tax_registrations::ListTaxRegistrationsError, R>> for Error
422where
423    R: Send + Sync + std::fmt::Debug + 'static,
424{
425    fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::list_tax_registrations::ListTaxRegistrationsError, R>) -> Self {
426        match err {
427            ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
428            _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
429                meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
430                source: err.into(),
431            }),
432        }
433    }
434}
435impl From<crate::operation::list_tax_registrations::ListTaxRegistrationsError> for Error {
436    fn from(err: crate::operation::list_tax_registrations::ListTaxRegistrationsError) -> Self {
437        match err {
438            crate::operation::list_tax_registrations::ListTaxRegistrationsError::InternalServerException(inner) => {
439                Error::InternalServerException(inner)
440            }
441            crate::operation::list_tax_registrations::ListTaxRegistrationsError::ResourceNotFoundException(inner) => {
442                Error::ResourceNotFoundException(inner)
443            }
444            crate::operation::list_tax_registrations::ListTaxRegistrationsError::ValidationException(inner) => Error::ValidationException(inner),
445            crate::operation::list_tax_registrations::ListTaxRegistrationsError::Unhandled(inner) => Error::Unhandled(inner),
446        }
447    }
448}
449impl<R>
450    From<
451        ::aws_smithy_runtime_api::client::result::SdkError<
452            crate::operation::put_supplemental_tax_registration::PutSupplementalTaxRegistrationError,
453            R,
454        >,
455    > for Error
456where
457    R: Send + Sync + std::fmt::Debug + 'static,
458{
459    fn from(
460        err: ::aws_smithy_runtime_api::client::result::SdkError<
461            crate::operation::put_supplemental_tax_registration::PutSupplementalTaxRegistrationError,
462            R,
463        >,
464    ) -> Self {
465        match err {
466            ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
467            _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
468                meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
469                source: err.into(),
470            }),
471        }
472    }
473}
474impl From<crate::operation::put_supplemental_tax_registration::PutSupplementalTaxRegistrationError> for Error {
475    fn from(err: crate::operation::put_supplemental_tax_registration::PutSupplementalTaxRegistrationError) -> Self {
476        match err {
477            crate::operation::put_supplemental_tax_registration::PutSupplementalTaxRegistrationError::ConflictException(inner) => {
478                Error::ConflictException(inner)
479            }
480            crate::operation::put_supplemental_tax_registration::PutSupplementalTaxRegistrationError::InternalServerException(inner) => {
481                Error::InternalServerException(inner)
482            }
483            crate::operation::put_supplemental_tax_registration::PutSupplementalTaxRegistrationError::ValidationException(inner) => {
484                Error::ValidationException(inner)
485            }
486            crate::operation::put_supplemental_tax_registration::PutSupplementalTaxRegistrationError::Unhandled(inner) => Error::Unhandled(inner),
487        }
488    }
489}
490impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::put_tax_exemption::PutTaxExemptionError, R>> for Error
491where
492    R: Send + Sync + std::fmt::Debug + 'static,
493{
494    fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::put_tax_exemption::PutTaxExemptionError, R>) -> Self {
495        match err {
496            ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
497            _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
498                meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
499                source: err.into(),
500            }),
501        }
502    }
503}
504impl From<crate::operation::put_tax_exemption::PutTaxExemptionError> for Error {
505    fn from(err: crate::operation::put_tax_exemption::PutTaxExemptionError) -> Self {
506        match err {
507            crate::operation::put_tax_exemption::PutTaxExemptionError::AccessDeniedException(inner) => Error::AccessDeniedException(inner),
508            crate::operation::put_tax_exemption::PutTaxExemptionError::AttachmentUploadException(inner) => Error::AttachmentUploadException(inner),
509            crate::operation::put_tax_exemption::PutTaxExemptionError::CaseCreationLimitExceededException(inner) => {
510                Error::CaseCreationLimitExceededException(inner)
511            }
512            crate::operation::put_tax_exemption::PutTaxExemptionError::InternalServerException(inner) => Error::InternalServerException(inner),
513            crate::operation::put_tax_exemption::PutTaxExemptionError::ResourceNotFoundException(inner) => Error::ResourceNotFoundException(inner),
514            crate::operation::put_tax_exemption::PutTaxExemptionError::ValidationException(inner) => Error::ValidationException(inner),
515            crate::operation::put_tax_exemption::PutTaxExemptionError::Unhandled(inner) => Error::Unhandled(inner),
516        }
517    }
518}
519impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::put_tax_inheritance::PutTaxInheritanceError, R>> for Error
520where
521    R: Send + Sync + std::fmt::Debug + 'static,
522{
523    fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::put_tax_inheritance::PutTaxInheritanceError, R>) -> Self {
524        match err {
525            ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
526            _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
527                meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
528                source: err.into(),
529            }),
530        }
531    }
532}
533impl From<crate::operation::put_tax_inheritance::PutTaxInheritanceError> for Error {
534    fn from(err: crate::operation::put_tax_inheritance::PutTaxInheritanceError) -> Self {
535        match err {
536            crate::operation::put_tax_inheritance::PutTaxInheritanceError::ConflictException(inner) => Error::ConflictException(inner),
537            crate::operation::put_tax_inheritance::PutTaxInheritanceError::InternalServerException(inner) => Error::InternalServerException(inner),
538            crate::operation::put_tax_inheritance::PutTaxInheritanceError::ResourceNotFoundException(inner) => {
539                Error::ResourceNotFoundException(inner)
540            }
541            crate::operation::put_tax_inheritance::PutTaxInheritanceError::ValidationException(inner) => Error::ValidationException(inner),
542            crate::operation::put_tax_inheritance::PutTaxInheritanceError::Unhandled(inner) => Error::Unhandled(inner),
543        }
544    }
545}
546impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::put_tax_registration::PutTaxRegistrationError, R>> for Error
547where
548    R: Send + Sync + std::fmt::Debug + 'static,
549{
550    fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::put_tax_registration::PutTaxRegistrationError, R>) -> Self {
551        match err {
552            ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
553            _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
554                meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
555                source: err.into(),
556            }),
557        }
558    }
559}
560impl From<crate::operation::put_tax_registration::PutTaxRegistrationError> for Error {
561    fn from(err: crate::operation::put_tax_registration::PutTaxRegistrationError) -> Self {
562        match err {
563            crate::operation::put_tax_registration::PutTaxRegistrationError::ConflictException(inner) => Error::ConflictException(inner),
564            crate::operation::put_tax_registration::PutTaxRegistrationError::InternalServerException(inner) => Error::InternalServerException(inner),
565            crate::operation::put_tax_registration::PutTaxRegistrationError::ValidationException(inner) => Error::ValidationException(inner),
566            crate::operation::put_tax_registration::PutTaxRegistrationError::Unhandled(inner) => Error::Unhandled(inner),
567        }
568    }
569}
570impl ::std::error::Error for Error {
571    fn source(&self) -> std::option::Option<&(dyn ::std::error::Error + 'static)> {
572        match self {
573            Error::AccessDeniedException(inner) => inner.source(),
574            Error::AttachmentUploadException(inner) => inner.source(),
575            Error::CaseCreationLimitExceededException(inner) => inner.source(),
576            Error::ConflictException(inner) => inner.source(),
577            Error::InternalServerException(inner) => inner.source(),
578            Error::ResourceNotFoundException(inner) => inner.source(),
579            Error::ValidationException(inner) => inner.source(),
580            Error::Unhandled(inner) => ::std::option::Option::Some(&*inner.source),
581        }
582    }
583}
584impl ::aws_types::request_id::RequestId for Error {
585    fn request_id(&self) -> Option<&str> {
586        match self {
587            Self::AccessDeniedException(e) => e.request_id(),
588            Self::AttachmentUploadException(e) => e.request_id(),
589            Self::CaseCreationLimitExceededException(e) => e.request_id(),
590            Self::ConflictException(e) => e.request_id(),
591            Self::InternalServerException(e) => e.request_id(),
592            Self::ResourceNotFoundException(e) => e.request_id(),
593            Self::ValidationException(e) => e.request_id(),
594            Self::Unhandled(e) => e.meta.request_id(),
595        }
596    }
597}