{-# 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.RobOMaker.Types.WorldSummary where
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
data WorldSummary = WorldSummary'
{
WorldSummary -> Maybe Text
arn :: Prelude.Maybe Prelude.Text,
WorldSummary -> Maybe POSIX
createdAt :: Prelude.Maybe Core.POSIX,
WorldSummary -> Maybe Text
template :: Prelude.Maybe Prelude.Text,
WorldSummary -> Maybe Text
generationJob :: Prelude.Maybe Prelude.Text
}
deriving (WorldSummary -> WorldSummary -> Bool
(WorldSummary -> WorldSummary -> Bool)
-> (WorldSummary -> WorldSummary -> Bool) -> Eq WorldSummary
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: WorldSummary -> WorldSummary -> Bool
$c/= :: WorldSummary -> WorldSummary -> Bool
== :: WorldSummary -> WorldSummary -> Bool
$c== :: WorldSummary -> WorldSummary -> Bool
Prelude.Eq, ReadPrec [WorldSummary]
ReadPrec WorldSummary
Int -> ReadS WorldSummary
ReadS [WorldSummary]
(Int -> ReadS WorldSummary)
-> ReadS [WorldSummary]
-> ReadPrec WorldSummary
-> ReadPrec [WorldSummary]
-> Read WorldSummary
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [WorldSummary]
$creadListPrec :: ReadPrec [WorldSummary]
readPrec :: ReadPrec WorldSummary
$creadPrec :: ReadPrec WorldSummary
readList :: ReadS [WorldSummary]
$creadList :: ReadS [WorldSummary]
readsPrec :: Int -> ReadS WorldSummary
$creadsPrec :: Int -> ReadS WorldSummary
Prelude.Read, Int -> WorldSummary -> ShowS
[WorldSummary] -> ShowS
WorldSummary -> String
(Int -> WorldSummary -> ShowS)
-> (WorldSummary -> String)
-> ([WorldSummary] -> ShowS)
-> Show WorldSummary
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [WorldSummary] -> ShowS
$cshowList :: [WorldSummary] -> ShowS
show :: WorldSummary -> String
$cshow :: WorldSummary -> String
showsPrec :: Int -> WorldSummary -> ShowS
$cshowsPrec :: Int -> WorldSummary -> ShowS
Prelude.Show, (forall x. WorldSummary -> Rep WorldSummary x)
-> (forall x. Rep WorldSummary x -> WorldSummary)
-> Generic WorldSummary
forall x. Rep WorldSummary x -> WorldSummary
forall x. WorldSummary -> Rep WorldSummary x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep WorldSummary x -> WorldSummary
$cfrom :: forall x. WorldSummary -> Rep WorldSummary x
Prelude.Generic)
newWorldSummary ::
WorldSummary
newWorldSummary :: WorldSummary
newWorldSummary =
WorldSummary' :: Maybe Text
-> Maybe POSIX -> Maybe Text -> Maybe Text -> WorldSummary
WorldSummary'
{ $sel:arn:WorldSummary' :: Maybe Text
arn = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:createdAt:WorldSummary' :: Maybe POSIX
createdAt = Maybe POSIX
forall a. Maybe a
Prelude.Nothing,
$sel:template:WorldSummary' :: Maybe Text
template = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:generationJob:WorldSummary' :: Maybe Text
generationJob = Maybe Text
forall a. Maybe a
Prelude.Nothing
}
worldSummary_arn :: Lens.Lens' WorldSummary (Prelude.Maybe Prelude.Text)
worldSummary_arn :: (Maybe Text -> f (Maybe Text)) -> WorldSummary -> f WorldSummary
worldSummary_arn = (WorldSummary -> Maybe Text)
-> (WorldSummary -> Maybe Text -> WorldSummary)
-> Lens WorldSummary WorldSummary (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\WorldSummary' {Maybe Text
arn :: Maybe Text
$sel:arn:WorldSummary' :: WorldSummary -> Maybe Text
arn} -> Maybe Text
arn) (\s :: WorldSummary
s@WorldSummary' {} Maybe Text
a -> WorldSummary
s {$sel:arn:WorldSummary' :: Maybe Text
arn = Maybe Text
a} :: WorldSummary)
worldSummary_createdAt :: Lens.Lens' WorldSummary (Prelude.Maybe Prelude.UTCTime)
worldSummary_createdAt :: (Maybe UTCTime -> f (Maybe UTCTime))
-> WorldSummary -> f WorldSummary
worldSummary_createdAt = (WorldSummary -> Maybe POSIX)
-> (WorldSummary -> Maybe POSIX -> WorldSummary)
-> Lens WorldSummary WorldSummary (Maybe POSIX) (Maybe POSIX)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\WorldSummary' {Maybe POSIX
createdAt :: Maybe POSIX
$sel:createdAt:WorldSummary' :: WorldSummary -> Maybe POSIX
createdAt} -> Maybe POSIX
createdAt) (\s :: WorldSummary
s@WorldSummary' {} Maybe POSIX
a -> WorldSummary
s {$sel:createdAt:WorldSummary' :: Maybe POSIX
createdAt = Maybe POSIX
a} :: WorldSummary) ((Maybe POSIX -> f (Maybe POSIX))
-> WorldSummary -> f WorldSummary)
-> ((Maybe UTCTime -> f (Maybe UTCTime))
-> Maybe POSIX -> f (Maybe POSIX))
-> (Maybe UTCTime -> f (Maybe UTCTime))
-> WorldSummary
-> f WorldSummary
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
worldSummary_template :: Lens.Lens' WorldSummary (Prelude.Maybe Prelude.Text)
worldSummary_template :: (Maybe Text -> f (Maybe Text)) -> WorldSummary -> f WorldSummary
worldSummary_template = (WorldSummary -> Maybe Text)
-> (WorldSummary -> Maybe Text -> WorldSummary)
-> Lens WorldSummary WorldSummary (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\WorldSummary' {Maybe Text
template :: Maybe Text
$sel:template:WorldSummary' :: WorldSummary -> Maybe Text
template} -> Maybe Text
template) (\s :: WorldSummary
s@WorldSummary' {} Maybe Text
a -> WorldSummary
s {$sel:template:WorldSummary' :: Maybe Text
template = Maybe Text
a} :: WorldSummary)
worldSummary_generationJob :: Lens.Lens' WorldSummary (Prelude.Maybe Prelude.Text)
worldSummary_generationJob :: (Maybe Text -> f (Maybe Text)) -> WorldSummary -> f WorldSummary
worldSummary_generationJob = (WorldSummary -> Maybe Text)
-> (WorldSummary -> Maybe Text -> WorldSummary)
-> Lens WorldSummary WorldSummary (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\WorldSummary' {Maybe Text
generationJob :: Maybe Text
$sel:generationJob:WorldSummary' :: WorldSummary -> Maybe Text
generationJob} -> Maybe Text
generationJob) (\s :: WorldSummary
s@WorldSummary' {} Maybe Text
a -> WorldSummary
s {$sel:generationJob:WorldSummary' :: Maybe Text
generationJob = Maybe Text
a} :: WorldSummary)
instance Core.FromJSON WorldSummary where
parseJSON :: Value -> Parser WorldSummary
parseJSON =
String
-> (Object -> Parser WorldSummary) -> Value -> Parser WorldSummary
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
String
"WorldSummary"
( \Object
x ->
Maybe Text
-> Maybe POSIX -> Maybe Text -> Maybe Text -> WorldSummary
WorldSummary'
(Maybe Text
-> Maybe POSIX -> Maybe Text -> Maybe Text -> WorldSummary)
-> Parser (Maybe Text)
-> Parser (Maybe POSIX -> Maybe Text -> Maybe Text -> WorldSummary)
forall (f :: * -> *) a b. Functor 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
"arn")
Parser (Maybe POSIX -> Maybe Text -> Maybe Text -> WorldSummary)
-> Parser (Maybe POSIX)
-> Parser (Maybe Text -> Maybe Text -> WorldSummary)
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
"createdAt")
Parser (Maybe Text -> Maybe Text -> WorldSummary)
-> Parser (Maybe Text) -> Parser (Maybe Text -> WorldSummary)
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
"template")
Parser (Maybe Text -> WorldSummary)
-> Parser (Maybe Text) -> Parser WorldSummary
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
"generationJob")
)
instance Prelude.Hashable WorldSummary
instance Prelude.NFData WorldSummary