{-# 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.CloudWatchEvents.Types.Target
-- 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.CloudWatchEvents.Types.Target where

import Amazonka.CloudWatchEvents.Types.BatchParameters
import Amazonka.CloudWatchEvents.Types.DeadLetterConfig
import Amazonka.CloudWatchEvents.Types.EcsParameters
import Amazonka.CloudWatchEvents.Types.HttpParameters
import Amazonka.CloudWatchEvents.Types.InputTransformer
import Amazonka.CloudWatchEvents.Types.KinesisParameters
import Amazonka.CloudWatchEvents.Types.RedshiftDataParameters
import Amazonka.CloudWatchEvents.Types.RetryPolicy
import Amazonka.CloudWatchEvents.Types.RunCommandParameters
import Amazonka.CloudWatchEvents.Types.SageMakerPipelineParameters
import Amazonka.CloudWatchEvents.Types.SqsParameters
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude

-- | Targets are the resources to be invoked when a rule is triggered. For a
-- complete list of services and resources that can be set as a target, see
-- <https://docs.aws.amazon.com/eventbridge/latest/APIReference/API_PutTargets.html PutTargets>.
--
-- If you are setting the event bus of another account as the target, and
-- that account granted permission to your account through an organization
-- instead of directly by the account ID, then you must specify a @RoleArn@
-- with proper permissions in the @Target@ structure. For more information,
-- see
-- <https://docs.aws.amazon.com/eventbridge/latest/userguide/eventbridge-cross-account-event-delivery.html Sending and Receiving Events Between Amazon Web Services Accounts>
-- in the /Amazon EventBridge User Guide/.
--
-- /See:/ 'newTarget' smart constructor.
data Target = Target'
  { -- | Parameters used when you are using the rule to invoke Amazon EC2 Run
    -- Command.
    Target -> Maybe RunCommandParameters
runCommandParameters :: Prelude.Maybe RunCommandParameters,
    -- | Contains the HTTP parameters to use when the target is a API Gateway
    -- REST endpoint or EventBridge ApiDestination.
    --
    -- If you specify an API Gateway REST API or EventBridge ApiDestination as
    -- a target, you can use this parameter to specify headers, path
    -- parameters, and query string keys\/values as part of your target
    -- invoking request. If you\'re using ApiDestinations, the corresponding
    -- Connection can also have these values configured. In case of any
    -- conflicting keys, values from the Connection take precedence.
    Target -> Maybe HttpParameters
httpParameters :: Prelude.Maybe HttpParameters,
    -- | The custom parameter you can use to control the shard assignment, when
    -- the target is a Kinesis data stream. If you do not include this
    -- parameter, the default is to use the @eventId@ as the partition key.
    Target -> Maybe KinesisParameters
kinesisParameters :: Prelude.Maybe KinesisParameters,
    -- | Settings to enable you to provide custom input to a target based on
    -- certain event data. You can extract one or more key-value pairs from the
    -- event and then use that data to send customized input to the target.
    Target -> Maybe InputTransformer
inputTransformer :: Prelude.Maybe InputTransformer,
    -- | The @DeadLetterConfig@ that defines the target queue to send dead-letter
    -- queue events to.
    Target -> Maybe DeadLetterConfig
deadLetterConfig :: Prelude.Maybe DeadLetterConfig,
    -- | Contains the SageMaker Model Building Pipeline parameters to start
    -- execution of a SageMaker Model Building Pipeline.
    --
    -- If you specify a SageMaker Model Building Pipeline as a target, you can
    -- use this to specify parameters to start a pipeline execution based on
    -- EventBridge events.
    Target -> Maybe SageMakerPipelineParameters
sageMakerPipelineParameters :: Prelude.Maybe SageMakerPipelineParameters,
    -- | Contains the message group ID to use when the target is a FIFO queue.
    --
    -- If you specify an SQS FIFO queue as a target, the queue must have
    -- content-based deduplication enabled.
    Target -> Maybe SqsParameters
sqsParameters :: Prelude.Maybe SqsParameters,
    -- | Valid JSON text passed to the target. In this case, nothing from the
    -- event itself is passed to the target. For more information, see
    -- <http://www.rfc-editor.org/rfc/rfc7159.txt The JavaScript Object Notation (JSON) Data Interchange Format>.
    Target -> Maybe Text
input :: Prelude.Maybe Prelude.Text,
    -- | If the event target is an Batch job, this contains the job definition,
    -- job name, and other parameters. For more information, see
    -- <https://docs.aws.amazon.com/batch/latest/userguide/jobs.html Jobs> in
    -- the /Batch User Guide/.
    Target -> Maybe BatchParameters
batchParameters :: Prelude.Maybe BatchParameters,
    -- | Contains the Amazon Redshift Data API parameters to use when the target
    -- is a Amazon Redshift cluster.
    --
    -- If you specify a Amazon Redshift Cluster as a Target, you can use this
    -- to specify parameters to invoke the Amazon Redshift Data API
    -- ExecuteStatement based on EventBridge events.
    Target -> Maybe RedshiftDataParameters
redshiftDataParameters :: Prelude.Maybe RedshiftDataParameters,
    -- | Contains the Amazon ECS task definition and task count to be used, if
    -- the event target is an Amazon ECS task. For more information about
    -- Amazon ECS tasks, see
    -- <https://docs.aws.amazon.com/AmazonECS/latest/developerguide/task_defintions.html Task Definitions>
    -- in the /Amazon EC2 Container Service Developer Guide/.
    Target -> Maybe EcsParameters
ecsParameters :: Prelude.Maybe EcsParameters,
    -- | The @RetryPolicy@ object that contains the retry policy configuration to
    -- use for the dead-letter queue.
    Target -> Maybe RetryPolicy
retryPolicy :: Prelude.Maybe RetryPolicy,
    -- | The value of the JSONPath that is used for extracting part of the
    -- matched event when passing it to the target. You must use JSON dot
    -- notation, not bracket notation. For more information about JSON paths,
    -- see <http://goessner.net/articles/JsonPath/ JSONPath>.
    Target -> Maybe Text
inputPath :: Prelude.Maybe Prelude.Text,
    -- | The Amazon Resource Name (ARN) of the IAM role to be used for this
    -- target when the rule is triggered. If one rule triggers multiple
    -- targets, you can use a different IAM role for each target.
    Target -> Maybe Text
roleArn :: Prelude.Maybe Prelude.Text,
    -- | The ID of the target. We recommend using a memorable and unique string.
    Target -> Text
id :: Prelude.Text,
    -- | The Amazon Resource Name (ARN) of the target.
    Target -> Text
arn :: Prelude.Text
  }
  deriving (Target -> Target -> Bool
(Target -> Target -> Bool)
-> (Target -> Target -> Bool) -> Eq Target
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: Target -> Target -> Bool
$c/= :: Target -> Target -> Bool
== :: Target -> Target -> Bool
$c== :: Target -> Target -> Bool
Prelude.Eq, ReadPrec [Target]
ReadPrec Target
Int -> ReadS Target
ReadS [Target]
(Int -> ReadS Target)
-> ReadS [Target]
-> ReadPrec Target
-> ReadPrec [Target]
-> Read Target
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [Target]
$creadListPrec :: ReadPrec [Target]
readPrec :: ReadPrec Target
$creadPrec :: ReadPrec Target
readList :: ReadS [Target]
$creadList :: ReadS [Target]
readsPrec :: Int -> ReadS Target
$creadsPrec :: Int -> ReadS Target
Prelude.Read, Int -> Target -> ShowS
[Target] -> ShowS
Target -> String
(Int -> Target -> ShowS)
-> (Target -> String) -> ([Target] -> ShowS) -> Show Target
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [Target] -> ShowS
$cshowList :: [Target] -> ShowS
show :: Target -> String
$cshow :: Target -> String
showsPrec :: Int -> Target -> ShowS
$cshowsPrec :: Int -> Target -> ShowS
Prelude.Show, (forall x. Target -> Rep Target x)
-> (forall x. Rep Target x -> Target) -> Generic Target
forall x. Rep Target x -> Target
forall x. Target -> Rep Target x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep Target x -> Target
$cfrom :: forall x. Target -> Rep Target x
Prelude.Generic)

-- |
-- Create a value of 'Target' 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:
--
-- 'runCommandParameters', 'target_runCommandParameters' - Parameters used when you are using the rule to invoke Amazon EC2 Run
-- Command.
--
-- 'httpParameters', 'target_httpParameters' - Contains the HTTP parameters to use when the target is a API Gateway
-- REST endpoint or EventBridge ApiDestination.
--
-- If you specify an API Gateway REST API or EventBridge ApiDestination as
-- a target, you can use this parameter to specify headers, path
-- parameters, and query string keys\/values as part of your target
-- invoking request. If you\'re using ApiDestinations, the corresponding
-- Connection can also have these values configured. In case of any
-- conflicting keys, values from the Connection take precedence.
--
-- 'kinesisParameters', 'target_kinesisParameters' - The custom parameter you can use to control the shard assignment, when
-- the target is a Kinesis data stream. If you do not include this
-- parameter, the default is to use the @eventId@ as the partition key.
--
-- 'inputTransformer', 'target_inputTransformer' - Settings to enable you to provide custom input to a target based on
-- certain event data. You can extract one or more key-value pairs from the
-- event and then use that data to send customized input to the target.
--
-- 'deadLetterConfig', 'target_deadLetterConfig' - The @DeadLetterConfig@ that defines the target queue to send dead-letter
-- queue events to.
--
-- 'sageMakerPipelineParameters', 'target_sageMakerPipelineParameters' - Contains the SageMaker Model Building Pipeline parameters to start
-- execution of a SageMaker Model Building Pipeline.
--
-- If you specify a SageMaker Model Building Pipeline as a target, you can
-- use this to specify parameters to start a pipeline execution based on
-- EventBridge events.
--
-- 'sqsParameters', 'target_sqsParameters' - Contains the message group ID to use when the target is a FIFO queue.
--
-- If you specify an SQS FIFO queue as a target, the queue must have
-- content-based deduplication enabled.
--
-- 'input', 'target_input' - Valid JSON text passed to the target. In this case, nothing from the
-- event itself is passed to the target. For more information, see
-- <http://www.rfc-editor.org/rfc/rfc7159.txt The JavaScript Object Notation (JSON) Data Interchange Format>.
--
-- 'batchParameters', 'target_batchParameters' - If the event target is an Batch job, this contains the job definition,
-- job name, and other parameters. For more information, see
-- <https://docs.aws.amazon.com/batch/latest/userguide/jobs.html Jobs> in
-- the /Batch User Guide/.
--
-- 'redshiftDataParameters', 'target_redshiftDataParameters' - Contains the Amazon Redshift Data API parameters to use when the target
-- is a Amazon Redshift cluster.
--
-- If you specify a Amazon Redshift Cluster as a Target, you can use this
-- to specify parameters to invoke the Amazon Redshift Data API
-- ExecuteStatement based on EventBridge events.
--
-- 'ecsParameters', 'target_ecsParameters' - Contains the Amazon ECS task definition and task count to be used, if
-- the event target is an Amazon ECS task. For more information about
-- Amazon ECS tasks, see
-- <https://docs.aws.amazon.com/AmazonECS/latest/developerguide/task_defintions.html Task Definitions>
-- in the /Amazon EC2 Container Service Developer Guide/.
--
-- 'retryPolicy', 'target_retryPolicy' - The @RetryPolicy@ object that contains the retry policy configuration to
-- use for the dead-letter queue.
--
-- 'inputPath', 'target_inputPath' - The value of the JSONPath that is used for extracting part of the
-- matched event when passing it to the target. You must use JSON dot
-- notation, not bracket notation. For more information about JSON paths,
-- see <http://goessner.net/articles/JsonPath/ JSONPath>.
--
-- 'roleArn', 'target_roleArn' - The Amazon Resource Name (ARN) of the IAM role to be used for this
-- target when the rule is triggered. If one rule triggers multiple
-- targets, you can use a different IAM role for each target.
--
-- 'id', 'target_id' - The ID of the target. We recommend using a memorable and unique string.
--
-- 'arn', 'target_arn' - The Amazon Resource Name (ARN) of the target.
newTarget ::
  -- | 'id'
  Prelude.Text ->
  -- | 'arn'
  Prelude.Text ->
  Target
newTarget :: Text -> Text -> Target
newTarget Text
pId_ Text
pArn_ =
  Target' :: Maybe RunCommandParameters
-> Maybe HttpParameters
-> Maybe KinesisParameters
-> Maybe InputTransformer
-> Maybe DeadLetterConfig
-> Maybe SageMakerPipelineParameters
-> Maybe SqsParameters
-> Maybe Text
-> Maybe BatchParameters
-> Maybe RedshiftDataParameters
-> Maybe EcsParameters
-> Maybe RetryPolicy
-> Maybe Text
-> Maybe Text
-> Text
-> Text
-> Target
Target'
    { $sel:runCommandParameters:Target' :: Maybe RunCommandParameters
runCommandParameters = Maybe RunCommandParameters
forall a. Maybe a
Prelude.Nothing,
      $sel:httpParameters:Target' :: Maybe HttpParameters
httpParameters = Maybe HttpParameters
forall a. Maybe a
Prelude.Nothing,
      $sel:kinesisParameters:Target' :: Maybe KinesisParameters
kinesisParameters = Maybe KinesisParameters
forall a. Maybe a
Prelude.Nothing,
      $sel:inputTransformer:Target' :: Maybe InputTransformer
inputTransformer = Maybe InputTransformer
forall a. Maybe a
Prelude.Nothing,
      $sel:deadLetterConfig:Target' :: Maybe DeadLetterConfig
deadLetterConfig = Maybe DeadLetterConfig
forall a. Maybe a
Prelude.Nothing,
      $sel:sageMakerPipelineParameters:Target' :: Maybe SageMakerPipelineParameters
sageMakerPipelineParameters = Maybe SageMakerPipelineParameters
forall a. Maybe a
Prelude.Nothing,
      $sel:sqsParameters:Target' :: Maybe SqsParameters
sqsParameters = Maybe SqsParameters
forall a. Maybe a
Prelude.Nothing,
      $sel:input:Target' :: Maybe Text
input = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:batchParameters:Target' :: Maybe BatchParameters
batchParameters = Maybe BatchParameters
forall a. Maybe a
Prelude.Nothing,
      $sel:redshiftDataParameters:Target' :: Maybe RedshiftDataParameters
redshiftDataParameters = Maybe RedshiftDataParameters
forall a. Maybe a
Prelude.Nothing,
      $sel:ecsParameters:Target' :: Maybe EcsParameters
ecsParameters = Maybe EcsParameters
forall a. Maybe a
Prelude.Nothing,
      $sel:retryPolicy:Target' :: Maybe RetryPolicy
retryPolicy = Maybe RetryPolicy
forall a. Maybe a
Prelude.Nothing,
      $sel:inputPath:Target' :: Maybe Text
inputPath = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:roleArn:Target' :: Maybe Text
roleArn = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:id:Target' :: Text
id = Text
pId_,
      $sel:arn:Target' :: Text
arn = Text
pArn_
    }

-- | Parameters used when you are using the rule to invoke Amazon EC2 Run
-- Command.
target_runCommandParameters :: Lens.Lens' Target (Prelude.Maybe RunCommandParameters)
target_runCommandParameters :: (Maybe RunCommandParameters -> f (Maybe RunCommandParameters))
-> Target -> f Target
target_runCommandParameters = (Target -> Maybe RunCommandParameters)
-> (Target -> Maybe RunCommandParameters -> Target)
-> Lens
     Target
     Target
     (Maybe RunCommandParameters)
     (Maybe RunCommandParameters)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Target' {Maybe RunCommandParameters
runCommandParameters :: Maybe RunCommandParameters
$sel:runCommandParameters:Target' :: Target -> Maybe RunCommandParameters
runCommandParameters} -> Maybe RunCommandParameters
runCommandParameters) (\s :: Target
s@Target' {} Maybe RunCommandParameters
a -> Target
s {$sel:runCommandParameters:Target' :: Maybe RunCommandParameters
runCommandParameters = Maybe RunCommandParameters
a} :: Target)

-- | Contains the HTTP parameters to use when the target is a API Gateway
-- REST endpoint or EventBridge ApiDestination.
--
-- If you specify an API Gateway REST API or EventBridge ApiDestination as
-- a target, you can use this parameter to specify headers, path
-- parameters, and query string keys\/values as part of your target
-- invoking request. If you\'re using ApiDestinations, the corresponding
-- Connection can also have these values configured. In case of any
-- conflicting keys, values from the Connection take precedence.
target_httpParameters :: Lens.Lens' Target (Prelude.Maybe HttpParameters)
target_httpParameters :: (Maybe HttpParameters -> f (Maybe HttpParameters))
-> Target -> f Target
target_httpParameters = (Target -> Maybe HttpParameters)
-> (Target -> Maybe HttpParameters -> Target)
-> Lens Target Target (Maybe HttpParameters) (Maybe HttpParameters)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Target' {Maybe HttpParameters
httpParameters :: Maybe HttpParameters
$sel:httpParameters:Target' :: Target -> Maybe HttpParameters
httpParameters} -> Maybe HttpParameters
httpParameters) (\s :: Target
s@Target' {} Maybe HttpParameters
a -> Target
s {$sel:httpParameters:Target' :: Maybe HttpParameters
httpParameters = Maybe HttpParameters
a} :: Target)

-- | The custom parameter you can use to control the shard assignment, when
-- the target is a Kinesis data stream. If you do not include this
-- parameter, the default is to use the @eventId@ as the partition key.
target_kinesisParameters :: Lens.Lens' Target (Prelude.Maybe KinesisParameters)
target_kinesisParameters :: (Maybe KinesisParameters -> f (Maybe KinesisParameters))
-> Target -> f Target
target_kinesisParameters = (Target -> Maybe KinesisParameters)
-> (Target -> Maybe KinesisParameters -> Target)
-> Lens
     Target Target (Maybe KinesisParameters) (Maybe KinesisParameters)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Target' {Maybe KinesisParameters
kinesisParameters :: Maybe KinesisParameters
$sel:kinesisParameters:Target' :: Target -> Maybe KinesisParameters
kinesisParameters} -> Maybe KinesisParameters
kinesisParameters) (\s :: Target
s@Target' {} Maybe KinesisParameters
a -> Target
s {$sel:kinesisParameters:Target' :: Maybe KinesisParameters
kinesisParameters = Maybe KinesisParameters
a} :: Target)

-- | Settings to enable you to provide custom input to a target based on
-- certain event data. You can extract one or more key-value pairs from the
-- event and then use that data to send customized input to the target.
target_inputTransformer :: Lens.Lens' Target (Prelude.Maybe InputTransformer)
target_inputTransformer :: (Maybe InputTransformer -> f (Maybe InputTransformer))
-> Target -> f Target
target_inputTransformer = (Target -> Maybe InputTransformer)
-> (Target -> Maybe InputTransformer -> Target)
-> Lens
     Target Target (Maybe InputTransformer) (Maybe InputTransformer)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Target' {Maybe InputTransformer
inputTransformer :: Maybe InputTransformer
$sel:inputTransformer:Target' :: Target -> Maybe InputTransformer
inputTransformer} -> Maybe InputTransformer
inputTransformer) (\s :: Target
s@Target' {} Maybe InputTransformer
a -> Target
s {$sel:inputTransformer:Target' :: Maybe InputTransformer
inputTransformer = Maybe InputTransformer
a} :: Target)

-- | The @DeadLetterConfig@ that defines the target queue to send dead-letter
-- queue events to.
target_deadLetterConfig :: Lens.Lens' Target (Prelude.Maybe DeadLetterConfig)
target_deadLetterConfig :: (Maybe DeadLetterConfig -> f (Maybe DeadLetterConfig))
-> Target -> f Target
target_deadLetterConfig = (Target -> Maybe DeadLetterConfig)
-> (Target -> Maybe DeadLetterConfig -> Target)
-> Lens
     Target Target (Maybe DeadLetterConfig) (Maybe DeadLetterConfig)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Target' {Maybe DeadLetterConfig
deadLetterConfig :: Maybe DeadLetterConfig
$sel:deadLetterConfig:Target' :: Target -> Maybe DeadLetterConfig
deadLetterConfig} -> Maybe DeadLetterConfig
deadLetterConfig) (\s :: Target
s@Target' {} Maybe DeadLetterConfig
a -> Target
s {$sel:deadLetterConfig:Target' :: Maybe DeadLetterConfig
deadLetterConfig = Maybe DeadLetterConfig
a} :: Target)

-- | Contains the SageMaker Model Building Pipeline parameters to start
-- execution of a SageMaker Model Building Pipeline.
--
-- If you specify a SageMaker Model Building Pipeline as a target, you can
-- use this to specify parameters to start a pipeline execution based on
-- EventBridge events.
target_sageMakerPipelineParameters :: Lens.Lens' Target (Prelude.Maybe SageMakerPipelineParameters)
target_sageMakerPipelineParameters :: (Maybe SageMakerPipelineParameters
 -> f (Maybe SageMakerPipelineParameters))
-> Target -> f Target
target_sageMakerPipelineParameters = (Target -> Maybe SageMakerPipelineParameters)
-> (Target -> Maybe SageMakerPipelineParameters -> Target)
-> Lens
     Target
     Target
     (Maybe SageMakerPipelineParameters)
     (Maybe SageMakerPipelineParameters)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Target' {Maybe SageMakerPipelineParameters
sageMakerPipelineParameters :: Maybe SageMakerPipelineParameters
$sel:sageMakerPipelineParameters:Target' :: Target -> Maybe SageMakerPipelineParameters
sageMakerPipelineParameters} -> Maybe SageMakerPipelineParameters
sageMakerPipelineParameters) (\s :: Target
s@Target' {} Maybe SageMakerPipelineParameters
a -> Target
s {$sel:sageMakerPipelineParameters:Target' :: Maybe SageMakerPipelineParameters
sageMakerPipelineParameters = Maybe SageMakerPipelineParameters
a} :: Target)

-- | Contains the message group ID to use when the target is a FIFO queue.
--
-- If you specify an SQS FIFO queue as a target, the queue must have
-- content-based deduplication enabled.
target_sqsParameters :: Lens.Lens' Target (Prelude.Maybe SqsParameters)
target_sqsParameters :: (Maybe SqsParameters -> f (Maybe SqsParameters))
-> Target -> f Target
target_sqsParameters = (Target -> Maybe SqsParameters)
-> (Target -> Maybe SqsParameters -> Target)
-> Lens Target Target (Maybe SqsParameters) (Maybe SqsParameters)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Target' {Maybe SqsParameters
sqsParameters :: Maybe SqsParameters
$sel:sqsParameters:Target' :: Target -> Maybe SqsParameters
sqsParameters} -> Maybe SqsParameters
sqsParameters) (\s :: Target
s@Target' {} Maybe SqsParameters
a -> Target
s {$sel:sqsParameters:Target' :: Maybe SqsParameters
sqsParameters = Maybe SqsParameters
a} :: Target)

-- | Valid JSON text passed to the target. In this case, nothing from the
-- event itself is passed to the target. For more information, see
-- <http://www.rfc-editor.org/rfc/rfc7159.txt The JavaScript Object Notation (JSON) Data Interchange Format>.
target_input :: Lens.Lens' Target (Prelude.Maybe Prelude.Text)
target_input :: (Maybe Text -> f (Maybe Text)) -> Target -> f Target
target_input = (Target -> Maybe Text)
-> (Target -> Maybe Text -> Target)
-> Lens Target Target (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Target' {Maybe Text
input :: Maybe Text
$sel:input:Target' :: Target -> Maybe Text
input} -> Maybe Text
input) (\s :: Target
s@Target' {} Maybe Text
a -> Target
s {$sel:input:Target' :: Maybe Text
input = Maybe Text
a} :: Target)

-- | If the event target is an Batch job, this contains the job definition,
-- job name, and other parameters. For more information, see
-- <https://docs.aws.amazon.com/batch/latest/userguide/jobs.html Jobs> in
-- the /Batch User Guide/.
target_batchParameters :: Lens.Lens' Target (Prelude.Maybe BatchParameters)
target_batchParameters :: (Maybe BatchParameters -> f (Maybe BatchParameters))
-> Target -> f Target
target_batchParameters = (Target -> Maybe BatchParameters)
-> (Target -> Maybe BatchParameters -> Target)
-> Lens
     Target Target (Maybe BatchParameters) (Maybe BatchParameters)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Target' {Maybe BatchParameters
batchParameters :: Maybe BatchParameters
$sel:batchParameters:Target' :: Target -> Maybe BatchParameters
batchParameters} -> Maybe BatchParameters
batchParameters) (\s :: Target
s@Target' {} Maybe BatchParameters
a -> Target
s {$sel:batchParameters:Target' :: Maybe BatchParameters
batchParameters = Maybe BatchParameters
a} :: Target)

-- | Contains the Amazon Redshift Data API parameters to use when the target
-- is a Amazon Redshift cluster.
--
-- If you specify a Amazon Redshift Cluster as a Target, you can use this
-- to specify parameters to invoke the Amazon Redshift Data API
-- ExecuteStatement based on EventBridge events.
target_redshiftDataParameters :: Lens.Lens' Target (Prelude.Maybe RedshiftDataParameters)
target_redshiftDataParameters :: (Maybe RedshiftDataParameters -> f (Maybe RedshiftDataParameters))
-> Target -> f Target
target_redshiftDataParameters = (Target -> Maybe RedshiftDataParameters)
-> (Target -> Maybe RedshiftDataParameters -> Target)
-> Lens
     Target
     Target
     (Maybe RedshiftDataParameters)
     (Maybe RedshiftDataParameters)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Target' {Maybe RedshiftDataParameters
redshiftDataParameters :: Maybe RedshiftDataParameters
$sel:redshiftDataParameters:Target' :: Target -> Maybe RedshiftDataParameters
redshiftDataParameters} -> Maybe RedshiftDataParameters
redshiftDataParameters) (\s :: Target
s@Target' {} Maybe RedshiftDataParameters
a -> Target
s {$sel:redshiftDataParameters:Target' :: Maybe RedshiftDataParameters
redshiftDataParameters = Maybe RedshiftDataParameters
a} :: Target)

-- | Contains the Amazon ECS task definition and task count to be used, if
-- the event target is an Amazon ECS task. For more information about
-- Amazon ECS tasks, see
-- <https://docs.aws.amazon.com/AmazonECS/latest/developerguide/task_defintions.html Task Definitions>
-- in the /Amazon EC2 Container Service Developer Guide/.
target_ecsParameters :: Lens.Lens' Target (Prelude.Maybe EcsParameters)
target_ecsParameters :: (Maybe EcsParameters -> f (Maybe EcsParameters))
-> Target -> f Target
target_ecsParameters = (Target -> Maybe EcsParameters)
-> (Target -> Maybe EcsParameters -> Target)
-> Lens Target Target (Maybe EcsParameters) (Maybe EcsParameters)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Target' {Maybe EcsParameters
ecsParameters :: Maybe EcsParameters
$sel:ecsParameters:Target' :: Target -> Maybe EcsParameters
ecsParameters} -> Maybe EcsParameters
ecsParameters) (\s :: Target
s@Target' {} Maybe EcsParameters
a -> Target
s {$sel:ecsParameters:Target' :: Maybe EcsParameters
ecsParameters = Maybe EcsParameters
a} :: Target)

-- | The @RetryPolicy@ object that contains the retry policy configuration to
-- use for the dead-letter queue.
target_retryPolicy :: Lens.Lens' Target (Prelude.Maybe RetryPolicy)
target_retryPolicy :: (Maybe RetryPolicy -> f (Maybe RetryPolicy)) -> Target -> f Target
target_retryPolicy = (Target -> Maybe RetryPolicy)
-> (Target -> Maybe RetryPolicy -> Target)
-> Lens Target Target (Maybe RetryPolicy) (Maybe RetryPolicy)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Target' {Maybe RetryPolicy
retryPolicy :: Maybe RetryPolicy
$sel:retryPolicy:Target' :: Target -> Maybe RetryPolicy
retryPolicy} -> Maybe RetryPolicy
retryPolicy) (\s :: Target
s@Target' {} Maybe RetryPolicy
a -> Target
s {$sel:retryPolicy:Target' :: Maybe RetryPolicy
retryPolicy = Maybe RetryPolicy
a} :: Target)

-- | The value of the JSONPath that is used for extracting part of the
-- matched event when passing it to the target. You must use JSON dot
-- notation, not bracket notation. For more information about JSON paths,
-- see <http://goessner.net/articles/JsonPath/ JSONPath>.
target_inputPath :: Lens.Lens' Target (Prelude.Maybe Prelude.Text)
target_inputPath :: (Maybe Text -> f (Maybe Text)) -> Target -> f Target
target_inputPath = (Target -> Maybe Text)
-> (Target -> Maybe Text -> Target)
-> Lens Target Target (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Target' {Maybe Text
inputPath :: Maybe Text
$sel:inputPath:Target' :: Target -> Maybe Text
inputPath} -> Maybe Text
inputPath) (\s :: Target
s@Target' {} Maybe Text
a -> Target
s {$sel:inputPath:Target' :: Maybe Text
inputPath = Maybe Text
a} :: Target)

-- | The Amazon Resource Name (ARN) of the IAM role to be used for this
-- target when the rule is triggered. If one rule triggers multiple
-- targets, you can use a different IAM role for each target.
target_roleArn :: Lens.Lens' Target (Prelude.Maybe Prelude.Text)
target_roleArn :: (Maybe Text -> f (Maybe Text)) -> Target -> f Target
target_roleArn = (Target -> Maybe Text)
-> (Target -> Maybe Text -> Target)
-> Lens Target Target (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Target' {Maybe Text
roleArn :: Maybe Text
$sel:roleArn:Target' :: Target -> Maybe Text
roleArn} -> Maybe Text
roleArn) (\s :: Target
s@Target' {} Maybe Text
a -> Target
s {$sel:roleArn:Target' :: Maybe Text
roleArn = Maybe Text
a} :: Target)

-- | The ID of the target. We recommend using a memorable and unique string.
target_id :: Lens.Lens' Target Prelude.Text
target_id :: (Text -> f Text) -> Target -> f Target
target_id = (Target -> Text)
-> (Target -> Text -> Target) -> Lens Target Target Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Target' {Text
id :: Text
$sel:id:Target' :: Target -> Text
id} -> Text
id) (\s :: Target
s@Target' {} Text
a -> Target
s {$sel:id:Target' :: Text
id = Text
a} :: Target)

-- | The Amazon Resource Name (ARN) of the target.
target_arn :: Lens.Lens' Target Prelude.Text
target_arn :: (Text -> f Text) -> Target -> f Target
target_arn = (Target -> Text)
-> (Target -> Text -> Target) -> Lens Target Target Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Target' {Text
arn :: Text
$sel:arn:Target' :: Target -> Text
arn} -> Text
arn) (\s :: Target
s@Target' {} Text
a -> Target
s {$sel:arn:Target' :: Text
arn = Text
a} :: Target)

instance Core.FromJSON Target where
  parseJSON :: Value -> Parser Target
parseJSON =
    String -> (Object -> Parser Target) -> Value -> Parser Target
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
      String
"Target"
      ( \Object
x ->
          Maybe RunCommandParameters
-> Maybe HttpParameters
-> Maybe KinesisParameters
-> Maybe InputTransformer
-> Maybe DeadLetterConfig
-> Maybe SageMakerPipelineParameters
-> Maybe SqsParameters
-> Maybe Text
-> Maybe BatchParameters
-> Maybe RedshiftDataParameters
-> Maybe EcsParameters
-> Maybe RetryPolicy
-> Maybe Text
-> Maybe Text
-> Text
-> Text
-> Target
Target'
            (Maybe RunCommandParameters
 -> Maybe HttpParameters
 -> Maybe KinesisParameters
 -> Maybe InputTransformer
 -> Maybe DeadLetterConfig
 -> Maybe SageMakerPipelineParameters
 -> Maybe SqsParameters
 -> Maybe Text
 -> Maybe BatchParameters
 -> Maybe RedshiftDataParameters
 -> Maybe EcsParameters
 -> Maybe RetryPolicy
 -> Maybe Text
 -> Maybe Text
 -> Text
 -> Text
 -> Target)
-> Parser (Maybe RunCommandParameters)
-> Parser
     (Maybe HttpParameters
      -> Maybe KinesisParameters
      -> Maybe InputTransformer
      -> Maybe DeadLetterConfig
      -> Maybe SageMakerPipelineParameters
      -> Maybe SqsParameters
      -> Maybe Text
      -> Maybe BatchParameters
      -> Maybe RedshiftDataParameters
      -> Maybe EcsParameters
      -> Maybe RetryPolicy
      -> Maybe Text
      -> Maybe Text
      -> Text
      -> Text
      -> Target)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Parser (Maybe RunCommandParameters)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"RunCommandParameters")
            Parser
  (Maybe HttpParameters
   -> Maybe KinesisParameters
   -> Maybe InputTransformer
   -> Maybe DeadLetterConfig
   -> Maybe SageMakerPipelineParameters
   -> Maybe SqsParameters
   -> Maybe Text
   -> Maybe BatchParameters
   -> Maybe RedshiftDataParameters
   -> Maybe EcsParameters
   -> Maybe RetryPolicy
   -> Maybe Text
   -> Maybe Text
   -> Text
   -> Text
   -> Target)
-> Parser (Maybe HttpParameters)
-> Parser
     (Maybe KinesisParameters
      -> Maybe InputTransformer
      -> Maybe DeadLetterConfig
      -> Maybe SageMakerPipelineParameters
      -> Maybe SqsParameters
      -> Maybe Text
      -> Maybe BatchParameters
      -> Maybe RedshiftDataParameters
      -> Maybe EcsParameters
      -> Maybe RetryPolicy
      -> Maybe Text
      -> Maybe Text
      -> Text
      -> Text
      -> Target)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe HttpParameters)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"HttpParameters")
            Parser
  (Maybe KinesisParameters
   -> Maybe InputTransformer
   -> Maybe DeadLetterConfig
   -> Maybe SageMakerPipelineParameters
   -> Maybe SqsParameters
   -> Maybe Text
   -> Maybe BatchParameters
   -> Maybe RedshiftDataParameters
   -> Maybe EcsParameters
   -> Maybe RetryPolicy
   -> Maybe Text
   -> Maybe Text
   -> Text
   -> Text
   -> Target)
-> Parser (Maybe KinesisParameters)
-> Parser
     (Maybe InputTransformer
      -> Maybe DeadLetterConfig
      -> Maybe SageMakerPipelineParameters
      -> Maybe SqsParameters
      -> Maybe Text
      -> Maybe BatchParameters
      -> Maybe RedshiftDataParameters
      -> Maybe EcsParameters
      -> Maybe RetryPolicy
      -> Maybe Text
      -> Maybe Text
      -> Text
      -> Text
      -> Target)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe KinesisParameters)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"KinesisParameters")
            Parser
  (Maybe InputTransformer
   -> Maybe DeadLetterConfig
   -> Maybe SageMakerPipelineParameters
   -> Maybe SqsParameters
   -> Maybe Text
   -> Maybe BatchParameters
   -> Maybe RedshiftDataParameters
   -> Maybe EcsParameters
   -> Maybe RetryPolicy
   -> Maybe Text
   -> Maybe Text
   -> Text
   -> Text
   -> Target)
-> Parser (Maybe InputTransformer)
-> Parser
     (Maybe DeadLetterConfig
      -> Maybe SageMakerPipelineParameters
      -> Maybe SqsParameters
      -> Maybe Text
      -> Maybe BatchParameters
      -> Maybe RedshiftDataParameters
      -> Maybe EcsParameters
      -> Maybe RetryPolicy
      -> Maybe Text
      -> Maybe Text
      -> Text
      -> Text
      -> Target)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe InputTransformer)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"InputTransformer")
            Parser
  (Maybe DeadLetterConfig
   -> Maybe SageMakerPipelineParameters
   -> Maybe SqsParameters
   -> Maybe Text
   -> Maybe BatchParameters
   -> Maybe RedshiftDataParameters
   -> Maybe EcsParameters
   -> Maybe RetryPolicy
   -> Maybe Text
   -> Maybe Text
   -> Text
   -> Text
   -> Target)
-> Parser (Maybe DeadLetterConfig)
-> Parser
     (Maybe SageMakerPipelineParameters
      -> Maybe SqsParameters
      -> Maybe Text
      -> Maybe BatchParameters
      -> Maybe RedshiftDataParameters
      -> Maybe EcsParameters
      -> Maybe RetryPolicy
      -> Maybe Text
      -> Maybe Text
      -> Text
      -> Text
      -> Target)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe DeadLetterConfig)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"DeadLetterConfig")
            Parser
  (Maybe SageMakerPipelineParameters
   -> Maybe SqsParameters
   -> Maybe Text
   -> Maybe BatchParameters
   -> Maybe RedshiftDataParameters
   -> Maybe EcsParameters
   -> Maybe RetryPolicy
   -> Maybe Text
   -> Maybe Text
   -> Text
   -> Text
   -> Target)
-> Parser (Maybe SageMakerPipelineParameters)
-> Parser
     (Maybe SqsParameters
      -> Maybe Text
      -> Maybe BatchParameters
      -> Maybe RedshiftDataParameters
      -> Maybe EcsParameters
      -> Maybe RetryPolicy
      -> Maybe Text
      -> Maybe Text
      -> Text
      -> Text
      -> Target)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe SageMakerPipelineParameters)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"SageMakerPipelineParameters")
            Parser
  (Maybe SqsParameters
   -> Maybe Text
   -> Maybe BatchParameters
   -> Maybe RedshiftDataParameters
   -> Maybe EcsParameters
   -> Maybe RetryPolicy
   -> Maybe Text
   -> Maybe Text
   -> Text
   -> Text
   -> Target)
-> Parser (Maybe SqsParameters)
-> Parser
     (Maybe Text
      -> Maybe BatchParameters
      -> Maybe RedshiftDataParameters
      -> Maybe EcsParameters
      -> Maybe RetryPolicy
      -> Maybe Text
      -> Maybe Text
      -> Text
      -> Text
      -> Target)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe SqsParameters)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"SqsParameters")
            Parser
  (Maybe Text
   -> Maybe BatchParameters
   -> Maybe RedshiftDataParameters
   -> Maybe EcsParameters
   -> Maybe RetryPolicy
   -> Maybe Text
   -> Maybe Text
   -> Text
   -> Text
   -> Target)
-> Parser (Maybe Text)
-> Parser
     (Maybe BatchParameters
      -> Maybe RedshiftDataParameters
      -> Maybe EcsParameters
      -> Maybe RetryPolicy
      -> Maybe Text
      -> Maybe Text
      -> Text
      -> Text
      -> Target)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"Input")
            Parser
  (Maybe BatchParameters
   -> Maybe RedshiftDataParameters
   -> Maybe EcsParameters
   -> Maybe RetryPolicy
   -> Maybe Text
   -> Maybe Text
   -> Text
   -> Text
   -> Target)
-> Parser (Maybe BatchParameters)
-> Parser
     (Maybe RedshiftDataParameters
      -> Maybe EcsParameters
      -> Maybe RetryPolicy
      -> Maybe Text
      -> Maybe Text
      -> Text
      -> Text
      -> Target)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe BatchParameters)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"BatchParameters")
            Parser
  (Maybe RedshiftDataParameters
   -> Maybe EcsParameters
   -> Maybe RetryPolicy
   -> Maybe Text
   -> Maybe Text
   -> Text
   -> Text
   -> Target)
-> Parser (Maybe RedshiftDataParameters)
-> Parser
     (Maybe EcsParameters
      -> Maybe RetryPolicy
      -> Maybe Text
      -> Maybe Text
      -> Text
      -> Text
      -> Target)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe RedshiftDataParameters)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"RedshiftDataParameters")
            Parser
  (Maybe EcsParameters
   -> Maybe RetryPolicy
   -> Maybe Text
   -> Maybe Text
   -> Text
   -> Text
   -> Target)
-> Parser (Maybe EcsParameters)
-> Parser
     (Maybe RetryPolicy
      -> Maybe Text -> Maybe Text -> Text -> Text -> Target)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe EcsParameters)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"EcsParameters")
            Parser
  (Maybe RetryPolicy
   -> Maybe Text -> Maybe Text -> Text -> Text -> Target)
-> Parser (Maybe RetryPolicy)
-> Parser (Maybe Text -> Maybe Text -> Text -> Text -> Target)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe RetryPolicy)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"RetryPolicy")
            Parser (Maybe Text -> Maybe Text -> Text -> Text -> Target)
-> Parser (Maybe Text)
-> Parser (Maybe Text -> Text -> Text -> Target)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"InputPath")
            Parser (Maybe Text -> Text -> Text -> Target)
-> Parser (Maybe Text) -> Parser (Text -> Text -> Target)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"RoleArn")
            Parser (Text -> Text -> Target)
-> Parser Text -> Parser (Text -> Target)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser Text
forall a. FromJSON a => Object -> Text -> Parser a
Core..: Text
"Id")
            Parser (Text -> Target) -> Parser Text -> Parser Target
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser Text
forall a. FromJSON a => Object -> Text -> Parser a
Core..: Text
"Arn")
      )

instance Prelude.Hashable Target

instance Prelude.NFData Target

instance Core.ToJSON Target where
  toJSON :: Target -> Value
toJSON Target' {Maybe Text
Maybe BatchParameters
Maybe DeadLetterConfig
Maybe HttpParameters
Maybe InputTransformer
Maybe KinesisParameters
Maybe RedshiftDataParameters
Maybe RetryPolicy
Maybe RunCommandParameters
Maybe SageMakerPipelineParameters
Maybe SqsParameters
Maybe EcsParameters
Text
arn :: Text
id :: Text
roleArn :: Maybe Text
inputPath :: Maybe Text
retryPolicy :: Maybe RetryPolicy
ecsParameters :: Maybe EcsParameters
redshiftDataParameters :: Maybe RedshiftDataParameters
batchParameters :: Maybe BatchParameters
input :: Maybe Text
sqsParameters :: Maybe SqsParameters
sageMakerPipelineParameters :: Maybe SageMakerPipelineParameters
deadLetterConfig :: Maybe DeadLetterConfig
inputTransformer :: Maybe InputTransformer
kinesisParameters :: Maybe KinesisParameters
httpParameters :: Maybe HttpParameters
runCommandParameters :: Maybe RunCommandParameters
$sel:arn:Target' :: Target -> Text
$sel:id:Target' :: Target -> Text
$sel:roleArn:Target' :: Target -> Maybe Text
$sel:inputPath:Target' :: Target -> Maybe Text
$sel:retryPolicy:Target' :: Target -> Maybe RetryPolicy
$sel:ecsParameters:Target' :: Target -> Maybe EcsParameters
$sel:redshiftDataParameters:Target' :: Target -> Maybe RedshiftDataParameters
$sel:batchParameters:Target' :: Target -> Maybe BatchParameters
$sel:input:Target' :: Target -> Maybe Text
$sel:sqsParameters:Target' :: Target -> Maybe SqsParameters
$sel:sageMakerPipelineParameters:Target' :: Target -> Maybe SageMakerPipelineParameters
$sel:deadLetterConfig:Target' :: Target -> Maybe DeadLetterConfig
$sel:inputTransformer:Target' :: Target -> Maybe InputTransformer
$sel:kinesisParameters:Target' :: Target -> Maybe KinesisParameters
$sel:httpParameters:Target' :: Target -> Maybe HttpParameters
$sel:runCommandParameters:Target' :: Target -> Maybe RunCommandParameters
..} =
    [Pair] -> Value
Core.object
      ( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
          [ (Text
"RunCommandParameters" Text -> RunCommandParameters -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
              (RunCommandParameters -> Pair)
-> Maybe RunCommandParameters -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe RunCommandParameters
runCommandParameters,
            (Text
"HttpParameters" Text -> HttpParameters -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
              (HttpParameters -> Pair) -> Maybe HttpParameters -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe HttpParameters
httpParameters,
            (Text
"KinesisParameters" Text -> KinesisParameters -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
              (KinesisParameters -> Pair)
-> Maybe KinesisParameters -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe KinesisParameters
kinesisParameters,
            (Text
"InputTransformer" Text -> InputTransformer -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
              (InputTransformer -> Pair) -> Maybe InputTransformer -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe InputTransformer
inputTransformer,
            (Text
"DeadLetterConfig" Text -> DeadLetterConfig -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
              (DeadLetterConfig -> Pair) -> Maybe DeadLetterConfig -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe DeadLetterConfig
deadLetterConfig,
            (Text
"SageMakerPipelineParameters" Text -> SageMakerPipelineParameters -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
              (SageMakerPipelineParameters -> Pair)
-> Maybe SageMakerPipelineParameters -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe SageMakerPipelineParameters
sageMakerPipelineParameters,
            (Text
"SqsParameters" Text -> SqsParameters -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (SqsParameters -> Pair) -> Maybe SqsParameters -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe SqsParameters
sqsParameters,
            (Text
"Input" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (Text -> Pair) -> Maybe Text -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
input,
            (Text
"BatchParameters" Text -> BatchParameters -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
              (BatchParameters -> Pair) -> Maybe BatchParameters -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe BatchParameters
batchParameters,
            (Text
"RedshiftDataParameters" Text -> RedshiftDataParameters -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
              (RedshiftDataParameters -> Pair)
-> Maybe RedshiftDataParameters -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe RedshiftDataParameters
redshiftDataParameters,
            (Text
"EcsParameters" Text -> EcsParameters -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (EcsParameters -> Pair) -> Maybe EcsParameters -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe EcsParameters
ecsParameters,
            (Text
"RetryPolicy" Text -> RetryPolicy -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (RetryPolicy -> Pair) -> Maybe RetryPolicy -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe RetryPolicy
retryPolicy,
            (Text
"InputPath" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (Text -> Pair) -> Maybe Text -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
inputPath,
            (Text
"RoleArn" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (Text -> Pair) -> Maybe Text -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
roleArn,
            Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just (Text
"Id" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Text
id),
            Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just (Text
"Arn" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Text
arn)
          ]
      )