{-# 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.SimulationJobBatchSummary
-- 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.SimulationJobBatchSummary where

import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
import Amazonka.RobOMaker.Types.SimulationJobBatchStatus

-- | Information about a simulation job batch.
--
-- /See:/ 'newSimulationJobBatchSummary' smart constructor.
data SimulationJobBatchSummary = SimulationJobBatchSummary'
  { -- | The status of the simulation job batch.
    --
    -- [Pending]
    --     The simulation job batch request is pending.
    --
    -- [InProgress]
    --     The simulation job batch is in progress.
    --
    -- [Failed]
    --     The simulation job batch failed. One or more simulation job requests
    --     could not be completed due to an internal failure (like
    --     @InternalServiceError@). See @failureCode@ and @failureReason@ for
    --     more information.
    --
    -- [Completed]
    --     The simulation batch job completed. A batch is complete when (1)
    --     there are no pending simulation job requests in the batch and none
    --     of the failed simulation job requests are due to
    --     @InternalServiceError@ and (2) when all created simulation jobs have
    --     reached a terminal state (for example, @Completed@ or @Failed@).
    --
    -- [Canceled]
    --     The simulation batch job was cancelled.
    --
    -- [Canceling]
    --     The simulation batch job is being cancelled.
    --
    -- [Completing]
    --     The simulation batch job is completing.
    --
    -- [TimingOut]
    --     The simulation job batch is timing out.
    --
    --     If a batch timing out, and there are pending requests that were
    --     failing due to an internal failure (like @InternalServiceError@),
    --     the batch status will be @Failed@. If there are no such failing
    --     request, the batch status will be @TimedOut@.
    --
    -- [TimedOut]
    --     The simulation batch job timed out.
    SimulationJobBatchSummary -> Maybe SimulationJobBatchStatus
status :: Prelude.Maybe SimulationJobBatchStatus,
    -- | The number of created simulation job requests.
    SimulationJobBatchSummary -> Maybe Int
createdRequestCount :: Prelude.Maybe Prelude.Int,
    -- | The time, in milliseconds since the epoch, when the simulation job batch
    -- was last updated.
    SimulationJobBatchSummary -> Maybe POSIX
lastUpdatedAt :: Prelude.Maybe Core.POSIX,
    -- | The Amazon Resource Name (ARN) of the batch.
    SimulationJobBatchSummary -> Maybe Text
arn :: Prelude.Maybe Prelude.Text,
    -- | The time, in milliseconds since the epoch, when the simulation job batch
    -- was created.
    SimulationJobBatchSummary -> Maybe POSIX
createdAt :: Prelude.Maybe Core.POSIX,
    -- | The number of pending simulation job requests.
    SimulationJobBatchSummary -> Maybe Int
pendingRequestCount :: Prelude.Maybe Prelude.Int,
    -- | The number of failed simulation job requests.
    SimulationJobBatchSummary -> Maybe Int
failedRequestCount :: Prelude.Maybe Prelude.Int
  }
  deriving (SimulationJobBatchSummary -> SimulationJobBatchSummary -> Bool
(SimulationJobBatchSummary -> SimulationJobBatchSummary -> Bool)
-> (SimulationJobBatchSummary -> SimulationJobBatchSummary -> Bool)
-> Eq SimulationJobBatchSummary
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: SimulationJobBatchSummary -> SimulationJobBatchSummary -> Bool
$c/= :: SimulationJobBatchSummary -> SimulationJobBatchSummary -> Bool
== :: SimulationJobBatchSummary -> SimulationJobBatchSummary -> Bool
$c== :: SimulationJobBatchSummary -> SimulationJobBatchSummary -> Bool
Prelude.Eq, ReadPrec [SimulationJobBatchSummary]
ReadPrec SimulationJobBatchSummary
Int -> ReadS SimulationJobBatchSummary
ReadS [SimulationJobBatchSummary]
(Int -> ReadS SimulationJobBatchSummary)
-> ReadS [SimulationJobBatchSummary]
-> ReadPrec SimulationJobBatchSummary
-> ReadPrec [SimulationJobBatchSummary]
-> Read SimulationJobBatchSummary
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [SimulationJobBatchSummary]
$creadListPrec :: ReadPrec [SimulationJobBatchSummary]
readPrec :: ReadPrec SimulationJobBatchSummary
$creadPrec :: ReadPrec SimulationJobBatchSummary
readList :: ReadS [SimulationJobBatchSummary]
$creadList :: ReadS [SimulationJobBatchSummary]
readsPrec :: Int -> ReadS SimulationJobBatchSummary
$creadsPrec :: Int -> ReadS SimulationJobBatchSummary
Prelude.Read, Int -> SimulationJobBatchSummary -> ShowS
[SimulationJobBatchSummary] -> ShowS
SimulationJobBatchSummary -> String
(Int -> SimulationJobBatchSummary -> ShowS)
-> (SimulationJobBatchSummary -> String)
-> ([SimulationJobBatchSummary] -> ShowS)
-> Show SimulationJobBatchSummary
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [SimulationJobBatchSummary] -> ShowS
$cshowList :: [SimulationJobBatchSummary] -> ShowS
show :: SimulationJobBatchSummary -> String
$cshow :: SimulationJobBatchSummary -> String
showsPrec :: Int -> SimulationJobBatchSummary -> ShowS
$cshowsPrec :: Int -> SimulationJobBatchSummary -> ShowS
Prelude.Show, (forall x.
 SimulationJobBatchSummary -> Rep SimulationJobBatchSummary x)
-> (forall x.
    Rep SimulationJobBatchSummary x -> SimulationJobBatchSummary)
-> Generic SimulationJobBatchSummary
forall x.
Rep SimulationJobBatchSummary x -> SimulationJobBatchSummary
forall x.
SimulationJobBatchSummary -> Rep SimulationJobBatchSummary x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep SimulationJobBatchSummary x -> SimulationJobBatchSummary
$cfrom :: forall x.
SimulationJobBatchSummary -> Rep SimulationJobBatchSummary x
Prelude.Generic)

-- |
-- Create a value of 'SimulationJobBatchSummary' 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', 'simulationJobBatchSummary_status' - The status of the simulation job batch.
--
-- [Pending]
--     The simulation job batch request is pending.
--
-- [InProgress]
--     The simulation job batch is in progress.
--
-- [Failed]
--     The simulation job batch failed. One or more simulation job requests
--     could not be completed due to an internal failure (like
--     @InternalServiceError@). See @failureCode@ and @failureReason@ for
--     more information.
--
-- [Completed]
--     The simulation batch job completed. A batch is complete when (1)
--     there are no pending simulation job requests in the batch and none
--     of the failed simulation job requests are due to
--     @InternalServiceError@ and (2) when all created simulation jobs have
--     reached a terminal state (for example, @Completed@ or @Failed@).
--
-- [Canceled]
--     The simulation batch job was cancelled.
--
-- [Canceling]
--     The simulation batch job is being cancelled.
--
-- [Completing]
--     The simulation batch job is completing.
--
-- [TimingOut]
--     The simulation job batch is timing out.
--
--     If a batch timing out, and there are pending requests that were
--     failing due to an internal failure (like @InternalServiceError@),
--     the batch status will be @Failed@. If there are no such failing
--     request, the batch status will be @TimedOut@.
--
-- [TimedOut]
--     The simulation batch job timed out.
--
-- 'createdRequestCount', 'simulationJobBatchSummary_createdRequestCount' - The number of created simulation job requests.
--
-- 'lastUpdatedAt', 'simulationJobBatchSummary_lastUpdatedAt' - The time, in milliseconds since the epoch, when the simulation job batch
-- was last updated.
--
-- 'arn', 'simulationJobBatchSummary_arn' - The Amazon Resource Name (ARN) of the batch.
--
-- 'createdAt', 'simulationJobBatchSummary_createdAt' - The time, in milliseconds since the epoch, when the simulation job batch
-- was created.
--
-- 'pendingRequestCount', 'simulationJobBatchSummary_pendingRequestCount' - The number of pending simulation job requests.
--
-- 'failedRequestCount', 'simulationJobBatchSummary_failedRequestCount' - The number of failed simulation job requests.
newSimulationJobBatchSummary ::
  SimulationJobBatchSummary
newSimulationJobBatchSummary :: SimulationJobBatchSummary
newSimulationJobBatchSummary =
  SimulationJobBatchSummary' :: Maybe SimulationJobBatchStatus
-> Maybe Int
-> Maybe POSIX
-> Maybe Text
-> Maybe POSIX
-> Maybe Int
-> Maybe Int
-> SimulationJobBatchSummary
SimulationJobBatchSummary'
    { $sel:status:SimulationJobBatchSummary' :: Maybe SimulationJobBatchStatus
status =
        Maybe SimulationJobBatchStatus
forall a. Maybe a
Prelude.Nothing,
      $sel:createdRequestCount:SimulationJobBatchSummary' :: Maybe Int
createdRequestCount = Maybe Int
forall a. Maybe a
Prelude.Nothing,
      $sel:lastUpdatedAt:SimulationJobBatchSummary' :: Maybe POSIX
lastUpdatedAt = Maybe POSIX
forall a. Maybe a
Prelude.Nothing,
      $sel:arn:SimulationJobBatchSummary' :: Maybe Text
arn = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:createdAt:SimulationJobBatchSummary' :: Maybe POSIX
createdAt = Maybe POSIX
forall a. Maybe a
Prelude.Nothing,
      $sel:pendingRequestCount:SimulationJobBatchSummary' :: Maybe Int
pendingRequestCount = Maybe Int
forall a. Maybe a
Prelude.Nothing,
      $sel:failedRequestCount:SimulationJobBatchSummary' :: Maybe Int
failedRequestCount = Maybe Int
forall a. Maybe a
Prelude.Nothing
    }

-- | The status of the simulation job batch.
--
-- [Pending]
--     The simulation job batch request is pending.
--
-- [InProgress]
--     The simulation job batch is in progress.
--
-- [Failed]
--     The simulation job batch failed. One or more simulation job requests
--     could not be completed due to an internal failure (like
--     @InternalServiceError@). See @failureCode@ and @failureReason@ for
--     more information.
--
-- [Completed]
--     The simulation batch job completed. A batch is complete when (1)
--     there are no pending simulation job requests in the batch and none
--     of the failed simulation job requests are due to
--     @InternalServiceError@ and (2) when all created simulation jobs have
--     reached a terminal state (for example, @Completed@ or @Failed@).
--
-- [Canceled]
--     The simulation batch job was cancelled.
--
-- [Canceling]
--     The simulation batch job is being cancelled.
--
-- [Completing]
--     The simulation batch job is completing.
--
-- [TimingOut]
--     The simulation job batch is timing out.
--
--     If a batch timing out, and there are pending requests that were
--     failing due to an internal failure (like @InternalServiceError@),
--     the batch status will be @Failed@. If there are no such failing
--     request, the batch status will be @TimedOut@.
--
-- [TimedOut]
--     The simulation batch job timed out.
simulationJobBatchSummary_status :: Lens.Lens' SimulationJobBatchSummary (Prelude.Maybe SimulationJobBatchStatus)
simulationJobBatchSummary_status :: (Maybe SimulationJobBatchStatus
 -> f (Maybe SimulationJobBatchStatus))
-> SimulationJobBatchSummary -> f SimulationJobBatchSummary
simulationJobBatchSummary_status = (SimulationJobBatchSummary -> Maybe SimulationJobBatchStatus)
-> (SimulationJobBatchSummary
    -> Maybe SimulationJobBatchStatus -> SimulationJobBatchSummary)
-> Lens
     SimulationJobBatchSummary
     SimulationJobBatchSummary
     (Maybe SimulationJobBatchStatus)
     (Maybe SimulationJobBatchStatus)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\SimulationJobBatchSummary' {Maybe SimulationJobBatchStatus
status :: Maybe SimulationJobBatchStatus
$sel:status:SimulationJobBatchSummary' :: SimulationJobBatchSummary -> Maybe SimulationJobBatchStatus
status} -> Maybe SimulationJobBatchStatus
status) (\s :: SimulationJobBatchSummary
s@SimulationJobBatchSummary' {} Maybe SimulationJobBatchStatus
a -> SimulationJobBatchSummary
s {$sel:status:SimulationJobBatchSummary' :: Maybe SimulationJobBatchStatus
status = Maybe SimulationJobBatchStatus
a} :: SimulationJobBatchSummary)

-- | The number of created simulation job requests.
simulationJobBatchSummary_createdRequestCount :: Lens.Lens' SimulationJobBatchSummary (Prelude.Maybe Prelude.Int)
simulationJobBatchSummary_createdRequestCount :: (Maybe Int -> f (Maybe Int))
-> SimulationJobBatchSummary -> f SimulationJobBatchSummary
simulationJobBatchSummary_createdRequestCount = (SimulationJobBatchSummary -> Maybe Int)
-> (SimulationJobBatchSummary
    -> Maybe Int -> SimulationJobBatchSummary)
-> Lens
     SimulationJobBatchSummary
     SimulationJobBatchSummary
     (Maybe Int)
     (Maybe Int)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\SimulationJobBatchSummary' {Maybe Int
createdRequestCount :: Maybe Int
$sel:createdRequestCount:SimulationJobBatchSummary' :: SimulationJobBatchSummary -> Maybe Int
createdRequestCount} -> Maybe Int
createdRequestCount) (\s :: SimulationJobBatchSummary
s@SimulationJobBatchSummary' {} Maybe Int
a -> SimulationJobBatchSummary
s {$sel:createdRequestCount:SimulationJobBatchSummary' :: Maybe Int
createdRequestCount = Maybe Int
a} :: SimulationJobBatchSummary)

-- | The time, in milliseconds since the epoch, when the simulation job batch
-- was last updated.
simulationJobBatchSummary_lastUpdatedAt :: Lens.Lens' SimulationJobBatchSummary (Prelude.Maybe Prelude.UTCTime)
simulationJobBatchSummary_lastUpdatedAt :: (Maybe UTCTime -> f (Maybe UTCTime))
-> SimulationJobBatchSummary -> f SimulationJobBatchSummary
simulationJobBatchSummary_lastUpdatedAt = (SimulationJobBatchSummary -> Maybe POSIX)
-> (SimulationJobBatchSummary
    -> Maybe POSIX -> SimulationJobBatchSummary)
-> Lens
     SimulationJobBatchSummary
     SimulationJobBatchSummary
     (Maybe POSIX)
     (Maybe POSIX)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\SimulationJobBatchSummary' {Maybe POSIX
lastUpdatedAt :: Maybe POSIX
$sel:lastUpdatedAt:SimulationJobBatchSummary' :: SimulationJobBatchSummary -> Maybe POSIX
lastUpdatedAt} -> Maybe POSIX
lastUpdatedAt) (\s :: SimulationJobBatchSummary
s@SimulationJobBatchSummary' {} Maybe POSIX
a -> SimulationJobBatchSummary
s {$sel:lastUpdatedAt:SimulationJobBatchSummary' :: Maybe POSIX
lastUpdatedAt = Maybe POSIX
a} :: SimulationJobBatchSummary) ((Maybe POSIX -> f (Maybe POSIX))
 -> SimulationJobBatchSummary -> f SimulationJobBatchSummary)
-> ((Maybe UTCTime -> f (Maybe UTCTime))
    -> Maybe POSIX -> f (Maybe POSIX))
-> (Maybe UTCTime -> f (Maybe UTCTime))
-> SimulationJobBatchSummary
-> f SimulationJobBatchSummary
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

-- | The Amazon Resource Name (ARN) of the batch.
simulationJobBatchSummary_arn :: Lens.Lens' SimulationJobBatchSummary (Prelude.Maybe Prelude.Text)
simulationJobBatchSummary_arn :: (Maybe Text -> f (Maybe Text))
-> SimulationJobBatchSummary -> f SimulationJobBatchSummary
simulationJobBatchSummary_arn = (SimulationJobBatchSummary -> Maybe Text)
-> (SimulationJobBatchSummary
    -> Maybe Text -> SimulationJobBatchSummary)
-> Lens
     SimulationJobBatchSummary
     SimulationJobBatchSummary
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\SimulationJobBatchSummary' {Maybe Text
arn :: Maybe Text
$sel:arn:SimulationJobBatchSummary' :: SimulationJobBatchSummary -> Maybe Text
arn} -> Maybe Text
arn) (\s :: SimulationJobBatchSummary
s@SimulationJobBatchSummary' {} Maybe Text
a -> SimulationJobBatchSummary
s {$sel:arn:SimulationJobBatchSummary' :: Maybe Text
arn = Maybe Text
a} :: SimulationJobBatchSummary)

-- | The time, in milliseconds since the epoch, when the simulation job batch
-- was created.
simulationJobBatchSummary_createdAt :: Lens.Lens' SimulationJobBatchSummary (Prelude.Maybe Prelude.UTCTime)
simulationJobBatchSummary_createdAt :: (Maybe UTCTime -> f (Maybe UTCTime))
-> SimulationJobBatchSummary -> f SimulationJobBatchSummary
simulationJobBatchSummary_createdAt = (SimulationJobBatchSummary -> Maybe POSIX)
-> (SimulationJobBatchSummary
    -> Maybe POSIX -> SimulationJobBatchSummary)
-> Lens
     SimulationJobBatchSummary
     SimulationJobBatchSummary
     (Maybe POSIX)
     (Maybe POSIX)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\SimulationJobBatchSummary' {Maybe POSIX
createdAt :: Maybe POSIX
$sel:createdAt:SimulationJobBatchSummary' :: SimulationJobBatchSummary -> Maybe POSIX
createdAt} -> Maybe POSIX
createdAt) (\s :: SimulationJobBatchSummary
s@SimulationJobBatchSummary' {} Maybe POSIX
a -> SimulationJobBatchSummary
s {$sel:createdAt:SimulationJobBatchSummary' :: Maybe POSIX
createdAt = Maybe POSIX
a} :: SimulationJobBatchSummary) ((Maybe POSIX -> f (Maybe POSIX))
 -> SimulationJobBatchSummary -> f SimulationJobBatchSummary)
-> ((Maybe UTCTime -> f (Maybe UTCTime))
    -> Maybe POSIX -> f (Maybe POSIX))
-> (Maybe UTCTime -> f (Maybe UTCTime))
-> SimulationJobBatchSummary
-> f SimulationJobBatchSummary
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

-- | The number of pending simulation job requests.
simulationJobBatchSummary_pendingRequestCount :: Lens.Lens' SimulationJobBatchSummary (Prelude.Maybe Prelude.Int)
simulationJobBatchSummary_pendingRequestCount :: (Maybe Int -> f (Maybe Int))
-> SimulationJobBatchSummary -> f SimulationJobBatchSummary
simulationJobBatchSummary_pendingRequestCount = (SimulationJobBatchSummary -> Maybe Int)
-> (SimulationJobBatchSummary
    -> Maybe Int -> SimulationJobBatchSummary)
-> Lens
     SimulationJobBatchSummary
     SimulationJobBatchSummary
     (Maybe Int)
     (Maybe Int)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\SimulationJobBatchSummary' {Maybe Int
pendingRequestCount :: Maybe Int
$sel:pendingRequestCount:SimulationJobBatchSummary' :: SimulationJobBatchSummary -> Maybe Int
pendingRequestCount} -> Maybe Int
pendingRequestCount) (\s :: SimulationJobBatchSummary
s@SimulationJobBatchSummary' {} Maybe Int
a -> SimulationJobBatchSummary
s {$sel:pendingRequestCount:SimulationJobBatchSummary' :: Maybe Int
pendingRequestCount = Maybe Int
a} :: SimulationJobBatchSummary)

-- | The number of failed simulation job requests.
simulationJobBatchSummary_failedRequestCount :: Lens.Lens' SimulationJobBatchSummary (Prelude.Maybe Prelude.Int)
simulationJobBatchSummary_failedRequestCount :: (Maybe Int -> f (Maybe Int))
-> SimulationJobBatchSummary -> f SimulationJobBatchSummary
simulationJobBatchSummary_failedRequestCount = (SimulationJobBatchSummary -> Maybe Int)
-> (SimulationJobBatchSummary
    -> Maybe Int -> SimulationJobBatchSummary)
-> Lens
     SimulationJobBatchSummary
     SimulationJobBatchSummary
     (Maybe Int)
     (Maybe Int)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\SimulationJobBatchSummary' {Maybe Int
failedRequestCount :: Maybe Int
$sel:failedRequestCount:SimulationJobBatchSummary' :: SimulationJobBatchSummary -> Maybe Int
failedRequestCount} -> Maybe Int
failedRequestCount) (\s :: SimulationJobBatchSummary
s@SimulationJobBatchSummary' {} Maybe Int
a -> SimulationJobBatchSummary
s {$sel:failedRequestCount:SimulationJobBatchSummary' :: Maybe Int
failedRequestCount = Maybe Int
a} :: SimulationJobBatchSummary)

instance Core.FromJSON SimulationJobBatchSummary where
  parseJSON :: Value -> Parser SimulationJobBatchSummary
parseJSON =
    String
-> (Object -> Parser SimulationJobBatchSummary)
-> Value
-> Parser SimulationJobBatchSummary
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
      String
"SimulationJobBatchSummary"
      ( \Object
x ->
          Maybe SimulationJobBatchStatus
-> Maybe Int
-> Maybe POSIX
-> Maybe Text
-> Maybe POSIX
-> Maybe Int
-> Maybe Int
-> SimulationJobBatchSummary
SimulationJobBatchSummary'
            (Maybe SimulationJobBatchStatus
 -> Maybe Int
 -> Maybe POSIX
 -> Maybe Text
 -> Maybe POSIX
 -> Maybe Int
 -> Maybe Int
 -> SimulationJobBatchSummary)
-> Parser (Maybe SimulationJobBatchStatus)
-> Parser
     (Maybe Int
      -> Maybe POSIX
      -> Maybe Text
      -> Maybe POSIX
      -> Maybe Int
      -> Maybe Int
      -> SimulationJobBatchSummary)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Parser (Maybe SimulationJobBatchStatus)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"status")
            Parser
  (Maybe Int
   -> Maybe POSIX
   -> Maybe Text
   -> Maybe POSIX
   -> Maybe Int
   -> Maybe Int
   -> SimulationJobBatchSummary)
-> Parser (Maybe Int)
-> Parser
     (Maybe POSIX
      -> Maybe Text
      -> Maybe POSIX
      -> Maybe Int
      -> Maybe Int
      -> SimulationJobBatchSummary)
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
"createdRequestCount")
            Parser
  (Maybe POSIX
   -> Maybe Text
   -> Maybe POSIX
   -> Maybe Int
   -> Maybe Int
   -> SimulationJobBatchSummary)
-> Parser (Maybe POSIX)
-> Parser
     (Maybe Text
      -> Maybe POSIX
      -> Maybe Int
      -> Maybe Int
      -> SimulationJobBatchSummary)
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
"lastUpdatedAt")
            Parser
  (Maybe Text
   -> Maybe POSIX
   -> Maybe Int
   -> Maybe Int
   -> SimulationJobBatchSummary)
-> Parser (Maybe Text)
-> Parser
     (Maybe POSIX
      -> Maybe Int -> Maybe Int -> SimulationJobBatchSummary)
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 Int -> Maybe Int -> SimulationJobBatchSummary)
-> Parser (Maybe POSIX)
-> Parser (Maybe Int -> Maybe Int -> SimulationJobBatchSummary)
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 Int -> Maybe Int -> SimulationJobBatchSummary)
-> Parser (Maybe Int)
-> Parser (Maybe Int -> SimulationJobBatchSummary)
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
"pendingRequestCount")
            Parser (Maybe Int -> SimulationJobBatchSummary)
-> Parser (Maybe Int) -> Parser SimulationJobBatchSummary
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
"failedRequestCount")
      )

instance Prelude.Hashable SimulationJobBatchSummary

instance Prelude.NFData SimulationJobBatchSummary