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

The target document attribute or metadata field you want to alter when * ingesting documents into Amazon Kendra.

For example, you can delete * customer identification numbers associated with the documents, stored in the * document metadata field called 'Customer_ID'. You set the target key as * 'Customer_ID' and the deletion flag to TRUE. This removes all * customer ID values in the field 'Customer_ID'. This would scrub personally * identifiable information from each document's metadata.

Amazon Kendra * cannot create a target field if it has not already been created as an index * field. After you create your index field, you can create a document metadata * field using DocumentAttributeTarget. Amazon Kendra then will map * your newly created metadata field to your index field.

You can also use * this with DocumentAttributeCondition.

See * Also:

AWS * API Reference

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

The identifier of the target document attribute or metadata field.

For * example, 'Department' could be an identifier for the target attribute or * metadata field that includes the department names associated with the * documents.

*/ inline const Aws::String& GetTargetDocumentAttributeKey() const{ return m_targetDocumentAttributeKey; } /** *

The identifier of the target document attribute or metadata field.

For * example, 'Department' could be an identifier for the target attribute or * metadata field that includes the department names associated with the * documents.

*/ inline bool TargetDocumentAttributeKeyHasBeenSet() const { return m_targetDocumentAttributeKeyHasBeenSet; } /** *

The identifier of the target document attribute or metadata field.

For * example, 'Department' could be an identifier for the target attribute or * metadata field that includes the department names associated with the * documents.

*/ inline void SetTargetDocumentAttributeKey(const Aws::String& value) { m_targetDocumentAttributeKeyHasBeenSet = true; m_targetDocumentAttributeKey = value; } /** *

The identifier of the target document attribute or metadata field.

For * example, 'Department' could be an identifier for the target attribute or * metadata field that includes the department names associated with the * documents.

*/ inline void SetTargetDocumentAttributeKey(Aws::String&& value) { m_targetDocumentAttributeKeyHasBeenSet = true; m_targetDocumentAttributeKey = std::move(value); } /** *

The identifier of the target document attribute or metadata field.

For * example, 'Department' could be an identifier for the target attribute or * metadata field that includes the department names associated with the * documents.

*/ inline void SetTargetDocumentAttributeKey(const char* value) { m_targetDocumentAttributeKeyHasBeenSet = true; m_targetDocumentAttributeKey.assign(value); } /** *

The identifier of the target document attribute or metadata field.

For * example, 'Department' could be an identifier for the target attribute or * metadata field that includes the department names associated with the * documents.

*/ inline DocumentAttributeTarget& WithTargetDocumentAttributeKey(const Aws::String& value) { SetTargetDocumentAttributeKey(value); return *this;} /** *

The identifier of the target document attribute or metadata field.

For * example, 'Department' could be an identifier for the target attribute or * metadata field that includes the department names associated with the * documents.

*/ inline DocumentAttributeTarget& WithTargetDocumentAttributeKey(Aws::String&& value) { SetTargetDocumentAttributeKey(std::move(value)); return *this;} /** *

The identifier of the target document attribute or metadata field.

For * example, 'Department' could be an identifier for the target attribute or * metadata field that includes the department names associated with the * documents.

*/ inline DocumentAttributeTarget& WithTargetDocumentAttributeKey(const char* value) { SetTargetDocumentAttributeKey(value); return *this;} /** *

TRUE to delete the existing target value for your specified * target attribute key. You cannot create a target value and set this to * TRUE. To create a target value * (TargetDocumentAttributeValue), set this to FALSE.

*/ inline bool GetTargetDocumentAttributeValueDeletion() const{ return m_targetDocumentAttributeValueDeletion; } /** *

TRUE to delete the existing target value for your specified * target attribute key. You cannot create a target value and set this to * TRUE. To create a target value * (TargetDocumentAttributeValue), set this to FALSE.

*/ inline bool TargetDocumentAttributeValueDeletionHasBeenSet() const { return m_targetDocumentAttributeValueDeletionHasBeenSet; } /** *

TRUE to delete the existing target value for your specified * target attribute key. You cannot create a target value and set this to * TRUE. To create a target value * (TargetDocumentAttributeValue), set this to FALSE.

*/ inline void SetTargetDocumentAttributeValueDeletion(bool value) { m_targetDocumentAttributeValueDeletionHasBeenSet = true; m_targetDocumentAttributeValueDeletion = value; } /** *

TRUE to delete the existing target value for your specified * target attribute key. You cannot create a target value and set this to * TRUE. To create a target value * (TargetDocumentAttributeValue), set this to FALSE.

*/ inline DocumentAttributeTarget& WithTargetDocumentAttributeValueDeletion(bool value) { SetTargetDocumentAttributeValueDeletion(value); return *this;} /** *

The target value you want to create for the target attribute.

For * example, 'Finance' could be the target value for the target attribute key * 'Department'.

*/ inline const DocumentAttributeValue& GetTargetDocumentAttributeValue() const{ return m_targetDocumentAttributeValue; } /** *

The target value you want to create for the target attribute.

For * example, 'Finance' could be the target value for the target attribute key * 'Department'.

*/ inline bool TargetDocumentAttributeValueHasBeenSet() const { return m_targetDocumentAttributeValueHasBeenSet; } /** *

The target value you want to create for the target attribute.

For * example, 'Finance' could be the target value for the target attribute key * 'Department'.

*/ inline void SetTargetDocumentAttributeValue(const DocumentAttributeValue& value) { m_targetDocumentAttributeValueHasBeenSet = true; m_targetDocumentAttributeValue = value; } /** *

The target value you want to create for the target attribute.

For * example, 'Finance' could be the target value for the target attribute key * 'Department'.

*/ inline void SetTargetDocumentAttributeValue(DocumentAttributeValue&& value) { m_targetDocumentAttributeValueHasBeenSet = true; m_targetDocumentAttributeValue = std::move(value); } /** *

The target value you want to create for the target attribute.

For * example, 'Finance' could be the target value for the target attribute key * 'Department'.

*/ inline DocumentAttributeTarget& WithTargetDocumentAttributeValue(const DocumentAttributeValue& value) { SetTargetDocumentAttributeValue(value); return *this;} /** *

The target value you want to create for the target attribute.

For * example, 'Finance' could be the target value for the target attribute key * 'Department'.

*/ inline DocumentAttributeTarget& WithTargetDocumentAttributeValue(DocumentAttributeValue&& value) { SetTargetDocumentAttributeValue(std::move(value)); return *this;} private: Aws::String m_targetDocumentAttributeKey; bool m_targetDocumentAttributeKeyHasBeenSet = false; bool m_targetDocumentAttributeValueDeletion; bool m_targetDocumentAttributeValueDeletionHasBeenSet = false; DocumentAttributeValue m_targetDocumentAttributeValue; bool m_targetDocumentAttributeValueHasBeenSet = false; }; } // namespace Model } // namespace kendra } // namespace Aws