{-# 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.SWF.Types.PendingTaskCount where
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
data PendingTaskCount = PendingTaskCount'
{
PendingTaskCount -> Maybe Bool
truncated :: Prelude.Maybe Prelude.Bool,
PendingTaskCount -> Natural
count :: Prelude.Natural
}
deriving (PendingTaskCount -> PendingTaskCount -> Bool
(PendingTaskCount -> PendingTaskCount -> Bool)
-> (PendingTaskCount -> PendingTaskCount -> Bool)
-> Eq PendingTaskCount
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: PendingTaskCount -> PendingTaskCount -> Bool
$c/= :: PendingTaskCount -> PendingTaskCount -> Bool
== :: PendingTaskCount -> PendingTaskCount -> Bool
$c== :: PendingTaskCount -> PendingTaskCount -> Bool
Prelude.Eq, ReadPrec [PendingTaskCount]
ReadPrec PendingTaskCount
Int -> ReadS PendingTaskCount
ReadS [PendingTaskCount]
(Int -> ReadS PendingTaskCount)
-> ReadS [PendingTaskCount]
-> ReadPrec PendingTaskCount
-> ReadPrec [PendingTaskCount]
-> Read PendingTaskCount
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [PendingTaskCount]
$creadListPrec :: ReadPrec [PendingTaskCount]
readPrec :: ReadPrec PendingTaskCount
$creadPrec :: ReadPrec PendingTaskCount
readList :: ReadS [PendingTaskCount]
$creadList :: ReadS [PendingTaskCount]
readsPrec :: Int -> ReadS PendingTaskCount
$creadsPrec :: Int -> ReadS PendingTaskCount
Prelude.Read, Int -> PendingTaskCount -> ShowS
[PendingTaskCount] -> ShowS
PendingTaskCount -> String
(Int -> PendingTaskCount -> ShowS)
-> (PendingTaskCount -> String)
-> ([PendingTaskCount] -> ShowS)
-> Show PendingTaskCount
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [PendingTaskCount] -> ShowS
$cshowList :: [PendingTaskCount] -> ShowS
show :: PendingTaskCount -> String
$cshow :: PendingTaskCount -> String
showsPrec :: Int -> PendingTaskCount -> ShowS
$cshowsPrec :: Int -> PendingTaskCount -> ShowS
Prelude.Show, (forall x. PendingTaskCount -> Rep PendingTaskCount x)
-> (forall x. Rep PendingTaskCount x -> PendingTaskCount)
-> Generic PendingTaskCount
forall x. Rep PendingTaskCount x -> PendingTaskCount
forall x. PendingTaskCount -> Rep PendingTaskCount x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep PendingTaskCount x -> PendingTaskCount
$cfrom :: forall x. PendingTaskCount -> Rep PendingTaskCount x
Prelude.Generic)
newPendingTaskCount ::
Prelude.Natural ->
PendingTaskCount
newPendingTaskCount :: Natural -> PendingTaskCount
newPendingTaskCount Natural
pCount_ =
PendingTaskCount' :: Maybe Bool -> Natural -> PendingTaskCount
PendingTaskCount'
{ $sel:truncated:PendingTaskCount' :: Maybe Bool
truncated = Maybe Bool
forall a. Maybe a
Prelude.Nothing,
$sel:count:PendingTaskCount' :: Natural
count = Natural
pCount_
}
pendingTaskCount_truncated :: Lens.Lens' PendingTaskCount (Prelude.Maybe Prelude.Bool)
pendingTaskCount_truncated :: (Maybe Bool -> f (Maybe Bool))
-> PendingTaskCount -> f PendingTaskCount
pendingTaskCount_truncated = (PendingTaskCount -> Maybe Bool)
-> (PendingTaskCount -> Maybe Bool -> PendingTaskCount)
-> Lens PendingTaskCount PendingTaskCount (Maybe Bool) (Maybe Bool)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\PendingTaskCount' {Maybe Bool
truncated :: Maybe Bool
$sel:truncated:PendingTaskCount' :: PendingTaskCount -> Maybe Bool
truncated} -> Maybe Bool
truncated) (\s :: PendingTaskCount
s@PendingTaskCount' {} Maybe Bool
a -> PendingTaskCount
s {$sel:truncated:PendingTaskCount' :: Maybe Bool
truncated = Maybe Bool
a} :: PendingTaskCount)
pendingTaskCount_count :: Lens.Lens' PendingTaskCount Prelude.Natural
pendingTaskCount_count :: (Natural -> f Natural) -> PendingTaskCount -> f PendingTaskCount
pendingTaskCount_count = (PendingTaskCount -> Natural)
-> (PendingTaskCount -> Natural -> PendingTaskCount)
-> Lens PendingTaskCount PendingTaskCount Natural Natural
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\PendingTaskCount' {Natural
count :: Natural
$sel:count:PendingTaskCount' :: PendingTaskCount -> Natural
count} -> Natural
count) (\s :: PendingTaskCount
s@PendingTaskCount' {} Natural
a -> PendingTaskCount
s {$sel:count:PendingTaskCount' :: Natural
count = Natural
a} :: PendingTaskCount)
instance Core.FromJSON PendingTaskCount where
parseJSON :: Value -> Parser PendingTaskCount
parseJSON =
String
-> (Object -> Parser PendingTaskCount)
-> Value
-> Parser PendingTaskCount
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
String
"PendingTaskCount"
( \Object
x ->
Maybe Bool -> Natural -> PendingTaskCount
PendingTaskCount'
(Maybe Bool -> Natural -> PendingTaskCount)
-> Parser (Maybe Bool) -> Parser (Natural -> PendingTaskCount)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Parser (Maybe Bool)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"truncated")
Parser (Natural -> PendingTaskCount)
-> Parser Natural -> Parser PendingTaskCount
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser Natural
forall a. FromJSON a => Object -> Text -> Parser a
Core..: Text
"count")
)
instance Prelude.Hashable PendingTaskCount
instance Prelude.NFData PendingTaskCount