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