{-# 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.WorkflowExecutionCount 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
data WorkflowExecutionCount = WorkflowExecutionCount'
{
WorkflowExecutionCount -> Maybe Bool
truncated :: Prelude.Maybe Prelude.Bool,
WorkflowExecutionCount -> Natural
count :: Prelude.Natural
}
deriving (WorkflowExecutionCount -> WorkflowExecutionCount -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: WorkflowExecutionCount -> WorkflowExecutionCount -> Bool
$c/= :: WorkflowExecutionCount -> WorkflowExecutionCount -> Bool
== :: WorkflowExecutionCount -> WorkflowExecutionCount -> Bool
$c== :: WorkflowExecutionCount -> WorkflowExecutionCount -> Bool
Prelude.Eq, ReadPrec [WorkflowExecutionCount]
ReadPrec WorkflowExecutionCount
Int -> ReadS WorkflowExecutionCount
ReadS [WorkflowExecutionCount]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [WorkflowExecutionCount]
$creadListPrec :: ReadPrec [WorkflowExecutionCount]
readPrec :: ReadPrec WorkflowExecutionCount
$creadPrec :: ReadPrec WorkflowExecutionCount
readList :: ReadS [WorkflowExecutionCount]
$creadList :: ReadS [WorkflowExecutionCount]
readsPrec :: Int -> ReadS WorkflowExecutionCount
$creadsPrec :: Int -> ReadS WorkflowExecutionCount
Prelude.Read, Int -> WorkflowExecutionCount -> ShowS
[WorkflowExecutionCount] -> ShowS
WorkflowExecutionCount -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [WorkflowExecutionCount] -> ShowS
$cshowList :: [WorkflowExecutionCount] -> ShowS
show :: WorkflowExecutionCount -> String
$cshow :: WorkflowExecutionCount -> String
showsPrec :: Int -> WorkflowExecutionCount -> ShowS
$cshowsPrec :: Int -> WorkflowExecutionCount -> ShowS
Prelude.Show, forall x. Rep WorkflowExecutionCount x -> WorkflowExecutionCount
forall x. WorkflowExecutionCount -> Rep WorkflowExecutionCount x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep WorkflowExecutionCount x -> WorkflowExecutionCount
$cfrom :: forall x. WorkflowExecutionCount -> Rep WorkflowExecutionCount x
Prelude.Generic)
newWorkflowExecutionCount ::
Prelude.Natural ->
WorkflowExecutionCount
newWorkflowExecutionCount :: Natural -> WorkflowExecutionCount
newWorkflowExecutionCount Natural
pCount_ =
WorkflowExecutionCount'
{ $sel:truncated:WorkflowExecutionCount' :: Maybe Bool
truncated =
forall a. Maybe a
Prelude.Nothing,
$sel:count:WorkflowExecutionCount' :: Natural
count = Natural
pCount_
}
workflowExecutionCount_truncated :: Lens.Lens' WorkflowExecutionCount (Prelude.Maybe Prelude.Bool)
workflowExecutionCount_truncated :: Lens' WorkflowExecutionCount (Maybe Bool)
workflowExecutionCount_truncated = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\WorkflowExecutionCount' {Maybe Bool
truncated :: Maybe Bool
$sel:truncated:WorkflowExecutionCount' :: WorkflowExecutionCount -> Maybe Bool
truncated} -> Maybe Bool
truncated) (\s :: WorkflowExecutionCount
s@WorkflowExecutionCount' {} Maybe Bool
a -> WorkflowExecutionCount
s {$sel:truncated:WorkflowExecutionCount' :: Maybe Bool
truncated = Maybe Bool
a} :: WorkflowExecutionCount)
workflowExecutionCount_count :: Lens.Lens' WorkflowExecutionCount Prelude.Natural
workflowExecutionCount_count :: Lens' WorkflowExecutionCount Natural
workflowExecutionCount_count = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\WorkflowExecutionCount' {Natural
count :: Natural
$sel:count:WorkflowExecutionCount' :: WorkflowExecutionCount -> Natural
count} -> Natural
count) (\s :: WorkflowExecutionCount
s@WorkflowExecutionCount' {} Natural
a -> WorkflowExecutionCount
s {$sel:count:WorkflowExecutionCount' :: Natural
count = Natural
a} :: WorkflowExecutionCount)
instance Data.FromJSON WorkflowExecutionCount where
parseJSON :: Value -> Parser WorkflowExecutionCount
parseJSON =
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Data.withObject
String
"WorkflowExecutionCount"
( \Object
x ->
Maybe Bool -> Natural -> WorkflowExecutionCount
WorkflowExecutionCount'
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
"truncated")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser a
Data..: Key
"count")
)
instance Prelude.Hashable WorkflowExecutionCount where
hashWithSalt :: Int -> WorkflowExecutionCount -> Int
hashWithSalt Int
_salt WorkflowExecutionCount' {Natural
Maybe Bool
count :: Natural
truncated :: Maybe Bool
$sel:count:WorkflowExecutionCount' :: WorkflowExecutionCount -> Natural
$sel:truncated:WorkflowExecutionCount' :: WorkflowExecutionCount -> Maybe Bool
..} =
Int
_salt
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Bool
truncated
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Natural
count
instance Prelude.NFData WorkflowExecutionCount where
rnf :: WorkflowExecutionCount -> ()
rnf WorkflowExecutionCount' {Natural
Maybe Bool
count :: Natural
truncated :: Maybe Bool
$sel:count:WorkflowExecutionCount' :: WorkflowExecutionCount -> Natural
$sel:truncated:WorkflowExecutionCount' :: WorkflowExecutionCount -> Maybe Bool
..} =
forall a. NFData a => a -> ()
Prelude.rnf Maybe Bool
truncated
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Natural
count