{-# 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.FIS.Types.CreateExperimentTemplateActionInput where
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
data CreateExperimentTemplateActionInput = CreateExperimentTemplateActionInput'
{
CreateExperimentTemplateActionInput -> Maybe [Text]
startAfter :: Prelude.Maybe [Prelude.Text],
CreateExperimentTemplateActionInput -> Maybe (HashMap Text Text)
parameters :: Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text),
CreateExperimentTemplateActionInput -> Maybe (HashMap Text Text)
targets :: Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text),
CreateExperimentTemplateActionInput -> Maybe Text
description :: Prelude.Maybe Prelude.Text,
CreateExperimentTemplateActionInput -> Text
actionId :: Prelude.Text
}
deriving (CreateExperimentTemplateActionInput
-> CreateExperimentTemplateActionInput -> Bool
(CreateExperimentTemplateActionInput
-> CreateExperimentTemplateActionInput -> Bool)
-> (CreateExperimentTemplateActionInput
-> CreateExperimentTemplateActionInput -> Bool)
-> Eq CreateExperimentTemplateActionInput
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: CreateExperimentTemplateActionInput
-> CreateExperimentTemplateActionInput -> Bool
$c/= :: CreateExperimentTemplateActionInput
-> CreateExperimentTemplateActionInput -> Bool
== :: CreateExperimentTemplateActionInput
-> CreateExperimentTemplateActionInput -> Bool
$c== :: CreateExperimentTemplateActionInput
-> CreateExperimentTemplateActionInput -> Bool
Prelude.Eq, ReadPrec [CreateExperimentTemplateActionInput]
ReadPrec CreateExperimentTemplateActionInput
Int -> ReadS CreateExperimentTemplateActionInput
ReadS [CreateExperimentTemplateActionInput]
(Int -> ReadS CreateExperimentTemplateActionInput)
-> ReadS [CreateExperimentTemplateActionInput]
-> ReadPrec CreateExperimentTemplateActionInput
-> ReadPrec [CreateExperimentTemplateActionInput]
-> Read CreateExperimentTemplateActionInput
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [CreateExperimentTemplateActionInput]
$creadListPrec :: ReadPrec [CreateExperimentTemplateActionInput]
readPrec :: ReadPrec CreateExperimentTemplateActionInput
$creadPrec :: ReadPrec CreateExperimentTemplateActionInput
readList :: ReadS [CreateExperimentTemplateActionInput]
$creadList :: ReadS [CreateExperimentTemplateActionInput]
readsPrec :: Int -> ReadS CreateExperimentTemplateActionInput
$creadsPrec :: Int -> ReadS CreateExperimentTemplateActionInput
Prelude.Read, Int -> CreateExperimentTemplateActionInput -> ShowS
[CreateExperimentTemplateActionInput] -> ShowS
CreateExperimentTemplateActionInput -> String
(Int -> CreateExperimentTemplateActionInput -> ShowS)
-> (CreateExperimentTemplateActionInput -> String)
-> ([CreateExperimentTemplateActionInput] -> ShowS)
-> Show CreateExperimentTemplateActionInput
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [CreateExperimentTemplateActionInput] -> ShowS
$cshowList :: [CreateExperimentTemplateActionInput] -> ShowS
show :: CreateExperimentTemplateActionInput -> String
$cshow :: CreateExperimentTemplateActionInput -> String
showsPrec :: Int -> CreateExperimentTemplateActionInput -> ShowS
$cshowsPrec :: Int -> CreateExperimentTemplateActionInput -> ShowS
Prelude.Show, (forall x.
CreateExperimentTemplateActionInput
-> Rep CreateExperimentTemplateActionInput x)
-> (forall x.
Rep CreateExperimentTemplateActionInput x
-> CreateExperimentTemplateActionInput)
-> Generic CreateExperimentTemplateActionInput
forall x.
Rep CreateExperimentTemplateActionInput x
-> CreateExperimentTemplateActionInput
forall x.
CreateExperimentTemplateActionInput
-> Rep CreateExperimentTemplateActionInput x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep CreateExperimentTemplateActionInput x
-> CreateExperimentTemplateActionInput
$cfrom :: forall x.
CreateExperimentTemplateActionInput
-> Rep CreateExperimentTemplateActionInput x
Prelude.Generic)
newCreateExperimentTemplateActionInput ::
Prelude.Text ->
CreateExperimentTemplateActionInput
newCreateExperimentTemplateActionInput :: Text -> CreateExperimentTemplateActionInput
newCreateExperimentTemplateActionInput Text
pActionId_ =
CreateExperimentTemplateActionInput' :: Maybe [Text]
-> Maybe (HashMap Text Text)
-> Maybe (HashMap Text Text)
-> Maybe Text
-> Text
-> CreateExperimentTemplateActionInput
CreateExperimentTemplateActionInput'
{ $sel:startAfter:CreateExperimentTemplateActionInput' :: Maybe [Text]
startAfter =
Maybe [Text]
forall a. Maybe a
Prelude.Nothing,
$sel:parameters:CreateExperimentTemplateActionInput' :: Maybe (HashMap Text Text)
parameters = Maybe (HashMap Text Text)
forall a. Maybe a
Prelude.Nothing,
$sel:targets:CreateExperimentTemplateActionInput' :: Maybe (HashMap Text Text)
targets = Maybe (HashMap Text Text)
forall a. Maybe a
Prelude.Nothing,
$sel:description:CreateExperimentTemplateActionInput' :: Maybe Text
description = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:actionId:CreateExperimentTemplateActionInput' :: Text
actionId = Text
pActionId_
}
createExperimentTemplateActionInput_startAfter :: Lens.Lens' CreateExperimentTemplateActionInput (Prelude.Maybe [Prelude.Text])
createExperimentTemplateActionInput_startAfter :: (Maybe [Text] -> f (Maybe [Text]))
-> CreateExperimentTemplateActionInput
-> f CreateExperimentTemplateActionInput
createExperimentTemplateActionInput_startAfter = (CreateExperimentTemplateActionInput -> Maybe [Text])
-> (CreateExperimentTemplateActionInput
-> Maybe [Text] -> CreateExperimentTemplateActionInput)
-> Lens
CreateExperimentTemplateActionInput
CreateExperimentTemplateActionInput
(Maybe [Text])
(Maybe [Text])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateExperimentTemplateActionInput' {Maybe [Text]
startAfter :: Maybe [Text]
$sel:startAfter:CreateExperimentTemplateActionInput' :: CreateExperimentTemplateActionInput -> Maybe [Text]
startAfter} -> Maybe [Text]
startAfter) (\s :: CreateExperimentTemplateActionInput
s@CreateExperimentTemplateActionInput' {} Maybe [Text]
a -> CreateExperimentTemplateActionInput
s {$sel:startAfter:CreateExperimentTemplateActionInput' :: Maybe [Text]
startAfter = Maybe [Text]
a} :: CreateExperimentTemplateActionInput) ((Maybe [Text] -> f (Maybe [Text]))
-> CreateExperimentTemplateActionInput
-> f CreateExperimentTemplateActionInput)
-> ((Maybe [Text] -> f (Maybe [Text]))
-> Maybe [Text] -> f (Maybe [Text]))
-> (Maybe [Text] -> f (Maybe [Text]))
-> CreateExperimentTemplateActionInput
-> f CreateExperimentTemplateActionInput
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso [Text] [Text] [Text] [Text]
-> Iso (Maybe [Text]) (Maybe [Text]) (Maybe [Text]) (Maybe [Text])
forall (f :: * -> *) (g :: * -> *) s t a b.
(Functor f, Functor g) =>
AnIso s t a b -> Iso (f s) (g t) (f a) (g b)
Lens.mapping AnIso [Text] [Text] [Text] [Text]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
createExperimentTemplateActionInput_parameters :: Lens.Lens' CreateExperimentTemplateActionInput (Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text))
createExperimentTemplateActionInput_parameters :: (Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
-> CreateExperimentTemplateActionInput
-> f CreateExperimentTemplateActionInput
createExperimentTemplateActionInput_parameters = (CreateExperimentTemplateActionInput -> Maybe (HashMap Text Text))
-> (CreateExperimentTemplateActionInput
-> Maybe (HashMap Text Text)
-> CreateExperimentTemplateActionInput)
-> Lens
CreateExperimentTemplateActionInput
CreateExperimentTemplateActionInput
(Maybe (HashMap Text Text))
(Maybe (HashMap Text Text))
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateExperimentTemplateActionInput' {Maybe (HashMap Text Text)
parameters :: Maybe (HashMap Text Text)
$sel:parameters:CreateExperimentTemplateActionInput' :: CreateExperimentTemplateActionInput -> Maybe (HashMap Text Text)
parameters} -> Maybe (HashMap Text Text)
parameters) (\s :: CreateExperimentTemplateActionInput
s@CreateExperimentTemplateActionInput' {} Maybe (HashMap Text Text)
a -> CreateExperimentTemplateActionInput
s {$sel:parameters:CreateExperimentTemplateActionInput' :: Maybe (HashMap Text Text)
parameters = Maybe (HashMap Text Text)
a} :: CreateExperimentTemplateActionInput) ((Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
-> CreateExperimentTemplateActionInput
-> f CreateExperimentTemplateActionInput)
-> ((Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
-> Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
-> (Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
-> CreateExperimentTemplateActionInput
-> f CreateExperimentTemplateActionInput
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso
(HashMap Text Text)
(HashMap Text Text)
(HashMap Text Text)
(HashMap Text Text)
-> Iso
(Maybe (HashMap Text Text))
(Maybe (HashMap Text Text))
(Maybe (HashMap Text Text))
(Maybe (HashMap Text Text))
forall (f :: * -> *) (g :: * -> *) s t a b.
(Functor f, Functor g) =>
AnIso s t a b -> Iso (f s) (g t) (f a) (g b)
Lens.mapping AnIso
(HashMap Text Text)
(HashMap Text Text)
(HashMap Text Text)
(HashMap Text Text)
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
createExperimentTemplateActionInput_targets :: Lens.Lens' CreateExperimentTemplateActionInput (Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text))
createExperimentTemplateActionInput_targets :: (Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
-> CreateExperimentTemplateActionInput
-> f CreateExperimentTemplateActionInput
createExperimentTemplateActionInput_targets = (CreateExperimentTemplateActionInput -> Maybe (HashMap Text Text))
-> (CreateExperimentTemplateActionInput
-> Maybe (HashMap Text Text)
-> CreateExperimentTemplateActionInput)
-> Lens
CreateExperimentTemplateActionInput
CreateExperimentTemplateActionInput
(Maybe (HashMap Text Text))
(Maybe (HashMap Text Text))
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateExperimentTemplateActionInput' {Maybe (HashMap Text Text)
targets :: Maybe (HashMap Text Text)
$sel:targets:CreateExperimentTemplateActionInput' :: CreateExperimentTemplateActionInput -> Maybe (HashMap Text Text)
targets} -> Maybe (HashMap Text Text)
targets) (\s :: CreateExperimentTemplateActionInput
s@CreateExperimentTemplateActionInput' {} Maybe (HashMap Text Text)
a -> CreateExperimentTemplateActionInput
s {$sel:targets:CreateExperimentTemplateActionInput' :: Maybe (HashMap Text Text)
targets = Maybe (HashMap Text Text)
a} :: CreateExperimentTemplateActionInput) ((Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
-> CreateExperimentTemplateActionInput
-> f CreateExperimentTemplateActionInput)
-> ((Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
-> Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
-> (Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
-> CreateExperimentTemplateActionInput
-> f CreateExperimentTemplateActionInput
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso
(HashMap Text Text)
(HashMap Text Text)
(HashMap Text Text)
(HashMap Text Text)
-> Iso
(Maybe (HashMap Text Text))
(Maybe (HashMap Text Text))
(Maybe (HashMap Text Text))
(Maybe (HashMap Text Text))
forall (f :: * -> *) (g :: * -> *) s t a b.
(Functor f, Functor g) =>
AnIso s t a b -> Iso (f s) (g t) (f a) (g b)
Lens.mapping AnIso
(HashMap Text Text)
(HashMap Text Text)
(HashMap Text Text)
(HashMap Text Text)
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
createExperimentTemplateActionInput_description :: Lens.Lens' CreateExperimentTemplateActionInput (Prelude.Maybe Prelude.Text)
createExperimentTemplateActionInput_description :: (Maybe Text -> f (Maybe Text))
-> CreateExperimentTemplateActionInput
-> f CreateExperimentTemplateActionInput
createExperimentTemplateActionInput_description = (CreateExperimentTemplateActionInput -> Maybe Text)
-> (CreateExperimentTemplateActionInput
-> Maybe Text -> CreateExperimentTemplateActionInput)
-> Lens
CreateExperimentTemplateActionInput
CreateExperimentTemplateActionInput
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateExperimentTemplateActionInput' {Maybe Text
description :: Maybe Text
$sel:description:CreateExperimentTemplateActionInput' :: CreateExperimentTemplateActionInput -> Maybe Text
description} -> Maybe Text
description) (\s :: CreateExperimentTemplateActionInput
s@CreateExperimentTemplateActionInput' {} Maybe Text
a -> CreateExperimentTemplateActionInput
s {$sel:description:CreateExperimentTemplateActionInput' :: Maybe Text
description = Maybe Text
a} :: CreateExperimentTemplateActionInput)
createExperimentTemplateActionInput_actionId :: Lens.Lens' CreateExperimentTemplateActionInput Prelude.Text
createExperimentTemplateActionInput_actionId :: (Text -> f Text)
-> CreateExperimentTemplateActionInput
-> f CreateExperimentTemplateActionInput
createExperimentTemplateActionInput_actionId = (CreateExperimentTemplateActionInput -> Text)
-> (CreateExperimentTemplateActionInput
-> Text -> CreateExperimentTemplateActionInput)
-> Lens
CreateExperimentTemplateActionInput
CreateExperimentTemplateActionInput
Text
Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateExperimentTemplateActionInput' {Text
actionId :: Text
$sel:actionId:CreateExperimentTemplateActionInput' :: CreateExperimentTemplateActionInput -> Text
actionId} -> Text
actionId) (\s :: CreateExperimentTemplateActionInput
s@CreateExperimentTemplateActionInput' {} Text
a -> CreateExperimentTemplateActionInput
s {$sel:actionId:CreateExperimentTemplateActionInput' :: Text
actionId = Text
a} :: CreateExperimentTemplateActionInput)
instance
Prelude.Hashable
CreateExperimentTemplateActionInput
instance
Prelude.NFData
CreateExperimentTemplateActionInput
instance
Core.ToJSON
CreateExperimentTemplateActionInput
where
toJSON :: CreateExperimentTemplateActionInput -> Value
toJSON CreateExperimentTemplateActionInput' {Maybe [Text]
Maybe Text
Maybe (HashMap Text Text)
Text
actionId :: Text
description :: Maybe Text
targets :: Maybe (HashMap Text Text)
parameters :: Maybe (HashMap Text Text)
startAfter :: Maybe [Text]
$sel:actionId:CreateExperimentTemplateActionInput' :: CreateExperimentTemplateActionInput -> Text
$sel:description:CreateExperimentTemplateActionInput' :: CreateExperimentTemplateActionInput -> Maybe Text
$sel:targets:CreateExperimentTemplateActionInput' :: CreateExperimentTemplateActionInput -> Maybe (HashMap Text Text)
$sel:parameters:CreateExperimentTemplateActionInput' :: CreateExperimentTemplateActionInput -> Maybe (HashMap Text Text)
$sel:startAfter:CreateExperimentTemplateActionInput' :: CreateExperimentTemplateActionInput -> Maybe [Text]
..} =
[Pair] -> Value
Core.object
( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
[ (Text
"startAfter" 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]
startAfter,
(Text
"parameters" Text -> HashMap Text Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (HashMap Text Text -> Pair)
-> Maybe (HashMap Text Text) -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (HashMap Text Text)
parameters,
(Text
"targets" Text -> HashMap Text Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (HashMap Text Text -> Pair)
-> Maybe (HashMap Text Text) -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (HashMap Text Text)
targets,
(Text
"description" 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
description,
Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just (Text
"actionId" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Text
actionId)
]
)