// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
pub(crate) fn translate_document_output_output_correct_errors(
    mut builder: crate::operation::translate_document::builders::TranslateDocumentOutputBuilder,
) -> crate::operation::translate_document::builders::TranslateDocumentOutputBuilder {
    if builder.translated_document.is_none() {
        builder.translated_document = {
            let builder = crate::types::builders::TranslatedDocumentBuilder::default();
            crate::serde_util::translated_document_correct_errors(builder).build().ok()
        }
    }
    if builder.source_language_code.is_none() {
        builder.source_language_code = Some(Default::default())
    }
    if builder.target_language_code.is_none() {
        builder.target_language_code = Some(Default::default())
    }
    builder
}

pub(crate) fn translate_text_output_output_correct_errors(
    mut builder: crate::operation::translate_text::builders::TranslateTextOutputBuilder,
) -> crate::operation::translate_text::builders::TranslateTextOutputBuilder {
    if builder.translated_text.is_none() {
        builder.translated_text = Some(Default::default())
    }
    if builder.source_language_code.is_none() {
        builder.source_language_code = Some(Default::default())
    }
    if builder.target_language_code.is_none() {
        builder.target_language_code = Some(Default::default())
    }
    builder
}

pub(crate) fn translated_document_correct_errors(
    mut builder: crate::types::builders::TranslatedDocumentBuilder,
) -> crate::types::builders::TranslatedDocumentBuilder {
    if builder.content.is_none() {
        builder.content = Some(::aws_smithy_types::Blob::new(""))
    }
    builder
}

pub(crate) fn parallel_data_data_location_correct_errors(
    mut builder: crate::types::builders::ParallelDataDataLocationBuilder,
) -> crate::types::builders::ParallelDataDataLocationBuilder {
    if builder.repository_type.is_none() {
        builder.repository_type = Some(Default::default())
    }
    if builder.location.is_none() {
        builder.location = Some(Default::default())
    }
    builder
}

pub(crate) fn terminology_data_location_correct_errors(
    mut builder: crate::types::builders::TerminologyDataLocationBuilder,
) -> crate::types::builders::TerminologyDataLocationBuilder {
    if builder.repository_type.is_none() {
        builder.repository_type = Some(Default::default())
    }
    if builder.location.is_none() {
        builder.location = Some(Default::default())
    }
    builder
}

pub(crate) fn encryption_key_correct_errors(
    mut builder: crate::types::builders::EncryptionKeyBuilder,
) -> crate::types::builders::EncryptionKeyBuilder {
    if builder.r#type.is_none() {
        builder.r#type = "no value was set".parse::<crate::types::EncryptionKeyType>().ok()
    }
    if builder.id.is_none() {
        builder.id = Some(Default::default())
    }
    builder
}

pub(crate) fn input_data_config_correct_errors(
    mut builder: crate::types::builders::InputDataConfigBuilder,
) -> crate::types::builders::InputDataConfigBuilder {
    if builder.s3_uri.is_none() {
        builder.s3_uri = Some(Default::default())
    }
    if builder.content_type.is_none() {
        builder.content_type = Some(Default::default())
    }
    builder
}

pub(crate) fn language_correct_errors(mut builder: crate::types::builders::LanguageBuilder) -> crate::types::builders::LanguageBuilder {
    if builder.language_name.is_none() {
        builder.language_name = Some(Default::default())
    }
    if builder.language_code.is_none() {
        builder.language_code = Some(Default::default())
    }
    builder
}

pub(crate) fn output_data_config_correct_errors(
    mut builder: crate::types::builders::OutputDataConfigBuilder,
) -> crate::types::builders::OutputDataConfigBuilder {
    if builder.s3_uri.is_none() {
        builder.s3_uri = Some(Default::default())
    }
    builder
}

pub(crate) fn tag_correct_errors(mut builder: crate::types::builders::TagBuilder) -> crate::types::builders::TagBuilder {
    if builder.key.is_none() {
        builder.key = Some(Default::default())
    }
    if builder.value.is_none() {
        builder.value = Some(Default::default())
    }
    builder
}
