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