1#[non_exhaustive]
4#[derive(::std::fmt::Debug)]
5pub enum Error {
6 AccessDeniedException(crate::types::error::AccessDeniedException),
8 BadRequestException(crate::types::error::BadRequestException),
10 ConflictException(crate::types::error::ConflictException),
12 InternalServerErrorException(crate::types::error::InternalServerErrorException),
14 ResourceNotFoundException(crate::types::error::ResourceNotFoundException),
16 #[deprecated(note = "Matching `Unhandled` directly is not forwards compatible. Instead, match using a \
18 variable wildcard pattern and check `.code()`:
19 \
20 `err if err.code() == Some(\"SpecificExceptionCode\") => { /* handle the error */ }`
21 \
22 See [`ProvideErrorMetadata`](#impl-ProvideErrorMetadata-for-Error) for what information is available for the error.")]
23 Unhandled(crate::error::sealed_unhandled::Unhandled),
24}
25impl ::std::fmt::Display for Error {
26 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
27 match self {
28 Error::AccessDeniedException(inner) => inner.fmt(f),
29 Error::BadRequestException(inner) => inner.fmt(f),
30 Error::ConflictException(inner) => inner.fmt(f),
31 Error::InternalServerErrorException(inner) => inner.fmt(f),
32 Error::ResourceNotFoundException(inner) => inner.fmt(f),
33 Error::Unhandled(_) => {
34 if let ::std::option::Option::Some(code) = ::aws_smithy_types::error::metadata::ProvideErrorMetadata::code(self) {
35 write!(f, "unhandled error ({code})")
36 } else {
37 f.write_str("unhandled error")
38 }
39 }
40 }
41 }
42}
43impl From<::aws_smithy_types::error::operation::BuildError> for Error {
44 fn from(value: ::aws_smithy_types::error::operation::BuildError) -> Self {
45 Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
46 source: value.into(),
47 meta: ::std::default::Default::default(),
48 })
49 }
50}
51impl ::aws_smithy_types::error::metadata::ProvideErrorMetadata for Error {
52 fn meta(&self) -> &::aws_smithy_types::error::metadata::ErrorMetadata {
53 match self {
54 Self::AccessDeniedException(inner) => inner.meta(),
55 Self::BadRequestException(inner) => inner.meta(),
56 Self::ConflictException(inner) => inner.meta(),
57 Self::InternalServerErrorException(inner) => inner.meta(),
58 Self::ResourceNotFoundException(inner) => inner.meta(),
59 Self::Unhandled(inner) => &inner.meta,
60 }
61 }
62}
63impl<R>
64 From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::accept_administrator_invitation::AcceptAdministratorInvitationError, R>>
65 for Error
66where
67 R: Send + Sync + std::fmt::Debug + 'static,
68{
69 fn from(
70 err: ::aws_smithy_runtime_api::client::result::SdkError<
71 crate::operation::accept_administrator_invitation::AcceptAdministratorInvitationError,
72 R,
73 >,
74 ) -> Self {
75 match err {
76 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
77 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
78 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
79 source: err.into(),
80 }),
81 }
82 }
83}
84impl From<crate::operation::accept_administrator_invitation::AcceptAdministratorInvitationError> for Error {
85 fn from(err: crate::operation::accept_administrator_invitation::AcceptAdministratorInvitationError) -> Self {
86 match err {
87 crate::operation::accept_administrator_invitation::AcceptAdministratorInvitationError::BadRequestException(inner) => {
88 Error::BadRequestException(inner)
89 }
90 crate::operation::accept_administrator_invitation::AcceptAdministratorInvitationError::InternalServerErrorException(inner) => {
91 Error::InternalServerErrorException(inner)
92 }
93 crate::operation::accept_administrator_invitation::AcceptAdministratorInvitationError::Unhandled(inner) => Error::Unhandled(inner),
94 }
95 }
96}
97impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::accept_invitation::AcceptInvitationError, R>> for Error
98where
99 R: Send + Sync + std::fmt::Debug + 'static,
100{
101 fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::accept_invitation::AcceptInvitationError, R>) -> 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::accept_invitation::AcceptInvitationError> for Error {
112 fn from(err: crate::operation::accept_invitation::AcceptInvitationError) -> Self {
113 match err {
114 crate::operation::accept_invitation::AcceptInvitationError::BadRequestException(inner) => Error::BadRequestException(inner),
115 crate::operation::accept_invitation::AcceptInvitationError::InternalServerErrorException(inner) => {
116 Error::InternalServerErrorException(inner)
117 }
118 crate::operation::accept_invitation::AcceptInvitationError::Unhandled(inner) => Error::Unhandled(inner),
119 }
120 }
121}
122impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::archive_findings::ArchiveFindingsError, R>> for Error
123where
124 R: Send + Sync + std::fmt::Debug + 'static,
125{
126 fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::archive_findings::ArchiveFindingsError, R>) -> Self {
127 match err {
128 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
129 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
130 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
131 source: err.into(),
132 }),
133 }
134 }
135}
136impl From<crate::operation::archive_findings::ArchiveFindingsError> for Error {
137 fn from(err: crate::operation::archive_findings::ArchiveFindingsError) -> Self {
138 match err {
139 crate::operation::archive_findings::ArchiveFindingsError::BadRequestException(inner) => Error::BadRequestException(inner),
140 crate::operation::archive_findings::ArchiveFindingsError::InternalServerErrorException(inner) => {
141 Error::InternalServerErrorException(inner)
142 }
143 crate::operation::archive_findings::ArchiveFindingsError::Unhandled(inner) => Error::Unhandled(inner),
144 }
145 }
146}
147impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::create_detector::CreateDetectorError, R>> for Error
148where
149 R: Send + Sync + std::fmt::Debug + 'static,
150{
151 fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::create_detector::CreateDetectorError, R>) -> Self {
152 match err {
153 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
154 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
155 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
156 source: err.into(),
157 }),
158 }
159 }
160}
161impl From<crate::operation::create_detector::CreateDetectorError> for Error {
162 fn from(err: crate::operation::create_detector::CreateDetectorError) -> Self {
163 match err {
164 crate::operation::create_detector::CreateDetectorError::BadRequestException(inner) => Error::BadRequestException(inner),
165 crate::operation::create_detector::CreateDetectorError::InternalServerErrorException(inner) => Error::InternalServerErrorException(inner),
166 crate::operation::create_detector::CreateDetectorError::Unhandled(inner) => Error::Unhandled(inner),
167 }
168 }
169}
170impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::create_filter::CreateFilterError, R>> for Error
171where
172 R: Send + Sync + std::fmt::Debug + 'static,
173{
174 fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::create_filter::CreateFilterError, R>) -> Self {
175 match err {
176 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
177 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
178 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
179 source: err.into(),
180 }),
181 }
182 }
183}
184impl From<crate::operation::create_filter::CreateFilterError> for Error {
185 fn from(err: crate::operation::create_filter::CreateFilterError) -> Self {
186 match err {
187 crate::operation::create_filter::CreateFilterError::BadRequestException(inner) => Error::BadRequestException(inner),
188 crate::operation::create_filter::CreateFilterError::InternalServerErrorException(inner) => Error::InternalServerErrorException(inner),
189 crate::operation::create_filter::CreateFilterError::Unhandled(inner) => Error::Unhandled(inner),
190 }
191 }
192}
193impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::create_ip_set::CreateIPSetError, R>> for Error
194where
195 R: Send + Sync + std::fmt::Debug + 'static,
196{
197 fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::create_ip_set::CreateIPSetError, R>) -> Self {
198 match err {
199 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
200 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
201 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
202 source: err.into(),
203 }),
204 }
205 }
206}
207impl From<crate::operation::create_ip_set::CreateIPSetError> for Error {
208 fn from(err: crate::operation::create_ip_set::CreateIPSetError) -> Self {
209 match err {
210 crate::operation::create_ip_set::CreateIPSetError::AccessDeniedException(inner) => Error::AccessDeniedException(inner),
211 crate::operation::create_ip_set::CreateIPSetError::BadRequestException(inner) => Error::BadRequestException(inner),
212 crate::operation::create_ip_set::CreateIPSetError::InternalServerErrorException(inner) => Error::InternalServerErrorException(inner),
213 crate::operation::create_ip_set::CreateIPSetError::Unhandled(inner) => Error::Unhandled(inner),
214 }
215 }
216}
217impl<R>
218 From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::create_malware_protection_plan::CreateMalwareProtectionPlanError, R>>
219 for Error
220where
221 R: Send + Sync + std::fmt::Debug + 'static,
222{
223 fn from(
224 err: ::aws_smithy_runtime_api::client::result::SdkError<
225 crate::operation::create_malware_protection_plan::CreateMalwareProtectionPlanError,
226 R,
227 >,
228 ) -> Self {
229 match err {
230 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
231 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
232 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
233 source: err.into(),
234 }),
235 }
236 }
237}
238impl From<crate::operation::create_malware_protection_plan::CreateMalwareProtectionPlanError> for Error {
239 fn from(err: crate::operation::create_malware_protection_plan::CreateMalwareProtectionPlanError) -> Self {
240 match err {
241 crate::operation::create_malware_protection_plan::CreateMalwareProtectionPlanError::AccessDeniedException(inner) => {
242 Error::AccessDeniedException(inner)
243 }
244 crate::operation::create_malware_protection_plan::CreateMalwareProtectionPlanError::BadRequestException(inner) => {
245 Error::BadRequestException(inner)
246 }
247 crate::operation::create_malware_protection_plan::CreateMalwareProtectionPlanError::ConflictException(inner) => {
248 Error::ConflictException(inner)
249 }
250 crate::operation::create_malware_protection_plan::CreateMalwareProtectionPlanError::InternalServerErrorException(inner) => {
251 Error::InternalServerErrorException(inner)
252 }
253 crate::operation::create_malware_protection_plan::CreateMalwareProtectionPlanError::Unhandled(inner) => Error::Unhandled(inner),
254 }
255 }
256}
257impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::create_members::CreateMembersError, R>> for Error
258where
259 R: Send + Sync + std::fmt::Debug + 'static,
260{
261 fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::create_members::CreateMembersError, R>) -> Self {
262 match err {
263 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
264 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
265 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
266 source: err.into(),
267 }),
268 }
269 }
270}
271impl From<crate::operation::create_members::CreateMembersError> for Error {
272 fn from(err: crate::operation::create_members::CreateMembersError) -> Self {
273 match err {
274 crate::operation::create_members::CreateMembersError::BadRequestException(inner) => Error::BadRequestException(inner),
275 crate::operation::create_members::CreateMembersError::InternalServerErrorException(inner) => Error::InternalServerErrorException(inner),
276 crate::operation::create_members::CreateMembersError::Unhandled(inner) => Error::Unhandled(inner),
277 }
278 }
279}
280impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::create_publishing_destination::CreatePublishingDestinationError, R>>
281 for Error
282where
283 R: Send + Sync + std::fmt::Debug + 'static,
284{
285 fn from(
286 err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::create_publishing_destination::CreatePublishingDestinationError, R>,
287 ) -> Self {
288 match err {
289 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
290 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
291 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
292 source: err.into(),
293 }),
294 }
295 }
296}
297impl From<crate::operation::create_publishing_destination::CreatePublishingDestinationError> for Error {
298 fn from(err: crate::operation::create_publishing_destination::CreatePublishingDestinationError) -> Self {
299 match err {
300 crate::operation::create_publishing_destination::CreatePublishingDestinationError::BadRequestException(inner) => {
301 Error::BadRequestException(inner)
302 }
303 crate::operation::create_publishing_destination::CreatePublishingDestinationError::InternalServerErrorException(inner) => {
304 Error::InternalServerErrorException(inner)
305 }
306 crate::operation::create_publishing_destination::CreatePublishingDestinationError::Unhandled(inner) => Error::Unhandled(inner),
307 }
308 }
309}
310impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::create_sample_findings::CreateSampleFindingsError, R>> for Error
311where
312 R: Send + Sync + std::fmt::Debug + 'static,
313{
314 fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::create_sample_findings::CreateSampleFindingsError, R>) -> Self {
315 match err {
316 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
317 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
318 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
319 source: err.into(),
320 }),
321 }
322 }
323}
324impl From<crate::operation::create_sample_findings::CreateSampleFindingsError> for Error {
325 fn from(err: crate::operation::create_sample_findings::CreateSampleFindingsError) -> Self {
326 match err {
327 crate::operation::create_sample_findings::CreateSampleFindingsError::BadRequestException(inner) => Error::BadRequestException(inner),
328 crate::operation::create_sample_findings::CreateSampleFindingsError::InternalServerErrorException(inner) => {
329 Error::InternalServerErrorException(inner)
330 }
331 crate::operation::create_sample_findings::CreateSampleFindingsError::Unhandled(inner) => Error::Unhandled(inner),
332 }
333 }
334}
335impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::create_threat_entity_set::CreateThreatEntitySetError, R>> for Error
336where
337 R: Send + Sync + std::fmt::Debug + 'static,
338{
339 fn from(
340 err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::create_threat_entity_set::CreateThreatEntitySetError, R>,
341 ) -> Self {
342 match err {
343 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
344 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
345 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
346 source: err.into(),
347 }),
348 }
349 }
350}
351impl From<crate::operation::create_threat_entity_set::CreateThreatEntitySetError> for Error {
352 fn from(err: crate::operation::create_threat_entity_set::CreateThreatEntitySetError) -> Self {
353 match err {
354 crate::operation::create_threat_entity_set::CreateThreatEntitySetError::BadRequestException(inner) => Error::BadRequestException(inner),
355 crate::operation::create_threat_entity_set::CreateThreatEntitySetError::InternalServerErrorException(inner) => {
356 Error::InternalServerErrorException(inner)
357 }
358 crate::operation::create_threat_entity_set::CreateThreatEntitySetError::Unhandled(inner) => Error::Unhandled(inner),
359 }
360 }
361}
362impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::create_threat_intel_set::CreateThreatIntelSetError, R>> for Error
363where
364 R: Send + Sync + std::fmt::Debug + 'static,
365{
366 fn from(
367 err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::create_threat_intel_set::CreateThreatIntelSetError, R>,
368 ) -> Self {
369 match err {
370 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
371 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
372 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
373 source: err.into(),
374 }),
375 }
376 }
377}
378impl From<crate::operation::create_threat_intel_set::CreateThreatIntelSetError> for Error {
379 fn from(err: crate::operation::create_threat_intel_set::CreateThreatIntelSetError) -> Self {
380 match err {
381 crate::operation::create_threat_intel_set::CreateThreatIntelSetError::AccessDeniedException(inner) => Error::AccessDeniedException(inner),
382 crate::operation::create_threat_intel_set::CreateThreatIntelSetError::BadRequestException(inner) => Error::BadRequestException(inner),
383 crate::operation::create_threat_intel_set::CreateThreatIntelSetError::InternalServerErrorException(inner) => {
384 Error::InternalServerErrorException(inner)
385 }
386 crate::operation::create_threat_intel_set::CreateThreatIntelSetError::Unhandled(inner) => Error::Unhandled(inner),
387 }
388 }
389}
390impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::create_trusted_entity_set::CreateTrustedEntitySetError, R>>
391 for Error
392where
393 R: Send + Sync + std::fmt::Debug + 'static,
394{
395 fn from(
396 err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::create_trusted_entity_set::CreateTrustedEntitySetError, R>,
397 ) -> Self {
398 match err {
399 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
400 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
401 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
402 source: err.into(),
403 }),
404 }
405 }
406}
407impl From<crate::operation::create_trusted_entity_set::CreateTrustedEntitySetError> for Error {
408 fn from(err: crate::operation::create_trusted_entity_set::CreateTrustedEntitySetError) -> Self {
409 match err {
410 crate::operation::create_trusted_entity_set::CreateTrustedEntitySetError::BadRequestException(inner) => Error::BadRequestException(inner),
411 crate::operation::create_trusted_entity_set::CreateTrustedEntitySetError::InternalServerErrorException(inner) => {
412 Error::InternalServerErrorException(inner)
413 }
414 crate::operation::create_trusted_entity_set::CreateTrustedEntitySetError::Unhandled(inner) => Error::Unhandled(inner),
415 }
416 }
417}
418impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::decline_invitations::DeclineInvitationsError, R>> for Error
419where
420 R: Send + Sync + std::fmt::Debug + 'static,
421{
422 fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::decline_invitations::DeclineInvitationsError, R>) -> Self {
423 match err {
424 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
425 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
426 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
427 source: err.into(),
428 }),
429 }
430 }
431}
432impl From<crate::operation::decline_invitations::DeclineInvitationsError> for Error {
433 fn from(err: crate::operation::decline_invitations::DeclineInvitationsError) -> Self {
434 match err {
435 crate::operation::decline_invitations::DeclineInvitationsError::BadRequestException(inner) => Error::BadRequestException(inner),
436 crate::operation::decline_invitations::DeclineInvitationsError::InternalServerErrorException(inner) => {
437 Error::InternalServerErrorException(inner)
438 }
439 crate::operation::decline_invitations::DeclineInvitationsError::Unhandled(inner) => Error::Unhandled(inner),
440 }
441 }
442}
443impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::delete_detector::DeleteDetectorError, R>> for Error
444where
445 R: Send + Sync + std::fmt::Debug + 'static,
446{
447 fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::delete_detector::DeleteDetectorError, R>) -> Self {
448 match err {
449 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
450 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
451 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
452 source: err.into(),
453 }),
454 }
455 }
456}
457impl From<crate::operation::delete_detector::DeleteDetectorError> for Error {
458 fn from(err: crate::operation::delete_detector::DeleteDetectorError) -> Self {
459 match err {
460 crate::operation::delete_detector::DeleteDetectorError::BadRequestException(inner) => Error::BadRequestException(inner),
461 crate::operation::delete_detector::DeleteDetectorError::InternalServerErrorException(inner) => Error::InternalServerErrorException(inner),
462 crate::operation::delete_detector::DeleteDetectorError::Unhandled(inner) => Error::Unhandled(inner),
463 }
464 }
465}
466impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::delete_filter::DeleteFilterError, R>> for Error
467where
468 R: Send + Sync + std::fmt::Debug + 'static,
469{
470 fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::delete_filter::DeleteFilterError, R>) -> 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::delete_filter::DeleteFilterError> for Error {
481 fn from(err: crate::operation::delete_filter::DeleteFilterError) -> Self {
482 match err {
483 crate::operation::delete_filter::DeleteFilterError::BadRequestException(inner) => Error::BadRequestException(inner),
484 crate::operation::delete_filter::DeleteFilterError::InternalServerErrorException(inner) => Error::InternalServerErrorException(inner),
485 crate::operation::delete_filter::DeleteFilterError::Unhandled(inner) => Error::Unhandled(inner),
486 }
487 }
488}
489impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::delete_invitations::DeleteInvitationsError, R>> for Error
490where
491 R: Send + Sync + std::fmt::Debug + 'static,
492{
493 fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::delete_invitations::DeleteInvitationsError, R>) -> Self {
494 match err {
495 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
496 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
497 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
498 source: err.into(),
499 }),
500 }
501 }
502}
503impl From<crate::operation::delete_invitations::DeleteInvitationsError> for Error {
504 fn from(err: crate::operation::delete_invitations::DeleteInvitationsError) -> Self {
505 match err {
506 crate::operation::delete_invitations::DeleteInvitationsError::BadRequestException(inner) => Error::BadRequestException(inner),
507 crate::operation::delete_invitations::DeleteInvitationsError::InternalServerErrorException(inner) => {
508 Error::InternalServerErrorException(inner)
509 }
510 crate::operation::delete_invitations::DeleteInvitationsError::Unhandled(inner) => Error::Unhandled(inner),
511 }
512 }
513}
514impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::delete_ip_set::DeleteIPSetError, R>> for Error
515where
516 R: Send + Sync + std::fmt::Debug + 'static,
517{
518 fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::delete_ip_set::DeleteIPSetError, R>) -> Self {
519 match err {
520 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
521 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
522 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
523 source: err.into(),
524 }),
525 }
526 }
527}
528impl From<crate::operation::delete_ip_set::DeleteIPSetError> for Error {
529 fn from(err: crate::operation::delete_ip_set::DeleteIPSetError) -> Self {
530 match err {
531 crate::operation::delete_ip_set::DeleteIPSetError::BadRequestException(inner) => Error::BadRequestException(inner),
532 crate::operation::delete_ip_set::DeleteIPSetError::InternalServerErrorException(inner) => Error::InternalServerErrorException(inner),
533 crate::operation::delete_ip_set::DeleteIPSetError::Unhandled(inner) => Error::Unhandled(inner),
534 }
535 }
536}
537impl<R>
538 From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::delete_malware_protection_plan::DeleteMalwareProtectionPlanError, R>>
539 for Error
540where
541 R: Send + Sync + std::fmt::Debug + 'static,
542{
543 fn from(
544 err: ::aws_smithy_runtime_api::client::result::SdkError<
545 crate::operation::delete_malware_protection_plan::DeleteMalwareProtectionPlanError,
546 R,
547 >,
548 ) -> Self {
549 match err {
550 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
551 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
552 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
553 source: err.into(),
554 }),
555 }
556 }
557}
558impl From<crate::operation::delete_malware_protection_plan::DeleteMalwareProtectionPlanError> for Error {
559 fn from(err: crate::operation::delete_malware_protection_plan::DeleteMalwareProtectionPlanError) -> Self {
560 match err {
561 crate::operation::delete_malware_protection_plan::DeleteMalwareProtectionPlanError::AccessDeniedException(inner) => {
562 Error::AccessDeniedException(inner)
563 }
564 crate::operation::delete_malware_protection_plan::DeleteMalwareProtectionPlanError::BadRequestException(inner) => {
565 Error::BadRequestException(inner)
566 }
567 crate::operation::delete_malware_protection_plan::DeleteMalwareProtectionPlanError::InternalServerErrorException(inner) => {
568 Error::InternalServerErrorException(inner)
569 }
570 crate::operation::delete_malware_protection_plan::DeleteMalwareProtectionPlanError::ResourceNotFoundException(inner) => {
571 Error::ResourceNotFoundException(inner)
572 }
573 crate::operation::delete_malware_protection_plan::DeleteMalwareProtectionPlanError::Unhandled(inner) => Error::Unhandled(inner),
574 }
575 }
576}
577impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::delete_members::DeleteMembersError, R>> for Error
578where
579 R: Send + Sync + std::fmt::Debug + 'static,
580{
581 fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::delete_members::DeleteMembersError, R>) -> Self {
582 match err {
583 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
584 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
585 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
586 source: err.into(),
587 }),
588 }
589 }
590}
591impl From<crate::operation::delete_members::DeleteMembersError> for Error {
592 fn from(err: crate::operation::delete_members::DeleteMembersError) -> Self {
593 match err {
594 crate::operation::delete_members::DeleteMembersError::BadRequestException(inner) => Error::BadRequestException(inner),
595 crate::operation::delete_members::DeleteMembersError::InternalServerErrorException(inner) => Error::InternalServerErrorException(inner),
596 crate::operation::delete_members::DeleteMembersError::Unhandled(inner) => Error::Unhandled(inner),
597 }
598 }
599}
600impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::delete_publishing_destination::DeletePublishingDestinationError, R>>
601 for Error
602where
603 R: Send + Sync + std::fmt::Debug + 'static,
604{
605 fn from(
606 err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::delete_publishing_destination::DeletePublishingDestinationError, R>,
607 ) -> Self {
608 match err {
609 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
610 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
611 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
612 source: err.into(),
613 }),
614 }
615 }
616}
617impl From<crate::operation::delete_publishing_destination::DeletePublishingDestinationError> for Error {
618 fn from(err: crate::operation::delete_publishing_destination::DeletePublishingDestinationError) -> Self {
619 match err {
620 crate::operation::delete_publishing_destination::DeletePublishingDestinationError::BadRequestException(inner) => {
621 Error::BadRequestException(inner)
622 }
623 crate::operation::delete_publishing_destination::DeletePublishingDestinationError::InternalServerErrorException(inner) => {
624 Error::InternalServerErrorException(inner)
625 }
626 crate::operation::delete_publishing_destination::DeletePublishingDestinationError::Unhandled(inner) => Error::Unhandled(inner),
627 }
628 }
629}
630impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::delete_threat_entity_set::DeleteThreatEntitySetError, R>> for Error
631where
632 R: Send + Sync + std::fmt::Debug + 'static,
633{
634 fn from(
635 err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::delete_threat_entity_set::DeleteThreatEntitySetError, R>,
636 ) -> Self {
637 match err {
638 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
639 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
640 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
641 source: err.into(),
642 }),
643 }
644 }
645}
646impl From<crate::operation::delete_threat_entity_set::DeleteThreatEntitySetError> for Error {
647 fn from(err: crate::operation::delete_threat_entity_set::DeleteThreatEntitySetError) -> Self {
648 match err {
649 crate::operation::delete_threat_entity_set::DeleteThreatEntitySetError::BadRequestException(inner) => Error::BadRequestException(inner),
650 crate::operation::delete_threat_entity_set::DeleteThreatEntitySetError::InternalServerErrorException(inner) => {
651 Error::InternalServerErrorException(inner)
652 }
653 crate::operation::delete_threat_entity_set::DeleteThreatEntitySetError::Unhandled(inner) => Error::Unhandled(inner),
654 }
655 }
656}
657impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::delete_threat_intel_set::DeleteThreatIntelSetError, R>> for Error
658where
659 R: Send + Sync + std::fmt::Debug + 'static,
660{
661 fn from(
662 err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::delete_threat_intel_set::DeleteThreatIntelSetError, R>,
663 ) -> Self {
664 match err {
665 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
666 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
667 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
668 source: err.into(),
669 }),
670 }
671 }
672}
673impl From<crate::operation::delete_threat_intel_set::DeleteThreatIntelSetError> for Error {
674 fn from(err: crate::operation::delete_threat_intel_set::DeleteThreatIntelSetError) -> Self {
675 match err {
676 crate::operation::delete_threat_intel_set::DeleteThreatIntelSetError::BadRequestException(inner) => Error::BadRequestException(inner),
677 crate::operation::delete_threat_intel_set::DeleteThreatIntelSetError::InternalServerErrorException(inner) => {
678 Error::InternalServerErrorException(inner)
679 }
680 crate::operation::delete_threat_intel_set::DeleteThreatIntelSetError::Unhandled(inner) => Error::Unhandled(inner),
681 }
682 }
683}
684impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::delete_trusted_entity_set::DeleteTrustedEntitySetError, R>>
685 for Error
686where
687 R: Send + Sync + std::fmt::Debug + 'static,
688{
689 fn from(
690 err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::delete_trusted_entity_set::DeleteTrustedEntitySetError, R>,
691 ) -> Self {
692 match err {
693 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
694 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
695 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
696 source: err.into(),
697 }),
698 }
699 }
700}
701impl From<crate::operation::delete_trusted_entity_set::DeleteTrustedEntitySetError> for Error {
702 fn from(err: crate::operation::delete_trusted_entity_set::DeleteTrustedEntitySetError) -> Self {
703 match err {
704 crate::operation::delete_trusted_entity_set::DeleteTrustedEntitySetError::BadRequestException(inner) => Error::BadRequestException(inner),
705 crate::operation::delete_trusted_entity_set::DeleteTrustedEntitySetError::InternalServerErrorException(inner) => {
706 Error::InternalServerErrorException(inner)
707 }
708 crate::operation::delete_trusted_entity_set::DeleteTrustedEntitySetError::Unhandled(inner) => Error::Unhandled(inner),
709 }
710 }
711}
712impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::describe_malware_scans::DescribeMalwareScansError, R>> for Error
713where
714 R: Send + Sync + std::fmt::Debug + 'static,
715{
716 fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::describe_malware_scans::DescribeMalwareScansError, R>) -> Self {
717 match err {
718 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
719 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
720 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
721 source: err.into(),
722 }),
723 }
724 }
725}
726impl From<crate::operation::describe_malware_scans::DescribeMalwareScansError> for Error {
727 fn from(err: crate::operation::describe_malware_scans::DescribeMalwareScansError) -> Self {
728 match err {
729 crate::operation::describe_malware_scans::DescribeMalwareScansError::BadRequestException(inner) => Error::BadRequestException(inner),
730 crate::operation::describe_malware_scans::DescribeMalwareScansError::InternalServerErrorException(inner) => {
731 Error::InternalServerErrorException(inner)
732 }
733 crate::operation::describe_malware_scans::DescribeMalwareScansError::Unhandled(inner) => Error::Unhandled(inner),
734 }
735 }
736}
737impl<R>
738 From<
739 ::aws_smithy_runtime_api::client::result::SdkError<
740 crate::operation::describe_organization_configuration::DescribeOrganizationConfigurationError,
741 R,
742 >,
743 > for Error
744where
745 R: Send + Sync + std::fmt::Debug + 'static,
746{
747 fn from(
748 err: ::aws_smithy_runtime_api::client::result::SdkError<
749 crate::operation::describe_organization_configuration::DescribeOrganizationConfigurationError,
750 R,
751 >,
752 ) -> Self {
753 match err {
754 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
755 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
756 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
757 source: err.into(),
758 }),
759 }
760 }
761}
762impl From<crate::operation::describe_organization_configuration::DescribeOrganizationConfigurationError> for Error {
763 fn from(err: crate::operation::describe_organization_configuration::DescribeOrganizationConfigurationError) -> Self {
764 match err {
765 crate::operation::describe_organization_configuration::DescribeOrganizationConfigurationError::BadRequestException(inner) => {
766 Error::BadRequestException(inner)
767 }
768 crate::operation::describe_organization_configuration::DescribeOrganizationConfigurationError::InternalServerErrorException(inner) => {
769 Error::InternalServerErrorException(inner)
770 }
771 crate::operation::describe_organization_configuration::DescribeOrganizationConfigurationError::Unhandled(inner) => {
772 Error::Unhandled(inner)
773 }
774 }
775 }
776}
777impl<R>
778 From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::describe_publishing_destination::DescribePublishingDestinationError, R>>
779 for Error
780where
781 R: Send + Sync + std::fmt::Debug + 'static,
782{
783 fn from(
784 err: ::aws_smithy_runtime_api::client::result::SdkError<
785 crate::operation::describe_publishing_destination::DescribePublishingDestinationError,
786 R,
787 >,
788 ) -> 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::describe_publishing_destination::DescribePublishingDestinationError> for Error {
799 fn from(err: crate::operation::describe_publishing_destination::DescribePublishingDestinationError) -> Self {
800 match err {
801 crate::operation::describe_publishing_destination::DescribePublishingDestinationError::BadRequestException(inner) => {
802 Error::BadRequestException(inner)
803 }
804 crate::operation::describe_publishing_destination::DescribePublishingDestinationError::InternalServerErrorException(inner) => {
805 Error::InternalServerErrorException(inner)
806 }
807 crate::operation::describe_publishing_destination::DescribePublishingDestinationError::Unhandled(inner) => Error::Unhandled(inner),
808 }
809 }
810}
811impl<R>
812 From<
813 ::aws_smithy_runtime_api::client::result::SdkError<
814 crate::operation::disable_organization_admin_account::DisableOrganizationAdminAccountError,
815 R,
816 >,
817 > for Error
818where
819 R: Send + Sync + std::fmt::Debug + 'static,
820{
821 fn from(
822 err: ::aws_smithy_runtime_api::client::result::SdkError<
823 crate::operation::disable_organization_admin_account::DisableOrganizationAdminAccountError,
824 R,
825 >,
826 ) -> Self {
827 match err {
828 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
829 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
830 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
831 source: err.into(),
832 }),
833 }
834 }
835}
836impl From<crate::operation::disable_organization_admin_account::DisableOrganizationAdminAccountError> for Error {
837 fn from(err: crate::operation::disable_organization_admin_account::DisableOrganizationAdminAccountError) -> Self {
838 match err {
839 crate::operation::disable_organization_admin_account::DisableOrganizationAdminAccountError::BadRequestException(inner) => {
840 Error::BadRequestException(inner)
841 }
842 crate::operation::disable_organization_admin_account::DisableOrganizationAdminAccountError::InternalServerErrorException(inner) => {
843 Error::InternalServerErrorException(inner)
844 }
845 crate::operation::disable_organization_admin_account::DisableOrganizationAdminAccountError::Unhandled(inner) => Error::Unhandled(inner),
846 }
847 }
848}
849impl<R>
850 From<
851 ::aws_smithy_runtime_api::client::result::SdkError<
852 crate::operation::disassociate_from_administrator_account::DisassociateFromAdministratorAccountError,
853 R,
854 >,
855 > for Error
856where
857 R: Send + Sync + std::fmt::Debug + 'static,
858{
859 fn from(
860 err: ::aws_smithy_runtime_api::client::result::SdkError<
861 crate::operation::disassociate_from_administrator_account::DisassociateFromAdministratorAccountError,
862 R,
863 >,
864 ) -> Self {
865 match err {
866 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
867 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
868 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
869 source: err.into(),
870 }),
871 }
872 }
873}
874impl From<crate::operation::disassociate_from_administrator_account::DisassociateFromAdministratorAccountError> for Error {
875 fn from(err: crate::operation::disassociate_from_administrator_account::DisassociateFromAdministratorAccountError) -> Self {
876 match err {
877 crate::operation::disassociate_from_administrator_account::DisassociateFromAdministratorAccountError::BadRequestException(inner) => {
878 Error::BadRequestException(inner)
879 }
880 crate::operation::disassociate_from_administrator_account::DisassociateFromAdministratorAccountError::InternalServerErrorException(
881 inner,
882 ) => Error::InternalServerErrorException(inner),
883 crate::operation::disassociate_from_administrator_account::DisassociateFromAdministratorAccountError::Unhandled(inner) => {
884 Error::Unhandled(inner)
885 }
886 }
887 }
888}
889impl<R>
890 From<
891 ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::disassociate_from_master_account::DisassociateFromMasterAccountError, R>,
892 > for Error
893where
894 R: Send + Sync + std::fmt::Debug + 'static,
895{
896 fn from(
897 err: ::aws_smithy_runtime_api::client::result::SdkError<
898 crate::operation::disassociate_from_master_account::DisassociateFromMasterAccountError,
899 R,
900 >,
901 ) -> Self {
902 match err {
903 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
904 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
905 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
906 source: err.into(),
907 }),
908 }
909 }
910}
911impl From<crate::operation::disassociate_from_master_account::DisassociateFromMasterAccountError> for Error {
912 fn from(err: crate::operation::disassociate_from_master_account::DisassociateFromMasterAccountError) -> Self {
913 match err {
914 crate::operation::disassociate_from_master_account::DisassociateFromMasterAccountError::BadRequestException(inner) => {
915 Error::BadRequestException(inner)
916 }
917 crate::operation::disassociate_from_master_account::DisassociateFromMasterAccountError::InternalServerErrorException(inner) => {
918 Error::InternalServerErrorException(inner)
919 }
920 crate::operation::disassociate_from_master_account::DisassociateFromMasterAccountError::Unhandled(inner) => Error::Unhandled(inner),
921 }
922 }
923}
924impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::disassociate_members::DisassociateMembersError, R>> for Error
925where
926 R: Send + Sync + std::fmt::Debug + 'static,
927{
928 fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::disassociate_members::DisassociateMembersError, R>) -> Self {
929 match err {
930 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
931 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
932 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
933 source: err.into(),
934 }),
935 }
936 }
937}
938impl From<crate::operation::disassociate_members::DisassociateMembersError> for Error {
939 fn from(err: crate::operation::disassociate_members::DisassociateMembersError) -> Self {
940 match err {
941 crate::operation::disassociate_members::DisassociateMembersError::BadRequestException(inner) => Error::BadRequestException(inner),
942 crate::operation::disassociate_members::DisassociateMembersError::InternalServerErrorException(inner) => {
943 Error::InternalServerErrorException(inner)
944 }
945 crate::operation::disassociate_members::DisassociateMembersError::Unhandled(inner) => Error::Unhandled(inner),
946 }
947 }
948}
949impl<R>
950 From<
951 ::aws_smithy_runtime_api::client::result::SdkError<
952 crate::operation::enable_organization_admin_account::EnableOrganizationAdminAccountError,
953 R,
954 >,
955 > for Error
956where
957 R: Send + Sync + std::fmt::Debug + 'static,
958{
959 fn from(
960 err: ::aws_smithy_runtime_api::client::result::SdkError<
961 crate::operation::enable_organization_admin_account::EnableOrganizationAdminAccountError,
962 R,
963 >,
964 ) -> Self {
965 match err {
966 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
967 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
968 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
969 source: err.into(),
970 }),
971 }
972 }
973}
974impl From<crate::operation::enable_organization_admin_account::EnableOrganizationAdminAccountError> for Error {
975 fn from(err: crate::operation::enable_organization_admin_account::EnableOrganizationAdminAccountError) -> Self {
976 match err {
977 crate::operation::enable_organization_admin_account::EnableOrganizationAdminAccountError::BadRequestException(inner) => {
978 Error::BadRequestException(inner)
979 }
980 crate::operation::enable_organization_admin_account::EnableOrganizationAdminAccountError::InternalServerErrorException(inner) => {
981 Error::InternalServerErrorException(inner)
982 }
983 crate::operation::enable_organization_admin_account::EnableOrganizationAdminAccountError::Unhandled(inner) => Error::Unhandled(inner),
984 }
985 }
986}
987impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::get_administrator_account::GetAdministratorAccountError, R>>
988 for Error
989where
990 R: Send + Sync + std::fmt::Debug + 'static,
991{
992 fn from(
993 err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::get_administrator_account::GetAdministratorAccountError, R>,
994 ) -> Self {
995 match err {
996 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
997 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
998 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
999 source: err.into(),
1000 }),
1001 }
1002 }
1003}
1004impl From<crate::operation::get_administrator_account::GetAdministratorAccountError> for Error {
1005 fn from(err: crate::operation::get_administrator_account::GetAdministratorAccountError) -> Self {
1006 match err {
1007 crate::operation::get_administrator_account::GetAdministratorAccountError::BadRequestException(inner) => {
1008 Error::BadRequestException(inner)
1009 }
1010 crate::operation::get_administrator_account::GetAdministratorAccountError::InternalServerErrorException(inner) => {
1011 Error::InternalServerErrorException(inner)
1012 }
1013 crate::operation::get_administrator_account::GetAdministratorAccountError::Unhandled(inner) => Error::Unhandled(inner),
1014 }
1015 }
1016}
1017impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::get_coverage_statistics::GetCoverageStatisticsError, R>> for Error
1018where
1019 R: Send + Sync + std::fmt::Debug + 'static,
1020{
1021 fn from(
1022 err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::get_coverage_statistics::GetCoverageStatisticsError, R>,
1023 ) -> Self {
1024 match err {
1025 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
1026 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
1027 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
1028 source: err.into(),
1029 }),
1030 }
1031 }
1032}
1033impl From<crate::operation::get_coverage_statistics::GetCoverageStatisticsError> for Error {
1034 fn from(err: crate::operation::get_coverage_statistics::GetCoverageStatisticsError) -> Self {
1035 match err {
1036 crate::operation::get_coverage_statistics::GetCoverageStatisticsError::BadRequestException(inner) => Error::BadRequestException(inner),
1037 crate::operation::get_coverage_statistics::GetCoverageStatisticsError::InternalServerErrorException(inner) => {
1038 Error::InternalServerErrorException(inner)
1039 }
1040 crate::operation::get_coverage_statistics::GetCoverageStatisticsError::Unhandled(inner) => Error::Unhandled(inner),
1041 }
1042 }
1043}
1044impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::get_detector::GetDetectorError, R>> for Error
1045where
1046 R: Send + Sync + std::fmt::Debug + 'static,
1047{
1048 fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::get_detector::GetDetectorError, R>) -> Self {
1049 match err {
1050 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
1051 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
1052 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
1053 source: err.into(),
1054 }),
1055 }
1056 }
1057}
1058impl From<crate::operation::get_detector::GetDetectorError> for Error {
1059 fn from(err: crate::operation::get_detector::GetDetectorError) -> Self {
1060 match err {
1061 crate::operation::get_detector::GetDetectorError::BadRequestException(inner) => Error::BadRequestException(inner),
1062 crate::operation::get_detector::GetDetectorError::InternalServerErrorException(inner) => Error::InternalServerErrorException(inner),
1063 crate::operation::get_detector::GetDetectorError::Unhandled(inner) => Error::Unhandled(inner),
1064 }
1065 }
1066}
1067impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::get_filter::GetFilterError, R>> for Error
1068where
1069 R: Send + Sync + std::fmt::Debug + 'static,
1070{
1071 fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::get_filter::GetFilterError, R>) -> Self {
1072 match err {
1073 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
1074 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
1075 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
1076 source: err.into(),
1077 }),
1078 }
1079 }
1080}
1081impl From<crate::operation::get_filter::GetFilterError> for Error {
1082 fn from(err: crate::operation::get_filter::GetFilterError) -> Self {
1083 match err {
1084 crate::operation::get_filter::GetFilterError::BadRequestException(inner) => Error::BadRequestException(inner),
1085 crate::operation::get_filter::GetFilterError::InternalServerErrorException(inner) => Error::InternalServerErrorException(inner),
1086 crate::operation::get_filter::GetFilterError::Unhandled(inner) => Error::Unhandled(inner),
1087 }
1088 }
1089}
1090impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::get_findings::GetFindingsError, R>> for Error
1091where
1092 R: Send + Sync + std::fmt::Debug + 'static,
1093{
1094 fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::get_findings::GetFindingsError, R>) -> Self {
1095 match err {
1096 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
1097 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
1098 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
1099 source: err.into(),
1100 }),
1101 }
1102 }
1103}
1104impl From<crate::operation::get_findings::GetFindingsError> for Error {
1105 fn from(err: crate::operation::get_findings::GetFindingsError) -> Self {
1106 match err {
1107 crate::operation::get_findings::GetFindingsError::BadRequestException(inner) => Error::BadRequestException(inner),
1108 crate::operation::get_findings::GetFindingsError::InternalServerErrorException(inner) => Error::InternalServerErrorException(inner),
1109 crate::operation::get_findings::GetFindingsError::Unhandled(inner) => Error::Unhandled(inner),
1110 }
1111 }
1112}
1113impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::get_findings_statistics::GetFindingsStatisticsError, R>> for Error
1114where
1115 R: Send + Sync + std::fmt::Debug + 'static,
1116{
1117 fn from(
1118 err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::get_findings_statistics::GetFindingsStatisticsError, R>,
1119 ) -> Self {
1120 match err {
1121 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
1122 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
1123 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
1124 source: err.into(),
1125 }),
1126 }
1127 }
1128}
1129impl From<crate::operation::get_findings_statistics::GetFindingsStatisticsError> for Error {
1130 fn from(err: crate::operation::get_findings_statistics::GetFindingsStatisticsError) -> Self {
1131 match err {
1132 crate::operation::get_findings_statistics::GetFindingsStatisticsError::BadRequestException(inner) => Error::BadRequestException(inner),
1133 crate::operation::get_findings_statistics::GetFindingsStatisticsError::InternalServerErrorException(inner) => {
1134 Error::InternalServerErrorException(inner)
1135 }
1136 crate::operation::get_findings_statistics::GetFindingsStatisticsError::Unhandled(inner) => Error::Unhandled(inner),
1137 }
1138 }
1139}
1140impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::get_invitations_count::GetInvitationsCountError, R>> for Error
1141where
1142 R: Send + Sync + std::fmt::Debug + 'static,
1143{
1144 fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::get_invitations_count::GetInvitationsCountError, R>) -> Self {
1145 match err {
1146 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
1147 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
1148 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
1149 source: err.into(),
1150 }),
1151 }
1152 }
1153}
1154impl From<crate::operation::get_invitations_count::GetInvitationsCountError> for Error {
1155 fn from(err: crate::operation::get_invitations_count::GetInvitationsCountError) -> Self {
1156 match err {
1157 crate::operation::get_invitations_count::GetInvitationsCountError::BadRequestException(inner) => Error::BadRequestException(inner),
1158 crate::operation::get_invitations_count::GetInvitationsCountError::InternalServerErrorException(inner) => {
1159 Error::InternalServerErrorException(inner)
1160 }
1161 crate::operation::get_invitations_count::GetInvitationsCountError::Unhandled(inner) => Error::Unhandled(inner),
1162 }
1163 }
1164}
1165impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::get_ip_set::GetIPSetError, R>> for Error
1166where
1167 R: Send + Sync + std::fmt::Debug + 'static,
1168{
1169 fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::get_ip_set::GetIPSetError, R>) -> Self {
1170 match err {
1171 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
1172 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
1173 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
1174 source: err.into(),
1175 }),
1176 }
1177 }
1178}
1179impl From<crate::operation::get_ip_set::GetIPSetError> for Error {
1180 fn from(err: crate::operation::get_ip_set::GetIPSetError) -> Self {
1181 match err {
1182 crate::operation::get_ip_set::GetIPSetError::BadRequestException(inner) => Error::BadRequestException(inner),
1183 crate::operation::get_ip_set::GetIPSetError::InternalServerErrorException(inner) => Error::InternalServerErrorException(inner),
1184 crate::operation::get_ip_set::GetIPSetError::Unhandled(inner) => Error::Unhandled(inner),
1185 }
1186 }
1187}
1188impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::get_malware_protection_plan::GetMalwareProtectionPlanError, R>>
1189 for Error
1190where
1191 R: Send + Sync + std::fmt::Debug + 'static,
1192{
1193 fn from(
1194 err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::get_malware_protection_plan::GetMalwareProtectionPlanError, R>,
1195 ) -> Self {
1196 match err {
1197 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
1198 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
1199 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
1200 source: err.into(),
1201 }),
1202 }
1203 }
1204}
1205impl From<crate::operation::get_malware_protection_plan::GetMalwareProtectionPlanError> for Error {
1206 fn from(err: crate::operation::get_malware_protection_plan::GetMalwareProtectionPlanError) -> Self {
1207 match err {
1208 crate::operation::get_malware_protection_plan::GetMalwareProtectionPlanError::AccessDeniedException(inner) => {
1209 Error::AccessDeniedException(inner)
1210 }
1211 crate::operation::get_malware_protection_plan::GetMalwareProtectionPlanError::BadRequestException(inner) => {
1212 Error::BadRequestException(inner)
1213 }
1214 crate::operation::get_malware_protection_plan::GetMalwareProtectionPlanError::InternalServerErrorException(inner) => {
1215 Error::InternalServerErrorException(inner)
1216 }
1217 crate::operation::get_malware_protection_plan::GetMalwareProtectionPlanError::ResourceNotFoundException(inner) => {
1218 Error::ResourceNotFoundException(inner)
1219 }
1220 crate::operation::get_malware_protection_plan::GetMalwareProtectionPlanError::Unhandled(inner) => Error::Unhandled(inner),
1221 }
1222 }
1223}
1224impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::get_malware_scan::GetMalwareScanError, R>> for Error
1225where
1226 R: Send + Sync + std::fmt::Debug + 'static,
1227{
1228 fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::get_malware_scan::GetMalwareScanError, R>) -> Self {
1229 match err {
1230 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
1231 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
1232 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
1233 source: err.into(),
1234 }),
1235 }
1236 }
1237}
1238impl From<crate::operation::get_malware_scan::GetMalwareScanError> for Error {
1239 fn from(err: crate::operation::get_malware_scan::GetMalwareScanError) -> Self {
1240 match err {
1241 crate::operation::get_malware_scan::GetMalwareScanError::BadRequestException(inner) => Error::BadRequestException(inner),
1242 crate::operation::get_malware_scan::GetMalwareScanError::InternalServerErrorException(inner) => {
1243 Error::InternalServerErrorException(inner)
1244 }
1245 crate::operation::get_malware_scan::GetMalwareScanError::ResourceNotFoundException(inner) => Error::ResourceNotFoundException(inner),
1246 crate::operation::get_malware_scan::GetMalwareScanError::Unhandled(inner) => Error::Unhandled(inner),
1247 }
1248 }
1249}
1250impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::get_malware_scan_settings::GetMalwareScanSettingsError, R>>
1251 for Error
1252where
1253 R: Send + Sync + std::fmt::Debug + 'static,
1254{
1255 fn from(
1256 err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::get_malware_scan_settings::GetMalwareScanSettingsError, R>,
1257 ) -> Self {
1258 match err {
1259 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
1260 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
1261 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
1262 source: err.into(),
1263 }),
1264 }
1265 }
1266}
1267impl From<crate::operation::get_malware_scan_settings::GetMalwareScanSettingsError> for Error {
1268 fn from(err: crate::operation::get_malware_scan_settings::GetMalwareScanSettingsError) -> Self {
1269 match err {
1270 crate::operation::get_malware_scan_settings::GetMalwareScanSettingsError::BadRequestException(inner) => Error::BadRequestException(inner),
1271 crate::operation::get_malware_scan_settings::GetMalwareScanSettingsError::InternalServerErrorException(inner) => {
1272 Error::InternalServerErrorException(inner)
1273 }
1274 crate::operation::get_malware_scan_settings::GetMalwareScanSettingsError::Unhandled(inner) => Error::Unhandled(inner),
1275 }
1276 }
1277}
1278impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::get_master_account::GetMasterAccountError, R>> for Error
1279where
1280 R: Send + Sync + std::fmt::Debug + 'static,
1281{
1282 fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::get_master_account::GetMasterAccountError, R>) -> Self {
1283 match err {
1284 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
1285 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
1286 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
1287 source: err.into(),
1288 }),
1289 }
1290 }
1291}
1292impl From<crate::operation::get_master_account::GetMasterAccountError> for Error {
1293 fn from(err: crate::operation::get_master_account::GetMasterAccountError) -> Self {
1294 match err {
1295 crate::operation::get_master_account::GetMasterAccountError::BadRequestException(inner) => Error::BadRequestException(inner),
1296 crate::operation::get_master_account::GetMasterAccountError::InternalServerErrorException(inner) => {
1297 Error::InternalServerErrorException(inner)
1298 }
1299 crate::operation::get_master_account::GetMasterAccountError::Unhandled(inner) => Error::Unhandled(inner),
1300 }
1301 }
1302}
1303impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::get_member_detectors::GetMemberDetectorsError, R>> for Error
1304where
1305 R: Send + Sync + std::fmt::Debug + 'static,
1306{
1307 fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::get_member_detectors::GetMemberDetectorsError, R>) -> Self {
1308 match err {
1309 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
1310 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
1311 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
1312 source: err.into(),
1313 }),
1314 }
1315 }
1316}
1317impl From<crate::operation::get_member_detectors::GetMemberDetectorsError> for Error {
1318 fn from(err: crate::operation::get_member_detectors::GetMemberDetectorsError) -> Self {
1319 match err {
1320 crate::operation::get_member_detectors::GetMemberDetectorsError::BadRequestException(inner) => Error::BadRequestException(inner),
1321 crate::operation::get_member_detectors::GetMemberDetectorsError::InternalServerErrorException(inner) => {
1322 Error::InternalServerErrorException(inner)
1323 }
1324 crate::operation::get_member_detectors::GetMemberDetectorsError::Unhandled(inner) => Error::Unhandled(inner),
1325 }
1326 }
1327}
1328impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::get_members::GetMembersError, R>> for Error
1329where
1330 R: Send + Sync + std::fmt::Debug + 'static,
1331{
1332 fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::get_members::GetMembersError, R>) -> Self {
1333 match err {
1334 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
1335 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
1336 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
1337 source: err.into(),
1338 }),
1339 }
1340 }
1341}
1342impl From<crate::operation::get_members::GetMembersError> for Error {
1343 fn from(err: crate::operation::get_members::GetMembersError) -> Self {
1344 match err {
1345 crate::operation::get_members::GetMembersError::BadRequestException(inner) => Error::BadRequestException(inner),
1346 crate::operation::get_members::GetMembersError::InternalServerErrorException(inner) => Error::InternalServerErrorException(inner),
1347 crate::operation::get_members::GetMembersError::Unhandled(inner) => Error::Unhandled(inner),
1348 }
1349 }
1350}
1351impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::get_organization_statistics::GetOrganizationStatisticsError, R>>
1352 for Error
1353where
1354 R: Send + Sync + std::fmt::Debug + 'static,
1355{
1356 fn from(
1357 err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::get_organization_statistics::GetOrganizationStatisticsError, R>,
1358 ) -> Self {
1359 match err {
1360 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
1361 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
1362 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
1363 source: err.into(),
1364 }),
1365 }
1366 }
1367}
1368impl From<crate::operation::get_organization_statistics::GetOrganizationStatisticsError> for Error {
1369 fn from(err: crate::operation::get_organization_statistics::GetOrganizationStatisticsError) -> Self {
1370 match err {
1371 crate::operation::get_organization_statistics::GetOrganizationStatisticsError::BadRequestException(inner) => {
1372 Error::BadRequestException(inner)
1373 }
1374 crate::operation::get_organization_statistics::GetOrganizationStatisticsError::InternalServerErrorException(inner) => {
1375 Error::InternalServerErrorException(inner)
1376 }
1377 crate::operation::get_organization_statistics::GetOrganizationStatisticsError::Unhandled(inner) => Error::Unhandled(inner),
1378 }
1379 }
1380}
1381impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::get_remaining_free_trial_days::GetRemainingFreeTrialDaysError, R>>
1382 for Error
1383where
1384 R: Send + Sync + std::fmt::Debug + 'static,
1385{
1386 fn from(
1387 err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::get_remaining_free_trial_days::GetRemainingFreeTrialDaysError, R>,
1388 ) -> Self {
1389 match err {
1390 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
1391 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
1392 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
1393 source: err.into(),
1394 }),
1395 }
1396 }
1397}
1398impl From<crate::operation::get_remaining_free_trial_days::GetRemainingFreeTrialDaysError> for Error {
1399 fn from(err: crate::operation::get_remaining_free_trial_days::GetRemainingFreeTrialDaysError) -> Self {
1400 match err {
1401 crate::operation::get_remaining_free_trial_days::GetRemainingFreeTrialDaysError::BadRequestException(inner) => {
1402 Error::BadRequestException(inner)
1403 }
1404 crate::operation::get_remaining_free_trial_days::GetRemainingFreeTrialDaysError::InternalServerErrorException(inner) => {
1405 Error::InternalServerErrorException(inner)
1406 }
1407 crate::operation::get_remaining_free_trial_days::GetRemainingFreeTrialDaysError::Unhandled(inner) => Error::Unhandled(inner),
1408 }
1409 }
1410}
1411impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::get_threat_entity_set::GetThreatEntitySetError, R>> for Error
1412where
1413 R: Send + Sync + std::fmt::Debug + 'static,
1414{
1415 fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::get_threat_entity_set::GetThreatEntitySetError, R>) -> Self {
1416 match err {
1417 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
1418 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
1419 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
1420 source: err.into(),
1421 }),
1422 }
1423 }
1424}
1425impl From<crate::operation::get_threat_entity_set::GetThreatEntitySetError> for Error {
1426 fn from(err: crate::operation::get_threat_entity_set::GetThreatEntitySetError) -> Self {
1427 match err {
1428 crate::operation::get_threat_entity_set::GetThreatEntitySetError::BadRequestException(inner) => Error::BadRequestException(inner),
1429 crate::operation::get_threat_entity_set::GetThreatEntitySetError::InternalServerErrorException(inner) => {
1430 Error::InternalServerErrorException(inner)
1431 }
1432 crate::operation::get_threat_entity_set::GetThreatEntitySetError::Unhandled(inner) => Error::Unhandled(inner),
1433 }
1434 }
1435}
1436impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::get_threat_intel_set::GetThreatIntelSetError, R>> for Error
1437where
1438 R: Send + Sync + std::fmt::Debug + 'static,
1439{
1440 fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::get_threat_intel_set::GetThreatIntelSetError, R>) -> Self {
1441 match err {
1442 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
1443 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
1444 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
1445 source: err.into(),
1446 }),
1447 }
1448 }
1449}
1450impl From<crate::operation::get_threat_intel_set::GetThreatIntelSetError> for Error {
1451 fn from(err: crate::operation::get_threat_intel_set::GetThreatIntelSetError) -> Self {
1452 match err {
1453 crate::operation::get_threat_intel_set::GetThreatIntelSetError::BadRequestException(inner) => Error::BadRequestException(inner),
1454 crate::operation::get_threat_intel_set::GetThreatIntelSetError::InternalServerErrorException(inner) => {
1455 Error::InternalServerErrorException(inner)
1456 }
1457 crate::operation::get_threat_intel_set::GetThreatIntelSetError::Unhandled(inner) => Error::Unhandled(inner),
1458 }
1459 }
1460}
1461impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::get_trusted_entity_set::GetTrustedEntitySetError, R>> for Error
1462where
1463 R: Send + Sync + std::fmt::Debug + 'static,
1464{
1465 fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::get_trusted_entity_set::GetTrustedEntitySetError, R>) -> Self {
1466 match err {
1467 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
1468 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
1469 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
1470 source: err.into(),
1471 }),
1472 }
1473 }
1474}
1475impl From<crate::operation::get_trusted_entity_set::GetTrustedEntitySetError> for Error {
1476 fn from(err: crate::operation::get_trusted_entity_set::GetTrustedEntitySetError) -> Self {
1477 match err {
1478 crate::operation::get_trusted_entity_set::GetTrustedEntitySetError::BadRequestException(inner) => Error::BadRequestException(inner),
1479 crate::operation::get_trusted_entity_set::GetTrustedEntitySetError::InternalServerErrorException(inner) => {
1480 Error::InternalServerErrorException(inner)
1481 }
1482 crate::operation::get_trusted_entity_set::GetTrustedEntitySetError::Unhandled(inner) => Error::Unhandled(inner),
1483 }
1484 }
1485}
1486impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::get_usage_statistics::GetUsageStatisticsError, R>> for Error
1487where
1488 R: Send + Sync + std::fmt::Debug + 'static,
1489{
1490 fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::get_usage_statistics::GetUsageStatisticsError, R>) -> Self {
1491 match err {
1492 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
1493 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
1494 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
1495 source: err.into(),
1496 }),
1497 }
1498 }
1499}
1500impl From<crate::operation::get_usage_statistics::GetUsageStatisticsError> for Error {
1501 fn from(err: crate::operation::get_usage_statistics::GetUsageStatisticsError) -> Self {
1502 match err {
1503 crate::operation::get_usage_statistics::GetUsageStatisticsError::BadRequestException(inner) => Error::BadRequestException(inner),
1504 crate::operation::get_usage_statistics::GetUsageStatisticsError::InternalServerErrorException(inner) => {
1505 Error::InternalServerErrorException(inner)
1506 }
1507 crate::operation::get_usage_statistics::GetUsageStatisticsError::Unhandled(inner) => Error::Unhandled(inner),
1508 }
1509 }
1510}
1511impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::invite_members::InviteMembersError, R>> for Error
1512where
1513 R: Send + Sync + std::fmt::Debug + 'static,
1514{
1515 fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::invite_members::InviteMembersError, R>) -> Self {
1516 match err {
1517 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
1518 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
1519 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
1520 source: err.into(),
1521 }),
1522 }
1523 }
1524}
1525impl From<crate::operation::invite_members::InviteMembersError> for Error {
1526 fn from(err: crate::operation::invite_members::InviteMembersError) -> Self {
1527 match err {
1528 crate::operation::invite_members::InviteMembersError::BadRequestException(inner) => Error::BadRequestException(inner),
1529 crate::operation::invite_members::InviteMembersError::InternalServerErrorException(inner) => Error::InternalServerErrorException(inner),
1530 crate::operation::invite_members::InviteMembersError::Unhandled(inner) => Error::Unhandled(inner),
1531 }
1532 }
1533}
1534impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::list_coverage::ListCoverageError, R>> for Error
1535where
1536 R: Send + Sync + std::fmt::Debug + 'static,
1537{
1538 fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::list_coverage::ListCoverageError, R>) -> Self {
1539 match err {
1540 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
1541 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
1542 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
1543 source: err.into(),
1544 }),
1545 }
1546 }
1547}
1548impl From<crate::operation::list_coverage::ListCoverageError> for Error {
1549 fn from(err: crate::operation::list_coverage::ListCoverageError) -> Self {
1550 match err {
1551 crate::operation::list_coverage::ListCoverageError::BadRequestException(inner) => Error::BadRequestException(inner),
1552 crate::operation::list_coverage::ListCoverageError::InternalServerErrorException(inner) => Error::InternalServerErrorException(inner),
1553 crate::operation::list_coverage::ListCoverageError::Unhandled(inner) => Error::Unhandled(inner),
1554 }
1555 }
1556}
1557impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::list_detectors::ListDetectorsError, R>> for Error
1558where
1559 R: Send + Sync + std::fmt::Debug + 'static,
1560{
1561 fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::list_detectors::ListDetectorsError, R>) -> Self {
1562 match err {
1563 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
1564 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
1565 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
1566 source: err.into(),
1567 }),
1568 }
1569 }
1570}
1571impl From<crate::operation::list_detectors::ListDetectorsError> for Error {
1572 fn from(err: crate::operation::list_detectors::ListDetectorsError) -> Self {
1573 match err {
1574 crate::operation::list_detectors::ListDetectorsError::BadRequestException(inner) => Error::BadRequestException(inner),
1575 crate::operation::list_detectors::ListDetectorsError::InternalServerErrorException(inner) => Error::InternalServerErrorException(inner),
1576 crate::operation::list_detectors::ListDetectorsError::Unhandled(inner) => Error::Unhandled(inner),
1577 }
1578 }
1579}
1580impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::list_filters::ListFiltersError, R>> for Error
1581where
1582 R: Send + Sync + std::fmt::Debug + 'static,
1583{
1584 fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::list_filters::ListFiltersError, R>) -> Self {
1585 match err {
1586 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
1587 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
1588 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
1589 source: err.into(),
1590 }),
1591 }
1592 }
1593}
1594impl From<crate::operation::list_filters::ListFiltersError> for Error {
1595 fn from(err: crate::operation::list_filters::ListFiltersError) -> Self {
1596 match err {
1597 crate::operation::list_filters::ListFiltersError::BadRequestException(inner) => Error::BadRequestException(inner),
1598 crate::operation::list_filters::ListFiltersError::InternalServerErrorException(inner) => Error::InternalServerErrorException(inner),
1599 crate::operation::list_filters::ListFiltersError::Unhandled(inner) => Error::Unhandled(inner),
1600 }
1601 }
1602}
1603impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::list_findings::ListFindingsError, R>> for Error
1604where
1605 R: Send + Sync + std::fmt::Debug + 'static,
1606{
1607 fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::list_findings::ListFindingsError, R>) -> Self {
1608 match err {
1609 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
1610 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
1611 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
1612 source: err.into(),
1613 }),
1614 }
1615 }
1616}
1617impl From<crate::operation::list_findings::ListFindingsError> for Error {
1618 fn from(err: crate::operation::list_findings::ListFindingsError) -> Self {
1619 match err {
1620 crate::operation::list_findings::ListFindingsError::BadRequestException(inner) => Error::BadRequestException(inner),
1621 crate::operation::list_findings::ListFindingsError::InternalServerErrorException(inner) => Error::InternalServerErrorException(inner),
1622 crate::operation::list_findings::ListFindingsError::Unhandled(inner) => Error::Unhandled(inner),
1623 }
1624 }
1625}
1626impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::list_invitations::ListInvitationsError, R>> for Error
1627where
1628 R: Send + Sync + std::fmt::Debug + 'static,
1629{
1630 fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::list_invitations::ListInvitationsError, R>) -> Self {
1631 match err {
1632 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
1633 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
1634 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
1635 source: err.into(),
1636 }),
1637 }
1638 }
1639}
1640impl From<crate::operation::list_invitations::ListInvitationsError> for Error {
1641 fn from(err: crate::operation::list_invitations::ListInvitationsError) -> Self {
1642 match err {
1643 crate::operation::list_invitations::ListInvitationsError::BadRequestException(inner) => Error::BadRequestException(inner),
1644 crate::operation::list_invitations::ListInvitationsError::InternalServerErrorException(inner) => {
1645 Error::InternalServerErrorException(inner)
1646 }
1647 crate::operation::list_invitations::ListInvitationsError::Unhandled(inner) => Error::Unhandled(inner),
1648 }
1649 }
1650}
1651impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::list_ip_sets::ListIPSetsError, R>> for Error
1652where
1653 R: Send + Sync + std::fmt::Debug + 'static,
1654{
1655 fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::list_ip_sets::ListIPSetsError, R>) -> Self {
1656 match err {
1657 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
1658 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
1659 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
1660 source: err.into(),
1661 }),
1662 }
1663 }
1664}
1665impl From<crate::operation::list_ip_sets::ListIPSetsError> for Error {
1666 fn from(err: crate::operation::list_ip_sets::ListIPSetsError) -> Self {
1667 match err {
1668 crate::operation::list_ip_sets::ListIPSetsError::BadRequestException(inner) => Error::BadRequestException(inner),
1669 crate::operation::list_ip_sets::ListIPSetsError::InternalServerErrorException(inner) => Error::InternalServerErrorException(inner),
1670 crate::operation::list_ip_sets::ListIPSetsError::Unhandled(inner) => Error::Unhandled(inner),
1671 }
1672 }
1673}
1674impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::list_malware_protection_plans::ListMalwareProtectionPlansError, R>>
1675 for Error
1676where
1677 R: Send + Sync + std::fmt::Debug + 'static,
1678{
1679 fn from(
1680 err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::list_malware_protection_plans::ListMalwareProtectionPlansError, R>,
1681 ) -> Self {
1682 match err {
1683 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
1684 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
1685 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
1686 source: err.into(),
1687 }),
1688 }
1689 }
1690}
1691impl From<crate::operation::list_malware_protection_plans::ListMalwareProtectionPlansError> for Error {
1692 fn from(err: crate::operation::list_malware_protection_plans::ListMalwareProtectionPlansError) -> Self {
1693 match err {
1694 crate::operation::list_malware_protection_plans::ListMalwareProtectionPlansError::AccessDeniedException(inner) => {
1695 Error::AccessDeniedException(inner)
1696 }
1697 crate::operation::list_malware_protection_plans::ListMalwareProtectionPlansError::BadRequestException(inner) => {
1698 Error::BadRequestException(inner)
1699 }
1700 crate::operation::list_malware_protection_plans::ListMalwareProtectionPlansError::InternalServerErrorException(inner) => {
1701 Error::InternalServerErrorException(inner)
1702 }
1703 crate::operation::list_malware_protection_plans::ListMalwareProtectionPlansError::Unhandled(inner) => Error::Unhandled(inner),
1704 }
1705 }
1706}
1707impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::list_malware_scans::ListMalwareScansError, R>> for Error
1708where
1709 R: Send + Sync + std::fmt::Debug + 'static,
1710{
1711 fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::list_malware_scans::ListMalwareScansError, R>) -> Self {
1712 match err {
1713 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
1714 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
1715 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
1716 source: err.into(),
1717 }),
1718 }
1719 }
1720}
1721impl From<crate::operation::list_malware_scans::ListMalwareScansError> for Error {
1722 fn from(err: crate::operation::list_malware_scans::ListMalwareScansError) -> Self {
1723 match err {
1724 crate::operation::list_malware_scans::ListMalwareScansError::BadRequestException(inner) => Error::BadRequestException(inner),
1725 crate::operation::list_malware_scans::ListMalwareScansError::InternalServerErrorException(inner) => {
1726 Error::InternalServerErrorException(inner)
1727 }
1728 crate::operation::list_malware_scans::ListMalwareScansError::Unhandled(inner) => Error::Unhandled(inner),
1729 }
1730 }
1731}
1732impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::list_members::ListMembersError, R>> for Error
1733where
1734 R: Send + Sync + std::fmt::Debug + 'static,
1735{
1736 fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::list_members::ListMembersError, R>) -> Self {
1737 match err {
1738 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
1739 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
1740 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
1741 source: err.into(),
1742 }),
1743 }
1744 }
1745}
1746impl From<crate::operation::list_members::ListMembersError> for Error {
1747 fn from(err: crate::operation::list_members::ListMembersError) -> Self {
1748 match err {
1749 crate::operation::list_members::ListMembersError::BadRequestException(inner) => Error::BadRequestException(inner),
1750 crate::operation::list_members::ListMembersError::InternalServerErrorException(inner) => Error::InternalServerErrorException(inner),
1751 crate::operation::list_members::ListMembersError::Unhandled(inner) => Error::Unhandled(inner),
1752 }
1753 }
1754}
1755impl<R>
1756 From<
1757 ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::list_organization_admin_accounts::ListOrganizationAdminAccountsError, R>,
1758 > for Error
1759where
1760 R: Send + Sync + std::fmt::Debug + 'static,
1761{
1762 fn from(
1763 err: ::aws_smithy_runtime_api::client::result::SdkError<
1764 crate::operation::list_organization_admin_accounts::ListOrganizationAdminAccountsError,
1765 R,
1766 >,
1767 ) -> Self {
1768 match err {
1769 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
1770 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
1771 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
1772 source: err.into(),
1773 }),
1774 }
1775 }
1776}
1777impl From<crate::operation::list_organization_admin_accounts::ListOrganizationAdminAccountsError> for Error {
1778 fn from(err: crate::operation::list_organization_admin_accounts::ListOrganizationAdminAccountsError) -> Self {
1779 match err {
1780 crate::operation::list_organization_admin_accounts::ListOrganizationAdminAccountsError::BadRequestException(inner) => {
1781 Error::BadRequestException(inner)
1782 }
1783 crate::operation::list_organization_admin_accounts::ListOrganizationAdminAccountsError::InternalServerErrorException(inner) => {
1784 Error::InternalServerErrorException(inner)
1785 }
1786 crate::operation::list_organization_admin_accounts::ListOrganizationAdminAccountsError::Unhandled(inner) => Error::Unhandled(inner),
1787 }
1788 }
1789}
1790impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::list_publishing_destinations::ListPublishingDestinationsError, R>>
1791 for Error
1792where
1793 R: Send + Sync + std::fmt::Debug + 'static,
1794{
1795 fn from(
1796 err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::list_publishing_destinations::ListPublishingDestinationsError, R>,
1797 ) -> Self {
1798 match err {
1799 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
1800 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
1801 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
1802 source: err.into(),
1803 }),
1804 }
1805 }
1806}
1807impl From<crate::operation::list_publishing_destinations::ListPublishingDestinationsError> for Error {
1808 fn from(err: crate::operation::list_publishing_destinations::ListPublishingDestinationsError) -> Self {
1809 match err {
1810 crate::operation::list_publishing_destinations::ListPublishingDestinationsError::BadRequestException(inner) => {
1811 Error::BadRequestException(inner)
1812 }
1813 crate::operation::list_publishing_destinations::ListPublishingDestinationsError::InternalServerErrorException(inner) => {
1814 Error::InternalServerErrorException(inner)
1815 }
1816 crate::operation::list_publishing_destinations::ListPublishingDestinationsError::Unhandled(inner) => Error::Unhandled(inner),
1817 }
1818 }
1819}
1820impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::list_tags_for_resource::ListTagsForResourceError, R>> for Error
1821where
1822 R: Send + Sync + std::fmt::Debug + 'static,
1823{
1824 fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::list_tags_for_resource::ListTagsForResourceError, R>) -> Self {
1825 match err {
1826 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
1827 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
1828 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
1829 source: err.into(),
1830 }),
1831 }
1832 }
1833}
1834impl From<crate::operation::list_tags_for_resource::ListTagsForResourceError> for Error {
1835 fn from(err: crate::operation::list_tags_for_resource::ListTagsForResourceError) -> Self {
1836 match err {
1837 crate::operation::list_tags_for_resource::ListTagsForResourceError::AccessDeniedException(inner) => Error::AccessDeniedException(inner),
1838 crate::operation::list_tags_for_resource::ListTagsForResourceError::BadRequestException(inner) => Error::BadRequestException(inner),
1839 crate::operation::list_tags_for_resource::ListTagsForResourceError::InternalServerErrorException(inner) => {
1840 Error::InternalServerErrorException(inner)
1841 }
1842 crate::operation::list_tags_for_resource::ListTagsForResourceError::Unhandled(inner) => Error::Unhandled(inner),
1843 }
1844 }
1845}
1846impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::list_threat_entity_sets::ListThreatEntitySetsError, R>> for Error
1847where
1848 R: Send + Sync + std::fmt::Debug + 'static,
1849{
1850 fn from(
1851 err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::list_threat_entity_sets::ListThreatEntitySetsError, R>,
1852 ) -> Self {
1853 match err {
1854 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
1855 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
1856 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
1857 source: err.into(),
1858 }),
1859 }
1860 }
1861}
1862impl From<crate::operation::list_threat_entity_sets::ListThreatEntitySetsError> for Error {
1863 fn from(err: crate::operation::list_threat_entity_sets::ListThreatEntitySetsError) -> Self {
1864 match err {
1865 crate::operation::list_threat_entity_sets::ListThreatEntitySetsError::BadRequestException(inner) => Error::BadRequestException(inner),
1866 crate::operation::list_threat_entity_sets::ListThreatEntitySetsError::InternalServerErrorException(inner) => {
1867 Error::InternalServerErrorException(inner)
1868 }
1869 crate::operation::list_threat_entity_sets::ListThreatEntitySetsError::Unhandled(inner) => Error::Unhandled(inner),
1870 }
1871 }
1872}
1873impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::list_threat_intel_sets::ListThreatIntelSetsError, R>> for Error
1874where
1875 R: Send + Sync + std::fmt::Debug + 'static,
1876{
1877 fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::list_threat_intel_sets::ListThreatIntelSetsError, R>) -> Self {
1878 match err {
1879 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
1880 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
1881 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
1882 source: err.into(),
1883 }),
1884 }
1885 }
1886}
1887impl From<crate::operation::list_threat_intel_sets::ListThreatIntelSetsError> for Error {
1888 fn from(err: crate::operation::list_threat_intel_sets::ListThreatIntelSetsError) -> Self {
1889 match err {
1890 crate::operation::list_threat_intel_sets::ListThreatIntelSetsError::BadRequestException(inner) => Error::BadRequestException(inner),
1891 crate::operation::list_threat_intel_sets::ListThreatIntelSetsError::InternalServerErrorException(inner) => {
1892 Error::InternalServerErrorException(inner)
1893 }
1894 crate::operation::list_threat_intel_sets::ListThreatIntelSetsError::Unhandled(inner) => Error::Unhandled(inner),
1895 }
1896 }
1897}
1898impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::list_trusted_entity_sets::ListTrustedEntitySetsError, R>> for Error
1899where
1900 R: Send + Sync + std::fmt::Debug + 'static,
1901{
1902 fn from(
1903 err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::list_trusted_entity_sets::ListTrustedEntitySetsError, R>,
1904 ) -> Self {
1905 match err {
1906 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
1907 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
1908 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
1909 source: err.into(),
1910 }),
1911 }
1912 }
1913}
1914impl From<crate::operation::list_trusted_entity_sets::ListTrustedEntitySetsError> for Error {
1915 fn from(err: crate::operation::list_trusted_entity_sets::ListTrustedEntitySetsError) -> Self {
1916 match err {
1917 crate::operation::list_trusted_entity_sets::ListTrustedEntitySetsError::BadRequestException(inner) => Error::BadRequestException(inner),
1918 crate::operation::list_trusted_entity_sets::ListTrustedEntitySetsError::InternalServerErrorException(inner) => {
1919 Error::InternalServerErrorException(inner)
1920 }
1921 crate::operation::list_trusted_entity_sets::ListTrustedEntitySetsError::Unhandled(inner) => Error::Unhandled(inner),
1922 }
1923 }
1924}
1925impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::send_object_malware_scan::SendObjectMalwareScanError, R>> for Error
1926where
1927 R: Send + Sync + std::fmt::Debug + 'static,
1928{
1929 fn from(
1930 err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::send_object_malware_scan::SendObjectMalwareScanError, R>,
1931 ) -> Self {
1932 match err {
1933 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
1934 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
1935 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
1936 source: err.into(),
1937 }),
1938 }
1939 }
1940}
1941impl From<crate::operation::send_object_malware_scan::SendObjectMalwareScanError> for Error {
1942 fn from(err: crate::operation::send_object_malware_scan::SendObjectMalwareScanError) -> Self {
1943 match err {
1944 crate::operation::send_object_malware_scan::SendObjectMalwareScanError::AccessDeniedException(inner) => {
1945 Error::AccessDeniedException(inner)
1946 }
1947 crate::operation::send_object_malware_scan::SendObjectMalwareScanError::BadRequestException(inner) => Error::BadRequestException(inner),
1948 crate::operation::send_object_malware_scan::SendObjectMalwareScanError::InternalServerErrorException(inner) => {
1949 Error::InternalServerErrorException(inner)
1950 }
1951 crate::operation::send_object_malware_scan::SendObjectMalwareScanError::Unhandled(inner) => Error::Unhandled(inner),
1952 }
1953 }
1954}
1955impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::start_malware_scan::StartMalwareScanError, R>> for Error
1956where
1957 R: Send + Sync + std::fmt::Debug + 'static,
1958{
1959 fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::start_malware_scan::StartMalwareScanError, R>) -> Self {
1960 match err {
1961 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
1962 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
1963 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
1964 source: err.into(),
1965 }),
1966 }
1967 }
1968}
1969impl From<crate::operation::start_malware_scan::StartMalwareScanError> for Error {
1970 fn from(err: crate::operation::start_malware_scan::StartMalwareScanError) -> Self {
1971 match err {
1972 crate::operation::start_malware_scan::StartMalwareScanError::BadRequestException(inner) => Error::BadRequestException(inner),
1973 crate::operation::start_malware_scan::StartMalwareScanError::ConflictException(inner) => Error::ConflictException(inner),
1974 crate::operation::start_malware_scan::StartMalwareScanError::InternalServerErrorException(inner) => {
1975 Error::InternalServerErrorException(inner)
1976 }
1977 crate::operation::start_malware_scan::StartMalwareScanError::Unhandled(inner) => Error::Unhandled(inner),
1978 }
1979 }
1980}
1981impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::start_monitoring_members::StartMonitoringMembersError, R>> for Error
1982where
1983 R: Send + Sync + std::fmt::Debug + 'static,
1984{
1985 fn from(
1986 err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::start_monitoring_members::StartMonitoringMembersError, R>,
1987 ) -> Self {
1988 match err {
1989 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
1990 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
1991 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
1992 source: err.into(),
1993 }),
1994 }
1995 }
1996}
1997impl From<crate::operation::start_monitoring_members::StartMonitoringMembersError> for Error {
1998 fn from(err: crate::operation::start_monitoring_members::StartMonitoringMembersError) -> Self {
1999 match err {
2000 crate::operation::start_monitoring_members::StartMonitoringMembersError::BadRequestException(inner) => Error::BadRequestException(inner),
2001 crate::operation::start_monitoring_members::StartMonitoringMembersError::InternalServerErrorException(inner) => {
2002 Error::InternalServerErrorException(inner)
2003 }
2004 crate::operation::start_monitoring_members::StartMonitoringMembersError::Unhandled(inner) => Error::Unhandled(inner),
2005 }
2006 }
2007}
2008impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::stop_monitoring_members::StopMonitoringMembersError, R>> for Error
2009where
2010 R: Send + Sync + std::fmt::Debug + 'static,
2011{
2012 fn from(
2013 err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::stop_monitoring_members::StopMonitoringMembersError, R>,
2014 ) -> Self {
2015 match err {
2016 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
2017 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
2018 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
2019 source: err.into(),
2020 }),
2021 }
2022 }
2023}
2024impl From<crate::operation::stop_monitoring_members::StopMonitoringMembersError> for Error {
2025 fn from(err: crate::operation::stop_monitoring_members::StopMonitoringMembersError) -> Self {
2026 match err {
2027 crate::operation::stop_monitoring_members::StopMonitoringMembersError::BadRequestException(inner) => Error::BadRequestException(inner),
2028 crate::operation::stop_monitoring_members::StopMonitoringMembersError::InternalServerErrorException(inner) => {
2029 Error::InternalServerErrorException(inner)
2030 }
2031 crate::operation::stop_monitoring_members::StopMonitoringMembersError::Unhandled(inner) => Error::Unhandled(inner),
2032 }
2033 }
2034}
2035impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::tag_resource::TagResourceError, R>> for Error
2036where
2037 R: Send + Sync + std::fmt::Debug + 'static,
2038{
2039 fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::tag_resource::TagResourceError, R>) -> Self {
2040 match err {
2041 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
2042 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
2043 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
2044 source: err.into(),
2045 }),
2046 }
2047 }
2048}
2049impl From<crate::operation::tag_resource::TagResourceError> for Error {
2050 fn from(err: crate::operation::tag_resource::TagResourceError) -> Self {
2051 match err {
2052 crate::operation::tag_resource::TagResourceError::AccessDeniedException(inner) => Error::AccessDeniedException(inner),
2053 crate::operation::tag_resource::TagResourceError::BadRequestException(inner) => Error::BadRequestException(inner),
2054 crate::operation::tag_resource::TagResourceError::InternalServerErrorException(inner) => Error::InternalServerErrorException(inner),
2055 crate::operation::tag_resource::TagResourceError::Unhandled(inner) => Error::Unhandled(inner),
2056 }
2057 }
2058}
2059impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::unarchive_findings::UnarchiveFindingsError, R>> for Error
2060where
2061 R: Send + Sync + std::fmt::Debug + 'static,
2062{
2063 fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::unarchive_findings::UnarchiveFindingsError, R>) -> Self {
2064 match err {
2065 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
2066 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
2067 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
2068 source: err.into(),
2069 }),
2070 }
2071 }
2072}
2073impl From<crate::operation::unarchive_findings::UnarchiveFindingsError> for Error {
2074 fn from(err: crate::operation::unarchive_findings::UnarchiveFindingsError) -> Self {
2075 match err {
2076 crate::operation::unarchive_findings::UnarchiveFindingsError::BadRequestException(inner) => Error::BadRequestException(inner),
2077 crate::operation::unarchive_findings::UnarchiveFindingsError::InternalServerErrorException(inner) => {
2078 Error::InternalServerErrorException(inner)
2079 }
2080 crate::operation::unarchive_findings::UnarchiveFindingsError::Unhandled(inner) => Error::Unhandled(inner),
2081 }
2082 }
2083}
2084impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::untag_resource::UntagResourceError, R>> for Error
2085where
2086 R: Send + Sync + std::fmt::Debug + 'static,
2087{
2088 fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::untag_resource::UntagResourceError, R>) -> Self {
2089 match err {
2090 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
2091 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
2092 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
2093 source: err.into(),
2094 }),
2095 }
2096 }
2097}
2098impl From<crate::operation::untag_resource::UntagResourceError> for Error {
2099 fn from(err: crate::operation::untag_resource::UntagResourceError) -> Self {
2100 match err {
2101 crate::operation::untag_resource::UntagResourceError::AccessDeniedException(inner) => Error::AccessDeniedException(inner),
2102 crate::operation::untag_resource::UntagResourceError::BadRequestException(inner) => Error::BadRequestException(inner),
2103 crate::operation::untag_resource::UntagResourceError::InternalServerErrorException(inner) => Error::InternalServerErrorException(inner),
2104 crate::operation::untag_resource::UntagResourceError::Unhandled(inner) => Error::Unhandled(inner),
2105 }
2106 }
2107}
2108impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::update_detector::UpdateDetectorError, R>> for Error
2109where
2110 R: Send + Sync + std::fmt::Debug + 'static,
2111{
2112 fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::update_detector::UpdateDetectorError, R>) -> Self {
2113 match err {
2114 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
2115 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
2116 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
2117 source: err.into(),
2118 }),
2119 }
2120 }
2121}
2122impl From<crate::operation::update_detector::UpdateDetectorError> for Error {
2123 fn from(err: crate::operation::update_detector::UpdateDetectorError) -> Self {
2124 match err {
2125 crate::operation::update_detector::UpdateDetectorError::BadRequestException(inner) => Error::BadRequestException(inner),
2126 crate::operation::update_detector::UpdateDetectorError::InternalServerErrorException(inner) => Error::InternalServerErrorException(inner),
2127 crate::operation::update_detector::UpdateDetectorError::Unhandled(inner) => Error::Unhandled(inner),
2128 }
2129 }
2130}
2131impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::update_filter::UpdateFilterError, R>> for Error
2132where
2133 R: Send + Sync + std::fmt::Debug + 'static,
2134{
2135 fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::update_filter::UpdateFilterError, R>) -> Self {
2136 match err {
2137 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
2138 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
2139 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
2140 source: err.into(),
2141 }),
2142 }
2143 }
2144}
2145impl From<crate::operation::update_filter::UpdateFilterError> for Error {
2146 fn from(err: crate::operation::update_filter::UpdateFilterError) -> Self {
2147 match err {
2148 crate::operation::update_filter::UpdateFilterError::BadRequestException(inner) => Error::BadRequestException(inner),
2149 crate::operation::update_filter::UpdateFilterError::InternalServerErrorException(inner) => Error::InternalServerErrorException(inner),
2150 crate::operation::update_filter::UpdateFilterError::Unhandled(inner) => Error::Unhandled(inner),
2151 }
2152 }
2153}
2154impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::update_findings_feedback::UpdateFindingsFeedbackError, R>> for Error
2155where
2156 R: Send + Sync + std::fmt::Debug + 'static,
2157{
2158 fn from(
2159 err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::update_findings_feedback::UpdateFindingsFeedbackError, R>,
2160 ) -> Self {
2161 match err {
2162 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
2163 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
2164 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
2165 source: err.into(),
2166 }),
2167 }
2168 }
2169}
2170impl From<crate::operation::update_findings_feedback::UpdateFindingsFeedbackError> for Error {
2171 fn from(err: crate::operation::update_findings_feedback::UpdateFindingsFeedbackError) -> Self {
2172 match err {
2173 crate::operation::update_findings_feedback::UpdateFindingsFeedbackError::BadRequestException(inner) => Error::BadRequestException(inner),
2174 crate::operation::update_findings_feedback::UpdateFindingsFeedbackError::InternalServerErrorException(inner) => {
2175 Error::InternalServerErrorException(inner)
2176 }
2177 crate::operation::update_findings_feedback::UpdateFindingsFeedbackError::Unhandled(inner) => Error::Unhandled(inner),
2178 }
2179 }
2180}
2181impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::update_ip_set::UpdateIPSetError, R>> for Error
2182where
2183 R: Send + Sync + std::fmt::Debug + 'static,
2184{
2185 fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::update_ip_set::UpdateIPSetError, R>) -> Self {
2186 match err {
2187 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
2188 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
2189 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
2190 source: err.into(),
2191 }),
2192 }
2193 }
2194}
2195impl From<crate::operation::update_ip_set::UpdateIPSetError> for Error {
2196 fn from(err: crate::operation::update_ip_set::UpdateIPSetError) -> Self {
2197 match err {
2198 crate::operation::update_ip_set::UpdateIPSetError::AccessDeniedException(inner) => Error::AccessDeniedException(inner),
2199 crate::operation::update_ip_set::UpdateIPSetError::BadRequestException(inner) => Error::BadRequestException(inner),
2200 crate::operation::update_ip_set::UpdateIPSetError::InternalServerErrorException(inner) => Error::InternalServerErrorException(inner),
2201 crate::operation::update_ip_set::UpdateIPSetError::Unhandled(inner) => Error::Unhandled(inner),
2202 }
2203 }
2204}
2205impl<R>
2206 From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::update_malware_protection_plan::UpdateMalwareProtectionPlanError, R>>
2207 for Error
2208where
2209 R: Send + Sync + std::fmt::Debug + 'static,
2210{
2211 fn from(
2212 err: ::aws_smithy_runtime_api::client::result::SdkError<
2213 crate::operation::update_malware_protection_plan::UpdateMalwareProtectionPlanError,
2214 R,
2215 >,
2216 ) -> Self {
2217 match err {
2218 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
2219 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
2220 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
2221 source: err.into(),
2222 }),
2223 }
2224 }
2225}
2226impl From<crate::operation::update_malware_protection_plan::UpdateMalwareProtectionPlanError> for Error {
2227 fn from(err: crate::operation::update_malware_protection_plan::UpdateMalwareProtectionPlanError) -> Self {
2228 match err {
2229 crate::operation::update_malware_protection_plan::UpdateMalwareProtectionPlanError::AccessDeniedException(inner) => {
2230 Error::AccessDeniedException(inner)
2231 }
2232 crate::operation::update_malware_protection_plan::UpdateMalwareProtectionPlanError::BadRequestException(inner) => {
2233 Error::BadRequestException(inner)
2234 }
2235 crate::operation::update_malware_protection_plan::UpdateMalwareProtectionPlanError::InternalServerErrorException(inner) => {
2236 Error::InternalServerErrorException(inner)
2237 }
2238 crate::operation::update_malware_protection_plan::UpdateMalwareProtectionPlanError::ResourceNotFoundException(inner) => {
2239 Error::ResourceNotFoundException(inner)
2240 }
2241 crate::operation::update_malware_protection_plan::UpdateMalwareProtectionPlanError::Unhandled(inner) => Error::Unhandled(inner),
2242 }
2243 }
2244}
2245impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::update_malware_scan_settings::UpdateMalwareScanSettingsError, R>>
2246 for Error
2247where
2248 R: Send + Sync + std::fmt::Debug + 'static,
2249{
2250 fn from(
2251 err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::update_malware_scan_settings::UpdateMalwareScanSettingsError, R>,
2252 ) -> Self {
2253 match err {
2254 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
2255 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
2256 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
2257 source: err.into(),
2258 }),
2259 }
2260 }
2261}
2262impl From<crate::operation::update_malware_scan_settings::UpdateMalwareScanSettingsError> for Error {
2263 fn from(err: crate::operation::update_malware_scan_settings::UpdateMalwareScanSettingsError) -> Self {
2264 match err {
2265 crate::operation::update_malware_scan_settings::UpdateMalwareScanSettingsError::BadRequestException(inner) => {
2266 Error::BadRequestException(inner)
2267 }
2268 crate::operation::update_malware_scan_settings::UpdateMalwareScanSettingsError::InternalServerErrorException(inner) => {
2269 Error::InternalServerErrorException(inner)
2270 }
2271 crate::operation::update_malware_scan_settings::UpdateMalwareScanSettingsError::Unhandled(inner) => Error::Unhandled(inner),
2272 }
2273 }
2274}
2275impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::update_member_detectors::UpdateMemberDetectorsError, R>> for Error
2276where
2277 R: Send + Sync + std::fmt::Debug + 'static,
2278{
2279 fn from(
2280 err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::update_member_detectors::UpdateMemberDetectorsError, R>,
2281 ) -> Self {
2282 match err {
2283 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
2284 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
2285 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
2286 source: err.into(),
2287 }),
2288 }
2289 }
2290}
2291impl From<crate::operation::update_member_detectors::UpdateMemberDetectorsError> for Error {
2292 fn from(err: crate::operation::update_member_detectors::UpdateMemberDetectorsError) -> Self {
2293 match err {
2294 crate::operation::update_member_detectors::UpdateMemberDetectorsError::BadRequestException(inner) => Error::BadRequestException(inner),
2295 crate::operation::update_member_detectors::UpdateMemberDetectorsError::InternalServerErrorException(inner) => {
2296 Error::InternalServerErrorException(inner)
2297 }
2298 crate::operation::update_member_detectors::UpdateMemberDetectorsError::Unhandled(inner) => Error::Unhandled(inner),
2299 }
2300 }
2301}
2302impl<R>
2303 From<
2304 ::aws_smithy_runtime_api::client::result::SdkError<
2305 crate::operation::update_organization_configuration::UpdateOrganizationConfigurationError,
2306 R,
2307 >,
2308 > for Error
2309where
2310 R: Send + Sync + std::fmt::Debug + 'static,
2311{
2312 fn from(
2313 err: ::aws_smithy_runtime_api::client::result::SdkError<
2314 crate::operation::update_organization_configuration::UpdateOrganizationConfigurationError,
2315 R,
2316 >,
2317 ) -> Self {
2318 match err {
2319 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
2320 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
2321 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
2322 source: err.into(),
2323 }),
2324 }
2325 }
2326}
2327impl From<crate::operation::update_organization_configuration::UpdateOrganizationConfigurationError> for Error {
2328 fn from(err: crate::operation::update_organization_configuration::UpdateOrganizationConfigurationError) -> Self {
2329 match err {
2330 crate::operation::update_organization_configuration::UpdateOrganizationConfigurationError::BadRequestException(inner) => {
2331 Error::BadRequestException(inner)
2332 }
2333 crate::operation::update_organization_configuration::UpdateOrganizationConfigurationError::InternalServerErrorException(inner) => {
2334 Error::InternalServerErrorException(inner)
2335 }
2336 crate::operation::update_organization_configuration::UpdateOrganizationConfigurationError::Unhandled(inner) => Error::Unhandled(inner),
2337 }
2338 }
2339}
2340impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::update_publishing_destination::UpdatePublishingDestinationError, R>>
2341 for Error
2342where
2343 R: Send + Sync + std::fmt::Debug + 'static,
2344{
2345 fn from(
2346 err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::update_publishing_destination::UpdatePublishingDestinationError, R>,
2347 ) -> Self {
2348 match err {
2349 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
2350 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
2351 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
2352 source: err.into(),
2353 }),
2354 }
2355 }
2356}
2357impl From<crate::operation::update_publishing_destination::UpdatePublishingDestinationError> for Error {
2358 fn from(err: crate::operation::update_publishing_destination::UpdatePublishingDestinationError) -> Self {
2359 match err {
2360 crate::operation::update_publishing_destination::UpdatePublishingDestinationError::BadRequestException(inner) => {
2361 Error::BadRequestException(inner)
2362 }
2363 crate::operation::update_publishing_destination::UpdatePublishingDestinationError::InternalServerErrorException(inner) => {
2364 Error::InternalServerErrorException(inner)
2365 }
2366 crate::operation::update_publishing_destination::UpdatePublishingDestinationError::Unhandled(inner) => Error::Unhandled(inner),
2367 }
2368 }
2369}
2370impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::update_threat_entity_set::UpdateThreatEntitySetError, R>> for Error
2371where
2372 R: Send + Sync + std::fmt::Debug + 'static,
2373{
2374 fn from(
2375 err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::update_threat_entity_set::UpdateThreatEntitySetError, R>,
2376 ) -> Self {
2377 match err {
2378 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
2379 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
2380 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
2381 source: err.into(),
2382 }),
2383 }
2384 }
2385}
2386impl From<crate::operation::update_threat_entity_set::UpdateThreatEntitySetError> for Error {
2387 fn from(err: crate::operation::update_threat_entity_set::UpdateThreatEntitySetError) -> Self {
2388 match err {
2389 crate::operation::update_threat_entity_set::UpdateThreatEntitySetError::BadRequestException(inner) => Error::BadRequestException(inner),
2390 crate::operation::update_threat_entity_set::UpdateThreatEntitySetError::InternalServerErrorException(inner) => {
2391 Error::InternalServerErrorException(inner)
2392 }
2393 crate::operation::update_threat_entity_set::UpdateThreatEntitySetError::Unhandled(inner) => Error::Unhandled(inner),
2394 }
2395 }
2396}
2397impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::update_threat_intel_set::UpdateThreatIntelSetError, R>> for Error
2398where
2399 R: Send + Sync + std::fmt::Debug + 'static,
2400{
2401 fn from(
2402 err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::update_threat_intel_set::UpdateThreatIntelSetError, R>,
2403 ) -> Self {
2404 match err {
2405 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
2406 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
2407 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
2408 source: err.into(),
2409 }),
2410 }
2411 }
2412}
2413impl From<crate::operation::update_threat_intel_set::UpdateThreatIntelSetError> for Error {
2414 fn from(err: crate::operation::update_threat_intel_set::UpdateThreatIntelSetError) -> Self {
2415 match err {
2416 crate::operation::update_threat_intel_set::UpdateThreatIntelSetError::AccessDeniedException(inner) => Error::AccessDeniedException(inner),
2417 crate::operation::update_threat_intel_set::UpdateThreatIntelSetError::BadRequestException(inner) => Error::BadRequestException(inner),
2418 crate::operation::update_threat_intel_set::UpdateThreatIntelSetError::InternalServerErrorException(inner) => {
2419 Error::InternalServerErrorException(inner)
2420 }
2421 crate::operation::update_threat_intel_set::UpdateThreatIntelSetError::Unhandled(inner) => Error::Unhandled(inner),
2422 }
2423 }
2424}
2425impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::update_trusted_entity_set::UpdateTrustedEntitySetError, R>>
2426 for Error
2427where
2428 R: Send + Sync + std::fmt::Debug + 'static,
2429{
2430 fn from(
2431 err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::update_trusted_entity_set::UpdateTrustedEntitySetError, R>,
2432 ) -> Self {
2433 match err {
2434 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
2435 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
2436 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
2437 source: err.into(),
2438 }),
2439 }
2440 }
2441}
2442impl From<crate::operation::update_trusted_entity_set::UpdateTrustedEntitySetError> for Error {
2443 fn from(err: crate::operation::update_trusted_entity_set::UpdateTrustedEntitySetError) -> Self {
2444 match err {
2445 crate::operation::update_trusted_entity_set::UpdateTrustedEntitySetError::BadRequestException(inner) => Error::BadRequestException(inner),
2446 crate::operation::update_trusted_entity_set::UpdateTrustedEntitySetError::InternalServerErrorException(inner) => {
2447 Error::InternalServerErrorException(inner)
2448 }
2449 crate::operation::update_trusted_entity_set::UpdateTrustedEntitySetError::Unhandled(inner) => Error::Unhandled(inner),
2450 }
2451 }
2452}
2453impl ::std::error::Error for Error {
2454 fn source(&self) -> std::option::Option<&(dyn ::std::error::Error + 'static)> {
2455 match self {
2456 Error::AccessDeniedException(inner) => inner.source(),
2457 Error::BadRequestException(inner) => inner.source(),
2458 Error::ConflictException(inner) => inner.source(),
2459 Error::InternalServerErrorException(inner) => inner.source(),
2460 Error::ResourceNotFoundException(inner) => inner.source(),
2461 Error::Unhandled(inner) => ::std::option::Option::Some(&*inner.source),
2462 }
2463 }
2464}
2465impl ::aws_types::request_id::RequestId for Error {
2466 fn request_id(&self) -> Option<&str> {
2467 match self {
2468 Self::AccessDeniedException(e) => e.request_id(),
2469 Self::BadRequestException(e) => e.request_id(),
2470 Self::ConflictException(e) => e.request_id(),
2471 Self::InternalServerErrorException(e) => e.request_id(),
2472 Self::ResourceNotFoundException(e) => e.request_id(),
2473 Self::Unhandled(e) => e.meta.request_id(),
2474 }
2475 }
2476}