1#[non_exhaustive]
4#[derive(::std::fmt::Debug)]
5pub enum Error {
6 AccessDeniedException(crate::types::error::AccessDeniedException),
8 ConflictException(crate::types::error::ConflictException),
10 InternalServerException(crate::types::error::InternalServerException),
12 ResourceNotFoundException(crate::types::error::ResourceNotFoundException),
14 ServiceQuotaExceededException(crate::types::error::ServiceQuotaExceededException),
16 ServiceUnavailableException(crate::types::error::ServiceUnavailableException),
18 ThrottlingException(crate::types::error::ThrottlingException),
20 TooManyTagsException(crate::types::error::TooManyTagsException),
22 ValidationException(crate::types::error::ValidationException),
24 #[deprecated(note = "Matching `Unhandled` directly is not forwards compatible. Instead, match using a \
26 variable wildcard pattern and check `.code()`:
27 \
28 `err if err.code() == Some(\"SpecificExceptionCode\") => { /* handle the error */ }`
29 \
30 See [`ProvideErrorMetadata`](#impl-ProvideErrorMetadata-for-Error) for what information is available for the error.")]
31 Unhandled(crate::error::sealed_unhandled::Unhandled),
32}
33impl ::std::fmt::Display for Error {
34 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
35 match self {
36 Error::AccessDeniedException(inner) => inner.fmt(f),
37 Error::ConflictException(inner) => inner.fmt(f),
38 Error::InternalServerException(inner) => inner.fmt(f),
39 Error::ResourceNotFoundException(inner) => inner.fmt(f),
40 Error::ServiceQuotaExceededException(inner) => inner.fmt(f),
41 Error::ServiceUnavailableException(inner) => inner.fmt(f),
42 Error::ThrottlingException(inner) => inner.fmt(f),
43 Error::TooManyTagsException(inner) => inner.fmt(f),
44 Error::ValidationException(inner) => inner.fmt(f),
45 Error::Unhandled(_) => {
46 if let ::std::option::Option::Some(code) = ::aws_smithy_types::error::metadata::ProvideErrorMetadata::code(self) {
47 write!(f, "unhandled error ({code})")
48 } else {
49 f.write_str("unhandled error")
50 }
51 }
52 }
53 }
54}
55impl From<::aws_smithy_types::error::operation::BuildError> for Error {
56 fn from(value: ::aws_smithy_types::error::operation::BuildError) -> Self {
57 Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
58 source: value.into(),
59 meta: ::std::default::Default::default(),
60 })
61 }
62}
63impl ::aws_smithy_types::error::metadata::ProvideErrorMetadata for Error {
64 fn meta(&self) -> &::aws_smithy_types::error::metadata::ErrorMetadata {
65 match self {
66 Self::AccessDeniedException(inner) => inner.meta(),
67 Self::ConflictException(inner) => inner.meta(),
68 Self::InternalServerException(inner) => inner.meta(),
69 Self::ResourceNotFoundException(inner) => inner.meta(),
70 Self::ServiceQuotaExceededException(inner) => inner.meta(),
71 Self::ServiceUnavailableException(inner) => inner.meta(),
72 Self::ThrottlingException(inner) => inner.meta(),
73 Self::TooManyTagsException(inner) => inner.meta(),
74 Self::ValidationException(inner) => inner.meta(),
75 Self::Unhandled(inner) => &inner.meta,
76 }
77 }
78}
79impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::batch_delete_evaluation_job::BatchDeleteEvaluationJobError, R>>
80 for Error
81where
82 R: Send + Sync + std::fmt::Debug + 'static,
83{
84 fn from(
85 err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::batch_delete_evaluation_job::BatchDeleteEvaluationJobError, R>,
86 ) -> Self {
87 match err {
88 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
89 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
90 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
91 source: err.into(),
92 }),
93 }
94 }
95}
96impl From<crate::operation::batch_delete_evaluation_job::BatchDeleteEvaluationJobError> for Error {
97 fn from(err: crate::operation::batch_delete_evaluation_job::BatchDeleteEvaluationJobError) -> Self {
98 match err {
99 crate::operation::batch_delete_evaluation_job::BatchDeleteEvaluationJobError::AccessDeniedException(inner) => {
100 Error::AccessDeniedException(inner)
101 }
102 crate::operation::batch_delete_evaluation_job::BatchDeleteEvaluationJobError::ConflictException(inner) => Error::ConflictException(inner),
103 crate::operation::batch_delete_evaluation_job::BatchDeleteEvaluationJobError::InternalServerException(inner) => {
104 Error::InternalServerException(inner)
105 }
106 crate::operation::batch_delete_evaluation_job::BatchDeleteEvaluationJobError::ResourceNotFoundException(inner) => {
107 Error::ResourceNotFoundException(inner)
108 }
109 crate::operation::batch_delete_evaluation_job::BatchDeleteEvaluationJobError::ThrottlingException(inner) => {
110 Error::ThrottlingException(inner)
111 }
112 crate::operation::batch_delete_evaluation_job::BatchDeleteEvaluationJobError::ValidationException(inner) => {
113 Error::ValidationException(inner)
114 }
115 crate::operation::batch_delete_evaluation_job::BatchDeleteEvaluationJobError::Unhandled(inner) => Error::Unhandled(inner),
116 }
117 }
118}
119impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::create_evaluation_job::CreateEvaluationJobError, R>> for Error
120where
121 R: Send + Sync + std::fmt::Debug + 'static,
122{
123 fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::create_evaluation_job::CreateEvaluationJobError, R>) -> Self {
124 match err {
125 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
126 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
127 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
128 source: err.into(),
129 }),
130 }
131 }
132}
133impl From<crate::operation::create_evaluation_job::CreateEvaluationJobError> for Error {
134 fn from(err: crate::operation::create_evaluation_job::CreateEvaluationJobError) -> Self {
135 match err {
136 crate::operation::create_evaluation_job::CreateEvaluationJobError::AccessDeniedException(inner) => Error::AccessDeniedException(inner),
137 crate::operation::create_evaluation_job::CreateEvaluationJobError::ConflictException(inner) => Error::ConflictException(inner),
138 crate::operation::create_evaluation_job::CreateEvaluationJobError::InternalServerException(inner) => {
139 Error::InternalServerException(inner)
140 }
141 crate::operation::create_evaluation_job::CreateEvaluationJobError::ResourceNotFoundException(inner) => {
142 Error::ResourceNotFoundException(inner)
143 }
144 crate::operation::create_evaluation_job::CreateEvaluationJobError::ServiceQuotaExceededException(inner) => {
145 Error::ServiceQuotaExceededException(inner)
146 }
147 crate::operation::create_evaluation_job::CreateEvaluationJobError::ThrottlingException(inner) => Error::ThrottlingException(inner),
148 crate::operation::create_evaluation_job::CreateEvaluationJobError::ValidationException(inner) => Error::ValidationException(inner),
149 crate::operation::create_evaluation_job::CreateEvaluationJobError::Unhandled(inner) => Error::Unhandled(inner),
150 }
151 }
152}
153impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::create_guardrail::CreateGuardrailError, R>> for Error
154where
155 R: Send + Sync + std::fmt::Debug + 'static,
156{
157 fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::create_guardrail::CreateGuardrailError, R>) -> Self {
158 match err {
159 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
160 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
161 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
162 source: err.into(),
163 }),
164 }
165 }
166}
167impl From<crate::operation::create_guardrail::CreateGuardrailError> for Error {
168 fn from(err: crate::operation::create_guardrail::CreateGuardrailError) -> Self {
169 match err {
170 crate::operation::create_guardrail::CreateGuardrailError::AccessDeniedException(inner) => Error::AccessDeniedException(inner),
171 crate::operation::create_guardrail::CreateGuardrailError::ConflictException(inner) => Error::ConflictException(inner),
172 crate::operation::create_guardrail::CreateGuardrailError::InternalServerException(inner) => Error::InternalServerException(inner),
173 crate::operation::create_guardrail::CreateGuardrailError::ResourceNotFoundException(inner) => Error::ResourceNotFoundException(inner),
174 crate::operation::create_guardrail::CreateGuardrailError::ServiceQuotaExceededException(inner) => {
175 Error::ServiceQuotaExceededException(inner)
176 }
177 crate::operation::create_guardrail::CreateGuardrailError::ThrottlingException(inner) => Error::ThrottlingException(inner),
178 crate::operation::create_guardrail::CreateGuardrailError::TooManyTagsException(inner) => Error::TooManyTagsException(inner),
179 crate::operation::create_guardrail::CreateGuardrailError::ValidationException(inner) => Error::ValidationException(inner),
180 crate::operation::create_guardrail::CreateGuardrailError::Unhandled(inner) => Error::Unhandled(inner),
181 }
182 }
183}
184impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::create_guardrail_version::CreateGuardrailVersionError, R>> for Error
185where
186 R: Send + Sync + std::fmt::Debug + 'static,
187{
188 fn from(
189 err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::create_guardrail_version::CreateGuardrailVersionError, R>,
190 ) -> Self {
191 match err {
192 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
193 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
194 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
195 source: err.into(),
196 }),
197 }
198 }
199}
200impl From<crate::operation::create_guardrail_version::CreateGuardrailVersionError> for Error {
201 fn from(err: crate::operation::create_guardrail_version::CreateGuardrailVersionError) -> Self {
202 match err {
203 crate::operation::create_guardrail_version::CreateGuardrailVersionError::AccessDeniedException(inner) => {
204 Error::AccessDeniedException(inner)
205 }
206 crate::operation::create_guardrail_version::CreateGuardrailVersionError::ConflictException(inner) => Error::ConflictException(inner),
207 crate::operation::create_guardrail_version::CreateGuardrailVersionError::InternalServerException(inner) => {
208 Error::InternalServerException(inner)
209 }
210 crate::operation::create_guardrail_version::CreateGuardrailVersionError::ResourceNotFoundException(inner) => {
211 Error::ResourceNotFoundException(inner)
212 }
213 crate::operation::create_guardrail_version::CreateGuardrailVersionError::ServiceQuotaExceededException(inner) => {
214 Error::ServiceQuotaExceededException(inner)
215 }
216 crate::operation::create_guardrail_version::CreateGuardrailVersionError::ThrottlingException(inner) => Error::ThrottlingException(inner),
217 crate::operation::create_guardrail_version::CreateGuardrailVersionError::ValidationException(inner) => Error::ValidationException(inner),
218 crate::operation::create_guardrail_version::CreateGuardrailVersionError::Unhandled(inner) => Error::Unhandled(inner),
219 }
220 }
221}
222impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::create_inference_profile::CreateInferenceProfileError, R>> for Error
223where
224 R: Send + Sync + std::fmt::Debug + 'static,
225{
226 fn from(
227 err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::create_inference_profile::CreateInferenceProfileError, R>,
228 ) -> Self {
229 match err {
230 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
231 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
232 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
233 source: err.into(),
234 }),
235 }
236 }
237}
238impl From<crate::operation::create_inference_profile::CreateInferenceProfileError> for Error {
239 fn from(err: crate::operation::create_inference_profile::CreateInferenceProfileError) -> Self {
240 match err {
241 crate::operation::create_inference_profile::CreateInferenceProfileError::AccessDeniedException(inner) => {
242 Error::AccessDeniedException(inner)
243 }
244 crate::operation::create_inference_profile::CreateInferenceProfileError::ConflictException(inner) => Error::ConflictException(inner),
245 crate::operation::create_inference_profile::CreateInferenceProfileError::InternalServerException(inner) => {
246 Error::InternalServerException(inner)
247 }
248 crate::operation::create_inference_profile::CreateInferenceProfileError::ResourceNotFoundException(inner) => {
249 Error::ResourceNotFoundException(inner)
250 }
251 crate::operation::create_inference_profile::CreateInferenceProfileError::ServiceQuotaExceededException(inner) => {
252 Error::ServiceQuotaExceededException(inner)
253 }
254 crate::operation::create_inference_profile::CreateInferenceProfileError::ThrottlingException(inner) => Error::ThrottlingException(inner),
255 crate::operation::create_inference_profile::CreateInferenceProfileError::TooManyTagsException(inner) => {
256 Error::TooManyTagsException(inner)
257 }
258 crate::operation::create_inference_profile::CreateInferenceProfileError::ValidationException(inner) => Error::ValidationException(inner),
259 crate::operation::create_inference_profile::CreateInferenceProfileError::Unhandled(inner) => Error::Unhandled(inner),
260 }
261 }
262}
263impl<R>
264 From<
265 ::aws_smithy_runtime_api::client::result::SdkError<
266 crate::operation::create_marketplace_model_endpoint::CreateMarketplaceModelEndpointError,
267 R,
268 >,
269 > for Error
270where
271 R: Send + Sync + std::fmt::Debug + 'static,
272{
273 fn from(
274 err: ::aws_smithy_runtime_api::client::result::SdkError<
275 crate::operation::create_marketplace_model_endpoint::CreateMarketplaceModelEndpointError,
276 R,
277 >,
278 ) -> Self {
279 match err {
280 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
281 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
282 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
283 source: err.into(),
284 }),
285 }
286 }
287}
288impl From<crate::operation::create_marketplace_model_endpoint::CreateMarketplaceModelEndpointError> for Error {
289 fn from(err: crate::operation::create_marketplace_model_endpoint::CreateMarketplaceModelEndpointError) -> Self {
290 match err {
291 crate::operation::create_marketplace_model_endpoint::CreateMarketplaceModelEndpointError::AccessDeniedException(inner) => {
292 Error::AccessDeniedException(inner)
293 }
294 crate::operation::create_marketplace_model_endpoint::CreateMarketplaceModelEndpointError::ConflictException(inner) => {
295 Error::ConflictException(inner)
296 }
297 crate::operation::create_marketplace_model_endpoint::CreateMarketplaceModelEndpointError::InternalServerException(inner) => {
298 Error::InternalServerException(inner)
299 }
300 crate::operation::create_marketplace_model_endpoint::CreateMarketplaceModelEndpointError::ResourceNotFoundException(inner) => {
301 Error::ResourceNotFoundException(inner)
302 }
303 crate::operation::create_marketplace_model_endpoint::CreateMarketplaceModelEndpointError::ServiceQuotaExceededException(inner) => {
304 Error::ServiceQuotaExceededException(inner)
305 }
306 crate::operation::create_marketplace_model_endpoint::CreateMarketplaceModelEndpointError::ThrottlingException(inner) => {
307 Error::ThrottlingException(inner)
308 }
309 crate::operation::create_marketplace_model_endpoint::CreateMarketplaceModelEndpointError::ValidationException(inner) => {
310 Error::ValidationException(inner)
311 }
312 crate::operation::create_marketplace_model_endpoint::CreateMarketplaceModelEndpointError::Unhandled(inner) => Error::Unhandled(inner),
313 }
314 }
315}
316impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::create_model_copy_job::CreateModelCopyJobError, R>> for Error
317where
318 R: Send + Sync + std::fmt::Debug + 'static,
319{
320 fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::create_model_copy_job::CreateModelCopyJobError, R>) -> Self {
321 match err {
322 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
323 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
324 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
325 source: err.into(),
326 }),
327 }
328 }
329}
330impl From<crate::operation::create_model_copy_job::CreateModelCopyJobError> for Error {
331 fn from(err: crate::operation::create_model_copy_job::CreateModelCopyJobError) -> Self {
332 match err {
333 crate::operation::create_model_copy_job::CreateModelCopyJobError::AccessDeniedException(inner) => Error::AccessDeniedException(inner),
334 crate::operation::create_model_copy_job::CreateModelCopyJobError::InternalServerException(inner) => Error::InternalServerException(inner),
335 crate::operation::create_model_copy_job::CreateModelCopyJobError::ResourceNotFoundException(inner) => {
336 Error::ResourceNotFoundException(inner)
337 }
338 crate::operation::create_model_copy_job::CreateModelCopyJobError::TooManyTagsException(inner) => Error::TooManyTagsException(inner),
339 crate::operation::create_model_copy_job::CreateModelCopyJobError::Unhandled(inner) => Error::Unhandled(inner),
340 }
341 }
342}
343impl<R>
344 From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::create_model_customization_job::CreateModelCustomizationJobError, R>>
345 for Error
346where
347 R: Send + Sync + std::fmt::Debug + 'static,
348{
349 fn from(
350 err: ::aws_smithy_runtime_api::client::result::SdkError<
351 crate::operation::create_model_customization_job::CreateModelCustomizationJobError,
352 R,
353 >,
354 ) -> Self {
355 match err {
356 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
357 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
358 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
359 source: err.into(),
360 }),
361 }
362 }
363}
364impl From<crate::operation::create_model_customization_job::CreateModelCustomizationJobError> for Error {
365 fn from(err: crate::operation::create_model_customization_job::CreateModelCustomizationJobError) -> Self {
366 match err {
367 crate::operation::create_model_customization_job::CreateModelCustomizationJobError::AccessDeniedException(inner) => {
368 Error::AccessDeniedException(inner)
369 }
370 crate::operation::create_model_customization_job::CreateModelCustomizationJobError::ConflictException(inner) => {
371 Error::ConflictException(inner)
372 }
373 crate::operation::create_model_customization_job::CreateModelCustomizationJobError::InternalServerException(inner) => {
374 Error::InternalServerException(inner)
375 }
376 crate::operation::create_model_customization_job::CreateModelCustomizationJobError::ResourceNotFoundException(inner) => {
377 Error::ResourceNotFoundException(inner)
378 }
379 crate::operation::create_model_customization_job::CreateModelCustomizationJobError::ServiceQuotaExceededException(inner) => {
380 Error::ServiceQuotaExceededException(inner)
381 }
382 crate::operation::create_model_customization_job::CreateModelCustomizationJobError::ThrottlingException(inner) => {
383 Error::ThrottlingException(inner)
384 }
385 crate::operation::create_model_customization_job::CreateModelCustomizationJobError::TooManyTagsException(inner) => {
386 Error::TooManyTagsException(inner)
387 }
388 crate::operation::create_model_customization_job::CreateModelCustomizationJobError::ValidationException(inner) => {
389 Error::ValidationException(inner)
390 }
391 crate::operation::create_model_customization_job::CreateModelCustomizationJobError::Unhandled(inner) => Error::Unhandled(inner),
392 }
393 }
394}
395impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::create_model_import_job::CreateModelImportJobError, R>> for Error
396where
397 R: Send + Sync + std::fmt::Debug + 'static,
398{
399 fn from(
400 err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::create_model_import_job::CreateModelImportJobError, R>,
401 ) -> Self {
402 match err {
403 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
404 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
405 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
406 source: err.into(),
407 }),
408 }
409 }
410}
411impl From<crate::operation::create_model_import_job::CreateModelImportJobError> for Error {
412 fn from(err: crate::operation::create_model_import_job::CreateModelImportJobError) -> Self {
413 match err {
414 crate::operation::create_model_import_job::CreateModelImportJobError::AccessDeniedException(inner) => Error::AccessDeniedException(inner),
415 crate::operation::create_model_import_job::CreateModelImportJobError::ConflictException(inner) => Error::ConflictException(inner),
416 crate::operation::create_model_import_job::CreateModelImportJobError::InternalServerException(inner) => {
417 Error::InternalServerException(inner)
418 }
419 crate::operation::create_model_import_job::CreateModelImportJobError::ResourceNotFoundException(inner) => {
420 Error::ResourceNotFoundException(inner)
421 }
422 crate::operation::create_model_import_job::CreateModelImportJobError::ServiceQuotaExceededException(inner) => {
423 Error::ServiceQuotaExceededException(inner)
424 }
425 crate::operation::create_model_import_job::CreateModelImportJobError::ThrottlingException(inner) => Error::ThrottlingException(inner),
426 crate::operation::create_model_import_job::CreateModelImportJobError::TooManyTagsException(inner) => Error::TooManyTagsException(inner),
427 crate::operation::create_model_import_job::CreateModelImportJobError::ValidationException(inner) => Error::ValidationException(inner),
428 crate::operation::create_model_import_job::CreateModelImportJobError::Unhandled(inner) => Error::Unhandled(inner),
429 }
430 }
431}
432impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::create_model_invocation_job::CreateModelInvocationJobError, R>>
433 for Error
434where
435 R: Send + Sync + std::fmt::Debug + 'static,
436{
437 fn from(
438 err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::create_model_invocation_job::CreateModelInvocationJobError, R>,
439 ) -> Self {
440 match err {
441 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
442 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
443 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
444 source: err.into(),
445 }),
446 }
447 }
448}
449impl From<crate::operation::create_model_invocation_job::CreateModelInvocationJobError> for Error {
450 fn from(err: crate::operation::create_model_invocation_job::CreateModelInvocationJobError) -> Self {
451 match err {
452 crate::operation::create_model_invocation_job::CreateModelInvocationJobError::AccessDeniedException(inner) => {
453 Error::AccessDeniedException(inner)
454 }
455 crate::operation::create_model_invocation_job::CreateModelInvocationJobError::ConflictException(inner) => Error::ConflictException(inner),
456 crate::operation::create_model_invocation_job::CreateModelInvocationJobError::InternalServerException(inner) => {
457 Error::InternalServerException(inner)
458 }
459 crate::operation::create_model_invocation_job::CreateModelInvocationJobError::ResourceNotFoundException(inner) => {
460 Error::ResourceNotFoundException(inner)
461 }
462 crate::operation::create_model_invocation_job::CreateModelInvocationJobError::ServiceQuotaExceededException(inner) => {
463 Error::ServiceQuotaExceededException(inner)
464 }
465 crate::operation::create_model_invocation_job::CreateModelInvocationJobError::ThrottlingException(inner) => {
466 Error::ThrottlingException(inner)
467 }
468 crate::operation::create_model_invocation_job::CreateModelInvocationJobError::ValidationException(inner) => {
469 Error::ValidationException(inner)
470 }
471 crate::operation::create_model_invocation_job::CreateModelInvocationJobError::Unhandled(inner) => Error::Unhandled(inner),
472 }
473 }
474}
475impl<R>
476 From<
477 ::aws_smithy_runtime_api::client::result::SdkError<
478 crate::operation::create_provisioned_model_throughput::CreateProvisionedModelThroughputError,
479 R,
480 >,
481 > for Error
482where
483 R: Send + Sync + std::fmt::Debug + 'static,
484{
485 fn from(
486 err: ::aws_smithy_runtime_api::client::result::SdkError<
487 crate::operation::create_provisioned_model_throughput::CreateProvisionedModelThroughputError,
488 R,
489 >,
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::create_provisioned_model_throughput::CreateProvisionedModelThroughputError> for Error {
501 fn from(err: crate::operation::create_provisioned_model_throughput::CreateProvisionedModelThroughputError) -> Self {
502 match err {
503 crate::operation::create_provisioned_model_throughput::CreateProvisionedModelThroughputError::AccessDeniedException(inner) => {
504 Error::AccessDeniedException(inner)
505 }
506 crate::operation::create_provisioned_model_throughput::CreateProvisionedModelThroughputError::InternalServerException(inner) => {
507 Error::InternalServerException(inner)
508 }
509 crate::operation::create_provisioned_model_throughput::CreateProvisionedModelThroughputError::ResourceNotFoundException(inner) => {
510 Error::ResourceNotFoundException(inner)
511 }
512 crate::operation::create_provisioned_model_throughput::CreateProvisionedModelThroughputError::ServiceQuotaExceededException(inner) => {
513 Error::ServiceQuotaExceededException(inner)
514 }
515 crate::operation::create_provisioned_model_throughput::CreateProvisionedModelThroughputError::ThrottlingException(inner) => {
516 Error::ThrottlingException(inner)
517 }
518 crate::operation::create_provisioned_model_throughput::CreateProvisionedModelThroughputError::TooManyTagsException(inner) => {
519 Error::TooManyTagsException(inner)
520 }
521 crate::operation::create_provisioned_model_throughput::CreateProvisionedModelThroughputError::ValidationException(inner) => {
522 Error::ValidationException(inner)
523 }
524 crate::operation::create_provisioned_model_throughput::CreateProvisionedModelThroughputError::Unhandled(inner) => Error::Unhandled(inner),
525 }
526 }
527}
528impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::delete_custom_model::DeleteCustomModelError, R>> for Error
529where
530 R: Send + Sync + std::fmt::Debug + 'static,
531{
532 fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::delete_custom_model::DeleteCustomModelError, R>) -> Self {
533 match err {
534 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
535 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
536 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
537 source: err.into(),
538 }),
539 }
540 }
541}
542impl From<crate::operation::delete_custom_model::DeleteCustomModelError> for Error {
543 fn from(err: crate::operation::delete_custom_model::DeleteCustomModelError) -> Self {
544 match err {
545 crate::operation::delete_custom_model::DeleteCustomModelError::AccessDeniedException(inner) => Error::AccessDeniedException(inner),
546 crate::operation::delete_custom_model::DeleteCustomModelError::ConflictException(inner) => Error::ConflictException(inner),
547 crate::operation::delete_custom_model::DeleteCustomModelError::InternalServerException(inner) => Error::InternalServerException(inner),
548 crate::operation::delete_custom_model::DeleteCustomModelError::ResourceNotFoundException(inner) => {
549 Error::ResourceNotFoundException(inner)
550 }
551 crate::operation::delete_custom_model::DeleteCustomModelError::ThrottlingException(inner) => Error::ThrottlingException(inner),
552 crate::operation::delete_custom_model::DeleteCustomModelError::ValidationException(inner) => Error::ValidationException(inner),
553 crate::operation::delete_custom_model::DeleteCustomModelError::Unhandled(inner) => Error::Unhandled(inner),
554 }
555 }
556}
557impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::delete_guardrail::DeleteGuardrailError, R>> for Error
558where
559 R: Send + Sync + std::fmt::Debug + 'static,
560{
561 fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::delete_guardrail::DeleteGuardrailError, R>) -> Self {
562 match err {
563 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
564 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
565 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
566 source: err.into(),
567 }),
568 }
569 }
570}
571impl From<crate::operation::delete_guardrail::DeleteGuardrailError> for Error {
572 fn from(err: crate::operation::delete_guardrail::DeleteGuardrailError) -> Self {
573 match err {
574 crate::operation::delete_guardrail::DeleteGuardrailError::AccessDeniedException(inner) => Error::AccessDeniedException(inner),
575 crate::operation::delete_guardrail::DeleteGuardrailError::ConflictException(inner) => Error::ConflictException(inner),
576 crate::operation::delete_guardrail::DeleteGuardrailError::InternalServerException(inner) => Error::InternalServerException(inner),
577 crate::operation::delete_guardrail::DeleteGuardrailError::ResourceNotFoundException(inner) => Error::ResourceNotFoundException(inner),
578 crate::operation::delete_guardrail::DeleteGuardrailError::ThrottlingException(inner) => Error::ThrottlingException(inner),
579 crate::operation::delete_guardrail::DeleteGuardrailError::ValidationException(inner) => Error::ValidationException(inner),
580 crate::operation::delete_guardrail::DeleteGuardrailError::Unhandled(inner) => Error::Unhandled(inner),
581 }
582 }
583}
584impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::delete_imported_model::DeleteImportedModelError, R>> for Error
585where
586 R: Send + Sync + std::fmt::Debug + 'static,
587{
588 fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::delete_imported_model::DeleteImportedModelError, R>) -> Self {
589 match err {
590 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
591 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
592 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
593 source: err.into(),
594 }),
595 }
596 }
597}
598impl From<crate::operation::delete_imported_model::DeleteImportedModelError> for Error {
599 fn from(err: crate::operation::delete_imported_model::DeleteImportedModelError) -> Self {
600 match err {
601 crate::operation::delete_imported_model::DeleteImportedModelError::AccessDeniedException(inner) => Error::AccessDeniedException(inner),
602 crate::operation::delete_imported_model::DeleteImportedModelError::ConflictException(inner) => Error::ConflictException(inner),
603 crate::operation::delete_imported_model::DeleteImportedModelError::InternalServerException(inner) => {
604 Error::InternalServerException(inner)
605 }
606 crate::operation::delete_imported_model::DeleteImportedModelError::ResourceNotFoundException(inner) => {
607 Error::ResourceNotFoundException(inner)
608 }
609 crate::operation::delete_imported_model::DeleteImportedModelError::ThrottlingException(inner) => Error::ThrottlingException(inner),
610 crate::operation::delete_imported_model::DeleteImportedModelError::ValidationException(inner) => Error::ValidationException(inner),
611 crate::operation::delete_imported_model::DeleteImportedModelError::Unhandled(inner) => Error::Unhandled(inner),
612 }
613 }
614}
615impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::delete_inference_profile::DeleteInferenceProfileError, R>> for Error
616where
617 R: Send + Sync + std::fmt::Debug + 'static,
618{
619 fn from(
620 err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::delete_inference_profile::DeleteInferenceProfileError, R>,
621 ) -> Self {
622 match err {
623 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
624 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
625 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
626 source: err.into(),
627 }),
628 }
629 }
630}
631impl From<crate::operation::delete_inference_profile::DeleteInferenceProfileError> for Error {
632 fn from(err: crate::operation::delete_inference_profile::DeleteInferenceProfileError) -> Self {
633 match err {
634 crate::operation::delete_inference_profile::DeleteInferenceProfileError::AccessDeniedException(inner) => {
635 Error::AccessDeniedException(inner)
636 }
637 crate::operation::delete_inference_profile::DeleteInferenceProfileError::ConflictException(inner) => Error::ConflictException(inner),
638 crate::operation::delete_inference_profile::DeleteInferenceProfileError::InternalServerException(inner) => {
639 Error::InternalServerException(inner)
640 }
641 crate::operation::delete_inference_profile::DeleteInferenceProfileError::ResourceNotFoundException(inner) => {
642 Error::ResourceNotFoundException(inner)
643 }
644 crate::operation::delete_inference_profile::DeleteInferenceProfileError::ThrottlingException(inner) => Error::ThrottlingException(inner),
645 crate::operation::delete_inference_profile::DeleteInferenceProfileError::ValidationException(inner) => Error::ValidationException(inner),
646 crate::operation::delete_inference_profile::DeleteInferenceProfileError::Unhandled(inner) => Error::Unhandled(inner),
647 }
648 }
649}
650impl<R>
651 From<
652 ::aws_smithy_runtime_api::client::result::SdkError<
653 crate::operation::delete_marketplace_model_endpoint::DeleteMarketplaceModelEndpointError,
654 R,
655 >,
656 > for Error
657where
658 R: Send + Sync + std::fmt::Debug + 'static,
659{
660 fn from(
661 err: ::aws_smithy_runtime_api::client::result::SdkError<
662 crate::operation::delete_marketplace_model_endpoint::DeleteMarketplaceModelEndpointError,
663 R,
664 >,
665 ) -> Self {
666 match err {
667 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
668 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
669 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
670 source: err.into(),
671 }),
672 }
673 }
674}
675impl From<crate::operation::delete_marketplace_model_endpoint::DeleteMarketplaceModelEndpointError> for Error {
676 fn from(err: crate::operation::delete_marketplace_model_endpoint::DeleteMarketplaceModelEndpointError) -> Self {
677 match err {
678 crate::operation::delete_marketplace_model_endpoint::DeleteMarketplaceModelEndpointError::AccessDeniedException(inner) => {
679 Error::AccessDeniedException(inner)
680 }
681 crate::operation::delete_marketplace_model_endpoint::DeleteMarketplaceModelEndpointError::InternalServerException(inner) => {
682 Error::InternalServerException(inner)
683 }
684 crate::operation::delete_marketplace_model_endpoint::DeleteMarketplaceModelEndpointError::ResourceNotFoundException(inner) => {
685 Error::ResourceNotFoundException(inner)
686 }
687 crate::operation::delete_marketplace_model_endpoint::DeleteMarketplaceModelEndpointError::ThrottlingException(inner) => {
688 Error::ThrottlingException(inner)
689 }
690 crate::operation::delete_marketplace_model_endpoint::DeleteMarketplaceModelEndpointError::ValidationException(inner) => {
691 Error::ValidationException(inner)
692 }
693 crate::operation::delete_marketplace_model_endpoint::DeleteMarketplaceModelEndpointError::Unhandled(inner) => Error::Unhandled(inner),
694 }
695 }
696}
697impl<R>
698 From<
699 ::aws_smithy_runtime_api::client::result::SdkError<
700 crate::operation::delete_model_invocation_logging_configuration::DeleteModelInvocationLoggingConfigurationError,
701 R,
702 >,
703 > for Error
704where
705 R: Send + Sync + std::fmt::Debug + 'static,
706{
707 fn from(
708 err: ::aws_smithy_runtime_api::client::result::SdkError<
709 crate::operation::delete_model_invocation_logging_configuration::DeleteModelInvocationLoggingConfigurationError,
710 R,
711 >,
712 ) -> Self {
713 match err {
714 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
715 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
716 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
717 source: err.into(),
718 }),
719 }
720 }
721}
722impl From<crate::operation::delete_model_invocation_logging_configuration::DeleteModelInvocationLoggingConfigurationError> for Error {
723 fn from(err: crate::operation::delete_model_invocation_logging_configuration::DeleteModelInvocationLoggingConfigurationError) -> Self {
724 match err {
725 crate::operation::delete_model_invocation_logging_configuration::DeleteModelInvocationLoggingConfigurationError::AccessDeniedException(inner) => Error::AccessDeniedException(inner),
726 crate::operation::delete_model_invocation_logging_configuration::DeleteModelInvocationLoggingConfigurationError::InternalServerException(inner) => Error::InternalServerException(inner),
727 crate::operation::delete_model_invocation_logging_configuration::DeleteModelInvocationLoggingConfigurationError::ThrottlingException(inner) => Error::ThrottlingException(inner),
728 crate::operation::delete_model_invocation_logging_configuration::DeleteModelInvocationLoggingConfigurationError::Unhandled(inner) => Error::Unhandled(inner),
729 }
730 }
731}
732impl<R>
733 From<
734 ::aws_smithy_runtime_api::client::result::SdkError<
735 crate::operation::delete_provisioned_model_throughput::DeleteProvisionedModelThroughputError,
736 R,
737 >,
738 > for Error
739where
740 R: Send + Sync + std::fmt::Debug + 'static,
741{
742 fn from(
743 err: ::aws_smithy_runtime_api::client::result::SdkError<
744 crate::operation::delete_provisioned_model_throughput::DeleteProvisionedModelThroughputError,
745 R,
746 >,
747 ) -> Self {
748 match err {
749 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
750 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
751 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
752 source: err.into(),
753 }),
754 }
755 }
756}
757impl From<crate::operation::delete_provisioned_model_throughput::DeleteProvisionedModelThroughputError> for Error {
758 fn from(err: crate::operation::delete_provisioned_model_throughput::DeleteProvisionedModelThroughputError) -> Self {
759 match err {
760 crate::operation::delete_provisioned_model_throughput::DeleteProvisionedModelThroughputError::AccessDeniedException(inner) => {
761 Error::AccessDeniedException(inner)
762 }
763 crate::operation::delete_provisioned_model_throughput::DeleteProvisionedModelThroughputError::ConflictException(inner) => {
764 Error::ConflictException(inner)
765 }
766 crate::operation::delete_provisioned_model_throughput::DeleteProvisionedModelThroughputError::InternalServerException(inner) => {
767 Error::InternalServerException(inner)
768 }
769 crate::operation::delete_provisioned_model_throughput::DeleteProvisionedModelThroughputError::ResourceNotFoundException(inner) => {
770 Error::ResourceNotFoundException(inner)
771 }
772 crate::operation::delete_provisioned_model_throughput::DeleteProvisionedModelThroughputError::ThrottlingException(inner) => {
773 Error::ThrottlingException(inner)
774 }
775 crate::operation::delete_provisioned_model_throughput::DeleteProvisionedModelThroughputError::ValidationException(inner) => {
776 Error::ValidationException(inner)
777 }
778 crate::operation::delete_provisioned_model_throughput::DeleteProvisionedModelThroughputError::Unhandled(inner) => Error::Unhandled(inner),
779 }
780 }
781}
782impl<R>
783 From<
784 ::aws_smithy_runtime_api::client::result::SdkError<
785 crate::operation::deregister_marketplace_model_endpoint::DeregisterMarketplaceModelEndpointError,
786 R,
787 >,
788 > for Error
789where
790 R: Send + Sync + std::fmt::Debug + 'static,
791{
792 fn from(
793 err: ::aws_smithy_runtime_api::client::result::SdkError<
794 crate::operation::deregister_marketplace_model_endpoint::DeregisterMarketplaceModelEndpointError,
795 R,
796 >,
797 ) -> Self {
798 match err {
799 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
800 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
801 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
802 source: err.into(),
803 }),
804 }
805 }
806}
807impl From<crate::operation::deregister_marketplace_model_endpoint::DeregisterMarketplaceModelEndpointError> for Error {
808 fn from(err: crate::operation::deregister_marketplace_model_endpoint::DeregisterMarketplaceModelEndpointError) -> Self {
809 match err {
810 crate::operation::deregister_marketplace_model_endpoint::DeregisterMarketplaceModelEndpointError::AccessDeniedException(inner) => {
811 Error::AccessDeniedException(inner)
812 }
813 crate::operation::deregister_marketplace_model_endpoint::DeregisterMarketplaceModelEndpointError::InternalServerException(inner) => {
814 Error::InternalServerException(inner)
815 }
816 crate::operation::deregister_marketplace_model_endpoint::DeregisterMarketplaceModelEndpointError::ResourceNotFoundException(inner) => {
817 Error::ResourceNotFoundException(inner)
818 }
819 crate::operation::deregister_marketplace_model_endpoint::DeregisterMarketplaceModelEndpointError::ServiceUnavailableException(inner) => {
820 Error::ServiceUnavailableException(inner)
821 }
822 crate::operation::deregister_marketplace_model_endpoint::DeregisterMarketplaceModelEndpointError::ThrottlingException(inner) => {
823 Error::ThrottlingException(inner)
824 }
825 crate::operation::deregister_marketplace_model_endpoint::DeregisterMarketplaceModelEndpointError::ValidationException(inner) => {
826 Error::ValidationException(inner)
827 }
828 crate::operation::deregister_marketplace_model_endpoint::DeregisterMarketplaceModelEndpointError::Unhandled(inner) => {
829 Error::Unhandled(inner)
830 }
831 }
832 }
833}
834impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::get_custom_model::GetCustomModelError, R>> for Error
835where
836 R: Send + Sync + std::fmt::Debug + 'static,
837{
838 fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::get_custom_model::GetCustomModelError, R>) -> Self {
839 match err {
840 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
841 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
842 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
843 source: err.into(),
844 }),
845 }
846 }
847}
848impl From<crate::operation::get_custom_model::GetCustomModelError> for Error {
849 fn from(err: crate::operation::get_custom_model::GetCustomModelError) -> Self {
850 match err {
851 crate::operation::get_custom_model::GetCustomModelError::AccessDeniedException(inner) => Error::AccessDeniedException(inner),
852 crate::operation::get_custom_model::GetCustomModelError::InternalServerException(inner) => Error::InternalServerException(inner),
853 crate::operation::get_custom_model::GetCustomModelError::ResourceNotFoundException(inner) => Error::ResourceNotFoundException(inner),
854 crate::operation::get_custom_model::GetCustomModelError::ThrottlingException(inner) => Error::ThrottlingException(inner),
855 crate::operation::get_custom_model::GetCustomModelError::ValidationException(inner) => Error::ValidationException(inner),
856 crate::operation::get_custom_model::GetCustomModelError::Unhandled(inner) => Error::Unhandled(inner),
857 }
858 }
859}
860impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::get_evaluation_job::GetEvaluationJobError, R>> for Error
861where
862 R: Send + Sync + std::fmt::Debug + 'static,
863{
864 fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::get_evaluation_job::GetEvaluationJobError, R>) -> Self {
865 match err {
866 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
867 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
868 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
869 source: err.into(),
870 }),
871 }
872 }
873}
874impl From<crate::operation::get_evaluation_job::GetEvaluationJobError> for Error {
875 fn from(err: crate::operation::get_evaluation_job::GetEvaluationJobError) -> Self {
876 match err {
877 crate::operation::get_evaluation_job::GetEvaluationJobError::AccessDeniedException(inner) => Error::AccessDeniedException(inner),
878 crate::operation::get_evaluation_job::GetEvaluationJobError::InternalServerException(inner) => Error::InternalServerException(inner),
879 crate::operation::get_evaluation_job::GetEvaluationJobError::ResourceNotFoundException(inner) => Error::ResourceNotFoundException(inner),
880 crate::operation::get_evaluation_job::GetEvaluationJobError::ThrottlingException(inner) => Error::ThrottlingException(inner),
881 crate::operation::get_evaluation_job::GetEvaluationJobError::ValidationException(inner) => Error::ValidationException(inner),
882 crate::operation::get_evaluation_job::GetEvaluationJobError::Unhandled(inner) => Error::Unhandled(inner),
883 }
884 }
885}
886impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::get_foundation_model::GetFoundationModelError, R>> for Error
887where
888 R: Send + Sync + std::fmt::Debug + 'static,
889{
890 fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::get_foundation_model::GetFoundationModelError, R>) -> Self {
891 match err {
892 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
893 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
894 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
895 source: err.into(),
896 }),
897 }
898 }
899}
900impl From<crate::operation::get_foundation_model::GetFoundationModelError> for Error {
901 fn from(err: crate::operation::get_foundation_model::GetFoundationModelError) -> Self {
902 match err {
903 crate::operation::get_foundation_model::GetFoundationModelError::AccessDeniedException(inner) => Error::AccessDeniedException(inner),
904 crate::operation::get_foundation_model::GetFoundationModelError::InternalServerException(inner) => Error::InternalServerException(inner),
905 crate::operation::get_foundation_model::GetFoundationModelError::ResourceNotFoundException(inner) => {
906 Error::ResourceNotFoundException(inner)
907 }
908 crate::operation::get_foundation_model::GetFoundationModelError::ThrottlingException(inner) => Error::ThrottlingException(inner),
909 crate::operation::get_foundation_model::GetFoundationModelError::ValidationException(inner) => Error::ValidationException(inner),
910 crate::operation::get_foundation_model::GetFoundationModelError::Unhandled(inner) => Error::Unhandled(inner),
911 }
912 }
913}
914impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::get_guardrail::GetGuardrailError, R>> for Error
915where
916 R: Send + Sync + std::fmt::Debug + 'static,
917{
918 fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::get_guardrail::GetGuardrailError, R>) -> Self {
919 match err {
920 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
921 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
922 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
923 source: err.into(),
924 }),
925 }
926 }
927}
928impl From<crate::operation::get_guardrail::GetGuardrailError> for Error {
929 fn from(err: crate::operation::get_guardrail::GetGuardrailError) -> Self {
930 match err {
931 crate::operation::get_guardrail::GetGuardrailError::AccessDeniedException(inner) => Error::AccessDeniedException(inner),
932 crate::operation::get_guardrail::GetGuardrailError::InternalServerException(inner) => Error::InternalServerException(inner),
933 crate::operation::get_guardrail::GetGuardrailError::ResourceNotFoundException(inner) => Error::ResourceNotFoundException(inner),
934 crate::operation::get_guardrail::GetGuardrailError::ThrottlingException(inner) => Error::ThrottlingException(inner),
935 crate::operation::get_guardrail::GetGuardrailError::ValidationException(inner) => Error::ValidationException(inner),
936 crate::operation::get_guardrail::GetGuardrailError::Unhandled(inner) => Error::Unhandled(inner),
937 }
938 }
939}
940impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::get_imported_model::GetImportedModelError, R>> for Error
941where
942 R: Send + Sync + std::fmt::Debug + 'static,
943{
944 fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::get_imported_model::GetImportedModelError, R>) -> Self {
945 match err {
946 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
947 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
948 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
949 source: err.into(),
950 }),
951 }
952 }
953}
954impl From<crate::operation::get_imported_model::GetImportedModelError> for Error {
955 fn from(err: crate::operation::get_imported_model::GetImportedModelError) -> Self {
956 match err {
957 crate::operation::get_imported_model::GetImportedModelError::AccessDeniedException(inner) => Error::AccessDeniedException(inner),
958 crate::operation::get_imported_model::GetImportedModelError::InternalServerException(inner) => Error::InternalServerException(inner),
959 crate::operation::get_imported_model::GetImportedModelError::ResourceNotFoundException(inner) => Error::ResourceNotFoundException(inner),
960 crate::operation::get_imported_model::GetImportedModelError::ThrottlingException(inner) => Error::ThrottlingException(inner),
961 crate::operation::get_imported_model::GetImportedModelError::ValidationException(inner) => Error::ValidationException(inner),
962 crate::operation::get_imported_model::GetImportedModelError::Unhandled(inner) => Error::Unhandled(inner),
963 }
964 }
965}
966impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::get_inference_profile::GetInferenceProfileError, R>> for Error
967where
968 R: Send + Sync + std::fmt::Debug + 'static,
969{
970 fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::get_inference_profile::GetInferenceProfileError, R>) -> Self {
971 match err {
972 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
973 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
974 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
975 source: err.into(),
976 }),
977 }
978 }
979}
980impl From<crate::operation::get_inference_profile::GetInferenceProfileError> for Error {
981 fn from(err: crate::operation::get_inference_profile::GetInferenceProfileError) -> Self {
982 match err {
983 crate::operation::get_inference_profile::GetInferenceProfileError::AccessDeniedException(inner) => Error::AccessDeniedException(inner),
984 crate::operation::get_inference_profile::GetInferenceProfileError::InternalServerException(inner) => {
985 Error::InternalServerException(inner)
986 }
987 crate::operation::get_inference_profile::GetInferenceProfileError::ResourceNotFoundException(inner) => {
988 Error::ResourceNotFoundException(inner)
989 }
990 crate::operation::get_inference_profile::GetInferenceProfileError::ThrottlingException(inner) => Error::ThrottlingException(inner),
991 crate::operation::get_inference_profile::GetInferenceProfileError::ValidationException(inner) => Error::ValidationException(inner),
992 crate::operation::get_inference_profile::GetInferenceProfileError::Unhandled(inner) => Error::Unhandled(inner),
993 }
994 }
995}
996impl<R>
997 From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::get_marketplace_model_endpoint::GetMarketplaceModelEndpointError, R>>
998 for Error
999where
1000 R: Send + Sync + std::fmt::Debug + 'static,
1001{
1002 fn from(
1003 err: ::aws_smithy_runtime_api::client::result::SdkError<
1004 crate::operation::get_marketplace_model_endpoint::GetMarketplaceModelEndpointError,
1005 R,
1006 >,
1007 ) -> Self {
1008 match err {
1009 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
1010 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
1011 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
1012 source: err.into(),
1013 }),
1014 }
1015 }
1016}
1017impl From<crate::operation::get_marketplace_model_endpoint::GetMarketplaceModelEndpointError> for Error {
1018 fn from(err: crate::operation::get_marketplace_model_endpoint::GetMarketplaceModelEndpointError) -> Self {
1019 match err {
1020 crate::operation::get_marketplace_model_endpoint::GetMarketplaceModelEndpointError::AccessDeniedException(inner) => {
1021 Error::AccessDeniedException(inner)
1022 }
1023 crate::operation::get_marketplace_model_endpoint::GetMarketplaceModelEndpointError::InternalServerException(inner) => {
1024 Error::InternalServerException(inner)
1025 }
1026 crate::operation::get_marketplace_model_endpoint::GetMarketplaceModelEndpointError::ResourceNotFoundException(inner) => {
1027 Error::ResourceNotFoundException(inner)
1028 }
1029 crate::operation::get_marketplace_model_endpoint::GetMarketplaceModelEndpointError::ThrottlingException(inner) => {
1030 Error::ThrottlingException(inner)
1031 }
1032 crate::operation::get_marketplace_model_endpoint::GetMarketplaceModelEndpointError::ValidationException(inner) => {
1033 Error::ValidationException(inner)
1034 }
1035 crate::operation::get_marketplace_model_endpoint::GetMarketplaceModelEndpointError::Unhandled(inner) => Error::Unhandled(inner),
1036 }
1037 }
1038}
1039impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::get_model_copy_job::GetModelCopyJobError, 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::get_model_copy_job::GetModelCopyJobError, 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::get_model_copy_job::GetModelCopyJobError> for Error {
1054 fn from(err: crate::operation::get_model_copy_job::GetModelCopyJobError) -> Self {
1055 match err {
1056 crate::operation::get_model_copy_job::GetModelCopyJobError::AccessDeniedException(inner) => Error::AccessDeniedException(inner),
1057 crate::operation::get_model_copy_job::GetModelCopyJobError::InternalServerException(inner) => Error::InternalServerException(inner),
1058 crate::operation::get_model_copy_job::GetModelCopyJobError::ResourceNotFoundException(inner) => Error::ResourceNotFoundException(inner),
1059 crate::operation::get_model_copy_job::GetModelCopyJobError::ThrottlingException(inner) => Error::ThrottlingException(inner),
1060 crate::operation::get_model_copy_job::GetModelCopyJobError::ValidationException(inner) => Error::ValidationException(inner),
1061 crate::operation::get_model_copy_job::GetModelCopyJobError::Unhandled(inner) => Error::Unhandled(inner),
1062 }
1063 }
1064}
1065impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::get_model_customization_job::GetModelCustomizationJobError, R>>
1066 for Error
1067where
1068 R: Send + Sync + std::fmt::Debug + 'static,
1069{
1070 fn from(
1071 err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::get_model_customization_job::GetModelCustomizationJobError, R>,
1072 ) -> Self {
1073 match err {
1074 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
1075 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
1076 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
1077 source: err.into(),
1078 }),
1079 }
1080 }
1081}
1082impl From<crate::operation::get_model_customization_job::GetModelCustomizationJobError> for Error {
1083 fn from(err: crate::operation::get_model_customization_job::GetModelCustomizationJobError) -> Self {
1084 match err {
1085 crate::operation::get_model_customization_job::GetModelCustomizationJobError::AccessDeniedException(inner) => {
1086 Error::AccessDeniedException(inner)
1087 }
1088 crate::operation::get_model_customization_job::GetModelCustomizationJobError::InternalServerException(inner) => {
1089 Error::InternalServerException(inner)
1090 }
1091 crate::operation::get_model_customization_job::GetModelCustomizationJobError::ResourceNotFoundException(inner) => {
1092 Error::ResourceNotFoundException(inner)
1093 }
1094 crate::operation::get_model_customization_job::GetModelCustomizationJobError::ThrottlingException(inner) => {
1095 Error::ThrottlingException(inner)
1096 }
1097 crate::operation::get_model_customization_job::GetModelCustomizationJobError::ValidationException(inner) => {
1098 Error::ValidationException(inner)
1099 }
1100 crate::operation::get_model_customization_job::GetModelCustomizationJobError::Unhandled(inner) => Error::Unhandled(inner),
1101 }
1102 }
1103}
1104impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::get_model_import_job::GetModelImportJobError, R>> for Error
1105where
1106 R: Send + Sync + std::fmt::Debug + 'static,
1107{
1108 fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::get_model_import_job::GetModelImportJobError, R>) -> Self {
1109 match err {
1110 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
1111 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
1112 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
1113 source: err.into(),
1114 }),
1115 }
1116 }
1117}
1118impl From<crate::operation::get_model_import_job::GetModelImportJobError> for Error {
1119 fn from(err: crate::operation::get_model_import_job::GetModelImportJobError) -> Self {
1120 match err {
1121 crate::operation::get_model_import_job::GetModelImportJobError::AccessDeniedException(inner) => Error::AccessDeniedException(inner),
1122 crate::operation::get_model_import_job::GetModelImportJobError::InternalServerException(inner) => Error::InternalServerException(inner),
1123 crate::operation::get_model_import_job::GetModelImportJobError::ResourceNotFoundException(inner) => {
1124 Error::ResourceNotFoundException(inner)
1125 }
1126 crate::operation::get_model_import_job::GetModelImportJobError::ThrottlingException(inner) => Error::ThrottlingException(inner),
1127 crate::operation::get_model_import_job::GetModelImportJobError::ValidationException(inner) => Error::ValidationException(inner),
1128 crate::operation::get_model_import_job::GetModelImportJobError::Unhandled(inner) => Error::Unhandled(inner),
1129 }
1130 }
1131}
1132impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::get_model_invocation_job::GetModelInvocationJobError, R>> for Error
1133where
1134 R: Send + Sync + std::fmt::Debug + 'static,
1135{
1136 fn from(
1137 err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::get_model_invocation_job::GetModelInvocationJobError, R>,
1138 ) -> Self {
1139 match err {
1140 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
1141 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
1142 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
1143 source: err.into(),
1144 }),
1145 }
1146 }
1147}
1148impl From<crate::operation::get_model_invocation_job::GetModelInvocationJobError> for Error {
1149 fn from(err: crate::operation::get_model_invocation_job::GetModelInvocationJobError) -> Self {
1150 match err {
1151 crate::operation::get_model_invocation_job::GetModelInvocationJobError::AccessDeniedException(inner) => {
1152 Error::AccessDeniedException(inner)
1153 }
1154 crate::operation::get_model_invocation_job::GetModelInvocationJobError::InternalServerException(inner) => {
1155 Error::InternalServerException(inner)
1156 }
1157 crate::operation::get_model_invocation_job::GetModelInvocationJobError::ResourceNotFoundException(inner) => {
1158 Error::ResourceNotFoundException(inner)
1159 }
1160 crate::operation::get_model_invocation_job::GetModelInvocationJobError::ThrottlingException(inner) => Error::ThrottlingException(inner),
1161 crate::operation::get_model_invocation_job::GetModelInvocationJobError::ValidationException(inner) => Error::ValidationException(inner),
1162 crate::operation::get_model_invocation_job::GetModelInvocationJobError::Unhandled(inner) => Error::Unhandled(inner),
1163 }
1164 }
1165}
1166impl<R>
1167 From<
1168 ::aws_smithy_runtime_api::client::result::SdkError<
1169 crate::operation::get_model_invocation_logging_configuration::GetModelInvocationLoggingConfigurationError,
1170 R,
1171 >,
1172 > for Error
1173where
1174 R: Send + Sync + std::fmt::Debug + 'static,
1175{
1176 fn from(
1177 err: ::aws_smithy_runtime_api::client::result::SdkError<
1178 crate::operation::get_model_invocation_logging_configuration::GetModelInvocationLoggingConfigurationError,
1179 R,
1180 >,
1181 ) -> Self {
1182 match err {
1183 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
1184 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
1185 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
1186 source: err.into(),
1187 }),
1188 }
1189 }
1190}
1191impl From<crate::operation::get_model_invocation_logging_configuration::GetModelInvocationLoggingConfigurationError> for Error {
1192 fn from(err: crate::operation::get_model_invocation_logging_configuration::GetModelInvocationLoggingConfigurationError) -> Self {
1193 match err {
1194 crate::operation::get_model_invocation_logging_configuration::GetModelInvocationLoggingConfigurationError::AccessDeniedException(
1195 inner,
1196 ) => Error::AccessDeniedException(inner),
1197 crate::operation::get_model_invocation_logging_configuration::GetModelInvocationLoggingConfigurationError::InternalServerException(
1198 inner,
1199 ) => Error::InternalServerException(inner),
1200 crate::operation::get_model_invocation_logging_configuration::GetModelInvocationLoggingConfigurationError::ThrottlingException(inner) => {
1201 Error::ThrottlingException(inner)
1202 }
1203 crate::operation::get_model_invocation_logging_configuration::GetModelInvocationLoggingConfigurationError::Unhandled(inner) => {
1204 Error::Unhandled(inner)
1205 }
1206 }
1207 }
1208}
1209impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::get_prompt_router::GetPromptRouterError, R>> for Error
1210where
1211 R: Send + Sync + std::fmt::Debug + 'static,
1212{
1213 fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::get_prompt_router::GetPromptRouterError, R>) -> Self {
1214 match err {
1215 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
1216 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
1217 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
1218 source: err.into(),
1219 }),
1220 }
1221 }
1222}
1223impl From<crate::operation::get_prompt_router::GetPromptRouterError> for Error {
1224 fn from(err: crate::operation::get_prompt_router::GetPromptRouterError) -> Self {
1225 match err {
1226 crate::operation::get_prompt_router::GetPromptRouterError::AccessDeniedException(inner) => Error::AccessDeniedException(inner),
1227 crate::operation::get_prompt_router::GetPromptRouterError::InternalServerException(inner) => Error::InternalServerException(inner),
1228 crate::operation::get_prompt_router::GetPromptRouterError::ResourceNotFoundException(inner) => Error::ResourceNotFoundException(inner),
1229 crate::operation::get_prompt_router::GetPromptRouterError::ThrottlingException(inner) => Error::ThrottlingException(inner),
1230 crate::operation::get_prompt_router::GetPromptRouterError::ValidationException(inner) => Error::ValidationException(inner),
1231 crate::operation::get_prompt_router::GetPromptRouterError::Unhandled(inner) => Error::Unhandled(inner),
1232 }
1233 }
1234}
1235impl<R>
1236 From<
1237 ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::get_provisioned_model_throughput::GetProvisionedModelThroughputError, R>,
1238 > for Error
1239where
1240 R: Send + Sync + std::fmt::Debug + 'static,
1241{
1242 fn from(
1243 err: ::aws_smithy_runtime_api::client::result::SdkError<
1244 crate::operation::get_provisioned_model_throughput::GetProvisionedModelThroughputError,
1245 R,
1246 >,
1247 ) -> Self {
1248 match err {
1249 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
1250 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
1251 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
1252 source: err.into(),
1253 }),
1254 }
1255 }
1256}
1257impl From<crate::operation::get_provisioned_model_throughput::GetProvisionedModelThroughputError> for Error {
1258 fn from(err: crate::operation::get_provisioned_model_throughput::GetProvisionedModelThroughputError) -> Self {
1259 match err {
1260 crate::operation::get_provisioned_model_throughput::GetProvisionedModelThroughputError::AccessDeniedException(inner) => {
1261 Error::AccessDeniedException(inner)
1262 }
1263 crate::operation::get_provisioned_model_throughput::GetProvisionedModelThroughputError::InternalServerException(inner) => {
1264 Error::InternalServerException(inner)
1265 }
1266 crate::operation::get_provisioned_model_throughput::GetProvisionedModelThroughputError::ResourceNotFoundException(inner) => {
1267 Error::ResourceNotFoundException(inner)
1268 }
1269 crate::operation::get_provisioned_model_throughput::GetProvisionedModelThroughputError::ThrottlingException(inner) => {
1270 Error::ThrottlingException(inner)
1271 }
1272 crate::operation::get_provisioned_model_throughput::GetProvisionedModelThroughputError::ValidationException(inner) => {
1273 Error::ValidationException(inner)
1274 }
1275 crate::operation::get_provisioned_model_throughput::GetProvisionedModelThroughputError::Unhandled(inner) => Error::Unhandled(inner),
1276 }
1277 }
1278}
1279impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::list_custom_models::ListCustomModelsError, R>> for Error
1280where
1281 R: Send + Sync + std::fmt::Debug + 'static,
1282{
1283 fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::list_custom_models::ListCustomModelsError, R>) -> Self {
1284 match err {
1285 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
1286 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
1287 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
1288 source: err.into(),
1289 }),
1290 }
1291 }
1292}
1293impl From<crate::operation::list_custom_models::ListCustomModelsError> for Error {
1294 fn from(err: crate::operation::list_custom_models::ListCustomModelsError) -> Self {
1295 match err {
1296 crate::operation::list_custom_models::ListCustomModelsError::AccessDeniedException(inner) => Error::AccessDeniedException(inner),
1297 crate::operation::list_custom_models::ListCustomModelsError::InternalServerException(inner) => Error::InternalServerException(inner),
1298 crate::operation::list_custom_models::ListCustomModelsError::ThrottlingException(inner) => Error::ThrottlingException(inner),
1299 crate::operation::list_custom_models::ListCustomModelsError::ValidationException(inner) => Error::ValidationException(inner),
1300 crate::operation::list_custom_models::ListCustomModelsError::Unhandled(inner) => Error::Unhandled(inner),
1301 }
1302 }
1303}
1304impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::list_evaluation_jobs::ListEvaluationJobsError, R>> for Error
1305where
1306 R: Send + Sync + std::fmt::Debug + 'static,
1307{
1308 fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::list_evaluation_jobs::ListEvaluationJobsError, R>) -> Self {
1309 match err {
1310 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
1311 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
1312 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
1313 source: err.into(),
1314 }),
1315 }
1316 }
1317}
1318impl From<crate::operation::list_evaluation_jobs::ListEvaluationJobsError> for Error {
1319 fn from(err: crate::operation::list_evaluation_jobs::ListEvaluationJobsError) -> Self {
1320 match err {
1321 crate::operation::list_evaluation_jobs::ListEvaluationJobsError::AccessDeniedException(inner) => Error::AccessDeniedException(inner),
1322 crate::operation::list_evaluation_jobs::ListEvaluationJobsError::InternalServerException(inner) => Error::InternalServerException(inner),
1323 crate::operation::list_evaluation_jobs::ListEvaluationJobsError::ThrottlingException(inner) => Error::ThrottlingException(inner),
1324 crate::operation::list_evaluation_jobs::ListEvaluationJobsError::ValidationException(inner) => Error::ValidationException(inner),
1325 crate::operation::list_evaluation_jobs::ListEvaluationJobsError::Unhandled(inner) => Error::Unhandled(inner),
1326 }
1327 }
1328}
1329impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::list_foundation_models::ListFoundationModelsError, R>> for Error
1330where
1331 R: Send + Sync + std::fmt::Debug + 'static,
1332{
1333 fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::list_foundation_models::ListFoundationModelsError, R>) -> Self {
1334 match err {
1335 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
1336 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
1337 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
1338 source: err.into(),
1339 }),
1340 }
1341 }
1342}
1343impl From<crate::operation::list_foundation_models::ListFoundationModelsError> for Error {
1344 fn from(err: crate::operation::list_foundation_models::ListFoundationModelsError) -> Self {
1345 match err {
1346 crate::operation::list_foundation_models::ListFoundationModelsError::AccessDeniedException(inner) => Error::AccessDeniedException(inner),
1347 crate::operation::list_foundation_models::ListFoundationModelsError::InternalServerException(inner) => {
1348 Error::InternalServerException(inner)
1349 }
1350 crate::operation::list_foundation_models::ListFoundationModelsError::ThrottlingException(inner) => Error::ThrottlingException(inner),
1351 crate::operation::list_foundation_models::ListFoundationModelsError::ValidationException(inner) => Error::ValidationException(inner),
1352 crate::operation::list_foundation_models::ListFoundationModelsError::Unhandled(inner) => Error::Unhandled(inner),
1353 }
1354 }
1355}
1356impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::list_guardrails::ListGuardrailsError, R>> for Error
1357where
1358 R: Send + Sync + std::fmt::Debug + 'static,
1359{
1360 fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::list_guardrails::ListGuardrailsError, R>) -> Self {
1361 match err {
1362 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
1363 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
1364 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
1365 source: err.into(),
1366 }),
1367 }
1368 }
1369}
1370impl From<crate::operation::list_guardrails::ListGuardrailsError> for Error {
1371 fn from(err: crate::operation::list_guardrails::ListGuardrailsError) -> Self {
1372 match err {
1373 crate::operation::list_guardrails::ListGuardrailsError::AccessDeniedException(inner) => Error::AccessDeniedException(inner),
1374 crate::operation::list_guardrails::ListGuardrailsError::InternalServerException(inner) => Error::InternalServerException(inner),
1375 crate::operation::list_guardrails::ListGuardrailsError::ResourceNotFoundException(inner) => Error::ResourceNotFoundException(inner),
1376 crate::operation::list_guardrails::ListGuardrailsError::ThrottlingException(inner) => Error::ThrottlingException(inner),
1377 crate::operation::list_guardrails::ListGuardrailsError::ValidationException(inner) => Error::ValidationException(inner),
1378 crate::operation::list_guardrails::ListGuardrailsError::Unhandled(inner) => Error::Unhandled(inner),
1379 }
1380 }
1381}
1382impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::list_imported_models::ListImportedModelsError, R>> for Error
1383where
1384 R: Send + Sync + std::fmt::Debug + 'static,
1385{
1386 fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::list_imported_models::ListImportedModelsError, R>) -> Self {
1387 match err {
1388 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
1389 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
1390 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
1391 source: err.into(),
1392 }),
1393 }
1394 }
1395}
1396impl From<crate::operation::list_imported_models::ListImportedModelsError> for Error {
1397 fn from(err: crate::operation::list_imported_models::ListImportedModelsError) -> Self {
1398 match err {
1399 crate::operation::list_imported_models::ListImportedModelsError::AccessDeniedException(inner) => Error::AccessDeniedException(inner),
1400 crate::operation::list_imported_models::ListImportedModelsError::InternalServerException(inner) => Error::InternalServerException(inner),
1401 crate::operation::list_imported_models::ListImportedModelsError::ThrottlingException(inner) => Error::ThrottlingException(inner),
1402 crate::operation::list_imported_models::ListImportedModelsError::ValidationException(inner) => Error::ValidationException(inner),
1403 crate::operation::list_imported_models::ListImportedModelsError::Unhandled(inner) => Error::Unhandled(inner),
1404 }
1405 }
1406}
1407impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::list_inference_profiles::ListInferenceProfilesError, R>> for Error
1408where
1409 R: Send + Sync + std::fmt::Debug + 'static,
1410{
1411 fn from(
1412 err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::list_inference_profiles::ListInferenceProfilesError, R>,
1413 ) -> Self {
1414 match err {
1415 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
1416 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
1417 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
1418 source: err.into(),
1419 }),
1420 }
1421 }
1422}
1423impl From<crate::operation::list_inference_profiles::ListInferenceProfilesError> for Error {
1424 fn from(err: crate::operation::list_inference_profiles::ListInferenceProfilesError) -> Self {
1425 match err {
1426 crate::operation::list_inference_profiles::ListInferenceProfilesError::AccessDeniedException(inner) => {
1427 Error::AccessDeniedException(inner)
1428 }
1429 crate::operation::list_inference_profiles::ListInferenceProfilesError::InternalServerException(inner) => {
1430 Error::InternalServerException(inner)
1431 }
1432 crate::operation::list_inference_profiles::ListInferenceProfilesError::ThrottlingException(inner) => Error::ThrottlingException(inner),
1433 crate::operation::list_inference_profiles::ListInferenceProfilesError::ValidationException(inner) => Error::ValidationException(inner),
1434 crate::operation::list_inference_profiles::ListInferenceProfilesError::Unhandled(inner) => Error::Unhandled(inner),
1435 }
1436 }
1437}
1438impl<R>
1439 From<
1440 ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::list_marketplace_model_endpoints::ListMarketplaceModelEndpointsError, R>,
1441 > for Error
1442where
1443 R: Send + Sync + std::fmt::Debug + 'static,
1444{
1445 fn from(
1446 err: ::aws_smithy_runtime_api::client::result::SdkError<
1447 crate::operation::list_marketplace_model_endpoints::ListMarketplaceModelEndpointsError,
1448 R,
1449 >,
1450 ) -> Self {
1451 match err {
1452 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
1453 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
1454 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
1455 source: err.into(),
1456 }),
1457 }
1458 }
1459}
1460impl From<crate::operation::list_marketplace_model_endpoints::ListMarketplaceModelEndpointsError> for Error {
1461 fn from(err: crate::operation::list_marketplace_model_endpoints::ListMarketplaceModelEndpointsError) -> Self {
1462 match err {
1463 crate::operation::list_marketplace_model_endpoints::ListMarketplaceModelEndpointsError::AccessDeniedException(inner) => {
1464 Error::AccessDeniedException(inner)
1465 }
1466 crate::operation::list_marketplace_model_endpoints::ListMarketplaceModelEndpointsError::InternalServerException(inner) => {
1467 Error::InternalServerException(inner)
1468 }
1469 crate::operation::list_marketplace_model_endpoints::ListMarketplaceModelEndpointsError::ResourceNotFoundException(inner) => {
1470 Error::ResourceNotFoundException(inner)
1471 }
1472 crate::operation::list_marketplace_model_endpoints::ListMarketplaceModelEndpointsError::ThrottlingException(inner) => {
1473 Error::ThrottlingException(inner)
1474 }
1475 crate::operation::list_marketplace_model_endpoints::ListMarketplaceModelEndpointsError::ValidationException(inner) => {
1476 Error::ValidationException(inner)
1477 }
1478 crate::operation::list_marketplace_model_endpoints::ListMarketplaceModelEndpointsError::Unhandled(inner) => Error::Unhandled(inner),
1479 }
1480 }
1481}
1482impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::list_model_copy_jobs::ListModelCopyJobsError, R>> for Error
1483where
1484 R: Send + Sync + std::fmt::Debug + 'static,
1485{
1486 fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::list_model_copy_jobs::ListModelCopyJobsError, R>) -> Self {
1487 match err {
1488 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
1489 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
1490 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
1491 source: err.into(),
1492 }),
1493 }
1494 }
1495}
1496impl From<crate::operation::list_model_copy_jobs::ListModelCopyJobsError> for Error {
1497 fn from(err: crate::operation::list_model_copy_jobs::ListModelCopyJobsError) -> Self {
1498 match err {
1499 crate::operation::list_model_copy_jobs::ListModelCopyJobsError::AccessDeniedException(inner) => Error::AccessDeniedException(inner),
1500 crate::operation::list_model_copy_jobs::ListModelCopyJobsError::InternalServerException(inner) => Error::InternalServerException(inner),
1501 crate::operation::list_model_copy_jobs::ListModelCopyJobsError::ResourceNotFoundException(inner) => {
1502 Error::ResourceNotFoundException(inner)
1503 }
1504 crate::operation::list_model_copy_jobs::ListModelCopyJobsError::ThrottlingException(inner) => Error::ThrottlingException(inner),
1505 crate::operation::list_model_copy_jobs::ListModelCopyJobsError::ValidationException(inner) => Error::ValidationException(inner),
1506 crate::operation::list_model_copy_jobs::ListModelCopyJobsError::Unhandled(inner) => Error::Unhandled(inner),
1507 }
1508 }
1509}
1510impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::list_model_customization_jobs::ListModelCustomizationJobsError, R>>
1511 for Error
1512where
1513 R: Send + Sync + std::fmt::Debug + 'static,
1514{
1515 fn from(
1516 err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::list_model_customization_jobs::ListModelCustomizationJobsError, R>,
1517 ) -> Self {
1518 match err {
1519 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
1520 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
1521 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
1522 source: err.into(),
1523 }),
1524 }
1525 }
1526}
1527impl From<crate::operation::list_model_customization_jobs::ListModelCustomizationJobsError> for Error {
1528 fn from(err: crate::operation::list_model_customization_jobs::ListModelCustomizationJobsError) -> Self {
1529 match err {
1530 crate::operation::list_model_customization_jobs::ListModelCustomizationJobsError::AccessDeniedException(inner) => {
1531 Error::AccessDeniedException(inner)
1532 }
1533 crate::operation::list_model_customization_jobs::ListModelCustomizationJobsError::InternalServerException(inner) => {
1534 Error::InternalServerException(inner)
1535 }
1536 crate::operation::list_model_customization_jobs::ListModelCustomizationJobsError::ThrottlingException(inner) => {
1537 Error::ThrottlingException(inner)
1538 }
1539 crate::operation::list_model_customization_jobs::ListModelCustomizationJobsError::ValidationException(inner) => {
1540 Error::ValidationException(inner)
1541 }
1542 crate::operation::list_model_customization_jobs::ListModelCustomizationJobsError::Unhandled(inner) => Error::Unhandled(inner),
1543 }
1544 }
1545}
1546impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::list_model_import_jobs::ListModelImportJobsError, R>> for Error
1547where
1548 R: Send + Sync + std::fmt::Debug + 'static,
1549{
1550 fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::list_model_import_jobs::ListModelImportJobsError, R>) -> Self {
1551 match err {
1552 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
1553 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
1554 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
1555 source: err.into(),
1556 }),
1557 }
1558 }
1559}
1560impl From<crate::operation::list_model_import_jobs::ListModelImportJobsError> for Error {
1561 fn from(err: crate::operation::list_model_import_jobs::ListModelImportJobsError) -> Self {
1562 match err {
1563 crate::operation::list_model_import_jobs::ListModelImportJobsError::AccessDeniedException(inner) => Error::AccessDeniedException(inner),
1564 crate::operation::list_model_import_jobs::ListModelImportJobsError::InternalServerException(inner) => {
1565 Error::InternalServerException(inner)
1566 }
1567 crate::operation::list_model_import_jobs::ListModelImportJobsError::ThrottlingException(inner) => Error::ThrottlingException(inner),
1568 crate::operation::list_model_import_jobs::ListModelImportJobsError::ValidationException(inner) => Error::ValidationException(inner),
1569 crate::operation::list_model_import_jobs::ListModelImportJobsError::Unhandled(inner) => Error::Unhandled(inner),
1570 }
1571 }
1572}
1573impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::list_model_invocation_jobs::ListModelInvocationJobsError, R>>
1574 for Error
1575where
1576 R: Send + Sync + std::fmt::Debug + 'static,
1577{
1578 fn from(
1579 err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::list_model_invocation_jobs::ListModelInvocationJobsError, R>,
1580 ) -> Self {
1581 match err {
1582 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
1583 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
1584 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
1585 source: err.into(),
1586 }),
1587 }
1588 }
1589}
1590impl From<crate::operation::list_model_invocation_jobs::ListModelInvocationJobsError> for Error {
1591 fn from(err: crate::operation::list_model_invocation_jobs::ListModelInvocationJobsError) -> Self {
1592 match err {
1593 crate::operation::list_model_invocation_jobs::ListModelInvocationJobsError::AccessDeniedException(inner) => {
1594 Error::AccessDeniedException(inner)
1595 }
1596 crate::operation::list_model_invocation_jobs::ListModelInvocationJobsError::InternalServerException(inner) => {
1597 Error::InternalServerException(inner)
1598 }
1599 crate::operation::list_model_invocation_jobs::ListModelInvocationJobsError::ThrottlingException(inner) => {
1600 Error::ThrottlingException(inner)
1601 }
1602 crate::operation::list_model_invocation_jobs::ListModelInvocationJobsError::ValidationException(inner) => {
1603 Error::ValidationException(inner)
1604 }
1605 crate::operation::list_model_invocation_jobs::ListModelInvocationJobsError::Unhandled(inner) => Error::Unhandled(inner),
1606 }
1607 }
1608}
1609impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::list_prompt_routers::ListPromptRoutersError, R>> for Error
1610where
1611 R: Send + Sync + std::fmt::Debug + 'static,
1612{
1613 fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::list_prompt_routers::ListPromptRoutersError, R>) -> Self {
1614 match err {
1615 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
1616 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
1617 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
1618 source: err.into(),
1619 }),
1620 }
1621 }
1622}
1623impl From<crate::operation::list_prompt_routers::ListPromptRoutersError> for Error {
1624 fn from(err: crate::operation::list_prompt_routers::ListPromptRoutersError) -> Self {
1625 match err {
1626 crate::operation::list_prompt_routers::ListPromptRoutersError::AccessDeniedException(inner) => Error::AccessDeniedException(inner),
1627 crate::operation::list_prompt_routers::ListPromptRoutersError::InternalServerException(inner) => Error::InternalServerException(inner),
1628 crate::operation::list_prompt_routers::ListPromptRoutersError::ThrottlingException(inner) => Error::ThrottlingException(inner),
1629 crate::operation::list_prompt_routers::ListPromptRoutersError::ValidationException(inner) => Error::ValidationException(inner),
1630 crate::operation::list_prompt_routers::ListPromptRoutersError::Unhandled(inner) => Error::Unhandled(inner),
1631 }
1632 }
1633}
1634impl<R>
1635 From<
1636 ::aws_smithy_runtime_api::client::result::SdkError<
1637 crate::operation::list_provisioned_model_throughputs::ListProvisionedModelThroughputsError,
1638 R,
1639 >,
1640 > for Error
1641where
1642 R: Send + Sync + std::fmt::Debug + 'static,
1643{
1644 fn from(
1645 err: ::aws_smithy_runtime_api::client::result::SdkError<
1646 crate::operation::list_provisioned_model_throughputs::ListProvisionedModelThroughputsError,
1647 R,
1648 >,
1649 ) -> Self {
1650 match err {
1651 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
1652 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
1653 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
1654 source: err.into(),
1655 }),
1656 }
1657 }
1658}
1659impl From<crate::operation::list_provisioned_model_throughputs::ListProvisionedModelThroughputsError> for Error {
1660 fn from(err: crate::operation::list_provisioned_model_throughputs::ListProvisionedModelThroughputsError) -> Self {
1661 match err {
1662 crate::operation::list_provisioned_model_throughputs::ListProvisionedModelThroughputsError::AccessDeniedException(inner) => {
1663 Error::AccessDeniedException(inner)
1664 }
1665 crate::operation::list_provisioned_model_throughputs::ListProvisionedModelThroughputsError::InternalServerException(inner) => {
1666 Error::InternalServerException(inner)
1667 }
1668 crate::operation::list_provisioned_model_throughputs::ListProvisionedModelThroughputsError::ThrottlingException(inner) => {
1669 Error::ThrottlingException(inner)
1670 }
1671 crate::operation::list_provisioned_model_throughputs::ListProvisionedModelThroughputsError::ValidationException(inner) => {
1672 Error::ValidationException(inner)
1673 }
1674 crate::operation::list_provisioned_model_throughputs::ListProvisionedModelThroughputsError::Unhandled(inner) => Error::Unhandled(inner),
1675 }
1676 }
1677}
1678impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::list_tags_for_resource::ListTagsForResourceError, R>> for Error
1679where
1680 R: Send + Sync + std::fmt::Debug + 'static,
1681{
1682 fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::list_tags_for_resource::ListTagsForResourceError, R>) -> Self {
1683 match err {
1684 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
1685 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
1686 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
1687 source: err.into(),
1688 }),
1689 }
1690 }
1691}
1692impl From<crate::operation::list_tags_for_resource::ListTagsForResourceError> for Error {
1693 fn from(err: crate::operation::list_tags_for_resource::ListTagsForResourceError) -> Self {
1694 match err {
1695 crate::operation::list_tags_for_resource::ListTagsForResourceError::AccessDeniedException(inner) => Error::AccessDeniedException(inner),
1696 crate::operation::list_tags_for_resource::ListTagsForResourceError::InternalServerException(inner) => {
1697 Error::InternalServerException(inner)
1698 }
1699 crate::operation::list_tags_for_resource::ListTagsForResourceError::ResourceNotFoundException(inner) => {
1700 Error::ResourceNotFoundException(inner)
1701 }
1702 crate::operation::list_tags_for_resource::ListTagsForResourceError::ThrottlingException(inner) => Error::ThrottlingException(inner),
1703 crate::operation::list_tags_for_resource::ListTagsForResourceError::ValidationException(inner) => Error::ValidationException(inner),
1704 crate::operation::list_tags_for_resource::ListTagsForResourceError::Unhandled(inner) => Error::Unhandled(inner),
1705 }
1706 }
1707}
1708impl<R>
1709 From<
1710 ::aws_smithy_runtime_api::client::result::SdkError<
1711 crate::operation::put_model_invocation_logging_configuration::PutModelInvocationLoggingConfigurationError,
1712 R,
1713 >,
1714 > for Error
1715where
1716 R: Send + Sync + std::fmt::Debug + 'static,
1717{
1718 fn from(
1719 err: ::aws_smithy_runtime_api::client::result::SdkError<
1720 crate::operation::put_model_invocation_logging_configuration::PutModelInvocationLoggingConfigurationError,
1721 R,
1722 >,
1723 ) -> Self {
1724 match err {
1725 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
1726 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
1727 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
1728 source: err.into(),
1729 }),
1730 }
1731 }
1732}
1733impl From<crate::operation::put_model_invocation_logging_configuration::PutModelInvocationLoggingConfigurationError> for Error {
1734 fn from(err: crate::operation::put_model_invocation_logging_configuration::PutModelInvocationLoggingConfigurationError) -> Self {
1735 match err {
1736 crate::operation::put_model_invocation_logging_configuration::PutModelInvocationLoggingConfigurationError::AccessDeniedException(
1737 inner,
1738 ) => Error::AccessDeniedException(inner),
1739 crate::operation::put_model_invocation_logging_configuration::PutModelInvocationLoggingConfigurationError::InternalServerException(
1740 inner,
1741 ) => Error::InternalServerException(inner),
1742 crate::operation::put_model_invocation_logging_configuration::PutModelInvocationLoggingConfigurationError::ThrottlingException(inner) => {
1743 Error::ThrottlingException(inner)
1744 }
1745 crate::operation::put_model_invocation_logging_configuration::PutModelInvocationLoggingConfigurationError::ValidationException(inner) => {
1746 Error::ValidationException(inner)
1747 }
1748 crate::operation::put_model_invocation_logging_configuration::PutModelInvocationLoggingConfigurationError::Unhandled(inner) => {
1749 Error::Unhandled(inner)
1750 }
1751 }
1752 }
1753}
1754impl<R>
1755 From<
1756 ::aws_smithy_runtime_api::client::result::SdkError<
1757 crate::operation::register_marketplace_model_endpoint::RegisterMarketplaceModelEndpointError,
1758 R,
1759 >,
1760 > for Error
1761where
1762 R: Send + Sync + std::fmt::Debug + 'static,
1763{
1764 fn from(
1765 err: ::aws_smithy_runtime_api::client::result::SdkError<
1766 crate::operation::register_marketplace_model_endpoint::RegisterMarketplaceModelEndpointError,
1767 R,
1768 >,
1769 ) -> Self {
1770 match err {
1771 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
1772 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
1773 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
1774 source: err.into(),
1775 }),
1776 }
1777 }
1778}
1779impl From<crate::operation::register_marketplace_model_endpoint::RegisterMarketplaceModelEndpointError> for Error {
1780 fn from(err: crate::operation::register_marketplace_model_endpoint::RegisterMarketplaceModelEndpointError) -> Self {
1781 match err {
1782 crate::operation::register_marketplace_model_endpoint::RegisterMarketplaceModelEndpointError::AccessDeniedException(inner) => {
1783 Error::AccessDeniedException(inner)
1784 }
1785 crate::operation::register_marketplace_model_endpoint::RegisterMarketplaceModelEndpointError::InternalServerException(inner) => {
1786 Error::InternalServerException(inner)
1787 }
1788 crate::operation::register_marketplace_model_endpoint::RegisterMarketplaceModelEndpointError::ResourceNotFoundException(inner) => {
1789 Error::ResourceNotFoundException(inner)
1790 }
1791 crate::operation::register_marketplace_model_endpoint::RegisterMarketplaceModelEndpointError::ServiceUnavailableException(inner) => {
1792 Error::ServiceUnavailableException(inner)
1793 }
1794 crate::operation::register_marketplace_model_endpoint::RegisterMarketplaceModelEndpointError::ThrottlingException(inner) => {
1795 Error::ThrottlingException(inner)
1796 }
1797 crate::operation::register_marketplace_model_endpoint::RegisterMarketplaceModelEndpointError::ValidationException(inner) => {
1798 Error::ValidationException(inner)
1799 }
1800 crate::operation::register_marketplace_model_endpoint::RegisterMarketplaceModelEndpointError::Unhandled(inner) => Error::Unhandled(inner),
1801 }
1802 }
1803}
1804impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::stop_evaluation_job::StopEvaluationJobError, R>> for Error
1805where
1806 R: Send + Sync + std::fmt::Debug + 'static,
1807{
1808 fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::stop_evaluation_job::StopEvaluationJobError, R>) -> Self {
1809 match err {
1810 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
1811 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
1812 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
1813 source: err.into(),
1814 }),
1815 }
1816 }
1817}
1818impl From<crate::operation::stop_evaluation_job::StopEvaluationJobError> for Error {
1819 fn from(err: crate::operation::stop_evaluation_job::StopEvaluationJobError) -> Self {
1820 match err {
1821 crate::operation::stop_evaluation_job::StopEvaluationJobError::AccessDeniedException(inner) => Error::AccessDeniedException(inner),
1822 crate::operation::stop_evaluation_job::StopEvaluationJobError::ConflictException(inner) => Error::ConflictException(inner),
1823 crate::operation::stop_evaluation_job::StopEvaluationJobError::InternalServerException(inner) => Error::InternalServerException(inner),
1824 crate::operation::stop_evaluation_job::StopEvaluationJobError::ResourceNotFoundException(inner) => {
1825 Error::ResourceNotFoundException(inner)
1826 }
1827 crate::operation::stop_evaluation_job::StopEvaluationJobError::ThrottlingException(inner) => Error::ThrottlingException(inner),
1828 crate::operation::stop_evaluation_job::StopEvaluationJobError::ValidationException(inner) => Error::ValidationException(inner),
1829 crate::operation::stop_evaluation_job::StopEvaluationJobError::Unhandled(inner) => Error::Unhandled(inner),
1830 }
1831 }
1832}
1833impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::stop_model_customization_job::StopModelCustomizationJobError, R>>
1834 for Error
1835where
1836 R: Send + Sync + std::fmt::Debug + 'static,
1837{
1838 fn from(
1839 err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::stop_model_customization_job::StopModelCustomizationJobError, R>,
1840 ) -> Self {
1841 match err {
1842 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
1843 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
1844 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
1845 source: err.into(),
1846 }),
1847 }
1848 }
1849}
1850impl From<crate::operation::stop_model_customization_job::StopModelCustomizationJobError> for Error {
1851 fn from(err: crate::operation::stop_model_customization_job::StopModelCustomizationJobError) -> Self {
1852 match err {
1853 crate::operation::stop_model_customization_job::StopModelCustomizationJobError::AccessDeniedException(inner) => {
1854 Error::AccessDeniedException(inner)
1855 }
1856 crate::operation::stop_model_customization_job::StopModelCustomizationJobError::ConflictException(inner) => {
1857 Error::ConflictException(inner)
1858 }
1859 crate::operation::stop_model_customization_job::StopModelCustomizationJobError::InternalServerException(inner) => {
1860 Error::InternalServerException(inner)
1861 }
1862 crate::operation::stop_model_customization_job::StopModelCustomizationJobError::ResourceNotFoundException(inner) => {
1863 Error::ResourceNotFoundException(inner)
1864 }
1865 crate::operation::stop_model_customization_job::StopModelCustomizationJobError::ThrottlingException(inner) => {
1866 Error::ThrottlingException(inner)
1867 }
1868 crate::operation::stop_model_customization_job::StopModelCustomizationJobError::ValidationException(inner) => {
1869 Error::ValidationException(inner)
1870 }
1871 crate::operation::stop_model_customization_job::StopModelCustomizationJobError::Unhandled(inner) => Error::Unhandled(inner),
1872 }
1873 }
1874}
1875impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::stop_model_invocation_job::StopModelInvocationJobError, R>>
1876 for Error
1877where
1878 R: Send + Sync + std::fmt::Debug + 'static,
1879{
1880 fn from(
1881 err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::stop_model_invocation_job::StopModelInvocationJobError, R>,
1882 ) -> Self {
1883 match err {
1884 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
1885 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
1886 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
1887 source: err.into(),
1888 }),
1889 }
1890 }
1891}
1892impl From<crate::operation::stop_model_invocation_job::StopModelInvocationJobError> for Error {
1893 fn from(err: crate::operation::stop_model_invocation_job::StopModelInvocationJobError) -> Self {
1894 match err {
1895 crate::operation::stop_model_invocation_job::StopModelInvocationJobError::AccessDeniedException(inner) => {
1896 Error::AccessDeniedException(inner)
1897 }
1898 crate::operation::stop_model_invocation_job::StopModelInvocationJobError::ConflictException(inner) => Error::ConflictException(inner),
1899 crate::operation::stop_model_invocation_job::StopModelInvocationJobError::InternalServerException(inner) => {
1900 Error::InternalServerException(inner)
1901 }
1902 crate::operation::stop_model_invocation_job::StopModelInvocationJobError::ResourceNotFoundException(inner) => {
1903 Error::ResourceNotFoundException(inner)
1904 }
1905 crate::operation::stop_model_invocation_job::StopModelInvocationJobError::ThrottlingException(inner) => Error::ThrottlingException(inner),
1906 crate::operation::stop_model_invocation_job::StopModelInvocationJobError::ValidationException(inner) => Error::ValidationException(inner),
1907 crate::operation::stop_model_invocation_job::StopModelInvocationJobError::Unhandled(inner) => Error::Unhandled(inner),
1908 }
1909 }
1910}
1911impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::tag_resource::TagResourceError, R>> for Error
1912where
1913 R: Send + Sync + std::fmt::Debug + 'static,
1914{
1915 fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::tag_resource::TagResourceError, R>) -> Self {
1916 match err {
1917 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
1918 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
1919 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
1920 source: err.into(),
1921 }),
1922 }
1923 }
1924}
1925impl From<crate::operation::tag_resource::TagResourceError> for Error {
1926 fn from(err: crate::operation::tag_resource::TagResourceError) -> Self {
1927 match err {
1928 crate::operation::tag_resource::TagResourceError::AccessDeniedException(inner) => Error::AccessDeniedException(inner),
1929 crate::operation::tag_resource::TagResourceError::InternalServerException(inner) => Error::InternalServerException(inner),
1930 crate::operation::tag_resource::TagResourceError::ResourceNotFoundException(inner) => Error::ResourceNotFoundException(inner),
1931 crate::operation::tag_resource::TagResourceError::ThrottlingException(inner) => Error::ThrottlingException(inner),
1932 crate::operation::tag_resource::TagResourceError::TooManyTagsException(inner) => Error::TooManyTagsException(inner),
1933 crate::operation::tag_resource::TagResourceError::ValidationException(inner) => Error::ValidationException(inner),
1934 crate::operation::tag_resource::TagResourceError::Unhandled(inner) => Error::Unhandled(inner),
1935 }
1936 }
1937}
1938impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::untag_resource::UntagResourceError, R>> for Error
1939where
1940 R: Send + Sync + std::fmt::Debug + 'static,
1941{
1942 fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::untag_resource::UntagResourceError, R>) -> Self {
1943 match err {
1944 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
1945 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
1946 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
1947 source: err.into(),
1948 }),
1949 }
1950 }
1951}
1952impl From<crate::operation::untag_resource::UntagResourceError> for Error {
1953 fn from(err: crate::operation::untag_resource::UntagResourceError) -> Self {
1954 match err {
1955 crate::operation::untag_resource::UntagResourceError::AccessDeniedException(inner) => Error::AccessDeniedException(inner),
1956 crate::operation::untag_resource::UntagResourceError::InternalServerException(inner) => Error::InternalServerException(inner),
1957 crate::operation::untag_resource::UntagResourceError::ResourceNotFoundException(inner) => Error::ResourceNotFoundException(inner),
1958 crate::operation::untag_resource::UntagResourceError::ThrottlingException(inner) => Error::ThrottlingException(inner),
1959 crate::operation::untag_resource::UntagResourceError::ValidationException(inner) => Error::ValidationException(inner),
1960 crate::operation::untag_resource::UntagResourceError::Unhandled(inner) => Error::Unhandled(inner),
1961 }
1962 }
1963}
1964impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::update_guardrail::UpdateGuardrailError, R>> for Error
1965where
1966 R: Send + Sync + std::fmt::Debug + 'static,
1967{
1968 fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::update_guardrail::UpdateGuardrailError, R>) -> Self {
1969 match err {
1970 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
1971 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
1972 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
1973 source: err.into(),
1974 }),
1975 }
1976 }
1977}
1978impl From<crate::operation::update_guardrail::UpdateGuardrailError> for Error {
1979 fn from(err: crate::operation::update_guardrail::UpdateGuardrailError) -> Self {
1980 match err {
1981 crate::operation::update_guardrail::UpdateGuardrailError::AccessDeniedException(inner) => Error::AccessDeniedException(inner),
1982 crate::operation::update_guardrail::UpdateGuardrailError::ConflictException(inner) => Error::ConflictException(inner),
1983 crate::operation::update_guardrail::UpdateGuardrailError::InternalServerException(inner) => Error::InternalServerException(inner),
1984 crate::operation::update_guardrail::UpdateGuardrailError::ResourceNotFoundException(inner) => Error::ResourceNotFoundException(inner),
1985 crate::operation::update_guardrail::UpdateGuardrailError::ServiceQuotaExceededException(inner) => {
1986 Error::ServiceQuotaExceededException(inner)
1987 }
1988 crate::operation::update_guardrail::UpdateGuardrailError::ThrottlingException(inner) => Error::ThrottlingException(inner),
1989 crate::operation::update_guardrail::UpdateGuardrailError::ValidationException(inner) => Error::ValidationException(inner),
1990 crate::operation::update_guardrail::UpdateGuardrailError::Unhandled(inner) => Error::Unhandled(inner),
1991 }
1992 }
1993}
1994impl<R>
1995 From<
1996 ::aws_smithy_runtime_api::client::result::SdkError<
1997 crate::operation::update_marketplace_model_endpoint::UpdateMarketplaceModelEndpointError,
1998 R,
1999 >,
2000 > for Error
2001where
2002 R: Send + Sync + std::fmt::Debug + 'static,
2003{
2004 fn from(
2005 err: ::aws_smithy_runtime_api::client::result::SdkError<
2006 crate::operation::update_marketplace_model_endpoint::UpdateMarketplaceModelEndpointError,
2007 R,
2008 >,
2009 ) -> Self {
2010 match err {
2011 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
2012 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
2013 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
2014 source: err.into(),
2015 }),
2016 }
2017 }
2018}
2019impl From<crate::operation::update_marketplace_model_endpoint::UpdateMarketplaceModelEndpointError> for Error {
2020 fn from(err: crate::operation::update_marketplace_model_endpoint::UpdateMarketplaceModelEndpointError) -> Self {
2021 match err {
2022 crate::operation::update_marketplace_model_endpoint::UpdateMarketplaceModelEndpointError::AccessDeniedException(inner) => {
2023 Error::AccessDeniedException(inner)
2024 }
2025 crate::operation::update_marketplace_model_endpoint::UpdateMarketplaceModelEndpointError::ConflictException(inner) => {
2026 Error::ConflictException(inner)
2027 }
2028 crate::operation::update_marketplace_model_endpoint::UpdateMarketplaceModelEndpointError::InternalServerException(inner) => {
2029 Error::InternalServerException(inner)
2030 }
2031 crate::operation::update_marketplace_model_endpoint::UpdateMarketplaceModelEndpointError::ResourceNotFoundException(inner) => {
2032 Error::ResourceNotFoundException(inner)
2033 }
2034 crate::operation::update_marketplace_model_endpoint::UpdateMarketplaceModelEndpointError::ServiceQuotaExceededException(inner) => {
2035 Error::ServiceQuotaExceededException(inner)
2036 }
2037 crate::operation::update_marketplace_model_endpoint::UpdateMarketplaceModelEndpointError::ThrottlingException(inner) => {
2038 Error::ThrottlingException(inner)
2039 }
2040 crate::operation::update_marketplace_model_endpoint::UpdateMarketplaceModelEndpointError::ValidationException(inner) => {
2041 Error::ValidationException(inner)
2042 }
2043 crate::operation::update_marketplace_model_endpoint::UpdateMarketplaceModelEndpointError::Unhandled(inner) => Error::Unhandled(inner),
2044 }
2045 }
2046}
2047impl<R>
2048 From<
2049 ::aws_smithy_runtime_api::client::result::SdkError<
2050 crate::operation::update_provisioned_model_throughput::UpdateProvisionedModelThroughputError,
2051 R,
2052 >,
2053 > for Error
2054where
2055 R: Send + Sync + std::fmt::Debug + 'static,
2056{
2057 fn from(
2058 err: ::aws_smithy_runtime_api::client::result::SdkError<
2059 crate::operation::update_provisioned_model_throughput::UpdateProvisionedModelThroughputError,
2060 R,
2061 >,
2062 ) -> Self {
2063 match err {
2064 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
2065 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
2066 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
2067 source: err.into(),
2068 }),
2069 }
2070 }
2071}
2072impl From<crate::operation::update_provisioned_model_throughput::UpdateProvisionedModelThroughputError> for Error {
2073 fn from(err: crate::operation::update_provisioned_model_throughput::UpdateProvisionedModelThroughputError) -> Self {
2074 match err {
2075 crate::operation::update_provisioned_model_throughput::UpdateProvisionedModelThroughputError::AccessDeniedException(inner) => {
2076 Error::AccessDeniedException(inner)
2077 }
2078 crate::operation::update_provisioned_model_throughput::UpdateProvisionedModelThroughputError::InternalServerException(inner) => {
2079 Error::InternalServerException(inner)
2080 }
2081 crate::operation::update_provisioned_model_throughput::UpdateProvisionedModelThroughputError::ResourceNotFoundException(inner) => {
2082 Error::ResourceNotFoundException(inner)
2083 }
2084 crate::operation::update_provisioned_model_throughput::UpdateProvisionedModelThroughputError::ThrottlingException(inner) => {
2085 Error::ThrottlingException(inner)
2086 }
2087 crate::operation::update_provisioned_model_throughput::UpdateProvisionedModelThroughputError::ValidationException(inner) => {
2088 Error::ValidationException(inner)
2089 }
2090 crate::operation::update_provisioned_model_throughput::UpdateProvisionedModelThroughputError::Unhandled(inner) => Error::Unhandled(inner),
2091 }
2092 }
2093}
2094impl ::std::error::Error for Error {
2095 fn source(&self) -> std::option::Option<&(dyn ::std::error::Error + 'static)> {
2096 match self {
2097 Error::AccessDeniedException(inner) => inner.source(),
2098 Error::ConflictException(inner) => inner.source(),
2099 Error::InternalServerException(inner) => inner.source(),
2100 Error::ResourceNotFoundException(inner) => inner.source(),
2101 Error::ServiceQuotaExceededException(inner) => inner.source(),
2102 Error::ServiceUnavailableException(inner) => inner.source(),
2103 Error::ThrottlingException(inner) => inner.source(),
2104 Error::TooManyTagsException(inner) => inner.source(),
2105 Error::ValidationException(inner) => inner.source(),
2106 Error::Unhandled(inner) => ::std::option::Option::Some(&*inner.source),
2107 }
2108 }
2109}
2110impl ::aws_types::request_id::RequestId for Error {
2111 fn request_id(&self) -> Option<&str> {
2112 match self {
2113 Self::AccessDeniedException(e) => e.request_id(),
2114 Self::ConflictException(e) => e.request_id(),
2115 Self::InternalServerException(e) => e.request_id(),
2116 Self::ResourceNotFoundException(e) => e.request_id(),
2117 Self::ServiceQuotaExceededException(e) => e.request_id(),
2118 Self::ServiceUnavailableException(e) => e.request_id(),
2119 Self::ThrottlingException(e) => e.request_id(),
2120 Self::TooManyTagsException(e) => e.request_id(),
2121 Self::ValidationException(e) => e.request_id(),
2122 Self::Unhandled(e) => e.meta.request_id(),
2123 }
2124 }
2125}