Skip to main content

aws_sdk_evs/
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>An internal server error occurred. Retry your request.</p>
7    InternalServerException(crate::types::error::InternalServerException),
8    /// <p>A service resource associated with the request could not be found. The resource might not be specified correctly, or it may have a <code>state</code> of <code>DELETED</code>.</p>
9    ResourceNotFoundException(crate::types::error::ResourceNotFoundException),
10    /// <p>The number of one or more Amazon EVS resources exceeds the maximum allowed. For a list of Amazon EVS quotas, see <a href="https://docs.aws.amazon.com/evs/latest/userguide/service-quotas-evs.html">Amazon EVS endpoints and quotas</a> in the <i>Amazon EVS User Guide</i>. Delete some resources or request an increase in your service quota. To request an increase, see <a href="https://docs.aws.amazon.com/general/latest/gr/aws_service_limits.html">Amazon Web Services Service Quotas</a> in the <i>Amazon Web Services General Reference Guide</i>.</p>
11    ServiceQuotaExceededException(crate::types::error::ServiceQuotaExceededException),
12    /// <note>
13    /// <p><code>TagPolicyException</code> is deprecated. See <a href="https://docs.aws.amazon.com/evs/latest/APIReference/API_ValidationException.html"> <code>ValidationException</code> </a> instead.</p>
14    /// </note>
15    /// <p>The request doesn't comply with IAM tag policy. Correct your request and then retry it.</p>
16    TagPolicyException(crate::types::error::TagPolicyException),
17    /// <p>The operation could not be performed because the service is throttling requests. This exception is thrown when the service endpoint receives too many concurrent requests.</p>
18    ThrottlingException(crate::types::error::ThrottlingException),
19    /// <note>
20    /// <p><code>TooManyTagsException</code> is deprecated. See <a href="https://docs.aws.amazon.com/evs/latest/APIReference/API_ServiceQuotaExceededException.html"> <code>ServiceQuotaExceededException</code> </a> instead.</p>
21    /// </note>
22    /// <p>A service resource associated with the request has more than 200 tags.</p>
23    TooManyTagsException(crate::types::error::TooManyTagsException),
24    /// <p>The input fails to satisfy the specified constraints. You will see this exception if invalid inputs are provided for any of the Amazon EVS environment operations, or if a list operation is performed on an environment resource that is still initializing.</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::InternalServerException(inner) => inner.fmt(f),
39            Error::ResourceNotFoundException(inner) => inner.fmt(f),
40            Error::ServiceQuotaExceededException(inner) => inner.fmt(f),
41            Error::TagPolicyException(inner) => inner.fmt(f),
42            Error::ThrottlingException(inner) => inner.fmt(f),
43            Error::TooManyTagsException(inner) => inner.fmt(f),
44            Error::ValidationException(inner) => inner.fmt(f),
45            Error::Unhandled(_) => {
46                if let ::std::option::Option::Some(code) = ::aws_smithy_types::error::metadata::ProvideErrorMetadata::code(self) {
47                    write!(f, "unhandled error ({code})")
48                } else {
49                    f.write_str("unhandled error")
50                }
51            }
52        }
53    }
54}
55impl From<::aws_smithy_types::error::operation::BuildError> for Error {
56    fn from(value: ::aws_smithy_types::error::operation::BuildError) -> Self {
57        Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
58            source: value.into(),
59            meta: ::std::default::Default::default(),
60        })
61    }
62}
63impl ::aws_smithy_types::error::metadata::ProvideErrorMetadata for Error {
64    fn meta(&self) -> &::aws_smithy_types::error::metadata::ErrorMetadata {
65        match self {
66            Self::InternalServerException(inner) => inner.meta(),
67            Self::ResourceNotFoundException(inner) => inner.meta(),
68            Self::ServiceQuotaExceededException(inner) => inner.meta(),
69            Self::TagPolicyException(inner) => inner.meta(),
70            Self::ThrottlingException(inner) => inner.meta(),
71            Self::TooManyTagsException(inner) => inner.meta(),
72            Self::ValidationException(inner) => inner.meta(),
73            Self::Unhandled(inner) => &inner.meta,
74        }
75    }
76}
77impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::associate_eip_to_vlan::AssociateEipToVlanError, R>> for Error
78where
79    R: Send + Sync + std::fmt::Debug + 'static,
80{
81    fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::associate_eip_to_vlan::AssociateEipToVlanError, R>) -> Self {
82        match err {
83            ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
84            _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
85                meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
86                source: err.into(),
87            }),
88        }
89    }
90}
91impl From<crate::operation::associate_eip_to_vlan::AssociateEipToVlanError> for Error {
92    fn from(err: crate::operation::associate_eip_to_vlan::AssociateEipToVlanError) -> Self {
93        match err {
94            crate::operation::associate_eip_to_vlan::AssociateEipToVlanError::ResourceNotFoundException(inner) => {
95                Error::ResourceNotFoundException(inner)
96            }
97            crate::operation::associate_eip_to_vlan::AssociateEipToVlanError::ThrottlingException(inner) => Error::ThrottlingException(inner),
98            crate::operation::associate_eip_to_vlan::AssociateEipToVlanError::ValidationException(inner) => Error::ValidationException(inner),
99            crate::operation::associate_eip_to_vlan::AssociateEipToVlanError::Unhandled(inner) => Error::Unhandled(inner),
100        }
101    }
102}
103impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::create_entitlement::CreateEntitlementError, R>> for Error
104where
105    R: Send + Sync + std::fmt::Debug + 'static,
106{
107    fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::create_entitlement::CreateEntitlementError, R>) -> Self {
108        match err {
109            ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
110            _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
111                meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
112                source: err.into(),
113            }),
114        }
115    }
116}
117impl From<crate::operation::create_entitlement::CreateEntitlementError> for Error {
118    fn from(err: crate::operation::create_entitlement::CreateEntitlementError) -> Self {
119        match err {
120            crate::operation::create_entitlement::CreateEntitlementError::ResourceNotFoundException(inner) => Error::ResourceNotFoundException(inner),
121            crate::operation::create_entitlement::CreateEntitlementError::ThrottlingException(inner) => Error::ThrottlingException(inner),
122            crate::operation::create_entitlement::CreateEntitlementError::ValidationException(inner) => Error::ValidationException(inner),
123            crate::operation::create_entitlement::CreateEntitlementError::Unhandled(inner) => Error::Unhandled(inner),
124        }
125    }
126}
127impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::create_environment::CreateEnvironmentError, R>> for Error
128where
129    R: Send + Sync + std::fmt::Debug + 'static,
130{
131    fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::create_environment::CreateEnvironmentError, R>) -> Self {
132        match err {
133            ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
134            _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
135                meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
136                source: err.into(),
137            }),
138        }
139    }
140}
141impl From<crate::operation::create_environment::CreateEnvironmentError> for Error {
142    fn from(err: crate::operation::create_environment::CreateEnvironmentError) -> Self {
143        match err {
144            crate::operation::create_environment::CreateEnvironmentError::ValidationException(inner) => Error::ValidationException(inner),
145            crate::operation::create_environment::CreateEnvironmentError::Unhandled(inner) => Error::Unhandled(inner),
146        }
147    }
148}
149impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::create_environment_connector::CreateEnvironmentConnectorError, R>>
150    for Error
151where
152    R: Send + Sync + std::fmt::Debug + 'static,
153{
154    fn from(
155        err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::create_environment_connector::CreateEnvironmentConnectorError, R>,
156    ) -> Self {
157        match err {
158            ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
159            _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
160                meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
161                source: err.into(),
162            }),
163        }
164    }
165}
166impl From<crate::operation::create_environment_connector::CreateEnvironmentConnectorError> for Error {
167    fn from(err: crate::operation::create_environment_connector::CreateEnvironmentConnectorError) -> Self {
168        match err {
169            crate::operation::create_environment_connector::CreateEnvironmentConnectorError::ResourceNotFoundException(inner) => {
170                Error::ResourceNotFoundException(inner)
171            }
172            crate::operation::create_environment_connector::CreateEnvironmentConnectorError::ThrottlingException(inner) => {
173                Error::ThrottlingException(inner)
174            }
175            crate::operation::create_environment_connector::CreateEnvironmentConnectorError::ValidationException(inner) => {
176                Error::ValidationException(inner)
177            }
178            crate::operation::create_environment_connector::CreateEnvironmentConnectorError::Unhandled(inner) => Error::Unhandled(inner),
179        }
180    }
181}
182impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::create_environment_host::CreateEnvironmentHostError, R>> for Error
183where
184    R: Send + Sync + std::fmt::Debug + 'static,
185{
186    fn from(
187        err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::create_environment_host::CreateEnvironmentHostError, R>,
188    ) -> Self {
189        match err {
190            ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
191            _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
192                meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
193                source: err.into(),
194            }),
195        }
196    }
197}
198impl From<crate::operation::create_environment_host::CreateEnvironmentHostError> for Error {
199    fn from(err: crate::operation::create_environment_host::CreateEnvironmentHostError) -> Self {
200        match err {
201            crate::operation::create_environment_host::CreateEnvironmentHostError::ThrottlingException(inner) => Error::ThrottlingException(inner),
202            crate::operation::create_environment_host::CreateEnvironmentHostError::ValidationException(inner) => Error::ValidationException(inner),
203            crate::operation::create_environment_host::CreateEnvironmentHostError::Unhandled(inner) => Error::Unhandled(inner),
204        }
205    }
206}
207impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::delete_entitlement::DeleteEntitlementError, R>> for Error
208where
209    R: Send + Sync + std::fmt::Debug + 'static,
210{
211    fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::delete_entitlement::DeleteEntitlementError, R>) -> Self {
212        match err {
213            ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
214            _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
215                meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
216                source: err.into(),
217            }),
218        }
219    }
220}
221impl From<crate::operation::delete_entitlement::DeleteEntitlementError> for Error {
222    fn from(err: crate::operation::delete_entitlement::DeleteEntitlementError) -> Self {
223        match err {
224            crate::operation::delete_entitlement::DeleteEntitlementError::ResourceNotFoundException(inner) => Error::ResourceNotFoundException(inner),
225            crate::operation::delete_entitlement::DeleteEntitlementError::ThrottlingException(inner) => Error::ThrottlingException(inner),
226            crate::operation::delete_entitlement::DeleteEntitlementError::ValidationException(inner) => Error::ValidationException(inner),
227            crate::operation::delete_entitlement::DeleteEntitlementError::Unhandled(inner) => Error::Unhandled(inner),
228        }
229    }
230}
231impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::delete_environment::DeleteEnvironmentError, R>> for Error
232where
233    R: Send + Sync + std::fmt::Debug + 'static,
234{
235    fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::delete_environment::DeleteEnvironmentError, R>) -> Self {
236        match err {
237            ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
238            _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
239                meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
240                source: err.into(),
241            }),
242        }
243    }
244}
245impl From<crate::operation::delete_environment::DeleteEnvironmentError> for Error {
246    fn from(err: crate::operation::delete_environment::DeleteEnvironmentError) -> Self {
247        match err {
248            crate::operation::delete_environment::DeleteEnvironmentError::ResourceNotFoundException(inner) => Error::ResourceNotFoundException(inner),
249            crate::operation::delete_environment::DeleteEnvironmentError::ValidationException(inner) => Error::ValidationException(inner),
250            crate::operation::delete_environment::DeleteEnvironmentError::Unhandled(inner) => Error::Unhandled(inner),
251        }
252    }
253}
254impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::delete_environment_connector::DeleteEnvironmentConnectorError, R>>
255    for Error
256where
257    R: Send + Sync + std::fmt::Debug + 'static,
258{
259    fn from(
260        err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::delete_environment_connector::DeleteEnvironmentConnectorError, R>,
261    ) -> Self {
262        match err {
263            ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
264            _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
265                meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
266                source: err.into(),
267            }),
268        }
269    }
270}
271impl From<crate::operation::delete_environment_connector::DeleteEnvironmentConnectorError> for Error {
272    fn from(err: crate::operation::delete_environment_connector::DeleteEnvironmentConnectorError) -> Self {
273        match err {
274            crate::operation::delete_environment_connector::DeleteEnvironmentConnectorError::ResourceNotFoundException(inner) => {
275                Error::ResourceNotFoundException(inner)
276            }
277            crate::operation::delete_environment_connector::DeleteEnvironmentConnectorError::ThrottlingException(inner) => {
278                Error::ThrottlingException(inner)
279            }
280            crate::operation::delete_environment_connector::DeleteEnvironmentConnectorError::ValidationException(inner) => {
281                Error::ValidationException(inner)
282            }
283            crate::operation::delete_environment_connector::DeleteEnvironmentConnectorError::Unhandled(inner) => Error::Unhandled(inner),
284        }
285    }
286}
287impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::delete_environment_host::DeleteEnvironmentHostError, R>> for Error
288where
289    R: Send + Sync + std::fmt::Debug + 'static,
290{
291    fn from(
292        err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::delete_environment_host::DeleteEnvironmentHostError, R>,
293    ) -> 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::delete_environment_host::DeleteEnvironmentHostError> for Error {
304    fn from(err: crate::operation::delete_environment_host::DeleteEnvironmentHostError) -> Self {
305        match err {
306            crate::operation::delete_environment_host::DeleteEnvironmentHostError::ResourceNotFoundException(inner) => {
307                Error::ResourceNotFoundException(inner)
308            }
309            crate::operation::delete_environment_host::DeleteEnvironmentHostError::ValidationException(inner) => Error::ValidationException(inner),
310            crate::operation::delete_environment_host::DeleteEnvironmentHostError::Unhandled(inner) => Error::Unhandled(inner),
311        }
312    }
313}
314impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::disassociate_eip_from_vlan::DisassociateEipFromVlanError, R>>
315    for Error
316where
317    R: Send + Sync + std::fmt::Debug + 'static,
318{
319    fn from(
320        err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::disassociate_eip_from_vlan::DisassociateEipFromVlanError, R>,
321    ) -> Self {
322        match err {
323            ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
324            _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
325                meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
326                source: err.into(),
327            }),
328        }
329    }
330}
331impl From<crate::operation::disassociate_eip_from_vlan::DisassociateEipFromVlanError> for Error {
332    fn from(err: crate::operation::disassociate_eip_from_vlan::DisassociateEipFromVlanError) -> Self {
333        match err {
334            crate::operation::disassociate_eip_from_vlan::DisassociateEipFromVlanError::ResourceNotFoundException(inner) => {
335                Error::ResourceNotFoundException(inner)
336            }
337            crate::operation::disassociate_eip_from_vlan::DisassociateEipFromVlanError::ThrottlingException(inner) => {
338                Error::ThrottlingException(inner)
339            }
340            crate::operation::disassociate_eip_from_vlan::DisassociateEipFromVlanError::ValidationException(inner) => {
341                Error::ValidationException(inner)
342            }
343            crate::operation::disassociate_eip_from_vlan::DisassociateEipFromVlanError::Unhandled(inner) => Error::Unhandled(inner),
344        }
345    }
346}
347impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::get_environment::GetEnvironmentError, R>> for Error
348where
349    R: Send + Sync + std::fmt::Debug + 'static,
350{
351    fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::get_environment::GetEnvironmentError, R>) -> Self {
352        match err {
353            ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
354            _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
355                meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
356                source: err.into(),
357            }),
358        }
359    }
360}
361impl From<crate::operation::get_environment::GetEnvironmentError> for Error {
362    fn from(err: crate::operation::get_environment::GetEnvironmentError) -> Self {
363        match err {
364            crate::operation::get_environment::GetEnvironmentError::ResourceNotFoundException(inner) => Error::ResourceNotFoundException(inner),
365            crate::operation::get_environment::GetEnvironmentError::ValidationException(inner) => Error::ValidationException(inner),
366            crate::operation::get_environment::GetEnvironmentError::Unhandled(inner) => Error::Unhandled(inner),
367        }
368    }
369}
370impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::get_versions::GetVersionsError, R>> for Error
371where
372    R: Send + Sync + std::fmt::Debug + 'static,
373{
374    fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::get_versions::GetVersionsError, R>) -> Self {
375        match err {
376            ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
377            _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
378                meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
379                source: err.into(),
380            }),
381        }
382    }
383}
384impl From<crate::operation::get_versions::GetVersionsError> for Error {
385    fn from(err: crate::operation::get_versions::GetVersionsError) -> Self {
386        match err {
387            crate::operation::get_versions::GetVersionsError::InternalServerException(inner) => Error::InternalServerException(inner),
388            crate::operation::get_versions::GetVersionsError::ThrottlingException(inner) => Error::ThrottlingException(inner),
389            crate::operation::get_versions::GetVersionsError::Unhandled(inner) => Error::Unhandled(inner),
390        }
391    }
392}
393impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::list_environment_connectors::ListEnvironmentConnectorsError, R>>
394    for Error
395where
396    R: Send + Sync + std::fmt::Debug + 'static,
397{
398    fn from(
399        err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::list_environment_connectors::ListEnvironmentConnectorsError, R>,
400    ) -> Self {
401        match err {
402            ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
403            _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
404                meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
405                source: err.into(),
406            }),
407        }
408    }
409}
410impl From<crate::operation::list_environment_connectors::ListEnvironmentConnectorsError> for Error {
411    fn from(err: crate::operation::list_environment_connectors::ListEnvironmentConnectorsError) -> Self {
412        match err {
413            crate::operation::list_environment_connectors::ListEnvironmentConnectorsError::ResourceNotFoundException(inner) => {
414                Error::ResourceNotFoundException(inner)
415            }
416            crate::operation::list_environment_connectors::ListEnvironmentConnectorsError::ValidationException(inner) => {
417                Error::ValidationException(inner)
418            }
419            crate::operation::list_environment_connectors::ListEnvironmentConnectorsError::Unhandled(inner) => Error::Unhandled(inner),
420        }
421    }
422}
423impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::list_environment_hosts::ListEnvironmentHostsError, R>> for Error
424where
425    R: Send + Sync + std::fmt::Debug + 'static,
426{
427    fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::list_environment_hosts::ListEnvironmentHostsError, R>) -> Self {
428        match err {
429            ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
430            _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
431                meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
432                source: err.into(),
433            }),
434        }
435    }
436}
437impl From<crate::operation::list_environment_hosts::ListEnvironmentHostsError> for Error {
438    fn from(err: crate::operation::list_environment_hosts::ListEnvironmentHostsError) -> Self {
439        match err {
440            crate::operation::list_environment_hosts::ListEnvironmentHostsError::ResourceNotFoundException(inner) => {
441                Error::ResourceNotFoundException(inner)
442            }
443            crate::operation::list_environment_hosts::ListEnvironmentHostsError::ValidationException(inner) => Error::ValidationException(inner),
444            crate::operation::list_environment_hosts::ListEnvironmentHostsError::Unhandled(inner) => Error::Unhandled(inner),
445        }
446    }
447}
448impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::list_environments::ListEnvironmentsError, R>> for Error
449where
450    R: Send + Sync + std::fmt::Debug + 'static,
451{
452    fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::list_environments::ListEnvironmentsError, R>) -> Self {
453        match err {
454            ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
455            _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
456                meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
457                source: err.into(),
458            }),
459        }
460    }
461}
462impl From<crate::operation::list_environments::ListEnvironmentsError> for Error {
463    fn from(err: crate::operation::list_environments::ListEnvironmentsError) -> Self {
464        match err {
465            crate::operation::list_environments::ListEnvironmentsError::ValidationException(inner) => Error::ValidationException(inner),
466            crate::operation::list_environments::ListEnvironmentsError::Unhandled(inner) => Error::Unhandled(inner),
467        }
468    }
469}
470impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::list_environment_vlans::ListEnvironmentVlansError, R>> for Error
471where
472    R: Send + Sync + std::fmt::Debug + 'static,
473{
474    fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::list_environment_vlans::ListEnvironmentVlansError, R>) -> Self {
475        match err {
476            ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
477            _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
478                meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
479                source: err.into(),
480            }),
481        }
482    }
483}
484impl From<crate::operation::list_environment_vlans::ListEnvironmentVlansError> for Error {
485    fn from(err: crate::operation::list_environment_vlans::ListEnvironmentVlansError) -> Self {
486        match err {
487            crate::operation::list_environment_vlans::ListEnvironmentVlansError::ResourceNotFoundException(inner) => {
488                Error::ResourceNotFoundException(inner)
489            }
490            crate::operation::list_environment_vlans::ListEnvironmentVlansError::ValidationException(inner) => Error::ValidationException(inner),
491            crate::operation::list_environment_vlans::ListEnvironmentVlansError::Unhandled(inner) => Error::Unhandled(inner),
492        }
493    }
494}
495impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::list_tags_for_resource::ListTagsForResourceError, R>> for Error
496where
497    R: Send + Sync + std::fmt::Debug + 'static,
498{
499    fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::list_tags_for_resource::ListTagsForResourceError, R>) -> Self {
500        match err {
501            ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
502            _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
503                meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
504                source: err.into(),
505            }),
506        }
507    }
508}
509impl From<crate::operation::list_tags_for_resource::ListTagsForResourceError> for Error {
510    fn from(err: crate::operation::list_tags_for_resource::ListTagsForResourceError) -> Self {
511        match err {
512            crate::operation::list_tags_for_resource::ListTagsForResourceError::ResourceNotFoundException(inner) => {
513                Error::ResourceNotFoundException(inner)
514            }
515            crate::operation::list_tags_for_resource::ListTagsForResourceError::Unhandled(inner) => Error::Unhandled(inner),
516        }
517    }
518}
519impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::list_vm_entitlements::ListVmEntitlementsError, R>> for Error
520where
521    R: Send + Sync + std::fmt::Debug + 'static,
522{
523    fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::list_vm_entitlements::ListVmEntitlementsError, R>) -> Self {
524        match err {
525            ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
526            _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
527                meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
528                source: err.into(),
529            }),
530        }
531    }
532}
533impl From<crate::operation::list_vm_entitlements::ListVmEntitlementsError> for Error {
534    fn from(err: crate::operation::list_vm_entitlements::ListVmEntitlementsError) -> Self {
535        match err {
536            crate::operation::list_vm_entitlements::ListVmEntitlementsError::ResourceNotFoundException(inner) => {
537                Error::ResourceNotFoundException(inner)
538            }
539            crate::operation::list_vm_entitlements::ListVmEntitlementsError::ValidationException(inner) => Error::ValidationException(inner),
540            crate::operation::list_vm_entitlements::ListVmEntitlementsError::Unhandled(inner) => Error::Unhandled(inner),
541        }
542    }
543}
544impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::tag_resource::TagResourceError, R>> for Error
545where
546    R: Send + Sync + std::fmt::Debug + 'static,
547{
548    fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::tag_resource::TagResourceError, R>) -> Self {
549        match err {
550            ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
551            _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
552                meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
553                source: err.into(),
554            }),
555        }
556    }
557}
558impl From<crate::operation::tag_resource::TagResourceError> for Error {
559    fn from(err: crate::operation::tag_resource::TagResourceError) -> Self {
560        match err {
561            crate::operation::tag_resource::TagResourceError::ResourceNotFoundException(inner) => Error::ResourceNotFoundException(inner),
562            crate::operation::tag_resource::TagResourceError::ServiceQuotaExceededException(inner) => Error::ServiceQuotaExceededException(inner),
563            crate::operation::tag_resource::TagResourceError::TagPolicyException(inner) => Error::TagPolicyException(inner),
564            crate::operation::tag_resource::TagResourceError::TooManyTagsException(inner) => Error::TooManyTagsException(inner),
565            crate::operation::tag_resource::TagResourceError::Unhandled(inner) => Error::Unhandled(inner),
566        }
567    }
568}
569impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::untag_resource::UntagResourceError, R>> for Error
570where
571    R: Send + Sync + std::fmt::Debug + 'static,
572{
573    fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::untag_resource::UntagResourceError, R>) -> Self {
574        match err {
575            ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
576            _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
577                meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
578                source: err.into(),
579            }),
580        }
581    }
582}
583impl From<crate::operation::untag_resource::UntagResourceError> for Error {
584    fn from(err: crate::operation::untag_resource::UntagResourceError) -> Self {
585        match err {
586            crate::operation::untag_resource::UntagResourceError::ResourceNotFoundException(inner) => Error::ResourceNotFoundException(inner),
587            crate::operation::untag_resource::UntagResourceError::TagPolicyException(inner) => Error::TagPolicyException(inner),
588            crate::operation::untag_resource::UntagResourceError::Unhandled(inner) => Error::Unhandled(inner),
589        }
590    }
591}
592impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::update_environment_connector::UpdateEnvironmentConnectorError, R>>
593    for Error
594where
595    R: Send + Sync + std::fmt::Debug + 'static,
596{
597    fn from(
598        err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::update_environment_connector::UpdateEnvironmentConnectorError, R>,
599    ) -> Self {
600        match err {
601            ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
602            _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
603                meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
604                source: err.into(),
605            }),
606        }
607    }
608}
609impl From<crate::operation::update_environment_connector::UpdateEnvironmentConnectorError> for Error {
610    fn from(err: crate::operation::update_environment_connector::UpdateEnvironmentConnectorError) -> Self {
611        match err {
612            crate::operation::update_environment_connector::UpdateEnvironmentConnectorError::ResourceNotFoundException(inner) => {
613                Error::ResourceNotFoundException(inner)
614            }
615            crate::operation::update_environment_connector::UpdateEnvironmentConnectorError::ThrottlingException(inner) => {
616                Error::ThrottlingException(inner)
617            }
618            crate::operation::update_environment_connector::UpdateEnvironmentConnectorError::ValidationException(inner) => {
619                Error::ValidationException(inner)
620            }
621            crate::operation::update_environment_connector::UpdateEnvironmentConnectorError::Unhandled(inner) => Error::Unhandled(inner),
622        }
623    }
624}
625impl ::std::error::Error for Error {
626    fn source(&self) -> std::option::Option<&(dyn ::std::error::Error + 'static)> {
627        match self {
628            Error::InternalServerException(inner) => inner.source(),
629            Error::ResourceNotFoundException(inner) => inner.source(),
630            Error::ServiceQuotaExceededException(inner) => inner.source(),
631            Error::TagPolicyException(inner) => inner.source(),
632            Error::ThrottlingException(inner) => inner.source(),
633            Error::TooManyTagsException(inner) => inner.source(),
634            Error::ValidationException(inner) => inner.source(),
635            Error::Unhandled(inner) => ::std::option::Option::Some(&*inner.source),
636        }
637    }
638}
639impl ::aws_types::request_id::RequestId for Error {
640    fn request_id(&self) -> Option<&str> {
641        match self {
642            Self::InternalServerException(e) => e.request_id(),
643            Self::ResourceNotFoundException(e) => e.request_id(),
644            Self::ServiceQuotaExceededException(e) => e.request_id(),
645            Self::TagPolicyException(e) => e.request_id(),
646            Self::ThrottlingException(e) => e.request_id(),
647            Self::TooManyTagsException(e) => e.request_id(),
648            Self::ValidationException(e) => e.request_id(),
649            Self::Unhandled(e) => e.meta.request_id(),
650        }
651    }
652}