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

An action to be performed when the condition is * TRUE.

See Also:

AWS * API Reference

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

Sets a variable to a specified value.

*/ inline const SetVariableAction& GetSetVariable() const{ return m_setVariable; } /** *

Sets a variable to a specified value.

*/ inline bool SetVariableHasBeenSet() const { return m_setVariableHasBeenSet; } /** *

Sets a variable to a specified value.

*/ inline void SetSetVariable(const SetVariableAction& value) { m_setVariableHasBeenSet = true; m_setVariable = value; } /** *

Sets a variable to a specified value.

*/ inline void SetSetVariable(SetVariableAction&& value) { m_setVariableHasBeenSet = true; m_setVariable = std::move(value); } /** *

Sets a variable to a specified value.

*/ inline Action& WithSetVariable(const SetVariableAction& value) { SetSetVariable(value); return *this;} /** *

Sets a variable to a specified value.

*/ inline Action& WithSetVariable(SetVariableAction&& value) { SetSetVariable(std::move(value)); return *this;} /** *

Sends an Amazon SNS message.

*/ inline const SNSTopicPublishAction& GetSns() const{ return m_sns; } /** *

Sends an Amazon SNS message.

*/ inline bool SnsHasBeenSet() const { return m_snsHasBeenSet; } /** *

Sends an Amazon SNS message.

*/ inline void SetSns(const SNSTopicPublishAction& value) { m_snsHasBeenSet = true; m_sns = value; } /** *

Sends an Amazon SNS message.

*/ inline void SetSns(SNSTopicPublishAction&& value) { m_snsHasBeenSet = true; m_sns = std::move(value); } /** *

Sends an Amazon SNS message.

*/ inline Action& WithSns(const SNSTopicPublishAction& value) { SetSns(value); return *this;} /** *

Sends an Amazon SNS message.

*/ inline Action& WithSns(SNSTopicPublishAction&& value) { SetSns(std::move(value)); return *this;} /** *

Publishes an MQTT message with the given topic to the AWS IoT message * broker.

*/ inline const IotTopicPublishAction& GetIotTopicPublish() const{ return m_iotTopicPublish; } /** *

Publishes an MQTT message with the given topic to the AWS IoT message * broker.

*/ inline bool IotTopicPublishHasBeenSet() const { return m_iotTopicPublishHasBeenSet; } /** *

Publishes an MQTT message with the given topic to the AWS IoT message * broker.

*/ inline void SetIotTopicPublish(const IotTopicPublishAction& value) { m_iotTopicPublishHasBeenSet = true; m_iotTopicPublish = value; } /** *

Publishes an MQTT message with the given topic to the AWS IoT message * broker.

*/ inline void SetIotTopicPublish(IotTopicPublishAction&& value) { m_iotTopicPublishHasBeenSet = true; m_iotTopicPublish = std::move(value); } /** *

Publishes an MQTT message with the given topic to the AWS IoT message * broker.

*/ inline Action& WithIotTopicPublish(const IotTopicPublishAction& value) { SetIotTopicPublish(value); return *this;} /** *

Publishes an MQTT message with the given topic to the AWS IoT message * broker.

*/ inline Action& WithIotTopicPublish(IotTopicPublishAction&& value) { SetIotTopicPublish(std::move(value)); return *this;} /** *

Information needed to set the timer.

*/ inline const SetTimerAction& GetSetTimer() const{ return m_setTimer; } /** *

Information needed to set the timer.

*/ inline bool SetTimerHasBeenSet() const { return m_setTimerHasBeenSet; } /** *

Information needed to set the timer.

*/ inline void SetSetTimer(const SetTimerAction& value) { m_setTimerHasBeenSet = true; m_setTimer = value; } /** *

Information needed to set the timer.

*/ inline void SetSetTimer(SetTimerAction&& value) { m_setTimerHasBeenSet = true; m_setTimer = std::move(value); } /** *

Information needed to set the timer.

*/ inline Action& WithSetTimer(const SetTimerAction& value) { SetSetTimer(value); return *this;} /** *

Information needed to set the timer.

*/ inline Action& WithSetTimer(SetTimerAction&& value) { SetSetTimer(std::move(value)); return *this;} /** *

Information needed to clear the timer.

*/ inline const ClearTimerAction& GetClearTimer() const{ return m_clearTimer; } /** *

Information needed to clear the timer.

*/ inline bool ClearTimerHasBeenSet() const { return m_clearTimerHasBeenSet; } /** *

Information needed to clear the timer.

*/ inline void SetClearTimer(const ClearTimerAction& value) { m_clearTimerHasBeenSet = true; m_clearTimer = value; } /** *

Information needed to clear the timer.

*/ inline void SetClearTimer(ClearTimerAction&& value) { m_clearTimerHasBeenSet = true; m_clearTimer = std::move(value); } /** *

Information needed to clear the timer.

*/ inline Action& WithClearTimer(const ClearTimerAction& value) { SetClearTimer(value); return *this;} /** *

Information needed to clear the timer.

*/ inline Action& WithClearTimer(ClearTimerAction&& value) { SetClearTimer(std::move(value)); return *this;} /** *

Information needed to reset the timer.

*/ inline const ResetTimerAction& GetResetTimer() const{ return m_resetTimer; } /** *

Information needed to reset the timer.

*/ inline bool ResetTimerHasBeenSet() const { return m_resetTimerHasBeenSet; } /** *

Information needed to reset the timer.

*/ inline void SetResetTimer(const ResetTimerAction& value) { m_resetTimerHasBeenSet = true; m_resetTimer = value; } /** *

Information needed to reset the timer.

*/ inline void SetResetTimer(ResetTimerAction&& value) { m_resetTimerHasBeenSet = true; m_resetTimer = std::move(value); } /** *

Information needed to reset the timer.

*/ inline Action& WithResetTimer(const ResetTimerAction& value) { SetResetTimer(value); return *this;} /** *

Information needed to reset the timer.

*/ inline Action& WithResetTimer(ResetTimerAction&& value) { SetResetTimer(std::move(value)); return *this;} /** *

Calls a Lambda function, passing in information about the detector model * instance and the event that triggered the action.

*/ inline const LambdaAction& GetLambda() const{ return m_lambda; } /** *

Calls a Lambda function, passing in information about the detector model * instance and the event that triggered the action.

*/ inline bool LambdaHasBeenSet() const { return m_lambdaHasBeenSet; } /** *

Calls a Lambda function, passing in information about the detector model * instance and the event that triggered the action.

*/ inline void SetLambda(const LambdaAction& value) { m_lambdaHasBeenSet = true; m_lambda = value; } /** *

Calls a Lambda function, passing in information about the detector model * instance and the event that triggered the action.

*/ inline void SetLambda(LambdaAction&& value) { m_lambdaHasBeenSet = true; m_lambda = std::move(value); } /** *

Calls a Lambda function, passing in information about the detector model * instance and the event that triggered the action.

*/ inline Action& WithLambda(const LambdaAction& value) { SetLambda(value); return *this;} /** *

Calls a Lambda function, passing in information about the detector model * instance and the event that triggered the action.

*/ inline Action& WithLambda(LambdaAction&& value) { SetLambda(std::move(value)); return *this;} /** *

Sends AWS IoT Events input, which passes information about the detector model * instance and the event that triggered the action.

*/ inline const IotEventsAction& GetIotEvents() const{ return m_iotEvents; } /** *

Sends AWS IoT Events input, which passes information about the detector model * instance and the event that triggered the action.

*/ inline bool IotEventsHasBeenSet() const { return m_iotEventsHasBeenSet; } /** *

Sends AWS IoT Events input, which passes information about the detector model * instance and the event that triggered the action.

*/ inline void SetIotEvents(const IotEventsAction& value) { m_iotEventsHasBeenSet = true; m_iotEvents = value; } /** *

Sends AWS IoT Events input, which passes information about the detector model * instance and the event that triggered the action.

*/ inline void SetIotEvents(IotEventsAction&& value) { m_iotEventsHasBeenSet = true; m_iotEvents = std::move(value); } /** *

Sends AWS IoT Events input, which passes information about the detector model * instance and the event that triggered the action.

*/ inline Action& WithIotEvents(const IotEventsAction& value) { SetIotEvents(value); return *this;} /** *

Sends AWS IoT Events input, which passes information about the detector model * instance and the event that triggered the action.

*/ inline Action& WithIotEvents(IotEventsAction&& value) { SetIotEvents(std::move(value)); return *this;} /** *

Sends information about the detector model instance and the event that * triggered the action to an Amazon SQS queue.

*/ inline const SqsAction& GetSqs() const{ return m_sqs; } /** *

Sends information about the detector model instance and the event that * triggered the action to an Amazon SQS queue.

*/ inline bool SqsHasBeenSet() const { return m_sqsHasBeenSet; } /** *

Sends information about the detector model instance and the event that * triggered the action to an Amazon SQS queue.

*/ inline void SetSqs(const SqsAction& value) { m_sqsHasBeenSet = true; m_sqs = value; } /** *

Sends information about the detector model instance and the event that * triggered the action to an Amazon SQS queue.

*/ inline void SetSqs(SqsAction&& value) { m_sqsHasBeenSet = true; m_sqs = std::move(value); } /** *

Sends information about the detector model instance and the event that * triggered the action to an Amazon SQS queue.

*/ inline Action& WithSqs(const SqsAction& value) { SetSqs(value); return *this;} /** *

Sends information about the detector model instance and the event that * triggered the action to an Amazon SQS queue.

*/ inline Action& WithSqs(SqsAction&& value) { SetSqs(std::move(value)); return *this;} /** *

Sends information about the detector model instance and the event that * triggered the action to an Amazon Kinesis Data Firehose delivery stream.

*/ inline const FirehoseAction& GetFirehose() const{ return m_firehose; } /** *

Sends information about the detector model instance and the event that * triggered the action to an Amazon Kinesis Data Firehose delivery stream.

*/ inline bool FirehoseHasBeenSet() const { return m_firehoseHasBeenSet; } /** *

Sends information about the detector model instance and the event that * triggered the action to an Amazon Kinesis Data Firehose delivery stream.

*/ inline void SetFirehose(const FirehoseAction& value) { m_firehoseHasBeenSet = true; m_firehose = value; } /** *

Sends information about the detector model instance and the event that * triggered the action to an Amazon Kinesis Data Firehose delivery stream.

*/ inline void SetFirehose(FirehoseAction&& value) { m_firehoseHasBeenSet = true; m_firehose = std::move(value); } /** *

Sends information about the detector model instance and the event that * triggered the action to an Amazon Kinesis Data Firehose delivery stream.

*/ inline Action& WithFirehose(const FirehoseAction& value) { SetFirehose(value); return *this;} /** *

Sends information about the detector model instance and the event that * triggered the action to an Amazon Kinesis Data Firehose delivery stream.

*/ inline Action& WithFirehose(FirehoseAction&& value) { SetFirehose(std::move(value)); return *this;} /** *

Writes to the DynamoDB table that you created. The default action payload * contains all attribute-value pairs that have the information about the detector * model instance and the event that triggered the action. You can customize the payload. * One column of the DynamoDB table receives all attribute-value pairs in the * payload that you specify. For more information, see Actions * in AWS IoT Events Developer Guide.

*/ inline const DynamoDBAction& GetDynamoDB() const{ return m_dynamoDB; } /** *

Writes to the DynamoDB table that you created. The default action payload * contains all attribute-value pairs that have the information about the detector * model instance and the event that triggered the action. You can customize the payload. * One column of the DynamoDB table receives all attribute-value pairs in the * payload that you specify. For more information, see Actions * in AWS IoT Events Developer Guide.

*/ inline bool DynamoDBHasBeenSet() const { return m_dynamoDBHasBeenSet; } /** *

Writes to the DynamoDB table that you created. The default action payload * contains all attribute-value pairs that have the information about the detector * model instance and the event that triggered the action. You can customize the payload. * One column of the DynamoDB table receives all attribute-value pairs in the * payload that you specify. For more information, see Actions * in AWS IoT Events Developer Guide.

*/ inline void SetDynamoDB(const DynamoDBAction& value) { m_dynamoDBHasBeenSet = true; m_dynamoDB = value; } /** *

Writes to the DynamoDB table that you created. The default action payload * contains all attribute-value pairs that have the information about the detector * model instance and the event that triggered the action. You can customize the payload. * One column of the DynamoDB table receives all attribute-value pairs in the * payload that you specify. For more information, see Actions * in AWS IoT Events Developer Guide.

*/ inline void SetDynamoDB(DynamoDBAction&& value) { m_dynamoDBHasBeenSet = true; m_dynamoDB = std::move(value); } /** *

Writes to the DynamoDB table that you created. The default action payload * contains all attribute-value pairs that have the information about the detector * model instance and the event that triggered the action. You can customize the payload. * One column of the DynamoDB table receives all attribute-value pairs in the * payload that you specify. For more information, see Actions * in AWS IoT Events Developer Guide.

*/ inline Action& WithDynamoDB(const DynamoDBAction& value) { SetDynamoDB(value); return *this;} /** *

Writes to the DynamoDB table that you created. The default action payload * contains all attribute-value pairs that have the information about the detector * model instance and the event that triggered the action. You can customize the payload. * One column of the DynamoDB table receives all attribute-value pairs in the * payload that you specify. For more information, see Actions * in AWS IoT Events Developer Guide.

*/ inline Action& WithDynamoDB(DynamoDBAction&& value) { SetDynamoDB(std::move(value)); return *this;} /** *

Writes to the DynamoDB table that you created. The default action payload * contains all attribute-value pairs that have the information about the detector * model instance and the event that triggered the action. You can customize the payload. * A separate column of the DynamoDB table receives one attribute-value pair in the * payload that you specify. For more information, see Actions * in AWS IoT Events Developer Guide.

*/ inline const DynamoDBv2Action& GetDynamoDBv2() const{ return m_dynamoDBv2; } /** *

Writes to the DynamoDB table that you created. The default action payload * contains all attribute-value pairs that have the information about the detector * model instance and the event that triggered the action. You can customize the payload. * A separate column of the DynamoDB table receives one attribute-value pair in the * payload that you specify. For more information, see Actions * in AWS IoT Events Developer Guide.

*/ inline bool DynamoDBv2HasBeenSet() const { return m_dynamoDBv2HasBeenSet; } /** *

Writes to the DynamoDB table that you created. The default action payload * contains all attribute-value pairs that have the information about the detector * model instance and the event that triggered the action. You can customize the payload. * A separate column of the DynamoDB table receives one attribute-value pair in the * payload that you specify. For more information, see Actions * in AWS IoT Events Developer Guide.

*/ inline void SetDynamoDBv2(const DynamoDBv2Action& value) { m_dynamoDBv2HasBeenSet = true; m_dynamoDBv2 = value; } /** *

Writes to the DynamoDB table that you created. The default action payload * contains all attribute-value pairs that have the information about the detector * model instance and the event that triggered the action. You can customize the payload. * A separate column of the DynamoDB table receives one attribute-value pair in the * payload that you specify. For more information, see Actions * in AWS IoT Events Developer Guide.

*/ inline void SetDynamoDBv2(DynamoDBv2Action&& value) { m_dynamoDBv2HasBeenSet = true; m_dynamoDBv2 = std::move(value); } /** *

Writes to the DynamoDB table that you created. The default action payload * contains all attribute-value pairs that have the information about the detector * model instance and the event that triggered the action. You can customize the payload. * A separate column of the DynamoDB table receives one attribute-value pair in the * payload that you specify. For more information, see Actions * in AWS IoT Events Developer Guide.

*/ inline Action& WithDynamoDBv2(const DynamoDBv2Action& value) { SetDynamoDBv2(value); return *this;} /** *

Writes to the DynamoDB table that you created. The default action payload * contains all attribute-value pairs that have the information about the detector * model instance and the event that triggered the action. You can customize the payload. * A separate column of the DynamoDB table receives one attribute-value pair in the * payload that you specify. For more information, see Actions * in AWS IoT Events Developer Guide.

*/ inline Action& WithDynamoDBv2(DynamoDBv2Action&& value) { SetDynamoDBv2(std::move(value)); return *this;} /** *

Sends information about the detector model instance and the event that * triggered the action to an asset property in AWS IoT SiteWise .

*/ inline const IotSiteWiseAction& GetIotSiteWise() const{ return m_iotSiteWise; } /** *

Sends information about the detector model instance and the event that * triggered the action to an asset property in AWS IoT SiteWise .

*/ inline bool IotSiteWiseHasBeenSet() const { return m_iotSiteWiseHasBeenSet; } /** *

Sends information about the detector model instance and the event that * triggered the action to an asset property in AWS IoT SiteWise .

*/ inline void SetIotSiteWise(const IotSiteWiseAction& value) { m_iotSiteWiseHasBeenSet = true; m_iotSiteWise = value; } /** *

Sends information about the detector model instance and the event that * triggered the action to an asset property in AWS IoT SiteWise .

*/ inline void SetIotSiteWise(IotSiteWiseAction&& value) { m_iotSiteWiseHasBeenSet = true; m_iotSiteWise = std::move(value); } /** *

Sends information about the detector model instance and the event that * triggered the action to an asset property in AWS IoT SiteWise .

*/ inline Action& WithIotSiteWise(const IotSiteWiseAction& value) { SetIotSiteWise(value); return *this;} /** *

Sends information about the detector model instance and the event that * triggered the action to an asset property in AWS IoT SiteWise .

*/ inline Action& WithIotSiteWise(IotSiteWiseAction&& value) { SetIotSiteWise(std::move(value)); return *this;} private: SetVariableAction m_setVariable; bool m_setVariableHasBeenSet = false; SNSTopicPublishAction m_sns; bool m_snsHasBeenSet = false; IotTopicPublishAction m_iotTopicPublish; bool m_iotTopicPublishHasBeenSet = false; SetTimerAction m_setTimer; bool m_setTimerHasBeenSet = false; ClearTimerAction m_clearTimer; bool m_clearTimerHasBeenSet = false; ResetTimerAction m_resetTimer; bool m_resetTimerHasBeenSet = false; LambdaAction m_lambda; bool m_lambdaHasBeenSet = false; IotEventsAction m_iotEvents; bool m_iotEventsHasBeenSet = false; SqsAction m_sqs; bool m_sqsHasBeenSet = false; FirehoseAction m_firehose; bool m_firehoseHasBeenSet = false; DynamoDBAction m_dynamoDB; bool m_dynamoDBHasBeenSet = false; DynamoDBv2Action m_dynamoDBv2; bool m_dynamoDBv2HasBeenSet = false; IotSiteWiseAction m_iotSiteWise; bool m_iotSiteWiseHasBeenSet = false; }; } // namespace Model } // namespace IoTEvents } // namespace Aws