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

A mapping between an AWS resource and an AWS Lambda function. See * CreateEventSourceMapping for details.

See Also:

AWS * API Reference

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

The identifier of the event source mapping.

*/ inline const Aws::String& GetUUID() const{ return m_uUID; } /** *

The identifier of the event source mapping.

*/ inline bool UUIDHasBeenSet() const { return m_uUIDHasBeenSet; } /** *

The identifier of the event source mapping.

*/ inline void SetUUID(const Aws::String& value) { m_uUIDHasBeenSet = true; m_uUID = value; } /** *

The identifier of the event source mapping.

*/ inline void SetUUID(Aws::String&& value) { m_uUIDHasBeenSet = true; m_uUID = std::move(value); } /** *

The identifier of the event source mapping.

*/ inline void SetUUID(const char* value) { m_uUIDHasBeenSet = true; m_uUID.assign(value); } /** *

The identifier of the event source mapping.

*/ inline EventSourceMappingConfiguration& WithUUID(const Aws::String& value) { SetUUID(value); return *this;} /** *

The identifier of the event source mapping.

*/ inline EventSourceMappingConfiguration& WithUUID(Aws::String&& value) { SetUUID(std::move(value)); return *this;} /** *

The identifier of the event source mapping.

*/ inline EventSourceMappingConfiguration& WithUUID(const char* value) { SetUUID(value); return *this;} /** *

The maximum number of items to retrieve in a single batch.

*/ inline int GetBatchSize() const{ return m_batchSize; } /** *

The maximum number of items to retrieve in a single batch.

*/ inline bool BatchSizeHasBeenSet() const { return m_batchSizeHasBeenSet; } /** *

The maximum number of items to retrieve in a single batch.

*/ inline void SetBatchSize(int value) { m_batchSizeHasBeenSet = true; m_batchSize = value; } /** *

The maximum number of items to retrieve in a single batch.

*/ inline EventSourceMappingConfiguration& WithBatchSize(int value) { SetBatchSize(value); return *this;} /** *

(Streams) The maximum amount of time to gather records before invoking the * function, in seconds.

*/ inline int GetMaximumBatchingWindowInSeconds() const{ return m_maximumBatchingWindowInSeconds; } /** *

(Streams) The maximum amount of time to gather records before invoking the * function, in seconds.

*/ inline bool MaximumBatchingWindowInSecondsHasBeenSet() const { return m_maximumBatchingWindowInSecondsHasBeenSet; } /** *

(Streams) The maximum amount of time to gather records before invoking the * function, in seconds.

*/ inline void SetMaximumBatchingWindowInSeconds(int value) { m_maximumBatchingWindowInSecondsHasBeenSet = true; m_maximumBatchingWindowInSeconds = value; } /** *

(Streams) The maximum amount of time to gather records before invoking the * function, in seconds.

*/ inline EventSourceMappingConfiguration& WithMaximumBatchingWindowInSeconds(int value) { SetMaximumBatchingWindowInSeconds(value); return *this;} /** *

(Streams) The number of batches to process from each shard concurrently.

*/ inline int GetParallelizationFactor() const{ return m_parallelizationFactor; } /** *

(Streams) The number of batches to process from each shard concurrently.

*/ inline bool ParallelizationFactorHasBeenSet() const { return m_parallelizationFactorHasBeenSet; } /** *

(Streams) The number of batches to process from each shard concurrently.

*/ inline void SetParallelizationFactor(int value) { m_parallelizationFactorHasBeenSet = true; m_parallelizationFactor = value; } /** *

(Streams) The number of batches to process from each shard concurrently.

*/ inline EventSourceMappingConfiguration& WithParallelizationFactor(int value) { SetParallelizationFactor(value); return *this;} /** *

The Amazon Resource Name (ARN) of the event source.

*/ inline const Aws::String& GetEventSourceArn() const{ return m_eventSourceArn; } /** *

The Amazon Resource Name (ARN) of the event source.

*/ inline bool EventSourceArnHasBeenSet() const { return m_eventSourceArnHasBeenSet; } /** *

The Amazon Resource Name (ARN) of the event source.

*/ inline void SetEventSourceArn(const Aws::String& value) { m_eventSourceArnHasBeenSet = true; m_eventSourceArn = value; } /** *

The Amazon Resource Name (ARN) of the event source.

*/ inline void SetEventSourceArn(Aws::String&& value) { m_eventSourceArnHasBeenSet = true; m_eventSourceArn = std::move(value); } /** *

The Amazon Resource Name (ARN) of the event source.

*/ inline void SetEventSourceArn(const char* value) { m_eventSourceArnHasBeenSet = true; m_eventSourceArn.assign(value); } /** *

The Amazon Resource Name (ARN) of the event source.

*/ inline EventSourceMappingConfiguration& WithEventSourceArn(const Aws::String& value) { SetEventSourceArn(value); return *this;} /** *

The Amazon Resource Name (ARN) of the event source.

*/ inline EventSourceMappingConfiguration& WithEventSourceArn(Aws::String&& value) { SetEventSourceArn(std::move(value)); return *this;} /** *

The Amazon Resource Name (ARN) of the event source.

*/ inline EventSourceMappingConfiguration& WithEventSourceArn(const char* value) { SetEventSourceArn(value); return *this;} /** *

The ARN of the Lambda function.

*/ inline const Aws::String& GetFunctionArn() const{ return m_functionArn; } /** *

The ARN of the Lambda function.

*/ inline bool FunctionArnHasBeenSet() const { return m_functionArnHasBeenSet; } /** *

The ARN of the Lambda function.

*/ inline void SetFunctionArn(const Aws::String& value) { m_functionArnHasBeenSet = true; m_functionArn = value; } /** *

The ARN of the Lambda function.

*/ inline void SetFunctionArn(Aws::String&& value) { m_functionArnHasBeenSet = true; m_functionArn = std::move(value); } /** *

The ARN of the Lambda function.

*/ inline void SetFunctionArn(const char* value) { m_functionArnHasBeenSet = true; m_functionArn.assign(value); } /** *

The ARN of the Lambda function.

*/ inline EventSourceMappingConfiguration& WithFunctionArn(const Aws::String& value) { SetFunctionArn(value); return *this;} /** *

The ARN of the Lambda function.

*/ inline EventSourceMappingConfiguration& WithFunctionArn(Aws::String&& value) { SetFunctionArn(std::move(value)); return *this;} /** *

The ARN of the Lambda function.

*/ inline EventSourceMappingConfiguration& WithFunctionArn(const char* value) { SetFunctionArn(value); return *this;} /** *

The date that the event source mapping was last updated, or its state * changed.

*/ inline const Aws::Utils::DateTime& GetLastModified() const{ return m_lastModified; } /** *

The date that the event source mapping was last updated, or its state * changed.

*/ inline bool LastModifiedHasBeenSet() const { return m_lastModifiedHasBeenSet; } /** *

The date that the event source mapping was last updated, or its state * changed.

*/ inline void SetLastModified(const Aws::Utils::DateTime& value) { m_lastModifiedHasBeenSet = true; m_lastModified = value; } /** *

The date that the event source mapping was last updated, or its state * changed.

*/ inline void SetLastModified(Aws::Utils::DateTime&& value) { m_lastModifiedHasBeenSet = true; m_lastModified = std::move(value); } /** *

The date that the event source mapping was last updated, or its state * changed.

*/ inline EventSourceMappingConfiguration& WithLastModified(const Aws::Utils::DateTime& value) { SetLastModified(value); return *this;} /** *

The date that the event source mapping was last updated, or its state * changed.

*/ inline EventSourceMappingConfiguration& WithLastModified(Aws::Utils::DateTime&& value) { SetLastModified(std::move(value)); return *this;} /** *

The result of the last AWS Lambda invocation of your Lambda function.

*/ inline const Aws::String& GetLastProcessingResult() const{ return m_lastProcessingResult; } /** *

The result of the last AWS Lambda invocation of your Lambda function.

*/ inline bool LastProcessingResultHasBeenSet() const { return m_lastProcessingResultHasBeenSet; } /** *

The result of the last AWS Lambda invocation of your Lambda function.

*/ inline void SetLastProcessingResult(const Aws::String& value) { m_lastProcessingResultHasBeenSet = true; m_lastProcessingResult = value; } /** *

The result of the last AWS Lambda invocation of your Lambda function.

*/ inline void SetLastProcessingResult(Aws::String&& value) { m_lastProcessingResultHasBeenSet = true; m_lastProcessingResult = std::move(value); } /** *

The result of the last AWS Lambda invocation of your Lambda function.

*/ inline void SetLastProcessingResult(const char* value) { m_lastProcessingResultHasBeenSet = true; m_lastProcessingResult.assign(value); } /** *

The result of the last AWS Lambda invocation of your Lambda function.

*/ inline EventSourceMappingConfiguration& WithLastProcessingResult(const Aws::String& value) { SetLastProcessingResult(value); return *this;} /** *

The result of the last AWS Lambda invocation of your Lambda function.

*/ inline EventSourceMappingConfiguration& WithLastProcessingResult(Aws::String&& value) { SetLastProcessingResult(std::move(value)); return *this;} /** *

The result of the last AWS Lambda invocation of your Lambda function.

*/ inline EventSourceMappingConfiguration& WithLastProcessingResult(const char* value) { SetLastProcessingResult(value); return *this;} /** *

The state of the event source mapping. It can be one of the following: * Creating, Enabling, Enabled, * Disabling, Disabled, Updating, or * Deleting.

*/ inline const Aws::String& GetState() const{ return m_state; } /** *

The state of the event source mapping. It can be one of the following: * Creating, Enabling, Enabled, * Disabling, Disabled, Updating, or * Deleting.

*/ inline bool StateHasBeenSet() const { return m_stateHasBeenSet; } /** *

The state of the event source mapping. It can be one of the following: * Creating, Enabling, Enabled, * Disabling, Disabled, Updating, or * Deleting.

*/ inline void SetState(const Aws::String& value) { m_stateHasBeenSet = true; m_state = value; } /** *

The state of the event source mapping. It can be one of the following: * Creating, Enabling, Enabled, * Disabling, Disabled, Updating, or * Deleting.

*/ inline void SetState(Aws::String&& value) { m_stateHasBeenSet = true; m_state = std::move(value); } /** *

The state of the event source mapping. It can be one of the following: * Creating, Enabling, Enabled, * Disabling, Disabled, Updating, or * Deleting.

*/ inline void SetState(const char* value) { m_stateHasBeenSet = true; m_state.assign(value); } /** *

The state of the event source mapping. It can be one of the following: * Creating, Enabling, Enabled, * Disabling, Disabled, Updating, or * Deleting.

*/ inline EventSourceMappingConfiguration& WithState(const Aws::String& value) { SetState(value); return *this;} /** *

The state of the event source mapping. It can be one of the following: * Creating, Enabling, Enabled, * Disabling, Disabled, Updating, or * Deleting.

*/ inline EventSourceMappingConfiguration& WithState(Aws::String&& value) { SetState(std::move(value)); return *this;} /** *

The state of the event source mapping. It can be one of the following: * Creating, Enabling, Enabled, * Disabling, Disabled, Updating, or * Deleting.

*/ inline EventSourceMappingConfiguration& WithState(const char* value) { SetState(value); return *this;} /** *

Indicates whether the last change to the event source mapping was made by a * user, or by the Lambda service.

*/ inline const Aws::String& GetStateTransitionReason() const{ return m_stateTransitionReason; } /** *

Indicates whether the last change to the event source mapping was made by a * user, or by the Lambda service.

*/ inline bool StateTransitionReasonHasBeenSet() const { return m_stateTransitionReasonHasBeenSet; } /** *

Indicates whether the last change to the event source mapping was made by a * user, or by the Lambda service.

*/ inline void SetStateTransitionReason(const Aws::String& value) { m_stateTransitionReasonHasBeenSet = true; m_stateTransitionReason = value; } /** *

Indicates whether the last change to the event source mapping was made by a * user, or by the Lambda service.

*/ inline void SetStateTransitionReason(Aws::String&& value) { m_stateTransitionReasonHasBeenSet = true; m_stateTransitionReason = std::move(value); } /** *

Indicates whether the last change to the event source mapping was made by a * user, or by the Lambda service.

*/ inline void SetStateTransitionReason(const char* value) { m_stateTransitionReasonHasBeenSet = true; m_stateTransitionReason.assign(value); } /** *

Indicates whether the last change to the event source mapping was made by a * user, or by the Lambda service.

*/ inline EventSourceMappingConfiguration& WithStateTransitionReason(const Aws::String& value) { SetStateTransitionReason(value); return *this;} /** *

Indicates whether the last change to the event source mapping was made by a * user, or by the Lambda service.

*/ inline EventSourceMappingConfiguration& WithStateTransitionReason(Aws::String&& value) { SetStateTransitionReason(std::move(value)); return *this;} /** *

Indicates whether the last change to the event source mapping was made by a * user, or by the Lambda service.

*/ inline EventSourceMappingConfiguration& WithStateTransitionReason(const char* value) { SetStateTransitionReason(value); return *this;} /** *

(Streams) An Amazon SQS queue or Amazon SNS topic destination for discarded * records.

*/ inline const DestinationConfig& GetDestinationConfig() const{ return m_destinationConfig; } /** *

(Streams) An Amazon SQS queue or Amazon SNS topic destination for discarded * records.

*/ inline bool DestinationConfigHasBeenSet() const { return m_destinationConfigHasBeenSet; } /** *

(Streams) An Amazon SQS queue or Amazon SNS topic destination for discarded * records.

*/ inline void SetDestinationConfig(const DestinationConfig& value) { m_destinationConfigHasBeenSet = true; m_destinationConfig = value; } /** *

(Streams) An Amazon SQS queue or Amazon SNS topic destination for discarded * records.

*/ inline void SetDestinationConfig(DestinationConfig&& value) { m_destinationConfigHasBeenSet = true; m_destinationConfig = std::move(value); } /** *

(Streams) An Amazon SQS queue or Amazon SNS topic destination for discarded * records.

*/ inline EventSourceMappingConfiguration& WithDestinationConfig(const DestinationConfig& value) { SetDestinationConfig(value); return *this;} /** *

(Streams) An Amazon SQS queue or Amazon SNS topic destination for discarded * records.

*/ inline EventSourceMappingConfiguration& WithDestinationConfig(DestinationConfig&& value) { SetDestinationConfig(std::move(value)); return *this;} /** *

(MSK) The name of the Kafka topic.

*/ inline const Aws::Vector& GetTopics() const{ return m_topics; } /** *

(MSK) The name of the Kafka topic.

*/ inline bool TopicsHasBeenSet() const { return m_topicsHasBeenSet; } /** *

(MSK) The name of the Kafka topic.

*/ inline void SetTopics(const Aws::Vector& value) { m_topicsHasBeenSet = true; m_topics = value; } /** *

(MSK) The name of the Kafka topic.

*/ inline void SetTopics(Aws::Vector&& value) { m_topicsHasBeenSet = true; m_topics = std::move(value); } /** *

(MSK) The name of the Kafka topic.

*/ inline EventSourceMappingConfiguration& WithTopics(const Aws::Vector& value) { SetTopics(value); return *this;} /** *

(MSK) The name of the Kafka topic.

*/ inline EventSourceMappingConfiguration& WithTopics(Aws::Vector&& value) { SetTopics(std::move(value)); return *this;} /** *

(MSK) The name of the Kafka topic.

*/ inline EventSourceMappingConfiguration& AddTopics(const Aws::String& value) { m_topicsHasBeenSet = true; m_topics.push_back(value); return *this; } /** *

(MSK) The name of the Kafka topic.

*/ inline EventSourceMappingConfiguration& AddTopics(Aws::String&& value) { m_topicsHasBeenSet = true; m_topics.push_back(std::move(value)); return *this; } /** *

(MSK) The name of the Kafka topic.

*/ inline EventSourceMappingConfiguration& AddTopics(const char* value) { m_topicsHasBeenSet = true; m_topics.push_back(value); return *this; } /** *

(Streams) The maximum age of a record that Lambda sends to a function for * processing.

*/ inline int GetMaximumRecordAgeInSeconds() const{ return m_maximumRecordAgeInSeconds; } /** *

(Streams) The maximum age of a record that Lambda sends to a function for * processing.

*/ inline bool MaximumRecordAgeInSecondsHasBeenSet() const { return m_maximumRecordAgeInSecondsHasBeenSet; } /** *

(Streams) The maximum age of a record that Lambda sends to a function for * processing.

*/ inline void SetMaximumRecordAgeInSeconds(int value) { m_maximumRecordAgeInSecondsHasBeenSet = true; m_maximumRecordAgeInSeconds = value; } /** *

(Streams) The maximum age of a record that Lambda sends to a function for * processing.

*/ inline EventSourceMappingConfiguration& WithMaximumRecordAgeInSeconds(int value) { SetMaximumRecordAgeInSeconds(value); return *this;} /** *

(Streams) If the function returns an error, split the batch in two and * retry.

*/ inline bool GetBisectBatchOnFunctionError() const{ return m_bisectBatchOnFunctionError; } /** *

(Streams) If the function returns an error, split the batch in two and * retry.

*/ inline bool BisectBatchOnFunctionErrorHasBeenSet() const { return m_bisectBatchOnFunctionErrorHasBeenSet; } /** *

(Streams) If the function returns an error, split the batch in two and * retry.

*/ inline void SetBisectBatchOnFunctionError(bool value) { m_bisectBatchOnFunctionErrorHasBeenSet = true; m_bisectBatchOnFunctionError = value; } /** *

(Streams) If the function returns an error, split the batch in two and * retry.

*/ inline EventSourceMappingConfiguration& WithBisectBatchOnFunctionError(bool value) { SetBisectBatchOnFunctionError(value); return *this;} /** *

(Streams) The maximum number of times to retry when the function returns an * error.

*/ inline int GetMaximumRetryAttempts() const{ return m_maximumRetryAttempts; } /** *

(Streams) The maximum number of times to retry when the function returns an * error.

*/ inline bool MaximumRetryAttemptsHasBeenSet() const { return m_maximumRetryAttemptsHasBeenSet; } /** *

(Streams) The maximum number of times to retry when the function returns an * error.

*/ inline void SetMaximumRetryAttempts(int value) { m_maximumRetryAttemptsHasBeenSet = true; m_maximumRetryAttempts = value; } /** *

(Streams) The maximum number of times to retry when the function returns an * error.

*/ inline EventSourceMappingConfiguration& WithMaximumRetryAttempts(int value) { SetMaximumRetryAttempts(value); return *this;} private: Aws::String m_uUID; bool m_uUIDHasBeenSet; int m_batchSize; bool m_batchSizeHasBeenSet; int m_maximumBatchingWindowInSeconds; bool m_maximumBatchingWindowInSecondsHasBeenSet; int m_parallelizationFactor; bool m_parallelizationFactorHasBeenSet; Aws::String m_eventSourceArn; bool m_eventSourceArnHasBeenSet; Aws::String m_functionArn; bool m_functionArnHasBeenSet; Aws::Utils::DateTime m_lastModified; bool m_lastModifiedHasBeenSet; Aws::String m_lastProcessingResult; bool m_lastProcessingResultHasBeenSet; Aws::String m_state; bool m_stateHasBeenSet; Aws::String m_stateTransitionReason; bool m_stateTransitionReasonHasBeenSet; DestinationConfig m_destinationConfig; bool m_destinationConfigHasBeenSet; Aws::Vector m_topics; bool m_topicsHasBeenSet; int m_maximumRecordAgeInSeconds; bool m_maximumRecordAgeInSecondsHasBeenSet; bool m_bisectBatchOnFunctionError; bool m_bisectBatchOnFunctionErrorHasBeenSet; int m_maximumRetryAttempts; bool m_maximumRetryAttemptsHasBeenSet; }; } // namespace Model } // namespace Lambda } // namespace Aws