{-# 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.CreateExperimentTemplateStopConditionInput where
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
data CreateExperimentTemplateStopConditionInput = CreateExperimentTemplateStopConditionInput'
{
CreateExperimentTemplateStopConditionInput -> Maybe Text
value :: Prelude.Maybe Prelude.Text,
CreateExperimentTemplateStopConditionInput -> Text
source :: Prelude.Text
}
deriving (CreateExperimentTemplateStopConditionInput
-> CreateExperimentTemplateStopConditionInput -> Bool
(CreateExperimentTemplateStopConditionInput
-> CreateExperimentTemplateStopConditionInput -> Bool)
-> (CreateExperimentTemplateStopConditionInput
-> CreateExperimentTemplateStopConditionInput -> Bool)
-> Eq CreateExperimentTemplateStopConditionInput
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: CreateExperimentTemplateStopConditionInput
-> CreateExperimentTemplateStopConditionInput -> Bool
$c/= :: CreateExperimentTemplateStopConditionInput
-> CreateExperimentTemplateStopConditionInput -> Bool
== :: CreateExperimentTemplateStopConditionInput
-> CreateExperimentTemplateStopConditionInput -> Bool
$c== :: CreateExperimentTemplateStopConditionInput
-> CreateExperimentTemplateStopConditionInput -> Bool
Prelude.Eq, ReadPrec [CreateExperimentTemplateStopConditionInput]
ReadPrec CreateExperimentTemplateStopConditionInput
Int -> ReadS CreateExperimentTemplateStopConditionInput
ReadS [CreateExperimentTemplateStopConditionInput]
(Int -> ReadS CreateExperimentTemplateStopConditionInput)
-> ReadS [CreateExperimentTemplateStopConditionInput]
-> ReadPrec CreateExperimentTemplateStopConditionInput
-> ReadPrec [CreateExperimentTemplateStopConditionInput]
-> Read CreateExperimentTemplateStopConditionInput
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [CreateExperimentTemplateStopConditionInput]
$creadListPrec :: ReadPrec [CreateExperimentTemplateStopConditionInput]
readPrec :: ReadPrec CreateExperimentTemplateStopConditionInput
$creadPrec :: ReadPrec CreateExperimentTemplateStopConditionInput
readList :: ReadS [CreateExperimentTemplateStopConditionInput]
$creadList :: ReadS [CreateExperimentTemplateStopConditionInput]
readsPrec :: Int -> ReadS CreateExperimentTemplateStopConditionInput
$creadsPrec :: Int -> ReadS CreateExperimentTemplateStopConditionInput
Prelude.Read, Int -> CreateExperimentTemplateStopConditionInput -> ShowS
[CreateExperimentTemplateStopConditionInput] -> ShowS
CreateExperimentTemplateStopConditionInput -> String
(Int -> CreateExperimentTemplateStopConditionInput -> ShowS)
-> (CreateExperimentTemplateStopConditionInput -> String)
-> ([CreateExperimentTemplateStopConditionInput] -> ShowS)
-> Show CreateExperimentTemplateStopConditionInput
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [CreateExperimentTemplateStopConditionInput] -> ShowS
$cshowList :: [CreateExperimentTemplateStopConditionInput] -> ShowS
show :: CreateExperimentTemplateStopConditionInput -> String
$cshow :: CreateExperimentTemplateStopConditionInput -> String
showsPrec :: Int -> CreateExperimentTemplateStopConditionInput -> ShowS
$cshowsPrec :: Int -> CreateExperimentTemplateStopConditionInput -> ShowS
Prelude.Show, (forall x.
CreateExperimentTemplateStopConditionInput
-> Rep CreateExperimentTemplateStopConditionInput x)
-> (forall x.
Rep CreateExperimentTemplateStopConditionInput x
-> CreateExperimentTemplateStopConditionInput)
-> Generic CreateExperimentTemplateStopConditionInput
forall x.
Rep CreateExperimentTemplateStopConditionInput x
-> CreateExperimentTemplateStopConditionInput
forall x.
CreateExperimentTemplateStopConditionInput
-> Rep CreateExperimentTemplateStopConditionInput x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep CreateExperimentTemplateStopConditionInput x
-> CreateExperimentTemplateStopConditionInput
$cfrom :: forall x.
CreateExperimentTemplateStopConditionInput
-> Rep CreateExperimentTemplateStopConditionInput x
Prelude.Generic)
newCreateExperimentTemplateStopConditionInput ::
Prelude.Text ->
CreateExperimentTemplateStopConditionInput
newCreateExperimentTemplateStopConditionInput :: Text -> CreateExperimentTemplateStopConditionInput
newCreateExperimentTemplateStopConditionInput
Text
pSource_ =
CreateExperimentTemplateStopConditionInput' :: Maybe Text -> Text -> CreateExperimentTemplateStopConditionInput
CreateExperimentTemplateStopConditionInput'
{ $sel:value:CreateExperimentTemplateStopConditionInput' :: Maybe Text
value =
Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:source:CreateExperimentTemplateStopConditionInput' :: Text
source = Text
pSource_
}
createExperimentTemplateStopConditionInput_value :: Lens.Lens' CreateExperimentTemplateStopConditionInput (Prelude.Maybe Prelude.Text)
createExperimentTemplateStopConditionInput_value :: (Maybe Text -> f (Maybe Text))
-> CreateExperimentTemplateStopConditionInput
-> f CreateExperimentTemplateStopConditionInput
createExperimentTemplateStopConditionInput_value = (CreateExperimentTemplateStopConditionInput -> Maybe Text)
-> (CreateExperimentTemplateStopConditionInput
-> Maybe Text -> CreateExperimentTemplateStopConditionInput)
-> Lens
CreateExperimentTemplateStopConditionInput
CreateExperimentTemplateStopConditionInput
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateExperimentTemplateStopConditionInput' {Maybe Text
value :: Maybe Text
$sel:value:CreateExperimentTemplateStopConditionInput' :: CreateExperimentTemplateStopConditionInput -> Maybe Text
value} -> Maybe Text
value) (\s :: CreateExperimentTemplateStopConditionInput
s@CreateExperimentTemplateStopConditionInput' {} Maybe Text
a -> CreateExperimentTemplateStopConditionInput
s {$sel:value:CreateExperimentTemplateStopConditionInput' :: Maybe Text
value = Maybe Text
a} :: CreateExperimentTemplateStopConditionInput)
createExperimentTemplateStopConditionInput_source :: Lens.Lens' CreateExperimentTemplateStopConditionInput Prelude.Text
createExperimentTemplateStopConditionInput_source :: (Text -> f Text)
-> CreateExperimentTemplateStopConditionInput
-> f CreateExperimentTemplateStopConditionInput
createExperimentTemplateStopConditionInput_source = (CreateExperimentTemplateStopConditionInput -> Text)
-> (CreateExperimentTemplateStopConditionInput
-> Text -> CreateExperimentTemplateStopConditionInput)
-> Lens
CreateExperimentTemplateStopConditionInput
CreateExperimentTemplateStopConditionInput
Text
Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateExperimentTemplateStopConditionInput' {Text
source :: Text
$sel:source:CreateExperimentTemplateStopConditionInput' :: CreateExperimentTemplateStopConditionInput -> Text
source} -> Text
source) (\s :: CreateExperimentTemplateStopConditionInput
s@CreateExperimentTemplateStopConditionInput' {} Text
a -> CreateExperimentTemplateStopConditionInput
s {$sel:source:CreateExperimentTemplateStopConditionInput' :: Text
source = Text
a} :: CreateExperimentTemplateStopConditionInput)
instance
Prelude.Hashable
CreateExperimentTemplateStopConditionInput
instance
Prelude.NFData
CreateExperimentTemplateStopConditionInput
instance
Core.ToJSON
CreateExperimentTemplateStopConditionInput
where
toJSON :: CreateExperimentTemplateStopConditionInput -> Value
toJSON
CreateExperimentTemplateStopConditionInput' {Maybe Text
Text
source :: Text
value :: Maybe Text
$sel:source:CreateExperimentTemplateStopConditionInput' :: CreateExperimentTemplateStopConditionInput -> Text
$sel:value:CreateExperimentTemplateStopConditionInput' :: CreateExperimentTemplateStopConditionInput -> Maybe Text
..} =
[Pair] -> Value
Core.object
( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
[ (Text
"value" 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
value,
Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just (Text
"source" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Text
source)
]
)