You are an expert in writing code in many different languages. Your goal is to perform code completion for the following code, keeping in mind the rest of the code and the file meta data.
    Metadata details:
    filename: _data_source_to_index_field_mapping.rs
    path of file: ./repos/aws-sdk-rust/sdk/kendra/src/types
    
    the code of the file until where you have to start completion: // Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.

/// <p>Maps attributes or field names of the documents synced from the data source to Amazon Kendra index field names. You can set up field mappings for each data source when calling <a href="https://docs.aws.amazon.com/kendra/latest/APIReference/API_CreateDataSource.html">CreateDataSource</a> or <a href="https://docs.aws.amazon.com/kendra/latest/APIReference/API_UpdateDataSource.html">UpdateDataSource</a> API. To create custom fields, use the <code>UpdateIndex</code> API 
    
    pub fn build(self) -> ::std::result::Result<crate::types::DataSourceToIndexFieldMapping, ::aws_smithy_types::error::operation::BuildError> {
        ::std::result::Result::Ok(crate::types::DataSourceToIndexFieldMapping {
            data_source_field_name: self.data_source_field_name.ok_or_else(|| {
                ::aws_smithy_types::error::operation::BuildError::missing_field(
                    "data_source_field_name",
                    "data_source_field_name was not specified but it is required when building DataSourceToIndexFieldMapping",
                )
            })?,
            date_field_format: self.date_field_format,
            index_field_name: self.index_field_name.ok_or_else(|| {
                ::aws_smithy_types::error::operation::BuildError::missing_field(
                    "index_field_name",
                    "index_field_name was not specified but it is required when building DataSourceToIndexFieldMapping",
                )
            })?,
        })
    }