{-# 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.Core.Lens.Internal as Lens
import qualified Amazonka.Data as Data
import qualified Amazonka.Prelude as Prelude
import Amazonka.RobOMaker.Types.WorldCount
import Amazonka.RobOMaker.Types.WorldGenerationJobStatus
data WorldGenerationJobSummary = WorldGenerationJobSummary'
{
WorldGenerationJobSummary -> Maybe Text
arn :: Prelude.Maybe Prelude.Text,
WorldGenerationJobSummary -> Maybe POSIX
createdAt :: Prelude.Maybe Data.POSIX,
WorldGenerationJobSummary -> Maybe Int
failedWorldCount :: Prelude.Maybe Prelude.Int,
WorldGenerationJobSummary -> Maybe WorldGenerationJobStatus
status :: Prelude.Maybe WorldGenerationJobStatus,
WorldGenerationJobSummary -> Maybe Int
succeededWorldCount :: Prelude.Maybe Prelude.Int,
WorldGenerationJobSummary -> Maybe Text
template :: Prelude.Maybe Prelude.Text,
WorldGenerationJobSummary -> Maybe WorldCount
worldCount :: Prelude.Maybe WorldCount
}
deriving (WorldGenerationJobSummary -> WorldGenerationJobSummary -> Bool
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]
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
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.
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'
{ $sel:arn:WorldGenerationJobSummary' :: Maybe Text
arn = forall a. Maybe a
Prelude.Nothing,
$sel:createdAt:WorldGenerationJobSummary' :: Maybe POSIX
createdAt = forall a. Maybe a
Prelude.Nothing,
$sel:failedWorldCount:WorldGenerationJobSummary' :: Maybe Int
failedWorldCount = forall a. Maybe a
Prelude.Nothing,
$sel:status:WorldGenerationJobSummary' :: Maybe WorldGenerationJobStatus
status = forall a. Maybe a
Prelude.Nothing,
$sel:succeededWorldCount:WorldGenerationJobSummary' :: Maybe Int
succeededWorldCount = forall a. Maybe a
Prelude.Nothing,
$sel:template:WorldGenerationJobSummary' :: Maybe Text
template = forall a. Maybe a
Prelude.Nothing,
$sel:worldCount:WorldGenerationJobSummary' :: Maybe WorldCount
worldCount = forall a. Maybe a
Prelude.Nothing
}
worldGenerationJobSummary_arn :: Lens.Lens' WorldGenerationJobSummary (Prelude.Maybe Prelude.Text)
worldGenerationJobSummary_arn :: Lens' WorldGenerationJobSummary (Maybe Text)
worldGenerationJobSummary_arn = 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 :: Lens' WorldGenerationJobSummary (Maybe UTCTime)
worldGenerationJobSummary_createdAt = 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) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. 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 forall (a :: Format). Iso' (Time a) UTCTime
Data._Time
worldGenerationJobSummary_failedWorldCount :: Lens.Lens' WorldGenerationJobSummary (Prelude.Maybe Prelude.Int)
worldGenerationJobSummary_failedWorldCount :: Lens' WorldGenerationJobSummary (Maybe Int)
worldGenerationJobSummary_failedWorldCount = 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_status :: Lens.Lens' WorldGenerationJobSummary (Prelude.Maybe WorldGenerationJobStatus)
worldGenerationJobSummary_status :: Lens' WorldGenerationJobSummary (Maybe WorldGenerationJobStatus)
worldGenerationJobSummary_status = 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_succeededWorldCount :: Lens.Lens' WorldGenerationJobSummary (Prelude.Maybe Prelude.Int)
worldGenerationJobSummary_succeededWorldCount :: Lens' WorldGenerationJobSummary (Maybe Int)
worldGenerationJobSummary_succeededWorldCount = 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_template :: Lens.Lens' WorldGenerationJobSummary (Prelude.Maybe Prelude.Text)
worldGenerationJobSummary_template :: Lens' WorldGenerationJobSummary (Maybe Text)
worldGenerationJobSummary_template = 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)
worldGenerationJobSummary_worldCount :: Lens.Lens' WorldGenerationJobSummary (Prelude.Maybe WorldCount)
worldGenerationJobSummary_worldCount :: Lens' WorldGenerationJobSummary (Maybe WorldCount)
worldGenerationJobSummary_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)
instance Data.FromJSON WorldGenerationJobSummary where
parseJSON :: Value -> Parser WorldGenerationJobSummary
parseJSON =
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Data.withObject
String
"WorldGenerationJobSummary"
( \Object
x ->
Maybe Text
-> Maybe POSIX
-> Maybe Int
-> Maybe WorldGenerationJobStatus
-> Maybe Int
-> Maybe Text
-> Maybe WorldCount
-> WorldGenerationJobSummary
WorldGenerationJobSummary'
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"arn")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"createdAt")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"failedWorldCount")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"status")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"succeededWorldCount")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"template")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"worldCount")
)
instance Prelude.Hashable WorldGenerationJobSummary where
hashWithSalt :: Int -> WorldGenerationJobSummary -> Int
hashWithSalt Int
_salt WorldGenerationJobSummary' {Maybe Int
Maybe Text
Maybe POSIX
Maybe WorldCount
Maybe WorldGenerationJobStatus
worldCount :: Maybe WorldCount
template :: Maybe Text
succeededWorldCount :: Maybe Int
status :: Maybe WorldGenerationJobStatus
failedWorldCount :: Maybe Int
createdAt :: Maybe POSIX
arn :: Maybe Text
$sel:worldCount:WorldGenerationJobSummary' :: WorldGenerationJobSummary -> Maybe WorldCount
$sel:template:WorldGenerationJobSummary' :: WorldGenerationJobSummary -> Maybe Text
$sel:succeededWorldCount:WorldGenerationJobSummary' :: WorldGenerationJobSummary -> Maybe Int
$sel:status:WorldGenerationJobSummary' :: WorldGenerationJobSummary -> Maybe WorldGenerationJobStatus
$sel:failedWorldCount:WorldGenerationJobSummary' :: WorldGenerationJobSummary -> Maybe Int
$sel:createdAt:WorldGenerationJobSummary' :: WorldGenerationJobSummary -> Maybe POSIX
$sel:arn:WorldGenerationJobSummary' :: WorldGenerationJobSummary -> Maybe Text
..} =
Int
_salt
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
arn
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe POSIX
createdAt
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Int
failedWorldCount
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe WorldGenerationJobStatus
status
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Int
succeededWorldCount
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
template
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe WorldCount
worldCount
instance Prelude.NFData WorldGenerationJobSummary where
rnf :: WorldGenerationJobSummary -> ()
rnf WorldGenerationJobSummary' {Maybe Int
Maybe Text
Maybe POSIX
Maybe WorldCount
Maybe WorldGenerationJobStatus
worldCount :: Maybe WorldCount
template :: Maybe Text
succeededWorldCount :: Maybe Int
status :: Maybe WorldGenerationJobStatus
failedWorldCount :: Maybe Int
createdAt :: Maybe POSIX
arn :: Maybe Text
$sel:worldCount:WorldGenerationJobSummary' :: WorldGenerationJobSummary -> Maybe WorldCount
$sel:template:WorldGenerationJobSummary' :: WorldGenerationJobSummary -> Maybe Text
$sel:succeededWorldCount:WorldGenerationJobSummary' :: WorldGenerationJobSummary -> Maybe Int
$sel:status:WorldGenerationJobSummary' :: WorldGenerationJobSummary -> Maybe WorldGenerationJobStatus
$sel:failedWorldCount:WorldGenerationJobSummary' :: WorldGenerationJobSummary -> Maybe Int
$sel:createdAt:WorldGenerationJobSummary' :: WorldGenerationJobSummary -> Maybe POSIX
$sel:arn:WorldGenerationJobSummary' :: WorldGenerationJobSummary -> Maybe Text
..} =
forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
arn
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe POSIX
createdAt
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Int
failedWorldCount
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe WorldGenerationJobStatus
status
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Int
succeededWorldCount
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
template
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe WorldCount
worldCount