{-# 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.ListPipelineParametersForExecution
-- Copyright   : (c) 2013-2021 Brendan Hay
-- License     : Mozilla Public License, v. 2.0.
-- Maintainer  : Brendan Hay <brendan.g.hay+amazonka@gmail.com>
-- Stability   : auto-generated
-- Portability : non-portable (GHC extensions)
--
-- Gets a list of parameters for a pipeline execution.
--
-- This operation returns paginated results.
module Amazonka.SageMaker.ListPipelineParametersForExecution
  ( -- * Creating a Request
    ListPipelineParametersForExecution (..),
    newListPipelineParametersForExecution,

    -- * Request Lenses
    listPipelineParametersForExecution_nextToken,
    listPipelineParametersForExecution_maxResults,
    listPipelineParametersForExecution_pipelineExecutionArn,

    -- * Destructuring the Response
    ListPipelineParametersForExecutionResponse (..),
    newListPipelineParametersForExecutionResponse,

    -- * Response Lenses
    listPipelineParametersForExecutionResponse_pipelineParameters,
    listPipelineParametersForExecutionResponse_nextToken,
    listPipelineParametersForExecutionResponse_httpStatus,
  )
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.SageMaker.Types

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

-- |
-- Create a value of 'ListPipelineParametersForExecution' 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', 'listPipelineParametersForExecution_nextToken' - If the result of the previous @ListPipelineParametersForExecution@
-- request was truncated, the response includes a @NextToken@. To retrieve
-- the next set of parameters, use the token in the next request.
--
-- 'maxResults', 'listPipelineParametersForExecution_maxResults' - The maximum number of parameters to return in the response.
--
-- 'pipelineExecutionArn', 'listPipelineParametersForExecution_pipelineExecutionArn' - The Amazon Resource Name (ARN) of the pipeline execution.
newListPipelineParametersForExecution ::
  -- | 'pipelineExecutionArn'
  Prelude.Text ->
  ListPipelineParametersForExecution
newListPipelineParametersForExecution :: Text -> ListPipelineParametersForExecution
newListPipelineParametersForExecution
  Text
pPipelineExecutionArn_ =
    ListPipelineParametersForExecution' :: Maybe Text
-> Maybe Natural -> Text -> ListPipelineParametersForExecution
ListPipelineParametersForExecution'
      { $sel:nextToken:ListPipelineParametersForExecution' :: Maybe Text
nextToken =
          Maybe Text
forall a. Maybe a
Prelude.Nothing,
        $sel:maxResults:ListPipelineParametersForExecution' :: Maybe Natural
maxResults = Maybe Natural
forall a. Maybe a
Prelude.Nothing,
        $sel:pipelineExecutionArn:ListPipelineParametersForExecution' :: Text
pipelineExecutionArn =
          Text
pPipelineExecutionArn_
      }

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

-- | The maximum number of parameters to return in the response.
listPipelineParametersForExecution_maxResults :: Lens.Lens' ListPipelineParametersForExecution (Prelude.Maybe Prelude.Natural)
listPipelineParametersForExecution_maxResults :: (Maybe Natural -> f (Maybe Natural))
-> ListPipelineParametersForExecution
-> f ListPipelineParametersForExecution
listPipelineParametersForExecution_maxResults = (ListPipelineParametersForExecution -> Maybe Natural)
-> (ListPipelineParametersForExecution
    -> Maybe Natural -> ListPipelineParametersForExecution)
-> Lens
     ListPipelineParametersForExecution
     ListPipelineParametersForExecution
     (Maybe Natural)
     (Maybe Natural)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListPipelineParametersForExecution' {Maybe Natural
maxResults :: Maybe Natural
$sel:maxResults:ListPipelineParametersForExecution' :: ListPipelineParametersForExecution -> Maybe Natural
maxResults} -> Maybe Natural
maxResults) (\s :: ListPipelineParametersForExecution
s@ListPipelineParametersForExecution' {} Maybe Natural
a -> ListPipelineParametersForExecution
s {$sel:maxResults:ListPipelineParametersForExecution' :: Maybe Natural
maxResults = Maybe Natural
a} :: ListPipelineParametersForExecution)

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

instance
  Core.AWSPager
    ListPipelineParametersForExecution
  where
  page :: ListPipelineParametersForExecution
-> AWSResponse ListPipelineParametersForExecution
-> Maybe ListPipelineParametersForExecution
page ListPipelineParametersForExecution
rq AWSResponse ListPipelineParametersForExecution
rs
    | Maybe Text -> Bool
forall a. AWSTruncated a => a -> Bool
Core.stop
        ( AWSResponse ListPipelineParametersForExecution
ListPipelineParametersForExecutionResponse
rs
            ListPipelineParametersForExecutionResponse
-> Getting
     (First Text) ListPipelineParametersForExecutionResponse Text
-> Maybe Text
forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^? (Maybe Text -> Const (First Text) (Maybe Text))
-> ListPipelineParametersForExecutionResponse
-> Const (First Text) ListPipelineParametersForExecutionResponse
Lens' ListPipelineParametersForExecutionResponse (Maybe Text)
listPipelineParametersForExecutionResponse_nextToken
              ((Maybe Text -> Const (First Text) (Maybe Text))
 -> ListPipelineParametersForExecutionResponse
 -> Const (First Text) ListPipelineParametersForExecutionResponse)
-> ((Text -> Const (First Text) Text)
    -> Maybe Text -> Const (First Text) (Maybe Text))
-> Getting
     (First Text) ListPipelineParametersForExecutionResponse 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 ListPipelineParametersForExecution
forall a. Maybe a
Prelude.Nothing
    | Maybe [Parameter] -> Bool
forall a. AWSTruncated a => a -> Bool
Core.stop
        ( AWSResponse ListPipelineParametersForExecution
ListPipelineParametersForExecutionResponse
rs
            ListPipelineParametersForExecutionResponse
-> Getting
     (First [Parameter])
     ListPipelineParametersForExecutionResponse
     [Parameter]
-> Maybe [Parameter]
forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^? (Maybe [Parameter]
 -> Const (First [Parameter]) (Maybe [Parameter]))
-> ListPipelineParametersForExecutionResponse
-> Const
     (First [Parameter]) ListPipelineParametersForExecutionResponse
Lens'
  ListPipelineParametersForExecutionResponse (Maybe [Parameter])
listPipelineParametersForExecutionResponse_pipelineParameters
              ((Maybe [Parameter]
  -> Const (First [Parameter]) (Maybe [Parameter]))
 -> ListPipelineParametersForExecutionResponse
 -> Const
      (First [Parameter]) ListPipelineParametersForExecutionResponse)
-> (([Parameter] -> Const (First [Parameter]) [Parameter])
    -> Maybe [Parameter]
    -> Const (First [Parameter]) (Maybe [Parameter]))
-> Getting
     (First [Parameter])
     ListPipelineParametersForExecutionResponse
     [Parameter]
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. ([Parameter] -> Const (First [Parameter]) [Parameter])
-> Maybe [Parameter]
-> Const (First [Parameter]) (Maybe [Parameter])
forall a b. Prism (Maybe a) (Maybe b) a b
Lens._Just
        ) =
      Maybe ListPipelineParametersForExecution
forall a. Maybe a
Prelude.Nothing
    | Bool
Prelude.otherwise =
      ListPipelineParametersForExecution
-> Maybe ListPipelineParametersForExecution
forall a. a -> Maybe a
Prelude.Just (ListPipelineParametersForExecution
 -> Maybe ListPipelineParametersForExecution)
-> ListPipelineParametersForExecution
-> Maybe ListPipelineParametersForExecution
forall a b. (a -> b) -> a -> b
Prelude.$
        ListPipelineParametersForExecution
rq
          ListPipelineParametersForExecution
-> (ListPipelineParametersForExecution
    -> ListPipelineParametersForExecution)
-> ListPipelineParametersForExecution
forall a b. a -> (a -> b) -> b
Prelude.& (Maybe Text -> Identity (Maybe Text))
-> ListPipelineParametersForExecution
-> Identity ListPipelineParametersForExecution
Lens
  ListPipelineParametersForExecution
  ListPipelineParametersForExecution
  (Maybe Text)
  (Maybe Text)
listPipelineParametersForExecution_nextToken
          ((Maybe Text -> Identity (Maybe Text))
 -> ListPipelineParametersForExecution
 -> Identity ListPipelineParametersForExecution)
-> Maybe Text
-> ListPipelineParametersForExecution
-> ListPipelineParametersForExecution
forall s t a b. ASetter s t a b -> b -> s -> t
Lens..~ AWSResponse ListPipelineParametersForExecution
ListPipelineParametersForExecutionResponse
rs
          ListPipelineParametersForExecutionResponse
-> Getting
     (First Text) ListPipelineParametersForExecutionResponse Text
-> Maybe Text
forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^? (Maybe Text -> Const (First Text) (Maybe Text))
-> ListPipelineParametersForExecutionResponse
-> Const (First Text) ListPipelineParametersForExecutionResponse
Lens' ListPipelineParametersForExecutionResponse (Maybe Text)
listPipelineParametersForExecutionResponse_nextToken
            ((Maybe Text -> Const (First Text) (Maybe Text))
 -> ListPipelineParametersForExecutionResponse
 -> Const (First Text) ListPipelineParametersForExecutionResponse)
-> ((Text -> Const (First Text) Text)
    -> Maybe Text -> Const (First Text) (Maybe Text))
-> Getting
     (First Text) ListPipelineParametersForExecutionResponse 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
    ListPipelineParametersForExecution
  where
  type
    AWSResponse ListPipelineParametersForExecution =
      ListPipelineParametersForExecutionResponse
  request :: ListPipelineParametersForExecution
-> Request ListPipelineParametersForExecution
request = Service
-> ListPipelineParametersForExecution
-> Request ListPipelineParametersForExecution
forall a. (ToRequest a, ToJSON a) => Service -> a -> Request a
Request.postJSON Service
defaultService
  response :: Logger
-> Service
-> Proxy ListPipelineParametersForExecution
-> ClientResponse ClientBody
-> m (Either
        Error
        (ClientResponse (AWSResponse ListPipelineParametersForExecution)))
response =
    (Int
 -> ResponseHeaders
 -> Object
 -> Either String (AWSResponse ListPipelineParametersForExecution))
-> Logger
-> Service
-> Proxy ListPipelineParametersForExecution
-> ClientResponse ClientBody
-> m (Either
        Error
        (ClientResponse (AWSResponse ListPipelineParametersForExecution)))
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 [Parameter]
-> Maybe Text -> Int -> ListPipelineParametersForExecutionResponse
ListPipelineParametersForExecutionResponse'
            (Maybe [Parameter]
 -> Maybe Text -> Int -> ListPipelineParametersForExecutionResponse)
-> Either String (Maybe [Parameter])
-> Either
     String
     (Maybe Text -> Int -> ListPipelineParametersForExecutionResponse)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> ( Object
x Object -> Text -> Either String (Maybe (Maybe [Parameter]))
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"PipelineParameters"
                            Either String (Maybe (Maybe [Parameter]))
-> Maybe [Parameter] -> Either String (Maybe [Parameter])
forall (f :: * -> *) a. Functor f => f (Maybe a) -> a -> f a
Core..!@ Maybe [Parameter]
forall a. Monoid a => a
Prelude.mempty
                        )
              Either
  String
  (Maybe Text -> Int -> ListPipelineParametersForExecutionResponse)
-> Either String (Maybe Text)
-> Either
     String (Int -> ListPipelineParametersForExecutionResponse)
forall (f :: * -> *) a b. Applicative f => 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
"NextToken")
              Either String (Int -> ListPipelineParametersForExecutionResponse)
-> Either String Int
-> Either String ListPipelineParametersForExecutionResponse
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))
      )

instance
  Prelude.Hashable
    ListPipelineParametersForExecution

instance
  Prelude.NFData
    ListPipelineParametersForExecution

instance
  Core.ToHeaders
    ListPipelineParametersForExecution
  where
  toHeaders :: ListPipelineParametersForExecution -> ResponseHeaders
toHeaders =
    ResponseHeaders
-> ListPipelineParametersForExecution -> 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
"SageMaker.ListPipelineParametersForExecution" ::
                          Prelude.ByteString
                      ),
            HeaderName
"Content-Type"
              HeaderName -> ByteString -> ResponseHeaders
forall a. ToHeader a => HeaderName -> a -> ResponseHeaders
Core.=# ( ByteString
"application/x-amz-json-1.1" ::
                          Prelude.ByteString
                      )
          ]
      )

instance
  Core.ToJSON
    ListPipelineParametersForExecution
  where
  toJSON :: ListPipelineParametersForExecution -> Value
toJSON ListPipelineParametersForExecution' {Maybe Natural
Maybe Text
Text
pipelineExecutionArn :: Text
maxResults :: Maybe Natural
nextToken :: Maybe Text
$sel:pipelineExecutionArn:ListPipelineParametersForExecution' :: ListPipelineParametersForExecution -> Text
$sel:maxResults:ListPipelineParametersForExecution' :: ListPipelineParametersForExecution -> Maybe Natural
$sel:nextToken:ListPipelineParametersForExecution' :: ListPipelineParametersForExecution -> Maybe Text
..} =
    [Pair] -> Value
Core.object
      ( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
          [ (Text
"NextToken" 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
nextToken,
            (Text
"MaxResults" 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
maxResults,
            Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just
              ( Text
"PipelineExecutionArn"
                  Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Text
pipelineExecutionArn
              )
          ]
      )

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

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

-- | /See:/ 'newListPipelineParametersForExecutionResponse' smart constructor.
data ListPipelineParametersForExecutionResponse = ListPipelineParametersForExecutionResponse'
  { -- | Contains a list of pipeline parameters. This list can be empty.
    ListPipelineParametersForExecutionResponse -> Maybe [Parameter]
pipelineParameters :: Prelude.Maybe [Parameter],
    -- | If the result of the previous @ListPipelineParametersForExecution@
    -- request was truncated, the response includes a @NextToken@. To retrieve
    -- the next set of parameters, use the token in the next request.
    ListPipelineParametersForExecutionResponse -> Maybe Text
nextToken :: Prelude.Maybe Prelude.Text,
    -- | The response's http status code.
    ListPipelineParametersForExecutionResponse -> Int
httpStatus :: Prelude.Int
  }
  deriving (ListPipelineParametersForExecutionResponse
-> ListPipelineParametersForExecutionResponse -> Bool
(ListPipelineParametersForExecutionResponse
 -> ListPipelineParametersForExecutionResponse -> Bool)
-> (ListPipelineParametersForExecutionResponse
    -> ListPipelineParametersForExecutionResponse -> Bool)
-> Eq ListPipelineParametersForExecutionResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ListPipelineParametersForExecutionResponse
-> ListPipelineParametersForExecutionResponse -> Bool
$c/= :: ListPipelineParametersForExecutionResponse
-> ListPipelineParametersForExecutionResponse -> Bool
== :: ListPipelineParametersForExecutionResponse
-> ListPipelineParametersForExecutionResponse -> Bool
$c== :: ListPipelineParametersForExecutionResponse
-> ListPipelineParametersForExecutionResponse -> Bool
Prelude.Eq, ReadPrec [ListPipelineParametersForExecutionResponse]
ReadPrec ListPipelineParametersForExecutionResponse
Int -> ReadS ListPipelineParametersForExecutionResponse
ReadS [ListPipelineParametersForExecutionResponse]
(Int -> ReadS ListPipelineParametersForExecutionResponse)
-> ReadS [ListPipelineParametersForExecutionResponse]
-> ReadPrec ListPipelineParametersForExecutionResponse
-> ReadPrec [ListPipelineParametersForExecutionResponse]
-> Read ListPipelineParametersForExecutionResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ListPipelineParametersForExecutionResponse]
$creadListPrec :: ReadPrec [ListPipelineParametersForExecutionResponse]
readPrec :: ReadPrec ListPipelineParametersForExecutionResponse
$creadPrec :: ReadPrec ListPipelineParametersForExecutionResponse
readList :: ReadS [ListPipelineParametersForExecutionResponse]
$creadList :: ReadS [ListPipelineParametersForExecutionResponse]
readsPrec :: Int -> ReadS ListPipelineParametersForExecutionResponse
$creadsPrec :: Int -> ReadS ListPipelineParametersForExecutionResponse
Prelude.Read, Int -> ListPipelineParametersForExecutionResponse -> ShowS
[ListPipelineParametersForExecutionResponse] -> ShowS
ListPipelineParametersForExecutionResponse -> String
(Int -> ListPipelineParametersForExecutionResponse -> ShowS)
-> (ListPipelineParametersForExecutionResponse -> String)
-> ([ListPipelineParametersForExecutionResponse] -> ShowS)
-> Show ListPipelineParametersForExecutionResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ListPipelineParametersForExecutionResponse] -> ShowS
$cshowList :: [ListPipelineParametersForExecutionResponse] -> ShowS
show :: ListPipelineParametersForExecutionResponse -> String
$cshow :: ListPipelineParametersForExecutionResponse -> String
showsPrec :: Int -> ListPipelineParametersForExecutionResponse -> ShowS
$cshowsPrec :: Int -> ListPipelineParametersForExecutionResponse -> ShowS
Prelude.Show, (forall x.
 ListPipelineParametersForExecutionResponse
 -> Rep ListPipelineParametersForExecutionResponse x)
-> (forall x.
    Rep ListPipelineParametersForExecutionResponse x
    -> ListPipelineParametersForExecutionResponse)
-> Generic ListPipelineParametersForExecutionResponse
forall x.
Rep ListPipelineParametersForExecutionResponse x
-> ListPipelineParametersForExecutionResponse
forall x.
ListPipelineParametersForExecutionResponse
-> Rep ListPipelineParametersForExecutionResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep ListPipelineParametersForExecutionResponse x
-> ListPipelineParametersForExecutionResponse
$cfrom :: forall x.
ListPipelineParametersForExecutionResponse
-> Rep ListPipelineParametersForExecutionResponse x
Prelude.Generic)

-- |
-- Create a value of 'ListPipelineParametersForExecutionResponse' 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:
--
-- 'pipelineParameters', 'listPipelineParametersForExecutionResponse_pipelineParameters' - Contains a list of pipeline parameters. This list can be empty.
--
-- 'nextToken', 'listPipelineParametersForExecutionResponse_nextToken' - If the result of the previous @ListPipelineParametersForExecution@
-- request was truncated, the response includes a @NextToken@. To retrieve
-- the next set of parameters, use the token in the next request.
--
-- 'httpStatus', 'listPipelineParametersForExecutionResponse_httpStatus' - The response's http status code.
newListPipelineParametersForExecutionResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  ListPipelineParametersForExecutionResponse
newListPipelineParametersForExecutionResponse :: Int -> ListPipelineParametersForExecutionResponse
newListPipelineParametersForExecutionResponse
  Int
pHttpStatus_ =
    ListPipelineParametersForExecutionResponse' :: Maybe [Parameter]
-> Maybe Text -> Int -> ListPipelineParametersForExecutionResponse
ListPipelineParametersForExecutionResponse'
      { $sel:pipelineParameters:ListPipelineParametersForExecutionResponse' :: Maybe [Parameter]
pipelineParameters =
          Maybe [Parameter]
forall a. Maybe a
Prelude.Nothing,
        $sel:nextToken:ListPipelineParametersForExecutionResponse' :: Maybe Text
nextToken = Maybe Text
forall a. Maybe a
Prelude.Nothing,
        $sel:httpStatus:ListPipelineParametersForExecutionResponse' :: Int
httpStatus = Int
pHttpStatus_
      }

-- | Contains a list of pipeline parameters. This list can be empty.
listPipelineParametersForExecutionResponse_pipelineParameters :: Lens.Lens' ListPipelineParametersForExecutionResponse (Prelude.Maybe [Parameter])
listPipelineParametersForExecutionResponse_pipelineParameters :: (Maybe [Parameter] -> f (Maybe [Parameter]))
-> ListPipelineParametersForExecutionResponse
-> f ListPipelineParametersForExecutionResponse
listPipelineParametersForExecutionResponse_pipelineParameters = (ListPipelineParametersForExecutionResponse -> Maybe [Parameter])
-> (ListPipelineParametersForExecutionResponse
    -> Maybe [Parameter] -> ListPipelineParametersForExecutionResponse)
-> Lens'
     ListPipelineParametersForExecutionResponse (Maybe [Parameter])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListPipelineParametersForExecutionResponse' {Maybe [Parameter]
pipelineParameters :: Maybe [Parameter]
$sel:pipelineParameters:ListPipelineParametersForExecutionResponse' :: ListPipelineParametersForExecutionResponse -> Maybe [Parameter]
pipelineParameters} -> Maybe [Parameter]
pipelineParameters) (\s :: ListPipelineParametersForExecutionResponse
s@ListPipelineParametersForExecutionResponse' {} Maybe [Parameter]
a -> ListPipelineParametersForExecutionResponse
s {$sel:pipelineParameters:ListPipelineParametersForExecutionResponse' :: Maybe [Parameter]
pipelineParameters = Maybe [Parameter]
a} :: ListPipelineParametersForExecutionResponse) ((Maybe [Parameter] -> f (Maybe [Parameter]))
 -> ListPipelineParametersForExecutionResponse
 -> f ListPipelineParametersForExecutionResponse)
-> ((Maybe [Parameter] -> f (Maybe [Parameter]))
    -> Maybe [Parameter] -> f (Maybe [Parameter]))
-> (Maybe [Parameter] -> f (Maybe [Parameter]))
-> ListPipelineParametersForExecutionResponse
-> f ListPipelineParametersForExecutionResponse
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso [Parameter] [Parameter] [Parameter] [Parameter]
-> Iso
     (Maybe [Parameter])
     (Maybe [Parameter])
     (Maybe [Parameter])
     (Maybe [Parameter])
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 AnIso [Parameter] [Parameter] [Parameter] [Parameter]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

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

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

instance
  Prelude.NFData
    ListPipelineParametersForExecutionResponse