{-# 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.ElasticBeanstalk.ListPlatformBranches
-- Copyright   : (c) 2013-2023 Brendan Hay
-- License     : Mozilla Public License, v. 2.0.
-- Maintainer  : Brendan Hay
-- Stability   : auto-generated
-- Portability : non-portable (GHC extensions)
--
-- Lists the platform branches available for your account in an AWS Region.
-- Provides summary information about each platform branch.
--
-- For definitions of platform branch and other platform-related terms, see
-- <https://docs.aws.amazon.com/elasticbeanstalk/latest/dg/platforms-glossary.html AWS Elastic Beanstalk Platforms Glossary>.
module Amazonka.ElasticBeanstalk.ListPlatformBranches
  ( -- * Creating a Request
    ListPlatformBranches (..),
    newListPlatformBranches,

    -- * Request Lenses
    listPlatformBranches_filters,
    listPlatformBranches_maxRecords,
    listPlatformBranches_nextToken,

    -- * Destructuring the Response
    ListPlatformBranchesResponse (..),
    newListPlatformBranchesResponse,

    -- * Response Lenses
    listPlatformBranchesResponse_nextToken,
    listPlatformBranchesResponse_platformBranchSummaryList,
    listPlatformBranchesResponse_httpStatus,
  )
where

import qualified Amazonka.Core as Core
import qualified Amazonka.Core.Lens.Internal as Lens
import qualified Amazonka.Data as Data
import Amazonka.ElasticBeanstalk.Types
import qualified Amazonka.Prelude as Prelude
import qualified Amazonka.Request as Request
import qualified Amazonka.Response as Response

-- | /See:/ 'newListPlatformBranches' smart constructor.
data ListPlatformBranches = ListPlatformBranches'
  { -- | Criteria for restricting the resulting list of platform branches. The
    -- filter is evaluated as a logical conjunction (AND) of the separate
    -- @SearchFilter@ terms.
    --
    -- The following list shows valid attribute values for each of the
    -- @SearchFilter@ terms. Most operators take a single value. The @in@ and
    -- @not_in@ operators can take multiple values.
    --
    -- -   @Attribute = BranchName@:
    --
    --     -   @Operator@: @=@ | @!=@ | @begins_with@ | @ends_with@ |
    --         @contains@ | @in@ | @not_in@
    --
    -- -   @Attribute = LifecycleState@:
    --
    --     -   @Operator@: @=@ | @!=@ | @in@ | @not_in@
    --
    --     -   @Values@: @beta@ | @supported@ | @deprecated@ | @retired@
    --
    -- -   @Attribute = PlatformName@:
    --
    --     -   @Operator@: @=@ | @!=@ | @begins_with@ | @ends_with@ |
    --         @contains@ | @in@ | @not_in@
    --
    -- -   @Attribute = TierType@:
    --
    --     -   @Operator@: @=@ | @!=@
    --
    --     -   @Values@: @WebServer\/Standard@ | @Worker\/SQS\/HTTP@
    --
    -- Array size: limited to 10 @SearchFilter@ objects.
    --
    -- Within each @SearchFilter@ item, the @Values@ array is limited to 10
    -- items.
    ListPlatformBranches -> Maybe [SearchFilter]
filters :: Prelude.Maybe [SearchFilter],
    -- | The maximum number of platform branch values returned in one call.
    ListPlatformBranches -> Maybe Natural
maxRecords :: Prelude.Maybe Prelude.Natural,
    -- | For a paginated request. Specify a token from a previous response page
    -- to retrieve the next response page. All other parameter values must be
    -- identical to the ones specified in the initial request.
    --
    -- If no @NextToken@ is specified, the first page is retrieved.
    ListPlatformBranches -> Maybe Text
nextToken :: Prelude.Maybe Prelude.Text
  }
  deriving (ListPlatformBranches -> ListPlatformBranches -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ListPlatformBranches -> ListPlatformBranches -> Bool
$c/= :: ListPlatformBranches -> ListPlatformBranches -> Bool
== :: ListPlatformBranches -> ListPlatformBranches -> Bool
$c== :: ListPlatformBranches -> ListPlatformBranches -> Bool
Prelude.Eq, ReadPrec [ListPlatformBranches]
ReadPrec ListPlatformBranches
Int -> ReadS ListPlatformBranches
ReadS [ListPlatformBranches]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ListPlatformBranches]
$creadListPrec :: ReadPrec [ListPlatformBranches]
readPrec :: ReadPrec ListPlatformBranches
$creadPrec :: ReadPrec ListPlatformBranches
readList :: ReadS [ListPlatformBranches]
$creadList :: ReadS [ListPlatformBranches]
readsPrec :: Int -> ReadS ListPlatformBranches
$creadsPrec :: Int -> ReadS ListPlatformBranches
Prelude.Read, Int -> ListPlatformBranches -> ShowS
[ListPlatformBranches] -> ShowS
ListPlatformBranches -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ListPlatformBranches] -> ShowS
$cshowList :: [ListPlatformBranches] -> ShowS
show :: ListPlatformBranches -> String
$cshow :: ListPlatformBranches -> String
showsPrec :: Int -> ListPlatformBranches -> ShowS
$cshowsPrec :: Int -> ListPlatformBranches -> ShowS
Prelude.Show, forall x. Rep ListPlatformBranches x -> ListPlatformBranches
forall x. ListPlatformBranches -> Rep ListPlatformBranches x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep ListPlatformBranches x -> ListPlatformBranches
$cfrom :: forall x. ListPlatformBranches -> Rep ListPlatformBranches x
Prelude.Generic)

-- |
-- Create a value of 'ListPlatformBranches' 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:
--
-- 'filters', 'listPlatformBranches_filters' - Criteria for restricting the resulting list of platform branches. The
-- filter is evaluated as a logical conjunction (AND) of the separate
-- @SearchFilter@ terms.
--
-- The following list shows valid attribute values for each of the
-- @SearchFilter@ terms. Most operators take a single value. The @in@ and
-- @not_in@ operators can take multiple values.
--
-- -   @Attribute = BranchName@:
--
--     -   @Operator@: @=@ | @!=@ | @begins_with@ | @ends_with@ |
--         @contains@ | @in@ | @not_in@
--
-- -   @Attribute = LifecycleState@:
--
--     -   @Operator@: @=@ | @!=@ | @in@ | @not_in@
--
--     -   @Values@: @beta@ | @supported@ | @deprecated@ | @retired@
--
-- -   @Attribute = PlatformName@:
--
--     -   @Operator@: @=@ | @!=@ | @begins_with@ | @ends_with@ |
--         @contains@ | @in@ | @not_in@
--
-- -   @Attribute = TierType@:
--
--     -   @Operator@: @=@ | @!=@
--
--     -   @Values@: @WebServer\/Standard@ | @Worker\/SQS\/HTTP@
--
-- Array size: limited to 10 @SearchFilter@ objects.
--
-- Within each @SearchFilter@ item, the @Values@ array is limited to 10
-- items.
--
-- 'maxRecords', 'listPlatformBranches_maxRecords' - The maximum number of platform branch values returned in one call.
--
-- 'nextToken', 'listPlatformBranches_nextToken' - For a paginated request. Specify a token from a previous response page
-- to retrieve the next response page. All other parameter values must be
-- identical to the ones specified in the initial request.
--
-- If no @NextToken@ is specified, the first page is retrieved.
newListPlatformBranches ::
  ListPlatformBranches
newListPlatformBranches :: ListPlatformBranches
newListPlatformBranches =
  ListPlatformBranches'
    { $sel:filters:ListPlatformBranches' :: Maybe [SearchFilter]
filters = forall a. Maybe a
Prelude.Nothing,
      $sel:maxRecords:ListPlatformBranches' :: Maybe Natural
maxRecords = forall a. Maybe a
Prelude.Nothing,
      $sel:nextToken:ListPlatformBranches' :: Maybe Text
nextToken = forall a. Maybe a
Prelude.Nothing
    }

-- | Criteria for restricting the resulting list of platform branches. The
-- filter is evaluated as a logical conjunction (AND) of the separate
-- @SearchFilter@ terms.
--
-- The following list shows valid attribute values for each of the
-- @SearchFilter@ terms. Most operators take a single value. The @in@ and
-- @not_in@ operators can take multiple values.
--
-- -   @Attribute = BranchName@:
--
--     -   @Operator@: @=@ | @!=@ | @begins_with@ | @ends_with@ |
--         @contains@ | @in@ | @not_in@
--
-- -   @Attribute = LifecycleState@:
--
--     -   @Operator@: @=@ | @!=@ | @in@ | @not_in@
--
--     -   @Values@: @beta@ | @supported@ | @deprecated@ | @retired@
--
-- -   @Attribute = PlatformName@:
--
--     -   @Operator@: @=@ | @!=@ | @begins_with@ | @ends_with@ |
--         @contains@ | @in@ | @not_in@
--
-- -   @Attribute = TierType@:
--
--     -   @Operator@: @=@ | @!=@
--
--     -   @Values@: @WebServer\/Standard@ | @Worker\/SQS\/HTTP@
--
-- Array size: limited to 10 @SearchFilter@ objects.
--
-- Within each @SearchFilter@ item, the @Values@ array is limited to 10
-- items.
listPlatformBranches_filters :: Lens.Lens' ListPlatformBranches (Prelude.Maybe [SearchFilter])
listPlatformBranches_filters :: Lens' ListPlatformBranches (Maybe [SearchFilter])
listPlatformBranches_filters = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListPlatformBranches' {Maybe [SearchFilter]
filters :: Maybe [SearchFilter]
$sel:filters:ListPlatformBranches' :: ListPlatformBranches -> Maybe [SearchFilter]
filters} -> Maybe [SearchFilter]
filters) (\s :: ListPlatformBranches
s@ListPlatformBranches' {} Maybe [SearchFilter]
a -> ListPlatformBranches
s {$sel:filters:ListPlatformBranches' :: Maybe [SearchFilter]
filters = Maybe [SearchFilter]
a} :: ListPlatformBranches) 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 maximum number of platform branch values returned in one call.
listPlatformBranches_maxRecords :: Lens.Lens' ListPlatformBranches (Prelude.Maybe Prelude.Natural)
listPlatformBranches_maxRecords :: Lens' ListPlatformBranches (Maybe Natural)
listPlatformBranches_maxRecords = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListPlatformBranches' {Maybe Natural
maxRecords :: Maybe Natural
$sel:maxRecords:ListPlatformBranches' :: ListPlatformBranches -> Maybe Natural
maxRecords} -> Maybe Natural
maxRecords) (\s :: ListPlatformBranches
s@ListPlatformBranches' {} Maybe Natural
a -> ListPlatformBranches
s {$sel:maxRecords:ListPlatformBranches' :: Maybe Natural
maxRecords = Maybe Natural
a} :: ListPlatformBranches)

-- | For a paginated request. Specify a token from a previous response page
-- to retrieve the next response page. All other parameter values must be
-- identical to the ones specified in the initial request.
--
-- If no @NextToken@ is specified, the first page is retrieved.
listPlatformBranches_nextToken :: Lens.Lens' ListPlatformBranches (Prelude.Maybe Prelude.Text)
listPlatformBranches_nextToken :: Lens' ListPlatformBranches (Maybe Text)
listPlatformBranches_nextToken = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListPlatformBranches' {Maybe Text
nextToken :: Maybe Text
$sel:nextToken:ListPlatformBranches' :: ListPlatformBranches -> Maybe Text
nextToken} -> Maybe Text
nextToken) (\s :: ListPlatformBranches
s@ListPlatformBranches' {} Maybe Text
a -> ListPlatformBranches
s {$sel:nextToken:ListPlatformBranches' :: Maybe Text
nextToken = Maybe Text
a} :: ListPlatformBranches)

instance Core.AWSRequest ListPlatformBranches where
  type
    AWSResponse ListPlatformBranches =
      ListPlatformBranchesResponse
  request :: (Service -> Service)
-> ListPlatformBranches -> Request ListPlatformBranches
request Service -> Service
overrides =
    forall a. ToRequest a => Service -> a -> Request a
Request.postQuery (Service -> Service
overrides Service
defaultService)
  response :: forall (m :: * -> *).
MonadResource m =>
(ByteStringLazy -> IO ByteStringLazy)
-> Service
-> Proxy ListPlatformBranches
-> ClientResponse ClientBody
-> m (Either
        Error (ClientResponse (AWSResponse ListPlatformBranches)))
response =
    forall (m :: * -> *) a.
MonadResource m =>
Text
-> (Int
    -> ResponseHeaders -> [Node] -> Either String (AWSResponse a))
-> (ByteStringLazy -> IO ByteStringLazy)
-> Service
-> Proxy a
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse a)))
Response.receiveXMLWrapper
      Text
"ListPlatformBranchesResult"
      ( \Int
s ResponseHeaders
h [Node]
x ->
          Maybe Text
-> Maybe [PlatformBranchSummary]
-> Int
-> ListPlatformBranchesResponse
ListPlatformBranchesResponse'
            forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> ([Node]
x forall a. FromXML a => [Node] -> Text -> Either String (Maybe a)
Data..@? Text
"NextToken")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ( [Node]
x
                            forall a. FromXML a => [Node] -> Text -> Either String (Maybe a)
Data..@? Text
"PlatformBranchSummaryList"
                            forall (f :: * -> *) a. Functor f => f (Maybe a) -> a -> f a
Core..!@ forall a. Monoid a => a
Prelude.mempty
                            forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
Prelude.>>= forall (f :: * -> *) a b.
Applicative f =>
([a] -> f b) -> [a] -> f (Maybe b)
Core.may (forall a. FromXML a => Text -> [Node] -> Either String [a]
Data.parseXMLList Text
"member")
                        )
            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 ListPlatformBranches where
  hashWithSalt :: Int -> ListPlatformBranches -> Int
hashWithSalt Int
_salt ListPlatformBranches' {Maybe Natural
Maybe [SearchFilter]
Maybe Text
nextToken :: Maybe Text
maxRecords :: Maybe Natural
filters :: Maybe [SearchFilter]
$sel:nextToken:ListPlatformBranches' :: ListPlatformBranches -> Maybe Text
$sel:maxRecords:ListPlatformBranches' :: ListPlatformBranches -> Maybe Natural
$sel:filters:ListPlatformBranches' :: ListPlatformBranches -> Maybe [SearchFilter]
..} =
    Int
_salt
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe [SearchFilter]
filters
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Natural
maxRecords
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
nextToken

instance Prelude.NFData ListPlatformBranches where
  rnf :: ListPlatformBranches -> ()
rnf ListPlatformBranches' {Maybe Natural
Maybe [SearchFilter]
Maybe Text
nextToken :: Maybe Text
maxRecords :: Maybe Natural
filters :: Maybe [SearchFilter]
$sel:nextToken:ListPlatformBranches' :: ListPlatformBranches -> Maybe Text
$sel:maxRecords:ListPlatformBranches' :: ListPlatformBranches -> Maybe Natural
$sel:filters:ListPlatformBranches' :: ListPlatformBranches -> Maybe [SearchFilter]
..} =
    forall a. NFData a => a -> ()
Prelude.rnf Maybe [SearchFilter]
filters
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Natural
maxRecords
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
nextToken

instance Data.ToHeaders ListPlatformBranches where
  toHeaders :: ListPlatformBranches -> ResponseHeaders
toHeaders = forall a b. a -> b -> a
Prelude.const forall a. Monoid a => a
Prelude.mempty

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

instance Data.ToQuery ListPlatformBranches where
  toQuery :: ListPlatformBranches -> QueryString
toQuery ListPlatformBranches' {Maybe Natural
Maybe [SearchFilter]
Maybe Text
nextToken :: Maybe Text
maxRecords :: Maybe Natural
filters :: Maybe [SearchFilter]
$sel:nextToken:ListPlatformBranches' :: ListPlatformBranches -> Maybe Text
$sel:maxRecords:ListPlatformBranches' :: ListPlatformBranches -> Maybe Natural
$sel:filters:ListPlatformBranches' :: ListPlatformBranches -> Maybe [SearchFilter]
..} =
    forall a. Monoid a => [a] -> a
Prelude.mconcat
      [ ByteString
"Action"
          forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: (ByteString
"ListPlatformBranches" :: Prelude.ByteString),
        ByteString
"Version"
          forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: (ByteString
"2010-12-01" :: Prelude.ByteString),
        ByteString
"Filters"
          forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: forall a. ToQuery a => a -> QueryString
Data.toQuery
            (forall a.
(IsList a, ToQuery (Item a)) =>
ByteString -> a -> QueryString
Data.toQueryList ByteString
"member" forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [SearchFilter]
filters),
        ByteString
"MaxRecords" forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: Maybe Natural
maxRecords,
        ByteString
"NextToken" forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: Maybe Text
nextToken
      ]

-- | /See:/ 'newListPlatformBranchesResponse' smart constructor.
data ListPlatformBranchesResponse = ListPlatformBranchesResponse'
  { -- | In a paginated request, if this value isn\'t @null@, it\'s the token
    -- that you can pass in a subsequent request to get the next response page.
    ListPlatformBranchesResponse -> Maybe Text
nextToken :: Prelude.Maybe Prelude.Text,
    -- | Summary information about the platform branches.
    ListPlatformBranchesResponse -> Maybe [PlatformBranchSummary]
platformBranchSummaryList :: Prelude.Maybe [PlatformBranchSummary],
    -- | The response's http status code.
    ListPlatformBranchesResponse -> Int
httpStatus :: Prelude.Int
  }
  deriving (ListPlatformBranchesResponse
-> ListPlatformBranchesResponse -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ListPlatformBranchesResponse
-> ListPlatformBranchesResponse -> Bool
$c/= :: ListPlatformBranchesResponse
-> ListPlatformBranchesResponse -> Bool
== :: ListPlatformBranchesResponse
-> ListPlatformBranchesResponse -> Bool
$c== :: ListPlatformBranchesResponse
-> ListPlatformBranchesResponse -> Bool
Prelude.Eq, ReadPrec [ListPlatformBranchesResponse]
ReadPrec ListPlatformBranchesResponse
Int -> ReadS ListPlatformBranchesResponse
ReadS [ListPlatformBranchesResponse]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ListPlatformBranchesResponse]
$creadListPrec :: ReadPrec [ListPlatformBranchesResponse]
readPrec :: ReadPrec ListPlatformBranchesResponse
$creadPrec :: ReadPrec ListPlatformBranchesResponse
readList :: ReadS [ListPlatformBranchesResponse]
$creadList :: ReadS [ListPlatformBranchesResponse]
readsPrec :: Int -> ReadS ListPlatformBranchesResponse
$creadsPrec :: Int -> ReadS ListPlatformBranchesResponse
Prelude.Read, Int -> ListPlatformBranchesResponse -> ShowS
[ListPlatformBranchesResponse] -> ShowS
ListPlatformBranchesResponse -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ListPlatformBranchesResponse] -> ShowS
$cshowList :: [ListPlatformBranchesResponse] -> ShowS
show :: ListPlatformBranchesResponse -> String
$cshow :: ListPlatformBranchesResponse -> String
showsPrec :: Int -> ListPlatformBranchesResponse -> ShowS
$cshowsPrec :: Int -> ListPlatformBranchesResponse -> ShowS
Prelude.Show, forall x.
Rep ListPlatformBranchesResponse x -> ListPlatformBranchesResponse
forall x.
ListPlatformBranchesResponse -> Rep ListPlatformBranchesResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep ListPlatformBranchesResponse x -> ListPlatformBranchesResponse
$cfrom :: forall x.
ListPlatformBranchesResponse -> Rep ListPlatformBranchesResponse x
Prelude.Generic)

-- |
-- Create a value of 'ListPlatformBranchesResponse' 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', 'listPlatformBranchesResponse_nextToken' - In a paginated request, if this value isn\'t @null@, it\'s the token
-- that you can pass in a subsequent request to get the next response page.
--
-- 'platformBranchSummaryList', 'listPlatformBranchesResponse_platformBranchSummaryList' - Summary information about the platform branches.
--
-- 'httpStatus', 'listPlatformBranchesResponse_httpStatus' - The response's http status code.
newListPlatformBranchesResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  ListPlatformBranchesResponse
newListPlatformBranchesResponse :: Int -> ListPlatformBranchesResponse
newListPlatformBranchesResponse Int
pHttpStatus_ =
  ListPlatformBranchesResponse'
    { $sel:nextToken:ListPlatformBranchesResponse' :: Maybe Text
nextToken =
        forall a. Maybe a
Prelude.Nothing,
      $sel:platformBranchSummaryList:ListPlatformBranchesResponse' :: Maybe [PlatformBranchSummary]
platformBranchSummaryList = forall a. Maybe a
Prelude.Nothing,
      $sel:httpStatus:ListPlatformBranchesResponse' :: Int
httpStatus = Int
pHttpStatus_
    }

-- | In a paginated request, if this value isn\'t @null@, it\'s the token
-- that you can pass in a subsequent request to get the next response page.
listPlatformBranchesResponse_nextToken :: Lens.Lens' ListPlatformBranchesResponse (Prelude.Maybe Prelude.Text)
listPlatformBranchesResponse_nextToken :: Lens' ListPlatformBranchesResponse (Maybe Text)
listPlatformBranchesResponse_nextToken = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListPlatformBranchesResponse' {Maybe Text
nextToken :: Maybe Text
$sel:nextToken:ListPlatformBranchesResponse' :: ListPlatformBranchesResponse -> Maybe Text
nextToken} -> Maybe Text
nextToken) (\s :: ListPlatformBranchesResponse
s@ListPlatformBranchesResponse' {} Maybe Text
a -> ListPlatformBranchesResponse
s {$sel:nextToken:ListPlatformBranchesResponse' :: Maybe Text
nextToken = Maybe Text
a} :: ListPlatformBranchesResponse)

-- | Summary information about the platform branches.
listPlatformBranchesResponse_platformBranchSummaryList :: Lens.Lens' ListPlatformBranchesResponse (Prelude.Maybe [PlatformBranchSummary])
listPlatformBranchesResponse_platformBranchSummaryList :: Lens' ListPlatformBranchesResponse (Maybe [PlatformBranchSummary])
listPlatformBranchesResponse_platformBranchSummaryList = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListPlatformBranchesResponse' {Maybe [PlatformBranchSummary]
platformBranchSummaryList :: Maybe [PlatformBranchSummary]
$sel:platformBranchSummaryList:ListPlatformBranchesResponse' :: ListPlatformBranchesResponse -> Maybe [PlatformBranchSummary]
platformBranchSummaryList} -> Maybe [PlatformBranchSummary]
platformBranchSummaryList) (\s :: ListPlatformBranchesResponse
s@ListPlatformBranchesResponse' {} Maybe [PlatformBranchSummary]
a -> ListPlatformBranchesResponse
s {$sel:platformBranchSummaryList:ListPlatformBranchesResponse' :: Maybe [PlatformBranchSummary]
platformBranchSummaryList = Maybe [PlatformBranchSummary]
a} :: ListPlatformBranchesResponse) 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.
listPlatformBranchesResponse_httpStatus :: Lens.Lens' ListPlatformBranchesResponse Prelude.Int
listPlatformBranchesResponse_httpStatus :: Lens' ListPlatformBranchesResponse Int
listPlatformBranchesResponse_httpStatus = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListPlatformBranchesResponse' {Int
httpStatus :: Int
$sel:httpStatus:ListPlatformBranchesResponse' :: ListPlatformBranchesResponse -> Int
httpStatus} -> Int
httpStatus) (\s :: ListPlatformBranchesResponse
s@ListPlatformBranchesResponse' {} Int
a -> ListPlatformBranchesResponse
s {$sel:httpStatus:ListPlatformBranchesResponse' :: Int
httpStatus = Int
a} :: ListPlatformBranchesResponse)

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