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