1#[non_exhaustive]
4#[derive(::std::fmt::Debug)]
5pub enum Error {
6 AccessDeniedException(crate::types::error::AccessDeniedException),
8 AccessDeniedForDependencyException(crate::types::error::AccessDeniedForDependencyException),
10 InternalErrorException(crate::types::error::InternalErrorException),
12 InvalidOperationException(crate::types::error::InvalidOperationException),
14 InvalidPaginationTokenException(crate::types::error::InvalidPaginationTokenException),
16 InvalidParameterException(crate::types::error::InvalidParameterException),
18 InvalidResourceException(crate::types::error::InvalidResourceException),
20 LimitsExceededException(crate::types::error::LimitsExceededException),
22 LockedSubscriptionException(crate::types::error::LockedSubscriptionException),
24 NoAssociatedRoleException(crate::types::error::NoAssociatedRoleException),
26 OptimisticLockException(crate::types::error::OptimisticLockException),
28 ResourceAlreadyExistsException(crate::types::error::ResourceAlreadyExistsException),
30 ResourceNotFoundException(crate::types::error::ResourceNotFoundException),
32 #[deprecated(note = "Matching `Unhandled` directly is not forwards compatible. Instead, match using a \
34 variable wildcard pattern and check `.code()`:
35 \
36 `err if err.code() == Some(\"SpecificExceptionCode\") => { /* handle the error */ }`
37 \
38 See [`ProvideErrorMetadata`](#impl-ProvideErrorMetadata-for-Error) for what information is available for the error.")]
39 Unhandled(crate::error::sealed_unhandled::Unhandled),
40}
41impl ::std::fmt::Display for Error {
42 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
43 match self {
44 Error::AccessDeniedException(inner) => inner.fmt(f),
45 Error::AccessDeniedForDependencyException(inner) => inner.fmt(f),
46 Error::InternalErrorException(inner) => inner.fmt(f),
47 Error::InvalidOperationException(inner) => inner.fmt(f),
48 Error::InvalidPaginationTokenException(inner) => inner.fmt(f),
49 Error::InvalidParameterException(inner) => inner.fmt(f),
50 Error::InvalidResourceException(inner) => inner.fmt(f),
51 Error::LimitsExceededException(inner) => inner.fmt(f),
52 Error::LockedSubscriptionException(inner) => inner.fmt(f),
53 Error::NoAssociatedRoleException(inner) => inner.fmt(f),
54 Error::OptimisticLockException(inner) => inner.fmt(f),
55 Error::ResourceAlreadyExistsException(inner) => inner.fmt(f),
56 Error::ResourceNotFoundException(inner) => inner.fmt(f),
57 Error::Unhandled(_) => {
58 if let ::std::option::Option::Some(code) = ::aws_smithy_types::error::metadata::ProvideErrorMetadata::code(self) {
59 write!(f, "unhandled error ({code})")
60 } else {
61 f.write_str("unhandled error")
62 }
63 }
64 }
65 }
66}
67impl From<::aws_smithy_types::error::operation::BuildError> for Error {
68 fn from(value: ::aws_smithy_types::error::operation::BuildError) -> Self {
69 Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
70 source: value.into(),
71 meta: ::std::default::Default::default(),
72 })
73 }
74}
75impl ::aws_smithy_types::error::metadata::ProvideErrorMetadata for Error {
76 fn meta(&self) -> &::aws_smithy_types::error::metadata::ErrorMetadata {
77 match self {
78 Self::AccessDeniedException(inner) => inner.meta(),
79 Self::AccessDeniedForDependencyException(inner) => inner.meta(),
80 Self::InternalErrorException(inner) => inner.meta(),
81 Self::InvalidOperationException(inner) => inner.meta(),
82 Self::InvalidPaginationTokenException(inner) => inner.meta(),
83 Self::InvalidParameterException(inner) => inner.meta(),
84 Self::InvalidResourceException(inner) => inner.meta(),
85 Self::LimitsExceededException(inner) => inner.meta(),
86 Self::LockedSubscriptionException(inner) => inner.meta(),
87 Self::NoAssociatedRoleException(inner) => inner.meta(),
88 Self::OptimisticLockException(inner) => inner.meta(),
89 Self::ResourceAlreadyExistsException(inner) => inner.meta(),
90 Self::ResourceNotFoundException(inner) => inner.meta(),
91 Self::Unhandled(inner) => &inner.meta,
92 }
93 }
94}
95impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::associate_drt_log_bucket::AssociateDRTLogBucketError, R>> for Error
96where
97 R: Send + Sync + std::fmt::Debug + 'static,
98{
99 fn from(
100 err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::associate_drt_log_bucket::AssociateDRTLogBucketError, R>,
101 ) -> Self {
102 match err {
103 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
104 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
105 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
106 source: err.into(),
107 }),
108 }
109 }
110}
111impl From<crate::operation::associate_drt_log_bucket::AssociateDRTLogBucketError> for Error {
112 fn from(err: crate::operation::associate_drt_log_bucket::AssociateDRTLogBucketError) -> Self {
113 match err {
114 crate::operation::associate_drt_log_bucket::AssociateDRTLogBucketError::AccessDeniedForDependencyException(inner) => {
115 Error::AccessDeniedForDependencyException(inner)
116 }
117 crate::operation::associate_drt_log_bucket::AssociateDRTLogBucketError::InternalErrorException(inner) => {
118 Error::InternalErrorException(inner)
119 }
120 crate::operation::associate_drt_log_bucket::AssociateDRTLogBucketError::InvalidOperationException(inner) => {
121 Error::InvalidOperationException(inner)
122 }
123 crate::operation::associate_drt_log_bucket::AssociateDRTLogBucketError::InvalidParameterException(inner) => {
124 Error::InvalidParameterException(inner)
125 }
126 crate::operation::associate_drt_log_bucket::AssociateDRTLogBucketError::LimitsExceededException(inner) => {
127 Error::LimitsExceededException(inner)
128 }
129 crate::operation::associate_drt_log_bucket::AssociateDRTLogBucketError::NoAssociatedRoleException(inner) => {
130 Error::NoAssociatedRoleException(inner)
131 }
132 crate::operation::associate_drt_log_bucket::AssociateDRTLogBucketError::OptimisticLockException(inner) => {
133 Error::OptimisticLockException(inner)
134 }
135 crate::operation::associate_drt_log_bucket::AssociateDRTLogBucketError::ResourceNotFoundException(inner) => {
136 Error::ResourceNotFoundException(inner)
137 }
138 crate::operation::associate_drt_log_bucket::AssociateDRTLogBucketError::Unhandled(inner) => Error::Unhandled(inner),
139 }
140 }
141}
142impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::associate_drt_role::AssociateDRTRoleError, R>> for Error
143where
144 R: Send + Sync + std::fmt::Debug + 'static,
145{
146 fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::associate_drt_role::AssociateDRTRoleError, R>) -> Self {
147 match err {
148 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
149 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
150 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
151 source: err.into(),
152 }),
153 }
154 }
155}
156impl From<crate::operation::associate_drt_role::AssociateDRTRoleError> for Error {
157 fn from(err: crate::operation::associate_drt_role::AssociateDRTRoleError) -> Self {
158 match err {
159 crate::operation::associate_drt_role::AssociateDRTRoleError::AccessDeniedForDependencyException(inner) => {
160 Error::AccessDeniedForDependencyException(inner)
161 }
162 crate::operation::associate_drt_role::AssociateDRTRoleError::InternalErrorException(inner) => Error::InternalErrorException(inner),
163 crate::operation::associate_drt_role::AssociateDRTRoleError::InvalidOperationException(inner) => Error::InvalidOperationException(inner),
164 crate::operation::associate_drt_role::AssociateDRTRoleError::InvalidParameterException(inner) => Error::InvalidParameterException(inner),
165 crate::operation::associate_drt_role::AssociateDRTRoleError::OptimisticLockException(inner) => Error::OptimisticLockException(inner),
166 crate::operation::associate_drt_role::AssociateDRTRoleError::ResourceNotFoundException(inner) => Error::ResourceNotFoundException(inner),
167 crate::operation::associate_drt_role::AssociateDRTRoleError::Unhandled(inner) => Error::Unhandled(inner),
168 }
169 }
170}
171impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::associate_health_check::AssociateHealthCheckError, R>> for Error
172where
173 R: Send + Sync + std::fmt::Debug + 'static,
174{
175 fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::associate_health_check::AssociateHealthCheckError, R>) -> Self {
176 match err {
177 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
178 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
179 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
180 source: err.into(),
181 }),
182 }
183 }
184}
185impl From<crate::operation::associate_health_check::AssociateHealthCheckError> for Error {
186 fn from(err: crate::operation::associate_health_check::AssociateHealthCheckError) -> Self {
187 match err {
188 crate::operation::associate_health_check::AssociateHealthCheckError::InternalErrorException(inner) => {
189 Error::InternalErrorException(inner)
190 }
191 crate::operation::associate_health_check::AssociateHealthCheckError::InvalidParameterException(inner) => {
192 Error::InvalidParameterException(inner)
193 }
194 crate::operation::associate_health_check::AssociateHealthCheckError::InvalidResourceException(inner) => {
195 Error::InvalidResourceException(inner)
196 }
197 crate::operation::associate_health_check::AssociateHealthCheckError::LimitsExceededException(inner) => {
198 Error::LimitsExceededException(inner)
199 }
200 crate::operation::associate_health_check::AssociateHealthCheckError::OptimisticLockException(inner) => {
201 Error::OptimisticLockException(inner)
202 }
203 crate::operation::associate_health_check::AssociateHealthCheckError::ResourceNotFoundException(inner) => {
204 Error::ResourceNotFoundException(inner)
205 }
206 crate::operation::associate_health_check::AssociateHealthCheckError::Unhandled(inner) => Error::Unhandled(inner),
207 }
208 }
209}
210impl<R>
211 From<
212 ::aws_smithy_runtime_api::client::result::SdkError<
213 crate::operation::associate_proactive_engagement_details::AssociateProactiveEngagementDetailsError,
214 R,
215 >,
216 > for Error
217where
218 R: Send + Sync + std::fmt::Debug + 'static,
219{
220 fn from(
221 err: ::aws_smithy_runtime_api::client::result::SdkError<
222 crate::operation::associate_proactive_engagement_details::AssociateProactiveEngagementDetailsError,
223 R,
224 >,
225 ) -> Self {
226 match err {
227 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
228 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
229 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
230 source: err.into(),
231 }),
232 }
233 }
234}
235impl From<crate::operation::associate_proactive_engagement_details::AssociateProactiveEngagementDetailsError> for Error {
236 fn from(err: crate::operation::associate_proactive_engagement_details::AssociateProactiveEngagementDetailsError) -> Self {
237 match err {
238 crate::operation::associate_proactive_engagement_details::AssociateProactiveEngagementDetailsError::InternalErrorException(inner) => {
239 Error::InternalErrorException(inner)
240 }
241 crate::operation::associate_proactive_engagement_details::AssociateProactiveEngagementDetailsError::InvalidOperationException(inner) => {
242 Error::InvalidOperationException(inner)
243 }
244 crate::operation::associate_proactive_engagement_details::AssociateProactiveEngagementDetailsError::InvalidParameterException(inner) => {
245 Error::InvalidParameterException(inner)
246 }
247 crate::operation::associate_proactive_engagement_details::AssociateProactiveEngagementDetailsError::OptimisticLockException(inner) => {
248 Error::OptimisticLockException(inner)
249 }
250 crate::operation::associate_proactive_engagement_details::AssociateProactiveEngagementDetailsError::ResourceNotFoundException(inner) => {
251 Error::ResourceNotFoundException(inner)
252 }
253 crate::operation::associate_proactive_engagement_details::AssociateProactiveEngagementDetailsError::Unhandled(inner) => {
254 Error::Unhandled(inner)
255 }
256 }
257 }
258}
259impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::create_protection::CreateProtectionError, R>> for Error
260where
261 R: Send + Sync + std::fmt::Debug + 'static,
262{
263 fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::create_protection::CreateProtectionError, R>) -> Self {
264 match err {
265 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
266 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
267 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
268 source: err.into(),
269 }),
270 }
271 }
272}
273impl From<crate::operation::create_protection::CreateProtectionError> for Error {
274 fn from(err: crate::operation::create_protection::CreateProtectionError) -> Self {
275 match err {
276 crate::operation::create_protection::CreateProtectionError::InternalErrorException(inner) => Error::InternalErrorException(inner),
277 crate::operation::create_protection::CreateProtectionError::InvalidOperationException(inner) => Error::InvalidOperationException(inner),
278 crate::operation::create_protection::CreateProtectionError::InvalidParameterException(inner) => Error::InvalidParameterException(inner),
279 crate::operation::create_protection::CreateProtectionError::InvalidResourceException(inner) => Error::InvalidResourceException(inner),
280 crate::operation::create_protection::CreateProtectionError::LimitsExceededException(inner) => Error::LimitsExceededException(inner),
281 crate::operation::create_protection::CreateProtectionError::OptimisticLockException(inner) => Error::OptimisticLockException(inner),
282 crate::operation::create_protection::CreateProtectionError::ResourceAlreadyExistsException(inner) => {
283 Error::ResourceAlreadyExistsException(inner)
284 }
285 crate::operation::create_protection::CreateProtectionError::ResourceNotFoundException(inner) => Error::ResourceNotFoundException(inner),
286 crate::operation::create_protection::CreateProtectionError::Unhandled(inner) => Error::Unhandled(inner),
287 }
288 }
289}
290impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::create_protection_group::CreateProtectionGroupError, R>> for Error
291where
292 R: Send + Sync + std::fmt::Debug + 'static,
293{
294 fn from(
295 err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::create_protection_group::CreateProtectionGroupError, R>,
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::create_protection_group::CreateProtectionGroupError> for Error {
307 fn from(err: crate::operation::create_protection_group::CreateProtectionGroupError) -> Self {
308 match err {
309 crate::operation::create_protection_group::CreateProtectionGroupError::InternalErrorException(inner) => {
310 Error::InternalErrorException(inner)
311 }
312 crate::operation::create_protection_group::CreateProtectionGroupError::InvalidParameterException(inner) => {
313 Error::InvalidParameterException(inner)
314 }
315 crate::operation::create_protection_group::CreateProtectionGroupError::LimitsExceededException(inner) => {
316 Error::LimitsExceededException(inner)
317 }
318 crate::operation::create_protection_group::CreateProtectionGroupError::OptimisticLockException(inner) => {
319 Error::OptimisticLockException(inner)
320 }
321 crate::operation::create_protection_group::CreateProtectionGroupError::ResourceAlreadyExistsException(inner) => {
322 Error::ResourceAlreadyExistsException(inner)
323 }
324 crate::operation::create_protection_group::CreateProtectionGroupError::ResourceNotFoundException(inner) => {
325 Error::ResourceNotFoundException(inner)
326 }
327 crate::operation::create_protection_group::CreateProtectionGroupError::Unhandled(inner) => Error::Unhandled(inner),
328 }
329 }
330}
331impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::create_subscription::CreateSubscriptionError, R>> for Error
332where
333 R: Send + Sync + std::fmt::Debug + 'static,
334{
335 fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::create_subscription::CreateSubscriptionError, R>) -> Self {
336 match err {
337 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
338 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
339 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
340 source: err.into(),
341 }),
342 }
343 }
344}
345impl From<crate::operation::create_subscription::CreateSubscriptionError> for Error {
346 fn from(err: crate::operation::create_subscription::CreateSubscriptionError) -> Self {
347 match err {
348 crate::operation::create_subscription::CreateSubscriptionError::InternalErrorException(inner) => Error::InternalErrorException(inner),
349 crate::operation::create_subscription::CreateSubscriptionError::ResourceAlreadyExistsException(inner) => {
350 Error::ResourceAlreadyExistsException(inner)
351 }
352 crate::operation::create_subscription::CreateSubscriptionError::Unhandled(inner) => Error::Unhandled(inner),
353 }
354 }
355}
356impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::delete_protection::DeleteProtectionError, R>> for Error
357where
358 R: Send + Sync + std::fmt::Debug + 'static,
359{
360 fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::delete_protection::DeleteProtectionError, R>) -> Self {
361 match err {
362 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
363 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
364 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
365 source: err.into(),
366 }),
367 }
368 }
369}
370impl From<crate::operation::delete_protection::DeleteProtectionError> for Error {
371 fn from(err: crate::operation::delete_protection::DeleteProtectionError) -> Self {
372 match err {
373 crate::operation::delete_protection::DeleteProtectionError::InternalErrorException(inner) => Error::InternalErrorException(inner),
374 crate::operation::delete_protection::DeleteProtectionError::OptimisticLockException(inner) => Error::OptimisticLockException(inner),
375 crate::operation::delete_protection::DeleteProtectionError::ResourceNotFoundException(inner) => Error::ResourceNotFoundException(inner),
376 crate::operation::delete_protection::DeleteProtectionError::Unhandled(inner) => Error::Unhandled(inner),
377 }
378 }
379}
380impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::delete_protection_group::DeleteProtectionGroupError, R>> for Error
381where
382 R: Send + Sync + std::fmt::Debug + 'static,
383{
384 fn from(
385 err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::delete_protection_group::DeleteProtectionGroupError, R>,
386 ) -> Self {
387 match err {
388 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
389 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
390 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
391 source: err.into(),
392 }),
393 }
394 }
395}
396impl From<crate::operation::delete_protection_group::DeleteProtectionGroupError> for Error {
397 fn from(err: crate::operation::delete_protection_group::DeleteProtectionGroupError) -> Self {
398 match err {
399 crate::operation::delete_protection_group::DeleteProtectionGroupError::InternalErrorException(inner) => {
400 Error::InternalErrorException(inner)
401 }
402 crate::operation::delete_protection_group::DeleteProtectionGroupError::OptimisticLockException(inner) => {
403 Error::OptimisticLockException(inner)
404 }
405 crate::operation::delete_protection_group::DeleteProtectionGroupError::ResourceNotFoundException(inner) => {
406 Error::ResourceNotFoundException(inner)
407 }
408 crate::operation::delete_protection_group::DeleteProtectionGroupError::Unhandled(inner) => Error::Unhandled(inner),
409 }
410 }
411}
412impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::delete_subscription::DeleteSubscriptionError, R>> for Error
413where
414 R: Send + Sync + std::fmt::Debug + 'static,
415{
416 fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::delete_subscription::DeleteSubscriptionError, R>) -> Self {
417 match err {
418 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
419 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
420 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
421 source: err.into(),
422 }),
423 }
424 }
425}
426impl From<crate::operation::delete_subscription::DeleteSubscriptionError> for Error {
427 fn from(err: crate::operation::delete_subscription::DeleteSubscriptionError) -> Self {
428 match err {
429 crate::operation::delete_subscription::DeleteSubscriptionError::InternalErrorException(inner) => Error::InternalErrorException(inner),
430 crate::operation::delete_subscription::DeleteSubscriptionError::LockedSubscriptionException(inner) => {
431 Error::LockedSubscriptionException(inner)
432 }
433 crate::operation::delete_subscription::DeleteSubscriptionError::ResourceNotFoundException(inner) => {
434 Error::ResourceNotFoundException(inner)
435 }
436 crate::operation::delete_subscription::DeleteSubscriptionError::Unhandled(inner) => Error::Unhandled(inner),
437 }
438 }
439}
440impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::describe_attack::DescribeAttackError, R>> for Error
441where
442 R: Send + Sync + std::fmt::Debug + 'static,
443{
444 fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::describe_attack::DescribeAttackError, R>) -> Self {
445 match err {
446 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
447 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
448 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
449 source: err.into(),
450 }),
451 }
452 }
453}
454impl From<crate::operation::describe_attack::DescribeAttackError> for Error {
455 fn from(err: crate::operation::describe_attack::DescribeAttackError) -> Self {
456 match err {
457 crate::operation::describe_attack::DescribeAttackError::AccessDeniedException(inner) => Error::AccessDeniedException(inner),
458 crate::operation::describe_attack::DescribeAttackError::InternalErrorException(inner) => Error::InternalErrorException(inner),
459 crate::operation::describe_attack::DescribeAttackError::Unhandled(inner) => Error::Unhandled(inner),
460 }
461 }
462}
463impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::describe_attack_statistics::DescribeAttackStatisticsError, R>>
464 for Error
465where
466 R: Send + Sync + std::fmt::Debug + 'static,
467{
468 fn from(
469 err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::describe_attack_statistics::DescribeAttackStatisticsError, R>,
470 ) -> Self {
471 match err {
472 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
473 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
474 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
475 source: err.into(),
476 }),
477 }
478 }
479}
480impl From<crate::operation::describe_attack_statistics::DescribeAttackStatisticsError> for Error {
481 fn from(err: crate::operation::describe_attack_statistics::DescribeAttackStatisticsError) -> Self {
482 match err {
483 crate::operation::describe_attack_statistics::DescribeAttackStatisticsError::InternalErrorException(inner) => {
484 Error::InternalErrorException(inner)
485 }
486 crate::operation::describe_attack_statistics::DescribeAttackStatisticsError::Unhandled(inner) => Error::Unhandled(inner),
487 }
488 }
489}
490impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::describe_drt_access::DescribeDRTAccessError, R>> for Error
491where
492 R: Send + Sync + std::fmt::Debug + 'static,
493{
494 fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::describe_drt_access::DescribeDRTAccessError, R>) -> Self {
495 match err {
496 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
497 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
498 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
499 source: err.into(),
500 }),
501 }
502 }
503}
504impl From<crate::operation::describe_drt_access::DescribeDRTAccessError> for Error {
505 fn from(err: crate::operation::describe_drt_access::DescribeDRTAccessError) -> Self {
506 match err {
507 crate::operation::describe_drt_access::DescribeDRTAccessError::InternalErrorException(inner) => Error::InternalErrorException(inner),
508 crate::operation::describe_drt_access::DescribeDRTAccessError::ResourceNotFoundException(inner) => {
509 Error::ResourceNotFoundException(inner)
510 }
511 crate::operation::describe_drt_access::DescribeDRTAccessError::Unhandled(inner) => Error::Unhandled(inner),
512 }
513 }
514}
515impl<R>
516 From<
517 ::aws_smithy_runtime_api::client::result::SdkError<
518 crate::operation::describe_emergency_contact_settings::DescribeEmergencyContactSettingsError,
519 R,
520 >,
521 > for Error
522where
523 R: Send + Sync + std::fmt::Debug + 'static,
524{
525 fn from(
526 err: ::aws_smithy_runtime_api::client::result::SdkError<
527 crate::operation::describe_emergency_contact_settings::DescribeEmergencyContactSettingsError,
528 R,
529 >,
530 ) -> Self {
531 match err {
532 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
533 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
534 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
535 source: err.into(),
536 }),
537 }
538 }
539}
540impl From<crate::operation::describe_emergency_contact_settings::DescribeEmergencyContactSettingsError> for Error {
541 fn from(err: crate::operation::describe_emergency_contact_settings::DescribeEmergencyContactSettingsError) -> Self {
542 match err {
543 crate::operation::describe_emergency_contact_settings::DescribeEmergencyContactSettingsError::InternalErrorException(inner) => {
544 Error::InternalErrorException(inner)
545 }
546 crate::operation::describe_emergency_contact_settings::DescribeEmergencyContactSettingsError::ResourceNotFoundException(inner) => {
547 Error::ResourceNotFoundException(inner)
548 }
549 crate::operation::describe_emergency_contact_settings::DescribeEmergencyContactSettingsError::Unhandled(inner) => Error::Unhandled(inner),
550 }
551 }
552}
553impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::describe_protection::DescribeProtectionError, R>> for Error
554where
555 R: Send + Sync + std::fmt::Debug + 'static,
556{
557 fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::describe_protection::DescribeProtectionError, R>) -> Self {
558 match err {
559 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
560 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
561 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
562 source: err.into(),
563 }),
564 }
565 }
566}
567impl From<crate::operation::describe_protection::DescribeProtectionError> for Error {
568 fn from(err: crate::operation::describe_protection::DescribeProtectionError) -> Self {
569 match err {
570 crate::operation::describe_protection::DescribeProtectionError::InternalErrorException(inner) => Error::InternalErrorException(inner),
571 crate::operation::describe_protection::DescribeProtectionError::InvalidParameterException(inner) => {
572 Error::InvalidParameterException(inner)
573 }
574 crate::operation::describe_protection::DescribeProtectionError::ResourceNotFoundException(inner) => {
575 Error::ResourceNotFoundException(inner)
576 }
577 crate::operation::describe_protection::DescribeProtectionError::Unhandled(inner) => Error::Unhandled(inner),
578 }
579 }
580}
581impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::describe_protection_group::DescribeProtectionGroupError, R>>
582 for Error
583where
584 R: Send + Sync + std::fmt::Debug + 'static,
585{
586 fn from(
587 err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::describe_protection_group::DescribeProtectionGroupError, R>,
588 ) -> Self {
589 match err {
590 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
591 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
592 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
593 source: err.into(),
594 }),
595 }
596 }
597}
598impl From<crate::operation::describe_protection_group::DescribeProtectionGroupError> for Error {
599 fn from(err: crate::operation::describe_protection_group::DescribeProtectionGroupError) -> Self {
600 match err {
601 crate::operation::describe_protection_group::DescribeProtectionGroupError::InternalErrorException(inner) => {
602 Error::InternalErrorException(inner)
603 }
604 crate::operation::describe_protection_group::DescribeProtectionGroupError::ResourceNotFoundException(inner) => {
605 Error::ResourceNotFoundException(inner)
606 }
607 crate::operation::describe_protection_group::DescribeProtectionGroupError::Unhandled(inner) => Error::Unhandled(inner),
608 }
609 }
610}
611impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::describe_subscription::DescribeSubscriptionError, R>> for Error
612where
613 R: Send + Sync + std::fmt::Debug + 'static,
614{
615 fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::describe_subscription::DescribeSubscriptionError, R>) -> Self {
616 match err {
617 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
618 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
619 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
620 source: err.into(),
621 }),
622 }
623 }
624}
625impl From<crate::operation::describe_subscription::DescribeSubscriptionError> for Error {
626 fn from(err: crate::operation::describe_subscription::DescribeSubscriptionError) -> Self {
627 match err {
628 crate::operation::describe_subscription::DescribeSubscriptionError::InternalErrorException(inner) => Error::InternalErrorException(inner),
629 crate::operation::describe_subscription::DescribeSubscriptionError::ResourceNotFoundException(inner) => {
630 Error::ResourceNotFoundException(inner)
631 }
632 crate::operation::describe_subscription::DescribeSubscriptionError::Unhandled(inner) => Error::Unhandled(inner),
633 }
634 }
635}
636impl<R>
637 From<
638 ::aws_smithy_runtime_api::client::result::SdkError<
639 crate::operation::disable_application_layer_automatic_response::DisableApplicationLayerAutomaticResponseError,
640 R,
641 >,
642 > for Error
643where
644 R: Send + Sync + std::fmt::Debug + 'static,
645{
646 fn from(
647 err: ::aws_smithy_runtime_api::client::result::SdkError<
648 crate::operation::disable_application_layer_automatic_response::DisableApplicationLayerAutomaticResponseError,
649 R,
650 >,
651 ) -> Self {
652 match err {
653 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
654 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
655 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
656 source: err.into(),
657 }),
658 }
659 }
660}
661impl From<crate::operation::disable_application_layer_automatic_response::DisableApplicationLayerAutomaticResponseError> for Error {
662 fn from(err: crate::operation::disable_application_layer_automatic_response::DisableApplicationLayerAutomaticResponseError) -> Self {
663 match err {
664 crate::operation::disable_application_layer_automatic_response::DisableApplicationLayerAutomaticResponseError::InternalErrorException(inner) => Error::InternalErrorException(inner),
665 crate::operation::disable_application_layer_automatic_response::DisableApplicationLayerAutomaticResponseError::InvalidOperationException(inner) => Error::InvalidOperationException(inner),
666 crate::operation::disable_application_layer_automatic_response::DisableApplicationLayerAutomaticResponseError::InvalidParameterException(inner) => Error::InvalidParameterException(inner),
667 crate::operation::disable_application_layer_automatic_response::DisableApplicationLayerAutomaticResponseError::OptimisticLockException(inner) => Error::OptimisticLockException(inner),
668 crate::operation::disable_application_layer_automatic_response::DisableApplicationLayerAutomaticResponseError::ResourceNotFoundException(inner) => Error::ResourceNotFoundException(inner),
669 crate::operation::disable_application_layer_automatic_response::DisableApplicationLayerAutomaticResponseError::Unhandled(inner) => Error::Unhandled(inner),
670 }
671 }
672}
673impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::disable_proactive_engagement::DisableProactiveEngagementError, R>>
674 for Error
675where
676 R: Send + Sync + std::fmt::Debug + 'static,
677{
678 fn from(
679 err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::disable_proactive_engagement::DisableProactiveEngagementError, R>,
680 ) -> Self {
681 match err {
682 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
683 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
684 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
685 source: err.into(),
686 }),
687 }
688 }
689}
690impl From<crate::operation::disable_proactive_engagement::DisableProactiveEngagementError> for Error {
691 fn from(err: crate::operation::disable_proactive_engagement::DisableProactiveEngagementError) -> Self {
692 match err {
693 crate::operation::disable_proactive_engagement::DisableProactiveEngagementError::InternalErrorException(inner) => {
694 Error::InternalErrorException(inner)
695 }
696 crate::operation::disable_proactive_engagement::DisableProactiveEngagementError::InvalidOperationException(inner) => {
697 Error::InvalidOperationException(inner)
698 }
699 crate::operation::disable_proactive_engagement::DisableProactiveEngagementError::InvalidParameterException(inner) => {
700 Error::InvalidParameterException(inner)
701 }
702 crate::operation::disable_proactive_engagement::DisableProactiveEngagementError::OptimisticLockException(inner) => {
703 Error::OptimisticLockException(inner)
704 }
705 crate::operation::disable_proactive_engagement::DisableProactiveEngagementError::ResourceNotFoundException(inner) => {
706 Error::ResourceNotFoundException(inner)
707 }
708 crate::operation::disable_proactive_engagement::DisableProactiveEngagementError::Unhandled(inner) => Error::Unhandled(inner),
709 }
710 }
711}
712impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::disassociate_drt_log_bucket::DisassociateDRTLogBucketError, R>>
713 for Error
714where
715 R: Send + Sync + std::fmt::Debug + 'static,
716{
717 fn from(
718 err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::disassociate_drt_log_bucket::DisassociateDRTLogBucketError, R>,
719 ) -> Self {
720 match err {
721 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
722 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
723 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
724 source: err.into(),
725 }),
726 }
727 }
728}
729impl From<crate::operation::disassociate_drt_log_bucket::DisassociateDRTLogBucketError> for Error {
730 fn from(err: crate::operation::disassociate_drt_log_bucket::DisassociateDRTLogBucketError) -> Self {
731 match err {
732 crate::operation::disassociate_drt_log_bucket::DisassociateDRTLogBucketError::AccessDeniedForDependencyException(inner) => {
733 Error::AccessDeniedForDependencyException(inner)
734 }
735 crate::operation::disassociate_drt_log_bucket::DisassociateDRTLogBucketError::InternalErrorException(inner) => {
736 Error::InternalErrorException(inner)
737 }
738 crate::operation::disassociate_drt_log_bucket::DisassociateDRTLogBucketError::InvalidOperationException(inner) => {
739 Error::InvalidOperationException(inner)
740 }
741 crate::operation::disassociate_drt_log_bucket::DisassociateDRTLogBucketError::NoAssociatedRoleException(inner) => {
742 Error::NoAssociatedRoleException(inner)
743 }
744 crate::operation::disassociate_drt_log_bucket::DisassociateDRTLogBucketError::OptimisticLockException(inner) => {
745 Error::OptimisticLockException(inner)
746 }
747 crate::operation::disassociate_drt_log_bucket::DisassociateDRTLogBucketError::ResourceNotFoundException(inner) => {
748 Error::ResourceNotFoundException(inner)
749 }
750 crate::operation::disassociate_drt_log_bucket::DisassociateDRTLogBucketError::Unhandled(inner) => Error::Unhandled(inner),
751 }
752 }
753}
754impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::disassociate_drt_role::DisassociateDRTRoleError, R>> for Error
755where
756 R: Send + Sync + std::fmt::Debug + 'static,
757{
758 fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::disassociate_drt_role::DisassociateDRTRoleError, R>) -> Self {
759 match err {
760 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
761 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
762 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
763 source: err.into(),
764 }),
765 }
766 }
767}
768impl From<crate::operation::disassociate_drt_role::DisassociateDRTRoleError> for Error {
769 fn from(err: crate::operation::disassociate_drt_role::DisassociateDRTRoleError) -> Self {
770 match err {
771 crate::operation::disassociate_drt_role::DisassociateDRTRoleError::InternalErrorException(inner) => Error::InternalErrorException(inner),
772 crate::operation::disassociate_drt_role::DisassociateDRTRoleError::InvalidOperationException(inner) => {
773 Error::InvalidOperationException(inner)
774 }
775 crate::operation::disassociate_drt_role::DisassociateDRTRoleError::OptimisticLockException(inner) => {
776 Error::OptimisticLockException(inner)
777 }
778 crate::operation::disassociate_drt_role::DisassociateDRTRoleError::ResourceNotFoundException(inner) => {
779 Error::ResourceNotFoundException(inner)
780 }
781 crate::operation::disassociate_drt_role::DisassociateDRTRoleError::Unhandled(inner) => Error::Unhandled(inner),
782 }
783 }
784}
785impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::disassociate_health_check::DisassociateHealthCheckError, R>>
786 for Error
787where
788 R: Send + Sync + std::fmt::Debug + 'static,
789{
790 fn from(
791 err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::disassociate_health_check::DisassociateHealthCheckError, R>,
792 ) -> Self {
793 match err {
794 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
795 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
796 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
797 source: err.into(),
798 }),
799 }
800 }
801}
802impl From<crate::operation::disassociate_health_check::DisassociateHealthCheckError> for Error {
803 fn from(err: crate::operation::disassociate_health_check::DisassociateHealthCheckError) -> Self {
804 match err {
805 crate::operation::disassociate_health_check::DisassociateHealthCheckError::InternalErrorException(inner) => {
806 Error::InternalErrorException(inner)
807 }
808 crate::operation::disassociate_health_check::DisassociateHealthCheckError::InvalidParameterException(inner) => {
809 Error::InvalidParameterException(inner)
810 }
811 crate::operation::disassociate_health_check::DisassociateHealthCheckError::InvalidResourceException(inner) => {
812 Error::InvalidResourceException(inner)
813 }
814 crate::operation::disassociate_health_check::DisassociateHealthCheckError::OptimisticLockException(inner) => {
815 Error::OptimisticLockException(inner)
816 }
817 crate::operation::disassociate_health_check::DisassociateHealthCheckError::ResourceNotFoundException(inner) => {
818 Error::ResourceNotFoundException(inner)
819 }
820 crate::operation::disassociate_health_check::DisassociateHealthCheckError::Unhandled(inner) => Error::Unhandled(inner),
821 }
822 }
823}
824impl<R>
825 From<
826 ::aws_smithy_runtime_api::client::result::SdkError<
827 crate::operation::enable_application_layer_automatic_response::EnableApplicationLayerAutomaticResponseError,
828 R,
829 >,
830 > for Error
831where
832 R: Send + Sync + std::fmt::Debug + 'static,
833{
834 fn from(
835 err: ::aws_smithy_runtime_api::client::result::SdkError<
836 crate::operation::enable_application_layer_automatic_response::EnableApplicationLayerAutomaticResponseError,
837 R,
838 >,
839 ) -> Self {
840 match err {
841 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
842 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
843 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
844 source: err.into(),
845 }),
846 }
847 }
848}
849impl From<crate::operation::enable_application_layer_automatic_response::EnableApplicationLayerAutomaticResponseError> for Error {
850 fn from(err: crate::operation::enable_application_layer_automatic_response::EnableApplicationLayerAutomaticResponseError) -> Self {
851 match err {
852 crate::operation::enable_application_layer_automatic_response::EnableApplicationLayerAutomaticResponseError::InternalErrorException(inner) => Error::InternalErrorException(inner),
853 crate::operation::enable_application_layer_automatic_response::EnableApplicationLayerAutomaticResponseError::InvalidOperationException(inner) => Error::InvalidOperationException(inner),
854 crate::operation::enable_application_layer_automatic_response::EnableApplicationLayerAutomaticResponseError::InvalidParameterException(inner) => Error::InvalidParameterException(inner),
855 crate::operation::enable_application_layer_automatic_response::EnableApplicationLayerAutomaticResponseError::LimitsExceededException(inner) => Error::LimitsExceededException(inner),
856 crate::operation::enable_application_layer_automatic_response::EnableApplicationLayerAutomaticResponseError::OptimisticLockException(inner) => Error::OptimisticLockException(inner),
857 crate::operation::enable_application_layer_automatic_response::EnableApplicationLayerAutomaticResponseError::ResourceNotFoundException(inner) => Error::ResourceNotFoundException(inner),
858 crate::operation::enable_application_layer_automatic_response::EnableApplicationLayerAutomaticResponseError::Unhandled(inner) => Error::Unhandled(inner),
859 }
860 }
861}
862impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::enable_proactive_engagement::EnableProactiveEngagementError, R>>
863 for Error
864where
865 R: Send + Sync + std::fmt::Debug + 'static,
866{
867 fn from(
868 err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::enable_proactive_engagement::EnableProactiveEngagementError, R>,
869 ) -> Self {
870 match err {
871 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
872 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
873 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
874 source: err.into(),
875 }),
876 }
877 }
878}
879impl From<crate::operation::enable_proactive_engagement::EnableProactiveEngagementError> for Error {
880 fn from(err: crate::operation::enable_proactive_engagement::EnableProactiveEngagementError) -> Self {
881 match err {
882 crate::operation::enable_proactive_engagement::EnableProactiveEngagementError::InternalErrorException(inner) => {
883 Error::InternalErrorException(inner)
884 }
885 crate::operation::enable_proactive_engagement::EnableProactiveEngagementError::InvalidOperationException(inner) => {
886 Error::InvalidOperationException(inner)
887 }
888 crate::operation::enable_proactive_engagement::EnableProactiveEngagementError::InvalidParameterException(inner) => {
889 Error::InvalidParameterException(inner)
890 }
891 crate::operation::enable_proactive_engagement::EnableProactiveEngagementError::OptimisticLockException(inner) => {
892 Error::OptimisticLockException(inner)
893 }
894 crate::operation::enable_proactive_engagement::EnableProactiveEngagementError::ResourceNotFoundException(inner) => {
895 Error::ResourceNotFoundException(inner)
896 }
897 crate::operation::enable_proactive_engagement::EnableProactiveEngagementError::Unhandled(inner) => Error::Unhandled(inner),
898 }
899 }
900}
901impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::get_subscription_state::GetSubscriptionStateError, R>> for Error
902where
903 R: Send + Sync + std::fmt::Debug + 'static,
904{
905 fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::get_subscription_state::GetSubscriptionStateError, R>) -> Self {
906 match err {
907 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
908 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
909 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
910 source: err.into(),
911 }),
912 }
913 }
914}
915impl From<crate::operation::get_subscription_state::GetSubscriptionStateError> for Error {
916 fn from(err: crate::operation::get_subscription_state::GetSubscriptionStateError) -> Self {
917 match err {
918 crate::operation::get_subscription_state::GetSubscriptionStateError::InternalErrorException(inner) => {
919 Error::InternalErrorException(inner)
920 }
921 crate::operation::get_subscription_state::GetSubscriptionStateError::Unhandled(inner) => Error::Unhandled(inner),
922 }
923 }
924}
925impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::list_attacks::ListAttacksError, R>> for Error
926where
927 R: Send + Sync + std::fmt::Debug + 'static,
928{
929 fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::list_attacks::ListAttacksError, R>) -> Self {
930 match err {
931 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
932 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
933 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
934 source: err.into(),
935 }),
936 }
937 }
938}
939impl From<crate::operation::list_attacks::ListAttacksError> for Error {
940 fn from(err: crate::operation::list_attacks::ListAttacksError) -> Self {
941 match err {
942 crate::operation::list_attacks::ListAttacksError::InternalErrorException(inner) => Error::InternalErrorException(inner),
943 crate::operation::list_attacks::ListAttacksError::InvalidOperationException(inner) => Error::InvalidOperationException(inner),
944 crate::operation::list_attacks::ListAttacksError::InvalidParameterException(inner) => Error::InvalidParameterException(inner),
945 crate::operation::list_attacks::ListAttacksError::Unhandled(inner) => Error::Unhandled(inner),
946 }
947 }
948}
949impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::list_protection_groups::ListProtectionGroupsError, R>> for Error
950where
951 R: Send + Sync + std::fmt::Debug + 'static,
952{
953 fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::list_protection_groups::ListProtectionGroupsError, R>) -> Self {
954 match err {
955 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
956 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
957 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
958 source: err.into(),
959 }),
960 }
961 }
962}
963impl From<crate::operation::list_protection_groups::ListProtectionGroupsError> for Error {
964 fn from(err: crate::operation::list_protection_groups::ListProtectionGroupsError) -> Self {
965 match err {
966 crate::operation::list_protection_groups::ListProtectionGroupsError::InternalErrorException(inner) => {
967 Error::InternalErrorException(inner)
968 }
969 crate::operation::list_protection_groups::ListProtectionGroupsError::InvalidPaginationTokenException(inner) => {
970 Error::InvalidPaginationTokenException(inner)
971 }
972 crate::operation::list_protection_groups::ListProtectionGroupsError::ResourceNotFoundException(inner) => {
973 Error::ResourceNotFoundException(inner)
974 }
975 crate::operation::list_protection_groups::ListProtectionGroupsError::Unhandled(inner) => Error::Unhandled(inner),
976 }
977 }
978}
979impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::list_protections::ListProtectionsError, R>> for Error
980where
981 R: Send + Sync + std::fmt::Debug + 'static,
982{
983 fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::list_protections::ListProtectionsError, R>) -> Self {
984 match err {
985 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
986 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
987 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
988 source: err.into(),
989 }),
990 }
991 }
992}
993impl From<crate::operation::list_protections::ListProtectionsError> for Error {
994 fn from(err: crate::operation::list_protections::ListProtectionsError) -> Self {
995 match err {
996 crate::operation::list_protections::ListProtectionsError::InternalErrorException(inner) => Error::InternalErrorException(inner),
997 crate::operation::list_protections::ListProtectionsError::InvalidPaginationTokenException(inner) => {
998 Error::InvalidPaginationTokenException(inner)
999 }
1000 crate::operation::list_protections::ListProtectionsError::ResourceNotFoundException(inner) => Error::ResourceNotFoundException(inner),
1001 crate::operation::list_protections::ListProtectionsError::Unhandled(inner) => Error::Unhandled(inner),
1002 }
1003 }
1004}
1005impl<R>
1006 From<
1007 ::aws_smithy_runtime_api::client::result::SdkError<
1008 crate::operation::list_resources_in_protection_group::ListResourcesInProtectionGroupError,
1009 R,
1010 >,
1011 > for Error
1012where
1013 R: Send + Sync + std::fmt::Debug + 'static,
1014{
1015 fn from(
1016 err: ::aws_smithy_runtime_api::client::result::SdkError<
1017 crate::operation::list_resources_in_protection_group::ListResourcesInProtectionGroupError,
1018 R,
1019 >,
1020 ) -> Self {
1021 match err {
1022 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
1023 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
1024 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
1025 source: err.into(),
1026 }),
1027 }
1028 }
1029}
1030impl From<crate::operation::list_resources_in_protection_group::ListResourcesInProtectionGroupError> for Error {
1031 fn from(err: crate::operation::list_resources_in_protection_group::ListResourcesInProtectionGroupError) -> Self {
1032 match err {
1033 crate::operation::list_resources_in_protection_group::ListResourcesInProtectionGroupError::InternalErrorException(inner) => {
1034 Error::InternalErrorException(inner)
1035 }
1036 crate::operation::list_resources_in_protection_group::ListResourcesInProtectionGroupError::InvalidPaginationTokenException(inner) => {
1037 Error::InvalidPaginationTokenException(inner)
1038 }
1039 crate::operation::list_resources_in_protection_group::ListResourcesInProtectionGroupError::ResourceNotFoundException(inner) => {
1040 Error::ResourceNotFoundException(inner)
1041 }
1042 crate::operation::list_resources_in_protection_group::ListResourcesInProtectionGroupError::Unhandled(inner) => Error::Unhandled(inner),
1043 }
1044 }
1045}
1046impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::list_tags_for_resource::ListTagsForResourceError, R>> for Error
1047where
1048 R: Send + Sync + std::fmt::Debug + 'static,
1049{
1050 fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::list_tags_for_resource::ListTagsForResourceError, R>) -> Self {
1051 match err {
1052 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
1053 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
1054 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
1055 source: err.into(),
1056 }),
1057 }
1058 }
1059}
1060impl From<crate::operation::list_tags_for_resource::ListTagsForResourceError> for Error {
1061 fn from(err: crate::operation::list_tags_for_resource::ListTagsForResourceError) -> Self {
1062 match err {
1063 crate::operation::list_tags_for_resource::ListTagsForResourceError::InternalErrorException(inner) => Error::InternalErrorException(inner),
1064 crate::operation::list_tags_for_resource::ListTagsForResourceError::InvalidResourceException(inner) => {
1065 Error::InvalidResourceException(inner)
1066 }
1067 crate::operation::list_tags_for_resource::ListTagsForResourceError::ResourceNotFoundException(inner) => {
1068 Error::ResourceNotFoundException(inner)
1069 }
1070 crate::operation::list_tags_for_resource::ListTagsForResourceError::Unhandled(inner) => Error::Unhandled(inner),
1071 }
1072 }
1073}
1074impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::tag_resource::TagResourceError, R>> for Error
1075where
1076 R: Send + Sync + std::fmt::Debug + 'static,
1077{
1078 fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::tag_resource::TagResourceError, R>) -> Self {
1079 match err {
1080 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
1081 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
1082 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
1083 source: err.into(),
1084 }),
1085 }
1086 }
1087}
1088impl From<crate::operation::tag_resource::TagResourceError> for Error {
1089 fn from(err: crate::operation::tag_resource::TagResourceError) -> Self {
1090 match err {
1091 crate::operation::tag_resource::TagResourceError::InternalErrorException(inner) => Error::InternalErrorException(inner),
1092 crate::operation::tag_resource::TagResourceError::InvalidParameterException(inner) => Error::InvalidParameterException(inner),
1093 crate::operation::tag_resource::TagResourceError::InvalidResourceException(inner) => Error::InvalidResourceException(inner),
1094 crate::operation::tag_resource::TagResourceError::ResourceNotFoundException(inner) => Error::ResourceNotFoundException(inner),
1095 crate::operation::tag_resource::TagResourceError::Unhandled(inner) => Error::Unhandled(inner),
1096 }
1097 }
1098}
1099impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::untag_resource::UntagResourceError, R>> for Error
1100where
1101 R: Send + Sync + std::fmt::Debug + 'static,
1102{
1103 fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::untag_resource::UntagResourceError, R>) -> Self {
1104 match err {
1105 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
1106 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
1107 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
1108 source: err.into(),
1109 }),
1110 }
1111 }
1112}
1113impl From<crate::operation::untag_resource::UntagResourceError> for Error {
1114 fn from(err: crate::operation::untag_resource::UntagResourceError) -> Self {
1115 match err {
1116 crate::operation::untag_resource::UntagResourceError::InternalErrorException(inner) => Error::InternalErrorException(inner),
1117 crate::operation::untag_resource::UntagResourceError::InvalidParameterException(inner) => Error::InvalidParameterException(inner),
1118 crate::operation::untag_resource::UntagResourceError::InvalidResourceException(inner) => Error::InvalidResourceException(inner),
1119 crate::operation::untag_resource::UntagResourceError::ResourceNotFoundException(inner) => Error::ResourceNotFoundException(inner),
1120 crate::operation::untag_resource::UntagResourceError::Unhandled(inner) => Error::Unhandled(inner),
1121 }
1122 }
1123}
1124impl<R>
1125 From<
1126 ::aws_smithy_runtime_api::client::result::SdkError<
1127 crate::operation::update_application_layer_automatic_response::UpdateApplicationLayerAutomaticResponseError,
1128 R,
1129 >,
1130 > for Error
1131where
1132 R: Send + Sync + std::fmt::Debug + 'static,
1133{
1134 fn from(
1135 err: ::aws_smithy_runtime_api::client::result::SdkError<
1136 crate::operation::update_application_layer_automatic_response::UpdateApplicationLayerAutomaticResponseError,
1137 R,
1138 >,
1139 ) -> Self {
1140 match err {
1141 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
1142 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
1143 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
1144 source: err.into(),
1145 }),
1146 }
1147 }
1148}
1149impl From<crate::operation::update_application_layer_automatic_response::UpdateApplicationLayerAutomaticResponseError> for Error {
1150 fn from(err: crate::operation::update_application_layer_automatic_response::UpdateApplicationLayerAutomaticResponseError) -> Self {
1151 match err {
1152 crate::operation::update_application_layer_automatic_response::UpdateApplicationLayerAutomaticResponseError::InternalErrorException(inner) => Error::InternalErrorException(inner),
1153 crate::operation::update_application_layer_automatic_response::UpdateApplicationLayerAutomaticResponseError::InvalidOperationException(inner) => Error::InvalidOperationException(inner),
1154 crate::operation::update_application_layer_automatic_response::UpdateApplicationLayerAutomaticResponseError::InvalidParameterException(inner) => Error::InvalidParameterException(inner),
1155 crate::operation::update_application_layer_automatic_response::UpdateApplicationLayerAutomaticResponseError::OptimisticLockException(inner) => Error::OptimisticLockException(inner),
1156 crate::operation::update_application_layer_automatic_response::UpdateApplicationLayerAutomaticResponseError::ResourceNotFoundException(inner) => Error::ResourceNotFoundException(inner),
1157 crate::operation::update_application_layer_automatic_response::UpdateApplicationLayerAutomaticResponseError::Unhandled(inner) => Error::Unhandled(inner),
1158 }
1159 }
1160}
1161impl<R>
1162 From<
1163 ::aws_smithy_runtime_api::client::result::SdkError<
1164 crate::operation::update_emergency_contact_settings::UpdateEmergencyContactSettingsError,
1165 R,
1166 >,
1167 > for Error
1168where
1169 R: Send + Sync + std::fmt::Debug + 'static,
1170{
1171 fn from(
1172 err: ::aws_smithy_runtime_api::client::result::SdkError<
1173 crate::operation::update_emergency_contact_settings::UpdateEmergencyContactSettingsError,
1174 R,
1175 >,
1176 ) -> Self {
1177 match err {
1178 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
1179 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
1180 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
1181 source: err.into(),
1182 }),
1183 }
1184 }
1185}
1186impl From<crate::operation::update_emergency_contact_settings::UpdateEmergencyContactSettingsError> for Error {
1187 fn from(err: crate::operation::update_emergency_contact_settings::UpdateEmergencyContactSettingsError) -> Self {
1188 match err {
1189 crate::operation::update_emergency_contact_settings::UpdateEmergencyContactSettingsError::InternalErrorException(inner) => {
1190 Error::InternalErrorException(inner)
1191 }
1192 crate::operation::update_emergency_contact_settings::UpdateEmergencyContactSettingsError::InvalidParameterException(inner) => {
1193 Error::InvalidParameterException(inner)
1194 }
1195 crate::operation::update_emergency_contact_settings::UpdateEmergencyContactSettingsError::OptimisticLockException(inner) => {
1196 Error::OptimisticLockException(inner)
1197 }
1198 crate::operation::update_emergency_contact_settings::UpdateEmergencyContactSettingsError::ResourceNotFoundException(inner) => {
1199 Error::ResourceNotFoundException(inner)
1200 }
1201 crate::operation::update_emergency_contact_settings::UpdateEmergencyContactSettingsError::Unhandled(inner) => Error::Unhandled(inner),
1202 }
1203 }
1204}
1205impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::update_protection_group::UpdateProtectionGroupError, R>> for Error
1206where
1207 R: Send + Sync + std::fmt::Debug + 'static,
1208{
1209 fn from(
1210 err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::update_protection_group::UpdateProtectionGroupError, R>,
1211 ) -> Self {
1212 match err {
1213 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
1214 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
1215 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
1216 source: err.into(),
1217 }),
1218 }
1219 }
1220}
1221impl From<crate::operation::update_protection_group::UpdateProtectionGroupError> for Error {
1222 fn from(err: crate::operation::update_protection_group::UpdateProtectionGroupError) -> Self {
1223 match err {
1224 crate::operation::update_protection_group::UpdateProtectionGroupError::InternalErrorException(inner) => {
1225 Error::InternalErrorException(inner)
1226 }
1227 crate::operation::update_protection_group::UpdateProtectionGroupError::InvalidParameterException(inner) => {
1228 Error::InvalidParameterException(inner)
1229 }
1230 crate::operation::update_protection_group::UpdateProtectionGroupError::OptimisticLockException(inner) => {
1231 Error::OptimisticLockException(inner)
1232 }
1233 crate::operation::update_protection_group::UpdateProtectionGroupError::ResourceNotFoundException(inner) => {
1234 Error::ResourceNotFoundException(inner)
1235 }
1236 crate::operation::update_protection_group::UpdateProtectionGroupError::Unhandled(inner) => Error::Unhandled(inner),
1237 }
1238 }
1239}
1240impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::update_subscription::UpdateSubscriptionError, R>> for Error
1241where
1242 R: Send + Sync + std::fmt::Debug + 'static,
1243{
1244 fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::update_subscription::UpdateSubscriptionError, R>) -> Self {
1245 match err {
1246 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
1247 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
1248 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
1249 source: err.into(),
1250 }),
1251 }
1252 }
1253}
1254impl From<crate::operation::update_subscription::UpdateSubscriptionError> for Error {
1255 fn from(err: crate::operation::update_subscription::UpdateSubscriptionError) -> Self {
1256 match err {
1257 crate::operation::update_subscription::UpdateSubscriptionError::InternalErrorException(inner) => Error::InternalErrorException(inner),
1258 crate::operation::update_subscription::UpdateSubscriptionError::InvalidParameterException(inner) => {
1259 Error::InvalidParameterException(inner)
1260 }
1261 crate::operation::update_subscription::UpdateSubscriptionError::LockedSubscriptionException(inner) => {
1262 Error::LockedSubscriptionException(inner)
1263 }
1264 crate::operation::update_subscription::UpdateSubscriptionError::OptimisticLockException(inner) => Error::OptimisticLockException(inner),
1265 crate::operation::update_subscription::UpdateSubscriptionError::ResourceNotFoundException(inner) => {
1266 Error::ResourceNotFoundException(inner)
1267 }
1268 crate::operation::update_subscription::UpdateSubscriptionError::Unhandled(inner) => Error::Unhandled(inner),
1269 }
1270 }
1271}
1272impl ::std::error::Error for Error {
1273 fn source(&self) -> std::option::Option<&(dyn ::std::error::Error + 'static)> {
1274 match self {
1275 Error::AccessDeniedException(inner) => inner.source(),
1276 Error::AccessDeniedForDependencyException(inner) => inner.source(),
1277 Error::InternalErrorException(inner) => inner.source(),
1278 Error::InvalidOperationException(inner) => inner.source(),
1279 Error::InvalidPaginationTokenException(inner) => inner.source(),
1280 Error::InvalidParameterException(inner) => inner.source(),
1281 Error::InvalidResourceException(inner) => inner.source(),
1282 Error::LimitsExceededException(inner) => inner.source(),
1283 Error::LockedSubscriptionException(inner) => inner.source(),
1284 Error::NoAssociatedRoleException(inner) => inner.source(),
1285 Error::OptimisticLockException(inner) => inner.source(),
1286 Error::ResourceAlreadyExistsException(inner) => inner.source(),
1287 Error::ResourceNotFoundException(inner) => inner.source(),
1288 Error::Unhandled(inner) => ::std::option::Option::Some(&*inner.source),
1289 }
1290 }
1291}
1292impl ::aws_types::request_id::RequestId for Error {
1293 fn request_id(&self) -> Option<&str> {
1294 match self {
1295 Self::AccessDeniedException(e) => e.request_id(),
1296 Self::AccessDeniedForDependencyException(e) => e.request_id(),
1297 Self::InternalErrorException(e) => e.request_id(),
1298 Self::InvalidOperationException(e) => e.request_id(),
1299 Self::InvalidPaginationTokenException(e) => e.request_id(),
1300 Self::InvalidParameterException(e) => e.request_id(),
1301 Self::InvalidResourceException(e) => e.request_id(),
1302 Self::LimitsExceededException(e) => e.request_id(),
1303 Self::LockedSubscriptionException(e) => e.request_id(),
1304 Self::NoAssociatedRoleException(e) => e.request_id(),
1305 Self::OptimisticLockException(e) => e.request_id(),
1306 Self::ResourceAlreadyExistsException(e) => e.request_id(),
1307 Self::ResourceNotFoundException(e) => e.request_id(),
1308 Self::Unhandled(e) => e.meta.request_id(),
1309 }
1310 }
1311}