{-# 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-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)
--
-- 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_nextToken,
    listPlatformBranches_maxRecords,

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

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

import qualified Amazonka.Core as Core
import Amazonka.ElasticBeanstalk.Types
import qualified Amazonka.Lens as Lens
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],
    -- | 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,
    -- | The maximum number of platform branch values returned in one call.
    ListPlatformBranches -> Maybe Natural
maxRecords :: Prelude.Maybe Prelude.Natural
  }
  deriving (ListPlatformBranches -> ListPlatformBranches -> Bool
(ListPlatformBranches -> ListPlatformBranches -> Bool)
-> (ListPlatformBranches -> ListPlatformBranches -> Bool)
-> Eq ListPlatformBranches
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]
(Int -> ReadS ListPlatformBranches)
-> ReadS [ListPlatformBranches]
-> ReadPrec ListPlatformBranches
-> ReadPrec [ListPlatformBranches]
-> Read 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
(Int -> ListPlatformBranches -> ShowS)
-> (ListPlatformBranches -> String)
-> ([ListPlatformBranches] -> ShowS)
-> Show ListPlatformBranches
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. ListPlatformBranches -> Rep ListPlatformBranches x)
-> (forall x. Rep ListPlatformBranches x -> ListPlatformBranches)
-> Generic ListPlatformBranches
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.
--
-- '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.
--
-- 'maxRecords', 'listPlatformBranches_maxRecords' - The maximum number of platform branch values returned in one call.
newListPlatformBranches ::
  ListPlatformBranches
newListPlatformBranches :: ListPlatformBranches
newListPlatformBranches =
  ListPlatformBranches' :: Maybe [SearchFilter]
-> Maybe Text -> Maybe Natural -> ListPlatformBranches
ListPlatformBranches'
    { $sel:filters:ListPlatformBranches' :: Maybe [SearchFilter]
filters = Maybe [SearchFilter]
forall a. Maybe a
Prelude.Nothing,
      $sel:nextToken:ListPlatformBranches' :: Maybe Text
nextToken = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:maxRecords:ListPlatformBranches' :: Maybe Natural
maxRecords = Maybe Natural
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 :: (Maybe [SearchFilter] -> f (Maybe [SearchFilter]))
-> ListPlatformBranches -> f ListPlatformBranches
listPlatformBranches_filters = (ListPlatformBranches -> Maybe [SearchFilter])
-> (ListPlatformBranches
    -> Maybe [SearchFilter] -> ListPlatformBranches)
-> Lens
     ListPlatformBranches
     ListPlatformBranches
     (Maybe [SearchFilter])
     (Maybe [SearchFilter])
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) ((Maybe [SearchFilter] -> f (Maybe [SearchFilter]))
 -> ListPlatformBranches -> f ListPlatformBranches)
-> ((Maybe [SearchFilter] -> f (Maybe [SearchFilter]))
    -> Maybe [SearchFilter] -> f (Maybe [SearchFilter]))
-> (Maybe [SearchFilter] -> f (Maybe [SearchFilter]))
-> ListPlatformBranches
-> f ListPlatformBranches
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso [SearchFilter] [SearchFilter] [SearchFilter] [SearchFilter]
-> Iso
     (Maybe [SearchFilter])
     (Maybe [SearchFilter])
     (Maybe [SearchFilter])
     (Maybe [SearchFilter])
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 [SearchFilter] [SearchFilter] [SearchFilter] [SearchFilter]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | 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 :: (Maybe Text -> f (Maybe Text))
-> ListPlatformBranches -> f ListPlatformBranches
listPlatformBranches_nextToken = (ListPlatformBranches -> Maybe Text)
-> (ListPlatformBranches -> Maybe Text -> ListPlatformBranches)
-> Lens
     ListPlatformBranches ListPlatformBranches (Maybe Text) (Maybe Text)
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)

-- | The maximum number of platform branch values returned in one call.
listPlatformBranches_maxRecords :: Lens.Lens' ListPlatformBranches (Prelude.Maybe Prelude.Natural)
listPlatformBranches_maxRecords :: (Maybe Natural -> f (Maybe Natural))
-> ListPlatformBranches -> f ListPlatformBranches
listPlatformBranches_maxRecords = (ListPlatformBranches -> Maybe Natural)
-> (ListPlatformBranches -> Maybe Natural -> ListPlatformBranches)
-> Lens
     ListPlatformBranches
     ListPlatformBranches
     (Maybe Natural)
     (Maybe Natural)
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)

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

instance Prelude.NFData ListPlatformBranches

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

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

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

-- | /See:/ 'newListPlatformBranchesResponse' smart constructor.
data ListPlatformBranchesResponse = ListPlatformBranchesResponse'
  { -- | Summary information about the platform branches.
    ListPlatformBranchesResponse -> Maybe [PlatformBranchSummary]
platformBranchSummaryList :: Prelude.Maybe [PlatformBranchSummary],
    -- | 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,
    -- | The response's http status code.
    ListPlatformBranchesResponse -> Int
httpStatus :: Prelude.Int
  }
  deriving (ListPlatformBranchesResponse
-> ListPlatformBranchesResponse -> Bool
(ListPlatformBranchesResponse
 -> ListPlatformBranchesResponse -> Bool)
-> (ListPlatformBranchesResponse
    -> ListPlatformBranchesResponse -> Bool)
-> Eq ListPlatformBranchesResponse
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]
(Int -> ReadS ListPlatformBranchesResponse)
-> ReadS [ListPlatformBranchesResponse]
-> ReadPrec ListPlatformBranchesResponse
-> ReadPrec [ListPlatformBranchesResponse]
-> Read 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
(Int -> ListPlatformBranchesResponse -> ShowS)
-> (ListPlatformBranchesResponse -> String)
-> ([ListPlatformBranchesResponse] -> ShowS)
-> Show ListPlatformBranchesResponse
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.
 ListPlatformBranchesResponse -> Rep ListPlatformBranchesResponse x)
-> (forall x.
    Rep ListPlatformBranchesResponse x -> ListPlatformBranchesResponse)
-> Generic ListPlatformBranchesResponse
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:
--
-- 'platformBranchSummaryList', 'listPlatformBranchesResponse_platformBranchSummaryList' - Summary information about the platform branches.
--
-- '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.
--
-- 'httpStatus', 'listPlatformBranchesResponse_httpStatus' - The response's http status code.
newListPlatformBranchesResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  ListPlatformBranchesResponse
newListPlatformBranchesResponse :: Int -> ListPlatformBranchesResponse
newListPlatformBranchesResponse Int
pHttpStatus_ =
  ListPlatformBranchesResponse' :: Maybe [PlatformBranchSummary]
-> Maybe Text -> Int -> ListPlatformBranchesResponse
ListPlatformBranchesResponse'
    { $sel:platformBranchSummaryList:ListPlatformBranchesResponse' :: Maybe [PlatformBranchSummary]
platformBranchSummaryList =
        Maybe [PlatformBranchSummary]
forall a. Maybe a
Prelude.Nothing,
      $sel:nextToken:ListPlatformBranchesResponse' :: Maybe Text
nextToken = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:httpStatus:ListPlatformBranchesResponse' :: Int
httpStatus = Int
pHttpStatus_
    }

-- | Summary information about the platform branches.
listPlatformBranchesResponse_platformBranchSummaryList :: Lens.Lens' ListPlatformBranchesResponse (Prelude.Maybe [PlatformBranchSummary])
listPlatformBranchesResponse_platformBranchSummaryList :: (Maybe [PlatformBranchSummary]
 -> f (Maybe [PlatformBranchSummary]))
-> ListPlatformBranchesResponse -> f ListPlatformBranchesResponse
listPlatformBranchesResponse_platformBranchSummaryList = (ListPlatformBranchesResponse -> Maybe [PlatformBranchSummary])
-> (ListPlatformBranchesResponse
    -> Maybe [PlatformBranchSummary] -> ListPlatformBranchesResponse)
-> Lens
     ListPlatformBranchesResponse
     ListPlatformBranchesResponse
     (Maybe [PlatformBranchSummary])
     (Maybe [PlatformBranchSummary])
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) ((Maybe [PlatformBranchSummary]
  -> f (Maybe [PlatformBranchSummary]))
 -> ListPlatformBranchesResponse -> f ListPlatformBranchesResponse)
-> ((Maybe [PlatformBranchSummary]
     -> f (Maybe [PlatformBranchSummary]))
    -> Maybe [PlatformBranchSummary]
    -> f (Maybe [PlatformBranchSummary]))
-> (Maybe [PlatformBranchSummary]
    -> f (Maybe [PlatformBranchSummary]))
-> ListPlatformBranchesResponse
-> f ListPlatformBranchesResponse
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso
  [PlatformBranchSummary]
  [PlatformBranchSummary]
  [PlatformBranchSummary]
  [PlatformBranchSummary]
-> Iso
     (Maybe [PlatformBranchSummary])
     (Maybe [PlatformBranchSummary])
     (Maybe [PlatformBranchSummary])
     (Maybe [PlatformBranchSummary])
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
  [PlatformBranchSummary]
  [PlatformBranchSummary]
  [PlatformBranchSummary]
  [PlatformBranchSummary]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | 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 :: (Maybe Text -> f (Maybe Text))
-> ListPlatformBranchesResponse -> f ListPlatformBranchesResponse
listPlatformBranchesResponse_nextToken = (ListPlatformBranchesResponse -> Maybe Text)
-> (ListPlatformBranchesResponse
    -> Maybe Text -> ListPlatformBranchesResponse)
-> Lens
     ListPlatformBranchesResponse
     ListPlatformBranchesResponse
     (Maybe Text)
     (Maybe Text)
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)

-- | The response's http status code.
listPlatformBranchesResponse_httpStatus :: Lens.Lens' ListPlatformBranchesResponse Prelude.Int
listPlatformBranchesResponse_httpStatus :: (Int -> f Int)
-> ListPlatformBranchesResponse -> f ListPlatformBranchesResponse
listPlatformBranchesResponse_httpStatus = (ListPlatformBranchesResponse -> Int)
-> (ListPlatformBranchesResponse
    -> Int -> ListPlatformBranchesResponse)
-> Lens
     ListPlatformBranchesResponse ListPlatformBranchesResponse Int Int
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