{-# 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.Lens as Lens
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
(WorkflowExecutionCount -> WorkflowExecutionCount -> Bool)
-> (WorkflowExecutionCount -> WorkflowExecutionCount -> Bool)
-> Eq WorkflowExecutionCount
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]
(Int -> ReadS WorkflowExecutionCount)
-> ReadS [WorkflowExecutionCount]
-> ReadPrec WorkflowExecutionCount
-> ReadPrec [WorkflowExecutionCount]
-> Read 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
(Int -> WorkflowExecutionCount -> ShowS)
-> (WorkflowExecutionCount -> String)
-> ([WorkflowExecutionCount] -> ShowS)
-> Show WorkflowExecutionCount
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. WorkflowExecutionCount -> Rep WorkflowExecutionCount x)
-> (forall x.
Rep WorkflowExecutionCount x -> WorkflowExecutionCount)
-> Generic WorkflowExecutionCount
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' :: Maybe Bool -> Natural -> WorkflowExecutionCount
WorkflowExecutionCount'
{ $sel:truncated:WorkflowExecutionCount' :: Maybe Bool
truncated =
Maybe Bool
forall a. Maybe a
Prelude.Nothing,
$sel:count:WorkflowExecutionCount' :: Natural
count = Natural
pCount_
}
workflowExecutionCount_truncated :: Lens.Lens' WorkflowExecutionCount (Prelude.Maybe Prelude.Bool)
workflowExecutionCount_truncated :: (Maybe Bool -> f (Maybe Bool))
-> WorkflowExecutionCount -> f WorkflowExecutionCount
workflowExecutionCount_truncated = (WorkflowExecutionCount -> Maybe Bool)
-> (WorkflowExecutionCount -> Maybe Bool -> WorkflowExecutionCount)
-> Lens
WorkflowExecutionCount
WorkflowExecutionCount
(Maybe Bool)
(Maybe Bool)
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 :: (Natural -> f Natural)
-> WorkflowExecutionCount -> f WorkflowExecutionCount
workflowExecutionCount_count = (WorkflowExecutionCount -> Natural)
-> (WorkflowExecutionCount -> Natural -> WorkflowExecutionCount)
-> Lens
WorkflowExecutionCount WorkflowExecutionCount Natural Natural
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 Core.FromJSON WorkflowExecutionCount where
parseJSON :: Value -> Parser WorkflowExecutionCount
parseJSON =
String
-> (Object -> Parser WorkflowExecutionCount)
-> Value
-> Parser WorkflowExecutionCount
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
String
"WorkflowExecutionCount"
( \Object
x ->
Maybe Bool -> Natural -> WorkflowExecutionCount
WorkflowExecutionCount'
(Maybe Bool -> Natural -> WorkflowExecutionCount)
-> Parser (Maybe Bool)
-> Parser (Natural -> WorkflowExecutionCount)
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 -> WorkflowExecutionCount)
-> Parser Natural -> Parser WorkflowExecutionCount
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 WorkflowExecutionCount
instance Prelude.NFData WorkflowExecutionCount