@Generated(value="com.amazonaws:aws-java-sdk-code-generator") public class DataSourceToIndexFieldMapping extends Object implements Serializable, Cloneable, StructuredPojo
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 CreateDataSource or UpdateDataSource API. To
create custom fields, use the UpdateIndex
API to first create an index field and then map to the data
source field. For more information, see Mapping data source fields.
Constructor and Description |
---|
DataSourceToIndexFieldMapping() |
Modifier and Type | Method and Description |
---|---|
DataSourceToIndexFieldMapping |
clone() |
boolean |
equals(Object obj) |
String |
getDataSourceFieldName()
The name of the field in the data source.
|
String |
getDateFieldFormat()
The format for date fields in the data source.
|
String |
getIndexFieldName()
The name of the index field to map to the data source field.
|
int |
hashCode() |
void |
marshall(ProtocolMarshaller protocolMarshaller)
Marshalls this structured data using the given
ProtocolMarshaller . |
void |
setDataSourceFieldName(String dataSourceFieldName)
The name of the field in the data source.
|
void |
setDateFieldFormat(String dateFieldFormat)
The format for date fields in the data source.
|
void |
setIndexFieldName(String indexFieldName)
The name of the index field to map to the data source field.
|
String |
toString()
Returns a string representation of this object.
|
DataSourceToIndexFieldMapping |
withDataSourceFieldName(String dataSourceFieldName)
The name of the field in the data source.
|
DataSourceToIndexFieldMapping |
withDateFieldFormat(String dateFieldFormat)
The format for date fields in the data source.
|
DataSourceToIndexFieldMapping |
withIndexFieldName(String indexFieldName)
The name of the index field to map to the data source field.
|
public void setDataSourceFieldName(String dataSourceFieldName)
The name of the field in the data source. You must first create the index field using the
UpdateIndex
API.
dataSourceFieldName
- The name of the field in the data source. You must first create the index field using the
UpdateIndex
API.public String getDataSourceFieldName()
The name of the field in the data source. You must first create the index field using the
UpdateIndex
API.
UpdateIndex
API.public DataSourceToIndexFieldMapping withDataSourceFieldName(String dataSourceFieldName)
The name of the field in the data source. You must first create the index field using the
UpdateIndex
API.
dataSourceFieldName
- The name of the field in the data source. You must first create the index field using the
UpdateIndex
API.public void setDateFieldFormat(String dateFieldFormat)
The format for date fields in the data source. If the field specified in DataSourceFieldName
is a
date field, you must specify the date format. If the field is not a date field, an exception is thrown.
dateFieldFormat
- The format for date fields in the data source. If the field specified in DataSourceFieldName
is a date field, you must specify the date format. If the field is not a date field, an exception is
thrown.public String getDateFieldFormat()
The format for date fields in the data source. If the field specified in DataSourceFieldName
is a
date field, you must specify the date format. If the field is not a date field, an exception is thrown.
DataSourceFieldName
is a date field, you must specify the date format. If the field is not a date field, an exception is
thrown.public DataSourceToIndexFieldMapping withDateFieldFormat(String dateFieldFormat)
The format for date fields in the data source. If the field specified in DataSourceFieldName
is a
date field, you must specify the date format. If the field is not a date field, an exception is thrown.
dateFieldFormat
- The format for date fields in the data source. If the field specified in DataSourceFieldName
is a date field, you must specify the date format. If the field is not a date field, an exception is
thrown.public void setIndexFieldName(String indexFieldName)
The name of the index field to map to the data source field. The index field type must match the data source field type.
indexFieldName
- The name of the index field to map to the data source field. The index field type must match the data
source field type.public String getIndexFieldName()
The name of the index field to map to the data source field. The index field type must match the data source field type.
public DataSourceToIndexFieldMapping withIndexFieldName(String indexFieldName)
The name of the index field to map to the data source field. The index field type must match the data source field type.
indexFieldName
- The name of the index field to map to the data source field. The index field type must match the data
source field type.public String toString()
toString
in class Object
Object.toString()
public DataSourceToIndexFieldMapping clone()
public void marshall(ProtocolMarshaller protocolMarshaller)
StructuredPojo
ProtocolMarshaller
.marshall
in interface StructuredPojo
protocolMarshaller
- Implementation of ProtocolMarshaller
used to marshall this object's data.