{-# 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.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
data SimulationJobBatchSummary = SimulationJobBatchSummary'
{
SimulationJobBatchSummary -> Maybe SimulationJobBatchStatus
status :: Prelude.Maybe SimulationJobBatchStatus,
SimulationJobBatchSummary -> Maybe Int
createdRequestCount :: Prelude.Maybe Prelude.Int,
SimulationJobBatchSummary -> Maybe POSIX
lastUpdatedAt :: Prelude.Maybe Core.POSIX,
SimulationJobBatchSummary -> Maybe Text
arn :: Prelude.Maybe Prelude.Text,
SimulationJobBatchSummary -> Maybe POSIX
createdAt :: Prelude.Maybe Core.POSIX,
SimulationJobBatchSummary -> Maybe Int
pendingRequestCount :: Prelude.Maybe Prelude.Int,
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)
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
}
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)
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)
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
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)
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
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)
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