{-# 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-2021 Brendan Hay
-- License     : Mozilla Public License, v. 2.0.
-- Maintainer  : Brendan Hay <brendan.g.hay+amazonka@gmail.com>
-- Stability   : auto-generated
-- Portability : non-portable (GHC extensions)
module Amazonka.IoT.Types.Action where

import qualified Amazonka.Core as Core
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.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.Lens as Lens
import qualified Amazonka.Prelude as Prelude

-- | Describes the actions associated with a rule.
--
-- /See:/ 'newAction' smart constructor.
data Action = Action'
  { -- | Capture a CloudWatch metric.
    Action -> Maybe CloudwatchMetricAction
cloudwatchMetric :: Prelude.Maybe CloudwatchMetricAction,
    -- | Send data to CloudWatch Logs.
    Action -> Maybe CloudwatchLogsAction
cloudwatchLogs :: Prelude.Maybe CloudwatchLogsAction,
    -- | 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,
    -- | Starts execution of a Step Functions state machine.
    Action -> Maybe StepFunctionsAction
stepFunctions :: Prelude.Maybe StepFunctionsAction,
    -- | Change the state of a CloudWatch alarm.
    Action -> Maybe CloudwatchAlarmAction
cloudwatchAlarm :: Prelude.Maybe CloudwatchAlarmAction,
    -- | Publish to an Amazon SNS topic.
    Action -> Maybe SnsAction
sns :: Prelude.Maybe SnsAction,
    -- | Write to a DynamoDB table.
    Action -> Maybe DynamoDBAction
dynamoDB :: Prelude.Maybe DynamoDBAction,
    -- | Write to an Amazon Kinesis Firehose stream.
    Action -> Maybe FirehoseAction
firehose :: Prelude.Maybe FirehoseAction,
    -- | 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,
    -- | Sends data from the MQTT message that triggered the rule to IoT SiteWise
    -- asset properties.
    Action -> Maybe IotSiteWiseAction
iotSiteWise :: Prelude.Maybe IotSiteWiseAction,
    -- | Sends message data to an IoT Analytics channel.
    Action -> Maybe IotAnalyticsAction
iotAnalytics :: Prelude.Maybe IotAnalyticsAction,
    -- | Invoke a Lambda function.
    Action -> Maybe LambdaAction
lambda :: Prelude.Maybe LambdaAction,
    -- | Write data to an Amazon OpenSearch Service domain.
    Action -> Maybe OpenSearchAction
openSearch :: Prelude.Maybe OpenSearchAction,
    -- | Sends an input to an IoT Events detector.
    Action -> Maybe IotEventsAction
iotEvents :: Prelude.Maybe IotEventsAction,
    -- | Send a message to a Salesforce IoT Cloud Input Stream.
    Action -> Maybe SalesforceAction
salesforce :: Prelude.Maybe SalesforceAction,
    -- | Write data to an Amazon Kinesis stream.
    Action -> Maybe KinesisAction
kinesis :: Prelude.Maybe KinesisAction,
    -- | Write to an Amazon S3 bucket.
    Action -> Maybe S3Action
s3 :: Prelude.Maybe S3Action,
    -- | Send data to an HTTPS endpoint.
    Action -> Maybe HttpAction
http :: Prelude.Maybe HttpAction,
    -- | 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,
    -- | 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,
    -- | Publish to another MQTT topic.
    Action -> Maybe RepublishAction
republish :: Prelude.Maybe RepublishAction,
    -- | Publish to an Amazon SQS queue.
    Action -> Maybe SqsAction
sqs :: Prelude.Maybe SqsAction
  }
  deriving (Action -> Action -> Bool
(Action -> Action -> Bool)
-> (Action -> Action -> Bool) -> Eq Action
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]
(Int -> ReadS Action)
-> ReadS [Action]
-> ReadPrec Action
-> ReadPrec [Action]
-> Read 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
(Int -> Action -> ShowS)
-> (Action -> String) -> ([Action] -> ShowS) -> Show Action
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. Action -> Rep Action x)
-> (forall x. Rep Action x -> Action) -> Generic Action
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:
--
-- 'cloudwatchMetric', 'action_cloudwatchMetric' - Capture a CloudWatch metric.
--
-- 'cloudwatchLogs', 'action_cloudwatchLogs' - Send data to CloudWatch Logs.
--
-- '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.
--
-- 'stepFunctions', 'action_stepFunctions' - Starts execution of a Step Functions state machine.
--
-- 'cloudwatchAlarm', 'action_cloudwatchAlarm' - Change the state of a CloudWatch alarm.
--
-- 'sns', 'action_sns' - Publish to an Amazon SNS topic.
--
-- 'dynamoDB', 'action_dynamoDB' - Write to a DynamoDB table.
--
-- 'firehose', 'action_firehose' - Write to an Amazon Kinesis Firehose stream.
--
-- '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.
--
-- 'iotSiteWise', 'action_iotSiteWise' - Sends data from the MQTT message that triggered the rule to IoT SiteWise
-- asset properties.
--
-- 'iotAnalytics', 'action_iotAnalytics' - Sends message data to an IoT Analytics channel.
--
-- 'lambda', 'action_lambda' - Invoke a Lambda function.
--
-- 'openSearch', 'action_openSearch' - Write data to an Amazon OpenSearch Service domain.
--
-- 'iotEvents', 'action_iotEvents' - Sends an input to an IoT Events detector.
--
-- 'salesforce', 'action_salesforce' - Send a message to a Salesforce IoT Cloud Input Stream.
--
-- 'kinesis', 'action_kinesis' - Write data to an Amazon Kinesis stream.
--
-- 's3', 'action_s3' - Write to an Amazon S3 bucket.
--
-- 'http', 'action_http' - Send data to an HTTPS endpoint.
--
-- '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>.
--
-- 'kafka', 'action_kafka' - Send messages to an Amazon Managed Streaming for Apache Kafka (Amazon
-- MSK) or self-managed Apache Kafka cluster.
--
-- 'republish', 'action_republish' - Publish to another MQTT topic.
--
-- 'sqs', 'action_sqs' - Publish to an Amazon SQS queue.
newAction ::
  Action
newAction :: Action
newAction =
  Action' :: Maybe CloudwatchMetricAction
-> Maybe CloudwatchLogsAction
-> Maybe DynamoDBv2Action
-> Maybe StepFunctionsAction
-> Maybe CloudwatchAlarmAction
-> Maybe SnsAction
-> Maybe DynamoDBAction
-> Maybe FirehoseAction
-> Maybe TimestreamAction
-> Maybe IotSiteWiseAction
-> Maybe IotAnalyticsAction
-> Maybe LambdaAction
-> Maybe OpenSearchAction
-> Maybe IotEventsAction
-> Maybe SalesforceAction
-> Maybe KinesisAction
-> Maybe S3Action
-> Maybe HttpAction
-> Maybe ElasticsearchAction
-> Maybe KafkaAction
-> Maybe RepublishAction
-> Maybe SqsAction
-> Action
Action'
    { $sel:cloudwatchMetric:Action' :: Maybe CloudwatchMetricAction
cloudwatchMetric = Maybe CloudwatchMetricAction
forall a. Maybe a
Prelude.Nothing,
      $sel:cloudwatchLogs:Action' :: Maybe CloudwatchLogsAction
cloudwatchLogs = Maybe CloudwatchLogsAction
forall a. Maybe a
Prelude.Nothing,
      $sel:dynamoDBv2:Action' :: Maybe DynamoDBv2Action
dynamoDBv2 = Maybe DynamoDBv2Action
forall a. Maybe a
Prelude.Nothing,
      $sel:stepFunctions:Action' :: Maybe StepFunctionsAction
stepFunctions = Maybe StepFunctionsAction
forall a. Maybe a
Prelude.Nothing,
      $sel:cloudwatchAlarm:Action' :: Maybe CloudwatchAlarmAction
cloudwatchAlarm = Maybe CloudwatchAlarmAction
forall a. Maybe a
Prelude.Nothing,
      $sel:sns:Action' :: Maybe SnsAction
sns = Maybe SnsAction
forall a. Maybe a
Prelude.Nothing,
      $sel:dynamoDB:Action' :: Maybe DynamoDBAction
dynamoDB = Maybe DynamoDBAction
forall a. Maybe a
Prelude.Nothing,
      $sel:firehose:Action' :: Maybe FirehoseAction
firehose = Maybe FirehoseAction
forall a. Maybe a
Prelude.Nothing,
      $sel:timestream:Action' :: Maybe TimestreamAction
timestream = Maybe TimestreamAction
forall a. Maybe a
Prelude.Nothing,
      $sel:iotSiteWise:Action' :: Maybe IotSiteWiseAction
iotSiteWise = Maybe IotSiteWiseAction
forall a. Maybe a
Prelude.Nothing,
      $sel:iotAnalytics:Action' :: Maybe IotAnalyticsAction
iotAnalytics = Maybe IotAnalyticsAction
forall a. Maybe a
Prelude.Nothing,
      $sel:lambda:Action' :: Maybe LambdaAction
lambda = Maybe LambdaAction
forall a. Maybe a
Prelude.Nothing,
      $sel:openSearch:Action' :: Maybe OpenSearchAction
openSearch = Maybe OpenSearchAction
forall a. Maybe a
Prelude.Nothing,
      $sel:iotEvents:Action' :: Maybe IotEventsAction
iotEvents = Maybe IotEventsAction
forall a. Maybe a
Prelude.Nothing,
      $sel:salesforce:Action' :: Maybe SalesforceAction
salesforce = Maybe SalesforceAction
forall a. Maybe a
Prelude.Nothing,
      $sel:kinesis:Action' :: Maybe KinesisAction
kinesis = Maybe KinesisAction
forall a. Maybe a
Prelude.Nothing,
      $sel:s3:Action' :: Maybe S3Action
s3 = Maybe S3Action
forall a. Maybe a
Prelude.Nothing,
      $sel:http:Action' :: Maybe HttpAction
http = Maybe HttpAction
forall a. Maybe a
Prelude.Nothing,
      $sel:elasticsearch:Action' :: Maybe ElasticsearchAction
elasticsearch = Maybe ElasticsearchAction
forall a. Maybe a
Prelude.Nothing,
      $sel:kafka:Action' :: Maybe KafkaAction
kafka = Maybe KafkaAction
forall a. Maybe a
Prelude.Nothing,
      $sel:republish:Action' :: Maybe RepublishAction
republish = Maybe RepublishAction
forall a. Maybe a
Prelude.Nothing,
      $sel:sqs:Action' :: Maybe SqsAction
sqs = Maybe SqsAction
forall a. Maybe a
Prelude.Nothing
    }

-- | Capture a CloudWatch metric.
action_cloudwatchMetric :: Lens.Lens' Action (Prelude.Maybe CloudwatchMetricAction)
action_cloudwatchMetric :: (Maybe CloudwatchMetricAction -> f (Maybe CloudwatchMetricAction))
-> Action -> f Action
action_cloudwatchMetric = (Action -> Maybe CloudwatchMetricAction)
-> (Action -> Maybe CloudwatchMetricAction -> Action)
-> Lens
     Action
     Action
     (Maybe CloudwatchMetricAction)
     (Maybe CloudwatchMetricAction)
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)

-- | Send data to CloudWatch Logs.
action_cloudwatchLogs :: Lens.Lens' Action (Prelude.Maybe CloudwatchLogsAction)
action_cloudwatchLogs :: (Maybe CloudwatchLogsAction -> f (Maybe CloudwatchLogsAction))
-> Action -> f Action
action_cloudwatchLogs = (Action -> Maybe CloudwatchLogsAction)
-> (Action -> Maybe CloudwatchLogsAction -> Action)
-> Lens
     Action
     Action
     (Maybe CloudwatchLogsAction)
     (Maybe CloudwatchLogsAction)
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)

-- | 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 :: (Maybe DynamoDBv2Action -> f (Maybe DynamoDBv2Action))
-> Action -> f Action
action_dynamoDBv2 = (Action -> Maybe DynamoDBv2Action)
-> (Action -> Maybe DynamoDBv2Action -> Action)
-> Lens
     Action Action (Maybe DynamoDBv2Action) (Maybe DynamoDBv2Action)
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)

-- | Starts execution of a Step Functions state machine.
action_stepFunctions :: Lens.Lens' Action (Prelude.Maybe StepFunctionsAction)
action_stepFunctions :: (Maybe StepFunctionsAction -> f (Maybe StepFunctionsAction))
-> Action -> f Action
action_stepFunctions = (Action -> Maybe StepFunctionsAction)
-> (Action -> Maybe StepFunctionsAction -> Action)
-> Lens
     Action
     Action
     (Maybe StepFunctionsAction)
     (Maybe StepFunctionsAction)
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)

-- | Change the state of a CloudWatch alarm.
action_cloudwatchAlarm :: Lens.Lens' Action (Prelude.Maybe CloudwatchAlarmAction)
action_cloudwatchAlarm :: (Maybe CloudwatchAlarmAction -> f (Maybe CloudwatchAlarmAction))
-> Action -> f Action
action_cloudwatchAlarm = (Action -> Maybe CloudwatchAlarmAction)
-> (Action -> Maybe CloudwatchAlarmAction -> Action)
-> Lens
     Action
     Action
     (Maybe CloudwatchAlarmAction)
     (Maybe CloudwatchAlarmAction)
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)

-- | Publish to an Amazon SNS topic.
action_sns :: Lens.Lens' Action (Prelude.Maybe SnsAction)
action_sns :: (Maybe SnsAction -> f (Maybe SnsAction)) -> Action -> f Action
action_sns = (Action -> Maybe SnsAction)
-> (Action -> Maybe SnsAction -> Action)
-> Lens Action Action (Maybe SnsAction) (Maybe SnsAction)
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)

-- | Write to a DynamoDB table.
action_dynamoDB :: Lens.Lens' Action (Prelude.Maybe DynamoDBAction)
action_dynamoDB :: (Maybe DynamoDBAction -> f (Maybe DynamoDBAction))
-> Action -> f Action
action_dynamoDB = (Action -> Maybe DynamoDBAction)
-> (Action -> Maybe DynamoDBAction -> Action)
-> Lens Action Action (Maybe DynamoDBAction) (Maybe DynamoDBAction)
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 an Amazon Kinesis Firehose stream.
action_firehose :: Lens.Lens' Action (Prelude.Maybe FirehoseAction)
action_firehose :: (Maybe FirehoseAction -> f (Maybe FirehoseAction))
-> Action -> f Action
action_firehose = (Action -> Maybe FirehoseAction)
-> (Action -> Maybe FirehoseAction -> Action)
-> Lens Action Action (Maybe FirehoseAction) (Maybe FirehoseAction)
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)

-- | 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 :: (Maybe TimestreamAction -> f (Maybe TimestreamAction))
-> Action -> f Action
action_timestream = (Action -> Maybe TimestreamAction)
-> (Action -> Maybe TimestreamAction -> Action)
-> Lens
     Action Action (Maybe TimestreamAction) (Maybe TimestreamAction)
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)

-- | 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 :: (Maybe IotSiteWiseAction -> f (Maybe IotSiteWiseAction))
-> Action -> f Action
action_iotSiteWise = (Action -> Maybe IotSiteWiseAction)
-> (Action -> Maybe IotSiteWiseAction -> Action)
-> Lens
     Action Action (Maybe IotSiteWiseAction) (Maybe IotSiteWiseAction)
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)

-- | Sends message data to an IoT Analytics channel.
action_iotAnalytics :: Lens.Lens' Action (Prelude.Maybe IotAnalyticsAction)
action_iotAnalytics :: (Maybe IotAnalyticsAction -> f (Maybe IotAnalyticsAction))
-> Action -> f Action
action_iotAnalytics = (Action -> Maybe IotAnalyticsAction)
-> (Action -> Maybe IotAnalyticsAction -> Action)
-> Lens
     Action Action (Maybe IotAnalyticsAction) (Maybe IotAnalyticsAction)
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)

-- | Invoke a Lambda function.
action_lambda :: Lens.Lens' Action (Prelude.Maybe LambdaAction)
action_lambda :: (Maybe LambdaAction -> f (Maybe LambdaAction))
-> Action -> f Action
action_lambda = (Action -> Maybe LambdaAction)
-> (Action -> Maybe LambdaAction -> Action)
-> Lens Action Action (Maybe LambdaAction) (Maybe LambdaAction)
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)

-- | Write data to an Amazon OpenSearch Service domain.
action_openSearch :: Lens.Lens' Action (Prelude.Maybe OpenSearchAction)
action_openSearch :: (Maybe OpenSearchAction -> f (Maybe OpenSearchAction))
-> Action -> f Action
action_openSearch = (Action -> Maybe OpenSearchAction)
-> (Action -> Maybe OpenSearchAction -> Action)
-> Lens
     Action Action (Maybe OpenSearchAction) (Maybe OpenSearchAction)
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)

-- | Sends an input to an IoT Events detector.
action_iotEvents :: Lens.Lens' Action (Prelude.Maybe IotEventsAction)
action_iotEvents :: (Maybe IotEventsAction -> f (Maybe IotEventsAction))
-> Action -> f Action
action_iotEvents = (Action -> Maybe IotEventsAction)
-> (Action -> Maybe IotEventsAction -> Action)
-> Lens
     Action Action (Maybe IotEventsAction) (Maybe IotEventsAction)
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)

-- | Send a message to a Salesforce IoT Cloud Input Stream.
action_salesforce :: Lens.Lens' Action (Prelude.Maybe SalesforceAction)
action_salesforce :: (Maybe SalesforceAction -> f (Maybe SalesforceAction))
-> Action -> f Action
action_salesforce = (Action -> Maybe SalesforceAction)
-> (Action -> Maybe SalesforceAction -> Action)
-> Lens
     Action Action (Maybe SalesforceAction) (Maybe SalesforceAction)
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)

-- | Write data to an Amazon Kinesis stream.
action_kinesis :: Lens.Lens' Action (Prelude.Maybe KinesisAction)
action_kinesis :: (Maybe KinesisAction -> f (Maybe KinesisAction))
-> Action -> f Action
action_kinesis = (Action -> Maybe KinesisAction)
-> (Action -> Maybe KinesisAction -> Action)
-> Lens Action Action (Maybe KinesisAction) (Maybe KinesisAction)
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)

-- | Write to an Amazon S3 bucket.
action_s3 :: Lens.Lens' Action (Prelude.Maybe S3Action)
action_s3 :: (Maybe S3Action -> f (Maybe S3Action)) -> Action -> f Action
action_s3 = (Action -> Maybe S3Action)
-> (Action -> Maybe S3Action -> Action)
-> Lens Action Action (Maybe S3Action) (Maybe S3Action)
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 data to an HTTPS endpoint.
action_http :: Lens.Lens' Action (Prelude.Maybe HttpAction)
action_http :: (Maybe HttpAction -> f (Maybe HttpAction)) -> Action -> f Action
action_http = (Action -> Maybe HttpAction)
-> (Action -> Maybe HttpAction -> Action)
-> Lens Action Action (Maybe HttpAction) (Maybe HttpAction)
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)

-- | 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 :: (Maybe ElasticsearchAction -> f (Maybe ElasticsearchAction))
-> Action -> f Action
action_elasticsearch = (Action -> Maybe ElasticsearchAction)
-> (Action -> Maybe ElasticsearchAction -> Action)
-> Lens
     Action
     Action
     (Maybe ElasticsearchAction)
     (Maybe ElasticsearchAction)
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)

-- | 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 :: (Maybe KafkaAction -> f (Maybe KafkaAction)) -> Action -> f Action
action_kafka = (Action -> Maybe KafkaAction)
-> (Action -> Maybe KafkaAction -> Action)
-> Lens Action Action (Maybe KafkaAction) (Maybe KafkaAction)
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)

-- | Publish to another MQTT topic.
action_republish :: Lens.Lens' Action (Prelude.Maybe RepublishAction)
action_republish :: (Maybe RepublishAction -> f (Maybe RepublishAction))
-> Action -> f Action
action_republish = (Action -> Maybe RepublishAction)
-> (Action -> Maybe RepublishAction -> Action)
-> Lens
     Action Action (Maybe RepublishAction) (Maybe RepublishAction)
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)

-- | Publish to an Amazon SQS queue.
action_sqs :: Lens.Lens' Action (Prelude.Maybe SqsAction)
action_sqs :: (Maybe SqsAction -> f (Maybe SqsAction)) -> Action -> f Action
action_sqs = (Action -> Maybe SqsAction)
-> (Action -> Maybe SqsAction -> Action)
-> Lens Action Action (Maybe SqsAction) (Maybe SqsAction)
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)

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

instance Prelude.Hashable Action

instance Prelude.NFData Action

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