1#[non_exhaustive]
4#[derive(::std::fmt::Debug)]
5pub enum Error {
6 AccessDeniedException(crate::types::error::AccessDeniedException),
8 BadRequestException(crate::types::error::BadRequestException),
10 ConflictException(crate::types::error::ConflictException),
12 InternalServerErrorException(crate::types::error::InternalServerErrorException),
14 InternalServerException(crate::types::error::InternalServerException),
16 LimitExceededException(crate::types::error::LimitExceededException),
18 NotFoundException(crate::types::error::NotFoundException),
20 ResourceNotFoundException(crate::types::error::ResourceNotFoundException),
22 ThrottlingException(crate::types::error::ThrottlingException),
24 TooManyRequestsException(crate::types::error::TooManyRequestsException),
26 ValidationException(crate::types::error::ValidationException),
28 #[deprecated(note = "Matching `Unhandled` directly is not forwards compatible. Instead, match using a \
30 variable wildcard pattern and check `.code()`:
31 \
32 `err if err.code() == Some(\"SpecificExceptionCode\") => { /* handle the error */ }`
33 \
34 See [`ProvideErrorMetadata`](#impl-ProvideErrorMetadata-for-Error) for what information is available for the error.")]
35 Unhandled(crate::error::sealed_unhandled::Unhandled),
36}
37impl ::std::fmt::Display for Error {
38 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
39 match self {
40 Error::AccessDeniedException(inner) => inner.fmt(f),
41 Error::BadRequestException(inner) => inner.fmt(f),
42 Error::ConflictException(inner) => inner.fmt(f),
43 Error::InternalServerErrorException(inner) => inner.fmt(f),
44 Error::InternalServerException(inner) => inner.fmt(f),
45 Error::LimitExceededException(inner) => inner.fmt(f),
46 Error::NotFoundException(inner) => inner.fmt(f),
47 Error::ResourceNotFoundException(inner) => inner.fmt(f),
48 Error::ThrottlingException(inner) => inner.fmt(f),
49 Error::TooManyRequestsException(inner) => inner.fmt(f),
50 Error::ValidationException(inner) => inner.fmt(f),
51 Error::Unhandled(_) => {
52 if let ::std::option::Option::Some(code) = ::aws_smithy_types::error::metadata::ProvideErrorMetadata::code(self) {
53 write!(f, "unhandled error ({code})")
54 } else {
55 f.write_str("unhandled error")
56 }
57 }
58 }
59 }
60}
61impl From<::aws_smithy_types::error::operation::BuildError> for Error {
62 fn from(value: ::aws_smithy_types::error::operation::BuildError) -> Self {
63 Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
64 source: value.into(),
65 meta: ::std::default::Default::default(),
66 })
67 }
68}
69impl ::aws_smithy_types::error::metadata::ProvideErrorMetadata for Error {
70 fn meta(&self) -> &::aws_smithy_types::error::metadata::ErrorMetadata {
71 match self {
72 Self::AccessDeniedException(inner) => inner.meta(),
73 Self::BadRequestException(inner) => inner.meta(),
74 Self::ConflictException(inner) => inner.meta(),
75 Self::InternalServerErrorException(inner) => inner.meta(),
76 Self::InternalServerException(inner) => inner.meta(),
77 Self::LimitExceededException(inner) => inner.meta(),
78 Self::NotFoundException(inner) => inner.meta(),
79 Self::ResourceNotFoundException(inner) => inner.meta(),
80 Self::ThrottlingException(inner) => inner.meta(),
81 Self::TooManyRequestsException(inner) => inner.meta(),
82 Self::ValidationException(inner) => inner.meta(),
83 Self::Unhandled(inner) => &inner.meta,
84 }
85 }
86}
87impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::create_monitor::CreateMonitorError, R>> for Error
88where
89 R: Send + Sync + std::fmt::Debug + 'static,
90{
91 fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::create_monitor::CreateMonitorError, R>) -> Self {
92 match err {
93 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
94 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
95 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
96 source: err.into(),
97 }),
98 }
99 }
100}
101impl From<crate::operation::create_monitor::CreateMonitorError> for Error {
102 fn from(err: crate::operation::create_monitor::CreateMonitorError) -> Self {
103 match err {
104 crate::operation::create_monitor::CreateMonitorError::AccessDeniedException(inner) => Error::AccessDeniedException(inner),
105 crate::operation::create_monitor::CreateMonitorError::ConflictException(inner) => Error::ConflictException(inner),
106 crate::operation::create_monitor::CreateMonitorError::InternalServerException(inner) => Error::InternalServerException(inner),
107 crate::operation::create_monitor::CreateMonitorError::LimitExceededException(inner) => Error::LimitExceededException(inner),
108 crate::operation::create_monitor::CreateMonitorError::ThrottlingException(inner) => Error::ThrottlingException(inner),
109 crate::operation::create_monitor::CreateMonitorError::ValidationException(inner) => Error::ValidationException(inner),
110 crate::operation::create_monitor::CreateMonitorError::Unhandled(inner) => Error::Unhandled(inner),
111 }
112 }
113}
114impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::delete_monitor::DeleteMonitorError, R>> for Error
115where
116 R: Send + Sync + std::fmt::Debug + 'static,
117{
118 fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::delete_monitor::DeleteMonitorError, R>) -> Self {
119 match err {
120 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
121 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
122 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
123 source: err.into(),
124 }),
125 }
126 }
127}
128impl From<crate::operation::delete_monitor::DeleteMonitorError> for Error {
129 fn from(err: crate::operation::delete_monitor::DeleteMonitorError) -> Self {
130 match err {
131 crate::operation::delete_monitor::DeleteMonitorError::AccessDeniedException(inner) => Error::AccessDeniedException(inner),
132 crate::operation::delete_monitor::DeleteMonitorError::InternalServerException(inner) => Error::InternalServerException(inner),
133 crate::operation::delete_monitor::DeleteMonitorError::ThrottlingException(inner) => Error::ThrottlingException(inner),
134 crate::operation::delete_monitor::DeleteMonitorError::ValidationException(inner) => Error::ValidationException(inner),
135 crate::operation::delete_monitor::DeleteMonitorError::Unhandled(inner) => Error::Unhandled(inner),
136 }
137 }
138}
139impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::get_health_event::GetHealthEventError, R>> for Error
140where
141 R: Send + Sync + std::fmt::Debug + 'static,
142{
143 fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::get_health_event::GetHealthEventError, R>) -> Self {
144 match err {
145 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
146 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
147 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
148 source: err.into(),
149 }),
150 }
151 }
152}
153impl From<crate::operation::get_health_event::GetHealthEventError> for Error {
154 fn from(err: crate::operation::get_health_event::GetHealthEventError) -> Self {
155 match err {
156 crate::operation::get_health_event::GetHealthEventError::AccessDeniedException(inner) => Error::AccessDeniedException(inner),
157 crate::operation::get_health_event::GetHealthEventError::InternalServerException(inner) => Error::InternalServerException(inner),
158 crate::operation::get_health_event::GetHealthEventError::ThrottlingException(inner) => Error::ThrottlingException(inner),
159 crate::operation::get_health_event::GetHealthEventError::ValidationException(inner) => Error::ValidationException(inner),
160 crate::operation::get_health_event::GetHealthEventError::Unhandled(inner) => Error::Unhandled(inner),
161 }
162 }
163}
164impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::get_internet_event::GetInternetEventError, R>> for Error
165where
166 R: Send + Sync + std::fmt::Debug + 'static,
167{
168 fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::get_internet_event::GetInternetEventError, R>) -> Self {
169 match err {
170 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
171 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
172 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
173 source: err.into(),
174 }),
175 }
176 }
177}
178impl From<crate::operation::get_internet_event::GetInternetEventError> for Error {
179 fn from(err: crate::operation::get_internet_event::GetInternetEventError) -> Self {
180 match err {
181 crate::operation::get_internet_event::GetInternetEventError::AccessDeniedException(inner) => Error::AccessDeniedException(inner),
182 crate::operation::get_internet_event::GetInternetEventError::InternalServerException(inner) => Error::InternalServerException(inner),
183 crate::operation::get_internet_event::GetInternetEventError::ThrottlingException(inner) => Error::ThrottlingException(inner),
184 crate::operation::get_internet_event::GetInternetEventError::ValidationException(inner) => Error::ValidationException(inner),
185 crate::operation::get_internet_event::GetInternetEventError::Unhandled(inner) => Error::Unhandled(inner),
186 }
187 }
188}
189impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::get_monitor::GetMonitorError, R>> for Error
190where
191 R: Send + Sync + std::fmt::Debug + 'static,
192{
193 fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::get_monitor::GetMonitorError, R>) -> Self {
194 match err {
195 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
196 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
197 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
198 source: err.into(),
199 }),
200 }
201 }
202}
203impl From<crate::operation::get_monitor::GetMonitorError> for Error {
204 fn from(err: crate::operation::get_monitor::GetMonitorError) -> Self {
205 match err {
206 crate::operation::get_monitor::GetMonitorError::AccessDeniedException(inner) => Error::AccessDeniedException(inner),
207 crate::operation::get_monitor::GetMonitorError::InternalServerException(inner) => Error::InternalServerException(inner),
208 crate::operation::get_monitor::GetMonitorError::ThrottlingException(inner) => Error::ThrottlingException(inner),
209 crate::operation::get_monitor::GetMonitorError::ValidationException(inner) => Error::ValidationException(inner),
210 crate::operation::get_monitor::GetMonitorError::Unhandled(inner) => Error::Unhandled(inner),
211 }
212 }
213}
214impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::get_query_results::GetQueryResultsError, R>> for Error
215where
216 R: Send + Sync + std::fmt::Debug + 'static,
217{
218 fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::get_query_results::GetQueryResultsError, R>) -> Self {
219 match err {
220 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
221 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
222 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
223 source: err.into(),
224 }),
225 }
226 }
227}
228impl From<crate::operation::get_query_results::GetQueryResultsError> for Error {
229 fn from(err: crate::operation::get_query_results::GetQueryResultsError) -> Self {
230 match err {
231 crate::operation::get_query_results::GetQueryResultsError::AccessDeniedException(inner) => Error::AccessDeniedException(inner),
232 crate::operation::get_query_results::GetQueryResultsError::InternalServerException(inner) => Error::InternalServerException(inner),
233 crate::operation::get_query_results::GetQueryResultsError::LimitExceededException(inner) => Error::LimitExceededException(inner),
234 crate::operation::get_query_results::GetQueryResultsError::ThrottlingException(inner) => Error::ThrottlingException(inner),
235 crate::operation::get_query_results::GetQueryResultsError::ValidationException(inner) => Error::ValidationException(inner),
236 crate::operation::get_query_results::GetQueryResultsError::Unhandled(inner) => Error::Unhandled(inner),
237 }
238 }
239}
240impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::get_query_status::GetQueryStatusError, R>> for Error
241where
242 R: Send + Sync + std::fmt::Debug + 'static,
243{
244 fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::get_query_status::GetQueryStatusError, R>) -> Self {
245 match err {
246 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
247 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
248 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
249 source: err.into(),
250 }),
251 }
252 }
253}
254impl From<crate::operation::get_query_status::GetQueryStatusError> for Error {
255 fn from(err: crate::operation::get_query_status::GetQueryStatusError) -> Self {
256 match err {
257 crate::operation::get_query_status::GetQueryStatusError::AccessDeniedException(inner) => Error::AccessDeniedException(inner),
258 crate::operation::get_query_status::GetQueryStatusError::InternalServerException(inner) => Error::InternalServerException(inner),
259 crate::operation::get_query_status::GetQueryStatusError::LimitExceededException(inner) => Error::LimitExceededException(inner),
260 crate::operation::get_query_status::GetQueryStatusError::ThrottlingException(inner) => Error::ThrottlingException(inner),
261 crate::operation::get_query_status::GetQueryStatusError::ValidationException(inner) => Error::ValidationException(inner),
262 crate::operation::get_query_status::GetQueryStatusError::Unhandled(inner) => Error::Unhandled(inner),
263 }
264 }
265}
266impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::list_health_events::ListHealthEventsError, R>> for Error
267where
268 R: Send + Sync + std::fmt::Debug + 'static,
269{
270 fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::list_health_events::ListHealthEventsError, R>) -> Self {
271 match err {
272 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
273 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
274 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
275 source: err.into(),
276 }),
277 }
278 }
279}
280impl From<crate::operation::list_health_events::ListHealthEventsError> for Error {
281 fn from(err: crate::operation::list_health_events::ListHealthEventsError) -> Self {
282 match err {
283 crate::operation::list_health_events::ListHealthEventsError::AccessDeniedException(inner) => Error::AccessDeniedException(inner),
284 crate::operation::list_health_events::ListHealthEventsError::InternalServerException(inner) => Error::InternalServerException(inner),
285 crate::operation::list_health_events::ListHealthEventsError::ThrottlingException(inner) => Error::ThrottlingException(inner),
286 crate::operation::list_health_events::ListHealthEventsError::ValidationException(inner) => Error::ValidationException(inner),
287 crate::operation::list_health_events::ListHealthEventsError::Unhandled(inner) => Error::Unhandled(inner),
288 }
289 }
290}
291impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::list_internet_events::ListInternetEventsError, R>> for Error
292where
293 R: Send + Sync + std::fmt::Debug + 'static,
294{
295 fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::list_internet_events::ListInternetEventsError, R>) -> Self {
296 match err {
297 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
298 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
299 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
300 source: err.into(),
301 }),
302 }
303 }
304}
305impl From<crate::operation::list_internet_events::ListInternetEventsError> for Error {
306 fn from(err: crate::operation::list_internet_events::ListInternetEventsError) -> Self {
307 match err {
308 crate::operation::list_internet_events::ListInternetEventsError::AccessDeniedException(inner) => Error::AccessDeniedException(inner),
309 crate::operation::list_internet_events::ListInternetEventsError::InternalServerException(inner) => Error::InternalServerException(inner),
310 crate::operation::list_internet_events::ListInternetEventsError::ThrottlingException(inner) => Error::ThrottlingException(inner),
311 crate::operation::list_internet_events::ListInternetEventsError::ValidationException(inner) => Error::ValidationException(inner),
312 crate::operation::list_internet_events::ListInternetEventsError::Unhandled(inner) => Error::Unhandled(inner),
313 }
314 }
315}
316impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::list_monitors::ListMonitorsError, 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::list_monitors::ListMonitorsError, 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::list_monitors::ListMonitorsError> for Error {
331 fn from(err: crate::operation::list_monitors::ListMonitorsError) -> Self {
332 match err {
333 crate::operation::list_monitors::ListMonitorsError::AccessDeniedException(inner) => Error::AccessDeniedException(inner),
334 crate::operation::list_monitors::ListMonitorsError::InternalServerException(inner) => Error::InternalServerException(inner),
335 crate::operation::list_monitors::ListMonitorsError::ThrottlingException(inner) => Error::ThrottlingException(inner),
336 crate::operation::list_monitors::ListMonitorsError::ValidationException(inner) => Error::ValidationException(inner),
337 crate::operation::list_monitors::ListMonitorsError::Unhandled(inner) => Error::Unhandled(inner),
338 }
339 }
340}
341impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::list_tags_for_resource::ListTagsForResourceError, R>> for Error
342where
343 R: Send + Sync + std::fmt::Debug + 'static,
344{
345 fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::list_tags_for_resource::ListTagsForResourceError, R>) -> Self {
346 match err {
347 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
348 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
349 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
350 source: err.into(),
351 }),
352 }
353 }
354}
355impl From<crate::operation::list_tags_for_resource::ListTagsForResourceError> for Error {
356 fn from(err: crate::operation::list_tags_for_resource::ListTagsForResourceError) -> Self {
357 match err {
358 crate::operation::list_tags_for_resource::ListTagsForResourceError::AccessDeniedException(inner) => Error::AccessDeniedException(inner),
359 crate::operation::list_tags_for_resource::ListTagsForResourceError::BadRequestException(inner) => Error::BadRequestException(inner),
360 crate::operation::list_tags_for_resource::ListTagsForResourceError::InternalServerErrorException(inner) => {
361 Error::InternalServerErrorException(inner)
362 }
363 crate::operation::list_tags_for_resource::ListTagsForResourceError::NotFoundException(inner) => Error::NotFoundException(inner),
364 crate::operation::list_tags_for_resource::ListTagsForResourceError::TooManyRequestsException(inner) => {
365 Error::TooManyRequestsException(inner)
366 }
367 crate::operation::list_tags_for_resource::ListTagsForResourceError::Unhandled(inner) => Error::Unhandled(inner),
368 }
369 }
370}
371impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::start_query::StartQueryError, R>> for Error
372where
373 R: Send + Sync + std::fmt::Debug + 'static,
374{
375 fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::start_query::StartQueryError, R>) -> Self {
376 match err {
377 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
378 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
379 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
380 source: err.into(),
381 }),
382 }
383 }
384}
385impl From<crate::operation::start_query::StartQueryError> for Error {
386 fn from(err: crate::operation::start_query::StartQueryError) -> Self {
387 match err {
388 crate::operation::start_query::StartQueryError::AccessDeniedException(inner) => Error::AccessDeniedException(inner),
389 crate::operation::start_query::StartQueryError::InternalServerException(inner) => Error::InternalServerException(inner),
390 crate::operation::start_query::StartQueryError::LimitExceededException(inner) => Error::LimitExceededException(inner),
391 crate::operation::start_query::StartQueryError::ThrottlingException(inner) => Error::ThrottlingException(inner),
392 crate::operation::start_query::StartQueryError::ValidationException(inner) => Error::ValidationException(inner),
393 crate::operation::start_query::StartQueryError::Unhandled(inner) => Error::Unhandled(inner),
394 }
395 }
396}
397impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::stop_query::StopQueryError, R>> for Error
398where
399 R: Send + Sync + std::fmt::Debug + 'static,
400{
401 fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::stop_query::StopQueryError, R>) -> 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::stop_query::StopQueryError> for Error {
412 fn from(err: crate::operation::stop_query::StopQueryError) -> Self {
413 match err {
414 crate::operation::stop_query::StopQueryError::AccessDeniedException(inner) => Error::AccessDeniedException(inner),
415 crate::operation::stop_query::StopQueryError::InternalServerException(inner) => Error::InternalServerException(inner),
416 crate::operation::stop_query::StopQueryError::LimitExceededException(inner) => Error::LimitExceededException(inner),
417 crate::operation::stop_query::StopQueryError::ThrottlingException(inner) => Error::ThrottlingException(inner),
418 crate::operation::stop_query::StopQueryError::ValidationException(inner) => Error::ValidationException(inner),
419 crate::operation::stop_query::StopQueryError::Unhandled(inner) => Error::Unhandled(inner),
420 }
421 }
422}
423impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::tag_resource::TagResourceError, R>> for Error
424where
425 R: Send + Sync + std::fmt::Debug + 'static,
426{
427 fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::tag_resource::TagResourceError, R>) -> Self {
428 match err {
429 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
430 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
431 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
432 source: err.into(),
433 }),
434 }
435 }
436}
437impl From<crate::operation::tag_resource::TagResourceError> for Error {
438 fn from(err: crate::operation::tag_resource::TagResourceError) -> Self {
439 match err {
440 crate::operation::tag_resource::TagResourceError::AccessDeniedException(inner) => Error::AccessDeniedException(inner),
441 crate::operation::tag_resource::TagResourceError::BadRequestException(inner) => Error::BadRequestException(inner),
442 crate::operation::tag_resource::TagResourceError::InternalServerErrorException(inner) => Error::InternalServerErrorException(inner),
443 crate::operation::tag_resource::TagResourceError::NotFoundException(inner) => Error::NotFoundException(inner),
444 crate::operation::tag_resource::TagResourceError::TooManyRequestsException(inner) => Error::TooManyRequestsException(inner),
445 crate::operation::tag_resource::TagResourceError::Unhandled(inner) => Error::Unhandled(inner),
446 }
447 }
448}
449impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::untag_resource::UntagResourceError, R>> for Error
450where
451 R: Send + Sync + std::fmt::Debug + 'static,
452{
453 fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::untag_resource::UntagResourceError, R>) -> Self {
454 match err {
455 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
456 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
457 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
458 source: err.into(),
459 }),
460 }
461 }
462}
463impl From<crate::operation::untag_resource::UntagResourceError> for Error {
464 fn from(err: crate::operation::untag_resource::UntagResourceError) -> Self {
465 match err {
466 crate::operation::untag_resource::UntagResourceError::AccessDeniedException(inner) => Error::AccessDeniedException(inner),
467 crate::operation::untag_resource::UntagResourceError::BadRequestException(inner) => Error::BadRequestException(inner),
468 crate::operation::untag_resource::UntagResourceError::InternalServerErrorException(inner) => Error::InternalServerErrorException(inner),
469 crate::operation::untag_resource::UntagResourceError::NotFoundException(inner) => Error::NotFoundException(inner),
470 crate::operation::untag_resource::UntagResourceError::TooManyRequestsException(inner) => Error::TooManyRequestsException(inner),
471 crate::operation::untag_resource::UntagResourceError::Unhandled(inner) => Error::Unhandled(inner),
472 }
473 }
474}
475impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::update_monitor::UpdateMonitorError, R>> for Error
476where
477 R: Send + Sync + std::fmt::Debug + 'static,
478{
479 fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::update_monitor::UpdateMonitorError, R>) -> Self {
480 match err {
481 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
482 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
483 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
484 source: err.into(),
485 }),
486 }
487 }
488}
489impl From<crate::operation::update_monitor::UpdateMonitorError> for Error {
490 fn from(err: crate::operation::update_monitor::UpdateMonitorError) -> Self {
491 match err {
492 crate::operation::update_monitor::UpdateMonitorError::AccessDeniedException(inner) => Error::AccessDeniedException(inner),
493 crate::operation::update_monitor::UpdateMonitorError::InternalServerException(inner) => Error::InternalServerException(inner),
494 crate::operation::update_monitor::UpdateMonitorError::LimitExceededException(inner) => Error::LimitExceededException(inner),
495 crate::operation::update_monitor::UpdateMonitorError::ResourceNotFoundException(inner) => Error::ResourceNotFoundException(inner),
496 crate::operation::update_monitor::UpdateMonitorError::ThrottlingException(inner) => Error::ThrottlingException(inner),
497 crate::operation::update_monitor::UpdateMonitorError::ValidationException(inner) => Error::ValidationException(inner),
498 crate::operation::update_monitor::UpdateMonitorError::Unhandled(inner) => Error::Unhandled(inner),
499 }
500 }
501}
502impl ::std::error::Error for Error {
503 fn source(&self) -> std::option::Option<&(dyn ::std::error::Error + 'static)> {
504 match self {
505 Error::AccessDeniedException(inner) => inner.source(),
506 Error::BadRequestException(inner) => inner.source(),
507 Error::ConflictException(inner) => inner.source(),
508 Error::InternalServerErrorException(inner) => inner.source(),
509 Error::InternalServerException(inner) => inner.source(),
510 Error::LimitExceededException(inner) => inner.source(),
511 Error::NotFoundException(inner) => inner.source(),
512 Error::ResourceNotFoundException(inner) => inner.source(),
513 Error::ThrottlingException(inner) => inner.source(),
514 Error::TooManyRequestsException(inner) => inner.source(),
515 Error::ValidationException(inner) => inner.source(),
516 Error::Unhandled(inner) => ::std::option::Option::Some(&*inner.source),
517 }
518 }
519}
520impl ::aws_types::request_id::RequestId for Error {
521 fn request_id(&self) -> Option<&str> {
522 match self {
523 Self::AccessDeniedException(e) => e.request_id(),
524 Self::BadRequestException(e) => e.request_id(),
525 Self::ConflictException(e) => e.request_id(),
526 Self::InternalServerErrorException(e) => e.request_id(),
527 Self::InternalServerException(e) => e.request_id(),
528 Self::LimitExceededException(e) => e.request_id(),
529 Self::NotFoundException(e) => e.request_id(),
530 Self::ResourceNotFoundException(e) => e.request_id(),
531 Self::ThrottlingException(e) => e.request_id(),
532 Self::TooManyRequestsException(e) => e.request_id(),
533 Self::ValidationException(e) => e.request_id(),
534 Self::Unhandled(e) => e.meta.request_id(),
535 }
536 }
537}