1#[non_exhaustive]
4#[derive(::std::fmt::Debug)]
5pub enum Error {
6 AccessDeniedException(crate::types::error::AccessDeniedException),
9 IllegalArgumentException(crate::types::error::IllegalArgumentException),
11 IllegalStateException(crate::types::error::IllegalStateException),
14 InternalServerException(crate::types::error::InternalServerException),
17 ResourceNotFoundException(crate::types::error::ResourceNotFoundException),
20 #[deprecated(note = "Matching `Unhandled` directly is not forwards compatible. Instead, match using a \
22 variable wildcard pattern and check `.code()`:
23 \
24 `err if err.code() == Some(\"SpecificExceptionCode\") => { /* handle the error */ }`
25 \
26 See [`ProvideErrorMetadata`](#impl-ProvideErrorMetadata-for-Error) for what information is available for the error.")]
27 Unhandled(crate::error::sealed_unhandled::Unhandled),
28}
29impl ::std::fmt::Display for Error {
30 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
31 match self {
32 Error::AccessDeniedException(inner) => inner.fmt(f),
33 Error::IllegalArgumentException(inner) => inner.fmt(f),
34 Error::IllegalStateException(inner) => inner.fmt(f),
35 Error::InternalServerException(inner) => inner.fmt(f),
36 Error::ResourceNotFoundException(inner) => inner.fmt(f),
37 Error::Unhandled(_) => {
38 if let ::std::option::Option::Some(code) = ::aws_smithy_types::error::metadata::ProvideErrorMetadata::code(self) {
39 write!(f, "unhandled error ({code})")
40 } else {
41 f.write_str("unhandled error")
42 }
43 }
44 }
45 }
46}
47impl From<::aws_smithy_types::error::operation::BuildError> for Error {
48 fn from(value: ::aws_smithy_types::error::operation::BuildError) -> Self {
49 Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
50 source: value.into(),
51 meta: ::std::default::Default::default(),
52 })
53 }
54}
55impl ::aws_smithy_types::error::metadata::ProvideErrorMetadata for Error {
56 fn meta(&self) -> &::aws_smithy_types::error::metadata::ErrorMetadata {
57 match self {
58 Self::AccessDeniedException(inner) => inner.meta(),
59 Self::IllegalArgumentException(inner) => inner.meta(),
60 Self::IllegalStateException(inner) => inner.meta(),
61 Self::InternalServerException(inner) => inner.meta(),
62 Self::ResourceNotFoundException(inner) => inner.meta(),
63 Self::Unhandled(inner) => &inner.meta,
64 }
65 }
66}
67impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::approve_plan_execution_step::ApprovePlanExecutionStepError, R>>
68 for Error
69where
70 R: Send + Sync + std::fmt::Debug + 'static,
71{
72 fn from(
73 err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::approve_plan_execution_step::ApprovePlanExecutionStepError, R>,
74 ) -> Self {
75 match err {
76 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
77 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
78 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
79 source: err.into(),
80 }),
81 }
82 }
83}
84impl From<crate::operation::approve_plan_execution_step::ApprovePlanExecutionStepError> for Error {
85 fn from(err: crate::operation::approve_plan_execution_step::ApprovePlanExecutionStepError) -> Self {
86 match err {
87 crate::operation::approve_plan_execution_step::ApprovePlanExecutionStepError::AccessDeniedException(inner) => {
88 Error::AccessDeniedException(inner)
89 }
90 crate::operation::approve_plan_execution_step::ApprovePlanExecutionStepError::ResourceNotFoundException(inner) => {
91 Error::ResourceNotFoundException(inner)
92 }
93 crate::operation::approve_plan_execution_step::ApprovePlanExecutionStepError::Unhandled(inner) => Error::Unhandled(inner),
94 }
95 }
96}
97impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::cancel_plan_execution::CancelPlanExecutionError, R>> for Error
98where
99 R: Send + Sync + std::fmt::Debug + 'static,
100{
101 fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::cancel_plan_execution::CancelPlanExecutionError, R>) -> Self {
102 match err {
103 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
104 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
105 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
106 source: err.into(),
107 }),
108 }
109 }
110}
111impl From<crate::operation::cancel_plan_execution::CancelPlanExecutionError> for Error {
112 fn from(err: crate::operation::cancel_plan_execution::CancelPlanExecutionError) -> Self {
113 match err {
114 crate::operation::cancel_plan_execution::CancelPlanExecutionError::AccessDeniedException(inner) => Error::AccessDeniedException(inner),
115 crate::operation::cancel_plan_execution::CancelPlanExecutionError::ResourceNotFoundException(inner) => {
116 Error::ResourceNotFoundException(inner)
117 }
118 crate::operation::cancel_plan_execution::CancelPlanExecutionError::Unhandled(inner) => Error::Unhandled(inner),
119 }
120 }
121}
122impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::create_plan::CreatePlanError, R>> for Error
123where
124 R: Send + Sync + std::fmt::Debug + 'static,
125{
126 fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::create_plan::CreatePlanError, R>) -> Self {
127 match err {
128 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
129 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
130 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
131 source: err.into(),
132 }),
133 }
134 }
135}
136impl From<crate::operation::create_plan::CreatePlanError> for Error {
137 fn from(err: crate::operation::create_plan::CreatePlanError) -> Self {
138 match err {
139 crate::operation::create_plan::CreatePlanError::Unhandled(inner) => Error::Unhandled(inner),
140 }
141 }
142}
143impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::delete_plan::DeletePlanError, R>> for Error
144where
145 R: Send + Sync + std::fmt::Debug + 'static,
146{
147 fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::delete_plan::DeletePlanError, R>) -> Self {
148 match err {
149 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
150 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
151 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
152 source: err.into(),
153 }),
154 }
155 }
156}
157impl From<crate::operation::delete_plan::DeletePlanError> for Error {
158 fn from(err: crate::operation::delete_plan::DeletePlanError) -> Self {
159 match err {
160 crate::operation::delete_plan::DeletePlanError::IllegalStateException(inner) => Error::IllegalStateException(inner),
161 crate::operation::delete_plan::DeletePlanError::ResourceNotFoundException(inner) => Error::ResourceNotFoundException(inner),
162 crate::operation::delete_plan::DeletePlanError::Unhandled(inner) => Error::Unhandled(inner),
163 }
164 }
165}
166impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::get_plan::GetPlanError, R>> for Error
167where
168 R: Send + Sync + std::fmt::Debug + 'static,
169{
170 fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::get_plan::GetPlanError, R>) -> Self {
171 match err {
172 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
173 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
174 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
175 source: err.into(),
176 }),
177 }
178 }
179}
180impl From<crate::operation::get_plan::GetPlanError> for Error {
181 fn from(err: crate::operation::get_plan::GetPlanError) -> Self {
182 match err {
183 crate::operation::get_plan::GetPlanError::ResourceNotFoundException(inner) => Error::ResourceNotFoundException(inner),
184 crate::operation::get_plan::GetPlanError::Unhandled(inner) => Error::Unhandled(inner),
185 }
186 }
187}
188impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::get_plan_evaluation_status::GetPlanEvaluationStatusError, R>>
189 for Error
190where
191 R: Send + Sync + std::fmt::Debug + 'static,
192{
193 fn from(
194 err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::get_plan_evaluation_status::GetPlanEvaluationStatusError, R>,
195 ) -> Self {
196 match err {
197 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
198 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
199 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
200 source: err.into(),
201 }),
202 }
203 }
204}
205impl From<crate::operation::get_plan_evaluation_status::GetPlanEvaluationStatusError> for Error {
206 fn from(err: crate::operation::get_plan_evaluation_status::GetPlanEvaluationStatusError) -> Self {
207 match err {
208 crate::operation::get_plan_evaluation_status::GetPlanEvaluationStatusError::AccessDeniedException(inner) => {
209 Error::AccessDeniedException(inner)
210 }
211 crate::operation::get_plan_evaluation_status::GetPlanEvaluationStatusError::ResourceNotFoundException(inner) => {
212 Error::ResourceNotFoundException(inner)
213 }
214 crate::operation::get_plan_evaluation_status::GetPlanEvaluationStatusError::Unhandled(inner) => Error::Unhandled(inner),
215 }
216 }
217}
218impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::get_plan_execution::GetPlanExecutionError, R>> for Error
219where
220 R: Send + Sync + std::fmt::Debug + 'static,
221{
222 fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::get_plan_execution::GetPlanExecutionError, R>) -> Self {
223 match err {
224 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
225 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
226 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
227 source: err.into(),
228 }),
229 }
230 }
231}
232impl From<crate::operation::get_plan_execution::GetPlanExecutionError> for Error {
233 fn from(err: crate::operation::get_plan_execution::GetPlanExecutionError) -> Self {
234 match err {
235 crate::operation::get_plan_execution::GetPlanExecutionError::AccessDeniedException(inner) => Error::AccessDeniedException(inner),
236 crate::operation::get_plan_execution::GetPlanExecutionError::ResourceNotFoundException(inner) => Error::ResourceNotFoundException(inner),
237 crate::operation::get_plan_execution::GetPlanExecutionError::Unhandled(inner) => Error::Unhandled(inner),
238 }
239 }
240}
241impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::get_plan_in_region::GetPlanInRegionError, R>> for Error
242where
243 R: Send + Sync + std::fmt::Debug + 'static,
244{
245 fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::get_plan_in_region::GetPlanInRegionError, R>) -> Self {
246 match err {
247 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
248 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
249 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
250 source: err.into(),
251 }),
252 }
253 }
254}
255impl From<crate::operation::get_plan_in_region::GetPlanInRegionError> for Error {
256 fn from(err: crate::operation::get_plan_in_region::GetPlanInRegionError) -> Self {
257 match err {
258 crate::operation::get_plan_in_region::GetPlanInRegionError::AccessDeniedException(inner) => Error::AccessDeniedException(inner),
259 crate::operation::get_plan_in_region::GetPlanInRegionError::ResourceNotFoundException(inner) => Error::ResourceNotFoundException(inner),
260 crate::operation::get_plan_in_region::GetPlanInRegionError::Unhandled(inner) => Error::Unhandled(inner),
261 }
262 }
263}
264impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::list_plan_execution_events::ListPlanExecutionEventsError, R>>
265 for Error
266where
267 R: Send + Sync + std::fmt::Debug + 'static,
268{
269 fn from(
270 err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::list_plan_execution_events::ListPlanExecutionEventsError, R>,
271 ) -> Self {
272 match err {
273 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
274 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
275 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
276 source: err.into(),
277 }),
278 }
279 }
280}
281impl From<crate::operation::list_plan_execution_events::ListPlanExecutionEventsError> for Error {
282 fn from(err: crate::operation::list_plan_execution_events::ListPlanExecutionEventsError) -> Self {
283 match err {
284 crate::operation::list_plan_execution_events::ListPlanExecutionEventsError::AccessDeniedException(inner) => {
285 Error::AccessDeniedException(inner)
286 }
287 crate::operation::list_plan_execution_events::ListPlanExecutionEventsError::ResourceNotFoundException(inner) => {
288 Error::ResourceNotFoundException(inner)
289 }
290 crate::operation::list_plan_execution_events::ListPlanExecutionEventsError::Unhandled(inner) => Error::Unhandled(inner),
291 }
292 }
293}
294impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::list_plan_executions::ListPlanExecutionsError, R>> for Error
295where
296 R: Send + Sync + std::fmt::Debug + 'static,
297{
298 fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::list_plan_executions::ListPlanExecutionsError, R>) -> Self {
299 match err {
300 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
301 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
302 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
303 source: err.into(),
304 }),
305 }
306 }
307}
308impl From<crate::operation::list_plan_executions::ListPlanExecutionsError> for Error {
309 fn from(err: crate::operation::list_plan_executions::ListPlanExecutionsError) -> Self {
310 match err {
311 crate::operation::list_plan_executions::ListPlanExecutionsError::AccessDeniedException(inner) => Error::AccessDeniedException(inner),
312 crate::operation::list_plan_executions::ListPlanExecutionsError::ResourceNotFoundException(inner) => {
313 Error::ResourceNotFoundException(inner)
314 }
315 crate::operation::list_plan_executions::ListPlanExecutionsError::Unhandled(inner) => Error::Unhandled(inner),
316 }
317 }
318}
319impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::list_plans::ListPlansError, R>> for Error
320where
321 R: Send + Sync + std::fmt::Debug + 'static,
322{
323 fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::list_plans::ListPlansError, R>) -> Self {
324 match err {
325 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
326 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
327 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
328 source: err.into(),
329 }),
330 }
331 }
332}
333impl From<crate::operation::list_plans::ListPlansError> for Error {
334 fn from(err: crate::operation::list_plans::ListPlansError) -> Self {
335 match err {
336 crate::operation::list_plans::ListPlansError::Unhandled(inner) => Error::Unhandled(inner),
337 }
338 }
339}
340impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::list_plans_in_region::ListPlansInRegionError, R>> for Error
341where
342 R: Send + Sync + std::fmt::Debug + 'static,
343{
344 fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::list_plans_in_region::ListPlansInRegionError, R>) -> Self {
345 match err {
346 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
347 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
348 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
349 source: err.into(),
350 }),
351 }
352 }
353}
354impl From<crate::operation::list_plans_in_region::ListPlansInRegionError> for Error {
355 fn from(err: crate::operation::list_plans_in_region::ListPlansInRegionError) -> Self {
356 match err {
357 crate::operation::list_plans_in_region::ListPlansInRegionError::AccessDeniedException(inner) => Error::AccessDeniedException(inner),
358 crate::operation::list_plans_in_region::ListPlansInRegionError::Unhandled(inner) => Error::Unhandled(inner),
359 }
360 }
361}
362impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::list_route53_health_checks::ListRoute53HealthChecksError, R>>
363 for Error
364where
365 R: Send + Sync + std::fmt::Debug + 'static,
366{
367 fn from(
368 err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::list_route53_health_checks::ListRoute53HealthChecksError, R>,
369 ) -> Self {
370 match err {
371 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
372 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
373 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
374 source: err.into(),
375 }),
376 }
377 }
378}
379impl From<crate::operation::list_route53_health_checks::ListRoute53HealthChecksError> for Error {
380 fn from(err: crate::operation::list_route53_health_checks::ListRoute53HealthChecksError) -> Self {
381 match err {
382 crate::operation::list_route53_health_checks::ListRoute53HealthChecksError::AccessDeniedException(inner) => {
383 Error::AccessDeniedException(inner)
384 }
385 crate::operation::list_route53_health_checks::ListRoute53HealthChecksError::InternalServerException(inner) => {
386 Error::InternalServerException(inner)
387 }
388 crate::operation::list_route53_health_checks::ListRoute53HealthChecksError::ResourceNotFoundException(inner) => {
389 Error::ResourceNotFoundException(inner)
390 }
391 crate::operation::list_route53_health_checks::ListRoute53HealthChecksError::Unhandled(inner) => Error::Unhandled(inner),
392 }
393 }
394}
395impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::list_tags_for_resource::ListTagsForResourceError, R>> for Error
396where
397 R: Send + Sync + std::fmt::Debug + 'static,
398{
399 fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::list_tags_for_resource::ListTagsForResourceError, R>) -> Self {
400 match err {
401 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
402 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
403 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
404 source: err.into(),
405 }),
406 }
407 }
408}
409impl From<crate::operation::list_tags_for_resource::ListTagsForResourceError> for Error {
410 fn from(err: crate::operation::list_tags_for_resource::ListTagsForResourceError) -> Self {
411 match err {
412 crate::operation::list_tags_for_resource::ListTagsForResourceError::InternalServerException(inner) => {
413 Error::InternalServerException(inner)
414 }
415 crate::operation::list_tags_for_resource::ListTagsForResourceError::ResourceNotFoundException(inner) => {
416 Error::ResourceNotFoundException(inner)
417 }
418 crate::operation::list_tags_for_resource::ListTagsForResourceError::Unhandled(inner) => Error::Unhandled(inner),
419 }
420 }
421}
422impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::start_plan_execution::StartPlanExecutionError, R>> for Error
423where
424 R: Send + Sync + std::fmt::Debug + 'static,
425{
426 fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::start_plan_execution::StartPlanExecutionError, R>) -> Self {
427 match err {
428 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
429 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
430 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
431 source: err.into(),
432 }),
433 }
434 }
435}
436impl From<crate::operation::start_plan_execution::StartPlanExecutionError> for Error {
437 fn from(err: crate::operation::start_plan_execution::StartPlanExecutionError) -> Self {
438 match err {
439 crate::operation::start_plan_execution::StartPlanExecutionError::AccessDeniedException(inner) => Error::AccessDeniedException(inner),
440 crate::operation::start_plan_execution::StartPlanExecutionError::IllegalArgumentException(inner) => {
441 Error::IllegalArgumentException(inner)
442 }
443 crate::operation::start_plan_execution::StartPlanExecutionError::IllegalStateException(inner) => Error::IllegalStateException(inner),
444 crate::operation::start_plan_execution::StartPlanExecutionError::ResourceNotFoundException(inner) => {
445 Error::ResourceNotFoundException(inner)
446 }
447 crate::operation::start_plan_execution::StartPlanExecutionError::Unhandled(inner) => Error::Unhandled(inner),
448 }
449 }
450}
451impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::tag_resource::TagResourceError, R>> for Error
452where
453 R: Send + Sync + std::fmt::Debug + 'static,
454{
455 fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::tag_resource::TagResourceError, R>) -> Self {
456 match err {
457 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
458 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
459 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
460 source: err.into(),
461 }),
462 }
463 }
464}
465impl From<crate::operation::tag_resource::TagResourceError> for Error {
466 fn from(err: crate::operation::tag_resource::TagResourceError) -> Self {
467 match err {
468 crate::operation::tag_resource::TagResourceError::InternalServerException(inner) => Error::InternalServerException(inner),
469 crate::operation::tag_resource::TagResourceError::ResourceNotFoundException(inner) => Error::ResourceNotFoundException(inner),
470 crate::operation::tag_resource::TagResourceError::Unhandled(inner) => Error::Unhandled(inner),
471 }
472 }
473}
474impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::untag_resource::UntagResourceError, R>> for Error
475where
476 R: Send + Sync + std::fmt::Debug + 'static,
477{
478 fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::untag_resource::UntagResourceError, R>) -> Self {
479 match err {
480 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
481 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
482 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
483 source: err.into(),
484 }),
485 }
486 }
487}
488impl From<crate::operation::untag_resource::UntagResourceError> for Error {
489 fn from(err: crate::operation::untag_resource::UntagResourceError) -> Self {
490 match err {
491 crate::operation::untag_resource::UntagResourceError::InternalServerException(inner) => Error::InternalServerException(inner),
492 crate::operation::untag_resource::UntagResourceError::ResourceNotFoundException(inner) => Error::ResourceNotFoundException(inner),
493 crate::operation::untag_resource::UntagResourceError::Unhandled(inner) => Error::Unhandled(inner),
494 }
495 }
496}
497impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::update_plan::UpdatePlanError, R>> for Error
498where
499 R: Send + Sync + std::fmt::Debug + 'static,
500{
501 fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::update_plan::UpdatePlanError, R>) -> Self {
502 match err {
503 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
504 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
505 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
506 source: err.into(),
507 }),
508 }
509 }
510}
511impl From<crate::operation::update_plan::UpdatePlanError> for Error {
512 fn from(err: crate::operation::update_plan::UpdatePlanError) -> Self {
513 match err {
514 crate::operation::update_plan::UpdatePlanError::ResourceNotFoundException(inner) => Error::ResourceNotFoundException(inner),
515 crate::operation::update_plan::UpdatePlanError::Unhandled(inner) => Error::Unhandled(inner),
516 }
517 }
518}
519impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::update_plan_execution::UpdatePlanExecutionError, 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::update_plan_execution::UpdatePlanExecutionError, 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::update_plan_execution::UpdatePlanExecutionError> for Error {
534 fn from(err: crate::operation::update_plan_execution::UpdatePlanExecutionError) -> Self {
535 match err {
536 crate::operation::update_plan_execution::UpdatePlanExecutionError::AccessDeniedException(inner) => Error::AccessDeniedException(inner),
537 crate::operation::update_plan_execution::UpdatePlanExecutionError::IllegalStateException(inner) => Error::IllegalStateException(inner),
538 crate::operation::update_plan_execution::UpdatePlanExecutionError::ResourceNotFoundException(inner) => {
539 Error::ResourceNotFoundException(inner)
540 }
541 crate::operation::update_plan_execution::UpdatePlanExecutionError::Unhandled(inner) => Error::Unhandled(inner),
542 }
543 }
544}
545impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::update_plan_execution_step::UpdatePlanExecutionStepError, R>>
546 for Error
547where
548 R: Send + Sync + std::fmt::Debug + 'static,
549{
550 fn from(
551 err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::update_plan_execution_step::UpdatePlanExecutionStepError, R>,
552 ) -> Self {
553 match err {
554 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
555 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
556 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
557 source: err.into(),
558 }),
559 }
560 }
561}
562impl From<crate::operation::update_plan_execution_step::UpdatePlanExecutionStepError> for Error {
563 fn from(err: crate::operation::update_plan_execution_step::UpdatePlanExecutionStepError) -> Self {
564 match err {
565 crate::operation::update_plan_execution_step::UpdatePlanExecutionStepError::AccessDeniedException(inner) => {
566 Error::AccessDeniedException(inner)
567 }
568 crate::operation::update_plan_execution_step::UpdatePlanExecutionStepError::ResourceNotFoundException(inner) => {
569 Error::ResourceNotFoundException(inner)
570 }
571 crate::operation::update_plan_execution_step::UpdatePlanExecutionStepError::Unhandled(inner) => Error::Unhandled(inner),
572 }
573 }
574}
575impl<O, E> ::std::convert::From<::aws_smithy_runtime_api::client::waiters::error::WaiterError<O, E>> for Error
576where
577 O: ::std::fmt::Debug + ::std::marker::Send + ::std::marker::Sync + 'static,
578 E: ::std::error::Error + ::std::marker::Send + ::std::marker::Sync + 'static,
579{
580 fn from(err: ::aws_smithy_runtime_api::client::waiters::error::WaiterError<O, E>) -> Self {
581 Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
582 meta: ::std::default::Default::default(),
583 source: err.into(),
584 })
585 }
586}
587impl ::std::error::Error for Error {
588 fn source(&self) -> std::option::Option<&(dyn ::std::error::Error + 'static)> {
589 match self {
590 Error::AccessDeniedException(inner) => inner.source(),
591 Error::IllegalArgumentException(inner) => inner.source(),
592 Error::IllegalStateException(inner) => inner.source(),
593 Error::InternalServerException(inner) => inner.source(),
594 Error::ResourceNotFoundException(inner) => inner.source(),
595 Error::Unhandled(inner) => ::std::option::Option::Some(&*inner.source),
596 }
597 }
598}
599impl ::aws_types::request_id::RequestId for Error {
600 fn request_id(&self) -> Option<&str> {
601 match self {
602 Self::AccessDeniedException(e) => e.request_id(),
603 Self::IllegalArgumentException(e) => e.request_id(),
604 Self::IllegalStateException(e) => e.request_id(),
605 Self::InternalServerException(e) => e.request_id(),
606 Self::ResourceNotFoundException(e) => e.request_id(),
607 Self::Unhandled(e) => e.meta.request_id(),
608 }
609 }
610}