1#[non_exhaustive]
4#[derive(::std::fmt::Debug)]
5pub enum Error {
6 AccessDeniedException(crate::types::error::AccessDeniedException),
8 ConcurrentModificationException(crate::types::error::ConcurrentModificationException),
10 IllegalStatusException(crate::types::error::IllegalStatusException),
12 InternalException(crate::types::error::InternalException),
14 InvalidEventPatternException(crate::types::error::InvalidEventPatternException),
16 InvalidStateException(crate::types::error::InvalidStateException),
18 LimitExceededException(crate::types::error::LimitExceededException),
20 ManagedRuleException(crate::types::error::ManagedRuleException),
22 OperationDisabledException(crate::types::error::OperationDisabledException),
24 PolicyLengthExceededException(crate::types::error::PolicyLengthExceededException),
26 ResourceAlreadyExistsException(crate::types::error::ResourceAlreadyExistsException),
28 ResourceNotFoundException(crate::types::error::ResourceNotFoundException),
30 ThrottlingException(crate::types::error::ThrottlingException),
32 #[deprecated(note = "Matching `Unhandled` directly is not forwards compatible. Instead, match using a \
34 variable wildcard pattern and check `.code()`:
35 \
36 `err if err.code() == Some(\"SpecificExceptionCode\") => { /* handle the error */ }`
37 \
38 See [`ProvideErrorMetadata`](#impl-ProvideErrorMetadata-for-Error) for what information is available for the error.")]
39 Unhandled(crate::error::sealed_unhandled::Unhandled),
40}
41impl ::std::fmt::Display for Error {
42 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
43 match self {
44 Error::AccessDeniedException(inner) => inner.fmt(f),
45 Error::ConcurrentModificationException(inner) => inner.fmt(f),
46 Error::IllegalStatusException(inner) => inner.fmt(f),
47 Error::InternalException(inner) => inner.fmt(f),
48 Error::InvalidEventPatternException(inner) => inner.fmt(f),
49 Error::InvalidStateException(inner) => inner.fmt(f),
50 Error::LimitExceededException(inner) => inner.fmt(f),
51 Error::ManagedRuleException(inner) => inner.fmt(f),
52 Error::OperationDisabledException(inner) => inner.fmt(f),
53 Error::PolicyLengthExceededException(inner) => inner.fmt(f),
54 Error::ResourceAlreadyExistsException(inner) => inner.fmt(f),
55 Error::ResourceNotFoundException(inner) => inner.fmt(f),
56 Error::ThrottlingException(inner) => inner.fmt(f),
57 Error::Unhandled(_) => {
58 if let ::std::option::Option::Some(code) = ::aws_smithy_types::error::metadata::ProvideErrorMetadata::code(self) {
59 write!(f, "unhandled error ({code})")
60 } else {
61 f.write_str("unhandled error")
62 }
63 }
64 }
65 }
66}
67impl From<::aws_smithy_types::error::operation::BuildError> for Error {
68 fn from(value: ::aws_smithy_types::error::operation::BuildError) -> Self {
69 Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
70 source: value.into(),
71 meta: ::std::default::Default::default(),
72 })
73 }
74}
75impl ::aws_smithy_types::error::metadata::ProvideErrorMetadata for Error {
76 fn meta(&self) -> &::aws_smithy_types::error::metadata::ErrorMetadata {
77 match self {
78 Self::AccessDeniedException(inner) => inner.meta(),
79 Self::ConcurrentModificationException(inner) => inner.meta(),
80 Self::IllegalStatusException(inner) => inner.meta(),
81 Self::InternalException(inner) => inner.meta(),
82 Self::InvalidEventPatternException(inner) => inner.meta(),
83 Self::InvalidStateException(inner) => inner.meta(),
84 Self::LimitExceededException(inner) => inner.meta(),
85 Self::ManagedRuleException(inner) => inner.meta(),
86 Self::OperationDisabledException(inner) => inner.meta(),
87 Self::PolicyLengthExceededException(inner) => inner.meta(),
88 Self::ResourceAlreadyExistsException(inner) => inner.meta(),
89 Self::ResourceNotFoundException(inner) => inner.meta(),
90 Self::ThrottlingException(inner) => inner.meta(),
91 Self::Unhandled(inner) => &inner.meta,
92 }
93 }
94}
95impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::activate_event_source::ActivateEventSourceError, R>> for Error
96where
97 R: Send + Sync + std::fmt::Debug + 'static,
98{
99 fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::activate_event_source::ActivateEventSourceError, R>) -> Self {
100 match err {
101 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
102 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
103 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
104 source: err.into(),
105 }),
106 }
107 }
108}
109impl From<crate::operation::activate_event_source::ActivateEventSourceError> for Error {
110 fn from(err: crate::operation::activate_event_source::ActivateEventSourceError) -> Self {
111 match err {
112 crate::operation::activate_event_source::ActivateEventSourceError::ConcurrentModificationException(inner) => {
113 Error::ConcurrentModificationException(inner)
114 }
115 crate::operation::activate_event_source::ActivateEventSourceError::InternalException(inner) => Error::InternalException(inner),
116 crate::operation::activate_event_source::ActivateEventSourceError::InvalidStateException(inner) => Error::InvalidStateException(inner),
117 crate::operation::activate_event_source::ActivateEventSourceError::OperationDisabledException(inner) => {
118 Error::OperationDisabledException(inner)
119 }
120 crate::operation::activate_event_source::ActivateEventSourceError::ResourceNotFoundException(inner) => {
121 Error::ResourceNotFoundException(inner)
122 }
123 crate::operation::activate_event_source::ActivateEventSourceError::Unhandled(inner) => Error::Unhandled(inner),
124 }
125 }
126}
127impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::cancel_replay::CancelReplayError, R>> for Error
128where
129 R: Send + Sync + std::fmt::Debug + 'static,
130{
131 fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::cancel_replay::CancelReplayError, R>) -> Self {
132 match err {
133 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
134 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
135 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
136 source: err.into(),
137 }),
138 }
139 }
140}
141impl From<crate::operation::cancel_replay::CancelReplayError> for Error {
142 fn from(err: crate::operation::cancel_replay::CancelReplayError) -> Self {
143 match err {
144 crate::operation::cancel_replay::CancelReplayError::ConcurrentModificationException(inner) => {
145 Error::ConcurrentModificationException(inner)
146 }
147 crate::operation::cancel_replay::CancelReplayError::IllegalStatusException(inner) => Error::IllegalStatusException(inner),
148 crate::operation::cancel_replay::CancelReplayError::InternalException(inner) => Error::InternalException(inner),
149 crate::operation::cancel_replay::CancelReplayError::ResourceNotFoundException(inner) => Error::ResourceNotFoundException(inner),
150 crate::operation::cancel_replay::CancelReplayError::Unhandled(inner) => Error::Unhandled(inner),
151 }
152 }
153}
154impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::create_api_destination::CreateApiDestinationError, R>> for Error
155where
156 R: Send + Sync + std::fmt::Debug + 'static,
157{
158 fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::create_api_destination::CreateApiDestinationError, R>) -> Self {
159 match err {
160 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
161 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
162 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
163 source: err.into(),
164 }),
165 }
166 }
167}
168impl From<crate::operation::create_api_destination::CreateApiDestinationError> for Error {
169 fn from(err: crate::operation::create_api_destination::CreateApiDestinationError) -> Self {
170 match err {
171 crate::operation::create_api_destination::CreateApiDestinationError::InternalException(inner) => Error::InternalException(inner),
172 crate::operation::create_api_destination::CreateApiDestinationError::LimitExceededException(inner) => {
173 Error::LimitExceededException(inner)
174 }
175 crate::operation::create_api_destination::CreateApiDestinationError::ResourceAlreadyExistsException(inner) => {
176 Error::ResourceAlreadyExistsException(inner)
177 }
178 crate::operation::create_api_destination::CreateApiDestinationError::ResourceNotFoundException(inner) => {
179 Error::ResourceNotFoundException(inner)
180 }
181 crate::operation::create_api_destination::CreateApiDestinationError::Unhandled(inner) => Error::Unhandled(inner),
182 }
183 }
184}
185impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::create_archive::CreateArchiveError, R>> for Error
186where
187 R: Send + Sync + std::fmt::Debug + 'static,
188{
189 fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::create_archive::CreateArchiveError, R>) -> Self {
190 match err {
191 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
192 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
193 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
194 source: err.into(),
195 }),
196 }
197 }
198}
199impl From<crate::operation::create_archive::CreateArchiveError> for Error {
200 fn from(err: crate::operation::create_archive::CreateArchiveError) -> Self {
201 match err {
202 crate::operation::create_archive::CreateArchiveError::ConcurrentModificationException(inner) => {
203 Error::ConcurrentModificationException(inner)
204 }
205 crate::operation::create_archive::CreateArchiveError::InternalException(inner) => Error::InternalException(inner),
206 crate::operation::create_archive::CreateArchiveError::InvalidEventPatternException(inner) => Error::InvalidEventPatternException(inner),
207 crate::operation::create_archive::CreateArchiveError::LimitExceededException(inner) => Error::LimitExceededException(inner),
208 crate::operation::create_archive::CreateArchiveError::ResourceAlreadyExistsException(inner) => {
209 Error::ResourceAlreadyExistsException(inner)
210 }
211 crate::operation::create_archive::CreateArchiveError::ResourceNotFoundException(inner) => Error::ResourceNotFoundException(inner),
212 crate::operation::create_archive::CreateArchiveError::Unhandled(inner) => Error::Unhandled(inner),
213 }
214 }
215}
216impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::create_connection::CreateConnectionError, R>> for Error
217where
218 R: Send + Sync + std::fmt::Debug + 'static,
219{
220 fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::create_connection::CreateConnectionError, R>) -> Self {
221 match err {
222 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
223 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
224 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
225 source: err.into(),
226 }),
227 }
228 }
229}
230impl From<crate::operation::create_connection::CreateConnectionError> for Error {
231 fn from(err: crate::operation::create_connection::CreateConnectionError) -> Self {
232 match err {
233 crate::operation::create_connection::CreateConnectionError::AccessDeniedException(inner) => Error::AccessDeniedException(inner),
234 crate::operation::create_connection::CreateConnectionError::InternalException(inner) => Error::InternalException(inner),
235 crate::operation::create_connection::CreateConnectionError::LimitExceededException(inner) => Error::LimitExceededException(inner),
236 crate::operation::create_connection::CreateConnectionError::ResourceAlreadyExistsException(inner) => {
237 Error::ResourceAlreadyExistsException(inner)
238 }
239 crate::operation::create_connection::CreateConnectionError::ResourceNotFoundException(inner) => Error::ResourceNotFoundException(inner),
240 crate::operation::create_connection::CreateConnectionError::ThrottlingException(inner) => Error::ThrottlingException(inner),
241 crate::operation::create_connection::CreateConnectionError::Unhandled(inner) => Error::Unhandled(inner),
242 }
243 }
244}
245impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::create_endpoint::CreateEndpointError, R>> for Error
246where
247 R: Send + Sync + std::fmt::Debug + 'static,
248{
249 fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::create_endpoint::CreateEndpointError, R>) -> Self {
250 match err {
251 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
252 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
253 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
254 source: err.into(),
255 }),
256 }
257 }
258}
259impl From<crate::operation::create_endpoint::CreateEndpointError> for Error {
260 fn from(err: crate::operation::create_endpoint::CreateEndpointError) -> Self {
261 match err {
262 crate::operation::create_endpoint::CreateEndpointError::InternalException(inner) => Error::InternalException(inner),
263 crate::operation::create_endpoint::CreateEndpointError::LimitExceededException(inner) => Error::LimitExceededException(inner),
264 crate::operation::create_endpoint::CreateEndpointError::ResourceAlreadyExistsException(inner) => {
265 Error::ResourceAlreadyExistsException(inner)
266 }
267 crate::operation::create_endpoint::CreateEndpointError::Unhandled(inner) => Error::Unhandled(inner),
268 }
269 }
270}
271impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::create_event_bus::CreateEventBusError, R>> for Error
272where
273 R: Send + Sync + std::fmt::Debug + 'static,
274{
275 fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::create_event_bus::CreateEventBusError, R>) -> Self {
276 match err {
277 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
278 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
279 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
280 source: err.into(),
281 }),
282 }
283 }
284}
285impl From<crate::operation::create_event_bus::CreateEventBusError> for Error {
286 fn from(err: crate::operation::create_event_bus::CreateEventBusError) -> Self {
287 match err {
288 crate::operation::create_event_bus::CreateEventBusError::ConcurrentModificationException(inner) => {
289 Error::ConcurrentModificationException(inner)
290 }
291 crate::operation::create_event_bus::CreateEventBusError::InternalException(inner) => Error::InternalException(inner),
292 crate::operation::create_event_bus::CreateEventBusError::InvalidStateException(inner) => Error::InvalidStateException(inner),
293 crate::operation::create_event_bus::CreateEventBusError::LimitExceededException(inner) => Error::LimitExceededException(inner),
294 crate::operation::create_event_bus::CreateEventBusError::OperationDisabledException(inner) => Error::OperationDisabledException(inner),
295 crate::operation::create_event_bus::CreateEventBusError::ResourceAlreadyExistsException(inner) => {
296 Error::ResourceAlreadyExistsException(inner)
297 }
298 crate::operation::create_event_bus::CreateEventBusError::ResourceNotFoundException(inner) => Error::ResourceNotFoundException(inner),
299 crate::operation::create_event_bus::CreateEventBusError::Unhandled(inner) => Error::Unhandled(inner),
300 }
301 }
302}
303impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::create_partner_event_source::CreatePartnerEventSourceError, R>>
304 for Error
305where
306 R: Send + Sync + std::fmt::Debug + 'static,
307{
308 fn from(
309 err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::create_partner_event_source::CreatePartnerEventSourceError, R>,
310 ) -> Self {
311 match err {
312 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
313 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
314 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
315 source: err.into(),
316 }),
317 }
318 }
319}
320impl From<crate::operation::create_partner_event_source::CreatePartnerEventSourceError> for Error {
321 fn from(err: crate::operation::create_partner_event_source::CreatePartnerEventSourceError) -> Self {
322 match err {
323 crate::operation::create_partner_event_source::CreatePartnerEventSourceError::ConcurrentModificationException(inner) => {
324 Error::ConcurrentModificationException(inner)
325 }
326 crate::operation::create_partner_event_source::CreatePartnerEventSourceError::InternalException(inner) => Error::InternalException(inner),
327 crate::operation::create_partner_event_source::CreatePartnerEventSourceError::LimitExceededException(inner) => {
328 Error::LimitExceededException(inner)
329 }
330 crate::operation::create_partner_event_source::CreatePartnerEventSourceError::OperationDisabledException(inner) => {
331 Error::OperationDisabledException(inner)
332 }
333 crate::operation::create_partner_event_source::CreatePartnerEventSourceError::ResourceAlreadyExistsException(inner) => {
334 Error::ResourceAlreadyExistsException(inner)
335 }
336 crate::operation::create_partner_event_source::CreatePartnerEventSourceError::Unhandled(inner) => Error::Unhandled(inner),
337 }
338 }
339}
340impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::deactivate_event_source::DeactivateEventSourceError, R>> for Error
341where
342 R: Send + Sync + std::fmt::Debug + 'static,
343{
344 fn from(
345 err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::deactivate_event_source::DeactivateEventSourceError, R>,
346 ) -> 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::deactivate_event_source::DeactivateEventSourceError> for Error {
357 fn from(err: crate::operation::deactivate_event_source::DeactivateEventSourceError) -> Self {
358 match err {
359 crate::operation::deactivate_event_source::DeactivateEventSourceError::ConcurrentModificationException(inner) => {
360 Error::ConcurrentModificationException(inner)
361 }
362 crate::operation::deactivate_event_source::DeactivateEventSourceError::InternalException(inner) => Error::InternalException(inner),
363 crate::operation::deactivate_event_source::DeactivateEventSourceError::InvalidStateException(inner) => {
364 Error::InvalidStateException(inner)
365 }
366 crate::operation::deactivate_event_source::DeactivateEventSourceError::OperationDisabledException(inner) => {
367 Error::OperationDisabledException(inner)
368 }
369 crate::operation::deactivate_event_source::DeactivateEventSourceError::ResourceNotFoundException(inner) => {
370 Error::ResourceNotFoundException(inner)
371 }
372 crate::operation::deactivate_event_source::DeactivateEventSourceError::Unhandled(inner) => Error::Unhandled(inner),
373 }
374 }
375}
376impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::deauthorize_connection::DeauthorizeConnectionError, R>> for Error
377where
378 R: Send + Sync + std::fmt::Debug + 'static,
379{
380 fn from(
381 err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::deauthorize_connection::DeauthorizeConnectionError, R>,
382 ) -> Self {
383 match err {
384 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
385 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
386 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
387 source: err.into(),
388 }),
389 }
390 }
391}
392impl From<crate::operation::deauthorize_connection::DeauthorizeConnectionError> for Error {
393 fn from(err: crate::operation::deauthorize_connection::DeauthorizeConnectionError) -> Self {
394 match err {
395 crate::operation::deauthorize_connection::DeauthorizeConnectionError::ConcurrentModificationException(inner) => {
396 Error::ConcurrentModificationException(inner)
397 }
398 crate::operation::deauthorize_connection::DeauthorizeConnectionError::InternalException(inner) => Error::InternalException(inner),
399 crate::operation::deauthorize_connection::DeauthorizeConnectionError::ResourceNotFoundException(inner) => {
400 Error::ResourceNotFoundException(inner)
401 }
402 crate::operation::deauthorize_connection::DeauthorizeConnectionError::Unhandled(inner) => Error::Unhandled(inner),
403 }
404 }
405}
406impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::delete_api_destination::DeleteApiDestinationError, R>> for Error
407where
408 R: Send + Sync + std::fmt::Debug + 'static,
409{
410 fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::delete_api_destination::DeleteApiDestinationError, R>) -> Self {
411 match err {
412 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
413 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
414 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
415 source: err.into(),
416 }),
417 }
418 }
419}
420impl From<crate::operation::delete_api_destination::DeleteApiDestinationError> for Error {
421 fn from(err: crate::operation::delete_api_destination::DeleteApiDestinationError) -> Self {
422 match err {
423 crate::operation::delete_api_destination::DeleteApiDestinationError::ConcurrentModificationException(inner) => {
424 Error::ConcurrentModificationException(inner)
425 }
426 crate::operation::delete_api_destination::DeleteApiDestinationError::InternalException(inner) => Error::InternalException(inner),
427 crate::operation::delete_api_destination::DeleteApiDestinationError::ResourceNotFoundException(inner) => {
428 Error::ResourceNotFoundException(inner)
429 }
430 crate::operation::delete_api_destination::DeleteApiDestinationError::Unhandled(inner) => Error::Unhandled(inner),
431 }
432 }
433}
434impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::delete_archive::DeleteArchiveError, R>> for Error
435where
436 R: Send + Sync + std::fmt::Debug + 'static,
437{
438 fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::delete_archive::DeleteArchiveError, R>) -> Self {
439 match err {
440 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
441 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
442 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
443 source: err.into(),
444 }),
445 }
446 }
447}
448impl From<crate::operation::delete_archive::DeleteArchiveError> for Error {
449 fn from(err: crate::operation::delete_archive::DeleteArchiveError) -> Self {
450 match err {
451 crate::operation::delete_archive::DeleteArchiveError::ConcurrentModificationException(inner) => {
452 Error::ConcurrentModificationException(inner)
453 }
454 crate::operation::delete_archive::DeleteArchiveError::InternalException(inner) => Error::InternalException(inner),
455 crate::operation::delete_archive::DeleteArchiveError::ResourceNotFoundException(inner) => Error::ResourceNotFoundException(inner),
456 crate::operation::delete_archive::DeleteArchiveError::Unhandled(inner) => Error::Unhandled(inner),
457 }
458 }
459}
460impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::delete_connection::DeleteConnectionError, R>> for Error
461where
462 R: Send + Sync + std::fmt::Debug + 'static,
463{
464 fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::delete_connection::DeleteConnectionError, R>) -> Self {
465 match err {
466 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
467 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
468 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
469 source: err.into(),
470 }),
471 }
472 }
473}
474impl From<crate::operation::delete_connection::DeleteConnectionError> for Error {
475 fn from(err: crate::operation::delete_connection::DeleteConnectionError) -> Self {
476 match err {
477 crate::operation::delete_connection::DeleteConnectionError::ConcurrentModificationException(inner) => {
478 Error::ConcurrentModificationException(inner)
479 }
480 crate::operation::delete_connection::DeleteConnectionError::InternalException(inner) => Error::InternalException(inner),
481 crate::operation::delete_connection::DeleteConnectionError::ResourceNotFoundException(inner) => Error::ResourceNotFoundException(inner),
482 crate::operation::delete_connection::DeleteConnectionError::Unhandled(inner) => Error::Unhandled(inner),
483 }
484 }
485}
486impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::delete_endpoint::DeleteEndpointError, R>> for Error
487where
488 R: Send + Sync + std::fmt::Debug + 'static,
489{
490 fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::delete_endpoint::DeleteEndpointError, R>) -> Self {
491 match err {
492 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
493 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
494 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
495 source: err.into(),
496 }),
497 }
498 }
499}
500impl From<crate::operation::delete_endpoint::DeleteEndpointError> for Error {
501 fn from(err: crate::operation::delete_endpoint::DeleteEndpointError) -> Self {
502 match err {
503 crate::operation::delete_endpoint::DeleteEndpointError::ConcurrentModificationException(inner) => {
504 Error::ConcurrentModificationException(inner)
505 }
506 crate::operation::delete_endpoint::DeleteEndpointError::InternalException(inner) => Error::InternalException(inner),
507 crate::operation::delete_endpoint::DeleteEndpointError::ResourceNotFoundException(inner) => Error::ResourceNotFoundException(inner),
508 crate::operation::delete_endpoint::DeleteEndpointError::Unhandled(inner) => Error::Unhandled(inner),
509 }
510 }
511}
512impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::delete_event_bus::DeleteEventBusError, R>> for Error
513where
514 R: Send + Sync + std::fmt::Debug + 'static,
515{
516 fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::delete_event_bus::DeleteEventBusError, R>) -> Self {
517 match err {
518 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
519 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
520 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
521 source: err.into(),
522 }),
523 }
524 }
525}
526impl From<crate::operation::delete_event_bus::DeleteEventBusError> for Error {
527 fn from(err: crate::operation::delete_event_bus::DeleteEventBusError) -> Self {
528 match err {
529 crate::operation::delete_event_bus::DeleteEventBusError::ConcurrentModificationException(inner) => {
530 Error::ConcurrentModificationException(inner)
531 }
532 crate::operation::delete_event_bus::DeleteEventBusError::InternalException(inner) => Error::InternalException(inner),
533 crate::operation::delete_event_bus::DeleteEventBusError::Unhandled(inner) => Error::Unhandled(inner),
534 }
535 }
536}
537impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::delete_partner_event_source::DeletePartnerEventSourceError, R>>
538 for Error
539where
540 R: Send + Sync + std::fmt::Debug + 'static,
541{
542 fn from(
543 err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::delete_partner_event_source::DeletePartnerEventSourceError, R>,
544 ) -> Self {
545 match err {
546 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
547 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
548 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
549 source: err.into(),
550 }),
551 }
552 }
553}
554impl From<crate::operation::delete_partner_event_source::DeletePartnerEventSourceError> for Error {
555 fn from(err: crate::operation::delete_partner_event_source::DeletePartnerEventSourceError) -> Self {
556 match err {
557 crate::operation::delete_partner_event_source::DeletePartnerEventSourceError::ConcurrentModificationException(inner) => {
558 Error::ConcurrentModificationException(inner)
559 }
560 crate::operation::delete_partner_event_source::DeletePartnerEventSourceError::InternalException(inner) => Error::InternalException(inner),
561 crate::operation::delete_partner_event_source::DeletePartnerEventSourceError::OperationDisabledException(inner) => {
562 Error::OperationDisabledException(inner)
563 }
564 crate::operation::delete_partner_event_source::DeletePartnerEventSourceError::Unhandled(inner) => Error::Unhandled(inner),
565 }
566 }
567}
568impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::delete_rule::DeleteRuleError, R>> for Error
569where
570 R: Send + Sync + std::fmt::Debug + 'static,
571{
572 fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::delete_rule::DeleteRuleError, R>) -> Self {
573 match err {
574 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
575 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
576 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
577 source: err.into(),
578 }),
579 }
580 }
581}
582impl From<crate::operation::delete_rule::DeleteRuleError> for Error {
583 fn from(err: crate::operation::delete_rule::DeleteRuleError) -> Self {
584 match err {
585 crate::operation::delete_rule::DeleteRuleError::ConcurrentModificationException(inner) => Error::ConcurrentModificationException(inner),
586 crate::operation::delete_rule::DeleteRuleError::InternalException(inner) => Error::InternalException(inner),
587 crate::operation::delete_rule::DeleteRuleError::ManagedRuleException(inner) => Error::ManagedRuleException(inner),
588 crate::operation::delete_rule::DeleteRuleError::ResourceNotFoundException(inner) => Error::ResourceNotFoundException(inner),
589 crate::operation::delete_rule::DeleteRuleError::Unhandled(inner) => Error::Unhandled(inner),
590 }
591 }
592}
593impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::describe_api_destination::DescribeApiDestinationError, R>> for Error
594where
595 R: Send + Sync + std::fmt::Debug + 'static,
596{
597 fn from(
598 err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::describe_api_destination::DescribeApiDestinationError, R>,
599 ) -> Self {
600 match err {
601 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
602 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
603 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
604 source: err.into(),
605 }),
606 }
607 }
608}
609impl From<crate::operation::describe_api_destination::DescribeApiDestinationError> for Error {
610 fn from(err: crate::operation::describe_api_destination::DescribeApiDestinationError) -> Self {
611 match err {
612 crate::operation::describe_api_destination::DescribeApiDestinationError::InternalException(inner) => Error::InternalException(inner),
613 crate::operation::describe_api_destination::DescribeApiDestinationError::ResourceNotFoundException(inner) => {
614 Error::ResourceNotFoundException(inner)
615 }
616 crate::operation::describe_api_destination::DescribeApiDestinationError::Unhandled(inner) => Error::Unhandled(inner),
617 }
618 }
619}
620impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::describe_archive::DescribeArchiveError, R>> for Error
621where
622 R: Send + Sync + std::fmt::Debug + 'static,
623{
624 fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::describe_archive::DescribeArchiveError, R>) -> Self {
625 match err {
626 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
627 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
628 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
629 source: err.into(),
630 }),
631 }
632 }
633}
634impl From<crate::operation::describe_archive::DescribeArchiveError> for Error {
635 fn from(err: crate::operation::describe_archive::DescribeArchiveError) -> Self {
636 match err {
637 crate::operation::describe_archive::DescribeArchiveError::InternalException(inner) => Error::InternalException(inner),
638 crate::operation::describe_archive::DescribeArchiveError::ResourceAlreadyExistsException(inner) => {
639 Error::ResourceAlreadyExistsException(inner)
640 }
641 crate::operation::describe_archive::DescribeArchiveError::ResourceNotFoundException(inner) => Error::ResourceNotFoundException(inner),
642 crate::operation::describe_archive::DescribeArchiveError::Unhandled(inner) => Error::Unhandled(inner),
643 }
644 }
645}
646impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::describe_connection::DescribeConnectionError, R>> for Error
647where
648 R: Send + Sync + std::fmt::Debug + 'static,
649{
650 fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::describe_connection::DescribeConnectionError, R>) -> Self {
651 match err {
652 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
653 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
654 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
655 source: err.into(),
656 }),
657 }
658 }
659}
660impl From<crate::operation::describe_connection::DescribeConnectionError> for Error {
661 fn from(err: crate::operation::describe_connection::DescribeConnectionError) -> Self {
662 match err {
663 crate::operation::describe_connection::DescribeConnectionError::InternalException(inner) => Error::InternalException(inner),
664 crate::operation::describe_connection::DescribeConnectionError::ResourceNotFoundException(inner) => {
665 Error::ResourceNotFoundException(inner)
666 }
667 crate::operation::describe_connection::DescribeConnectionError::Unhandled(inner) => Error::Unhandled(inner),
668 }
669 }
670}
671impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::describe_endpoint::DescribeEndpointError, R>> for Error
672where
673 R: Send + Sync + std::fmt::Debug + 'static,
674{
675 fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::describe_endpoint::DescribeEndpointError, R>) -> Self {
676 match err {
677 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
678 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
679 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
680 source: err.into(),
681 }),
682 }
683 }
684}
685impl From<crate::operation::describe_endpoint::DescribeEndpointError> for Error {
686 fn from(err: crate::operation::describe_endpoint::DescribeEndpointError) -> Self {
687 match err {
688 crate::operation::describe_endpoint::DescribeEndpointError::InternalException(inner) => Error::InternalException(inner),
689 crate::operation::describe_endpoint::DescribeEndpointError::ResourceNotFoundException(inner) => Error::ResourceNotFoundException(inner),
690 crate::operation::describe_endpoint::DescribeEndpointError::Unhandled(inner) => Error::Unhandled(inner),
691 }
692 }
693}
694impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::describe_event_bus::DescribeEventBusError, R>> for Error
695where
696 R: Send + Sync + std::fmt::Debug + 'static,
697{
698 fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::describe_event_bus::DescribeEventBusError, R>) -> Self {
699 match err {
700 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
701 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
702 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
703 source: err.into(),
704 }),
705 }
706 }
707}
708impl From<crate::operation::describe_event_bus::DescribeEventBusError> for Error {
709 fn from(err: crate::operation::describe_event_bus::DescribeEventBusError) -> Self {
710 match err {
711 crate::operation::describe_event_bus::DescribeEventBusError::InternalException(inner) => Error::InternalException(inner),
712 crate::operation::describe_event_bus::DescribeEventBusError::ResourceNotFoundException(inner) => Error::ResourceNotFoundException(inner),
713 crate::operation::describe_event_bus::DescribeEventBusError::Unhandled(inner) => Error::Unhandled(inner),
714 }
715 }
716}
717impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::describe_event_source::DescribeEventSourceError, R>> for Error
718where
719 R: Send + Sync + std::fmt::Debug + 'static,
720{
721 fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::describe_event_source::DescribeEventSourceError, R>) -> Self {
722 match err {
723 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
724 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
725 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
726 source: err.into(),
727 }),
728 }
729 }
730}
731impl From<crate::operation::describe_event_source::DescribeEventSourceError> for Error {
732 fn from(err: crate::operation::describe_event_source::DescribeEventSourceError) -> Self {
733 match err {
734 crate::operation::describe_event_source::DescribeEventSourceError::InternalException(inner) => Error::InternalException(inner),
735 crate::operation::describe_event_source::DescribeEventSourceError::OperationDisabledException(inner) => {
736 Error::OperationDisabledException(inner)
737 }
738 crate::operation::describe_event_source::DescribeEventSourceError::ResourceNotFoundException(inner) => {
739 Error::ResourceNotFoundException(inner)
740 }
741 crate::operation::describe_event_source::DescribeEventSourceError::Unhandled(inner) => Error::Unhandled(inner),
742 }
743 }
744}
745impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::describe_partner_event_source::DescribePartnerEventSourceError, R>>
746 for Error
747where
748 R: Send + Sync + std::fmt::Debug + 'static,
749{
750 fn from(
751 err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::describe_partner_event_source::DescribePartnerEventSourceError, R>,
752 ) -> Self {
753 match err {
754 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
755 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
756 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
757 source: err.into(),
758 }),
759 }
760 }
761}
762impl From<crate::operation::describe_partner_event_source::DescribePartnerEventSourceError> for Error {
763 fn from(err: crate::operation::describe_partner_event_source::DescribePartnerEventSourceError) -> Self {
764 match err {
765 crate::operation::describe_partner_event_source::DescribePartnerEventSourceError::InternalException(inner) => {
766 Error::InternalException(inner)
767 }
768 crate::operation::describe_partner_event_source::DescribePartnerEventSourceError::OperationDisabledException(inner) => {
769 Error::OperationDisabledException(inner)
770 }
771 crate::operation::describe_partner_event_source::DescribePartnerEventSourceError::ResourceNotFoundException(inner) => {
772 Error::ResourceNotFoundException(inner)
773 }
774 crate::operation::describe_partner_event_source::DescribePartnerEventSourceError::Unhandled(inner) => Error::Unhandled(inner),
775 }
776 }
777}
778impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::describe_replay::DescribeReplayError, R>> for Error
779where
780 R: Send + Sync + std::fmt::Debug + 'static,
781{
782 fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::describe_replay::DescribeReplayError, R>) -> Self {
783 match err {
784 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
785 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
786 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
787 source: err.into(),
788 }),
789 }
790 }
791}
792impl From<crate::operation::describe_replay::DescribeReplayError> for Error {
793 fn from(err: crate::operation::describe_replay::DescribeReplayError) -> Self {
794 match err {
795 crate::operation::describe_replay::DescribeReplayError::InternalException(inner) => Error::InternalException(inner),
796 crate::operation::describe_replay::DescribeReplayError::ResourceNotFoundException(inner) => Error::ResourceNotFoundException(inner),
797 crate::operation::describe_replay::DescribeReplayError::Unhandled(inner) => Error::Unhandled(inner),
798 }
799 }
800}
801impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::describe_rule::DescribeRuleError, R>> for Error
802where
803 R: Send + Sync + std::fmt::Debug + 'static,
804{
805 fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::describe_rule::DescribeRuleError, R>) -> Self {
806 match err {
807 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
808 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
809 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
810 source: err.into(),
811 }),
812 }
813 }
814}
815impl From<crate::operation::describe_rule::DescribeRuleError> for Error {
816 fn from(err: crate::operation::describe_rule::DescribeRuleError) -> Self {
817 match err {
818 crate::operation::describe_rule::DescribeRuleError::InternalException(inner) => Error::InternalException(inner),
819 crate::operation::describe_rule::DescribeRuleError::ResourceNotFoundException(inner) => Error::ResourceNotFoundException(inner),
820 crate::operation::describe_rule::DescribeRuleError::Unhandled(inner) => Error::Unhandled(inner),
821 }
822 }
823}
824impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::disable_rule::DisableRuleError, R>> for Error
825where
826 R: Send + Sync + std::fmt::Debug + 'static,
827{
828 fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::disable_rule::DisableRuleError, R>) -> Self {
829 match err {
830 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
831 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
832 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
833 source: err.into(),
834 }),
835 }
836 }
837}
838impl From<crate::operation::disable_rule::DisableRuleError> for Error {
839 fn from(err: crate::operation::disable_rule::DisableRuleError) -> Self {
840 match err {
841 crate::operation::disable_rule::DisableRuleError::ConcurrentModificationException(inner) => Error::ConcurrentModificationException(inner),
842 crate::operation::disable_rule::DisableRuleError::InternalException(inner) => Error::InternalException(inner),
843 crate::operation::disable_rule::DisableRuleError::ManagedRuleException(inner) => Error::ManagedRuleException(inner),
844 crate::operation::disable_rule::DisableRuleError::ResourceNotFoundException(inner) => Error::ResourceNotFoundException(inner),
845 crate::operation::disable_rule::DisableRuleError::Unhandled(inner) => Error::Unhandled(inner),
846 }
847 }
848}
849impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::enable_rule::EnableRuleError, R>> for Error
850where
851 R: Send + Sync + std::fmt::Debug + 'static,
852{
853 fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::enable_rule::EnableRuleError, R>) -> Self {
854 match err {
855 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
856 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
857 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
858 source: err.into(),
859 }),
860 }
861 }
862}
863impl From<crate::operation::enable_rule::EnableRuleError> for Error {
864 fn from(err: crate::operation::enable_rule::EnableRuleError) -> Self {
865 match err {
866 crate::operation::enable_rule::EnableRuleError::ConcurrentModificationException(inner) => Error::ConcurrentModificationException(inner),
867 crate::operation::enable_rule::EnableRuleError::InternalException(inner) => Error::InternalException(inner),
868 crate::operation::enable_rule::EnableRuleError::ManagedRuleException(inner) => Error::ManagedRuleException(inner),
869 crate::operation::enable_rule::EnableRuleError::ResourceNotFoundException(inner) => Error::ResourceNotFoundException(inner),
870 crate::operation::enable_rule::EnableRuleError::Unhandled(inner) => Error::Unhandled(inner),
871 }
872 }
873}
874impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::list_api_destinations::ListApiDestinationsError, R>> for Error
875where
876 R: Send + Sync + std::fmt::Debug + 'static,
877{
878 fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::list_api_destinations::ListApiDestinationsError, R>) -> Self {
879 match err {
880 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
881 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
882 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
883 source: err.into(),
884 }),
885 }
886 }
887}
888impl From<crate::operation::list_api_destinations::ListApiDestinationsError> for Error {
889 fn from(err: crate::operation::list_api_destinations::ListApiDestinationsError) -> Self {
890 match err {
891 crate::operation::list_api_destinations::ListApiDestinationsError::InternalException(inner) => Error::InternalException(inner),
892 crate::operation::list_api_destinations::ListApiDestinationsError::Unhandled(inner) => Error::Unhandled(inner),
893 }
894 }
895}
896impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::list_archives::ListArchivesError, R>> for Error
897where
898 R: Send + Sync + std::fmt::Debug + 'static,
899{
900 fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::list_archives::ListArchivesError, R>) -> Self {
901 match err {
902 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
903 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
904 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
905 source: err.into(),
906 }),
907 }
908 }
909}
910impl From<crate::operation::list_archives::ListArchivesError> for Error {
911 fn from(err: crate::operation::list_archives::ListArchivesError) -> Self {
912 match err {
913 crate::operation::list_archives::ListArchivesError::InternalException(inner) => Error::InternalException(inner),
914 crate::operation::list_archives::ListArchivesError::ResourceNotFoundException(inner) => Error::ResourceNotFoundException(inner),
915 crate::operation::list_archives::ListArchivesError::Unhandled(inner) => Error::Unhandled(inner),
916 }
917 }
918}
919impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::list_connections::ListConnectionsError, R>> for Error
920where
921 R: Send + Sync + std::fmt::Debug + 'static,
922{
923 fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::list_connections::ListConnectionsError, R>) -> Self {
924 match err {
925 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
926 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
927 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
928 source: err.into(),
929 }),
930 }
931 }
932}
933impl From<crate::operation::list_connections::ListConnectionsError> for Error {
934 fn from(err: crate::operation::list_connections::ListConnectionsError) -> Self {
935 match err {
936 crate::operation::list_connections::ListConnectionsError::InternalException(inner) => Error::InternalException(inner),
937 crate::operation::list_connections::ListConnectionsError::Unhandled(inner) => Error::Unhandled(inner),
938 }
939 }
940}
941impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::list_endpoints::ListEndpointsError, R>> for Error
942where
943 R: Send + Sync + std::fmt::Debug + 'static,
944{
945 fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::list_endpoints::ListEndpointsError, R>) -> Self {
946 match err {
947 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
948 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
949 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
950 source: err.into(),
951 }),
952 }
953 }
954}
955impl From<crate::operation::list_endpoints::ListEndpointsError> for Error {
956 fn from(err: crate::operation::list_endpoints::ListEndpointsError) -> Self {
957 match err {
958 crate::operation::list_endpoints::ListEndpointsError::InternalException(inner) => Error::InternalException(inner),
959 crate::operation::list_endpoints::ListEndpointsError::Unhandled(inner) => Error::Unhandled(inner),
960 }
961 }
962}
963impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::list_event_buses::ListEventBusesError, R>> for Error
964where
965 R: Send + Sync + std::fmt::Debug + 'static,
966{
967 fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::list_event_buses::ListEventBusesError, R>) -> Self {
968 match err {
969 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
970 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
971 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
972 source: err.into(),
973 }),
974 }
975 }
976}
977impl From<crate::operation::list_event_buses::ListEventBusesError> for Error {
978 fn from(err: crate::operation::list_event_buses::ListEventBusesError) -> Self {
979 match err {
980 crate::operation::list_event_buses::ListEventBusesError::InternalException(inner) => Error::InternalException(inner),
981 crate::operation::list_event_buses::ListEventBusesError::Unhandled(inner) => Error::Unhandled(inner),
982 }
983 }
984}
985impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::list_event_sources::ListEventSourcesError, R>> for Error
986where
987 R: Send + Sync + std::fmt::Debug + 'static,
988{
989 fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::list_event_sources::ListEventSourcesError, R>) -> Self {
990 match err {
991 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
992 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
993 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
994 source: err.into(),
995 }),
996 }
997 }
998}
999impl From<crate::operation::list_event_sources::ListEventSourcesError> for Error {
1000 fn from(err: crate::operation::list_event_sources::ListEventSourcesError) -> Self {
1001 match err {
1002 crate::operation::list_event_sources::ListEventSourcesError::InternalException(inner) => Error::InternalException(inner),
1003 crate::operation::list_event_sources::ListEventSourcesError::OperationDisabledException(inner) => {
1004 Error::OperationDisabledException(inner)
1005 }
1006 crate::operation::list_event_sources::ListEventSourcesError::Unhandled(inner) => Error::Unhandled(inner),
1007 }
1008 }
1009}
1010impl<R>
1011 From<
1012 ::aws_smithy_runtime_api::client::result::SdkError<
1013 crate::operation::list_partner_event_source_accounts::ListPartnerEventSourceAccountsError,
1014 R,
1015 >,
1016 > for Error
1017where
1018 R: Send + Sync + std::fmt::Debug + 'static,
1019{
1020 fn from(
1021 err: ::aws_smithy_runtime_api::client::result::SdkError<
1022 crate::operation::list_partner_event_source_accounts::ListPartnerEventSourceAccountsError,
1023 R,
1024 >,
1025 ) -> Self {
1026 match err {
1027 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
1028 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
1029 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
1030 source: err.into(),
1031 }),
1032 }
1033 }
1034}
1035impl From<crate::operation::list_partner_event_source_accounts::ListPartnerEventSourceAccountsError> for Error {
1036 fn from(err: crate::operation::list_partner_event_source_accounts::ListPartnerEventSourceAccountsError) -> Self {
1037 match err {
1038 crate::operation::list_partner_event_source_accounts::ListPartnerEventSourceAccountsError::InternalException(inner) => {
1039 Error::InternalException(inner)
1040 }
1041 crate::operation::list_partner_event_source_accounts::ListPartnerEventSourceAccountsError::OperationDisabledException(inner) => {
1042 Error::OperationDisabledException(inner)
1043 }
1044 crate::operation::list_partner_event_source_accounts::ListPartnerEventSourceAccountsError::ResourceNotFoundException(inner) => {
1045 Error::ResourceNotFoundException(inner)
1046 }
1047 crate::operation::list_partner_event_source_accounts::ListPartnerEventSourceAccountsError::Unhandled(inner) => Error::Unhandled(inner),
1048 }
1049 }
1050}
1051impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::list_partner_event_sources::ListPartnerEventSourcesError, R>>
1052 for Error
1053where
1054 R: Send + Sync + std::fmt::Debug + 'static,
1055{
1056 fn from(
1057 err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::list_partner_event_sources::ListPartnerEventSourcesError, R>,
1058 ) -> Self {
1059 match err {
1060 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
1061 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
1062 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
1063 source: err.into(),
1064 }),
1065 }
1066 }
1067}
1068impl From<crate::operation::list_partner_event_sources::ListPartnerEventSourcesError> for Error {
1069 fn from(err: crate::operation::list_partner_event_sources::ListPartnerEventSourcesError) -> Self {
1070 match err {
1071 crate::operation::list_partner_event_sources::ListPartnerEventSourcesError::InternalException(inner) => Error::InternalException(inner),
1072 crate::operation::list_partner_event_sources::ListPartnerEventSourcesError::OperationDisabledException(inner) => {
1073 Error::OperationDisabledException(inner)
1074 }
1075 crate::operation::list_partner_event_sources::ListPartnerEventSourcesError::Unhandled(inner) => Error::Unhandled(inner),
1076 }
1077 }
1078}
1079impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::list_replays::ListReplaysError, R>> for Error
1080where
1081 R: Send + Sync + std::fmt::Debug + 'static,
1082{
1083 fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::list_replays::ListReplaysError, R>) -> Self {
1084 match err {
1085 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
1086 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
1087 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
1088 source: err.into(),
1089 }),
1090 }
1091 }
1092}
1093impl From<crate::operation::list_replays::ListReplaysError> for Error {
1094 fn from(err: crate::operation::list_replays::ListReplaysError) -> Self {
1095 match err {
1096 crate::operation::list_replays::ListReplaysError::InternalException(inner) => Error::InternalException(inner),
1097 crate::operation::list_replays::ListReplaysError::Unhandled(inner) => Error::Unhandled(inner),
1098 }
1099 }
1100}
1101impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::list_rule_names_by_target::ListRuleNamesByTargetError, R>> for Error
1102where
1103 R: Send + Sync + std::fmt::Debug + 'static,
1104{
1105 fn from(
1106 err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::list_rule_names_by_target::ListRuleNamesByTargetError, R>,
1107 ) -> Self {
1108 match err {
1109 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
1110 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
1111 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
1112 source: err.into(),
1113 }),
1114 }
1115 }
1116}
1117impl From<crate::operation::list_rule_names_by_target::ListRuleNamesByTargetError> for Error {
1118 fn from(err: crate::operation::list_rule_names_by_target::ListRuleNamesByTargetError) -> Self {
1119 match err {
1120 crate::operation::list_rule_names_by_target::ListRuleNamesByTargetError::InternalException(inner) => Error::InternalException(inner),
1121 crate::operation::list_rule_names_by_target::ListRuleNamesByTargetError::ResourceNotFoundException(inner) => {
1122 Error::ResourceNotFoundException(inner)
1123 }
1124 crate::operation::list_rule_names_by_target::ListRuleNamesByTargetError::Unhandled(inner) => Error::Unhandled(inner),
1125 }
1126 }
1127}
1128impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::list_rules::ListRulesError, R>> for Error
1129where
1130 R: Send + Sync + std::fmt::Debug + 'static,
1131{
1132 fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::list_rules::ListRulesError, R>) -> Self {
1133 match err {
1134 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
1135 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
1136 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
1137 source: err.into(),
1138 }),
1139 }
1140 }
1141}
1142impl From<crate::operation::list_rules::ListRulesError> for Error {
1143 fn from(err: crate::operation::list_rules::ListRulesError) -> Self {
1144 match err {
1145 crate::operation::list_rules::ListRulesError::InternalException(inner) => Error::InternalException(inner),
1146 crate::operation::list_rules::ListRulesError::ResourceNotFoundException(inner) => Error::ResourceNotFoundException(inner),
1147 crate::operation::list_rules::ListRulesError::Unhandled(inner) => Error::Unhandled(inner),
1148 }
1149 }
1150}
1151impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::list_tags_for_resource::ListTagsForResourceError, R>> for Error
1152where
1153 R: Send + Sync + std::fmt::Debug + 'static,
1154{
1155 fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::list_tags_for_resource::ListTagsForResourceError, R>) -> Self {
1156 match err {
1157 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
1158 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
1159 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
1160 source: err.into(),
1161 }),
1162 }
1163 }
1164}
1165impl From<crate::operation::list_tags_for_resource::ListTagsForResourceError> for Error {
1166 fn from(err: crate::operation::list_tags_for_resource::ListTagsForResourceError) -> Self {
1167 match err {
1168 crate::operation::list_tags_for_resource::ListTagsForResourceError::InternalException(inner) => Error::InternalException(inner),
1169 crate::operation::list_tags_for_resource::ListTagsForResourceError::ResourceNotFoundException(inner) => {
1170 Error::ResourceNotFoundException(inner)
1171 }
1172 crate::operation::list_tags_for_resource::ListTagsForResourceError::Unhandled(inner) => Error::Unhandled(inner),
1173 }
1174 }
1175}
1176impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::list_targets_by_rule::ListTargetsByRuleError, R>> for Error
1177where
1178 R: Send + Sync + std::fmt::Debug + 'static,
1179{
1180 fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::list_targets_by_rule::ListTargetsByRuleError, R>) -> Self {
1181 match err {
1182 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
1183 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
1184 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
1185 source: err.into(),
1186 }),
1187 }
1188 }
1189}
1190impl From<crate::operation::list_targets_by_rule::ListTargetsByRuleError> for Error {
1191 fn from(err: crate::operation::list_targets_by_rule::ListTargetsByRuleError) -> Self {
1192 match err {
1193 crate::operation::list_targets_by_rule::ListTargetsByRuleError::InternalException(inner) => Error::InternalException(inner),
1194 crate::operation::list_targets_by_rule::ListTargetsByRuleError::ResourceNotFoundException(inner) => {
1195 Error::ResourceNotFoundException(inner)
1196 }
1197 crate::operation::list_targets_by_rule::ListTargetsByRuleError::Unhandled(inner) => Error::Unhandled(inner),
1198 }
1199 }
1200}
1201impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::put_events::PutEventsError, R>> for Error
1202where
1203 R: Send + Sync + std::fmt::Debug + 'static,
1204{
1205 fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::put_events::PutEventsError, R>) -> Self {
1206 match err {
1207 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
1208 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
1209 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
1210 source: err.into(),
1211 }),
1212 }
1213 }
1214}
1215impl From<crate::operation::put_events::PutEventsError> for Error {
1216 fn from(err: crate::operation::put_events::PutEventsError) -> Self {
1217 match err {
1218 crate::operation::put_events::PutEventsError::InternalException(inner) => Error::InternalException(inner),
1219 crate::operation::put_events::PutEventsError::Unhandled(inner) => Error::Unhandled(inner),
1220 }
1221 }
1222}
1223impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::put_partner_events::PutPartnerEventsError, R>> for Error
1224where
1225 R: Send + Sync + std::fmt::Debug + 'static,
1226{
1227 fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::put_partner_events::PutPartnerEventsError, R>) -> Self {
1228 match err {
1229 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
1230 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
1231 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
1232 source: err.into(),
1233 }),
1234 }
1235 }
1236}
1237impl From<crate::operation::put_partner_events::PutPartnerEventsError> for Error {
1238 fn from(err: crate::operation::put_partner_events::PutPartnerEventsError) -> Self {
1239 match err {
1240 crate::operation::put_partner_events::PutPartnerEventsError::InternalException(inner) => Error::InternalException(inner),
1241 crate::operation::put_partner_events::PutPartnerEventsError::OperationDisabledException(inner) => {
1242 Error::OperationDisabledException(inner)
1243 }
1244 crate::operation::put_partner_events::PutPartnerEventsError::Unhandled(inner) => Error::Unhandled(inner),
1245 }
1246 }
1247}
1248impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::put_permission::PutPermissionError, R>> for Error
1249where
1250 R: Send + Sync + std::fmt::Debug + 'static,
1251{
1252 fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::put_permission::PutPermissionError, R>) -> Self {
1253 match err {
1254 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
1255 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
1256 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
1257 source: err.into(),
1258 }),
1259 }
1260 }
1261}
1262impl From<crate::operation::put_permission::PutPermissionError> for Error {
1263 fn from(err: crate::operation::put_permission::PutPermissionError) -> Self {
1264 match err {
1265 crate::operation::put_permission::PutPermissionError::ConcurrentModificationException(inner) => {
1266 Error::ConcurrentModificationException(inner)
1267 }
1268 crate::operation::put_permission::PutPermissionError::InternalException(inner) => Error::InternalException(inner),
1269 crate::operation::put_permission::PutPermissionError::OperationDisabledException(inner) => Error::OperationDisabledException(inner),
1270 crate::operation::put_permission::PutPermissionError::PolicyLengthExceededException(inner) => Error::PolicyLengthExceededException(inner),
1271 crate::operation::put_permission::PutPermissionError::ResourceNotFoundException(inner) => Error::ResourceNotFoundException(inner),
1272 crate::operation::put_permission::PutPermissionError::Unhandled(inner) => Error::Unhandled(inner),
1273 }
1274 }
1275}
1276impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::put_rule::PutRuleError, R>> for Error
1277where
1278 R: Send + Sync + std::fmt::Debug + 'static,
1279{
1280 fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::put_rule::PutRuleError, R>) -> Self {
1281 match err {
1282 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
1283 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
1284 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
1285 source: err.into(),
1286 }),
1287 }
1288 }
1289}
1290impl From<crate::operation::put_rule::PutRuleError> for Error {
1291 fn from(err: crate::operation::put_rule::PutRuleError) -> Self {
1292 match err {
1293 crate::operation::put_rule::PutRuleError::ConcurrentModificationException(inner) => Error::ConcurrentModificationException(inner),
1294 crate::operation::put_rule::PutRuleError::InternalException(inner) => Error::InternalException(inner),
1295 crate::operation::put_rule::PutRuleError::InvalidEventPatternException(inner) => Error::InvalidEventPatternException(inner),
1296 crate::operation::put_rule::PutRuleError::LimitExceededException(inner) => Error::LimitExceededException(inner),
1297 crate::operation::put_rule::PutRuleError::ManagedRuleException(inner) => Error::ManagedRuleException(inner),
1298 crate::operation::put_rule::PutRuleError::ResourceNotFoundException(inner) => Error::ResourceNotFoundException(inner),
1299 crate::operation::put_rule::PutRuleError::Unhandled(inner) => Error::Unhandled(inner),
1300 }
1301 }
1302}
1303impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::put_targets::PutTargetsError, R>> for Error
1304where
1305 R: Send + Sync + std::fmt::Debug + 'static,
1306{
1307 fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::put_targets::PutTargetsError, R>) -> Self {
1308 match err {
1309 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
1310 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
1311 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
1312 source: err.into(),
1313 }),
1314 }
1315 }
1316}
1317impl From<crate::operation::put_targets::PutTargetsError> for Error {
1318 fn from(err: crate::operation::put_targets::PutTargetsError) -> Self {
1319 match err {
1320 crate::operation::put_targets::PutTargetsError::ConcurrentModificationException(inner) => Error::ConcurrentModificationException(inner),
1321 crate::operation::put_targets::PutTargetsError::InternalException(inner) => Error::InternalException(inner),
1322 crate::operation::put_targets::PutTargetsError::LimitExceededException(inner) => Error::LimitExceededException(inner),
1323 crate::operation::put_targets::PutTargetsError::ManagedRuleException(inner) => Error::ManagedRuleException(inner),
1324 crate::operation::put_targets::PutTargetsError::ResourceNotFoundException(inner) => Error::ResourceNotFoundException(inner),
1325 crate::operation::put_targets::PutTargetsError::Unhandled(inner) => Error::Unhandled(inner),
1326 }
1327 }
1328}
1329impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::remove_permission::RemovePermissionError, R>> for Error
1330where
1331 R: Send + Sync + std::fmt::Debug + 'static,
1332{
1333 fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::remove_permission::RemovePermissionError, R>) -> Self {
1334 match err {
1335 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
1336 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
1337 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
1338 source: err.into(),
1339 }),
1340 }
1341 }
1342}
1343impl From<crate::operation::remove_permission::RemovePermissionError> for Error {
1344 fn from(err: crate::operation::remove_permission::RemovePermissionError) -> Self {
1345 match err {
1346 crate::operation::remove_permission::RemovePermissionError::ConcurrentModificationException(inner) => {
1347 Error::ConcurrentModificationException(inner)
1348 }
1349 crate::operation::remove_permission::RemovePermissionError::InternalException(inner) => Error::InternalException(inner),
1350 crate::operation::remove_permission::RemovePermissionError::OperationDisabledException(inner) => Error::OperationDisabledException(inner),
1351 crate::operation::remove_permission::RemovePermissionError::ResourceNotFoundException(inner) => Error::ResourceNotFoundException(inner),
1352 crate::operation::remove_permission::RemovePermissionError::Unhandled(inner) => Error::Unhandled(inner),
1353 }
1354 }
1355}
1356impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::remove_targets::RemoveTargetsError, R>> for Error
1357where
1358 R: Send + Sync + std::fmt::Debug + 'static,
1359{
1360 fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::remove_targets::RemoveTargetsError, R>) -> Self {
1361 match err {
1362 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
1363 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
1364 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
1365 source: err.into(),
1366 }),
1367 }
1368 }
1369}
1370impl From<crate::operation::remove_targets::RemoveTargetsError> for Error {
1371 fn from(err: crate::operation::remove_targets::RemoveTargetsError) -> Self {
1372 match err {
1373 crate::operation::remove_targets::RemoveTargetsError::ConcurrentModificationException(inner) => {
1374 Error::ConcurrentModificationException(inner)
1375 }
1376 crate::operation::remove_targets::RemoveTargetsError::InternalException(inner) => Error::InternalException(inner),
1377 crate::operation::remove_targets::RemoveTargetsError::ManagedRuleException(inner) => Error::ManagedRuleException(inner),
1378 crate::operation::remove_targets::RemoveTargetsError::ResourceNotFoundException(inner) => Error::ResourceNotFoundException(inner),
1379 crate::operation::remove_targets::RemoveTargetsError::Unhandled(inner) => Error::Unhandled(inner),
1380 }
1381 }
1382}
1383impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::start_replay::StartReplayError, R>> for Error
1384where
1385 R: Send + Sync + std::fmt::Debug + 'static,
1386{
1387 fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::start_replay::StartReplayError, R>) -> Self {
1388 match err {
1389 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
1390 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
1391 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
1392 source: err.into(),
1393 }),
1394 }
1395 }
1396}
1397impl From<crate::operation::start_replay::StartReplayError> for Error {
1398 fn from(err: crate::operation::start_replay::StartReplayError) -> Self {
1399 match err {
1400 crate::operation::start_replay::StartReplayError::InternalException(inner) => Error::InternalException(inner),
1401 crate::operation::start_replay::StartReplayError::InvalidEventPatternException(inner) => Error::InvalidEventPatternException(inner),
1402 crate::operation::start_replay::StartReplayError::LimitExceededException(inner) => Error::LimitExceededException(inner),
1403 crate::operation::start_replay::StartReplayError::ResourceAlreadyExistsException(inner) => Error::ResourceAlreadyExistsException(inner),
1404 crate::operation::start_replay::StartReplayError::ResourceNotFoundException(inner) => Error::ResourceNotFoundException(inner),
1405 crate::operation::start_replay::StartReplayError::Unhandled(inner) => Error::Unhandled(inner),
1406 }
1407 }
1408}
1409impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::tag_resource::TagResourceError, R>> for Error
1410where
1411 R: Send + Sync + std::fmt::Debug + 'static,
1412{
1413 fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::tag_resource::TagResourceError, R>) -> Self {
1414 match err {
1415 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
1416 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
1417 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
1418 source: err.into(),
1419 }),
1420 }
1421 }
1422}
1423impl From<crate::operation::tag_resource::TagResourceError> for Error {
1424 fn from(err: crate::operation::tag_resource::TagResourceError) -> Self {
1425 match err {
1426 crate::operation::tag_resource::TagResourceError::ConcurrentModificationException(inner) => Error::ConcurrentModificationException(inner),
1427 crate::operation::tag_resource::TagResourceError::InternalException(inner) => Error::InternalException(inner),
1428 crate::operation::tag_resource::TagResourceError::ManagedRuleException(inner) => Error::ManagedRuleException(inner),
1429 crate::operation::tag_resource::TagResourceError::ResourceNotFoundException(inner) => Error::ResourceNotFoundException(inner),
1430 crate::operation::tag_resource::TagResourceError::Unhandled(inner) => Error::Unhandled(inner),
1431 }
1432 }
1433}
1434impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::test_event_pattern::TestEventPatternError, R>> for Error
1435where
1436 R: Send + Sync + std::fmt::Debug + 'static,
1437{
1438 fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::test_event_pattern::TestEventPatternError, R>) -> Self {
1439 match err {
1440 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
1441 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
1442 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
1443 source: err.into(),
1444 }),
1445 }
1446 }
1447}
1448impl From<crate::operation::test_event_pattern::TestEventPatternError> for Error {
1449 fn from(err: crate::operation::test_event_pattern::TestEventPatternError) -> Self {
1450 match err {
1451 crate::operation::test_event_pattern::TestEventPatternError::InternalException(inner) => Error::InternalException(inner),
1452 crate::operation::test_event_pattern::TestEventPatternError::InvalidEventPatternException(inner) => {
1453 Error::InvalidEventPatternException(inner)
1454 }
1455 crate::operation::test_event_pattern::TestEventPatternError::Unhandled(inner) => Error::Unhandled(inner),
1456 }
1457 }
1458}
1459impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::untag_resource::UntagResourceError, R>> for Error
1460where
1461 R: Send + Sync + std::fmt::Debug + 'static,
1462{
1463 fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::untag_resource::UntagResourceError, R>) -> Self {
1464 match err {
1465 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
1466 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
1467 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
1468 source: err.into(),
1469 }),
1470 }
1471 }
1472}
1473impl From<crate::operation::untag_resource::UntagResourceError> for Error {
1474 fn from(err: crate::operation::untag_resource::UntagResourceError) -> Self {
1475 match err {
1476 crate::operation::untag_resource::UntagResourceError::ConcurrentModificationException(inner) => {
1477 Error::ConcurrentModificationException(inner)
1478 }
1479 crate::operation::untag_resource::UntagResourceError::InternalException(inner) => Error::InternalException(inner),
1480 crate::operation::untag_resource::UntagResourceError::ManagedRuleException(inner) => Error::ManagedRuleException(inner),
1481 crate::operation::untag_resource::UntagResourceError::ResourceNotFoundException(inner) => Error::ResourceNotFoundException(inner),
1482 crate::operation::untag_resource::UntagResourceError::Unhandled(inner) => Error::Unhandled(inner),
1483 }
1484 }
1485}
1486impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::update_api_destination::UpdateApiDestinationError, R>> for Error
1487where
1488 R: Send + Sync + std::fmt::Debug + 'static,
1489{
1490 fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::update_api_destination::UpdateApiDestinationError, R>) -> Self {
1491 match err {
1492 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
1493 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
1494 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
1495 source: err.into(),
1496 }),
1497 }
1498 }
1499}
1500impl From<crate::operation::update_api_destination::UpdateApiDestinationError> for Error {
1501 fn from(err: crate::operation::update_api_destination::UpdateApiDestinationError) -> Self {
1502 match err {
1503 crate::operation::update_api_destination::UpdateApiDestinationError::ConcurrentModificationException(inner) => {
1504 Error::ConcurrentModificationException(inner)
1505 }
1506 crate::operation::update_api_destination::UpdateApiDestinationError::InternalException(inner) => Error::InternalException(inner),
1507 crate::operation::update_api_destination::UpdateApiDestinationError::LimitExceededException(inner) => {
1508 Error::LimitExceededException(inner)
1509 }
1510 crate::operation::update_api_destination::UpdateApiDestinationError::ResourceNotFoundException(inner) => {
1511 Error::ResourceNotFoundException(inner)
1512 }
1513 crate::operation::update_api_destination::UpdateApiDestinationError::Unhandled(inner) => Error::Unhandled(inner),
1514 }
1515 }
1516}
1517impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::update_archive::UpdateArchiveError, R>> for Error
1518where
1519 R: Send + Sync + std::fmt::Debug + 'static,
1520{
1521 fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::update_archive::UpdateArchiveError, R>) -> Self {
1522 match err {
1523 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
1524 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
1525 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
1526 source: err.into(),
1527 }),
1528 }
1529 }
1530}
1531impl From<crate::operation::update_archive::UpdateArchiveError> for Error {
1532 fn from(err: crate::operation::update_archive::UpdateArchiveError) -> Self {
1533 match err {
1534 crate::operation::update_archive::UpdateArchiveError::ConcurrentModificationException(inner) => {
1535 Error::ConcurrentModificationException(inner)
1536 }
1537 crate::operation::update_archive::UpdateArchiveError::InternalException(inner) => Error::InternalException(inner),
1538 crate::operation::update_archive::UpdateArchiveError::InvalidEventPatternException(inner) => Error::InvalidEventPatternException(inner),
1539 crate::operation::update_archive::UpdateArchiveError::LimitExceededException(inner) => Error::LimitExceededException(inner),
1540 crate::operation::update_archive::UpdateArchiveError::ResourceNotFoundException(inner) => Error::ResourceNotFoundException(inner),
1541 crate::operation::update_archive::UpdateArchiveError::Unhandled(inner) => Error::Unhandled(inner),
1542 }
1543 }
1544}
1545impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::update_connection::UpdateConnectionError, R>> for Error
1546where
1547 R: Send + Sync + std::fmt::Debug + 'static,
1548{
1549 fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::update_connection::UpdateConnectionError, R>) -> Self {
1550 match err {
1551 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
1552 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
1553 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
1554 source: err.into(),
1555 }),
1556 }
1557 }
1558}
1559impl From<crate::operation::update_connection::UpdateConnectionError> for Error {
1560 fn from(err: crate::operation::update_connection::UpdateConnectionError) -> Self {
1561 match err {
1562 crate::operation::update_connection::UpdateConnectionError::AccessDeniedException(inner) => Error::AccessDeniedException(inner),
1563 crate::operation::update_connection::UpdateConnectionError::ConcurrentModificationException(inner) => {
1564 Error::ConcurrentModificationException(inner)
1565 }
1566 crate::operation::update_connection::UpdateConnectionError::InternalException(inner) => Error::InternalException(inner),
1567 crate::operation::update_connection::UpdateConnectionError::LimitExceededException(inner) => Error::LimitExceededException(inner),
1568 crate::operation::update_connection::UpdateConnectionError::ResourceNotFoundException(inner) => Error::ResourceNotFoundException(inner),
1569 crate::operation::update_connection::UpdateConnectionError::ThrottlingException(inner) => Error::ThrottlingException(inner),
1570 crate::operation::update_connection::UpdateConnectionError::Unhandled(inner) => Error::Unhandled(inner),
1571 }
1572 }
1573}
1574impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::update_endpoint::UpdateEndpointError, R>> for Error
1575where
1576 R: Send + Sync + std::fmt::Debug + 'static,
1577{
1578 fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::update_endpoint::UpdateEndpointError, R>) -> Self {
1579 match err {
1580 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
1581 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
1582 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
1583 source: err.into(),
1584 }),
1585 }
1586 }
1587}
1588impl From<crate::operation::update_endpoint::UpdateEndpointError> for Error {
1589 fn from(err: crate::operation::update_endpoint::UpdateEndpointError) -> Self {
1590 match err {
1591 crate::operation::update_endpoint::UpdateEndpointError::ConcurrentModificationException(inner) => {
1592 Error::ConcurrentModificationException(inner)
1593 }
1594 crate::operation::update_endpoint::UpdateEndpointError::InternalException(inner) => Error::InternalException(inner),
1595 crate::operation::update_endpoint::UpdateEndpointError::ResourceNotFoundException(inner) => Error::ResourceNotFoundException(inner),
1596 crate::operation::update_endpoint::UpdateEndpointError::Unhandled(inner) => Error::Unhandled(inner),
1597 }
1598 }
1599}
1600impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::update_event_bus::UpdateEventBusError, R>> for Error
1601where
1602 R: Send + Sync + std::fmt::Debug + 'static,
1603{
1604 fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::update_event_bus::UpdateEventBusError, R>) -> Self {
1605 match err {
1606 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
1607 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
1608 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
1609 source: err.into(),
1610 }),
1611 }
1612 }
1613}
1614impl From<crate::operation::update_event_bus::UpdateEventBusError> for Error {
1615 fn from(err: crate::operation::update_event_bus::UpdateEventBusError) -> Self {
1616 match err {
1617 crate::operation::update_event_bus::UpdateEventBusError::ConcurrentModificationException(inner) => {
1618 Error::ConcurrentModificationException(inner)
1619 }
1620 crate::operation::update_event_bus::UpdateEventBusError::InternalException(inner) => Error::InternalException(inner),
1621 crate::operation::update_event_bus::UpdateEventBusError::OperationDisabledException(inner) => Error::OperationDisabledException(inner),
1622 crate::operation::update_event_bus::UpdateEventBusError::ResourceNotFoundException(inner) => Error::ResourceNotFoundException(inner),
1623 crate::operation::update_event_bus::UpdateEventBusError::Unhandled(inner) => Error::Unhandled(inner),
1624 }
1625 }
1626}
1627impl ::std::error::Error for Error {
1628 fn source(&self) -> std::option::Option<&(dyn ::std::error::Error + 'static)> {
1629 match self {
1630 Error::AccessDeniedException(inner) => inner.source(),
1631 Error::ConcurrentModificationException(inner) => inner.source(),
1632 Error::IllegalStatusException(inner) => inner.source(),
1633 Error::InternalException(inner) => inner.source(),
1634 Error::InvalidEventPatternException(inner) => inner.source(),
1635 Error::InvalidStateException(inner) => inner.source(),
1636 Error::LimitExceededException(inner) => inner.source(),
1637 Error::ManagedRuleException(inner) => inner.source(),
1638 Error::OperationDisabledException(inner) => inner.source(),
1639 Error::PolicyLengthExceededException(inner) => inner.source(),
1640 Error::ResourceAlreadyExistsException(inner) => inner.source(),
1641 Error::ResourceNotFoundException(inner) => inner.source(),
1642 Error::ThrottlingException(inner) => inner.source(),
1643 Error::Unhandled(inner) => ::std::option::Option::Some(&*inner.source),
1644 }
1645 }
1646}
1647impl ::aws_types::request_id::RequestId for Error {
1648 fn request_id(&self) -> Option<&str> {
1649 match self {
1650 Self::AccessDeniedException(e) => e.request_id(),
1651 Self::ConcurrentModificationException(e) => e.request_id(),
1652 Self::IllegalStatusException(e) => e.request_id(),
1653 Self::InternalException(e) => e.request_id(),
1654 Self::InvalidEventPatternException(e) => e.request_id(),
1655 Self::InvalidStateException(e) => e.request_id(),
1656 Self::LimitExceededException(e) => e.request_id(),
1657 Self::ManagedRuleException(e) => e.request_id(),
1658 Self::OperationDisabledException(e) => e.request_id(),
1659 Self::PolicyLengthExceededException(e) => e.request_id(),
1660 Self::ResourceAlreadyExistsException(e) => e.request_id(),
1661 Self::ResourceNotFoundException(e) => e.request_id(),
1662 Self::ThrottlingException(e) => e.request_id(),
1663 Self::Unhandled(e) => e.meta.request_id(),
1664 }
1665 }
1666}