{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE DuplicateRecordFields #-}
{-# LANGUAGE NamedFieldPuns #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE StrictData #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# OPTIONS_GHC -fno-warn-unused-imports #-}
{-# OPTIONS_GHC -fno-warn-unused-matches #-}

-- Derived from AWS service descriptions, licensed under Apache 2.0.

-- |
-- Module      : Amazonka.IoT.Types.Action
-- Copyright   : (c) 2013-2023 Brendan Hay
-- License     : Mozilla Public License, v. 2.0.
-- Maintainer  : Brendan Hay
-- Stability   : auto-generated
-- Portability : non-portable (GHC extensions)
module Amazonka.IoT.Types.Action where

import qualified Amazonka.Core as Core
import qualified Amazonka.Core.Lens.Internal as Lens
import qualified Amazonka.Data as Data
import Amazonka.IoT.Types.CloudwatchAlarmAction
import Amazonka.IoT.Types.CloudwatchLogsAction
import Amazonka.IoT.Types.CloudwatchMetricAction
import Amazonka.IoT.Types.DynamoDBAction
import Amazonka.IoT.Types.DynamoDBv2Action
import Amazonka.IoT.Types.ElasticsearchAction
import Amazonka.IoT.Types.FirehoseAction
import Amazonka.IoT.Types.HttpAction
import Amazonka.IoT.Types.IotAnalyticsAction
import Amazonka.IoT.Types.IotEventsAction
import Amazonka.IoT.Types.IotSiteWiseAction
import Amazonka.IoT.Types.KafkaAction
import Amazonka.IoT.Types.KinesisAction
import Amazonka.IoT.Types.LambdaAction
import Amazonka.IoT.Types.LocationAction
import Amazonka.IoT.Types.OpenSearchAction
import Amazonka.IoT.Types.RepublishAction
import Amazonka.IoT.Types.S3Action
import Amazonka.IoT.Types.SalesforceAction
import Amazonka.IoT.Types.SnsAction
import Amazonka.IoT.Types.SqsAction
import Amazonka.IoT.Types.StepFunctionsAction
import Amazonka.IoT.Types.TimestreamAction
import qualified Amazonka.Prelude as Prelude

-- | Describes the actions associated with a rule.
--
-- /See:/ 'newAction' smart constructor.
data Action = Action'
  { -- | Change the state of a CloudWatch alarm.
    Action -> Maybe CloudwatchAlarmAction
cloudwatchAlarm :: Prelude.Maybe CloudwatchAlarmAction,
    -- | Send data to CloudWatch Logs.
    Action -> Maybe CloudwatchLogsAction
cloudwatchLogs :: Prelude.Maybe CloudwatchLogsAction,
    -- | Capture a CloudWatch metric.
    Action -> Maybe CloudwatchMetricAction
cloudwatchMetric :: Prelude.Maybe CloudwatchMetricAction,
    -- | Write to a DynamoDB table.
    Action -> Maybe DynamoDBAction
dynamoDB :: Prelude.Maybe DynamoDBAction,
    -- | Write to a DynamoDB table. This is a new version of the DynamoDB action.
    -- It allows you to write each attribute in an MQTT message payload into a
    -- separate DynamoDB column.
    Action -> Maybe DynamoDBv2Action
dynamoDBv2 :: Prelude.Maybe DynamoDBv2Action,
    -- | Write data to an Amazon OpenSearch Service domain.
    --
    -- The @Elasticsearch@ action can only be used by existing rule actions. To
    -- create a new rule action or to update an existing rule action, use the
    -- @OpenSearch@ rule action instead. For more information, see
    -- <https://docs.aws.amazon.com/iot/latest/apireference/API_OpenSearchAction.html OpenSearchAction>.
    Action -> Maybe ElasticsearchAction
elasticsearch :: Prelude.Maybe ElasticsearchAction,
    -- | Write to an Amazon Kinesis Firehose stream.
    Action -> Maybe FirehoseAction
firehose :: Prelude.Maybe FirehoseAction,
    -- | Send data to an HTTPS endpoint.
    Action -> Maybe HttpAction
http :: Prelude.Maybe HttpAction,
    -- | Sends message data to an IoT Analytics channel.
    Action -> Maybe IotAnalyticsAction
iotAnalytics :: Prelude.Maybe IotAnalyticsAction,
    -- | Sends an input to an IoT Events detector.
    Action -> Maybe IotEventsAction
iotEvents :: Prelude.Maybe IotEventsAction,
    -- | Sends data from the MQTT message that triggered the rule to IoT SiteWise
    -- asset properties.
    Action -> Maybe IotSiteWiseAction
iotSiteWise :: Prelude.Maybe IotSiteWiseAction,
    -- | Send messages to an Amazon Managed Streaming for Apache Kafka (Amazon
    -- MSK) or self-managed Apache Kafka cluster.
    Action -> Maybe KafkaAction
kafka :: Prelude.Maybe KafkaAction,
    -- | Write data to an Amazon Kinesis stream.
    Action -> Maybe KinesisAction
kinesis :: Prelude.Maybe KinesisAction,
    -- | Invoke a Lambda function.
    Action -> Maybe LambdaAction
lambda :: Prelude.Maybe LambdaAction,
    -- | The Amazon Location Service rule action sends device location updates
    -- from an MQTT message to an Amazon Location tracker resource.
    Action -> Maybe LocationAction
location :: Prelude.Maybe LocationAction,
    -- | Write data to an Amazon OpenSearch Service domain.
    Action -> Maybe OpenSearchAction
openSearch :: Prelude.Maybe OpenSearchAction,
    -- | Publish to another MQTT topic.
    Action -> Maybe RepublishAction
republish :: Prelude.Maybe RepublishAction,
    -- | Write to an Amazon S3 bucket.
    Action -> Maybe S3Action
s3 :: Prelude.Maybe S3Action,
    -- | Send a message to a Salesforce IoT Cloud Input Stream.
    Action -> Maybe SalesforceAction
salesforce :: Prelude.Maybe SalesforceAction,
    -- | Publish to an Amazon SNS topic.
    Action -> Maybe SnsAction
sns :: Prelude.Maybe SnsAction,
    -- | Publish to an Amazon SQS queue.
    Action -> Maybe SqsAction
sqs :: Prelude.Maybe SqsAction,
    -- | Starts execution of a Step Functions state machine.
    Action -> Maybe StepFunctionsAction
stepFunctions :: Prelude.Maybe StepFunctionsAction,
    -- | The Timestream rule action writes attributes (measures) from an MQTT
    -- message into an Amazon Timestream table. For more information, see the
    -- <https://docs.aws.amazon.com/iot/latest/developerguide/timestream-rule-action.html Timestream>
    -- topic rule action documentation.
    Action -> Maybe TimestreamAction
timestream :: Prelude.Maybe TimestreamAction
  }
  deriving (Action -> Action -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: Action -> Action -> Bool
$c/= :: Action -> Action -> Bool
== :: Action -> Action -> Bool
$c== :: Action -> Action -> Bool
Prelude.Eq, ReadPrec [Action]
ReadPrec Action
Int -> ReadS Action
ReadS [Action]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [Action]
$creadListPrec :: ReadPrec [Action]
readPrec :: ReadPrec Action
$creadPrec :: ReadPrec Action
readList :: ReadS [Action]
$creadList :: ReadS [Action]
readsPrec :: Int -> ReadS Action
$creadsPrec :: Int -> ReadS Action
Prelude.Read, Int -> Action -> ShowS
[Action] -> ShowS
Action -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [Action] -> ShowS
$cshowList :: [Action] -> ShowS
show :: Action -> String
$cshow :: Action -> String
showsPrec :: Int -> Action -> ShowS
$cshowsPrec :: Int -> Action -> ShowS
Prelude.Show, forall x. Rep Action x -> Action
forall x. Action -> Rep Action x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep Action x -> Action
$cfrom :: forall x. Action -> Rep Action x
Prelude.Generic)

-- |
-- Create a value of 'Action' with all optional fields omitted.
--
-- Use <https://hackage.haskell.org/package/generic-lens generic-lens> or <https://hackage.haskell.org/package/optics optics> to modify other optional fields.
--
-- The following record fields are available, with the corresponding lenses provided
-- for backwards compatibility:
--
-- 'cloudwatchAlarm', 'action_cloudwatchAlarm' - Change the state of a CloudWatch alarm.
--
-- 'cloudwatchLogs', 'action_cloudwatchLogs' - Send data to CloudWatch Logs.
--
-- 'cloudwatchMetric', 'action_cloudwatchMetric' - Capture a CloudWatch metric.
--
-- 'dynamoDB', 'action_dynamoDB' - Write to a DynamoDB table.
--
-- 'dynamoDBv2', 'action_dynamoDBv2' - Write to a DynamoDB table. This is a new version of the DynamoDB action.
-- It allows you to write each attribute in an MQTT message payload into a
-- separate DynamoDB column.
--
-- 'elasticsearch', 'action_elasticsearch' - Write data to an Amazon OpenSearch Service domain.
--
-- The @Elasticsearch@ action can only be used by existing rule actions. To
-- create a new rule action or to update an existing rule action, use the
-- @OpenSearch@ rule action instead. For more information, see
-- <https://docs.aws.amazon.com/iot/latest/apireference/API_OpenSearchAction.html OpenSearchAction>.
--
-- 'firehose', 'action_firehose' - Write to an Amazon Kinesis Firehose stream.
--
-- 'http', 'action_http' - Send data to an HTTPS endpoint.
--
-- 'iotAnalytics', 'action_iotAnalytics' - Sends message data to an IoT Analytics channel.
--
-- 'iotEvents', 'action_iotEvents' - Sends an input to an IoT Events detector.
--
-- 'iotSiteWise', 'action_iotSiteWise' - Sends data from the MQTT message that triggered the rule to IoT SiteWise
-- asset properties.
--
-- 'kafka', 'action_kafka' - Send messages to an Amazon Managed Streaming for Apache Kafka (Amazon
-- MSK) or self-managed Apache Kafka cluster.
--
-- 'kinesis', 'action_kinesis' - Write data to an Amazon Kinesis stream.
--
-- 'lambda', 'action_lambda' - Invoke a Lambda function.
--
-- 'location', 'action_location' - The Amazon Location Service rule action sends device location updates
-- from an MQTT message to an Amazon Location tracker resource.
--
-- 'openSearch', 'action_openSearch' - Write data to an Amazon OpenSearch Service domain.
--
-- 'republish', 'action_republish' - Publish to another MQTT topic.
--
-- 's3', 'action_s3' - Write to an Amazon S3 bucket.
--
-- 'salesforce', 'action_salesforce' - Send a message to a Salesforce IoT Cloud Input Stream.
--
-- 'sns', 'action_sns' - Publish to an Amazon SNS topic.
--
-- 'sqs', 'action_sqs' - Publish to an Amazon SQS queue.
--
-- 'stepFunctions', 'action_stepFunctions' - Starts execution of a Step Functions state machine.
--
-- 'timestream', 'action_timestream' - The Timestream rule action writes attributes (measures) from an MQTT
-- message into an Amazon Timestream table. For more information, see the
-- <https://docs.aws.amazon.com/iot/latest/developerguide/timestream-rule-action.html Timestream>
-- topic rule action documentation.
newAction ::
  Action
newAction :: Action
newAction =
  Action'
    { $sel:cloudwatchAlarm:Action' :: Maybe CloudwatchAlarmAction
cloudwatchAlarm = forall a. Maybe a
Prelude.Nothing,
      $sel:cloudwatchLogs:Action' :: Maybe CloudwatchLogsAction
cloudwatchLogs = forall a. Maybe a
Prelude.Nothing,
      $sel:cloudwatchMetric:Action' :: Maybe CloudwatchMetricAction
cloudwatchMetric = forall a. Maybe a
Prelude.Nothing,
      $sel:dynamoDB:Action' :: Maybe DynamoDBAction
dynamoDB = forall a. Maybe a
Prelude.Nothing,
      $sel:dynamoDBv2:Action' :: Maybe DynamoDBv2Action
dynamoDBv2 = forall a. Maybe a
Prelude.Nothing,
      $sel:elasticsearch:Action' :: Maybe ElasticsearchAction
elasticsearch = forall a. Maybe a
Prelude.Nothing,
      $sel:firehose:Action' :: Maybe FirehoseAction
firehose = forall a. Maybe a
Prelude.Nothing,
      $sel:http:Action' :: Maybe HttpAction
http = forall a. Maybe a
Prelude.Nothing,
      $sel:iotAnalytics:Action' :: Maybe IotAnalyticsAction
iotAnalytics = forall a. Maybe a
Prelude.Nothing,
      $sel:iotEvents:Action' :: Maybe IotEventsAction
iotEvents = forall a. Maybe a
Prelude.Nothing,
      $sel:iotSiteWise:Action' :: Maybe IotSiteWiseAction
iotSiteWise = forall a. Maybe a
Prelude.Nothing,
      $sel:kafka:Action' :: Maybe KafkaAction
kafka = forall a. Maybe a
Prelude.Nothing,
      $sel:kinesis:Action' :: Maybe KinesisAction
kinesis = forall a. Maybe a
Prelude.Nothing,
      $sel:lambda:Action' :: Maybe LambdaAction
lambda = forall a. Maybe a
Prelude.Nothing,
      $sel:location:Action' :: Maybe LocationAction
location = forall a. Maybe a
Prelude.Nothing,
      $sel:openSearch:Action' :: Maybe OpenSearchAction
openSearch = forall a. Maybe a
Prelude.Nothing,
      $sel:republish:Action' :: Maybe RepublishAction
republish = forall a. Maybe a
Prelude.Nothing,
      $sel:s3:Action' :: Maybe S3Action
s3 = forall a. Maybe a
Prelude.Nothing,
      $sel:salesforce:Action' :: Maybe SalesforceAction
salesforce = forall a. Maybe a
Prelude.Nothing,
      $sel:sns:Action' :: Maybe SnsAction
sns = forall a. Maybe a
Prelude.Nothing,
      $sel:sqs:Action' :: Maybe SqsAction
sqs = forall a. Maybe a
Prelude.Nothing,
      $sel:stepFunctions:Action' :: Maybe StepFunctionsAction
stepFunctions = forall a. Maybe a
Prelude.Nothing,
      $sel:timestream:Action' :: Maybe TimestreamAction
timestream = forall a. Maybe a
Prelude.Nothing
    }

-- | Change the state of a CloudWatch alarm.
action_cloudwatchAlarm :: Lens.Lens' Action (Prelude.Maybe CloudwatchAlarmAction)
action_cloudwatchAlarm :: Lens' Action (Maybe CloudwatchAlarmAction)
action_cloudwatchAlarm = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Action' {Maybe CloudwatchAlarmAction
cloudwatchAlarm :: Maybe CloudwatchAlarmAction
$sel:cloudwatchAlarm:Action' :: Action -> Maybe CloudwatchAlarmAction
cloudwatchAlarm} -> Maybe CloudwatchAlarmAction
cloudwatchAlarm) (\s :: Action
s@Action' {} Maybe CloudwatchAlarmAction
a -> Action
s {$sel:cloudwatchAlarm:Action' :: Maybe CloudwatchAlarmAction
cloudwatchAlarm = Maybe CloudwatchAlarmAction
a} :: Action)

-- | Send data to CloudWatch Logs.
action_cloudwatchLogs :: Lens.Lens' Action (Prelude.Maybe CloudwatchLogsAction)
action_cloudwatchLogs :: Lens' Action (Maybe CloudwatchLogsAction)
action_cloudwatchLogs = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Action' {Maybe CloudwatchLogsAction
cloudwatchLogs :: Maybe CloudwatchLogsAction
$sel:cloudwatchLogs:Action' :: Action -> Maybe CloudwatchLogsAction
cloudwatchLogs} -> Maybe CloudwatchLogsAction
cloudwatchLogs) (\s :: Action
s@Action' {} Maybe CloudwatchLogsAction
a -> Action
s {$sel:cloudwatchLogs:Action' :: Maybe CloudwatchLogsAction
cloudwatchLogs = Maybe CloudwatchLogsAction
a} :: Action)

-- | Capture a CloudWatch metric.
action_cloudwatchMetric :: Lens.Lens' Action (Prelude.Maybe CloudwatchMetricAction)
action_cloudwatchMetric :: Lens' Action (Maybe CloudwatchMetricAction)
action_cloudwatchMetric = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Action' {Maybe CloudwatchMetricAction
cloudwatchMetric :: Maybe CloudwatchMetricAction
$sel:cloudwatchMetric:Action' :: Action -> Maybe CloudwatchMetricAction
cloudwatchMetric} -> Maybe CloudwatchMetricAction
cloudwatchMetric) (\s :: Action
s@Action' {} Maybe CloudwatchMetricAction
a -> Action
s {$sel:cloudwatchMetric:Action' :: Maybe CloudwatchMetricAction
cloudwatchMetric = Maybe CloudwatchMetricAction
a} :: Action)

-- | Write to a DynamoDB table.
action_dynamoDB :: Lens.Lens' Action (Prelude.Maybe DynamoDBAction)
action_dynamoDB :: Lens' Action (Maybe DynamoDBAction)
action_dynamoDB = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Action' {Maybe DynamoDBAction
dynamoDB :: Maybe DynamoDBAction
$sel:dynamoDB:Action' :: Action -> Maybe DynamoDBAction
dynamoDB} -> Maybe DynamoDBAction
dynamoDB) (\s :: Action
s@Action' {} Maybe DynamoDBAction
a -> Action
s {$sel:dynamoDB:Action' :: Maybe DynamoDBAction
dynamoDB = Maybe DynamoDBAction
a} :: Action)

-- | Write to a DynamoDB table. This is a new version of the DynamoDB action.
-- It allows you to write each attribute in an MQTT message payload into a
-- separate DynamoDB column.
action_dynamoDBv2 :: Lens.Lens' Action (Prelude.Maybe DynamoDBv2Action)
action_dynamoDBv2 :: Lens' Action (Maybe DynamoDBv2Action)
action_dynamoDBv2 = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Action' {Maybe DynamoDBv2Action
dynamoDBv2 :: Maybe DynamoDBv2Action
$sel:dynamoDBv2:Action' :: Action -> Maybe DynamoDBv2Action
dynamoDBv2} -> Maybe DynamoDBv2Action
dynamoDBv2) (\s :: Action
s@Action' {} Maybe DynamoDBv2Action
a -> Action
s {$sel:dynamoDBv2:Action' :: Maybe DynamoDBv2Action
dynamoDBv2 = Maybe DynamoDBv2Action
a} :: Action)

-- | Write data to an Amazon OpenSearch Service domain.
--
-- The @Elasticsearch@ action can only be used by existing rule actions. To
-- create a new rule action or to update an existing rule action, use the
-- @OpenSearch@ rule action instead. For more information, see
-- <https://docs.aws.amazon.com/iot/latest/apireference/API_OpenSearchAction.html OpenSearchAction>.
action_elasticsearch :: Lens.Lens' Action (Prelude.Maybe ElasticsearchAction)
action_elasticsearch :: Lens' Action (Maybe ElasticsearchAction)
action_elasticsearch = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Action' {Maybe ElasticsearchAction
elasticsearch :: Maybe ElasticsearchAction
$sel:elasticsearch:Action' :: Action -> Maybe ElasticsearchAction
elasticsearch} -> Maybe ElasticsearchAction
elasticsearch) (\s :: Action
s@Action' {} Maybe ElasticsearchAction
a -> Action
s {$sel:elasticsearch:Action' :: Maybe ElasticsearchAction
elasticsearch = Maybe ElasticsearchAction
a} :: Action)

-- | Write to an Amazon Kinesis Firehose stream.
action_firehose :: Lens.Lens' Action (Prelude.Maybe FirehoseAction)
action_firehose :: Lens' Action (Maybe FirehoseAction)
action_firehose = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Action' {Maybe FirehoseAction
firehose :: Maybe FirehoseAction
$sel:firehose:Action' :: Action -> Maybe FirehoseAction
firehose} -> Maybe FirehoseAction
firehose) (\s :: Action
s@Action' {} Maybe FirehoseAction
a -> Action
s {$sel:firehose:Action' :: Maybe FirehoseAction
firehose = Maybe FirehoseAction
a} :: Action)

-- | Send data to an HTTPS endpoint.
action_http :: Lens.Lens' Action (Prelude.Maybe HttpAction)
action_http :: Lens' Action (Maybe HttpAction)
action_http = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Action' {Maybe HttpAction
http :: Maybe HttpAction
$sel:http:Action' :: Action -> Maybe HttpAction
http} -> Maybe HttpAction
http) (\s :: Action
s@Action' {} Maybe HttpAction
a -> Action
s {$sel:http:Action' :: Maybe HttpAction
http = Maybe HttpAction
a} :: Action)

-- | Sends message data to an IoT Analytics channel.
action_iotAnalytics :: Lens.Lens' Action (Prelude.Maybe IotAnalyticsAction)
action_iotAnalytics :: Lens' Action (Maybe IotAnalyticsAction)
action_iotAnalytics = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Action' {Maybe IotAnalyticsAction
iotAnalytics :: Maybe IotAnalyticsAction
$sel:iotAnalytics:Action' :: Action -> Maybe IotAnalyticsAction
iotAnalytics} -> Maybe IotAnalyticsAction
iotAnalytics) (\s :: Action
s@Action' {} Maybe IotAnalyticsAction
a -> Action
s {$sel:iotAnalytics:Action' :: Maybe IotAnalyticsAction
iotAnalytics = Maybe IotAnalyticsAction
a} :: Action)

-- | Sends an input to an IoT Events detector.
action_iotEvents :: Lens.Lens' Action (Prelude.Maybe IotEventsAction)
action_iotEvents :: Lens' Action (Maybe IotEventsAction)
action_iotEvents = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Action' {Maybe IotEventsAction
iotEvents :: Maybe IotEventsAction
$sel:iotEvents:Action' :: Action -> Maybe IotEventsAction
iotEvents} -> Maybe IotEventsAction
iotEvents) (\s :: Action
s@Action' {} Maybe IotEventsAction
a -> Action
s {$sel:iotEvents:Action' :: Maybe IotEventsAction
iotEvents = Maybe IotEventsAction
a} :: Action)

-- | Sends data from the MQTT message that triggered the rule to IoT SiteWise
-- asset properties.
action_iotSiteWise :: Lens.Lens' Action (Prelude.Maybe IotSiteWiseAction)
action_iotSiteWise :: Lens' Action (Maybe IotSiteWiseAction)
action_iotSiteWise = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Action' {Maybe IotSiteWiseAction
iotSiteWise :: Maybe IotSiteWiseAction
$sel:iotSiteWise:Action' :: Action -> Maybe IotSiteWiseAction
iotSiteWise} -> Maybe IotSiteWiseAction
iotSiteWise) (\s :: Action
s@Action' {} Maybe IotSiteWiseAction
a -> Action
s {$sel:iotSiteWise:Action' :: Maybe IotSiteWiseAction
iotSiteWise = Maybe IotSiteWiseAction
a} :: Action)

-- | Send messages to an Amazon Managed Streaming for Apache Kafka (Amazon
-- MSK) or self-managed Apache Kafka cluster.
action_kafka :: Lens.Lens' Action (Prelude.Maybe KafkaAction)
action_kafka :: Lens' Action (Maybe KafkaAction)
action_kafka = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Action' {Maybe KafkaAction
kafka :: Maybe KafkaAction
$sel:kafka:Action' :: Action -> Maybe KafkaAction
kafka} -> Maybe KafkaAction
kafka) (\s :: Action
s@Action' {} Maybe KafkaAction
a -> Action
s {$sel:kafka:Action' :: Maybe KafkaAction
kafka = Maybe KafkaAction
a} :: Action)

-- | Write data to an Amazon Kinesis stream.
action_kinesis :: Lens.Lens' Action (Prelude.Maybe KinesisAction)
action_kinesis :: Lens' Action (Maybe KinesisAction)
action_kinesis = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Action' {Maybe KinesisAction
kinesis :: Maybe KinesisAction
$sel:kinesis:Action' :: Action -> Maybe KinesisAction
kinesis} -> Maybe KinesisAction
kinesis) (\s :: Action
s@Action' {} Maybe KinesisAction
a -> Action
s {$sel:kinesis:Action' :: Maybe KinesisAction
kinesis = Maybe KinesisAction
a} :: Action)

-- | Invoke a Lambda function.
action_lambda :: Lens.Lens' Action (Prelude.Maybe LambdaAction)
action_lambda :: Lens' Action (Maybe LambdaAction)
action_lambda = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Action' {Maybe LambdaAction
lambda :: Maybe LambdaAction
$sel:lambda:Action' :: Action -> Maybe LambdaAction
lambda} -> Maybe LambdaAction
lambda) (\s :: Action
s@Action' {} Maybe LambdaAction
a -> Action
s {$sel:lambda:Action' :: Maybe LambdaAction
lambda = Maybe LambdaAction
a} :: Action)

-- | The Amazon Location Service rule action sends device location updates
-- from an MQTT message to an Amazon Location tracker resource.
action_location :: Lens.Lens' Action (Prelude.Maybe LocationAction)
action_location :: Lens' Action (Maybe LocationAction)
action_location = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Action' {Maybe LocationAction
location :: Maybe LocationAction
$sel:location:Action' :: Action -> Maybe LocationAction
location} -> Maybe LocationAction
location) (\s :: Action
s@Action' {} Maybe LocationAction
a -> Action
s {$sel:location:Action' :: Maybe LocationAction
location = Maybe LocationAction
a} :: Action)

-- | Write data to an Amazon OpenSearch Service domain.
action_openSearch :: Lens.Lens' Action (Prelude.Maybe OpenSearchAction)
action_openSearch :: Lens' Action (Maybe OpenSearchAction)
action_openSearch = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Action' {Maybe OpenSearchAction
openSearch :: Maybe OpenSearchAction
$sel:openSearch:Action' :: Action -> Maybe OpenSearchAction
openSearch} -> Maybe OpenSearchAction
openSearch) (\s :: Action
s@Action' {} Maybe OpenSearchAction
a -> Action
s {$sel:openSearch:Action' :: Maybe OpenSearchAction
openSearch = Maybe OpenSearchAction
a} :: Action)

-- | Publish to another MQTT topic.
action_republish :: Lens.Lens' Action (Prelude.Maybe RepublishAction)
action_republish :: Lens' Action (Maybe RepublishAction)
action_republish = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Action' {Maybe RepublishAction
republish :: Maybe RepublishAction
$sel:republish:Action' :: Action -> Maybe RepublishAction
republish} -> Maybe RepublishAction
republish) (\s :: Action
s@Action' {} Maybe RepublishAction
a -> Action
s {$sel:republish:Action' :: Maybe RepublishAction
republish = Maybe RepublishAction
a} :: Action)

-- | Write to an Amazon S3 bucket.
action_s3 :: Lens.Lens' Action (Prelude.Maybe S3Action)
action_s3 :: Lens' Action (Maybe S3Action)
action_s3 = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Action' {Maybe S3Action
s3 :: Maybe S3Action
$sel:s3:Action' :: Action -> Maybe S3Action
s3} -> Maybe S3Action
s3) (\s :: Action
s@Action' {} Maybe S3Action
a -> Action
s {$sel:s3:Action' :: Maybe S3Action
s3 = Maybe S3Action
a} :: Action)

-- | Send a message to a Salesforce IoT Cloud Input Stream.
action_salesforce :: Lens.Lens' Action (Prelude.Maybe SalesforceAction)
action_salesforce :: Lens' Action (Maybe SalesforceAction)
action_salesforce = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Action' {Maybe SalesforceAction
salesforce :: Maybe SalesforceAction
$sel:salesforce:Action' :: Action -> Maybe SalesforceAction
salesforce} -> Maybe SalesforceAction
salesforce) (\s :: Action
s@Action' {} Maybe SalesforceAction
a -> Action
s {$sel:salesforce:Action' :: Maybe SalesforceAction
salesforce = Maybe SalesforceAction
a} :: Action)

-- | Publish to an Amazon SNS topic.
action_sns :: Lens.Lens' Action (Prelude.Maybe SnsAction)
action_sns :: Lens' Action (Maybe SnsAction)
action_sns = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Action' {Maybe SnsAction
sns :: Maybe SnsAction
$sel:sns:Action' :: Action -> Maybe SnsAction
sns} -> Maybe SnsAction
sns) (\s :: Action
s@Action' {} Maybe SnsAction
a -> Action
s {$sel:sns:Action' :: Maybe SnsAction
sns = Maybe SnsAction
a} :: Action)

-- | Publish to an Amazon SQS queue.
action_sqs :: Lens.Lens' Action (Prelude.Maybe SqsAction)
action_sqs :: Lens' Action (Maybe SqsAction)
action_sqs = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Action' {Maybe SqsAction
sqs :: Maybe SqsAction
$sel:sqs:Action' :: Action -> Maybe SqsAction
sqs} -> Maybe SqsAction
sqs) (\s :: Action
s@Action' {} Maybe SqsAction
a -> Action
s {$sel:sqs:Action' :: Maybe SqsAction
sqs = Maybe SqsAction
a} :: Action)

-- | Starts execution of a Step Functions state machine.
action_stepFunctions :: Lens.Lens' Action (Prelude.Maybe StepFunctionsAction)
action_stepFunctions :: Lens' Action (Maybe StepFunctionsAction)
action_stepFunctions = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Action' {Maybe StepFunctionsAction
stepFunctions :: Maybe StepFunctionsAction
$sel:stepFunctions:Action' :: Action -> Maybe StepFunctionsAction
stepFunctions} -> Maybe StepFunctionsAction
stepFunctions) (\s :: Action
s@Action' {} Maybe StepFunctionsAction
a -> Action
s {$sel:stepFunctions:Action' :: Maybe StepFunctionsAction
stepFunctions = Maybe StepFunctionsAction
a} :: Action)

-- | The Timestream rule action writes attributes (measures) from an MQTT
-- message into an Amazon Timestream table. For more information, see the
-- <https://docs.aws.amazon.com/iot/latest/developerguide/timestream-rule-action.html Timestream>
-- topic rule action documentation.
action_timestream :: Lens.Lens' Action (Prelude.Maybe TimestreamAction)
action_timestream :: Lens' Action (Maybe TimestreamAction)
action_timestream = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Action' {Maybe TimestreamAction
timestream :: Maybe TimestreamAction
$sel:timestream:Action' :: Action -> Maybe TimestreamAction
timestream} -> Maybe TimestreamAction
timestream) (\s :: Action
s@Action' {} Maybe TimestreamAction
a -> Action
s {$sel:timestream:Action' :: Maybe TimestreamAction
timestream = Maybe TimestreamAction
a} :: Action)

instance Data.FromJSON Action where
  parseJSON :: Value -> Parser Action
parseJSON =
    forall a. String -> (Object -> Parser a) -> Value -> Parser a
Data.withObject
      String
"Action"
      ( \Object
x ->
          Maybe CloudwatchAlarmAction
-> Maybe CloudwatchLogsAction
-> Maybe CloudwatchMetricAction
-> Maybe DynamoDBAction
-> Maybe DynamoDBv2Action
-> Maybe ElasticsearchAction
-> Maybe FirehoseAction
-> Maybe HttpAction
-> Maybe IotAnalyticsAction
-> Maybe IotEventsAction
-> Maybe IotSiteWiseAction
-> Maybe KafkaAction
-> Maybe KinesisAction
-> Maybe LambdaAction
-> Maybe LocationAction
-> Maybe OpenSearchAction
-> Maybe RepublishAction
-> Maybe S3Action
-> Maybe SalesforceAction
-> Maybe SnsAction
-> Maybe SqsAction
-> Maybe StepFunctionsAction
-> Maybe TimestreamAction
-> Action
Action'
            forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"cloudwatchAlarm")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"cloudwatchLogs")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"cloudwatchMetric")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"dynamoDB")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"dynamoDBv2")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"elasticsearch")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"firehose")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"http")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"iotAnalytics")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"iotEvents")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"iotSiteWise")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"kafka")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"kinesis")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"lambda")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"location")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"openSearch")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"republish")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"s3")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"salesforce")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"sns")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"sqs")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"stepFunctions")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"timestream")
      )

instance Prelude.Hashable Action where
  hashWithSalt :: Int -> Action -> Int
hashWithSalt Int
_salt Action' {Maybe CloudwatchAlarmAction
Maybe CloudwatchLogsAction
Maybe CloudwatchMetricAction
Maybe DynamoDBAction
Maybe ElasticsearchAction
Maybe FirehoseAction
Maybe IotAnalyticsAction
Maybe IotEventsAction
Maybe KafkaAction
Maybe KinesisAction
Maybe LambdaAction
Maybe LocationAction
Maybe OpenSearchAction
Maybe IotSiteWiseAction
Maybe DynamoDBv2Action
Maybe S3Action
Maybe SalesforceAction
Maybe HttpAction
Maybe SnsAction
Maybe SqsAction
Maybe StepFunctionsAction
Maybe TimestreamAction
Maybe RepublishAction
timestream :: Maybe TimestreamAction
stepFunctions :: Maybe StepFunctionsAction
sqs :: Maybe SqsAction
sns :: Maybe SnsAction
salesforce :: Maybe SalesforceAction
s3 :: Maybe S3Action
republish :: Maybe RepublishAction
openSearch :: Maybe OpenSearchAction
location :: Maybe LocationAction
lambda :: Maybe LambdaAction
kinesis :: Maybe KinesisAction
kafka :: Maybe KafkaAction
iotSiteWise :: Maybe IotSiteWiseAction
iotEvents :: Maybe IotEventsAction
iotAnalytics :: Maybe IotAnalyticsAction
http :: Maybe HttpAction
firehose :: Maybe FirehoseAction
elasticsearch :: Maybe ElasticsearchAction
dynamoDBv2 :: Maybe DynamoDBv2Action
dynamoDB :: Maybe DynamoDBAction
cloudwatchMetric :: Maybe CloudwatchMetricAction
cloudwatchLogs :: Maybe CloudwatchLogsAction
cloudwatchAlarm :: Maybe CloudwatchAlarmAction
$sel:timestream:Action' :: Action -> Maybe TimestreamAction
$sel:stepFunctions:Action' :: Action -> Maybe StepFunctionsAction
$sel:sqs:Action' :: Action -> Maybe SqsAction
$sel:sns:Action' :: Action -> Maybe SnsAction
$sel:salesforce:Action' :: Action -> Maybe SalesforceAction
$sel:s3:Action' :: Action -> Maybe S3Action
$sel:republish:Action' :: Action -> Maybe RepublishAction
$sel:openSearch:Action' :: Action -> Maybe OpenSearchAction
$sel:location:Action' :: Action -> Maybe LocationAction
$sel:lambda:Action' :: Action -> Maybe LambdaAction
$sel:kinesis:Action' :: Action -> Maybe KinesisAction
$sel:kafka:Action' :: Action -> Maybe KafkaAction
$sel:iotSiteWise:Action' :: Action -> Maybe IotSiteWiseAction
$sel:iotEvents:Action' :: Action -> Maybe IotEventsAction
$sel:iotAnalytics:Action' :: Action -> Maybe IotAnalyticsAction
$sel:http:Action' :: Action -> Maybe HttpAction
$sel:firehose:Action' :: Action -> Maybe FirehoseAction
$sel:elasticsearch:Action' :: Action -> Maybe ElasticsearchAction
$sel:dynamoDBv2:Action' :: Action -> Maybe DynamoDBv2Action
$sel:dynamoDB:Action' :: Action -> Maybe DynamoDBAction
$sel:cloudwatchMetric:Action' :: Action -> Maybe CloudwatchMetricAction
$sel:cloudwatchLogs:Action' :: Action -> Maybe CloudwatchLogsAction
$sel:cloudwatchAlarm:Action' :: Action -> Maybe CloudwatchAlarmAction
..} =
    Int
_salt
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe CloudwatchAlarmAction
cloudwatchAlarm
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe CloudwatchLogsAction
cloudwatchLogs
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe CloudwatchMetricAction
cloudwatchMetric
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe DynamoDBAction
dynamoDB
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe DynamoDBv2Action
dynamoDBv2
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe ElasticsearchAction
elasticsearch
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe FirehoseAction
firehose
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe HttpAction
http
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe IotAnalyticsAction
iotAnalytics
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe IotEventsAction
iotEvents
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe IotSiteWiseAction
iotSiteWise
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe KafkaAction
kafka
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe KinesisAction
kinesis
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe LambdaAction
lambda
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe LocationAction
location
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe OpenSearchAction
openSearch
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe RepublishAction
republish
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe S3Action
s3
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe SalesforceAction
salesforce
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe SnsAction
sns
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe SqsAction
sqs
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe StepFunctionsAction
stepFunctions
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe TimestreamAction
timestream

instance Prelude.NFData Action where
  rnf :: Action -> ()
rnf Action' {Maybe CloudwatchAlarmAction
Maybe CloudwatchLogsAction
Maybe CloudwatchMetricAction
Maybe DynamoDBAction
Maybe ElasticsearchAction
Maybe FirehoseAction
Maybe IotAnalyticsAction
Maybe IotEventsAction
Maybe KafkaAction
Maybe KinesisAction
Maybe LambdaAction
Maybe LocationAction
Maybe OpenSearchAction
Maybe IotSiteWiseAction
Maybe DynamoDBv2Action
Maybe S3Action
Maybe SalesforceAction
Maybe HttpAction
Maybe SnsAction
Maybe SqsAction
Maybe StepFunctionsAction
Maybe TimestreamAction
Maybe RepublishAction
timestream :: Maybe TimestreamAction
stepFunctions :: Maybe StepFunctionsAction
sqs :: Maybe SqsAction
sns :: Maybe SnsAction
salesforce :: Maybe SalesforceAction
s3 :: Maybe S3Action
republish :: Maybe RepublishAction
openSearch :: Maybe OpenSearchAction
location :: Maybe LocationAction
lambda :: Maybe LambdaAction
kinesis :: Maybe KinesisAction
kafka :: Maybe KafkaAction
iotSiteWise :: Maybe IotSiteWiseAction
iotEvents :: Maybe IotEventsAction
iotAnalytics :: Maybe IotAnalyticsAction
http :: Maybe HttpAction
firehose :: Maybe FirehoseAction
elasticsearch :: Maybe ElasticsearchAction
dynamoDBv2 :: Maybe DynamoDBv2Action
dynamoDB :: Maybe DynamoDBAction
cloudwatchMetric :: Maybe CloudwatchMetricAction
cloudwatchLogs :: Maybe CloudwatchLogsAction
cloudwatchAlarm :: Maybe CloudwatchAlarmAction
$sel:timestream:Action' :: Action -> Maybe TimestreamAction
$sel:stepFunctions:Action' :: Action -> Maybe StepFunctionsAction
$sel:sqs:Action' :: Action -> Maybe SqsAction
$sel:sns:Action' :: Action -> Maybe SnsAction
$sel:salesforce:Action' :: Action -> Maybe SalesforceAction
$sel:s3:Action' :: Action -> Maybe S3Action
$sel:republish:Action' :: Action -> Maybe RepublishAction
$sel:openSearch:Action' :: Action -> Maybe OpenSearchAction
$sel:location:Action' :: Action -> Maybe LocationAction
$sel:lambda:Action' :: Action -> Maybe LambdaAction
$sel:kinesis:Action' :: Action -> Maybe KinesisAction
$sel:kafka:Action' :: Action -> Maybe KafkaAction
$sel:iotSiteWise:Action' :: Action -> Maybe IotSiteWiseAction
$sel:iotEvents:Action' :: Action -> Maybe IotEventsAction
$sel:iotAnalytics:Action' :: Action -> Maybe IotAnalyticsAction
$sel:http:Action' :: Action -> Maybe HttpAction
$sel:firehose:Action' :: Action -> Maybe FirehoseAction
$sel:elasticsearch:Action' :: Action -> Maybe ElasticsearchAction
$sel:dynamoDBv2:Action' :: Action -> Maybe DynamoDBv2Action
$sel:dynamoDB:Action' :: Action -> Maybe DynamoDBAction
$sel:cloudwatchMetric:Action' :: Action -> Maybe CloudwatchMetricAction
$sel:cloudwatchLogs:Action' :: Action -> Maybe CloudwatchLogsAction
$sel:cloudwatchAlarm:Action' :: Action -> Maybe CloudwatchAlarmAction
..} =
    forall a. NFData a => a -> ()
Prelude.rnf Maybe CloudwatchAlarmAction
cloudwatchAlarm
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe CloudwatchLogsAction
cloudwatchLogs
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe CloudwatchMetricAction
cloudwatchMetric
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe DynamoDBAction
dynamoDB
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe DynamoDBv2Action
dynamoDBv2
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe ElasticsearchAction
elasticsearch
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe FirehoseAction
firehose
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe HttpAction
http
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe IotAnalyticsAction
iotAnalytics
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe IotEventsAction
iotEvents
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe IotSiteWiseAction
iotSiteWise
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe KafkaAction
kafka
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe KinesisAction
kinesis
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe LambdaAction
lambda
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe LocationAction
location
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe OpenSearchAction
openSearch
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe RepublishAction
republish
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe S3Action
s3
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe SalesforceAction
salesforce
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe SnsAction
sns
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe SqsAction
sqs
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe StepFunctionsAction
stepFunctions
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe TimestreamAction
timestream

instance Data.ToJSON Action where
  toJSON :: Action -> Value
toJSON Action' {Maybe CloudwatchAlarmAction
Maybe CloudwatchLogsAction
Maybe CloudwatchMetricAction
Maybe DynamoDBAction
Maybe ElasticsearchAction
Maybe FirehoseAction
Maybe IotAnalyticsAction
Maybe IotEventsAction
Maybe KafkaAction
Maybe KinesisAction
Maybe LambdaAction
Maybe LocationAction
Maybe OpenSearchAction
Maybe IotSiteWiseAction
Maybe DynamoDBv2Action
Maybe S3Action
Maybe SalesforceAction
Maybe HttpAction
Maybe SnsAction
Maybe SqsAction
Maybe StepFunctionsAction
Maybe TimestreamAction
Maybe RepublishAction
timestream :: Maybe TimestreamAction
stepFunctions :: Maybe StepFunctionsAction
sqs :: Maybe SqsAction
sns :: Maybe SnsAction
salesforce :: Maybe SalesforceAction
s3 :: Maybe S3Action
republish :: Maybe RepublishAction
openSearch :: Maybe OpenSearchAction
location :: Maybe LocationAction
lambda :: Maybe LambdaAction
kinesis :: Maybe KinesisAction
kafka :: Maybe KafkaAction
iotSiteWise :: Maybe IotSiteWiseAction
iotEvents :: Maybe IotEventsAction
iotAnalytics :: Maybe IotAnalyticsAction
http :: Maybe HttpAction
firehose :: Maybe FirehoseAction
elasticsearch :: Maybe ElasticsearchAction
dynamoDBv2 :: Maybe DynamoDBv2Action
dynamoDB :: Maybe DynamoDBAction
cloudwatchMetric :: Maybe CloudwatchMetricAction
cloudwatchLogs :: Maybe CloudwatchLogsAction
cloudwatchAlarm :: Maybe CloudwatchAlarmAction
$sel:timestream:Action' :: Action -> Maybe TimestreamAction
$sel:stepFunctions:Action' :: Action -> Maybe StepFunctionsAction
$sel:sqs:Action' :: Action -> Maybe SqsAction
$sel:sns:Action' :: Action -> Maybe SnsAction
$sel:salesforce:Action' :: Action -> Maybe SalesforceAction
$sel:s3:Action' :: Action -> Maybe S3Action
$sel:republish:Action' :: Action -> Maybe RepublishAction
$sel:openSearch:Action' :: Action -> Maybe OpenSearchAction
$sel:location:Action' :: Action -> Maybe LocationAction
$sel:lambda:Action' :: Action -> Maybe LambdaAction
$sel:kinesis:Action' :: Action -> Maybe KinesisAction
$sel:kafka:Action' :: Action -> Maybe KafkaAction
$sel:iotSiteWise:Action' :: Action -> Maybe IotSiteWiseAction
$sel:iotEvents:Action' :: Action -> Maybe IotEventsAction
$sel:iotAnalytics:Action' :: Action -> Maybe IotAnalyticsAction
$sel:http:Action' :: Action -> Maybe HttpAction
$sel:firehose:Action' :: Action -> Maybe FirehoseAction
$sel:elasticsearch:Action' :: Action -> Maybe ElasticsearchAction
$sel:dynamoDBv2:Action' :: Action -> Maybe DynamoDBv2Action
$sel:dynamoDB:Action' :: Action -> Maybe DynamoDBAction
$sel:cloudwatchMetric:Action' :: Action -> Maybe CloudwatchMetricAction
$sel:cloudwatchLogs:Action' :: Action -> Maybe CloudwatchLogsAction
$sel:cloudwatchAlarm:Action' :: Action -> Maybe CloudwatchAlarmAction
..} =
    [Pair] -> Value
Data.object
      ( forall a. [Maybe a] -> [a]
Prelude.catMaybes
          [ (Key
"cloudwatchAlarm" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=)
              forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe CloudwatchAlarmAction
cloudwatchAlarm,
            (Key
"cloudwatchLogs" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=)
              forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe CloudwatchLogsAction
cloudwatchLogs,
            (Key
"cloudwatchMetric" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=)
              forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe CloudwatchMetricAction
cloudwatchMetric,
            (Key
"dynamoDB" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=) forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe DynamoDBAction
dynamoDB,
            (Key
"dynamoDBv2" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=) forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe DynamoDBv2Action
dynamoDBv2,
            (Key
"elasticsearch" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=) forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe ElasticsearchAction
elasticsearch,
            (Key
"firehose" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=) forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe FirehoseAction
firehose,
            (Key
"http" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=) forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe HttpAction
http,
            (Key
"iotAnalytics" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=) forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe IotAnalyticsAction
iotAnalytics,
            (Key
"iotEvents" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=) forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe IotEventsAction
iotEvents,
            (Key
"iotSiteWise" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=) forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe IotSiteWiseAction
iotSiteWise,
            (Key
"kafka" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=) forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe KafkaAction
kafka,
            (Key
"kinesis" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=) forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe KinesisAction
kinesis,
            (Key
"lambda" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=) forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe LambdaAction
lambda,
            (Key
"location" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=) forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe LocationAction
location,
            (Key
"openSearch" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=) forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe OpenSearchAction
openSearch,
            (Key
"republish" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=) forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe RepublishAction
republish,
            (Key
"s3" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=) forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe S3Action
s3,
            (Key
"salesforce" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=) forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe SalesforceAction
salesforce,
            (Key
"sns" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=) forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe SnsAction
sns,
            (Key
"sqs" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=) forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe SqsAction
sqs,
            (Key
"stepFunctions" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=) forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe StepFunctionsAction
stepFunctions,
            (Key
"timestream" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=) forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe TimestreamAction
timestream
          ]
      )