{-# 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.WorkflowExecutionInfos 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
import Amazonka.SWF.Types.WorkflowExecutionInfo
data WorkflowExecutionInfos = WorkflowExecutionInfos'
{
WorkflowExecutionInfos -> Maybe Text
nextPageToken :: Prelude.Maybe Prelude.Text,
WorkflowExecutionInfos -> [WorkflowExecutionInfo]
executionInfos :: [WorkflowExecutionInfo]
}
deriving (WorkflowExecutionInfos -> WorkflowExecutionInfos -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: WorkflowExecutionInfos -> WorkflowExecutionInfos -> Bool
$c/= :: WorkflowExecutionInfos -> WorkflowExecutionInfos -> Bool
== :: WorkflowExecutionInfos -> WorkflowExecutionInfos -> Bool
$c== :: WorkflowExecutionInfos -> WorkflowExecutionInfos -> Bool
Prelude.Eq, ReadPrec [WorkflowExecutionInfos]
ReadPrec WorkflowExecutionInfos
Int -> ReadS WorkflowExecutionInfos
ReadS [WorkflowExecutionInfos]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [WorkflowExecutionInfos]
$creadListPrec :: ReadPrec [WorkflowExecutionInfos]
readPrec :: ReadPrec WorkflowExecutionInfos
$creadPrec :: ReadPrec WorkflowExecutionInfos
readList :: ReadS [WorkflowExecutionInfos]
$creadList :: ReadS [WorkflowExecutionInfos]
readsPrec :: Int -> ReadS WorkflowExecutionInfos
$creadsPrec :: Int -> ReadS WorkflowExecutionInfos
Prelude.Read, Int -> WorkflowExecutionInfos -> ShowS
[WorkflowExecutionInfos] -> ShowS
WorkflowExecutionInfos -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [WorkflowExecutionInfos] -> ShowS
$cshowList :: [WorkflowExecutionInfos] -> ShowS
show :: WorkflowExecutionInfos -> String
$cshow :: WorkflowExecutionInfos -> String
showsPrec :: Int -> WorkflowExecutionInfos -> ShowS
$cshowsPrec :: Int -> WorkflowExecutionInfos -> ShowS
Prelude.Show, forall x. Rep WorkflowExecutionInfos x -> WorkflowExecutionInfos
forall x. WorkflowExecutionInfos -> Rep WorkflowExecutionInfos x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep WorkflowExecutionInfos x -> WorkflowExecutionInfos
$cfrom :: forall x. WorkflowExecutionInfos -> Rep WorkflowExecutionInfos x
Prelude.Generic)
newWorkflowExecutionInfos ::
WorkflowExecutionInfos
newWorkflowExecutionInfos :: WorkflowExecutionInfos
newWorkflowExecutionInfos =
WorkflowExecutionInfos'
{ $sel:nextPageToken:WorkflowExecutionInfos' :: Maybe Text
nextPageToken =
forall a. Maybe a
Prelude.Nothing,
$sel:executionInfos:WorkflowExecutionInfos' :: [WorkflowExecutionInfo]
executionInfos = forall a. Monoid a => a
Prelude.mempty
}
workflowExecutionInfos_nextPageToken :: Lens.Lens' WorkflowExecutionInfos (Prelude.Maybe Prelude.Text)
workflowExecutionInfos_nextPageToken :: Lens' WorkflowExecutionInfos (Maybe Text)
workflowExecutionInfos_nextPageToken = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\WorkflowExecutionInfos' {Maybe Text
nextPageToken :: Maybe Text
$sel:nextPageToken:WorkflowExecutionInfos' :: WorkflowExecutionInfos -> Maybe Text
nextPageToken} -> Maybe Text
nextPageToken) (\s :: WorkflowExecutionInfos
s@WorkflowExecutionInfos' {} Maybe Text
a -> WorkflowExecutionInfos
s {$sel:nextPageToken:WorkflowExecutionInfos' :: Maybe Text
nextPageToken = Maybe Text
a} :: WorkflowExecutionInfos)
workflowExecutionInfos_executionInfos :: Lens.Lens' WorkflowExecutionInfos [WorkflowExecutionInfo]
workflowExecutionInfos_executionInfos :: Lens' WorkflowExecutionInfos [WorkflowExecutionInfo]
workflowExecutionInfos_executionInfos = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\WorkflowExecutionInfos' {[WorkflowExecutionInfo]
executionInfos :: [WorkflowExecutionInfo]
$sel:executionInfos:WorkflowExecutionInfos' :: WorkflowExecutionInfos -> [WorkflowExecutionInfo]
executionInfos} -> [WorkflowExecutionInfo]
executionInfos) (\s :: WorkflowExecutionInfos
s@WorkflowExecutionInfos' {} [WorkflowExecutionInfo]
a -> WorkflowExecutionInfos
s {$sel:executionInfos:WorkflowExecutionInfos' :: [WorkflowExecutionInfo]
executionInfos = [WorkflowExecutionInfo]
a} :: WorkflowExecutionInfos) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
instance Data.FromJSON WorkflowExecutionInfos where
parseJSON :: Value -> Parser WorkflowExecutionInfos
parseJSON =
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Data.withObject
String
"WorkflowExecutionInfos"
( \Object
x ->
Maybe Text -> [WorkflowExecutionInfo] -> WorkflowExecutionInfos
WorkflowExecutionInfos'
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
"nextPageToken")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ( Object
x
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"executionInfos"
forall a. Parser (Maybe a) -> a -> Parser a
Data..!= forall a. Monoid a => a
Prelude.mempty
)
)
instance Prelude.Hashable WorkflowExecutionInfos where
hashWithSalt :: Int -> WorkflowExecutionInfos -> Int
hashWithSalt Int
_salt WorkflowExecutionInfos' {[WorkflowExecutionInfo]
Maybe Text
executionInfos :: [WorkflowExecutionInfo]
nextPageToken :: Maybe Text
$sel:executionInfos:WorkflowExecutionInfos' :: WorkflowExecutionInfos -> [WorkflowExecutionInfo]
$sel:nextPageToken:WorkflowExecutionInfos' :: WorkflowExecutionInfos -> Maybe Text
..} =
Int
_salt
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
nextPageToken
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` [WorkflowExecutionInfo]
executionInfos
instance Prelude.NFData WorkflowExecutionInfos where
rnf :: WorkflowExecutionInfos -> ()
rnf WorkflowExecutionInfos' {[WorkflowExecutionInfo]
Maybe Text
executionInfos :: [WorkflowExecutionInfo]
nextPageToken :: Maybe Text
$sel:executionInfos:WorkflowExecutionInfos' :: WorkflowExecutionInfos -> [WorkflowExecutionInfo]
$sel:nextPageToken:WorkflowExecutionInfos' :: WorkflowExecutionInfos -> Maybe Text
..} =
forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
nextPageToken
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf [WorkflowExecutionInfo]
executionInfos