aws_sdk_partnercentralchannel/
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 request was denied due to insufficient permissions.</p>
7    AccessDeniedException(crate::types::error::AccessDeniedException),
8    /// <p>The request could not be completed due to a conflict with the current state of the resource.</p>
9    ConflictException(crate::types::error::ConflictException),
10    /// <p>An internal server error occurred while processing the request.</p>
11    InternalServerException(crate::types::error::InternalServerException),
12    /// <p>The specified resource was not found.</p>
13    ResourceNotFoundException(crate::types::error::ResourceNotFoundException),
14    /// <p>The request would exceed a service quota limit.</p>
15    ServiceQuotaExceededException(crate::types::error::ServiceQuotaExceededException),
16    /// <p>The request was throttled due to too many requests being sent in a short period.</p>
17    ThrottlingException(crate::types::error::ThrottlingException),
18    /// <p>The request failed validation due to invalid 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::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::accept_channel_handshake::AcceptChannelHandshakeError, R>> for Error
72where
73    R: Send + Sync + std::fmt::Debug + 'static,
74{
75    fn from(
76        err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::accept_channel_handshake::AcceptChannelHandshakeError, R>,
77    ) -> Self {
78        match err {
79            ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
80            _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
81                meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
82                source: err.into(),
83            }),
84        }
85    }
86}
87impl From<crate::operation::accept_channel_handshake::AcceptChannelHandshakeError> for Error {
88    fn from(err: crate::operation::accept_channel_handshake::AcceptChannelHandshakeError) -> Self {
89        match err {
90            crate::operation::accept_channel_handshake::AcceptChannelHandshakeError::AccessDeniedException(inner) => {
91                Error::AccessDeniedException(inner)
92            }
93            crate::operation::accept_channel_handshake::AcceptChannelHandshakeError::InternalServerException(inner) => {
94                Error::InternalServerException(inner)
95            }
96            crate::operation::accept_channel_handshake::AcceptChannelHandshakeError::ResourceNotFoundException(inner) => {
97                Error::ResourceNotFoundException(inner)
98            }
99            crate::operation::accept_channel_handshake::AcceptChannelHandshakeError::ThrottlingException(inner) => Error::ThrottlingException(inner),
100            crate::operation::accept_channel_handshake::AcceptChannelHandshakeError::ValidationException(inner) => Error::ValidationException(inner),
101            crate::operation::accept_channel_handshake::AcceptChannelHandshakeError::Unhandled(inner) => Error::Unhandled(inner),
102        }
103    }
104}
105impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::cancel_channel_handshake::CancelChannelHandshakeError, R>> for Error
106where
107    R: Send + Sync + std::fmt::Debug + 'static,
108{
109    fn from(
110        err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::cancel_channel_handshake::CancelChannelHandshakeError, R>,
111    ) -> Self {
112        match err {
113            ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
114            _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
115                meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
116                source: err.into(),
117            }),
118        }
119    }
120}
121impl From<crate::operation::cancel_channel_handshake::CancelChannelHandshakeError> for Error {
122    fn from(err: crate::operation::cancel_channel_handshake::CancelChannelHandshakeError) -> Self {
123        match err {
124            crate::operation::cancel_channel_handshake::CancelChannelHandshakeError::AccessDeniedException(inner) => {
125                Error::AccessDeniedException(inner)
126            }
127            crate::operation::cancel_channel_handshake::CancelChannelHandshakeError::InternalServerException(inner) => {
128                Error::InternalServerException(inner)
129            }
130            crate::operation::cancel_channel_handshake::CancelChannelHandshakeError::ResourceNotFoundException(inner) => {
131                Error::ResourceNotFoundException(inner)
132            }
133            crate::operation::cancel_channel_handshake::CancelChannelHandshakeError::ThrottlingException(inner) => Error::ThrottlingException(inner),
134            crate::operation::cancel_channel_handshake::CancelChannelHandshakeError::ValidationException(inner) => Error::ValidationException(inner),
135            crate::operation::cancel_channel_handshake::CancelChannelHandshakeError::Unhandled(inner) => Error::Unhandled(inner),
136        }
137    }
138}
139impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::create_channel_handshake::CreateChannelHandshakeError, R>> for Error
140where
141    R: Send + Sync + std::fmt::Debug + 'static,
142{
143    fn from(
144        err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::create_channel_handshake::CreateChannelHandshakeError, R>,
145    ) -> Self {
146        match err {
147            ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
148            _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
149                meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
150                source: err.into(),
151            }),
152        }
153    }
154}
155impl From<crate::operation::create_channel_handshake::CreateChannelHandshakeError> for Error {
156    fn from(err: crate::operation::create_channel_handshake::CreateChannelHandshakeError) -> Self {
157        match err {
158            crate::operation::create_channel_handshake::CreateChannelHandshakeError::AccessDeniedException(inner) => {
159                Error::AccessDeniedException(inner)
160            }
161            crate::operation::create_channel_handshake::CreateChannelHandshakeError::ConflictException(inner) => Error::ConflictException(inner),
162            crate::operation::create_channel_handshake::CreateChannelHandshakeError::InternalServerException(inner) => {
163                Error::InternalServerException(inner)
164            }
165            crate::operation::create_channel_handshake::CreateChannelHandshakeError::ResourceNotFoundException(inner) => {
166                Error::ResourceNotFoundException(inner)
167            }
168            crate::operation::create_channel_handshake::CreateChannelHandshakeError::ServiceQuotaExceededException(inner) => {
169                Error::ServiceQuotaExceededException(inner)
170            }
171            crate::operation::create_channel_handshake::CreateChannelHandshakeError::ThrottlingException(inner) => Error::ThrottlingException(inner),
172            crate::operation::create_channel_handshake::CreateChannelHandshakeError::ValidationException(inner) => Error::ValidationException(inner),
173            crate::operation::create_channel_handshake::CreateChannelHandshakeError::Unhandled(inner) => Error::Unhandled(inner),
174        }
175    }
176}
177impl<R>
178    From<
179        ::aws_smithy_runtime_api::client::result::SdkError<
180            crate::operation::create_program_management_account::CreateProgramManagementAccountError,
181            R,
182        >,
183    > for Error
184where
185    R: Send + Sync + std::fmt::Debug + 'static,
186{
187    fn from(
188        err: ::aws_smithy_runtime_api::client::result::SdkError<
189            crate::operation::create_program_management_account::CreateProgramManagementAccountError,
190            R,
191        >,
192    ) -> Self {
193        match err {
194            ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
195            _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
196                meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
197                source: err.into(),
198            }),
199        }
200    }
201}
202impl From<crate::operation::create_program_management_account::CreateProgramManagementAccountError> for Error {
203    fn from(err: crate::operation::create_program_management_account::CreateProgramManagementAccountError) -> Self {
204        match err {
205            crate::operation::create_program_management_account::CreateProgramManagementAccountError::AccessDeniedException(inner) => {
206                Error::AccessDeniedException(inner)
207            }
208            crate::operation::create_program_management_account::CreateProgramManagementAccountError::ConflictException(inner) => {
209                Error::ConflictException(inner)
210            }
211            crate::operation::create_program_management_account::CreateProgramManagementAccountError::InternalServerException(inner) => {
212                Error::InternalServerException(inner)
213            }
214            crate::operation::create_program_management_account::CreateProgramManagementAccountError::ResourceNotFoundException(inner) => {
215                Error::ResourceNotFoundException(inner)
216            }
217            crate::operation::create_program_management_account::CreateProgramManagementAccountError::ServiceQuotaExceededException(inner) => {
218                Error::ServiceQuotaExceededException(inner)
219            }
220            crate::operation::create_program_management_account::CreateProgramManagementAccountError::ThrottlingException(inner) => {
221                Error::ThrottlingException(inner)
222            }
223            crate::operation::create_program_management_account::CreateProgramManagementAccountError::ValidationException(inner) => {
224                Error::ValidationException(inner)
225            }
226            crate::operation::create_program_management_account::CreateProgramManagementAccountError::Unhandled(inner) => Error::Unhandled(inner),
227        }
228    }
229}
230impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::create_relationship::CreateRelationshipError, R>> for Error
231where
232    R: Send + Sync + std::fmt::Debug + 'static,
233{
234    fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::create_relationship::CreateRelationshipError, R>) -> Self {
235        match err {
236            ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
237            _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
238                meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
239                source: err.into(),
240            }),
241        }
242    }
243}
244impl From<crate::operation::create_relationship::CreateRelationshipError> for Error {
245    fn from(err: crate::operation::create_relationship::CreateRelationshipError) -> Self {
246        match err {
247            crate::operation::create_relationship::CreateRelationshipError::AccessDeniedException(inner) => Error::AccessDeniedException(inner),
248            crate::operation::create_relationship::CreateRelationshipError::ConflictException(inner) => Error::ConflictException(inner),
249            crate::operation::create_relationship::CreateRelationshipError::InternalServerException(inner) => Error::InternalServerException(inner),
250            crate::operation::create_relationship::CreateRelationshipError::ResourceNotFoundException(inner) => {
251                Error::ResourceNotFoundException(inner)
252            }
253            crate::operation::create_relationship::CreateRelationshipError::ServiceQuotaExceededException(inner) => {
254                Error::ServiceQuotaExceededException(inner)
255            }
256            crate::operation::create_relationship::CreateRelationshipError::ThrottlingException(inner) => Error::ThrottlingException(inner),
257            crate::operation::create_relationship::CreateRelationshipError::ValidationException(inner) => Error::ValidationException(inner),
258            crate::operation::create_relationship::CreateRelationshipError::Unhandled(inner) => Error::Unhandled(inner),
259        }
260    }
261}
262impl<R>
263    From<
264        ::aws_smithy_runtime_api::client::result::SdkError<
265            crate::operation::delete_program_management_account::DeleteProgramManagementAccountError,
266            R,
267        >,
268    > for Error
269where
270    R: Send + Sync + std::fmt::Debug + 'static,
271{
272    fn from(
273        err: ::aws_smithy_runtime_api::client::result::SdkError<
274            crate::operation::delete_program_management_account::DeleteProgramManagementAccountError,
275            R,
276        >,
277    ) -> Self {
278        match err {
279            ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
280            _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
281                meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
282                source: err.into(),
283            }),
284        }
285    }
286}
287impl From<crate::operation::delete_program_management_account::DeleteProgramManagementAccountError> for Error {
288    fn from(err: crate::operation::delete_program_management_account::DeleteProgramManagementAccountError) -> Self {
289        match err {
290            crate::operation::delete_program_management_account::DeleteProgramManagementAccountError::AccessDeniedException(inner) => {
291                Error::AccessDeniedException(inner)
292            }
293            crate::operation::delete_program_management_account::DeleteProgramManagementAccountError::ConflictException(inner) => {
294                Error::ConflictException(inner)
295            }
296            crate::operation::delete_program_management_account::DeleteProgramManagementAccountError::InternalServerException(inner) => {
297                Error::InternalServerException(inner)
298            }
299            crate::operation::delete_program_management_account::DeleteProgramManagementAccountError::ResourceNotFoundException(inner) => {
300                Error::ResourceNotFoundException(inner)
301            }
302            crate::operation::delete_program_management_account::DeleteProgramManagementAccountError::ThrottlingException(inner) => {
303                Error::ThrottlingException(inner)
304            }
305            crate::operation::delete_program_management_account::DeleteProgramManagementAccountError::ValidationException(inner) => {
306                Error::ValidationException(inner)
307            }
308            crate::operation::delete_program_management_account::DeleteProgramManagementAccountError::Unhandled(inner) => Error::Unhandled(inner),
309        }
310    }
311}
312impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::delete_relationship::DeleteRelationshipError, R>> for Error
313where
314    R: Send + Sync + std::fmt::Debug + 'static,
315{
316    fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::delete_relationship::DeleteRelationshipError, R>) -> Self {
317        match err {
318            ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
319            _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
320                meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
321                source: err.into(),
322            }),
323        }
324    }
325}
326impl From<crate::operation::delete_relationship::DeleteRelationshipError> for Error {
327    fn from(err: crate::operation::delete_relationship::DeleteRelationshipError) -> Self {
328        match err {
329            crate::operation::delete_relationship::DeleteRelationshipError::AccessDeniedException(inner) => Error::AccessDeniedException(inner),
330            crate::operation::delete_relationship::DeleteRelationshipError::ConflictException(inner) => Error::ConflictException(inner),
331            crate::operation::delete_relationship::DeleteRelationshipError::InternalServerException(inner) => Error::InternalServerException(inner),
332            crate::operation::delete_relationship::DeleteRelationshipError::ResourceNotFoundException(inner) => {
333                Error::ResourceNotFoundException(inner)
334            }
335            crate::operation::delete_relationship::DeleteRelationshipError::ThrottlingException(inner) => Error::ThrottlingException(inner),
336            crate::operation::delete_relationship::DeleteRelationshipError::ValidationException(inner) => Error::ValidationException(inner),
337            crate::operation::delete_relationship::DeleteRelationshipError::Unhandled(inner) => Error::Unhandled(inner),
338        }
339    }
340}
341impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::get_relationship::GetRelationshipError, R>> for Error
342where
343    R: Send + Sync + std::fmt::Debug + 'static,
344{
345    fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::get_relationship::GetRelationshipError, R>) -> Self {
346        match err {
347            ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
348            _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
349                meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
350                source: err.into(),
351            }),
352        }
353    }
354}
355impl From<crate::operation::get_relationship::GetRelationshipError> for Error {
356    fn from(err: crate::operation::get_relationship::GetRelationshipError) -> Self {
357        match err {
358            crate::operation::get_relationship::GetRelationshipError::AccessDeniedException(inner) => Error::AccessDeniedException(inner),
359            crate::operation::get_relationship::GetRelationshipError::InternalServerException(inner) => Error::InternalServerException(inner),
360            crate::operation::get_relationship::GetRelationshipError::ResourceNotFoundException(inner) => Error::ResourceNotFoundException(inner),
361            crate::operation::get_relationship::GetRelationshipError::ThrottlingException(inner) => Error::ThrottlingException(inner),
362            crate::operation::get_relationship::GetRelationshipError::ValidationException(inner) => Error::ValidationException(inner),
363            crate::operation::get_relationship::GetRelationshipError::Unhandled(inner) => Error::Unhandled(inner),
364        }
365    }
366}
367impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::list_channel_handshakes::ListChannelHandshakesError, R>> for Error
368where
369    R: Send + Sync + std::fmt::Debug + 'static,
370{
371    fn from(
372        err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::list_channel_handshakes::ListChannelHandshakesError, R>,
373    ) -> Self {
374        match err {
375            ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
376            _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
377                meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
378                source: err.into(),
379            }),
380        }
381    }
382}
383impl From<crate::operation::list_channel_handshakes::ListChannelHandshakesError> for Error {
384    fn from(err: crate::operation::list_channel_handshakes::ListChannelHandshakesError) -> Self {
385        match err {
386            crate::operation::list_channel_handshakes::ListChannelHandshakesError::AccessDeniedException(inner) => {
387                Error::AccessDeniedException(inner)
388            }
389            crate::operation::list_channel_handshakes::ListChannelHandshakesError::InternalServerException(inner) => {
390                Error::InternalServerException(inner)
391            }
392            crate::operation::list_channel_handshakes::ListChannelHandshakesError::ResourceNotFoundException(inner) => {
393                Error::ResourceNotFoundException(inner)
394            }
395            crate::operation::list_channel_handshakes::ListChannelHandshakesError::ThrottlingException(inner) => Error::ThrottlingException(inner),
396            crate::operation::list_channel_handshakes::ListChannelHandshakesError::ValidationException(inner) => Error::ValidationException(inner),
397            crate::operation::list_channel_handshakes::ListChannelHandshakesError::Unhandled(inner) => Error::Unhandled(inner),
398        }
399    }
400}
401impl<R>
402    From<
403        ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::list_program_management_accounts::ListProgramManagementAccountsError, R>,
404    > for Error
405where
406    R: Send + Sync + std::fmt::Debug + 'static,
407{
408    fn from(
409        err: ::aws_smithy_runtime_api::client::result::SdkError<
410            crate::operation::list_program_management_accounts::ListProgramManagementAccountsError,
411            R,
412        >,
413    ) -> Self {
414        match err {
415            ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
416            _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
417                meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
418                source: err.into(),
419            }),
420        }
421    }
422}
423impl From<crate::operation::list_program_management_accounts::ListProgramManagementAccountsError> for Error {
424    fn from(err: crate::operation::list_program_management_accounts::ListProgramManagementAccountsError) -> Self {
425        match err {
426            crate::operation::list_program_management_accounts::ListProgramManagementAccountsError::AccessDeniedException(inner) => {
427                Error::AccessDeniedException(inner)
428            }
429            crate::operation::list_program_management_accounts::ListProgramManagementAccountsError::InternalServerException(inner) => {
430                Error::InternalServerException(inner)
431            }
432            crate::operation::list_program_management_accounts::ListProgramManagementAccountsError::ResourceNotFoundException(inner) => {
433                Error::ResourceNotFoundException(inner)
434            }
435            crate::operation::list_program_management_accounts::ListProgramManagementAccountsError::ThrottlingException(inner) => {
436                Error::ThrottlingException(inner)
437            }
438            crate::operation::list_program_management_accounts::ListProgramManagementAccountsError::ValidationException(inner) => {
439                Error::ValidationException(inner)
440            }
441            crate::operation::list_program_management_accounts::ListProgramManagementAccountsError::Unhandled(inner) => Error::Unhandled(inner),
442        }
443    }
444}
445impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::list_relationships::ListRelationshipsError, R>> for Error
446where
447    R: Send + Sync + std::fmt::Debug + 'static,
448{
449    fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::list_relationships::ListRelationshipsError, R>) -> Self {
450        match err {
451            ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
452            _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
453                meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
454                source: err.into(),
455            }),
456        }
457    }
458}
459impl From<crate::operation::list_relationships::ListRelationshipsError> for Error {
460    fn from(err: crate::operation::list_relationships::ListRelationshipsError) -> Self {
461        match err {
462            crate::operation::list_relationships::ListRelationshipsError::AccessDeniedException(inner) => Error::AccessDeniedException(inner),
463            crate::operation::list_relationships::ListRelationshipsError::InternalServerException(inner) => Error::InternalServerException(inner),
464            crate::operation::list_relationships::ListRelationshipsError::ResourceNotFoundException(inner) => Error::ResourceNotFoundException(inner),
465            crate::operation::list_relationships::ListRelationshipsError::ThrottlingException(inner) => Error::ThrottlingException(inner),
466            crate::operation::list_relationships::ListRelationshipsError::ValidationException(inner) => Error::ValidationException(inner),
467            crate::operation::list_relationships::ListRelationshipsError::Unhandled(inner) => Error::Unhandled(inner),
468        }
469    }
470}
471impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::list_tags_for_resource::ListTagsForResourceError, R>> for Error
472where
473    R: Send + Sync + std::fmt::Debug + 'static,
474{
475    fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::list_tags_for_resource::ListTagsForResourceError, R>) -> Self {
476        match err {
477            ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
478            _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
479                meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
480                source: err.into(),
481            }),
482        }
483    }
484}
485impl From<crate::operation::list_tags_for_resource::ListTagsForResourceError> for Error {
486    fn from(err: crate::operation::list_tags_for_resource::ListTagsForResourceError) -> Self {
487        match err {
488            crate::operation::list_tags_for_resource::ListTagsForResourceError::AccessDeniedException(inner) => Error::AccessDeniedException(inner),
489            crate::operation::list_tags_for_resource::ListTagsForResourceError::InternalServerException(inner) => {
490                Error::InternalServerException(inner)
491            }
492            crate::operation::list_tags_for_resource::ListTagsForResourceError::ResourceNotFoundException(inner) => {
493                Error::ResourceNotFoundException(inner)
494            }
495            crate::operation::list_tags_for_resource::ListTagsForResourceError::ThrottlingException(inner) => Error::ThrottlingException(inner),
496            crate::operation::list_tags_for_resource::ListTagsForResourceError::ValidationException(inner) => Error::ValidationException(inner),
497            crate::operation::list_tags_for_resource::ListTagsForResourceError::Unhandled(inner) => Error::Unhandled(inner),
498        }
499    }
500}
501impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::reject_channel_handshake::RejectChannelHandshakeError, R>> for Error
502where
503    R: Send + Sync + std::fmt::Debug + 'static,
504{
505    fn from(
506        err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::reject_channel_handshake::RejectChannelHandshakeError, R>,
507    ) -> 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::reject_channel_handshake::RejectChannelHandshakeError> for Error {
518    fn from(err: crate::operation::reject_channel_handshake::RejectChannelHandshakeError) -> Self {
519        match err {
520            crate::operation::reject_channel_handshake::RejectChannelHandshakeError::AccessDeniedException(inner) => {
521                Error::AccessDeniedException(inner)
522            }
523            crate::operation::reject_channel_handshake::RejectChannelHandshakeError::InternalServerException(inner) => {
524                Error::InternalServerException(inner)
525            }
526            crate::operation::reject_channel_handshake::RejectChannelHandshakeError::ResourceNotFoundException(inner) => {
527                Error::ResourceNotFoundException(inner)
528            }
529            crate::operation::reject_channel_handshake::RejectChannelHandshakeError::ThrottlingException(inner) => Error::ThrottlingException(inner),
530            crate::operation::reject_channel_handshake::RejectChannelHandshakeError::ValidationException(inner) => Error::ValidationException(inner),
531            crate::operation::reject_channel_handshake::RejectChannelHandshakeError::Unhandled(inner) => Error::Unhandled(inner),
532        }
533    }
534}
535impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::tag_resource::TagResourceError, R>> for Error
536where
537    R: Send + Sync + std::fmt::Debug + 'static,
538{
539    fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::tag_resource::TagResourceError, R>) -> Self {
540        match err {
541            ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
542            _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
543                meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
544                source: err.into(),
545            }),
546        }
547    }
548}
549impl From<crate::operation::tag_resource::TagResourceError> for Error {
550    fn from(err: crate::operation::tag_resource::TagResourceError) -> Self {
551        match err {
552            crate::operation::tag_resource::TagResourceError::AccessDeniedException(inner) => Error::AccessDeniedException(inner),
553            crate::operation::tag_resource::TagResourceError::ConflictException(inner) => Error::ConflictException(inner),
554            crate::operation::tag_resource::TagResourceError::InternalServerException(inner) => Error::InternalServerException(inner),
555            crate::operation::tag_resource::TagResourceError::ResourceNotFoundException(inner) => Error::ResourceNotFoundException(inner),
556            crate::operation::tag_resource::TagResourceError::ThrottlingException(inner) => Error::ThrottlingException(inner),
557            crate::operation::tag_resource::TagResourceError::ValidationException(inner) => Error::ValidationException(inner),
558            crate::operation::tag_resource::TagResourceError::Unhandled(inner) => Error::Unhandled(inner),
559        }
560    }
561}
562impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::untag_resource::UntagResourceError, R>> for Error
563where
564    R: Send + Sync + std::fmt::Debug + 'static,
565{
566    fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::untag_resource::UntagResourceError, R>) -> Self {
567        match err {
568            ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
569            _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
570                meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
571                source: err.into(),
572            }),
573        }
574    }
575}
576impl From<crate::operation::untag_resource::UntagResourceError> for Error {
577    fn from(err: crate::operation::untag_resource::UntagResourceError) -> Self {
578        match err {
579            crate::operation::untag_resource::UntagResourceError::AccessDeniedException(inner) => Error::AccessDeniedException(inner),
580            crate::operation::untag_resource::UntagResourceError::ConflictException(inner) => Error::ConflictException(inner),
581            crate::operation::untag_resource::UntagResourceError::InternalServerException(inner) => Error::InternalServerException(inner),
582            crate::operation::untag_resource::UntagResourceError::ResourceNotFoundException(inner) => Error::ResourceNotFoundException(inner),
583            crate::operation::untag_resource::UntagResourceError::ThrottlingException(inner) => Error::ThrottlingException(inner),
584            crate::operation::untag_resource::UntagResourceError::ValidationException(inner) => Error::ValidationException(inner),
585            crate::operation::untag_resource::UntagResourceError::Unhandled(inner) => Error::Unhandled(inner),
586        }
587    }
588}
589impl<R>
590    From<
591        ::aws_smithy_runtime_api::client::result::SdkError<
592            crate::operation::update_program_management_account::UpdateProgramManagementAccountError,
593            R,
594        >,
595    > for Error
596where
597    R: Send + Sync + std::fmt::Debug + 'static,
598{
599    fn from(
600        err: ::aws_smithy_runtime_api::client::result::SdkError<
601            crate::operation::update_program_management_account::UpdateProgramManagementAccountError,
602            R,
603        >,
604    ) -> Self {
605        match err {
606            ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
607            _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
608                meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
609                source: err.into(),
610            }),
611        }
612    }
613}
614impl From<crate::operation::update_program_management_account::UpdateProgramManagementAccountError> for Error {
615    fn from(err: crate::operation::update_program_management_account::UpdateProgramManagementAccountError) -> Self {
616        match err {
617            crate::operation::update_program_management_account::UpdateProgramManagementAccountError::AccessDeniedException(inner) => {
618                Error::AccessDeniedException(inner)
619            }
620            crate::operation::update_program_management_account::UpdateProgramManagementAccountError::ConflictException(inner) => {
621                Error::ConflictException(inner)
622            }
623            crate::operation::update_program_management_account::UpdateProgramManagementAccountError::InternalServerException(inner) => {
624                Error::InternalServerException(inner)
625            }
626            crate::operation::update_program_management_account::UpdateProgramManagementAccountError::ResourceNotFoundException(inner) => {
627                Error::ResourceNotFoundException(inner)
628            }
629            crate::operation::update_program_management_account::UpdateProgramManagementAccountError::ThrottlingException(inner) => {
630                Error::ThrottlingException(inner)
631            }
632            crate::operation::update_program_management_account::UpdateProgramManagementAccountError::ValidationException(inner) => {
633                Error::ValidationException(inner)
634            }
635            crate::operation::update_program_management_account::UpdateProgramManagementAccountError::Unhandled(inner) => Error::Unhandled(inner),
636        }
637    }
638}
639impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::update_relationship::UpdateRelationshipError, R>> for Error
640where
641    R: Send + Sync + std::fmt::Debug + 'static,
642{
643    fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::update_relationship::UpdateRelationshipError, R>) -> Self {
644        match err {
645            ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
646            _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
647                meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
648                source: err.into(),
649            }),
650        }
651    }
652}
653impl From<crate::operation::update_relationship::UpdateRelationshipError> for Error {
654    fn from(err: crate::operation::update_relationship::UpdateRelationshipError) -> Self {
655        match err {
656            crate::operation::update_relationship::UpdateRelationshipError::AccessDeniedException(inner) => Error::AccessDeniedException(inner),
657            crate::operation::update_relationship::UpdateRelationshipError::ConflictException(inner) => Error::ConflictException(inner),
658            crate::operation::update_relationship::UpdateRelationshipError::InternalServerException(inner) => Error::InternalServerException(inner),
659            crate::operation::update_relationship::UpdateRelationshipError::ResourceNotFoundException(inner) => {
660                Error::ResourceNotFoundException(inner)
661            }
662            crate::operation::update_relationship::UpdateRelationshipError::ThrottlingException(inner) => Error::ThrottlingException(inner),
663            crate::operation::update_relationship::UpdateRelationshipError::ValidationException(inner) => Error::ValidationException(inner),
664            crate::operation::update_relationship::UpdateRelationshipError::Unhandled(inner) => Error::Unhandled(inner),
665        }
666    }
667}
668impl ::std::error::Error for Error {
669    fn source(&self) -> std::option::Option<&(dyn ::std::error::Error + 'static)> {
670        match self {
671            Error::AccessDeniedException(inner) => inner.source(),
672            Error::ConflictException(inner) => inner.source(),
673            Error::InternalServerException(inner) => inner.source(),
674            Error::ResourceNotFoundException(inner) => inner.source(),
675            Error::ServiceQuotaExceededException(inner) => inner.source(),
676            Error::ThrottlingException(inner) => inner.source(),
677            Error::ValidationException(inner) => inner.source(),
678            Error::Unhandled(inner) => ::std::option::Option::Some(&*inner.source),
679        }
680    }
681}
682impl ::aws_types::request_id::RequestId for Error {
683    fn request_id(&self) -> Option<&str> {
684        match self {
685            Self::AccessDeniedException(e) => e.request_id(),
686            Self::ConflictException(e) => e.request_id(),
687            Self::InternalServerException(e) => e.request_id(),
688            Self::ResourceNotFoundException(e) => e.request_id(),
689            Self::ServiceQuotaExceededException(e) => e.request_id(),
690            Self::ThrottlingException(e) => e.request_id(),
691            Self::ValidationException(e) => e.request_id(),
692            Self::Unhandled(e) => e.meta.request_id(),
693        }
694    }
695}