{-# 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.WorldGenerationJobSummary where
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
import Amazonka.RobOMaker.Types.WorldCount
import Amazonka.RobOMaker.Types.WorldGenerationJobStatus
data WorldGenerationJobSummary = WorldGenerationJobSummary'
{
WorldGenerationJobSummary -> Maybe WorldGenerationJobStatus
status :: Prelude.Maybe WorldGenerationJobStatus,
WorldGenerationJobSummary -> Maybe Text
arn :: Prelude.Maybe Prelude.Text,
WorldGenerationJobSummary -> Maybe POSIX
createdAt :: Prelude.Maybe Core.POSIX,
WorldGenerationJobSummary -> Maybe WorldCount
worldCount :: Prelude.Maybe WorldCount,
WorldGenerationJobSummary -> Maybe Int
succeededWorldCount :: Prelude.Maybe Prelude.Int,
WorldGenerationJobSummary -> Maybe Int
failedWorldCount :: Prelude.Maybe Prelude.Int,
WorldGenerationJobSummary -> Maybe Text
template :: Prelude.Maybe Prelude.Text
}
deriving (WorldGenerationJobSummary -> WorldGenerationJobSummary -> Bool
(WorldGenerationJobSummary -> WorldGenerationJobSummary -> Bool)
-> (WorldGenerationJobSummary -> WorldGenerationJobSummary -> Bool)
-> Eq WorldGenerationJobSummary
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: WorldGenerationJobSummary -> WorldGenerationJobSummary -> Bool
$c/= :: WorldGenerationJobSummary -> WorldGenerationJobSummary -> Bool
== :: WorldGenerationJobSummary -> WorldGenerationJobSummary -> Bool
$c== :: WorldGenerationJobSummary -> WorldGenerationJobSummary -> Bool
Prelude.Eq, ReadPrec [WorldGenerationJobSummary]
ReadPrec WorldGenerationJobSummary
Int -> ReadS WorldGenerationJobSummary
ReadS [WorldGenerationJobSummary]
(Int -> ReadS WorldGenerationJobSummary)
-> ReadS [WorldGenerationJobSummary]
-> ReadPrec WorldGenerationJobSummary
-> ReadPrec [WorldGenerationJobSummary]
-> Read WorldGenerationJobSummary
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [WorldGenerationJobSummary]
$creadListPrec :: ReadPrec [WorldGenerationJobSummary]
readPrec :: ReadPrec WorldGenerationJobSummary
$creadPrec :: ReadPrec WorldGenerationJobSummary
readList :: ReadS [WorldGenerationJobSummary]
$creadList :: ReadS [WorldGenerationJobSummary]
readsPrec :: Int -> ReadS WorldGenerationJobSummary
$creadsPrec :: Int -> ReadS WorldGenerationJobSummary
Prelude.Read, Int -> WorldGenerationJobSummary -> ShowS
[WorldGenerationJobSummary] -> ShowS
WorldGenerationJobSummary -> String
(Int -> WorldGenerationJobSummary -> ShowS)
-> (WorldGenerationJobSummary -> String)
-> ([WorldGenerationJobSummary] -> ShowS)
-> Show WorldGenerationJobSummary
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [WorldGenerationJobSummary] -> ShowS
$cshowList :: [WorldGenerationJobSummary] -> ShowS
show :: WorldGenerationJobSummary -> String
$cshow :: WorldGenerationJobSummary -> String
showsPrec :: Int -> WorldGenerationJobSummary -> ShowS
$cshowsPrec :: Int -> WorldGenerationJobSummary -> ShowS
Prelude.Show, (forall x.
WorldGenerationJobSummary -> Rep WorldGenerationJobSummary x)
-> (forall x.
Rep WorldGenerationJobSummary x -> WorldGenerationJobSummary)
-> Generic WorldGenerationJobSummary
forall x.
Rep WorldGenerationJobSummary x -> WorldGenerationJobSummary
forall x.
WorldGenerationJobSummary -> Rep WorldGenerationJobSummary x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep WorldGenerationJobSummary x -> WorldGenerationJobSummary
$cfrom :: forall x.
WorldGenerationJobSummary -> Rep WorldGenerationJobSummary x
Prelude.Generic)
newWorldGenerationJobSummary ::
WorldGenerationJobSummary
newWorldGenerationJobSummary :: WorldGenerationJobSummary
newWorldGenerationJobSummary =
WorldGenerationJobSummary' :: Maybe WorldGenerationJobStatus
-> Maybe Text
-> Maybe POSIX
-> Maybe WorldCount
-> Maybe Int
-> Maybe Int
-> Maybe Text
-> WorldGenerationJobSummary
WorldGenerationJobSummary'
{ $sel:status:WorldGenerationJobSummary' :: Maybe WorldGenerationJobStatus
status =
Maybe WorldGenerationJobStatus
forall a. Maybe a
Prelude.Nothing,
$sel:arn:WorldGenerationJobSummary' :: Maybe Text
arn = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:createdAt:WorldGenerationJobSummary' :: Maybe POSIX
createdAt = Maybe POSIX
forall a. Maybe a
Prelude.Nothing,
$sel:worldCount:WorldGenerationJobSummary' :: Maybe WorldCount
worldCount = Maybe WorldCount
forall a. Maybe a
Prelude.Nothing,
$sel:succeededWorldCount:WorldGenerationJobSummary' :: Maybe Int
succeededWorldCount = Maybe Int
forall a. Maybe a
Prelude.Nothing,
$sel:failedWorldCount:WorldGenerationJobSummary' :: Maybe Int
failedWorldCount = Maybe Int
forall a. Maybe a
Prelude.Nothing,
$sel:template:WorldGenerationJobSummary' :: Maybe Text
template = Maybe Text
forall a. Maybe a
Prelude.Nothing
}
worldGenerationJobSummary_status :: Lens.Lens' WorldGenerationJobSummary (Prelude.Maybe WorldGenerationJobStatus)
worldGenerationJobSummary_status :: (Maybe WorldGenerationJobStatus
-> f (Maybe WorldGenerationJobStatus))
-> WorldGenerationJobSummary -> f WorldGenerationJobSummary
worldGenerationJobSummary_status = (WorldGenerationJobSummary -> Maybe WorldGenerationJobStatus)
-> (WorldGenerationJobSummary
-> Maybe WorldGenerationJobStatus -> WorldGenerationJobSummary)
-> Lens
WorldGenerationJobSummary
WorldGenerationJobSummary
(Maybe WorldGenerationJobStatus)
(Maybe WorldGenerationJobStatus)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\WorldGenerationJobSummary' {Maybe WorldGenerationJobStatus
status :: Maybe WorldGenerationJobStatus
$sel:status:WorldGenerationJobSummary' :: WorldGenerationJobSummary -> Maybe WorldGenerationJobStatus
status} -> Maybe WorldGenerationJobStatus
status) (\s :: WorldGenerationJobSummary
s@WorldGenerationJobSummary' {} Maybe WorldGenerationJobStatus
a -> WorldGenerationJobSummary
s {$sel:status:WorldGenerationJobSummary' :: Maybe WorldGenerationJobStatus
status = Maybe WorldGenerationJobStatus
a} :: WorldGenerationJobSummary)
worldGenerationJobSummary_arn :: Lens.Lens' WorldGenerationJobSummary (Prelude.Maybe Prelude.Text)
worldGenerationJobSummary_arn :: (Maybe Text -> f (Maybe Text))
-> WorldGenerationJobSummary -> f WorldGenerationJobSummary
worldGenerationJobSummary_arn = (WorldGenerationJobSummary -> Maybe Text)
-> (WorldGenerationJobSummary
-> Maybe Text -> WorldGenerationJobSummary)
-> Lens
WorldGenerationJobSummary
WorldGenerationJobSummary
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\WorldGenerationJobSummary' {Maybe Text
arn :: Maybe Text
$sel:arn:WorldGenerationJobSummary' :: WorldGenerationJobSummary -> Maybe Text
arn} -> Maybe Text
arn) (\s :: WorldGenerationJobSummary
s@WorldGenerationJobSummary' {} Maybe Text
a -> WorldGenerationJobSummary
s {$sel:arn:WorldGenerationJobSummary' :: Maybe Text
arn = Maybe Text
a} :: WorldGenerationJobSummary)
worldGenerationJobSummary_createdAt :: Lens.Lens' WorldGenerationJobSummary (Prelude.Maybe Prelude.UTCTime)
worldGenerationJobSummary_createdAt :: (Maybe UTCTime -> f (Maybe UTCTime))
-> WorldGenerationJobSummary -> f WorldGenerationJobSummary
worldGenerationJobSummary_createdAt = (WorldGenerationJobSummary -> Maybe POSIX)
-> (WorldGenerationJobSummary
-> Maybe POSIX -> WorldGenerationJobSummary)
-> Lens
WorldGenerationJobSummary
WorldGenerationJobSummary
(Maybe POSIX)
(Maybe POSIX)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\WorldGenerationJobSummary' {Maybe POSIX
createdAt :: Maybe POSIX
$sel:createdAt:WorldGenerationJobSummary' :: WorldGenerationJobSummary -> Maybe POSIX
createdAt} -> Maybe POSIX
createdAt) (\s :: WorldGenerationJobSummary
s@WorldGenerationJobSummary' {} Maybe POSIX
a -> WorldGenerationJobSummary
s {$sel:createdAt:WorldGenerationJobSummary' :: Maybe POSIX
createdAt = Maybe POSIX
a} :: WorldGenerationJobSummary) ((Maybe POSIX -> f (Maybe POSIX))
-> WorldGenerationJobSummary -> f WorldGenerationJobSummary)
-> ((Maybe UTCTime -> f (Maybe UTCTime))
-> Maybe POSIX -> f (Maybe POSIX))
-> (Maybe UTCTime -> f (Maybe UTCTime))
-> WorldGenerationJobSummary
-> f WorldGenerationJobSummary
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
worldGenerationJobSummary_worldCount :: Lens.Lens' WorldGenerationJobSummary (Prelude.Maybe WorldCount)
worldGenerationJobSummary_worldCount :: (Maybe WorldCount -> f (Maybe WorldCount))
-> WorldGenerationJobSummary -> f WorldGenerationJobSummary
worldGenerationJobSummary_worldCount = (WorldGenerationJobSummary -> Maybe WorldCount)
-> (WorldGenerationJobSummary
-> Maybe WorldCount -> WorldGenerationJobSummary)
-> Lens
WorldGenerationJobSummary
WorldGenerationJobSummary
(Maybe WorldCount)
(Maybe WorldCount)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\WorldGenerationJobSummary' {Maybe WorldCount
worldCount :: Maybe WorldCount
$sel:worldCount:WorldGenerationJobSummary' :: WorldGenerationJobSummary -> Maybe WorldCount
worldCount} -> Maybe WorldCount
worldCount) (\s :: WorldGenerationJobSummary
s@WorldGenerationJobSummary' {} Maybe WorldCount
a -> WorldGenerationJobSummary
s {$sel:worldCount:WorldGenerationJobSummary' :: Maybe WorldCount
worldCount = Maybe WorldCount
a} :: WorldGenerationJobSummary)
worldGenerationJobSummary_succeededWorldCount :: Lens.Lens' WorldGenerationJobSummary (Prelude.Maybe Prelude.Int)
worldGenerationJobSummary_succeededWorldCount :: (Maybe Int -> f (Maybe Int))
-> WorldGenerationJobSummary -> f WorldGenerationJobSummary
worldGenerationJobSummary_succeededWorldCount = (WorldGenerationJobSummary -> Maybe Int)
-> (WorldGenerationJobSummary
-> Maybe Int -> WorldGenerationJobSummary)
-> Lens
WorldGenerationJobSummary
WorldGenerationJobSummary
(Maybe Int)
(Maybe Int)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\WorldGenerationJobSummary' {Maybe Int
succeededWorldCount :: Maybe Int
$sel:succeededWorldCount:WorldGenerationJobSummary' :: WorldGenerationJobSummary -> Maybe Int
succeededWorldCount} -> Maybe Int
succeededWorldCount) (\s :: WorldGenerationJobSummary
s@WorldGenerationJobSummary' {} Maybe Int
a -> WorldGenerationJobSummary
s {$sel:succeededWorldCount:WorldGenerationJobSummary' :: Maybe Int
succeededWorldCount = Maybe Int
a} :: WorldGenerationJobSummary)
worldGenerationJobSummary_failedWorldCount :: Lens.Lens' WorldGenerationJobSummary (Prelude.Maybe Prelude.Int)
worldGenerationJobSummary_failedWorldCount :: (Maybe Int -> f (Maybe Int))
-> WorldGenerationJobSummary -> f WorldGenerationJobSummary
worldGenerationJobSummary_failedWorldCount = (WorldGenerationJobSummary -> Maybe Int)
-> (WorldGenerationJobSummary
-> Maybe Int -> WorldGenerationJobSummary)
-> Lens
WorldGenerationJobSummary
WorldGenerationJobSummary
(Maybe Int)
(Maybe Int)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\WorldGenerationJobSummary' {Maybe Int
failedWorldCount :: Maybe Int
$sel:failedWorldCount:WorldGenerationJobSummary' :: WorldGenerationJobSummary -> Maybe Int
failedWorldCount} -> Maybe Int
failedWorldCount) (\s :: WorldGenerationJobSummary
s@WorldGenerationJobSummary' {} Maybe Int
a -> WorldGenerationJobSummary
s {$sel:failedWorldCount:WorldGenerationJobSummary' :: Maybe Int
failedWorldCount = Maybe Int
a} :: WorldGenerationJobSummary)
worldGenerationJobSummary_template :: Lens.Lens' WorldGenerationJobSummary (Prelude.Maybe Prelude.Text)
worldGenerationJobSummary_template :: (Maybe Text -> f (Maybe Text))
-> WorldGenerationJobSummary -> f WorldGenerationJobSummary
worldGenerationJobSummary_template = (WorldGenerationJobSummary -> Maybe Text)
-> (WorldGenerationJobSummary
-> Maybe Text -> WorldGenerationJobSummary)
-> Lens
WorldGenerationJobSummary
WorldGenerationJobSummary
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\WorldGenerationJobSummary' {Maybe Text
template :: Maybe Text
$sel:template:WorldGenerationJobSummary' :: WorldGenerationJobSummary -> Maybe Text
template} -> Maybe Text
template) (\s :: WorldGenerationJobSummary
s@WorldGenerationJobSummary' {} Maybe Text
a -> WorldGenerationJobSummary
s {$sel:template:WorldGenerationJobSummary' :: Maybe Text
template = Maybe Text
a} :: WorldGenerationJobSummary)
instance Core.FromJSON WorldGenerationJobSummary where
parseJSON :: Value -> Parser WorldGenerationJobSummary
parseJSON =
String
-> (Object -> Parser WorldGenerationJobSummary)
-> Value
-> Parser WorldGenerationJobSummary
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
String
"WorldGenerationJobSummary"
( \Object
x ->
Maybe WorldGenerationJobStatus
-> Maybe Text
-> Maybe POSIX
-> Maybe WorldCount
-> Maybe Int
-> Maybe Int
-> Maybe Text
-> WorldGenerationJobSummary
WorldGenerationJobSummary'
(Maybe WorldGenerationJobStatus
-> Maybe Text
-> Maybe POSIX
-> Maybe WorldCount
-> Maybe Int
-> Maybe Int
-> Maybe Text
-> WorldGenerationJobSummary)
-> Parser (Maybe WorldGenerationJobStatus)
-> Parser
(Maybe Text
-> Maybe POSIX
-> Maybe WorldCount
-> Maybe Int
-> Maybe Int
-> Maybe Text
-> WorldGenerationJobSummary)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Parser (Maybe WorldGenerationJobStatus)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"status")
Parser
(Maybe Text
-> Maybe POSIX
-> Maybe WorldCount
-> Maybe Int
-> Maybe Int
-> Maybe Text
-> WorldGenerationJobSummary)
-> Parser (Maybe Text)
-> Parser
(Maybe POSIX
-> Maybe WorldCount
-> Maybe Int
-> Maybe Int
-> Maybe Text
-> WorldGenerationJobSummary)
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
"arn")
Parser
(Maybe POSIX
-> Maybe WorldCount
-> Maybe Int
-> Maybe Int
-> Maybe Text
-> WorldGenerationJobSummary)
-> Parser (Maybe POSIX)
-> Parser
(Maybe WorldCount
-> Maybe Int
-> Maybe Int
-> Maybe Text
-> WorldGenerationJobSummary)
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 WorldCount
-> Maybe Int
-> Maybe Int
-> Maybe Text
-> WorldGenerationJobSummary)
-> Parser (Maybe WorldCount)
-> Parser
(Maybe Int -> Maybe Int -> Maybe Text -> WorldGenerationJobSummary)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe WorldCount)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"worldCount")
Parser
(Maybe Int -> Maybe Int -> Maybe Text -> WorldGenerationJobSummary)
-> Parser (Maybe Int)
-> Parser (Maybe Int -> Maybe Text -> WorldGenerationJobSummary)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Int)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"succeededWorldCount")
Parser (Maybe Int -> Maybe Text -> WorldGenerationJobSummary)
-> Parser (Maybe Int)
-> Parser (Maybe Text -> WorldGenerationJobSummary)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Int)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"failedWorldCount")
Parser (Maybe Text -> WorldGenerationJobSummary)
-> Parser (Maybe Text) -> Parser WorldGenerationJobSummary
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")
)
instance Prelude.Hashable WorldGenerationJobSummary
instance Prelude.NFData WorldGenerationJobSummary