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