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