{-# 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.ELBV2.DescribeLoadBalancerAttributes
(
DescribeLoadBalancerAttributes (..),
newDescribeLoadBalancerAttributes,
describeLoadBalancerAttributes_loadBalancerArn,
DescribeLoadBalancerAttributesResponse (..),
newDescribeLoadBalancerAttributesResponse,
describeLoadBalancerAttributesResponse_attributes,
describeLoadBalancerAttributesResponse_httpStatus,
)
where
import qualified Amazonka.Core as Core
import Amazonka.ELBV2.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
loadBalancerArn :: 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
pLoadBalancerArn_ =
DescribeLoadBalancerAttributes' :: Text -> DescribeLoadBalancerAttributes
DescribeLoadBalancerAttributes'
{ $sel:loadBalancerArn:DescribeLoadBalancerAttributes' :: Text
loadBalancerArn =
Text
pLoadBalancerArn_
}
describeLoadBalancerAttributes_loadBalancerArn :: Lens.Lens' DescribeLoadBalancerAttributes Prelude.Text
describeLoadBalancerAttributes_loadBalancerArn :: (Text -> f Text)
-> DescribeLoadBalancerAttributes
-> f DescribeLoadBalancerAttributes
describeLoadBalancerAttributes_loadBalancerArn = (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
loadBalancerArn :: Text
$sel:loadBalancerArn:DescribeLoadBalancerAttributes' :: DescribeLoadBalancerAttributes -> Text
loadBalancerArn} -> Text
loadBalancerArn) (\s :: DescribeLoadBalancerAttributes
s@DescribeLoadBalancerAttributes' {} Text
a -> DescribeLoadBalancerAttributes
s {$sel:loadBalancerArn:DescribeLoadBalancerAttributes' :: Text
loadBalancerArn = 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 [LoadBalancerAttribute]
-> Int -> DescribeLoadBalancerAttributesResponse
DescribeLoadBalancerAttributesResponse'
(Maybe [LoadBalancerAttribute]
-> Int -> DescribeLoadBalancerAttributesResponse)
-> Either String (Maybe [LoadBalancerAttribute])
-> Either String (Int -> DescribeLoadBalancerAttributesResponse)
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
"Attributes" 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 [LoadBalancerAttribute]))
-> Either String (Maybe [LoadBalancerAttribute])
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
Prelude.>>= ([Node] -> Either String [LoadBalancerAttribute])
-> [Node] -> Either String (Maybe [LoadBalancerAttribute])
forall (f :: * -> *) a b.
Applicative f =>
([a] -> f b) -> [a] -> f (Maybe b)
Core.may (Text -> [Node] -> Either String [LoadBalancerAttribute]
forall a. FromXML a => Text -> [Node] -> Either String [a]
Core.parseXMLList Text
"member")
)
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
loadBalancerArn :: Text
$sel:loadBalancerArn: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
"2015-12-01" :: Prelude.ByteString),
ByteString
"LoadBalancerArn" ByteString -> Text -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Text
loadBalancerArn
]
data DescribeLoadBalancerAttributesResponse = DescribeLoadBalancerAttributesResponse'
{
DescribeLoadBalancerAttributesResponse
-> Maybe [LoadBalancerAttribute]
attributes :: Prelude.Maybe [LoadBalancerAttribute],
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 [LoadBalancerAttribute]
-> Int -> DescribeLoadBalancerAttributesResponse
DescribeLoadBalancerAttributesResponse'
{ $sel:attributes:DescribeLoadBalancerAttributesResponse' :: Maybe [LoadBalancerAttribute]
attributes =
Maybe [LoadBalancerAttribute]
forall a. Maybe a
Prelude.Nothing,
$sel:httpStatus:DescribeLoadBalancerAttributesResponse' :: Int
httpStatus = Int
pHttpStatus_
}
describeLoadBalancerAttributesResponse_attributes :: Lens.Lens' DescribeLoadBalancerAttributesResponse (Prelude.Maybe [LoadBalancerAttribute])
describeLoadBalancerAttributesResponse_attributes :: (Maybe [LoadBalancerAttribute]
-> f (Maybe [LoadBalancerAttribute]))
-> DescribeLoadBalancerAttributesResponse
-> f DescribeLoadBalancerAttributesResponse
describeLoadBalancerAttributesResponse_attributes = (DescribeLoadBalancerAttributesResponse
-> Maybe [LoadBalancerAttribute])
-> (DescribeLoadBalancerAttributesResponse
-> Maybe [LoadBalancerAttribute]
-> DescribeLoadBalancerAttributesResponse)
-> Lens
DescribeLoadBalancerAttributesResponse
DescribeLoadBalancerAttributesResponse
(Maybe [LoadBalancerAttribute])
(Maybe [LoadBalancerAttribute])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeLoadBalancerAttributesResponse' {Maybe [LoadBalancerAttribute]
attributes :: Maybe [LoadBalancerAttribute]
$sel:attributes:DescribeLoadBalancerAttributesResponse' :: DescribeLoadBalancerAttributesResponse
-> Maybe [LoadBalancerAttribute]
attributes} -> Maybe [LoadBalancerAttribute]
attributes) (\s :: DescribeLoadBalancerAttributesResponse
s@DescribeLoadBalancerAttributesResponse' {} Maybe [LoadBalancerAttribute]
a -> DescribeLoadBalancerAttributesResponse
s {$sel:attributes:DescribeLoadBalancerAttributesResponse' :: Maybe [LoadBalancerAttribute]
attributes = Maybe [LoadBalancerAttribute]
a} :: DescribeLoadBalancerAttributesResponse) ((Maybe [LoadBalancerAttribute]
-> f (Maybe [LoadBalancerAttribute]))
-> DescribeLoadBalancerAttributesResponse
-> f DescribeLoadBalancerAttributesResponse)
-> ((Maybe [LoadBalancerAttribute]
-> f (Maybe [LoadBalancerAttribute]))
-> Maybe [LoadBalancerAttribute]
-> f (Maybe [LoadBalancerAttribute]))
-> (Maybe [LoadBalancerAttribute]
-> f (Maybe [LoadBalancerAttribute]))
-> DescribeLoadBalancerAttributesResponse
-> f DescribeLoadBalancerAttributesResponse
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso
[LoadBalancerAttribute]
[LoadBalancerAttribute]
[LoadBalancerAttribute]
[LoadBalancerAttribute]
-> Iso
(Maybe [LoadBalancerAttribute])
(Maybe [LoadBalancerAttribute])
(Maybe [LoadBalancerAttribute])
(Maybe [LoadBalancerAttribute])
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
[LoadBalancerAttribute]
[LoadBalancerAttribute]
[LoadBalancerAttribute]
[LoadBalancerAttribute]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
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