1#[non_exhaustive]
4#[derive(::std::fmt::Debug)]
5pub enum Error {
6 AccessDeniedException(crate::types::error::AccessDeniedException),
8 ConflictException(crate::types::error::ConflictException),
10 InternalServerException(crate::types::error::InternalServerException),
12 OperationNotPermittedException(crate::types::error::OperationNotPermittedException),
14 PriorRequestNotCompletedException(crate::types::error::PriorRequestNotCompletedException),
16 ResourceNotFoundException(crate::types::error::ResourceNotFoundException),
18 ServiceQuotaExceededException(crate::types::error::ServiceQuotaExceededException),
20 ThrottlingException(crate::types::error::ThrottlingException),
22 ValidationException(crate::types::error::ValidationException),
24 #[deprecated(note = "Matching `Unhandled` directly is not forwards compatible. Instead, match using a \
26 variable wildcard pattern and check `.code()`:
27 \
28 `err if err.code() == Some(\"SpecificExceptionCode\") => { /* handle the error */ }`
29 \
30 See [`ProvideErrorMetadata`](#impl-ProvideErrorMetadata-for-Error) for what information is available for the error.")]
31 Unhandled(crate::error::sealed_unhandled::Unhandled),
32}
33impl ::std::fmt::Display for Error {
34 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
35 match self {
36 Error::AccessDeniedException(inner) => inner.fmt(f),
37 Error::ConflictException(inner) => inner.fmt(f),
38 Error::InternalServerException(inner) => inner.fmt(f),
39 Error::OperationNotPermittedException(inner) => inner.fmt(f),
40 Error::PriorRequestNotCompletedException(inner) => inner.fmt(f),
41 Error::ResourceNotFoundException(inner) => inner.fmt(f),
42 Error::ServiceQuotaExceededException(inner) => inner.fmt(f),
43 Error::ThrottlingException(inner) => inner.fmt(f),
44 Error::ValidationException(inner) => inner.fmt(f),
45 Error::Unhandled(_) => {
46 if let ::std::option::Option::Some(code) = ::aws_smithy_types::error::metadata::ProvideErrorMetadata::code(self) {
47 write!(f, "unhandled error ({code})")
48 } else {
49 f.write_str("unhandled error")
50 }
51 }
52 }
53 }
54}
55impl From<::aws_smithy_types::error::operation::BuildError> for Error {
56 fn from(value: ::aws_smithy_types::error::operation::BuildError) -> Self {
57 Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
58 source: value.into(),
59 meta: ::std::default::Default::default(),
60 })
61 }
62}
63impl ::aws_smithy_types::error::metadata::ProvideErrorMetadata for Error {
64 fn meta(&self) -> &::aws_smithy_types::error::metadata::ErrorMetadata {
65 match self {
66 Self::AccessDeniedException(inner) => inner.meta(),
67 Self::ConflictException(inner) => inner.meta(),
68 Self::InternalServerException(inner) => inner.meta(),
69 Self::OperationNotPermittedException(inner) => inner.meta(),
70 Self::PriorRequestNotCompletedException(inner) => inner.meta(),
71 Self::ResourceNotFoundException(inner) => inner.meta(),
72 Self::ServiceQuotaExceededException(inner) => inner.meta(),
73 Self::ThrottlingException(inner) => inner.meta(),
74 Self::ValidationException(inner) => inner.meta(),
75 Self::Unhandled(inner) => &inner.meta,
76 }
77 }
78}
79impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::associate_certificate::AssociateCertificateError, R>> for Error
80where
81 R: Send + Sync + std::fmt::Debug + 'static,
82{
83 fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::associate_certificate::AssociateCertificateError, R>) -> Self {
84 match err {
85 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
86 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
87 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
88 source: err.into(),
89 }),
90 }
91 }
92}
93impl From<crate::operation::associate_certificate::AssociateCertificateError> for Error {
94 fn from(err: crate::operation::associate_certificate::AssociateCertificateError) -> Self {
95 match err {
96 crate::operation::associate_certificate::AssociateCertificateError::AccessDeniedException(inner) => Error::AccessDeniedException(inner),
97 crate::operation::associate_certificate::AssociateCertificateError::ConflictException(inner) => Error::ConflictException(inner),
98 crate::operation::associate_certificate::AssociateCertificateError::ResourceNotFoundException(inner) => {
99 Error::ResourceNotFoundException(inner)
100 }
101 crate::operation::associate_certificate::AssociateCertificateError::ServiceQuotaExceededException(inner) => {
102 Error::ServiceQuotaExceededException(inner)
103 }
104 crate::operation::associate_certificate::AssociateCertificateError::ThrottlingException(inner) => Error::ThrottlingException(inner),
105 crate::operation::associate_certificate::AssociateCertificateError::ValidationException(inner) => Error::ValidationException(inner),
106 crate::operation::associate_certificate::AssociateCertificateError::InternalServerException(inner) => {
107 Error::InternalServerException(inner)
108 }
109 crate::operation::associate_certificate::AssociateCertificateError::Unhandled(inner) => Error::Unhandled(inner),
110 }
111 }
112}
113impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::create_proxy::CreateProxyError, R>> for Error
114where
115 R: Send + Sync + std::fmt::Debug + 'static,
116{
117 fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::create_proxy::CreateProxyError, R>) -> Self {
118 match err {
119 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
120 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
121 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
122 source: err.into(),
123 }),
124 }
125 }
126}
127impl From<crate::operation::create_proxy::CreateProxyError> for Error {
128 fn from(err: crate::operation::create_proxy::CreateProxyError) -> Self {
129 match err {
130 crate::operation::create_proxy::CreateProxyError::AccessDeniedException(inner) => Error::AccessDeniedException(inner),
131 crate::operation::create_proxy::CreateProxyError::ConflictException(inner) => Error::ConflictException(inner),
132 crate::operation::create_proxy::CreateProxyError::OperationNotPermittedException(inner) => Error::OperationNotPermittedException(inner),
133 crate::operation::create_proxy::CreateProxyError::ServiceQuotaExceededException(inner) => Error::ServiceQuotaExceededException(inner),
134 crate::operation::create_proxy::CreateProxyError::ThrottlingException(inner) => Error::ThrottlingException(inner),
135 crate::operation::create_proxy::CreateProxyError::ValidationException(inner) => Error::ValidationException(inner),
136 crate::operation::create_proxy::CreateProxyError::InternalServerException(inner) => Error::InternalServerException(inner),
137 crate::operation::create_proxy::CreateProxyError::Unhandled(inner) => Error::Unhandled(inner),
138 }
139 }
140}
141impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::delete_proxy::DeleteProxyError, R>> for Error
142where
143 R: Send + Sync + std::fmt::Debug + 'static,
144{
145 fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::delete_proxy::DeleteProxyError, R>) -> Self {
146 match err {
147 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
148 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
149 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
150 source: err.into(),
151 }),
152 }
153 }
154}
155impl From<crate::operation::delete_proxy::DeleteProxyError> for Error {
156 fn from(err: crate::operation::delete_proxy::DeleteProxyError) -> Self {
157 match err {
158 crate::operation::delete_proxy::DeleteProxyError::OperationNotPermittedException(inner) => Error::OperationNotPermittedException(inner),
159 crate::operation::delete_proxy::DeleteProxyError::ValidationException(inner) => Error::ValidationException(inner),
160 crate::operation::delete_proxy::DeleteProxyError::InternalServerException(inner) => Error::InternalServerException(inner),
161 crate::operation::delete_proxy::DeleteProxyError::ThrottlingException(inner) => Error::ThrottlingException(inner),
162 crate::operation::delete_proxy::DeleteProxyError::Unhandled(inner) => Error::Unhandled(inner),
163 }
164 }
165}
166impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::disassociate_certificate::DisassociateCertificateError, R>>
167 for Error
168where
169 R: Send + Sync + std::fmt::Debug + 'static,
170{
171 fn from(
172 err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::disassociate_certificate::DisassociateCertificateError, R>,
173 ) -> Self {
174 match err {
175 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
176 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
177 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
178 source: err.into(),
179 }),
180 }
181 }
182}
183impl From<crate::operation::disassociate_certificate::DisassociateCertificateError> for Error {
184 fn from(err: crate::operation::disassociate_certificate::DisassociateCertificateError) -> Self {
185 match err {
186 crate::operation::disassociate_certificate::DisassociateCertificateError::AccessDeniedException(inner) => {
187 Error::AccessDeniedException(inner)
188 }
189 crate::operation::disassociate_certificate::DisassociateCertificateError::ConflictException(inner) => Error::ConflictException(inner),
190 crate::operation::disassociate_certificate::DisassociateCertificateError::ResourceNotFoundException(inner) => {
191 Error::ResourceNotFoundException(inner)
192 }
193 crate::operation::disassociate_certificate::DisassociateCertificateError::ThrottlingException(inner) => Error::ThrottlingException(inner),
194 crate::operation::disassociate_certificate::DisassociateCertificateError::ValidationException(inner) => Error::ValidationException(inner),
195 crate::operation::disassociate_certificate::DisassociateCertificateError::InternalServerException(inner) => {
196 Error::InternalServerException(inner)
197 }
198 crate::operation::disassociate_certificate::DisassociateCertificateError::Unhandled(inner) => Error::Unhandled(inner),
199 }
200 }
201}
202impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::get_proxy::GetProxyError, R>> for Error
203where
204 R: Send + Sync + std::fmt::Debug + 'static,
205{
206 fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::get_proxy::GetProxyError, R>) -> Self {
207 match err {
208 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
209 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
210 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
211 source: err.into(),
212 }),
213 }
214 }
215}
216impl From<crate::operation::get_proxy::GetProxyError> for Error {
217 fn from(err: crate::operation::get_proxy::GetProxyError) -> Self {
218 match err {
219 crate::operation::get_proxy::GetProxyError::ResourceNotFoundException(inner) => Error::ResourceNotFoundException(inner),
220 crate::operation::get_proxy::GetProxyError::ValidationException(inner) => Error::ValidationException(inner),
221 crate::operation::get_proxy::GetProxyError::InternalServerException(inner) => Error::InternalServerException(inner),
222 crate::operation::get_proxy::GetProxyError::ThrottlingException(inner) => Error::ThrottlingException(inner),
223 crate::operation::get_proxy::GetProxyError::Unhandled(inner) => Error::Unhandled(inner),
224 }
225 }
226}
227impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::get_proxy_attributes::GetProxyAttributesError, R>> for Error
228where
229 R: Send + Sync + std::fmt::Debug + 'static,
230{
231 fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::get_proxy_attributes::GetProxyAttributesError, R>) -> Self {
232 match err {
233 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
234 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
235 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
236 source: err.into(),
237 }),
238 }
239 }
240}
241impl From<crate::operation::get_proxy_attributes::GetProxyAttributesError> for Error {
242 fn from(err: crate::operation::get_proxy_attributes::GetProxyAttributesError) -> Self {
243 match err {
244 crate::operation::get_proxy_attributes::GetProxyAttributesError::ResourceNotFoundException(inner) => {
245 Error::ResourceNotFoundException(inner)
246 }
247 crate::operation::get_proxy_attributes::GetProxyAttributesError::ValidationException(inner) => Error::ValidationException(inner),
248 crate::operation::get_proxy_attributes::GetProxyAttributesError::InternalServerException(inner) => Error::InternalServerException(inner),
249 crate::operation::get_proxy_attributes::GetProxyAttributesError::ThrottlingException(inner) => Error::ThrottlingException(inner),
250 crate::operation::get_proxy_attributes::GetProxyAttributesError::Unhandled(inner) => Error::Unhandled(inner),
251 }
252 }
253}
254impl<R>
255 From<
256 ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::get_proxy_configuration_contents::GetProxyConfigurationContentsError, R>,
257 > for Error
258where
259 R: Send + Sync + std::fmt::Debug + 'static,
260{
261 fn from(
262 err: ::aws_smithy_runtime_api::client::result::SdkError<
263 crate::operation::get_proxy_configuration_contents::GetProxyConfigurationContentsError,
264 R,
265 >,
266 ) -> Self {
267 match err {
268 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
269 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
270 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
271 source: err.into(),
272 }),
273 }
274 }
275}
276impl From<crate::operation::get_proxy_configuration_contents::GetProxyConfigurationContentsError> for Error {
277 fn from(err: crate::operation::get_proxy_configuration_contents::GetProxyConfigurationContentsError) -> Self {
278 match err {
279 crate::operation::get_proxy_configuration_contents::GetProxyConfigurationContentsError::AccessDeniedException(inner) => {
280 Error::AccessDeniedException(inner)
281 }
282 crate::operation::get_proxy_configuration_contents::GetProxyConfigurationContentsError::ResourceNotFoundException(inner) => {
283 Error::ResourceNotFoundException(inner)
284 }
285 crate::operation::get_proxy_configuration_contents::GetProxyConfigurationContentsError::ValidationException(inner) => {
286 Error::ValidationException(inner)
287 }
288 crate::operation::get_proxy_configuration_contents::GetProxyConfigurationContentsError::InternalServerException(inner) => {
289 Error::InternalServerException(inner)
290 }
291 crate::operation::get_proxy_configuration_contents::GetProxyConfigurationContentsError::ThrottlingException(inner) => {
292 Error::ThrottlingException(inner)
293 }
294 crate::operation::get_proxy_configuration_contents::GetProxyConfigurationContentsError::Unhandled(inner) => Error::Unhandled(inner),
295 }
296 }
297}
298impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::get_proxy_update::GetProxyUpdateError, R>> for Error
299where
300 R: Send + Sync + std::fmt::Debug + 'static,
301{
302 fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::get_proxy_update::GetProxyUpdateError, R>) -> Self {
303 match err {
304 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
305 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
306 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
307 source: err.into(),
308 }),
309 }
310 }
311}
312impl From<crate::operation::get_proxy_update::GetProxyUpdateError> for Error {
313 fn from(err: crate::operation::get_proxy_update::GetProxyUpdateError) -> Self {
314 match err {
315 crate::operation::get_proxy_update::GetProxyUpdateError::AccessDeniedException(inner) => Error::AccessDeniedException(inner),
316 crate::operation::get_proxy_update::GetProxyUpdateError::ResourceNotFoundException(inner) => Error::ResourceNotFoundException(inner),
317 crate::operation::get_proxy_update::GetProxyUpdateError::ThrottlingException(inner) => Error::ThrottlingException(inner),
318 crate::operation::get_proxy_update::GetProxyUpdateError::ValidationException(inner) => Error::ValidationException(inner),
319 crate::operation::get_proxy_update::GetProxyUpdateError::InternalServerException(inner) => Error::InternalServerException(inner),
320 crate::operation::get_proxy_update::GetProxyUpdateError::Unhandled(inner) => Error::Unhandled(inner),
321 }
322 }
323}
324impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::list_certificate_associations::ListCertificateAssociationsError, R>>
325 for Error
326where
327 R: Send + Sync + std::fmt::Debug + 'static,
328{
329 fn from(
330 err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::list_certificate_associations::ListCertificateAssociationsError, R>,
331 ) -> Self {
332 match err {
333 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
334 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
335 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
336 source: err.into(),
337 }),
338 }
339 }
340}
341impl From<crate::operation::list_certificate_associations::ListCertificateAssociationsError> for Error {
342 fn from(err: crate::operation::list_certificate_associations::ListCertificateAssociationsError) -> Self {
343 match err {
344 crate::operation::list_certificate_associations::ListCertificateAssociationsError::AccessDeniedException(inner) => {
345 Error::AccessDeniedException(inner)
346 }
347 crate::operation::list_certificate_associations::ListCertificateAssociationsError::ResourceNotFoundException(inner) => {
348 Error::ResourceNotFoundException(inner)
349 }
350 crate::operation::list_certificate_associations::ListCertificateAssociationsError::ThrottlingException(inner) => {
351 Error::ThrottlingException(inner)
352 }
353 crate::operation::list_certificate_associations::ListCertificateAssociationsError::ValidationException(inner) => {
354 Error::ValidationException(inner)
355 }
356 crate::operation::list_certificate_associations::ListCertificateAssociationsError::InternalServerException(inner) => {
357 Error::InternalServerException(inner)
358 }
359 crate::operation::list_certificate_associations::ListCertificateAssociationsError::Unhandled(inner) => Error::Unhandled(inner),
360 }
361 }
362}
363impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::list_proxies::ListProxiesError, R>> for Error
364where
365 R: Send + Sync + std::fmt::Debug + 'static,
366{
367 fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::list_proxies::ListProxiesError, R>) -> Self {
368 match err {
369 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
370 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
371 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
372 source: err.into(),
373 }),
374 }
375 }
376}
377impl From<crate::operation::list_proxies::ListProxiesError> for Error {
378 fn from(err: crate::operation::list_proxies::ListProxiesError) -> Self {
379 match err {
380 crate::operation::list_proxies::ListProxiesError::ValidationException(inner) => Error::ValidationException(inner),
381 crate::operation::list_proxies::ListProxiesError::InternalServerException(inner) => Error::InternalServerException(inner),
382 crate::operation::list_proxies::ListProxiesError::ThrottlingException(inner) => Error::ThrottlingException(inner),
383 crate::operation::list_proxies::ListProxiesError::Unhandled(inner) => Error::Unhandled(inner),
384 }
385 }
386}
387impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::list_proxy_updates::ListProxyUpdatesError, R>> for Error
388where
389 R: Send + Sync + std::fmt::Debug + 'static,
390{
391 fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::list_proxy_updates::ListProxyUpdatesError, R>) -> Self {
392 match err {
393 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
394 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
395 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
396 source: err.into(),
397 }),
398 }
399 }
400}
401impl From<crate::operation::list_proxy_updates::ListProxyUpdatesError> for Error {
402 fn from(err: crate::operation::list_proxy_updates::ListProxyUpdatesError) -> Self {
403 match err {
404 crate::operation::list_proxy_updates::ListProxyUpdatesError::AccessDeniedException(inner) => Error::AccessDeniedException(inner),
405 crate::operation::list_proxy_updates::ListProxyUpdatesError::ResourceNotFoundException(inner) => Error::ResourceNotFoundException(inner),
406 crate::operation::list_proxy_updates::ListProxyUpdatesError::ThrottlingException(inner) => Error::ThrottlingException(inner),
407 crate::operation::list_proxy_updates::ListProxyUpdatesError::ValidationException(inner) => Error::ValidationException(inner),
408 crate::operation::list_proxy_updates::ListProxyUpdatesError::InternalServerException(inner) => Error::InternalServerException(inner),
409 crate::operation::list_proxy_updates::ListProxyUpdatesError::Unhandled(inner) => Error::Unhandled(inner),
410 }
411 }
412}
413impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::list_proxy_versions::ListProxyVersionsError, R>> for Error
414where
415 R: Send + Sync + std::fmt::Debug + 'static,
416{
417 fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::list_proxy_versions::ListProxyVersionsError, R>) -> Self {
418 match err {
419 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
420 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
421 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
422 source: err.into(),
423 }),
424 }
425 }
426}
427impl From<crate::operation::list_proxy_versions::ListProxyVersionsError> for Error {
428 fn from(err: crate::operation::list_proxy_versions::ListProxyVersionsError) -> Self {
429 match err {
430 crate::operation::list_proxy_versions::ListProxyVersionsError::ValidationException(inner) => Error::ValidationException(inner),
431 crate::operation::list_proxy_versions::ListProxyVersionsError::InternalServerException(inner) => Error::InternalServerException(inner),
432 crate::operation::list_proxy_versions::ListProxyVersionsError::ThrottlingException(inner) => Error::ThrottlingException(inner),
433 crate::operation::list_proxy_versions::ListProxyVersionsError::Unhandled(inner) => Error::Unhandled(inner),
434 }
435 }
436}
437impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::list_tags_for_resource::ListTagsForResourceError, R>> for Error
438where
439 R: Send + Sync + std::fmt::Debug + 'static,
440{
441 fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::list_tags_for_resource::ListTagsForResourceError, R>) -> Self {
442 match err {
443 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
444 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
445 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
446 source: err.into(),
447 }),
448 }
449 }
450}
451impl From<crate::operation::list_tags_for_resource::ListTagsForResourceError> for Error {
452 fn from(err: crate::operation::list_tags_for_resource::ListTagsForResourceError) -> Self {
453 match err {
454 crate::operation::list_tags_for_resource::ListTagsForResourceError::ResourceNotFoundException(inner) => {
455 Error::ResourceNotFoundException(inner)
456 }
457 crate::operation::list_tags_for_resource::ListTagsForResourceError::ThrottlingException(inner) => Error::ThrottlingException(inner),
458 crate::operation::list_tags_for_resource::ListTagsForResourceError::ValidationException(inner) => Error::ValidationException(inner),
459 crate::operation::list_tags_for_resource::ListTagsForResourceError::InternalServerException(inner) => {
460 Error::InternalServerException(inner)
461 }
462 crate::operation::list_tags_for_resource::ListTagsForResourceError::Unhandled(inner) => Error::Unhandled(inner),
463 }
464 }
465}
466impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::tag_resource::TagResourceError, 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::tag_resource::TagResourceError, 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::tag_resource::TagResourceError> for Error {
481 fn from(err: crate::operation::tag_resource::TagResourceError) -> Self {
482 match err {
483 crate::operation::tag_resource::TagResourceError::AccessDeniedException(inner) => Error::AccessDeniedException(inner),
484 crate::operation::tag_resource::TagResourceError::ResourceNotFoundException(inner) => Error::ResourceNotFoundException(inner),
485 crate::operation::tag_resource::TagResourceError::ServiceQuotaExceededException(inner) => Error::ServiceQuotaExceededException(inner),
486 crate::operation::tag_resource::TagResourceError::ThrottlingException(inner) => Error::ThrottlingException(inner),
487 crate::operation::tag_resource::TagResourceError::ValidationException(inner) => Error::ValidationException(inner),
488 crate::operation::tag_resource::TagResourceError::InternalServerException(inner) => Error::InternalServerException(inner),
489 crate::operation::tag_resource::TagResourceError::Unhandled(inner) => Error::Unhandled(inner),
490 }
491 }
492}
493impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::untag_resource::UntagResourceError, R>> for Error
494where
495 R: Send + Sync + std::fmt::Debug + 'static,
496{
497 fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::untag_resource::UntagResourceError, R>) -> Self {
498 match err {
499 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
500 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
501 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
502 source: err.into(),
503 }),
504 }
505 }
506}
507impl From<crate::operation::untag_resource::UntagResourceError> for Error {
508 fn from(err: crate::operation::untag_resource::UntagResourceError) -> Self {
509 match err {
510 crate::operation::untag_resource::UntagResourceError::AccessDeniedException(inner) => Error::AccessDeniedException(inner),
511 crate::operation::untag_resource::UntagResourceError::ResourceNotFoundException(inner) => Error::ResourceNotFoundException(inner),
512 crate::operation::untag_resource::UntagResourceError::ThrottlingException(inner) => Error::ThrottlingException(inner),
513 crate::operation::untag_resource::UntagResourceError::ValidationException(inner) => Error::ValidationException(inner),
514 crate::operation::untag_resource::UntagResourceError::InternalServerException(inner) => Error::InternalServerException(inner),
515 crate::operation::untag_resource::UntagResourceError::Unhandled(inner) => Error::Unhandled(inner),
516 }
517 }
518}
519impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::update_proxy_attributes::UpdateProxyAttributesError, R>> for Error
520where
521 R: Send + Sync + std::fmt::Debug + 'static,
522{
523 fn from(
524 err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::update_proxy_attributes::UpdateProxyAttributesError, R>,
525 ) -> Self {
526 match err {
527 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
528 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
529 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
530 source: err.into(),
531 }),
532 }
533 }
534}
535impl From<crate::operation::update_proxy_attributes::UpdateProxyAttributesError> for Error {
536 fn from(err: crate::operation::update_proxy_attributes::UpdateProxyAttributesError) -> Self {
537 match err {
538 crate::operation::update_proxy_attributes::UpdateProxyAttributesError::ResourceNotFoundException(inner) => {
539 Error::ResourceNotFoundException(inner)
540 }
541 crate::operation::update_proxy_attributes::UpdateProxyAttributesError::ValidationException(inner) => Error::ValidationException(inner),
542 crate::operation::update_proxy_attributes::UpdateProxyAttributesError::InternalServerException(inner) => {
543 Error::InternalServerException(inner)
544 }
545 crate::operation::update_proxy_attributes::UpdateProxyAttributesError::ThrottlingException(inner) => Error::ThrottlingException(inner),
546 crate::operation::update_proxy_attributes::UpdateProxyAttributesError::Unhandled(inner) => Error::Unhandled(inner),
547 }
548 }
549}
550impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::update_proxy_configuration::UpdateProxyConfigurationError, R>>
551 for Error
552where
553 R: Send + Sync + std::fmt::Debug + 'static,
554{
555 fn from(
556 err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::update_proxy_configuration::UpdateProxyConfigurationError, R>,
557 ) -> Self {
558 match err {
559 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
560 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
561 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
562 source: err.into(),
563 }),
564 }
565 }
566}
567impl From<crate::operation::update_proxy_configuration::UpdateProxyConfigurationError> for Error {
568 fn from(err: crate::operation::update_proxy_configuration::UpdateProxyConfigurationError) -> Self {
569 match err {
570 crate::operation::update_proxy_configuration::UpdateProxyConfigurationError::AccessDeniedException(inner) => {
571 Error::AccessDeniedException(inner)
572 }
573 crate::operation::update_proxy_configuration::UpdateProxyConfigurationError::PriorRequestNotCompletedException(inner) => {
574 Error::PriorRequestNotCompletedException(inner)
575 }
576 crate::operation::update_proxy_configuration::UpdateProxyConfigurationError::ResourceNotFoundException(inner) => {
577 Error::ResourceNotFoundException(inner)
578 }
579 crate::operation::update_proxy_configuration::UpdateProxyConfigurationError::ValidationException(inner) => {
580 Error::ValidationException(inner)
581 }
582 crate::operation::update_proxy_configuration::UpdateProxyConfigurationError::InternalServerException(inner) => {
583 Error::InternalServerException(inner)
584 }
585 crate::operation::update_proxy_configuration::UpdateProxyConfigurationError::ThrottlingException(inner) => {
586 Error::ThrottlingException(inner)
587 }
588 crate::operation::update_proxy_configuration::UpdateProxyConfigurationError::Unhandled(inner) => Error::Unhandled(inner),
589 }
590 }
591}
592impl<R>
593 From<
594 ::aws_smithy_runtime_api::client::result::SdkError<
595 crate::operation::update_proxy_network_configuration::UpdateProxyNetworkConfigurationError,
596 R,
597 >,
598 > for Error
599where
600 R: Send + Sync + std::fmt::Debug + 'static,
601{
602 fn from(
603 err: ::aws_smithy_runtime_api::client::result::SdkError<
604 crate::operation::update_proxy_network_configuration::UpdateProxyNetworkConfigurationError,
605 R,
606 >,
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::update_proxy_network_configuration::UpdateProxyNetworkConfigurationError> for Error {
618 fn from(err: crate::operation::update_proxy_network_configuration::UpdateProxyNetworkConfigurationError) -> Self {
619 match err {
620 crate::operation::update_proxy_network_configuration::UpdateProxyNetworkConfigurationError::AccessDeniedException(inner) => {
621 Error::AccessDeniedException(inner)
622 }
623 crate::operation::update_proxy_network_configuration::UpdateProxyNetworkConfigurationError::ResourceNotFoundException(inner) => {
624 Error::ResourceNotFoundException(inner)
625 }
626 crate::operation::update_proxy_network_configuration::UpdateProxyNetworkConfigurationError::ValidationException(inner) => {
627 Error::ValidationException(inner)
628 }
629 crate::operation::update_proxy_network_configuration::UpdateProxyNetworkConfigurationError::InternalServerException(inner) => {
630 Error::InternalServerException(inner)
631 }
632 crate::operation::update_proxy_network_configuration::UpdateProxyNetworkConfigurationError::ThrottlingException(inner) => {
633 Error::ThrottlingException(inner)
634 }
635 crate::operation::update_proxy_network_configuration::UpdateProxyNetworkConfigurationError::Unhandled(inner) => Error::Unhandled(inner),
636 }
637 }
638}
639impl<O, E> ::std::convert::From<::aws_smithy_runtime_api::client::waiters::error::WaiterError<O, E>> for Error
640where
641 O: ::std::fmt::Debug + ::std::marker::Send + ::std::marker::Sync + 'static,
642 E: ::std::error::Error + ::std::marker::Send + ::std::marker::Sync + 'static,
643{
644 fn from(err: ::aws_smithy_runtime_api::client::waiters::error::WaiterError<O, E>) -> Self {
645 Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
646 meta: ::std::default::Default::default(),
647 source: err.into(),
648 })
649 }
650}
651impl ::std::error::Error for Error {
652 fn source(&self) -> std::option::Option<&(dyn ::std::error::Error + 'static)> {
653 match self {
654 Error::AccessDeniedException(inner) => inner.source(),
655 Error::ConflictException(inner) => inner.source(),
656 Error::InternalServerException(inner) => inner.source(),
657 Error::OperationNotPermittedException(inner) => inner.source(),
658 Error::PriorRequestNotCompletedException(inner) => inner.source(),
659 Error::ResourceNotFoundException(inner) => inner.source(),
660 Error::ServiceQuotaExceededException(inner) => inner.source(),
661 Error::ThrottlingException(inner) => inner.source(),
662 Error::ValidationException(inner) => inner.source(),
663 Error::Unhandled(inner) => ::std::option::Option::Some(&*inner.source),
664 }
665 }
666}
667impl ::aws_types::request_id::RequestId for Error {
668 fn request_id(&self) -> Option<&str> {
669 match self {
670 Self::AccessDeniedException(e) => e.request_id(),
671 Self::ConflictException(e) => e.request_id(),
672 Self::InternalServerException(e) => e.request_id(),
673 Self::OperationNotPermittedException(e) => e.request_id(),
674 Self::PriorRequestNotCompletedException(e) => e.request_id(),
675 Self::ResourceNotFoundException(e) => e.request_id(),
676 Self::ServiceQuotaExceededException(e) => e.request_id(),
677 Self::ThrottlingException(e) => e.request_id(),
678 Self::ValidationException(e) => e.request_id(),
679 Self::Unhandled(e) => e.meta.request_id(),
680 }
681 }
682}