aws_sdk_mediastore/
error_meta.rs

1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2/// All possible error types for this service.
3#[non_exhaustive]
4#[derive(::std::fmt::Debug)]
5pub enum Error {
6    /// <p>The container that you specified in the request already exists or is being updated.</p>
7    ContainerInUseException(crate::types::error::ContainerInUseException),
8    /// <p>The container that you specified in the request does not exist.</p>
9    ContainerNotFoundException(crate::types::error::ContainerNotFoundException),
10    /// <p>The CORS policy that you specified in the request does not exist.</p>
11    CorsPolicyNotFoundException(crate::types::error::CorsPolicyNotFoundException),
12    /// <p>The service is temporarily unavailable.</p>
13    InternalServerError(crate::types::error::InternalServerError),
14    /// <p>A service limit has been exceeded.</p>
15    LimitExceededException(crate::types::error::LimitExceededException),
16    /// <p>The policy that you specified in the request does not exist.</p>
17    PolicyNotFoundException(crate::types::error::PolicyNotFoundException),
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    &nbsp;&nbsp;&nbsp;`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::ContainerInUseException(inner) => inner.fmt(f),
31            Error::ContainerNotFoundException(inner) => inner.fmt(f),
32            Error::CorsPolicyNotFoundException(inner) => inner.fmt(f),
33            Error::InternalServerError(inner) => inner.fmt(f),
34            Error::LimitExceededException(inner) => inner.fmt(f),
35            Error::PolicyNotFoundException(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::ContainerInUseException(inner) => inner.meta(),
58            Self::ContainerNotFoundException(inner) => inner.meta(),
59            Self::CorsPolicyNotFoundException(inner) => inner.meta(),
60            Self::InternalServerError(inner) => inner.meta(),
61            Self::LimitExceededException(inner) => inner.meta(),
62            Self::PolicyNotFoundException(inner) => inner.meta(),
63            Self::Unhandled(inner) => &inner.meta,
64        }
65    }
66}
67impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::create_container::CreateContainerError, 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::create_container::CreateContainerError, 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::create_container::CreateContainerError> for Error {
82    fn from(err: crate::operation::create_container::CreateContainerError) -> Self {
83        match err {
84            crate::operation::create_container::CreateContainerError::ContainerInUseException(inner) => Error::ContainerInUseException(inner),
85            crate::operation::create_container::CreateContainerError::InternalServerError(inner) => Error::InternalServerError(inner),
86            crate::operation::create_container::CreateContainerError::LimitExceededException(inner) => Error::LimitExceededException(inner),
87            crate::operation::create_container::CreateContainerError::Unhandled(inner) => Error::Unhandled(inner),
88        }
89    }
90}
91impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::delete_container::DeleteContainerError, R>> for Error
92where
93    R: Send + Sync + std::fmt::Debug + 'static,
94{
95    fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::delete_container::DeleteContainerError, R>) -> Self {
96        match err {
97            ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
98            _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
99                meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
100                source: err.into(),
101            }),
102        }
103    }
104}
105impl From<crate::operation::delete_container::DeleteContainerError> for Error {
106    fn from(err: crate::operation::delete_container::DeleteContainerError) -> Self {
107        match err {
108            crate::operation::delete_container::DeleteContainerError::ContainerInUseException(inner) => Error::ContainerInUseException(inner),
109            crate::operation::delete_container::DeleteContainerError::ContainerNotFoundException(inner) => Error::ContainerNotFoundException(inner),
110            crate::operation::delete_container::DeleteContainerError::InternalServerError(inner) => Error::InternalServerError(inner),
111            crate::operation::delete_container::DeleteContainerError::Unhandled(inner) => Error::Unhandled(inner),
112        }
113    }
114}
115impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::delete_container_policy::DeleteContainerPolicyError, R>> for Error
116where
117    R: Send + Sync + std::fmt::Debug + 'static,
118{
119    fn from(
120        err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::delete_container_policy::DeleteContainerPolicyError, R>,
121    ) -> Self {
122        match err {
123            ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
124            _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
125                meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
126                source: err.into(),
127            }),
128        }
129    }
130}
131impl From<crate::operation::delete_container_policy::DeleteContainerPolicyError> for Error {
132    fn from(err: crate::operation::delete_container_policy::DeleteContainerPolicyError) -> Self {
133        match err {
134            crate::operation::delete_container_policy::DeleteContainerPolicyError::ContainerInUseException(inner) => {
135                Error::ContainerInUseException(inner)
136            }
137            crate::operation::delete_container_policy::DeleteContainerPolicyError::ContainerNotFoundException(inner) => {
138                Error::ContainerNotFoundException(inner)
139            }
140            crate::operation::delete_container_policy::DeleteContainerPolicyError::InternalServerError(inner) => Error::InternalServerError(inner),
141            crate::operation::delete_container_policy::DeleteContainerPolicyError::PolicyNotFoundException(inner) => {
142                Error::PolicyNotFoundException(inner)
143            }
144            crate::operation::delete_container_policy::DeleteContainerPolicyError::Unhandled(inner) => Error::Unhandled(inner),
145        }
146    }
147}
148impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::delete_cors_policy::DeleteCorsPolicyError, R>> for Error
149where
150    R: Send + Sync + std::fmt::Debug + 'static,
151{
152    fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::delete_cors_policy::DeleteCorsPolicyError, R>) -> Self {
153        match err {
154            ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
155            _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
156                meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
157                source: err.into(),
158            }),
159        }
160    }
161}
162impl From<crate::operation::delete_cors_policy::DeleteCorsPolicyError> for Error {
163    fn from(err: crate::operation::delete_cors_policy::DeleteCorsPolicyError) -> Self {
164        match err {
165            crate::operation::delete_cors_policy::DeleteCorsPolicyError::ContainerInUseException(inner) => Error::ContainerInUseException(inner),
166            crate::operation::delete_cors_policy::DeleteCorsPolicyError::ContainerNotFoundException(inner) => {
167                Error::ContainerNotFoundException(inner)
168            }
169            crate::operation::delete_cors_policy::DeleteCorsPolicyError::CorsPolicyNotFoundException(inner) => {
170                Error::CorsPolicyNotFoundException(inner)
171            }
172            crate::operation::delete_cors_policy::DeleteCorsPolicyError::InternalServerError(inner) => Error::InternalServerError(inner),
173            crate::operation::delete_cors_policy::DeleteCorsPolicyError::Unhandled(inner) => Error::Unhandled(inner),
174        }
175    }
176}
177impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::delete_lifecycle_policy::DeleteLifecyclePolicyError, R>> for Error
178where
179    R: Send + Sync + std::fmt::Debug + 'static,
180{
181    fn from(
182        err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::delete_lifecycle_policy::DeleteLifecyclePolicyError, R>,
183    ) -> Self {
184        match err {
185            ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
186            _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
187                meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
188                source: err.into(),
189            }),
190        }
191    }
192}
193impl From<crate::operation::delete_lifecycle_policy::DeleteLifecyclePolicyError> for Error {
194    fn from(err: crate::operation::delete_lifecycle_policy::DeleteLifecyclePolicyError) -> Self {
195        match err {
196            crate::operation::delete_lifecycle_policy::DeleteLifecyclePolicyError::ContainerInUseException(inner) => {
197                Error::ContainerInUseException(inner)
198            }
199            crate::operation::delete_lifecycle_policy::DeleteLifecyclePolicyError::ContainerNotFoundException(inner) => {
200                Error::ContainerNotFoundException(inner)
201            }
202            crate::operation::delete_lifecycle_policy::DeleteLifecyclePolicyError::InternalServerError(inner) => Error::InternalServerError(inner),
203            crate::operation::delete_lifecycle_policy::DeleteLifecyclePolicyError::PolicyNotFoundException(inner) => {
204                Error::PolicyNotFoundException(inner)
205            }
206            crate::operation::delete_lifecycle_policy::DeleteLifecyclePolicyError::Unhandled(inner) => Error::Unhandled(inner),
207        }
208    }
209}
210impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::delete_metric_policy::DeleteMetricPolicyError, R>> for Error
211where
212    R: Send + Sync + std::fmt::Debug + 'static,
213{
214    fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::delete_metric_policy::DeleteMetricPolicyError, R>) -> Self {
215        match err {
216            ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
217            _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
218                meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
219                source: err.into(),
220            }),
221        }
222    }
223}
224impl From<crate::operation::delete_metric_policy::DeleteMetricPolicyError> for Error {
225    fn from(err: crate::operation::delete_metric_policy::DeleteMetricPolicyError) -> Self {
226        match err {
227            crate::operation::delete_metric_policy::DeleteMetricPolicyError::ContainerInUseException(inner) => Error::ContainerInUseException(inner),
228            crate::operation::delete_metric_policy::DeleteMetricPolicyError::ContainerNotFoundException(inner) => {
229                Error::ContainerNotFoundException(inner)
230            }
231            crate::operation::delete_metric_policy::DeleteMetricPolicyError::InternalServerError(inner) => Error::InternalServerError(inner),
232            crate::operation::delete_metric_policy::DeleteMetricPolicyError::PolicyNotFoundException(inner) => Error::PolicyNotFoundException(inner),
233            crate::operation::delete_metric_policy::DeleteMetricPolicyError::Unhandled(inner) => Error::Unhandled(inner),
234        }
235    }
236}
237impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::describe_container::DescribeContainerError, R>> for Error
238where
239    R: Send + Sync + std::fmt::Debug + 'static,
240{
241    fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::describe_container::DescribeContainerError, R>) -> Self {
242        match err {
243            ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
244            _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
245                meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
246                source: err.into(),
247            }),
248        }
249    }
250}
251impl From<crate::operation::describe_container::DescribeContainerError> for Error {
252    fn from(err: crate::operation::describe_container::DescribeContainerError) -> Self {
253        match err {
254            crate::operation::describe_container::DescribeContainerError::ContainerNotFoundException(inner) => {
255                Error::ContainerNotFoundException(inner)
256            }
257            crate::operation::describe_container::DescribeContainerError::InternalServerError(inner) => Error::InternalServerError(inner),
258            crate::operation::describe_container::DescribeContainerError::Unhandled(inner) => Error::Unhandled(inner),
259        }
260    }
261}
262impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::get_container_policy::GetContainerPolicyError, R>> for Error
263where
264    R: Send + Sync + std::fmt::Debug + 'static,
265{
266    fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::get_container_policy::GetContainerPolicyError, R>) -> Self {
267        match err {
268            ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
269            _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
270                meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
271                source: err.into(),
272            }),
273        }
274    }
275}
276impl From<crate::operation::get_container_policy::GetContainerPolicyError> for Error {
277    fn from(err: crate::operation::get_container_policy::GetContainerPolicyError) -> Self {
278        match err {
279            crate::operation::get_container_policy::GetContainerPolicyError::ContainerInUseException(inner) => Error::ContainerInUseException(inner),
280            crate::operation::get_container_policy::GetContainerPolicyError::ContainerNotFoundException(inner) => {
281                Error::ContainerNotFoundException(inner)
282            }
283            crate::operation::get_container_policy::GetContainerPolicyError::InternalServerError(inner) => Error::InternalServerError(inner),
284            crate::operation::get_container_policy::GetContainerPolicyError::PolicyNotFoundException(inner) => Error::PolicyNotFoundException(inner),
285            crate::operation::get_container_policy::GetContainerPolicyError::Unhandled(inner) => Error::Unhandled(inner),
286        }
287    }
288}
289impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::get_cors_policy::GetCorsPolicyError, R>> for Error
290where
291    R: Send + Sync + std::fmt::Debug + 'static,
292{
293    fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::get_cors_policy::GetCorsPolicyError, R>) -> Self {
294        match err {
295            ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
296            _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
297                meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
298                source: err.into(),
299            }),
300        }
301    }
302}
303impl From<crate::operation::get_cors_policy::GetCorsPolicyError> for Error {
304    fn from(err: crate::operation::get_cors_policy::GetCorsPolicyError) -> Self {
305        match err {
306            crate::operation::get_cors_policy::GetCorsPolicyError::ContainerInUseException(inner) => Error::ContainerInUseException(inner),
307            crate::operation::get_cors_policy::GetCorsPolicyError::ContainerNotFoundException(inner) => Error::ContainerNotFoundException(inner),
308            crate::operation::get_cors_policy::GetCorsPolicyError::CorsPolicyNotFoundException(inner) => Error::CorsPolicyNotFoundException(inner),
309            crate::operation::get_cors_policy::GetCorsPolicyError::InternalServerError(inner) => Error::InternalServerError(inner),
310            crate::operation::get_cors_policy::GetCorsPolicyError::Unhandled(inner) => Error::Unhandled(inner),
311        }
312    }
313}
314impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::get_lifecycle_policy::GetLifecyclePolicyError, R>> for Error
315where
316    R: Send + Sync + std::fmt::Debug + 'static,
317{
318    fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::get_lifecycle_policy::GetLifecyclePolicyError, R>) -> Self {
319        match err {
320            ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
321            _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
322                meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
323                source: err.into(),
324            }),
325        }
326    }
327}
328impl From<crate::operation::get_lifecycle_policy::GetLifecyclePolicyError> for Error {
329    fn from(err: crate::operation::get_lifecycle_policy::GetLifecyclePolicyError) -> Self {
330        match err {
331            crate::operation::get_lifecycle_policy::GetLifecyclePolicyError::ContainerInUseException(inner) => Error::ContainerInUseException(inner),
332            crate::operation::get_lifecycle_policy::GetLifecyclePolicyError::ContainerNotFoundException(inner) => {
333                Error::ContainerNotFoundException(inner)
334            }
335            crate::operation::get_lifecycle_policy::GetLifecyclePolicyError::InternalServerError(inner) => Error::InternalServerError(inner),
336            crate::operation::get_lifecycle_policy::GetLifecyclePolicyError::PolicyNotFoundException(inner) => Error::PolicyNotFoundException(inner),
337            crate::operation::get_lifecycle_policy::GetLifecyclePolicyError::Unhandled(inner) => Error::Unhandled(inner),
338        }
339    }
340}
341impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::get_metric_policy::GetMetricPolicyError, R>> for Error
342where
343    R: Send + Sync + std::fmt::Debug + 'static,
344{
345    fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::get_metric_policy::GetMetricPolicyError, R>) -> Self {
346        match err {
347            ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
348            _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
349                meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
350                source: err.into(),
351            }),
352        }
353    }
354}
355impl From<crate::operation::get_metric_policy::GetMetricPolicyError> for Error {
356    fn from(err: crate::operation::get_metric_policy::GetMetricPolicyError) -> Self {
357        match err {
358            crate::operation::get_metric_policy::GetMetricPolicyError::ContainerInUseException(inner) => Error::ContainerInUseException(inner),
359            crate::operation::get_metric_policy::GetMetricPolicyError::ContainerNotFoundException(inner) => Error::ContainerNotFoundException(inner),
360            crate::operation::get_metric_policy::GetMetricPolicyError::InternalServerError(inner) => Error::InternalServerError(inner),
361            crate::operation::get_metric_policy::GetMetricPolicyError::PolicyNotFoundException(inner) => Error::PolicyNotFoundException(inner),
362            crate::operation::get_metric_policy::GetMetricPolicyError::Unhandled(inner) => Error::Unhandled(inner),
363        }
364    }
365}
366impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::list_containers::ListContainersError, R>> for Error
367where
368    R: Send + Sync + std::fmt::Debug + 'static,
369{
370    fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::list_containers::ListContainersError, R>) -> Self {
371        match err {
372            ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
373            _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
374                meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
375                source: err.into(),
376            }),
377        }
378    }
379}
380impl From<crate::operation::list_containers::ListContainersError> for Error {
381    fn from(err: crate::operation::list_containers::ListContainersError) -> Self {
382        match err {
383            crate::operation::list_containers::ListContainersError::InternalServerError(inner) => Error::InternalServerError(inner),
384            crate::operation::list_containers::ListContainersError::Unhandled(inner) => Error::Unhandled(inner),
385        }
386    }
387}
388impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::list_tags_for_resource::ListTagsForResourceError, R>> for Error
389where
390    R: Send + Sync + std::fmt::Debug + 'static,
391{
392    fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::list_tags_for_resource::ListTagsForResourceError, R>) -> Self {
393        match err {
394            ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
395            _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
396                meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
397                source: err.into(),
398            }),
399        }
400    }
401}
402impl From<crate::operation::list_tags_for_resource::ListTagsForResourceError> for Error {
403    fn from(err: crate::operation::list_tags_for_resource::ListTagsForResourceError) -> Self {
404        match err {
405            crate::operation::list_tags_for_resource::ListTagsForResourceError::ContainerInUseException(inner) => {
406                Error::ContainerInUseException(inner)
407            }
408            crate::operation::list_tags_for_resource::ListTagsForResourceError::ContainerNotFoundException(inner) => {
409                Error::ContainerNotFoundException(inner)
410            }
411            crate::operation::list_tags_for_resource::ListTagsForResourceError::InternalServerError(inner) => Error::InternalServerError(inner),
412            crate::operation::list_tags_for_resource::ListTagsForResourceError::Unhandled(inner) => Error::Unhandled(inner),
413        }
414    }
415}
416impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::put_container_policy::PutContainerPolicyError, R>> for Error
417where
418    R: Send + Sync + std::fmt::Debug + 'static,
419{
420    fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::put_container_policy::PutContainerPolicyError, R>) -> Self {
421        match err {
422            ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
423            _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
424                meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
425                source: err.into(),
426            }),
427        }
428    }
429}
430impl From<crate::operation::put_container_policy::PutContainerPolicyError> for Error {
431    fn from(err: crate::operation::put_container_policy::PutContainerPolicyError) -> Self {
432        match err {
433            crate::operation::put_container_policy::PutContainerPolicyError::ContainerInUseException(inner) => Error::ContainerInUseException(inner),
434            crate::operation::put_container_policy::PutContainerPolicyError::ContainerNotFoundException(inner) => {
435                Error::ContainerNotFoundException(inner)
436            }
437            crate::operation::put_container_policy::PutContainerPolicyError::InternalServerError(inner) => Error::InternalServerError(inner),
438            crate::operation::put_container_policy::PutContainerPolicyError::Unhandled(inner) => Error::Unhandled(inner),
439        }
440    }
441}
442impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::put_cors_policy::PutCorsPolicyError, R>> for Error
443where
444    R: Send + Sync + std::fmt::Debug + 'static,
445{
446    fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::put_cors_policy::PutCorsPolicyError, R>) -> Self {
447        match err {
448            ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
449            _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
450                meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
451                source: err.into(),
452            }),
453        }
454    }
455}
456impl From<crate::operation::put_cors_policy::PutCorsPolicyError> for Error {
457    fn from(err: crate::operation::put_cors_policy::PutCorsPolicyError) -> Self {
458        match err {
459            crate::operation::put_cors_policy::PutCorsPolicyError::ContainerInUseException(inner) => Error::ContainerInUseException(inner),
460            crate::operation::put_cors_policy::PutCorsPolicyError::ContainerNotFoundException(inner) => Error::ContainerNotFoundException(inner),
461            crate::operation::put_cors_policy::PutCorsPolicyError::InternalServerError(inner) => Error::InternalServerError(inner),
462            crate::operation::put_cors_policy::PutCorsPolicyError::Unhandled(inner) => Error::Unhandled(inner),
463        }
464    }
465}
466impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::put_lifecycle_policy::PutLifecyclePolicyError, R>> for Error
467where
468    R: Send + Sync + std::fmt::Debug + 'static,
469{
470    fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::put_lifecycle_policy::PutLifecyclePolicyError, R>) -> Self {
471        match err {
472            ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
473            _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
474                meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
475                source: err.into(),
476            }),
477        }
478    }
479}
480impl From<crate::operation::put_lifecycle_policy::PutLifecyclePolicyError> for Error {
481    fn from(err: crate::operation::put_lifecycle_policy::PutLifecyclePolicyError) -> Self {
482        match err {
483            crate::operation::put_lifecycle_policy::PutLifecyclePolicyError::ContainerInUseException(inner) => Error::ContainerInUseException(inner),
484            crate::operation::put_lifecycle_policy::PutLifecyclePolicyError::ContainerNotFoundException(inner) => {
485                Error::ContainerNotFoundException(inner)
486            }
487            crate::operation::put_lifecycle_policy::PutLifecyclePolicyError::InternalServerError(inner) => Error::InternalServerError(inner),
488            crate::operation::put_lifecycle_policy::PutLifecyclePolicyError::Unhandled(inner) => Error::Unhandled(inner),
489        }
490    }
491}
492impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::put_metric_policy::PutMetricPolicyError, R>> for Error
493where
494    R: Send + Sync + std::fmt::Debug + 'static,
495{
496    fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::put_metric_policy::PutMetricPolicyError, R>) -> Self {
497        match err {
498            ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
499            _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
500                meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
501                source: err.into(),
502            }),
503        }
504    }
505}
506impl From<crate::operation::put_metric_policy::PutMetricPolicyError> for Error {
507    fn from(err: crate::operation::put_metric_policy::PutMetricPolicyError) -> Self {
508        match err {
509            crate::operation::put_metric_policy::PutMetricPolicyError::ContainerInUseException(inner) => Error::ContainerInUseException(inner),
510            crate::operation::put_metric_policy::PutMetricPolicyError::ContainerNotFoundException(inner) => Error::ContainerNotFoundException(inner),
511            crate::operation::put_metric_policy::PutMetricPolicyError::InternalServerError(inner) => Error::InternalServerError(inner),
512            crate::operation::put_metric_policy::PutMetricPolicyError::Unhandled(inner) => Error::Unhandled(inner),
513        }
514    }
515}
516impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::start_access_logging::StartAccessLoggingError, R>> for Error
517where
518    R: Send + Sync + std::fmt::Debug + 'static,
519{
520    fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::start_access_logging::StartAccessLoggingError, R>) -> Self {
521        match err {
522            ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
523            _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
524                meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
525                source: err.into(),
526            }),
527        }
528    }
529}
530impl From<crate::operation::start_access_logging::StartAccessLoggingError> for Error {
531    fn from(err: crate::operation::start_access_logging::StartAccessLoggingError) -> Self {
532        match err {
533            crate::operation::start_access_logging::StartAccessLoggingError::ContainerInUseException(inner) => Error::ContainerInUseException(inner),
534            crate::operation::start_access_logging::StartAccessLoggingError::ContainerNotFoundException(inner) => {
535                Error::ContainerNotFoundException(inner)
536            }
537            crate::operation::start_access_logging::StartAccessLoggingError::InternalServerError(inner) => Error::InternalServerError(inner),
538            crate::operation::start_access_logging::StartAccessLoggingError::Unhandled(inner) => Error::Unhandled(inner),
539        }
540    }
541}
542impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::stop_access_logging::StopAccessLoggingError, R>> for Error
543where
544    R: Send + Sync + std::fmt::Debug + 'static,
545{
546    fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::stop_access_logging::StopAccessLoggingError, R>) -> Self {
547        match err {
548            ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
549            _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
550                meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
551                source: err.into(),
552            }),
553        }
554    }
555}
556impl From<crate::operation::stop_access_logging::StopAccessLoggingError> for Error {
557    fn from(err: crate::operation::stop_access_logging::StopAccessLoggingError) -> Self {
558        match err {
559            crate::operation::stop_access_logging::StopAccessLoggingError::ContainerInUseException(inner) => Error::ContainerInUseException(inner),
560            crate::operation::stop_access_logging::StopAccessLoggingError::ContainerNotFoundException(inner) => {
561                Error::ContainerNotFoundException(inner)
562            }
563            crate::operation::stop_access_logging::StopAccessLoggingError::InternalServerError(inner) => Error::InternalServerError(inner),
564            crate::operation::stop_access_logging::StopAccessLoggingError::Unhandled(inner) => Error::Unhandled(inner),
565        }
566    }
567}
568impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::tag_resource::TagResourceError, R>> for Error
569where
570    R: Send + Sync + std::fmt::Debug + 'static,
571{
572    fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::tag_resource::TagResourceError, R>) -> Self {
573        match err {
574            ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
575            _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
576                meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
577                source: err.into(),
578            }),
579        }
580    }
581}
582impl From<crate::operation::tag_resource::TagResourceError> for Error {
583    fn from(err: crate::operation::tag_resource::TagResourceError) -> Self {
584        match err {
585            crate::operation::tag_resource::TagResourceError::ContainerInUseException(inner) => Error::ContainerInUseException(inner),
586            crate::operation::tag_resource::TagResourceError::ContainerNotFoundException(inner) => Error::ContainerNotFoundException(inner),
587            crate::operation::tag_resource::TagResourceError::InternalServerError(inner) => Error::InternalServerError(inner),
588            crate::operation::tag_resource::TagResourceError::Unhandled(inner) => Error::Unhandled(inner),
589        }
590    }
591}
592impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::untag_resource::UntagResourceError, R>> for Error
593where
594    R: Send + Sync + std::fmt::Debug + 'static,
595{
596    fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::untag_resource::UntagResourceError, R>) -> Self {
597        match err {
598            ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
599            _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
600                meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
601                source: err.into(),
602            }),
603        }
604    }
605}
606impl From<crate::operation::untag_resource::UntagResourceError> for Error {
607    fn from(err: crate::operation::untag_resource::UntagResourceError) -> Self {
608        match err {
609            crate::operation::untag_resource::UntagResourceError::ContainerInUseException(inner) => Error::ContainerInUseException(inner),
610            crate::operation::untag_resource::UntagResourceError::ContainerNotFoundException(inner) => Error::ContainerNotFoundException(inner),
611            crate::operation::untag_resource::UntagResourceError::InternalServerError(inner) => Error::InternalServerError(inner),
612            crate::operation::untag_resource::UntagResourceError::Unhandled(inner) => Error::Unhandled(inner),
613        }
614    }
615}
616impl ::std::error::Error for Error {
617    fn source(&self) -> std::option::Option<&(dyn ::std::error::Error + 'static)> {
618        match self {
619            Error::ContainerInUseException(inner) => inner.source(),
620            Error::ContainerNotFoundException(inner) => inner.source(),
621            Error::CorsPolicyNotFoundException(inner) => inner.source(),
622            Error::InternalServerError(inner) => inner.source(),
623            Error::LimitExceededException(inner) => inner.source(),
624            Error::PolicyNotFoundException(inner) => inner.source(),
625            Error::Unhandled(inner) => ::std::option::Option::Some(&*inner.source),
626        }
627    }
628}
629impl ::aws_types::request_id::RequestId for Error {
630    fn request_id(&self) -> Option<&str> {
631        match self {
632            Self::ContainerInUseException(e) => e.request_id(),
633            Self::ContainerNotFoundException(e) => e.request_id(),
634            Self::CorsPolicyNotFoundException(e) => e.request_id(),
635            Self::InternalServerError(e) => e.request_id(),
636            Self::LimitExceededException(e) => e.request_id(),
637            Self::PolicyNotFoundException(e) => e.request_id(),
638            Self::Unhandled(e) => e.meta.request_id(),
639        }
640    }
641}