{-# 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.ListPipelines
-- 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 summary of all of the pipelines associated with your account.
--
-- This operation returns paginated results.
module Amazonka.CodePipeline.ListPipelines
  ( -- * Creating a Request
    ListPipelines (..),
    newListPipelines,

    -- * Request Lenses
    listPipelines_nextToken,
    listPipelines_maxResults,

    -- * Destructuring the Response
    ListPipelinesResponse (..),
    newListPipelinesResponse,

    -- * Response Lenses
    listPipelinesResponse_pipelines,
    listPipelinesResponse_nextToken,
    listPipelinesResponse_httpStatus,
  )
where

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

-- | Represents the input of a @ListPipelines@ action.
--
-- /See:/ 'newListPipelines' smart constructor.
data ListPipelines = ListPipelines'
  { -- | An identifier that was returned from the previous list pipelines call.
    -- It can be used to return the next set of pipelines in the list.
    ListPipelines -> Maybe Text
nextToken :: Prelude.Maybe Prelude.Text,
    -- | The maximum number of pipelines to return in a single call. To retrieve
    -- the remaining pipelines, make another call with the returned nextToken
    -- value. The minimum value you can specify is 1. The maximum accepted
    -- value is 1000.
    ListPipelines -> Maybe Natural
maxResults :: Prelude.Maybe Prelude.Natural
  }
  deriving (ListPipelines -> ListPipelines -> Bool
(ListPipelines -> ListPipelines -> Bool)
-> (ListPipelines -> ListPipelines -> Bool) -> Eq ListPipelines
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ListPipelines -> ListPipelines -> Bool
$c/= :: ListPipelines -> ListPipelines -> Bool
== :: ListPipelines -> ListPipelines -> Bool
$c== :: ListPipelines -> ListPipelines -> Bool
Prelude.Eq, ReadPrec [ListPipelines]
ReadPrec ListPipelines
Int -> ReadS ListPipelines
ReadS [ListPipelines]
(Int -> ReadS ListPipelines)
-> ReadS [ListPipelines]
-> ReadPrec ListPipelines
-> ReadPrec [ListPipelines]
-> Read ListPipelines
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ListPipelines]
$creadListPrec :: ReadPrec [ListPipelines]
readPrec :: ReadPrec ListPipelines
$creadPrec :: ReadPrec ListPipelines
readList :: ReadS [ListPipelines]
$creadList :: ReadS [ListPipelines]
readsPrec :: Int -> ReadS ListPipelines
$creadsPrec :: Int -> ReadS ListPipelines
Prelude.Read, Int -> ListPipelines -> ShowS
[ListPipelines] -> ShowS
ListPipelines -> String
(Int -> ListPipelines -> ShowS)
-> (ListPipelines -> String)
-> ([ListPipelines] -> ShowS)
-> Show ListPipelines
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ListPipelines] -> ShowS
$cshowList :: [ListPipelines] -> ShowS
show :: ListPipelines -> String
$cshow :: ListPipelines -> String
showsPrec :: Int -> ListPipelines -> ShowS
$cshowsPrec :: Int -> ListPipelines -> ShowS
Prelude.Show, (forall x. ListPipelines -> Rep ListPipelines x)
-> (forall x. Rep ListPipelines x -> ListPipelines)
-> Generic ListPipelines
forall x. Rep ListPipelines x -> ListPipelines
forall x. ListPipelines -> Rep ListPipelines x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep ListPipelines x -> ListPipelines
$cfrom :: forall x. ListPipelines -> Rep ListPipelines x
Prelude.Generic)

-- |
-- Create a value of 'ListPipelines' 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', 'listPipelines_nextToken' - An identifier that was returned from the previous list pipelines call.
-- It can be used to return the next set of pipelines in the list.
--
-- 'maxResults', 'listPipelines_maxResults' - The maximum number of pipelines to return in a single call. To retrieve
-- the remaining pipelines, make another call with the returned nextToken
-- value. The minimum value you can specify is 1. The maximum accepted
-- value is 1000.
newListPipelines ::
  ListPipelines
newListPipelines :: ListPipelines
newListPipelines =
  ListPipelines' :: Maybe Text -> Maybe Natural -> ListPipelines
ListPipelines'
    { $sel:nextToken:ListPipelines' :: Maybe Text
nextToken = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:maxResults:ListPipelines' :: Maybe Natural
maxResults = Maybe Natural
forall a. Maybe a
Prelude.Nothing
    }

-- | An identifier that was returned from the previous list pipelines call.
-- It can be used to return the next set of pipelines in the list.
listPipelines_nextToken :: Lens.Lens' ListPipelines (Prelude.Maybe Prelude.Text)
listPipelines_nextToken :: (Maybe Text -> f (Maybe Text)) -> ListPipelines -> f ListPipelines
listPipelines_nextToken = (ListPipelines -> Maybe Text)
-> (ListPipelines -> Maybe Text -> ListPipelines)
-> Lens ListPipelines ListPipelines (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListPipelines' {Maybe Text
nextToken :: Maybe Text
$sel:nextToken:ListPipelines' :: ListPipelines -> Maybe Text
nextToken} -> Maybe Text
nextToken) (\s :: ListPipelines
s@ListPipelines' {} Maybe Text
a -> ListPipelines
s {$sel:nextToken:ListPipelines' :: Maybe Text
nextToken = Maybe Text
a} :: ListPipelines)

-- | The maximum number of pipelines to return in a single call. To retrieve
-- the remaining pipelines, make another call with the returned nextToken
-- value. The minimum value you can specify is 1. The maximum accepted
-- value is 1000.
listPipelines_maxResults :: Lens.Lens' ListPipelines (Prelude.Maybe Prelude.Natural)
listPipelines_maxResults :: (Maybe Natural -> f (Maybe Natural))
-> ListPipelines -> f ListPipelines
listPipelines_maxResults = (ListPipelines -> Maybe Natural)
-> (ListPipelines -> Maybe Natural -> ListPipelines)
-> Lens ListPipelines ListPipelines (Maybe Natural) (Maybe Natural)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListPipelines' {Maybe Natural
maxResults :: Maybe Natural
$sel:maxResults:ListPipelines' :: ListPipelines -> Maybe Natural
maxResults} -> Maybe Natural
maxResults) (\s :: ListPipelines
s@ListPipelines' {} Maybe Natural
a -> ListPipelines
s {$sel:maxResults:ListPipelines' :: Maybe Natural
maxResults = Maybe Natural
a} :: ListPipelines)

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

instance Prelude.NFData ListPipelines

instance Core.ToHeaders ListPipelines where
  toHeaders :: ListPipelines -> ResponseHeaders
toHeaders =
    ResponseHeaders -> ListPipelines -> 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
"CodePipeline_20150709.ListPipelines" ::
                          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 ListPipelines where
  toJSON :: ListPipelines -> Value
toJSON ListPipelines' {Maybe Natural
Maybe Text
maxResults :: Maybe Natural
nextToken :: Maybe Text
$sel:maxResults:ListPipelines' :: ListPipelines -> Maybe Natural
$sel:nextToken:ListPipelines' :: ListPipelines -> 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
          ]
      )

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

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

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

-- |
-- Create a value of 'ListPipelinesResponse' 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:
--
-- 'pipelines', 'listPipelinesResponse_pipelines' - The list of pipelines.
--
-- 'nextToken', 'listPipelinesResponse_nextToken' - If the amount of returned information is significantly large, an
-- identifier is also returned. It can be used in a subsequent list
-- pipelines call to return the next set of pipelines in the list.
--
-- 'httpStatus', 'listPipelinesResponse_httpStatus' - The response's http status code.
newListPipelinesResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  ListPipelinesResponse
newListPipelinesResponse :: Int -> ListPipelinesResponse
newListPipelinesResponse Int
pHttpStatus_ =
  ListPipelinesResponse' :: Maybe [PipelineSummary]
-> Maybe Text -> Int -> ListPipelinesResponse
ListPipelinesResponse'
    { $sel:pipelines:ListPipelinesResponse' :: Maybe [PipelineSummary]
pipelines = Maybe [PipelineSummary]
forall a. Maybe a
Prelude.Nothing,
      $sel:nextToken:ListPipelinesResponse' :: Maybe Text
nextToken = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:httpStatus:ListPipelinesResponse' :: Int
httpStatus = Int
pHttpStatus_
    }

-- | The list of pipelines.
listPipelinesResponse_pipelines :: Lens.Lens' ListPipelinesResponse (Prelude.Maybe [PipelineSummary])
listPipelinesResponse_pipelines :: (Maybe [PipelineSummary] -> f (Maybe [PipelineSummary]))
-> ListPipelinesResponse -> f ListPipelinesResponse
listPipelinesResponse_pipelines = (ListPipelinesResponse -> Maybe [PipelineSummary])
-> (ListPipelinesResponse
    -> Maybe [PipelineSummary] -> ListPipelinesResponse)
-> Lens' ListPipelinesResponse (Maybe [PipelineSummary])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListPipelinesResponse' {Maybe [PipelineSummary]
pipelines :: Maybe [PipelineSummary]
$sel:pipelines:ListPipelinesResponse' :: ListPipelinesResponse -> Maybe [PipelineSummary]
pipelines} -> Maybe [PipelineSummary]
pipelines) (\s :: ListPipelinesResponse
s@ListPipelinesResponse' {} Maybe [PipelineSummary]
a -> ListPipelinesResponse
s {$sel:pipelines:ListPipelinesResponse' :: Maybe [PipelineSummary]
pipelines = Maybe [PipelineSummary]
a} :: ListPipelinesResponse) ((Maybe [PipelineSummary] -> f (Maybe [PipelineSummary]))
 -> ListPipelinesResponse -> f ListPipelinesResponse)
-> ((Maybe [PipelineSummary] -> f (Maybe [PipelineSummary]))
    -> Maybe [PipelineSummary] -> f (Maybe [PipelineSummary]))
-> (Maybe [PipelineSummary] -> f (Maybe [PipelineSummary]))
-> ListPipelinesResponse
-> f ListPipelinesResponse
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso
  [PipelineSummary]
  [PipelineSummary]
  [PipelineSummary]
  [PipelineSummary]
-> Iso
     (Maybe [PipelineSummary])
     (Maybe [PipelineSummary])
     (Maybe [PipelineSummary])
     (Maybe [PipelineSummary])
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
  [PipelineSummary]
  [PipelineSummary]
  [PipelineSummary]
  [PipelineSummary]
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. It can be used in a subsequent list
-- pipelines call to return the next set of pipelines in the list.
listPipelinesResponse_nextToken :: Lens.Lens' ListPipelinesResponse (Prelude.Maybe Prelude.Text)
listPipelinesResponse_nextToken :: (Maybe Text -> f (Maybe Text))
-> ListPipelinesResponse -> f ListPipelinesResponse
listPipelinesResponse_nextToken = (ListPipelinesResponse -> Maybe Text)
-> (ListPipelinesResponse -> Maybe Text -> ListPipelinesResponse)
-> Lens' ListPipelinesResponse (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListPipelinesResponse' {Maybe Text
nextToken :: Maybe Text
$sel:nextToken:ListPipelinesResponse' :: ListPipelinesResponse -> Maybe Text
nextToken} -> Maybe Text
nextToken) (\s :: ListPipelinesResponse
s@ListPipelinesResponse' {} Maybe Text
a -> ListPipelinesResponse
s {$sel:nextToken:ListPipelinesResponse' :: Maybe Text
nextToken = Maybe Text
a} :: ListPipelinesResponse)

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

instance Prelude.NFData ListPipelinesResponse