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 ServiceLimitExceededException(crate::types::error::ServiceLimitExceededException),
16 ThrottlingException(crate::types::error::ThrottlingException),
18 ValidationException(crate::types::error::ValidationException),
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::ConflictException(inner) => inner.fmt(f),
34 Error::InternalServerException(inner) => inner.fmt(f),
35 Error::ResourceNotFoundException(inner) => inner.fmt(f),
36 Error::ServiceLimitExceededException(inner) => inner.fmt(f),
37 Error::ThrottlingException(inner) => inner.fmt(f),
38 Error::ValidationException(inner) => inner.fmt(f),
39 Error::Unhandled(_) => {
40 if let ::std::option::Option::Some(code) = ::aws_smithy_types::error::metadata::ProvideErrorMetadata::code(self) {
41 write!(f, "unhandled error ({code})")
42 } else {
43 f.write_str("unhandled error")
44 }
45 }
46 }
47 }
48}
49impl From<::aws_smithy_types::error::operation::BuildError> for Error {
50 fn from(value: ::aws_smithy_types::error::operation::BuildError) -> Self {
51 Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
52 source: value.into(),
53 meta: ::std::default::Default::default(),
54 })
55 }
56}
57impl ::aws_smithy_types::error::metadata::ProvideErrorMetadata for Error {
58 fn meta(&self) -> &::aws_smithy_types::error::metadata::ErrorMetadata {
59 match self {
60 Self::AccessDeniedException(inner) => inner.meta(),
61 Self::ConflictException(inner) => inner.meta(),
62 Self::InternalServerException(inner) => inner.meta(),
63 Self::ResourceNotFoundException(inner) => inner.meta(),
64 Self::ServiceLimitExceededException(inner) => inner.meta(),
65 Self::ThrottlingException(inner) => inner.meta(),
66 Self::ValidationException(inner) => inner.meta(),
67 Self::Unhandled(inner) => &inner.meta,
68 }
69 }
70}
71impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::accept_data_grant::AcceptDataGrantError, R>> for Error
72where
73 R: Send + Sync + std::fmt::Debug + 'static,
74{
75 fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::accept_data_grant::AcceptDataGrantError, R>) -> Self {
76 match err {
77 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
78 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
79 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
80 source: err.into(),
81 }),
82 }
83 }
84}
85impl From<crate::operation::accept_data_grant::AcceptDataGrantError> for Error {
86 fn from(err: crate::operation::accept_data_grant::AcceptDataGrantError) -> Self {
87 match err {
88 crate::operation::accept_data_grant::AcceptDataGrantError::AccessDeniedException(inner) => Error::AccessDeniedException(inner),
89 crate::operation::accept_data_grant::AcceptDataGrantError::ConflictException(inner) => Error::ConflictException(inner),
90 crate::operation::accept_data_grant::AcceptDataGrantError::InternalServerException(inner) => Error::InternalServerException(inner),
91 crate::operation::accept_data_grant::AcceptDataGrantError::ResourceNotFoundException(inner) => Error::ResourceNotFoundException(inner),
92 crate::operation::accept_data_grant::AcceptDataGrantError::ThrottlingException(inner) => Error::ThrottlingException(inner),
93 crate::operation::accept_data_grant::AcceptDataGrantError::ValidationException(inner) => Error::ValidationException(inner),
94 crate::operation::accept_data_grant::AcceptDataGrantError::Unhandled(inner) => Error::Unhandled(inner),
95 }
96 }
97}
98impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::cancel_job::CancelJobError, R>> for Error
99where
100 R: Send + Sync + std::fmt::Debug + 'static,
101{
102 fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::cancel_job::CancelJobError, R>) -> Self {
103 match err {
104 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
105 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
106 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
107 source: err.into(),
108 }),
109 }
110 }
111}
112impl From<crate::operation::cancel_job::CancelJobError> for Error {
113 fn from(err: crate::operation::cancel_job::CancelJobError) -> Self {
114 match err {
115 crate::operation::cancel_job::CancelJobError::ConflictException(inner) => Error::ConflictException(inner),
116 crate::operation::cancel_job::CancelJobError::InternalServerException(inner) => Error::InternalServerException(inner),
117 crate::operation::cancel_job::CancelJobError::ResourceNotFoundException(inner) => Error::ResourceNotFoundException(inner),
118 crate::operation::cancel_job::CancelJobError::ThrottlingException(inner) => Error::ThrottlingException(inner),
119 crate::operation::cancel_job::CancelJobError::ValidationException(inner) => Error::ValidationException(inner),
120 crate::operation::cancel_job::CancelJobError::Unhandled(inner) => Error::Unhandled(inner),
121 }
122 }
123}
124impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::create_data_grant::CreateDataGrantError, R>> for Error
125where
126 R: Send + Sync + std::fmt::Debug + 'static,
127{
128 fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::create_data_grant::CreateDataGrantError, R>) -> Self {
129 match err {
130 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
131 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
132 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
133 source: err.into(),
134 }),
135 }
136 }
137}
138impl From<crate::operation::create_data_grant::CreateDataGrantError> for Error {
139 fn from(err: crate::operation::create_data_grant::CreateDataGrantError) -> Self {
140 match err {
141 crate::operation::create_data_grant::CreateDataGrantError::AccessDeniedException(inner) => Error::AccessDeniedException(inner),
142 crate::operation::create_data_grant::CreateDataGrantError::InternalServerException(inner) => Error::InternalServerException(inner),
143 crate::operation::create_data_grant::CreateDataGrantError::ResourceNotFoundException(inner) => Error::ResourceNotFoundException(inner),
144 crate::operation::create_data_grant::CreateDataGrantError::ServiceLimitExceededException(inner) => {
145 Error::ServiceLimitExceededException(inner)
146 }
147 crate::operation::create_data_grant::CreateDataGrantError::ThrottlingException(inner) => Error::ThrottlingException(inner),
148 crate::operation::create_data_grant::CreateDataGrantError::ValidationException(inner) => Error::ValidationException(inner),
149 crate::operation::create_data_grant::CreateDataGrantError::Unhandled(inner) => Error::Unhandled(inner),
150 }
151 }
152}
153impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::create_data_set::CreateDataSetError, R>> for Error
154where
155 R: Send + Sync + std::fmt::Debug + 'static,
156{
157 fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::create_data_set::CreateDataSetError, R>) -> Self {
158 match err {
159 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
160 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
161 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
162 source: err.into(),
163 }),
164 }
165 }
166}
167impl From<crate::operation::create_data_set::CreateDataSetError> for Error {
168 fn from(err: crate::operation::create_data_set::CreateDataSetError) -> Self {
169 match err {
170 crate::operation::create_data_set::CreateDataSetError::AccessDeniedException(inner) => Error::AccessDeniedException(inner),
171 crate::operation::create_data_set::CreateDataSetError::InternalServerException(inner) => Error::InternalServerException(inner),
172 crate::operation::create_data_set::CreateDataSetError::ServiceLimitExceededException(inner) => {
173 Error::ServiceLimitExceededException(inner)
174 }
175 crate::operation::create_data_set::CreateDataSetError::ThrottlingException(inner) => Error::ThrottlingException(inner),
176 crate::operation::create_data_set::CreateDataSetError::ValidationException(inner) => Error::ValidationException(inner),
177 crate::operation::create_data_set::CreateDataSetError::Unhandled(inner) => Error::Unhandled(inner),
178 }
179 }
180}
181impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::create_event_action::CreateEventActionError, R>> for Error
182where
183 R: Send + Sync + std::fmt::Debug + 'static,
184{
185 fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::create_event_action::CreateEventActionError, R>) -> Self {
186 match err {
187 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
188 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
189 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
190 source: err.into(),
191 }),
192 }
193 }
194}
195impl From<crate::operation::create_event_action::CreateEventActionError> for Error {
196 fn from(err: crate::operation::create_event_action::CreateEventActionError) -> Self {
197 match err {
198 crate::operation::create_event_action::CreateEventActionError::AccessDeniedException(inner) => Error::AccessDeniedException(inner),
199 crate::operation::create_event_action::CreateEventActionError::InternalServerException(inner) => Error::InternalServerException(inner),
200 crate::operation::create_event_action::CreateEventActionError::ServiceLimitExceededException(inner) => {
201 Error::ServiceLimitExceededException(inner)
202 }
203 crate::operation::create_event_action::CreateEventActionError::ThrottlingException(inner) => Error::ThrottlingException(inner),
204 crate::operation::create_event_action::CreateEventActionError::ValidationException(inner) => Error::ValidationException(inner),
205 crate::operation::create_event_action::CreateEventActionError::Unhandled(inner) => Error::Unhandled(inner),
206 }
207 }
208}
209impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::create_job::CreateJobError, R>> for Error
210where
211 R: Send + Sync + std::fmt::Debug + 'static,
212{
213 fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::create_job::CreateJobError, R>) -> Self {
214 match err {
215 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
216 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
217 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
218 source: err.into(),
219 }),
220 }
221 }
222}
223impl From<crate::operation::create_job::CreateJobError> for Error {
224 fn from(err: crate::operation::create_job::CreateJobError) -> Self {
225 match err {
226 crate::operation::create_job::CreateJobError::AccessDeniedException(inner) => Error::AccessDeniedException(inner),
227 crate::operation::create_job::CreateJobError::ConflictException(inner) => Error::ConflictException(inner),
228 crate::operation::create_job::CreateJobError::InternalServerException(inner) => Error::InternalServerException(inner),
229 crate::operation::create_job::CreateJobError::ResourceNotFoundException(inner) => Error::ResourceNotFoundException(inner),
230 crate::operation::create_job::CreateJobError::ThrottlingException(inner) => Error::ThrottlingException(inner),
231 crate::operation::create_job::CreateJobError::ValidationException(inner) => Error::ValidationException(inner),
232 crate::operation::create_job::CreateJobError::Unhandled(inner) => Error::Unhandled(inner),
233 }
234 }
235}
236impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::create_revision::CreateRevisionError, R>> for Error
237where
238 R: Send + Sync + std::fmt::Debug + 'static,
239{
240 fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::create_revision::CreateRevisionError, R>) -> Self {
241 match err {
242 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
243 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
244 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
245 source: err.into(),
246 }),
247 }
248 }
249}
250impl From<crate::operation::create_revision::CreateRevisionError> for Error {
251 fn from(err: crate::operation::create_revision::CreateRevisionError) -> Self {
252 match err {
253 crate::operation::create_revision::CreateRevisionError::AccessDeniedException(inner) => Error::AccessDeniedException(inner),
254 crate::operation::create_revision::CreateRevisionError::InternalServerException(inner) => Error::InternalServerException(inner),
255 crate::operation::create_revision::CreateRevisionError::ResourceNotFoundException(inner) => Error::ResourceNotFoundException(inner),
256 crate::operation::create_revision::CreateRevisionError::ThrottlingException(inner) => Error::ThrottlingException(inner),
257 crate::operation::create_revision::CreateRevisionError::ValidationException(inner) => Error::ValidationException(inner),
258 crate::operation::create_revision::CreateRevisionError::Unhandled(inner) => Error::Unhandled(inner),
259 }
260 }
261}
262impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::delete_asset::DeleteAssetError, R>> for Error
263where
264 R: Send + Sync + std::fmt::Debug + 'static,
265{
266 fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::delete_asset::DeleteAssetError, R>) -> Self {
267 match err {
268 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
269 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
270 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
271 source: err.into(),
272 }),
273 }
274 }
275}
276impl From<crate::operation::delete_asset::DeleteAssetError> for Error {
277 fn from(err: crate::operation::delete_asset::DeleteAssetError) -> Self {
278 match err {
279 crate::operation::delete_asset::DeleteAssetError::AccessDeniedException(inner) => Error::AccessDeniedException(inner),
280 crate::operation::delete_asset::DeleteAssetError::ConflictException(inner) => Error::ConflictException(inner),
281 crate::operation::delete_asset::DeleteAssetError::InternalServerException(inner) => Error::InternalServerException(inner),
282 crate::operation::delete_asset::DeleteAssetError::ResourceNotFoundException(inner) => Error::ResourceNotFoundException(inner),
283 crate::operation::delete_asset::DeleteAssetError::ThrottlingException(inner) => Error::ThrottlingException(inner),
284 crate::operation::delete_asset::DeleteAssetError::ValidationException(inner) => Error::ValidationException(inner),
285 crate::operation::delete_asset::DeleteAssetError::Unhandled(inner) => Error::Unhandled(inner),
286 }
287 }
288}
289impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::delete_data_grant::DeleteDataGrantError, R>> for Error
290where
291 R: Send + Sync + std::fmt::Debug + 'static,
292{
293 fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::delete_data_grant::DeleteDataGrantError, R>) -> Self {
294 match err {
295 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
296 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
297 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
298 source: err.into(),
299 }),
300 }
301 }
302}
303impl From<crate::operation::delete_data_grant::DeleteDataGrantError> for Error {
304 fn from(err: crate::operation::delete_data_grant::DeleteDataGrantError) -> Self {
305 match err {
306 crate::operation::delete_data_grant::DeleteDataGrantError::AccessDeniedException(inner) => Error::AccessDeniedException(inner),
307 crate::operation::delete_data_grant::DeleteDataGrantError::InternalServerException(inner) => Error::InternalServerException(inner),
308 crate::operation::delete_data_grant::DeleteDataGrantError::ResourceNotFoundException(inner) => Error::ResourceNotFoundException(inner),
309 crate::operation::delete_data_grant::DeleteDataGrantError::ThrottlingException(inner) => Error::ThrottlingException(inner),
310 crate::operation::delete_data_grant::DeleteDataGrantError::ValidationException(inner) => Error::ValidationException(inner),
311 crate::operation::delete_data_grant::DeleteDataGrantError::Unhandled(inner) => Error::Unhandled(inner),
312 }
313 }
314}
315impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::delete_data_set::DeleteDataSetError, 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::delete_data_set::DeleteDataSetError, 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::delete_data_set::DeleteDataSetError> for Error {
330 fn from(err: crate::operation::delete_data_set::DeleteDataSetError) -> Self {
331 match err {
332 crate::operation::delete_data_set::DeleteDataSetError::AccessDeniedException(inner) => Error::AccessDeniedException(inner),
333 crate::operation::delete_data_set::DeleteDataSetError::ConflictException(inner) => Error::ConflictException(inner),
334 crate::operation::delete_data_set::DeleteDataSetError::InternalServerException(inner) => Error::InternalServerException(inner),
335 crate::operation::delete_data_set::DeleteDataSetError::ResourceNotFoundException(inner) => Error::ResourceNotFoundException(inner),
336 crate::operation::delete_data_set::DeleteDataSetError::ThrottlingException(inner) => Error::ThrottlingException(inner),
337 crate::operation::delete_data_set::DeleteDataSetError::ValidationException(inner) => Error::ValidationException(inner),
338 crate::operation::delete_data_set::DeleteDataSetError::Unhandled(inner) => Error::Unhandled(inner),
339 }
340 }
341}
342impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::delete_event_action::DeleteEventActionError, R>> for Error
343where
344 R: Send + Sync + std::fmt::Debug + 'static,
345{
346 fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::delete_event_action::DeleteEventActionError, R>) -> Self {
347 match err {
348 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
349 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
350 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
351 source: err.into(),
352 }),
353 }
354 }
355}
356impl From<crate::operation::delete_event_action::DeleteEventActionError> for Error {
357 fn from(err: crate::operation::delete_event_action::DeleteEventActionError) -> Self {
358 match err {
359 crate::operation::delete_event_action::DeleteEventActionError::InternalServerException(inner) => Error::InternalServerException(inner),
360 crate::operation::delete_event_action::DeleteEventActionError::ResourceNotFoundException(inner) => {
361 Error::ResourceNotFoundException(inner)
362 }
363 crate::operation::delete_event_action::DeleteEventActionError::ThrottlingException(inner) => Error::ThrottlingException(inner),
364 crate::operation::delete_event_action::DeleteEventActionError::ValidationException(inner) => Error::ValidationException(inner),
365 crate::operation::delete_event_action::DeleteEventActionError::Unhandled(inner) => Error::Unhandled(inner),
366 }
367 }
368}
369impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::delete_revision::DeleteRevisionError, R>> for Error
370where
371 R: Send + Sync + std::fmt::Debug + 'static,
372{
373 fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::delete_revision::DeleteRevisionError, R>) -> Self {
374 match err {
375 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
376 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
377 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
378 source: err.into(),
379 }),
380 }
381 }
382}
383impl From<crate::operation::delete_revision::DeleteRevisionError> for Error {
384 fn from(err: crate::operation::delete_revision::DeleteRevisionError) -> Self {
385 match err {
386 crate::operation::delete_revision::DeleteRevisionError::AccessDeniedException(inner) => Error::AccessDeniedException(inner),
387 crate::operation::delete_revision::DeleteRevisionError::ConflictException(inner) => Error::ConflictException(inner),
388 crate::operation::delete_revision::DeleteRevisionError::InternalServerException(inner) => Error::InternalServerException(inner),
389 crate::operation::delete_revision::DeleteRevisionError::ResourceNotFoundException(inner) => Error::ResourceNotFoundException(inner),
390 crate::operation::delete_revision::DeleteRevisionError::ThrottlingException(inner) => Error::ThrottlingException(inner),
391 crate::operation::delete_revision::DeleteRevisionError::ValidationException(inner) => Error::ValidationException(inner),
392 crate::operation::delete_revision::DeleteRevisionError::Unhandled(inner) => Error::Unhandled(inner),
393 }
394 }
395}
396impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::get_asset::GetAssetError, R>> for Error
397where
398 R: Send + Sync + std::fmt::Debug + 'static,
399{
400 fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::get_asset::GetAssetError, R>) -> Self {
401 match err {
402 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
403 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
404 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
405 source: err.into(),
406 }),
407 }
408 }
409}
410impl From<crate::operation::get_asset::GetAssetError> for Error {
411 fn from(err: crate::operation::get_asset::GetAssetError) -> Self {
412 match err {
413 crate::operation::get_asset::GetAssetError::InternalServerException(inner) => Error::InternalServerException(inner),
414 crate::operation::get_asset::GetAssetError::ResourceNotFoundException(inner) => Error::ResourceNotFoundException(inner),
415 crate::operation::get_asset::GetAssetError::ThrottlingException(inner) => Error::ThrottlingException(inner),
416 crate::operation::get_asset::GetAssetError::ValidationException(inner) => Error::ValidationException(inner),
417 crate::operation::get_asset::GetAssetError::Unhandled(inner) => Error::Unhandled(inner),
418 }
419 }
420}
421impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::get_data_grant::GetDataGrantError, R>> for Error
422where
423 R: Send + Sync + std::fmt::Debug + 'static,
424{
425 fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::get_data_grant::GetDataGrantError, R>) -> Self {
426 match err {
427 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
428 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
429 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
430 source: err.into(),
431 }),
432 }
433 }
434}
435impl From<crate::operation::get_data_grant::GetDataGrantError> for Error {
436 fn from(err: crate::operation::get_data_grant::GetDataGrantError) -> Self {
437 match err {
438 crate::operation::get_data_grant::GetDataGrantError::AccessDeniedException(inner) => Error::AccessDeniedException(inner),
439 crate::operation::get_data_grant::GetDataGrantError::InternalServerException(inner) => Error::InternalServerException(inner),
440 crate::operation::get_data_grant::GetDataGrantError::ResourceNotFoundException(inner) => Error::ResourceNotFoundException(inner),
441 crate::operation::get_data_grant::GetDataGrantError::ThrottlingException(inner) => Error::ThrottlingException(inner),
442 crate::operation::get_data_grant::GetDataGrantError::ValidationException(inner) => Error::ValidationException(inner),
443 crate::operation::get_data_grant::GetDataGrantError::Unhandled(inner) => Error::Unhandled(inner),
444 }
445 }
446}
447impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::get_data_set::GetDataSetError, R>> for Error
448where
449 R: Send + Sync + std::fmt::Debug + 'static,
450{
451 fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::get_data_set::GetDataSetError, R>) -> Self {
452 match err {
453 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
454 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
455 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
456 source: err.into(),
457 }),
458 }
459 }
460}
461impl From<crate::operation::get_data_set::GetDataSetError> for Error {
462 fn from(err: crate::operation::get_data_set::GetDataSetError) -> Self {
463 match err {
464 crate::operation::get_data_set::GetDataSetError::InternalServerException(inner) => Error::InternalServerException(inner),
465 crate::operation::get_data_set::GetDataSetError::ResourceNotFoundException(inner) => Error::ResourceNotFoundException(inner),
466 crate::operation::get_data_set::GetDataSetError::ThrottlingException(inner) => Error::ThrottlingException(inner),
467 crate::operation::get_data_set::GetDataSetError::ValidationException(inner) => Error::ValidationException(inner),
468 crate::operation::get_data_set::GetDataSetError::Unhandled(inner) => Error::Unhandled(inner),
469 }
470 }
471}
472impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::get_event_action::GetEventActionError, R>> for Error
473where
474 R: Send + Sync + std::fmt::Debug + 'static,
475{
476 fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::get_event_action::GetEventActionError, R>) -> 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::get_event_action::GetEventActionError> for Error {
487 fn from(err: crate::operation::get_event_action::GetEventActionError) -> Self {
488 match err {
489 crate::operation::get_event_action::GetEventActionError::InternalServerException(inner) => Error::InternalServerException(inner),
490 crate::operation::get_event_action::GetEventActionError::ResourceNotFoundException(inner) => Error::ResourceNotFoundException(inner),
491 crate::operation::get_event_action::GetEventActionError::ThrottlingException(inner) => Error::ThrottlingException(inner),
492 crate::operation::get_event_action::GetEventActionError::ValidationException(inner) => Error::ValidationException(inner),
493 crate::operation::get_event_action::GetEventActionError::Unhandled(inner) => Error::Unhandled(inner),
494 }
495 }
496}
497impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::get_job::GetJobError, 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::get_job::GetJobError, 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::get_job::GetJobError> for Error {
512 fn from(err: crate::operation::get_job::GetJobError) -> Self {
513 match err {
514 crate::operation::get_job::GetJobError::InternalServerException(inner) => Error::InternalServerException(inner),
515 crate::operation::get_job::GetJobError::ResourceNotFoundException(inner) => Error::ResourceNotFoundException(inner),
516 crate::operation::get_job::GetJobError::ThrottlingException(inner) => Error::ThrottlingException(inner),
517 crate::operation::get_job::GetJobError::ValidationException(inner) => Error::ValidationException(inner),
518 crate::operation::get_job::GetJobError::Unhandled(inner) => Error::Unhandled(inner),
519 }
520 }
521}
522impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::get_received_data_grant::GetReceivedDataGrantError, R>> for Error
523where
524 R: Send + Sync + std::fmt::Debug + 'static,
525{
526 fn from(
527 err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::get_received_data_grant::GetReceivedDataGrantError, R>,
528 ) -> Self {
529 match err {
530 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
531 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
532 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
533 source: err.into(),
534 }),
535 }
536 }
537}
538impl From<crate::operation::get_received_data_grant::GetReceivedDataGrantError> for Error {
539 fn from(err: crate::operation::get_received_data_grant::GetReceivedDataGrantError) -> Self {
540 match err {
541 crate::operation::get_received_data_grant::GetReceivedDataGrantError::AccessDeniedException(inner) => Error::AccessDeniedException(inner),
542 crate::operation::get_received_data_grant::GetReceivedDataGrantError::InternalServerException(inner) => {
543 Error::InternalServerException(inner)
544 }
545 crate::operation::get_received_data_grant::GetReceivedDataGrantError::ResourceNotFoundException(inner) => {
546 Error::ResourceNotFoundException(inner)
547 }
548 crate::operation::get_received_data_grant::GetReceivedDataGrantError::ThrottlingException(inner) => Error::ThrottlingException(inner),
549 crate::operation::get_received_data_grant::GetReceivedDataGrantError::ValidationException(inner) => Error::ValidationException(inner),
550 crate::operation::get_received_data_grant::GetReceivedDataGrantError::Unhandled(inner) => Error::Unhandled(inner),
551 }
552 }
553}
554impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::get_revision::GetRevisionError, R>> for Error
555where
556 R: Send + Sync + std::fmt::Debug + 'static,
557{
558 fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::get_revision::GetRevisionError, R>) -> Self {
559 match err {
560 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
561 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
562 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
563 source: err.into(),
564 }),
565 }
566 }
567}
568impl From<crate::operation::get_revision::GetRevisionError> for Error {
569 fn from(err: crate::operation::get_revision::GetRevisionError) -> Self {
570 match err {
571 crate::operation::get_revision::GetRevisionError::InternalServerException(inner) => Error::InternalServerException(inner),
572 crate::operation::get_revision::GetRevisionError::ResourceNotFoundException(inner) => Error::ResourceNotFoundException(inner),
573 crate::operation::get_revision::GetRevisionError::ThrottlingException(inner) => Error::ThrottlingException(inner),
574 crate::operation::get_revision::GetRevisionError::ValidationException(inner) => Error::ValidationException(inner),
575 crate::operation::get_revision::GetRevisionError::Unhandled(inner) => Error::Unhandled(inner),
576 }
577 }
578}
579impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::list_data_grants::ListDataGrantsError, R>> for Error
580where
581 R: Send + Sync + std::fmt::Debug + 'static,
582{
583 fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::list_data_grants::ListDataGrantsError, R>) -> Self {
584 match err {
585 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
586 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
587 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
588 source: err.into(),
589 }),
590 }
591 }
592}
593impl From<crate::operation::list_data_grants::ListDataGrantsError> for Error {
594 fn from(err: crate::operation::list_data_grants::ListDataGrantsError) -> Self {
595 match err {
596 crate::operation::list_data_grants::ListDataGrantsError::AccessDeniedException(inner) => Error::AccessDeniedException(inner),
597 crate::operation::list_data_grants::ListDataGrantsError::InternalServerException(inner) => Error::InternalServerException(inner),
598 crate::operation::list_data_grants::ListDataGrantsError::ResourceNotFoundException(inner) => Error::ResourceNotFoundException(inner),
599 crate::operation::list_data_grants::ListDataGrantsError::ThrottlingException(inner) => Error::ThrottlingException(inner),
600 crate::operation::list_data_grants::ListDataGrantsError::ValidationException(inner) => Error::ValidationException(inner),
601 crate::operation::list_data_grants::ListDataGrantsError::Unhandled(inner) => Error::Unhandled(inner),
602 }
603 }
604}
605impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::list_data_set_revisions::ListDataSetRevisionsError, R>> for Error
606where
607 R: Send + Sync + std::fmt::Debug + 'static,
608{
609 fn from(
610 err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::list_data_set_revisions::ListDataSetRevisionsError, R>,
611 ) -> Self {
612 match err {
613 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
614 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
615 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
616 source: err.into(),
617 }),
618 }
619 }
620}
621impl From<crate::operation::list_data_set_revisions::ListDataSetRevisionsError> for Error {
622 fn from(err: crate::operation::list_data_set_revisions::ListDataSetRevisionsError) -> Self {
623 match err {
624 crate::operation::list_data_set_revisions::ListDataSetRevisionsError::InternalServerException(inner) => {
625 Error::InternalServerException(inner)
626 }
627 crate::operation::list_data_set_revisions::ListDataSetRevisionsError::ResourceNotFoundException(inner) => {
628 Error::ResourceNotFoundException(inner)
629 }
630 crate::operation::list_data_set_revisions::ListDataSetRevisionsError::ThrottlingException(inner) => Error::ThrottlingException(inner),
631 crate::operation::list_data_set_revisions::ListDataSetRevisionsError::ValidationException(inner) => Error::ValidationException(inner),
632 crate::operation::list_data_set_revisions::ListDataSetRevisionsError::Unhandled(inner) => Error::Unhandled(inner),
633 }
634 }
635}
636impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::list_data_sets::ListDataSetsError, R>> for Error
637where
638 R: Send + Sync + std::fmt::Debug + 'static,
639{
640 fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::list_data_sets::ListDataSetsError, R>) -> Self {
641 match err {
642 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
643 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
644 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
645 source: err.into(),
646 }),
647 }
648 }
649}
650impl From<crate::operation::list_data_sets::ListDataSetsError> for Error {
651 fn from(err: crate::operation::list_data_sets::ListDataSetsError) -> Self {
652 match err {
653 crate::operation::list_data_sets::ListDataSetsError::InternalServerException(inner) => Error::InternalServerException(inner),
654 crate::operation::list_data_sets::ListDataSetsError::ResourceNotFoundException(inner) => Error::ResourceNotFoundException(inner),
655 crate::operation::list_data_sets::ListDataSetsError::ThrottlingException(inner) => Error::ThrottlingException(inner),
656 crate::operation::list_data_sets::ListDataSetsError::ValidationException(inner) => Error::ValidationException(inner),
657 crate::operation::list_data_sets::ListDataSetsError::Unhandled(inner) => Error::Unhandled(inner),
658 }
659 }
660}
661impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::list_event_actions::ListEventActionsError, R>> for Error
662where
663 R: Send + Sync + std::fmt::Debug + 'static,
664{
665 fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::list_event_actions::ListEventActionsError, R>) -> Self {
666 match err {
667 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
668 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
669 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
670 source: err.into(),
671 }),
672 }
673 }
674}
675impl From<crate::operation::list_event_actions::ListEventActionsError> for Error {
676 fn from(err: crate::operation::list_event_actions::ListEventActionsError) -> Self {
677 match err {
678 crate::operation::list_event_actions::ListEventActionsError::InternalServerException(inner) => Error::InternalServerException(inner),
679 crate::operation::list_event_actions::ListEventActionsError::ResourceNotFoundException(inner) => Error::ResourceNotFoundException(inner),
680 crate::operation::list_event_actions::ListEventActionsError::ThrottlingException(inner) => Error::ThrottlingException(inner),
681 crate::operation::list_event_actions::ListEventActionsError::ValidationException(inner) => Error::ValidationException(inner),
682 crate::operation::list_event_actions::ListEventActionsError::Unhandled(inner) => Error::Unhandled(inner),
683 }
684 }
685}
686impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::list_jobs::ListJobsError, R>> for Error
687where
688 R: Send + Sync + std::fmt::Debug + 'static,
689{
690 fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::list_jobs::ListJobsError, R>) -> Self {
691 match err {
692 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
693 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
694 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
695 source: err.into(),
696 }),
697 }
698 }
699}
700impl From<crate::operation::list_jobs::ListJobsError> for Error {
701 fn from(err: crate::operation::list_jobs::ListJobsError) -> Self {
702 match err {
703 crate::operation::list_jobs::ListJobsError::InternalServerException(inner) => Error::InternalServerException(inner),
704 crate::operation::list_jobs::ListJobsError::ResourceNotFoundException(inner) => Error::ResourceNotFoundException(inner),
705 crate::operation::list_jobs::ListJobsError::ThrottlingException(inner) => Error::ThrottlingException(inner),
706 crate::operation::list_jobs::ListJobsError::ValidationException(inner) => Error::ValidationException(inner),
707 crate::operation::list_jobs::ListJobsError::Unhandled(inner) => Error::Unhandled(inner),
708 }
709 }
710}
711impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::list_received_data_grants::ListReceivedDataGrantsError, R>>
712 for Error
713where
714 R: Send + Sync + std::fmt::Debug + 'static,
715{
716 fn from(
717 err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::list_received_data_grants::ListReceivedDataGrantsError, R>,
718 ) -> Self {
719 match err {
720 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
721 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
722 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
723 source: err.into(),
724 }),
725 }
726 }
727}
728impl From<crate::operation::list_received_data_grants::ListReceivedDataGrantsError> for Error {
729 fn from(err: crate::operation::list_received_data_grants::ListReceivedDataGrantsError) -> Self {
730 match err {
731 crate::operation::list_received_data_grants::ListReceivedDataGrantsError::AccessDeniedException(inner) => {
732 Error::AccessDeniedException(inner)
733 }
734 crate::operation::list_received_data_grants::ListReceivedDataGrantsError::InternalServerException(inner) => {
735 Error::InternalServerException(inner)
736 }
737 crate::operation::list_received_data_grants::ListReceivedDataGrantsError::ResourceNotFoundException(inner) => {
738 Error::ResourceNotFoundException(inner)
739 }
740 crate::operation::list_received_data_grants::ListReceivedDataGrantsError::ThrottlingException(inner) => Error::ThrottlingException(inner),
741 crate::operation::list_received_data_grants::ListReceivedDataGrantsError::ValidationException(inner) => Error::ValidationException(inner),
742 crate::operation::list_received_data_grants::ListReceivedDataGrantsError::Unhandled(inner) => Error::Unhandled(inner),
743 }
744 }
745}
746impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::list_revision_assets::ListRevisionAssetsError, R>> for Error
747where
748 R: Send + Sync + std::fmt::Debug + 'static,
749{
750 fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::list_revision_assets::ListRevisionAssetsError, R>) -> Self {
751 match err {
752 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
753 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
754 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
755 source: err.into(),
756 }),
757 }
758 }
759}
760impl From<crate::operation::list_revision_assets::ListRevisionAssetsError> for Error {
761 fn from(err: crate::operation::list_revision_assets::ListRevisionAssetsError) -> Self {
762 match err {
763 crate::operation::list_revision_assets::ListRevisionAssetsError::InternalServerException(inner) => Error::InternalServerException(inner),
764 crate::operation::list_revision_assets::ListRevisionAssetsError::ResourceNotFoundException(inner) => {
765 Error::ResourceNotFoundException(inner)
766 }
767 crate::operation::list_revision_assets::ListRevisionAssetsError::ThrottlingException(inner) => Error::ThrottlingException(inner),
768 crate::operation::list_revision_assets::ListRevisionAssetsError::ValidationException(inner) => Error::ValidationException(inner),
769 crate::operation::list_revision_assets::ListRevisionAssetsError::Unhandled(inner) => Error::Unhandled(inner),
770 }
771 }
772}
773impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::list_tags_for_resource::ListTagsForResourceError, R>> for Error
774where
775 R: Send + Sync + std::fmt::Debug + 'static,
776{
777 fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::list_tags_for_resource::ListTagsForResourceError, R>) -> Self {
778 match err {
779 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
780 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
781 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
782 source: err.into(),
783 }),
784 }
785 }
786}
787impl From<crate::operation::list_tags_for_resource::ListTagsForResourceError> for Error {
788 fn from(err: crate::operation::list_tags_for_resource::ListTagsForResourceError) -> Self {
789 match err {
790 crate::operation::list_tags_for_resource::ListTagsForResourceError::Unhandled(inner) => Error::Unhandled(inner),
791 }
792 }
793}
794impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::revoke_revision::RevokeRevisionError, R>> for Error
795where
796 R: Send + Sync + std::fmt::Debug + 'static,
797{
798 fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::revoke_revision::RevokeRevisionError, R>) -> Self {
799 match err {
800 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
801 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
802 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
803 source: err.into(),
804 }),
805 }
806 }
807}
808impl From<crate::operation::revoke_revision::RevokeRevisionError> for Error {
809 fn from(err: crate::operation::revoke_revision::RevokeRevisionError) -> Self {
810 match err {
811 crate::operation::revoke_revision::RevokeRevisionError::AccessDeniedException(inner) => Error::AccessDeniedException(inner),
812 crate::operation::revoke_revision::RevokeRevisionError::ConflictException(inner) => Error::ConflictException(inner),
813 crate::operation::revoke_revision::RevokeRevisionError::InternalServerException(inner) => Error::InternalServerException(inner),
814 crate::operation::revoke_revision::RevokeRevisionError::ResourceNotFoundException(inner) => Error::ResourceNotFoundException(inner),
815 crate::operation::revoke_revision::RevokeRevisionError::ThrottlingException(inner) => Error::ThrottlingException(inner),
816 crate::operation::revoke_revision::RevokeRevisionError::ValidationException(inner) => Error::ValidationException(inner),
817 crate::operation::revoke_revision::RevokeRevisionError::Unhandled(inner) => Error::Unhandled(inner),
818 }
819 }
820}
821impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::send_api_asset::SendApiAssetError, R>> for Error
822where
823 R: Send + Sync + std::fmt::Debug + 'static,
824{
825 fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::send_api_asset::SendApiAssetError, R>) -> Self {
826 match err {
827 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
828 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
829 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
830 source: err.into(),
831 }),
832 }
833 }
834}
835impl From<crate::operation::send_api_asset::SendApiAssetError> for Error {
836 fn from(err: crate::operation::send_api_asset::SendApiAssetError) -> Self {
837 match err {
838 crate::operation::send_api_asset::SendApiAssetError::AccessDeniedException(inner) => Error::AccessDeniedException(inner),
839 crate::operation::send_api_asset::SendApiAssetError::InternalServerException(inner) => Error::InternalServerException(inner),
840 crate::operation::send_api_asset::SendApiAssetError::ResourceNotFoundException(inner) => Error::ResourceNotFoundException(inner),
841 crate::operation::send_api_asset::SendApiAssetError::ThrottlingException(inner) => Error::ThrottlingException(inner),
842 crate::operation::send_api_asset::SendApiAssetError::ValidationException(inner) => Error::ValidationException(inner),
843 crate::operation::send_api_asset::SendApiAssetError::Unhandled(inner) => Error::Unhandled(inner),
844 }
845 }
846}
847impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::send_data_set_notification::SendDataSetNotificationError, R>>
848 for Error
849where
850 R: Send + Sync + std::fmt::Debug + 'static,
851{
852 fn from(
853 err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::send_data_set_notification::SendDataSetNotificationError, R>,
854 ) -> Self {
855 match err {
856 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
857 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
858 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
859 source: err.into(),
860 }),
861 }
862 }
863}
864impl From<crate::operation::send_data_set_notification::SendDataSetNotificationError> for Error {
865 fn from(err: crate::operation::send_data_set_notification::SendDataSetNotificationError) -> Self {
866 match err {
867 crate::operation::send_data_set_notification::SendDataSetNotificationError::AccessDeniedException(inner) => {
868 Error::AccessDeniedException(inner)
869 }
870 crate::operation::send_data_set_notification::SendDataSetNotificationError::ConflictException(inner) => Error::ConflictException(inner),
871 crate::operation::send_data_set_notification::SendDataSetNotificationError::InternalServerException(inner) => {
872 Error::InternalServerException(inner)
873 }
874 crate::operation::send_data_set_notification::SendDataSetNotificationError::ResourceNotFoundException(inner) => {
875 Error::ResourceNotFoundException(inner)
876 }
877 crate::operation::send_data_set_notification::SendDataSetNotificationError::ThrottlingException(inner) => {
878 Error::ThrottlingException(inner)
879 }
880 crate::operation::send_data_set_notification::SendDataSetNotificationError::ValidationException(inner) => {
881 Error::ValidationException(inner)
882 }
883 crate::operation::send_data_set_notification::SendDataSetNotificationError::Unhandled(inner) => Error::Unhandled(inner),
884 }
885 }
886}
887impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::start_job::StartJobError, R>> for Error
888where
889 R: Send + Sync + std::fmt::Debug + 'static,
890{
891 fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::start_job::StartJobError, R>) -> Self {
892 match err {
893 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
894 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
895 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
896 source: err.into(),
897 }),
898 }
899 }
900}
901impl From<crate::operation::start_job::StartJobError> for Error {
902 fn from(err: crate::operation::start_job::StartJobError) -> Self {
903 match err {
904 crate::operation::start_job::StartJobError::AccessDeniedException(inner) => Error::AccessDeniedException(inner),
905 crate::operation::start_job::StartJobError::ConflictException(inner) => Error::ConflictException(inner),
906 crate::operation::start_job::StartJobError::InternalServerException(inner) => Error::InternalServerException(inner),
907 crate::operation::start_job::StartJobError::ResourceNotFoundException(inner) => Error::ResourceNotFoundException(inner),
908 crate::operation::start_job::StartJobError::ThrottlingException(inner) => Error::ThrottlingException(inner),
909 crate::operation::start_job::StartJobError::ValidationException(inner) => Error::ValidationException(inner),
910 crate::operation::start_job::StartJobError::Unhandled(inner) => Error::Unhandled(inner),
911 }
912 }
913}
914impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::tag_resource::TagResourceError, R>> for Error
915where
916 R: Send + Sync + std::fmt::Debug + 'static,
917{
918 fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::tag_resource::TagResourceError, R>) -> Self {
919 match err {
920 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
921 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
922 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
923 source: err.into(),
924 }),
925 }
926 }
927}
928impl From<crate::operation::tag_resource::TagResourceError> for Error {
929 fn from(err: crate::operation::tag_resource::TagResourceError) -> Self {
930 match err {
931 crate::operation::tag_resource::TagResourceError::Unhandled(inner) => Error::Unhandled(inner),
932 }
933 }
934}
935impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::untag_resource::UntagResourceError, R>> for Error
936where
937 R: Send + Sync + std::fmt::Debug + 'static,
938{
939 fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::untag_resource::UntagResourceError, R>) -> Self {
940 match err {
941 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
942 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
943 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
944 source: err.into(),
945 }),
946 }
947 }
948}
949impl From<crate::operation::untag_resource::UntagResourceError> for Error {
950 fn from(err: crate::operation::untag_resource::UntagResourceError) -> Self {
951 match err {
952 crate::operation::untag_resource::UntagResourceError::Unhandled(inner) => Error::Unhandled(inner),
953 }
954 }
955}
956impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::update_asset::UpdateAssetError, R>> for Error
957where
958 R: Send + Sync + std::fmt::Debug + 'static,
959{
960 fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::update_asset::UpdateAssetError, R>) -> Self {
961 match err {
962 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
963 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
964 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
965 source: err.into(),
966 }),
967 }
968 }
969}
970impl From<crate::operation::update_asset::UpdateAssetError> for Error {
971 fn from(err: crate::operation::update_asset::UpdateAssetError) -> Self {
972 match err {
973 crate::operation::update_asset::UpdateAssetError::AccessDeniedException(inner) => Error::AccessDeniedException(inner),
974 crate::operation::update_asset::UpdateAssetError::ConflictException(inner) => Error::ConflictException(inner),
975 crate::operation::update_asset::UpdateAssetError::InternalServerException(inner) => Error::InternalServerException(inner),
976 crate::operation::update_asset::UpdateAssetError::ResourceNotFoundException(inner) => Error::ResourceNotFoundException(inner),
977 crate::operation::update_asset::UpdateAssetError::ThrottlingException(inner) => Error::ThrottlingException(inner),
978 crate::operation::update_asset::UpdateAssetError::ValidationException(inner) => Error::ValidationException(inner),
979 crate::operation::update_asset::UpdateAssetError::Unhandled(inner) => Error::Unhandled(inner),
980 }
981 }
982}
983impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::update_data_set::UpdateDataSetError, R>> for Error
984where
985 R: Send + Sync + std::fmt::Debug + 'static,
986{
987 fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::update_data_set::UpdateDataSetError, R>) -> Self {
988 match err {
989 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
990 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
991 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
992 source: err.into(),
993 }),
994 }
995 }
996}
997impl From<crate::operation::update_data_set::UpdateDataSetError> for Error {
998 fn from(err: crate::operation::update_data_set::UpdateDataSetError) -> Self {
999 match err {
1000 crate::operation::update_data_set::UpdateDataSetError::AccessDeniedException(inner) => Error::AccessDeniedException(inner),
1001 crate::operation::update_data_set::UpdateDataSetError::InternalServerException(inner) => Error::InternalServerException(inner),
1002 crate::operation::update_data_set::UpdateDataSetError::ResourceNotFoundException(inner) => Error::ResourceNotFoundException(inner),
1003 crate::operation::update_data_set::UpdateDataSetError::ThrottlingException(inner) => Error::ThrottlingException(inner),
1004 crate::operation::update_data_set::UpdateDataSetError::ValidationException(inner) => Error::ValidationException(inner),
1005 crate::operation::update_data_set::UpdateDataSetError::Unhandled(inner) => Error::Unhandled(inner),
1006 }
1007 }
1008}
1009impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::update_event_action::UpdateEventActionError, R>> for Error
1010where
1011 R: Send + Sync + std::fmt::Debug + 'static,
1012{
1013 fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::update_event_action::UpdateEventActionError, R>) -> Self {
1014 match err {
1015 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
1016 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
1017 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
1018 source: err.into(),
1019 }),
1020 }
1021 }
1022}
1023impl From<crate::operation::update_event_action::UpdateEventActionError> for Error {
1024 fn from(err: crate::operation::update_event_action::UpdateEventActionError) -> Self {
1025 match err {
1026 crate::operation::update_event_action::UpdateEventActionError::AccessDeniedException(inner) => Error::AccessDeniedException(inner),
1027 crate::operation::update_event_action::UpdateEventActionError::InternalServerException(inner) => Error::InternalServerException(inner),
1028 crate::operation::update_event_action::UpdateEventActionError::ResourceNotFoundException(inner) => {
1029 Error::ResourceNotFoundException(inner)
1030 }
1031 crate::operation::update_event_action::UpdateEventActionError::ThrottlingException(inner) => Error::ThrottlingException(inner),
1032 crate::operation::update_event_action::UpdateEventActionError::ValidationException(inner) => Error::ValidationException(inner),
1033 crate::operation::update_event_action::UpdateEventActionError::Unhandled(inner) => Error::Unhandled(inner),
1034 }
1035 }
1036}
1037impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::update_revision::UpdateRevisionError, R>> for Error
1038where
1039 R: Send + Sync + std::fmt::Debug + 'static,
1040{
1041 fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::update_revision::UpdateRevisionError, R>) -> Self {
1042 match err {
1043 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
1044 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
1045 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
1046 source: err.into(),
1047 }),
1048 }
1049 }
1050}
1051impl From<crate::operation::update_revision::UpdateRevisionError> for Error {
1052 fn from(err: crate::operation::update_revision::UpdateRevisionError) -> Self {
1053 match err {
1054 crate::operation::update_revision::UpdateRevisionError::AccessDeniedException(inner) => Error::AccessDeniedException(inner),
1055 crate::operation::update_revision::UpdateRevisionError::ConflictException(inner) => Error::ConflictException(inner),
1056 crate::operation::update_revision::UpdateRevisionError::InternalServerException(inner) => Error::InternalServerException(inner),
1057 crate::operation::update_revision::UpdateRevisionError::ResourceNotFoundException(inner) => Error::ResourceNotFoundException(inner),
1058 crate::operation::update_revision::UpdateRevisionError::ThrottlingException(inner) => Error::ThrottlingException(inner),
1059 crate::operation::update_revision::UpdateRevisionError::ValidationException(inner) => Error::ValidationException(inner),
1060 crate::operation::update_revision::UpdateRevisionError::Unhandled(inner) => Error::Unhandled(inner),
1061 }
1062 }
1063}
1064impl ::std::error::Error for Error {
1065 fn source(&self) -> std::option::Option<&(dyn ::std::error::Error + 'static)> {
1066 match self {
1067 Error::AccessDeniedException(inner) => inner.source(),
1068 Error::ConflictException(inner) => inner.source(),
1069 Error::InternalServerException(inner) => inner.source(),
1070 Error::ResourceNotFoundException(inner) => inner.source(),
1071 Error::ServiceLimitExceededException(inner) => inner.source(),
1072 Error::ThrottlingException(inner) => inner.source(),
1073 Error::ValidationException(inner) => inner.source(),
1074 Error::Unhandled(inner) => ::std::option::Option::Some(&*inner.source),
1075 }
1076 }
1077}
1078impl ::aws_types::request_id::RequestId for Error {
1079 fn request_id(&self) -> Option<&str> {
1080 match self {
1081 Self::AccessDeniedException(e) => e.request_id(),
1082 Self::ConflictException(e) => e.request_id(),
1083 Self::InternalServerException(e) => e.request_id(),
1084 Self::ResourceNotFoundException(e) => e.request_id(),
1085 Self::ServiceLimitExceededException(e) => e.request_id(),
1086 Self::ThrottlingException(e) => e.request_id(),
1087 Self::ValidationException(e) => e.request_id(),
1088 Self::Unhandled(e) => e.meta.request_id(),
1089 }
1090 }
1091}