1#[non_exhaustive]
4#[derive(::std::fmt::Debug)]
5pub enum Error {
6 InternalServerException(crate::types::error::InternalServerException),
8 InvalidEncodingException(crate::types::error::InvalidEncodingException),
10 InvalidRequestException(crate::types::error::InvalidRequestException),
12 ResourceNotFoundException(crate::types::error::ResourceNotFoundException),
14 ServiceUnavailableException(crate::types::error::ServiceUnavailableException),
16 TextSizeLimitExceededException(crate::types::error::TextSizeLimitExceededException),
18 TooManyRequestsException(crate::types::error::TooManyRequestsException),
20 ValidationException(crate::types::error::ValidationException),
22 #[deprecated(note = "Matching `Unhandled` directly is not forwards compatible. Instead, match using a \
24 variable wildcard pattern and check `.code()`:
25 \
26 `err if err.code() == Some(\"SpecificExceptionCode\") => { /* handle the error */ }`
27 \
28 See [`ProvideErrorMetadata`](#impl-ProvideErrorMetadata-for-Error) for what information is available for the error.")]
29 Unhandled(crate::error::sealed_unhandled::Unhandled),
30}
31impl ::std::fmt::Display for Error {
32 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
33 match self {
34 Error::InternalServerException(inner) => inner.fmt(f),
35 Error::InvalidEncodingException(inner) => inner.fmt(f),
36 Error::InvalidRequestException(inner) => inner.fmt(f),
37 Error::ResourceNotFoundException(inner) => inner.fmt(f),
38 Error::ServiceUnavailableException(inner) => inner.fmt(f),
39 Error::TextSizeLimitExceededException(inner) => inner.fmt(f),
40 Error::TooManyRequestsException(inner) => inner.fmt(f),
41 Error::ValidationException(inner) => inner.fmt(f),
42 Error::Unhandled(_) => {
43 if let ::std::option::Option::Some(code) = ::aws_smithy_types::error::metadata::ProvideErrorMetadata::code(self) {
44 write!(f, "unhandled error ({code})")
45 } else {
46 f.write_str("unhandled error")
47 }
48 }
49 }
50 }
51}
52impl From<::aws_smithy_types::error::operation::BuildError> for Error {
53 fn from(value: ::aws_smithy_types::error::operation::BuildError) -> Self {
54 Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
55 source: value.into(),
56 meta: ::std::default::Default::default(),
57 })
58 }
59}
60impl ::aws_smithy_types::error::metadata::ProvideErrorMetadata for Error {
61 fn meta(&self) -> &::aws_smithy_types::error::metadata::ErrorMetadata {
62 match self {
63 Self::InternalServerException(inner) => inner.meta(),
64 Self::InvalidEncodingException(inner) => inner.meta(),
65 Self::InvalidRequestException(inner) => inner.meta(),
66 Self::ResourceNotFoundException(inner) => inner.meta(),
67 Self::ServiceUnavailableException(inner) => inner.meta(),
68 Self::TextSizeLimitExceededException(inner) => inner.meta(),
69 Self::TooManyRequestsException(inner) => inner.meta(),
70 Self::ValidationException(inner) => inner.meta(),
71 Self::Unhandled(inner) => &inner.meta,
72 }
73 }
74}
75impl<R>
76 From<
77 ::aws_smithy_runtime_api::client::result::SdkError<
78 crate::operation::describe_entities_detection_v2_job::DescribeEntitiesDetectionV2JobError,
79 R,
80 >,
81 > for Error
82where
83 R: Send + Sync + std::fmt::Debug + 'static,
84{
85 fn from(
86 err: ::aws_smithy_runtime_api::client::result::SdkError<
87 crate::operation::describe_entities_detection_v2_job::DescribeEntitiesDetectionV2JobError,
88 R,
89 >,
90 ) -> Self {
91 match err {
92 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
93 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
94 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
95 source: err.into(),
96 }),
97 }
98 }
99}
100impl From<crate::operation::describe_entities_detection_v2_job::DescribeEntitiesDetectionV2JobError> for Error {
101 fn from(err: crate::operation::describe_entities_detection_v2_job::DescribeEntitiesDetectionV2JobError) -> Self {
102 match err {
103 crate::operation::describe_entities_detection_v2_job::DescribeEntitiesDetectionV2JobError::InternalServerException(inner) => {
104 Error::InternalServerException(inner)
105 }
106 crate::operation::describe_entities_detection_v2_job::DescribeEntitiesDetectionV2JobError::InvalidRequestException(inner) => {
107 Error::InvalidRequestException(inner)
108 }
109 crate::operation::describe_entities_detection_v2_job::DescribeEntitiesDetectionV2JobError::ResourceNotFoundException(inner) => {
110 Error::ResourceNotFoundException(inner)
111 }
112 crate::operation::describe_entities_detection_v2_job::DescribeEntitiesDetectionV2JobError::TooManyRequestsException(inner) => {
113 Error::TooManyRequestsException(inner)
114 }
115 crate::operation::describe_entities_detection_v2_job::DescribeEntitiesDetectionV2JobError::Unhandled(inner) => Error::Unhandled(inner),
116 }
117 }
118}
119impl<R>
120 From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::describe_icd10_cm_inference_job::DescribeICD10CMInferenceJobError, R>>
121 for Error
122where
123 R: Send + Sync + std::fmt::Debug + 'static,
124{
125 fn from(
126 err: ::aws_smithy_runtime_api::client::result::SdkError<
127 crate::operation::describe_icd10_cm_inference_job::DescribeICD10CMInferenceJobError,
128 R,
129 >,
130 ) -> Self {
131 match err {
132 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
133 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
134 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
135 source: err.into(),
136 }),
137 }
138 }
139}
140impl From<crate::operation::describe_icd10_cm_inference_job::DescribeICD10CMInferenceJobError> for Error {
141 fn from(err: crate::operation::describe_icd10_cm_inference_job::DescribeICD10CMInferenceJobError) -> Self {
142 match err {
143 crate::operation::describe_icd10_cm_inference_job::DescribeICD10CMInferenceJobError::InternalServerException(inner) => {
144 Error::InternalServerException(inner)
145 }
146 crate::operation::describe_icd10_cm_inference_job::DescribeICD10CMInferenceJobError::InvalidRequestException(inner) => {
147 Error::InvalidRequestException(inner)
148 }
149 crate::operation::describe_icd10_cm_inference_job::DescribeICD10CMInferenceJobError::ResourceNotFoundException(inner) => {
150 Error::ResourceNotFoundException(inner)
151 }
152 crate::operation::describe_icd10_cm_inference_job::DescribeICD10CMInferenceJobError::TooManyRequestsException(inner) => {
153 Error::TooManyRequestsException(inner)
154 }
155 crate::operation::describe_icd10_cm_inference_job::DescribeICD10CMInferenceJobError::Unhandled(inner) => Error::Unhandled(inner),
156 }
157 }
158}
159impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::describe_phi_detection_job::DescribePHIDetectionJobError, R>>
160 for Error
161where
162 R: Send + Sync + std::fmt::Debug + 'static,
163{
164 fn from(
165 err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::describe_phi_detection_job::DescribePHIDetectionJobError, R>,
166 ) -> Self {
167 match err {
168 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
169 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
170 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
171 source: err.into(),
172 }),
173 }
174 }
175}
176impl From<crate::operation::describe_phi_detection_job::DescribePHIDetectionJobError> for Error {
177 fn from(err: crate::operation::describe_phi_detection_job::DescribePHIDetectionJobError) -> Self {
178 match err {
179 crate::operation::describe_phi_detection_job::DescribePHIDetectionJobError::InternalServerException(inner) => {
180 Error::InternalServerException(inner)
181 }
182 crate::operation::describe_phi_detection_job::DescribePHIDetectionJobError::InvalidRequestException(inner) => {
183 Error::InvalidRequestException(inner)
184 }
185 crate::operation::describe_phi_detection_job::DescribePHIDetectionJobError::ResourceNotFoundException(inner) => {
186 Error::ResourceNotFoundException(inner)
187 }
188 crate::operation::describe_phi_detection_job::DescribePHIDetectionJobError::TooManyRequestsException(inner) => {
189 Error::TooManyRequestsException(inner)
190 }
191 crate::operation::describe_phi_detection_job::DescribePHIDetectionJobError::Unhandled(inner) => Error::Unhandled(inner),
192 }
193 }
194}
195impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::describe_rx_norm_inference_job::DescribeRxNormInferenceJobError, R>>
196 for Error
197where
198 R: Send + Sync + std::fmt::Debug + 'static,
199{
200 fn from(
201 err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::describe_rx_norm_inference_job::DescribeRxNormInferenceJobError, R>,
202 ) -> Self {
203 match err {
204 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
205 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
206 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
207 source: err.into(),
208 }),
209 }
210 }
211}
212impl From<crate::operation::describe_rx_norm_inference_job::DescribeRxNormInferenceJobError> for Error {
213 fn from(err: crate::operation::describe_rx_norm_inference_job::DescribeRxNormInferenceJobError) -> Self {
214 match err {
215 crate::operation::describe_rx_norm_inference_job::DescribeRxNormInferenceJobError::InternalServerException(inner) => {
216 Error::InternalServerException(inner)
217 }
218 crate::operation::describe_rx_norm_inference_job::DescribeRxNormInferenceJobError::InvalidRequestException(inner) => {
219 Error::InvalidRequestException(inner)
220 }
221 crate::operation::describe_rx_norm_inference_job::DescribeRxNormInferenceJobError::ResourceNotFoundException(inner) => {
222 Error::ResourceNotFoundException(inner)
223 }
224 crate::operation::describe_rx_norm_inference_job::DescribeRxNormInferenceJobError::TooManyRequestsException(inner) => {
225 Error::TooManyRequestsException(inner)
226 }
227 crate::operation::describe_rx_norm_inference_job::DescribeRxNormInferenceJobError::Unhandled(inner) => Error::Unhandled(inner),
228 }
229 }
230}
231impl<R>
232 From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::describe_snomedct_inference_job::DescribeSNOMEDCTInferenceJobError, R>>
233 for Error
234where
235 R: Send + Sync + std::fmt::Debug + 'static,
236{
237 fn from(
238 err: ::aws_smithy_runtime_api::client::result::SdkError<
239 crate::operation::describe_snomedct_inference_job::DescribeSNOMEDCTInferenceJobError,
240 R,
241 >,
242 ) -> Self {
243 match err {
244 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
245 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
246 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
247 source: err.into(),
248 }),
249 }
250 }
251}
252impl From<crate::operation::describe_snomedct_inference_job::DescribeSNOMEDCTInferenceJobError> for Error {
253 fn from(err: crate::operation::describe_snomedct_inference_job::DescribeSNOMEDCTInferenceJobError) -> Self {
254 match err {
255 crate::operation::describe_snomedct_inference_job::DescribeSNOMEDCTInferenceJobError::InternalServerException(inner) => {
256 Error::InternalServerException(inner)
257 }
258 crate::operation::describe_snomedct_inference_job::DescribeSNOMEDCTInferenceJobError::InvalidRequestException(inner) => {
259 Error::InvalidRequestException(inner)
260 }
261 crate::operation::describe_snomedct_inference_job::DescribeSNOMEDCTInferenceJobError::ResourceNotFoundException(inner) => {
262 Error::ResourceNotFoundException(inner)
263 }
264 crate::operation::describe_snomedct_inference_job::DescribeSNOMEDCTInferenceJobError::TooManyRequestsException(inner) => {
265 Error::TooManyRequestsException(inner)
266 }
267 crate::operation::describe_snomedct_inference_job::DescribeSNOMEDCTInferenceJobError::Unhandled(inner) => Error::Unhandled(inner),
268 }
269 }
270}
271impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::detect_entities::DetectEntitiesError, R>> for Error
272where
273 R: Send + Sync + std::fmt::Debug + 'static,
274{
275 fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::detect_entities::DetectEntitiesError, R>) -> Self {
276 match err {
277 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
278 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
279 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
280 source: err.into(),
281 }),
282 }
283 }
284}
285impl From<crate::operation::detect_entities::DetectEntitiesError> for Error {
286 fn from(err: crate::operation::detect_entities::DetectEntitiesError) -> Self {
287 match err {
288 crate::operation::detect_entities::DetectEntitiesError::InternalServerException(inner) => Error::InternalServerException(inner),
289 crate::operation::detect_entities::DetectEntitiesError::InvalidEncodingException(inner) => Error::InvalidEncodingException(inner),
290 crate::operation::detect_entities::DetectEntitiesError::InvalidRequestException(inner) => Error::InvalidRequestException(inner),
291 crate::operation::detect_entities::DetectEntitiesError::ServiceUnavailableException(inner) => Error::ServiceUnavailableException(inner),
292 crate::operation::detect_entities::DetectEntitiesError::TextSizeLimitExceededException(inner) => {
293 Error::TextSizeLimitExceededException(inner)
294 }
295 crate::operation::detect_entities::DetectEntitiesError::TooManyRequestsException(inner) => Error::TooManyRequestsException(inner),
296 crate::operation::detect_entities::DetectEntitiesError::Unhandled(inner) => Error::Unhandled(inner),
297 }
298 }
299}
300impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::detect_entities_v2::DetectEntitiesV2Error, R>> for Error
301where
302 R: Send + Sync + std::fmt::Debug + 'static,
303{
304 fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::detect_entities_v2::DetectEntitiesV2Error, R>) -> Self {
305 match err {
306 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
307 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
308 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
309 source: err.into(),
310 }),
311 }
312 }
313}
314impl From<crate::operation::detect_entities_v2::DetectEntitiesV2Error> for Error {
315 fn from(err: crate::operation::detect_entities_v2::DetectEntitiesV2Error) -> Self {
316 match err {
317 crate::operation::detect_entities_v2::DetectEntitiesV2Error::InternalServerException(inner) => Error::InternalServerException(inner),
318 crate::operation::detect_entities_v2::DetectEntitiesV2Error::InvalidEncodingException(inner) => Error::InvalidEncodingException(inner),
319 crate::operation::detect_entities_v2::DetectEntitiesV2Error::InvalidRequestException(inner) => Error::InvalidRequestException(inner),
320 crate::operation::detect_entities_v2::DetectEntitiesV2Error::ServiceUnavailableException(inner) => {
321 Error::ServiceUnavailableException(inner)
322 }
323 crate::operation::detect_entities_v2::DetectEntitiesV2Error::TextSizeLimitExceededException(inner) => {
324 Error::TextSizeLimitExceededException(inner)
325 }
326 crate::operation::detect_entities_v2::DetectEntitiesV2Error::TooManyRequestsException(inner) => Error::TooManyRequestsException(inner),
327 crate::operation::detect_entities_v2::DetectEntitiesV2Error::Unhandled(inner) => Error::Unhandled(inner),
328 }
329 }
330}
331impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::detect_phi::DetectPHIError, R>> for Error
332where
333 R: Send + Sync + std::fmt::Debug + 'static,
334{
335 fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::detect_phi::DetectPHIError, R>) -> Self {
336 match err {
337 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
338 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
339 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
340 source: err.into(),
341 }),
342 }
343 }
344}
345impl From<crate::operation::detect_phi::DetectPHIError> for Error {
346 fn from(err: crate::operation::detect_phi::DetectPHIError) -> Self {
347 match err {
348 crate::operation::detect_phi::DetectPHIError::InternalServerException(inner) => Error::InternalServerException(inner),
349 crate::operation::detect_phi::DetectPHIError::InvalidEncodingException(inner) => Error::InvalidEncodingException(inner),
350 crate::operation::detect_phi::DetectPHIError::InvalidRequestException(inner) => Error::InvalidRequestException(inner),
351 crate::operation::detect_phi::DetectPHIError::ServiceUnavailableException(inner) => Error::ServiceUnavailableException(inner),
352 crate::operation::detect_phi::DetectPHIError::TextSizeLimitExceededException(inner) => Error::TextSizeLimitExceededException(inner),
353 crate::operation::detect_phi::DetectPHIError::TooManyRequestsException(inner) => Error::TooManyRequestsException(inner),
354 crate::operation::detect_phi::DetectPHIError::Unhandled(inner) => Error::Unhandled(inner),
355 }
356 }
357}
358impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::infer_icd10_cm::InferICD10CMError, R>> for Error
359where
360 R: Send + Sync + std::fmt::Debug + 'static,
361{
362 fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::infer_icd10_cm::InferICD10CMError, R>) -> Self {
363 match err {
364 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
365 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
366 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
367 source: err.into(),
368 }),
369 }
370 }
371}
372impl From<crate::operation::infer_icd10_cm::InferICD10CMError> for Error {
373 fn from(err: crate::operation::infer_icd10_cm::InferICD10CMError) -> Self {
374 match err {
375 crate::operation::infer_icd10_cm::InferICD10CMError::InternalServerException(inner) => Error::InternalServerException(inner),
376 crate::operation::infer_icd10_cm::InferICD10CMError::InvalidEncodingException(inner) => Error::InvalidEncodingException(inner),
377 crate::operation::infer_icd10_cm::InferICD10CMError::InvalidRequestException(inner) => Error::InvalidRequestException(inner),
378 crate::operation::infer_icd10_cm::InferICD10CMError::ServiceUnavailableException(inner) => Error::ServiceUnavailableException(inner),
379 crate::operation::infer_icd10_cm::InferICD10CMError::TextSizeLimitExceededException(inner) => {
380 Error::TextSizeLimitExceededException(inner)
381 }
382 crate::operation::infer_icd10_cm::InferICD10CMError::TooManyRequestsException(inner) => Error::TooManyRequestsException(inner),
383 crate::operation::infer_icd10_cm::InferICD10CMError::Unhandled(inner) => Error::Unhandled(inner),
384 }
385 }
386}
387impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::infer_rx_norm::InferRxNormError, R>> for Error
388where
389 R: Send + Sync + std::fmt::Debug + 'static,
390{
391 fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::infer_rx_norm::InferRxNormError, R>) -> Self {
392 match err {
393 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
394 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
395 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
396 source: err.into(),
397 }),
398 }
399 }
400}
401impl From<crate::operation::infer_rx_norm::InferRxNormError> for Error {
402 fn from(err: crate::operation::infer_rx_norm::InferRxNormError) -> Self {
403 match err {
404 crate::operation::infer_rx_norm::InferRxNormError::InternalServerException(inner) => Error::InternalServerException(inner),
405 crate::operation::infer_rx_norm::InferRxNormError::InvalidEncodingException(inner) => Error::InvalidEncodingException(inner),
406 crate::operation::infer_rx_norm::InferRxNormError::InvalidRequestException(inner) => Error::InvalidRequestException(inner),
407 crate::operation::infer_rx_norm::InferRxNormError::ServiceUnavailableException(inner) => Error::ServiceUnavailableException(inner),
408 crate::operation::infer_rx_norm::InferRxNormError::TextSizeLimitExceededException(inner) => Error::TextSizeLimitExceededException(inner),
409 crate::operation::infer_rx_norm::InferRxNormError::TooManyRequestsException(inner) => Error::TooManyRequestsException(inner),
410 crate::operation::infer_rx_norm::InferRxNormError::Unhandled(inner) => Error::Unhandled(inner),
411 }
412 }
413}
414impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::infer_snomedct::InferSNOMEDCTError, R>> for Error
415where
416 R: Send + Sync + std::fmt::Debug + 'static,
417{
418 fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::infer_snomedct::InferSNOMEDCTError, R>) -> Self {
419 match err {
420 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
421 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
422 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
423 source: err.into(),
424 }),
425 }
426 }
427}
428impl From<crate::operation::infer_snomedct::InferSNOMEDCTError> for Error {
429 fn from(err: crate::operation::infer_snomedct::InferSNOMEDCTError) -> Self {
430 match err {
431 crate::operation::infer_snomedct::InferSNOMEDCTError::InternalServerException(inner) => Error::InternalServerException(inner),
432 crate::operation::infer_snomedct::InferSNOMEDCTError::InvalidEncodingException(inner) => Error::InvalidEncodingException(inner),
433 crate::operation::infer_snomedct::InferSNOMEDCTError::InvalidRequestException(inner) => Error::InvalidRequestException(inner),
434 crate::operation::infer_snomedct::InferSNOMEDCTError::ServiceUnavailableException(inner) => Error::ServiceUnavailableException(inner),
435 crate::operation::infer_snomedct::InferSNOMEDCTError::TextSizeLimitExceededException(inner) => {
436 Error::TextSizeLimitExceededException(inner)
437 }
438 crate::operation::infer_snomedct::InferSNOMEDCTError::TooManyRequestsException(inner) => Error::TooManyRequestsException(inner),
439 crate::operation::infer_snomedct::InferSNOMEDCTError::Unhandled(inner) => Error::Unhandled(inner),
440 }
441 }
442}
443impl<R>
444 From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::list_entities_detection_v2_jobs::ListEntitiesDetectionV2JobsError, R>>
445 for Error
446where
447 R: Send + Sync + std::fmt::Debug + 'static,
448{
449 fn from(
450 err: ::aws_smithy_runtime_api::client::result::SdkError<
451 crate::operation::list_entities_detection_v2_jobs::ListEntitiesDetectionV2JobsError,
452 R,
453 >,
454 ) -> Self {
455 match err {
456 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
457 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
458 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
459 source: err.into(),
460 }),
461 }
462 }
463}
464impl From<crate::operation::list_entities_detection_v2_jobs::ListEntitiesDetectionV2JobsError> for Error {
465 fn from(err: crate::operation::list_entities_detection_v2_jobs::ListEntitiesDetectionV2JobsError) -> Self {
466 match err {
467 crate::operation::list_entities_detection_v2_jobs::ListEntitiesDetectionV2JobsError::InternalServerException(inner) => {
468 Error::InternalServerException(inner)
469 }
470 crate::operation::list_entities_detection_v2_jobs::ListEntitiesDetectionV2JobsError::InvalidRequestException(inner) => {
471 Error::InvalidRequestException(inner)
472 }
473 crate::operation::list_entities_detection_v2_jobs::ListEntitiesDetectionV2JobsError::TooManyRequestsException(inner) => {
474 Error::TooManyRequestsException(inner)
475 }
476 crate::operation::list_entities_detection_v2_jobs::ListEntitiesDetectionV2JobsError::ValidationException(inner) => {
477 Error::ValidationException(inner)
478 }
479 crate::operation::list_entities_detection_v2_jobs::ListEntitiesDetectionV2JobsError::Unhandled(inner) => Error::Unhandled(inner),
480 }
481 }
482}
483impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::list_icd10_cm_inference_jobs::ListICD10CMInferenceJobsError, R>>
484 for Error
485where
486 R: Send + Sync + std::fmt::Debug + 'static,
487{
488 fn from(
489 err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::list_icd10_cm_inference_jobs::ListICD10CMInferenceJobsError, R>,
490 ) -> Self {
491 match err {
492 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
493 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
494 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
495 source: err.into(),
496 }),
497 }
498 }
499}
500impl From<crate::operation::list_icd10_cm_inference_jobs::ListICD10CMInferenceJobsError> for Error {
501 fn from(err: crate::operation::list_icd10_cm_inference_jobs::ListICD10CMInferenceJobsError) -> Self {
502 match err {
503 crate::operation::list_icd10_cm_inference_jobs::ListICD10CMInferenceJobsError::InternalServerException(inner) => {
504 Error::InternalServerException(inner)
505 }
506 crate::operation::list_icd10_cm_inference_jobs::ListICD10CMInferenceJobsError::InvalidRequestException(inner) => {
507 Error::InvalidRequestException(inner)
508 }
509 crate::operation::list_icd10_cm_inference_jobs::ListICD10CMInferenceJobsError::TooManyRequestsException(inner) => {
510 Error::TooManyRequestsException(inner)
511 }
512 crate::operation::list_icd10_cm_inference_jobs::ListICD10CMInferenceJobsError::ValidationException(inner) => {
513 Error::ValidationException(inner)
514 }
515 crate::operation::list_icd10_cm_inference_jobs::ListICD10CMInferenceJobsError::Unhandled(inner) => Error::Unhandled(inner),
516 }
517 }
518}
519impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::list_phi_detection_jobs::ListPHIDetectionJobsError, R>> for Error
520where
521 R: Send + Sync + std::fmt::Debug + 'static,
522{
523 fn from(
524 err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::list_phi_detection_jobs::ListPHIDetectionJobsError, R>,
525 ) -> Self {
526 match err {
527 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
528 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
529 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
530 source: err.into(),
531 }),
532 }
533 }
534}
535impl From<crate::operation::list_phi_detection_jobs::ListPHIDetectionJobsError> for Error {
536 fn from(err: crate::operation::list_phi_detection_jobs::ListPHIDetectionJobsError) -> Self {
537 match err {
538 crate::operation::list_phi_detection_jobs::ListPHIDetectionJobsError::InternalServerException(inner) => {
539 Error::InternalServerException(inner)
540 }
541 crate::operation::list_phi_detection_jobs::ListPHIDetectionJobsError::InvalidRequestException(inner) => {
542 Error::InvalidRequestException(inner)
543 }
544 crate::operation::list_phi_detection_jobs::ListPHIDetectionJobsError::TooManyRequestsException(inner) => {
545 Error::TooManyRequestsException(inner)
546 }
547 crate::operation::list_phi_detection_jobs::ListPHIDetectionJobsError::ValidationException(inner) => Error::ValidationException(inner),
548 crate::operation::list_phi_detection_jobs::ListPHIDetectionJobsError::Unhandled(inner) => Error::Unhandled(inner),
549 }
550 }
551}
552impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::list_rx_norm_inference_jobs::ListRxNormInferenceJobsError, R>>
553 for Error
554where
555 R: Send + Sync + std::fmt::Debug + 'static,
556{
557 fn from(
558 err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::list_rx_norm_inference_jobs::ListRxNormInferenceJobsError, R>,
559 ) -> Self {
560 match err {
561 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
562 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
563 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
564 source: err.into(),
565 }),
566 }
567 }
568}
569impl From<crate::operation::list_rx_norm_inference_jobs::ListRxNormInferenceJobsError> for Error {
570 fn from(err: crate::operation::list_rx_norm_inference_jobs::ListRxNormInferenceJobsError) -> Self {
571 match err {
572 crate::operation::list_rx_norm_inference_jobs::ListRxNormInferenceJobsError::InternalServerException(inner) => {
573 Error::InternalServerException(inner)
574 }
575 crate::operation::list_rx_norm_inference_jobs::ListRxNormInferenceJobsError::InvalidRequestException(inner) => {
576 Error::InvalidRequestException(inner)
577 }
578 crate::operation::list_rx_norm_inference_jobs::ListRxNormInferenceJobsError::TooManyRequestsException(inner) => {
579 Error::TooManyRequestsException(inner)
580 }
581 crate::operation::list_rx_norm_inference_jobs::ListRxNormInferenceJobsError::ValidationException(inner) => {
582 Error::ValidationException(inner)
583 }
584 crate::operation::list_rx_norm_inference_jobs::ListRxNormInferenceJobsError::Unhandled(inner) => Error::Unhandled(inner),
585 }
586 }
587}
588impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::list_snomedct_inference_jobs::ListSNOMEDCTInferenceJobsError, R>>
589 for Error
590where
591 R: Send + Sync + std::fmt::Debug + 'static,
592{
593 fn from(
594 err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::list_snomedct_inference_jobs::ListSNOMEDCTInferenceJobsError, R>,
595 ) -> Self {
596 match err {
597 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
598 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
599 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
600 source: err.into(),
601 }),
602 }
603 }
604}
605impl From<crate::operation::list_snomedct_inference_jobs::ListSNOMEDCTInferenceJobsError> for Error {
606 fn from(err: crate::operation::list_snomedct_inference_jobs::ListSNOMEDCTInferenceJobsError) -> Self {
607 match err {
608 crate::operation::list_snomedct_inference_jobs::ListSNOMEDCTInferenceJobsError::InternalServerException(inner) => {
609 Error::InternalServerException(inner)
610 }
611 crate::operation::list_snomedct_inference_jobs::ListSNOMEDCTInferenceJobsError::InvalidRequestException(inner) => {
612 Error::InvalidRequestException(inner)
613 }
614 crate::operation::list_snomedct_inference_jobs::ListSNOMEDCTInferenceJobsError::TooManyRequestsException(inner) => {
615 Error::TooManyRequestsException(inner)
616 }
617 crate::operation::list_snomedct_inference_jobs::ListSNOMEDCTInferenceJobsError::ValidationException(inner) => {
618 Error::ValidationException(inner)
619 }
620 crate::operation::list_snomedct_inference_jobs::ListSNOMEDCTInferenceJobsError::Unhandled(inner) => Error::Unhandled(inner),
621 }
622 }
623}
624impl<R>
625 From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::start_entities_detection_v2_job::StartEntitiesDetectionV2JobError, R>>
626 for Error
627where
628 R: Send + Sync + std::fmt::Debug + 'static,
629{
630 fn from(
631 err: ::aws_smithy_runtime_api::client::result::SdkError<
632 crate::operation::start_entities_detection_v2_job::StartEntitiesDetectionV2JobError,
633 R,
634 >,
635 ) -> Self {
636 match err {
637 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
638 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
639 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
640 source: err.into(),
641 }),
642 }
643 }
644}
645impl From<crate::operation::start_entities_detection_v2_job::StartEntitiesDetectionV2JobError> for Error {
646 fn from(err: crate::operation::start_entities_detection_v2_job::StartEntitiesDetectionV2JobError) -> Self {
647 match err {
648 crate::operation::start_entities_detection_v2_job::StartEntitiesDetectionV2JobError::InternalServerException(inner) => {
649 Error::InternalServerException(inner)
650 }
651 crate::operation::start_entities_detection_v2_job::StartEntitiesDetectionV2JobError::InvalidRequestException(inner) => {
652 Error::InvalidRequestException(inner)
653 }
654 crate::operation::start_entities_detection_v2_job::StartEntitiesDetectionV2JobError::ResourceNotFoundException(inner) => {
655 Error::ResourceNotFoundException(inner)
656 }
657 crate::operation::start_entities_detection_v2_job::StartEntitiesDetectionV2JobError::TooManyRequestsException(inner) => {
658 Error::TooManyRequestsException(inner)
659 }
660 crate::operation::start_entities_detection_v2_job::StartEntitiesDetectionV2JobError::Unhandled(inner) => Error::Unhandled(inner),
661 }
662 }
663}
664impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::start_icd10_cm_inference_job::StartICD10CMInferenceJobError, R>>
665 for Error
666where
667 R: Send + Sync + std::fmt::Debug + 'static,
668{
669 fn from(
670 err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::start_icd10_cm_inference_job::StartICD10CMInferenceJobError, R>,
671 ) -> Self {
672 match err {
673 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
674 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
675 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
676 source: err.into(),
677 }),
678 }
679 }
680}
681impl From<crate::operation::start_icd10_cm_inference_job::StartICD10CMInferenceJobError> for Error {
682 fn from(err: crate::operation::start_icd10_cm_inference_job::StartICD10CMInferenceJobError) -> Self {
683 match err {
684 crate::operation::start_icd10_cm_inference_job::StartICD10CMInferenceJobError::InternalServerException(inner) => {
685 Error::InternalServerException(inner)
686 }
687 crate::operation::start_icd10_cm_inference_job::StartICD10CMInferenceJobError::InvalidRequestException(inner) => {
688 Error::InvalidRequestException(inner)
689 }
690 crate::operation::start_icd10_cm_inference_job::StartICD10CMInferenceJobError::ResourceNotFoundException(inner) => {
691 Error::ResourceNotFoundException(inner)
692 }
693 crate::operation::start_icd10_cm_inference_job::StartICD10CMInferenceJobError::TooManyRequestsException(inner) => {
694 Error::TooManyRequestsException(inner)
695 }
696 crate::operation::start_icd10_cm_inference_job::StartICD10CMInferenceJobError::Unhandled(inner) => Error::Unhandled(inner),
697 }
698 }
699}
700impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::start_phi_detection_job::StartPHIDetectionJobError, R>> for Error
701where
702 R: Send + Sync + std::fmt::Debug + 'static,
703{
704 fn from(
705 err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::start_phi_detection_job::StartPHIDetectionJobError, R>,
706 ) -> Self {
707 match err {
708 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
709 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
710 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
711 source: err.into(),
712 }),
713 }
714 }
715}
716impl From<crate::operation::start_phi_detection_job::StartPHIDetectionJobError> for Error {
717 fn from(err: crate::operation::start_phi_detection_job::StartPHIDetectionJobError) -> Self {
718 match err {
719 crate::operation::start_phi_detection_job::StartPHIDetectionJobError::InternalServerException(inner) => {
720 Error::InternalServerException(inner)
721 }
722 crate::operation::start_phi_detection_job::StartPHIDetectionJobError::InvalidRequestException(inner) => {
723 Error::InvalidRequestException(inner)
724 }
725 crate::operation::start_phi_detection_job::StartPHIDetectionJobError::ResourceNotFoundException(inner) => {
726 Error::ResourceNotFoundException(inner)
727 }
728 crate::operation::start_phi_detection_job::StartPHIDetectionJobError::TooManyRequestsException(inner) => {
729 Error::TooManyRequestsException(inner)
730 }
731 crate::operation::start_phi_detection_job::StartPHIDetectionJobError::Unhandled(inner) => Error::Unhandled(inner),
732 }
733 }
734}
735impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::start_rx_norm_inference_job::StartRxNormInferenceJobError, R>>
736 for Error
737where
738 R: Send + Sync + std::fmt::Debug + 'static,
739{
740 fn from(
741 err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::start_rx_norm_inference_job::StartRxNormInferenceJobError, R>,
742 ) -> Self {
743 match err {
744 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
745 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
746 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
747 source: err.into(),
748 }),
749 }
750 }
751}
752impl From<crate::operation::start_rx_norm_inference_job::StartRxNormInferenceJobError> for Error {
753 fn from(err: crate::operation::start_rx_norm_inference_job::StartRxNormInferenceJobError) -> Self {
754 match err {
755 crate::operation::start_rx_norm_inference_job::StartRxNormInferenceJobError::InternalServerException(inner) => {
756 Error::InternalServerException(inner)
757 }
758 crate::operation::start_rx_norm_inference_job::StartRxNormInferenceJobError::InvalidRequestException(inner) => {
759 Error::InvalidRequestException(inner)
760 }
761 crate::operation::start_rx_norm_inference_job::StartRxNormInferenceJobError::ResourceNotFoundException(inner) => {
762 Error::ResourceNotFoundException(inner)
763 }
764 crate::operation::start_rx_norm_inference_job::StartRxNormInferenceJobError::TooManyRequestsException(inner) => {
765 Error::TooManyRequestsException(inner)
766 }
767 crate::operation::start_rx_norm_inference_job::StartRxNormInferenceJobError::Unhandled(inner) => Error::Unhandled(inner),
768 }
769 }
770}
771impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::start_snomedct_inference_job::StartSNOMEDCTInferenceJobError, R>>
772 for Error
773where
774 R: Send + Sync + std::fmt::Debug + 'static,
775{
776 fn from(
777 err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::start_snomedct_inference_job::StartSNOMEDCTInferenceJobError, R>,
778 ) -> Self {
779 match err {
780 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
781 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
782 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
783 source: err.into(),
784 }),
785 }
786 }
787}
788impl From<crate::operation::start_snomedct_inference_job::StartSNOMEDCTInferenceJobError> for Error {
789 fn from(err: crate::operation::start_snomedct_inference_job::StartSNOMEDCTInferenceJobError) -> Self {
790 match err {
791 crate::operation::start_snomedct_inference_job::StartSNOMEDCTInferenceJobError::InternalServerException(inner) => {
792 Error::InternalServerException(inner)
793 }
794 crate::operation::start_snomedct_inference_job::StartSNOMEDCTInferenceJobError::InvalidRequestException(inner) => {
795 Error::InvalidRequestException(inner)
796 }
797 crate::operation::start_snomedct_inference_job::StartSNOMEDCTInferenceJobError::ResourceNotFoundException(inner) => {
798 Error::ResourceNotFoundException(inner)
799 }
800 crate::operation::start_snomedct_inference_job::StartSNOMEDCTInferenceJobError::TooManyRequestsException(inner) => {
801 Error::TooManyRequestsException(inner)
802 }
803 crate::operation::start_snomedct_inference_job::StartSNOMEDCTInferenceJobError::Unhandled(inner) => Error::Unhandled(inner),
804 }
805 }
806}
807impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::stop_entities_detection_v2_job::StopEntitiesDetectionV2JobError, R>>
808 for Error
809where
810 R: Send + Sync + std::fmt::Debug + 'static,
811{
812 fn from(
813 err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::stop_entities_detection_v2_job::StopEntitiesDetectionV2JobError, R>,
814 ) -> Self {
815 match err {
816 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
817 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
818 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
819 source: err.into(),
820 }),
821 }
822 }
823}
824impl From<crate::operation::stop_entities_detection_v2_job::StopEntitiesDetectionV2JobError> for Error {
825 fn from(err: crate::operation::stop_entities_detection_v2_job::StopEntitiesDetectionV2JobError) -> Self {
826 match err {
827 crate::operation::stop_entities_detection_v2_job::StopEntitiesDetectionV2JobError::InternalServerException(inner) => {
828 Error::InternalServerException(inner)
829 }
830 crate::operation::stop_entities_detection_v2_job::StopEntitiesDetectionV2JobError::InvalidRequestException(inner) => {
831 Error::InvalidRequestException(inner)
832 }
833 crate::operation::stop_entities_detection_v2_job::StopEntitiesDetectionV2JobError::ResourceNotFoundException(inner) => {
834 Error::ResourceNotFoundException(inner)
835 }
836 crate::operation::stop_entities_detection_v2_job::StopEntitiesDetectionV2JobError::Unhandled(inner) => Error::Unhandled(inner),
837 }
838 }
839}
840impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::stop_icd10_cm_inference_job::StopICD10CMInferenceJobError, R>>
841 for Error
842where
843 R: Send + Sync + std::fmt::Debug + 'static,
844{
845 fn from(
846 err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::stop_icd10_cm_inference_job::StopICD10CMInferenceJobError, R>,
847 ) -> Self {
848 match err {
849 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
850 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
851 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
852 source: err.into(),
853 }),
854 }
855 }
856}
857impl From<crate::operation::stop_icd10_cm_inference_job::StopICD10CMInferenceJobError> for Error {
858 fn from(err: crate::operation::stop_icd10_cm_inference_job::StopICD10CMInferenceJobError) -> Self {
859 match err {
860 crate::operation::stop_icd10_cm_inference_job::StopICD10CMInferenceJobError::InternalServerException(inner) => {
861 Error::InternalServerException(inner)
862 }
863 crate::operation::stop_icd10_cm_inference_job::StopICD10CMInferenceJobError::InvalidRequestException(inner) => {
864 Error::InvalidRequestException(inner)
865 }
866 crate::operation::stop_icd10_cm_inference_job::StopICD10CMInferenceJobError::ResourceNotFoundException(inner) => {
867 Error::ResourceNotFoundException(inner)
868 }
869 crate::operation::stop_icd10_cm_inference_job::StopICD10CMInferenceJobError::Unhandled(inner) => Error::Unhandled(inner),
870 }
871 }
872}
873impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::stop_phi_detection_job::StopPHIDetectionJobError, R>> for Error
874where
875 R: Send + Sync + std::fmt::Debug + 'static,
876{
877 fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::stop_phi_detection_job::StopPHIDetectionJobError, R>) -> Self {
878 match err {
879 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
880 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
881 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
882 source: err.into(),
883 }),
884 }
885 }
886}
887impl From<crate::operation::stop_phi_detection_job::StopPHIDetectionJobError> for Error {
888 fn from(err: crate::operation::stop_phi_detection_job::StopPHIDetectionJobError) -> Self {
889 match err {
890 crate::operation::stop_phi_detection_job::StopPHIDetectionJobError::InternalServerException(inner) => {
891 Error::InternalServerException(inner)
892 }
893 crate::operation::stop_phi_detection_job::StopPHIDetectionJobError::InvalidRequestException(inner) => {
894 Error::InvalidRequestException(inner)
895 }
896 crate::operation::stop_phi_detection_job::StopPHIDetectionJobError::ResourceNotFoundException(inner) => {
897 Error::ResourceNotFoundException(inner)
898 }
899 crate::operation::stop_phi_detection_job::StopPHIDetectionJobError::Unhandled(inner) => Error::Unhandled(inner),
900 }
901 }
902}
903impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::stop_rx_norm_inference_job::StopRxNormInferenceJobError, R>>
904 for Error
905where
906 R: Send + Sync + std::fmt::Debug + 'static,
907{
908 fn from(
909 err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::stop_rx_norm_inference_job::StopRxNormInferenceJobError, R>,
910 ) -> Self {
911 match err {
912 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
913 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
914 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
915 source: err.into(),
916 }),
917 }
918 }
919}
920impl From<crate::operation::stop_rx_norm_inference_job::StopRxNormInferenceJobError> for Error {
921 fn from(err: crate::operation::stop_rx_norm_inference_job::StopRxNormInferenceJobError) -> Self {
922 match err {
923 crate::operation::stop_rx_norm_inference_job::StopRxNormInferenceJobError::InternalServerException(inner) => {
924 Error::InternalServerException(inner)
925 }
926 crate::operation::stop_rx_norm_inference_job::StopRxNormInferenceJobError::InvalidRequestException(inner) => {
927 Error::InvalidRequestException(inner)
928 }
929 crate::operation::stop_rx_norm_inference_job::StopRxNormInferenceJobError::ResourceNotFoundException(inner) => {
930 Error::ResourceNotFoundException(inner)
931 }
932 crate::operation::stop_rx_norm_inference_job::StopRxNormInferenceJobError::Unhandled(inner) => Error::Unhandled(inner),
933 }
934 }
935}
936impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::stop_snomedct_inference_job::StopSNOMEDCTInferenceJobError, R>>
937 for Error
938where
939 R: Send + Sync + std::fmt::Debug + 'static,
940{
941 fn from(
942 err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::stop_snomedct_inference_job::StopSNOMEDCTInferenceJobError, R>,
943 ) -> Self {
944 match err {
945 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
946 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
947 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
948 source: err.into(),
949 }),
950 }
951 }
952}
953impl From<crate::operation::stop_snomedct_inference_job::StopSNOMEDCTInferenceJobError> for Error {
954 fn from(err: crate::operation::stop_snomedct_inference_job::StopSNOMEDCTInferenceJobError) -> Self {
955 match err {
956 crate::operation::stop_snomedct_inference_job::StopSNOMEDCTInferenceJobError::InternalServerException(inner) => {
957 Error::InternalServerException(inner)
958 }
959 crate::operation::stop_snomedct_inference_job::StopSNOMEDCTInferenceJobError::InvalidRequestException(inner) => {
960 Error::InvalidRequestException(inner)
961 }
962 crate::operation::stop_snomedct_inference_job::StopSNOMEDCTInferenceJobError::ResourceNotFoundException(inner) => {
963 Error::ResourceNotFoundException(inner)
964 }
965 crate::operation::stop_snomedct_inference_job::StopSNOMEDCTInferenceJobError::TooManyRequestsException(inner) => {
966 Error::TooManyRequestsException(inner)
967 }
968 crate::operation::stop_snomedct_inference_job::StopSNOMEDCTInferenceJobError::Unhandled(inner) => Error::Unhandled(inner),
969 }
970 }
971}
972impl ::std::error::Error for Error {
973 fn source(&self) -> std::option::Option<&(dyn ::std::error::Error + 'static)> {
974 match self {
975 Error::InternalServerException(inner) => inner.source(),
976 Error::InvalidEncodingException(inner) => inner.source(),
977 Error::InvalidRequestException(inner) => inner.source(),
978 Error::ResourceNotFoundException(inner) => inner.source(),
979 Error::ServiceUnavailableException(inner) => inner.source(),
980 Error::TextSizeLimitExceededException(inner) => inner.source(),
981 Error::TooManyRequestsException(inner) => inner.source(),
982 Error::ValidationException(inner) => inner.source(),
983 Error::Unhandled(inner) => ::std::option::Option::Some(&*inner.source),
984 }
985 }
986}
987impl ::aws_types::request_id::RequestId for Error {
988 fn request_id(&self) -> Option<&str> {
989 match self {
990 Self::InternalServerException(e) => e.request_id(),
991 Self::InvalidEncodingException(e) => e.request_id(),
992 Self::InvalidRequestException(e) => e.request_id(),
993 Self::ResourceNotFoundException(e) => e.request_id(),
994 Self::ServiceUnavailableException(e) => e.request_id(),
995 Self::TextSizeLimitExceededException(e) => e.request_id(),
996 Self::TooManyRequestsException(e) => e.request_id(),
997 Self::ValidationException(e) => e.request_id(),
998 Self::Unhandled(e) => e.meta.request_id(),
999 }
1000 }
1001}