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