{-# 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.ExperimentTemplateSummary where
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
data ExperimentTemplateSummary = ExperimentTemplateSummary'
{
ExperimentTemplateSummary -> Maybe POSIX
creationTime :: Prelude.Maybe Core.POSIX,
ExperimentTemplateSummary -> Maybe Text
id :: Prelude.Maybe Prelude.Text,
ExperimentTemplateSummary -> Maybe POSIX
lastUpdateTime :: Prelude.Maybe Core.POSIX,
ExperimentTemplateSummary -> Maybe Text
description :: Prelude.Maybe Prelude.Text,
ExperimentTemplateSummary -> Maybe (HashMap Text Text)
tags :: Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text)
}
deriving (ExperimentTemplateSummary -> ExperimentTemplateSummary -> Bool
(ExperimentTemplateSummary -> ExperimentTemplateSummary -> Bool)
-> (ExperimentTemplateSummary -> ExperimentTemplateSummary -> Bool)
-> Eq ExperimentTemplateSummary
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ExperimentTemplateSummary -> ExperimentTemplateSummary -> Bool
$c/= :: ExperimentTemplateSummary -> ExperimentTemplateSummary -> Bool
== :: ExperimentTemplateSummary -> ExperimentTemplateSummary -> Bool
$c== :: ExperimentTemplateSummary -> ExperimentTemplateSummary -> Bool
Prelude.Eq, ReadPrec [ExperimentTemplateSummary]
ReadPrec ExperimentTemplateSummary
Int -> ReadS ExperimentTemplateSummary
ReadS [ExperimentTemplateSummary]
(Int -> ReadS ExperimentTemplateSummary)
-> ReadS [ExperimentTemplateSummary]
-> ReadPrec ExperimentTemplateSummary
-> ReadPrec [ExperimentTemplateSummary]
-> Read ExperimentTemplateSummary
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ExperimentTemplateSummary]
$creadListPrec :: ReadPrec [ExperimentTemplateSummary]
readPrec :: ReadPrec ExperimentTemplateSummary
$creadPrec :: ReadPrec ExperimentTemplateSummary
readList :: ReadS [ExperimentTemplateSummary]
$creadList :: ReadS [ExperimentTemplateSummary]
readsPrec :: Int -> ReadS ExperimentTemplateSummary
$creadsPrec :: Int -> ReadS ExperimentTemplateSummary
Prelude.Read, Int -> ExperimentTemplateSummary -> ShowS
[ExperimentTemplateSummary] -> ShowS
ExperimentTemplateSummary -> String
(Int -> ExperimentTemplateSummary -> ShowS)
-> (ExperimentTemplateSummary -> String)
-> ([ExperimentTemplateSummary] -> ShowS)
-> Show ExperimentTemplateSummary
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ExperimentTemplateSummary] -> ShowS
$cshowList :: [ExperimentTemplateSummary] -> ShowS
show :: ExperimentTemplateSummary -> String
$cshow :: ExperimentTemplateSummary -> String
showsPrec :: Int -> ExperimentTemplateSummary -> ShowS
$cshowsPrec :: Int -> ExperimentTemplateSummary -> ShowS
Prelude.Show, (forall x.
ExperimentTemplateSummary -> Rep ExperimentTemplateSummary x)
-> (forall x.
Rep ExperimentTemplateSummary x -> ExperimentTemplateSummary)
-> Generic ExperimentTemplateSummary
forall x.
Rep ExperimentTemplateSummary x -> ExperimentTemplateSummary
forall x.
ExperimentTemplateSummary -> Rep ExperimentTemplateSummary x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep ExperimentTemplateSummary x -> ExperimentTemplateSummary
$cfrom :: forall x.
ExperimentTemplateSummary -> Rep ExperimentTemplateSummary x
Prelude.Generic)
newExperimentTemplateSummary ::
ExperimentTemplateSummary
newExperimentTemplateSummary :: ExperimentTemplateSummary
newExperimentTemplateSummary =
ExperimentTemplateSummary' :: Maybe POSIX
-> Maybe Text
-> Maybe POSIX
-> Maybe Text
-> Maybe (HashMap Text Text)
-> ExperimentTemplateSummary
ExperimentTemplateSummary'
{ $sel:creationTime:ExperimentTemplateSummary' :: Maybe POSIX
creationTime =
Maybe POSIX
forall a. Maybe a
Prelude.Nothing,
$sel:id:ExperimentTemplateSummary' :: Maybe Text
id = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:lastUpdateTime:ExperimentTemplateSummary' :: Maybe POSIX
lastUpdateTime = Maybe POSIX
forall a. Maybe a
Prelude.Nothing,
$sel:description:ExperimentTemplateSummary' :: Maybe Text
description = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:tags:ExperimentTemplateSummary' :: Maybe (HashMap Text Text)
tags = Maybe (HashMap Text Text)
forall a. Maybe a
Prelude.Nothing
}
experimentTemplateSummary_creationTime :: Lens.Lens' ExperimentTemplateSummary (Prelude.Maybe Prelude.UTCTime)
experimentTemplateSummary_creationTime :: (Maybe UTCTime -> f (Maybe UTCTime))
-> ExperimentTemplateSummary -> f ExperimentTemplateSummary
experimentTemplateSummary_creationTime = (ExperimentTemplateSummary -> Maybe POSIX)
-> (ExperimentTemplateSummary
-> Maybe POSIX -> ExperimentTemplateSummary)
-> Lens
ExperimentTemplateSummary
ExperimentTemplateSummary
(Maybe POSIX)
(Maybe POSIX)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ExperimentTemplateSummary' {Maybe POSIX
creationTime :: Maybe POSIX
$sel:creationTime:ExperimentTemplateSummary' :: ExperimentTemplateSummary -> Maybe POSIX
creationTime} -> Maybe POSIX
creationTime) (\s :: ExperimentTemplateSummary
s@ExperimentTemplateSummary' {} Maybe POSIX
a -> ExperimentTemplateSummary
s {$sel:creationTime:ExperimentTemplateSummary' :: Maybe POSIX
creationTime = Maybe POSIX
a} :: ExperimentTemplateSummary) ((Maybe POSIX -> f (Maybe POSIX))
-> ExperimentTemplateSummary -> f ExperimentTemplateSummary)
-> ((Maybe UTCTime -> f (Maybe UTCTime))
-> Maybe POSIX -> f (Maybe POSIX))
-> (Maybe UTCTime -> f (Maybe UTCTime))
-> ExperimentTemplateSummary
-> f ExperimentTemplateSummary
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
experimentTemplateSummary_id :: Lens.Lens' ExperimentTemplateSummary (Prelude.Maybe Prelude.Text)
experimentTemplateSummary_id :: (Maybe Text -> f (Maybe Text))
-> ExperimentTemplateSummary -> f ExperimentTemplateSummary
experimentTemplateSummary_id = (ExperimentTemplateSummary -> Maybe Text)
-> (ExperimentTemplateSummary
-> Maybe Text -> ExperimentTemplateSummary)
-> Lens
ExperimentTemplateSummary
ExperimentTemplateSummary
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ExperimentTemplateSummary' {Maybe Text
id :: Maybe Text
$sel:id:ExperimentTemplateSummary' :: ExperimentTemplateSummary -> Maybe Text
id} -> Maybe Text
id) (\s :: ExperimentTemplateSummary
s@ExperimentTemplateSummary' {} Maybe Text
a -> ExperimentTemplateSummary
s {$sel:id:ExperimentTemplateSummary' :: Maybe Text
id = Maybe Text
a} :: ExperimentTemplateSummary)
experimentTemplateSummary_lastUpdateTime :: Lens.Lens' ExperimentTemplateSummary (Prelude.Maybe Prelude.UTCTime)
experimentTemplateSummary_lastUpdateTime :: (Maybe UTCTime -> f (Maybe UTCTime))
-> ExperimentTemplateSummary -> f ExperimentTemplateSummary
experimentTemplateSummary_lastUpdateTime = (ExperimentTemplateSummary -> Maybe POSIX)
-> (ExperimentTemplateSummary
-> Maybe POSIX -> ExperimentTemplateSummary)
-> Lens
ExperimentTemplateSummary
ExperimentTemplateSummary
(Maybe POSIX)
(Maybe POSIX)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ExperimentTemplateSummary' {Maybe POSIX
lastUpdateTime :: Maybe POSIX
$sel:lastUpdateTime:ExperimentTemplateSummary' :: ExperimentTemplateSummary -> Maybe POSIX
lastUpdateTime} -> Maybe POSIX
lastUpdateTime) (\s :: ExperimentTemplateSummary
s@ExperimentTemplateSummary' {} Maybe POSIX
a -> ExperimentTemplateSummary
s {$sel:lastUpdateTime:ExperimentTemplateSummary' :: Maybe POSIX
lastUpdateTime = Maybe POSIX
a} :: ExperimentTemplateSummary) ((Maybe POSIX -> f (Maybe POSIX))
-> ExperimentTemplateSummary -> f ExperimentTemplateSummary)
-> ((Maybe UTCTime -> f (Maybe UTCTime))
-> Maybe POSIX -> f (Maybe POSIX))
-> (Maybe UTCTime -> f (Maybe UTCTime))
-> ExperimentTemplateSummary
-> f ExperimentTemplateSummary
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
experimentTemplateSummary_description :: Lens.Lens' ExperimentTemplateSummary (Prelude.Maybe Prelude.Text)
experimentTemplateSummary_description :: (Maybe Text -> f (Maybe Text))
-> ExperimentTemplateSummary -> f ExperimentTemplateSummary
experimentTemplateSummary_description = (ExperimentTemplateSummary -> Maybe Text)
-> (ExperimentTemplateSummary
-> Maybe Text -> ExperimentTemplateSummary)
-> Lens
ExperimentTemplateSummary
ExperimentTemplateSummary
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ExperimentTemplateSummary' {Maybe Text
description :: Maybe Text
$sel:description:ExperimentTemplateSummary' :: ExperimentTemplateSummary -> Maybe Text
description} -> Maybe Text
description) (\s :: ExperimentTemplateSummary
s@ExperimentTemplateSummary' {} Maybe Text
a -> ExperimentTemplateSummary
s {$sel:description:ExperimentTemplateSummary' :: Maybe Text
description = Maybe Text
a} :: ExperimentTemplateSummary)
experimentTemplateSummary_tags :: Lens.Lens' ExperimentTemplateSummary (Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text))
experimentTemplateSummary_tags :: (Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
-> ExperimentTemplateSummary -> f ExperimentTemplateSummary
experimentTemplateSummary_tags = (ExperimentTemplateSummary -> Maybe (HashMap Text Text))
-> (ExperimentTemplateSummary
-> Maybe (HashMap Text Text) -> ExperimentTemplateSummary)
-> Lens
ExperimentTemplateSummary
ExperimentTemplateSummary
(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 (\ExperimentTemplateSummary' {Maybe (HashMap Text Text)
tags :: Maybe (HashMap Text Text)
$sel:tags:ExperimentTemplateSummary' :: ExperimentTemplateSummary -> Maybe (HashMap Text Text)
tags} -> Maybe (HashMap Text Text)
tags) (\s :: ExperimentTemplateSummary
s@ExperimentTemplateSummary' {} Maybe (HashMap Text Text)
a -> ExperimentTemplateSummary
s {$sel:tags:ExperimentTemplateSummary' :: Maybe (HashMap Text Text)
tags = Maybe (HashMap Text Text)
a} :: ExperimentTemplateSummary) ((Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
-> ExperimentTemplateSummary -> f ExperimentTemplateSummary)
-> ((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)))
-> ExperimentTemplateSummary
-> f ExperimentTemplateSummary
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
instance Core.FromJSON ExperimentTemplateSummary where
parseJSON :: Value -> Parser ExperimentTemplateSummary
parseJSON =
String
-> (Object -> Parser ExperimentTemplateSummary)
-> Value
-> Parser ExperimentTemplateSummary
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
String
"ExperimentTemplateSummary"
( \Object
x ->
Maybe POSIX
-> Maybe Text
-> Maybe POSIX
-> Maybe Text
-> Maybe (HashMap Text Text)
-> ExperimentTemplateSummary
ExperimentTemplateSummary'
(Maybe POSIX
-> Maybe Text
-> Maybe POSIX
-> Maybe Text
-> Maybe (HashMap Text Text)
-> ExperimentTemplateSummary)
-> Parser (Maybe POSIX)
-> Parser
(Maybe Text
-> Maybe POSIX
-> Maybe Text
-> Maybe (HashMap Text Text)
-> ExperimentTemplateSummary)
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 POSIX
-> Maybe Text
-> Maybe (HashMap Text Text)
-> ExperimentTemplateSummary)
-> Parser (Maybe Text)
-> Parser
(Maybe POSIX
-> Maybe Text
-> Maybe (HashMap Text Text)
-> ExperimentTemplateSummary)
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 POSIX
-> Maybe Text
-> Maybe (HashMap Text Text)
-> ExperimentTemplateSummary)
-> Parser (Maybe POSIX)
-> Parser
(Maybe Text
-> Maybe (HashMap Text Text) -> ExperimentTemplateSummary)
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
"lastUpdateTime")
Parser
(Maybe Text
-> Maybe (HashMap Text Text) -> ExperimentTemplateSummary)
-> Parser (Maybe Text)
-> Parser (Maybe (HashMap Text Text) -> ExperimentTemplateSummary)
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
"description")
Parser (Maybe (HashMap Text Text) -> ExperimentTemplateSummary)
-> Parser (Maybe (HashMap Text Text))
-> Parser ExperimentTemplateSummary
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)
)
instance Prelude.Hashable ExperimentTemplateSummary
instance Prelude.NFData ExperimentTemplateSummary