{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE DuplicateRecordFields #-}
{-# LANGUAGE NamedFieldPuns #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE StrictData #-}
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# OPTIONS_GHC -fno-warn-unused-binds #-}
{-# OPTIONS_GHC -fno-warn-unused-imports #-}
{-# OPTIONS_GHC -fno-warn-unused-matches #-}
module Amazonka.SWF.GetWorkflowExecutionHistory
(
GetWorkflowExecutionHistory (..),
newGetWorkflowExecutionHistory,
getWorkflowExecutionHistory_nextPageToken,
getWorkflowExecutionHistory_reverseOrder,
getWorkflowExecutionHistory_maximumPageSize,
getWorkflowExecutionHistory_domain,
getWorkflowExecutionHistory_execution,
GetWorkflowExecutionHistoryResponse (..),
newGetWorkflowExecutionHistoryResponse,
getWorkflowExecutionHistoryResponse_nextPageToken,
getWorkflowExecutionHistoryResponse_httpStatus,
getWorkflowExecutionHistoryResponse_events,
)
where
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
import qualified Amazonka.Request as Request
import qualified Amazonka.Response as Response
import Amazonka.SWF.Types
data GetWorkflowExecutionHistory = GetWorkflowExecutionHistory'
{
GetWorkflowExecutionHistory -> Maybe Text
nextPageToken :: Prelude.Maybe Prelude.Text,
GetWorkflowExecutionHistory -> Maybe Bool
reverseOrder :: Prelude.Maybe Prelude.Bool,
GetWorkflowExecutionHistory -> Maybe Natural
maximumPageSize :: Prelude.Maybe Prelude.Natural,
GetWorkflowExecutionHistory -> Text
domain :: Prelude.Text,
GetWorkflowExecutionHistory -> WorkflowExecution
execution :: WorkflowExecution
}
deriving (GetWorkflowExecutionHistory -> GetWorkflowExecutionHistory -> Bool
(GetWorkflowExecutionHistory
-> GetWorkflowExecutionHistory -> Bool)
-> (GetWorkflowExecutionHistory
-> GetWorkflowExecutionHistory -> Bool)
-> Eq GetWorkflowExecutionHistory
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: GetWorkflowExecutionHistory -> GetWorkflowExecutionHistory -> Bool
$c/= :: GetWorkflowExecutionHistory -> GetWorkflowExecutionHistory -> Bool
== :: GetWorkflowExecutionHistory -> GetWorkflowExecutionHistory -> Bool
$c== :: GetWorkflowExecutionHistory -> GetWorkflowExecutionHistory -> Bool
Prelude.Eq, ReadPrec [GetWorkflowExecutionHistory]
ReadPrec GetWorkflowExecutionHistory
Int -> ReadS GetWorkflowExecutionHistory
ReadS [GetWorkflowExecutionHistory]
(Int -> ReadS GetWorkflowExecutionHistory)
-> ReadS [GetWorkflowExecutionHistory]
-> ReadPrec GetWorkflowExecutionHistory
-> ReadPrec [GetWorkflowExecutionHistory]
-> Read GetWorkflowExecutionHistory
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [GetWorkflowExecutionHistory]
$creadListPrec :: ReadPrec [GetWorkflowExecutionHistory]
readPrec :: ReadPrec GetWorkflowExecutionHistory
$creadPrec :: ReadPrec GetWorkflowExecutionHistory
readList :: ReadS [GetWorkflowExecutionHistory]
$creadList :: ReadS [GetWorkflowExecutionHistory]
readsPrec :: Int -> ReadS GetWorkflowExecutionHistory
$creadsPrec :: Int -> ReadS GetWorkflowExecutionHistory
Prelude.Read, Int -> GetWorkflowExecutionHistory -> ShowS
[GetWorkflowExecutionHistory] -> ShowS
GetWorkflowExecutionHistory -> String
(Int -> GetWorkflowExecutionHistory -> ShowS)
-> (GetWorkflowExecutionHistory -> String)
-> ([GetWorkflowExecutionHistory] -> ShowS)
-> Show GetWorkflowExecutionHistory
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [GetWorkflowExecutionHistory] -> ShowS
$cshowList :: [GetWorkflowExecutionHistory] -> ShowS
show :: GetWorkflowExecutionHistory -> String
$cshow :: GetWorkflowExecutionHistory -> String
showsPrec :: Int -> GetWorkflowExecutionHistory -> ShowS
$cshowsPrec :: Int -> GetWorkflowExecutionHistory -> ShowS
Prelude.Show, (forall x.
GetWorkflowExecutionHistory -> Rep GetWorkflowExecutionHistory x)
-> (forall x.
Rep GetWorkflowExecutionHistory x -> GetWorkflowExecutionHistory)
-> Generic GetWorkflowExecutionHistory
forall x.
Rep GetWorkflowExecutionHistory x -> GetWorkflowExecutionHistory
forall x.
GetWorkflowExecutionHistory -> Rep GetWorkflowExecutionHistory x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep GetWorkflowExecutionHistory x -> GetWorkflowExecutionHistory
$cfrom :: forall x.
GetWorkflowExecutionHistory -> Rep GetWorkflowExecutionHistory x
Prelude.Generic)
newGetWorkflowExecutionHistory ::
Prelude.Text ->
WorkflowExecution ->
GetWorkflowExecutionHistory
newGetWorkflowExecutionHistory :: Text -> WorkflowExecution -> GetWorkflowExecutionHistory
newGetWorkflowExecutionHistory Text
pDomain_ WorkflowExecution
pExecution_ =
GetWorkflowExecutionHistory' :: Maybe Text
-> Maybe Bool
-> Maybe Natural
-> Text
-> WorkflowExecution
-> GetWorkflowExecutionHistory
GetWorkflowExecutionHistory'
{ $sel:nextPageToken:GetWorkflowExecutionHistory' :: Maybe Text
nextPageToken =
Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:reverseOrder:GetWorkflowExecutionHistory' :: Maybe Bool
reverseOrder = Maybe Bool
forall a. Maybe a
Prelude.Nothing,
$sel:maximumPageSize:GetWorkflowExecutionHistory' :: Maybe Natural
maximumPageSize = Maybe Natural
forall a. Maybe a
Prelude.Nothing,
$sel:domain:GetWorkflowExecutionHistory' :: Text
domain = Text
pDomain_,
$sel:execution:GetWorkflowExecutionHistory' :: WorkflowExecution
execution = WorkflowExecution
pExecution_
}
getWorkflowExecutionHistory_nextPageToken :: Lens.Lens' GetWorkflowExecutionHistory (Prelude.Maybe Prelude.Text)
getWorkflowExecutionHistory_nextPageToken :: (Maybe Text -> f (Maybe Text))
-> GetWorkflowExecutionHistory -> f GetWorkflowExecutionHistory
getWorkflowExecutionHistory_nextPageToken = (GetWorkflowExecutionHistory -> Maybe Text)
-> (GetWorkflowExecutionHistory
-> Maybe Text -> GetWorkflowExecutionHistory)
-> Lens
GetWorkflowExecutionHistory
GetWorkflowExecutionHistory
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetWorkflowExecutionHistory' {Maybe Text
nextPageToken :: Maybe Text
$sel:nextPageToken:GetWorkflowExecutionHistory' :: GetWorkflowExecutionHistory -> Maybe Text
nextPageToken} -> Maybe Text
nextPageToken) (\s :: GetWorkflowExecutionHistory
s@GetWorkflowExecutionHistory' {} Maybe Text
a -> GetWorkflowExecutionHistory
s {$sel:nextPageToken:GetWorkflowExecutionHistory' :: Maybe Text
nextPageToken = Maybe Text
a} :: GetWorkflowExecutionHistory)
getWorkflowExecutionHistory_reverseOrder :: Lens.Lens' GetWorkflowExecutionHistory (Prelude.Maybe Prelude.Bool)
getWorkflowExecutionHistory_reverseOrder :: (Maybe Bool -> f (Maybe Bool))
-> GetWorkflowExecutionHistory -> f GetWorkflowExecutionHistory
getWorkflowExecutionHistory_reverseOrder = (GetWorkflowExecutionHistory -> Maybe Bool)
-> (GetWorkflowExecutionHistory
-> Maybe Bool -> GetWorkflowExecutionHistory)
-> Lens
GetWorkflowExecutionHistory
GetWorkflowExecutionHistory
(Maybe Bool)
(Maybe Bool)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetWorkflowExecutionHistory' {Maybe Bool
reverseOrder :: Maybe Bool
$sel:reverseOrder:GetWorkflowExecutionHistory' :: GetWorkflowExecutionHistory -> Maybe Bool
reverseOrder} -> Maybe Bool
reverseOrder) (\s :: GetWorkflowExecutionHistory
s@GetWorkflowExecutionHistory' {} Maybe Bool
a -> GetWorkflowExecutionHistory
s {$sel:reverseOrder:GetWorkflowExecutionHistory' :: Maybe Bool
reverseOrder = Maybe Bool
a} :: GetWorkflowExecutionHistory)
getWorkflowExecutionHistory_maximumPageSize :: Lens.Lens' GetWorkflowExecutionHistory (Prelude.Maybe Prelude.Natural)
getWorkflowExecutionHistory_maximumPageSize :: (Maybe Natural -> f (Maybe Natural))
-> GetWorkflowExecutionHistory -> f GetWorkflowExecutionHistory
getWorkflowExecutionHistory_maximumPageSize = (GetWorkflowExecutionHistory -> Maybe Natural)
-> (GetWorkflowExecutionHistory
-> Maybe Natural -> GetWorkflowExecutionHistory)
-> Lens
GetWorkflowExecutionHistory
GetWorkflowExecutionHistory
(Maybe Natural)
(Maybe Natural)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetWorkflowExecutionHistory' {Maybe Natural
maximumPageSize :: Maybe Natural
$sel:maximumPageSize:GetWorkflowExecutionHistory' :: GetWorkflowExecutionHistory -> Maybe Natural
maximumPageSize} -> Maybe Natural
maximumPageSize) (\s :: GetWorkflowExecutionHistory
s@GetWorkflowExecutionHistory' {} Maybe Natural
a -> GetWorkflowExecutionHistory
s {$sel:maximumPageSize:GetWorkflowExecutionHistory' :: Maybe Natural
maximumPageSize = Maybe Natural
a} :: GetWorkflowExecutionHistory)
getWorkflowExecutionHistory_domain :: Lens.Lens' GetWorkflowExecutionHistory Prelude.Text
getWorkflowExecutionHistory_domain :: (Text -> f Text)
-> GetWorkflowExecutionHistory -> f GetWorkflowExecutionHistory
getWorkflowExecutionHistory_domain = (GetWorkflowExecutionHistory -> Text)
-> (GetWorkflowExecutionHistory
-> Text -> GetWorkflowExecutionHistory)
-> Lens
GetWorkflowExecutionHistory GetWorkflowExecutionHistory Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetWorkflowExecutionHistory' {Text
domain :: Text
$sel:domain:GetWorkflowExecutionHistory' :: GetWorkflowExecutionHistory -> Text
domain} -> Text
domain) (\s :: GetWorkflowExecutionHistory
s@GetWorkflowExecutionHistory' {} Text
a -> GetWorkflowExecutionHistory
s {$sel:domain:GetWorkflowExecutionHistory' :: Text
domain = Text
a} :: GetWorkflowExecutionHistory)
getWorkflowExecutionHistory_execution :: Lens.Lens' GetWorkflowExecutionHistory WorkflowExecution
getWorkflowExecutionHistory_execution :: (WorkflowExecution -> f WorkflowExecution)
-> GetWorkflowExecutionHistory -> f GetWorkflowExecutionHistory
getWorkflowExecutionHistory_execution = (GetWorkflowExecutionHistory -> WorkflowExecution)
-> (GetWorkflowExecutionHistory
-> WorkflowExecution -> GetWorkflowExecutionHistory)
-> Lens
GetWorkflowExecutionHistory
GetWorkflowExecutionHistory
WorkflowExecution
WorkflowExecution
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetWorkflowExecutionHistory' {WorkflowExecution
execution :: WorkflowExecution
$sel:execution:GetWorkflowExecutionHistory' :: GetWorkflowExecutionHistory -> WorkflowExecution
execution} -> WorkflowExecution
execution) (\s :: GetWorkflowExecutionHistory
s@GetWorkflowExecutionHistory' {} WorkflowExecution
a -> GetWorkflowExecutionHistory
s {$sel:execution:GetWorkflowExecutionHistory' :: WorkflowExecution
execution = WorkflowExecution
a} :: GetWorkflowExecutionHistory)
instance Core.AWSPager GetWorkflowExecutionHistory where
page :: GetWorkflowExecutionHistory
-> AWSResponse GetWorkflowExecutionHistory
-> Maybe GetWorkflowExecutionHistory
page GetWorkflowExecutionHistory
rq AWSResponse GetWorkflowExecutionHistory
rs
| Maybe Text -> Bool
forall a. AWSTruncated a => a -> Bool
Core.stop
( AWSResponse GetWorkflowExecutionHistory
GetWorkflowExecutionHistoryResponse
rs
GetWorkflowExecutionHistoryResponse
-> Getting (First Text) GetWorkflowExecutionHistoryResponse Text
-> Maybe Text
forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^? (Maybe Text -> Const (First Text) (Maybe Text))
-> GetWorkflowExecutionHistoryResponse
-> Const (First Text) GetWorkflowExecutionHistoryResponse
Lens' GetWorkflowExecutionHistoryResponse (Maybe Text)
getWorkflowExecutionHistoryResponse_nextPageToken
((Maybe Text -> Const (First Text) (Maybe Text))
-> GetWorkflowExecutionHistoryResponse
-> Const (First Text) GetWorkflowExecutionHistoryResponse)
-> ((Text -> Const (First Text) Text)
-> Maybe Text -> Const (First Text) (Maybe Text))
-> Getting (First Text) GetWorkflowExecutionHistoryResponse Text
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. (Text -> Const (First Text) Text)
-> Maybe Text -> Const (First Text) (Maybe Text)
forall a b. Prism (Maybe a) (Maybe b) a b
Lens._Just
) =
Maybe GetWorkflowExecutionHistory
forall a. Maybe a
Prelude.Nothing
| [HistoryEvent] -> Bool
forall a. AWSTruncated a => a -> Bool
Core.stop
( AWSResponse GetWorkflowExecutionHistory
GetWorkflowExecutionHistoryResponse
rs
GetWorkflowExecutionHistoryResponse
-> Getting
[HistoryEvent] GetWorkflowExecutionHistoryResponse [HistoryEvent]
-> [HistoryEvent]
forall s a. s -> Getting a s a -> a
Lens.^. Getting
[HistoryEvent] GetWorkflowExecutionHistoryResponse [HistoryEvent]
Lens' GetWorkflowExecutionHistoryResponse [HistoryEvent]
getWorkflowExecutionHistoryResponse_events
) =
Maybe GetWorkflowExecutionHistory
forall a. Maybe a
Prelude.Nothing
| Bool
Prelude.otherwise =
GetWorkflowExecutionHistory -> Maybe GetWorkflowExecutionHistory
forall a. a -> Maybe a
Prelude.Just (GetWorkflowExecutionHistory -> Maybe GetWorkflowExecutionHistory)
-> GetWorkflowExecutionHistory -> Maybe GetWorkflowExecutionHistory
forall a b. (a -> b) -> a -> b
Prelude.$
GetWorkflowExecutionHistory
rq
GetWorkflowExecutionHistory
-> (GetWorkflowExecutionHistory -> GetWorkflowExecutionHistory)
-> GetWorkflowExecutionHistory
forall a b. a -> (a -> b) -> b
Prelude.& (Maybe Text -> Identity (Maybe Text))
-> GetWorkflowExecutionHistory
-> Identity GetWorkflowExecutionHistory
Lens
GetWorkflowExecutionHistory
GetWorkflowExecutionHistory
(Maybe Text)
(Maybe Text)
getWorkflowExecutionHistory_nextPageToken
((Maybe Text -> Identity (Maybe Text))
-> GetWorkflowExecutionHistory
-> Identity GetWorkflowExecutionHistory)
-> Maybe Text
-> GetWorkflowExecutionHistory
-> GetWorkflowExecutionHistory
forall s t a b. ASetter s t a b -> b -> s -> t
Lens..~ AWSResponse GetWorkflowExecutionHistory
GetWorkflowExecutionHistoryResponse
rs
GetWorkflowExecutionHistoryResponse
-> Getting (First Text) GetWorkflowExecutionHistoryResponse Text
-> Maybe Text
forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^? (Maybe Text -> Const (First Text) (Maybe Text))
-> GetWorkflowExecutionHistoryResponse
-> Const (First Text) GetWorkflowExecutionHistoryResponse
Lens' GetWorkflowExecutionHistoryResponse (Maybe Text)
getWorkflowExecutionHistoryResponse_nextPageToken
((Maybe Text -> Const (First Text) (Maybe Text))
-> GetWorkflowExecutionHistoryResponse
-> Const (First Text) GetWorkflowExecutionHistoryResponse)
-> ((Text -> Const (First Text) Text)
-> Maybe Text -> Const (First Text) (Maybe Text))
-> Getting (First Text) GetWorkflowExecutionHistoryResponse Text
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. (Text -> Const (First Text) Text)
-> Maybe Text -> Const (First Text) (Maybe Text)
forall a b. Prism (Maybe a) (Maybe b) a b
Lens._Just
instance Core.AWSRequest GetWorkflowExecutionHistory where
type
AWSResponse GetWorkflowExecutionHistory =
GetWorkflowExecutionHistoryResponse
request :: GetWorkflowExecutionHistory -> Request GetWorkflowExecutionHistory
request = Service
-> GetWorkflowExecutionHistory
-> Request GetWorkflowExecutionHistory
forall a. (ToRequest a, ToJSON a) => Service -> a -> Request a
Request.postJSON Service
defaultService
response :: Logger
-> Service
-> Proxy GetWorkflowExecutionHistory
-> ClientResponse ClientBody
-> m (Either
Error (ClientResponse (AWSResponse GetWorkflowExecutionHistory)))
response =
(Int
-> ResponseHeaders
-> Object
-> Either String (AWSResponse GetWorkflowExecutionHistory))
-> Logger
-> Service
-> Proxy GetWorkflowExecutionHistory
-> ClientResponse ClientBody
-> m (Either
Error (ClientResponse (AWSResponse GetWorkflowExecutionHistory)))
forall (m :: * -> *) a.
MonadResource m =>
(Int -> ResponseHeaders -> Object -> Either String (AWSResponse a))
-> Logger
-> Service
-> Proxy a
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse a)))
Response.receiveJSON
( \Int
s ResponseHeaders
h Object
x ->
Maybe Text
-> Int -> [HistoryEvent] -> GetWorkflowExecutionHistoryResponse
GetWorkflowExecutionHistoryResponse'
(Maybe Text
-> Int -> [HistoryEvent] -> GetWorkflowExecutionHistoryResponse)
-> Either String (Maybe Text)
-> Either
String
(Int -> [HistoryEvent] -> GetWorkflowExecutionHistoryResponse)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Either String (Maybe Text)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"nextPageToken")
Either
String
(Int -> [HistoryEvent] -> GetWorkflowExecutionHistoryResponse)
-> Either String Int
-> Either
String ([HistoryEvent] -> GetWorkflowExecutionHistoryResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Int -> Either String Int
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure (Int -> Int
forall a. Enum a => a -> Int
Prelude.fromEnum Int
s))
Either
String ([HistoryEvent] -> GetWorkflowExecutionHistoryResponse)
-> Either String [HistoryEvent]
-> Either String GetWorkflowExecutionHistoryResponse
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String (Maybe [HistoryEvent])
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"events" Either String (Maybe [HistoryEvent])
-> [HistoryEvent] -> Either String [HistoryEvent]
forall (f :: * -> *) a. Functor f => f (Maybe a) -> a -> f a
Core..!@ [HistoryEvent]
forall a. Monoid a => a
Prelude.mempty)
)
instance Prelude.Hashable GetWorkflowExecutionHistory
instance Prelude.NFData GetWorkflowExecutionHistory
instance Core.ToHeaders GetWorkflowExecutionHistory where
toHeaders :: GetWorkflowExecutionHistory -> ResponseHeaders
toHeaders =
ResponseHeaders -> GetWorkflowExecutionHistory -> ResponseHeaders
forall a b. a -> b -> a
Prelude.const
( [ResponseHeaders] -> ResponseHeaders
forall a. Monoid a => [a] -> a
Prelude.mconcat
[ HeaderName
"X-Amz-Target"
HeaderName -> ByteString -> ResponseHeaders
forall a. ToHeader a => HeaderName -> a -> ResponseHeaders
Core.=# ( ByteString
"SimpleWorkflowService.GetWorkflowExecutionHistory" ::
Prelude.ByteString
),
HeaderName
"Content-Type"
HeaderName -> ByteString -> ResponseHeaders
forall a. ToHeader a => HeaderName -> a -> ResponseHeaders
Core.=# ( ByteString
"application/x-amz-json-1.0" ::
Prelude.ByteString
)
]
)
instance Core.ToJSON GetWorkflowExecutionHistory where
toJSON :: GetWorkflowExecutionHistory -> Value
toJSON GetWorkflowExecutionHistory' {Maybe Bool
Maybe Natural
Maybe Text
Text
WorkflowExecution
execution :: WorkflowExecution
domain :: Text
maximumPageSize :: Maybe Natural
reverseOrder :: Maybe Bool
nextPageToken :: Maybe Text
$sel:execution:GetWorkflowExecutionHistory' :: GetWorkflowExecutionHistory -> WorkflowExecution
$sel:domain:GetWorkflowExecutionHistory' :: GetWorkflowExecutionHistory -> Text
$sel:maximumPageSize:GetWorkflowExecutionHistory' :: GetWorkflowExecutionHistory -> Maybe Natural
$sel:reverseOrder:GetWorkflowExecutionHistory' :: GetWorkflowExecutionHistory -> Maybe Bool
$sel:nextPageToken:GetWorkflowExecutionHistory' :: GetWorkflowExecutionHistory -> Maybe Text
..} =
[Pair] -> Value
Core.object
( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
[ (Text
"nextPageToken" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (Text -> Pair) -> Maybe Text -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
nextPageToken,
(Text
"reverseOrder" Text -> Bool -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (Bool -> Pair) -> Maybe Bool -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Bool
reverseOrder,
(Text
"maximumPageSize" Text -> Natural -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
(Natural -> Pair) -> Maybe Natural -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Natural
maximumPageSize,
Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just (Text
"domain" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Text
domain),
Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just (Text
"execution" Text -> WorkflowExecution -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= WorkflowExecution
execution)
]
)
instance Core.ToPath GetWorkflowExecutionHistory where
toPath :: GetWorkflowExecutionHistory -> ByteString
toPath = ByteString -> GetWorkflowExecutionHistory -> ByteString
forall a b. a -> b -> a
Prelude.const ByteString
"/"
instance Core.ToQuery GetWorkflowExecutionHistory where
toQuery :: GetWorkflowExecutionHistory -> QueryString
toQuery = QueryString -> GetWorkflowExecutionHistory -> QueryString
forall a b. a -> b -> a
Prelude.const QueryString
forall a. Monoid a => a
Prelude.mempty
data GetWorkflowExecutionHistoryResponse = GetWorkflowExecutionHistoryResponse'
{
GetWorkflowExecutionHistoryResponse -> Maybe Text
nextPageToken :: Prelude.Maybe Prelude.Text,
GetWorkflowExecutionHistoryResponse -> Int
httpStatus :: Prelude.Int,
GetWorkflowExecutionHistoryResponse -> [HistoryEvent]
events :: [HistoryEvent]
}
deriving (GetWorkflowExecutionHistoryResponse
-> GetWorkflowExecutionHistoryResponse -> Bool
(GetWorkflowExecutionHistoryResponse
-> GetWorkflowExecutionHistoryResponse -> Bool)
-> (GetWorkflowExecutionHistoryResponse
-> GetWorkflowExecutionHistoryResponse -> Bool)
-> Eq GetWorkflowExecutionHistoryResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: GetWorkflowExecutionHistoryResponse
-> GetWorkflowExecutionHistoryResponse -> Bool
$c/= :: GetWorkflowExecutionHistoryResponse
-> GetWorkflowExecutionHistoryResponse -> Bool
== :: GetWorkflowExecutionHistoryResponse
-> GetWorkflowExecutionHistoryResponse -> Bool
$c== :: GetWorkflowExecutionHistoryResponse
-> GetWorkflowExecutionHistoryResponse -> Bool
Prelude.Eq, ReadPrec [GetWorkflowExecutionHistoryResponse]
ReadPrec GetWorkflowExecutionHistoryResponse
Int -> ReadS GetWorkflowExecutionHistoryResponse
ReadS [GetWorkflowExecutionHistoryResponse]
(Int -> ReadS GetWorkflowExecutionHistoryResponse)
-> ReadS [GetWorkflowExecutionHistoryResponse]
-> ReadPrec GetWorkflowExecutionHistoryResponse
-> ReadPrec [GetWorkflowExecutionHistoryResponse]
-> Read GetWorkflowExecutionHistoryResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [GetWorkflowExecutionHistoryResponse]
$creadListPrec :: ReadPrec [GetWorkflowExecutionHistoryResponse]
readPrec :: ReadPrec GetWorkflowExecutionHistoryResponse
$creadPrec :: ReadPrec GetWorkflowExecutionHistoryResponse
readList :: ReadS [GetWorkflowExecutionHistoryResponse]
$creadList :: ReadS [GetWorkflowExecutionHistoryResponse]
readsPrec :: Int -> ReadS GetWorkflowExecutionHistoryResponse
$creadsPrec :: Int -> ReadS GetWorkflowExecutionHistoryResponse
Prelude.Read, Int -> GetWorkflowExecutionHistoryResponse -> ShowS
[GetWorkflowExecutionHistoryResponse] -> ShowS
GetWorkflowExecutionHistoryResponse -> String
(Int -> GetWorkflowExecutionHistoryResponse -> ShowS)
-> (GetWorkflowExecutionHistoryResponse -> String)
-> ([GetWorkflowExecutionHistoryResponse] -> ShowS)
-> Show GetWorkflowExecutionHistoryResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [GetWorkflowExecutionHistoryResponse] -> ShowS
$cshowList :: [GetWorkflowExecutionHistoryResponse] -> ShowS
show :: GetWorkflowExecutionHistoryResponse -> String
$cshow :: GetWorkflowExecutionHistoryResponse -> String
showsPrec :: Int -> GetWorkflowExecutionHistoryResponse -> ShowS
$cshowsPrec :: Int -> GetWorkflowExecutionHistoryResponse -> ShowS
Prelude.Show, (forall x.
GetWorkflowExecutionHistoryResponse
-> Rep GetWorkflowExecutionHistoryResponse x)
-> (forall x.
Rep GetWorkflowExecutionHistoryResponse x
-> GetWorkflowExecutionHistoryResponse)
-> Generic GetWorkflowExecutionHistoryResponse
forall x.
Rep GetWorkflowExecutionHistoryResponse x
-> GetWorkflowExecutionHistoryResponse
forall x.
GetWorkflowExecutionHistoryResponse
-> Rep GetWorkflowExecutionHistoryResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep GetWorkflowExecutionHistoryResponse x
-> GetWorkflowExecutionHistoryResponse
$cfrom :: forall x.
GetWorkflowExecutionHistoryResponse
-> Rep GetWorkflowExecutionHistoryResponse x
Prelude.Generic)
newGetWorkflowExecutionHistoryResponse ::
Prelude.Int ->
GetWorkflowExecutionHistoryResponse
newGetWorkflowExecutionHistoryResponse :: Int -> GetWorkflowExecutionHistoryResponse
newGetWorkflowExecutionHistoryResponse Int
pHttpStatus_ =
GetWorkflowExecutionHistoryResponse' :: Maybe Text
-> Int -> [HistoryEvent] -> GetWorkflowExecutionHistoryResponse
GetWorkflowExecutionHistoryResponse'
{ $sel:nextPageToken:GetWorkflowExecutionHistoryResponse' :: Maybe Text
nextPageToken =
Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:httpStatus:GetWorkflowExecutionHistoryResponse' :: Int
httpStatus = Int
pHttpStatus_,
$sel:events:GetWorkflowExecutionHistoryResponse' :: [HistoryEvent]
events = [HistoryEvent]
forall a. Monoid a => a
Prelude.mempty
}
getWorkflowExecutionHistoryResponse_nextPageToken :: Lens.Lens' GetWorkflowExecutionHistoryResponse (Prelude.Maybe Prelude.Text)
getWorkflowExecutionHistoryResponse_nextPageToken :: (Maybe Text -> f (Maybe Text))
-> GetWorkflowExecutionHistoryResponse
-> f GetWorkflowExecutionHistoryResponse
getWorkflowExecutionHistoryResponse_nextPageToken = (GetWorkflowExecutionHistoryResponse -> Maybe Text)
-> (GetWorkflowExecutionHistoryResponse
-> Maybe Text -> GetWorkflowExecutionHistoryResponse)
-> Lens' GetWorkflowExecutionHistoryResponse (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetWorkflowExecutionHistoryResponse' {Maybe Text
nextPageToken :: Maybe Text
$sel:nextPageToken:GetWorkflowExecutionHistoryResponse' :: GetWorkflowExecutionHistoryResponse -> Maybe Text
nextPageToken} -> Maybe Text
nextPageToken) (\s :: GetWorkflowExecutionHistoryResponse
s@GetWorkflowExecutionHistoryResponse' {} Maybe Text
a -> GetWorkflowExecutionHistoryResponse
s {$sel:nextPageToken:GetWorkflowExecutionHistoryResponse' :: Maybe Text
nextPageToken = Maybe Text
a} :: GetWorkflowExecutionHistoryResponse)
getWorkflowExecutionHistoryResponse_httpStatus :: Lens.Lens' GetWorkflowExecutionHistoryResponse Prelude.Int
getWorkflowExecutionHistoryResponse_httpStatus :: (Int -> f Int)
-> GetWorkflowExecutionHistoryResponse
-> f GetWorkflowExecutionHistoryResponse
getWorkflowExecutionHistoryResponse_httpStatus = (GetWorkflowExecutionHistoryResponse -> Int)
-> (GetWorkflowExecutionHistoryResponse
-> Int -> GetWorkflowExecutionHistoryResponse)
-> Lens
GetWorkflowExecutionHistoryResponse
GetWorkflowExecutionHistoryResponse
Int
Int
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetWorkflowExecutionHistoryResponse' {Int
httpStatus :: Int
$sel:httpStatus:GetWorkflowExecutionHistoryResponse' :: GetWorkflowExecutionHistoryResponse -> Int
httpStatus} -> Int
httpStatus) (\s :: GetWorkflowExecutionHistoryResponse
s@GetWorkflowExecutionHistoryResponse' {} Int
a -> GetWorkflowExecutionHistoryResponse
s {$sel:httpStatus:GetWorkflowExecutionHistoryResponse' :: Int
httpStatus = Int
a} :: GetWorkflowExecutionHistoryResponse)
getWorkflowExecutionHistoryResponse_events :: Lens.Lens' GetWorkflowExecutionHistoryResponse [HistoryEvent]
getWorkflowExecutionHistoryResponse_events :: ([HistoryEvent] -> f [HistoryEvent])
-> GetWorkflowExecutionHistoryResponse
-> f GetWorkflowExecutionHistoryResponse
getWorkflowExecutionHistoryResponse_events = (GetWorkflowExecutionHistoryResponse -> [HistoryEvent])
-> (GetWorkflowExecutionHistoryResponse
-> [HistoryEvent] -> GetWorkflowExecutionHistoryResponse)
-> Lens' GetWorkflowExecutionHistoryResponse [HistoryEvent]
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetWorkflowExecutionHistoryResponse' {[HistoryEvent]
events :: [HistoryEvent]
$sel:events:GetWorkflowExecutionHistoryResponse' :: GetWorkflowExecutionHistoryResponse -> [HistoryEvent]
events} -> [HistoryEvent]
events) (\s :: GetWorkflowExecutionHistoryResponse
s@GetWorkflowExecutionHistoryResponse' {} [HistoryEvent]
a -> GetWorkflowExecutionHistoryResponse
s {$sel:events:GetWorkflowExecutionHistoryResponse' :: [HistoryEvent]
events = [HistoryEvent]
a} :: GetWorkflowExecutionHistoryResponse) (([HistoryEvent] -> f [HistoryEvent])
-> GetWorkflowExecutionHistoryResponse
-> f GetWorkflowExecutionHistoryResponse)
-> (([HistoryEvent] -> f [HistoryEvent])
-> [HistoryEvent] -> f [HistoryEvent])
-> ([HistoryEvent] -> f [HistoryEvent])
-> GetWorkflowExecutionHistoryResponse
-> f GetWorkflowExecutionHistoryResponse
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. ([HistoryEvent] -> f [HistoryEvent])
-> [HistoryEvent] -> f [HistoryEvent]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
instance
Prelude.NFData
GetWorkflowExecutionHistoryResponse