{-# 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.ListAvailableSolutionStacks
(
ListAvailableSolutionStacks (..),
newListAvailableSolutionStacks,
ListAvailableSolutionStacksResponse (..),
newListAvailableSolutionStacksResponse,
listAvailableSolutionStacksResponse_solutionStacks,
listAvailableSolutionStacksResponse_solutionStackDetails,
listAvailableSolutionStacksResponse_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
data ListAvailableSolutionStacks = ListAvailableSolutionStacks'
{
}
deriving (ListAvailableSolutionStacks -> ListAvailableSolutionStacks -> Bool
(ListAvailableSolutionStacks
-> ListAvailableSolutionStacks -> Bool)
-> (ListAvailableSolutionStacks
-> ListAvailableSolutionStacks -> Bool)
-> Eq ListAvailableSolutionStacks
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ListAvailableSolutionStacks -> ListAvailableSolutionStacks -> Bool
$c/= :: ListAvailableSolutionStacks -> ListAvailableSolutionStacks -> Bool
== :: ListAvailableSolutionStacks -> ListAvailableSolutionStacks -> Bool
$c== :: ListAvailableSolutionStacks -> ListAvailableSolutionStacks -> Bool
Prelude.Eq, ReadPrec [ListAvailableSolutionStacks]
ReadPrec ListAvailableSolutionStacks
Int -> ReadS ListAvailableSolutionStacks
ReadS [ListAvailableSolutionStacks]
(Int -> ReadS ListAvailableSolutionStacks)
-> ReadS [ListAvailableSolutionStacks]
-> ReadPrec ListAvailableSolutionStacks
-> ReadPrec [ListAvailableSolutionStacks]
-> Read ListAvailableSolutionStacks
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ListAvailableSolutionStacks]
$creadListPrec :: ReadPrec [ListAvailableSolutionStacks]
readPrec :: ReadPrec ListAvailableSolutionStacks
$creadPrec :: ReadPrec ListAvailableSolutionStacks
readList :: ReadS [ListAvailableSolutionStacks]
$creadList :: ReadS [ListAvailableSolutionStacks]
readsPrec :: Int -> ReadS ListAvailableSolutionStacks
$creadsPrec :: Int -> ReadS ListAvailableSolutionStacks
Prelude.Read, Int -> ListAvailableSolutionStacks -> ShowS
[ListAvailableSolutionStacks] -> ShowS
ListAvailableSolutionStacks -> String
(Int -> ListAvailableSolutionStacks -> ShowS)
-> (ListAvailableSolutionStacks -> String)
-> ([ListAvailableSolutionStacks] -> ShowS)
-> Show ListAvailableSolutionStacks
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ListAvailableSolutionStacks] -> ShowS
$cshowList :: [ListAvailableSolutionStacks] -> ShowS
show :: ListAvailableSolutionStacks -> String
$cshow :: ListAvailableSolutionStacks -> String
showsPrec :: Int -> ListAvailableSolutionStacks -> ShowS
$cshowsPrec :: Int -> ListAvailableSolutionStacks -> ShowS
Prelude.Show, (forall x.
ListAvailableSolutionStacks -> Rep ListAvailableSolutionStacks x)
-> (forall x.
Rep ListAvailableSolutionStacks x -> ListAvailableSolutionStacks)
-> Generic ListAvailableSolutionStacks
forall x.
Rep ListAvailableSolutionStacks x -> ListAvailableSolutionStacks
forall x.
ListAvailableSolutionStacks -> Rep ListAvailableSolutionStacks x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep ListAvailableSolutionStacks x -> ListAvailableSolutionStacks
$cfrom :: forall x.
ListAvailableSolutionStacks -> Rep ListAvailableSolutionStacks x
Prelude.Generic)
newListAvailableSolutionStacks ::
ListAvailableSolutionStacks
newListAvailableSolutionStacks :: ListAvailableSolutionStacks
newListAvailableSolutionStacks =
ListAvailableSolutionStacks
ListAvailableSolutionStacks'
instance Core.AWSRequest ListAvailableSolutionStacks where
type
AWSResponse ListAvailableSolutionStacks =
ListAvailableSolutionStacksResponse
request :: ListAvailableSolutionStacks -> Request ListAvailableSolutionStacks
request = Service
-> ListAvailableSolutionStacks
-> Request ListAvailableSolutionStacks
forall a. ToRequest a => Service -> a -> Request a
Request.postQuery Service
defaultService
response :: Logger
-> Service
-> Proxy ListAvailableSolutionStacks
-> ClientResponse ClientBody
-> m (Either
Error (ClientResponse (AWSResponse ListAvailableSolutionStacks)))
response =
Text
-> (Int
-> ResponseHeaders
-> [Node]
-> Either String (AWSResponse ListAvailableSolutionStacks))
-> Logger
-> Service
-> Proxy ListAvailableSolutionStacks
-> ClientResponse ClientBody
-> m (Either
Error (ClientResponse (AWSResponse ListAvailableSolutionStacks)))
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
"ListAvailableSolutionStacksResult"
( \Int
s ResponseHeaders
h [Node]
x ->
Maybe [Text]
-> Maybe [SolutionStackDescription]
-> Int
-> ListAvailableSolutionStacksResponse
ListAvailableSolutionStacksResponse'
(Maybe [Text]
-> Maybe [SolutionStackDescription]
-> Int
-> ListAvailableSolutionStacksResponse)
-> Either String (Maybe [Text])
-> Either
String
(Maybe [SolutionStackDescription]
-> Int -> ListAvailableSolutionStacksResponse)
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
"SolutionStacks" 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 [Text]))
-> Either String (Maybe [Text])
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
Prelude.>>= ([Node] -> Either String [Text])
-> [Node] -> Either String (Maybe [Text])
forall (f :: * -> *) a b.
Applicative f =>
([a] -> f b) -> [a] -> f (Maybe b)
Core.may (Text -> [Node] -> Either String [Text]
forall a. FromXML a => Text -> [Node] -> Either String [a]
Core.parseXMLList Text
"member")
)
Either
String
(Maybe [SolutionStackDescription]
-> Int -> ListAvailableSolutionStacksResponse)
-> Either String (Maybe [SolutionStackDescription])
-> Either String (Int -> ListAvailableSolutionStacksResponse)
forall (f :: * -> *) a b. Applicative f => 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
"SolutionStackDetails"
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 [SolutionStackDescription]))
-> Either String (Maybe [SolutionStackDescription])
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
Prelude.>>= ([Node] -> Either String [SolutionStackDescription])
-> [Node] -> Either String (Maybe [SolutionStackDescription])
forall (f :: * -> *) a b.
Applicative f =>
([a] -> f b) -> [a] -> f (Maybe b)
Core.may (Text -> [Node] -> Either String [SolutionStackDescription]
forall a. FromXML a => Text -> [Node] -> Either String [a]
Core.parseXMLList Text
"member")
)
Either String (Int -> ListAvailableSolutionStacksResponse)
-> Either String Int
-> Either String ListAvailableSolutionStacksResponse
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 ListAvailableSolutionStacks
instance Prelude.NFData ListAvailableSolutionStacks
instance Core.ToHeaders ListAvailableSolutionStacks where
toHeaders :: ListAvailableSolutionStacks -> ResponseHeaders
toHeaders = ResponseHeaders -> ListAvailableSolutionStacks -> ResponseHeaders
forall a b. a -> b -> a
Prelude.const ResponseHeaders
forall a. Monoid a => a
Prelude.mempty
instance Core.ToPath ListAvailableSolutionStacks where
toPath :: ListAvailableSolutionStacks -> ByteString
toPath = ByteString -> ListAvailableSolutionStacks -> ByteString
forall a b. a -> b -> a
Prelude.const ByteString
"/"
instance Core.ToQuery ListAvailableSolutionStacks where
toQuery :: ListAvailableSolutionStacks -> QueryString
toQuery =
QueryString -> ListAvailableSolutionStacks -> QueryString
forall a b. a -> b -> a
Prelude.const
( [QueryString] -> QueryString
forall a. Monoid a => [a] -> a
Prelude.mconcat
[ ByteString
"Action"
ByteString -> ByteString -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: ( ByteString
"ListAvailableSolutionStacks" ::
Prelude.ByteString
),
ByteString
"Version"
ByteString -> ByteString -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: (ByteString
"2010-12-01" :: Prelude.ByteString)
]
)
data ListAvailableSolutionStacksResponse = ListAvailableSolutionStacksResponse'
{
ListAvailableSolutionStacksResponse -> Maybe [Text]
solutionStacks :: Prelude.Maybe [Prelude.Text],
ListAvailableSolutionStacksResponse
-> Maybe [SolutionStackDescription]
solutionStackDetails :: Prelude.Maybe [SolutionStackDescription],
ListAvailableSolutionStacksResponse -> Int
httpStatus :: Prelude.Int
}
deriving (ListAvailableSolutionStacksResponse
-> ListAvailableSolutionStacksResponse -> Bool
(ListAvailableSolutionStacksResponse
-> ListAvailableSolutionStacksResponse -> Bool)
-> (ListAvailableSolutionStacksResponse
-> ListAvailableSolutionStacksResponse -> Bool)
-> Eq ListAvailableSolutionStacksResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ListAvailableSolutionStacksResponse
-> ListAvailableSolutionStacksResponse -> Bool
$c/= :: ListAvailableSolutionStacksResponse
-> ListAvailableSolutionStacksResponse -> Bool
== :: ListAvailableSolutionStacksResponse
-> ListAvailableSolutionStacksResponse -> Bool
$c== :: ListAvailableSolutionStacksResponse
-> ListAvailableSolutionStacksResponse -> Bool
Prelude.Eq, ReadPrec [ListAvailableSolutionStacksResponse]
ReadPrec ListAvailableSolutionStacksResponse
Int -> ReadS ListAvailableSolutionStacksResponse
ReadS [ListAvailableSolutionStacksResponse]
(Int -> ReadS ListAvailableSolutionStacksResponse)
-> ReadS [ListAvailableSolutionStacksResponse]
-> ReadPrec ListAvailableSolutionStacksResponse
-> ReadPrec [ListAvailableSolutionStacksResponse]
-> Read ListAvailableSolutionStacksResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ListAvailableSolutionStacksResponse]
$creadListPrec :: ReadPrec [ListAvailableSolutionStacksResponse]
readPrec :: ReadPrec ListAvailableSolutionStacksResponse
$creadPrec :: ReadPrec ListAvailableSolutionStacksResponse
readList :: ReadS [ListAvailableSolutionStacksResponse]
$creadList :: ReadS [ListAvailableSolutionStacksResponse]
readsPrec :: Int -> ReadS ListAvailableSolutionStacksResponse
$creadsPrec :: Int -> ReadS ListAvailableSolutionStacksResponse
Prelude.Read, Int -> ListAvailableSolutionStacksResponse -> ShowS
[ListAvailableSolutionStacksResponse] -> ShowS
ListAvailableSolutionStacksResponse -> String
(Int -> ListAvailableSolutionStacksResponse -> ShowS)
-> (ListAvailableSolutionStacksResponse -> String)
-> ([ListAvailableSolutionStacksResponse] -> ShowS)
-> Show ListAvailableSolutionStacksResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ListAvailableSolutionStacksResponse] -> ShowS
$cshowList :: [ListAvailableSolutionStacksResponse] -> ShowS
show :: ListAvailableSolutionStacksResponse -> String
$cshow :: ListAvailableSolutionStacksResponse -> String
showsPrec :: Int -> ListAvailableSolutionStacksResponse -> ShowS
$cshowsPrec :: Int -> ListAvailableSolutionStacksResponse -> ShowS
Prelude.Show, (forall x.
ListAvailableSolutionStacksResponse
-> Rep ListAvailableSolutionStacksResponse x)
-> (forall x.
Rep ListAvailableSolutionStacksResponse x
-> ListAvailableSolutionStacksResponse)
-> Generic ListAvailableSolutionStacksResponse
forall x.
Rep ListAvailableSolutionStacksResponse x
-> ListAvailableSolutionStacksResponse
forall x.
ListAvailableSolutionStacksResponse
-> Rep ListAvailableSolutionStacksResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep ListAvailableSolutionStacksResponse x
-> ListAvailableSolutionStacksResponse
$cfrom :: forall x.
ListAvailableSolutionStacksResponse
-> Rep ListAvailableSolutionStacksResponse x
Prelude.Generic)
newListAvailableSolutionStacksResponse ::
Prelude.Int ->
ListAvailableSolutionStacksResponse
newListAvailableSolutionStacksResponse :: Int -> ListAvailableSolutionStacksResponse
newListAvailableSolutionStacksResponse Int
pHttpStatus_ =
ListAvailableSolutionStacksResponse' :: Maybe [Text]
-> Maybe [SolutionStackDescription]
-> Int
-> ListAvailableSolutionStacksResponse
ListAvailableSolutionStacksResponse'
{ $sel:solutionStacks:ListAvailableSolutionStacksResponse' :: Maybe [Text]
solutionStacks =
Maybe [Text]
forall a. Maybe a
Prelude.Nothing,
$sel:solutionStackDetails:ListAvailableSolutionStacksResponse' :: Maybe [SolutionStackDescription]
solutionStackDetails = Maybe [SolutionStackDescription]
forall a. Maybe a
Prelude.Nothing,
$sel:httpStatus:ListAvailableSolutionStacksResponse' :: Int
httpStatus = Int
pHttpStatus_
}
listAvailableSolutionStacksResponse_solutionStacks :: Lens.Lens' ListAvailableSolutionStacksResponse (Prelude.Maybe [Prelude.Text])
listAvailableSolutionStacksResponse_solutionStacks :: (Maybe [Text] -> f (Maybe [Text]))
-> ListAvailableSolutionStacksResponse
-> f ListAvailableSolutionStacksResponse
listAvailableSolutionStacksResponse_solutionStacks = (ListAvailableSolutionStacksResponse -> Maybe [Text])
-> (ListAvailableSolutionStacksResponse
-> Maybe [Text] -> ListAvailableSolutionStacksResponse)
-> Lens
ListAvailableSolutionStacksResponse
ListAvailableSolutionStacksResponse
(Maybe [Text])
(Maybe [Text])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListAvailableSolutionStacksResponse' {Maybe [Text]
solutionStacks :: Maybe [Text]
$sel:solutionStacks:ListAvailableSolutionStacksResponse' :: ListAvailableSolutionStacksResponse -> Maybe [Text]
solutionStacks} -> Maybe [Text]
solutionStacks) (\s :: ListAvailableSolutionStacksResponse
s@ListAvailableSolutionStacksResponse' {} Maybe [Text]
a -> ListAvailableSolutionStacksResponse
s {$sel:solutionStacks:ListAvailableSolutionStacksResponse' :: Maybe [Text]
solutionStacks = Maybe [Text]
a} :: ListAvailableSolutionStacksResponse) ((Maybe [Text] -> f (Maybe [Text]))
-> ListAvailableSolutionStacksResponse
-> f ListAvailableSolutionStacksResponse)
-> ((Maybe [Text] -> f (Maybe [Text]))
-> Maybe [Text] -> f (Maybe [Text]))
-> (Maybe [Text] -> f (Maybe [Text]))
-> ListAvailableSolutionStacksResponse
-> f ListAvailableSolutionStacksResponse
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
listAvailableSolutionStacksResponse_solutionStackDetails :: Lens.Lens' ListAvailableSolutionStacksResponse (Prelude.Maybe [SolutionStackDescription])
listAvailableSolutionStacksResponse_solutionStackDetails :: (Maybe [SolutionStackDescription]
-> f (Maybe [SolutionStackDescription]))
-> ListAvailableSolutionStacksResponse
-> f ListAvailableSolutionStacksResponse
listAvailableSolutionStacksResponse_solutionStackDetails = (ListAvailableSolutionStacksResponse
-> Maybe [SolutionStackDescription])
-> (ListAvailableSolutionStacksResponse
-> Maybe [SolutionStackDescription]
-> ListAvailableSolutionStacksResponse)
-> Lens
ListAvailableSolutionStacksResponse
ListAvailableSolutionStacksResponse
(Maybe [SolutionStackDescription])
(Maybe [SolutionStackDescription])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListAvailableSolutionStacksResponse' {Maybe [SolutionStackDescription]
solutionStackDetails :: Maybe [SolutionStackDescription]
$sel:solutionStackDetails:ListAvailableSolutionStacksResponse' :: ListAvailableSolutionStacksResponse
-> Maybe [SolutionStackDescription]
solutionStackDetails} -> Maybe [SolutionStackDescription]
solutionStackDetails) (\s :: ListAvailableSolutionStacksResponse
s@ListAvailableSolutionStacksResponse' {} Maybe [SolutionStackDescription]
a -> ListAvailableSolutionStacksResponse
s {$sel:solutionStackDetails:ListAvailableSolutionStacksResponse' :: Maybe [SolutionStackDescription]
solutionStackDetails = Maybe [SolutionStackDescription]
a} :: ListAvailableSolutionStacksResponse) ((Maybe [SolutionStackDescription]
-> f (Maybe [SolutionStackDescription]))
-> ListAvailableSolutionStacksResponse
-> f ListAvailableSolutionStacksResponse)
-> ((Maybe [SolutionStackDescription]
-> f (Maybe [SolutionStackDescription]))
-> Maybe [SolutionStackDescription]
-> f (Maybe [SolutionStackDescription]))
-> (Maybe [SolutionStackDescription]
-> f (Maybe [SolutionStackDescription]))
-> ListAvailableSolutionStacksResponse
-> f ListAvailableSolutionStacksResponse
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso
[SolutionStackDescription]
[SolutionStackDescription]
[SolutionStackDescription]
[SolutionStackDescription]
-> Iso
(Maybe [SolutionStackDescription])
(Maybe [SolutionStackDescription])
(Maybe [SolutionStackDescription])
(Maybe [SolutionStackDescription])
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
[SolutionStackDescription]
[SolutionStackDescription]
[SolutionStackDescription]
[SolutionStackDescription]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
listAvailableSolutionStacksResponse_httpStatus :: Lens.Lens' ListAvailableSolutionStacksResponse Prelude.Int
listAvailableSolutionStacksResponse_httpStatus :: (Int -> f Int)
-> ListAvailableSolutionStacksResponse
-> f ListAvailableSolutionStacksResponse
listAvailableSolutionStacksResponse_httpStatus = (ListAvailableSolutionStacksResponse -> Int)
-> (ListAvailableSolutionStacksResponse
-> Int -> ListAvailableSolutionStacksResponse)
-> Lens
ListAvailableSolutionStacksResponse
ListAvailableSolutionStacksResponse
Int
Int
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListAvailableSolutionStacksResponse' {Int
httpStatus :: Int
$sel:httpStatus:ListAvailableSolutionStacksResponse' :: ListAvailableSolutionStacksResponse -> Int
httpStatus} -> Int
httpStatus) (\s :: ListAvailableSolutionStacksResponse
s@ListAvailableSolutionStacksResponse' {} Int
a -> ListAvailableSolutionStacksResponse
s {$sel:httpStatus:ListAvailableSolutionStacksResponse' :: Int
httpStatus = Int
a} :: ListAvailableSolutionStacksResponse)
instance
Prelude.NFData
ListAvailableSolutionStacksResponse