Skip to main content

aws_sdk_kafkaconnect/
error_meta.rs

1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2/// All possible error types for this service.
3#[non_exhaustive]
4#[derive(::std::fmt::Debug)]
5pub enum Error {
6    /// <p>HTTP Status Code 400: Bad request due to incorrect input. Correct your request and then retry it.</p>
7    BadRequestException(crate::types::error::BadRequestException),
8    /// <p>HTTP Status Code 409: Conflict. A resource with this name already exists. Retry your request with another name.</p>
9    ConflictException(crate::types::error::ConflictException),
10    /// <p>HTTP Status Code 403: Access forbidden. Correct your credentials and then retry your request.</p>
11    ForbiddenException(crate::types::error::ForbiddenException),
12    /// <p>HTTP Status Code 500: Unexpected internal server error. Retrying your request might resolve the issue.</p>
13    InternalServerErrorException(crate::types::error::InternalServerErrorException),
14    /// <p>HTTP Status Code 404: Resource not found due to incorrect input. Correct your request and then retry it.</p>
15    NotFoundException(crate::types::error::NotFoundException),
16    /// <p>HTTP Status Code 503: Service Unavailable. Retrying your request in some time might resolve the issue.</p>
17    ServiceUnavailableException(crate::types::error::ServiceUnavailableException),
18    /// <p>HTTP Status Code 429: Limit exceeded. Resource limit reached.</p>
19    TooManyRequestsException(crate::types::error::TooManyRequestsException),
20    /// <p>HTTP Status Code 401: Unauthorized request. The provided credentials couldn't be validated.</p>
21    UnauthorizedException(crate::types::error::UnauthorizedException),
22    /// An unexpected error occurred (e.g., invalid JSON returned by the service or an unknown error code).
23    #[deprecated(note = "Matching `Unhandled` directly is not forwards compatible. Instead, match using a \
24    variable wildcard pattern and check `.code()`:
25     \
26    &nbsp;&nbsp;&nbsp;`err if err.code() == Some(\"SpecificExceptionCode\") => { /* handle the error */ }`
27     \
28    See [`ProvideErrorMetadata`](#impl-ProvideErrorMetadata-for-Error) for what information is available for the error.")]
29    Unhandled(crate::error::sealed_unhandled::Unhandled),
30}
31impl ::std::fmt::Display for Error {
32    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
33        match self {
34            Error::BadRequestException(inner) => inner.fmt(f),
35            Error::ConflictException(inner) => inner.fmt(f),
36            Error::ForbiddenException(inner) => inner.fmt(f),
37            Error::InternalServerErrorException(inner) => inner.fmt(f),
38            Error::NotFoundException(inner) => inner.fmt(f),
39            Error::ServiceUnavailableException(inner) => inner.fmt(f),
40            Error::TooManyRequestsException(inner) => inner.fmt(f),
41            Error::UnauthorizedException(inner) => inner.fmt(f),
42            Error::Unhandled(_) => {
43                if let ::std::option::Option::Some(code) = ::aws_smithy_types::error::metadata::ProvideErrorMetadata::code(self) {
44                    write!(f, "unhandled error ({code})")
45                } else {
46                    f.write_str("unhandled error")
47                }
48            }
49        }
50    }
51}
52impl From<::aws_smithy_types::error::operation::BuildError> for Error {
53    fn from(value: ::aws_smithy_types::error::operation::BuildError) -> Self {
54        Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
55            source: value.into(),
56            meta: ::std::default::Default::default(),
57        })
58    }
59}
60impl ::aws_smithy_types::error::metadata::ProvideErrorMetadata for Error {
61    fn meta(&self) -> &::aws_smithy_types::error::metadata::ErrorMetadata {
62        match self {
63            Self::BadRequestException(inner) => inner.meta(),
64            Self::ConflictException(inner) => inner.meta(),
65            Self::ForbiddenException(inner) => inner.meta(),
66            Self::InternalServerErrorException(inner) => inner.meta(),
67            Self::NotFoundException(inner) => inner.meta(),
68            Self::ServiceUnavailableException(inner) => inner.meta(),
69            Self::TooManyRequestsException(inner) => inner.meta(),
70            Self::UnauthorizedException(inner) => inner.meta(),
71            Self::Unhandled(inner) => &inner.meta,
72        }
73    }
74}
75impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::create_connector::CreateConnectorError, R>> for Error
76where
77    R: Send + Sync + std::fmt::Debug + 'static,
78{
79    fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::create_connector::CreateConnectorError, R>) -> Self {
80        match err {
81            ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
82            _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
83                meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
84                source: err.into(),
85            }),
86        }
87    }
88}
89impl From<crate::operation::create_connector::CreateConnectorError> for Error {
90    fn from(err: crate::operation::create_connector::CreateConnectorError) -> Self {
91        match err {
92            crate::operation::create_connector::CreateConnectorError::BadRequestException(inner) => Error::BadRequestException(inner),
93            crate::operation::create_connector::CreateConnectorError::ConflictException(inner) => Error::ConflictException(inner),
94            crate::operation::create_connector::CreateConnectorError::ForbiddenException(inner) => Error::ForbiddenException(inner),
95            crate::operation::create_connector::CreateConnectorError::InternalServerErrorException(inner) => {
96                Error::InternalServerErrorException(inner)
97            }
98            crate::operation::create_connector::CreateConnectorError::NotFoundException(inner) => Error::NotFoundException(inner),
99            crate::operation::create_connector::CreateConnectorError::ServiceUnavailableException(inner) => Error::ServiceUnavailableException(inner),
100            crate::operation::create_connector::CreateConnectorError::TooManyRequestsException(inner) => Error::TooManyRequestsException(inner),
101            crate::operation::create_connector::CreateConnectorError::UnauthorizedException(inner) => Error::UnauthorizedException(inner),
102            crate::operation::create_connector::CreateConnectorError::Unhandled(inner) => Error::Unhandled(inner),
103        }
104    }
105}
106impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::create_custom_plugin::CreateCustomPluginError, R>> for Error
107where
108    R: Send + Sync + std::fmt::Debug + 'static,
109{
110    fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::create_custom_plugin::CreateCustomPluginError, R>) -> Self {
111        match err {
112            ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
113            _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
114                meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
115                source: err.into(),
116            }),
117        }
118    }
119}
120impl From<crate::operation::create_custom_plugin::CreateCustomPluginError> for Error {
121    fn from(err: crate::operation::create_custom_plugin::CreateCustomPluginError) -> Self {
122        match err {
123            crate::operation::create_custom_plugin::CreateCustomPluginError::BadRequestException(inner) => Error::BadRequestException(inner),
124            crate::operation::create_custom_plugin::CreateCustomPluginError::ConflictException(inner) => Error::ConflictException(inner),
125            crate::operation::create_custom_plugin::CreateCustomPluginError::ForbiddenException(inner) => Error::ForbiddenException(inner),
126            crate::operation::create_custom_plugin::CreateCustomPluginError::InternalServerErrorException(inner) => {
127                Error::InternalServerErrorException(inner)
128            }
129            crate::operation::create_custom_plugin::CreateCustomPluginError::NotFoundException(inner) => Error::NotFoundException(inner),
130            crate::operation::create_custom_plugin::CreateCustomPluginError::ServiceUnavailableException(inner) => {
131                Error::ServiceUnavailableException(inner)
132            }
133            crate::operation::create_custom_plugin::CreateCustomPluginError::TooManyRequestsException(inner) => {
134                Error::TooManyRequestsException(inner)
135            }
136            crate::operation::create_custom_plugin::CreateCustomPluginError::UnauthorizedException(inner) => Error::UnauthorizedException(inner),
137            crate::operation::create_custom_plugin::CreateCustomPluginError::Unhandled(inner) => Error::Unhandled(inner),
138        }
139    }
140}
141impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::create_worker_configuration::CreateWorkerConfigurationError, R>>
142    for Error
143where
144    R: Send + Sync + std::fmt::Debug + 'static,
145{
146    fn from(
147        err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::create_worker_configuration::CreateWorkerConfigurationError, R>,
148    ) -> Self {
149        match err {
150            ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
151            _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
152                meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
153                source: err.into(),
154            }),
155        }
156    }
157}
158impl From<crate::operation::create_worker_configuration::CreateWorkerConfigurationError> for Error {
159    fn from(err: crate::operation::create_worker_configuration::CreateWorkerConfigurationError) -> Self {
160        match err {
161            crate::operation::create_worker_configuration::CreateWorkerConfigurationError::BadRequestException(inner) => {
162                Error::BadRequestException(inner)
163            }
164            crate::operation::create_worker_configuration::CreateWorkerConfigurationError::ConflictException(inner) => {
165                Error::ConflictException(inner)
166            }
167            crate::operation::create_worker_configuration::CreateWorkerConfigurationError::ForbiddenException(inner) => {
168                Error::ForbiddenException(inner)
169            }
170            crate::operation::create_worker_configuration::CreateWorkerConfigurationError::InternalServerErrorException(inner) => {
171                Error::InternalServerErrorException(inner)
172            }
173            crate::operation::create_worker_configuration::CreateWorkerConfigurationError::NotFoundException(inner) => {
174                Error::NotFoundException(inner)
175            }
176            crate::operation::create_worker_configuration::CreateWorkerConfigurationError::ServiceUnavailableException(inner) => {
177                Error::ServiceUnavailableException(inner)
178            }
179            crate::operation::create_worker_configuration::CreateWorkerConfigurationError::TooManyRequestsException(inner) => {
180                Error::TooManyRequestsException(inner)
181            }
182            crate::operation::create_worker_configuration::CreateWorkerConfigurationError::UnauthorizedException(inner) => {
183                Error::UnauthorizedException(inner)
184            }
185            crate::operation::create_worker_configuration::CreateWorkerConfigurationError::Unhandled(inner) => Error::Unhandled(inner),
186        }
187    }
188}
189impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::delete_connector::DeleteConnectorError, R>> for Error
190where
191    R: Send + Sync + std::fmt::Debug + 'static,
192{
193    fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::delete_connector::DeleteConnectorError, R>) -> Self {
194        match err {
195            ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
196            _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
197                meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
198                source: err.into(),
199            }),
200        }
201    }
202}
203impl From<crate::operation::delete_connector::DeleteConnectorError> for Error {
204    fn from(err: crate::operation::delete_connector::DeleteConnectorError) -> Self {
205        match err {
206            crate::operation::delete_connector::DeleteConnectorError::BadRequestException(inner) => Error::BadRequestException(inner),
207            crate::operation::delete_connector::DeleteConnectorError::ForbiddenException(inner) => Error::ForbiddenException(inner),
208            crate::operation::delete_connector::DeleteConnectorError::InternalServerErrorException(inner) => {
209                Error::InternalServerErrorException(inner)
210            }
211            crate::operation::delete_connector::DeleteConnectorError::NotFoundException(inner) => Error::NotFoundException(inner),
212            crate::operation::delete_connector::DeleteConnectorError::ServiceUnavailableException(inner) => Error::ServiceUnavailableException(inner),
213            crate::operation::delete_connector::DeleteConnectorError::TooManyRequestsException(inner) => Error::TooManyRequestsException(inner),
214            crate::operation::delete_connector::DeleteConnectorError::UnauthorizedException(inner) => Error::UnauthorizedException(inner),
215            crate::operation::delete_connector::DeleteConnectorError::Unhandled(inner) => Error::Unhandled(inner),
216        }
217    }
218}
219impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::delete_custom_plugin::DeleteCustomPluginError, R>> for Error
220where
221    R: Send + Sync + std::fmt::Debug + 'static,
222{
223    fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::delete_custom_plugin::DeleteCustomPluginError, R>) -> Self {
224        match err {
225            ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
226            _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
227                meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
228                source: err.into(),
229            }),
230        }
231    }
232}
233impl From<crate::operation::delete_custom_plugin::DeleteCustomPluginError> for Error {
234    fn from(err: crate::operation::delete_custom_plugin::DeleteCustomPluginError) -> Self {
235        match err {
236            crate::operation::delete_custom_plugin::DeleteCustomPluginError::BadRequestException(inner) => Error::BadRequestException(inner),
237            crate::operation::delete_custom_plugin::DeleteCustomPluginError::ForbiddenException(inner) => Error::ForbiddenException(inner),
238            crate::operation::delete_custom_plugin::DeleteCustomPluginError::InternalServerErrorException(inner) => {
239                Error::InternalServerErrorException(inner)
240            }
241            crate::operation::delete_custom_plugin::DeleteCustomPluginError::NotFoundException(inner) => Error::NotFoundException(inner),
242            crate::operation::delete_custom_plugin::DeleteCustomPluginError::ServiceUnavailableException(inner) => {
243                Error::ServiceUnavailableException(inner)
244            }
245            crate::operation::delete_custom_plugin::DeleteCustomPluginError::TooManyRequestsException(inner) => {
246                Error::TooManyRequestsException(inner)
247            }
248            crate::operation::delete_custom_plugin::DeleteCustomPluginError::UnauthorizedException(inner) => Error::UnauthorizedException(inner),
249            crate::operation::delete_custom_plugin::DeleteCustomPluginError::Unhandled(inner) => Error::Unhandled(inner),
250        }
251    }
252}
253impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::delete_worker_configuration::DeleteWorkerConfigurationError, R>>
254    for Error
255where
256    R: Send + Sync + std::fmt::Debug + 'static,
257{
258    fn from(
259        err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::delete_worker_configuration::DeleteWorkerConfigurationError, R>,
260    ) -> Self {
261        match err {
262            ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
263            _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
264                meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
265                source: err.into(),
266            }),
267        }
268    }
269}
270impl From<crate::operation::delete_worker_configuration::DeleteWorkerConfigurationError> for Error {
271    fn from(err: crate::operation::delete_worker_configuration::DeleteWorkerConfigurationError) -> Self {
272        match err {
273            crate::operation::delete_worker_configuration::DeleteWorkerConfigurationError::BadRequestException(inner) => {
274                Error::BadRequestException(inner)
275            }
276            crate::operation::delete_worker_configuration::DeleteWorkerConfigurationError::ForbiddenException(inner) => {
277                Error::ForbiddenException(inner)
278            }
279            crate::operation::delete_worker_configuration::DeleteWorkerConfigurationError::InternalServerErrorException(inner) => {
280                Error::InternalServerErrorException(inner)
281            }
282            crate::operation::delete_worker_configuration::DeleteWorkerConfigurationError::NotFoundException(inner) => {
283                Error::NotFoundException(inner)
284            }
285            crate::operation::delete_worker_configuration::DeleteWorkerConfigurationError::ServiceUnavailableException(inner) => {
286                Error::ServiceUnavailableException(inner)
287            }
288            crate::operation::delete_worker_configuration::DeleteWorkerConfigurationError::TooManyRequestsException(inner) => {
289                Error::TooManyRequestsException(inner)
290            }
291            crate::operation::delete_worker_configuration::DeleteWorkerConfigurationError::UnauthorizedException(inner) => {
292                Error::UnauthorizedException(inner)
293            }
294            crate::operation::delete_worker_configuration::DeleteWorkerConfigurationError::Unhandled(inner) => Error::Unhandled(inner),
295        }
296    }
297}
298impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::describe_connector::DescribeConnectorError, R>> for Error
299where
300    R: Send + Sync + std::fmt::Debug + 'static,
301{
302    fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::describe_connector::DescribeConnectorError, R>) -> Self {
303        match err {
304            ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
305            _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
306                meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
307                source: err.into(),
308            }),
309        }
310    }
311}
312impl From<crate::operation::describe_connector::DescribeConnectorError> for Error {
313    fn from(err: crate::operation::describe_connector::DescribeConnectorError) -> Self {
314        match err {
315            crate::operation::describe_connector::DescribeConnectorError::BadRequestException(inner) => Error::BadRequestException(inner),
316            crate::operation::describe_connector::DescribeConnectorError::ForbiddenException(inner) => Error::ForbiddenException(inner),
317            crate::operation::describe_connector::DescribeConnectorError::InternalServerErrorException(inner) => {
318                Error::InternalServerErrorException(inner)
319            }
320            crate::operation::describe_connector::DescribeConnectorError::NotFoundException(inner) => Error::NotFoundException(inner),
321            crate::operation::describe_connector::DescribeConnectorError::ServiceUnavailableException(inner) => {
322                Error::ServiceUnavailableException(inner)
323            }
324            crate::operation::describe_connector::DescribeConnectorError::TooManyRequestsException(inner) => Error::TooManyRequestsException(inner),
325            crate::operation::describe_connector::DescribeConnectorError::UnauthorizedException(inner) => Error::UnauthorizedException(inner),
326            crate::operation::describe_connector::DescribeConnectorError::Unhandled(inner) => Error::Unhandled(inner),
327        }
328    }
329}
330impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::describe_connector_operation::DescribeConnectorOperationError, R>>
331    for Error
332where
333    R: Send + Sync + std::fmt::Debug + 'static,
334{
335    fn from(
336        err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::describe_connector_operation::DescribeConnectorOperationError, R>,
337    ) -> Self {
338        match err {
339            ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
340            _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
341                meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
342                source: err.into(),
343            }),
344        }
345    }
346}
347impl From<crate::operation::describe_connector_operation::DescribeConnectorOperationError> for Error {
348    fn from(err: crate::operation::describe_connector_operation::DescribeConnectorOperationError) -> Self {
349        match err {
350            crate::operation::describe_connector_operation::DescribeConnectorOperationError::BadRequestException(inner) => {
351                Error::BadRequestException(inner)
352            }
353            crate::operation::describe_connector_operation::DescribeConnectorOperationError::ForbiddenException(inner) => {
354                Error::ForbiddenException(inner)
355            }
356            crate::operation::describe_connector_operation::DescribeConnectorOperationError::InternalServerErrorException(inner) => {
357                Error::InternalServerErrorException(inner)
358            }
359            crate::operation::describe_connector_operation::DescribeConnectorOperationError::NotFoundException(inner) => {
360                Error::NotFoundException(inner)
361            }
362            crate::operation::describe_connector_operation::DescribeConnectorOperationError::ServiceUnavailableException(inner) => {
363                Error::ServiceUnavailableException(inner)
364            }
365            crate::operation::describe_connector_operation::DescribeConnectorOperationError::TooManyRequestsException(inner) => {
366                Error::TooManyRequestsException(inner)
367            }
368            crate::operation::describe_connector_operation::DescribeConnectorOperationError::UnauthorizedException(inner) => {
369                Error::UnauthorizedException(inner)
370            }
371            crate::operation::describe_connector_operation::DescribeConnectorOperationError::Unhandled(inner) => Error::Unhandled(inner),
372        }
373    }
374}
375impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::describe_custom_plugin::DescribeCustomPluginError, R>> for Error
376where
377    R: Send + Sync + std::fmt::Debug + 'static,
378{
379    fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::describe_custom_plugin::DescribeCustomPluginError, R>) -> Self {
380        match err {
381            ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
382            _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
383                meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
384                source: err.into(),
385            }),
386        }
387    }
388}
389impl From<crate::operation::describe_custom_plugin::DescribeCustomPluginError> for Error {
390    fn from(err: crate::operation::describe_custom_plugin::DescribeCustomPluginError) -> Self {
391        match err {
392            crate::operation::describe_custom_plugin::DescribeCustomPluginError::BadRequestException(inner) => Error::BadRequestException(inner),
393            crate::operation::describe_custom_plugin::DescribeCustomPluginError::ForbiddenException(inner) => Error::ForbiddenException(inner),
394            crate::operation::describe_custom_plugin::DescribeCustomPluginError::InternalServerErrorException(inner) => {
395                Error::InternalServerErrorException(inner)
396            }
397            crate::operation::describe_custom_plugin::DescribeCustomPluginError::NotFoundException(inner) => Error::NotFoundException(inner),
398            crate::operation::describe_custom_plugin::DescribeCustomPluginError::ServiceUnavailableException(inner) => {
399                Error::ServiceUnavailableException(inner)
400            }
401            crate::operation::describe_custom_plugin::DescribeCustomPluginError::TooManyRequestsException(inner) => {
402                Error::TooManyRequestsException(inner)
403            }
404            crate::operation::describe_custom_plugin::DescribeCustomPluginError::UnauthorizedException(inner) => Error::UnauthorizedException(inner),
405            crate::operation::describe_custom_plugin::DescribeCustomPluginError::Unhandled(inner) => Error::Unhandled(inner),
406        }
407    }
408}
409impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::describe_worker_configuration::DescribeWorkerConfigurationError, R>>
410    for Error
411where
412    R: Send + Sync + std::fmt::Debug + 'static,
413{
414    fn from(
415        err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::describe_worker_configuration::DescribeWorkerConfigurationError, R>,
416    ) -> Self {
417        match err {
418            ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
419            _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
420                meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
421                source: err.into(),
422            }),
423        }
424    }
425}
426impl From<crate::operation::describe_worker_configuration::DescribeWorkerConfigurationError> for Error {
427    fn from(err: crate::operation::describe_worker_configuration::DescribeWorkerConfigurationError) -> Self {
428        match err {
429            crate::operation::describe_worker_configuration::DescribeWorkerConfigurationError::BadRequestException(inner) => {
430                Error::BadRequestException(inner)
431            }
432            crate::operation::describe_worker_configuration::DescribeWorkerConfigurationError::ForbiddenException(inner) => {
433                Error::ForbiddenException(inner)
434            }
435            crate::operation::describe_worker_configuration::DescribeWorkerConfigurationError::InternalServerErrorException(inner) => {
436                Error::InternalServerErrorException(inner)
437            }
438            crate::operation::describe_worker_configuration::DescribeWorkerConfigurationError::NotFoundException(inner) => {
439                Error::NotFoundException(inner)
440            }
441            crate::operation::describe_worker_configuration::DescribeWorkerConfigurationError::ServiceUnavailableException(inner) => {
442                Error::ServiceUnavailableException(inner)
443            }
444            crate::operation::describe_worker_configuration::DescribeWorkerConfigurationError::TooManyRequestsException(inner) => {
445                Error::TooManyRequestsException(inner)
446            }
447            crate::operation::describe_worker_configuration::DescribeWorkerConfigurationError::UnauthorizedException(inner) => {
448                Error::UnauthorizedException(inner)
449            }
450            crate::operation::describe_worker_configuration::DescribeWorkerConfigurationError::Unhandled(inner) => Error::Unhandled(inner),
451        }
452    }
453}
454impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::list_connector_operations::ListConnectorOperationsError, R>>
455    for Error
456where
457    R: Send + Sync + std::fmt::Debug + 'static,
458{
459    fn from(
460        err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::list_connector_operations::ListConnectorOperationsError, R>,
461    ) -> Self {
462        match err {
463            ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
464            _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
465                meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
466                source: err.into(),
467            }),
468        }
469    }
470}
471impl From<crate::operation::list_connector_operations::ListConnectorOperationsError> for Error {
472    fn from(err: crate::operation::list_connector_operations::ListConnectorOperationsError) -> Self {
473        match err {
474            crate::operation::list_connector_operations::ListConnectorOperationsError::BadRequestException(inner) => {
475                Error::BadRequestException(inner)
476            }
477            crate::operation::list_connector_operations::ListConnectorOperationsError::ForbiddenException(inner) => Error::ForbiddenException(inner),
478            crate::operation::list_connector_operations::ListConnectorOperationsError::InternalServerErrorException(inner) => {
479                Error::InternalServerErrorException(inner)
480            }
481            crate::operation::list_connector_operations::ListConnectorOperationsError::NotFoundException(inner) => Error::NotFoundException(inner),
482            crate::operation::list_connector_operations::ListConnectorOperationsError::ServiceUnavailableException(inner) => {
483                Error::ServiceUnavailableException(inner)
484            }
485            crate::operation::list_connector_operations::ListConnectorOperationsError::TooManyRequestsException(inner) => {
486                Error::TooManyRequestsException(inner)
487            }
488            crate::operation::list_connector_operations::ListConnectorOperationsError::UnauthorizedException(inner) => {
489                Error::UnauthorizedException(inner)
490            }
491            crate::operation::list_connector_operations::ListConnectorOperationsError::Unhandled(inner) => Error::Unhandled(inner),
492        }
493    }
494}
495impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::list_connectors::ListConnectorsError, R>> for Error
496where
497    R: Send + Sync + std::fmt::Debug + 'static,
498{
499    fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::list_connectors::ListConnectorsError, R>) -> Self {
500        match err {
501            ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
502            _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
503                meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
504                source: err.into(),
505            }),
506        }
507    }
508}
509impl From<crate::operation::list_connectors::ListConnectorsError> for Error {
510    fn from(err: crate::operation::list_connectors::ListConnectorsError) -> Self {
511        match err {
512            crate::operation::list_connectors::ListConnectorsError::BadRequestException(inner) => Error::BadRequestException(inner),
513            crate::operation::list_connectors::ListConnectorsError::ForbiddenException(inner) => Error::ForbiddenException(inner),
514            crate::operation::list_connectors::ListConnectorsError::InternalServerErrorException(inner) => Error::InternalServerErrorException(inner),
515            crate::operation::list_connectors::ListConnectorsError::NotFoundException(inner) => Error::NotFoundException(inner),
516            crate::operation::list_connectors::ListConnectorsError::ServiceUnavailableException(inner) => Error::ServiceUnavailableException(inner),
517            crate::operation::list_connectors::ListConnectorsError::TooManyRequestsException(inner) => Error::TooManyRequestsException(inner),
518            crate::operation::list_connectors::ListConnectorsError::UnauthorizedException(inner) => Error::UnauthorizedException(inner),
519            crate::operation::list_connectors::ListConnectorsError::Unhandled(inner) => Error::Unhandled(inner),
520        }
521    }
522}
523impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::list_custom_plugins::ListCustomPluginsError, R>> for Error
524where
525    R: Send + Sync + std::fmt::Debug + 'static,
526{
527    fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::list_custom_plugins::ListCustomPluginsError, R>) -> Self {
528        match err {
529            ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
530            _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
531                meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
532                source: err.into(),
533            }),
534        }
535    }
536}
537impl From<crate::operation::list_custom_plugins::ListCustomPluginsError> for Error {
538    fn from(err: crate::operation::list_custom_plugins::ListCustomPluginsError) -> Self {
539        match err {
540            crate::operation::list_custom_plugins::ListCustomPluginsError::BadRequestException(inner) => Error::BadRequestException(inner),
541            crate::operation::list_custom_plugins::ListCustomPluginsError::ForbiddenException(inner) => Error::ForbiddenException(inner),
542            crate::operation::list_custom_plugins::ListCustomPluginsError::InternalServerErrorException(inner) => {
543                Error::InternalServerErrorException(inner)
544            }
545            crate::operation::list_custom_plugins::ListCustomPluginsError::NotFoundException(inner) => Error::NotFoundException(inner),
546            crate::operation::list_custom_plugins::ListCustomPluginsError::ServiceUnavailableException(inner) => {
547                Error::ServiceUnavailableException(inner)
548            }
549            crate::operation::list_custom_plugins::ListCustomPluginsError::TooManyRequestsException(inner) => Error::TooManyRequestsException(inner),
550            crate::operation::list_custom_plugins::ListCustomPluginsError::UnauthorizedException(inner) => Error::UnauthorizedException(inner),
551            crate::operation::list_custom_plugins::ListCustomPluginsError::Unhandled(inner) => Error::Unhandled(inner),
552        }
553    }
554}
555impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::list_tags_for_resource::ListTagsForResourceError, R>> for Error
556where
557    R: Send + Sync + std::fmt::Debug + 'static,
558{
559    fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::list_tags_for_resource::ListTagsForResourceError, R>) -> Self {
560        match err {
561            ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
562            _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
563                meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
564                source: err.into(),
565            }),
566        }
567    }
568}
569impl From<crate::operation::list_tags_for_resource::ListTagsForResourceError> for Error {
570    fn from(err: crate::operation::list_tags_for_resource::ListTagsForResourceError) -> Self {
571        match err {
572            crate::operation::list_tags_for_resource::ListTagsForResourceError::BadRequestException(inner) => Error::BadRequestException(inner),
573            crate::operation::list_tags_for_resource::ListTagsForResourceError::ForbiddenException(inner) => Error::ForbiddenException(inner),
574            crate::operation::list_tags_for_resource::ListTagsForResourceError::InternalServerErrorException(inner) => {
575                Error::InternalServerErrorException(inner)
576            }
577            crate::operation::list_tags_for_resource::ListTagsForResourceError::NotFoundException(inner) => Error::NotFoundException(inner),
578            crate::operation::list_tags_for_resource::ListTagsForResourceError::ServiceUnavailableException(inner) => {
579                Error::ServiceUnavailableException(inner)
580            }
581            crate::operation::list_tags_for_resource::ListTagsForResourceError::TooManyRequestsException(inner) => {
582                Error::TooManyRequestsException(inner)
583            }
584            crate::operation::list_tags_for_resource::ListTagsForResourceError::UnauthorizedException(inner) => Error::UnauthorizedException(inner),
585            crate::operation::list_tags_for_resource::ListTagsForResourceError::Unhandled(inner) => Error::Unhandled(inner),
586        }
587    }
588}
589impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::list_worker_configurations::ListWorkerConfigurationsError, R>>
590    for Error
591where
592    R: Send + Sync + std::fmt::Debug + 'static,
593{
594    fn from(
595        err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::list_worker_configurations::ListWorkerConfigurationsError, R>,
596    ) -> Self {
597        match err {
598            ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
599            _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
600                meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
601                source: err.into(),
602            }),
603        }
604    }
605}
606impl From<crate::operation::list_worker_configurations::ListWorkerConfigurationsError> for Error {
607    fn from(err: crate::operation::list_worker_configurations::ListWorkerConfigurationsError) -> Self {
608        match err {
609            crate::operation::list_worker_configurations::ListWorkerConfigurationsError::BadRequestException(inner) => {
610                Error::BadRequestException(inner)
611            }
612            crate::operation::list_worker_configurations::ListWorkerConfigurationsError::ForbiddenException(inner) => {
613                Error::ForbiddenException(inner)
614            }
615            crate::operation::list_worker_configurations::ListWorkerConfigurationsError::InternalServerErrorException(inner) => {
616                Error::InternalServerErrorException(inner)
617            }
618            crate::operation::list_worker_configurations::ListWorkerConfigurationsError::NotFoundException(inner) => Error::NotFoundException(inner),
619            crate::operation::list_worker_configurations::ListWorkerConfigurationsError::ServiceUnavailableException(inner) => {
620                Error::ServiceUnavailableException(inner)
621            }
622            crate::operation::list_worker_configurations::ListWorkerConfigurationsError::TooManyRequestsException(inner) => {
623                Error::TooManyRequestsException(inner)
624            }
625            crate::operation::list_worker_configurations::ListWorkerConfigurationsError::UnauthorizedException(inner) => {
626                Error::UnauthorizedException(inner)
627            }
628            crate::operation::list_worker_configurations::ListWorkerConfigurationsError::Unhandled(inner) => Error::Unhandled(inner),
629        }
630    }
631}
632impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::tag_resource::TagResourceError, R>> for Error
633where
634    R: Send + Sync + std::fmt::Debug + 'static,
635{
636    fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::tag_resource::TagResourceError, R>) -> Self {
637        match err {
638            ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
639            _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
640                meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
641                source: err.into(),
642            }),
643        }
644    }
645}
646impl From<crate::operation::tag_resource::TagResourceError> for Error {
647    fn from(err: crate::operation::tag_resource::TagResourceError) -> Self {
648        match err {
649            crate::operation::tag_resource::TagResourceError::BadRequestException(inner) => Error::BadRequestException(inner),
650            crate::operation::tag_resource::TagResourceError::ConflictException(inner) => Error::ConflictException(inner),
651            crate::operation::tag_resource::TagResourceError::ForbiddenException(inner) => Error::ForbiddenException(inner),
652            crate::operation::tag_resource::TagResourceError::InternalServerErrorException(inner) => Error::InternalServerErrorException(inner),
653            crate::operation::tag_resource::TagResourceError::NotFoundException(inner) => Error::NotFoundException(inner),
654            crate::operation::tag_resource::TagResourceError::ServiceUnavailableException(inner) => Error::ServiceUnavailableException(inner),
655            crate::operation::tag_resource::TagResourceError::TooManyRequestsException(inner) => Error::TooManyRequestsException(inner),
656            crate::operation::tag_resource::TagResourceError::UnauthorizedException(inner) => Error::UnauthorizedException(inner),
657            crate::operation::tag_resource::TagResourceError::Unhandled(inner) => Error::Unhandled(inner),
658        }
659    }
660}
661impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::untag_resource::UntagResourceError, R>> for Error
662where
663    R: Send + Sync + std::fmt::Debug + 'static,
664{
665    fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::untag_resource::UntagResourceError, R>) -> Self {
666        match err {
667            ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
668            _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
669                meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
670                source: err.into(),
671            }),
672        }
673    }
674}
675impl From<crate::operation::untag_resource::UntagResourceError> for Error {
676    fn from(err: crate::operation::untag_resource::UntagResourceError) -> Self {
677        match err {
678            crate::operation::untag_resource::UntagResourceError::BadRequestException(inner) => Error::BadRequestException(inner),
679            crate::operation::untag_resource::UntagResourceError::ForbiddenException(inner) => Error::ForbiddenException(inner),
680            crate::operation::untag_resource::UntagResourceError::InternalServerErrorException(inner) => Error::InternalServerErrorException(inner),
681            crate::operation::untag_resource::UntagResourceError::NotFoundException(inner) => Error::NotFoundException(inner),
682            crate::operation::untag_resource::UntagResourceError::ServiceUnavailableException(inner) => Error::ServiceUnavailableException(inner),
683            crate::operation::untag_resource::UntagResourceError::TooManyRequestsException(inner) => Error::TooManyRequestsException(inner),
684            crate::operation::untag_resource::UntagResourceError::UnauthorizedException(inner) => Error::UnauthorizedException(inner),
685            crate::operation::untag_resource::UntagResourceError::Unhandled(inner) => Error::Unhandled(inner),
686        }
687    }
688}
689impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::update_connector::UpdateConnectorError, R>> for Error
690where
691    R: Send + Sync + std::fmt::Debug + 'static,
692{
693    fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::update_connector::UpdateConnectorError, R>) -> Self {
694        match err {
695            ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
696            _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
697                meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
698                source: err.into(),
699            }),
700        }
701    }
702}
703impl From<crate::operation::update_connector::UpdateConnectorError> for Error {
704    fn from(err: crate::operation::update_connector::UpdateConnectorError) -> Self {
705        match err {
706            crate::operation::update_connector::UpdateConnectorError::BadRequestException(inner) => Error::BadRequestException(inner),
707            crate::operation::update_connector::UpdateConnectorError::ForbiddenException(inner) => Error::ForbiddenException(inner),
708            crate::operation::update_connector::UpdateConnectorError::InternalServerErrorException(inner) => {
709                Error::InternalServerErrorException(inner)
710            }
711            crate::operation::update_connector::UpdateConnectorError::NotFoundException(inner) => Error::NotFoundException(inner),
712            crate::operation::update_connector::UpdateConnectorError::ServiceUnavailableException(inner) => Error::ServiceUnavailableException(inner),
713            crate::operation::update_connector::UpdateConnectorError::TooManyRequestsException(inner) => Error::TooManyRequestsException(inner),
714            crate::operation::update_connector::UpdateConnectorError::UnauthorizedException(inner) => Error::UnauthorizedException(inner),
715            crate::operation::update_connector::UpdateConnectorError::Unhandled(inner) => Error::Unhandled(inner),
716        }
717    }
718}
719impl ::std::error::Error for Error {
720    fn source(&self) -> std::option::Option<&(dyn ::std::error::Error + 'static)> {
721        match self {
722            Error::BadRequestException(inner) => inner.source(),
723            Error::ConflictException(inner) => inner.source(),
724            Error::ForbiddenException(inner) => inner.source(),
725            Error::InternalServerErrorException(inner) => inner.source(),
726            Error::NotFoundException(inner) => inner.source(),
727            Error::ServiceUnavailableException(inner) => inner.source(),
728            Error::TooManyRequestsException(inner) => inner.source(),
729            Error::UnauthorizedException(inner) => inner.source(),
730            Error::Unhandled(inner) => ::std::option::Option::Some(&*inner.source),
731        }
732    }
733}
734impl ::aws_types::request_id::RequestId for Error {
735    fn request_id(&self) -> Option<&str> {
736        match self {
737            Self::BadRequestException(e) => e.request_id(),
738            Self::ConflictException(e) => e.request_id(),
739            Self::ForbiddenException(e) => e.request_id(),
740            Self::InternalServerErrorException(e) => e.request_id(),
741            Self::NotFoundException(e) => e.request_id(),
742            Self::ServiceUnavailableException(e) => e.request_id(),
743            Self::TooManyRequestsException(e) => e.request_id(),
744            Self::UnauthorizedException(e) => e.request_id(),
745            Self::Unhandled(e) => e.meta.request_id(),
746        }
747    }
748}