{-# 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 #-}

-- Derived from AWS service descriptions, licensed under Apache 2.0.

-- |
-- Module      : Amazonka.RobOMaker.Types.WorldGenerationJobSummary
-- Copyright   : (c) 2013-2021 Brendan Hay
-- License     : Mozilla Public License, v. 2.0.
-- Maintainer  : Brendan Hay <brendan.g.hay+amazonka@gmail.com>
-- Stability   : auto-generated
-- Portability : non-portable (GHC extensions)
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

-- | Information about a world generator job.
--
-- /See:/ 'newWorldGenerationJobSummary' smart constructor.
data WorldGenerationJobSummary = WorldGenerationJobSummary'
  { -- | The status of the world generator job:
    --
    -- [Pending]
    --     The world generator job request is pending.
    --
    -- [Running]
    --     The world generator job is running.
    --
    -- [Completed]
    --     The world generator job completed.
    --
    -- [Failed]
    --     The world generator job failed. See @failureCode@ for more
    --     information.
    --
    -- [PartialFailed]
    --     Some worlds did not generate.
    --
    -- [Canceled]
    --     The world generator job was cancelled.
    --
    -- [Canceling]
    --     The world generator job is being cancelled.
    WorldGenerationJobSummary -> Maybe WorldGenerationJobStatus
status :: Prelude.Maybe WorldGenerationJobStatus,
    -- | The Amazon Resource Name (ARN) of the world generator job.
    WorldGenerationJobSummary -> Maybe Text
arn :: Prelude.Maybe Prelude.Text,
    -- | The time, in milliseconds since the epoch, when the world generator job
    -- was created.
    WorldGenerationJobSummary -> Maybe POSIX
createdAt :: Prelude.Maybe Core.POSIX,
    -- | Information about the world count.
    WorldGenerationJobSummary -> Maybe WorldCount
worldCount :: Prelude.Maybe WorldCount,
    -- | The number of worlds that were generated.
    WorldGenerationJobSummary -> Maybe Int
succeededWorldCount :: Prelude.Maybe Prelude.Int,
    -- | The number of worlds that failed.
    WorldGenerationJobSummary -> Maybe Int
failedWorldCount :: Prelude.Maybe Prelude.Int,
    -- | The Amazon Resource Name (arn) of the world template.
    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)

-- |
-- Create a value of 'WorldGenerationJobSummary' with all optional fields omitted.
--
-- Use <https://hackage.haskell.org/package/generic-lens generic-lens> or <https://hackage.haskell.org/package/optics optics> to modify other optional fields.
--
-- The following record fields are available, with the corresponding lenses provided
-- for backwards compatibility:
--
-- 'status', 'worldGenerationJobSummary_status' - The status of the world generator job:
--
-- [Pending]
--     The world generator job request is pending.
--
-- [Running]
--     The world generator job is running.
--
-- [Completed]
--     The world generator job completed.
--
-- [Failed]
--     The world generator job failed. See @failureCode@ for more
--     information.
--
-- [PartialFailed]
--     Some worlds did not generate.
--
-- [Canceled]
--     The world generator job was cancelled.
--
-- [Canceling]
--     The world generator job is being cancelled.
--
-- 'arn', 'worldGenerationJobSummary_arn' - The Amazon Resource Name (ARN) of the world generator job.
--
-- 'createdAt', 'worldGenerationJobSummary_createdAt' - The time, in milliseconds since the epoch, when the world generator job
-- was created.
--
-- 'worldCount', 'worldGenerationJobSummary_worldCount' - Information about the world count.
--
-- 'succeededWorldCount', 'worldGenerationJobSummary_succeededWorldCount' - The number of worlds that were generated.
--
-- 'failedWorldCount', 'worldGenerationJobSummary_failedWorldCount' - The number of worlds that failed.
--
-- 'template', 'worldGenerationJobSummary_template' - The Amazon Resource Name (arn) of the world template.
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
    }

-- | The status of the world generator job:
--
-- [Pending]
--     The world generator job request is pending.
--
-- [Running]
--     The world generator job is running.
--
-- [Completed]
--     The world generator job completed.
--
-- [Failed]
--     The world generator job failed. See @failureCode@ for more
--     information.
--
-- [PartialFailed]
--     Some worlds did not generate.
--
-- [Canceled]
--     The world generator job was cancelled.
--
-- [Canceling]
--     The world generator job is being cancelled.
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)

-- | The Amazon Resource Name (ARN) of the world generator job.
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)

-- | The time, in milliseconds since the epoch, when the world generator job
-- was created.
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

-- | Information about the world count.
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)

-- | The number of worlds that were generated.
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)

-- | The number of worlds that failed.
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)

-- | The Amazon Resource Name (arn) of the world template.
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