{-# 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.CodeCommit.ListBranches
-- 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 information about one or more branches in a repository.
--
-- This operation returns paginated results.
module Amazonka.CodeCommit.ListBranches
  ( -- * Creating a Request
    ListBranches (..),
    newListBranches,

    -- * Request Lenses
    listBranches_nextToken,
    listBranches_repositoryName,

    -- * Destructuring the Response
    ListBranchesResponse (..),
    newListBranchesResponse,

    -- * Response Lenses
    listBranchesResponse_branches,
    listBranchesResponse_nextToken,
    listBranchesResponse_httpStatus,
  )
where

import Amazonka.CodeCommit.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 list branches operation.
--
-- /See:/ 'newListBranches' smart constructor.
data ListBranches = ListBranches'
  { -- | An enumeration token that allows the operation to batch the results.
    ListBranches -> Maybe Text
nextToken :: Prelude.Maybe Prelude.Text,
    -- | The name of the repository that contains the branches.
    ListBranches -> Text
repositoryName :: Prelude.Text
  }
  deriving (ListBranches -> ListBranches -> Bool
(ListBranches -> ListBranches -> Bool)
-> (ListBranches -> ListBranches -> Bool) -> Eq ListBranches
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ListBranches -> ListBranches -> Bool
$c/= :: ListBranches -> ListBranches -> Bool
== :: ListBranches -> ListBranches -> Bool
$c== :: ListBranches -> ListBranches -> Bool
Prelude.Eq, ReadPrec [ListBranches]
ReadPrec ListBranches
Int -> ReadS ListBranches
ReadS [ListBranches]
(Int -> ReadS ListBranches)
-> ReadS [ListBranches]
-> ReadPrec ListBranches
-> ReadPrec [ListBranches]
-> Read ListBranches
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ListBranches]
$creadListPrec :: ReadPrec [ListBranches]
readPrec :: ReadPrec ListBranches
$creadPrec :: ReadPrec ListBranches
readList :: ReadS [ListBranches]
$creadList :: ReadS [ListBranches]
readsPrec :: Int -> ReadS ListBranches
$creadsPrec :: Int -> ReadS ListBranches
Prelude.Read, Int -> ListBranches -> ShowS
[ListBranches] -> ShowS
ListBranches -> String
(Int -> ListBranches -> ShowS)
-> (ListBranches -> String)
-> ([ListBranches] -> ShowS)
-> Show ListBranches
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ListBranches] -> ShowS
$cshowList :: [ListBranches] -> ShowS
show :: ListBranches -> String
$cshow :: ListBranches -> String
showsPrec :: Int -> ListBranches -> ShowS
$cshowsPrec :: Int -> ListBranches -> ShowS
Prelude.Show, (forall x. ListBranches -> Rep ListBranches x)
-> (forall x. Rep ListBranches x -> ListBranches)
-> Generic ListBranches
forall x. Rep ListBranches x -> ListBranches
forall x. ListBranches -> Rep ListBranches x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep ListBranches x -> ListBranches
$cfrom :: forall x. ListBranches -> Rep ListBranches x
Prelude.Generic)

-- |
-- Create a value of 'ListBranches' 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', 'listBranches_nextToken' - An enumeration token that allows the operation to batch the results.
--
-- 'repositoryName', 'listBranches_repositoryName' - The name of the repository that contains the branches.
newListBranches ::
  -- | 'repositoryName'
  Prelude.Text ->
  ListBranches
newListBranches :: Text -> ListBranches
newListBranches Text
pRepositoryName_ =
  ListBranches' :: Maybe Text -> Text -> ListBranches
ListBranches'
    { $sel:nextToken:ListBranches' :: Maybe Text
nextToken = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:repositoryName:ListBranches' :: Text
repositoryName = Text
pRepositoryName_
    }

-- | An enumeration token that allows the operation to batch the results.
listBranches_nextToken :: Lens.Lens' ListBranches (Prelude.Maybe Prelude.Text)
listBranches_nextToken :: (Maybe Text -> f (Maybe Text)) -> ListBranches -> f ListBranches
listBranches_nextToken = (ListBranches -> Maybe Text)
-> (ListBranches -> Maybe Text -> ListBranches)
-> Lens ListBranches ListBranches (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListBranches' {Maybe Text
nextToken :: Maybe Text
$sel:nextToken:ListBranches' :: ListBranches -> Maybe Text
nextToken} -> Maybe Text
nextToken) (\s :: ListBranches
s@ListBranches' {} Maybe Text
a -> ListBranches
s {$sel:nextToken:ListBranches' :: Maybe Text
nextToken = Maybe Text
a} :: ListBranches)

-- | The name of the repository that contains the branches.
listBranches_repositoryName :: Lens.Lens' ListBranches Prelude.Text
listBranches_repositoryName :: (Text -> f Text) -> ListBranches -> f ListBranches
listBranches_repositoryName = (ListBranches -> Text)
-> (ListBranches -> Text -> ListBranches)
-> Lens ListBranches ListBranches Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListBranches' {Text
repositoryName :: Text
$sel:repositoryName:ListBranches' :: ListBranches -> Text
repositoryName} -> Text
repositoryName) (\s :: ListBranches
s@ListBranches' {} Text
a -> ListBranches
s {$sel:repositoryName:ListBranches' :: Text
repositoryName = Text
a} :: ListBranches)

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

instance Prelude.NFData ListBranches

instance Core.ToHeaders ListBranches where
  toHeaders :: ListBranches -> ResponseHeaders
toHeaders =
    ResponseHeaders -> ListBranches -> 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
"CodeCommit_20150413.ListBranches" ::
                          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 ListBranches where
  toJSON :: ListBranches -> Value
toJSON ListBranches' {Maybe Text
Text
repositoryName :: Text
nextToken :: Maybe Text
$sel:repositoryName:ListBranches' :: ListBranches -> Text
$sel:nextToken:ListBranches' :: ListBranches -> 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,
            Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just
              (Text
"repositoryName" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Text
repositoryName)
          ]
      )

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

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

-- | Represents the output of a list branches operation.
--
-- /See:/ 'newListBranchesResponse' smart constructor.
data ListBranchesResponse = ListBranchesResponse'
  { -- | The list of branch names.
    ListBranchesResponse -> Maybe [Text]
branches :: Prelude.Maybe [Prelude.Text],
    -- | An enumeration token that returns the batch of the results.
    ListBranchesResponse -> Maybe Text
nextToken :: Prelude.Maybe Prelude.Text,
    -- | The response's http status code.
    ListBranchesResponse -> Int
httpStatus :: Prelude.Int
  }
  deriving (ListBranchesResponse -> ListBranchesResponse -> Bool
(ListBranchesResponse -> ListBranchesResponse -> Bool)
-> (ListBranchesResponse -> ListBranchesResponse -> Bool)
-> Eq ListBranchesResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ListBranchesResponse -> ListBranchesResponse -> Bool
$c/= :: ListBranchesResponse -> ListBranchesResponse -> Bool
== :: ListBranchesResponse -> ListBranchesResponse -> Bool
$c== :: ListBranchesResponse -> ListBranchesResponse -> Bool
Prelude.Eq, ReadPrec [ListBranchesResponse]
ReadPrec ListBranchesResponse
Int -> ReadS ListBranchesResponse
ReadS [ListBranchesResponse]
(Int -> ReadS ListBranchesResponse)
-> ReadS [ListBranchesResponse]
-> ReadPrec ListBranchesResponse
-> ReadPrec [ListBranchesResponse]
-> Read ListBranchesResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ListBranchesResponse]
$creadListPrec :: ReadPrec [ListBranchesResponse]
readPrec :: ReadPrec ListBranchesResponse
$creadPrec :: ReadPrec ListBranchesResponse
readList :: ReadS [ListBranchesResponse]
$creadList :: ReadS [ListBranchesResponse]
readsPrec :: Int -> ReadS ListBranchesResponse
$creadsPrec :: Int -> ReadS ListBranchesResponse
Prelude.Read, Int -> ListBranchesResponse -> ShowS
[ListBranchesResponse] -> ShowS
ListBranchesResponse -> String
(Int -> ListBranchesResponse -> ShowS)
-> (ListBranchesResponse -> String)
-> ([ListBranchesResponse] -> ShowS)
-> Show ListBranchesResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ListBranchesResponse] -> ShowS
$cshowList :: [ListBranchesResponse] -> ShowS
show :: ListBranchesResponse -> String
$cshow :: ListBranchesResponse -> String
showsPrec :: Int -> ListBranchesResponse -> ShowS
$cshowsPrec :: Int -> ListBranchesResponse -> ShowS
Prelude.Show, (forall x. ListBranchesResponse -> Rep ListBranchesResponse x)
-> (forall x. Rep ListBranchesResponse x -> ListBranchesResponse)
-> Generic ListBranchesResponse
forall x. Rep ListBranchesResponse x -> ListBranchesResponse
forall x. ListBranchesResponse -> Rep ListBranchesResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep ListBranchesResponse x -> ListBranchesResponse
$cfrom :: forall x. ListBranchesResponse -> Rep ListBranchesResponse x
Prelude.Generic)

-- |
-- Create a value of 'ListBranchesResponse' 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:
--
-- 'branches', 'listBranchesResponse_branches' - The list of branch names.
--
-- 'nextToken', 'listBranchesResponse_nextToken' - An enumeration token that returns the batch of the results.
--
-- 'httpStatus', 'listBranchesResponse_httpStatus' - The response's http status code.
newListBranchesResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  ListBranchesResponse
newListBranchesResponse :: Int -> ListBranchesResponse
newListBranchesResponse Int
pHttpStatus_ =
  ListBranchesResponse' :: Maybe [Text] -> Maybe Text -> Int -> ListBranchesResponse
ListBranchesResponse'
    { $sel:branches:ListBranchesResponse' :: Maybe [Text]
branches = Maybe [Text]
forall a. Maybe a
Prelude.Nothing,
      $sel:nextToken:ListBranchesResponse' :: Maybe Text
nextToken = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:httpStatus:ListBranchesResponse' :: Int
httpStatus = Int
pHttpStatus_
    }

-- | The list of branch names.
listBranchesResponse_branches :: Lens.Lens' ListBranchesResponse (Prelude.Maybe [Prelude.Text])
listBranchesResponse_branches :: (Maybe [Text] -> f (Maybe [Text]))
-> ListBranchesResponse -> f ListBranchesResponse
listBranchesResponse_branches = (ListBranchesResponse -> Maybe [Text])
-> (ListBranchesResponse -> Maybe [Text] -> ListBranchesResponse)
-> Lens' ListBranchesResponse (Maybe [Text])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListBranchesResponse' {Maybe [Text]
branches :: Maybe [Text]
$sel:branches:ListBranchesResponse' :: ListBranchesResponse -> Maybe [Text]
branches} -> Maybe [Text]
branches) (\s :: ListBranchesResponse
s@ListBranchesResponse' {} Maybe [Text]
a -> ListBranchesResponse
s {$sel:branches:ListBranchesResponse' :: Maybe [Text]
branches = Maybe [Text]
a} :: ListBranchesResponse) ((Maybe [Text] -> f (Maybe [Text]))
 -> ListBranchesResponse -> f ListBranchesResponse)
-> ((Maybe [Text] -> f (Maybe [Text]))
    -> Maybe [Text] -> f (Maybe [Text]))
-> (Maybe [Text] -> f (Maybe [Text]))
-> ListBranchesResponse
-> f ListBranchesResponse
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso [Text] [Text] [Text] [Text]
-> Iso (Maybe [Text]) (Maybe [Text]) (Maybe [Text]) (Maybe [Text])
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 [Text] [Text] [Text] [Text]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | An enumeration token that returns the batch of the results.
listBranchesResponse_nextToken :: Lens.Lens' ListBranchesResponse (Prelude.Maybe Prelude.Text)
listBranchesResponse_nextToken :: (Maybe Text -> f (Maybe Text))
-> ListBranchesResponse -> f ListBranchesResponse
listBranchesResponse_nextToken = (ListBranchesResponse -> Maybe Text)
-> (ListBranchesResponse -> Maybe Text -> ListBranchesResponse)
-> Lens' ListBranchesResponse (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListBranchesResponse' {Maybe Text
nextToken :: Maybe Text
$sel:nextToken:ListBranchesResponse' :: ListBranchesResponse -> Maybe Text
nextToken} -> Maybe Text
nextToken) (\s :: ListBranchesResponse
s@ListBranchesResponse' {} Maybe Text
a -> ListBranchesResponse
s {$sel:nextToken:ListBranchesResponse' :: Maybe Text
nextToken = Maybe Text
a} :: ListBranchesResponse)

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

instance Prelude.NFData ListBranchesResponse