{-# 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 #-}
module Amazonka.ElasticBeanstalk.ListPlatformBranches
(
ListPlatformBranches (..),
newListPlatformBranches,
listPlatformBranches_filters,
listPlatformBranches_maxRecords,
listPlatformBranches_nextToken,
ListPlatformBranchesResponse (..),
newListPlatformBranchesResponse,
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
data ListPlatformBranches = ListPlatformBranches'
{
ListPlatformBranches -> Maybe [SearchFilter]
filters :: Prelude.Maybe [SearchFilter],
ListPlatformBranches -> Maybe Natural
maxRecords :: Prelude.Maybe Prelude.Natural,
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)
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
}
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
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)
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
]
data ListPlatformBranchesResponse = ListPlatformBranchesResponse'
{
ListPlatformBranchesResponse -> Maybe Text
nextToken :: Prelude.Maybe Prelude.Text,
ListPlatformBranchesResponse -> Maybe [PlatformBranchSummary]
platformBranchSummaryList :: Prelude.Maybe [PlatformBranchSummary],
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)
newListPlatformBranchesResponse ::
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_
}
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)
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
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