// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
pub(crate) fn access_denied_exception_correct_errors(
    mut builder: crate::types::error::builders::AccessDeniedExceptionBuilder,
) -> crate::types::error::builders::AccessDeniedExceptionBuilder {
    if builder.error.is_none() {
        builder.error = "no value was set".parse::<crate::types::OAuth2ErrorCode>().ok()
    }
    if builder.message.is_none() {
        builder.message = Some(Default::default())
    }
    builder
}

pub(crate) fn internal_server_exception_correct_errors(
    mut builder: crate::types::error::builders::InternalServerExceptionBuilder,
) -> crate::types::error::builders::InternalServerExceptionBuilder {
    if builder.error.is_none() {
        builder.error = "no value was set".parse::<crate::types::OAuth2ErrorCode>().ok()
    }
    if builder.message.is_none() {
        builder.message = Some(Default::default())
    }
    builder
}

pub(crate) fn too_many_requests_error_correct_errors(
    mut builder: crate::types::error::builders::TooManyRequestsErrorBuilder,
) -> crate::types::error::builders::TooManyRequestsErrorBuilder {
    if builder.error.is_none() {
        builder.error = "no value was set".parse::<crate::types::OAuth2ErrorCode>().ok()
    }
    if builder.message.is_none() {
        builder.message = Some(Default::default())
    }
    builder
}

pub(crate) fn validation_exception_correct_errors(
    mut builder: crate::types::error::builders::ValidationExceptionBuilder,
) -> crate::types::error::builders::ValidationExceptionBuilder {
    if builder.error.is_none() {
        builder.error = "no value was set".parse::<crate::types::OAuth2ErrorCode>().ok()
    }
    if builder.message.is_none() {
        builder.message = Some(Default::default())
    }
    builder
}

pub(crate) fn create_o_auth2_token_output_output_correct_errors(
    mut builder: crate::operation::create_o_auth2_token::builders::CreateOAuth2TokenOutputBuilder,
) -> crate::operation::create_o_auth2_token::builders::CreateOAuth2TokenOutputBuilder {
    if builder.token_output.is_none() {
        builder.token_output = {
            let builder = crate::types::builders::CreateOAuth2TokenResponseBodyBuilder::default();
            crate::serde_util::create_o_auth2_token_response_body_correct_errors(builder).build().ok()
        }
    }
    builder
}

pub(crate) fn create_o_auth2_token_response_body_correct_errors(
    mut builder: crate::types::builders::CreateOAuth2TokenResponseBodyBuilder,
) -> crate::types::builders::CreateOAuth2TokenResponseBodyBuilder {
    if builder.access_token.is_none() {
        builder.access_token = {
            let builder = crate::types::builders::AccessTokenBuilder::default();
            crate::serde_util::access_token_correct_errors(builder).build().ok()
        }
    }
    if builder.token_type.is_none() {
        builder.token_type = Some(Default::default())
    }
    if builder.expires_in.is_none() {
        builder.expires_in = Some(Default::default())
    }
    if builder.refresh_token.is_none() {
        builder.refresh_token = Some(Default::default())
    }
    builder
}

pub(crate) fn access_token_correct_errors(mut builder: crate::types::builders::AccessTokenBuilder) -> crate::types::builders::AccessTokenBuilder {
    if builder.access_key_id.is_none() {
        builder.access_key_id = Some(Default::default())
    }
    if builder.secret_access_key.is_none() {
        builder.secret_access_key = Some(Default::default())
    }
    if builder.session_token.is_none() {
        builder.session_token = Some(Default::default())
    }
    builder
}
