{-# 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 #-}

-- Derived from AWS service descriptions, licensed under Apache 2.0.

-- |
-- Module      : Amazonka.CodePipeline.ListActionExecutions
-- Copyright   : (c) 2013-2023 Brendan Hay
-- License     : Mozilla Public License, v. 2.0.
-- Maintainer  : Brendan Hay
-- Stability   : auto-generated
-- Portability : non-portable (GHC extensions)
--
-- Lists the action executions that have occurred in a pipeline.
--
-- This operation returns paginated results.
module Amazonka.CodePipeline.ListActionExecutions
  ( -- * Creating a Request
    ListActionExecutions (..),
    newListActionExecutions,

    -- * Request Lenses
    listActionExecutions_filter,
    listActionExecutions_maxResults,
    listActionExecutions_nextToken,
    listActionExecutions_pipelineName,

    -- * Destructuring the Response
    ListActionExecutionsResponse (..),
    newListActionExecutionsResponse,

    -- * Response Lenses
    listActionExecutionsResponse_actionExecutionDetails,
    listActionExecutionsResponse_nextToken,
    listActionExecutionsResponse_httpStatus,
  )
where

import Amazonka.CodePipeline.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

-- | /See:/ 'newListActionExecutions' smart constructor.
data ListActionExecutions = ListActionExecutions'
  { -- | Input information used to filter action execution history.
    ListActionExecutions -> Maybe ActionExecutionFilter
filter' :: Prelude.Maybe ActionExecutionFilter,
    -- | The maximum number of results to return in a single call. To retrieve
    -- the remaining results, make another call with the returned nextToken
    -- value. Action execution history is retained for up to 12 months, based
    -- on action execution start times. Default value is 100.
    --
    -- Detailed execution history is available for executions run on or after
    -- February 21, 2019.
    ListActionExecutions -> Maybe Natural
maxResults :: Prelude.Maybe Prelude.Natural,
    -- | The token that was returned from the previous @ListActionExecutions@
    -- call, which can be used to return the next set of action executions in
    -- the list.
    ListActionExecutions -> Maybe Text
nextToken :: Prelude.Maybe Prelude.Text,
    -- | The name of the pipeline for which you want to list action execution
    -- history.
    ListActionExecutions -> Text
pipelineName :: Prelude.Text
  }
  deriving (ListActionExecutions -> ListActionExecutions -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ListActionExecutions -> ListActionExecutions -> Bool
$c/= :: ListActionExecutions -> ListActionExecutions -> Bool
== :: ListActionExecutions -> ListActionExecutions -> Bool
$c== :: ListActionExecutions -> ListActionExecutions -> Bool
Prelude.Eq, ReadPrec [ListActionExecutions]
ReadPrec ListActionExecutions
Int -> ReadS ListActionExecutions
ReadS [ListActionExecutions]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ListActionExecutions]
$creadListPrec :: ReadPrec [ListActionExecutions]
readPrec :: ReadPrec ListActionExecutions
$creadPrec :: ReadPrec ListActionExecutions
readList :: ReadS [ListActionExecutions]
$creadList :: ReadS [ListActionExecutions]
readsPrec :: Int -> ReadS ListActionExecutions
$creadsPrec :: Int -> ReadS ListActionExecutions
Prelude.Read, Int -> ListActionExecutions -> ShowS
[ListActionExecutions] -> ShowS
ListActionExecutions -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ListActionExecutions] -> ShowS
$cshowList :: [ListActionExecutions] -> ShowS
show :: ListActionExecutions -> String
$cshow :: ListActionExecutions -> String
showsPrec :: Int -> ListActionExecutions -> ShowS
$cshowsPrec :: Int -> ListActionExecutions -> ShowS
Prelude.Show, forall x. Rep ListActionExecutions x -> ListActionExecutions
forall x. ListActionExecutions -> Rep ListActionExecutions x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep ListActionExecutions x -> ListActionExecutions
$cfrom :: forall x. ListActionExecutions -> Rep ListActionExecutions x
Prelude.Generic)

-- |
-- Create a value of 'ListActionExecutions' with all optional fields omitted.
--
-- Use <https://hackage.haskell.org/package/generic-lens generic-lens> or <https://hackage.haskell.org/package/optics optics> to modify other optional fields.
--
-- The following record fields are available, with the corresponding lenses provided
-- for backwards compatibility:
--
-- 'filter'', 'listActionExecutions_filter' - Input information used to filter action execution history.
--
-- 'maxResults', 'listActionExecutions_maxResults' - The maximum number of results to return in a single call. To retrieve
-- the remaining results, make another call with the returned nextToken
-- value. Action execution history is retained for up to 12 months, based
-- on action execution start times. Default value is 100.
--
-- Detailed execution history is available for executions run on or after
-- February 21, 2019.
--
-- 'nextToken', 'listActionExecutions_nextToken' - The token that was returned from the previous @ListActionExecutions@
-- call, which can be used to return the next set of action executions in
-- the list.
--
-- 'pipelineName', 'listActionExecutions_pipelineName' - The name of the pipeline for which you want to list action execution
-- history.
newListActionExecutions ::
  -- | 'pipelineName'
  Prelude.Text ->
  ListActionExecutions
newListActionExecutions :: Text -> ListActionExecutions
newListActionExecutions Text
pPipelineName_ =
  ListActionExecutions'
    { $sel:filter':ListActionExecutions' :: Maybe ActionExecutionFilter
filter' = forall a. Maybe a
Prelude.Nothing,
      $sel:maxResults:ListActionExecutions' :: Maybe Natural
maxResults = forall a. Maybe a
Prelude.Nothing,
      $sel:nextToken:ListActionExecutions' :: Maybe Text
nextToken = forall a. Maybe a
Prelude.Nothing,
      $sel:pipelineName:ListActionExecutions' :: Text
pipelineName = Text
pPipelineName_
    }

-- | Input information used to filter action execution history.
listActionExecutions_filter :: Lens.Lens' ListActionExecutions (Prelude.Maybe ActionExecutionFilter)
listActionExecutions_filter :: Lens' ListActionExecutions (Maybe ActionExecutionFilter)
listActionExecutions_filter = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListActionExecutions' {Maybe ActionExecutionFilter
filter' :: Maybe ActionExecutionFilter
$sel:filter':ListActionExecutions' :: ListActionExecutions -> Maybe ActionExecutionFilter
filter'} -> Maybe ActionExecutionFilter
filter') (\s :: ListActionExecutions
s@ListActionExecutions' {} Maybe ActionExecutionFilter
a -> ListActionExecutions
s {$sel:filter':ListActionExecutions' :: Maybe ActionExecutionFilter
filter' = Maybe ActionExecutionFilter
a} :: ListActionExecutions)

-- | The maximum number of results to return in a single call. To retrieve
-- the remaining results, make another call with the returned nextToken
-- value. Action execution history is retained for up to 12 months, based
-- on action execution start times. Default value is 100.
--
-- Detailed execution history is available for executions run on or after
-- February 21, 2019.
listActionExecutions_maxResults :: Lens.Lens' ListActionExecutions (Prelude.Maybe Prelude.Natural)
listActionExecutions_maxResults :: Lens' ListActionExecutions (Maybe Natural)
listActionExecutions_maxResults = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListActionExecutions' {Maybe Natural
maxResults :: Maybe Natural
$sel:maxResults:ListActionExecutions' :: ListActionExecutions -> Maybe Natural
maxResults} -> Maybe Natural
maxResults) (\s :: ListActionExecutions
s@ListActionExecutions' {} Maybe Natural
a -> ListActionExecutions
s {$sel:maxResults:ListActionExecutions' :: Maybe Natural
maxResults = Maybe Natural
a} :: ListActionExecutions)

-- | The token that was returned from the previous @ListActionExecutions@
-- call, which can be used to return the next set of action executions in
-- the list.
listActionExecutions_nextToken :: Lens.Lens' ListActionExecutions (Prelude.Maybe Prelude.Text)
listActionExecutions_nextToken :: Lens' ListActionExecutions (Maybe Text)
listActionExecutions_nextToken = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListActionExecutions' {Maybe Text
nextToken :: Maybe Text
$sel:nextToken:ListActionExecutions' :: ListActionExecutions -> Maybe Text
nextToken} -> Maybe Text
nextToken) (\s :: ListActionExecutions
s@ListActionExecutions' {} Maybe Text
a -> ListActionExecutions
s {$sel:nextToken:ListActionExecutions' :: Maybe Text
nextToken = Maybe Text
a} :: ListActionExecutions)

-- | The name of the pipeline for which you want to list action execution
-- history.
listActionExecutions_pipelineName :: Lens.Lens' ListActionExecutions Prelude.Text
listActionExecutions_pipelineName :: Lens' ListActionExecutions Text
listActionExecutions_pipelineName = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListActionExecutions' {Text
pipelineName :: Text
$sel:pipelineName:ListActionExecutions' :: ListActionExecutions -> Text
pipelineName} -> Text
pipelineName) (\s :: ListActionExecutions
s@ListActionExecutions' {} Text
a -> ListActionExecutions
s {$sel:pipelineName:ListActionExecutions' :: Text
pipelineName = Text
a} :: ListActionExecutions)

instance Core.AWSPager ListActionExecutions where
  page :: ListActionExecutions
-> AWSResponse ListActionExecutions -> Maybe ListActionExecutions
page ListActionExecutions
rq AWSResponse ListActionExecutions
rs
    | forall a. AWSTruncated a => a -> Bool
Core.stop
        ( AWSResponse ListActionExecutions
rs
            forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^? Lens' ListActionExecutionsResponse (Maybe Text)
listActionExecutionsResponse_nextToken
            forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall a b. Prism (Maybe a) (Maybe b) a b
Lens._Just
        ) =
        forall a. Maybe a
Prelude.Nothing
    | forall a. AWSTruncated a => a -> Bool
Core.stop
        ( AWSResponse ListActionExecutions
rs
            forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^? Lens' ListActionExecutionsResponse (Maybe [ActionExecutionDetail])
listActionExecutionsResponse_actionExecutionDetails
            forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall a b. Prism (Maybe a) (Maybe b) a b
Lens._Just
        ) =
        forall a. Maybe a
Prelude.Nothing
    | Bool
Prelude.otherwise =
        forall a. a -> Maybe a
Prelude.Just
          forall a b. (a -> b) -> a -> b
Prelude.$ ListActionExecutions
rq
          forall a b. a -> (a -> b) -> b
Prelude.& Lens' ListActionExecutions (Maybe Text)
listActionExecutions_nextToken
          forall s t a b. ASetter s t a b -> b -> s -> t
Lens..~ AWSResponse ListActionExecutions
rs
          forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^? Lens' ListActionExecutionsResponse (Maybe Text)
listActionExecutionsResponse_nextToken
          forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall a b. Prism (Maybe a) (Maybe b) a b
Lens._Just

instance Core.AWSRequest ListActionExecutions where
  type
    AWSResponse ListActionExecutions =
      ListActionExecutionsResponse
  request :: (Service -> Service)
-> ListActionExecutions -> Request ListActionExecutions
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 ListActionExecutions
-> ClientResponse ClientBody
-> m (Either
        Error (ClientResponse (AWSResponse ListActionExecutions)))
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 [ActionExecutionDetail]
-> Maybe Text -> Int -> ListActionExecutionsResponse
ListActionExecutionsResponse'
            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
"actionExecutionDetails"
                            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 ListActionExecutions where
  hashWithSalt :: Int -> ListActionExecutions -> Int
hashWithSalt Int
_salt ListActionExecutions' {Maybe Natural
Maybe Text
Maybe ActionExecutionFilter
Text
pipelineName :: Text
nextToken :: Maybe Text
maxResults :: Maybe Natural
filter' :: Maybe ActionExecutionFilter
$sel:pipelineName:ListActionExecutions' :: ListActionExecutions -> Text
$sel:nextToken:ListActionExecutions' :: ListActionExecutions -> Maybe Text
$sel:maxResults:ListActionExecutions' :: ListActionExecutions -> Maybe Natural
$sel:filter':ListActionExecutions' :: ListActionExecutions -> Maybe ActionExecutionFilter
..} =
    Int
_salt
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe ActionExecutionFilter
filter'
      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
pipelineName

instance Prelude.NFData ListActionExecutions where
  rnf :: ListActionExecutions -> ()
rnf ListActionExecutions' {Maybe Natural
Maybe Text
Maybe ActionExecutionFilter
Text
pipelineName :: Text
nextToken :: Maybe Text
maxResults :: Maybe Natural
filter' :: Maybe ActionExecutionFilter
$sel:pipelineName:ListActionExecutions' :: ListActionExecutions -> Text
$sel:nextToken:ListActionExecutions' :: ListActionExecutions -> Maybe Text
$sel:maxResults:ListActionExecutions' :: ListActionExecutions -> Maybe Natural
$sel:filter':ListActionExecutions' :: ListActionExecutions -> Maybe ActionExecutionFilter
..} =
    forall a. NFData a => a -> ()
Prelude.rnf Maybe ActionExecutionFilter
filter'
      seq :: forall a b. a -> b -> b
`Prelude.seq` 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
pipelineName

instance Data.ToHeaders ListActionExecutions where
  toHeaders :: ListActionExecutions -> ResponseHeaders
toHeaders =
    forall a b. a -> b -> a
Prelude.const
      ( forall a. Monoid a => [a] -> a
Prelude.mconcat
          [ HeaderName
"X-Amz-Target"
              forall a. ToHeader a => HeaderName -> a -> ResponseHeaders
Data.=# ( ByteString
"CodePipeline_20150709.ListActionExecutions" ::
                          Prelude.ByteString
                      ),
            HeaderName
"Content-Type"
              forall a. ToHeader a => HeaderName -> a -> ResponseHeaders
Data.=# ( ByteString
"application/x-amz-json-1.1" ::
                          Prelude.ByteString
                      )
          ]
      )

instance Data.ToJSON ListActionExecutions where
  toJSON :: ListActionExecutions -> Value
toJSON ListActionExecutions' {Maybe Natural
Maybe Text
Maybe ActionExecutionFilter
Text
pipelineName :: Text
nextToken :: Maybe Text
maxResults :: Maybe Natural
filter' :: Maybe ActionExecutionFilter
$sel:pipelineName:ListActionExecutions' :: ListActionExecutions -> Text
$sel:nextToken:ListActionExecutions' :: ListActionExecutions -> Maybe Text
$sel:maxResults:ListActionExecutions' :: ListActionExecutions -> Maybe Natural
$sel:filter':ListActionExecutions' :: ListActionExecutions -> Maybe ActionExecutionFilter
..} =
    [Pair] -> Value
Data.object
      ( forall a. [Maybe a] -> [a]
Prelude.catMaybes
          [ (Key
"filter" 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 ActionExecutionFilter
filter',
            (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
"pipelineName" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..= Text
pipelineName)
          ]
      )

instance Data.ToPath ListActionExecutions where
  toPath :: ListActionExecutions -> ByteString
toPath = forall a b. a -> b -> a
Prelude.const ByteString
"/"

instance Data.ToQuery ListActionExecutions where
  toQuery :: ListActionExecutions -> QueryString
toQuery = forall a b. a -> b -> a
Prelude.const forall a. Monoid a => a
Prelude.mempty

-- | /See:/ 'newListActionExecutionsResponse' smart constructor.
data ListActionExecutionsResponse = ListActionExecutionsResponse'
  { -- | The details for a list of recent executions, such as action execution
    -- ID.
    ListActionExecutionsResponse -> Maybe [ActionExecutionDetail]
actionExecutionDetails :: Prelude.Maybe [ActionExecutionDetail],
    -- | If the amount of returned information is significantly large, an
    -- identifier is also returned and can be used in a subsequent
    -- @ListActionExecutions@ call to return the next set of action executions
    -- in the list.
    ListActionExecutionsResponse -> Maybe Text
nextToken :: Prelude.Maybe Prelude.Text,
    -- | The response's http status code.
    ListActionExecutionsResponse -> Int
httpStatus :: Prelude.Int
  }
  deriving (ListActionExecutionsResponse
-> ListActionExecutionsResponse -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ListActionExecutionsResponse
-> ListActionExecutionsResponse -> Bool
$c/= :: ListActionExecutionsResponse
-> ListActionExecutionsResponse -> Bool
== :: ListActionExecutionsResponse
-> ListActionExecutionsResponse -> Bool
$c== :: ListActionExecutionsResponse
-> ListActionExecutionsResponse -> Bool
Prelude.Eq, ReadPrec [ListActionExecutionsResponse]
ReadPrec ListActionExecutionsResponse
Int -> ReadS ListActionExecutionsResponse
ReadS [ListActionExecutionsResponse]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ListActionExecutionsResponse]
$creadListPrec :: ReadPrec [ListActionExecutionsResponse]
readPrec :: ReadPrec ListActionExecutionsResponse
$creadPrec :: ReadPrec ListActionExecutionsResponse
readList :: ReadS [ListActionExecutionsResponse]
$creadList :: ReadS [ListActionExecutionsResponse]
readsPrec :: Int -> ReadS ListActionExecutionsResponse
$creadsPrec :: Int -> ReadS ListActionExecutionsResponse
Prelude.Read, Int -> ListActionExecutionsResponse -> ShowS
[ListActionExecutionsResponse] -> ShowS
ListActionExecutionsResponse -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ListActionExecutionsResponse] -> ShowS
$cshowList :: [ListActionExecutionsResponse] -> ShowS
show :: ListActionExecutionsResponse -> String
$cshow :: ListActionExecutionsResponse -> String
showsPrec :: Int -> ListActionExecutionsResponse -> ShowS
$cshowsPrec :: Int -> ListActionExecutionsResponse -> ShowS
Prelude.Show, forall x.
Rep ListActionExecutionsResponse x -> ListActionExecutionsResponse
forall x.
ListActionExecutionsResponse -> Rep ListActionExecutionsResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep ListActionExecutionsResponse x -> ListActionExecutionsResponse
$cfrom :: forall x.
ListActionExecutionsResponse -> Rep ListActionExecutionsResponse x
Prelude.Generic)

-- |
-- Create a value of 'ListActionExecutionsResponse' with all optional fields omitted.
--
-- Use <https://hackage.haskell.org/package/generic-lens generic-lens> or <https://hackage.haskell.org/package/optics optics> to modify other optional fields.
--
-- The following record fields are available, with the corresponding lenses provided
-- for backwards compatibility:
--
-- 'actionExecutionDetails', 'listActionExecutionsResponse_actionExecutionDetails' - The details for a list of recent executions, such as action execution
-- ID.
--
-- 'nextToken', 'listActionExecutionsResponse_nextToken' - If the amount of returned information is significantly large, an
-- identifier is also returned and can be used in a subsequent
-- @ListActionExecutions@ call to return the next set of action executions
-- in the list.
--
-- 'httpStatus', 'listActionExecutionsResponse_httpStatus' - The response's http status code.
newListActionExecutionsResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  ListActionExecutionsResponse
newListActionExecutionsResponse :: Int -> ListActionExecutionsResponse
newListActionExecutionsResponse Int
pHttpStatus_ =
  ListActionExecutionsResponse'
    { $sel:actionExecutionDetails:ListActionExecutionsResponse' :: Maybe [ActionExecutionDetail]
actionExecutionDetails =
        forall a. Maybe a
Prelude.Nothing,
      $sel:nextToken:ListActionExecutionsResponse' :: Maybe Text
nextToken = forall a. Maybe a
Prelude.Nothing,
      $sel:httpStatus:ListActionExecutionsResponse' :: Int
httpStatus = Int
pHttpStatus_
    }

-- | The details for a list of recent executions, such as action execution
-- ID.
listActionExecutionsResponse_actionExecutionDetails :: Lens.Lens' ListActionExecutionsResponse (Prelude.Maybe [ActionExecutionDetail])
listActionExecutionsResponse_actionExecutionDetails :: Lens' ListActionExecutionsResponse (Maybe [ActionExecutionDetail])
listActionExecutionsResponse_actionExecutionDetails = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListActionExecutionsResponse' {Maybe [ActionExecutionDetail]
actionExecutionDetails :: Maybe [ActionExecutionDetail]
$sel:actionExecutionDetails:ListActionExecutionsResponse' :: ListActionExecutionsResponse -> Maybe [ActionExecutionDetail]
actionExecutionDetails} -> Maybe [ActionExecutionDetail]
actionExecutionDetails) (\s :: ListActionExecutionsResponse
s@ListActionExecutionsResponse' {} Maybe [ActionExecutionDetail]
a -> ListActionExecutionsResponse
s {$sel:actionExecutionDetails:ListActionExecutionsResponse' :: Maybe [ActionExecutionDetail]
actionExecutionDetails = Maybe [ActionExecutionDetail]
a} :: ListActionExecutionsResponse) 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

-- | If the amount of returned information is significantly large, an
-- identifier is also returned and can be used in a subsequent
-- @ListActionExecutions@ call to return the next set of action executions
-- in the list.
listActionExecutionsResponse_nextToken :: Lens.Lens' ListActionExecutionsResponse (Prelude.Maybe Prelude.Text)
listActionExecutionsResponse_nextToken :: Lens' ListActionExecutionsResponse (Maybe Text)
listActionExecutionsResponse_nextToken = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListActionExecutionsResponse' {Maybe Text
nextToken :: Maybe Text
$sel:nextToken:ListActionExecutionsResponse' :: ListActionExecutionsResponse -> Maybe Text
nextToken} -> Maybe Text
nextToken) (\s :: ListActionExecutionsResponse
s@ListActionExecutionsResponse' {} Maybe Text
a -> ListActionExecutionsResponse
s {$sel:nextToken:ListActionExecutionsResponse' :: Maybe Text
nextToken = Maybe Text
a} :: ListActionExecutionsResponse)

-- | The response's http status code.
listActionExecutionsResponse_httpStatus :: Lens.Lens' ListActionExecutionsResponse Prelude.Int
listActionExecutionsResponse_httpStatus :: Lens' ListActionExecutionsResponse Int
listActionExecutionsResponse_httpStatus = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListActionExecutionsResponse' {Int
httpStatus :: Int
$sel:httpStatus:ListActionExecutionsResponse' :: ListActionExecutionsResponse -> Int
httpStatus} -> Int
httpStatus) (\s :: ListActionExecutionsResponse
s@ListActionExecutionsResponse' {} Int
a -> ListActionExecutionsResponse
s {$sel:httpStatus:ListActionExecutionsResponse' :: Int
httpStatus = Int
a} :: ListActionExecutionsResponse)

instance Prelude.NFData ListActionExecutionsResponse where
  rnf :: ListActionExecutionsResponse -> ()
rnf ListActionExecutionsResponse' {Int
Maybe [ActionExecutionDetail]
Maybe Text
httpStatus :: Int
nextToken :: Maybe Text
actionExecutionDetails :: Maybe [ActionExecutionDetail]
$sel:httpStatus:ListActionExecutionsResponse' :: ListActionExecutionsResponse -> Int
$sel:nextToken:ListActionExecutionsResponse' :: ListActionExecutionsResponse -> Maybe Text
$sel:actionExecutionDetails:ListActionExecutionsResponse' :: ListActionExecutionsResponse -> Maybe [ActionExecutionDetail]
..} =
    forall a. NFData a => a -> ()
Prelude.rnf Maybe [ActionExecutionDetail]
actionExecutionDetails
      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