{-# 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.Experiment where
import qualified Amazonka.Core as Core
import Amazonka.FIS.Types.ExperimentAction
import Amazonka.FIS.Types.ExperimentState
import Amazonka.FIS.Types.ExperimentStopCondition
import Amazonka.FIS.Types.ExperimentTarget
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
data Experiment = Experiment'
{
Experiment -> Maybe POSIX
creationTime :: Prelude.Maybe Core.POSIX,
Experiment -> Maybe Text
experimentTemplateId :: Prelude.Maybe Prelude.Text,
Experiment -> Maybe ExperimentState
state :: Prelude.Maybe ExperimentState,
Experiment -> Maybe (HashMap Text ExperimentAction)
actions :: Prelude.Maybe (Prelude.HashMap Prelude.Text ExperimentAction),
Experiment -> Maybe POSIX
startTime :: Prelude.Maybe Core.POSIX,
Experiment -> Maybe [ExperimentStopCondition]
stopConditions :: Prelude.Maybe [ExperimentStopCondition],
Experiment -> Maybe POSIX
endTime :: Prelude.Maybe Core.POSIX,
Experiment -> Maybe (HashMap Text ExperimentTarget)
targets :: Prelude.Maybe (Prelude.HashMap Prelude.Text ExperimentTarget),
Experiment -> Maybe Text
id :: Prelude.Maybe Prelude.Text,
Experiment -> Maybe (HashMap Text Text)
tags :: Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text),
Experiment -> Maybe Text
roleArn :: Prelude.Maybe Prelude.Text
}
deriving (Experiment -> Experiment -> Bool
(Experiment -> Experiment -> Bool)
-> (Experiment -> Experiment -> Bool) -> Eq Experiment
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: Experiment -> Experiment -> Bool
$c/= :: Experiment -> Experiment -> Bool
== :: Experiment -> Experiment -> Bool
$c== :: Experiment -> Experiment -> Bool
Prelude.Eq, ReadPrec [Experiment]
ReadPrec Experiment
Int -> ReadS Experiment
ReadS [Experiment]
(Int -> ReadS Experiment)
-> ReadS [Experiment]
-> ReadPrec Experiment
-> ReadPrec [Experiment]
-> Read Experiment
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [Experiment]
$creadListPrec :: ReadPrec [Experiment]
readPrec :: ReadPrec Experiment
$creadPrec :: ReadPrec Experiment
readList :: ReadS [Experiment]
$creadList :: ReadS [Experiment]
readsPrec :: Int -> ReadS Experiment
$creadsPrec :: Int -> ReadS Experiment
Prelude.Read, Int -> Experiment -> ShowS
[Experiment] -> ShowS
Experiment -> String
(Int -> Experiment -> ShowS)
-> (Experiment -> String)
-> ([Experiment] -> ShowS)
-> Show Experiment
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [Experiment] -> ShowS
$cshowList :: [Experiment] -> ShowS
show :: Experiment -> String
$cshow :: Experiment -> String
showsPrec :: Int -> Experiment -> ShowS
$cshowsPrec :: Int -> Experiment -> ShowS
Prelude.Show, (forall x. Experiment -> Rep Experiment x)
-> (forall x. Rep Experiment x -> Experiment) -> Generic Experiment
forall x. Rep Experiment x -> Experiment
forall x. Experiment -> Rep Experiment x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep Experiment x -> Experiment
$cfrom :: forall x. Experiment -> Rep Experiment x
Prelude.Generic)
newExperiment ::
Experiment
newExperiment :: Experiment
newExperiment =
Experiment' :: Maybe POSIX
-> Maybe Text
-> Maybe ExperimentState
-> Maybe (HashMap Text ExperimentAction)
-> Maybe POSIX
-> Maybe [ExperimentStopCondition]
-> Maybe POSIX
-> Maybe (HashMap Text ExperimentTarget)
-> Maybe Text
-> Maybe (HashMap Text Text)
-> Maybe Text
-> Experiment
Experiment'
{ $sel:creationTime:Experiment' :: Maybe POSIX
creationTime = Maybe POSIX
forall a. Maybe a
Prelude.Nothing,
$sel:experimentTemplateId:Experiment' :: Maybe Text
experimentTemplateId = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:state:Experiment' :: Maybe ExperimentState
state = Maybe ExperimentState
forall a. Maybe a
Prelude.Nothing,
$sel:actions:Experiment' :: Maybe (HashMap Text ExperimentAction)
actions = Maybe (HashMap Text ExperimentAction)
forall a. Maybe a
Prelude.Nothing,
$sel:startTime:Experiment' :: Maybe POSIX
startTime = Maybe POSIX
forall a. Maybe a
Prelude.Nothing,
$sel:stopConditions:Experiment' :: Maybe [ExperimentStopCondition]
stopConditions = Maybe [ExperimentStopCondition]
forall a. Maybe a
Prelude.Nothing,
$sel:endTime:Experiment' :: Maybe POSIX
endTime = Maybe POSIX
forall a. Maybe a
Prelude.Nothing,
$sel:targets:Experiment' :: Maybe (HashMap Text ExperimentTarget)
targets = Maybe (HashMap Text ExperimentTarget)
forall a. Maybe a
Prelude.Nothing,
$sel:id:Experiment' :: Maybe Text
id = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:tags:Experiment' :: Maybe (HashMap Text Text)
tags = Maybe (HashMap Text Text)
forall a. Maybe a
Prelude.Nothing,
$sel:roleArn:Experiment' :: Maybe Text
roleArn = Maybe Text
forall a. Maybe a
Prelude.Nothing
}
experiment_creationTime :: Lens.Lens' Experiment (Prelude.Maybe Prelude.UTCTime)
experiment_creationTime :: (Maybe UTCTime -> f (Maybe UTCTime)) -> Experiment -> f Experiment
experiment_creationTime = (Experiment -> Maybe POSIX)
-> (Experiment -> Maybe POSIX -> Experiment)
-> Lens Experiment Experiment (Maybe POSIX) (Maybe POSIX)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Experiment' {Maybe POSIX
creationTime :: Maybe POSIX
$sel:creationTime:Experiment' :: Experiment -> Maybe POSIX
creationTime} -> Maybe POSIX
creationTime) (\s :: Experiment
s@Experiment' {} Maybe POSIX
a -> Experiment
s {$sel:creationTime:Experiment' :: Maybe POSIX
creationTime = Maybe POSIX
a} :: Experiment) ((Maybe POSIX -> f (Maybe POSIX)) -> Experiment -> f Experiment)
-> ((Maybe UTCTime -> f (Maybe UTCTime))
-> Maybe POSIX -> f (Maybe POSIX))
-> (Maybe UTCTime -> f (Maybe UTCTime))
-> Experiment
-> f Experiment
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso POSIX POSIX UTCTime UTCTime
-> Iso (Maybe POSIX) (Maybe POSIX) (Maybe UTCTime) (Maybe UTCTime)
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 POSIX POSIX UTCTime UTCTime
forall (a :: Format). Iso' (Time a) UTCTime
Core._Time
experiment_experimentTemplateId :: Lens.Lens' Experiment (Prelude.Maybe Prelude.Text)
experiment_experimentTemplateId :: (Maybe Text -> f (Maybe Text)) -> Experiment -> f Experiment
experiment_experimentTemplateId = (Experiment -> Maybe Text)
-> (Experiment -> Maybe Text -> Experiment)
-> Lens Experiment Experiment (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Experiment' {Maybe Text
experimentTemplateId :: Maybe Text
$sel:experimentTemplateId:Experiment' :: Experiment -> Maybe Text
experimentTemplateId} -> Maybe Text
experimentTemplateId) (\s :: Experiment
s@Experiment' {} Maybe Text
a -> Experiment
s {$sel:experimentTemplateId:Experiment' :: Maybe Text
experimentTemplateId = Maybe Text
a} :: Experiment)
experiment_state :: Lens.Lens' Experiment (Prelude.Maybe ExperimentState)
experiment_state :: (Maybe ExperimentState -> f (Maybe ExperimentState))
-> Experiment -> f Experiment
experiment_state = (Experiment -> Maybe ExperimentState)
-> (Experiment -> Maybe ExperimentState -> Experiment)
-> Lens
Experiment
Experiment
(Maybe ExperimentState)
(Maybe ExperimentState)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Experiment' {Maybe ExperimentState
state :: Maybe ExperimentState
$sel:state:Experiment' :: Experiment -> Maybe ExperimentState
state} -> Maybe ExperimentState
state) (\s :: Experiment
s@Experiment' {} Maybe ExperimentState
a -> Experiment
s {$sel:state:Experiment' :: Maybe ExperimentState
state = Maybe ExperimentState
a} :: Experiment)
experiment_actions :: Lens.Lens' Experiment (Prelude.Maybe (Prelude.HashMap Prelude.Text ExperimentAction))
experiment_actions :: (Maybe (HashMap Text ExperimentAction)
-> f (Maybe (HashMap Text ExperimentAction)))
-> Experiment -> f Experiment
experiment_actions = (Experiment -> Maybe (HashMap Text ExperimentAction))
-> (Experiment
-> Maybe (HashMap Text ExperimentAction) -> Experiment)
-> Lens
Experiment
Experiment
(Maybe (HashMap Text ExperimentAction))
(Maybe (HashMap Text ExperimentAction))
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Experiment' {Maybe (HashMap Text ExperimentAction)
actions :: Maybe (HashMap Text ExperimentAction)
$sel:actions:Experiment' :: Experiment -> Maybe (HashMap Text ExperimentAction)
actions} -> Maybe (HashMap Text ExperimentAction)
actions) (\s :: Experiment
s@Experiment' {} Maybe (HashMap Text ExperimentAction)
a -> Experiment
s {$sel:actions:Experiment' :: Maybe (HashMap Text ExperimentAction)
actions = Maybe (HashMap Text ExperimentAction)
a} :: Experiment) ((Maybe (HashMap Text ExperimentAction)
-> f (Maybe (HashMap Text ExperimentAction)))
-> Experiment -> f Experiment)
-> ((Maybe (HashMap Text ExperimentAction)
-> f (Maybe (HashMap Text ExperimentAction)))
-> Maybe (HashMap Text ExperimentAction)
-> f (Maybe (HashMap Text ExperimentAction)))
-> (Maybe (HashMap Text ExperimentAction)
-> f (Maybe (HashMap Text ExperimentAction)))
-> Experiment
-> f Experiment
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso
(HashMap Text ExperimentAction)
(HashMap Text ExperimentAction)
(HashMap Text ExperimentAction)
(HashMap Text ExperimentAction)
-> Iso
(Maybe (HashMap Text ExperimentAction))
(Maybe (HashMap Text ExperimentAction))
(Maybe (HashMap Text ExperimentAction))
(Maybe (HashMap Text ExperimentAction))
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 ExperimentAction)
(HashMap Text ExperimentAction)
(HashMap Text ExperimentAction)
(HashMap Text ExperimentAction)
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
experiment_startTime :: Lens.Lens' Experiment (Prelude.Maybe Prelude.UTCTime)
experiment_startTime :: (Maybe UTCTime -> f (Maybe UTCTime)) -> Experiment -> f Experiment
experiment_startTime = (Experiment -> Maybe POSIX)
-> (Experiment -> Maybe POSIX -> Experiment)
-> Lens Experiment Experiment (Maybe POSIX) (Maybe POSIX)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Experiment' {Maybe POSIX
startTime :: Maybe POSIX
$sel:startTime:Experiment' :: Experiment -> Maybe POSIX
startTime} -> Maybe POSIX
startTime) (\s :: Experiment
s@Experiment' {} Maybe POSIX
a -> Experiment
s {$sel:startTime:Experiment' :: Maybe POSIX
startTime = Maybe POSIX
a} :: Experiment) ((Maybe POSIX -> f (Maybe POSIX)) -> Experiment -> f Experiment)
-> ((Maybe UTCTime -> f (Maybe UTCTime))
-> Maybe POSIX -> f (Maybe POSIX))
-> (Maybe UTCTime -> f (Maybe UTCTime))
-> Experiment
-> f Experiment
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso POSIX POSIX UTCTime UTCTime
-> Iso (Maybe POSIX) (Maybe POSIX) (Maybe UTCTime) (Maybe UTCTime)
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 POSIX POSIX UTCTime UTCTime
forall (a :: Format). Iso' (Time a) UTCTime
Core._Time
experiment_stopConditions :: Lens.Lens' Experiment (Prelude.Maybe [ExperimentStopCondition])
experiment_stopConditions :: (Maybe [ExperimentStopCondition]
-> f (Maybe [ExperimentStopCondition]))
-> Experiment -> f Experiment
experiment_stopConditions = (Experiment -> Maybe [ExperimentStopCondition])
-> (Experiment -> Maybe [ExperimentStopCondition] -> Experiment)
-> Lens
Experiment
Experiment
(Maybe [ExperimentStopCondition])
(Maybe [ExperimentStopCondition])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Experiment' {Maybe [ExperimentStopCondition]
stopConditions :: Maybe [ExperimentStopCondition]
$sel:stopConditions:Experiment' :: Experiment -> Maybe [ExperimentStopCondition]
stopConditions} -> Maybe [ExperimentStopCondition]
stopConditions) (\s :: Experiment
s@Experiment' {} Maybe [ExperimentStopCondition]
a -> Experiment
s {$sel:stopConditions:Experiment' :: Maybe [ExperimentStopCondition]
stopConditions = Maybe [ExperimentStopCondition]
a} :: Experiment) ((Maybe [ExperimentStopCondition]
-> f (Maybe [ExperimentStopCondition]))
-> Experiment -> f Experiment)
-> ((Maybe [ExperimentStopCondition]
-> f (Maybe [ExperimentStopCondition]))
-> Maybe [ExperimentStopCondition]
-> f (Maybe [ExperimentStopCondition]))
-> (Maybe [ExperimentStopCondition]
-> f (Maybe [ExperimentStopCondition]))
-> Experiment
-> f Experiment
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso
[ExperimentStopCondition]
[ExperimentStopCondition]
[ExperimentStopCondition]
[ExperimentStopCondition]
-> Iso
(Maybe [ExperimentStopCondition])
(Maybe [ExperimentStopCondition])
(Maybe [ExperimentStopCondition])
(Maybe [ExperimentStopCondition])
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
[ExperimentStopCondition]
[ExperimentStopCondition]
[ExperimentStopCondition]
[ExperimentStopCondition]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
experiment_endTime :: Lens.Lens' Experiment (Prelude.Maybe Prelude.UTCTime)
experiment_endTime :: (Maybe UTCTime -> f (Maybe UTCTime)) -> Experiment -> f Experiment
experiment_endTime = (Experiment -> Maybe POSIX)
-> (Experiment -> Maybe POSIX -> Experiment)
-> Lens Experiment Experiment (Maybe POSIX) (Maybe POSIX)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Experiment' {Maybe POSIX
endTime :: Maybe POSIX
$sel:endTime:Experiment' :: Experiment -> Maybe POSIX
endTime} -> Maybe POSIX
endTime) (\s :: Experiment
s@Experiment' {} Maybe POSIX
a -> Experiment
s {$sel:endTime:Experiment' :: Maybe POSIX
endTime = Maybe POSIX
a} :: Experiment) ((Maybe POSIX -> f (Maybe POSIX)) -> Experiment -> f Experiment)
-> ((Maybe UTCTime -> f (Maybe UTCTime))
-> Maybe POSIX -> f (Maybe POSIX))
-> (Maybe UTCTime -> f (Maybe UTCTime))
-> Experiment
-> f Experiment
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso POSIX POSIX UTCTime UTCTime
-> Iso (Maybe POSIX) (Maybe POSIX) (Maybe UTCTime) (Maybe UTCTime)
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 POSIX POSIX UTCTime UTCTime
forall (a :: Format). Iso' (Time a) UTCTime
Core._Time
experiment_targets :: Lens.Lens' Experiment (Prelude.Maybe (Prelude.HashMap Prelude.Text ExperimentTarget))
experiment_targets :: (Maybe (HashMap Text ExperimentTarget)
-> f (Maybe (HashMap Text ExperimentTarget)))
-> Experiment -> f Experiment
experiment_targets = (Experiment -> Maybe (HashMap Text ExperimentTarget))
-> (Experiment
-> Maybe (HashMap Text ExperimentTarget) -> Experiment)
-> Lens
Experiment
Experiment
(Maybe (HashMap Text ExperimentTarget))
(Maybe (HashMap Text ExperimentTarget))
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Experiment' {Maybe (HashMap Text ExperimentTarget)
targets :: Maybe (HashMap Text ExperimentTarget)
$sel:targets:Experiment' :: Experiment -> Maybe (HashMap Text ExperimentTarget)
targets} -> Maybe (HashMap Text ExperimentTarget)
targets) (\s :: Experiment
s@Experiment' {} Maybe (HashMap Text ExperimentTarget)
a -> Experiment
s {$sel:targets:Experiment' :: Maybe (HashMap Text ExperimentTarget)
targets = Maybe (HashMap Text ExperimentTarget)
a} :: Experiment) ((Maybe (HashMap Text ExperimentTarget)
-> f (Maybe (HashMap Text ExperimentTarget)))
-> Experiment -> f Experiment)
-> ((Maybe (HashMap Text ExperimentTarget)
-> f (Maybe (HashMap Text ExperimentTarget)))
-> Maybe (HashMap Text ExperimentTarget)
-> f (Maybe (HashMap Text ExperimentTarget)))
-> (Maybe (HashMap Text ExperimentTarget)
-> f (Maybe (HashMap Text ExperimentTarget)))
-> Experiment
-> f Experiment
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso
(HashMap Text ExperimentTarget)
(HashMap Text ExperimentTarget)
(HashMap Text ExperimentTarget)
(HashMap Text ExperimentTarget)
-> Iso
(Maybe (HashMap Text ExperimentTarget))
(Maybe (HashMap Text ExperimentTarget))
(Maybe (HashMap Text ExperimentTarget))
(Maybe (HashMap Text ExperimentTarget))
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 ExperimentTarget)
(HashMap Text ExperimentTarget)
(HashMap Text ExperimentTarget)
(HashMap Text ExperimentTarget)
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
experiment_id :: Lens.Lens' Experiment (Prelude.Maybe Prelude.Text)
experiment_id :: (Maybe Text -> f (Maybe Text)) -> Experiment -> f Experiment
experiment_id = (Experiment -> Maybe Text)
-> (Experiment -> Maybe Text -> Experiment)
-> Lens Experiment Experiment (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Experiment' {Maybe Text
id :: Maybe Text
$sel:id:Experiment' :: Experiment -> Maybe Text
id} -> Maybe Text
id) (\s :: Experiment
s@Experiment' {} Maybe Text
a -> Experiment
s {$sel:id:Experiment' :: Maybe Text
id = Maybe Text
a} :: Experiment)
experiment_tags :: Lens.Lens' Experiment (Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text))
experiment_tags :: (Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
-> Experiment -> f Experiment
experiment_tags = (Experiment -> Maybe (HashMap Text Text))
-> (Experiment -> Maybe (HashMap Text Text) -> Experiment)
-> Lens
Experiment
Experiment
(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 (\Experiment' {Maybe (HashMap Text Text)
tags :: Maybe (HashMap Text Text)
$sel:tags:Experiment' :: Experiment -> Maybe (HashMap Text Text)
tags} -> Maybe (HashMap Text Text)
tags) (\s :: Experiment
s@Experiment' {} Maybe (HashMap Text Text)
a -> Experiment
s {$sel:tags:Experiment' :: Maybe (HashMap Text Text)
tags = Maybe (HashMap Text Text)
a} :: Experiment) ((Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
-> Experiment -> f Experiment)
-> ((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)))
-> Experiment
-> f Experiment
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
experiment_roleArn :: Lens.Lens' Experiment (Prelude.Maybe Prelude.Text)
experiment_roleArn :: (Maybe Text -> f (Maybe Text)) -> Experiment -> f Experiment
experiment_roleArn = (Experiment -> Maybe Text)
-> (Experiment -> Maybe Text -> Experiment)
-> Lens Experiment Experiment (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Experiment' {Maybe Text
roleArn :: Maybe Text
$sel:roleArn:Experiment' :: Experiment -> Maybe Text
roleArn} -> Maybe Text
roleArn) (\s :: Experiment
s@Experiment' {} Maybe Text
a -> Experiment
s {$sel:roleArn:Experiment' :: Maybe Text
roleArn = Maybe Text
a} :: Experiment)
instance Core.FromJSON Experiment where
parseJSON :: Value -> Parser Experiment
parseJSON =
String
-> (Object -> Parser Experiment) -> Value -> Parser Experiment
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
String
"Experiment"
( \Object
x ->
Maybe POSIX
-> Maybe Text
-> Maybe ExperimentState
-> Maybe (HashMap Text ExperimentAction)
-> Maybe POSIX
-> Maybe [ExperimentStopCondition]
-> Maybe POSIX
-> Maybe (HashMap Text ExperimentTarget)
-> Maybe Text
-> Maybe (HashMap Text Text)
-> Maybe Text
-> Experiment
Experiment'
(Maybe POSIX
-> Maybe Text
-> Maybe ExperimentState
-> Maybe (HashMap Text ExperimentAction)
-> Maybe POSIX
-> Maybe [ExperimentStopCondition]
-> Maybe POSIX
-> Maybe (HashMap Text ExperimentTarget)
-> Maybe Text
-> Maybe (HashMap Text Text)
-> Maybe Text
-> Experiment)
-> Parser (Maybe POSIX)
-> Parser
(Maybe Text
-> Maybe ExperimentState
-> Maybe (HashMap Text ExperimentAction)
-> Maybe POSIX
-> Maybe [ExperimentStopCondition]
-> Maybe POSIX
-> Maybe (HashMap Text ExperimentTarget)
-> Maybe Text
-> Maybe (HashMap Text Text)
-> Maybe Text
-> Experiment)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Parser (Maybe POSIX)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"creationTime")
Parser
(Maybe Text
-> Maybe ExperimentState
-> Maybe (HashMap Text ExperimentAction)
-> Maybe POSIX
-> Maybe [ExperimentStopCondition]
-> Maybe POSIX
-> Maybe (HashMap Text ExperimentTarget)
-> Maybe Text
-> Maybe (HashMap Text Text)
-> Maybe Text
-> Experiment)
-> Parser (Maybe Text)
-> Parser
(Maybe ExperimentState
-> Maybe (HashMap Text ExperimentAction)
-> Maybe POSIX
-> Maybe [ExperimentStopCondition]
-> Maybe POSIX
-> Maybe (HashMap Text ExperimentTarget)
-> Maybe Text
-> Maybe (HashMap Text Text)
-> Maybe Text
-> Experiment)
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
"experimentTemplateId")
Parser
(Maybe ExperimentState
-> Maybe (HashMap Text ExperimentAction)
-> Maybe POSIX
-> Maybe [ExperimentStopCondition]
-> Maybe POSIX
-> Maybe (HashMap Text ExperimentTarget)
-> Maybe Text
-> Maybe (HashMap Text Text)
-> Maybe Text
-> Experiment)
-> Parser (Maybe ExperimentState)
-> Parser
(Maybe (HashMap Text ExperimentAction)
-> Maybe POSIX
-> Maybe [ExperimentStopCondition]
-> Maybe POSIX
-> Maybe (HashMap Text ExperimentTarget)
-> Maybe Text
-> Maybe (HashMap Text Text)
-> Maybe Text
-> Experiment)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe ExperimentState)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"state")
Parser
(Maybe (HashMap Text ExperimentAction)
-> Maybe POSIX
-> Maybe [ExperimentStopCondition]
-> Maybe POSIX
-> Maybe (HashMap Text ExperimentTarget)
-> Maybe Text
-> Maybe (HashMap Text Text)
-> Maybe Text
-> Experiment)
-> Parser (Maybe (HashMap Text ExperimentAction))
-> Parser
(Maybe POSIX
-> Maybe [ExperimentStopCondition]
-> Maybe POSIX
-> Maybe (HashMap Text ExperimentTarget)
-> Maybe Text
-> Maybe (HashMap Text Text)
-> Maybe Text
-> Experiment)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object
-> Text -> Parser (Maybe (Maybe (HashMap Text ExperimentAction)))
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"actions" Parser (Maybe (Maybe (HashMap Text ExperimentAction)))
-> Maybe (HashMap Text ExperimentAction)
-> Parser (Maybe (HashMap Text ExperimentAction))
forall a. Parser (Maybe a) -> a -> Parser a
Core..!= Maybe (HashMap Text ExperimentAction)
forall a. Monoid a => a
Prelude.mempty)
Parser
(Maybe POSIX
-> Maybe [ExperimentStopCondition]
-> Maybe POSIX
-> Maybe (HashMap Text ExperimentTarget)
-> Maybe Text
-> Maybe (HashMap Text Text)
-> Maybe Text
-> Experiment)
-> Parser (Maybe POSIX)
-> Parser
(Maybe [ExperimentStopCondition]
-> Maybe POSIX
-> Maybe (HashMap Text ExperimentTarget)
-> Maybe Text
-> Maybe (HashMap Text Text)
-> Maybe Text
-> Experiment)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe POSIX)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"startTime")
Parser
(Maybe [ExperimentStopCondition]
-> Maybe POSIX
-> Maybe (HashMap Text ExperimentTarget)
-> Maybe Text
-> Maybe (HashMap Text Text)
-> Maybe Text
-> Experiment)
-> Parser (Maybe [ExperimentStopCondition])
-> Parser
(Maybe POSIX
-> Maybe (HashMap Text ExperimentTarget)
-> Maybe Text
-> Maybe (HashMap Text Text)
-> Maybe Text
-> Experiment)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe (Maybe [ExperimentStopCondition]))
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"stopConditions" Parser (Maybe (Maybe [ExperimentStopCondition]))
-> Maybe [ExperimentStopCondition]
-> Parser (Maybe [ExperimentStopCondition])
forall a. Parser (Maybe a) -> a -> Parser a
Core..!= Maybe [ExperimentStopCondition]
forall a. Monoid a => a
Prelude.mempty)
Parser
(Maybe POSIX
-> Maybe (HashMap Text ExperimentTarget)
-> Maybe Text
-> Maybe (HashMap Text Text)
-> Maybe Text
-> Experiment)
-> Parser (Maybe POSIX)
-> Parser
(Maybe (HashMap Text ExperimentTarget)
-> Maybe Text
-> Maybe (HashMap Text Text)
-> Maybe Text
-> Experiment)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe POSIX)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"endTime")
Parser
(Maybe (HashMap Text ExperimentTarget)
-> Maybe Text
-> Maybe (HashMap Text Text)
-> Maybe Text
-> Experiment)
-> Parser (Maybe (HashMap Text ExperimentTarget))
-> Parser
(Maybe Text
-> Maybe (HashMap Text Text) -> Maybe Text -> Experiment)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object
-> Text -> Parser (Maybe (Maybe (HashMap Text ExperimentTarget)))
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"targets" Parser (Maybe (Maybe (HashMap Text ExperimentTarget)))
-> Maybe (HashMap Text ExperimentTarget)
-> Parser (Maybe (HashMap Text ExperimentTarget))
forall a. Parser (Maybe a) -> a -> Parser a
Core..!= Maybe (HashMap Text ExperimentTarget)
forall a. Monoid a => a
Prelude.mempty)
Parser
(Maybe Text
-> Maybe (HashMap Text Text) -> Maybe Text -> Experiment)
-> Parser (Maybe Text)
-> Parser (Maybe (HashMap Text Text) -> Maybe Text -> Experiment)
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
"id")
Parser (Maybe (HashMap Text Text) -> Maybe Text -> Experiment)
-> Parser (Maybe (HashMap Text Text))
-> Parser (Maybe Text -> Experiment)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe (Maybe (HashMap Text Text)))
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"tags" Parser (Maybe (Maybe (HashMap Text Text)))
-> Maybe (HashMap Text Text) -> Parser (Maybe (HashMap Text Text))
forall a. Parser (Maybe a) -> a -> Parser a
Core..!= Maybe (HashMap Text Text)
forall a. Monoid a => a
Prelude.mempty)
Parser (Maybe Text -> Experiment)
-> Parser (Maybe Text) -> Parser Experiment
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")
)
instance Prelude.Hashable Experiment
instance Prelude.NFData Experiment