/** * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. * SPDX-License-Identifier: Apache-2.0. */ #pragma once #include #include #include namespace Aws { namespace Utils { namespace Json { class JsonValue; class JsonView; } // namespace Json } // namespace Utils namespace kendra { namespace Model { /** *

Maps a column or attribute in the data source to an index field. You must * first create the fields in the index using the UpdateIndex * API.

See Also:

AWS * API Reference

*/ class DataSourceToIndexFieldMapping { public: AWS_KENDRA_API DataSourceToIndexFieldMapping(); AWS_KENDRA_API DataSourceToIndexFieldMapping(Aws::Utils::Json::JsonView jsonValue); AWS_KENDRA_API DataSourceToIndexFieldMapping& operator=(Aws::Utils::Json::JsonView jsonValue); AWS_KENDRA_API Aws::Utils::Json::JsonValue Jsonize() const; /** *

The name of the column or attribute in the data source.

*/ inline const Aws::String& GetDataSourceFieldName() const{ return m_dataSourceFieldName; } /** *

The name of the column or attribute in the data source.

*/ inline bool DataSourceFieldNameHasBeenSet() const { return m_dataSourceFieldNameHasBeenSet; } /** *

The name of the column or attribute in the data source.

*/ inline void SetDataSourceFieldName(const Aws::String& value) { m_dataSourceFieldNameHasBeenSet = true; m_dataSourceFieldName = value; } /** *

The name of the column or attribute in the data source.

*/ inline void SetDataSourceFieldName(Aws::String&& value) { m_dataSourceFieldNameHasBeenSet = true; m_dataSourceFieldName = std::move(value); } /** *

The name of the column or attribute in the data source.

*/ inline void SetDataSourceFieldName(const char* value) { m_dataSourceFieldNameHasBeenSet = true; m_dataSourceFieldName.assign(value); } /** *

The name of the column or attribute in the data source.

*/ inline DataSourceToIndexFieldMapping& WithDataSourceFieldName(const Aws::String& value) { SetDataSourceFieldName(value); return *this;} /** *

The name of the column or attribute in the data source.

*/ inline DataSourceToIndexFieldMapping& WithDataSourceFieldName(Aws::String&& value) { SetDataSourceFieldName(std::move(value)); return *this;} /** *

The name of the column or attribute in the data source.

*/ inline DataSourceToIndexFieldMapping& WithDataSourceFieldName(const char* value) { SetDataSourceFieldName(value); return *this;} /** *

The type of data stored in the column or attribute.

*/ inline const Aws::String& GetDateFieldFormat() const{ return m_dateFieldFormat; } /** *

The type of data stored in the column or attribute.

*/ inline bool DateFieldFormatHasBeenSet() const { return m_dateFieldFormatHasBeenSet; } /** *

The type of data stored in the column or attribute.

*/ inline void SetDateFieldFormat(const Aws::String& value) { m_dateFieldFormatHasBeenSet = true; m_dateFieldFormat = value; } /** *

The type of data stored in the column or attribute.

*/ inline void SetDateFieldFormat(Aws::String&& value) { m_dateFieldFormatHasBeenSet = true; m_dateFieldFormat = std::move(value); } /** *

The type of data stored in the column or attribute.

*/ inline void SetDateFieldFormat(const char* value) { m_dateFieldFormatHasBeenSet = true; m_dateFieldFormat.assign(value); } /** *

The type of data stored in the column or attribute.

*/ inline DataSourceToIndexFieldMapping& WithDateFieldFormat(const Aws::String& value) { SetDateFieldFormat(value); return *this;} /** *

The type of data stored in the column or attribute.

*/ inline DataSourceToIndexFieldMapping& WithDateFieldFormat(Aws::String&& value) { SetDateFieldFormat(std::move(value)); return *this;} /** *

The type of data stored in the column or attribute.

*/ inline DataSourceToIndexFieldMapping& WithDateFieldFormat(const char* value) { SetDateFieldFormat(value); return *this;} /** *

The name of the field in the index.

*/ inline const Aws::String& GetIndexFieldName() const{ return m_indexFieldName; } /** *

The name of the field in the index.

*/ inline bool IndexFieldNameHasBeenSet() const { return m_indexFieldNameHasBeenSet; } /** *

The name of the field in the index.

*/ inline void SetIndexFieldName(const Aws::String& value) { m_indexFieldNameHasBeenSet = true; m_indexFieldName = value; } /** *

The name of the field in the index.

*/ inline void SetIndexFieldName(Aws::String&& value) { m_indexFieldNameHasBeenSet = true; m_indexFieldName = std::move(value); } /** *

The name of the field in the index.

*/ inline void SetIndexFieldName(const char* value) { m_indexFieldNameHasBeenSet = true; m_indexFieldName.assign(value); } /** *

The name of the field in the index.

*/ inline DataSourceToIndexFieldMapping& WithIndexFieldName(const Aws::String& value) { SetIndexFieldName(value); return *this;} /** *

The name of the field in the index.

*/ inline DataSourceToIndexFieldMapping& WithIndexFieldName(Aws::String&& value) { SetIndexFieldName(std::move(value)); return *this;} /** *

The name of the field in the index.

*/ inline DataSourceToIndexFieldMapping& WithIndexFieldName(const char* value) { SetIndexFieldName(value); return *this;} private: Aws::String m_dataSourceFieldName; bool m_dataSourceFieldNameHasBeenSet = false; Aws::String m_dateFieldFormat; bool m_dateFieldFormatHasBeenSet = false; Aws::String m_indexFieldName; bool m_indexFieldNameHasBeenSet = false; }; } // namespace Model } // namespace kendra } // namespace Aws