{-# 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 #-}
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
data Target = Target'
{
Target -> Maybe RunCommandParameters
runCommandParameters :: Prelude.Maybe RunCommandParameters,
Target -> Maybe HttpParameters
httpParameters :: Prelude.Maybe HttpParameters,
Target -> Maybe KinesisParameters
kinesisParameters :: Prelude.Maybe KinesisParameters,
Target -> Maybe InputTransformer
inputTransformer :: Prelude.Maybe InputTransformer,
Target -> Maybe DeadLetterConfig
deadLetterConfig :: Prelude.Maybe DeadLetterConfig,
Target -> Maybe SageMakerPipelineParameters
sageMakerPipelineParameters :: Prelude.Maybe SageMakerPipelineParameters,
Target -> Maybe SqsParameters
sqsParameters :: Prelude.Maybe SqsParameters,
Target -> Maybe Text
input :: Prelude.Maybe Prelude.Text,
Target -> Maybe BatchParameters
batchParameters :: Prelude.Maybe BatchParameters,
Target -> Maybe RedshiftDataParameters
redshiftDataParameters :: Prelude.Maybe RedshiftDataParameters,
Target -> Maybe EcsParameters
ecsParameters :: Prelude.Maybe EcsParameters,
Target -> Maybe RetryPolicy
retryPolicy :: Prelude.Maybe RetryPolicy,
Target -> Maybe Text
inputPath :: Prelude.Maybe Prelude.Text,
Target -> Maybe Text
roleArn :: Prelude.Maybe Prelude.Text,
Target -> Text
id :: Prelude.Text,
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)
newTarget ::
Prelude.Text ->
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_
}
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)
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)
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)
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)
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)
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)
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)
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)
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)
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)
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)
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)
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)
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)
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)
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)
]
)