1#[non_exhaustive]
4#[derive(::std::fmt::Debug)]
5pub enum Error {
6 AccessDeniedException(crate::types::error::AccessDeniedException),
8 ConflictException(crate::types::error::ConflictException),
10 InternalServerException(crate::types::error::InternalServerException),
12 RequestAlreadyInProgressException(crate::types::error::RequestAlreadyInProgressException),
14 ResourceNotFoundException(crate::types::error::ResourceNotFoundException),
16 ServiceQuotaExceededException(crate::types::error::ServiceQuotaExceededException),
18 ThrottlingException(crate::types::error::ThrottlingException),
20 ValidationException(crate::types::error::ValidationException),
22 #[deprecated(note = "Matching `Unhandled` directly is not forwards compatible. Instead, match using a \
24 variable wildcard pattern and check `.code()`:
25 \
26 `err if err.code() == Some(\"SpecificExceptionCode\") => { /* handle the error */ }`
27 \
28 See [`ProvideErrorMetadata`](#impl-ProvideErrorMetadata-for-Error) for what information is available for the error.")]
29 Unhandled(crate::error::sealed_unhandled::Unhandled),
30}
31impl ::std::fmt::Display for Error {
32 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
33 match self {
34 Error::AccessDeniedException(inner) => inner.fmt(f),
35 Error::ConflictException(inner) => inner.fmt(f),
36 Error::InternalServerException(inner) => inner.fmt(f),
37 Error::RequestAlreadyInProgressException(inner) => inner.fmt(f),
38 Error::ResourceNotFoundException(inner) => inner.fmt(f),
39 Error::ServiceQuotaExceededException(inner) => inner.fmt(f),
40 Error::ThrottlingException(inner) => inner.fmt(f),
41 Error::ValidationException(inner) => inner.fmt(f),
42 Error::Unhandled(_) => {
43 if let ::std::option::Option::Some(code) = ::aws_smithy_types::error::metadata::ProvideErrorMetadata::code(self) {
44 write!(f, "unhandled error ({code})")
45 } else {
46 f.write_str("unhandled error")
47 }
48 }
49 }
50 }
51}
52impl From<::aws_smithy_types::error::operation::BuildError> for Error {
53 fn from(value: ::aws_smithy_types::error::operation::BuildError) -> Self {
54 Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
55 source: value.into(),
56 meta: ::std::default::Default::default(),
57 })
58 }
59}
60impl ::aws_smithy_types::error::metadata::ProvideErrorMetadata for Error {
61 fn meta(&self) -> &::aws_smithy_types::error::metadata::ErrorMetadata {
62 match self {
63 Self::AccessDeniedException(inner) => inner.meta(),
64 Self::ConflictException(inner) => inner.meta(),
65 Self::InternalServerException(inner) => inner.meta(),
66 Self::RequestAlreadyInProgressException(inner) => inner.meta(),
67 Self::ResourceNotFoundException(inner) => inner.meta(),
68 Self::ServiceQuotaExceededException(inner) => inner.meta(),
69 Self::ThrottlingException(inner) => inner.meta(),
70 Self::ValidationException(inner) => inner.meta(),
71 Self::Unhandled(inner) => &inner.meta,
72 }
73 }
74}
75impl<R>
76 From<
77 ::aws_smithy_runtime_api::client::result::SdkError<
78 crate::operation::associate_service_role_to_account::AssociateServiceRoleToAccountError,
79 R,
80 >,
81 > for Error
82where
83 R: Send + Sync + std::fmt::Debug + 'static,
84{
85 fn from(
86 err: ::aws_smithy_runtime_api::client::result::SdkError<
87 crate::operation::associate_service_role_to_account::AssociateServiceRoleToAccountError,
88 R,
89 >,
90 ) -> Self {
91 match err {
92 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
93 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
94 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
95 source: err.into(),
96 }),
97 }
98 }
99}
100impl From<crate::operation::associate_service_role_to_account::AssociateServiceRoleToAccountError> for Error {
101 fn from(err: crate::operation::associate_service_role_to_account::AssociateServiceRoleToAccountError) -> Self {
102 match err {
103 crate::operation::associate_service_role_to_account::AssociateServiceRoleToAccountError::InternalServerException(inner) => {
104 Error::InternalServerException(inner)
105 }
106 crate::operation::associate_service_role_to_account::AssociateServiceRoleToAccountError::ValidationException(inner) => {
107 Error::ValidationException(inner)
108 }
109 crate::operation::associate_service_role_to_account::AssociateServiceRoleToAccountError::Unhandled(inner) => Error::Unhandled(inner),
110 }
111 }
112}
113impl<R>
114 From<
115 ::aws_smithy_runtime_api::client::result::SdkError<
116 crate::operation::batch_associate_client_device_with_core_device::BatchAssociateClientDeviceWithCoreDeviceError,
117 R,
118 >,
119 > for Error
120where
121 R: Send + Sync + std::fmt::Debug + 'static,
122{
123 fn from(
124 err: ::aws_smithy_runtime_api::client::result::SdkError<
125 crate::operation::batch_associate_client_device_with_core_device::BatchAssociateClientDeviceWithCoreDeviceError,
126 R,
127 >,
128 ) -> Self {
129 match err {
130 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
131 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
132 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
133 source: err.into(),
134 }),
135 }
136 }
137}
138impl From<crate::operation::batch_associate_client_device_with_core_device::BatchAssociateClientDeviceWithCoreDeviceError> for Error {
139 fn from(err: crate::operation::batch_associate_client_device_with_core_device::BatchAssociateClientDeviceWithCoreDeviceError) -> Self {
140 match err {
141 crate::operation::batch_associate_client_device_with_core_device::BatchAssociateClientDeviceWithCoreDeviceError::AccessDeniedException(inner) => Error::AccessDeniedException(inner),
142 crate::operation::batch_associate_client_device_with_core_device::BatchAssociateClientDeviceWithCoreDeviceError::InternalServerException(inner) => Error::InternalServerException(inner),
143 crate::operation::batch_associate_client_device_with_core_device::BatchAssociateClientDeviceWithCoreDeviceError::ResourceNotFoundException(inner) => Error::ResourceNotFoundException(inner),
144 crate::operation::batch_associate_client_device_with_core_device::BatchAssociateClientDeviceWithCoreDeviceError::ThrottlingException(inner) => Error::ThrottlingException(inner),
145 crate::operation::batch_associate_client_device_with_core_device::BatchAssociateClientDeviceWithCoreDeviceError::ValidationException(inner) => Error::ValidationException(inner),
146 crate::operation::batch_associate_client_device_with_core_device::BatchAssociateClientDeviceWithCoreDeviceError::Unhandled(inner) => Error::Unhandled(inner),
147 }
148 }
149}
150impl<R>
151 From<
152 ::aws_smithy_runtime_api::client::result::SdkError<
153 crate::operation::batch_disassociate_client_device_from_core_device::BatchDisassociateClientDeviceFromCoreDeviceError,
154 R,
155 >,
156 > for Error
157where
158 R: Send + Sync + std::fmt::Debug + 'static,
159{
160 fn from(
161 err: ::aws_smithy_runtime_api::client::result::SdkError<
162 crate::operation::batch_disassociate_client_device_from_core_device::BatchDisassociateClientDeviceFromCoreDeviceError,
163 R,
164 >,
165 ) -> Self {
166 match err {
167 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
168 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
169 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
170 source: err.into(),
171 }),
172 }
173 }
174}
175impl From<crate::operation::batch_disassociate_client_device_from_core_device::BatchDisassociateClientDeviceFromCoreDeviceError> for Error {
176 fn from(err: crate::operation::batch_disassociate_client_device_from_core_device::BatchDisassociateClientDeviceFromCoreDeviceError) -> Self {
177 match err {
178 crate::operation::batch_disassociate_client_device_from_core_device::BatchDisassociateClientDeviceFromCoreDeviceError::AccessDeniedException(inner) => Error::AccessDeniedException(inner),
179 crate::operation::batch_disassociate_client_device_from_core_device::BatchDisassociateClientDeviceFromCoreDeviceError::InternalServerException(inner) => Error::InternalServerException(inner),
180 crate::operation::batch_disassociate_client_device_from_core_device::BatchDisassociateClientDeviceFromCoreDeviceError::ResourceNotFoundException(inner) => Error::ResourceNotFoundException(inner),
181 crate::operation::batch_disassociate_client_device_from_core_device::BatchDisassociateClientDeviceFromCoreDeviceError::ThrottlingException(inner) => Error::ThrottlingException(inner),
182 crate::operation::batch_disassociate_client_device_from_core_device::BatchDisassociateClientDeviceFromCoreDeviceError::ValidationException(inner) => Error::ValidationException(inner),
183 crate::operation::batch_disassociate_client_device_from_core_device::BatchDisassociateClientDeviceFromCoreDeviceError::Unhandled(inner) => Error::Unhandled(inner),
184 }
185 }
186}
187impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::cancel_deployment::CancelDeploymentError, R>> for Error
188where
189 R: Send + Sync + std::fmt::Debug + 'static,
190{
191 fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::cancel_deployment::CancelDeploymentError, R>) -> Self {
192 match err {
193 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
194 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
195 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
196 source: err.into(),
197 }),
198 }
199 }
200}
201impl From<crate::operation::cancel_deployment::CancelDeploymentError> for Error {
202 fn from(err: crate::operation::cancel_deployment::CancelDeploymentError) -> Self {
203 match err {
204 crate::operation::cancel_deployment::CancelDeploymentError::AccessDeniedException(inner) => Error::AccessDeniedException(inner),
205 crate::operation::cancel_deployment::CancelDeploymentError::ConflictException(inner) => Error::ConflictException(inner),
206 crate::operation::cancel_deployment::CancelDeploymentError::InternalServerException(inner) => Error::InternalServerException(inner),
207 crate::operation::cancel_deployment::CancelDeploymentError::ResourceNotFoundException(inner) => Error::ResourceNotFoundException(inner),
208 crate::operation::cancel_deployment::CancelDeploymentError::ThrottlingException(inner) => Error::ThrottlingException(inner),
209 crate::operation::cancel_deployment::CancelDeploymentError::ValidationException(inner) => Error::ValidationException(inner),
210 crate::operation::cancel_deployment::CancelDeploymentError::Unhandled(inner) => Error::Unhandled(inner),
211 }
212 }
213}
214impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::create_component_version::CreateComponentVersionError, R>> for Error
215where
216 R: Send + Sync + std::fmt::Debug + 'static,
217{
218 fn from(
219 err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::create_component_version::CreateComponentVersionError, R>,
220 ) -> 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::create_component_version::CreateComponentVersionError> for Error {
231 fn from(err: crate::operation::create_component_version::CreateComponentVersionError) -> Self {
232 match err {
233 crate::operation::create_component_version::CreateComponentVersionError::AccessDeniedException(inner) => {
234 Error::AccessDeniedException(inner)
235 }
236 crate::operation::create_component_version::CreateComponentVersionError::ConflictException(inner) => Error::ConflictException(inner),
237 crate::operation::create_component_version::CreateComponentVersionError::InternalServerException(inner) => {
238 Error::InternalServerException(inner)
239 }
240 crate::operation::create_component_version::CreateComponentVersionError::RequestAlreadyInProgressException(inner) => {
241 Error::RequestAlreadyInProgressException(inner)
242 }
243 crate::operation::create_component_version::CreateComponentVersionError::ServiceQuotaExceededException(inner) => {
244 Error::ServiceQuotaExceededException(inner)
245 }
246 crate::operation::create_component_version::CreateComponentVersionError::ThrottlingException(inner) => Error::ThrottlingException(inner),
247 crate::operation::create_component_version::CreateComponentVersionError::ValidationException(inner) => Error::ValidationException(inner),
248 crate::operation::create_component_version::CreateComponentVersionError::Unhandled(inner) => Error::Unhandled(inner),
249 }
250 }
251}
252impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::create_deployment::CreateDeploymentError, R>> for Error
253where
254 R: Send + Sync + std::fmt::Debug + 'static,
255{
256 fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::create_deployment::CreateDeploymentError, R>) -> Self {
257 match err {
258 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
259 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
260 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
261 source: err.into(),
262 }),
263 }
264 }
265}
266impl From<crate::operation::create_deployment::CreateDeploymentError> for Error {
267 fn from(err: crate::operation::create_deployment::CreateDeploymentError) -> Self {
268 match err {
269 crate::operation::create_deployment::CreateDeploymentError::AccessDeniedException(inner) => Error::AccessDeniedException(inner),
270 crate::operation::create_deployment::CreateDeploymentError::ConflictException(inner) => Error::ConflictException(inner),
271 crate::operation::create_deployment::CreateDeploymentError::InternalServerException(inner) => Error::InternalServerException(inner),
272 crate::operation::create_deployment::CreateDeploymentError::RequestAlreadyInProgressException(inner) => {
273 Error::RequestAlreadyInProgressException(inner)
274 }
275 crate::operation::create_deployment::CreateDeploymentError::ResourceNotFoundException(inner) => Error::ResourceNotFoundException(inner),
276 crate::operation::create_deployment::CreateDeploymentError::ThrottlingException(inner) => Error::ThrottlingException(inner),
277 crate::operation::create_deployment::CreateDeploymentError::ValidationException(inner) => Error::ValidationException(inner),
278 crate::operation::create_deployment::CreateDeploymentError::Unhandled(inner) => Error::Unhandled(inner),
279 }
280 }
281}
282impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::delete_component::DeleteComponentError, 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::delete_component::DeleteComponentError, 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::delete_component::DeleteComponentError> for Error {
297 fn from(err: crate::operation::delete_component::DeleteComponentError) -> Self {
298 match err {
299 crate::operation::delete_component::DeleteComponentError::AccessDeniedException(inner) => Error::AccessDeniedException(inner),
300 crate::operation::delete_component::DeleteComponentError::ConflictException(inner) => Error::ConflictException(inner),
301 crate::operation::delete_component::DeleteComponentError::InternalServerException(inner) => Error::InternalServerException(inner),
302 crate::operation::delete_component::DeleteComponentError::ResourceNotFoundException(inner) => Error::ResourceNotFoundException(inner),
303 crate::operation::delete_component::DeleteComponentError::ThrottlingException(inner) => Error::ThrottlingException(inner),
304 crate::operation::delete_component::DeleteComponentError::ValidationException(inner) => Error::ValidationException(inner),
305 crate::operation::delete_component::DeleteComponentError::Unhandled(inner) => Error::Unhandled(inner),
306 }
307 }
308}
309impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::delete_core_device::DeleteCoreDeviceError, R>> for Error
310where
311 R: Send + Sync + std::fmt::Debug + 'static,
312{
313 fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::delete_core_device::DeleteCoreDeviceError, R>) -> Self {
314 match err {
315 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
316 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
317 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
318 source: err.into(),
319 }),
320 }
321 }
322}
323impl From<crate::operation::delete_core_device::DeleteCoreDeviceError> for Error {
324 fn from(err: crate::operation::delete_core_device::DeleteCoreDeviceError) -> Self {
325 match err {
326 crate::operation::delete_core_device::DeleteCoreDeviceError::AccessDeniedException(inner) => Error::AccessDeniedException(inner),
327 crate::operation::delete_core_device::DeleteCoreDeviceError::ConflictException(inner) => Error::ConflictException(inner),
328 crate::operation::delete_core_device::DeleteCoreDeviceError::InternalServerException(inner) => Error::InternalServerException(inner),
329 crate::operation::delete_core_device::DeleteCoreDeviceError::ResourceNotFoundException(inner) => Error::ResourceNotFoundException(inner),
330 crate::operation::delete_core_device::DeleteCoreDeviceError::ThrottlingException(inner) => Error::ThrottlingException(inner),
331 crate::operation::delete_core_device::DeleteCoreDeviceError::ValidationException(inner) => Error::ValidationException(inner),
332 crate::operation::delete_core_device::DeleteCoreDeviceError::Unhandled(inner) => Error::Unhandled(inner),
333 }
334 }
335}
336impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::delete_deployment::DeleteDeploymentError, R>> for Error
337where
338 R: Send + Sync + std::fmt::Debug + 'static,
339{
340 fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::delete_deployment::DeleteDeploymentError, R>) -> Self {
341 match err {
342 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
343 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
344 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
345 source: err.into(),
346 }),
347 }
348 }
349}
350impl From<crate::operation::delete_deployment::DeleteDeploymentError> for Error {
351 fn from(err: crate::operation::delete_deployment::DeleteDeploymentError) -> Self {
352 match err {
353 crate::operation::delete_deployment::DeleteDeploymentError::AccessDeniedException(inner) => Error::AccessDeniedException(inner),
354 crate::operation::delete_deployment::DeleteDeploymentError::ConflictException(inner) => Error::ConflictException(inner),
355 crate::operation::delete_deployment::DeleteDeploymentError::InternalServerException(inner) => Error::InternalServerException(inner),
356 crate::operation::delete_deployment::DeleteDeploymentError::ResourceNotFoundException(inner) => Error::ResourceNotFoundException(inner),
357 crate::operation::delete_deployment::DeleteDeploymentError::ThrottlingException(inner) => Error::ThrottlingException(inner),
358 crate::operation::delete_deployment::DeleteDeploymentError::ValidationException(inner) => Error::ValidationException(inner),
359 crate::operation::delete_deployment::DeleteDeploymentError::Unhandled(inner) => Error::Unhandled(inner),
360 }
361 }
362}
363impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::describe_component::DescribeComponentError, R>> for Error
364where
365 R: Send + Sync + std::fmt::Debug + 'static,
366{
367 fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::describe_component::DescribeComponentError, R>) -> Self {
368 match err {
369 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
370 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
371 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
372 source: err.into(),
373 }),
374 }
375 }
376}
377impl From<crate::operation::describe_component::DescribeComponentError> for Error {
378 fn from(err: crate::operation::describe_component::DescribeComponentError) -> Self {
379 match err {
380 crate::operation::describe_component::DescribeComponentError::AccessDeniedException(inner) => Error::AccessDeniedException(inner),
381 crate::operation::describe_component::DescribeComponentError::InternalServerException(inner) => Error::InternalServerException(inner),
382 crate::operation::describe_component::DescribeComponentError::ResourceNotFoundException(inner) => Error::ResourceNotFoundException(inner),
383 crate::operation::describe_component::DescribeComponentError::ThrottlingException(inner) => Error::ThrottlingException(inner),
384 crate::operation::describe_component::DescribeComponentError::ValidationException(inner) => Error::ValidationException(inner),
385 crate::operation::describe_component::DescribeComponentError::Unhandled(inner) => Error::Unhandled(inner),
386 }
387 }
388}
389impl<R>
390 From<
391 ::aws_smithy_runtime_api::client::result::SdkError<
392 crate::operation::disassociate_service_role_from_account::DisassociateServiceRoleFromAccountError,
393 R,
394 >,
395 > for Error
396where
397 R: Send + Sync + std::fmt::Debug + 'static,
398{
399 fn from(
400 err: ::aws_smithy_runtime_api::client::result::SdkError<
401 crate::operation::disassociate_service_role_from_account::DisassociateServiceRoleFromAccountError,
402 R,
403 >,
404 ) -> Self {
405 match err {
406 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
407 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
408 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
409 source: err.into(),
410 }),
411 }
412 }
413}
414impl From<crate::operation::disassociate_service_role_from_account::DisassociateServiceRoleFromAccountError> for Error {
415 fn from(err: crate::operation::disassociate_service_role_from_account::DisassociateServiceRoleFromAccountError) -> Self {
416 match err {
417 crate::operation::disassociate_service_role_from_account::DisassociateServiceRoleFromAccountError::InternalServerException(inner) => {
418 Error::InternalServerException(inner)
419 }
420 crate::operation::disassociate_service_role_from_account::DisassociateServiceRoleFromAccountError::Unhandled(inner) => {
421 Error::Unhandled(inner)
422 }
423 }
424 }
425}
426impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::get_component::GetComponentError, R>> for Error
427where
428 R: Send + Sync + std::fmt::Debug + 'static,
429{
430 fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::get_component::GetComponentError, R>) -> Self {
431 match err {
432 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
433 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
434 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
435 source: err.into(),
436 }),
437 }
438 }
439}
440impl From<crate::operation::get_component::GetComponentError> for Error {
441 fn from(err: crate::operation::get_component::GetComponentError) -> Self {
442 match err {
443 crate::operation::get_component::GetComponentError::AccessDeniedException(inner) => Error::AccessDeniedException(inner),
444 crate::operation::get_component::GetComponentError::InternalServerException(inner) => Error::InternalServerException(inner),
445 crate::operation::get_component::GetComponentError::ResourceNotFoundException(inner) => Error::ResourceNotFoundException(inner),
446 crate::operation::get_component::GetComponentError::ThrottlingException(inner) => Error::ThrottlingException(inner),
447 crate::operation::get_component::GetComponentError::ValidationException(inner) => Error::ValidationException(inner),
448 crate::operation::get_component::GetComponentError::Unhandled(inner) => Error::Unhandled(inner),
449 }
450 }
451}
452impl<R>
453 From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::get_component_version_artifact::GetComponentVersionArtifactError, R>>
454 for Error
455where
456 R: Send + Sync + std::fmt::Debug + 'static,
457{
458 fn from(
459 err: ::aws_smithy_runtime_api::client::result::SdkError<
460 crate::operation::get_component_version_artifact::GetComponentVersionArtifactError,
461 R,
462 >,
463 ) -> Self {
464 match err {
465 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
466 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
467 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
468 source: err.into(),
469 }),
470 }
471 }
472}
473impl From<crate::operation::get_component_version_artifact::GetComponentVersionArtifactError> for Error {
474 fn from(err: crate::operation::get_component_version_artifact::GetComponentVersionArtifactError) -> Self {
475 match err {
476 crate::operation::get_component_version_artifact::GetComponentVersionArtifactError::AccessDeniedException(inner) => {
477 Error::AccessDeniedException(inner)
478 }
479 crate::operation::get_component_version_artifact::GetComponentVersionArtifactError::InternalServerException(inner) => {
480 Error::InternalServerException(inner)
481 }
482 crate::operation::get_component_version_artifact::GetComponentVersionArtifactError::ResourceNotFoundException(inner) => {
483 Error::ResourceNotFoundException(inner)
484 }
485 crate::operation::get_component_version_artifact::GetComponentVersionArtifactError::ThrottlingException(inner) => {
486 Error::ThrottlingException(inner)
487 }
488 crate::operation::get_component_version_artifact::GetComponentVersionArtifactError::ValidationException(inner) => {
489 Error::ValidationException(inner)
490 }
491 crate::operation::get_component_version_artifact::GetComponentVersionArtifactError::Unhandled(inner) => Error::Unhandled(inner),
492 }
493 }
494}
495impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::get_connectivity_info::GetConnectivityInfoError, 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::get_connectivity_info::GetConnectivityInfoError, 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::get_connectivity_info::GetConnectivityInfoError> for Error {
510 fn from(err: crate::operation::get_connectivity_info::GetConnectivityInfoError) -> Self {
511 match err {
512 crate::operation::get_connectivity_info::GetConnectivityInfoError::InternalServerException(inner) => {
513 Error::InternalServerException(inner)
514 }
515 crate::operation::get_connectivity_info::GetConnectivityInfoError::ValidationException(inner) => Error::ValidationException(inner),
516 crate::operation::get_connectivity_info::GetConnectivityInfoError::Unhandled(inner) => Error::Unhandled(inner),
517 }
518 }
519}
520impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::get_core_device::GetCoreDeviceError, R>> for Error
521where
522 R: Send + Sync + std::fmt::Debug + 'static,
523{
524 fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::get_core_device::GetCoreDeviceError, R>) -> Self {
525 match err {
526 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
527 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
528 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
529 source: err.into(),
530 }),
531 }
532 }
533}
534impl From<crate::operation::get_core_device::GetCoreDeviceError> for Error {
535 fn from(err: crate::operation::get_core_device::GetCoreDeviceError) -> Self {
536 match err {
537 crate::operation::get_core_device::GetCoreDeviceError::AccessDeniedException(inner) => Error::AccessDeniedException(inner),
538 crate::operation::get_core_device::GetCoreDeviceError::InternalServerException(inner) => Error::InternalServerException(inner),
539 crate::operation::get_core_device::GetCoreDeviceError::ResourceNotFoundException(inner) => Error::ResourceNotFoundException(inner),
540 crate::operation::get_core_device::GetCoreDeviceError::ThrottlingException(inner) => Error::ThrottlingException(inner),
541 crate::operation::get_core_device::GetCoreDeviceError::ValidationException(inner) => Error::ValidationException(inner),
542 crate::operation::get_core_device::GetCoreDeviceError::Unhandled(inner) => Error::Unhandled(inner),
543 }
544 }
545}
546impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::get_deployment::GetDeploymentError, R>> for Error
547where
548 R: Send + Sync + std::fmt::Debug + 'static,
549{
550 fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::get_deployment::GetDeploymentError, R>) -> Self {
551 match err {
552 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
553 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
554 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
555 source: err.into(),
556 }),
557 }
558 }
559}
560impl From<crate::operation::get_deployment::GetDeploymentError> for Error {
561 fn from(err: crate::operation::get_deployment::GetDeploymentError) -> Self {
562 match err {
563 crate::operation::get_deployment::GetDeploymentError::AccessDeniedException(inner) => Error::AccessDeniedException(inner),
564 crate::operation::get_deployment::GetDeploymentError::InternalServerException(inner) => Error::InternalServerException(inner),
565 crate::operation::get_deployment::GetDeploymentError::ResourceNotFoundException(inner) => Error::ResourceNotFoundException(inner),
566 crate::operation::get_deployment::GetDeploymentError::ThrottlingException(inner) => Error::ThrottlingException(inner),
567 crate::operation::get_deployment::GetDeploymentError::ValidationException(inner) => Error::ValidationException(inner),
568 crate::operation::get_deployment::GetDeploymentError::Unhandled(inner) => Error::Unhandled(inner),
569 }
570 }
571}
572impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::get_service_role_for_account::GetServiceRoleForAccountError, R>>
573 for Error
574where
575 R: Send + Sync + std::fmt::Debug + 'static,
576{
577 fn from(
578 err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::get_service_role_for_account::GetServiceRoleForAccountError, R>,
579 ) -> Self {
580 match err {
581 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
582 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
583 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
584 source: err.into(),
585 }),
586 }
587 }
588}
589impl From<crate::operation::get_service_role_for_account::GetServiceRoleForAccountError> for Error {
590 fn from(err: crate::operation::get_service_role_for_account::GetServiceRoleForAccountError) -> Self {
591 match err {
592 crate::operation::get_service_role_for_account::GetServiceRoleForAccountError::InternalServerException(inner) => {
593 Error::InternalServerException(inner)
594 }
595 crate::operation::get_service_role_for_account::GetServiceRoleForAccountError::Unhandled(inner) => Error::Unhandled(inner),
596 }
597 }
598}
599impl<R>
600 From<
601 ::aws_smithy_runtime_api::client::result::SdkError<
602 crate::operation::list_client_devices_associated_with_core_device::ListClientDevicesAssociatedWithCoreDeviceError,
603 R,
604 >,
605 > for Error
606where
607 R: Send + Sync + std::fmt::Debug + 'static,
608{
609 fn from(
610 err: ::aws_smithy_runtime_api::client::result::SdkError<
611 crate::operation::list_client_devices_associated_with_core_device::ListClientDevicesAssociatedWithCoreDeviceError,
612 R,
613 >,
614 ) -> Self {
615 match err {
616 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
617 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
618 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
619 source: err.into(),
620 }),
621 }
622 }
623}
624impl From<crate::operation::list_client_devices_associated_with_core_device::ListClientDevicesAssociatedWithCoreDeviceError> for Error {
625 fn from(err: crate::operation::list_client_devices_associated_with_core_device::ListClientDevicesAssociatedWithCoreDeviceError) -> Self {
626 match err {
627 crate::operation::list_client_devices_associated_with_core_device::ListClientDevicesAssociatedWithCoreDeviceError::AccessDeniedException(inner) => Error::AccessDeniedException(inner),
628 crate::operation::list_client_devices_associated_with_core_device::ListClientDevicesAssociatedWithCoreDeviceError::InternalServerException(inner) => Error::InternalServerException(inner),
629 crate::operation::list_client_devices_associated_with_core_device::ListClientDevicesAssociatedWithCoreDeviceError::ResourceNotFoundException(inner) => Error::ResourceNotFoundException(inner),
630 crate::operation::list_client_devices_associated_with_core_device::ListClientDevicesAssociatedWithCoreDeviceError::ThrottlingException(inner) => Error::ThrottlingException(inner),
631 crate::operation::list_client_devices_associated_with_core_device::ListClientDevicesAssociatedWithCoreDeviceError::ValidationException(inner) => Error::ValidationException(inner),
632 crate::operation::list_client_devices_associated_with_core_device::ListClientDevicesAssociatedWithCoreDeviceError::Unhandled(inner) => Error::Unhandled(inner),
633 }
634 }
635}
636impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::list_components::ListComponentsError, R>> for Error
637where
638 R: Send + Sync + std::fmt::Debug + 'static,
639{
640 fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::list_components::ListComponentsError, R>) -> Self {
641 match err {
642 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
643 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
644 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
645 source: err.into(),
646 }),
647 }
648 }
649}
650impl From<crate::operation::list_components::ListComponentsError> for Error {
651 fn from(err: crate::operation::list_components::ListComponentsError) -> Self {
652 match err {
653 crate::operation::list_components::ListComponentsError::AccessDeniedException(inner) => Error::AccessDeniedException(inner),
654 crate::operation::list_components::ListComponentsError::InternalServerException(inner) => Error::InternalServerException(inner),
655 crate::operation::list_components::ListComponentsError::ResourceNotFoundException(inner) => Error::ResourceNotFoundException(inner),
656 crate::operation::list_components::ListComponentsError::ThrottlingException(inner) => Error::ThrottlingException(inner),
657 crate::operation::list_components::ListComponentsError::ValidationException(inner) => Error::ValidationException(inner),
658 crate::operation::list_components::ListComponentsError::Unhandled(inner) => Error::Unhandled(inner),
659 }
660 }
661}
662impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::list_component_versions::ListComponentVersionsError, R>> for Error
663where
664 R: Send + Sync + std::fmt::Debug + 'static,
665{
666 fn from(
667 err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::list_component_versions::ListComponentVersionsError, R>,
668 ) -> Self {
669 match err {
670 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
671 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
672 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
673 source: err.into(),
674 }),
675 }
676 }
677}
678impl From<crate::operation::list_component_versions::ListComponentVersionsError> for Error {
679 fn from(err: crate::operation::list_component_versions::ListComponentVersionsError) -> Self {
680 match err {
681 crate::operation::list_component_versions::ListComponentVersionsError::AccessDeniedException(inner) => {
682 Error::AccessDeniedException(inner)
683 }
684 crate::operation::list_component_versions::ListComponentVersionsError::InternalServerException(inner) => {
685 Error::InternalServerException(inner)
686 }
687 crate::operation::list_component_versions::ListComponentVersionsError::ResourceNotFoundException(inner) => {
688 Error::ResourceNotFoundException(inner)
689 }
690 crate::operation::list_component_versions::ListComponentVersionsError::ThrottlingException(inner) => Error::ThrottlingException(inner),
691 crate::operation::list_component_versions::ListComponentVersionsError::ValidationException(inner) => Error::ValidationException(inner),
692 crate::operation::list_component_versions::ListComponentVersionsError::Unhandled(inner) => Error::Unhandled(inner),
693 }
694 }
695}
696impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::list_core_devices::ListCoreDevicesError, R>> for Error
697where
698 R: Send + Sync + std::fmt::Debug + 'static,
699{
700 fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::list_core_devices::ListCoreDevicesError, R>) -> Self {
701 match err {
702 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
703 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
704 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
705 source: err.into(),
706 }),
707 }
708 }
709}
710impl From<crate::operation::list_core_devices::ListCoreDevicesError> for Error {
711 fn from(err: crate::operation::list_core_devices::ListCoreDevicesError) -> Self {
712 match err {
713 crate::operation::list_core_devices::ListCoreDevicesError::AccessDeniedException(inner) => Error::AccessDeniedException(inner),
714 crate::operation::list_core_devices::ListCoreDevicesError::InternalServerException(inner) => Error::InternalServerException(inner),
715 crate::operation::list_core_devices::ListCoreDevicesError::ThrottlingException(inner) => Error::ThrottlingException(inner),
716 crate::operation::list_core_devices::ListCoreDevicesError::ValidationException(inner) => Error::ValidationException(inner),
717 crate::operation::list_core_devices::ListCoreDevicesError::Unhandled(inner) => Error::Unhandled(inner),
718 }
719 }
720}
721impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::list_deployments::ListDeploymentsError, R>> for Error
722where
723 R: Send + Sync + std::fmt::Debug + 'static,
724{
725 fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::list_deployments::ListDeploymentsError, R>) -> Self {
726 match err {
727 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
728 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
729 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
730 source: err.into(),
731 }),
732 }
733 }
734}
735impl From<crate::operation::list_deployments::ListDeploymentsError> for Error {
736 fn from(err: crate::operation::list_deployments::ListDeploymentsError) -> Self {
737 match err {
738 crate::operation::list_deployments::ListDeploymentsError::AccessDeniedException(inner) => Error::AccessDeniedException(inner),
739 crate::operation::list_deployments::ListDeploymentsError::InternalServerException(inner) => Error::InternalServerException(inner),
740 crate::operation::list_deployments::ListDeploymentsError::ThrottlingException(inner) => Error::ThrottlingException(inner),
741 crate::operation::list_deployments::ListDeploymentsError::ValidationException(inner) => Error::ValidationException(inner),
742 crate::operation::list_deployments::ListDeploymentsError::Unhandled(inner) => Error::Unhandled(inner),
743 }
744 }
745}
746impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::list_effective_deployments::ListEffectiveDeploymentsError, R>>
747 for Error
748where
749 R: Send + Sync + std::fmt::Debug + 'static,
750{
751 fn from(
752 err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::list_effective_deployments::ListEffectiveDeploymentsError, R>,
753 ) -> Self {
754 match err {
755 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
756 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
757 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
758 source: err.into(),
759 }),
760 }
761 }
762}
763impl From<crate::operation::list_effective_deployments::ListEffectiveDeploymentsError> for Error {
764 fn from(err: crate::operation::list_effective_deployments::ListEffectiveDeploymentsError) -> Self {
765 match err {
766 crate::operation::list_effective_deployments::ListEffectiveDeploymentsError::AccessDeniedException(inner) => {
767 Error::AccessDeniedException(inner)
768 }
769 crate::operation::list_effective_deployments::ListEffectiveDeploymentsError::InternalServerException(inner) => {
770 Error::InternalServerException(inner)
771 }
772 crate::operation::list_effective_deployments::ListEffectiveDeploymentsError::ResourceNotFoundException(inner) => {
773 Error::ResourceNotFoundException(inner)
774 }
775 crate::operation::list_effective_deployments::ListEffectiveDeploymentsError::ThrottlingException(inner) => {
776 Error::ThrottlingException(inner)
777 }
778 crate::operation::list_effective_deployments::ListEffectiveDeploymentsError::ValidationException(inner) => {
779 Error::ValidationException(inner)
780 }
781 crate::operation::list_effective_deployments::ListEffectiveDeploymentsError::Unhandled(inner) => Error::Unhandled(inner),
782 }
783 }
784}
785impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::list_installed_components::ListInstalledComponentsError, R>>
786 for Error
787where
788 R: Send + Sync + std::fmt::Debug + 'static,
789{
790 fn from(
791 err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::list_installed_components::ListInstalledComponentsError, R>,
792 ) -> Self {
793 match err {
794 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
795 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
796 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
797 source: err.into(),
798 }),
799 }
800 }
801}
802impl From<crate::operation::list_installed_components::ListInstalledComponentsError> for Error {
803 fn from(err: crate::operation::list_installed_components::ListInstalledComponentsError) -> Self {
804 match err {
805 crate::operation::list_installed_components::ListInstalledComponentsError::AccessDeniedException(inner) => {
806 Error::AccessDeniedException(inner)
807 }
808 crate::operation::list_installed_components::ListInstalledComponentsError::InternalServerException(inner) => {
809 Error::InternalServerException(inner)
810 }
811 crate::operation::list_installed_components::ListInstalledComponentsError::ResourceNotFoundException(inner) => {
812 Error::ResourceNotFoundException(inner)
813 }
814 crate::operation::list_installed_components::ListInstalledComponentsError::ThrottlingException(inner) => {
815 Error::ThrottlingException(inner)
816 }
817 crate::operation::list_installed_components::ListInstalledComponentsError::ValidationException(inner) => {
818 Error::ValidationException(inner)
819 }
820 crate::operation::list_installed_components::ListInstalledComponentsError::Unhandled(inner) => Error::Unhandled(inner),
821 }
822 }
823}
824impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::list_tags_for_resource::ListTagsForResourceError, R>> for Error
825where
826 R: Send + Sync + std::fmt::Debug + 'static,
827{
828 fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::list_tags_for_resource::ListTagsForResourceError, R>) -> Self {
829 match err {
830 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
831 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
832 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
833 source: err.into(),
834 }),
835 }
836 }
837}
838impl From<crate::operation::list_tags_for_resource::ListTagsForResourceError> for Error {
839 fn from(err: crate::operation::list_tags_for_resource::ListTagsForResourceError) -> Self {
840 match err {
841 crate::operation::list_tags_for_resource::ListTagsForResourceError::InternalServerException(inner) => {
842 Error::InternalServerException(inner)
843 }
844 crate::operation::list_tags_for_resource::ListTagsForResourceError::ResourceNotFoundException(inner) => {
845 Error::ResourceNotFoundException(inner)
846 }
847 crate::operation::list_tags_for_resource::ListTagsForResourceError::ValidationException(inner) => Error::ValidationException(inner),
848 crate::operation::list_tags_for_resource::ListTagsForResourceError::Unhandled(inner) => Error::Unhandled(inner),
849 }
850 }
851}
852impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::resolve_component_candidates::ResolveComponentCandidatesError, R>>
853 for Error
854where
855 R: Send + Sync + std::fmt::Debug + 'static,
856{
857 fn from(
858 err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::resolve_component_candidates::ResolveComponentCandidatesError, R>,
859 ) -> Self {
860 match err {
861 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
862 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
863 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
864 source: err.into(),
865 }),
866 }
867 }
868}
869impl From<crate::operation::resolve_component_candidates::ResolveComponentCandidatesError> for Error {
870 fn from(err: crate::operation::resolve_component_candidates::ResolveComponentCandidatesError) -> Self {
871 match err {
872 crate::operation::resolve_component_candidates::ResolveComponentCandidatesError::AccessDeniedException(inner) => {
873 Error::AccessDeniedException(inner)
874 }
875 crate::operation::resolve_component_candidates::ResolveComponentCandidatesError::ConflictException(inner) => {
876 Error::ConflictException(inner)
877 }
878 crate::operation::resolve_component_candidates::ResolveComponentCandidatesError::InternalServerException(inner) => {
879 Error::InternalServerException(inner)
880 }
881 crate::operation::resolve_component_candidates::ResolveComponentCandidatesError::ResourceNotFoundException(inner) => {
882 Error::ResourceNotFoundException(inner)
883 }
884 crate::operation::resolve_component_candidates::ResolveComponentCandidatesError::ThrottlingException(inner) => {
885 Error::ThrottlingException(inner)
886 }
887 crate::operation::resolve_component_candidates::ResolveComponentCandidatesError::ValidationException(inner) => {
888 Error::ValidationException(inner)
889 }
890 crate::operation::resolve_component_candidates::ResolveComponentCandidatesError::Unhandled(inner) => Error::Unhandled(inner),
891 }
892 }
893}
894impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::tag_resource::TagResourceError, R>> for Error
895where
896 R: Send + Sync + std::fmt::Debug + 'static,
897{
898 fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::tag_resource::TagResourceError, R>) -> Self {
899 match err {
900 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
901 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
902 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
903 source: err.into(),
904 }),
905 }
906 }
907}
908impl From<crate::operation::tag_resource::TagResourceError> for Error {
909 fn from(err: crate::operation::tag_resource::TagResourceError) -> Self {
910 match err {
911 crate::operation::tag_resource::TagResourceError::InternalServerException(inner) => Error::InternalServerException(inner),
912 crate::operation::tag_resource::TagResourceError::ResourceNotFoundException(inner) => Error::ResourceNotFoundException(inner),
913 crate::operation::tag_resource::TagResourceError::ValidationException(inner) => Error::ValidationException(inner),
914 crate::operation::tag_resource::TagResourceError::Unhandled(inner) => Error::Unhandled(inner),
915 }
916 }
917}
918impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::untag_resource::UntagResourceError, R>> for Error
919where
920 R: Send + Sync + std::fmt::Debug + 'static,
921{
922 fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::untag_resource::UntagResourceError, R>) -> Self {
923 match err {
924 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
925 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
926 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
927 source: err.into(),
928 }),
929 }
930 }
931}
932impl From<crate::operation::untag_resource::UntagResourceError> for Error {
933 fn from(err: crate::operation::untag_resource::UntagResourceError) -> Self {
934 match err {
935 crate::operation::untag_resource::UntagResourceError::InternalServerException(inner) => Error::InternalServerException(inner),
936 crate::operation::untag_resource::UntagResourceError::ResourceNotFoundException(inner) => Error::ResourceNotFoundException(inner),
937 crate::operation::untag_resource::UntagResourceError::ValidationException(inner) => Error::ValidationException(inner),
938 crate::operation::untag_resource::UntagResourceError::Unhandled(inner) => Error::Unhandled(inner),
939 }
940 }
941}
942impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::update_connectivity_info::UpdateConnectivityInfoError, R>> for Error
943where
944 R: Send + Sync + std::fmt::Debug + 'static,
945{
946 fn from(
947 err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::update_connectivity_info::UpdateConnectivityInfoError, R>,
948 ) -> Self {
949 match err {
950 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
951 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
952 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
953 source: err.into(),
954 }),
955 }
956 }
957}
958impl From<crate::operation::update_connectivity_info::UpdateConnectivityInfoError> for Error {
959 fn from(err: crate::operation::update_connectivity_info::UpdateConnectivityInfoError) -> Self {
960 match err {
961 crate::operation::update_connectivity_info::UpdateConnectivityInfoError::InternalServerException(inner) => {
962 Error::InternalServerException(inner)
963 }
964 crate::operation::update_connectivity_info::UpdateConnectivityInfoError::ValidationException(inner) => Error::ValidationException(inner),
965 crate::operation::update_connectivity_info::UpdateConnectivityInfoError::Unhandled(inner) => Error::Unhandled(inner),
966 }
967 }
968}
969impl ::std::error::Error for Error {
970 fn source(&self) -> std::option::Option<&(dyn ::std::error::Error + 'static)> {
971 match self {
972 Error::AccessDeniedException(inner) => inner.source(),
973 Error::ConflictException(inner) => inner.source(),
974 Error::InternalServerException(inner) => inner.source(),
975 Error::RequestAlreadyInProgressException(inner) => inner.source(),
976 Error::ResourceNotFoundException(inner) => inner.source(),
977 Error::ServiceQuotaExceededException(inner) => inner.source(),
978 Error::ThrottlingException(inner) => inner.source(),
979 Error::ValidationException(inner) => inner.source(),
980 Error::Unhandled(inner) => ::std::option::Option::Some(&*inner.source),
981 }
982 }
983}
984impl ::aws_types::request_id::RequestId for Error {
985 fn request_id(&self) -> Option<&str> {
986 match self {
987 Self::AccessDeniedException(e) => e.request_id(),
988 Self::ConflictException(e) => e.request_id(),
989 Self::InternalServerException(e) => e.request_id(),
990 Self::RequestAlreadyInProgressException(e) => e.request_id(),
991 Self::ResourceNotFoundException(e) => e.request_id(),
992 Self::ServiceQuotaExceededException(e) => e.request_id(),
993 Self::ThrottlingException(e) => e.request_id(),
994 Self::ValidationException(e) => e.request_id(),
995 Self::Unhandled(e) => e.meta.request_id(),
996 }
997 }
998}