1#[non_exhaustive]
4#[derive(::std::fmt::Debug)]
5pub enum Error {
6 BatchSizeLimitExceededException(crate::types::error::BatchSizeLimitExceededException),
8 ConcurrentModificationException(crate::types::error::ConcurrentModificationException),
10 InternalServerException(crate::types::error::InternalServerException),
12 InvalidFilterException(crate::types::error::InvalidFilterException),
14 InvalidRequestException(crate::types::error::InvalidRequestException),
16 JobNotFoundException(crate::types::error::JobNotFoundException),
18 KmsKeyValidationException(crate::types::error::KmsKeyValidationException),
20 ResourceInUseException(crate::types::error::ResourceInUseException),
22 ResourceLimitExceededException(crate::types::error::ResourceLimitExceededException),
24 ResourceNotFoundException(crate::types::error::ResourceNotFoundException),
26 ResourceUnavailableException(crate::types::error::ResourceUnavailableException),
28 TextSizeLimitExceededException(crate::types::error::TextSizeLimitExceededException),
30 TooManyRequestsException(crate::types::error::TooManyRequestsException),
32 TooManyTagKeysException(crate::types::error::TooManyTagKeysException),
34 TooManyTagsException(crate::types::error::TooManyTagsException),
36 UnsupportedLanguageException(crate::types::error::UnsupportedLanguageException),
38 #[deprecated(note = "Matching `Unhandled` directly is not forwards compatible. Instead, match using a \
40 variable wildcard pattern and check `.code()`:
41 \
42 `err if err.code() == Some(\"SpecificExceptionCode\") => { /* handle the error */ }`
43 \
44 See [`ProvideErrorMetadata`](#impl-ProvideErrorMetadata-for-Error) for what information is available for the error.")]
45 Unhandled(crate::error::sealed_unhandled::Unhandled),
46}
47impl ::std::fmt::Display for Error {
48 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
49 match self {
50 Error::BatchSizeLimitExceededException(inner) => inner.fmt(f),
51 Error::ConcurrentModificationException(inner) => inner.fmt(f),
52 Error::InternalServerException(inner) => inner.fmt(f),
53 Error::InvalidFilterException(inner) => inner.fmt(f),
54 Error::InvalidRequestException(inner) => inner.fmt(f),
55 Error::JobNotFoundException(inner) => inner.fmt(f),
56 Error::KmsKeyValidationException(inner) => inner.fmt(f),
57 Error::ResourceInUseException(inner) => inner.fmt(f),
58 Error::ResourceLimitExceededException(inner) => inner.fmt(f),
59 Error::ResourceNotFoundException(inner) => inner.fmt(f),
60 Error::ResourceUnavailableException(inner) => inner.fmt(f),
61 Error::TextSizeLimitExceededException(inner) => inner.fmt(f),
62 Error::TooManyRequestsException(inner) => inner.fmt(f),
63 Error::TooManyTagKeysException(inner) => inner.fmt(f),
64 Error::TooManyTagsException(inner) => inner.fmt(f),
65 Error::UnsupportedLanguageException(inner) => inner.fmt(f),
66 Error::Unhandled(_) => {
67 if let ::std::option::Option::Some(code) = ::aws_smithy_types::error::metadata::ProvideErrorMetadata::code(self) {
68 write!(f, "unhandled error ({code})")
69 } else {
70 f.write_str("unhandled error")
71 }
72 }
73 }
74 }
75}
76impl From<::aws_smithy_types::error::operation::BuildError> for Error {
77 fn from(value: ::aws_smithy_types::error::operation::BuildError) -> Self {
78 Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
79 source: value.into(),
80 meta: ::std::default::Default::default(),
81 })
82 }
83}
84impl ::aws_smithy_types::error::metadata::ProvideErrorMetadata for Error {
85 fn meta(&self) -> &::aws_smithy_types::error::metadata::ErrorMetadata {
86 match self {
87 Self::BatchSizeLimitExceededException(inner) => inner.meta(),
88 Self::ConcurrentModificationException(inner) => inner.meta(),
89 Self::InternalServerException(inner) => inner.meta(),
90 Self::InvalidFilterException(inner) => inner.meta(),
91 Self::InvalidRequestException(inner) => inner.meta(),
92 Self::JobNotFoundException(inner) => inner.meta(),
93 Self::KmsKeyValidationException(inner) => inner.meta(),
94 Self::ResourceInUseException(inner) => inner.meta(),
95 Self::ResourceLimitExceededException(inner) => inner.meta(),
96 Self::ResourceNotFoundException(inner) => inner.meta(),
97 Self::ResourceUnavailableException(inner) => inner.meta(),
98 Self::TextSizeLimitExceededException(inner) => inner.meta(),
99 Self::TooManyRequestsException(inner) => inner.meta(),
100 Self::TooManyTagKeysException(inner) => inner.meta(),
101 Self::TooManyTagsException(inner) => inner.meta(),
102 Self::UnsupportedLanguageException(inner) => inner.meta(),
103 Self::Unhandled(inner) => &inner.meta,
104 }
105 }
106}
107impl<R>
108 From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::batch_detect_dominant_language::BatchDetectDominantLanguageError, R>>
109 for Error
110where
111 R: Send + Sync + std::fmt::Debug + 'static,
112{
113 fn from(
114 err: ::aws_smithy_runtime_api::client::result::SdkError<
115 crate::operation::batch_detect_dominant_language::BatchDetectDominantLanguageError,
116 R,
117 >,
118 ) -> Self {
119 match err {
120 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
121 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
122 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
123 source: err.into(),
124 }),
125 }
126 }
127}
128impl From<crate::operation::batch_detect_dominant_language::BatchDetectDominantLanguageError> for Error {
129 fn from(err: crate::operation::batch_detect_dominant_language::BatchDetectDominantLanguageError) -> Self {
130 match err {
131 crate::operation::batch_detect_dominant_language::BatchDetectDominantLanguageError::BatchSizeLimitExceededException(inner) => {
132 Error::BatchSizeLimitExceededException(inner)
133 }
134 crate::operation::batch_detect_dominant_language::BatchDetectDominantLanguageError::InternalServerException(inner) => {
135 Error::InternalServerException(inner)
136 }
137 crate::operation::batch_detect_dominant_language::BatchDetectDominantLanguageError::InvalidRequestException(inner) => {
138 Error::InvalidRequestException(inner)
139 }
140 crate::operation::batch_detect_dominant_language::BatchDetectDominantLanguageError::TextSizeLimitExceededException(inner) => {
141 Error::TextSizeLimitExceededException(inner)
142 }
143 crate::operation::batch_detect_dominant_language::BatchDetectDominantLanguageError::Unhandled(inner) => Error::Unhandled(inner),
144 }
145 }
146}
147impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::batch_detect_entities::BatchDetectEntitiesError, R>> for Error
148where
149 R: Send + Sync + std::fmt::Debug + 'static,
150{
151 fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::batch_detect_entities::BatchDetectEntitiesError, R>) -> Self {
152 match err {
153 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
154 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
155 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
156 source: err.into(),
157 }),
158 }
159 }
160}
161impl From<crate::operation::batch_detect_entities::BatchDetectEntitiesError> for Error {
162 fn from(err: crate::operation::batch_detect_entities::BatchDetectEntitiesError) -> Self {
163 match err {
164 crate::operation::batch_detect_entities::BatchDetectEntitiesError::BatchSizeLimitExceededException(inner) => {
165 Error::BatchSizeLimitExceededException(inner)
166 }
167 crate::operation::batch_detect_entities::BatchDetectEntitiesError::InternalServerException(inner) => {
168 Error::InternalServerException(inner)
169 }
170 crate::operation::batch_detect_entities::BatchDetectEntitiesError::InvalidRequestException(inner) => {
171 Error::InvalidRequestException(inner)
172 }
173 crate::operation::batch_detect_entities::BatchDetectEntitiesError::TextSizeLimitExceededException(inner) => {
174 Error::TextSizeLimitExceededException(inner)
175 }
176 crate::operation::batch_detect_entities::BatchDetectEntitiesError::UnsupportedLanguageException(inner) => {
177 Error::UnsupportedLanguageException(inner)
178 }
179 crate::operation::batch_detect_entities::BatchDetectEntitiesError::Unhandled(inner) => Error::Unhandled(inner),
180 }
181 }
182}
183impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::batch_detect_key_phrases::BatchDetectKeyPhrasesError, R>> for Error
184where
185 R: Send + Sync + std::fmt::Debug + 'static,
186{
187 fn from(
188 err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::batch_detect_key_phrases::BatchDetectKeyPhrasesError, R>,
189 ) -> Self {
190 match err {
191 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
192 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
193 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
194 source: err.into(),
195 }),
196 }
197 }
198}
199impl From<crate::operation::batch_detect_key_phrases::BatchDetectKeyPhrasesError> for Error {
200 fn from(err: crate::operation::batch_detect_key_phrases::BatchDetectKeyPhrasesError) -> Self {
201 match err {
202 crate::operation::batch_detect_key_phrases::BatchDetectKeyPhrasesError::BatchSizeLimitExceededException(inner) => {
203 Error::BatchSizeLimitExceededException(inner)
204 }
205 crate::operation::batch_detect_key_phrases::BatchDetectKeyPhrasesError::InternalServerException(inner) => {
206 Error::InternalServerException(inner)
207 }
208 crate::operation::batch_detect_key_phrases::BatchDetectKeyPhrasesError::InvalidRequestException(inner) => {
209 Error::InvalidRequestException(inner)
210 }
211 crate::operation::batch_detect_key_phrases::BatchDetectKeyPhrasesError::TextSizeLimitExceededException(inner) => {
212 Error::TextSizeLimitExceededException(inner)
213 }
214 crate::operation::batch_detect_key_phrases::BatchDetectKeyPhrasesError::UnsupportedLanguageException(inner) => {
215 Error::UnsupportedLanguageException(inner)
216 }
217 crate::operation::batch_detect_key_phrases::BatchDetectKeyPhrasesError::Unhandled(inner) => Error::Unhandled(inner),
218 }
219 }
220}
221impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::batch_detect_sentiment::BatchDetectSentimentError, R>> for Error
222where
223 R: Send + Sync + std::fmt::Debug + 'static,
224{
225 fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::batch_detect_sentiment::BatchDetectSentimentError, R>) -> Self {
226 match err {
227 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
228 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
229 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
230 source: err.into(),
231 }),
232 }
233 }
234}
235impl From<crate::operation::batch_detect_sentiment::BatchDetectSentimentError> for Error {
236 fn from(err: crate::operation::batch_detect_sentiment::BatchDetectSentimentError) -> Self {
237 match err {
238 crate::operation::batch_detect_sentiment::BatchDetectSentimentError::BatchSizeLimitExceededException(inner) => {
239 Error::BatchSizeLimitExceededException(inner)
240 }
241 crate::operation::batch_detect_sentiment::BatchDetectSentimentError::InternalServerException(inner) => {
242 Error::InternalServerException(inner)
243 }
244 crate::operation::batch_detect_sentiment::BatchDetectSentimentError::InvalidRequestException(inner) => {
245 Error::InvalidRequestException(inner)
246 }
247 crate::operation::batch_detect_sentiment::BatchDetectSentimentError::TextSizeLimitExceededException(inner) => {
248 Error::TextSizeLimitExceededException(inner)
249 }
250 crate::operation::batch_detect_sentiment::BatchDetectSentimentError::UnsupportedLanguageException(inner) => {
251 Error::UnsupportedLanguageException(inner)
252 }
253 crate::operation::batch_detect_sentiment::BatchDetectSentimentError::Unhandled(inner) => Error::Unhandled(inner),
254 }
255 }
256}
257impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::batch_detect_syntax::BatchDetectSyntaxError, R>> for Error
258where
259 R: Send + Sync + std::fmt::Debug + 'static,
260{
261 fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::batch_detect_syntax::BatchDetectSyntaxError, R>) -> Self {
262 match err {
263 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
264 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
265 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
266 source: err.into(),
267 }),
268 }
269 }
270}
271impl From<crate::operation::batch_detect_syntax::BatchDetectSyntaxError> for Error {
272 fn from(err: crate::operation::batch_detect_syntax::BatchDetectSyntaxError) -> Self {
273 match err {
274 crate::operation::batch_detect_syntax::BatchDetectSyntaxError::BatchSizeLimitExceededException(inner) => {
275 Error::BatchSizeLimitExceededException(inner)
276 }
277 crate::operation::batch_detect_syntax::BatchDetectSyntaxError::InternalServerException(inner) => Error::InternalServerException(inner),
278 crate::operation::batch_detect_syntax::BatchDetectSyntaxError::InvalidRequestException(inner) => Error::InvalidRequestException(inner),
279 crate::operation::batch_detect_syntax::BatchDetectSyntaxError::TextSizeLimitExceededException(inner) => {
280 Error::TextSizeLimitExceededException(inner)
281 }
282 crate::operation::batch_detect_syntax::BatchDetectSyntaxError::UnsupportedLanguageException(inner) => {
283 Error::UnsupportedLanguageException(inner)
284 }
285 crate::operation::batch_detect_syntax::BatchDetectSyntaxError::Unhandled(inner) => Error::Unhandled(inner),
286 }
287 }
288}
289impl<R>
290 From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::batch_detect_targeted_sentiment::BatchDetectTargetedSentimentError, R>>
291 for Error
292where
293 R: Send + Sync + std::fmt::Debug + 'static,
294{
295 fn from(
296 err: ::aws_smithy_runtime_api::client::result::SdkError<
297 crate::operation::batch_detect_targeted_sentiment::BatchDetectTargetedSentimentError,
298 R,
299 >,
300 ) -> Self {
301 match err {
302 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
303 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
304 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
305 source: err.into(),
306 }),
307 }
308 }
309}
310impl From<crate::operation::batch_detect_targeted_sentiment::BatchDetectTargetedSentimentError> for Error {
311 fn from(err: crate::operation::batch_detect_targeted_sentiment::BatchDetectTargetedSentimentError) -> Self {
312 match err {
313 crate::operation::batch_detect_targeted_sentiment::BatchDetectTargetedSentimentError::BatchSizeLimitExceededException(inner) => {
314 Error::BatchSizeLimitExceededException(inner)
315 }
316 crate::operation::batch_detect_targeted_sentiment::BatchDetectTargetedSentimentError::InternalServerException(inner) => {
317 Error::InternalServerException(inner)
318 }
319 crate::operation::batch_detect_targeted_sentiment::BatchDetectTargetedSentimentError::InvalidRequestException(inner) => {
320 Error::InvalidRequestException(inner)
321 }
322 crate::operation::batch_detect_targeted_sentiment::BatchDetectTargetedSentimentError::TextSizeLimitExceededException(inner) => {
323 Error::TextSizeLimitExceededException(inner)
324 }
325 crate::operation::batch_detect_targeted_sentiment::BatchDetectTargetedSentimentError::UnsupportedLanguageException(inner) => {
326 Error::UnsupportedLanguageException(inner)
327 }
328 crate::operation::batch_detect_targeted_sentiment::BatchDetectTargetedSentimentError::Unhandled(inner) => Error::Unhandled(inner),
329 }
330 }
331}
332impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::classify_document::ClassifyDocumentError, R>> for Error
333where
334 R: Send + Sync + std::fmt::Debug + 'static,
335{
336 fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::classify_document::ClassifyDocumentError, R>) -> Self {
337 match err {
338 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
339 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
340 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
341 source: err.into(),
342 }),
343 }
344 }
345}
346impl From<crate::operation::classify_document::ClassifyDocumentError> for Error {
347 fn from(err: crate::operation::classify_document::ClassifyDocumentError) -> Self {
348 match err {
349 crate::operation::classify_document::ClassifyDocumentError::InternalServerException(inner) => Error::InternalServerException(inner),
350 crate::operation::classify_document::ClassifyDocumentError::InvalidRequestException(inner) => Error::InvalidRequestException(inner),
351 crate::operation::classify_document::ClassifyDocumentError::ResourceUnavailableException(inner) => {
352 Error::ResourceUnavailableException(inner)
353 }
354 crate::operation::classify_document::ClassifyDocumentError::TextSizeLimitExceededException(inner) => {
355 Error::TextSizeLimitExceededException(inner)
356 }
357 crate::operation::classify_document::ClassifyDocumentError::Unhandled(inner) => Error::Unhandled(inner),
358 }
359 }
360}
361impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::contains_pii_entities::ContainsPiiEntitiesError, R>> for Error
362where
363 R: Send + Sync + std::fmt::Debug + 'static,
364{
365 fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::contains_pii_entities::ContainsPiiEntitiesError, R>) -> Self {
366 match err {
367 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
368 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
369 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
370 source: err.into(),
371 }),
372 }
373 }
374}
375impl From<crate::operation::contains_pii_entities::ContainsPiiEntitiesError> for Error {
376 fn from(err: crate::operation::contains_pii_entities::ContainsPiiEntitiesError) -> Self {
377 match err {
378 crate::operation::contains_pii_entities::ContainsPiiEntitiesError::InternalServerException(inner) => {
379 Error::InternalServerException(inner)
380 }
381 crate::operation::contains_pii_entities::ContainsPiiEntitiesError::InvalidRequestException(inner) => {
382 Error::InvalidRequestException(inner)
383 }
384 crate::operation::contains_pii_entities::ContainsPiiEntitiesError::TextSizeLimitExceededException(inner) => {
385 Error::TextSizeLimitExceededException(inner)
386 }
387 crate::operation::contains_pii_entities::ContainsPiiEntitiesError::UnsupportedLanguageException(inner) => {
388 Error::UnsupportedLanguageException(inner)
389 }
390 crate::operation::contains_pii_entities::ContainsPiiEntitiesError::Unhandled(inner) => Error::Unhandled(inner),
391 }
392 }
393}
394impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::create_dataset::CreateDatasetError, R>> for Error
395where
396 R: Send + Sync + std::fmt::Debug + 'static,
397{
398 fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::create_dataset::CreateDatasetError, R>) -> Self {
399 match err {
400 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
401 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
402 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
403 source: err.into(),
404 }),
405 }
406 }
407}
408impl From<crate::operation::create_dataset::CreateDatasetError> for Error {
409 fn from(err: crate::operation::create_dataset::CreateDatasetError) -> Self {
410 match err {
411 crate::operation::create_dataset::CreateDatasetError::InternalServerException(inner) => Error::InternalServerException(inner),
412 crate::operation::create_dataset::CreateDatasetError::InvalidRequestException(inner) => Error::InvalidRequestException(inner),
413 crate::operation::create_dataset::CreateDatasetError::ResourceInUseException(inner) => Error::ResourceInUseException(inner),
414 crate::operation::create_dataset::CreateDatasetError::ResourceLimitExceededException(inner) => {
415 Error::ResourceLimitExceededException(inner)
416 }
417 crate::operation::create_dataset::CreateDatasetError::ResourceNotFoundException(inner) => Error::ResourceNotFoundException(inner),
418 crate::operation::create_dataset::CreateDatasetError::TooManyRequestsException(inner) => Error::TooManyRequestsException(inner),
419 crate::operation::create_dataset::CreateDatasetError::TooManyTagsException(inner) => Error::TooManyTagsException(inner),
420 crate::operation::create_dataset::CreateDatasetError::Unhandled(inner) => Error::Unhandled(inner),
421 }
422 }
423}
424impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::create_document_classifier::CreateDocumentClassifierError, R>>
425 for Error
426where
427 R: Send + Sync + std::fmt::Debug + 'static,
428{
429 fn from(
430 err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::create_document_classifier::CreateDocumentClassifierError, R>,
431 ) -> Self {
432 match err {
433 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
434 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
435 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
436 source: err.into(),
437 }),
438 }
439 }
440}
441impl From<crate::operation::create_document_classifier::CreateDocumentClassifierError> for Error {
442 fn from(err: crate::operation::create_document_classifier::CreateDocumentClassifierError) -> Self {
443 match err {
444 crate::operation::create_document_classifier::CreateDocumentClassifierError::InternalServerException(inner) => {
445 Error::InternalServerException(inner)
446 }
447 crate::operation::create_document_classifier::CreateDocumentClassifierError::InvalidRequestException(inner) => {
448 Error::InvalidRequestException(inner)
449 }
450 crate::operation::create_document_classifier::CreateDocumentClassifierError::KmsKeyValidationException(inner) => {
451 Error::KmsKeyValidationException(inner)
452 }
453 crate::operation::create_document_classifier::CreateDocumentClassifierError::ResourceInUseException(inner) => {
454 Error::ResourceInUseException(inner)
455 }
456 crate::operation::create_document_classifier::CreateDocumentClassifierError::ResourceLimitExceededException(inner) => {
457 Error::ResourceLimitExceededException(inner)
458 }
459 crate::operation::create_document_classifier::CreateDocumentClassifierError::TooManyRequestsException(inner) => {
460 Error::TooManyRequestsException(inner)
461 }
462 crate::operation::create_document_classifier::CreateDocumentClassifierError::TooManyTagsException(inner) => {
463 Error::TooManyTagsException(inner)
464 }
465 crate::operation::create_document_classifier::CreateDocumentClassifierError::UnsupportedLanguageException(inner) => {
466 Error::UnsupportedLanguageException(inner)
467 }
468 crate::operation::create_document_classifier::CreateDocumentClassifierError::Unhandled(inner) => Error::Unhandled(inner),
469 }
470 }
471}
472impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::create_endpoint::CreateEndpointError, R>> for Error
473where
474 R: Send + Sync + std::fmt::Debug + 'static,
475{
476 fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::create_endpoint::CreateEndpointError, R>) -> Self {
477 match err {
478 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
479 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
480 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
481 source: err.into(),
482 }),
483 }
484 }
485}
486impl From<crate::operation::create_endpoint::CreateEndpointError> for Error {
487 fn from(err: crate::operation::create_endpoint::CreateEndpointError) -> Self {
488 match err {
489 crate::operation::create_endpoint::CreateEndpointError::InternalServerException(inner) => Error::InternalServerException(inner),
490 crate::operation::create_endpoint::CreateEndpointError::InvalidRequestException(inner) => Error::InvalidRequestException(inner),
491 crate::operation::create_endpoint::CreateEndpointError::ResourceInUseException(inner) => Error::ResourceInUseException(inner),
492 crate::operation::create_endpoint::CreateEndpointError::ResourceLimitExceededException(inner) => {
493 Error::ResourceLimitExceededException(inner)
494 }
495 crate::operation::create_endpoint::CreateEndpointError::ResourceNotFoundException(inner) => Error::ResourceNotFoundException(inner),
496 crate::operation::create_endpoint::CreateEndpointError::ResourceUnavailableException(inner) => Error::ResourceUnavailableException(inner),
497 crate::operation::create_endpoint::CreateEndpointError::TooManyRequestsException(inner) => Error::TooManyRequestsException(inner),
498 crate::operation::create_endpoint::CreateEndpointError::TooManyTagsException(inner) => Error::TooManyTagsException(inner),
499 crate::operation::create_endpoint::CreateEndpointError::Unhandled(inner) => Error::Unhandled(inner),
500 }
501 }
502}
503impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::create_entity_recognizer::CreateEntityRecognizerError, R>> for Error
504where
505 R: Send + Sync + std::fmt::Debug + 'static,
506{
507 fn from(
508 err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::create_entity_recognizer::CreateEntityRecognizerError, R>,
509 ) -> Self {
510 match err {
511 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
512 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
513 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
514 source: err.into(),
515 }),
516 }
517 }
518}
519impl From<crate::operation::create_entity_recognizer::CreateEntityRecognizerError> for Error {
520 fn from(err: crate::operation::create_entity_recognizer::CreateEntityRecognizerError) -> Self {
521 match err {
522 crate::operation::create_entity_recognizer::CreateEntityRecognizerError::InternalServerException(inner) => {
523 Error::InternalServerException(inner)
524 }
525 crate::operation::create_entity_recognizer::CreateEntityRecognizerError::InvalidRequestException(inner) => {
526 Error::InvalidRequestException(inner)
527 }
528 crate::operation::create_entity_recognizer::CreateEntityRecognizerError::KmsKeyValidationException(inner) => {
529 Error::KmsKeyValidationException(inner)
530 }
531 crate::operation::create_entity_recognizer::CreateEntityRecognizerError::ResourceInUseException(inner) => {
532 Error::ResourceInUseException(inner)
533 }
534 crate::operation::create_entity_recognizer::CreateEntityRecognizerError::ResourceLimitExceededException(inner) => {
535 Error::ResourceLimitExceededException(inner)
536 }
537 crate::operation::create_entity_recognizer::CreateEntityRecognizerError::TooManyRequestsException(inner) => {
538 Error::TooManyRequestsException(inner)
539 }
540 crate::operation::create_entity_recognizer::CreateEntityRecognizerError::TooManyTagsException(inner) => {
541 Error::TooManyTagsException(inner)
542 }
543 crate::operation::create_entity_recognizer::CreateEntityRecognizerError::UnsupportedLanguageException(inner) => {
544 Error::UnsupportedLanguageException(inner)
545 }
546 crate::operation::create_entity_recognizer::CreateEntityRecognizerError::Unhandled(inner) => Error::Unhandled(inner),
547 }
548 }
549}
550impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::create_flywheel::CreateFlywheelError, R>> for Error
551where
552 R: Send + Sync + std::fmt::Debug + 'static,
553{
554 fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::create_flywheel::CreateFlywheelError, R>) -> Self {
555 match err {
556 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
557 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
558 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
559 source: err.into(),
560 }),
561 }
562 }
563}
564impl From<crate::operation::create_flywheel::CreateFlywheelError> for Error {
565 fn from(err: crate::operation::create_flywheel::CreateFlywheelError) -> Self {
566 match err {
567 crate::operation::create_flywheel::CreateFlywheelError::InternalServerException(inner) => Error::InternalServerException(inner),
568 crate::operation::create_flywheel::CreateFlywheelError::InvalidRequestException(inner) => Error::InvalidRequestException(inner),
569 crate::operation::create_flywheel::CreateFlywheelError::KmsKeyValidationException(inner) => Error::KmsKeyValidationException(inner),
570 crate::operation::create_flywheel::CreateFlywheelError::ResourceInUseException(inner) => Error::ResourceInUseException(inner),
571 crate::operation::create_flywheel::CreateFlywheelError::ResourceLimitExceededException(inner) => {
572 Error::ResourceLimitExceededException(inner)
573 }
574 crate::operation::create_flywheel::CreateFlywheelError::ResourceNotFoundException(inner) => Error::ResourceNotFoundException(inner),
575 crate::operation::create_flywheel::CreateFlywheelError::ResourceUnavailableException(inner) => Error::ResourceUnavailableException(inner),
576 crate::operation::create_flywheel::CreateFlywheelError::TooManyRequestsException(inner) => Error::TooManyRequestsException(inner),
577 crate::operation::create_flywheel::CreateFlywheelError::TooManyTagsException(inner) => Error::TooManyTagsException(inner),
578 crate::operation::create_flywheel::CreateFlywheelError::UnsupportedLanguageException(inner) => Error::UnsupportedLanguageException(inner),
579 crate::operation::create_flywheel::CreateFlywheelError::Unhandled(inner) => Error::Unhandled(inner),
580 }
581 }
582}
583impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::delete_document_classifier::DeleteDocumentClassifierError, R>>
584 for Error
585where
586 R: Send + Sync + std::fmt::Debug + 'static,
587{
588 fn from(
589 err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::delete_document_classifier::DeleteDocumentClassifierError, R>,
590 ) -> Self {
591 match err {
592 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
593 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
594 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
595 source: err.into(),
596 }),
597 }
598 }
599}
600impl From<crate::operation::delete_document_classifier::DeleteDocumentClassifierError> for Error {
601 fn from(err: crate::operation::delete_document_classifier::DeleteDocumentClassifierError) -> Self {
602 match err {
603 crate::operation::delete_document_classifier::DeleteDocumentClassifierError::InternalServerException(inner) => {
604 Error::InternalServerException(inner)
605 }
606 crate::operation::delete_document_classifier::DeleteDocumentClassifierError::InvalidRequestException(inner) => {
607 Error::InvalidRequestException(inner)
608 }
609 crate::operation::delete_document_classifier::DeleteDocumentClassifierError::ResourceInUseException(inner) => {
610 Error::ResourceInUseException(inner)
611 }
612 crate::operation::delete_document_classifier::DeleteDocumentClassifierError::ResourceNotFoundException(inner) => {
613 Error::ResourceNotFoundException(inner)
614 }
615 crate::operation::delete_document_classifier::DeleteDocumentClassifierError::ResourceUnavailableException(inner) => {
616 Error::ResourceUnavailableException(inner)
617 }
618 crate::operation::delete_document_classifier::DeleteDocumentClassifierError::TooManyRequestsException(inner) => {
619 Error::TooManyRequestsException(inner)
620 }
621 crate::operation::delete_document_classifier::DeleteDocumentClassifierError::Unhandled(inner) => Error::Unhandled(inner),
622 }
623 }
624}
625impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::delete_endpoint::DeleteEndpointError, R>> for Error
626where
627 R: Send + Sync + std::fmt::Debug + 'static,
628{
629 fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::delete_endpoint::DeleteEndpointError, R>) -> Self {
630 match err {
631 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
632 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
633 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
634 source: err.into(),
635 }),
636 }
637 }
638}
639impl From<crate::operation::delete_endpoint::DeleteEndpointError> for Error {
640 fn from(err: crate::operation::delete_endpoint::DeleteEndpointError) -> Self {
641 match err {
642 crate::operation::delete_endpoint::DeleteEndpointError::InternalServerException(inner) => Error::InternalServerException(inner),
643 crate::operation::delete_endpoint::DeleteEndpointError::InvalidRequestException(inner) => Error::InvalidRequestException(inner),
644 crate::operation::delete_endpoint::DeleteEndpointError::ResourceInUseException(inner) => Error::ResourceInUseException(inner),
645 crate::operation::delete_endpoint::DeleteEndpointError::ResourceNotFoundException(inner) => Error::ResourceNotFoundException(inner),
646 crate::operation::delete_endpoint::DeleteEndpointError::TooManyRequestsException(inner) => Error::TooManyRequestsException(inner),
647 crate::operation::delete_endpoint::DeleteEndpointError::Unhandled(inner) => Error::Unhandled(inner),
648 }
649 }
650}
651impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::delete_entity_recognizer::DeleteEntityRecognizerError, R>> for Error
652where
653 R: Send + Sync + std::fmt::Debug + 'static,
654{
655 fn from(
656 err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::delete_entity_recognizer::DeleteEntityRecognizerError, R>,
657 ) -> Self {
658 match err {
659 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
660 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
661 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
662 source: err.into(),
663 }),
664 }
665 }
666}
667impl From<crate::operation::delete_entity_recognizer::DeleteEntityRecognizerError> for Error {
668 fn from(err: crate::operation::delete_entity_recognizer::DeleteEntityRecognizerError) -> Self {
669 match err {
670 crate::operation::delete_entity_recognizer::DeleteEntityRecognizerError::InternalServerException(inner) => {
671 Error::InternalServerException(inner)
672 }
673 crate::operation::delete_entity_recognizer::DeleteEntityRecognizerError::InvalidRequestException(inner) => {
674 Error::InvalidRequestException(inner)
675 }
676 crate::operation::delete_entity_recognizer::DeleteEntityRecognizerError::ResourceInUseException(inner) => {
677 Error::ResourceInUseException(inner)
678 }
679 crate::operation::delete_entity_recognizer::DeleteEntityRecognizerError::ResourceNotFoundException(inner) => {
680 Error::ResourceNotFoundException(inner)
681 }
682 crate::operation::delete_entity_recognizer::DeleteEntityRecognizerError::ResourceUnavailableException(inner) => {
683 Error::ResourceUnavailableException(inner)
684 }
685 crate::operation::delete_entity_recognizer::DeleteEntityRecognizerError::TooManyRequestsException(inner) => {
686 Error::TooManyRequestsException(inner)
687 }
688 crate::operation::delete_entity_recognizer::DeleteEntityRecognizerError::Unhandled(inner) => Error::Unhandled(inner),
689 }
690 }
691}
692impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::delete_flywheel::DeleteFlywheelError, R>> for Error
693where
694 R: Send + Sync + std::fmt::Debug + 'static,
695{
696 fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::delete_flywheel::DeleteFlywheelError, R>) -> Self {
697 match err {
698 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
699 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
700 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
701 source: err.into(),
702 }),
703 }
704 }
705}
706impl From<crate::operation::delete_flywheel::DeleteFlywheelError> for Error {
707 fn from(err: crate::operation::delete_flywheel::DeleteFlywheelError) -> Self {
708 match err {
709 crate::operation::delete_flywheel::DeleteFlywheelError::InternalServerException(inner) => Error::InternalServerException(inner),
710 crate::operation::delete_flywheel::DeleteFlywheelError::InvalidRequestException(inner) => Error::InvalidRequestException(inner),
711 crate::operation::delete_flywheel::DeleteFlywheelError::ResourceInUseException(inner) => Error::ResourceInUseException(inner),
712 crate::operation::delete_flywheel::DeleteFlywheelError::ResourceNotFoundException(inner) => Error::ResourceNotFoundException(inner),
713 crate::operation::delete_flywheel::DeleteFlywheelError::ResourceUnavailableException(inner) => Error::ResourceUnavailableException(inner),
714 crate::operation::delete_flywheel::DeleteFlywheelError::TooManyRequestsException(inner) => Error::TooManyRequestsException(inner),
715 crate::operation::delete_flywheel::DeleteFlywheelError::Unhandled(inner) => Error::Unhandled(inner),
716 }
717 }
718}
719impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::delete_resource_policy::DeleteResourcePolicyError, R>> for Error
720where
721 R: Send + Sync + std::fmt::Debug + 'static,
722{
723 fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::delete_resource_policy::DeleteResourcePolicyError, R>) -> Self {
724 match err {
725 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
726 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
727 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
728 source: err.into(),
729 }),
730 }
731 }
732}
733impl From<crate::operation::delete_resource_policy::DeleteResourcePolicyError> for Error {
734 fn from(err: crate::operation::delete_resource_policy::DeleteResourcePolicyError) -> Self {
735 match err {
736 crate::operation::delete_resource_policy::DeleteResourcePolicyError::InternalServerException(inner) => {
737 Error::InternalServerException(inner)
738 }
739 crate::operation::delete_resource_policy::DeleteResourcePolicyError::InvalidRequestException(inner) => {
740 Error::InvalidRequestException(inner)
741 }
742 crate::operation::delete_resource_policy::DeleteResourcePolicyError::ResourceNotFoundException(inner) => {
743 Error::ResourceNotFoundException(inner)
744 }
745 crate::operation::delete_resource_policy::DeleteResourcePolicyError::Unhandled(inner) => Error::Unhandled(inner),
746 }
747 }
748}
749impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::describe_dataset::DescribeDatasetError, R>> for Error
750where
751 R: Send + Sync + std::fmt::Debug + 'static,
752{
753 fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::describe_dataset::DescribeDatasetError, R>) -> Self {
754 match err {
755 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
756 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
757 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
758 source: err.into(),
759 }),
760 }
761 }
762}
763impl From<crate::operation::describe_dataset::DescribeDatasetError> for Error {
764 fn from(err: crate::operation::describe_dataset::DescribeDatasetError) -> Self {
765 match err {
766 crate::operation::describe_dataset::DescribeDatasetError::InternalServerException(inner) => Error::InternalServerException(inner),
767 crate::operation::describe_dataset::DescribeDatasetError::InvalidRequestException(inner) => Error::InvalidRequestException(inner),
768 crate::operation::describe_dataset::DescribeDatasetError::ResourceNotFoundException(inner) => Error::ResourceNotFoundException(inner),
769 crate::operation::describe_dataset::DescribeDatasetError::TooManyRequestsException(inner) => Error::TooManyRequestsException(inner),
770 crate::operation::describe_dataset::DescribeDatasetError::Unhandled(inner) => Error::Unhandled(inner),
771 }
772 }
773}
774impl<R>
775 From<
776 ::aws_smithy_runtime_api::client::result::SdkError<
777 crate::operation::describe_document_classification_job::DescribeDocumentClassificationJobError,
778 R,
779 >,
780 > for Error
781where
782 R: Send + Sync + std::fmt::Debug + 'static,
783{
784 fn from(
785 err: ::aws_smithy_runtime_api::client::result::SdkError<
786 crate::operation::describe_document_classification_job::DescribeDocumentClassificationJobError,
787 R,
788 >,
789 ) -> Self {
790 match err {
791 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
792 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
793 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
794 source: err.into(),
795 }),
796 }
797 }
798}
799impl From<crate::operation::describe_document_classification_job::DescribeDocumentClassificationJobError> for Error {
800 fn from(err: crate::operation::describe_document_classification_job::DescribeDocumentClassificationJobError) -> Self {
801 match err {
802 crate::operation::describe_document_classification_job::DescribeDocumentClassificationJobError::InternalServerException(inner) => {
803 Error::InternalServerException(inner)
804 }
805 crate::operation::describe_document_classification_job::DescribeDocumentClassificationJobError::InvalidRequestException(inner) => {
806 Error::InvalidRequestException(inner)
807 }
808 crate::operation::describe_document_classification_job::DescribeDocumentClassificationJobError::JobNotFoundException(inner) => {
809 Error::JobNotFoundException(inner)
810 }
811 crate::operation::describe_document_classification_job::DescribeDocumentClassificationJobError::TooManyRequestsException(inner) => {
812 Error::TooManyRequestsException(inner)
813 }
814 crate::operation::describe_document_classification_job::DescribeDocumentClassificationJobError::Unhandled(inner) => {
815 Error::Unhandled(inner)
816 }
817 }
818 }
819}
820impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::describe_document_classifier::DescribeDocumentClassifierError, R>>
821 for Error
822where
823 R: Send + Sync + std::fmt::Debug + 'static,
824{
825 fn from(
826 err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::describe_document_classifier::DescribeDocumentClassifierError, R>,
827 ) -> Self {
828 match err {
829 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
830 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
831 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
832 source: err.into(),
833 }),
834 }
835 }
836}
837impl From<crate::operation::describe_document_classifier::DescribeDocumentClassifierError> for Error {
838 fn from(err: crate::operation::describe_document_classifier::DescribeDocumentClassifierError) -> Self {
839 match err {
840 crate::operation::describe_document_classifier::DescribeDocumentClassifierError::InternalServerException(inner) => {
841 Error::InternalServerException(inner)
842 }
843 crate::operation::describe_document_classifier::DescribeDocumentClassifierError::InvalidRequestException(inner) => {
844 Error::InvalidRequestException(inner)
845 }
846 crate::operation::describe_document_classifier::DescribeDocumentClassifierError::ResourceNotFoundException(inner) => {
847 Error::ResourceNotFoundException(inner)
848 }
849 crate::operation::describe_document_classifier::DescribeDocumentClassifierError::TooManyRequestsException(inner) => {
850 Error::TooManyRequestsException(inner)
851 }
852 crate::operation::describe_document_classifier::DescribeDocumentClassifierError::Unhandled(inner) => Error::Unhandled(inner),
853 }
854 }
855}
856impl<R>
857 From<
858 ::aws_smithy_runtime_api::client::result::SdkError<
859 crate::operation::describe_dominant_language_detection_job::DescribeDominantLanguageDetectionJobError,
860 R,
861 >,
862 > for Error
863where
864 R: Send + Sync + std::fmt::Debug + 'static,
865{
866 fn from(
867 err: ::aws_smithy_runtime_api::client::result::SdkError<
868 crate::operation::describe_dominant_language_detection_job::DescribeDominantLanguageDetectionJobError,
869 R,
870 >,
871 ) -> Self {
872 match err {
873 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
874 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
875 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
876 source: err.into(),
877 }),
878 }
879 }
880}
881impl From<crate::operation::describe_dominant_language_detection_job::DescribeDominantLanguageDetectionJobError> for Error {
882 fn from(err: crate::operation::describe_dominant_language_detection_job::DescribeDominantLanguageDetectionJobError) -> Self {
883 match err {
884 crate::operation::describe_dominant_language_detection_job::DescribeDominantLanguageDetectionJobError::InternalServerException(inner) => {
885 Error::InternalServerException(inner)
886 }
887 crate::operation::describe_dominant_language_detection_job::DescribeDominantLanguageDetectionJobError::InvalidRequestException(inner) => {
888 Error::InvalidRequestException(inner)
889 }
890 crate::operation::describe_dominant_language_detection_job::DescribeDominantLanguageDetectionJobError::JobNotFoundException(inner) => {
891 Error::JobNotFoundException(inner)
892 }
893 crate::operation::describe_dominant_language_detection_job::DescribeDominantLanguageDetectionJobError::TooManyRequestsException(
894 inner,
895 ) => Error::TooManyRequestsException(inner),
896 crate::operation::describe_dominant_language_detection_job::DescribeDominantLanguageDetectionJobError::Unhandled(inner) => {
897 Error::Unhandled(inner)
898 }
899 }
900 }
901}
902impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::describe_endpoint::DescribeEndpointError, R>> for Error
903where
904 R: Send + Sync + std::fmt::Debug + 'static,
905{
906 fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::describe_endpoint::DescribeEndpointError, R>) -> Self {
907 match err {
908 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
909 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
910 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
911 source: err.into(),
912 }),
913 }
914 }
915}
916impl From<crate::operation::describe_endpoint::DescribeEndpointError> for Error {
917 fn from(err: crate::operation::describe_endpoint::DescribeEndpointError) -> Self {
918 match err {
919 crate::operation::describe_endpoint::DescribeEndpointError::InternalServerException(inner) => Error::InternalServerException(inner),
920 crate::operation::describe_endpoint::DescribeEndpointError::InvalidRequestException(inner) => Error::InvalidRequestException(inner),
921 crate::operation::describe_endpoint::DescribeEndpointError::ResourceNotFoundException(inner) => Error::ResourceNotFoundException(inner),
922 crate::operation::describe_endpoint::DescribeEndpointError::TooManyRequestsException(inner) => Error::TooManyRequestsException(inner),
923 crate::operation::describe_endpoint::DescribeEndpointError::Unhandled(inner) => Error::Unhandled(inner),
924 }
925 }
926}
927impl<R>
928 From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::describe_entities_detection_job::DescribeEntitiesDetectionJobError, R>>
929 for Error
930where
931 R: Send + Sync + std::fmt::Debug + 'static,
932{
933 fn from(
934 err: ::aws_smithy_runtime_api::client::result::SdkError<
935 crate::operation::describe_entities_detection_job::DescribeEntitiesDetectionJobError,
936 R,
937 >,
938 ) -> Self {
939 match err {
940 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
941 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
942 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
943 source: err.into(),
944 }),
945 }
946 }
947}
948impl From<crate::operation::describe_entities_detection_job::DescribeEntitiesDetectionJobError> for Error {
949 fn from(err: crate::operation::describe_entities_detection_job::DescribeEntitiesDetectionJobError) -> Self {
950 match err {
951 crate::operation::describe_entities_detection_job::DescribeEntitiesDetectionJobError::InternalServerException(inner) => {
952 Error::InternalServerException(inner)
953 }
954 crate::operation::describe_entities_detection_job::DescribeEntitiesDetectionJobError::InvalidRequestException(inner) => {
955 Error::InvalidRequestException(inner)
956 }
957 crate::operation::describe_entities_detection_job::DescribeEntitiesDetectionJobError::JobNotFoundException(inner) => {
958 Error::JobNotFoundException(inner)
959 }
960 crate::operation::describe_entities_detection_job::DescribeEntitiesDetectionJobError::TooManyRequestsException(inner) => {
961 Error::TooManyRequestsException(inner)
962 }
963 crate::operation::describe_entities_detection_job::DescribeEntitiesDetectionJobError::Unhandled(inner) => Error::Unhandled(inner),
964 }
965 }
966}
967impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::describe_entity_recognizer::DescribeEntityRecognizerError, R>>
968 for Error
969where
970 R: Send + Sync + std::fmt::Debug + 'static,
971{
972 fn from(
973 err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::describe_entity_recognizer::DescribeEntityRecognizerError, R>,
974 ) -> Self {
975 match err {
976 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
977 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
978 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
979 source: err.into(),
980 }),
981 }
982 }
983}
984impl From<crate::operation::describe_entity_recognizer::DescribeEntityRecognizerError> for Error {
985 fn from(err: crate::operation::describe_entity_recognizer::DescribeEntityRecognizerError) -> Self {
986 match err {
987 crate::operation::describe_entity_recognizer::DescribeEntityRecognizerError::InternalServerException(inner) => {
988 Error::InternalServerException(inner)
989 }
990 crate::operation::describe_entity_recognizer::DescribeEntityRecognizerError::InvalidRequestException(inner) => {
991 Error::InvalidRequestException(inner)
992 }
993 crate::operation::describe_entity_recognizer::DescribeEntityRecognizerError::ResourceNotFoundException(inner) => {
994 Error::ResourceNotFoundException(inner)
995 }
996 crate::operation::describe_entity_recognizer::DescribeEntityRecognizerError::TooManyRequestsException(inner) => {
997 Error::TooManyRequestsException(inner)
998 }
999 crate::operation::describe_entity_recognizer::DescribeEntityRecognizerError::Unhandled(inner) => Error::Unhandled(inner),
1000 }
1001 }
1002}
1003impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::describe_events_detection_job::DescribeEventsDetectionJobError, R>>
1004 for Error
1005where
1006 R: Send + Sync + std::fmt::Debug + 'static,
1007{
1008 fn from(
1009 err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::describe_events_detection_job::DescribeEventsDetectionJobError, R>,
1010 ) -> Self {
1011 match err {
1012 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
1013 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
1014 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
1015 source: err.into(),
1016 }),
1017 }
1018 }
1019}
1020impl From<crate::operation::describe_events_detection_job::DescribeEventsDetectionJobError> for Error {
1021 fn from(err: crate::operation::describe_events_detection_job::DescribeEventsDetectionJobError) -> Self {
1022 match err {
1023 crate::operation::describe_events_detection_job::DescribeEventsDetectionJobError::InternalServerException(inner) => {
1024 Error::InternalServerException(inner)
1025 }
1026 crate::operation::describe_events_detection_job::DescribeEventsDetectionJobError::InvalidRequestException(inner) => {
1027 Error::InvalidRequestException(inner)
1028 }
1029 crate::operation::describe_events_detection_job::DescribeEventsDetectionJobError::JobNotFoundException(inner) => {
1030 Error::JobNotFoundException(inner)
1031 }
1032 crate::operation::describe_events_detection_job::DescribeEventsDetectionJobError::TooManyRequestsException(inner) => {
1033 Error::TooManyRequestsException(inner)
1034 }
1035 crate::operation::describe_events_detection_job::DescribeEventsDetectionJobError::Unhandled(inner) => Error::Unhandled(inner),
1036 }
1037 }
1038}
1039impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::describe_flywheel::DescribeFlywheelError, R>> for Error
1040where
1041 R: Send + Sync + std::fmt::Debug + 'static,
1042{
1043 fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::describe_flywheel::DescribeFlywheelError, R>) -> Self {
1044 match err {
1045 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
1046 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
1047 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
1048 source: err.into(),
1049 }),
1050 }
1051 }
1052}
1053impl From<crate::operation::describe_flywheel::DescribeFlywheelError> for Error {
1054 fn from(err: crate::operation::describe_flywheel::DescribeFlywheelError) -> Self {
1055 match err {
1056 crate::operation::describe_flywheel::DescribeFlywheelError::InternalServerException(inner) => Error::InternalServerException(inner),
1057 crate::operation::describe_flywheel::DescribeFlywheelError::InvalidRequestException(inner) => Error::InvalidRequestException(inner),
1058 crate::operation::describe_flywheel::DescribeFlywheelError::ResourceNotFoundException(inner) => Error::ResourceNotFoundException(inner),
1059 crate::operation::describe_flywheel::DescribeFlywheelError::TooManyRequestsException(inner) => Error::TooManyRequestsException(inner),
1060 crate::operation::describe_flywheel::DescribeFlywheelError::Unhandled(inner) => Error::Unhandled(inner),
1061 }
1062 }
1063}
1064impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::describe_flywheel_iteration::DescribeFlywheelIterationError, R>>
1065 for Error
1066where
1067 R: Send + Sync + std::fmt::Debug + 'static,
1068{
1069 fn from(
1070 err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::describe_flywheel_iteration::DescribeFlywheelIterationError, R>,
1071 ) -> Self {
1072 match err {
1073 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
1074 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
1075 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
1076 source: err.into(),
1077 }),
1078 }
1079 }
1080}
1081impl From<crate::operation::describe_flywheel_iteration::DescribeFlywheelIterationError> for Error {
1082 fn from(err: crate::operation::describe_flywheel_iteration::DescribeFlywheelIterationError) -> Self {
1083 match err {
1084 crate::operation::describe_flywheel_iteration::DescribeFlywheelIterationError::InternalServerException(inner) => {
1085 Error::InternalServerException(inner)
1086 }
1087 crate::operation::describe_flywheel_iteration::DescribeFlywheelIterationError::InvalidRequestException(inner) => {
1088 Error::InvalidRequestException(inner)
1089 }
1090 crate::operation::describe_flywheel_iteration::DescribeFlywheelIterationError::ResourceNotFoundException(inner) => {
1091 Error::ResourceNotFoundException(inner)
1092 }
1093 crate::operation::describe_flywheel_iteration::DescribeFlywheelIterationError::TooManyRequestsException(inner) => {
1094 Error::TooManyRequestsException(inner)
1095 }
1096 crate::operation::describe_flywheel_iteration::DescribeFlywheelIterationError::Unhandled(inner) => Error::Unhandled(inner),
1097 }
1098 }
1099}
1100impl<R>
1101 From<
1102 ::aws_smithy_runtime_api::client::result::SdkError<
1103 crate::operation::describe_key_phrases_detection_job::DescribeKeyPhrasesDetectionJobError,
1104 R,
1105 >,
1106 > for Error
1107where
1108 R: Send + Sync + std::fmt::Debug + 'static,
1109{
1110 fn from(
1111 err: ::aws_smithy_runtime_api::client::result::SdkError<
1112 crate::operation::describe_key_phrases_detection_job::DescribeKeyPhrasesDetectionJobError,
1113 R,
1114 >,
1115 ) -> Self {
1116 match err {
1117 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
1118 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
1119 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
1120 source: err.into(),
1121 }),
1122 }
1123 }
1124}
1125impl From<crate::operation::describe_key_phrases_detection_job::DescribeKeyPhrasesDetectionJobError> for Error {
1126 fn from(err: crate::operation::describe_key_phrases_detection_job::DescribeKeyPhrasesDetectionJobError) -> Self {
1127 match err {
1128 crate::operation::describe_key_phrases_detection_job::DescribeKeyPhrasesDetectionJobError::InternalServerException(inner) => {
1129 Error::InternalServerException(inner)
1130 }
1131 crate::operation::describe_key_phrases_detection_job::DescribeKeyPhrasesDetectionJobError::InvalidRequestException(inner) => {
1132 Error::InvalidRequestException(inner)
1133 }
1134 crate::operation::describe_key_phrases_detection_job::DescribeKeyPhrasesDetectionJobError::JobNotFoundException(inner) => {
1135 Error::JobNotFoundException(inner)
1136 }
1137 crate::operation::describe_key_phrases_detection_job::DescribeKeyPhrasesDetectionJobError::TooManyRequestsException(inner) => {
1138 Error::TooManyRequestsException(inner)
1139 }
1140 crate::operation::describe_key_phrases_detection_job::DescribeKeyPhrasesDetectionJobError::Unhandled(inner) => Error::Unhandled(inner),
1141 }
1142 }
1143}
1144impl<R>
1145 From<
1146 ::aws_smithy_runtime_api::client::result::SdkError<
1147 crate::operation::describe_pii_entities_detection_job::DescribePiiEntitiesDetectionJobError,
1148 R,
1149 >,
1150 > for Error
1151where
1152 R: Send + Sync + std::fmt::Debug + 'static,
1153{
1154 fn from(
1155 err: ::aws_smithy_runtime_api::client::result::SdkError<
1156 crate::operation::describe_pii_entities_detection_job::DescribePiiEntitiesDetectionJobError,
1157 R,
1158 >,
1159 ) -> Self {
1160 match err {
1161 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
1162 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
1163 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
1164 source: err.into(),
1165 }),
1166 }
1167 }
1168}
1169impl From<crate::operation::describe_pii_entities_detection_job::DescribePiiEntitiesDetectionJobError> for Error {
1170 fn from(err: crate::operation::describe_pii_entities_detection_job::DescribePiiEntitiesDetectionJobError) -> Self {
1171 match err {
1172 crate::operation::describe_pii_entities_detection_job::DescribePiiEntitiesDetectionJobError::InternalServerException(inner) => {
1173 Error::InternalServerException(inner)
1174 }
1175 crate::operation::describe_pii_entities_detection_job::DescribePiiEntitiesDetectionJobError::InvalidRequestException(inner) => {
1176 Error::InvalidRequestException(inner)
1177 }
1178 crate::operation::describe_pii_entities_detection_job::DescribePiiEntitiesDetectionJobError::JobNotFoundException(inner) => {
1179 Error::JobNotFoundException(inner)
1180 }
1181 crate::operation::describe_pii_entities_detection_job::DescribePiiEntitiesDetectionJobError::TooManyRequestsException(inner) => {
1182 Error::TooManyRequestsException(inner)
1183 }
1184 crate::operation::describe_pii_entities_detection_job::DescribePiiEntitiesDetectionJobError::Unhandled(inner) => Error::Unhandled(inner),
1185 }
1186 }
1187}
1188impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::describe_resource_policy::DescribeResourcePolicyError, R>> for Error
1189where
1190 R: Send + Sync + std::fmt::Debug + 'static,
1191{
1192 fn from(
1193 err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::describe_resource_policy::DescribeResourcePolicyError, R>,
1194 ) -> Self {
1195 match err {
1196 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
1197 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
1198 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
1199 source: err.into(),
1200 }),
1201 }
1202 }
1203}
1204impl From<crate::operation::describe_resource_policy::DescribeResourcePolicyError> for Error {
1205 fn from(err: crate::operation::describe_resource_policy::DescribeResourcePolicyError) -> Self {
1206 match err {
1207 crate::operation::describe_resource_policy::DescribeResourcePolicyError::InternalServerException(inner) => {
1208 Error::InternalServerException(inner)
1209 }
1210 crate::operation::describe_resource_policy::DescribeResourcePolicyError::InvalidRequestException(inner) => {
1211 Error::InvalidRequestException(inner)
1212 }
1213 crate::operation::describe_resource_policy::DescribeResourcePolicyError::ResourceNotFoundException(inner) => {
1214 Error::ResourceNotFoundException(inner)
1215 }
1216 crate::operation::describe_resource_policy::DescribeResourcePolicyError::Unhandled(inner) => Error::Unhandled(inner),
1217 }
1218 }
1219}
1220impl<R>
1221 From<
1222 ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::describe_sentiment_detection_job::DescribeSentimentDetectionJobError, R>,
1223 > for Error
1224where
1225 R: Send + Sync + std::fmt::Debug + 'static,
1226{
1227 fn from(
1228 err: ::aws_smithy_runtime_api::client::result::SdkError<
1229 crate::operation::describe_sentiment_detection_job::DescribeSentimentDetectionJobError,
1230 R,
1231 >,
1232 ) -> Self {
1233 match err {
1234 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
1235 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
1236 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
1237 source: err.into(),
1238 }),
1239 }
1240 }
1241}
1242impl From<crate::operation::describe_sentiment_detection_job::DescribeSentimentDetectionJobError> for Error {
1243 fn from(err: crate::operation::describe_sentiment_detection_job::DescribeSentimentDetectionJobError) -> Self {
1244 match err {
1245 crate::operation::describe_sentiment_detection_job::DescribeSentimentDetectionJobError::InternalServerException(inner) => {
1246 Error::InternalServerException(inner)
1247 }
1248 crate::operation::describe_sentiment_detection_job::DescribeSentimentDetectionJobError::InvalidRequestException(inner) => {
1249 Error::InvalidRequestException(inner)
1250 }
1251 crate::operation::describe_sentiment_detection_job::DescribeSentimentDetectionJobError::JobNotFoundException(inner) => {
1252 Error::JobNotFoundException(inner)
1253 }
1254 crate::operation::describe_sentiment_detection_job::DescribeSentimentDetectionJobError::TooManyRequestsException(inner) => {
1255 Error::TooManyRequestsException(inner)
1256 }
1257 crate::operation::describe_sentiment_detection_job::DescribeSentimentDetectionJobError::Unhandled(inner) => Error::Unhandled(inner),
1258 }
1259 }
1260}
1261impl<R>
1262 From<
1263 ::aws_smithy_runtime_api::client::result::SdkError<
1264 crate::operation::describe_targeted_sentiment_detection_job::DescribeTargetedSentimentDetectionJobError,
1265 R,
1266 >,
1267 > for Error
1268where
1269 R: Send + Sync + std::fmt::Debug + 'static,
1270{
1271 fn from(
1272 err: ::aws_smithy_runtime_api::client::result::SdkError<
1273 crate::operation::describe_targeted_sentiment_detection_job::DescribeTargetedSentimentDetectionJobError,
1274 R,
1275 >,
1276 ) -> Self {
1277 match err {
1278 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
1279 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
1280 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
1281 source: err.into(),
1282 }),
1283 }
1284 }
1285}
1286impl From<crate::operation::describe_targeted_sentiment_detection_job::DescribeTargetedSentimentDetectionJobError> for Error {
1287 fn from(err: crate::operation::describe_targeted_sentiment_detection_job::DescribeTargetedSentimentDetectionJobError) -> Self {
1288 match err {
1289 crate::operation::describe_targeted_sentiment_detection_job::DescribeTargetedSentimentDetectionJobError::InternalServerException(
1290 inner,
1291 ) => Error::InternalServerException(inner),
1292 crate::operation::describe_targeted_sentiment_detection_job::DescribeTargetedSentimentDetectionJobError::InvalidRequestException(
1293 inner,
1294 ) => Error::InvalidRequestException(inner),
1295 crate::operation::describe_targeted_sentiment_detection_job::DescribeTargetedSentimentDetectionJobError::JobNotFoundException(inner) => {
1296 Error::JobNotFoundException(inner)
1297 }
1298 crate::operation::describe_targeted_sentiment_detection_job::DescribeTargetedSentimentDetectionJobError::TooManyRequestsException(
1299 inner,
1300 ) => Error::TooManyRequestsException(inner),
1301 crate::operation::describe_targeted_sentiment_detection_job::DescribeTargetedSentimentDetectionJobError::Unhandled(inner) => {
1302 Error::Unhandled(inner)
1303 }
1304 }
1305 }
1306}
1307impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::describe_topics_detection_job::DescribeTopicsDetectionJobError, R>>
1308 for Error
1309where
1310 R: Send + Sync + std::fmt::Debug + 'static,
1311{
1312 fn from(
1313 err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::describe_topics_detection_job::DescribeTopicsDetectionJobError, R>,
1314 ) -> Self {
1315 match err {
1316 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
1317 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
1318 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
1319 source: err.into(),
1320 }),
1321 }
1322 }
1323}
1324impl From<crate::operation::describe_topics_detection_job::DescribeTopicsDetectionJobError> for Error {
1325 fn from(err: crate::operation::describe_topics_detection_job::DescribeTopicsDetectionJobError) -> Self {
1326 match err {
1327 crate::operation::describe_topics_detection_job::DescribeTopicsDetectionJobError::InternalServerException(inner) => {
1328 Error::InternalServerException(inner)
1329 }
1330 crate::operation::describe_topics_detection_job::DescribeTopicsDetectionJobError::InvalidRequestException(inner) => {
1331 Error::InvalidRequestException(inner)
1332 }
1333 crate::operation::describe_topics_detection_job::DescribeTopicsDetectionJobError::JobNotFoundException(inner) => {
1334 Error::JobNotFoundException(inner)
1335 }
1336 crate::operation::describe_topics_detection_job::DescribeTopicsDetectionJobError::TooManyRequestsException(inner) => {
1337 Error::TooManyRequestsException(inner)
1338 }
1339 crate::operation::describe_topics_detection_job::DescribeTopicsDetectionJobError::Unhandled(inner) => Error::Unhandled(inner),
1340 }
1341 }
1342}
1343impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::detect_dominant_language::DetectDominantLanguageError, R>> for Error
1344where
1345 R: Send + Sync + std::fmt::Debug + 'static,
1346{
1347 fn from(
1348 err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::detect_dominant_language::DetectDominantLanguageError, R>,
1349 ) -> Self {
1350 match err {
1351 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
1352 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
1353 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
1354 source: err.into(),
1355 }),
1356 }
1357 }
1358}
1359impl From<crate::operation::detect_dominant_language::DetectDominantLanguageError> for Error {
1360 fn from(err: crate::operation::detect_dominant_language::DetectDominantLanguageError) -> Self {
1361 match err {
1362 crate::operation::detect_dominant_language::DetectDominantLanguageError::InternalServerException(inner) => {
1363 Error::InternalServerException(inner)
1364 }
1365 crate::operation::detect_dominant_language::DetectDominantLanguageError::InvalidRequestException(inner) => {
1366 Error::InvalidRequestException(inner)
1367 }
1368 crate::operation::detect_dominant_language::DetectDominantLanguageError::TextSizeLimitExceededException(inner) => {
1369 Error::TextSizeLimitExceededException(inner)
1370 }
1371 crate::operation::detect_dominant_language::DetectDominantLanguageError::Unhandled(inner) => Error::Unhandled(inner),
1372 }
1373 }
1374}
1375impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::detect_entities::DetectEntitiesError, R>> for Error
1376where
1377 R: Send + Sync + std::fmt::Debug + 'static,
1378{
1379 fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::detect_entities::DetectEntitiesError, R>) -> Self {
1380 match err {
1381 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
1382 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
1383 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
1384 source: err.into(),
1385 }),
1386 }
1387 }
1388}
1389impl From<crate::operation::detect_entities::DetectEntitiesError> for Error {
1390 fn from(err: crate::operation::detect_entities::DetectEntitiesError) -> Self {
1391 match err {
1392 crate::operation::detect_entities::DetectEntitiesError::InternalServerException(inner) => Error::InternalServerException(inner),
1393 crate::operation::detect_entities::DetectEntitiesError::InvalidRequestException(inner) => Error::InvalidRequestException(inner),
1394 crate::operation::detect_entities::DetectEntitiesError::ResourceUnavailableException(inner) => Error::ResourceUnavailableException(inner),
1395 crate::operation::detect_entities::DetectEntitiesError::TextSizeLimitExceededException(inner) => {
1396 Error::TextSizeLimitExceededException(inner)
1397 }
1398 crate::operation::detect_entities::DetectEntitiesError::UnsupportedLanguageException(inner) => Error::UnsupportedLanguageException(inner),
1399 crate::operation::detect_entities::DetectEntitiesError::Unhandled(inner) => Error::Unhandled(inner),
1400 }
1401 }
1402}
1403impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::detect_key_phrases::DetectKeyPhrasesError, R>> for Error
1404where
1405 R: Send + Sync + std::fmt::Debug + 'static,
1406{
1407 fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::detect_key_phrases::DetectKeyPhrasesError, R>) -> Self {
1408 match err {
1409 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
1410 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
1411 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
1412 source: err.into(),
1413 }),
1414 }
1415 }
1416}
1417impl From<crate::operation::detect_key_phrases::DetectKeyPhrasesError> for Error {
1418 fn from(err: crate::operation::detect_key_phrases::DetectKeyPhrasesError) -> Self {
1419 match err {
1420 crate::operation::detect_key_phrases::DetectKeyPhrasesError::InternalServerException(inner) => Error::InternalServerException(inner),
1421 crate::operation::detect_key_phrases::DetectKeyPhrasesError::InvalidRequestException(inner) => Error::InvalidRequestException(inner),
1422 crate::operation::detect_key_phrases::DetectKeyPhrasesError::TextSizeLimitExceededException(inner) => {
1423 Error::TextSizeLimitExceededException(inner)
1424 }
1425 crate::operation::detect_key_phrases::DetectKeyPhrasesError::UnsupportedLanguageException(inner) => {
1426 Error::UnsupportedLanguageException(inner)
1427 }
1428 crate::operation::detect_key_phrases::DetectKeyPhrasesError::Unhandled(inner) => Error::Unhandled(inner),
1429 }
1430 }
1431}
1432impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::detect_pii_entities::DetectPiiEntitiesError, R>> for Error
1433where
1434 R: Send + Sync + std::fmt::Debug + 'static,
1435{
1436 fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::detect_pii_entities::DetectPiiEntitiesError, R>) -> Self {
1437 match err {
1438 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
1439 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
1440 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
1441 source: err.into(),
1442 }),
1443 }
1444 }
1445}
1446impl From<crate::operation::detect_pii_entities::DetectPiiEntitiesError> for Error {
1447 fn from(err: crate::operation::detect_pii_entities::DetectPiiEntitiesError) -> Self {
1448 match err {
1449 crate::operation::detect_pii_entities::DetectPiiEntitiesError::InternalServerException(inner) => Error::InternalServerException(inner),
1450 crate::operation::detect_pii_entities::DetectPiiEntitiesError::InvalidRequestException(inner) => Error::InvalidRequestException(inner),
1451 crate::operation::detect_pii_entities::DetectPiiEntitiesError::TextSizeLimitExceededException(inner) => {
1452 Error::TextSizeLimitExceededException(inner)
1453 }
1454 crate::operation::detect_pii_entities::DetectPiiEntitiesError::UnsupportedLanguageException(inner) => {
1455 Error::UnsupportedLanguageException(inner)
1456 }
1457 crate::operation::detect_pii_entities::DetectPiiEntitiesError::Unhandled(inner) => Error::Unhandled(inner),
1458 }
1459 }
1460}
1461impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::detect_sentiment::DetectSentimentError, R>> for Error
1462where
1463 R: Send + Sync + std::fmt::Debug + 'static,
1464{
1465 fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::detect_sentiment::DetectSentimentError, R>) -> Self {
1466 match err {
1467 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
1468 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
1469 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
1470 source: err.into(),
1471 }),
1472 }
1473 }
1474}
1475impl From<crate::operation::detect_sentiment::DetectSentimentError> for Error {
1476 fn from(err: crate::operation::detect_sentiment::DetectSentimentError) -> Self {
1477 match err {
1478 crate::operation::detect_sentiment::DetectSentimentError::InternalServerException(inner) => Error::InternalServerException(inner),
1479 crate::operation::detect_sentiment::DetectSentimentError::InvalidRequestException(inner) => Error::InvalidRequestException(inner),
1480 crate::operation::detect_sentiment::DetectSentimentError::TextSizeLimitExceededException(inner) => {
1481 Error::TextSizeLimitExceededException(inner)
1482 }
1483 crate::operation::detect_sentiment::DetectSentimentError::UnsupportedLanguageException(inner) => {
1484 Error::UnsupportedLanguageException(inner)
1485 }
1486 crate::operation::detect_sentiment::DetectSentimentError::Unhandled(inner) => Error::Unhandled(inner),
1487 }
1488 }
1489}
1490impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::detect_syntax::DetectSyntaxError, R>> for Error
1491where
1492 R: Send + Sync + std::fmt::Debug + 'static,
1493{
1494 fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::detect_syntax::DetectSyntaxError, R>) -> Self {
1495 match err {
1496 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
1497 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
1498 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
1499 source: err.into(),
1500 }),
1501 }
1502 }
1503}
1504impl From<crate::operation::detect_syntax::DetectSyntaxError> for Error {
1505 fn from(err: crate::operation::detect_syntax::DetectSyntaxError) -> Self {
1506 match err {
1507 crate::operation::detect_syntax::DetectSyntaxError::InternalServerException(inner) => Error::InternalServerException(inner),
1508 crate::operation::detect_syntax::DetectSyntaxError::InvalidRequestException(inner) => Error::InvalidRequestException(inner),
1509 crate::operation::detect_syntax::DetectSyntaxError::TextSizeLimitExceededException(inner) => Error::TextSizeLimitExceededException(inner),
1510 crate::operation::detect_syntax::DetectSyntaxError::UnsupportedLanguageException(inner) => Error::UnsupportedLanguageException(inner),
1511 crate::operation::detect_syntax::DetectSyntaxError::Unhandled(inner) => Error::Unhandled(inner),
1512 }
1513 }
1514}
1515impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::detect_targeted_sentiment::DetectTargetedSentimentError, R>>
1516 for Error
1517where
1518 R: Send + Sync + std::fmt::Debug + 'static,
1519{
1520 fn from(
1521 err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::detect_targeted_sentiment::DetectTargetedSentimentError, R>,
1522 ) -> Self {
1523 match err {
1524 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
1525 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
1526 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
1527 source: err.into(),
1528 }),
1529 }
1530 }
1531}
1532impl From<crate::operation::detect_targeted_sentiment::DetectTargetedSentimentError> for Error {
1533 fn from(err: crate::operation::detect_targeted_sentiment::DetectTargetedSentimentError) -> Self {
1534 match err {
1535 crate::operation::detect_targeted_sentiment::DetectTargetedSentimentError::InternalServerException(inner) => {
1536 Error::InternalServerException(inner)
1537 }
1538 crate::operation::detect_targeted_sentiment::DetectTargetedSentimentError::InvalidRequestException(inner) => {
1539 Error::InvalidRequestException(inner)
1540 }
1541 crate::operation::detect_targeted_sentiment::DetectTargetedSentimentError::TextSizeLimitExceededException(inner) => {
1542 Error::TextSizeLimitExceededException(inner)
1543 }
1544 crate::operation::detect_targeted_sentiment::DetectTargetedSentimentError::UnsupportedLanguageException(inner) => {
1545 Error::UnsupportedLanguageException(inner)
1546 }
1547 crate::operation::detect_targeted_sentiment::DetectTargetedSentimentError::Unhandled(inner) => Error::Unhandled(inner),
1548 }
1549 }
1550}
1551impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::detect_toxic_content::DetectToxicContentError, R>> for Error
1552where
1553 R: Send + Sync + std::fmt::Debug + 'static,
1554{
1555 fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::detect_toxic_content::DetectToxicContentError, R>) -> Self {
1556 match err {
1557 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
1558 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
1559 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
1560 source: err.into(),
1561 }),
1562 }
1563 }
1564}
1565impl From<crate::operation::detect_toxic_content::DetectToxicContentError> for Error {
1566 fn from(err: crate::operation::detect_toxic_content::DetectToxicContentError) -> Self {
1567 match err {
1568 crate::operation::detect_toxic_content::DetectToxicContentError::InternalServerException(inner) => Error::InternalServerException(inner),
1569 crate::operation::detect_toxic_content::DetectToxicContentError::InvalidRequestException(inner) => Error::InvalidRequestException(inner),
1570 crate::operation::detect_toxic_content::DetectToxicContentError::TextSizeLimitExceededException(inner) => {
1571 Error::TextSizeLimitExceededException(inner)
1572 }
1573 crate::operation::detect_toxic_content::DetectToxicContentError::UnsupportedLanguageException(inner) => {
1574 Error::UnsupportedLanguageException(inner)
1575 }
1576 crate::operation::detect_toxic_content::DetectToxicContentError::Unhandled(inner) => Error::Unhandled(inner),
1577 }
1578 }
1579}
1580impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::import_model::ImportModelError, R>> for Error
1581where
1582 R: Send + Sync + std::fmt::Debug + 'static,
1583{
1584 fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::import_model::ImportModelError, R>) -> Self {
1585 match err {
1586 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
1587 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
1588 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
1589 source: err.into(),
1590 }),
1591 }
1592 }
1593}
1594impl From<crate::operation::import_model::ImportModelError> for Error {
1595 fn from(err: crate::operation::import_model::ImportModelError) -> Self {
1596 match err {
1597 crate::operation::import_model::ImportModelError::InternalServerException(inner) => Error::InternalServerException(inner),
1598 crate::operation::import_model::ImportModelError::InvalidRequestException(inner) => Error::InvalidRequestException(inner),
1599 crate::operation::import_model::ImportModelError::KmsKeyValidationException(inner) => Error::KmsKeyValidationException(inner),
1600 crate::operation::import_model::ImportModelError::ResourceInUseException(inner) => Error::ResourceInUseException(inner),
1601 crate::operation::import_model::ImportModelError::ResourceLimitExceededException(inner) => Error::ResourceLimitExceededException(inner),
1602 crate::operation::import_model::ImportModelError::ResourceNotFoundException(inner) => Error::ResourceNotFoundException(inner),
1603 crate::operation::import_model::ImportModelError::ResourceUnavailableException(inner) => Error::ResourceUnavailableException(inner),
1604 crate::operation::import_model::ImportModelError::TooManyRequestsException(inner) => Error::TooManyRequestsException(inner),
1605 crate::operation::import_model::ImportModelError::TooManyTagsException(inner) => Error::TooManyTagsException(inner),
1606 crate::operation::import_model::ImportModelError::Unhandled(inner) => Error::Unhandled(inner),
1607 }
1608 }
1609}
1610impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::list_datasets::ListDatasetsError, R>> for Error
1611where
1612 R: Send + Sync + std::fmt::Debug + 'static,
1613{
1614 fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::list_datasets::ListDatasetsError, R>) -> Self {
1615 match err {
1616 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
1617 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
1618 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
1619 source: err.into(),
1620 }),
1621 }
1622 }
1623}
1624impl From<crate::operation::list_datasets::ListDatasetsError> for Error {
1625 fn from(err: crate::operation::list_datasets::ListDatasetsError) -> Self {
1626 match err {
1627 crate::operation::list_datasets::ListDatasetsError::InternalServerException(inner) => Error::InternalServerException(inner),
1628 crate::operation::list_datasets::ListDatasetsError::InvalidFilterException(inner) => Error::InvalidFilterException(inner),
1629 crate::operation::list_datasets::ListDatasetsError::InvalidRequestException(inner) => Error::InvalidRequestException(inner),
1630 crate::operation::list_datasets::ListDatasetsError::ResourceNotFoundException(inner) => Error::ResourceNotFoundException(inner),
1631 crate::operation::list_datasets::ListDatasetsError::TooManyRequestsException(inner) => Error::TooManyRequestsException(inner),
1632 crate::operation::list_datasets::ListDatasetsError::Unhandled(inner) => Error::Unhandled(inner),
1633 }
1634 }
1635}
1636impl<R>
1637 From<
1638 ::aws_smithy_runtime_api::client::result::SdkError<
1639 crate::operation::list_document_classification_jobs::ListDocumentClassificationJobsError,
1640 R,
1641 >,
1642 > for Error
1643where
1644 R: Send + Sync + std::fmt::Debug + 'static,
1645{
1646 fn from(
1647 err: ::aws_smithy_runtime_api::client::result::SdkError<
1648 crate::operation::list_document_classification_jobs::ListDocumentClassificationJobsError,
1649 R,
1650 >,
1651 ) -> Self {
1652 match err {
1653 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
1654 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
1655 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
1656 source: err.into(),
1657 }),
1658 }
1659 }
1660}
1661impl From<crate::operation::list_document_classification_jobs::ListDocumentClassificationJobsError> for Error {
1662 fn from(err: crate::operation::list_document_classification_jobs::ListDocumentClassificationJobsError) -> Self {
1663 match err {
1664 crate::operation::list_document_classification_jobs::ListDocumentClassificationJobsError::InternalServerException(inner) => {
1665 Error::InternalServerException(inner)
1666 }
1667 crate::operation::list_document_classification_jobs::ListDocumentClassificationJobsError::InvalidFilterException(inner) => {
1668 Error::InvalidFilterException(inner)
1669 }
1670 crate::operation::list_document_classification_jobs::ListDocumentClassificationJobsError::InvalidRequestException(inner) => {
1671 Error::InvalidRequestException(inner)
1672 }
1673 crate::operation::list_document_classification_jobs::ListDocumentClassificationJobsError::TooManyRequestsException(inner) => {
1674 Error::TooManyRequestsException(inner)
1675 }
1676 crate::operation::list_document_classification_jobs::ListDocumentClassificationJobsError::Unhandled(inner) => Error::Unhandled(inner),
1677 }
1678 }
1679}
1680impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::list_document_classifiers::ListDocumentClassifiersError, R>>
1681 for Error
1682where
1683 R: Send + Sync + std::fmt::Debug + 'static,
1684{
1685 fn from(
1686 err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::list_document_classifiers::ListDocumentClassifiersError, R>,
1687 ) -> Self {
1688 match err {
1689 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
1690 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
1691 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
1692 source: err.into(),
1693 }),
1694 }
1695 }
1696}
1697impl From<crate::operation::list_document_classifiers::ListDocumentClassifiersError> for Error {
1698 fn from(err: crate::operation::list_document_classifiers::ListDocumentClassifiersError) -> Self {
1699 match err {
1700 crate::operation::list_document_classifiers::ListDocumentClassifiersError::InternalServerException(inner) => {
1701 Error::InternalServerException(inner)
1702 }
1703 crate::operation::list_document_classifiers::ListDocumentClassifiersError::InvalidFilterException(inner) => {
1704 Error::InvalidFilterException(inner)
1705 }
1706 crate::operation::list_document_classifiers::ListDocumentClassifiersError::InvalidRequestException(inner) => {
1707 Error::InvalidRequestException(inner)
1708 }
1709 crate::operation::list_document_classifiers::ListDocumentClassifiersError::TooManyRequestsException(inner) => {
1710 Error::TooManyRequestsException(inner)
1711 }
1712 crate::operation::list_document_classifiers::ListDocumentClassifiersError::Unhandled(inner) => Error::Unhandled(inner),
1713 }
1714 }
1715}
1716impl<R>
1717 From<
1718 ::aws_smithy_runtime_api::client::result::SdkError<
1719 crate::operation::list_document_classifier_summaries::ListDocumentClassifierSummariesError,
1720 R,
1721 >,
1722 > for Error
1723where
1724 R: Send + Sync + std::fmt::Debug + 'static,
1725{
1726 fn from(
1727 err: ::aws_smithy_runtime_api::client::result::SdkError<
1728 crate::operation::list_document_classifier_summaries::ListDocumentClassifierSummariesError,
1729 R,
1730 >,
1731 ) -> Self {
1732 match err {
1733 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
1734 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
1735 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
1736 source: err.into(),
1737 }),
1738 }
1739 }
1740}
1741impl From<crate::operation::list_document_classifier_summaries::ListDocumentClassifierSummariesError> for Error {
1742 fn from(err: crate::operation::list_document_classifier_summaries::ListDocumentClassifierSummariesError) -> Self {
1743 match err {
1744 crate::operation::list_document_classifier_summaries::ListDocumentClassifierSummariesError::InternalServerException(inner) => {
1745 Error::InternalServerException(inner)
1746 }
1747 crate::operation::list_document_classifier_summaries::ListDocumentClassifierSummariesError::InvalidRequestException(inner) => {
1748 Error::InvalidRequestException(inner)
1749 }
1750 crate::operation::list_document_classifier_summaries::ListDocumentClassifierSummariesError::TooManyRequestsException(inner) => {
1751 Error::TooManyRequestsException(inner)
1752 }
1753 crate::operation::list_document_classifier_summaries::ListDocumentClassifierSummariesError::Unhandled(inner) => Error::Unhandled(inner),
1754 }
1755 }
1756}
1757impl<R>
1758 From<
1759 ::aws_smithy_runtime_api::client::result::SdkError<
1760 crate::operation::list_dominant_language_detection_jobs::ListDominantLanguageDetectionJobsError,
1761 R,
1762 >,
1763 > for Error
1764where
1765 R: Send + Sync + std::fmt::Debug + 'static,
1766{
1767 fn from(
1768 err: ::aws_smithy_runtime_api::client::result::SdkError<
1769 crate::operation::list_dominant_language_detection_jobs::ListDominantLanguageDetectionJobsError,
1770 R,
1771 >,
1772 ) -> Self {
1773 match err {
1774 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
1775 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
1776 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
1777 source: err.into(),
1778 }),
1779 }
1780 }
1781}
1782impl From<crate::operation::list_dominant_language_detection_jobs::ListDominantLanguageDetectionJobsError> for Error {
1783 fn from(err: crate::operation::list_dominant_language_detection_jobs::ListDominantLanguageDetectionJobsError) -> Self {
1784 match err {
1785 crate::operation::list_dominant_language_detection_jobs::ListDominantLanguageDetectionJobsError::InternalServerException(inner) => {
1786 Error::InternalServerException(inner)
1787 }
1788 crate::operation::list_dominant_language_detection_jobs::ListDominantLanguageDetectionJobsError::InvalidFilterException(inner) => {
1789 Error::InvalidFilterException(inner)
1790 }
1791 crate::operation::list_dominant_language_detection_jobs::ListDominantLanguageDetectionJobsError::InvalidRequestException(inner) => {
1792 Error::InvalidRequestException(inner)
1793 }
1794 crate::operation::list_dominant_language_detection_jobs::ListDominantLanguageDetectionJobsError::TooManyRequestsException(inner) => {
1795 Error::TooManyRequestsException(inner)
1796 }
1797 crate::operation::list_dominant_language_detection_jobs::ListDominantLanguageDetectionJobsError::Unhandled(inner) => {
1798 Error::Unhandled(inner)
1799 }
1800 }
1801 }
1802}
1803impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::list_endpoints::ListEndpointsError, R>> for Error
1804where
1805 R: Send + Sync + std::fmt::Debug + 'static,
1806{
1807 fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::list_endpoints::ListEndpointsError, R>) -> Self {
1808 match err {
1809 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
1810 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
1811 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
1812 source: err.into(),
1813 }),
1814 }
1815 }
1816}
1817impl From<crate::operation::list_endpoints::ListEndpointsError> for Error {
1818 fn from(err: crate::operation::list_endpoints::ListEndpointsError) -> Self {
1819 match err {
1820 crate::operation::list_endpoints::ListEndpointsError::InternalServerException(inner) => Error::InternalServerException(inner),
1821 crate::operation::list_endpoints::ListEndpointsError::InvalidRequestException(inner) => Error::InvalidRequestException(inner),
1822 crate::operation::list_endpoints::ListEndpointsError::TooManyRequestsException(inner) => Error::TooManyRequestsException(inner),
1823 crate::operation::list_endpoints::ListEndpointsError::Unhandled(inner) => Error::Unhandled(inner),
1824 }
1825 }
1826}
1827impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::list_entities_detection_jobs::ListEntitiesDetectionJobsError, R>>
1828 for Error
1829where
1830 R: Send + Sync + std::fmt::Debug + 'static,
1831{
1832 fn from(
1833 err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::list_entities_detection_jobs::ListEntitiesDetectionJobsError, R>,
1834 ) -> Self {
1835 match err {
1836 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
1837 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
1838 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
1839 source: err.into(),
1840 }),
1841 }
1842 }
1843}
1844impl From<crate::operation::list_entities_detection_jobs::ListEntitiesDetectionJobsError> for Error {
1845 fn from(err: crate::operation::list_entities_detection_jobs::ListEntitiesDetectionJobsError) -> Self {
1846 match err {
1847 crate::operation::list_entities_detection_jobs::ListEntitiesDetectionJobsError::InternalServerException(inner) => {
1848 Error::InternalServerException(inner)
1849 }
1850 crate::operation::list_entities_detection_jobs::ListEntitiesDetectionJobsError::InvalidFilterException(inner) => {
1851 Error::InvalidFilterException(inner)
1852 }
1853 crate::operation::list_entities_detection_jobs::ListEntitiesDetectionJobsError::InvalidRequestException(inner) => {
1854 Error::InvalidRequestException(inner)
1855 }
1856 crate::operation::list_entities_detection_jobs::ListEntitiesDetectionJobsError::TooManyRequestsException(inner) => {
1857 Error::TooManyRequestsException(inner)
1858 }
1859 crate::operation::list_entities_detection_jobs::ListEntitiesDetectionJobsError::Unhandled(inner) => Error::Unhandled(inner),
1860 }
1861 }
1862}
1863impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::list_entity_recognizers::ListEntityRecognizersError, R>> for Error
1864where
1865 R: Send + Sync + std::fmt::Debug + 'static,
1866{
1867 fn from(
1868 err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::list_entity_recognizers::ListEntityRecognizersError, R>,
1869 ) -> Self {
1870 match err {
1871 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
1872 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
1873 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
1874 source: err.into(),
1875 }),
1876 }
1877 }
1878}
1879impl From<crate::operation::list_entity_recognizers::ListEntityRecognizersError> for Error {
1880 fn from(err: crate::operation::list_entity_recognizers::ListEntityRecognizersError) -> Self {
1881 match err {
1882 crate::operation::list_entity_recognizers::ListEntityRecognizersError::InternalServerException(inner) => {
1883 Error::InternalServerException(inner)
1884 }
1885 crate::operation::list_entity_recognizers::ListEntityRecognizersError::InvalidFilterException(inner) => {
1886 Error::InvalidFilterException(inner)
1887 }
1888 crate::operation::list_entity_recognizers::ListEntityRecognizersError::InvalidRequestException(inner) => {
1889 Error::InvalidRequestException(inner)
1890 }
1891 crate::operation::list_entity_recognizers::ListEntityRecognizersError::TooManyRequestsException(inner) => {
1892 Error::TooManyRequestsException(inner)
1893 }
1894 crate::operation::list_entity_recognizers::ListEntityRecognizersError::Unhandled(inner) => Error::Unhandled(inner),
1895 }
1896 }
1897}
1898impl<R>
1899 From<
1900 ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::list_entity_recognizer_summaries::ListEntityRecognizerSummariesError, R>,
1901 > for Error
1902where
1903 R: Send + Sync + std::fmt::Debug + 'static,
1904{
1905 fn from(
1906 err: ::aws_smithy_runtime_api::client::result::SdkError<
1907 crate::operation::list_entity_recognizer_summaries::ListEntityRecognizerSummariesError,
1908 R,
1909 >,
1910 ) -> Self {
1911 match err {
1912 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
1913 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
1914 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
1915 source: err.into(),
1916 }),
1917 }
1918 }
1919}
1920impl From<crate::operation::list_entity_recognizer_summaries::ListEntityRecognizerSummariesError> for Error {
1921 fn from(err: crate::operation::list_entity_recognizer_summaries::ListEntityRecognizerSummariesError) -> Self {
1922 match err {
1923 crate::operation::list_entity_recognizer_summaries::ListEntityRecognizerSummariesError::InternalServerException(inner) => {
1924 Error::InternalServerException(inner)
1925 }
1926 crate::operation::list_entity_recognizer_summaries::ListEntityRecognizerSummariesError::InvalidRequestException(inner) => {
1927 Error::InvalidRequestException(inner)
1928 }
1929 crate::operation::list_entity_recognizer_summaries::ListEntityRecognizerSummariesError::TooManyRequestsException(inner) => {
1930 Error::TooManyRequestsException(inner)
1931 }
1932 crate::operation::list_entity_recognizer_summaries::ListEntityRecognizerSummariesError::Unhandled(inner) => Error::Unhandled(inner),
1933 }
1934 }
1935}
1936impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::list_events_detection_jobs::ListEventsDetectionJobsError, R>>
1937 for Error
1938where
1939 R: Send + Sync + std::fmt::Debug + 'static,
1940{
1941 fn from(
1942 err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::list_events_detection_jobs::ListEventsDetectionJobsError, R>,
1943 ) -> Self {
1944 match err {
1945 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
1946 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
1947 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
1948 source: err.into(),
1949 }),
1950 }
1951 }
1952}
1953impl From<crate::operation::list_events_detection_jobs::ListEventsDetectionJobsError> for Error {
1954 fn from(err: crate::operation::list_events_detection_jobs::ListEventsDetectionJobsError) -> Self {
1955 match err {
1956 crate::operation::list_events_detection_jobs::ListEventsDetectionJobsError::InternalServerException(inner) => {
1957 Error::InternalServerException(inner)
1958 }
1959 crate::operation::list_events_detection_jobs::ListEventsDetectionJobsError::InvalidFilterException(inner) => {
1960 Error::InvalidFilterException(inner)
1961 }
1962 crate::operation::list_events_detection_jobs::ListEventsDetectionJobsError::InvalidRequestException(inner) => {
1963 Error::InvalidRequestException(inner)
1964 }
1965 crate::operation::list_events_detection_jobs::ListEventsDetectionJobsError::TooManyRequestsException(inner) => {
1966 Error::TooManyRequestsException(inner)
1967 }
1968 crate::operation::list_events_detection_jobs::ListEventsDetectionJobsError::Unhandled(inner) => Error::Unhandled(inner),
1969 }
1970 }
1971}
1972impl<R>
1973 From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::list_flywheel_iteration_history::ListFlywheelIterationHistoryError, R>>
1974 for Error
1975where
1976 R: Send + Sync + std::fmt::Debug + 'static,
1977{
1978 fn from(
1979 err: ::aws_smithy_runtime_api::client::result::SdkError<
1980 crate::operation::list_flywheel_iteration_history::ListFlywheelIterationHistoryError,
1981 R,
1982 >,
1983 ) -> Self {
1984 match err {
1985 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
1986 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
1987 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
1988 source: err.into(),
1989 }),
1990 }
1991 }
1992}
1993impl From<crate::operation::list_flywheel_iteration_history::ListFlywheelIterationHistoryError> for Error {
1994 fn from(err: crate::operation::list_flywheel_iteration_history::ListFlywheelIterationHistoryError) -> Self {
1995 match err {
1996 crate::operation::list_flywheel_iteration_history::ListFlywheelIterationHistoryError::InternalServerException(inner) => {
1997 Error::InternalServerException(inner)
1998 }
1999 crate::operation::list_flywheel_iteration_history::ListFlywheelIterationHistoryError::InvalidFilterException(inner) => {
2000 Error::InvalidFilterException(inner)
2001 }
2002 crate::operation::list_flywheel_iteration_history::ListFlywheelIterationHistoryError::InvalidRequestException(inner) => {
2003 Error::InvalidRequestException(inner)
2004 }
2005 crate::operation::list_flywheel_iteration_history::ListFlywheelIterationHistoryError::ResourceNotFoundException(inner) => {
2006 Error::ResourceNotFoundException(inner)
2007 }
2008 crate::operation::list_flywheel_iteration_history::ListFlywheelIterationHistoryError::TooManyRequestsException(inner) => {
2009 Error::TooManyRequestsException(inner)
2010 }
2011 crate::operation::list_flywheel_iteration_history::ListFlywheelIterationHistoryError::Unhandled(inner) => Error::Unhandled(inner),
2012 }
2013 }
2014}
2015impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::list_flywheels::ListFlywheelsError, R>> for Error
2016where
2017 R: Send + Sync + std::fmt::Debug + 'static,
2018{
2019 fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::list_flywheels::ListFlywheelsError, R>) -> Self {
2020 match err {
2021 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
2022 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
2023 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
2024 source: err.into(),
2025 }),
2026 }
2027 }
2028}
2029impl From<crate::operation::list_flywheels::ListFlywheelsError> for Error {
2030 fn from(err: crate::operation::list_flywheels::ListFlywheelsError) -> Self {
2031 match err {
2032 crate::operation::list_flywheels::ListFlywheelsError::InternalServerException(inner) => Error::InternalServerException(inner),
2033 crate::operation::list_flywheels::ListFlywheelsError::InvalidFilterException(inner) => Error::InvalidFilterException(inner),
2034 crate::operation::list_flywheels::ListFlywheelsError::InvalidRequestException(inner) => Error::InvalidRequestException(inner),
2035 crate::operation::list_flywheels::ListFlywheelsError::TooManyRequestsException(inner) => Error::TooManyRequestsException(inner),
2036 crate::operation::list_flywheels::ListFlywheelsError::Unhandled(inner) => Error::Unhandled(inner),
2037 }
2038 }
2039}
2040impl<R>
2041 From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::list_key_phrases_detection_jobs::ListKeyPhrasesDetectionJobsError, R>>
2042 for Error
2043where
2044 R: Send + Sync + std::fmt::Debug + 'static,
2045{
2046 fn from(
2047 err: ::aws_smithy_runtime_api::client::result::SdkError<
2048 crate::operation::list_key_phrases_detection_jobs::ListKeyPhrasesDetectionJobsError,
2049 R,
2050 >,
2051 ) -> Self {
2052 match err {
2053 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
2054 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
2055 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
2056 source: err.into(),
2057 }),
2058 }
2059 }
2060}
2061impl From<crate::operation::list_key_phrases_detection_jobs::ListKeyPhrasesDetectionJobsError> for Error {
2062 fn from(err: crate::operation::list_key_phrases_detection_jobs::ListKeyPhrasesDetectionJobsError) -> Self {
2063 match err {
2064 crate::operation::list_key_phrases_detection_jobs::ListKeyPhrasesDetectionJobsError::InternalServerException(inner) => {
2065 Error::InternalServerException(inner)
2066 }
2067 crate::operation::list_key_phrases_detection_jobs::ListKeyPhrasesDetectionJobsError::InvalidFilterException(inner) => {
2068 Error::InvalidFilterException(inner)
2069 }
2070 crate::operation::list_key_phrases_detection_jobs::ListKeyPhrasesDetectionJobsError::InvalidRequestException(inner) => {
2071 Error::InvalidRequestException(inner)
2072 }
2073 crate::operation::list_key_phrases_detection_jobs::ListKeyPhrasesDetectionJobsError::TooManyRequestsException(inner) => {
2074 Error::TooManyRequestsException(inner)
2075 }
2076 crate::operation::list_key_phrases_detection_jobs::ListKeyPhrasesDetectionJobsError::Unhandled(inner) => Error::Unhandled(inner),
2077 }
2078 }
2079}
2080impl<R>
2081 From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::list_pii_entities_detection_jobs::ListPiiEntitiesDetectionJobsError, R>>
2082 for Error
2083where
2084 R: Send + Sync + std::fmt::Debug + 'static,
2085{
2086 fn from(
2087 err: ::aws_smithy_runtime_api::client::result::SdkError<
2088 crate::operation::list_pii_entities_detection_jobs::ListPiiEntitiesDetectionJobsError,
2089 R,
2090 >,
2091 ) -> Self {
2092 match err {
2093 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
2094 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
2095 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
2096 source: err.into(),
2097 }),
2098 }
2099 }
2100}
2101impl From<crate::operation::list_pii_entities_detection_jobs::ListPiiEntitiesDetectionJobsError> for Error {
2102 fn from(err: crate::operation::list_pii_entities_detection_jobs::ListPiiEntitiesDetectionJobsError) -> Self {
2103 match err {
2104 crate::operation::list_pii_entities_detection_jobs::ListPiiEntitiesDetectionJobsError::InternalServerException(inner) => {
2105 Error::InternalServerException(inner)
2106 }
2107 crate::operation::list_pii_entities_detection_jobs::ListPiiEntitiesDetectionJobsError::InvalidFilterException(inner) => {
2108 Error::InvalidFilterException(inner)
2109 }
2110 crate::operation::list_pii_entities_detection_jobs::ListPiiEntitiesDetectionJobsError::InvalidRequestException(inner) => {
2111 Error::InvalidRequestException(inner)
2112 }
2113 crate::operation::list_pii_entities_detection_jobs::ListPiiEntitiesDetectionJobsError::TooManyRequestsException(inner) => {
2114 Error::TooManyRequestsException(inner)
2115 }
2116 crate::operation::list_pii_entities_detection_jobs::ListPiiEntitiesDetectionJobsError::Unhandled(inner) => Error::Unhandled(inner),
2117 }
2118 }
2119}
2120impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::list_sentiment_detection_jobs::ListSentimentDetectionJobsError, R>>
2121 for Error
2122where
2123 R: Send + Sync + std::fmt::Debug + 'static,
2124{
2125 fn from(
2126 err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::list_sentiment_detection_jobs::ListSentimentDetectionJobsError, R>,
2127 ) -> Self {
2128 match err {
2129 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
2130 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
2131 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
2132 source: err.into(),
2133 }),
2134 }
2135 }
2136}
2137impl From<crate::operation::list_sentiment_detection_jobs::ListSentimentDetectionJobsError> for Error {
2138 fn from(err: crate::operation::list_sentiment_detection_jobs::ListSentimentDetectionJobsError) -> Self {
2139 match err {
2140 crate::operation::list_sentiment_detection_jobs::ListSentimentDetectionJobsError::InternalServerException(inner) => {
2141 Error::InternalServerException(inner)
2142 }
2143 crate::operation::list_sentiment_detection_jobs::ListSentimentDetectionJobsError::InvalidFilterException(inner) => {
2144 Error::InvalidFilterException(inner)
2145 }
2146 crate::operation::list_sentiment_detection_jobs::ListSentimentDetectionJobsError::InvalidRequestException(inner) => {
2147 Error::InvalidRequestException(inner)
2148 }
2149 crate::operation::list_sentiment_detection_jobs::ListSentimentDetectionJobsError::TooManyRequestsException(inner) => {
2150 Error::TooManyRequestsException(inner)
2151 }
2152 crate::operation::list_sentiment_detection_jobs::ListSentimentDetectionJobsError::Unhandled(inner) => Error::Unhandled(inner),
2153 }
2154 }
2155}
2156impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::list_tags_for_resource::ListTagsForResourceError, R>> for Error
2157where
2158 R: Send + Sync + std::fmt::Debug + 'static,
2159{
2160 fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::list_tags_for_resource::ListTagsForResourceError, R>) -> Self {
2161 match err {
2162 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
2163 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
2164 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
2165 source: err.into(),
2166 }),
2167 }
2168 }
2169}
2170impl From<crate::operation::list_tags_for_resource::ListTagsForResourceError> for Error {
2171 fn from(err: crate::operation::list_tags_for_resource::ListTagsForResourceError) -> Self {
2172 match err {
2173 crate::operation::list_tags_for_resource::ListTagsForResourceError::InternalServerException(inner) => {
2174 Error::InternalServerException(inner)
2175 }
2176 crate::operation::list_tags_for_resource::ListTagsForResourceError::InvalidRequestException(inner) => {
2177 Error::InvalidRequestException(inner)
2178 }
2179 crate::operation::list_tags_for_resource::ListTagsForResourceError::ResourceNotFoundException(inner) => {
2180 Error::ResourceNotFoundException(inner)
2181 }
2182 crate::operation::list_tags_for_resource::ListTagsForResourceError::Unhandled(inner) => Error::Unhandled(inner),
2183 }
2184 }
2185}
2186impl<R>
2187 From<
2188 ::aws_smithy_runtime_api::client::result::SdkError<
2189 crate::operation::list_targeted_sentiment_detection_jobs::ListTargetedSentimentDetectionJobsError,
2190 R,
2191 >,
2192 > for Error
2193where
2194 R: Send + Sync + std::fmt::Debug + 'static,
2195{
2196 fn from(
2197 err: ::aws_smithy_runtime_api::client::result::SdkError<
2198 crate::operation::list_targeted_sentiment_detection_jobs::ListTargetedSentimentDetectionJobsError,
2199 R,
2200 >,
2201 ) -> Self {
2202 match err {
2203 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
2204 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
2205 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
2206 source: err.into(),
2207 }),
2208 }
2209 }
2210}
2211impl From<crate::operation::list_targeted_sentiment_detection_jobs::ListTargetedSentimentDetectionJobsError> for Error {
2212 fn from(err: crate::operation::list_targeted_sentiment_detection_jobs::ListTargetedSentimentDetectionJobsError) -> Self {
2213 match err {
2214 crate::operation::list_targeted_sentiment_detection_jobs::ListTargetedSentimentDetectionJobsError::InternalServerException(inner) => {
2215 Error::InternalServerException(inner)
2216 }
2217 crate::operation::list_targeted_sentiment_detection_jobs::ListTargetedSentimentDetectionJobsError::InvalidFilterException(inner) => {
2218 Error::InvalidFilterException(inner)
2219 }
2220 crate::operation::list_targeted_sentiment_detection_jobs::ListTargetedSentimentDetectionJobsError::InvalidRequestException(inner) => {
2221 Error::InvalidRequestException(inner)
2222 }
2223 crate::operation::list_targeted_sentiment_detection_jobs::ListTargetedSentimentDetectionJobsError::TooManyRequestsException(inner) => {
2224 Error::TooManyRequestsException(inner)
2225 }
2226 crate::operation::list_targeted_sentiment_detection_jobs::ListTargetedSentimentDetectionJobsError::Unhandled(inner) => {
2227 Error::Unhandled(inner)
2228 }
2229 }
2230 }
2231}
2232impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::list_topics_detection_jobs::ListTopicsDetectionJobsError, R>>
2233 for Error
2234where
2235 R: Send + Sync + std::fmt::Debug + 'static,
2236{
2237 fn from(
2238 err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::list_topics_detection_jobs::ListTopicsDetectionJobsError, R>,
2239 ) -> Self {
2240 match err {
2241 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
2242 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
2243 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
2244 source: err.into(),
2245 }),
2246 }
2247 }
2248}
2249impl From<crate::operation::list_topics_detection_jobs::ListTopicsDetectionJobsError> for Error {
2250 fn from(err: crate::operation::list_topics_detection_jobs::ListTopicsDetectionJobsError) -> Self {
2251 match err {
2252 crate::operation::list_topics_detection_jobs::ListTopicsDetectionJobsError::InternalServerException(inner) => {
2253 Error::InternalServerException(inner)
2254 }
2255 crate::operation::list_topics_detection_jobs::ListTopicsDetectionJobsError::InvalidFilterException(inner) => {
2256 Error::InvalidFilterException(inner)
2257 }
2258 crate::operation::list_topics_detection_jobs::ListTopicsDetectionJobsError::InvalidRequestException(inner) => {
2259 Error::InvalidRequestException(inner)
2260 }
2261 crate::operation::list_topics_detection_jobs::ListTopicsDetectionJobsError::TooManyRequestsException(inner) => {
2262 Error::TooManyRequestsException(inner)
2263 }
2264 crate::operation::list_topics_detection_jobs::ListTopicsDetectionJobsError::Unhandled(inner) => Error::Unhandled(inner),
2265 }
2266 }
2267}
2268impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::put_resource_policy::PutResourcePolicyError, R>> for Error
2269where
2270 R: Send + Sync + std::fmt::Debug + 'static,
2271{
2272 fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::put_resource_policy::PutResourcePolicyError, R>) -> Self {
2273 match err {
2274 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
2275 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
2276 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
2277 source: err.into(),
2278 }),
2279 }
2280 }
2281}
2282impl From<crate::operation::put_resource_policy::PutResourcePolicyError> for Error {
2283 fn from(err: crate::operation::put_resource_policy::PutResourcePolicyError) -> Self {
2284 match err {
2285 crate::operation::put_resource_policy::PutResourcePolicyError::InternalServerException(inner) => Error::InternalServerException(inner),
2286 crate::operation::put_resource_policy::PutResourcePolicyError::InvalidRequestException(inner) => Error::InvalidRequestException(inner),
2287 crate::operation::put_resource_policy::PutResourcePolicyError::ResourceNotFoundException(inner) => {
2288 Error::ResourceNotFoundException(inner)
2289 }
2290 crate::operation::put_resource_policy::PutResourcePolicyError::Unhandled(inner) => Error::Unhandled(inner),
2291 }
2292 }
2293}
2294impl<R>
2295 From<
2296 ::aws_smithy_runtime_api::client::result::SdkError<
2297 crate::operation::start_document_classification_job::StartDocumentClassificationJobError,
2298 R,
2299 >,
2300 > for Error
2301where
2302 R: Send + Sync + std::fmt::Debug + 'static,
2303{
2304 fn from(
2305 err: ::aws_smithy_runtime_api::client::result::SdkError<
2306 crate::operation::start_document_classification_job::StartDocumentClassificationJobError,
2307 R,
2308 >,
2309 ) -> Self {
2310 match err {
2311 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
2312 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
2313 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
2314 source: err.into(),
2315 }),
2316 }
2317 }
2318}
2319impl From<crate::operation::start_document_classification_job::StartDocumentClassificationJobError> for Error {
2320 fn from(err: crate::operation::start_document_classification_job::StartDocumentClassificationJobError) -> Self {
2321 match err {
2322 crate::operation::start_document_classification_job::StartDocumentClassificationJobError::InternalServerException(inner) => {
2323 Error::InternalServerException(inner)
2324 }
2325 crate::operation::start_document_classification_job::StartDocumentClassificationJobError::InvalidRequestException(inner) => {
2326 Error::InvalidRequestException(inner)
2327 }
2328 crate::operation::start_document_classification_job::StartDocumentClassificationJobError::KmsKeyValidationException(inner) => {
2329 Error::KmsKeyValidationException(inner)
2330 }
2331 crate::operation::start_document_classification_job::StartDocumentClassificationJobError::ResourceInUseException(inner) => {
2332 Error::ResourceInUseException(inner)
2333 }
2334 crate::operation::start_document_classification_job::StartDocumentClassificationJobError::ResourceNotFoundException(inner) => {
2335 Error::ResourceNotFoundException(inner)
2336 }
2337 crate::operation::start_document_classification_job::StartDocumentClassificationJobError::ResourceUnavailableException(inner) => {
2338 Error::ResourceUnavailableException(inner)
2339 }
2340 crate::operation::start_document_classification_job::StartDocumentClassificationJobError::TooManyRequestsException(inner) => {
2341 Error::TooManyRequestsException(inner)
2342 }
2343 crate::operation::start_document_classification_job::StartDocumentClassificationJobError::TooManyTagsException(inner) => {
2344 Error::TooManyTagsException(inner)
2345 }
2346 crate::operation::start_document_classification_job::StartDocumentClassificationJobError::Unhandled(inner) => Error::Unhandled(inner),
2347 }
2348 }
2349}
2350impl<R>
2351 From<
2352 ::aws_smithy_runtime_api::client::result::SdkError<
2353 crate::operation::start_dominant_language_detection_job::StartDominantLanguageDetectionJobError,
2354 R,
2355 >,
2356 > for Error
2357where
2358 R: Send + Sync + std::fmt::Debug + 'static,
2359{
2360 fn from(
2361 err: ::aws_smithy_runtime_api::client::result::SdkError<
2362 crate::operation::start_dominant_language_detection_job::StartDominantLanguageDetectionJobError,
2363 R,
2364 >,
2365 ) -> Self {
2366 match err {
2367 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
2368 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
2369 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
2370 source: err.into(),
2371 }),
2372 }
2373 }
2374}
2375impl From<crate::operation::start_dominant_language_detection_job::StartDominantLanguageDetectionJobError> for Error {
2376 fn from(err: crate::operation::start_dominant_language_detection_job::StartDominantLanguageDetectionJobError) -> Self {
2377 match err {
2378 crate::operation::start_dominant_language_detection_job::StartDominantLanguageDetectionJobError::InternalServerException(inner) => {
2379 Error::InternalServerException(inner)
2380 }
2381 crate::operation::start_dominant_language_detection_job::StartDominantLanguageDetectionJobError::InvalidRequestException(inner) => {
2382 Error::InvalidRequestException(inner)
2383 }
2384 crate::operation::start_dominant_language_detection_job::StartDominantLanguageDetectionJobError::KmsKeyValidationException(inner) => {
2385 Error::KmsKeyValidationException(inner)
2386 }
2387 crate::operation::start_dominant_language_detection_job::StartDominantLanguageDetectionJobError::ResourceInUseException(inner) => {
2388 Error::ResourceInUseException(inner)
2389 }
2390 crate::operation::start_dominant_language_detection_job::StartDominantLanguageDetectionJobError::TooManyRequestsException(inner) => {
2391 Error::TooManyRequestsException(inner)
2392 }
2393 crate::operation::start_dominant_language_detection_job::StartDominantLanguageDetectionJobError::TooManyTagsException(inner) => {
2394 Error::TooManyTagsException(inner)
2395 }
2396 crate::operation::start_dominant_language_detection_job::StartDominantLanguageDetectionJobError::Unhandled(inner) => {
2397 Error::Unhandled(inner)
2398 }
2399 }
2400 }
2401}
2402impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::start_entities_detection_job::StartEntitiesDetectionJobError, R>>
2403 for Error
2404where
2405 R: Send + Sync + std::fmt::Debug + 'static,
2406{
2407 fn from(
2408 err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::start_entities_detection_job::StartEntitiesDetectionJobError, R>,
2409 ) -> Self {
2410 match err {
2411 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
2412 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
2413 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
2414 source: err.into(),
2415 }),
2416 }
2417 }
2418}
2419impl From<crate::operation::start_entities_detection_job::StartEntitiesDetectionJobError> for Error {
2420 fn from(err: crate::operation::start_entities_detection_job::StartEntitiesDetectionJobError) -> Self {
2421 match err {
2422 crate::operation::start_entities_detection_job::StartEntitiesDetectionJobError::InternalServerException(inner) => {
2423 Error::InternalServerException(inner)
2424 }
2425 crate::operation::start_entities_detection_job::StartEntitiesDetectionJobError::InvalidRequestException(inner) => {
2426 Error::InvalidRequestException(inner)
2427 }
2428 crate::operation::start_entities_detection_job::StartEntitiesDetectionJobError::KmsKeyValidationException(inner) => {
2429 Error::KmsKeyValidationException(inner)
2430 }
2431 crate::operation::start_entities_detection_job::StartEntitiesDetectionJobError::ResourceInUseException(inner) => {
2432 Error::ResourceInUseException(inner)
2433 }
2434 crate::operation::start_entities_detection_job::StartEntitiesDetectionJobError::ResourceNotFoundException(inner) => {
2435 Error::ResourceNotFoundException(inner)
2436 }
2437 crate::operation::start_entities_detection_job::StartEntitiesDetectionJobError::ResourceUnavailableException(inner) => {
2438 Error::ResourceUnavailableException(inner)
2439 }
2440 crate::operation::start_entities_detection_job::StartEntitiesDetectionJobError::TooManyRequestsException(inner) => {
2441 Error::TooManyRequestsException(inner)
2442 }
2443 crate::operation::start_entities_detection_job::StartEntitiesDetectionJobError::TooManyTagsException(inner) => {
2444 Error::TooManyTagsException(inner)
2445 }
2446 crate::operation::start_entities_detection_job::StartEntitiesDetectionJobError::Unhandled(inner) => Error::Unhandled(inner),
2447 }
2448 }
2449}
2450impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::start_events_detection_job::StartEventsDetectionJobError, R>>
2451 for Error
2452where
2453 R: Send + Sync + std::fmt::Debug + 'static,
2454{
2455 fn from(
2456 err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::start_events_detection_job::StartEventsDetectionJobError, R>,
2457 ) -> Self {
2458 match err {
2459 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
2460 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
2461 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
2462 source: err.into(),
2463 }),
2464 }
2465 }
2466}
2467impl From<crate::operation::start_events_detection_job::StartEventsDetectionJobError> for Error {
2468 fn from(err: crate::operation::start_events_detection_job::StartEventsDetectionJobError) -> Self {
2469 match err {
2470 crate::operation::start_events_detection_job::StartEventsDetectionJobError::InternalServerException(inner) => {
2471 Error::InternalServerException(inner)
2472 }
2473 crate::operation::start_events_detection_job::StartEventsDetectionJobError::InvalidRequestException(inner) => {
2474 Error::InvalidRequestException(inner)
2475 }
2476 crate::operation::start_events_detection_job::StartEventsDetectionJobError::KmsKeyValidationException(inner) => {
2477 Error::KmsKeyValidationException(inner)
2478 }
2479 crate::operation::start_events_detection_job::StartEventsDetectionJobError::ResourceInUseException(inner) => {
2480 Error::ResourceInUseException(inner)
2481 }
2482 crate::operation::start_events_detection_job::StartEventsDetectionJobError::TooManyRequestsException(inner) => {
2483 Error::TooManyRequestsException(inner)
2484 }
2485 crate::operation::start_events_detection_job::StartEventsDetectionJobError::TooManyTagsException(inner) => {
2486 Error::TooManyTagsException(inner)
2487 }
2488 crate::operation::start_events_detection_job::StartEventsDetectionJobError::Unhandled(inner) => Error::Unhandled(inner),
2489 }
2490 }
2491}
2492impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::start_flywheel_iteration::StartFlywheelIterationError, R>> for Error
2493where
2494 R: Send + Sync + std::fmt::Debug + 'static,
2495{
2496 fn from(
2497 err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::start_flywheel_iteration::StartFlywheelIterationError, R>,
2498 ) -> Self {
2499 match err {
2500 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
2501 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
2502 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
2503 source: err.into(),
2504 }),
2505 }
2506 }
2507}
2508impl From<crate::operation::start_flywheel_iteration::StartFlywheelIterationError> for Error {
2509 fn from(err: crate::operation::start_flywheel_iteration::StartFlywheelIterationError) -> Self {
2510 match err {
2511 crate::operation::start_flywheel_iteration::StartFlywheelIterationError::InternalServerException(inner) => {
2512 Error::InternalServerException(inner)
2513 }
2514 crate::operation::start_flywheel_iteration::StartFlywheelIterationError::InvalidRequestException(inner) => {
2515 Error::InvalidRequestException(inner)
2516 }
2517 crate::operation::start_flywheel_iteration::StartFlywheelIterationError::ResourceInUseException(inner) => {
2518 Error::ResourceInUseException(inner)
2519 }
2520 crate::operation::start_flywheel_iteration::StartFlywheelIterationError::ResourceNotFoundException(inner) => {
2521 Error::ResourceNotFoundException(inner)
2522 }
2523 crate::operation::start_flywheel_iteration::StartFlywheelIterationError::TooManyRequestsException(inner) => {
2524 Error::TooManyRequestsException(inner)
2525 }
2526 crate::operation::start_flywheel_iteration::StartFlywheelIterationError::Unhandled(inner) => Error::Unhandled(inner),
2527 }
2528 }
2529}
2530impl<R>
2531 From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::start_key_phrases_detection_job::StartKeyPhrasesDetectionJobError, R>>
2532 for Error
2533where
2534 R: Send + Sync + std::fmt::Debug + 'static,
2535{
2536 fn from(
2537 err: ::aws_smithy_runtime_api::client::result::SdkError<
2538 crate::operation::start_key_phrases_detection_job::StartKeyPhrasesDetectionJobError,
2539 R,
2540 >,
2541 ) -> Self {
2542 match err {
2543 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
2544 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
2545 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
2546 source: err.into(),
2547 }),
2548 }
2549 }
2550}
2551impl From<crate::operation::start_key_phrases_detection_job::StartKeyPhrasesDetectionJobError> for Error {
2552 fn from(err: crate::operation::start_key_phrases_detection_job::StartKeyPhrasesDetectionJobError) -> Self {
2553 match err {
2554 crate::operation::start_key_phrases_detection_job::StartKeyPhrasesDetectionJobError::InternalServerException(inner) => {
2555 Error::InternalServerException(inner)
2556 }
2557 crate::operation::start_key_phrases_detection_job::StartKeyPhrasesDetectionJobError::InvalidRequestException(inner) => {
2558 Error::InvalidRequestException(inner)
2559 }
2560 crate::operation::start_key_phrases_detection_job::StartKeyPhrasesDetectionJobError::KmsKeyValidationException(inner) => {
2561 Error::KmsKeyValidationException(inner)
2562 }
2563 crate::operation::start_key_phrases_detection_job::StartKeyPhrasesDetectionJobError::ResourceInUseException(inner) => {
2564 Error::ResourceInUseException(inner)
2565 }
2566 crate::operation::start_key_phrases_detection_job::StartKeyPhrasesDetectionJobError::TooManyRequestsException(inner) => {
2567 Error::TooManyRequestsException(inner)
2568 }
2569 crate::operation::start_key_phrases_detection_job::StartKeyPhrasesDetectionJobError::TooManyTagsException(inner) => {
2570 Error::TooManyTagsException(inner)
2571 }
2572 crate::operation::start_key_phrases_detection_job::StartKeyPhrasesDetectionJobError::Unhandled(inner) => Error::Unhandled(inner),
2573 }
2574 }
2575}
2576impl<R>
2577 From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::start_pii_entities_detection_job::StartPiiEntitiesDetectionJobError, R>>
2578 for Error
2579where
2580 R: Send + Sync + std::fmt::Debug + 'static,
2581{
2582 fn from(
2583 err: ::aws_smithy_runtime_api::client::result::SdkError<
2584 crate::operation::start_pii_entities_detection_job::StartPiiEntitiesDetectionJobError,
2585 R,
2586 >,
2587 ) -> Self {
2588 match err {
2589 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
2590 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
2591 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
2592 source: err.into(),
2593 }),
2594 }
2595 }
2596}
2597impl From<crate::operation::start_pii_entities_detection_job::StartPiiEntitiesDetectionJobError> for Error {
2598 fn from(err: crate::operation::start_pii_entities_detection_job::StartPiiEntitiesDetectionJobError) -> Self {
2599 match err {
2600 crate::operation::start_pii_entities_detection_job::StartPiiEntitiesDetectionJobError::InternalServerException(inner) => {
2601 Error::InternalServerException(inner)
2602 }
2603 crate::operation::start_pii_entities_detection_job::StartPiiEntitiesDetectionJobError::InvalidRequestException(inner) => {
2604 Error::InvalidRequestException(inner)
2605 }
2606 crate::operation::start_pii_entities_detection_job::StartPiiEntitiesDetectionJobError::KmsKeyValidationException(inner) => {
2607 Error::KmsKeyValidationException(inner)
2608 }
2609 crate::operation::start_pii_entities_detection_job::StartPiiEntitiesDetectionJobError::ResourceInUseException(inner) => {
2610 Error::ResourceInUseException(inner)
2611 }
2612 crate::operation::start_pii_entities_detection_job::StartPiiEntitiesDetectionJobError::TooManyRequestsException(inner) => {
2613 Error::TooManyRequestsException(inner)
2614 }
2615 crate::operation::start_pii_entities_detection_job::StartPiiEntitiesDetectionJobError::TooManyTagsException(inner) => {
2616 Error::TooManyTagsException(inner)
2617 }
2618 crate::operation::start_pii_entities_detection_job::StartPiiEntitiesDetectionJobError::Unhandled(inner) => Error::Unhandled(inner),
2619 }
2620 }
2621}
2622impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::start_sentiment_detection_job::StartSentimentDetectionJobError, R>>
2623 for Error
2624where
2625 R: Send + Sync + std::fmt::Debug + 'static,
2626{
2627 fn from(
2628 err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::start_sentiment_detection_job::StartSentimentDetectionJobError, R>,
2629 ) -> Self {
2630 match err {
2631 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
2632 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
2633 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
2634 source: err.into(),
2635 }),
2636 }
2637 }
2638}
2639impl From<crate::operation::start_sentiment_detection_job::StartSentimentDetectionJobError> for Error {
2640 fn from(err: crate::operation::start_sentiment_detection_job::StartSentimentDetectionJobError) -> Self {
2641 match err {
2642 crate::operation::start_sentiment_detection_job::StartSentimentDetectionJobError::InternalServerException(inner) => {
2643 Error::InternalServerException(inner)
2644 }
2645 crate::operation::start_sentiment_detection_job::StartSentimentDetectionJobError::InvalidRequestException(inner) => {
2646 Error::InvalidRequestException(inner)
2647 }
2648 crate::operation::start_sentiment_detection_job::StartSentimentDetectionJobError::KmsKeyValidationException(inner) => {
2649 Error::KmsKeyValidationException(inner)
2650 }
2651 crate::operation::start_sentiment_detection_job::StartSentimentDetectionJobError::ResourceInUseException(inner) => {
2652 Error::ResourceInUseException(inner)
2653 }
2654 crate::operation::start_sentiment_detection_job::StartSentimentDetectionJobError::TooManyRequestsException(inner) => {
2655 Error::TooManyRequestsException(inner)
2656 }
2657 crate::operation::start_sentiment_detection_job::StartSentimentDetectionJobError::TooManyTagsException(inner) => {
2658 Error::TooManyTagsException(inner)
2659 }
2660 crate::operation::start_sentiment_detection_job::StartSentimentDetectionJobError::Unhandled(inner) => Error::Unhandled(inner),
2661 }
2662 }
2663}
2664impl<R>
2665 From<
2666 ::aws_smithy_runtime_api::client::result::SdkError<
2667 crate::operation::start_targeted_sentiment_detection_job::StartTargetedSentimentDetectionJobError,
2668 R,
2669 >,
2670 > for Error
2671where
2672 R: Send + Sync + std::fmt::Debug + 'static,
2673{
2674 fn from(
2675 err: ::aws_smithy_runtime_api::client::result::SdkError<
2676 crate::operation::start_targeted_sentiment_detection_job::StartTargetedSentimentDetectionJobError,
2677 R,
2678 >,
2679 ) -> Self {
2680 match err {
2681 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
2682 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
2683 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
2684 source: err.into(),
2685 }),
2686 }
2687 }
2688}
2689impl From<crate::operation::start_targeted_sentiment_detection_job::StartTargetedSentimentDetectionJobError> for Error {
2690 fn from(err: crate::operation::start_targeted_sentiment_detection_job::StartTargetedSentimentDetectionJobError) -> Self {
2691 match err {
2692 crate::operation::start_targeted_sentiment_detection_job::StartTargetedSentimentDetectionJobError::InternalServerException(inner) => {
2693 Error::InternalServerException(inner)
2694 }
2695 crate::operation::start_targeted_sentiment_detection_job::StartTargetedSentimentDetectionJobError::InvalidRequestException(inner) => {
2696 Error::InvalidRequestException(inner)
2697 }
2698 crate::operation::start_targeted_sentiment_detection_job::StartTargetedSentimentDetectionJobError::KmsKeyValidationException(inner) => {
2699 Error::KmsKeyValidationException(inner)
2700 }
2701 crate::operation::start_targeted_sentiment_detection_job::StartTargetedSentimentDetectionJobError::ResourceInUseException(inner) => {
2702 Error::ResourceInUseException(inner)
2703 }
2704 crate::operation::start_targeted_sentiment_detection_job::StartTargetedSentimentDetectionJobError::TooManyRequestsException(inner) => {
2705 Error::TooManyRequestsException(inner)
2706 }
2707 crate::operation::start_targeted_sentiment_detection_job::StartTargetedSentimentDetectionJobError::TooManyTagsException(inner) => {
2708 Error::TooManyTagsException(inner)
2709 }
2710 crate::operation::start_targeted_sentiment_detection_job::StartTargetedSentimentDetectionJobError::Unhandled(inner) => {
2711 Error::Unhandled(inner)
2712 }
2713 }
2714 }
2715}
2716impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::start_topics_detection_job::StartTopicsDetectionJobError, R>>
2717 for Error
2718where
2719 R: Send + Sync + std::fmt::Debug + 'static,
2720{
2721 fn from(
2722 err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::start_topics_detection_job::StartTopicsDetectionJobError, R>,
2723 ) -> Self {
2724 match err {
2725 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
2726 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
2727 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
2728 source: err.into(),
2729 }),
2730 }
2731 }
2732}
2733impl From<crate::operation::start_topics_detection_job::StartTopicsDetectionJobError> for Error {
2734 fn from(err: crate::operation::start_topics_detection_job::StartTopicsDetectionJobError) -> Self {
2735 match err {
2736 crate::operation::start_topics_detection_job::StartTopicsDetectionJobError::InternalServerException(inner) => {
2737 Error::InternalServerException(inner)
2738 }
2739 crate::operation::start_topics_detection_job::StartTopicsDetectionJobError::InvalidRequestException(inner) => {
2740 Error::InvalidRequestException(inner)
2741 }
2742 crate::operation::start_topics_detection_job::StartTopicsDetectionJobError::KmsKeyValidationException(inner) => {
2743 Error::KmsKeyValidationException(inner)
2744 }
2745 crate::operation::start_topics_detection_job::StartTopicsDetectionJobError::ResourceInUseException(inner) => {
2746 Error::ResourceInUseException(inner)
2747 }
2748 crate::operation::start_topics_detection_job::StartTopicsDetectionJobError::TooManyRequestsException(inner) => {
2749 Error::TooManyRequestsException(inner)
2750 }
2751 crate::operation::start_topics_detection_job::StartTopicsDetectionJobError::TooManyTagsException(inner) => {
2752 Error::TooManyTagsException(inner)
2753 }
2754 crate::operation::start_topics_detection_job::StartTopicsDetectionJobError::Unhandled(inner) => Error::Unhandled(inner),
2755 }
2756 }
2757}
2758impl<R>
2759 From<
2760 ::aws_smithy_runtime_api::client::result::SdkError<
2761 crate::operation::stop_dominant_language_detection_job::StopDominantLanguageDetectionJobError,
2762 R,
2763 >,
2764 > for Error
2765where
2766 R: Send + Sync + std::fmt::Debug + 'static,
2767{
2768 fn from(
2769 err: ::aws_smithy_runtime_api::client::result::SdkError<
2770 crate::operation::stop_dominant_language_detection_job::StopDominantLanguageDetectionJobError,
2771 R,
2772 >,
2773 ) -> Self {
2774 match err {
2775 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
2776 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
2777 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
2778 source: err.into(),
2779 }),
2780 }
2781 }
2782}
2783impl From<crate::operation::stop_dominant_language_detection_job::StopDominantLanguageDetectionJobError> for Error {
2784 fn from(err: crate::operation::stop_dominant_language_detection_job::StopDominantLanguageDetectionJobError) -> Self {
2785 match err {
2786 crate::operation::stop_dominant_language_detection_job::StopDominantLanguageDetectionJobError::InternalServerException(inner) => {
2787 Error::InternalServerException(inner)
2788 }
2789 crate::operation::stop_dominant_language_detection_job::StopDominantLanguageDetectionJobError::InvalidRequestException(inner) => {
2790 Error::InvalidRequestException(inner)
2791 }
2792 crate::operation::stop_dominant_language_detection_job::StopDominantLanguageDetectionJobError::JobNotFoundException(inner) => {
2793 Error::JobNotFoundException(inner)
2794 }
2795 crate::operation::stop_dominant_language_detection_job::StopDominantLanguageDetectionJobError::Unhandled(inner) => {
2796 Error::Unhandled(inner)
2797 }
2798 }
2799 }
2800}
2801impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::stop_entities_detection_job::StopEntitiesDetectionJobError, R>>
2802 for Error
2803where
2804 R: Send + Sync + std::fmt::Debug + 'static,
2805{
2806 fn from(
2807 err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::stop_entities_detection_job::StopEntitiesDetectionJobError, R>,
2808 ) -> Self {
2809 match err {
2810 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
2811 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
2812 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
2813 source: err.into(),
2814 }),
2815 }
2816 }
2817}
2818impl From<crate::operation::stop_entities_detection_job::StopEntitiesDetectionJobError> for Error {
2819 fn from(err: crate::operation::stop_entities_detection_job::StopEntitiesDetectionJobError) -> Self {
2820 match err {
2821 crate::operation::stop_entities_detection_job::StopEntitiesDetectionJobError::InternalServerException(inner) => {
2822 Error::InternalServerException(inner)
2823 }
2824 crate::operation::stop_entities_detection_job::StopEntitiesDetectionJobError::InvalidRequestException(inner) => {
2825 Error::InvalidRequestException(inner)
2826 }
2827 crate::operation::stop_entities_detection_job::StopEntitiesDetectionJobError::JobNotFoundException(inner) => {
2828 Error::JobNotFoundException(inner)
2829 }
2830 crate::operation::stop_entities_detection_job::StopEntitiesDetectionJobError::Unhandled(inner) => Error::Unhandled(inner),
2831 }
2832 }
2833}
2834impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::stop_events_detection_job::StopEventsDetectionJobError, R>>
2835 for Error
2836where
2837 R: Send + Sync + std::fmt::Debug + 'static,
2838{
2839 fn from(
2840 err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::stop_events_detection_job::StopEventsDetectionJobError, R>,
2841 ) -> Self {
2842 match err {
2843 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
2844 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
2845 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
2846 source: err.into(),
2847 }),
2848 }
2849 }
2850}
2851impl From<crate::operation::stop_events_detection_job::StopEventsDetectionJobError> for Error {
2852 fn from(err: crate::operation::stop_events_detection_job::StopEventsDetectionJobError) -> Self {
2853 match err {
2854 crate::operation::stop_events_detection_job::StopEventsDetectionJobError::InternalServerException(inner) => {
2855 Error::InternalServerException(inner)
2856 }
2857 crate::operation::stop_events_detection_job::StopEventsDetectionJobError::InvalidRequestException(inner) => {
2858 Error::InvalidRequestException(inner)
2859 }
2860 crate::operation::stop_events_detection_job::StopEventsDetectionJobError::JobNotFoundException(inner) => {
2861 Error::JobNotFoundException(inner)
2862 }
2863 crate::operation::stop_events_detection_job::StopEventsDetectionJobError::Unhandled(inner) => Error::Unhandled(inner),
2864 }
2865 }
2866}
2867impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::stop_key_phrases_detection_job::StopKeyPhrasesDetectionJobError, R>>
2868 for Error
2869where
2870 R: Send + Sync + std::fmt::Debug + 'static,
2871{
2872 fn from(
2873 err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::stop_key_phrases_detection_job::StopKeyPhrasesDetectionJobError, R>,
2874 ) -> Self {
2875 match err {
2876 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
2877 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
2878 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
2879 source: err.into(),
2880 }),
2881 }
2882 }
2883}
2884impl From<crate::operation::stop_key_phrases_detection_job::StopKeyPhrasesDetectionJobError> for Error {
2885 fn from(err: crate::operation::stop_key_phrases_detection_job::StopKeyPhrasesDetectionJobError) -> Self {
2886 match err {
2887 crate::operation::stop_key_phrases_detection_job::StopKeyPhrasesDetectionJobError::InternalServerException(inner) => {
2888 Error::InternalServerException(inner)
2889 }
2890 crate::operation::stop_key_phrases_detection_job::StopKeyPhrasesDetectionJobError::InvalidRequestException(inner) => {
2891 Error::InvalidRequestException(inner)
2892 }
2893 crate::operation::stop_key_phrases_detection_job::StopKeyPhrasesDetectionJobError::JobNotFoundException(inner) => {
2894 Error::JobNotFoundException(inner)
2895 }
2896 crate::operation::stop_key_phrases_detection_job::StopKeyPhrasesDetectionJobError::Unhandled(inner) => Error::Unhandled(inner),
2897 }
2898 }
2899}
2900impl<R>
2901 From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::stop_pii_entities_detection_job::StopPiiEntitiesDetectionJobError, R>>
2902 for Error
2903where
2904 R: Send + Sync + std::fmt::Debug + 'static,
2905{
2906 fn from(
2907 err: ::aws_smithy_runtime_api::client::result::SdkError<
2908 crate::operation::stop_pii_entities_detection_job::StopPiiEntitiesDetectionJobError,
2909 R,
2910 >,
2911 ) -> Self {
2912 match err {
2913 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
2914 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
2915 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
2916 source: err.into(),
2917 }),
2918 }
2919 }
2920}
2921impl From<crate::operation::stop_pii_entities_detection_job::StopPiiEntitiesDetectionJobError> for Error {
2922 fn from(err: crate::operation::stop_pii_entities_detection_job::StopPiiEntitiesDetectionJobError) -> Self {
2923 match err {
2924 crate::operation::stop_pii_entities_detection_job::StopPiiEntitiesDetectionJobError::InternalServerException(inner) => {
2925 Error::InternalServerException(inner)
2926 }
2927 crate::operation::stop_pii_entities_detection_job::StopPiiEntitiesDetectionJobError::InvalidRequestException(inner) => {
2928 Error::InvalidRequestException(inner)
2929 }
2930 crate::operation::stop_pii_entities_detection_job::StopPiiEntitiesDetectionJobError::JobNotFoundException(inner) => {
2931 Error::JobNotFoundException(inner)
2932 }
2933 crate::operation::stop_pii_entities_detection_job::StopPiiEntitiesDetectionJobError::Unhandled(inner) => Error::Unhandled(inner),
2934 }
2935 }
2936}
2937impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::stop_sentiment_detection_job::StopSentimentDetectionJobError, R>>
2938 for Error
2939where
2940 R: Send + Sync + std::fmt::Debug + 'static,
2941{
2942 fn from(
2943 err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::stop_sentiment_detection_job::StopSentimentDetectionJobError, R>,
2944 ) -> Self {
2945 match err {
2946 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
2947 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
2948 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
2949 source: err.into(),
2950 }),
2951 }
2952 }
2953}
2954impl From<crate::operation::stop_sentiment_detection_job::StopSentimentDetectionJobError> for Error {
2955 fn from(err: crate::operation::stop_sentiment_detection_job::StopSentimentDetectionJobError) -> Self {
2956 match err {
2957 crate::operation::stop_sentiment_detection_job::StopSentimentDetectionJobError::InternalServerException(inner) => {
2958 Error::InternalServerException(inner)
2959 }
2960 crate::operation::stop_sentiment_detection_job::StopSentimentDetectionJobError::InvalidRequestException(inner) => {
2961 Error::InvalidRequestException(inner)
2962 }
2963 crate::operation::stop_sentiment_detection_job::StopSentimentDetectionJobError::JobNotFoundException(inner) => {
2964 Error::JobNotFoundException(inner)
2965 }
2966 crate::operation::stop_sentiment_detection_job::StopSentimentDetectionJobError::Unhandled(inner) => Error::Unhandled(inner),
2967 }
2968 }
2969}
2970impl<R>
2971 From<
2972 ::aws_smithy_runtime_api::client::result::SdkError<
2973 crate::operation::stop_targeted_sentiment_detection_job::StopTargetedSentimentDetectionJobError,
2974 R,
2975 >,
2976 > for Error
2977where
2978 R: Send + Sync + std::fmt::Debug + 'static,
2979{
2980 fn from(
2981 err: ::aws_smithy_runtime_api::client::result::SdkError<
2982 crate::operation::stop_targeted_sentiment_detection_job::StopTargetedSentimentDetectionJobError,
2983 R,
2984 >,
2985 ) -> Self {
2986 match err {
2987 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
2988 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
2989 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
2990 source: err.into(),
2991 }),
2992 }
2993 }
2994}
2995impl From<crate::operation::stop_targeted_sentiment_detection_job::StopTargetedSentimentDetectionJobError> for Error {
2996 fn from(err: crate::operation::stop_targeted_sentiment_detection_job::StopTargetedSentimentDetectionJobError) -> Self {
2997 match err {
2998 crate::operation::stop_targeted_sentiment_detection_job::StopTargetedSentimentDetectionJobError::InternalServerException(inner) => {
2999 Error::InternalServerException(inner)
3000 }
3001 crate::operation::stop_targeted_sentiment_detection_job::StopTargetedSentimentDetectionJobError::InvalidRequestException(inner) => {
3002 Error::InvalidRequestException(inner)
3003 }
3004 crate::operation::stop_targeted_sentiment_detection_job::StopTargetedSentimentDetectionJobError::JobNotFoundException(inner) => {
3005 Error::JobNotFoundException(inner)
3006 }
3007 crate::operation::stop_targeted_sentiment_detection_job::StopTargetedSentimentDetectionJobError::Unhandled(inner) => {
3008 Error::Unhandled(inner)
3009 }
3010 }
3011 }
3012}
3013impl<R>
3014 From<
3015 ::aws_smithy_runtime_api::client::result::SdkError<
3016 crate::operation::stop_training_document_classifier::StopTrainingDocumentClassifierError,
3017 R,
3018 >,
3019 > for Error
3020where
3021 R: Send + Sync + std::fmt::Debug + 'static,
3022{
3023 fn from(
3024 err: ::aws_smithy_runtime_api::client::result::SdkError<
3025 crate::operation::stop_training_document_classifier::StopTrainingDocumentClassifierError,
3026 R,
3027 >,
3028 ) -> Self {
3029 match err {
3030 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
3031 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
3032 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
3033 source: err.into(),
3034 }),
3035 }
3036 }
3037}
3038impl From<crate::operation::stop_training_document_classifier::StopTrainingDocumentClassifierError> for Error {
3039 fn from(err: crate::operation::stop_training_document_classifier::StopTrainingDocumentClassifierError) -> Self {
3040 match err {
3041 crate::operation::stop_training_document_classifier::StopTrainingDocumentClassifierError::InternalServerException(inner) => {
3042 Error::InternalServerException(inner)
3043 }
3044 crate::operation::stop_training_document_classifier::StopTrainingDocumentClassifierError::InvalidRequestException(inner) => {
3045 Error::InvalidRequestException(inner)
3046 }
3047 crate::operation::stop_training_document_classifier::StopTrainingDocumentClassifierError::ResourceNotFoundException(inner) => {
3048 Error::ResourceNotFoundException(inner)
3049 }
3050 crate::operation::stop_training_document_classifier::StopTrainingDocumentClassifierError::TooManyRequestsException(inner) => {
3051 Error::TooManyRequestsException(inner)
3052 }
3053 crate::operation::stop_training_document_classifier::StopTrainingDocumentClassifierError::Unhandled(inner) => Error::Unhandled(inner),
3054 }
3055 }
3056}
3057impl<R>
3058 From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::stop_training_entity_recognizer::StopTrainingEntityRecognizerError, R>>
3059 for Error
3060where
3061 R: Send + Sync + std::fmt::Debug + 'static,
3062{
3063 fn from(
3064 err: ::aws_smithy_runtime_api::client::result::SdkError<
3065 crate::operation::stop_training_entity_recognizer::StopTrainingEntityRecognizerError,
3066 R,
3067 >,
3068 ) -> Self {
3069 match err {
3070 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
3071 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
3072 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
3073 source: err.into(),
3074 }),
3075 }
3076 }
3077}
3078impl From<crate::operation::stop_training_entity_recognizer::StopTrainingEntityRecognizerError> for Error {
3079 fn from(err: crate::operation::stop_training_entity_recognizer::StopTrainingEntityRecognizerError) -> Self {
3080 match err {
3081 crate::operation::stop_training_entity_recognizer::StopTrainingEntityRecognizerError::InternalServerException(inner) => {
3082 Error::InternalServerException(inner)
3083 }
3084 crate::operation::stop_training_entity_recognizer::StopTrainingEntityRecognizerError::InvalidRequestException(inner) => {
3085 Error::InvalidRequestException(inner)
3086 }
3087 crate::operation::stop_training_entity_recognizer::StopTrainingEntityRecognizerError::ResourceNotFoundException(inner) => {
3088 Error::ResourceNotFoundException(inner)
3089 }
3090 crate::operation::stop_training_entity_recognizer::StopTrainingEntityRecognizerError::TooManyRequestsException(inner) => {
3091 Error::TooManyRequestsException(inner)
3092 }
3093 crate::operation::stop_training_entity_recognizer::StopTrainingEntityRecognizerError::Unhandled(inner) => Error::Unhandled(inner),
3094 }
3095 }
3096}
3097impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::tag_resource::TagResourceError, R>> for Error
3098where
3099 R: Send + Sync + std::fmt::Debug + 'static,
3100{
3101 fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::tag_resource::TagResourceError, R>) -> Self {
3102 match err {
3103 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
3104 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
3105 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
3106 source: err.into(),
3107 }),
3108 }
3109 }
3110}
3111impl From<crate::operation::tag_resource::TagResourceError> for Error {
3112 fn from(err: crate::operation::tag_resource::TagResourceError) -> Self {
3113 match err {
3114 crate::operation::tag_resource::TagResourceError::ConcurrentModificationException(inner) => Error::ConcurrentModificationException(inner),
3115 crate::operation::tag_resource::TagResourceError::InternalServerException(inner) => Error::InternalServerException(inner),
3116 crate::operation::tag_resource::TagResourceError::InvalidRequestException(inner) => Error::InvalidRequestException(inner),
3117 crate::operation::tag_resource::TagResourceError::ResourceNotFoundException(inner) => Error::ResourceNotFoundException(inner),
3118 crate::operation::tag_resource::TagResourceError::TooManyTagsException(inner) => Error::TooManyTagsException(inner),
3119 crate::operation::tag_resource::TagResourceError::Unhandled(inner) => Error::Unhandled(inner),
3120 }
3121 }
3122}
3123impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::untag_resource::UntagResourceError, R>> for Error
3124where
3125 R: Send + Sync + std::fmt::Debug + 'static,
3126{
3127 fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::untag_resource::UntagResourceError, R>) -> Self {
3128 match err {
3129 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
3130 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
3131 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
3132 source: err.into(),
3133 }),
3134 }
3135 }
3136}
3137impl From<crate::operation::untag_resource::UntagResourceError> for Error {
3138 fn from(err: crate::operation::untag_resource::UntagResourceError) -> Self {
3139 match err {
3140 crate::operation::untag_resource::UntagResourceError::ConcurrentModificationException(inner) => {
3141 Error::ConcurrentModificationException(inner)
3142 }
3143 crate::operation::untag_resource::UntagResourceError::InternalServerException(inner) => Error::InternalServerException(inner),
3144 crate::operation::untag_resource::UntagResourceError::InvalidRequestException(inner) => Error::InvalidRequestException(inner),
3145 crate::operation::untag_resource::UntagResourceError::ResourceNotFoundException(inner) => Error::ResourceNotFoundException(inner),
3146 crate::operation::untag_resource::UntagResourceError::TooManyTagKeysException(inner) => Error::TooManyTagKeysException(inner),
3147 crate::operation::untag_resource::UntagResourceError::Unhandled(inner) => Error::Unhandled(inner),
3148 }
3149 }
3150}
3151impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::update_endpoint::UpdateEndpointError, R>> for Error
3152where
3153 R: Send + Sync + std::fmt::Debug + 'static,
3154{
3155 fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::update_endpoint::UpdateEndpointError, R>) -> Self {
3156 match err {
3157 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
3158 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
3159 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
3160 source: err.into(),
3161 }),
3162 }
3163 }
3164}
3165impl From<crate::operation::update_endpoint::UpdateEndpointError> for Error {
3166 fn from(err: crate::operation::update_endpoint::UpdateEndpointError) -> Self {
3167 match err {
3168 crate::operation::update_endpoint::UpdateEndpointError::InternalServerException(inner) => Error::InternalServerException(inner),
3169 crate::operation::update_endpoint::UpdateEndpointError::InvalidRequestException(inner) => Error::InvalidRequestException(inner),
3170 crate::operation::update_endpoint::UpdateEndpointError::ResourceInUseException(inner) => Error::ResourceInUseException(inner),
3171 crate::operation::update_endpoint::UpdateEndpointError::ResourceLimitExceededException(inner) => {
3172 Error::ResourceLimitExceededException(inner)
3173 }
3174 crate::operation::update_endpoint::UpdateEndpointError::ResourceNotFoundException(inner) => Error::ResourceNotFoundException(inner),
3175 crate::operation::update_endpoint::UpdateEndpointError::ResourceUnavailableException(inner) => Error::ResourceUnavailableException(inner),
3176 crate::operation::update_endpoint::UpdateEndpointError::TooManyRequestsException(inner) => Error::TooManyRequestsException(inner),
3177 crate::operation::update_endpoint::UpdateEndpointError::Unhandled(inner) => Error::Unhandled(inner),
3178 }
3179 }
3180}
3181impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::update_flywheel::UpdateFlywheelError, R>> for Error
3182where
3183 R: Send + Sync + std::fmt::Debug + 'static,
3184{
3185 fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::update_flywheel::UpdateFlywheelError, R>) -> Self {
3186 match err {
3187 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
3188 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
3189 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
3190 source: err.into(),
3191 }),
3192 }
3193 }
3194}
3195impl From<crate::operation::update_flywheel::UpdateFlywheelError> for Error {
3196 fn from(err: crate::operation::update_flywheel::UpdateFlywheelError) -> Self {
3197 match err {
3198 crate::operation::update_flywheel::UpdateFlywheelError::InternalServerException(inner) => Error::InternalServerException(inner),
3199 crate::operation::update_flywheel::UpdateFlywheelError::InvalidRequestException(inner) => Error::InvalidRequestException(inner),
3200 crate::operation::update_flywheel::UpdateFlywheelError::KmsKeyValidationException(inner) => Error::KmsKeyValidationException(inner),
3201 crate::operation::update_flywheel::UpdateFlywheelError::ResourceNotFoundException(inner) => Error::ResourceNotFoundException(inner),
3202 crate::operation::update_flywheel::UpdateFlywheelError::TooManyRequestsException(inner) => Error::TooManyRequestsException(inner),
3203 crate::operation::update_flywheel::UpdateFlywheelError::Unhandled(inner) => Error::Unhandled(inner),
3204 }
3205 }
3206}
3207impl ::std::error::Error for Error {
3208 fn source(&self) -> std::option::Option<&(dyn ::std::error::Error + 'static)> {
3209 match self {
3210 Error::BatchSizeLimitExceededException(inner) => inner.source(),
3211 Error::ConcurrentModificationException(inner) => inner.source(),
3212 Error::InternalServerException(inner) => inner.source(),
3213 Error::InvalidFilterException(inner) => inner.source(),
3214 Error::InvalidRequestException(inner) => inner.source(),
3215 Error::JobNotFoundException(inner) => inner.source(),
3216 Error::KmsKeyValidationException(inner) => inner.source(),
3217 Error::ResourceInUseException(inner) => inner.source(),
3218 Error::ResourceLimitExceededException(inner) => inner.source(),
3219 Error::ResourceNotFoundException(inner) => inner.source(),
3220 Error::ResourceUnavailableException(inner) => inner.source(),
3221 Error::TextSizeLimitExceededException(inner) => inner.source(),
3222 Error::TooManyRequestsException(inner) => inner.source(),
3223 Error::TooManyTagKeysException(inner) => inner.source(),
3224 Error::TooManyTagsException(inner) => inner.source(),
3225 Error::UnsupportedLanguageException(inner) => inner.source(),
3226 Error::Unhandled(inner) => ::std::option::Option::Some(&*inner.source),
3227 }
3228 }
3229}
3230impl ::aws_types::request_id::RequestId for Error {
3231 fn request_id(&self) -> Option<&str> {
3232 match self {
3233 Self::BatchSizeLimitExceededException(e) => e.request_id(),
3234 Self::ConcurrentModificationException(e) => e.request_id(),
3235 Self::InternalServerException(e) => e.request_id(),
3236 Self::InvalidFilterException(e) => e.request_id(),
3237 Self::InvalidRequestException(e) => e.request_id(),
3238 Self::JobNotFoundException(e) => e.request_id(),
3239 Self::KmsKeyValidationException(e) => e.request_id(),
3240 Self::ResourceInUseException(e) => e.request_id(),
3241 Self::ResourceLimitExceededException(e) => e.request_id(),
3242 Self::ResourceNotFoundException(e) => e.request_id(),
3243 Self::ResourceUnavailableException(e) => e.request_id(),
3244 Self::TextSizeLimitExceededException(e) => e.request_id(),
3245 Self::TooManyRequestsException(e) => e.request_id(),
3246 Self::TooManyTagKeysException(e) => e.request_id(),
3247 Self::TooManyTagsException(e) => e.request_id(),
3248 Self::UnsupportedLanguageException(e) => e.request_id(),
3249 Self::Unhandled(e) => e.meta.request_id(),
3250 }
3251 }
3252}