1#[non_exhaustive]
4#[derive(::std::fmt::Debug)]
5pub enum Error {
6 AccessDeniedException(crate::types::error::AccessDeniedException),
8 ConflictException(crate::types::error::ConflictException),
11 InternalServerException(crate::types::error::InternalServerException),
13 ResourceNotFoundException(crate::types::error::ResourceNotFoundException),
16 ServiceQuotaExceededException(crate::types::error::ServiceQuotaExceededException),
18 ThrottlingException(crate::types::error::ThrottlingException),
20 ValidationException(crate::types::error::ValidationException),
22 #[deprecated(note = "Matching `Unhandled` directly is not forwards compatible. Instead, match using a \
24 variable wildcard pattern and check `.code()`:
25 \
26 `err if err.code() == Some(\"SpecificExceptionCode\") => { /* handle the error */ }`
27 \
28 See [`ProvideErrorMetadata`](#impl-ProvideErrorMetadata-for-Error) for what information is available for the error.")]
29 Unhandled(crate::error::sealed_unhandled::Unhandled),
30}
31impl ::std::fmt::Display for Error {
32 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
33 match self {
34 Error::AccessDeniedException(inner) => inner.fmt(f),
35 Error::ConflictException(inner) => inner.fmt(f),
36 Error::InternalServerException(inner) => inner.fmt(f),
37 Error::ResourceNotFoundException(inner) => inner.fmt(f),
38 Error::ServiceQuotaExceededException(inner) => inner.fmt(f),
39 Error::ThrottlingException(inner) => inner.fmt(f),
40 Error::ValidationException(inner) => inner.fmt(f),
41 Error::Unhandled(_) => {
42 if let ::std::option::Option::Some(code) = ::aws_smithy_types::error::metadata::ProvideErrorMetadata::code(self) {
43 write!(f, "unhandled error ({code})")
44 } else {
45 f.write_str("unhandled error")
46 }
47 }
48 }
49 }
50}
51impl From<::aws_smithy_types::error::operation::BuildError> for Error {
52 fn from(value: ::aws_smithy_types::error::operation::BuildError) -> Self {
53 Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
54 source: value.into(),
55 meta: ::std::default::Default::default(),
56 })
57 }
58}
59impl ::aws_smithy_types::error::metadata::ProvideErrorMetadata for Error {
60 fn meta(&self) -> &::aws_smithy_types::error::metadata::ErrorMetadata {
61 match self {
62 Self::AccessDeniedException(inner) => inner.meta(),
63 Self::ConflictException(inner) => inner.meta(),
64 Self::InternalServerException(inner) => inner.meta(),
65 Self::ResourceNotFoundException(inner) => inner.meta(),
66 Self::ServiceQuotaExceededException(inner) => inner.meta(),
67 Self::ThrottlingException(inner) => inner.meta(),
68 Self::ValidationException(inner) => inner.meta(),
69 Self::Unhandled(inner) => &inner.meta,
70 }
71 }
72}
73impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::get_search_job::GetSearchJobError, R>> for Error
74where
75 R: Send + Sync + std::fmt::Debug + 'static,
76{
77 fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::get_search_job::GetSearchJobError, R>) -> Self {
78 match err {
79 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
80 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
81 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
82 source: err.into(),
83 }),
84 }
85 }
86}
87impl From<crate::operation::get_search_job::GetSearchJobError> for Error {
88 fn from(err: crate::operation::get_search_job::GetSearchJobError) -> Self {
89 match err {
90 crate::operation::get_search_job::GetSearchJobError::ResourceNotFoundException(inner) => Error::ResourceNotFoundException(inner),
91 crate::operation::get_search_job::GetSearchJobError::AccessDeniedException(inner) => Error::AccessDeniedException(inner),
92 crate::operation::get_search_job::GetSearchJobError::InternalServerException(inner) => Error::InternalServerException(inner),
93 crate::operation::get_search_job::GetSearchJobError::ThrottlingException(inner) => Error::ThrottlingException(inner),
94 crate::operation::get_search_job::GetSearchJobError::ValidationException(inner) => Error::ValidationException(inner),
95 crate::operation::get_search_job::GetSearchJobError::Unhandled(inner) => Error::Unhandled(inner),
96 }
97 }
98}
99impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::get_search_result_export_job::GetSearchResultExportJobError, R>>
100 for Error
101where
102 R: Send + Sync + std::fmt::Debug + 'static,
103{
104 fn from(
105 err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::get_search_result_export_job::GetSearchResultExportJobError, R>,
106 ) -> Self {
107 match err {
108 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
109 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
110 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
111 source: err.into(),
112 }),
113 }
114 }
115}
116impl From<crate::operation::get_search_result_export_job::GetSearchResultExportJobError> for Error {
117 fn from(err: crate::operation::get_search_result_export_job::GetSearchResultExportJobError) -> Self {
118 match err {
119 crate::operation::get_search_result_export_job::GetSearchResultExportJobError::ResourceNotFoundException(inner) => {
120 Error::ResourceNotFoundException(inner)
121 }
122 crate::operation::get_search_result_export_job::GetSearchResultExportJobError::AccessDeniedException(inner) => {
123 Error::AccessDeniedException(inner)
124 }
125 crate::operation::get_search_result_export_job::GetSearchResultExportJobError::InternalServerException(inner) => {
126 Error::InternalServerException(inner)
127 }
128 crate::operation::get_search_result_export_job::GetSearchResultExportJobError::ThrottlingException(inner) => {
129 Error::ThrottlingException(inner)
130 }
131 crate::operation::get_search_result_export_job::GetSearchResultExportJobError::ValidationException(inner) => {
132 Error::ValidationException(inner)
133 }
134 crate::operation::get_search_result_export_job::GetSearchResultExportJobError::Unhandled(inner) => Error::Unhandled(inner),
135 }
136 }
137}
138impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::list_search_job_backups::ListSearchJobBackupsError, R>> for Error
139where
140 R: Send + Sync + std::fmt::Debug + 'static,
141{
142 fn from(
143 err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::list_search_job_backups::ListSearchJobBackupsError, R>,
144 ) -> Self {
145 match err {
146 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
147 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
148 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
149 source: err.into(),
150 }),
151 }
152 }
153}
154impl From<crate::operation::list_search_job_backups::ListSearchJobBackupsError> for Error {
155 fn from(err: crate::operation::list_search_job_backups::ListSearchJobBackupsError) -> Self {
156 match err {
157 crate::operation::list_search_job_backups::ListSearchJobBackupsError::ResourceNotFoundException(inner) => {
158 Error::ResourceNotFoundException(inner)
159 }
160 crate::operation::list_search_job_backups::ListSearchJobBackupsError::AccessDeniedException(inner) => Error::AccessDeniedException(inner),
161 crate::operation::list_search_job_backups::ListSearchJobBackupsError::InternalServerException(inner) => {
162 Error::InternalServerException(inner)
163 }
164 crate::operation::list_search_job_backups::ListSearchJobBackupsError::ThrottlingException(inner) => Error::ThrottlingException(inner),
165 crate::operation::list_search_job_backups::ListSearchJobBackupsError::ValidationException(inner) => Error::ValidationException(inner),
166 crate::operation::list_search_job_backups::ListSearchJobBackupsError::Unhandled(inner) => Error::Unhandled(inner),
167 }
168 }
169}
170impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::list_search_job_results::ListSearchJobResultsError, R>> for Error
171where
172 R: Send + Sync + std::fmt::Debug + 'static,
173{
174 fn from(
175 err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::list_search_job_results::ListSearchJobResultsError, R>,
176 ) -> Self {
177 match err {
178 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
179 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
180 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
181 source: err.into(),
182 }),
183 }
184 }
185}
186impl From<crate::operation::list_search_job_results::ListSearchJobResultsError> for Error {
187 fn from(err: crate::operation::list_search_job_results::ListSearchJobResultsError) -> Self {
188 match err {
189 crate::operation::list_search_job_results::ListSearchJobResultsError::ResourceNotFoundException(inner) => {
190 Error::ResourceNotFoundException(inner)
191 }
192 crate::operation::list_search_job_results::ListSearchJobResultsError::AccessDeniedException(inner) => Error::AccessDeniedException(inner),
193 crate::operation::list_search_job_results::ListSearchJobResultsError::InternalServerException(inner) => {
194 Error::InternalServerException(inner)
195 }
196 crate::operation::list_search_job_results::ListSearchJobResultsError::ThrottlingException(inner) => Error::ThrottlingException(inner),
197 crate::operation::list_search_job_results::ListSearchJobResultsError::ValidationException(inner) => Error::ValidationException(inner),
198 crate::operation::list_search_job_results::ListSearchJobResultsError::Unhandled(inner) => Error::Unhandled(inner),
199 }
200 }
201}
202impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::list_search_jobs::ListSearchJobsError, R>> for Error
203where
204 R: Send + Sync + std::fmt::Debug + 'static,
205{
206 fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::list_search_jobs::ListSearchJobsError, R>) -> Self {
207 match err {
208 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
209 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
210 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
211 source: err.into(),
212 }),
213 }
214 }
215}
216impl From<crate::operation::list_search_jobs::ListSearchJobsError> for Error {
217 fn from(err: crate::operation::list_search_jobs::ListSearchJobsError) -> Self {
218 match err {
219 crate::operation::list_search_jobs::ListSearchJobsError::AccessDeniedException(inner) => Error::AccessDeniedException(inner),
220 crate::operation::list_search_jobs::ListSearchJobsError::InternalServerException(inner) => Error::InternalServerException(inner),
221 crate::operation::list_search_jobs::ListSearchJobsError::ThrottlingException(inner) => Error::ThrottlingException(inner),
222 crate::operation::list_search_jobs::ListSearchJobsError::ValidationException(inner) => Error::ValidationException(inner),
223 crate::operation::list_search_jobs::ListSearchJobsError::Unhandled(inner) => Error::Unhandled(inner),
224 }
225 }
226}
227impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::list_search_result_export_jobs::ListSearchResultExportJobsError, R>>
228 for Error
229where
230 R: Send + Sync + std::fmt::Debug + 'static,
231{
232 fn from(
233 err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::list_search_result_export_jobs::ListSearchResultExportJobsError, R>,
234 ) -> Self {
235 match err {
236 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
237 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
238 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
239 source: err.into(),
240 }),
241 }
242 }
243}
244impl From<crate::operation::list_search_result_export_jobs::ListSearchResultExportJobsError> for Error {
245 fn from(err: crate::operation::list_search_result_export_jobs::ListSearchResultExportJobsError) -> Self {
246 match err {
247 crate::operation::list_search_result_export_jobs::ListSearchResultExportJobsError::ResourceNotFoundException(inner) => {
248 Error::ResourceNotFoundException(inner)
249 }
250 crate::operation::list_search_result_export_jobs::ListSearchResultExportJobsError::ServiceQuotaExceededException(inner) => {
251 Error::ServiceQuotaExceededException(inner)
252 }
253 crate::operation::list_search_result_export_jobs::ListSearchResultExportJobsError::AccessDeniedException(inner) => {
254 Error::AccessDeniedException(inner)
255 }
256 crate::operation::list_search_result_export_jobs::ListSearchResultExportJobsError::InternalServerException(inner) => {
257 Error::InternalServerException(inner)
258 }
259 crate::operation::list_search_result_export_jobs::ListSearchResultExportJobsError::ThrottlingException(inner) => {
260 Error::ThrottlingException(inner)
261 }
262 crate::operation::list_search_result_export_jobs::ListSearchResultExportJobsError::ValidationException(inner) => {
263 Error::ValidationException(inner)
264 }
265 crate::operation::list_search_result_export_jobs::ListSearchResultExportJobsError::Unhandled(inner) => Error::Unhandled(inner),
266 }
267 }
268}
269impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::list_tags_for_resource::ListTagsForResourceError, R>> for Error
270where
271 R: Send + Sync + std::fmt::Debug + 'static,
272{
273 fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::list_tags_for_resource::ListTagsForResourceError, R>) -> Self {
274 match err {
275 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
276 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
277 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
278 source: err.into(),
279 }),
280 }
281 }
282}
283impl From<crate::operation::list_tags_for_resource::ListTagsForResourceError> for Error {
284 fn from(err: crate::operation::list_tags_for_resource::ListTagsForResourceError) -> Self {
285 match err {
286 crate::operation::list_tags_for_resource::ListTagsForResourceError::ResourceNotFoundException(inner) => {
287 Error::ResourceNotFoundException(inner)
288 }
289 crate::operation::list_tags_for_resource::ListTagsForResourceError::AccessDeniedException(inner) => Error::AccessDeniedException(inner),
290 crate::operation::list_tags_for_resource::ListTagsForResourceError::InternalServerException(inner) => {
291 Error::InternalServerException(inner)
292 }
293 crate::operation::list_tags_for_resource::ListTagsForResourceError::ThrottlingException(inner) => Error::ThrottlingException(inner),
294 crate::operation::list_tags_for_resource::ListTagsForResourceError::ValidationException(inner) => Error::ValidationException(inner),
295 crate::operation::list_tags_for_resource::ListTagsForResourceError::Unhandled(inner) => Error::Unhandled(inner),
296 }
297 }
298}
299impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::start_search_job::StartSearchJobError, R>> for Error
300where
301 R: Send + Sync + std::fmt::Debug + 'static,
302{
303 fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::start_search_job::StartSearchJobError, R>) -> Self {
304 match err {
305 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
306 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
307 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
308 source: err.into(),
309 }),
310 }
311 }
312}
313impl From<crate::operation::start_search_job::StartSearchJobError> for Error {
314 fn from(err: crate::operation::start_search_job::StartSearchJobError) -> Self {
315 match err {
316 crate::operation::start_search_job::StartSearchJobError::ConflictException(inner) => Error::ConflictException(inner),
317 crate::operation::start_search_job::StartSearchJobError::ResourceNotFoundException(inner) => Error::ResourceNotFoundException(inner),
318 crate::operation::start_search_job::StartSearchJobError::ServiceQuotaExceededException(inner) => {
319 Error::ServiceQuotaExceededException(inner)
320 }
321 crate::operation::start_search_job::StartSearchJobError::AccessDeniedException(inner) => Error::AccessDeniedException(inner),
322 crate::operation::start_search_job::StartSearchJobError::InternalServerException(inner) => Error::InternalServerException(inner),
323 crate::operation::start_search_job::StartSearchJobError::ThrottlingException(inner) => Error::ThrottlingException(inner),
324 crate::operation::start_search_job::StartSearchJobError::ValidationException(inner) => Error::ValidationException(inner),
325 crate::operation::start_search_job::StartSearchJobError::Unhandled(inner) => Error::Unhandled(inner),
326 }
327 }
328}
329impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::start_search_result_export_job::StartSearchResultExportJobError, R>>
330 for Error
331where
332 R: Send + Sync + std::fmt::Debug + 'static,
333{
334 fn from(
335 err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::start_search_result_export_job::StartSearchResultExportJobError, R>,
336 ) -> Self {
337 match err {
338 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
339 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
340 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
341 source: err.into(),
342 }),
343 }
344 }
345}
346impl From<crate::operation::start_search_result_export_job::StartSearchResultExportJobError> for Error {
347 fn from(err: crate::operation::start_search_result_export_job::StartSearchResultExportJobError) -> Self {
348 match err {
349 crate::operation::start_search_result_export_job::StartSearchResultExportJobError::ConflictException(inner) => {
350 Error::ConflictException(inner)
351 }
352 crate::operation::start_search_result_export_job::StartSearchResultExportJobError::ResourceNotFoundException(inner) => {
353 Error::ResourceNotFoundException(inner)
354 }
355 crate::operation::start_search_result_export_job::StartSearchResultExportJobError::ServiceQuotaExceededException(inner) => {
356 Error::ServiceQuotaExceededException(inner)
357 }
358 crate::operation::start_search_result_export_job::StartSearchResultExportJobError::AccessDeniedException(inner) => {
359 Error::AccessDeniedException(inner)
360 }
361 crate::operation::start_search_result_export_job::StartSearchResultExportJobError::InternalServerException(inner) => {
362 Error::InternalServerException(inner)
363 }
364 crate::operation::start_search_result_export_job::StartSearchResultExportJobError::ThrottlingException(inner) => {
365 Error::ThrottlingException(inner)
366 }
367 crate::operation::start_search_result_export_job::StartSearchResultExportJobError::ValidationException(inner) => {
368 Error::ValidationException(inner)
369 }
370 crate::operation::start_search_result_export_job::StartSearchResultExportJobError::Unhandled(inner) => Error::Unhandled(inner),
371 }
372 }
373}
374impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::stop_search_job::StopSearchJobError, R>> for Error
375where
376 R: Send + Sync + std::fmt::Debug + 'static,
377{
378 fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::stop_search_job::StopSearchJobError, R>) -> Self {
379 match err {
380 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
381 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
382 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
383 source: err.into(),
384 }),
385 }
386 }
387}
388impl From<crate::operation::stop_search_job::StopSearchJobError> for Error {
389 fn from(err: crate::operation::stop_search_job::StopSearchJobError) -> Self {
390 match err {
391 crate::operation::stop_search_job::StopSearchJobError::ConflictException(inner) => Error::ConflictException(inner),
392 crate::operation::stop_search_job::StopSearchJobError::ResourceNotFoundException(inner) => Error::ResourceNotFoundException(inner),
393 crate::operation::stop_search_job::StopSearchJobError::AccessDeniedException(inner) => Error::AccessDeniedException(inner),
394 crate::operation::stop_search_job::StopSearchJobError::InternalServerException(inner) => Error::InternalServerException(inner),
395 crate::operation::stop_search_job::StopSearchJobError::ThrottlingException(inner) => Error::ThrottlingException(inner),
396 crate::operation::stop_search_job::StopSearchJobError::ValidationException(inner) => Error::ValidationException(inner),
397 crate::operation::stop_search_job::StopSearchJobError::Unhandled(inner) => Error::Unhandled(inner),
398 }
399 }
400}
401impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::tag_resource::TagResourceError, R>> for Error
402where
403 R: Send + Sync + std::fmt::Debug + 'static,
404{
405 fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::tag_resource::TagResourceError, R>) -> Self {
406 match err {
407 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
408 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
409 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
410 source: err.into(),
411 }),
412 }
413 }
414}
415impl From<crate::operation::tag_resource::TagResourceError> for Error {
416 fn from(err: crate::operation::tag_resource::TagResourceError) -> Self {
417 match err {
418 crate::operation::tag_resource::TagResourceError::ResourceNotFoundException(inner) => Error::ResourceNotFoundException(inner),
419 crate::operation::tag_resource::TagResourceError::AccessDeniedException(inner) => Error::AccessDeniedException(inner),
420 crate::operation::tag_resource::TagResourceError::InternalServerException(inner) => Error::InternalServerException(inner),
421 crate::operation::tag_resource::TagResourceError::ThrottlingException(inner) => Error::ThrottlingException(inner),
422 crate::operation::tag_resource::TagResourceError::ValidationException(inner) => Error::ValidationException(inner),
423 crate::operation::tag_resource::TagResourceError::Unhandled(inner) => Error::Unhandled(inner),
424 }
425 }
426}
427impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::untag_resource::UntagResourceError, R>> for Error
428where
429 R: Send + Sync + std::fmt::Debug + 'static,
430{
431 fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::untag_resource::UntagResourceError, R>) -> Self {
432 match err {
433 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
434 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
435 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
436 source: err.into(),
437 }),
438 }
439 }
440}
441impl From<crate::operation::untag_resource::UntagResourceError> for Error {
442 fn from(err: crate::operation::untag_resource::UntagResourceError) -> Self {
443 match err {
444 crate::operation::untag_resource::UntagResourceError::ResourceNotFoundException(inner) => Error::ResourceNotFoundException(inner),
445 crate::operation::untag_resource::UntagResourceError::AccessDeniedException(inner) => Error::AccessDeniedException(inner),
446 crate::operation::untag_resource::UntagResourceError::InternalServerException(inner) => Error::InternalServerException(inner),
447 crate::operation::untag_resource::UntagResourceError::ThrottlingException(inner) => Error::ThrottlingException(inner),
448 crate::operation::untag_resource::UntagResourceError::ValidationException(inner) => Error::ValidationException(inner),
449 crate::operation::untag_resource::UntagResourceError::Unhandled(inner) => Error::Unhandled(inner),
450 }
451 }
452}
453impl ::std::error::Error for Error {
454 fn source(&self) -> std::option::Option<&(dyn ::std::error::Error + 'static)> {
455 match self {
456 Error::AccessDeniedException(inner) => inner.source(),
457 Error::ConflictException(inner) => inner.source(),
458 Error::InternalServerException(inner) => inner.source(),
459 Error::ResourceNotFoundException(inner) => inner.source(),
460 Error::ServiceQuotaExceededException(inner) => inner.source(),
461 Error::ThrottlingException(inner) => inner.source(),
462 Error::ValidationException(inner) => inner.source(),
463 Error::Unhandled(inner) => ::std::option::Option::Some(&*inner.source),
464 }
465 }
466}
467impl ::aws_types::request_id::RequestId for Error {
468 fn request_id(&self) -> Option<&str> {
469 match self {
470 Self::AccessDeniedException(e) => e.request_id(),
471 Self::ConflictException(e) => e.request_id(),
472 Self::InternalServerException(e) => e.request_id(),
473 Self::ResourceNotFoundException(e) => e.request_id(),
474 Self::ServiceQuotaExceededException(e) => e.request_id(),
475 Self::ThrottlingException(e) => e.request_id(),
476 Self::ValidationException(e) => e.request_id(),
477 Self::Unhandled(e) => e.meta.request_id(),
478 }
479 }
480}