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