aws_sdk_ivs/
error_meta.rs

1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2/// All possible error types for this service.
3#[non_exhaustive]
4#[derive(::std::fmt::Debug)]
5pub enum Error {
6    /// <p></p>
7    AccessDeniedException(crate::types::error::AccessDeniedException),
8    /// <p></p>
9    ChannelNotBroadcasting(crate::types::error::ChannelNotBroadcasting),
10    /// <p></p>
11    ConflictException(crate::types::error::ConflictException),
12    /// <p></p>
13    InternalServerException(crate::types::error::InternalServerException),
14    /// <p></p>
15    PendingVerification(crate::types::error::PendingVerification),
16    /// <p></p>
17    ResourceNotFoundException(crate::types::error::ResourceNotFoundException),
18    /// <p></p>
19    ServiceQuotaExceededException(crate::types::error::ServiceQuotaExceededException),
20    /// <p></p>
21    StreamUnavailable(crate::types::error::StreamUnavailable),
22    /// <p></p>
23    ThrottlingException(crate::types::error::ThrottlingException),
24    /// <p></p>
25    ValidationException(crate::types::error::ValidationException),
26    /// An unexpected error occurred (e.g., invalid JSON returned by the service or an unknown error code).
27    #[deprecated(note = "Matching `Unhandled` directly is not forwards compatible. Instead, match using a \
28    variable wildcard pattern and check `.code()`:
29     \
30    &nbsp;&nbsp;&nbsp;`err if err.code() == Some(\"SpecificExceptionCode\") => { /* handle the error */ }`
31     \
32    See [`ProvideErrorMetadata`](#impl-ProvideErrorMetadata-for-Error) for what information is available for the error.")]
33    Unhandled(crate::error::sealed_unhandled::Unhandled),
34}
35impl ::std::fmt::Display for Error {
36    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
37        match self {
38            Error::AccessDeniedException(inner) => inner.fmt(f),
39            Error::ChannelNotBroadcasting(inner) => inner.fmt(f),
40            Error::ConflictException(inner) => inner.fmt(f),
41            Error::InternalServerException(inner) => inner.fmt(f),
42            Error::PendingVerification(inner) => inner.fmt(f),
43            Error::ResourceNotFoundException(inner) => inner.fmt(f),
44            Error::ServiceQuotaExceededException(inner) => inner.fmt(f),
45            Error::StreamUnavailable(inner) => inner.fmt(f),
46            Error::ThrottlingException(inner) => inner.fmt(f),
47            Error::ValidationException(inner) => inner.fmt(f),
48            Error::Unhandled(_) => {
49                if let ::std::option::Option::Some(code) = ::aws_smithy_types::error::metadata::ProvideErrorMetadata::code(self) {
50                    write!(f, "unhandled error ({code})")
51                } else {
52                    f.write_str("unhandled error")
53                }
54            }
55        }
56    }
57}
58impl From<::aws_smithy_types::error::operation::BuildError> for Error {
59    fn from(value: ::aws_smithy_types::error::operation::BuildError) -> Self {
60        Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
61            source: value.into(),
62            meta: ::std::default::Default::default(),
63        })
64    }
65}
66impl ::aws_smithy_types::error::metadata::ProvideErrorMetadata for Error {
67    fn meta(&self) -> &::aws_smithy_types::error::metadata::ErrorMetadata {
68        match self {
69            Self::AccessDeniedException(inner) => inner.meta(),
70            Self::ChannelNotBroadcasting(inner) => inner.meta(),
71            Self::ConflictException(inner) => inner.meta(),
72            Self::InternalServerException(inner) => inner.meta(),
73            Self::PendingVerification(inner) => inner.meta(),
74            Self::ResourceNotFoundException(inner) => inner.meta(),
75            Self::ServiceQuotaExceededException(inner) => inner.meta(),
76            Self::StreamUnavailable(inner) => inner.meta(),
77            Self::ThrottlingException(inner) => inner.meta(),
78            Self::ValidationException(inner) => inner.meta(),
79            Self::Unhandled(inner) => &inner.meta,
80        }
81    }
82}
83impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::batch_get_channel::BatchGetChannelError, R>> for Error
84where
85    R: Send + Sync + std::fmt::Debug + 'static,
86{
87    fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::batch_get_channel::BatchGetChannelError, R>) -> Self {
88        match err {
89            ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
90            _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
91                meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
92                source: err.into(),
93            }),
94        }
95    }
96}
97impl From<crate::operation::batch_get_channel::BatchGetChannelError> for Error {
98    fn from(err: crate::operation::batch_get_channel::BatchGetChannelError) -> Self {
99        match err {
100            crate::operation::batch_get_channel::BatchGetChannelError::Unhandled(inner) => Error::Unhandled(inner),
101        }
102    }
103}
104impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::batch_get_stream_key::BatchGetStreamKeyError, R>> for Error
105where
106    R: Send + Sync + std::fmt::Debug + 'static,
107{
108    fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::batch_get_stream_key::BatchGetStreamKeyError, R>) -> Self {
109        match err {
110            ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
111            _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
112                meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
113                source: err.into(),
114            }),
115        }
116    }
117}
118impl From<crate::operation::batch_get_stream_key::BatchGetStreamKeyError> for Error {
119    fn from(err: crate::operation::batch_get_stream_key::BatchGetStreamKeyError) -> Self {
120        match err {
121            crate::operation::batch_get_stream_key::BatchGetStreamKeyError::Unhandled(inner) => Error::Unhandled(inner),
122        }
123    }
124}
125impl<R>
126    From<
127        ::aws_smithy_runtime_api::client::result::SdkError<
128            crate::operation::batch_start_viewer_session_revocation::BatchStartViewerSessionRevocationError,
129            R,
130        >,
131    > for Error
132where
133    R: Send + Sync + std::fmt::Debug + 'static,
134{
135    fn from(
136        err: ::aws_smithy_runtime_api::client::result::SdkError<
137            crate::operation::batch_start_viewer_session_revocation::BatchStartViewerSessionRevocationError,
138            R,
139        >,
140    ) -> Self {
141        match err {
142            ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
143            _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
144                meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
145                source: err.into(),
146            }),
147        }
148    }
149}
150impl From<crate::operation::batch_start_viewer_session_revocation::BatchStartViewerSessionRevocationError> for Error {
151    fn from(err: crate::operation::batch_start_viewer_session_revocation::BatchStartViewerSessionRevocationError) -> Self {
152        match err {
153            crate::operation::batch_start_viewer_session_revocation::BatchStartViewerSessionRevocationError::AccessDeniedException(inner) => {
154                Error::AccessDeniedException(inner)
155            }
156            crate::operation::batch_start_viewer_session_revocation::BatchStartViewerSessionRevocationError::PendingVerification(inner) => {
157                Error::PendingVerification(inner)
158            }
159            crate::operation::batch_start_viewer_session_revocation::BatchStartViewerSessionRevocationError::ThrottlingException(inner) => {
160                Error::ThrottlingException(inner)
161            }
162            crate::operation::batch_start_viewer_session_revocation::BatchStartViewerSessionRevocationError::ValidationException(inner) => {
163                Error::ValidationException(inner)
164            }
165            crate::operation::batch_start_viewer_session_revocation::BatchStartViewerSessionRevocationError::Unhandled(inner) => {
166                Error::Unhandled(inner)
167            }
168        }
169    }
170}
171impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::create_channel::CreateChannelError, R>> for Error
172where
173    R: Send + Sync + std::fmt::Debug + 'static,
174{
175    fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::create_channel::CreateChannelError, R>) -> Self {
176        match err {
177            ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
178            _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
179                meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
180                source: err.into(),
181            }),
182        }
183    }
184}
185impl From<crate::operation::create_channel::CreateChannelError> for Error {
186    fn from(err: crate::operation::create_channel::CreateChannelError) -> Self {
187        match err {
188            crate::operation::create_channel::CreateChannelError::AccessDeniedException(inner) => Error::AccessDeniedException(inner),
189            crate::operation::create_channel::CreateChannelError::PendingVerification(inner) => Error::PendingVerification(inner),
190            crate::operation::create_channel::CreateChannelError::ResourceNotFoundException(inner) => Error::ResourceNotFoundException(inner),
191            crate::operation::create_channel::CreateChannelError::ServiceQuotaExceededException(inner) => Error::ServiceQuotaExceededException(inner),
192            crate::operation::create_channel::CreateChannelError::ValidationException(inner) => Error::ValidationException(inner),
193            crate::operation::create_channel::CreateChannelError::Unhandled(inner) => Error::Unhandled(inner),
194        }
195    }
196}
197impl<R>
198    From<
199        ::aws_smithy_runtime_api::client::result::SdkError<
200            crate::operation::create_playback_restriction_policy::CreatePlaybackRestrictionPolicyError,
201            R,
202        >,
203    > for Error
204where
205    R: Send + Sync + std::fmt::Debug + 'static,
206{
207    fn from(
208        err: ::aws_smithy_runtime_api::client::result::SdkError<
209            crate::operation::create_playback_restriction_policy::CreatePlaybackRestrictionPolicyError,
210            R,
211        >,
212    ) -> Self {
213        match err {
214            ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
215            _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
216                meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
217                source: err.into(),
218            }),
219        }
220    }
221}
222impl From<crate::operation::create_playback_restriction_policy::CreatePlaybackRestrictionPolicyError> for Error {
223    fn from(err: crate::operation::create_playback_restriction_policy::CreatePlaybackRestrictionPolicyError) -> Self {
224        match err {
225            crate::operation::create_playback_restriction_policy::CreatePlaybackRestrictionPolicyError::AccessDeniedException(inner) => {
226                Error::AccessDeniedException(inner)
227            }
228            crate::operation::create_playback_restriction_policy::CreatePlaybackRestrictionPolicyError::PendingVerification(inner) => {
229                Error::PendingVerification(inner)
230            }
231            crate::operation::create_playback_restriction_policy::CreatePlaybackRestrictionPolicyError::ServiceQuotaExceededException(inner) => {
232                Error::ServiceQuotaExceededException(inner)
233            }
234            crate::operation::create_playback_restriction_policy::CreatePlaybackRestrictionPolicyError::ThrottlingException(inner) => {
235                Error::ThrottlingException(inner)
236            }
237            crate::operation::create_playback_restriction_policy::CreatePlaybackRestrictionPolicyError::ValidationException(inner) => {
238                Error::ValidationException(inner)
239            }
240            crate::operation::create_playback_restriction_policy::CreatePlaybackRestrictionPolicyError::Unhandled(inner) => Error::Unhandled(inner),
241        }
242    }
243}
244impl<R>
245    From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::create_recording_configuration::CreateRecordingConfigurationError, R>>
246    for Error
247where
248    R: Send + Sync + std::fmt::Debug + 'static,
249{
250    fn from(
251        err: ::aws_smithy_runtime_api::client::result::SdkError<
252            crate::operation::create_recording_configuration::CreateRecordingConfigurationError,
253            R,
254        >,
255    ) -> Self {
256        match err {
257            ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
258            _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
259                meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
260                source: err.into(),
261            }),
262        }
263    }
264}
265impl From<crate::operation::create_recording_configuration::CreateRecordingConfigurationError> for Error {
266    fn from(err: crate::operation::create_recording_configuration::CreateRecordingConfigurationError) -> Self {
267        match err {
268            crate::operation::create_recording_configuration::CreateRecordingConfigurationError::AccessDeniedException(inner) => {
269                Error::AccessDeniedException(inner)
270            }
271            crate::operation::create_recording_configuration::CreateRecordingConfigurationError::ConflictException(inner) => {
272                Error::ConflictException(inner)
273            }
274            crate::operation::create_recording_configuration::CreateRecordingConfigurationError::InternalServerException(inner) => {
275                Error::InternalServerException(inner)
276            }
277            crate::operation::create_recording_configuration::CreateRecordingConfigurationError::PendingVerification(inner) => {
278                Error::PendingVerification(inner)
279            }
280            crate::operation::create_recording_configuration::CreateRecordingConfigurationError::ServiceQuotaExceededException(inner) => {
281                Error::ServiceQuotaExceededException(inner)
282            }
283            crate::operation::create_recording_configuration::CreateRecordingConfigurationError::ValidationException(inner) => {
284                Error::ValidationException(inner)
285            }
286            crate::operation::create_recording_configuration::CreateRecordingConfigurationError::Unhandled(inner) => Error::Unhandled(inner),
287        }
288    }
289}
290impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::create_stream_key::CreateStreamKeyError, R>> for Error
291where
292    R: Send + Sync + std::fmt::Debug + 'static,
293{
294    fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::create_stream_key::CreateStreamKeyError, R>) -> Self {
295        match err {
296            ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
297            _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
298                meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
299                source: err.into(),
300            }),
301        }
302    }
303}
304impl From<crate::operation::create_stream_key::CreateStreamKeyError> for Error {
305    fn from(err: crate::operation::create_stream_key::CreateStreamKeyError) -> Self {
306        match err {
307            crate::operation::create_stream_key::CreateStreamKeyError::AccessDeniedException(inner) => Error::AccessDeniedException(inner),
308            crate::operation::create_stream_key::CreateStreamKeyError::PendingVerification(inner) => Error::PendingVerification(inner),
309            crate::operation::create_stream_key::CreateStreamKeyError::ResourceNotFoundException(inner) => Error::ResourceNotFoundException(inner),
310            crate::operation::create_stream_key::CreateStreamKeyError::ServiceQuotaExceededException(inner) => {
311                Error::ServiceQuotaExceededException(inner)
312            }
313            crate::operation::create_stream_key::CreateStreamKeyError::ValidationException(inner) => Error::ValidationException(inner),
314            crate::operation::create_stream_key::CreateStreamKeyError::Unhandled(inner) => Error::Unhandled(inner),
315        }
316    }
317}
318impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::delete_channel::DeleteChannelError, R>> for Error
319where
320    R: Send + Sync + std::fmt::Debug + 'static,
321{
322    fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::delete_channel::DeleteChannelError, R>) -> Self {
323        match err {
324            ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
325            _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
326                meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
327                source: err.into(),
328            }),
329        }
330    }
331}
332impl From<crate::operation::delete_channel::DeleteChannelError> for Error {
333    fn from(err: crate::operation::delete_channel::DeleteChannelError) -> Self {
334        match err {
335            crate::operation::delete_channel::DeleteChannelError::AccessDeniedException(inner) => Error::AccessDeniedException(inner),
336            crate::operation::delete_channel::DeleteChannelError::ConflictException(inner) => Error::ConflictException(inner),
337            crate::operation::delete_channel::DeleteChannelError::PendingVerification(inner) => Error::PendingVerification(inner),
338            crate::operation::delete_channel::DeleteChannelError::ResourceNotFoundException(inner) => Error::ResourceNotFoundException(inner),
339            crate::operation::delete_channel::DeleteChannelError::ValidationException(inner) => Error::ValidationException(inner),
340            crate::operation::delete_channel::DeleteChannelError::Unhandled(inner) => Error::Unhandled(inner),
341        }
342    }
343}
344impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::delete_playback_key_pair::DeletePlaybackKeyPairError, R>> for Error
345where
346    R: Send + Sync + std::fmt::Debug + 'static,
347{
348    fn from(
349        err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::delete_playback_key_pair::DeletePlaybackKeyPairError, R>,
350    ) -> Self {
351        match err {
352            ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
353            _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
354                meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
355                source: err.into(),
356            }),
357        }
358    }
359}
360impl From<crate::operation::delete_playback_key_pair::DeletePlaybackKeyPairError> for Error {
361    fn from(err: crate::operation::delete_playback_key_pair::DeletePlaybackKeyPairError) -> Self {
362        match err {
363            crate::operation::delete_playback_key_pair::DeletePlaybackKeyPairError::AccessDeniedException(inner) => {
364                Error::AccessDeniedException(inner)
365            }
366            crate::operation::delete_playback_key_pair::DeletePlaybackKeyPairError::PendingVerification(inner) => Error::PendingVerification(inner),
367            crate::operation::delete_playback_key_pair::DeletePlaybackKeyPairError::ResourceNotFoundException(inner) => {
368                Error::ResourceNotFoundException(inner)
369            }
370            crate::operation::delete_playback_key_pair::DeletePlaybackKeyPairError::ValidationException(inner) => Error::ValidationException(inner),
371            crate::operation::delete_playback_key_pair::DeletePlaybackKeyPairError::Unhandled(inner) => Error::Unhandled(inner),
372        }
373    }
374}
375impl<R>
376    From<
377        ::aws_smithy_runtime_api::client::result::SdkError<
378            crate::operation::delete_playback_restriction_policy::DeletePlaybackRestrictionPolicyError,
379            R,
380        >,
381    > for Error
382where
383    R: Send + Sync + std::fmt::Debug + 'static,
384{
385    fn from(
386        err: ::aws_smithy_runtime_api::client::result::SdkError<
387            crate::operation::delete_playback_restriction_policy::DeletePlaybackRestrictionPolicyError,
388            R,
389        >,
390    ) -> Self {
391        match err {
392            ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
393            _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
394                meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
395                source: err.into(),
396            }),
397        }
398    }
399}
400impl From<crate::operation::delete_playback_restriction_policy::DeletePlaybackRestrictionPolicyError> for Error {
401    fn from(err: crate::operation::delete_playback_restriction_policy::DeletePlaybackRestrictionPolicyError) -> Self {
402        match err {
403            crate::operation::delete_playback_restriction_policy::DeletePlaybackRestrictionPolicyError::AccessDeniedException(inner) => {
404                Error::AccessDeniedException(inner)
405            }
406            crate::operation::delete_playback_restriction_policy::DeletePlaybackRestrictionPolicyError::ConflictException(inner) => {
407                Error::ConflictException(inner)
408            }
409            crate::operation::delete_playback_restriction_policy::DeletePlaybackRestrictionPolicyError::PendingVerification(inner) => {
410                Error::PendingVerification(inner)
411            }
412            crate::operation::delete_playback_restriction_policy::DeletePlaybackRestrictionPolicyError::ResourceNotFoundException(inner) => {
413                Error::ResourceNotFoundException(inner)
414            }
415            crate::operation::delete_playback_restriction_policy::DeletePlaybackRestrictionPolicyError::ValidationException(inner) => {
416                Error::ValidationException(inner)
417            }
418            crate::operation::delete_playback_restriction_policy::DeletePlaybackRestrictionPolicyError::Unhandled(inner) => Error::Unhandled(inner),
419        }
420    }
421}
422impl<R>
423    From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::delete_recording_configuration::DeleteRecordingConfigurationError, R>>
424    for Error
425where
426    R: Send + Sync + std::fmt::Debug + 'static,
427{
428    fn from(
429        err: ::aws_smithy_runtime_api::client::result::SdkError<
430            crate::operation::delete_recording_configuration::DeleteRecordingConfigurationError,
431            R,
432        >,
433    ) -> Self {
434        match err {
435            ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
436            _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
437                meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
438                source: err.into(),
439            }),
440        }
441    }
442}
443impl From<crate::operation::delete_recording_configuration::DeleteRecordingConfigurationError> for Error {
444    fn from(err: crate::operation::delete_recording_configuration::DeleteRecordingConfigurationError) -> Self {
445        match err {
446            crate::operation::delete_recording_configuration::DeleteRecordingConfigurationError::AccessDeniedException(inner) => {
447                Error::AccessDeniedException(inner)
448            }
449            crate::operation::delete_recording_configuration::DeleteRecordingConfigurationError::ConflictException(inner) => {
450                Error::ConflictException(inner)
451            }
452            crate::operation::delete_recording_configuration::DeleteRecordingConfigurationError::InternalServerException(inner) => {
453                Error::InternalServerException(inner)
454            }
455            crate::operation::delete_recording_configuration::DeleteRecordingConfigurationError::ResourceNotFoundException(inner) => {
456                Error::ResourceNotFoundException(inner)
457            }
458            crate::operation::delete_recording_configuration::DeleteRecordingConfigurationError::ValidationException(inner) => {
459                Error::ValidationException(inner)
460            }
461            crate::operation::delete_recording_configuration::DeleteRecordingConfigurationError::Unhandled(inner) => Error::Unhandled(inner),
462        }
463    }
464}
465impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::delete_stream_key::DeleteStreamKeyError, R>> for Error
466where
467    R: Send + Sync + std::fmt::Debug + 'static,
468{
469    fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::delete_stream_key::DeleteStreamKeyError, R>) -> Self {
470        match err {
471            ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
472            _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
473                meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
474                source: err.into(),
475            }),
476        }
477    }
478}
479impl From<crate::operation::delete_stream_key::DeleteStreamKeyError> for Error {
480    fn from(err: crate::operation::delete_stream_key::DeleteStreamKeyError) -> Self {
481        match err {
482            crate::operation::delete_stream_key::DeleteStreamKeyError::AccessDeniedException(inner) => Error::AccessDeniedException(inner),
483            crate::operation::delete_stream_key::DeleteStreamKeyError::PendingVerification(inner) => Error::PendingVerification(inner),
484            crate::operation::delete_stream_key::DeleteStreamKeyError::ResourceNotFoundException(inner) => Error::ResourceNotFoundException(inner),
485            crate::operation::delete_stream_key::DeleteStreamKeyError::ValidationException(inner) => Error::ValidationException(inner),
486            crate::operation::delete_stream_key::DeleteStreamKeyError::Unhandled(inner) => Error::Unhandled(inner),
487        }
488    }
489}
490impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::get_channel::GetChannelError, 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::get_channel::GetChannelError, 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::get_channel::GetChannelError> for Error {
505    fn from(err: crate::operation::get_channel::GetChannelError) -> Self {
506        match err {
507            crate::operation::get_channel::GetChannelError::AccessDeniedException(inner) => Error::AccessDeniedException(inner),
508            crate::operation::get_channel::GetChannelError::ResourceNotFoundException(inner) => Error::ResourceNotFoundException(inner),
509            crate::operation::get_channel::GetChannelError::ValidationException(inner) => Error::ValidationException(inner),
510            crate::operation::get_channel::GetChannelError::Unhandled(inner) => Error::Unhandled(inner),
511        }
512    }
513}
514impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::get_playback_key_pair::GetPlaybackKeyPairError, R>> for Error
515where
516    R: Send + Sync + std::fmt::Debug + 'static,
517{
518    fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::get_playback_key_pair::GetPlaybackKeyPairError, R>) -> Self {
519        match err {
520            ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
521            _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
522                meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
523                source: err.into(),
524            }),
525        }
526    }
527}
528impl From<crate::operation::get_playback_key_pair::GetPlaybackKeyPairError> for Error {
529    fn from(err: crate::operation::get_playback_key_pair::GetPlaybackKeyPairError) -> Self {
530        match err {
531            crate::operation::get_playback_key_pair::GetPlaybackKeyPairError::AccessDeniedException(inner) => Error::AccessDeniedException(inner),
532            crate::operation::get_playback_key_pair::GetPlaybackKeyPairError::ResourceNotFoundException(inner) => {
533                Error::ResourceNotFoundException(inner)
534            }
535            crate::operation::get_playback_key_pair::GetPlaybackKeyPairError::ValidationException(inner) => Error::ValidationException(inner),
536            crate::operation::get_playback_key_pair::GetPlaybackKeyPairError::Unhandled(inner) => Error::Unhandled(inner),
537        }
538    }
539}
540impl<R>
541    From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::get_playback_restriction_policy::GetPlaybackRestrictionPolicyError, R>>
542    for Error
543where
544    R: Send + Sync + std::fmt::Debug + 'static,
545{
546    fn from(
547        err: ::aws_smithy_runtime_api::client::result::SdkError<
548            crate::operation::get_playback_restriction_policy::GetPlaybackRestrictionPolicyError,
549            R,
550        >,
551    ) -> Self {
552        match err {
553            ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
554            _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
555                meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
556                source: err.into(),
557            }),
558        }
559    }
560}
561impl From<crate::operation::get_playback_restriction_policy::GetPlaybackRestrictionPolicyError> for Error {
562    fn from(err: crate::operation::get_playback_restriction_policy::GetPlaybackRestrictionPolicyError) -> Self {
563        match err {
564            crate::operation::get_playback_restriction_policy::GetPlaybackRestrictionPolicyError::AccessDeniedException(inner) => {
565                Error::AccessDeniedException(inner)
566            }
567            crate::operation::get_playback_restriction_policy::GetPlaybackRestrictionPolicyError::PendingVerification(inner) => {
568                Error::PendingVerification(inner)
569            }
570            crate::operation::get_playback_restriction_policy::GetPlaybackRestrictionPolicyError::ResourceNotFoundException(inner) => {
571                Error::ResourceNotFoundException(inner)
572            }
573            crate::operation::get_playback_restriction_policy::GetPlaybackRestrictionPolicyError::ValidationException(inner) => {
574                Error::ValidationException(inner)
575            }
576            crate::operation::get_playback_restriction_policy::GetPlaybackRestrictionPolicyError::Unhandled(inner) => Error::Unhandled(inner),
577        }
578    }
579}
580impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::get_recording_configuration::GetRecordingConfigurationError, R>>
581    for Error
582where
583    R: Send + Sync + std::fmt::Debug + 'static,
584{
585    fn from(
586        err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::get_recording_configuration::GetRecordingConfigurationError, R>,
587    ) -> Self {
588        match err {
589            ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
590            _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
591                meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
592                source: err.into(),
593            }),
594        }
595    }
596}
597impl From<crate::operation::get_recording_configuration::GetRecordingConfigurationError> for Error {
598    fn from(err: crate::operation::get_recording_configuration::GetRecordingConfigurationError) -> Self {
599        match err {
600            crate::operation::get_recording_configuration::GetRecordingConfigurationError::AccessDeniedException(inner) => {
601                Error::AccessDeniedException(inner)
602            }
603            crate::operation::get_recording_configuration::GetRecordingConfigurationError::InternalServerException(inner) => {
604                Error::InternalServerException(inner)
605            }
606            crate::operation::get_recording_configuration::GetRecordingConfigurationError::ResourceNotFoundException(inner) => {
607                Error::ResourceNotFoundException(inner)
608            }
609            crate::operation::get_recording_configuration::GetRecordingConfigurationError::ValidationException(inner) => {
610                Error::ValidationException(inner)
611            }
612            crate::operation::get_recording_configuration::GetRecordingConfigurationError::Unhandled(inner) => Error::Unhandled(inner),
613        }
614    }
615}
616impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::get_stream::GetStreamError, R>> for Error
617where
618    R: Send + Sync + std::fmt::Debug + 'static,
619{
620    fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::get_stream::GetStreamError, R>) -> Self {
621        match err {
622            ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
623            _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
624                meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
625                source: err.into(),
626            }),
627        }
628    }
629}
630impl From<crate::operation::get_stream::GetStreamError> for Error {
631    fn from(err: crate::operation::get_stream::GetStreamError) -> Self {
632        match err {
633            crate::operation::get_stream::GetStreamError::AccessDeniedException(inner) => Error::AccessDeniedException(inner),
634            crate::operation::get_stream::GetStreamError::ChannelNotBroadcasting(inner) => Error::ChannelNotBroadcasting(inner),
635            crate::operation::get_stream::GetStreamError::ResourceNotFoundException(inner) => Error::ResourceNotFoundException(inner),
636            crate::operation::get_stream::GetStreamError::ValidationException(inner) => Error::ValidationException(inner),
637            crate::operation::get_stream::GetStreamError::Unhandled(inner) => Error::Unhandled(inner),
638        }
639    }
640}
641impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::get_stream_key::GetStreamKeyError, R>> for Error
642where
643    R: Send + Sync + std::fmt::Debug + 'static,
644{
645    fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::get_stream_key::GetStreamKeyError, R>) -> Self {
646        match err {
647            ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
648            _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
649                meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
650                source: err.into(),
651            }),
652        }
653    }
654}
655impl From<crate::operation::get_stream_key::GetStreamKeyError> for Error {
656    fn from(err: crate::operation::get_stream_key::GetStreamKeyError) -> Self {
657        match err {
658            crate::operation::get_stream_key::GetStreamKeyError::AccessDeniedException(inner) => Error::AccessDeniedException(inner),
659            crate::operation::get_stream_key::GetStreamKeyError::ResourceNotFoundException(inner) => Error::ResourceNotFoundException(inner),
660            crate::operation::get_stream_key::GetStreamKeyError::ValidationException(inner) => Error::ValidationException(inner),
661            crate::operation::get_stream_key::GetStreamKeyError::Unhandled(inner) => Error::Unhandled(inner),
662        }
663    }
664}
665impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::get_stream_session::GetStreamSessionError, R>> for Error
666where
667    R: Send + Sync + std::fmt::Debug + 'static,
668{
669    fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::get_stream_session::GetStreamSessionError, R>) -> Self {
670        match err {
671            ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
672            _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
673                meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
674                source: err.into(),
675            }),
676        }
677    }
678}
679impl From<crate::operation::get_stream_session::GetStreamSessionError> for Error {
680    fn from(err: crate::operation::get_stream_session::GetStreamSessionError) -> Self {
681        match err {
682            crate::operation::get_stream_session::GetStreamSessionError::AccessDeniedException(inner) => Error::AccessDeniedException(inner),
683            crate::operation::get_stream_session::GetStreamSessionError::ResourceNotFoundException(inner) => Error::ResourceNotFoundException(inner),
684            crate::operation::get_stream_session::GetStreamSessionError::ValidationException(inner) => Error::ValidationException(inner),
685            crate::operation::get_stream_session::GetStreamSessionError::Unhandled(inner) => Error::Unhandled(inner),
686        }
687    }
688}
689impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::import_playback_key_pair::ImportPlaybackKeyPairError, R>> for Error
690where
691    R: Send + Sync + std::fmt::Debug + 'static,
692{
693    fn from(
694        err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::import_playback_key_pair::ImportPlaybackKeyPairError, R>,
695    ) -> Self {
696        match err {
697            ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
698            _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
699                meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
700                source: err.into(),
701            }),
702        }
703    }
704}
705impl From<crate::operation::import_playback_key_pair::ImportPlaybackKeyPairError> for Error {
706    fn from(err: crate::operation::import_playback_key_pair::ImportPlaybackKeyPairError) -> Self {
707        match err {
708            crate::operation::import_playback_key_pair::ImportPlaybackKeyPairError::AccessDeniedException(inner) => {
709                Error::AccessDeniedException(inner)
710            }
711            crate::operation::import_playback_key_pair::ImportPlaybackKeyPairError::ConflictException(inner) => Error::ConflictException(inner),
712            crate::operation::import_playback_key_pair::ImportPlaybackKeyPairError::PendingVerification(inner) => Error::PendingVerification(inner),
713            crate::operation::import_playback_key_pair::ImportPlaybackKeyPairError::ServiceQuotaExceededException(inner) => {
714                Error::ServiceQuotaExceededException(inner)
715            }
716            crate::operation::import_playback_key_pair::ImportPlaybackKeyPairError::ValidationException(inner) => Error::ValidationException(inner),
717            crate::operation::import_playback_key_pair::ImportPlaybackKeyPairError::Unhandled(inner) => Error::Unhandled(inner),
718        }
719    }
720}
721impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::list_channels::ListChannelsError, R>> for Error
722where
723    R: Send + Sync + std::fmt::Debug + 'static,
724{
725    fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::list_channels::ListChannelsError, R>) -> Self {
726        match err {
727            ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
728            _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
729                meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
730                source: err.into(),
731            }),
732        }
733    }
734}
735impl From<crate::operation::list_channels::ListChannelsError> for Error {
736    fn from(err: crate::operation::list_channels::ListChannelsError) -> Self {
737        match err {
738            crate::operation::list_channels::ListChannelsError::AccessDeniedException(inner) => Error::AccessDeniedException(inner),
739            crate::operation::list_channels::ListChannelsError::ConflictException(inner) => Error::ConflictException(inner),
740            crate::operation::list_channels::ListChannelsError::ValidationException(inner) => Error::ValidationException(inner),
741            crate::operation::list_channels::ListChannelsError::Unhandled(inner) => Error::Unhandled(inner),
742        }
743    }
744}
745impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::list_playback_key_pairs::ListPlaybackKeyPairsError, R>> for Error
746where
747    R: Send + Sync + std::fmt::Debug + 'static,
748{
749    fn from(
750        err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::list_playback_key_pairs::ListPlaybackKeyPairsError, R>,
751    ) -> Self {
752        match err {
753            ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
754            _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
755                meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
756                source: err.into(),
757            }),
758        }
759    }
760}
761impl From<crate::operation::list_playback_key_pairs::ListPlaybackKeyPairsError> for Error {
762    fn from(err: crate::operation::list_playback_key_pairs::ListPlaybackKeyPairsError) -> Self {
763        match err {
764            crate::operation::list_playback_key_pairs::ListPlaybackKeyPairsError::AccessDeniedException(inner) => Error::AccessDeniedException(inner),
765            crate::operation::list_playback_key_pairs::ListPlaybackKeyPairsError::ValidationException(inner) => Error::ValidationException(inner),
766            crate::operation::list_playback_key_pairs::ListPlaybackKeyPairsError::Unhandled(inner) => Error::Unhandled(inner),
767        }
768    }
769}
770impl<R>
771    From<
772        ::aws_smithy_runtime_api::client::result::SdkError<
773            crate::operation::list_playback_restriction_policies::ListPlaybackRestrictionPoliciesError,
774            R,
775        >,
776    > for Error
777where
778    R: Send + Sync + std::fmt::Debug + 'static,
779{
780    fn from(
781        err: ::aws_smithy_runtime_api::client::result::SdkError<
782            crate::operation::list_playback_restriction_policies::ListPlaybackRestrictionPoliciesError,
783            R,
784        >,
785    ) -> Self {
786        match err {
787            ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
788            _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
789                meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
790                source: err.into(),
791            }),
792        }
793    }
794}
795impl From<crate::operation::list_playback_restriction_policies::ListPlaybackRestrictionPoliciesError> for Error {
796    fn from(err: crate::operation::list_playback_restriction_policies::ListPlaybackRestrictionPoliciesError) -> Self {
797        match err {
798            crate::operation::list_playback_restriction_policies::ListPlaybackRestrictionPoliciesError::AccessDeniedException(inner) => {
799                Error::AccessDeniedException(inner)
800            }
801            crate::operation::list_playback_restriction_policies::ListPlaybackRestrictionPoliciesError::ConflictException(inner) => {
802                Error::ConflictException(inner)
803            }
804            crate::operation::list_playback_restriction_policies::ListPlaybackRestrictionPoliciesError::PendingVerification(inner) => {
805                Error::PendingVerification(inner)
806            }
807            crate::operation::list_playback_restriction_policies::ListPlaybackRestrictionPoliciesError::ValidationException(inner) => {
808                Error::ValidationException(inner)
809            }
810            crate::operation::list_playback_restriction_policies::ListPlaybackRestrictionPoliciesError::Unhandled(inner) => Error::Unhandled(inner),
811        }
812    }
813}
814impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::list_recording_configurations::ListRecordingConfigurationsError, R>>
815    for Error
816where
817    R: Send + Sync + std::fmt::Debug + 'static,
818{
819    fn from(
820        err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::list_recording_configurations::ListRecordingConfigurationsError, R>,
821    ) -> Self {
822        match err {
823            ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
824            _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
825                meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
826                source: err.into(),
827            }),
828        }
829    }
830}
831impl From<crate::operation::list_recording_configurations::ListRecordingConfigurationsError> for Error {
832    fn from(err: crate::operation::list_recording_configurations::ListRecordingConfigurationsError) -> Self {
833        match err {
834            crate::operation::list_recording_configurations::ListRecordingConfigurationsError::AccessDeniedException(inner) => {
835                Error::AccessDeniedException(inner)
836            }
837            crate::operation::list_recording_configurations::ListRecordingConfigurationsError::InternalServerException(inner) => {
838                Error::InternalServerException(inner)
839            }
840            crate::operation::list_recording_configurations::ListRecordingConfigurationsError::ValidationException(inner) => {
841                Error::ValidationException(inner)
842            }
843            crate::operation::list_recording_configurations::ListRecordingConfigurationsError::Unhandled(inner) => Error::Unhandled(inner),
844        }
845    }
846}
847impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::list_stream_keys::ListStreamKeysError, R>> for Error
848where
849    R: Send + Sync + std::fmt::Debug + 'static,
850{
851    fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::list_stream_keys::ListStreamKeysError, R>) -> Self {
852        match err {
853            ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
854            _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
855                meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
856                source: err.into(),
857            }),
858        }
859    }
860}
861impl From<crate::operation::list_stream_keys::ListStreamKeysError> for Error {
862    fn from(err: crate::operation::list_stream_keys::ListStreamKeysError) -> Self {
863        match err {
864            crate::operation::list_stream_keys::ListStreamKeysError::AccessDeniedException(inner) => Error::AccessDeniedException(inner),
865            crate::operation::list_stream_keys::ListStreamKeysError::ResourceNotFoundException(inner) => Error::ResourceNotFoundException(inner),
866            crate::operation::list_stream_keys::ListStreamKeysError::ValidationException(inner) => Error::ValidationException(inner),
867            crate::operation::list_stream_keys::ListStreamKeysError::Unhandled(inner) => Error::Unhandled(inner),
868        }
869    }
870}
871impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::list_streams::ListStreamsError, R>> for Error
872where
873    R: Send + Sync + std::fmt::Debug + 'static,
874{
875    fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::list_streams::ListStreamsError, R>) -> Self {
876        match err {
877            ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
878            _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
879                meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
880                source: err.into(),
881            }),
882        }
883    }
884}
885impl From<crate::operation::list_streams::ListStreamsError> for Error {
886    fn from(err: crate::operation::list_streams::ListStreamsError) -> Self {
887        match err {
888            crate::operation::list_streams::ListStreamsError::AccessDeniedException(inner) => Error::AccessDeniedException(inner),
889            crate::operation::list_streams::ListStreamsError::ValidationException(inner) => Error::ValidationException(inner),
890            crate::operation::list_streams::ListStreamsError::Unhandled(inner) => Error::Unhandled(inner),
891        }
892    }
893}
894impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::list_stream_sessions::ListStreamSessionsError, R>> for Error
895where
896    R: Send + Sync + std::fmt::Debug + 'static,
897{
898    fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::list_stream_sessions::ListStreamSessionsError, R>) -> Self {
899        match err {
900            ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
901            _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
902                meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
903                source: err.into(),
904            }),
905        }
906    }
907}
908impl From<crate::operation::list_stream_sessions::ListStreamSessionsError> for Error {
909    fn from(err: crate::operation::list_stream_sessions::ListStreamSessionsError) -> Self {
910        match err {
911            crate::operation::list_stream_sessions::ListStreamSessionsError::AccessDeniedException(inner) => Error::AccessDeniedException(inner),
912            crate::operation::list_stream_sessions::ListStreamSessionsError::ResourceNotFoundException(inner) => {
913                Error::ResourceNotFoundException(inner)
914            }
915            crate::operation::list_stream_sessions::ListStreamSessionsError::ValidationException(inner) => Error::ValidationException(inner),
916            crate::operation::list_stream_sessions::ListStreamSessionsError::Unhandled(inner) => Error::Unhandled(inner),
917        }
918    }
919}
920impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::list_tags_for_resource::ListTagsForResourceError, R>> for Error
921where
922    R: Send + Sync + std::fmt::Debug + 'static,
923{
924    fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::list_tags_for_resource::ListTagsForResourceError, R>) -> Self {
925        match err {
926            ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
927            _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
928                meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
929                source: err.into(),
930            }),
931        }
932    }
933}
934impl From<crate::operation::list_tags_for_resource::ListTagsForResourceError> for Error {
935    fn from(err: crate::operation::list_tags_for_resource::ListTagsForResourceError) -> Self {
936        match err {
937            crate::operation::list_tags_for_resource::ListTagsForResourceError::InternalServerException(inner) => {
938                Error::InternalServerException(inner)
939            }
940            crate::operation::list_tags_for_resource::ListTagsForResourceError::ResourceNotFoundException(inner) => {
941                Error::ResourceNotFoundException(inner)
942            }
943            crate::operation::list_tags_for_resource::ListTagsForResourceError::ValidationException(inner) => Error::ValidationException(inner),
944            crate::operation::list_tags_for_resource::ListTagsForResourceError::Unhandled(inner) => Error::Unhandled(inner),
945        }
946    }
947}
948impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::put_metadata::PutMetadataError, R>> for Error
949where
950    R: Send + Sync + std::fmt::Debug + 'static,
951{
952    fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::put_metadata::PutMetadataError, R>) -> Self {
953        match err {
954            ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
955            _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
956                meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
957                source: err.into(),
958            }),
959        }
960    }
961}
962impl From<crate::operation::put_metadata::PutMetadataError> for Error {
963    fn from(err: crate::operation::put_metadata::PutMetadataError) -> Self {
964        match err {
965            crate::operation::put_metadata::PutMetadataError::AccessDeniedException(inner) => Error::AccessDeniedException(inner),
966            crate::operation::put_metadata::PutMetadataError::ChannelNotBroadcasting(inner) => Error::ChannelNotBroadcasting(inner),
967            crate::operation::put_metadata::PutMetadataError::ResourceNotFoundException(inner) => Error::ResourceNotFoundException(inner),
968            crate::operation::put_metadata::PutMetadataError::ThrottlingException(inner) => Error::ThrottlingException(inner),
969            crate::operation::put_metadata::PutMetadataError::ValidationException(inner) => Error::ValidationException(inner),
970            crate::operation::put_metadata::PutMetadataError::Unhandled(inner) => Error::Unhandled(inner),
971        }
972    }
973}
974impl<R>
975    From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::start_viewer_session_revocation::StartViewerSessionRevocationError, R>>
976    for Error
977where
978    R: Send + Sync + std::fmt::Debug + 'static,
979{
980    fn from(
981        err: ::aws_smithy_runtime_api::client::result::SdkError<
982            crate::operation::start_viewer_session_revocation::StartViewerSessionRevocationError,
983            R,
984        >,
985    ) -> Self {
986        match err {
987            ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
988            _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
989                meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
990                source: err.into(),
991            }),
992        }
993    }
994}
995impl From<crate::operation::start_viewer_session_revocation::StartViewerSessionRevocationError> for Error {
996    fn from(err: crate::operation::start_viewer_session_revocation::StartViewerSessionRevocationError) -> Self {
997        match err {
998            crate::operation::start_viewer_session_revocation::StartViewerSessionRevocationError::AccessDeniedException(inner) => {
999                Error::AccessDeniedException(inner)
1000            }
1001            crate::operation::start_viewer_session_revocation::StartViewerSessionRevocationError::InternalServerException(inner) => {
1002                Error::InternalServerException(inner)
1003            }
1004            crate::operation::start_viewer_session_revocation::StartViewerSessionRevocationError::PendingVerification(inner) => {
1005                Error::PendingVerification(inner)
1006            }
1007            crate::operation::start_viewer_session_revocation::StartViewerSessionRevocationError::ResourceNotFoundException(inner) => {
1008                Error::ResourceNotFoundException(inner)
1009            }
1010            crate::operation::start_viewer_session_revocation::StartViewerSessionRevocationError::ThrottlingException(inner) => {
1011                Error::ThrottlingException(inner)
1012            }
1013            crate::operation::start_viewer_session_revocation::StartViewerSessionRevocationError::ValidationException(inner) => {
1014                Error::ValidationException(inner)
1015            }
1016            crate::operation::start_viewer_session_revocation::StartViewerSessionRevocationError::Unhandled(inner) => Error::Unhandled(inner),
1017        }
1018    }
1019}
1020impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::stop_stream::StopStreamError, R>> for Error
1021where
1022    R: Send + Sync + std::fmt::Debug + 'static,
1023{
1024    fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::stop_stream::StopStreamError, R>) -> Self {
1025        match err {
1026            ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
1027            _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
1028                meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
1029                source: err.into(),
1030            }),
1031        }
1032    }
1033}
1034impl From<crate::operation::stop_stream::StopStreamError> for Error {
1035    fn from(err: crate::operation::stop_stream::StopStreamError) -> Self {
1036        match err {
1037            crate::operation::stop_stream::StopStreamError::AccessDeniedException(inner) => Error::AccessDeniedException(inner),
1038            crate::operation::stop_stream::StopStreamError::ChannelNotBroadcasting(inner) => Error::ChannelNotBroadcasting(inner),
1039            crate::operation::stop_stream::StopStreamError::ResourceNotFoundException(inner) => Error::ResourceNotFoundException(inner),
1040            crate::operation::stop_stream::StopStreamError::StreamUnavailable(inner) => Error::StreamUnavailable(inner),
1041            crate::operation::stop_stream::StopStreamError::ValidationException(inner) => Error::ValidationException(inner),
1042            crate::operation::stop_stream::StopStreamError::Unhandled(inner) => Error::Unhandled(inner),
1043        }
1044    }
1045}
1046impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::tag_resource::TagResourceError, R>> for Error
1047where
1048    R: Send + Sync + std::fmt::Debug + 'static,
1049{
1050    fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::tag_resource::TagResourceError, R>) -> Self {
1051        match err {
1052            ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
1053            _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
1054                meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
1055                source: err.into(),
1056            }),
1057        }
1058    }
1059}
1060impl From<crate::operation::tag_resource::TagResourceError> for Error {
1061    fn from(err: crate::operation::tag_resource::TagResourceError) -> Self {
1062        match err {
1063            crate::operation::tag_resource::TagResourceError::InternalServerException(inner) => Error::InternalServerException(inner),
1064            crate::operation::tag_resource::TagResourceError::ResourceNotFoundException(inner) => Error::ResourceNotFoundException(inner),
1065            crate::operation::tag_resource::TagResourceError::ValidationException(inner) => Error::ValidationException(inner),
1066            crate::operation::tag_resource::TagResourceError::Unhandled(inner) => Error::Unhandled(inner),
1067        }
1068    }
1069}
1070impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::untag_resource::UntagResourceError, R>> for Error
1071where
1072    R: Send + Sync + std::fmt::Debug + 'static,
1073{
1074    fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::untag_resource::UntagResourceError, R>) -> Self {
1075        match err {
1076            ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
1077            _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
1078                meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
1079                source: err.into(),
1080            }),
1081        }
1082    }
1083}
1084impl From<crate::operation::untag_resource::UntagResourceError> for Error {
1085    fn from(err: crate::operation::untag_resource::UntagResourceError) -> Self {
1086        match err {
1087            crate::operation::untag_resource::UntagResourceError::InternalServerException(inner) => Error::InternalServerException(inner),
1088            crate::operation::untag_resource::UntagResourceError::ResourceNotFoundException(inner) => Error::ResourceNotFoundException(inner),
1089            crate::operation::untag_resource::UntagResourceError::ValidationException(inner) => Error::ValidationException(inner),
1090            crate::operation::untag_resource::UntagResourceError::Unhandled(inner) => Error::Unhandled(inner),
1091        }
1092    }
1093}
1094impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::update_channel::UpdateChannelError, R>> for Error
1095where
1096    R: Send + Sync + std::fmt::Debug + 'static,
1097{
1098    fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::update_channel::UpdateChannelError, R>) -> Self {
1099        match err {
1100            ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
1101            _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
1102                meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
1103                source: err.into(),
1104            }),
1105        }
1106    }
1107}
1108impl From<crate::operation::update_channel::UpdateChannelError> for Error {
1109    fn from(err: crate::operation::update_channel::UpdateChannelError) -> Self {
1110        match err {
1111            crate::operation::update_channel::UpdateChannelError::AccessDeniedException(inner) => Error::AccessDeniedException(inner),
1112            crate::operation::update_channel::UpdateChannelError::ConflictException(inner) => Error::ConflictException(inner),
1113            crate::operation::update_channel::UpdateChannelError::PendingVerification(inner) => Error::PendingVerification(inner),
1114            crate::operation::update_channel::UpdateChannelError::ResourceNotFoundException(inner) => Error::ResourceNotFoundException(inner),
1115            crate::operation::update_channel::UpdateChannelError::ValidationException(inner) => Error::ValidationException(inner),
1116            crate::operation::update_channel::UpdateChannelError::Unhandled(inner) => Error::Unhandled(inner),
1117        }
1118    }
1119}
1120impl<R>
1121    From<
1122        ::aws_smithy_runtime_api::client::result::SdkError<
1123            crate::operation::update_playback_restriction_policy::UpdatePlaybackRestrictionPolicyError,
1124            R,
1125        >,
1126    > for Error
1127where
1128    R: Send + Sync + std::fmt::Debug + 'static,
1129{
1130    fn from(
1131        err: ::aws_smithy_runtime_api::client::result::SdkError<
1132            crate::operation::update_playback_restriction_policy::UpdatePlaybackRestrictionPolicyError,
1133            R,
1134        >,
1135    ) -> Self {
1136        match err {
1137            ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
1138            _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
1139                meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
1140                source: err.into(),
1141            }),
1142        }
1143    }
1144}
1145impl From<crate::operation::update_playback_restriction_policy::UpdatePlaybackRestrictionPolicyError> for Error {
1146    fn from(err: crate::operation::update_playback_restriction_policy::UpdatePlaybackRestrictionPolicyError) -> Self {
1147        match err {
1148            crate::operation::update_playback_restriction_policy::UpdatePlaybackRestrictionPolicyError::AccessDeniedException(inner) => {
1149                Error::AccessDeniedException(inner)
1150            }
1151            crate::operation::update_playback_restriction_policy::UpdatePlaybackRestrictionPolicyError::ConflictException(inner) => {
1152                Error::ConflictException(inner)
1153            }
1154            crate::operation::update_playback_restriction_policy::UpdatePlaybackRestrictionPolicyError::PendingVerification(inner) => {
1155                Error::PendingVerification(inner)
1156            }
1157            crate::operation::update_playback_restriction_policy::UpdatePlaybackRestrictionPolicyError::ResourceNotFoundException(inner) => {
1158                Error::ResourceNotFoundException(inner)
1159            }
1160            crate::operation::update_playback_restriction_policy::UpdatePlaybackRestrictionPolicyError::ValidationException(inner) => {
1161                Error::ValidationException(inner)
1162            }
1163            crate::operation::update_playback_restriction_policy::UpdatePlaybackRestrictionPolicyError::Unhandled(inner) => Error::Unhandled(inner),
1164        }
1165    }
1166}
1167impl ::std::error::Error for Error {
1168    fn source(&self) -> std::option::Option<&(dyn ::std::error::Error + 'static)> {
1169        match self {
1170            Error::AccessDeniedException(inner) => inner.source(),
1171            Error::ChannelNotBroadcasting(inner) => inner.source(),
1172            Error::ConflictException(inner) => inner.source(),
1173            Error::InternalServerException(inner) => inner.source(),
1174            Error::PendingVerification(inner) => inner.source(),
1175            Error::ResourceNotFoundException(inner) => inner.source(),
1176            Error::ServiceQuotaExceededException(inner) => inner.source(),
1177            Error::StreamUnavailable(inner) => inner.source(),
1178            Error::ThrottlingException(inner) => inner.source(),
1179            Error::ValidationException(inner) => inner.source(),
1180            Error::Unhandled(inner) => ::std::option::Option::Some(&*inner.source),
1181        }
1182    }
1183}
1184impl ::aws_types::request_id::RequestId for Error {
1185    fn request_id(&self) -> Option<&str> {
1186        match self {
1187            Self::AccessDeniedException(e) => e.request_id(),
1188            Self::ChannelNotBroadcasting(e) => e.request_id(),
1189            Self::ConflictException(e) => e.request_id(),
1190            Self::InternalServerException(e) => e.request_id(),
1191            Self::PendingVerification(e) => e.request_id(),
1192            Self::ResourceNotFoundException(e) => e.request_id(),
1193            Self::ServiceQuotaExceededException(e) => e.request_id(),
1194            Self::StreamUnavailable(e) => e.request_id(),
1195            Self::ThrottlingException(e) => e.request_id(),
1196            Self::ValidationException(e) => e.request_id(),
1197            Self::Unhandled(e) => e.meta.request_id(),
1198        }
1199    }
1200}