{-# 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.DescribeTargetGroupAttributes
(
DescribeTargetGroupAttributes (..),
newDescribeTargetGroupAttributes,
describeTargetGroupAttributes_targetGroupArn,
DescribeTargetGroupAttributesResponse (..),
newDescribeTargetGroupAttributesResponse,
describeTargetGroupAttributesResponse_attributes,
describeTargetGroupAttributesResponse_httpStatus,
)
where
import qualified Amazonka.Core as Core
import qualified Amazonka.Core.Lens.Internal as Lens
import qualified Amazonka.Data as Data
import Amazonka.ELBV2.Types
import qualified Amazonka.Prelude as Prelude
import qualified Amazonka.Request as Request
import qualified Amazonka.Response as Response
data DescribeTargetGroupAttributes = DescribeTargetGroupAttributes'
{
DescribeTargetGroupAttributes -> Text
targetGroupArn :: Prelude.Text
}
deriving (DescribeTargetGroupAttributes
-> DescribeTargetGroupAttributes -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DescribeTargetGroupAttributes
-> DescribeTargetGroupAttributes -> Bool
$c/= :: DescribeTargetGroupAttributes
-> DescribeTargetGroupAttributes -> Bool
== :: DescribeTargetGroupAttributes
-> DescribeTargetGroupAttributes -> Bool
$c== :: DescribeTargetGroupAttributes
-> DescribeTargetGroupAttributes -> Bool
Prelude.Eq, ReadPrec [DescribeTargetGroupAttributes]
ReadPrec DescribeTargetGroupAttributes
Int -> ReadS DescribeTargetGroupAttributes
ReadS [DescribeTargetGroupAttributes]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DescribeTargetGroupAttributes]
$creadListPrec :: ReadPrec [DescribeTargetGroupAttributes]
readPrec :: ReadPrec DescribeTargetGroupAttributes
$creadPrec :: ReadPrec DescribeTargetGroupAttributes
readList :: ReadS [DescribeTargetGroupAttributes]
$creadList :: ReadS [DescribeTargetGroupAttributes]
readsPrec :: Int -> ReadS DescribeTargetGroupAttributes
$creadsPrec :: Int -> ReadS DescribeTargetGroupAttributes
Prelude.Read, Int -> DescribeTargetGroupAttributes -> ShowS
[DescribeTargetGroupAttributes] -> ShowS
DescribeTargetGroupAttributes -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DescribeTargetGroupAttributes] -> ShowS
$cshowList :: [DescribeTargetGroupAttributes] -> ShowS
show :: DescribeTargetGroupAttributes -> String
$cshow :: DescribeTargetGroupAttributes -> String
showsPrec :: Int -> DescribeTargetGroupAttributes -> ShowS
$cshowsPrec :: Int -> DescribeTargetGroupAttributes -> ShowS
Prelude.Show, forall x.
Rep DescribeTargetGroupAttributes x
-> DescribeTargetGroupAttributes
forall x.
DescribeTargetGroupAttributes
-> Rep DescribeTargetGroupAttributes x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep DescribeTargetGroupAttributes x
-> DescribeTargetGroupAttributes
$cfrom :: forall x.
DescribeTargetGroupAttributes
-> Rep DescribeTargetGroupAttributes x
Prelude.Generic)
newDescribeTargetGroupAttributes ::
Prelude.Text ->
DescribeTargetGroupAttributes
newDescribeTargetGroupAttributes :: Text -> DescribeTargetGroupAttributes
newDescribeTargetGroupAttributes Text
pTargetGroupArn_ =
DescribeTargetGroupAttributes'
{ $sel:targetGroupArn:DescribeTargetGroupAttributes' :: Text
targetGroupArn =
Text
pTargetGroupArn_
}
describeTargetGroupAttributes_targetGroupArn :: Lens.Lens' DescribeTargetGroupAttributes Prelude.Text
describeTargetGroupAttributes_targetGroupArn :: Lens' DescribeTargetGroupAttributes Text
describeTargetGroupAttributes_targetGroupArn = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeTargetGroupAttributes' {Text
targetGroupArn :: Text
$sel:targetGroupArn:DescribeTargetGroupAttributes' :: DescribeTargetGroupAttributes -> Text
targetGroupArn} -> Text
targetGroupArn) (\s :: DescribeTargetGroupAttributes
s@DescribeTargetGroupAttributes' {} Text
a -> DescribeTargetGroupAttributes
s {$sel:targetGroupArn:DescribeTargetGroupAttributes' :: Text
targetGroupArn = Text
a} :: DescribeTargetGroupAttributes)
instance
Core.AWSRequest
DescribeTargetGroupAttributes
where
type
AWSResponse DescribeTargetGroupAttributes =
DescribeTargetGroupAttributesResponse
request :: (Service -> Service)
-> DescribeTargetGroupAttributes
-> Request DescribeTargetGroupAttributes
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 DescribeTargetGroupAttributes
-> ClientResponse ClientBody
-> m (Either
Error (ClientResponse (AWSResponse DescribeTargetGroupAttributes)))
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
"DescribeTargetGroupAttributesResult"
( \Int
s ResponseHeaders
h [Node]
x ->
Maybe [TargetGroupAttribute]
-> Int -> DescribeTargetGroupAttributesResponse
DescribeTargetGroupAttributesResponse'
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
"Attributes"
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
DescribeTargetGroupAttributes
where
hashWithSalt :: Int -> DescribeTargetGroupAttributes -> Int
hashWithSalt Int
_salt DescribeTargetGroupAttributes' {Text
targetGroupArn :: Text
$sel:targetGroupArn:DescribeTargetGroupAttributes' :: DescribeTargetGroupAttributes -> Text
..} =
Int
_salt forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
targetGroupArn
instance Prelude.NFData DescribeTargetGroupAttributes where
rnf :: DescribeTargetGroupAttributes -> ()
rnf DescribeTargetGroupAttributes' {Text
targetGroupArn :: Text
$sel:targetGroupArn:DescribeTargetGroupAttributes' :: DescribeTargetGroupAttributes -> Text
..} =
forall a. NFData a => a -> ()
Prelude.rnf Text
targetGroupArn
instance Data.ToHeaders DescribeTargetGroupAttributes where
toHeaders :: DescribeTargetGroupAttributes -> ResponseHeaders
toHeaders = forall a b. a -> b -> a
Prelude.const forall a. Monoid a => a
Prelude.mempty
instance Data.ToPath DescribeTargetGroupAttributes where
toPath :: DescribeTargetGroupAttributes -> ByteString
toPath = forall a b. a -> b -> a
Prelude.const ByteString
"/"
instance Data.ToQuery DescribeTargetGroupAttributes where
toQuery :: DescribeTargetGroupAttributes -> QueryString
toQuery DescribeTargetGroupAttributes' {Text
targetGroupArn :: Text
$sel:targetGroupArn:DescribeTargetGroupAttributes' :: DescribeTargetGroupAttributes -> Text
..} =
forall a. Monoid a => [a] -> a
Prelude.mconcat
[ ByteString
"Action"
forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: ( ByteString
"DescribeTargetGroupAttributes" ::
Prelude.ByteString
),
ByteString
"Version"
forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: (ByteString
"2015-12-01" :: Prelude.ByteString),
ByteString
"TargetGroupArn" forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: Text
targetGroupArn
]
data DescribeTargetGroupAttributesResponse = DescribeTargetGroupAttributesResponse'
{
DescribeTargetGroupAttributesResponse
-> Maybe [TargetGroupAttribute]
attributes :: Prelude.Maybe [TargetGroupAttribute],
DescribeTargetGroupAttributesResponse -> Int
httpStatus :: Prelude.Int
}
deriving (DescribeTargetGroupAttributesResponse
-> DescribeTargetGroupAttributesResponse -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DescribeTargetGroupAttributesResponse
-> DescribeTargetGroupAttributesResponse -> Bool
$c/= :: DescribeTargetGroupAttributesResponse
-> DescribeTargetGroupAttributesResponse -> Bool
== :: DescribeTargetGroupAttributesResponse
-> DescribeTargetGroupAttributesResponse -> Bool
$c== :: DescribeTargetGroupAttributesResponse
-> DescribeTargetGroupAttributesResponse -> Bool
Prelude.Eq, ReadPrec [DescribeTargetGroupAttributesResponse]
ReadPrec DescribeTargetGroupAttributesResponse
Int -> ReadS DescribeTargetGroupAttributesResponse
ReadS [DescribeTargetGroupAttributesResponse]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DescribeTargetGroupAttributesResponse]
$creadListPrec :: ReadPrec [DescribeTargetGroupAttributesResponse]
readPrec :: ReadPrec DescribeTargetGroupAttributesResponse
$creadPrec :: ReadPrec DescribeTargetGroupAttributesResponse
readList :: ReadS [DescribeTargetGroupAttributesResponse]
$creadList :: ReadS [DescribeTargetGroupAttributesResponse]
readsPrec :: Int -> ReadS DescribeTargetGroupAttributesResponse
$creadsPrec :: Int -> ReadS DescribeTargetGroupAttributesResponse
Prelude.Read, Int -> DescribeTargetGroupAttributesResponse -> ShowS
[DescribeTargetGroupAttributesResponse] -> ShowS
DescribeTargetGroupAttributesResponse -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DescribeTargetGroupAttributesResponse] -> ShowS
$cshowList :: [DescribeTargetGroupAttributesResponse] -> ShowS
show :: DescribeTargetGroupAttributesResponse -> String
$cshow :: DescribeTargetGroupAttributesResponse -> String
showsPrec :: Int -> DescribeTargetGroupAttributesResponse -> ShowS
$cshowsPrec :: Int -> DescribeTargetGroupAttributesResponse -> ShowS
Prelude.Show, forall x.
Rep DescribeTargetGroupAttributesResponse x
-> DescribeTargetGroupAttributesResponse
forall x.
DescribeTargetGroupAttributesResponse
-> Rep DescribeTargetGroupAttributesResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep DescribeTargetGroupAttributesResponse x
-> DescribeTargetGroupAttributesResponse
$cfrom :: forall x.
DescribeTargetGroupAttributesResponse
-> Rep DescribeTargetGroupAttributesResponse x
Prelude.Generic)
newDescribeTargetGroupAttributesResponse ::
Prelude.Int ->
DescribeTargetGroupAttributesResponse
newDescribeTargetGroupAttributesResponse :: Int -> DescribeTargetGroupAttributesResponse
newDescribeTargetGroupAttributesResponse Int
pHttpStatus_ =
DescribeTargetGroupAttributesResponse'
{ $sel:attributes:DescribeTargetGroupAttributesResponse' :: Maybe [TargetGroupAttribute]
attributes =
forall a. Maybe a
Prelude.Nothing,
$sel:httpStatus:DescribeTargetGroupAttributesResponse' :: Int
httpStatus = Int
pHttpStatus_
}
describeTargetGroupAttributesResponse_attributes :: Lens.Lens' DescribeTargetGroupAttributesResponse (Prelude.Maybe [TargetGroupAttribute])
describeTargetGroupAttributesResponse_attributes :: Lens'
DescribeTargetGroupAttributesResponse
(Maybe [TargetGroupAttribute])
describeTargetGroupAttributesResponse_attributes = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeTargetGroupAttributesResponse' {Maybe [TargetGroupAttribute]
attributes :: Maybe [TargetGroupAttribute]
$sel:attributes:DescribeTargetGroupAttributesResponse' :: DescribeTargetGroupAttributesResponse
-> Maybe [TargetGroupAttribute]
attributes} -> Maybe [TargetGroupAttribute]
attributes) (\s :: DescribeTargetGroupAttributesResponse
s@DescribeTargetGroupAttributesResponse' {} Maybe [TargetGroupAttribute]
a -> DescribeTargetGroupAttributesResponse
s {$sel:attributes:DescribeTargetGroupAttributesResponse' :: Maybe [TargetGroupAttribute]
attributes = Maybe [TargetGroupAttribute]
a} :: DescribeTargetGroupAttributesResponse) 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
describeTargetGroupAttributesResponse_httpStatus :: Lens.Lens' DescribeTargetGroupAttributesResponse Prelude.Int
describeTargetGroupAttributesResponse_httpStatus :: Lens' DescribeTargetGroupAttributesResponse Int
describeTargetGroupAttributesResponse_httpStatus = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeTargetGroupAttributesResponse' {Int
httpStatus :: Int
$sel:httpStatus:DescribeTargetGroupAttributesResponse' :: DescribeTargetGroupAttributesResponse -> Int
httpStatus} -> Int
httpStatus) (\s :: DescribeTargetGroupAttributesResponse
s@DescribeTargetGroupAttributesResponse' {} Int
a -> DescribeTargetGroupAttributesResponse
s {$sel:httpStatus:DescribeTargetGroupAttributesResponse' :: Int
httpStatus = Int
a} :: DescribeTargetGroupAttributesResponse)
instance
Prelude.NFData
DescribeTargetGroupAttributesResponse
where
rnf :: DescribeTargetGroupAttributesResponse -> ()
rnf DescribeTargetGroupAttributesResponse' {Int
Maybe [TargetGroupAttribute]
httpStatus :: Int
attributes :: Maybe [TargetGroupAttribute]
$sel:httpStatus:DescribeTargetGroupAttributesResponse' :: DescribeTargetGroupAttributesResponse -> Int
$sel:attributes:DescribeTargetGroupAttributesResponse' :: DescribeTargetGroupAttributesResponse
-> Maybe [TargetGroupAttribute]
..} =
forall a. NFData a => a -> ()
Prelude.rnf Maybe [TargetGroupAttribute]
attributes
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Int
httpStatus