aws_sdk_signer/
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>You do not have sufficient access to perform this action.</p>
7    AccessDeniedException(crate::types::error::AccessDeniedException),
8    /// <p>The request contains invalid parameters for the ARN or tags. This exception also occurs when you call a tagging API on a cancelled signing profile.</p>
9    BadRequestException(crate::types::error::BadRequestException),
10    /// <p>The resource encountered a conflicting state.</p>
11    ConflictException(crate::types::error::ConflictException),
12    /// <p>An internal error occurred.</p>
13    InternalServiceErrorException(crate::types::error::InternalServiceErrorException),
14    /// <p>The signing profile was not found.</p>
15    NotFoundException(crate::types::error::NotFoundException),
16    /// <p>A specified resource could not be found.</p>
17    ResourceNotFoundException(crate::types::error::ResourceNotFoundException),
18    /// <p>The client is making a request that exceeds service limits.</p>
19    ServiceLimitExceededException(crate::types::error::ServiceLimitExceededException),
20    /// <p>The request was denied due to request throttling.</p>
21    /// <p>Instead of this error, <code>TooManyRequestsException</code> should be used.</p>
22    #[deprecated(note = "Instead of this error, TooManyRequestsException should be used.")]
23    ThrottlingException(crate::types::error::ThrottlingException),
24    /// <p>The allowed number of job-signing requests has been exceeded.</p>
25    /// <p>This error supersedes the error <code>ThrottlingException</code>.</p>
26    TooManyRequestsException(crate::types::error::TooManyRequestsException),
27    /// <p>You signing certificate could not be validated.</p>
28    ValidationException(crate::types::error::ValidationException),
29    /// An unexpected error occurred (e.g., invalid JSON returned by the service or an unknown error code).
30    #[deprecated(note = "Matching `Unhandled` directly is not forwards compatible. Instead, match using a \
31    variable wildcard pattern and check `.code()`:
32     \
33    &nbsp;&nbsp;&nbsp;`err if err.code() == Some(\"SpecificExceptionCode\") => { /* handle the error */ }`
34     \
35    See [`ProvideErrorMetadata`](#impl-ProvideErrorMetadata-for-Error) for what information is available for the error.")]
36    Unhandled(crate::error::sealed_unhandled::Unhandled),
37}
38impl ::std::fmt::Display for Error {
39    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
40        match self {
41            Error::AccessDeniedException(inner) => inner.fmt(f),
42            Error::BadRequestException(inner) => inner.fmt(f),
43            Error::ConflictException(inner) => inner.fmt(f),
44            Error::InternalServiceErrorException(inner) => inner.fmt(f),
45            Error::NotFoundException(inner) => inner.fmt(f),
46            Error::ResourceNotFoundException(inner) => inner.fmt(f),
47            Error::ServiceLimitExceededException(inner) => inner.fmt(f),
48            Error::ThrottlingException(inner) => inner.fmt(f),
49            Error::TooManyRequestsException(inner) => inner.fmt(f),
50            Error::ValidationException(inner) => inner.fmt(f),
51            Error::Unhandled(_) => {
52                if let ::std::option::Option::Some(code) = ::aws_smithy_types::error::metadata::ProvideErrorMetadata::code(self) {
53                    write!(f, "unhandled error ({code})")
54                } else {
55                    f.write_str("unhandled error")
56                }
57            }
58        }
59    }
60}
61impl From<::aws_smithy_types::error::operation::BuildError> for Error {
62    fn from(value: ::aws_smithy_types::error::operation::BuildError) -> Self {
63        Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
64            source: value.into(),
65            meta: ::std::default::Default::default(),
66        })
67    }
68}
69impl ::aws_smithy_types::error::metadata::ProvideErrorMetadata for Error {
70    fn meta(&self) -> &::aws_smithy_types::error::metadata::ErrorMetadata {
71        match self {
72            Self::AccessDeniedException(inner) => inner.meta(),
73            Self::BadRequestException(inner) => inner.meta(),
74            Self::ConflictException(inner) => inner.meta(),
75            Self::InternalServiceErrorException(inner) => inner.meta(),
76            Self::NotFoundException(inner) => inner.meta(),
77            Self::ResourceNotFoundException(inner) => inner.meta(),
78            Self::ServiceLimitExceededException(inner) => inner.meta(),
79            Self::ThrottlingException(inner) => inner.meta(),
80            Self::TooManyRequestsException(inner) => inner.meta(),
81            Self::ValidationException(inner) => inner.meta(),
82            Self::Unhandled(inner) => &inner.meta,
83        }
84    }
85}
86impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::add_profile_permission::AddProfilePermissionError, R>> for Error
87where
88    R: Send + Sync + std::fmt::Debug + 'static,
89{
90    fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::add_profile_permission::AddProfilePermissionError, R>) -> Self {
91        match err {
92            ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
93            _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
94                meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
95                source: err.into(),
96            }),
97        }
98    }
99}
100impl From<crate::operation::add_profile_permission::AddProfilePermissionError> for Error {
101    fn from(err: crate::operation::add_profile_permission::AddProfilePermissionError) -> Self {
102        match err {
103            crate::operation::add_profile_permission::AddProfilePermissionError::AccessDeniedException(inner) => Error::AccessDeniedException(inner),
104            crate::operation::add_profile_permission::AddProfilePermissionError::ConflictException(inner) => Error::ConflictException(inner),
105            crate::operation::add_profile_permission::AddProfilePermissionError::InternalServiceErrorException(inner) => {
106                Error::InternalServiceErrorException(inner)
107            }
108            crate::operation::add_profile_permission::AddProfilePermissionError::ResourceNotFoundException(inner) => {
109                Error::ResourceNotFoundException(inner)
110            }
111            crate::operation::add_profile_permission::AddProfilePermissionError::ServiceLimitExceededException(inner) => {
112                Error::ServiceLimitExceededException(inner)
113            }
114            crate::operation::add_profile_permission::AddProfilePermissionError::TooManyRequestsException(inner) => {
115                Error::TooManyRequestsException(inner)
116            }
117            crate::operation::add_profile_permission::AddProfilePermissionError::ValidationException(inner) => Error::ValidationException(inner),
118            crate::operation::add_profile_permission::AddProfilePermissionError::Unhandled(inner) => Error::Unhandled(inner),
119        }
120    }
121}
122impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::cancel_signing_profile::CancelSigningProfileError, R>> for Error
123where
124    R: Send + Sync + std::fmt::Debug + 'static,
125{
126    fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::cancel_signing_profile::CancelSigningProfileError, R>) -> Self {
127        match err {
128            ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
129            _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
130                meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
131                source: err.into(),
132            }),
133        }
134    }
135}
136impl From<crate::operation::cancel_signing_profile::CancelSigningProfileError> for Error {
137    fn from(err: crate::operation::cancel_signing_profile::CancelSigningProfileError) -> Self {
138        match err {
139            crate::operation::cancel_signing_profile::CancelSigningProfileError::AccessDeniedException(inner) => Error::AccessDeniedException(inner),
140            crate::operation::cancel_signing_profile::CancelSigningProfileError::InternalServiceErrorException(inner) => {
141                Error::InternalServiceErrorException(inner)
142            }
143            crate::operation::cancel_signing_profile::CancelSigningProfileError::ResourceNotFoundException(inner) => {
144                Error::ResourceNotFoundException(inner)
145            }
146            crate::operation::cancel_signing_profile::CancelSigningProfileError::TooManyRequestsException(inner) => {
147                Error::TooManyRequestsException(inner)
148            }
149            crate::operation::cancel_signing_profile::CancelSigningProfileError::Unhandled(inner) => Error::Unhandled(inner),
150        }
151    }
152}
153impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::describe_signing_job::DescribeSigningJobError, R>> for Error
154where
155    R: Send + Sync + std::fmt::Debug + 'static,
156{
157    fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::describe_signing_job::DescribeSigningJobError, R>) -> Self {
158        match err {
159            ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
160            _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
161                meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
162                source: err.into(),
163            }),
164        }
165    }
166}
167impl From<crate::operation::describe_signing_job::DescribeSigningJobError> for Error {
168    fn from(err: crate::operation::describe_signing_job::DescribeSigningJobError) -> Self {
169        match err {
170            crate::operation::describe_signing_job::DescribeSigningJobError::AccessDeniedException(inner) => Error::AccessDeniedException(inner),
171            crate::operation::describe_signing_job::DescribeSigningJobError::InternalServiceErrorException(inner) => {
172                Error::InternalServiceErrorException(inner)
173            }
174            crate::operation::describe_signing_job::DescribeSigningJobError::ResourceNotFoundException(inner) => {
175                Error::ResourceNotFoundException(inner)
176            }
177            crate::operation::describe_signing_job::DescribeSigningJobError::TooManyRequestsException(inner) => {
178                Error::TooManyRequestsException(inner)
179            }
180            crate::operation::describe_signing_job::DescribeSigningJobError::Unhandled(inner) => Error::Unhandled(inner),
181        }
182    }
183}
184impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::get_revocation_status::GetRevocationStatusError, R>> for Error
185where
186    R: Send + Sync + std::fmt::Debug + 'static,
187{
188    fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::get_revocation_status::GetRevocationStatusError, R>) -> Self {
189        match err {
190            ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
191            _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
192                meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
193                source: err.into(),
194            }),
195        }
196    }
197}
198impl From<crate::operation::get_revocation_status::GetRevocationStatusError> for Error {
199    fn from(err: crate::operation::get_revocation_status::GetRevocationStatusError) -> Self {
200        match err {
201            crate::operation::get_revocation_status::GetRevocationStatusError::AccessDeniedException(inner) => Error::AccessDeniedException(inner),
202            crate::operation::get_revocation_status::GetRevocationStatusError::InternalServiceErrorException(inner) => {
203                Error::InternalServiceErrorException(inner)
204            }
205            crate::operation::get_revocation_status::GetRevocationStatusError::TooManyRequestsException(inner) => {
206                Error::TooManyRequestsException(inner)
207            }
208            crate::operation::get_revocation_status::GetRevocationStatusError::ValidationException(inner) => Error::ValidationException(inner),
209            crate::operation::get_revocation_status::GetRevocationStatusError::Unhandled(inner) => Error::Unhandled(inner),
210        }
211    }
212}
213impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::get_signing_platform::GetSigningPlatformError, R>> for Error
214where
215    R: Send + Sync + std::fmt::Debug + 'static,
216{
217    fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::get_signing_platform::GetSigningPlatformError, R>) -> 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::get_signing_platform::GetSigningPlatformError> for Error {
228    fn from(err: crate::operation::get_signing_platform::GetSigningPlatformError) -> Self {
229        match err {
230            crate::operation::get_signing_platform::GetSigningPlatformError::AccessDeniedException(inner) => Error::AccessDeniedException(inner),
231            crate::operation::get_signing_platform::GetSigningPlatformError::InternalServiceErrorException(inner) => {
232                Error::InternalServiceErrorException(inner)
233            }
234            crate::operation::get_signing_platform::GetSigningPlatformError::ResourceNotFoundException(inner) => {
235                Error::ResourceNotFoundException(inner)
236            }
237            crate::operation::get_signing_platform::GetSigningPlatformError::TooManyRequestsException(inner) => {
238                Error::TooManyRequestsException(inner)
239            }
240            crate::operation::get_signing_platform::GetSigningPlatformError::Unhandled(inner) => Error::Unhandled(inner),
241        }
242    }
243}
244impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::get_signing_profile::GetSigningProfileError, R>> for Error
245where
246    R: Send + Sync + std::fmt::Debug + 'static,
247{
248    fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::get_signing_profile::GetSigningProfileError, R>) -> 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_signing_profile::GetSigningProfileError> for Error {
259    fn from(err: crate::operation::get_signing_profile::GetSigningProfileError) -> Self {
260        match err {
261            crate::operation::get_signing_profile::GetSigningProfileError::AccessDeniedException(inner) => Error::AccessDeniedException(inner),
262            crate::operation::get_signing_profile::GetSigningProfileError::InternalServiceErrorException(inner) => {
263                Error::InternalServiceErrorException(inner)
264            }
265            crate::operation::get_signing_profile::GetSigningProfileError::ResourceNotFoundException(inner) => {
266                Error::ResourceNotFoundException(inner)
267            }
268            crate::operation::get_signing_profile::GetSigningProfileError::TooManyRequestsException(inner) => Error::TooManyRequestsException(inner),
269            crate::operation::get_signing_profile::GetSigningProfileError::Unhandled(inner) => Error::Unhandled(inner),
270        }
271    }
272}
273impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::list_profile_permissions::ListProfilePermissionsError, R>> for Error
274where
275    R: Send + Sync + std::fmt::Debug + 'static,
276{
277    fn from(
278        err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::list_profile_permissions::ListProfilePermissionsError, R>,
279    ) -> Self {
280        match err {
281            ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
282            _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
283                meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
284                source: err.into(),
285            }),
286        }
287    }
288}
289impl From<crate::operation::list_profile_permissions::ListProfilePermissionsError> for Error {
290    fn from(err: crate::operation::list_profile_permissions::ListProfilePermissionsError) -> Self {
291        match err {
292            crate::operation::list_profile_permissions::ListProfilePermissionsError::AccessDeniedException(inner) => {
293                Error::AccessDeniedException(inner)
294            }
295            crate::operation::list_profile_permissions::ListProfilePermissionsError::InternalServiceErrorException(inner) => {
296                Error::InternalServiceErrorException(inner)
297            }
298            crate::operation::list_profile_permissions::ListProfilePermissionsError::ResourceNotFoundException(inner) => {
299                Error::ResourceNotFoundException(inner)
300            }
301            crate::operation::list_profile_permissions::ListProfilePermissionsError::TooManyRequestsException(inner) => {
302                Error::TooManyRequestsException(inner)
303            }
304            crate::operation::list_profile_permissions::ListProfilePermissionsError::ValidationException(inner) => Error::ValidationException(inner),
305            crate::operation::list_profile_permissions::ListProfilePermissionsError::Unhandled(inner) => Error::Unhandled(inner),
306        }
307    }
308}
309impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::list_signing_jobs::ListSigningJobsError, R>> for Error
310where
311    R: Send + Sync + std::fmt::Debug + 'static,
312{
313    fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::list_signing_jobs::ListSigningJobsError, R>) -> Self {
314        match err {
315            ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
316            _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
317                meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
318                source: err.into(),
319            }),
320        }
321    }
322}
323impl From<crate::operation::list_signing_jobs::ListSigningJobsError> for Error {
324    fn from(err: crate::operation::list_signing_jobs::ListSigningJobsError) -> Self {
325        match err {
326            crate::operation::list_signing_jobs::ListSigningJobsError::AccessDeniedException(inner) => Error::AccessDeniedException(inner),
327            crate::operation::list_signing_jobs::ListSigningJobsError::InternalServiceErrorException(inner) => {
328                Error::InternalServiceErrorException(inner)
329            }
330            crate::operation::list_signing_jobs::ListSigningJobsError::TooManyRequestsException(inner) => Error::TooManyRequestsException(inner),
331            crate::operation::list_signing_jobs::ListSigningJobsError::ValidationException(inner) => Error::ValidationException(inner),
332            crate::operation::list_signing_jobs::ListSigningJobsError::Unhandled(inner) => Error::Unhandled(inner),
333        }
334    }
335}
336impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::list_signing_platforms::ListSigningPlatformsError, R>> for Error
337where
338    R: Send + Sync + std::fmt::Debug + 'static,
339{
340    fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::list_signing_platforms::ListSigningPlatformsError, R>) -> Self {
341        match err {
342            ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
343            _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
344                meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
345                source: err.into(),
346            }),
347        }
348    }
349}
350impl From<crate::operation::list_signing_platforms::ListSigningPlatformsError> for Error {
351    fn from(err: crate::operation::list_signing_platforms::ListSigningPlatformsError) -> Self {
352        match err {
353            crate::operation::list_signing_platforms::ListSigningPlatformsError::AccessDeniedException(inner) => Error::AccessDeniedException(inner),
354            crate::operation::list_signing_platforms::ListSigningPlatformsError::InternalServiceErrorException(inner) => {
355                Error::InternalServiceErrorException(inner)
356            }
357            crate::operation::list_signing_platforms::ListSigningPlatformsError::TooManyRequestsException(inner) => {
358                Error::TooManyRequestsException(inner)
359            }
360            crate::operation::list_signing_platforms::ListSigningPlatformsError::ValidationException(inner) => Error::ValidationException(inner),
361            crate::operation::list_signing_platforms::ListSigningPlatformsError::Unhandled(inner) => Error::Unhandled(inner),
362        }
363    }
364}
365impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::list_signing_profiles::ListSigningProfilesError, R>> for Error
366where
367    R: Send + Sync + std::fmt::Debug + 'static,
368{
369    fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::list_signing_profiles::ListSigningProfilesError, R>) -> Self {
370        match err {
371            ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
372            _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
373                meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
374                source: err.into(),
375            }),
376        }
377    }
378}
379impl From<crate::operation::list_signing_profiles::ListSigningProfilesError> for Error {
380    fn from(err: crate::operation::list_signing_profiles::ListSigningProfilesError) -> Self {
381        match err {
382            crate::operation::list_signing_profiles::ListSigningProfilesError::AccessDeniedException(inner) => Error::AccessDeniedException(inner),
383            crate::operation::list_signing_profiles::ListSigningProfilesError::InternalServiceErrorException(inner) => {
384                Error::InternalServiceErrorException(inner)
385            }
386            crate::operation::list_signing_profiles::ListSigningProfilesError::TooManyRequestsException(inner) => {
387                Error::TooManyRequestsException(inner)
388            }
389            crate::operation::list_signing_profiles::ListSigningProfilesError::Unhandled(inner) => Error::Unhandled(inner),
390        }
391    }
392}
393impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::list_tags_for_resource::ListTagsForResourceError, R>> for Error
394where
395    R: Send + Sync + std::fmt::Debug + 'static,
396{
397    fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::list_tags_for_resource::ListTagsForResourceError, R>) -> Self {
398        match err {
399            ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
400            _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
401                meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
402                source: err.into(),
403            }),
404        }
405    }
406}
407impl From<crate::operation::list_tags_for_resource::ListTagsForResourceError> for Error {
408    fn from(err: crate::operation::list_tags_for_resource::ListTagsForResourceError) -> Self {
409        match err {
410            crate::operation::list_tags_for_resource::ListTagsForResourceError::BadRequestException(inner) => Error::BadRequestException(inner),
411            crate::operation::list_tags_for_resource::ListTagsForResourceError::InternalServiceErrorException(inner) => {
412                Error::InternalServiceErrorException(inner)
413            }
414            crate::operation::list_tags_for_resource::ListTagsForResourceError::NotFoundException(inner) => Error::NotFoundException(inner),
415            crate::operation::list_tags_for_resource::ListTagsForResourceError::TooManyRequestsException(inner) => {
416                Error::TooManyRequestsException(inner)
417            }
418            crate::operation::list_tags_for_resource::ListTagsForResourceError::Unhandled(inner) => Error::Unhandled(inner),
419        }
420    }
421}
422impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::put_signing_profile::PutSigningProfileError, R>> for Error
423where
424    R: Send + Sync + std::fmt::Debug + 'static,
425{
426    fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::put_signing_profile::PutSigningProfileError, R>) -> Self {
427        match err {
428            ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
429            _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
430                meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
431                source: err.into(),
432            }),
433        }
434    }
435}
436impl From<crate::operation::put_signing_profile::PutSigningProfileError> for Error {
437    fn from(err: crate::operation::put_signing_profile::PutSigningProfileError) -> Self {
438        match err {
439            crate::operation::put_signing_profile::PutSigningProfileError::AccessDeniedException(inner) => Error::AccessDeniedException(inner),
440            crate::operation::put_signing_profile::PutSigningProfileError::InternalServiceErrorException(inner) => {
441                Error::InternalServiceErrorException(inner)
442            }
443            crate::operation::put_signing_profile::PutSigningProfileError::ResourceNotFoundException(inner) => {
444                Error::ResourceNotFoundException(inner)
445            }
446            crate::operation::put_signing_profile::PutSigningProfileError::TooManyRequestsException(inner) => Error::TooManyRequestsException(inner),
447            crate::operation::put_signing_profile::PutSigningProfileError::ValidationException(inner) => Error::ValidationException(inner),
448            crate::operation::put_signing_profile::PutSigningProfileError::Unhandled(inner) => Error::Unhandled(inner),
449        }
450    }
451}
452impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::remove_profile_permission::RemoveProfilePermissionError, R>>
453    for Error
454where
455    R: Send + Sync + std::fmt::Debug + 'static,
456{
457    fn from(
458        err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::remove_profile_permission::RemoveProfilePermissionError, R>,
459    ) -> Self {
460        match err {
461            ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
462            _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
463                meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
464                source: err.into(),
465            }),
466        }
467    }
468}
469impl From<crate::operation::remove_profile_permission::RemoveProfilePermissionError> for Error {
470    fn from(err: crate::operation::remove_profile_permission::RemoveProfilePermissionError) -> Self {
471        match err {
472            crate::operation::remove_profile_permission::RemoveProfilePermissionError::AccessDeniedException(inner) => {
473                Error::AccessDeniedException(inner)
474            }
475            crate::operation::remove_profile_permission::RemoveProfilePermissionError::ConflictException(inner) => Error::ConflictException(inner),
476            crate::operation::remove_profile_permission::RemoveProfilePermissionError::InternalServiceErrorException(inner) => {
477                Error::InternalServiceErrorException(inner)
478            }
479            crate::operation::remove_profile_permission::RemoveProfilePermissionError::ResourceNotFoundException(inner) => {
480                Error::ResourceNotFoundException(inner)
481            }
482            crate::operation::remove_profile_permission::RemoveProfilePermissionError::TooManyRequestsException(inner) => {
483                Error::TooManyRequestsException(inner)
484            }
485            crate::operation::remove_profile_permission::RemoveProfilePermissionError::ValidationException(inner) => {
486                Error::ValidationException(inner)
487            }
488            crate::operation::remove_profile_permission::RemoveProfilePermissionError::Unhandled(inner) => Error::Unhandled(inner),
489        }
490    }
491}
492impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::revoke_signature::RevokeSignatureError, R>> for Error
493where
494    R: Send + Sync + std::fmt::Debug + 'static,
495{
496    fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::revoke_signature::RevokeSignatureError, R>) -> Self {
497        match err {
498            ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
499            _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
500                meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
501                source: err.into(),
502            }),
503        }
504    }
505}
506impl From<crate::operation::revoke_signature::RevokeSignatureError> for Error {
507    fn from(err: crate::operation::revoke_signature::RevokeSignatureError) -> Self {
508        match err {
509            crate::operation::revoke_signature::RevokeSignatureError::AccessDeniedException(inner) => Error::AccessDeniedException(inner),
510            crate::operation::revoke_signature::RevokeSignatureError::InternalServiceErrorException(inner) => {
511                Error::InternalServiceErrorException(inner)
512            }
513            crate::operation::revoke_signature::RevokeSignatureError::ResourceNotFoundException(inner) => Error::ResourceNotFoundException(inner),
514            crate::operation::revoke_signature::RevokeSignatureError::TooManyRequestsException(inner) => Error::TooManyRequestsException(inner),
515            crate::operation::revoke_signature::RevokeSignatureError::ValidationException(inner) => Error::ValidationException(inner),
516            crate::operation::revoke_signature::RevokeSignatureError::Unhandled(inner) => Error::Unhandled(inner),
517        }
518    }
519}
520impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::revoke_signing_profile::RevokeSigningProfileError, R>> for Error
521where
522    R: Send + Sync + std::fmt::Debug + 'static,
523{
524    fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::revoke_signing_profile::RevokeSigningProfileError, R>) -> Self {
525        match err {
526            ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
527            _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
528                meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
529                source: err.into(),
530            }),
531        }
532    }
533}
534impl From<crate::operation::revoke_signing_profile::RevokeSigningProfileError> for Error {
535    fn from(err: crate::operation::revoke_signing_profile::RevokeSigningProfileError) -> Self {
536        match err {
537            crate::operation::revoke_signing_profile::RevokeSigningProfileError::AccessDeniedException(inner) => Error::AccessDeniedException(inner),
538            crate::operation::revoke_signing_profile::RevokeSigningProfileError::InternalServiceErrorException(inner) => {
539                Error::InternalServiceErrorException(inner)
540            }
541            crate::operation::revoke_signing_profile::RevokeSigningProfileError::ResourceNotFoundException(inner) => {
542                Error::ResourceNotFoundException(inner)
543            }
544            crate::operation::revoke_signing_profile::RevokeSigningProfileError::TooManyRequestsException(inner) => {
545                Error::TooManyRequestsException(inner)
546            }
547            crate::operation::revoke_signing_profile::RevokeSigningProfileError::ValidationException(inner) => Error::ValidationException(inner),
548            crate::operation::revoke_signing_profile::RevokeSigningProfileError::Unhandled(inner) => Error::Unhandled(inner),
549        }
550    }
551}
552impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::sign_payload::SignPayloadError, R>> for Error
553where
554    R: Send + Sync + std::fmt::Debug + 'static,
555{
556    fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::sign_payload::SignPayloadError, R>) -> Self {
557        match err {
558            ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
559            _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
560                meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
561                source: err.into(),
562            }),
563        }
564    }
565}
566impl From<crate::operation::sign_payload::SignPayloadError> for Error {
567    fn from(err: crate::operation::sign_payload::SignPayloadError) -> Self {
568        match err {
569            crate::operation::sign_payload::SignPayloadError::AccessDeniedException(inner) => Error::AccessDeniedException(inner),
570            crate::operation::sign_payload::SignPayloadError::InternalServiceErrorException(inner) => Error::InternalServiceErrorException(inner),
571            crate::operation::sign_payload::SignPayloadError::ResourceNotFoundException(inner) => Error::ResourceNotFoundException(inner),
572            crate::operation::sign_payload::SignPayloadError::TooManyRequestsException(inner) => Error::TooManyRequestsException(inner),
573            crate::operation::sign_payload::SignPayloadError::ValidationException(inner) => Error::ValidationException(inner),
574            crate::operation::sign_payload::SignPayloadError::Unhandled(inner) => Error::Unhandled(inner),
575        }
576    }
577}
578impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::start_signing_job::StartSigningJobError, R>> for Error
579where
580    R: Send + Sync + std::fmt::Debug + 'static,
581{
582    fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::start_signing_job::StartSigningJobError, R>) -> Self {
583        match err {
584            ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
585            _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
586                meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
587                source: err.into(),
588            }),
589        }
590    }
591}
592impl From<crate::operation::start_signing_job::StartSigningJobError> for Error {
593    fn from(err: crate::operation::start_signing_job::StartSigningJobError) -> Self {
594        match err {
595            crate::operation::start_signing_job::StartSigningJobError::AccessDeniedException(inner) => Error::AccessDeniedException(inner),
596            crate::operation::start_signing_job::StartSigningJobError::InternalServiceErrorException(inner) => {
597                Error::InternalServiceErrorException(inner)
598            }
599            crate::operation::start_signing_job::StartSigningJobError::ResourceNotFoundException(inner) => Error::ResourceNotFoundException(inner),
600            crate::operation::start_signing_job::StartSigningJobError::ThrottlingException(inner) => Error::ThrottlingException(inner),
601            crate::operation::start_signing_job::StartSigningJobError::TooManyRequestsException(inner) => Error::TooManyRequestsException(inner),
602            crate::operation::start_signing_job::StartSigningJobError::ValidationException(inner) => Error::ValidationException(inner),
603            crate::operation::start_signing_job::StartSigningJobError::Unhandled(inner) => Error::Unhandled(inner),
604        }
605    }
606}
607impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::tag_resource::TagResourceError, R>> for Error
608where
609    R: Send + Sync + std::fmt::Debug + 'static,
610{
611    fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::tag_resource::TagResourceError, R>) -> Self {
612        match err {
613            ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
614            _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
615                meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
616                source: err.into(),
617            }),
618        }
619    }
620}
621impl From<crate::operation::tag_resource::TagResourceError> for Error {
622    fn from(err: crate::operation::tag_resource::TagResourceError) -> Self {
623        match err {
624            crate::operation::tag_resource::TagResourceError::BadRequestException(inner) => Error::BadRequestException(inner),
625            crate::operation::tag_resource::TagResourceError::InternalServiceErrorException(inner) => Error::InternalServiceErrorException(inner),
626            crate::operation::tag_resource::TagResourceError::NotFoundException(inner) => Error::NotFoundException(inner),
627            crate::operation::tag_resource::TagResourceError::TooManyRequestsException(inner) => Error::TooManyRequestsException(inner),
628            crate::operation::tag_resource::TagResourceError::Unhandled(inner) => Error::Unhandled(inner),
629        }
630    }
631}
632impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::untag_resource::UntagResourceError, R>> for Error
633where
634    R: Send + Sync + std::fmt::Debug + 'static,
635{
636    fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::untag_resource::UntagResourceError, R>) -> Self {
637        match err {
638            ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
639            _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
640                meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
641                source: err.into(),
642            }),
643        }
644    }
645}
646impl From<crate::operation::untag_resource::UntagResourceError> for Error {
647    fn from(err: crate::operation::untag_resource::UntagResourceError) -> Self {
648        match err {
649            crate::operation::untag_resource::UntagResourceError::BadRequestException(inner) => Error::BadRequestException(inner),
650            crate::operation::untag_resource::UntagResourceError::InternalServiceErrorException(inner) => Error::InternalServiceErrorException(inner),
651            crate::operation::untag_resource::UntagResourceError::NotFoundException(inner) => Error::NotFoundException(inner),
652            crate::operation::untag_resource::UntagResourceError::TooManyRequestsException(inner) => Error::TooManyRequestsException(inner),
653            crate::operation::untag_resource::UntagResourceError::Unhandled(inner) => Error::Unhandled(inner),
654        }
655    }
656}
657impl<O, E> ::std::convert::From<::aws_smithy_runtime_api::client::waiters::error::WaiterError<O, E>> for Error
658where
659    O: ::std::fmt::Debug + ::std::marker::Send + ::std::marker::Sync + 'static,
660    E: ::std::error::Error + ::std::marker::Send + ::std::marker::Sync + 'static,
661{
662    fn from(err: ::aws_smithy_runtime_api::client::waiters::error::WaiterError<O, E>) -> Self {
663        Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
664            meta: ::std::default::Default::default(),
665            source: err.into(),
666        })
667    }
668}
669impl ::std::error::Error for Error {
670    fn source(&self) -> std::option::Option<&(dyn ::std::error::Error + 'static)> {
671        match self {
672            Error::AccessDeniedException(inner) => inner.source(),
673            Error::BadRequestException(inner) => inner.source(),
674            Error::ConflictException(inner) => inner.source(),
675            Error::InternalServiceErrorException(inner) => inner.source(),
676            Error::NotFoundException(inner) => inner.source(),
677            Error::ResourceNotFoundException(inner) => inner.source(),
678            Error::ServiceLimitExceededException(inner) => inner.source(),
679            Error::ThrottlingException(inner) => inner.source(),
680            Error::TooManyRequestsException(inner) => inner.source(),
681            Error::ValidationException(inner) => inner.source(),
682            Error::Unhandled(inner) => ::std::option::Option::Some(&*inner.source),
683        }
684    }
685}
686impl ::aws_types::request_id::RequestId for Error {
687    fn request_id(&self) -> Option<&str> {
688        match self {
689            Self::AccessDeniedException(e) => e.request_id(),
690            Self::BadRequestException(e) => e.request_id(),
691            Self::ConflictException(e) => e.request_id(),
692            Self::InternalServiceErrorException(e) => e.request_id(),
693            Self::NotFoundException(e) => e.request_id(),
694            Self::ResourceNotFoundException(e) => e.request_id(),
695            Self::ServiceLimitExceededException(e) => e.request_id(),
696            Self::ThrottlingException(e) => e.request_id(),
697            Self::TooManyRequestsException(e) => e.request_id(),
698            Self::ValidationException(e) => e.request_id(),
699            Self::Unhandled(e) => e.meta.request_id(),
700        }
701    }
702}