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

The condition used for the target document attribute or metadata field when * ingesting documents into Amazon Kendra. You use this with DocumentAttributeTarget * to apply the condition.

For example, you can create the 'Department' * target field and have it prefill department names associated with the documents * based on information in the 'Source_URI' field. Set the condition that if the * 'Source_URI' field contains 'financial' in its URI value, then prefill the * target field 'Department' with the target value 'Finance' for the document.

*

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.

See * Also:

AWS * API Reference

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

The identifier of the document attribute used for the condition.

For * example, 'Source_URI' could be an identifier for the attribute or metadata field * that contains source URIs associated with the documents.

Amazon Kendra * currently does not support _document_body as an attribute key used * for the condition.

*/ inline const Aws::String& GetConditionDocumentAttributeKey() const{ return m_conditionDocumentAttributeKey; } /** *

The identifier of the document attribute used for the condition.

For * example, 'Source_URI' could be an identifier for the attribute or metadata field * that contains source URIs associated with the documents.

Amazon Kendra * currently does not support _document_body as an attribute key used * for the condition.

*/ inline bool ConditionDocumentAttributeKeyHasBeenSet() const { return m_conditionDocumentAttributeKeyHasBeenSet; } /** *

The identifier of the document attribute used for the condition.

For * example, 'Source_URI' could be an identifier for the attribute or metadata field * that contains source URIs associated with the documents.

Amazon Kendra * currently does not support _document_body as an attribute key used * for the condition.

*/ inline void SetConditionDocumentAttributeKey(const Aws::String& value) { m_conditionDocumentAttributeKeyHasBeenSet = true; m_conditionDocumentAttributeKey = value; } /** *

The identifier of the document attribute used for the condition.

For * example, 'Source_URI' could be an identifier for the attribute or metadata field * that contains source URIs associated with the documents.

Amazon Kendra * currently does not support _document_body as an attribute key used * for the condition.

*/ inline void SetConditionDocumentAttributeKey(Aws::String&& value) { m_conditionDocumentAttributeKeyHasBeenSet = true; m_conditionDocumentAttributeKey = std::move(value); } /** *

The identifier of the document attribute used for the condition.

For * example, 'Source_URI' could be an identifier for the attribute or metadata field * that contains source URIs associated with the documents.

Amazon Kendra * currently does not support _document_body as an attribute key used * for the condition.

*/ inline void SetConditionDocumentAttributeKey(const char* value) { m_conditionDocumentAttributeKeyHasBeenSet = true; m_conditionDocumentAttributeKey.assign(value); } /** *

The identifier of the document attribute used for the condition.

For * example, 'Source_URI' could be an identifier for the attribute or metadata field * that contains source URIs associated with the documents.

Amazon Kendra * currently does not support _document_body as an attribute key used * for the condition.

*/ inline DocumentAttributeCondition& WithConditionDocumentAttributeKey(const Aws::String& value) { SetConditionDocumentAttributeKey(value); return *this;} /** *

The identifier of the document attribute used for the condition.

For * example, 'Source_URI' could be an identifier for the attribute or metadata field * that contains source URIs associated with the documents.

Amazon Kendra * currently does not support _document_body as an attribute key used * for the condition.

*/ inline DocumentAttributeCondition& WithConditionDocumentAttributeKey(Aws::String&& value) { SetConditionDocumentAttributeKey(std::move(value)); return *this;} /** *

The identifier of the document attribute used for the condition.

For * example, 'Source_URI' could be an identifier for the attribute or metadata field * that contains source URIs associated with the documents.

Amazon Kendra * currently does not support _document_body as an attribute key used * for the condition.

*/ inline DocumentAttributeCondition& WithConditionDocumentAttributeKey(const char* value) { SetConditionDocumentAttributeKey(value); return *this;} /** *

The condition operator.

For example, you can use 'Contains' to * partially match a string.

*/ inline const ConditionOperator& GetOperator() const{ return m_operator; } /** *

The condition operator.

For example, you can use 'Contains' to * partially match a string.

*/ inline bool OperatorHasBeenSet() const { return m_operatorHasBeenSet; } /** *

The condition operator.

For example, you can use 'Contains' to * partially match a string.

*/ inline void SetOperator(const ConditionOperator& value) { m_operatorHasBeenSet = true; m_operator = value; } /** *

The condition operator.

For example, you can use 'Contains' to * partially match a string.

*/ inline void SetOperator(ConditionOperator&& value) { m_operatorHasBeenSet = true; m_operator = std::move(value); } /** *

The condition operator.

For example, you can use 'Contains' to * partially match a string.

*/ inline DocumentAttributeCondition& WithOperator(const ConditionOperator& value) { SetOperator(value); return *this;} /** *

The condition operator.

For example, you can use 'Contains' to * partially match a string.

*/ inline DocumentAttributeCondition& WithOperator(ConditionOperator&& value) { SetOperator(std::move(value)); return *this;} /** *

The value used by the operator.

For example, you can specify the value * 'financial' for strings in the 'Source_URI' field that partially match or * contain this value.

*/ inline const DocumentAttributeValue& GetConditionOnValue() const{ return m_conditionOnValue; } /** *

The value used by the operator.

For example, you can specify the value * 'financial' for strings in the 'Source_URI' field that partially match or * contain this value.

*/ inline bool ConditionOnValueHasBeenSet() const { return m_conditionOnValueHasBeenSet; } /** *

The value used by the operator.

For example, you can specify the value * 'financial' for strings in the 'Source_URI' field that partially match or * contain this value.

*/ inline void SetConditionOnValue(const DocumentAttributeValue& value) { m_conditionOnValueHasBeenSet = true; m_conditionOnValue = value; } /** *

The value used by the operator.

For example, you can specify the value * 'financial' for strings in the 'Source_URI' field that partially match or * contain this value.

*/ inline void SetConditionOnValue(DocumentAttributeValue&& value) { m_conditionOnValueHasBeenSet = true; m_conditionOnValue = std::move(value); } /** *

The value used by the operator.

For example, you can specify the value * 'financial' for strings in the 'Source_URI' field that partially match or * contain this value.

*/ inline DocumentAttributeCondition& WithConditionOnValue(const DocumentAttributeValue& value) { SetConditionOnValue(value); return *this;} /** *

The value used by the operator.

For example, you can specify the value * 'financial' for strings in the 'Source_URI' field that partially match or * contain this value.

*/ inline DocumentAttributeCondition& WithConditionOnValue(DocumentAttributeValue&& value) { SetConditionOnValue(std::move(value)); return *this;} private: Aws::String m_conditionDocumentAttributeKey; bool m_conditionDocumentAttributeKeyHasBeenSet = false; ConditionOperator m_operator; bool m_operatorHasBeenSet = false; DocumentAttributeValue m_conditionOnValue; bool m_conditionOnValueHasBeenSet = false; }; } // namespace Model } // namespace kendra } // namespace Aws