{-# 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.ELB.DescribeLoadBalancerAttributes
(
DescribeLoadBalancerAttributes (..),
newDescribeLoadBalancerAttributes,
describeLoadBalancerAttributes_loadBalancerName,
DescribeLoadBalancerAttributesResponse (..),
newDescribeLoadBalancerAttributesResponse,
describeLoadBalancerAttributesResponse_loadBalancerAttributes,
describeLoadBalancerAttributesResponse_httpStatus,
)
where
import qualified Amazonka.Core as Core
import Amazonka.ELB.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 DescribeLoadBalancerAttributes = DescribeLoadBalancerAttributes'
{
DescribeLoadBalancerAttributes -> Text
loadBalancerName :: Prelude.Text
}
deriving (DescribeLoadBalancerAttributes
-> DescribeLoadBalancerAttributes -> Bool
(DescribeLoadBalancerAttributes
-> DescribeLoadBalancerAttributes -> Bool)
-> (DescribeLoadBalancerAttributes
-> DescribeLoadBalancerAttributes -> Bool)
-> Eq DescribeLoadBalancerAttributes
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DescribeLoadBalancerAttributes
-> DescribeLoadBalancerAttributes -> Bool
$c/= :: DescribeLoadBalancerAttributes
-> DescribeLoadBalancerAttributes -> Bool
== :: DescribeLoadBalancerAttributes
-> DescribeLoadBalancerAttributes -> Bool
$c== :: DescribeLoadBalancerAttributes
-> DescribeLoadBalancerAttributes -> Bool
Prelude.Eq, ReadPrec [DescribeLoadBalancerAttributes]
ReadPrec DescribeLoadBalancerAttributes
Int -> ReadS DescribeLoadBalancerAttributes
ReadS [DescribeLoadBalancerAttributes]
(Int -> ReadS DescribeLoadBalancerAttributes)
-> ReadS [DescribeLoadBalancerAttributes]
-> ReadPrec DescribeLoadBalancerAttributes
-> ReadPrec [DescribeLoadBalancerAttributes]
-> Read DescribeLoadBalancerAttributes
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DescribeLoadBalancerAttributes]
$creadListPrec :: ReadPrec [DescribeLoadBalancerAttributes]
readPrec :: ReadPrec DescribeLoadBalancerAttributes
$creadPrec :: ReadPrec DescribeLoadBalancerAttributes
readList :: ReadS [DescribeLoadBalancerAttributes]
$creadList :: ReadS [DescribeLoadBalancerAttributes]
readsPrec :: Int -> ReadS DescribeLoadBalancerAttributes
$creadsPrec :: Int -> ReadS DescribeLoadBalancerAttributes
Prelude.Read, Int -> DescribeLoadBalancerAttributes -> ShowS
[DescribeLoadBalancerAttributes] -> ShowS
DescribeLoadBalancerAttributes -> String
(Int -> DescribeLoadBalancerAttributes -> ShowS)
-> (DescribeLoadBalancerAttributes -> String)
-> ([DescribeLoadBalancerAttributes] -> ShowS)
-> Show DescribeLoadBalancerAttributes
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DescribeLoadBalancerAttributes] -> ShowS
$cshowList :: [DescribeLoadBalancerAttributes] -> ShowS
show :: DescribeLoadBalancerAttributes -> String
$cshow :: DescribeLoadBalancerAttributes -> String
showsPrec :: Int -> DescribeLoadBalancerAttributes -> ShowS
$cshowsPrec :: Int -> DescribeLoadBalancerAttributes -> ShowS
Prelude.Show, (forall x.
DescribeLoadBalancerAttributes
-> Rep DescribeLoadBalancerAttributes x)
-> (forall x.
Rep DescribeLoadBalancerAttributes x
-> DescribeLoadBalancerAttributes)
-> Generic DescribeLoadBalancerAttributes
forall x.
Rep DescribeLoadBalancerAttributes x
-> DescribeLoadBalancerAttributes
forall x.
DescribeLoadBalancerAttributes
-> Rep DescribeLoadBalancerAttributes x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep DescribeLoadBalancerAttributes x
-> DescribeLoadBalancerAttributes
$cfrom :: forall x.
DescribeLoadBalancerAttributes
-> Rep DescribeLoadBalancerAttributes x
Prelude.Generic)
newDescribeLoadBalancerAttributes ::
Prelude.Text ->
DescribeLoadBalancerAttributes
newDescribeLoadBalancerAttributes :: Text -> DescribeLoadBalancerAttributes
newDescribeLoadBalancerAttributes Text
pLoadBalancerName_ =
DescribeLoadBalancerAttributes' :: Text -> DescribeLoadBalancerAttributes
DescribeLoadBalancerAttributes'
{ $sel:loadBalancerName:DescribeLoadBalancerAttributes' :: Text
loadBalancerName =
Text
pLoadBalancerName_
}
describeLoadBalancerAttributes_loadBalancerName :: Lens.Lens' DescribeLoadBalancerAttributes Prelude.Text
describeLoadBalancerAttributes_loadBalancerName :: (Text -> f Text)
-> DescribeLoadBalancerAttributes
-> f DescribeLoadBalancerAttributes
describeLoadBalancerAttributes_loadBalancerName = (DescribeLoadBalancerAttributes -> Text)
-> (DescribeLoadBalancerAttributes
-> Text -> DescribeLoadBalancerAttributes)
-> Lens
DescribeLoadBalancerAttributes
DescribeLoadBalancerAttributes
Text
Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeLoadBalancerAttributes' {Text
loadBalancerName :: Text
$sel:loadBalancerName:DescribeLoadBalancerAttributes' :: DescribeLoadBalancerAttributes -> Text
loadBalancerName} -> Text
loadBalancerName) (\s :: DescribeLoadBalancerAttributes
s@DescribeLoadBalancerAttributes' {} Text
a -> DescribeLoadBalancerAttributes
s {$sel:loadBalancerName:DescribeLoadBalancerAttributes' :: Text
loadBalancerName = Text
a} :: DescribeLoadBalancerAttributes)
instance
Core.AWSRequest
DescribeLoadBalancerAttributes
where
type
AWSResponse DescribeLoadBalancerAttributes =
DescribeLoadBalancerAttributesResponse
request :: DescribeLoadBalancerAttributes
-> Request DescribeLoadBalancerAttributes
request = Service
-> DescribeLoadBalancerAttributes
-> Request DescribeLoadBalancerAttributes
forall a. ToRequest a => Service -> a -> Request a
Request.postQuery Service
defaultService
response :: Logger
-> Service
-> Proxy DescribeLoadBalancerAttributes
-> ClientResponse ClientBody
-> m (Either
Error
(ClientResponse (AWSResponse DescribeLoadBalancerAttributes)))
response =
Text
-> (Int
-> ResponseHeaders
-> [Node]
-> Either String (AWSResponse DescribeLoadBalancerAttributes))
-> Logger
-> Service
-> Proxy DescribeLoadBalancerAttributes
-> ClientResponse ClientBody
-> m (Either
Error
(ClientResponse (AWSResponse DescribeLoadBalancerAttributes)))
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
"DescribeLoadBalancerAttributesResult"
( \Int
s ResponseHeaders
h [Node]
x ->
Maybe LoadBalancerAttributes
-> Int -> DescribeLoadBalancerAttributesResponse
DescribeLoadBalancerAttributesResponse'
(Maybe LoadBalancerAttributes
-> Int -> DescribeLoadBalancerAttributesResponse)
-> Either String (Maybe LoadBalancerAttributes)
-> Either String (Int -> DescribeLoadBalancerAttributesResponse)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> ([Node]
x [Node] -> Text -> Either String (Maybe LoadBalancerAttributes)
forall a. FromXML a => [Node] -> Text -> Either String (Maybe a)
Core..@? Text
"LoadBalancerAttributes")
Either String (Int -> DescribeLoadBalancerAttributesResponse)
-> Either String Int
-> Either String DescribeLoadBalancerAttributesResponse
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
DescribeLoadBalancerAttributes
instance
Prelude.NFData
DescribeLoadBalancerAttributes
instance
Core.ToHeaders
DescribeLoadBalancerAttributes
where
toHeaders :: DescribeLoadBalancerAttributes -> ResponseHeaders
toHeaders = ResponseHeaders
-> DescribeLoadBalancerAttributes -> ResponseHeaders
forall a b. a -> b -> a
Prelude.const ResponseHeaders
forall a. Monoid a => a
Prelude.mempty
instance Core.ToPath DescribeLoadBalancerAttributes where
toPath :: DescribeLoadBalancerAttributes -> ByteString
toPath = ByteString -> DescribeLoadBalancerAttributes -> ByteString
forall a b. a -> b -> a
Prelude.const ByteString
"/"
instance Core.ToQuery DescribeLoadBalancerAttributes where
toQuery :: DescribeLoadBalancerAttributes -> QueryString
toQuery DescribeLoadBalancerAttributes' {Text
loadBalancerName :: Text
$sel:loadBalancerName:DescribeLoadBalancerAttributes' :: DescribeLoadBalancerAttributes -> Text
..} =
[QueryString] -> QueryString
forall a. Monoid a => [a] -> a
Prelude.mconcat
[ ByteString
"Action"
ByteString -> ByteString -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: ( ByteString
"DescribeLoadBalancerAttributes" ::
Prelude.ByteString
),
ByteString
"Version"
ByteString -> ByteString -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: (ByteString
"2012-06-01" :: Prelude.ByteString),
ByteString
"LoadBalancerName" ByteString -> Text -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Text
loadBalancerName
]
data DescribeLoadBalancerAttributesResponse = DescribeLoadBalancerAttributesResponse'
{
DescribeLoadBalancerAttributesResponse
-> Maybe LoadBalancerAttributes
loadBalancerAttributes :: Prelude.Maybe LoadBalancerAttributes,
DescribeLoadBalancerAttributesResponse -> Int
httpStatus :: Prelude.Int
}
deriving (DescribeLoadBalancerAttributesResponse
-> DescribeLoadBalancerAttributesResponse -> Bool
(DescribeLoadBalancerAttributesResponse
-> DescribeLoadBalancerAttributesResponse -> Bool)
-> (DescribeLoadBalancerAttributesResponse
-> DescribeLoadBalancerAttributesResponse -> Bool)
-> Eq DescribeLoadBalancerAttributesResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DescribeLoadBalancerAttributesResponse
-> DescribeLoadBalancerAttributesResponse -> Bool
$c/= :: DescribeLoadBalancerAttributesResponse
-> DescribeLoadBalancerAttributesResponse -> Bool
== :: DescribeLoadBalancerAttributesResponse
-> DescribeLoadBalancerAttributesResponse -> Bool
$c== :: DescribeLoadBalancerAttributesResponse
-> DescribeLoadBalancerAttributesResponse -> Bool
Prelude.Eq, ReadPrec [DescribeLoadBalancerAttributesResponse]
ReadPrec DescribeLoadBalancerAttributesResponse
Int -> ReadS DescribeLoadBalancerAttributesResponse
ReadS [DescribeLoadBalancerAttributesResponse]
(Int -> ReadS DescribeLoadBalancerAttributesResponse)
-> ReadS [DescribeLoadBalancerAttributesResponse]
-> ReadPrec DescribeLoadBalancerAttributesResponse
-> ReadPrec [DescribeLoadBalancerAttributesResponse]
-> Read DescribeLoadBalancerAttributesResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DescribeLoadBalancerAttributesResponse]
$creadListPrec :: ReadPrec [DescribeLoadBalancerAttributesResponse]
readPrec :: ReadPrec DescribeLoadBalancerAttributesResponse
$creadPrec :: ReadPrec DescribeLoadBalancerAttributesResponse
readList :: ReadS [DescribeLoadBalancerAttributesResponse]
$creadList :: ReadS [DescribeLoadBalancerAttributesResponse]
readsPrec :: Int -> ReadS DescribeLoadBalancerAttributesResponse
$creadsPrec :: Int -> ReadS DescribeLoadBalancerAttributesResponse
Prelude.Read, Int -> DescribeLoadBalancerAttributesResponse -> ShowS
[DescribeLoadBalancerAttributesResponse] -> ShowS
DescribeLoadBalancerAttributesResponse -> String
(Int -> DescribeLoadBalancerAttributesResponse -> ShowS)
-> (DescribeLoadBalancerAttributesResponse -> String)
-> ([DescribeLoadBalancerAttributesResponse] -> ShowS)
-> Show DescribeLoadBalancerAttributesResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DescribeLoadBalancerAttributesResponse] -> ShowS
$cshowList :: [DescribeLoadBalancerAttributesResponse] -> ShowS
show :: DescribeLoadBalancerAttributesResponse -> String
$cshow :: DescribeLoadBalancerAttributesResponse -> String
showsPrec :: Int -> DescribeLoadBalancerAttributesResponse -> ShowS
$cshowsPrec :: Int -> DescribeLoadBalancerAttributesResponse -> ShowS
Prelude.Show, (forall x.
DescribeLoadBalancerAttributesResponse
-> Rep DescribeLoadBalancerAttributesResponse x)
-> (forall x.
Rep DescribeLoadBalancerAttributesResponse x
-> DescribeLoadBalancerAttributesResponse)
-> Generic DescribeLoadBalancerAttributesResponse
forall x.
Rep DescribeLoadBalancerAttributesResponse x
-> DescribeLoadBalancerAttributesResponse
forall x.
DescribeLoadBalancerAttributesResponse
-> Rep DescribeLoadBalancerAttributesResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep DescribeLoadBalancerAttributesResponse x
-> DescribeLoadBalancerAttributesResponse
$cfrom :: forall x.
DescribeLoadBalancerAttributesResponse
-> Rep DescribeLoadBalancerAttributesResponse x
Prelude.Generic)
newDescribeLoadBalancerAttributesResponse ::
Prelude.Int ->
DescribeLoadBalancerAttributesResponse
newDescribeLoadBalancerAttributesResponse :: Int -> DescribeLoadBalancerAttributesResponse
newDescribeLoadBalancerAttributesResponse
Int
pHttpStatus_ =
DescribeLoadBalancerAttributesResponse' :: Maybe LoadBalancerAttributes
-> Int -> DescribeLoadBalancerAttributesResponse
DescribeLoadBalancerAttributesResponse'
{ $sel:loadBalancerAttributes:DescribeLoadBalancerAttributesResponse' :: Maybe LoadBalancerAttributes
loadBalancerAttributes =
Maybe LoadBalancerAttributes
forall a. Maybe a
Prelude.Nothing,
$sel:httpStatus:DescribeLoadBalancerAttributesResponse' :: Int
httpStatus = Int
pHttpStatus_
}
describeLoadBalancerAttributesResponse_loadBalancerAttributes :: Lens.Lens' DescribeLoadBalancerAttributesResponse (Prelude.Maybe LoadBalancerAttributes)
describeLoadBalancerAttributesResponse_loadBalancerAttributes :: (Maybe LoadBalancerAttributes -> f (Maybe LoadBalancerAttributes))
-> DescribeLoadBalancerAttributesResponse
-> f DescribeLoadBalancerAttributesResponse
describeLoadBalancerAttributesResponse_loadBalancerAttributes = (DescribeLoadBalancerAttributesResponse
-> Maybe LoadBalancerAttributes)
-> (DescribeLoadBalancerAttributesResponse
-> Maybe LoadBalancerAttributes
-> DescribeLoadBalancerAttributesResponse)
-> Lens
DescribeLoadBalancerAttributesResponse
DescribeLoadBalancerAttributesResponse
(Maybe LoadBalancerAttributes)
(Maybe LoadBalancerAttributes)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeLoadBalancerAttributesResponse' {Maybe LoadBalancerAttributes
loadBalancerAttributes :: Maybe LoadBalancerAttributes
$sel:loadBalancerAttributes:DescribeLoadBalancerAttributesResponse' :: DescribeLoadBalancerAttributesResponse
-> Maybe LoadBalancerAttributes
loadBalancerAttributes} -> Maybe LoadBalancerAttributes
loadBalancerAttributes) (\s :: DescribeLoadBalancerAttributesResponse
s@DescribeLoadBalancerAttributesResponse' {} Maybe LoadBalancerAttributes
a -> DescribeLoadBalancerAttributesResponse
s {$sel:loadBalancerAttributes:DescribeLoadBalancerAttributesResponse' :: Maybe LoadBalancerAttributes
loadBalancerAttributes = Maybe LoadBalancerAttributes
a} :: DescribeLoadBalancerAttributesResponse)
describeLoadBalancerAttributesResponse_httpStatus :: Lens.Lens' DescribeLoadBalancerAttributesResponse Prelude.Int
describeLoadBalancerAttributesResponse_httpStatus :: (Int -> f Int)
-> DescribeLoadBalancerAttributesResponse
-> f DescribeLoadBalancerAttributesResponse
describeLoadBalancerAttributesResponse_httpStatus = (DescribeLoadBalancerAttributesResponse -> Int)
-> (DescribeLoadBalancerAttributesResponse
-> Int -> DescribeLoadBalancerAttributesResponse)
-> Lens
DescribeLoadBalancerAttributesResponse
DescribeLoadBalancerAttributesResponse
Int
Int
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeLoadBalancerAttributesResponse' {Int
httpStatus :: Int
$sel:httpStatus:DescribeLoadBalancerAttributesResponse' :: DescribeLoadBalancerAttributesResponse -> Int
httpStatus} -> Int
httpStatus) (\s :: DescribeLoadBalancerAttributesResponse
s@DescribeLoadBalancerAttributesResponse' {} Int
a -> DescribeLoadBalancerAttributesResponse
s {$sel:httpStatus:DescribeLoadBalancerAttributesResponse' :: Int
httpStatus = Int
a} :: DescribeLoadBalancerAttributesResponse)
instance
Prelude.NFData
DescribeLoadBalancerAttributesResponse