{-# 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.AppFlow.DescribeFlowExecutionRecords
(
DescribeFlowExecutionRecords (..),
newDescribeFlowExecutionRecords,
describeFlowExecutionRecords_maxResults,
describeFlowExecutionRecords_nextToken,
describeFlowExecutionRecords_flowName,
DescribeFlowExecutionRecordsResponse (..),
newDescribeFlowExecutionRecordsResponse,
describeFlowExecutionRecordsResponse_flowExecutions,
describeFlowExecutionRecordsResponse_nextToken,
describeFlowExecutionRecordsResponse_httpStatus,
)
where
import Amazonka.AppFlow.Types
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 qualified Amazonka.Request as Request
import qualified Amazonka.Response as Response
data DescribeFlowExecutionRecords = DescribeFlowExecutionRecords'
{
DescribeFlowExecutionRecords -> Maybe Natural
maxResults :: Prelude.Maybe Prelude.Natural,
DescribeFlowExecutionRecords -> Maybe Text
nextToken :: Prelude.Maybe Prelude.Text,
DescribeFlowExecutionRecords -> Text
flowName :: Prelude.Text
}
deriving (DescribeFlowExecutionRecords
-> DescribeFlowExecutionRecords -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DescribeFlowExecutionRecords
-> DescribeFlowExecutionRecords -> Bool
$c/= :: DescribeFlowExecutionRecords
-> DescribeFlowExecutionRecords -> Bool
== :: DescribeFlowExecutionRecords
-> DescribeFlowExecutionRecords -> Bool
$c== :: DescribeFlowExecutionRecords
-> DescribeFlowExecutionRecords -> Bool
Prelude.Eq, ReadPrec [DescribeFlowExecutionRecords]
ReadPrec DescribeFlowExecutionRecords
Int -> ReadS DescribeFlowExecutionRecords
ReadS [DescribeFlowExecutionRecords]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DescribeFlowExecutionRecords]
$creadListPrec :: ReadPrec [DescribeFlowExecutionRecords]
readPrec :: ReadPrec DescribeFlowExecutionRecords
$creadPrec :: ReadPrec DescribeFlowExecutionRecords
readList :: ReadS [DescribeFlowExecutionRecords]
$creadList :: ReadS [DescribeFlowExecutionRecords]
readsPrec :: Int -> ReadS DescribeFlowExecutionRecords
$creadsPrec :: Int -> ReadS DescribeFlowExecutionRecords
Prelude.Read, Int -> DescribeFlowExecutionRecords -> ShowS
[DescribeFlowExecutionRecords] -> ShowS
DescribeFlowExecutionRecords -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DescribeFlowExecutionRecords] -> ShowS
$cshowList :: [DescribeFlowExecutionRecords] -> ShowS
show :: DescribeFlowExecutionRecords -> String
$cshow :: DescribeFlowExecutionRecords -> String
showsPrec :: Int -> DescribeFlowExecutionRecords -> ShowS
$cshowsPrec :: Int -> DescribeFlowExecutionRecords -> ShowS
Prelude.Show, forall x.
Rep DescribeFlowExecutionRecords x -> DescribeFlowExecutionRecords
forall x.
DescribeFlowExecutionRecords -> Rep DescribeFlowExecutionRecords x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep DescribeFlowExecutionRecords x -> DescribeFlowExecutionRecords
$cfrom :: forall x.
DescribeFlowExecutionRecords -> Rep DescribeFlowExecutionRecords x
Prelude.Generic)
newDescribeFlowExecutionRecords ::
Prelude.Text ->
DescribeFlowExecutionRecords
newDescribeFlowExecutionRecords :: Text -> DescribeFlowExecutionRecords
newDescribeFlowExecutionRecords Text
pFlowName_ =
DescribeFlowExecutionRecords'
{ $sel:maxResults:DescribeFlowExecutionRecords' :: Maybe Natural
maxResults =
forall a. Maybe a
Prelude.Nothing,
$sel:nextToken:DescribeFlowExecutionRecords' :: Maybe Text
nextToken = forall a. Maybe a
Prelude.Nothing,
$sel:flowName:DescribeFlowExecutionRecords' :: Text
flowName = Text
pFlowName_
}
describeFlowExecutionRecords_maxResults :: Lens.Lens' DescribeFlowExecutionRecords (Prelude.Maybe Prelude.Natural)
describeFlowExecutionRecords_maxResults :: Lens' DescribeFlowExecutionRecords (Maybe Natural)
describeFlowExecutionRecords_maxResults = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeFlowExecutionRecords' {Maybe Natural
maxResults :: Maybe Natural
$sel:maxResults:DescribeFlowExecutionRecords' :: DescribeFlowExecutionRecords -> Maybe Natural
maxResults} -> Maybe Natural
maxResults) (\s :: DescribeFlowExecutionRecords
s@DescribeFlowExecutionRecords' {} Maybe Natural
a -> DescribeFlowExecutionRecords
s {$sel:maxResults:DescribeFlowExecutionRecords' :: Maybe Natural
maxResults = Maybe Natural
a} :: DescribeFlowExecutionRecords)
describeFlowExecutionRecords_nextToken :: Lens.Lens' DescribeFlowExecutionRecords (Prelude.Maybe Prelude.Text)
describeFlowExecutionRecords_nextToken :: Lens' DescribeFlowExecutionRecords (Maybe Text)
describeFlowExecutionRecords_nextToken = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeFlowExecutionRecords' {Maybe Text
nextToken :: Maybe Text
$sel:nextToken:DescribeFlowExecutionRecords' :: DescribeFlowExecutionRecords -> Maybe Text
nextToken} -> Maybe Text
nextToken) (\s :: DescribeFlowExecutionRecords
s@DescribeFlowExecutionRecords' {} Maybe Text
a -> DescribeFlowExecutionRecords
s {$sel:nextToken:DescribeFlowExecutionRecords' :: Maybe Text
nextToken = Maybe Text
a} :: DescribeFlowExecutionRecords)
describeFlowExecutionRecords_flowName :: Lens.Lens' DescribeFlowExecutionRecords Prelude.Text
describeFlowExecutionRecords_flowName :: Lens' DescribeFlowExecutionRecords Text
describeFlowExecutionRecords_flowName = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeFlowExecutionRecords' {Text
flowName :: Text
$sel:flowName:DescribeFlowExecutionRecords' :: DescribeFlowExecutionRecords -> Text
flowName} -> Text
flowName) (\s :: DescribeFlowExecutionRecords
s@DescribeFlowExecutionRecords' {} Text
a -> DescribeFlowExecutionRecords
s {$sel:flowName:DescribeFlowExecutionRecords' :: Text
flowName = Text
a} :: DescribeFlowExecutionRecords)
instance Core.AWSRequest DescribeFlowExecutionRecords where
type
AWSResponse DescribeFlowExecutionRecords =
DescribeFlowExecutionRecordsResponse
request :: (Service -> Service)
-> DescribeFlowExecutionRecords
-> Request DescribeFlowExecutionRecords
request Service -> Service
overrides =
forall a. (ToRequest a, ToJSON a) => Service -> a -> Request a
Request.postJSON (Service -> Service
overrides Service
defaultService)
response :: forall (m :: * -> *).
MonadResource m =>
(ByteStringLazy -> IO ByteStringLazy)
-> Service
-> Proxy DescribeFlowExecutionRecords
-> ClientResponse ClientBody
-> m (Either
Error (ClientResponse (AWSResponse DescribeFlowExecutionRecords)))
response =
forall (m :: * -> *) a.
MonadResource m =>
(Int -> ResponseHeaders -> Object -> Either String (AWSResponse a))
-> (ByteStringLazy -> IO ByteStringLazy)
-> Service
-> Proxy a
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse a)))
Response.receiveJSON
( \Int
s ResponseHeaders
h Object
x ->
Maybe [ExecutionRecord]
-> Maybe Text -> Int -> DescribeFlowExecutionRecordsResponse
DescribeFlowExecutionRecordsResponse'
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x forall a. FromJSON a => Object -> Key -> Either String (Maybe a)
Data..?> Key
"flowExecutions" forall (f :: * -> *) a. Functor f => f (Maybe a) -> a -> f a
Core..!@ forall a. Monoid a => a
Prelude.mempty)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Either String (Maybe a)
Data..?> Key
"nextToken")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure (forall a. Enum a => a -> Int
Prelude.fromEnum Int
s))
)
instance
Prelude.Hashable
DescribeFlowExecutionRecords
where
hashWithSalt :: Int -> DescribeFlowExecutionRecords -> Int
hashWithSalt Int
_salt DescribeFlowExecutionRecords' {Maybe Natural
Maybe Text
Text
flowName :: Text
nextToken :: Maybe Text
maxResults :: Maybe Natural
$sel:flowName:DescribeFlowExecutionRecords' :: DescribeFlowExecutionRecords -> Text
$sel:nextToken:DescribeFlowExecutionRecords' :: DescribeFlowExecutionRecords -> Maybe Text
$sel:maxResults:DescribeFlowExecutionRecords' :: DescribeFlowExecutionRecords -> Maybe Natural
..} =
Int
_salt
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Natural
maxResults
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
nextToken
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
flowName
instance Prelude.NFData DescribeFlowExecutionRecords where
rnf :: DescribeFlowExecutionRecords -> ()
rnf DescribeFlowExecutionRecords' {Maybe Natural
Maybe Text
Text
flowName :: Text
nextToken :: Maybe Text
maxResults :: Maybe Natural
$sel:flowName:DescribeFlowExecutionRecords' :: DescribeFlowExecutionRecords -> Text
$sel:nextToken:DescribeFlowExecutionRecords' :: DescribeFlowExecutionRecords -> Maybe Text
$sel:maxResults:DescribeFlowExecutionRecords' :: DescribeFlowExecutionRecords -> Maybe Natural
..} =
forall a. NFData a => a -> ()
Prelude.rnf Maybe Natural
maxResults
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
nextToken
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Text
flowName
instance Data.ToHeaders DescribeFlowExecutionRecords where
toHeaders :: DescribeFlowExecutionRecords -> ResponseHeaders
toHeaders =
forall a b. a -> b -> a
Prelude.const
( forall a. Monoid a => [a] -> a
Prelude.mconcat
[ HeaderName
"Content-Type"
forall a. ToHeader a => HeaderName -> a -> ResponseHeaders
Data.=# ( ByteString
"application/x-amz-json-1.1" ::
Prelude.ByteString
)
]
)
instance Data.ToJSON DescribeFlowExecutionRecords where
toJSON :: DescribeFlowExecutionRecords -> Value
toJSON DescribeFlowExecutionRecords' {Maybe Natural
Maybe Text
Text
flowName :: Text
nextToken :: Maybe Text
maxResults :: Maybe Natural
$sel:flowName:DescribeFlowExecutionRecords' :: DescribeFlowExecutionRecords -> Text
$sel:nextToken:DescribeFlowExecutionRecords' :: DescribeFlowExecutionRecords -> Maybe Text
$sel:maxResults:DescribeFlowExecutionRecords' :: DescribeFlowExecutionRecords -> Maybe Natural
..} =
[Pair] -> Value
Data.object
( forall a. [Maybe a] -> [a]
Prelude.catMaybes
[ (Key
"maxResults" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=) forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Natural
maxResults,
(Key
"nextToken" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=) forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
nextToken,
forall a. a -> Maybe a
Prelude.Just (Key
"flowName" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..= Text
flowName)
]
)
instance Data.ToPath DescribeFlowExecutionRecords where
toPath :: DescribeFlowExecutionRecords -> ByteString
toPath =
forall a b. a -> b -> a
Prelude.const ByteString
"/describe-flow-execution-records"
instance Data.ToQuery DescribeFlowExecutionRecords where
toQuery :: DescribeFlowExecutionRecords -> QueryString
toQuery = forall a b. a -> b -> a
Prelude.const forall a. Monoid a => a
Prelude.mempty
data DescribeFlowExecutionRecordsResponse = DescribeFlowExecutionRecordsResponse'
{
DescribeFlowExecutionRecordsResponse -> Maybe [ExecutionRecord]
flowExecutions :: Prelude.Maybe [ExecutionRecord],
DescribeFlowExecutionRecordsResponse -> Maybe Text
nextToken :: Prelude.Maybe Prelude.Text,
DescribeFlowExecutionRecordsResponse -> Int
httpStatus :: Prelude.Int
}
deriving (DescribeFlowExecutionRecordsResponse
-> DescribeFlowExecutionRecordsResponse -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DescribeFlowExecutionRecordsResponse
-> DescribeFlowExecutionRecordsResponse -> Bool
$c/= :: DescribeFlowExecutionRecordsResponse
-> DescribeFlowExecutionRecordsResponse -> Bool
== :: DescribeFlowExecutionRecordsResponse
-> DescribeFlowExecutionRecordsResponse -> Bool
$c== :: DescribeFlowExecutionRecordsResponse
-> DescribeFlowExecutionRecordsResponse -> Bool
Prelude.Eq, ReadPrec [DescribeFlowExecutionRecordsResponse]
ReadPrec DescribeFlowExecutionRecordsResponse
Int -> ReadS DescribeFlowExecutionRecordsResponse
ReadS [DescribeFlowExecutionRecordsResponse]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DescribeFlowExecutionRecordsResponse]
$creadListPrec :: ReadPrec [DescribeFlowExecutionRecordsResponse]
readPrec :: ReadPrec DescribeFlowExecutionRecordsResponse
$creadPrec :: ReadPrec DescribeFlowExecutionRecordsResponse
readList :: ReadS [DescribeFlowExecutionRecordsResponse]
$creadList :: ReadS [DescribeFlowExecutionRecordsResponse]
readsPrec :: Int -> ReadS DescribeFlowExecutionRecordsResponse
$creadsPrec :: Int -> ReadS DescribeFlowExecutionRecordsResponse
Prelude.Read, Int -> DescribeFlowExecutionRecordsResponse -> ShowS
[DescribeFlowExecutionRecordsResponse] -> ShowS
DescribeFlowExecutionRecordsResponse -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DescribeFlowExecutionRecordsResponse] -> ShowS
$cshowList :: [DescribeFlowExecutionRecordsResponse] -> ShowS
show :: DescribeFlowExecutionRecordsResponse -> String
$cshow :: DescribeFlowExecutionRecordsResponse -> String
showsPrec :: Int -> DescribeFlowExecutionRecordsResponse -> ShowS
$cshowsPrec :: Int -> DescribeFlowExecutionRecordsResponse -> ShowS
Prelude.Show, forall x.
Rep DescribeFlowExecutionRecordsResponse x
-> DescribeFlowExecutionRecordsResponse
forall x.
DescribeFlowExecutionRecordsResponse
-> Rep DescribeFlowExecutionRecordsResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep DescribeFlowExecutionRecordsResponse x
-> DescribeFlowExecutionRecordsResponse
$cfrom :: forall x.
DescribeFlowExecutionRecordsResponse
-> Rep DescribeFlowExecutionRecordsResponse x
Prelude.Generic)
newDescribeFlowExecutionRecordsResponse ::
Prelude.Int ->
DescribeFlowExecutionRecordsResponse
newDescribeFlowExecutionRecordsResponse :: Int -> DescribeFlowExecutionRecordsResponse
newDescribeFlowExecutionRecordsResponse Int
pHttpStatus_ =
DescribeFlowExecutionRecordsResponse'
{ $sel:flowExecutions:DescribeFlowExecutionRecordsResponse' :: Maybe [ExecutionRecord]
flowExecutions =
forall a. Maybe a
Prelude.Nothing,
$sel:nextToken:DescribeFlowExecutionRecordsResponse' :: Maybe Text
nextToken = forall a. Maybe a
Prelude.Nothing,
$sel:httpStatus:DescribeFlowExecutionRecordsResponse' :: Int
httpStatus = Int
pHttpStatus_
}
describeFlowExecutionRecordsResponse_flowExecutions :: Lens.Lens' DescribeFlowExecutionRecordsResponse (Prelude.Maybe [ExecutionRecord])
describeFlowExecutionRecordsResponse_flowExecutions :: Lens'
DescribeFlowExecutionRecordsResponse (Maybe [ExecutionRecord])
describeFlowExecutionRecordsResponse_flowExecutions = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeFlowExecutionRecordsResponse' {Maybe [ExecutionRecord]
flowExecutions :: Maybe [ExecutionRecord]
$sel:flowExecutions:DescribeFlowExecutionRecordsResponse' :: DescribeFlowExecutionRecordsResponse -> Maybe [ExecutionRecord]
flowExecutions} -> Maybe [ExecutionRecord]
flowExecutions) (\s :: DescribeFlowExecutionRecordsResponse
s@DescribeFlowExecutionRecordsResponse' {} Maybe [ExecutionRecord]
a -> DescribeFlowExecutionRecordsResponse
s {$sel:flowExecutions:DescribeFlowExecutionRecordsResponse' :: Maybe [ExecutionRecord]
flowExecutions = Maybe [ExecutionRecord]
a} :: DescribeFlowExecutionRecordsResponse) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall (f :: * -> *) (g :: * -> *) s t a b.
(Functor f, Functor g) =>
AnIso s t a b -> Iso (f s) (g t) (f a) (g b)
Lens.mapping forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
describeFlowExecutionRecordsResponse_nextToken :: Lens.Lens' DescribeFlowExecutionRecordsResponse (Prelude.Maybe Prelude.Text)
describeFlowExecutionRecordsResponse_nextToken :: Lens' DescribeFlowExecutionRecordsResponse (Maybe Text)
describeFlowExecutionRecordsResponse_nextToken = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeFlowExecutionRecordsResponse' {Maybe Text
nextToken :: Maybe Text
$sel:nextToken:DescribeFlowExecutionRecordsResponse' :: DescribeFlowExecutionRecordsResponse -> Maybe Text
nextToken} -> Maybe Text
nextToken) (\s :: DescribeFlowExecutionRecordsResponse
s@DescribeFlowExecutionRecordsResponse' {} Maybe Text
a -> DescribeFlowExecutionRecordsResponse
s {$sel:nextToken:DescribeFlowExecutionRecordsResponse' :: Maybe Text
nextToken = Maybe Text
a} :: DescribeFlowExecutionRecordsResponse)
describeFlowExecutionRecordsResponse_httpStatus :: Lens.Lens' DescribeFlowExecutionRecordsResponse Prelude.Int
describeFlowExecutionRecordsResponse_httpStatus :: Lens' DescribeFlowExecutionRecordsResponse Int
describeFlowExecutionRecordsResponse_httpStatus = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeFlowExecutionRecordsResponse' {Int
httpStatus :: Int
$sel:httpStatus:DescribeFlowExecutionRecordsResponse' :: DescribeFlowExecutionRecordsResponse -> Int
httpStatus} -> Int
httpStatus) (\s :: DescribeFlowExecutionRecordsResponse
s@DescribeFlowExecutionRecordsResponse' {} Int
a -> DescribeFlowExecutionRecordsResponse
s {$sel:httpStatus:DescribeFlowExecutionRecordsResponse' :: Int
httpStatus = Int
a} :: DescribeFlowExecutionRecordsResponse)
instance
Prelude.NFData
DescribeFlowExecutionRecordsResponse
where
rnf :: DescribeFlowExecutionRecordsResponse -> ()
rnf DescribeFlowExecutionRecordsResponse' {Int
Maybe [ExecutionRecord]
Maybe Text
httpStatus :: Int
nextToken :: Maybe Text
flowExecutions :: Maybe [ExecutionRecord]
$sel:httpStatus:DescribeFlowExecutionRecordsResponse' :: DescribeFlowExecutionRecordsResponse -> Int
$sel:nextToken:DescribeFlowExecutionRecordsResponse' :: DescribeFlowExecutionRecordsResponse -> Maybe Text
$sel:flowExecutions:DescribeFlowExecutionRecordsResponse' :: DescribeFlowExecutionRecordsResponse -> Maybe [ExecutionRecord]
..} =
forall a. NFData a => a -> ()
Prelude.rnf Maybe [ExecutionRecord]
flowExecutions
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
nextToken
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Int
httpStatus