{-# 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.Lens as Lens
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
(WorkflowExecutionInfos -> WorkflowExecutionInfos -> Bool)
-> (WorkflowExecutionInfos -> WorkflowExecutionInfos -> Bool)
-> Eq WorkflowExecutionInfos
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]
(Int -> ReadS WorkflowExecutionInfos)
-> ReadS [WorkflowExecutionInfos]
-> ReadPrec WorkflowExecutionInfos
-> ReadPrec [WorkflowExecutionInfos]
-> Read 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
(Int -> WorkflowExecutionInfos -> ShowS)
-> (WorkflowExecutionInfos -> String)
-> ([WorkflowExecutionInfos] -> ShowS)
-> Show WorkflowExecutionInfos
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. WorkflowExecutionInfos -> Rep WorkflowExecutionInfos x)
-> (forall x.
Rep WorkflowExecutionInfos x -> WorkflowExecutionInfos)
-> Generic WorkflowExecutionInfos
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' :: Maybe Text -> [WorkflowExecutionInfo] -> WorkflowExecutionInfos
WorkflowExecutionInfos'
{ $sel:nextPageToken:WorkflowExecutionInfos' :: Maybe Text
nextPageToken =
Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:executionInfos:WorkflowExecutionInfos' :: [WorkflowExecutionInfo]
executionInfos = [WorkflowExecutionInfo]
forall a. Monoid a => a
Prelude.mempty
}
workflowExecutionInfos_nextPageToken :: Lens.Lens' WorkflowExecutionInfos (Prelude.Maybe Prelude.Text)
workflowExecutionInfos_nextPageToken :: (Maybe Text -> f (Maybe Text))
-> WorkflowExecutionInfos -> f WorkflowExecutionInfos
workflowExecutionInfos_nextPageToken = (WorkflowExecutionInfos -> Maybe Text)
-> (WorkflowExecutionInfos -> Maybe Text -> WorkflowExecutionInfos)
-> Lens
WorkflowExecutionInfos
WorkflowExecutionInfos
(Maybe Text)
(Maybe Text)
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 :: ([WorkflowExecutionInfo] -> f [WorkflowExecutionInfo])
-> WorkflowExecutionInfos -> f WorkflowExecutionInfos
workflowExecutionInfos_executionInfos = (WorkflowExecutionInfos -> [WorkflowExecutionInfo])
-> (WorkflowExecutionInfos
-> [WorkflowExecutionInfo] -> WorkflowExecutionInfos)
-> Lens
WorkflowExecutionInfos
WorkflowExecutionInfos
[WorkflowExecutionInfo]
[WorkflowExecutionInfo]
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) (([WorkflowExecutionInfo] -> f [WorkflowExecutionInfo])
-> WorkflowExecutionInfos -> f WorkflowExecutionInfos)
-> (([WorkflowExecutionInfo] -> f [WorkflowExecutionInfo])
-> [WorkflowExecutionInfo] -> f [WorkflowExecutionInfo])
-> ([WorkflowExecutionInfo] -> f [WorkflowExecutionInfo])
-> WorkflowExecutionInfos
-> f WorkflowExecutionInfos
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. ([WorkflowExecutionInfo] -> f [WorkflowExecutionInfo])
-> [WorkflowExecutionInfo] -> f [WorkflowExecutionInfo]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
instance Core.FromJSON WorkflowExecutionInfos where
parseJSON :: Value -> Parser WorkflowExecutionInfos
parseJSON =
String
-> (Object -> Parser WorkflowExecutionInfos)
-> Value
-> Parser WorkflowExecutionInfos
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
String
"WorkflowExecutionInfos"
( \Object
x ->
Maybe Text -> [WorkflowExecutionInfo] -> WorkflowExecutionInfos
WorkflowExecutionInfos'
(Maybe Text -> [WorkflowExecutionInfo] -> WorkflowExecutionInfos)
-> Parser (Maybe Text)
-> Parser ([WorkflowExecutionInfo] -> WorkflowExecutionInfos)
forall (f :: * -> *) a b. Functor 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
"nextPageToken")
Parser ([WorkflowExecutionInfo] -> WorkflowExecutionInfos)
-> Parser [WorkflowExecutionInfo] -> Parser WorkflowExecutionInfos
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ( Object
x Object -> Text -> Parser (Maybe [WorkflowExecutionInfo])
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"executionInfos"
Parser (Maybe [WorkflowExecutionInfo])
-> [WorkflowExecutionInfo] -> Parser [WorkflowExecutionInfo]
forall a. Parser (Maybe a) -> a -> Parser a
Core..!= [WorkflowExecutionInfo]
forall a. Monoid a => a
Prelude.mempty
)
)
instance Prelude.Hashable WorkflowExecutionInfos
instance Prelude.NFData WorkflowExecutionInfos