1#[non_exhaustive]
4#[derive(::std::fmt::Debug)]
5pub enum Error {
6 AccessDeniedException(crate::types::error::AccessDeniedException),
8 ConcurrentModificationException(crate::types::error::ConcurrentModificationException),
10 ConflictException(crate::types::error::ConflictException),
12 IdempotentParameterMismatchException(crate::types::error::IdempotentParameterMismatchException),
14 InternalException(crate::types::error::InternalException),
16 InvalidInputException(crate::types::error::InvalidInputException),
18 InvalidStateException(crate::types::error::InvalidStateException),
20 LimitExceededException(crate::types::error::LimitExceededException),
22 PolicyLengthExceededException(crate::types::error::PolicyLengthExceededException),
24 PublicPolicyException(crate::types::error::PublicPolicyException),
26 ResourceAlreadyExistsException(crate::types::error::ResourceAlreadyExistsException),
28 ResourceInUseException(crate::types::error::ResourceInUseException),
30 ResourceNotFoundException(crate::types::error::ResourceNotFoundException),
32 SchemaRegistryUnavailableException(crate::types::error::SchemaRegistryUnavailableException),
34 ThrottlingException(crate::types::error::ThrottlingException),
36 #[deprecated(note = "Matching `Unhandled` directly is not forwards compatible. Instead, match using a \
38 variable wildcard pattern and check `.code()`:
39 \
40 `err if err.code() == Some(\"SpecificExceptionCode\") => { /* handle the error */ }`
41 \
42 See [`ProvideErrorMetadata`](#impl-ProvideErrorMetadata-for-Error) for what information is available for the error.")]
43 Unhandled(crate::error::sealed_unhandled::Unhandled),
44}
45impl ::std::fmt::Display for Error {
46 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
47 match self {
48 Error::AccessDeniedException(inner) => inner.fmt(f),
49 Error::ConcurrentModificationException(inner) => inner.fmt(f),
50 Error::ConflictException(inner) => inner.fmt(f),
51 Error::IdempotentParameterMismatchException(inner) => inner.fmt(f),
52 Error::InternalException(inner) => inner.fmt(f),
53 Error::InvalidInputException(inner) => inner.fmt(f),
54 Error::InvalidStateException(inner) => inner.fmt(f),
55 Error::LimitExceededException(inner) => inner.fmt(f),
56 Error::PolicyLengthExceededException(inner) => inner.fmt(f),
57 Error::PublicPolicyException(inner) => inner.fmt(f),
58 Error::ResourceAlreadyExistsException(inner) => inner.fmt(f),
59 Error::ResourceInUseException(inner) => inner.fmt(f),
60 Error::ResourceNotFoundException(inner) => inner.fmt(f),
61 Error::SchemaRegistryUnavailableException(inner) => inner.fmt(f),
62 Error::ThrottlingException(inner) => inner.fmt(f),
63 Error::Unhandled(_) => {
64 if let ::std::option::Option::Some(code) = ::aws_smithy_types::error::metadata::ProvideErrorMetadata::code(self) {
65 write!(f, "unhandled error ({code})")
66 } else {
67 f.write_str("unhandled error")
68 }
69 }
70 }
71 }
72}
73impl From<::aws_smithy_types::error::operation::BuildError> for Error {
74 fn from(value: ::aws_smithy_types::error::operation::BuildError) -> Self {
75 Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
76 source: value.into(),
77 meta: ::std::default::Default::default(),
78 })
79 }
80}
81impl ::aws_smithy_types::error::metadata::ProvideErrorMetadata for Error {
82 fn meta(&self) -> &::aws_smithy_types::error::metadata::ErrorMetadata {
83 match self {
84 Self::AccessDeniedException(inner) => inner.meta(),
85 Self::ConcurrentModificationException(inner) => inner.meta(),
86 Self::ConflictException(inner) => inner.meta(),
87 Self::IdempotentParameterMismatchException(inner) => inner.meta(),
88 Self::InternalException(inner) => inner.meta(),
89 Self::InvalidInputException(inner) => inner.meta(),
90 Self::InvalidStateException(inner) => inner.meta(),
91 Self::LimitExceededException(inner) => inner.meta(),
92 Self::PolicyLengthExceededException(inner) => inner.meta(),
93 Self::PublicPolicyException(inner) => inner.meta(),
94 Self::ResourceAlreadyExistsException(inner) => inner.meta(),
95 Self::ResourceInUseException(inner) => inner.meta(),
96 Self::ResourceNotFoundException(inner) => inner.meta(),
97 Self::SchemaRegistryUnavailableException(inner) => inner.meta(),
98 Self::ThrottlingException(inner) => inner.meta(),
99 Self::Unhandled(inner) => &inner.meta,
100 }
101 }
102}
103impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::create_event_bus::CreateEventBusError, R>> for Error
104where
105 R: Send + Sync + std::fmt::Debug + 'static,
106{
107 fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::create_event_bus::CreateEventBusError, R>) -> Self {
108 match err {
109 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
110 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
111 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
112 source: err.into(),
113 }),
114 }
115 }
116}
117impl From<crate::operation::create_event_bus::CreateEventBusError> for Error {
118 fn from(err: crate::operation::create_event_bus::CreateEventBusError) -> Self {
119 match err {
120 crate::operation::create_event_bus::CreateEventBusError::ConcurrentModificationException(inner) => {
121 Error::ConcurrentModificationException(inner)
122 }
123 crate::operation::create_event_bus::CreateEventBusError::IdempotentParameterMismatchException(inner) => {
124 Error::IdempotentParameterMismatchException(inner)
125 }
126 crate::operation::create_event_bus::CreateEventBusError::InvalidStateException(inner) => Error::InvalidStateException(inner),
127 crate::operation::create_event_bus::CreateEventBusError::LimitExceededException(inner) => Error::LimitExceededException(inner),
128 crate::operation::create_event_bus::CreateEventBusError::ResourceAlreadyExistsException(inner) => {
129 Error::ResourceAlreadyExistsException(inner)
130 }
131 crate::operation::create_event_bus::CreateEventBusError::AccessDeniedException(inner) => Error::AccessDeniedException(inner),
132 crate::operation::create_event_bus::CreateEventBusError::InternalException(inner) => Error::InternalException(inner),
133 crate::operation::create_event_bus::CreateEventBusError::InvalidInputException(inner) => Error::InvalidInputException(inner),
134 crate::operation::create_event_bus::CreateEventBusError::ThrottlingException(inner) => Error::ThrottlingException(inner),
135 crate::operation::create_event_bus::CreateEventBusError::Unhandled(inner) => Error::Unhandled(inner),
136 }
137 }
138}
139impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::create_event_source::CreateEventSourceError, R>> for Error
140where
141 R: Send + Sync + std::fmt::Debug + 'static,
142{
143 fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::create_event_source::CreateEventSourceError, R>) -> Self {
144 match err {
145 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
146 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
147 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
148 source: err.into(),
149 }),
150 }
151 }
152}
153impl From<crate::operation::create_event_source::CreateEventSourceError> for Error {
154 fn from(err: crate::operation::create_event_source::CreateEventSourceError) -> Self {
155 match err {
156 crate::operation::create_event_source::CreateEventSourceError::ConcurrentModificationException(inner) => {
157 Error::ConcurrentModificationException(inner)
158 }
159 crate::operation::create_event_source::CreateEventSourceError::IdempotentParameterMismatchException(inner) => {
160 Error::IdempotentParameterMismatchException(inner)
161 }
162 crate::operation::create_event_source::CreateEventSourceError::InvalidStateException(inner) => Error::InvalidStateException(inner),
163 crate::operation::create_event_source::CreateEventSourceError::LimitExceededException(inner) => Error::LimitExceededException(inner),
164 crate::operation::create_event_source::CreateEventSourceError::ResourceAlreadyExistsException(inner) => {
165 Error::ResourceAlreadyExistsException(inner)
166 }
167 crate::operation::create_event_source::CreateEventSourceError::ResourceNotFoundException(inner) => {
168 Error::ResourceNotFoundException(inner)
169 }
170 crate::operation::create_event_source::CreateEventSourceError::AccessDeniedException(inner) => Error::AccessDeniedException(inner),
171 crate::operation::create_event_source::CreateEventSourceError::InternalException(inner) => Error::InternalException(inner),
172 crate::operation::create_event_source::CreateEventSourceError::InvalidInputException(inner) => Error::InvalidInputException(inner),
173 crate::operation::create_event_source::CreateEventSourceError::ThrottlingException(inner) => Error::ThrottlingException(inner),
174 crate::operation::create_event_source::CreateEventSourceError::Unhandled(inner) => Error::Unhandled(inner),
175 }
176 }
177}
178impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::create_subscriber::CreateSubscriberError, R>> for Error
179where
180 R: Send + Sync + std::fmt::Debug + 'static,
181{
182 fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::create_subscriber::CreateSubscriberError, R>) -> Self {
183 match err {
184 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
185 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
186 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
187 source: err.into(),
188 }),
189 }
190 }
191}
192impl From<crate::operation::create_subscriber::CreateSubscriberError> for Error {
193 fn from(err: crate::operation::create_subscriber::CreateSubscriberError) -> Self {
194 match err {
195 crate::operation::create_subscriber::CreateSubscriberError::ConcurrentModificationException(inner) => {
196 Error::ConcurrentModificationException(inner)
197 }
198 crate::operation::create_subscriber::CreateSubscriberError::IdempotentParameterMismatchException(inner) => {
199 Error::IdempotentParameterMismatchException(inner)
200 }
201 crate::operation::create_subscriber::CreateSubscriberError::InvalidStateException(inner) => Error::InvalidStateException(inner),
202 crate::operation::create_subscriber::CreateSubscriberError::LimitExceededException(inner) => Error::LimitExceededException(inner),
203 crate::operation::create_subscriber::CreateSubscriberError::ResourceAlreadyExistsException(inner) => {
204 Error::ResourceAlreadyExistsException(inner)
205 }
206 crate::operation::create_subscriber::CreateSubscriberError::ResourceNotFoundException(inner) => Error::ResourceNotFoundException(inner),
207 crate::operation::create_subscriber::CreateSubscriberError::AccessDeniedException(inner) => Error::AccessDeniedException(inner),
208 crate::operation::create_subscriber::CreateSubscriberError::InternalException(inner) => Error::InternalException(inner),
209 crate::operation::create_subscriber::CreateSubscriberError::InvalidInputException(inner) => Error::InvalidInputException(inner),
210 crate::operation::create_subscriber::CreateSubscriberError::ThrottlingException(inner) => Error::ThrottlingException(inner),
211 crate::operation::create_subscriber::CreateSubscriberError::Unhandled(inner) => Error::Unhandled(inner),
212 }
213 }
214}
215impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::delete_event_bus::DeleteEventBusError, R>> for Error
216where
217 R: Send + Sync + std::fmt::Debug + 'static,
218{
219 fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::delete_event_bus::DeleteEventBusError, R>) -> Self {
220 match err {
221 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
222 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
223 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
224 source: err.into(),
225 }),
226 }
227 }
228}
229impl From<crate::operation::delete_event_bus::DeleteEventBusError> for Error {
230 fn from(err: crate::operation::delete_event_bus::DeleteEventBusError) -> Self {
231 match err {
232 crate::operation::delete_event_bus::DeleteEventBusError::ConcurrentModificationException(inner) => {
233 Error::ConcurrentModificationException(inner)
234 }
235 crate::operation::delete_event_bus::DeleteEventBusError::InvalidStateException(inner) => Error::InvalidStateException(inner),
236 crate::operation::delete_event_bus::DeleteEventBusError::ResourceInUseException(inner) => Error::ResourceInUseException(inner),
237 crate::operation::delete_event_bus::DeleteEventBusError::ResourceNotFoundException(inner) => Error::ResourceNotFoundException(inner),
238 crate::operation::delete_event_bus::DeleteEventBusError::AccessDeniedException(inner) => Error::AccessDeniedException(inner),
239 crate::operation::delete_event_bus::DeleteEventBusError::InternalException(inner) => Error::InternalException(inner),
240 crate::operation::delete_event_bus::DeleteEventBusError::InvalidInputException(inner) => Error::InvalidInputException(inner),
241 crate::operation::delete_event_bus::DeleteEventBusError::ThrottlingException(inner) => Error::ThrottlingException(inner),
242 crate::operation::delete_event_bus::DeleteEventBusError::Unhandled(inner) => Error::Unhandled(inner),
243 }
244 }
245}
246impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::delete_event_source::DeleteEventSourceError, R>> for Error
247where
248 R: Send + Sync + std::fmt::Debug + 'static,
249{
250 fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::delete_event_source::DeleteEventSourceError, R>) -> Self {
251 match err {
252 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
253 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
254 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
255 source: err.into(),
256 }),
257 }
258 }
259}
260impl From<crate::operation::delete_event_source::DeleteEventSourceError> for Error {
261 fn from(err: crate::operation::delete_event_source::DeleteEventSourceError) -> Self {
262 match err {
263 crate::operation::delete_event_source::DeleteEventSourceError::ConcurrentModificationException(inner) => {
264 Error::ConcurrentModificationException(inner)
265 }
266 crate::operation::delete_event_source::DeleteEventSourceError::InvalidStateException(inner) => Error::InvalidStateException(inner),
267 crate::operation::delete_event_source::DeleteEventSourceError::ResourceNotFoundException(inner) => {
268 Error::ResourceNotFoundException(inner)
269 }
270 crate::operation::delete_event_source::DeleteEventSourceError::AccessDeniedException(inner) => Error::AccessDeniedException(inner),
271 crate::operation::delete_event_source::DeleteEventSourceError::InternalException(inner) => Error::InternalException(inner),
272 crate::operation::delete_event_source::DeleteEventSourceError::InvalidInputException(inner) => Error::InvalidInputException(inner),
273 crate::operation::delete_event_source::DeleteEventSourceError::ThrottlingException(inner) => Error::ThrottlingException(inner),
274 crate::operation::delete_event_source::DeleteEventSourceError::Unhandled(inner) => Error::Unhandled(inner),
275 }
276 }
277}
278impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::delete_resource_policy::DeleteResourcePolicyError, R>> for Error
279where
280 R: Send + Sync + std::fmt::Debug + 'static,
281{
282 fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::delete_resource_policy::DeleteResourcePolicyError, R>) -> Self {
283 match err {
284 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
285 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
286 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
287 source: err.into(),
288 }),
289 }
290 }
291}
292impl From<crate::operation::delete_resource_policy::DeleteResourcePolicyError> for Error {
293 fn from(err: crate::operation::delete_resource_policy::DeleteResourcePolicyError) -> Self {
294 match err {
295 crate::operation::delete_resource_policy::DeleteResourcePolicyError::ConcurrentModificationException(inner) => {
296 Error::ConcurrentModificationException(inner)
297 }
298 crate::operation::delete_resource_policy::DeleteResourcePolicyError::ConflictException(inner) => Error::ConflictException(inner),
299 crate::operation::delete_resource_policy::DeleteResourcePolicyError::ResourceNotFoundException(inner) => {
300 Error::ResourceNotFoundException(inner)
301 }
302 crate::operation::delete_resource_policy::DeleteResourcePolicyError::AccessDeniedException(inner) => Error::AccessDeniedException(inner),
303 crate::operation::delete_resource_policy::DeleteResourcePolicyError::InternalException(inner) => Error::InternalException(inner),
304 crate::operation::delete_resource_policy::DeleteResourcePolicyError::InvalidInputException(inner) => Error::InvalidInputException(inner),
305 crate::operation::delete_resource_policy::DeleteResourcePolicyError::ThrottlingException(inner) => Error::ThrottlingException(inner),
306 crate::operation::delete_resource_policy::DeleteResourcePolicyError::Unhandled(inner) => Error::Unhandled(inner),
307 }
308 }
309}
310impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::delete_subscriber::DeleteSubscriberError, R>> for Error
311where
312 R: Send + Sync + std::fmt::Debug + 'static,
313{
314 fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::delete_subscriber::DeleteSubscriberError, R>) -> Self {
315 match err {
316 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
317 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
318 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
319 source: err.into(),
320 }),
321 }
322 }
323}
324impl From<crate::operation::delete_subscriber::DeleteSubscriberError> for Error {
325 fn from(err: crate::operation::delete_subscriber::DeleteSubscriberError) -> Self {
326 match err {
327 crate::operation::delete_subscriber::DeleteSubscriberError::ConcurrentModificationException(inner) => {
328 Error::ConcurrentModificationException(inner)
329 }
330 crate::operation::delete_subscriber::DeleteSubscriberError::ResourceNotFoundException(inner) => Error::ResourceNotFoundException(inner),
331 crate::operation::delete_subscriber::DeleteSubscriberError::AccessDeniedException(inner) => Error::AccessDeniedException(inner),
332 crate::operation::delete_subscriber::DeleteSubscriberError::InternalException(inner) => Error::InternalException(inner),
333 crate::operation::delete_subscriber::DeleteSubscriberError::InvalidInputException(inner) => Error::InvalidInputException(inner),
334 crate::operation::delete_subscriber::DeleteSubscriberError::ThrottlingException(inner) => Error::ThrottlingException(inner),
335 crate::operation::delete_subscriber::DeleteSubscriberError::Unhandled(inner) => Error::Unhandled(inner),
336 }
337 }
338}
339impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::describe_event_bus::DescribeEventBusError, R>> for Error
340where
341 R: Send + Sync + std::fmt::Debug + 'static,
342{
343 fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::describe_event_bus::DescribeEventBusError, R>) -> Self {
344 match err {
345 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
346 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
347 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
348 source: err.into(),
349 }),
350 }
351 }
352}
353impl From<crate::operation::describe_event_bus::DescribeEventBusError> for Error {
354 fn from(err: crate::operation::describe_event_bus::DescribeEventBusError) -> Self {
355 match err {
356 crate::operation::describe_event_bus::DescribeEventBusError::ResourceNotFoundException(inner) => Error::ResourceNotFoundException(inner),
357 crate::operation::describe_event_bus::DescribeEventBusError::AccessDeniedException(inner) => Error::AccessDeniedException(inner),
358 crate::operation::describe_event_bus::DescribeEventBusError::InternalException(inner) => Error::InternalException(inner),
359 crate::operation::describe_event_bus::DescribeEventBusError::InvalidInputException(inner) => Error::InvalidInputException(inner),
360 crate::operation::describe_event_bus::DescribeEventBusError::ThrottlingException(inner) => Error::ThrottlingException(inner),
361 crate::operation::describe_event_bus::DescribeEventBusError::Unhandled(inner) => Error::Unhandled(inner),
362 }
363 }
364}
365impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::describe_event_source::DescribeEventSourceError, R>> for Error
366where
367 R: Send + Sync + std::fmt::Debug + 'static,
368{
369 fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::describe_event_source::DescribeEventSourceError, R>) -> Self {
370 match err {
371 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
372 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
373 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
374 source: err.into(),
375 }),
376 }
377 }
378}
379impl From<crate::operation::describe_event_source::DescribeEventSourceError> for Error {
380 fn from(err: crate::operation::describe_event_source::DescribeEventSourceError) -> Self {
381 match err {
382 crate::operation::describe_event_source::DescribeEventSourceError::ResourceNotFoundException(inner) => {
383 Error::ResourceNotFoundException(inner)
384 }
385 crate::operation::describe_event_source::DescribeEventSourceError::AccessDeniedException(inner) => Error::AccessDeniedException(inner),
386 crate::operation::describe_event_source::DescribeEventSourceError::InternalException(inner) => Error::InternalException(inner),
387 crate::operation::describe_event_source::DescribeEventSourceError::InvalidInputException(inner) => Error::InvalidInputException(inner),
388 crate::operation::describe_event_source::DescribeEventSourceError::ThrottlingException(inner) => Error::ThrottlingException(inner),
389 crate::operation::describe_event_source::DescribeEventSourceError::Unhandled(inner) => Error::Unhandled(inner),
390 }
391 }
392}
393impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::describe_subscriber::DescribeSubscriberError, R>> for Error
394where
395 R: Send + Sync + std::fmt::Debug + 'static,
396{
397 fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::describe_subscriber::DescribeSubscriberError, R>) -> Self {
398 match err {
399 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
400 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
401 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
402 source: err.into(),
403 }),
404 }
405 }
406}
407impl From<crate::operation::describe_subscriber::DescribeSubscriberError> for Error {
408 fn from(err: crate::operation::describe_subscriber::DescribeSubscriberError) -> Self {
409 match err {
410 crate::operation::describe_subscriber::DescribeSubscriberError::ResourceNotFoundException(inner) => {
411 Error::ResourceNotFoundException(inner)
412 }
413 crate::operation::describe_subscriber::DescribeSubscriberError::AccessDeniedException(inner) => Error::AccessDeniedException(inner),
414 crate::operation::describe_subscriber::DescribeSubscriberError::InternalException(inner) => Error::InternalException(inner),
415 crate::operation::describe_subscriber::DescribeSubscriberError::InvalidInputException(inner) => Error::InvalidInputException(inner),
416 crate::operation::describe_subscriber::DescribeSubscriberError::ThrottlingException(inner) => Error::ThrottlingException(inner),
417 crate::operation::describe_subscriber::DescribeSubscriberError::Unhandled(inner) => Error::Unhandled(inner),
418 }
419 }
420}
421impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::get_resource_policy::GetResourcePolicyError, 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_resource_policy::GetResourcePolicyError, 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_resource_policy::GetResourcePolicyError> for Error {
436 fn from(err: crate::operation::get_resource_policy::GetResourcePolicyError) -> Self {
437 match err {
438 crate::operation::get_resource_policy::GetResourcePolicyError::ResourceNotFoundException(inner) => {
439 Error::ResourceNotFoundException(inner)
440 }
441 crate::operation::get_resource_policy::GetResourcePolicyError::AccessDeniedException(inner) => Error::AccessDeniedException(inner),
442 crate::operation::get_resource_policy::GetResourcePolicyError::InternalException(inner) => Error::InternalException(inner),
443 crate::operation::get_resource_policy::GetResourcePolicyError::InvalidInputException(inner) => Error::InvalidInputException(inner),
444 crate::operation::get_resource_policy::GetResourcePolicyError::ThrottlingException(inner) => Error::ThrottlingException(inner),
445 crate::operation::get_resource_policy::GetResourcePolicyError::Unhandled(inner) => Error::Unhandled(inner),
446 }
447 }
448}
449impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::list_event_buses::ListEventBusesError, R>> for Error
450where
451 R: Send + Sync + std::fmt::Debug + 'static,
452{
453 fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::list_event_buses::ListEventBusesError, R>) -> Self {
454 match err {
455 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
456 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
457 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
458 source: err.into(),
459 }),
460 }
461 }
462}
463impl From<crate::operation::list_event_buses::ListEventBusesError> for Error {
464 fn from(err: crate::operation::list_event_buses::ListEventBusesError) -> Self {
465 match err {
466 crate::operation::list_event_buses::ListEventBusesError::AccessDeniedException(inner) => Error::AccessDeniedException(inner),
467 crate::operation::list_event_buses::ListEventBusesError::InternalException(inner) => Error::InternalException(inner),
468 crate::operation::list_event_buses::ListEventBusesError::InvalidInputException(inner) => Error::InvalidInputException(inner),
469 crate::operation::list_event_buses::ListEventBusesError::ThrottlingException(inner) => Error::ThrottlingException(inner),
470 crate::operation::list_event_buses::ListEventBusesError::Unhandled(inner) => Error::Unhandled(inner),
471 }
472 }
473}
474impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::list_event_sources::ListEventSourcesError, R>> for Error
475where
476 R: Send + Sync + std::fmt::Debug + 'static,
477{
478 fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::list_event_sources::ListEventSourcesError, R>) -> Self {
479 match err {
480 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
481 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
482 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
483 source: err.into(),
484 }),
485 }
486 }
487}
488impl From<crate::operation::list_event_sources::ListEventSourcesError> for Error {
489 fn from(err: crate::operation::list_event_sources::ListEventSourcesError) -> Self {
490 match err {
491 crate::operation::list_event_sources::ListEventSourcesError::ResourceNotFoundException(inner) => Error::ResourceNotFoundException(inner),
492 crate::operation::list_event_sources::ListEventSourcesError::AccessDeniedException(inner) => Error::AccessDeniedException(inner),
493 crate::operation::list_event_sources::ListEventSourcesError::InternalException(inner) => Error::InternalException(inner),
494 crate::operation::list_event_sources::ListEventSourcesError::InvalidInputException(inner) => Error::InvalidInputException(inner),
495 crate::operation::list_event_sources::ListEventSourcesError::ThrottlingException(inner) => Error::ThrottlingException(inner),
496 crate::operation::list_event_sources::ListEventSourcesError::Unhandled(inner) => Error::Unhandled(inner),
497 }
498 }
499}
500impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::list_resource_policies::ListResourcePoliciesError, R>> for Error
501where
502 R: Send + Sync + std::fmt::Debug + 'static,
503{
504 fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::list_resource_policies::ListResourcePoliciesError, R>) -> Self {
505 match err {
506 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
507 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
508 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
509 source: err.into(),
510 }),
511 }
512 }
513}
514impl From<crate::operation::list_resource_policies::ListResourcePoliciesError> for Error {
515 fn from(err: crate::operation::list_resource_policies::ListResourcePoliciesError) -> Self {
516 match err {
517 crate::operation::list_resource_policies::ListResourcePoliciesError::ResourceNotFoundException(inner) => {
518 Error::ResourceNotFoundException(inner)
519 }
520 crate::operation::list_resource_policies::ListResourcePoliciesError::AccessDeniedException(inner) => Error::AccessDeniedException(inner),
521 crate::operation::list_resource_policies::ListResourcePoliciesError::InternalException(inner) => Error::InternalException(inner),
522 crate::operation::list_resource_policies::ListResourcePoliciesError::InvalidInputException(inner) => Error::InvalidInputException(inner),
523 crate::operation::list_resource_policies::ListResourcePoliciesError::ThrottlingException(inner) => Error::ThrottlingException(inner),
524 crate::operation::list_resource_policies::ListResourcePoliciesError::Unhandled(inner) => Error::Unhandled(inner),
525 }
526 }
527}
528impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::list_subscribers::ListSubscribersError, R>> for Error
529where
530 R: Send + Sync + std::fmt::Debug + 'static,
531{
532 fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::list_subscribers::ListSubscribersError, R>) -> Self {
533 match err {
534 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
535 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
536 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
537 source: err.into(),
538 }),
539 }
540 }
541}
542impl From<crate::operation::list_subscribers::ListSubscribersError> for Error {
543 fn from(err: crate::operation::list_subscribers::ListSubscribersError) -> Self {
544 match err {
545 crate::operation::list_subscribers::ListSubscribersError::ResourceNotFoundException(inner) => Error::ResourceNotFoundException(inner),
546 crate::operation::list_subscribers::ListSubscribersError::AccessDeniedException(inner) => Error::AccessDeniedException(inner),
547 crate::operation::list_subscribers::ListSubscribersError::InternalException(inner) => Error::InternalException(inner),
548 crate::operation::list_subscribers::ListSubscribersError::InvalidInputException(inner) => Error::InvalidInputException(inner),
549 crate::operation::list_subscribers::ListSubscribersError::ThrottlingException(inner) => Error::ThrottlingException(inner),
550 crate::operation::list_subscribers::ListSubscribersError::Unhandled(inner) => Error::Unhandled(inner),
551 }
552 }
553}
554impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::list_tags_for_resource::ListTagsForResourceError, 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::list_tags_for_resource::ListTagsForResourceError, 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::list_tags_for_resource::ListTagsForResourceError> for Error {
569 fn from(err: crate::operation::list_tags_for_resource::ListTagsForResourceError) -> Self {
570 match err {
571 crate::operation::list_tags_for_resource::ListTagsForResourceError::ResourceNotFoundException(inner) => {
572 Error::ResourceNotFoundException(inner)
573 }
574 crate::operation::list_tags_for_resource::ListTagsForResourceError::AccessDeniedException(inner) => Error::AccessDeniedException(inner),
575 crate::operation::list_tags_for_resource::ListTagsForResourceError::InternalException(inner) => Error::InternalException(inner),
576 crate::operation::list_tags_for_resource::ListTagsForResourceError::InvalidInputException(inner) => Error::InvalidInputException(inner),
577 crate::operation::list_tags_for_resource::ListTagsForResourceError::ThrottlingException(inner) => Error::ThrottlingException(inner),
578 crate::operation::list_tags_for_resource::ListTagsForResourceError::Unhandled(inner) => Error::Unhandled(inner),
579 }
580 }
581}
582impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::put_events::PutEventsError, R>> for Error
583where
584 R: Send + Sync + std::fmt::Debug + 'static,
585{
586 fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::put_events::PutEventsError, R>) -> Self {
587 match err {
588 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
589 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
590 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
591 source: err.into(),
592 }),
593 }
594 }
595}
596impl From<crate::operation::put_events::PutEventsError> for Error {
597 fn from(err: crate::operation::put_events::PutEventsError) -> Self {
598 match err {
599 crate::operation::put_events::PutEventsError::InternalException(inner) => Error::InternalException(inner),
600 crate::operation::put_events::PutEventsError::InvalidStateException(inner) => Error::InvalidStateException(inner),
601 crate::operation::put_events::PutEventsError::ResourceNotFoundException(inner) => Error::ResourceNotFoundException(inner),
602 crate::operation::put_events::PutEventsError::AccessDeniedException(inner) => Error::AccessDeniedException(inner),
603 crate::operation::put_events::PutEventsError::InvalidInputException(inner) => Error::InvalidInputException(inner),
604 crate::operation::put_events::PutEventsError::ThrottlingException(inner) => Error::ThrottlingException(inner),
605 crate::operation::put_events::PutEventsError::Unhandled(inner) => Error::Unhandled(inner),
606 }
607 }
608}
609impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::put_raw_events::PutRawEventsError, R>> for Error
610where
611 R: Send + Sync + std::fmt::Debug + 'static,
612{
613 fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::put_raw_events::PutRawEventsError, R>) -> Self {
614 match err {
615 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
616 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
617 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
618 source: err.into(),
619 }),
620 }
621 }
622}
623impl From<crate::operation::put_raw_events::PutRawEventsError> for Error {
624 fn from(err: crate::operation::put_raw_events::PutRawEventsError) -> Self {
625 match err {
626 crate::operation::put_raw_events::PutRawEventsError::InvalidStateException(inner) => Error::InvalidStateException(inner),
627 crate::operation::put_raw_events::PutRawEventsError::ResourceNotFoundException(inner) => Error::ResourceNotFoundException(inner),
628 crate::operation::put_raw_events::PutRawEventsError::SchemaRegistryUnavailableException(inner) => {
629 Error::SchemaRegistryUnavailableException(inner)
630 }
631 crate::operation::put_raw_events::PutRawEventsError::AccessDeniedException(inner) => Error::AccessDeniedException(inner),
632 crate::operation::put_raw_events::PutRawEventsError::InternalException(inner) => Error::InternalException(inner),
633 crate::operation::put_raw_events::PutRawEventsError::InvalidInputException(inner) => Error::InvalidInputException(inner),
634 crate::operation::put_raw_events::PutRawEventsError::ThrottlingException(inner) => Error::ThrottlingException(inner),
635 crate::operation::put_raw_events::PutRawEventsError::Unhandled(inner) => Error::Unhandled(inner),
636 }
637 }
638}
639impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::put_resource_policy::PutResourcePolicyError, R>> for Error
640where
641 R: Send + Sync + std::fmt::Debug + 'static,
642{
643 fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::put_resource_policy::PutResourcePolicyError, R>) -> Self {
644 match err {
645 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
646 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
647 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
648 source: err.into(),
649 }),
650 }
651 }
652}
653impl From<crate::operation::put_resource_policy::PutResourcePolicyError> for Error {
654 fn from(err: crate::operation::put_resource_policy::PutResourcePolicyError) -> Self {
655 match err {
656 crate::operation::put_resource_policy::PutResourcePolicyError::ConcurrentModificationException(inner) => {
657 Error::ConcurrentModificationException(inner)
658 }
659 crate::operation::put_resource_policy::PutResourcePolicyError::ConflictException(inner) => Error::ConflictException(inner),
660 crate::operation::put_resource_policy::PutResourcePolicyError::PolicyLengthExceededException(inner) => {
661 Error::PolicyLengthExceededException(inner)
662 }
663 crate::operation::put_resource_policy::PutResourcePolicyError::PublicPolicyException(inner) => Error::PublicPolicyException(inner),
664 crate::operation::put_resource_policy::PutResourcePolicyError::ResourceNotFoundException(inner) => {
665 Error::ResourceNotFoundException(inner)
666 }
667 crate::operation::put_resource_policy::PutResourcePolicyError::AccessDeniedException(inner) => Error::AccessDeniedException(inner),
668 crate::operation::put_resource_policy::PutResourcePolicyError::InternalException(inner) => Error::InternalException(inner),
669 crate::operation::put_resource_policy::PutResourcePolicyError::InvalidInputException(inner) => Error::InvalidInputException(inner),
670 crate::operation::put_resource_policy::PutResourcePolicyError::ThrottlingException(inner) => Error::ThrottlingException(inner),
671 crate::operation::put_resource_policy::PutResourcePolicyError::Unhandled(inner) => Error::Unhandled(inner),
672 }
673 }
674}
675impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::revoke_resource::RevokeResourceError, R>> for Error
676where
677 R: Send + Sync + std::fmt::Debug + 'static,
678{
679 fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::revoke_resource::RevokeResourceError, R>) -> Self {
680 match err {
681 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
682 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
683 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
684 source: err.into(),
685 }),
686 }
687 }
688}
689impl From<crate::operation::revoke_resource::RevokeResourceError> for Error {
690 fn from(err: crate::operation::revoke_resource::RevokeResourceError) -> Self {
691 match err {
692 crate::operation::revoke_resource::RevokeResourceError::ConcurrentModificationException(inner) => {
693 Error::ConcurrentModificationException(inner)
694 }
695 crate::operation::revoke_resource::RevokeResourceError::InvalidStateException(inner) => Error::InvalidStateException(inner),
696 crate::operation::revoke_resource::RevokeResourceError::ResourceNotFoundException(inner) => Error::ResourceNotFoundException(inner),
697 crate::operation::revoke_resource::RevokeResourceError::AccessDeniedException(inner) => Error::AccessDeniedException(inner),
698 crate::operation::revoke_resource::RevokeResourceError::InternalException(inner) => Error::InternalException(inner),
699 crate::operation::revoke_resource::RevokeResourceError::InvalidInputException(inner) => Error::InvalidInputException(inner),
700 crate::operation::revoke_resource::RevokeResourceError::ThrottlingException(inner) => Error::ThrottlingException(inner),
701 crate::operation::revoke_resource::RevokeResourceError::Unhandled(inner) => Error::Unhandled(inner),
702 }
703 }
704}
705impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::tag_resource::TagResourceError, R>> for Error
706where
707 R: Send + Sync + std::fmt::Debug + 'static,
708{
709 fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::tag_resource::TagResourceError, R>) -> Self {
710 match err {
711 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
712 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
713 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
714 source: err.into(),
715 }),
716 }
717 }
718}
719impl From<crate::operation::tag_resource::TagResourceError> for Error {
720 fn from(err: crate::operation::tag_resource::TagResourceError) -> Self {
721 match err {
722 crate::operation::tag_resource::TagResourceError::ConcurrentModificationException(inner) => Error::ConcurrentModificationException(inner),
723 crate::operation::tag_resource::TagResourceError::InvalidStateException(inner) => Error::InvalidStateException(inner),
724 crate::operation::tag_resource::TagResourceError::LimitExceededException(inner) => Error::LimitExceededException(inner),
725 crate::operation::tag_resource::TagResourceError::ResourceNotFoundException(inner) => Error::ResourceNotFoundException(inner),
726 crate::operation::tag_resource::TagResourceError::AccessDeniedException(inner) => Error::AccessDeniedException(inner),
727 crate::operation::tag_resource::TagResourceError::InternalException(inner) => Error::InternalException(inner),
728 crate::operation::tag_resource::TagResourceError::InvalidInputException(inner) => Error::InvalidInputException(inner),
729 crate::operation::tag_resource::TagResourceError::ThrottlingException(inner) => Error::ThrottlingException(inner),
730 crate::operation::tag_resource::TagResourceError::Unhandled(inner) => Error::Unhandled(inner),
731 }
732 }
733}
734impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::untag_resource::UntagResourceError, R>> for Error
735where
736 R: Send + Sync + std::fmt::Debug + 'static,
737{
738 fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::untag_resource::UntagResourceError, R>) -> Self {
739 match err {
740 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
741 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
742 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
743 source: err.into(),
744 }),
745 }
746 }
747}
748impl From<crate::operation::untag_resource::UntagResourceError> for Error {
749 fn from(err: crate::operation::untag_resource::UntagResourceError) -> Self {
750 match err {
751 crate::operation::untag_resource::UntagResourceError::ConcurrentModificationException(inner) => {
752 Error::ConcurrentModificationException(inner)
753 }
754 crate::operation::untag_resource::UntagResourceError::InvalidStateException(inner) => Error::InvalidStateException(inner),
755 crate::operation::untag_resource::UntagResourceError::ResourceNotFoundException(inner) => Error::ResourceNotFoundException(inner),
756 crate::operation::untag_resource::UntagResourceError::AccessDeniedException(inner) => Error::AccessDeniedException(inner),
757 crate::operation::untag_resource::UntagResourceError::InternalException(inner) => Error::InternalException(inner),
758 crate::operation::untag_resource::UntagResourceError::InvalidInputException(inner) => Error::InvalidInputException(inner),
759 crate::operation::untag_resource::UntagResourceError::ThrottlingException(inner) => Error::ThrottlingException(inner),
760 crate::operation::untag_resource::UntagResourceError::Unhandled(inner) => Error::Unhandled(inner),
761 }
762 }
763}
764impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::update_event_bus::UpdateEventBusError, R>> for Error
765where
766 R: Send + Sync + std::fmt::Debug + 'static,
767{
768 fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::update_event_bus::UpdateEventBusError, R>) -> Self {
769 match err {
770 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
771 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
772 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
773 source: err.into(),
774 }),
775 }
776 }
777}
778impl From<crate::operation::update_event_bus::UpdateEventBusError> for Error {
779 fn from(err: crate::operation::update_event_bus::UpdateEventBusError) -> Self {
780 match err {
781 crate::operation::update_event_bus::UpdateEventBusError::ConcurrentModificationException(inner) => {
782 Error::ConcurrentModificationException(inner)
783 }
784 crate::operation::update_event_bus::UpdateEventBusError::InvalidStateException(inner) => Error::InvalidStateException(inner),
785 crate::operation::update_event_bus::UpdateEventBusError::ResourceNotFoundException(inner) => Error::ResourceNotFoundException(inner),
786 crate::operation::update_event_bus::UpdateEventBusError::AccessDeniedException(inner) => Error::AccessDeniedException(inner),
787 crate::operation::update_event_bus::UpdateEventBusError::InternalException(inner) => Error::InternalException(inner),
788 crate::operation::update_event_bus::UpdateEventBusError::InvalidInputException(inner) => Error::InvalidInputException(inner),
789 crate::operation::update_event_bus::UpdateEventBusError::ThrottlingException(inner) => Error::ThrottlingException(inner),
790 crate::operation::update_event_bus::UpdateEventBusError::Unhandled(inner) => Error::Unhandled(inner),
791 }
792 }
793}
794impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::update_event_source::UpdateEventSourceError, 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::update_event_source::UpdateEventSourceError, 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::update_event_source::UpdateEventSourceError> for Error {
809 fn from(err: crate::operation::update_event_source::UpdateEventSourceError) -> Self {
810 match err {
811 crate::operation::update_event_source::UpdateEventSourceError::ConcurrentModificationException(inner) => {
812 Error::ConcurrentModificationException(inner)
813 }
814 crate::operation::update_event_source::UpdateEventSourceError::InvalidStateException(inner) => Error::InvalidStateException(inner),
815 crate::operation::update_event_source::UpdateEventSourceError::ResourceNotFoundException(inner) => {
816 Error::ResourceNotFoundException(inner)
817 }
818 crate::operation::update_event_source::UpdateEventSourceError::AccessDeniedException(inner) => Error::AccessDeniedException(inner),
819 crate::operation::update_event_source::UpdateEventSourceError::InternalException(inner) => Error::InternalException(inner),
820 crate::operation::update_event_source::UpdateEventSourceError::InvalidInputException(inner) => Error::InvalidInputException(inner),
821 crate::operation::update_event_source::UpdateEventSourceError::ThrottlingException(inner) => Error::ThrottlingException(inner),
822 crate::operation::update_event_source::UpdateEventSourceError::Unhandled(inner) => Error::Unhandled(inner),
823 }
824 }
825}
826impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::update_subscriber::UpdateSubscriberError, R>> for Error
827where
828 R: Send + Sync + std::fmt::Debug + 'static,
829{
830 fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::update_subscriber::UpdateSubscriberError, R>) -> Self {
831 match err {
832 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
833 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
834 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
835 source: err.into(),
836 }),
837 }
838 }
839}
840impl From<crate::operation::update_subscriber::UpdateSubscriberError> for Error {
841 fn from(err: crate::operation::update_subscriber::UpdateSubscriberError) -> Self {
842 match err {
843 crate::operation::update_subscriber::UpdateSubscriberError::ConcurrentModificationException(inner) => {
844 Error::ConcurrentModificationException(inner)
845 }
846 crate::operation::update_subscriber::UpdateSubscriberError::InvalidStateException(inner) => Error::InvalidStateException(inner),
847 crate::operation::update_subscriber::UpdateSubscriberError::LimitExceededException(inner) => Error::LimitExceededException(inner),
848 crate::operation::update_subscriber::UpdateSubscriberError::ResourceNotFoundException(inner) => Error::ResourceNotFoundException(inner),
849 crate::operation::update_subscriber::UpdateSubscriberError::AccessDeniedException(inner) => Error::AccessDeniedException(inner),
850 crate::operation::update_subscriber::UpdateSubscriberError::InternalException(inner) => Error::InternalException(inner),
851 crate::operation::update_subscriber::UpdateSubscriberError::InvalidInputException(inner) => Error::InvalidInputException(inner),
852 crate::operation::update_subscriber::UpdateSubscriberError::ThrottlingException(inner) => Error::ThrottlingException(inner),
853 crate::operation::update_subscriber::UpdateSubscriberError::Unhandled(inner) => Error::Unhandled(inner),
854 }
855 }
856}
857impl<O, E> ::std::convert::From<::aws_smithy_runtime_api::client::waiters::error::WaiterError<O, E>> for Error
858where
859 O: ::std::fmt::Debug + ::std::marker::Send + ::std::marker::Sync + 'static,
860 E: ::std::error::Error + ::std::marker::Send + ::std::marker::Sync + 'static,
861{
862 fn from(err: ::aws_smithy_runtime_api::client::waiters::error::WaiterError<O, E>) -> Self {
863 Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
864 meta: ::std::default::Default::default(),
865 source: err.into(),
866 })
867 }
868}
869impl ::std::error::Error for Error {
870 fn source(&self) -> std::option::Option<&(dyn ::std::error::Error + 'static)> {
871 match self {
872 Error::AccessDeniedException(inner) => inner.source(),
873 Error::ConcurrentModificationException(inner) => inner.source(),
874 Error::ConflictException(inner) => inner.source(),
875 Error::IdempotentParameterMismatchException(inner) => inner.source(),
876 Error::InternalException(inner) => inner.source(),
877 Error::InvalidInputException(inner) => inner.source(),
878 Error::InvalidStateException(inner) => inner.source(),
879 Error::LimitExceededException(inner) => inner.source(),
880 Error::PolicyLengthExceededException(inner) => inner.source(),
881 Error::PublicPolicyException(inner) => inner.source(),
882 Error::ResourceAlreadyExistsException(inner) => inner.source(),
883 Error::ResourceInUseException(inner) => inner.source(),
884 Error::ResourceNotFoundException(inner) => inner.source(),
885 Error::SchemaRegistryUnavailableException(inner) => inner.source(),
886 Error::ThrottlingException(inner) => inner.source(),
887 Error::Unhandled(inner) => ::std::option::Option::Some(&*inner.source),
888 }
889 }
890}
891impl ::aws_types::request_id::RequestId for Error {
892 fn request_id(&self) -> Option<&str> {
893 match self {
894 Self::AccessDeniedException(e) => e.request_id(),
895 Self::ConcurrentModificationException(e) => e.request_id(),
896 Self::ConflictException(e) => e.request_id(),
897 Self::IdempotentParameterMismatchException(e) => e.request_id(),
898 Self::InternalException(e) => e.request_id(),
899 Self::InvalidInputException(e) => e.request_id(),
900 Self::InvalidStateException(e) => e.request_id(),
901 Self::LimitExceededException(e) => e.request_id(),
902 Self::PolicyLengthExceededException(e) => e.request_id(),
903 Self::PublicPolicyException(e) => e.request_id(),
904 Self::ResourceAlreadyExistsException(e) => e.request_id(),
905 Self::ResourceInUseException(e) => e.request_id(),
906 Self::ResourceNotFoundException(e) => e.request_id(),
907 Self::SchemaRegistryUnavailableException(e) => e.request_id(),
908 Self::ThrottlingException(e) => e.request_id(),
909 Self::Unhandled(e) => e.meta.request_id(),
910 }
911 }
912}