aws_sdk_cognitoidentityprovider/operation/
verify_user_attribute.rs

1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2/// Orchestration and serialization glue logic for `VerifyUserAttribute`.
3#[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
4#[non_exhaustive]
5pub struct VerifyUserAttribute;
6impl VerifyUserAttribute {
7    /// Creates a new `VerifyUserAttribute`
8    pub fn new() -> Self {
9        Self
10    }
11    pub(crate) async fn orchestrate(
12        runtime_plugins: &::aws_smithy_runtime_api::client::runtime_plugin::RuntimePlugins,
13        input: crate::operation::verify_user_attribute::VerifyUserAttributeInput,
14    ) -> ::std::result::Result<
15        crate::operation::verify_user_attribute::VerifyUserAttributeOutput,
16        ::aws_smithy_runtime_api::client::result::SdkError<
17            crate::operation::verify_user_attribute::VerifyUserAttributeError,
18            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
19        >,
20    > {
21        let map_err = |err: ::aws_smithy_runtime_api::client::result::SdkError<
22            ::aws_smithy_runtime_api::client::interceptors::context::Error,
23            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
24        >| {
25            err.map_service_error(|err| {
26                err.downcast::<crate::operation::verify_user_attribute::VerifyUserAttributeError>()
27                    .expect("correct error type")
28            })
29        };
30        let context = Self::orchestrate_with_stop_point(runtime_plugins, input, ::aws_smithy_runtime::client::orchestrator::StopPoint::None)
31            .await
32            .map_err(map_err)?;
33        let output = context.finalize().map_err(map_err)?;
34        ::std::result::Result::Ok(
35            output
36                .downcast::<crate::operation::verify_user_attribute::VerifyUserAttributeOutput>()
37                .expect("correct output type"),
38        )
39    }
40
41    pub(crate) async fn orchestrate_with_stop_point(
42        runtime_plugins: &::aws_smithy_runtime_api::client::runtime_plugin::RuntimePlugins,
43        input: crate::operation::verify_user_attribute::VerifyUserAttributeInput,
44        stop_point: ::aws_smithy_runtime::client::orchestrator::StopPoint,
45    ) -> ::std::result::Result<
46        ::aws_smithy_runtime_api::client::interceptors::context::InterceptorContext,
47        ::aws_smithy_runtime_api::client::result::SdkError<
48            ::aws_smithy_runtime_api::client::interceptors::context::Error,
49            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
50        >,
51    > {
52        let input = ::aws_smithy_runtime_api::client::interceptors::context::Input::erase(input);
53        use ::tracing::Instrument;
54        ::aws_smithy_runtime::client::orchestrator::invoke_with_stop_point(
55            "Cognito Identity Provider",
56            "VerifyUserAttribute",
57            input,
58            runtime_plugins,
59            stop_point,
60        )
61        // Create a parent span for the entire operation. Includes a random, internal-only,
62        // seven-digit ID for the operation orchestration so that it can be correlated in the logs.
63        .instrument(::tracing::debug_span!(
64            "Cognito Identity Provider.VerifyUserAttribute",
65            "rpc.service" = "Cognito Identity Provider",
66            "rpc.method" = "VerifyUserAttribute",
67            "sdk_invocation_id" = ::fastrand::u32(1_000_000..10_000_000),
68            "rpc.system" = "aws-api",
69        ))
70        .await
71    }
72
73    pub(crate) fn operation_runtime_plugins(
74        client_runtime_plugins: ::aws_smithy_runtime_api::client::runtime_plugin::RuntimePlugins,
75        client_config: &crate::config::Config,
76        config_override: ::std::option::Option<crate::config::Builder>,
77    ) -> ::aws_smithy_runtime_api::client::runtime_plugin::RuntimePlugins {
78        let mut runtime_plugins = client_runtime_plugins.with_operation_plugin(Self::new());
79
80        if let ::std::option::Option::Some(config_override) = config_override {
81            for plugin in config_override.runtime_plugins.iter().cloned() {
82                runtime_plugins = runtime_plugins.with_operation_plugin(plugin);
83            }
84            runtime_plugins = runtime_plugins.with_operation_plugin(crate::config::ConfigOverrideRuntimePlugin::new(
85                config_override,
86                client_config.config.clone(),
87                &client_config.runtime_components,
88            ));
89        }
90        runtime_plugins
91    }
92}
93impl ::aws_smithy_runtime_api::client::runtime_plugin::RuntimePlugin for VerifyUserAttribute {
94    fn config(&self) -> ::std::option::Option<::aws_smithy_types::config_bag::FrozenLayer> {
95        let mut cfg = ::aws_smithy_types::config_bag::Layer::new("VerifyUserAttribute");
96
97        cfg.store_put(::aws_smithy_runtime_api::client::ser_de::SharedRequestSerializer::new(
98            VerifyUserAttributeRequestSerializer,
99        ));
100        cfg.store_put(::aws_smithy_runtime_api::client::ser_de::SharedResponseDeserializer::new(
101            VerifyUserAttributeResponseDeserializer,
102        ));
103
104        cfg.store_put(::aws_smithy_runtime_api::client::auth::AuthSchemeOptionResolverParams::new(
105            crate::config::auth::Params::builder()
106                .operation_name("VerifyUserAttribute")
107                .build()
108                .expect("required fields set"),
109        ));
110
111        cfg.store_put(::aws_smithy_runtime_api::client::orchestrator::Metadata::new(
112            "VerifyUserAttribute",
113            "Cognito Identity Provider",
114        ));
115
116        ::std::option::Option::Some(cfg.freeze())
117    }
118
119    fn runtime_components(
120        &self,
121        _: &::aws_smithy_runtime_api::client::runtime_components::RuntimeComponentsBuilder,
122    ) -> ::std::borrow::Cow<'_, ::aws_smithy_runtime_api::client::runtime_components::RuntimeComponentsBuilder> {
123        #[allow(unused_mut)]
124        let mut rcb = ::aws_smithy_runtime_api::client::runtime_components::RuntimeComponentsBuilder::new("VerifyUserAttribute")
125            .with_interceptor(::aws_smithy_runtime::client::stalled_stream_protection::StalledStreamProtectionInterceptor::default())
126            .with_interceptor(VerifyUserAttributeEndpointParamsInterceptor)
127            .with_retry_classifier(::aws_smithy_runtime::client::retries::classifiers::TransientErrorClassifier::<
128                crate::operation::verify_user_attribute::VerifyUserAttributeError,
129            >::new())
130            .with_retry_classifier(::aws_smithy_runtime::client::retries::classifiers::ModeledAsRetryableClassifier::<
131                crate::operation::verify_user_attribute::VerifyUserAttributeError,
132            >::new())
133            .with_retry_classifier(::aws_runtime::retries::classifiers::AwsErrorCodeClassifier::<
134                crate::operation::verify_user_attribute::VerifyUserAttributeError,
135            >::new());
136
137        ::std::borrow::Cow::Owned(rcb)
138    }
139}
140
141#[derive(Debug)]
142struct VerifyUserAttributeResponseDeserializer;
143impl ::aws_smithy_runtime_api::client::ser_de::DeserializeResponse for VerifyUserAttributeResponseDeserializer {
144    fn deserialize_nonstreaming(
145        &self,
146        response: &::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
147    ) -> ::aws_smithy_runtime_api::client::interceptors::context::OutputOrError {
148        let (success, status) = (response.status().is_success(), response.status().as_u16());
149        let headers = response.headers();
150        let body = response.body().bytes().expect("body loaded");
151        #[allow(unused_mut)]
152        let mut force_error = false;
153        ::tracing::debug!(request_id = ?::aws_types::request_id::RequestId::request_id(response));
154        let parse_result = if !success && status != 200 || force_error {
155            crate::protocol_serde::shape_verify_user_attribute::de_verify_user_attribute_http_error(status, headers, body)
156        } else {
157            crate::protocol_serde::shape_verify_user_attribute::de_verify_user_attribute_http_response(status, headers, body)
158        };
159        crate::protocol_serde::type_erase_result(parse_result)
160    }
161}
162#[derive(Debug)]
163struct VerifyUserAttributeRequestSerializer;
164impl ::aws_smithy_runtime_api::client::ser_de::SerializeRequest for VerifyUserAttributeRequestSerializer {
165    #[allow(unused_mut, clippy::let_and_return, clippy::needless_borrow, clippy::useless_conversion)]
166    fn serialize_input(
167        &self,
168        input: ::aws_smithy_runtime_api::client::interceptors::context::Input,
169        _cfg: &mut ::aws_smithy_types::config_bag::ConfigBag,
170    ) -> ::std::result::Result<::aws_smithy_runtime_api::client::orchestrator::HttpRequest, ::aws_smithy_runtime_api::box_error::BoxError> {
171        let input = input
172            .downcast::<crate::operation::verify_user_attribute::VerifyUserAttributeInput>()
173            .expect("correct type");
174        let _header_serialization_settings = _cfg
175            .load::<crate::serialization_settings::HeaderSerializationSettings>()
176            .cloned()
177            .unwrap_or_default();
178        let mut request_builder = {
179            #[allow(clippy::uninlined_format_args)]
180            fn uri_base(
181                _input: &crate::operation::verify_user_attribute::VerifyUserAttributeInput,
182                output: &mut ::std::string::String,
183            ) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> {
184                use ::std::fmt::Write as _;
185                ::std::write!(output, "/").expect("formatting should succeed");
186                ::std::result::Result::Ok(())
187            }
188            #[allow(clippy::unnecessary_wraps)]
189            fn update_http_builder(
190                input: &crate::operation::verify_user_attribute::VerifyUserAttributeInput,
191                builder: ::http::request::Builder,
192            ) -> ::std::result::Result<::http::request::Builder, ::aws_smithy_types::error::operation::BuildError> {
193                let mut uri = ::std::string::String::new();
194                uri_base(input, &mut uri)?;
195                ::std::result::Result::Ok(builder.method("POST").uri(uri))
196            }
197            let mut builder = update_http_builder(&input, ::http::request::Builder::new())?;
198            builder = _header_serialization_settings.set_default_header(builder, ::http::header::CONTENT_TYPE, "application/x-amz-json-1.1");
199            builder = _header_serialization_settings.set_default_header(
200                builder,
201                ::http::header::HeaderName::from_static("x-amz-target"),
202                "AWSCognitoIdentityProviderService.VerifyUserAttribute",
203            );
204            builder
205        };
206        let body = ::aws_smithy_types::body::SdkBody::from(crate::protocol_serde::shape_verify_user_attribute::ser_verify_user_attribute_input(
207            &input,
208        )?);
209        if let Some(content_length) = body.content_length() {
210            let content_length = content_length.to_string();
211            request_builder = _header_serialization_settings.set_default_header(request_builder, ::http::header::CONTENT_LENGTH, &content_length);
212        }
213        ::std::result::Result::Ok(request_builder.body(body).expect("valid request").try_into().unwrap())
214    }
215}
216#[derive(Debug)]
217struct VerifyUserAttributeEndpointParamsInterceptor;
218
219impl ::aws_smithy_runtime_api::client::interceptors::Intercept for VerifyUserAttributeEndpointParamsInterceptor {
220    fn name(&self) -> &'static str {
221        "VerifyUserAttributeEndpointParamsInterceptor"
222    }
223
224    fn read_before_execution(
225        &self,
226        context: &::aws_smithy_runtime_api::client::interceptors::context::BeforeSerializationInterceptorContextRef<
227            '_,
228            ::aws_smithy_runtime_api::client::interceptors::context::Input,
229            ::aws_smithy_runtime_api::client::interceptors::context::Output,
230            ::aws_smithy_runtime_api::client::interceptors::context::Error,
231        >,
232        cfg: &mut ::aws_smithy_types::config_bag::ConfigBag,
233    ) -> ::std::result::Result<(), ::aws_smithy_runtime_api::box_error::BoxError> {
234        let _input = context
235            .input()
236            .downcast_ref::<VerifyUserAttributeInput>()
237            .ok_or("failed to downcast to VerifyUserAttributeInput")?;
238
239        let params = crate::config::endpoint::Params::builder()
240            .set_region(cfg.load::<::aws_types::region::Region>().map(|r| r.as_ref().to_owned()))
241            .set_use_dual_stack(cfg.load::<::aws_types::endpoint_config::UseDualStack>().map(|ty| ty.0))
242            .set_use_fips(cfg.load::<::aws_types::endpoint_config::UseFips>().map(|ty| ty.0))
243            .set_endpoint(cfg.load::<::aws_types::endpoint_config::EndpointUrl>().map(|ty| ty.0.clone()))
244            .build()
245            .map_err(|err| {
246                ::aws_smithy_runtime_api::client::interceptors::error::ContextAttachedError::new("endpoint params could not be built", err)
247            })?;
248        cfg.interceptor_state()
249            .store_put(::aws_smithy_runtime_api::client::endpoint::EndpointResolverParams::new(params));
250        ::std::result::Result::Ok(())
251    }
252}
253
254// The get_* functions below are generated from JMESPath expressions in the
255// operationContextParams trait. They target the operation's input shape.
256
257/// Error type for the `VerifyUserAttributeError` operation.
258#[non_exhaustive]
259#[derive(::std::fmt::Debug)]
260pub enum VerifyUserAttributeError {
261    /// <p>This exception is thrown when a user tries to confirm the account with an email address or phone number that has already been supplied as an alias for a different user profile. This exception indicates that an account with this email address or phone already exists in a user pool that you've configured to use email address or phone number as a sign-in alias.</p>
262    AliasExistsException(crate::types::error::AliasExistsException),
263    /// <p>This exception is thrown if the provided code doesn't match what the server was expecting.</p>
264    CodeMismatchException(crate::types::error::CodeMismatchException),
265    /// <p>This exception is thrown if a code has expired.</p>
266    ExpiredCodeException(crate::types::error::ExpiredCodeException),
267    /// <p>This exception is thrown when WAF doesn't allow your request based on a web ACL that's associated with your user pool.</p>
268    ForbiddenException(crate::types::error::ForbiddenException),
269    /// <p>This exception is thrown when Amazon Cognito encounters an internal error.</p>
270    InternalErrorException(crate::types::error::InternalErrorException),
271    /// <p>This exception is thrown when the Amazon Cognito service encounters an invalid parameter.</p>
272    InvalidParameterException(crate::types::error::InvalidParameterException),
273    /// <p>This exception is thrown when a user exceeds the limit for a requested Amazon Web Services resource.</p>
274    LimitExceededException(crate::types::error::LimitExceededException),
275    /// <p>This exception is thrown when a user isn't authorized.</p>
276    NotAuthorizedException(crate::types::error::NotAuthorizedException),
277    /// <p>This exception is thrown when a password reset is required.</p>
278    PasswordResetRequiredException(crate::types::error::PasswordResetRequiredException),
279    /// <p>This exception is thrown when the Amazon Cognito service can't find the requested resource.</p>
280    ResourceNotFoundException(crate::types::error::ResourceNotFoundException),
281    /// <p>This exception is thrown when the user has made too many requests for a given operation.</p>
282    TooManyRequestsException(crate::types::error::TooManyRequestsException),
283    /// <p>This exception is thrown when a user isn't confirmed successfully.</p>
284    UserNotConfirmedException(crate::types::error::UserNotConfirmedException),
285    /// <p>This exception is thrown when a user isn't found.</p>
286    UserNotFoundException(crate::types::error::UserNotFoundException),
287    /// An unexpected error occurred (e.g., invalid JSON returned by the service or an unknown error code).
288    #[deprecated(note = "Matching `Unhandled` directly is not forwards compatible. Instead, match using a \
289    variable wildcard pattern and check `.code()`:
290     \
291    &nbsp;&nbsp;&nbsp;`err if err.code() == Some(\"SpecificExceptionCode\") => { /* handle the error */ }`
292     \
293    See [`ProvideErrorMetadata`](#impl-ProvideErrorMetadata-for-VerifyUserAttributeError) for what information is available for the error.")]
294    Unhandled(crate::error::sealed_unhandled::Unhandled),
295}
296impl VerifyUserAttributeError {
297    /// Creates the `VerifyUserAttributeError::Unhandled` variant from any error type.
298    pub fn unhandled(
299        err: impl ::std::convert::Into<::std::boxed::Box<dyn ::std::error::Error + ::std::marker::Send + ::std::marker::Sync + 'static>>,
300    ) -> Self {
301        Self::Unhandled(crate::error::sealed_unhandled::Unhandled {
302            source: err.into(),
303            meta: ::std::default::Default::default(),
304        })
305    }
306
307    /// Creates the `VerifyUserAttributeError::Unhandled` variant from an [`ErrorMetadata`](::aws_smithy_types::error::ErrorMetadata).
308    pub fn generic(err: ::aws_smithy_types::error::ErrorMetadata) -> Self {
309        Self::Unhandled(crate::error::sealed_unhandled::Unhandled {
310            source: err.clone().into(),
311            meta: err,
312        })
313    }
314    ///
315    /// Returns error metadata, which includes the error code, message,
316    /// request ID, and potentially additional information.
317    ///
318    pub fn meta(&self) -> &::aws_smithy_types::error::ErrorMetadata {
319        match self {
320            Self::AliasExistsException(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
321            Self::CodeMismatchException(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
322            Self::ExpiredCodeException(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
323            Self::ForbiddenException(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
324            Self::InternalErrorException(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
325            Self::InvalidParameterException(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
326            Self::LimitExceededException(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
327            Self::NotAuthorizedException(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
328            Self::PasswordResetRequiredException(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
329            Self::ResourceNotFoundException(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
330            Self::TooManyRequestsException(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
331            Self::UserNotConfirmedException(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
332            Self::UserNotFoundException(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
333            Self::Unhandled(e) => &e.meta,
334        }
335    }
336    /// Returns `true` if the error kind is `VerifyUserAttributeError::AliasExistsException`.
337    pub fn is_alias_exists_exception(&self) -> bool {
338        matches!(self, Self::AliasExistsException(_))
339    }
340    /// Returns `true` if the error kind is `VerifyUserAttributeError::CodeMismatchException`.
341    pub fn is_code_mismatch_exception(&self) -> bool {
342        matches!(self, Self::CodeMismatchException(_))
343    }
344    /// Returns `true` if the error kind is `VerifyUserAttributeError::ExpiredCodeException`.
345    pub fn is_expired_code_exception(&self) -> bool {
346        matches!(self, Self::ExpiredCodeException(_))
347    }
348    /// Returns `true` if the error kind is `VerifyUserAttributeError::ForbiddenException`.
349    pub fn is_forbidden_exception(&self) -> bool {
350        matches!(self, Self::ForbiddenException(_))
351    }
352    /// Returns `true` if the error kind is `VerifyUserAttributeError::InternalErrorException`.
353    pub fn is_internal_error_exception(&self) -> bool {
354        matches!(self, Self::InternalErrorException(_))
355    }
356    /// Returns `true` if the error kind is `VerifyUserAttributeError::InvalidParameterException`.
357    pub fn is_invalid_parameter_exception(&self) -> bool {
358        matches!(self, Self::InvalidParameterException(_))
359    }
360    /// Returns `true` if the error kind is `VerifyUserAttributeError::LimitExceededException`.
361    pub fn is_limit_exceeded_exception(&self) -> bool {
362        matches!(self, Self::LimitExceededException(_))
363    }
364    /// Returns `true` if the error kind is `VerifyUserAttributeError::NotAuthorizedException`.
365    pub fn is_not_authorized_exception(&self) -> bool {
366        matches!(self, Self::NotAuthorizedException(_))
367    }
368    /// Returns `true` if the error kind is `VerifyUserAttributeError::PasswordResetRequiredException`.
369    pub fn is_password_reset_required_exception(&self) -> bool {
370        matches!(self, Self::PasswordResetRequiredException(_))
371    }
372    /// Returns `true` if the error kind is `VerifyUserAttributeError::ResourceNotFoundException`.
373    pub fn is_resource_not_found_exception(&self) -> bool {
374        matches!(self, Self::ResourceNotFoundException(_))
375    }
376    /// Returns `true` if the error kind is `VerifyUserAttributeError::TooManyRequestsException`.
377    pub fn is_too_many_requests_exception(&self) -> bool {
378        matches!(self, Self::TooManyRequestsException(_))
379    }
380    /// Returns `true` if the error kind is `VerifyUserAttributeError::UserNotConfirmedException`.
381    pub fn is_user_not_confirmed_exception(&self) -> bool {
382        matches!(self, Self::UserNotConfirmedException(_))
383    }
384    /// Returns `true` if the error kind is `VerifyUserAttributeError::UserNotFoundException`.
385    pub fn is_user_not_found_exception(&self) -> bool {
386        matches!(self, Self::UserNotFoundException(_))
387    }
388}
389impl ::std::error::Error for VerifyUserAttributeError {
390    fn source(&self) -> ::std::option::Option<&(dyn ::std::error::Error + 'static)> {
391        match self {
392            Self::AliasExistsException(_inner) => ::std::option::Option::Some(_inner),
393            Self::CodeMismatchException(_inner) => ::std::option::Option::Some(_inner),
394            Self::ExpiredCodeException(_inner) => ::std::option::Option::Some(_inner),
395            Self::ForbiddenException(_inner) => ::std::option::Option::Some(_inner),
396            Self::InternalErrorException(_inner) => ::std::option::Option::Some(_inner),
397            Self::InvalidParameterException(_inner) => ::std::option::Option::Some(_inner),
398            Self::LimitExceededException(_inner) => ::std::option::Option::Some(_inner),
399            Self::NotAuthorizedException(_inner) => ::std::option::Option::Some(_inner),
400            Self::PasswordResetRequiredException(_inner) => ::std::option::Option::Some(_inner),
401            Self::ResourceNotFoundException(_inner) => ::std::option::Option::Some(_inner),
402            Self::TooManyRequestsException(_inner) => ::std::option::Option::Some(_inner),
403            Self::UserNotConfirmedException(_inner) => ::std::option::Option::Some(_inner),
404            Self::UserNotFoundException(_inner) => ::std::option::Option::Some(_inner),
405            Self::Unhandled(_inner) => ::std::option::Option::Some(&*_inner.source),
406        }
407    }
408}
409impl ::std::fmt::Display for VerifyUserAttributeError {
410    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
411        match self {
412            Self::AliasExistsException(_inner) => _inner.fmt(f),
413            Self::CodeMismatchException(_inner) => _inner.fmt(f),
414            Self::ExpiredCodeException(_inner) => _inner.fmt(f),
415            Self::ForbiddenException(_inner) => _inner.fmt(f),
416            Self::InternalErrorException(_inner) => _inner.fmt(f),
417            Self::InvalidParameterException(_inner) => _inner.fmt(f),
418            Self::LimitExceededException(_inner) => _inner.fmt(f),
419            Self::NotAuthorizedException(_inner) => _inner.fmt(f),
420            Self::PasswordResetRequiredException(_inner) => _inner.fmt(f),
421            Self::ResourceNotFoundException(_inner) => _inner.fmt(f),
422            Self::TooManyRequestsException(_inner) => _inner.fmt(f),
423            Self::UserNotConfirmedException(_inner) => _inner.fmt(f),
424            Self::UserNotFoundException(_inner) => _inner.fmt(f),
425            Self::Unhandled(_inner) => {
426                if let ::std::option::Option::Some(code) = ::aws_smithy_types::error::metadata::ProvideErrorMetadata::code(self) {
427                    write!(f, "unhandled error ({code})")
428                } else {
429                    f.write_str("unhandled error")
430                }
431            }
432        }
433    }
434}
435impl ::aws_smithy_types::retry::ProvideErrorKind for VerifyUserAttributeError {
436    fn code(&self) -> ::std::option::Option<&str> {
437        ::aws_smithy_types::error::metadata::ProvideErrorMetadata::code(self)
438    }
439    fn retryable_error_kind(&self) -> ::std::option::Option<::aws_smithy_types::retry::ErrorKind> {
440        ::std::option::Option::None
441    }
442}
443impl ::aws_smithy_types::error::metadata::ProvideErrorMetadata for VerifyUserAttributeError {
444    fn meta(&self) -> &::aws_smithy_types::error::ErrorMetadata {
445        match self {
446            Self::AliasExistsException(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
447            Self::CodeMismatchException(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
448            Self::ExpiredCodeException(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
449            Self::ForbiddenException(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
450            Self::InternalErrorException(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
451            Self::InvalidParameterException(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
452            Self::LimitExceededException(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
453            Self::NotAuthorizedException(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
454            Self::PasswordResetRequiredException(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
455            Self::ResourceNotFoundException(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
456            Self::TooManyRequestsException(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
457            Self::UserNotConfirmedException(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
458            Self::UserNotFoundException(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
459            Self::Unhandled(_inner) => &_inner.meta,
460        }
461    }
462}
463impl ::aws_smithy_runtime_api::client::result::CreateUnhandledError for VerifyUserAttributeError {
464    fn create_unhandled_error(
465        source: ::std::boxed::Box<dyn ::std::error::Error + ::std::marker::Send + ::std::marker::Sync + 'static>,
466        meta: ::std::option::Option<::aws_smithy_types::error::ErrorMetadata>,
467    ) -> Self {
468        Self::Unhandled(crate::error::sealed_unhandled::Unhandled {
469            source,
470            meta: meta.unwrap_or_default(),
471        })
472    }
473}
474impl ::aws_types::request_id::RequestId for crate::operation::verify_user_attribute::VerifyUserAttributeError {
475    fn request_id(&self) -> Option<&str> {
476        self.meta().request_id()
477    }
478}
479
480pub use crate::operation::verify_user_attribute::_verify_user_attribute_output::VerifyUserAttributeOutput;
481
482pub use crate::operation::verify_user_attribute::_verify_user_attribute_input::VerifyUserAttributeInput;
483
484mod _verify_user_attribute_input;
485
486mod _verify_user_attribute_output;
487
488/// Builders
489pub mod builders;