{-# 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.SageMaker.ListPipelineExecutionSteps
-- Copyright   : (c) 2013-2023 Brendan Hay
-- License     : Mozilla Public License, v. 2.0.
-- Maintainer  : Brendan Hay
-- Stability   : auto-generated
-- Portability : non-portable (GHC extensions)
--
-- Gets a list of @PipeLineExecutionStep@ objects.
--
-- This operation returns paginated results.
module Amazonka.SageMaker.ListPipelineExecutionSteps
  ( -- * Creating a Request
    ListPipelineExecutionSteps (..),
    newListPipelineExecutionSteps,

    -- * Request Lenses
    listPipelineExecutionSteps_maxResults,
    listPipelineExecutionSteps_nextToken,
    listPipelineExecutionSteps_pipelineExecutionArn,
    listPipelineExecutionSteps_sortOrder,

    -- * Destructuring the Response
    ListPipelineExecutionStepsResponse (..),
    newListPipelineExecutionStepsResponse,

    -- * Response Lenses
    listPipelineExecutionStepsResponse_nextToken,
    listPipelineExecutionStepsResponse_pipelineExecutionSteps,
    listPipelineExecutionStepsResponse_httpStatus,
  )
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 qualified Amazonka.Request as Request
import qualified Amazonka.Response as Response
import Amazonka.SageMaker.Types

-- | /See:/ 'newListPipelineExecutionSteps' smart constructor.
data ListPipelineExecutionSteps = ListPipelineExecutionSteps'
  { -- | The maximum number of pipeline execution steps to return in the
    -- response.
    ListPipelineExecutionSteps -> Maybe Natural
maxResults :: Prelude.Maybe Prelude.Natural,
    -- | If the result of the previous @ListPipelineExecutionSteps@ request was
    -- truncated, the response includes a @NextToken@. To retrieve the next set
    -- of pipeline execution steps, use the token in the next request.
    ListPipelineExecutionSteps -> Maybe Text
nextToken :: Prelude.Maybe Prelude.Text,
    -- | The Amazon Resource Name (ARN) of the pipeline execution.
    ListPipelineExecutionSteps -> Maybe Text
pipelineExecutionArn :: Prelude.Maybe Prelude.Text,
    -- | The field by which to sort results. The default is @CreatedTime@.
    ListPipelineExecutionSteps -> Maybe SortOrder
sortOrder :: Prelude.Maybe SortOrder
  }
  deriving (ListPipelineExecutionSteps -> ListPipelineExecutionSteps -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ListPipelineExecutionSteps -> ListPipelineExecutionSteps -> Bool
$c/= :: ListPipelineExecutionSteps -> ListPipelineExecutionSteps -> Bool
== :: ListPipelineExecutionSteps -> ListPipelineExecutionSteps -> Bool
$c== :: ListPipelineExecutionSteps -> ListPipelineExecutionSteps -> Bool
Prelude.Eq, ReadPrec [ListPipelineExecutionSteps]
ReadPrec ListPipelineExecutionSteps
Int -> ReadS ListPipelineExecutionSteps
ReadS [ListPipelineExecutionSteps]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ListPipelineExecutionSteps]
$creadListPrec :: ReadPrec [ListPipelineExecutionSteps]
readPrec :: ReadPrec ListPipelineExecutionSteps
$creadPrec :: ReadPrec ListPipelineExecutionSteps
readList :: ReadS [ListPipelineExecutionSteps]
$creadList :: ReadS [ListPipelineExecutionSteps]
readsPrec :: Int -> ReadS ListPipelineExecutionSteps
$creadsPrec :: Int -> ReadS ListPipelineExecutionSteps
Prelude.Read, Int -> ListPipelineExecutionSteps -> ShowS
[ListPipelineExecutionSteps] -> ShowS
ListPipelineExecutionSteps -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ListPipelineExecutionSteps] -> ShowS
$cshowList :: [ListPipelineExecutionSteps] -> ShowS
show :: ListPipelineExecutionSteps -> String
$cshow :: ListPipelineExecutionSteps -> String
showsPrec :: Int -> ListPipelineExecutionSteps -> ShowS
$cshowsPrec :: Int -> ListPipelineExecutionSteps -> ShowS
Prelude.Show, forall x.
Rep ListPipelineExecutionSteps x -> ListPipelineExecutionSteps
forall x.
ListPipelineExecutionSteps -> Rep ListPipelineExecutionSteps x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep ListPipelineExecutionSteps x -> ListPipelineExecutionSteps
$cfrom :: forall x.
ListPipelineExecutionSteps -> Rep ListPipelineExecutionSteps x
Prelude.Generic)

-- |
-- Create a value of 'ListPipelineExecutionSteps' 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:
--
-- 'maxResults', 'listPipelineExecutionSteps_maxResults' - The maximum number of pipeline execution steps to return in the
-- response.
--
-- 'nextToken', 'listPipelineExecutionSteps_nextToken' - If the result of the previous @ListPipelineExecutionSteps@ request was
-- truncated, the response includes a @NextToken@. To retrieve the next set
-- of pipeline execution steps, use the token in the next request.
--
-- 'pipelineExecutionArn', 'listPipelineExecutionSteps_pipelineExecutionArn' - The Amazon Resource Name (ARN) of the pipeline execution.
--
-- 'sortOrder', 'listPipelineExecutionSteps_sortOrder' - The field by which to sort results. The default is @CreatedTime@.
newListPipelineExecutionSteps ::
  ListPipelineExecutionSteps
newListPipelineExecutionSteps :: ListPipelineExecutionSteps
newListPipelineExecutionSteps =
  ListPipelineExecutionSteps'
    { $sel:maxResults:ListPipelineExecutionSteps' :: Maybe Natural
maxResults =
        forall a. Maybe a
Prelude.Nothing,
      $sel:nextToken:ListPipelineExecutionSteps' :: Maybe Text
nextToken = forall a. Maybe a
Prelude.Nothing,
      $sel:pipelineExecutionArn:ListPipelineExecutionSteps' :: Maybe Text
pipelineExecutionArn = forall a. Maybe a
Prelude.Nothing,
      $sel:sortOrder:ListPipelineExecutionSteps' :: Maybe SortOrder
sortOrder = forall a. Maybe a
Prelude.Nothing
    }

-- | The maximum number of pipeline execution steps to return in the
-- response.
listPipelineExecutionSteps_maxResults :: Lens.Lens' ListPipelineExecutionSteps (Prelude.Maybe Prelude.Natural)
listPipelineExecutionSteps_maxResults :: Lens' ListPipelineExecutionSteps (Maybe Natural)
listPipelineExecutionSteps_maxResults = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListPipelineExecutionSteps' {Maybe Natural
maxResults :: Maybe Natural
$sel:maxResults:ListPipelineExecutionSteps' :: ListPipelineExecutionSteps -> Maybe Natural
maxResults} -> Maybe Natural
maxResults) (\s :: ListPipelineExecutionSteps
s@ListPipelineExecutionSteps' {} Maybe Natural
a -> ListPipelineExecutionSteps
s {$sel:maxResults:ListPipelineExecutionSteps' :: Maybe Natural
maxResults = Maybe Natural
a} :: ListPipelineExecutionSteps)

-- | If the result of the previous @ListPipelineExecutionSteps@ request was
-- truncated, the response includes a @NextToken@. To retrieve the next set
-- of pipeline execution steps, use the token in the next request.
listPipelineExecutionSteps_nextToken :: Lens.Lens' ListPipelineExecutionSteps (Prelude.Maybe Prelude.Text)
listPipelineExecutionSteps_nextToken :: Lens' ListPipelineExecutionSteps (Maybe Text)
listPipelineExecutionSteps_nextToken = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListPipelineExecutionSteps' {Maybe Text
nextToken :: Maybe Text
$sel:nextToken:ListPipelineExecutionSteps' :: ListPipelineExecutionSteps -> Maybe Text
nextToken} -> Maybe Text
nextToken) (\s :: ListPipelineExecutionSteps
s@ListPipelineExecutionSteps' {} Maybe Text
a -> ListPipelineExecutionSteps
s {$sel:nextToken:ListPipelineExecutionSteps' :: Maybe Text
nextToken = Maybe Text
a} :: ListPipelineExecutionSteps)

-- | The Amazon Resource Name (ARN) of the pipeline execution.
listPipelineExecutionSteps_pipelineExecutionArn :: Lens.Lens' ListPipelineExecutionSteps (Prelude.Maybe Prelude.Text)
listPipelineExecutionSteps_pipelineExecutionArn :: Lens' ListPipelineExecutionSteps (Maybe Text)
listPipelineExecutionSteps_pipelineExecutionArn = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListPipelineExecutionSteps' {Maybe Text
pipelineExecutionArn :: Maybe Text
$sel:pipelineExecutionArn:ListPipelineExecutionSteps' :: ListPipelineExecutionSteps -> Maybe Text
pipelineExecutionArn} -> Maybe Text
pipelineExecutionArn) (\s :: ListPipelineExecutionSteps
s@ListPipelineExecutionSteps' {} Maybe Text
a -> ListPipelineExecutionSteps
s {$sel:pipelineExecutionArn:ListPipelineExecutionSteps' :: Maybe Text
pipelineExecutionArn = Maybe Text
a} :: ListPipelineExecutionSteps)

-- | The field by which to sort results. The default is @CreatedTime@.
listPipelineExecutionSteps_sortOrder :: Lens.Lens' ListPipelineExecutionSteps (Prelude.Maybe SortOrder)
listPipelineExecutionSteps_sortOrder :: Lens' ListPipelineExecutionSteps (Maybe SortOrder)
listPipelineExecutionSteps_sortOrder = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListPipelineExecutionSteps' {Maybe SortOrder
sortOrder :: Maybe SortOrder
$sel:sortOrder:ListPipelineExecutionSteps' :: ListPipelineExecutionSteps -> Maybe SortOrder
sortOrder} -> Maybe SortOrder
sortOrder) (\s :: ListPipelineExecutionSteps
s@ListPipelineExecutionSteps' {} Maybe SortOrder
a -> ListPipelineExecutionSteps
s {$sel:sortOrder:ListPipelineExecutionSteps' :: Maybe SortOrder
sortOrder = Maybe SortOrder
a} :: ListPipelineExecutionSteps)

instance Core.AWSPager ListPipelineExecutionSteps where
  page :: ListPipelineExecutionSteps
-> AWSResponse ListPipelineExecutionSteps
-> Maybe ListPipelineExecutionSteps
page ListPipelineExecutionSteps
rq AWSResponse ListPipelineExecutionSteps
rs
    | forall a. AWSTruncated a => a -> Bool
Core.stop
        ( AWSResponse ListPipelineExecutionSteps
rs
            forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^? Lens' ListPipelineExecutionStepsResponse (Maybe Text)
listPipelineExecutionStepsResponse_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 ListPipelineExecutionSteps
rs
            forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^? Lens'
  ListPipelineExecutionStepsResponse (Maybe [PipelineExecutionStep])
listPipelineExecutionStepsResponse_pipelineExecutionSteps
            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.$ ListPipelineExecutionSteps
rq
          forall a b. a -> (a -> b) -> b
Prelude.& Lens' ListPipelineExecutionSteps (Maybe Text)
listPipelineExecutionSteps_nextToken
          forall s t a b. ASetter s t a b -> b -> s -> t
Lens..~ AWSResponse ListPipelineExecutionSteps
rs
          forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^? Lens' ListPipelineExecutionStepsResponse (Maybe Text)
listPipelineExecutionStepsResponse_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 ListPipelineExecutionSteps where
  type
    AWSResponse ListPipelineExecutionSteps =
      ListPipelineExecutionStepsResponse
  request :: (Service -> Service)
-> ListPipelineExecutionSteps -> Request ListPipelineExecutionSteps
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 ListPipelineExecutionSteps
-> ClientResponse ClientBody
-> m (Either
        Error (ClientResponse (AWSResponse ListPipelineExecutionSteps)))
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 Text
-> Maybe [PipelineExecutionStep]
-> Int
-> ListPipelineExecutionStepsResponse
ListPipelineExecutionStepsResponse'
            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
"NextToken")
            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
"PipelineExecutionSteps"
                            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.<*> (forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure (forall a. Enum a => a -> Int
Prelude.fromEnum Int
s))
      )

instance Prelude.Hashable ListPipelineExecutionSteps where
  hashWithSalt :: Int -> ListPipelineExecutionSteps -> Int
hashWithSalt Int
_salt ListPipelineExecutionSteps' {Maybe Natural
Maybe Text
Maybe SortOrder
sortOrder :: Maybe SortOrder
pipelineExecutionArn :: Maybe Text
nextToken :: Maybe Text
maxResults :: Maybe Natural
$sel:sortOrder:ListPipelineExecutionSteps' :: ListPipelineExecutionSteps -> Maybe SortOrder
$sel:pipelineExecutionArn:ListPipelineExecutionSteps' :: ListPipelineExecutionSteps -> Maybe Text
$sel:nextToken:ListPipelineExecutionSteps' :: ListPipelineExecutionSteps -> Maybe Text
$sel:maxResults:ListPipelineExecutionSteps' :: ListPipelineExecutionSteps -> 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` Maybe Text
pipelineExecutionArn
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe SortOrder
sortOrder

instance Prelude.NFData ListPipelineExecutionSteps where
  rnf :: ListPipelineExecutionSteps -> ()
rnf ListPipelineExecutionSteps' {Maybe Natural
Maybe Text
Maybe SortOrder
sortOrder :: Maybe SortOrder
pipelineExecutionArn :: Maybe Text
nextToken :: Maybe Text
maxResults :: Maybe Natural
$sel:sortOrder:ListPipelineExecutionSteps' :: ListPipelineExecutionSteps -> Maybe SortOrder
$sel:pipelineExecutionArn:ListPipelineExecutionSteps' :: ListPipelineExecutionSteps -> Maybe Text
$sel:nextToken:ListPipelineExecutionSteps' :: ListPipelineExecutionSteps -> Maybe Text
$sel:maxResults:ListPipelineExecutionSteps' :: ListPipelineExecutionSteps -> 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 Maybe Text
pipelineExecutionArn
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe SortOrder
sortOrder

instance Data.ToHeaders ListPipelineExecutionSteps where
  toHeaders :: ListPipelineExecutionSteps -> 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
"SageMaker.ListPipelineExecutionSteps" ::
                          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 ListPipelineExecutionSteps where
  toJSON :: ListPipelineExecutionSteps -> Value
toJSON ListPipelineExecutionSteps' {Maybe Natural
Maybe Text
Maybe SortOrder
sortOrder :: Maybe SortOrder
pipelineExecutionArn :: Maybe Text
nextToken :: Maybe Text
maxResults :: Maybe Natural
$sel:sortOrder:ListPipelineExecutionSteps' :: ListPipelineExecutionSteps -> Maybe SortOrder
$sel:pipelineExecutionArn:ListPipelineExecutionSteps' :: ListPipelineExecutionSteps -> Maybe Text
$sel:nextToken:ListPipelineExecutionSteps' :: ListPipelineExecutionSteps -> Maybe Text
$sel:maxResults:ListPipelineExecutionSteps' :: ListPipelineExecutionSteps -> 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,
            (Key
"PipelineExecutionArn" 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
pipelineExecutionArn,
            (Key
"SortOrder" 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 SortOrder
sortOrder
          ]
      )

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

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

-- | /See:/ 'newListPipelineExecutionStepsResponse' smart constructor.
data ListPipelineExecutionStepsResponse = ListPipelineExecutionStepsResponse'
  { -- | If the result of the previous @ListPipelineExecutionSteps@ request was
    -- truncated, the response includes a @NextToken@. To retrieve the next set
    -- of pipeline execution steps, use the token in the next request.
    ListPipelineExecutionStepsResponse -> Maybe Text
nextToken :: Prelude.Maybe Prelude.Text,
    -- | A list of @PipeLineExecutionStep@ objects. Each @PipeLineExecutionStep@
    -- consists of StepName, StartTime, EndTime, StepStatus, and Metadata.
    -- Metadata is an object with properties for each job that contains
    -- relevant information about the job created by the step.
    ListPipelineExecutionStepsResponse -> Maybe [PipelineExecutionStep]
pipelineExecutionSteps :: Prelude.Maybe [PipelineExecutionStep],
    -- | The response's http status code.
    ListPipelineExecutionStepsResponse -> Int
httpStatus :: Prelude.Int
  }
  deriving (ListPipelineExecutionStepsResponse
-> ListPipelineExecutionStepsResponse -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ListPipelineExecutionStepsResponse
-> ListPipelineExecutionStepsResponse -> Bool
$c/= :: ListPipelineExecutionStepsResponse
-> ListPipelineExecutionStepsResponse -> Bool
== :: ListPipelineExecutionStepsResponse
-> ListPipelineExecutionStepsResponse -> Bool
$c== :: ListPipelineExecutionStepsResponse
-> ListPipelineExecutionStepsResponse -> Bool
Prelude.Eq, ReadPrec [ListPipelineExecutionStepsResponse]
ReadPrec ListPipelineExecutionStepsResponse
Int -> ReadS ListPipelineExecutionStepsResponse
ReadS [ListPipelineExecutionStepsResponse]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ListPipelineExecutionStepsResponse]
$creadListPrec :: ReadPrec [ListPipelineExecutionStepsResponse]
readPrec :: ReadPrec ListPipelineExecutionStepsResponse
$creadPrec :: ReadPrec ListPipelineExecutionStepsResponse
readList :: ReadS [ListPipelineExecutionStepsResponse]
$creadList :: ReadS [ListPipelineExecutionStepsResponse]
readsPrec :: Int -> ReadS ListPipelineExecutionStepsResponse
$creadsPrec :: Int -> ReadS ListPipelineExecutionStepsResponse
Prelude.Read, Int -> ListPipelineExecutionStepsResponse -> ShowS
[ListPipelineExecutionStepsResponse] -> ShowS
ListPipelineExecutionStepsResponse -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ListPipelineExecutionStepsResponse] -> ShowS
$cshowList :: [ListPipelineExecutionStepsResponse] -> ShowS
show :: ListPipelineExecutionStepsResponse -> String
$cshow :: ListPipelineExecutionStepsResponse -> String
showsPrec :: Int -> ListPipelineExecutionStepsResponse -> ShowS
$cshowsPrec :: Int -> ListPipelineExecutionStepsResponse -> ShowS
Prelude.Show, forall x.
Rep ListPipelineExecutionStepsResponse x
-> ListPipelineExecutionStepsResponse
forall x.
ListPipelineExecutionStepsResponse
-> Rep ListPipelineExecutionStepsResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep ListPipelineExecutionStepsResponse x
-> ListPipelineExecutionStepsResponse
$cfrom :: forall x.
ListPipelineExecutionStepsResponse
-> Rep ListPipelineExecutionStepsResponse x
Prelude.Generic)

-- |
-- Create a value of 'ListPipelineExecutionStepsResponse' 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:
--
-- 'nextToken', 'listPipelineExecutionStepsResponse_nextToken' - If the result of the previous @ListPipelineExecutionSteps@ request was
-- truncated, the response includes a @NextToken@. To retrieve the next set
-- of pipeline execution steps, use the token in the next request.
--
-- 'pipelineExecutionSteps', 'listPipelineExecutionStepsResponse_pipelineExecutionSteps' - A list of @PipeLineExecutionStep@ objects. Each @PipeLineExecutionStep@
-- consists of StepName, StartTime, EndTime, StepStatus, and Metadata.
-- Metadata is an object with properties for each job that contains
-- relevant information about the job created by the step.
--
-- 'httpStatus', 'listPipelineExecutionStepsResponse_httpStatus' - The response's http status code.
newListPipelineExecutionStepsResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  ListPipelineExecutionStepsResponse
newListPipelineExecutionStepsResponse :: Int -> ListPipelineExecutionStepsResponse
newListPipelineExecutionStepsResponse Int
pHttpStatus_ =
  ListPipelineExecutionStepsResponse'
    { $sel:nextToken:ListPipelineExecutionStepsResponse' :: Maybe Text
nextToken =
        forall a. Maybe a
Prelude.Nothing,
      $sel:pipelineExecutionSteps:ListPipelineExecutionStepsResponse' :: Maybe [PipelineExecutionStep]
pipelineExecutionSteps =
        forall a. Maybe a
Prelude.Nothing,
      $sel:httpStatus:ListPipelineExecutionStepsResponse' :: Int
httpStatus = Int
pHttpStatus_
    }

-- | If the result of the previous @ListPipelineExecutionSteps@ request was
-- truncated, the response includes a @NextToken@. To retrieve the next set
-- of pipeline execution steps, use the token in the next request.
listPipelineExecutionStepsResponse_nextToken :: Lens.Lens' ListPipelineExecutionStepsResponse (Prelude.Maybe Prelude.Text)
listPipelineExecutionStepsResponse_nextToken :: Lens' ListPipelineExecutionStepsResponse (Maybe Text)
listPipelineExecutionStepsResponse_nextToken = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListPipelineExecutionStepsResponse' {Maybe Text
nextToken :: Maybe Text
$sel:nextToken:ListPipelineExecutionStepsResponse' :: ListPipelineExecutionStepsResponse -> Maybe Text
nextToken} -> Maybe Text
nextToken) (\s :: ListPipelineExecutionStepsResponse
s@ListPipelineExecutionStepsResponse' {} Maybe Text
a -> ListPipelineExecutionStepsResponse
s {$sel:nextToken:ListPipelineExecutionStepsResponse' :: Maybe Text
nextToken = Maybe Text
a} :: ListPipelineExecutionStepsResponse)

-- | A list of @PipeLineExecutionStep@ objects. Each @PipeLineExecutionStep@
-- consists of StepName, StartTime, EndTime, StepStatus, and Metadata.
-- Metadata is an object with properties for each job that contains
-- relevant information about the job created by the step.
listPipelineExecutionStepsResponse_pipelineExecutionSteps :: Lens.Lens' ListPipelineExecutionStepsResponse (Prelude.Maybe [PipelineExecutionStep])
listPipelineExecutionStepsResponse_pipelineExecutionSteps :: Lens'
  ListPipelineExecutionStepsResponse (Maybe [PipelineExecutionStep])
listPipelineExecutionStepsResponse_pipelineExecutionSteps = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListPipelineExecutionStepsResponse' {Maybe [PipelineExecutionStep]
pipelineExecutionSteps :: Maybe [PipelineExecutionStep]
$sel:pipelineExecutionSteps:ListPipelineExecutionStepsResponse' :: ListPipelineExecutionStepsResponse -> Maybe [PipelineExecutionStep]
pipelineExecutionSteps} -> Maybe [PipelineExecutionStep]
pipelineExecutionSteps) (\s :: ListPipelineExecutionStepsResponse
s@ListPipelineExecutionStepsResponse' {} Maybe [PipelineExecutionStep]
a -> ListPipelineExecutionStepsResponse
s {$sel:pipelineExecutionSteps:ListPipelineExecutionStepsResponse' :: Maybe [PipelineExecutionStep]
pipelineExecutionSteps = Maybe [PipelineExecutionStep]
a} :: ListPipelineExecutionStepsResponse) 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

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

instance
  Prelude.NFData
    ListPipelineExecutionStepsResponse
  where
  rnf :: ListPipelineExecutionStepsResponse -> ()
rnf ListPipelineExecutionStepsResponse' {Int
Maybe [PipelineExecutionStep]
Maybe Text
httpStatus :: Int
pipelineExecutionSteps :: Maybe [PipelineExecutionStep]
nextToken :: Maybe Text
$sel:httpStatus:ListPipelineExecutionStepsResponse' :: ListPipelineExecutionStepsResponse -> Int
$sel:pipelineExecutionSteps:ListPipelineExecutionStepsResponse' :: ListPipelineExecutionStepsResponse -> Maybe [PipelineExecutionStep]
$sel:nextToken:ListPipelineExecutionStepsResponse' :: ListPipelineExecutionStepsResponse -> Maybe Text
..} =
    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 Maybe [PipelineExecutionStep]
pipelineExecutionSteps
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Int
httpStatus