/** * 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 { /** *

Provides the configuration information for invoking a Lambda function in * Lambda to alter document metadata and content when ingesting documents into * Amazon Kendra. You can configure your Lambda function using PreExtractionHookConfiguration * if you want to apply advanced alterations on the original or raw documents. If * you want to apply advanced alterations on the Amazon Kendra structured * documents, you must configure your Lambda function using PostExtractionHookConfiguration. * You can only invoke one Lambda function. However, this function can invoke other * functions it requires.

For more information, see Customizing * document metadata during the ingestion process.

See Also:

* AWS * API Reference

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

The condition used for when a Lambda function should be invoked.

For * example, you can specify a condition that if there are empty date-time values, * then Amazon Kendra should invoke a function that inserts the current * date-time.

*/ inline const DocumentAttributeCondition& GetInvocationCondition() const{ return m_invocationCondition; } /** *

The condition used for when a Lambda function should be invoked.

For * example, you can specify a condition that if there are empty date-time values, * then Amazon Kendra should invoke a function that inserts the current * date-time.

*/ inline bool InvocationConditionHasBeenSet() const { return m_invocationConditionHasBeenSet; } /** *

The condition used for when a Lambda function should be invoked.

For * example, you can specify a condition that if there are empty date-time values, * then Amazon Kendra should invoke a function that inserts the current * date-time.

*/ inline void SetInvocationCondition(const DocumentAttributeCondition& value) { m_invocationConditionHasBeenSet = true; m_invocationCondition = value; } /** *

The condition used for when a Lambda function should be invoked.

For * example, you can specify a condition that if there are empty date-time values, * then Amazon Kendra should invoke a function that inserts the current * date-time.

*/ inline void SetInvocationCondition(DocumentAttributeCondition&& value) { m_invocationConditionHasBeenSet = true; m_invocationCondition = std::move(value); } /** *

The condition used for when a Lambda function should be invoked.

For * example, you can specify a condition that if there are empty date-time values, * then Amazon Kendra should invoke a function that inserts the current * date-time.

*/ inline HookConfiguration& WithInvocationCondition(const DocumentAttributeCondition& value) { SetInvocationCondition(value); return *this;} /** *

The condition used for when a Lambda function should be invoked.

For * example, you can specify a condition that if there are empty date-time values, * then Amazon Kendra should invoke a function that inserts the current * date-time.

*/ inline HookConfiguration& WithInvocationCondition(DocumentAttributeCondition&& value) { SetInvocationCondition(std::move(value)); return *this;} /** *

The Amazon Resource Name (ARN) of a role with permission to run a Lambda * function during ingestion. For more information, see IAM roles for * Amazon Kendra.

*/ inline const Aws::String& GetLambdaArn() const{ return m_lambdaArn; } /** *

The Amazon Resource Name (ARN) of a role with permission to run a Lambda * function during ingestion. For more information, see IAM roles for * Amazon Kendra.

*/ inline bool LambdaArnHasBeenSet() const { return m_lambdaArnHasBeenSet; } /** *

The Amazon Resource Name (ARN) of a role with permission to run a Lambda * function during ingestion. For more information, see IAM roles for * Amazon Kendra.

*/ inline void SetLambdaArn(const Aws::String& value) { m_lambdaArnHasBeenSet = true; m_lambdaArn = value; } /** *

The Amazon Resource Name (ARN) of a role with permission to run a Lambda * function during ingestion. For more information, see IAM roles for * Amazon Kendra.

*/ inline void SetLambdaArn(Aws::String&& value) { m_lambdaArnHasBeenSet = true; m_lambdaArn = std::move(value); } /** *

The Amazon Resource Name (ARN) of a role with permission to run a Lambda * function during ingestion. For more information, see IAM roles for * Amazon Kendra.

*/ inline void SetLambdaArn(const char* value) { m_lambdaArnHasBeenSet = true; m_lambdaArn.assign(value); } /** *

The Amazon Resource Name (ARN) of a role with permission to run a Lambda * function during ingestion. For more information, see IAM roles for * Amazon Kendra.

*/ inline HookConfiguration& WithLambdaArn(const Aws::String& value) { SetLambdaArn(value); return *this;} /** *

The Amazon Resource Name (ARN) of a role with permission to run a Lambda * function during ingestion. For more information, see IAM roles for * Amazon Kendra.

*/ inline HookConfiguration& WithLambdaArn(Aws::String&& value) { SetLambdaArn(std::move(value)); return *this;} /** *

The Amazon Resource Name (ARN) of a role with permission to run a Lambda * function during ingestion. For more information, see IAM roles for * Amazon Kendra.

*/ inline HookConfiguration& WithLambdaArn(const char* value) { SetLambdaArn(value); return *this;} /** *

Stores the original, raw documents or the structured, parsed documents before * and after altering them. For more information, see Data * contracts for Lambda functions.

*/ inline const Aws::String& GetS3Bucket() const{ return m_s3Bucket; } /** *

Stores the original, raw documents or the structured, parsed documents before * and after altering them. For more information, see Data * contracts for Lambda functions.

*/ inline bool S3BucketHasBeenSet() const { return m_s3BucketHasBeenSet; } /** *

Stores the original, raw documents or the structured, parsed documents before * and after altering them. For more information, see Data * contracts for Lambda functions.

*/ inline void SetS3Bucket(const Aws::String& value) { m_s3BucketHasBeenSet = true; m_s3Bucket = value; } /** *

Stores the original, raw documents or the structured, parsed documents before * and after altering them. For more information, see Data * contracts for Lambda functions.

*/ inline void SetS3Bucket(Aws::String&& value) { m_s3BucketHasBeenSet = true; m_s3Bucket = std::move(value); } /** *

Stores the original, raw documents or the structured, parsed documents before * and after altering them. For more information, see Data * contracts for Lambda functions.

*/ inline void SetS3Bucket(const char* value) { m_s3BucketHasBeenSet = true; m_s3Bucket.assign(value); } /** *

Stores the original, raw documents or the structured, parsed documents before * and after altering them. For more information, see Data * contracts for Lambda functions.

*/ inline HookConfiguration& WithS3Bucket(const Aws::String& value) { SetS3Bucket(value); return *this;} /** *

Stores the original, raw documents or the structured, parsed documents before * and after altering them. For more information, see Data * contracts for Lambda functions.

*/ inline HookConfiguration& WithS3Bucket(Aws::String&& value) { SetS3Bucket(std::move(value)); return *this;} /** *

Stores the original, raw documents or the structured, parsed documents before * and after altering them. For more information, see Data * contracts for Lambda functions.

*/ inline HookConfiguration& WithS3Bucket(const char* value) { SetS3Bucket(value); return *this;} private: DocumentAttributeCondition m_invocationCondition; bool m_invocationConditionHasBeenSet = false; Aws::String m_lambdaArn; bool m_lambdaArnHasBeenSet = false; Aws::String m_s3Bucket; bool m_s3BucketHasBeenSet = false; }; } // namespace Model } // namespace kendra } // namespace Aws