{-# 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.SetLoadBalancerPoliciesOfListener
(
SetLoadBalancerPoliciesOfListener (..),
newSetLoadBalancerPoliciesOfListener,
setLoadBalancerPoliciesOfListener_loadBalancerName,
setLoadBalancerPoliciesOfListener_loadBalancerPort,
setLoadBalancerPoliciesOfListener_policyNames,
SetLoadBalancerPoliciesOfListenerResponse (..),
newSetLoadBalancerPoliciesOfListenerResponse,
setLoadBalancerPoliciesOfListenerResponse_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 SetLoadBalancerPoliciesOfListener = SetLoadBalancerPoliciesOfListener'
{
SetLoadBalancerPoliciesOfListener -> Text
loadBalancerName :: Prelude.Text,
SetLoadBalancerPoliciesOfListener -> Int
loadBalancerPort :: Prelude.Int,
SetLoadBalancerPoliciesOfListener -> [Text]
policyNames :: [Prelude.Text]
}
deriving (SetLoadBalancerPoliciesOfListener
-> SetLoadBalancerPoliciesOfListener -> Bool
(SetLoadBalancerPoliciesOfListener
-> SetLoadBalancerPoliciesOfListener -> Bool)
-> (SetLoadBalancerPoliciesOfListener
-> SetLoadBalancerPoliciesOfListener -> Bool)
-> Eq SetLoadBalancerPoliciesOfListener
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: SetLoadBalancerPoliciesOfListener
-> SetLoadBalancerPoliciesOfListener -> Bool
$c/= :: SetLoadBalancerPoliciesOfListener
-> SetLoadBalancerPoliciesOfListener -> Bool
== :: SetLoadBalancerPoliciesOfListener
-> SetLoadBalancerPoliciesOfListener -> Bool
$c== :: SetLoadBalancerPoliciesOfListener
-> SetLoadBalancerPoliciesOfListener -> Bool
Prelude.Eq, ReadPrec [SetLoadBalancerPoliciesOfListener]
ReadPrec SetLoadBalancerPoliciesOfListener
Int -> ReadS SetLoadBalancerPoliciesOfListener
ReadS [SetLoadBalancerPoliciesOfListener]
(Int -> ReadS SetLoadBalancerPoliciesOfListener)
-> ReadS [SetLoadBalancerPoliciesOfListener]
-> ReadPrec SetLoadBalancerPoliciesOfListener
-> ReadPrec [SetLoadBalancerPoliciesOfListener]
-> Read SetLoadBalancerPoliciesOfListener
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [SetLoadBalancerPoliciesOfListener]
$creadListPrec :: ReadPrec [SetLoadBalancerPoliciesOfListener]
readPrec :: ReadPrec SetLoadBalancerPoliciesOfListener
$creadPrec :: ReadPrec SetLoadBalancerPoliciesOfListener
readList :: ReadS [SetLoadBalancerPoliciesOfListener]
$creadList :: ReadS [SetLoadBalancerPoliciesOfListener]
readsPrec :: Int -> ReadS SetLoadBalancerPoliciesOfListener
$creadsPrec :: Int -> ReadS SetLoadBalancerPoliciesOfListener
Prelude.Read, Int -> SetLoadBalancerPoliciesOfListener -> ShowS
[SetLoadBalancerPoliciesOfListener] -> ShowS
SetLoadBalancerPoliciesOfListener -> String
(Int -> SetLoadBalancerPoliciesOfListener -> ShowS)
-> (SetLoadBalancerPoliciesOfListener -> String)
-> ([SetLoadBalancerPoliciesOfListener] -> ShowS)
-> Show SetLoadBalancerPoliciesOfListener
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [SetLoadBalancerPoliciesOfListener] -> ShowS
$cshowList :: [SetLoadBalancerPoliciesOfListener] -> ShowS
show :: SetLoadBalancerPoliciesOfListener -> String
$cshow :: SetLoadBalancerPoliciesOfListener -> String
showsPrec :: Int -> SetLoadBalancerPoliciesOfListener -> ShowS
$cshowsPrec :: Int -> SetLoadBalancerPoliciesOfListener -> ShowS
Prelude.Show, (forall x.
SetLoadBalancerPoliciesOfListener
-> Rep SetLoadBalancerPoliciesOfListener x)
-> (forall x.
Rep SetLoadBalancerPoliciesOfListener x
-> SetLoadBalancerPoliciesOfListener)
-> Generic SetLoadBalancerPoliciesOfListener
forall x.
Rep SetLoadBalancerPoliciesOfListener x
-> SetLoadBalancerPoliciesOfListener
forall x.
SetLoadBalancerPoliciesOfListener
-> Rep SetLoadBalancerPoliciesOfListener x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep SetLoadBalancerPoliciesOfListener x
-> SetLoadBalancerPoliciesOfListener
$cfrom :: forall x.
SetLoadBalancerPoliciesOfListener
-> Rep SetLoadBalancerPoliciesOfListener x
Prelude.Generic)
newSetLoadBalancerPoliciesOfListener ::
Prelude.Text ->
Prelude.Int ->
SetLoadBalancerPoliciesOfListener
newSetLoadBalancerPoliciesOfListener :: Text -> Int -> SetLoadBalancerPoliciesOfListener
newSetLoadBalancerPoliciesOfListener
Text
pLoadBalancerName_
Int
pLoadBalancerPort_ =
SetLoadBalancerPoliciesOfListener' :: Text -> Int -> [Text] -> SetLoadBalancerPoliciesOfListener
SetLoadBalancerPoliciesOfListener'
{ $sel:loadBalancerName:SetLoadBalancerPoliciesOfListener' :: Text
loadBalancerName =
Text
pLoadBalancerName_,
$sel:loadBalancerPort:SetLoadBalancerPoliciesOfListener' :: Int
loadBalancerPort = Int
pLoadBalancerPort_,
$sel:policyNames:SetLoadBalancerPoliciesOfListener' :: [Text]
policyNames = [Text]
forall a. Monoid a => a
Prelude.mempty
}
setLoadBalancerPoliciesOfListener_loadBalancerName :: Lens.Lens' SetLoadBalancerPoliciesOfListener Prelude.Text
setLoadBalancerPoliciesOfListener_loadBalancerName :: (Text -> f Text)
-> SetLoadBalancerPoliciesOfListener
-> f SetLoadBalancerPoliciesOfListener
setLoadBalancerPoliciesOfListener_loadBalancerName = (SetLoadBalancerPoliciesOfListener -> Text)
-> (SetLoadBalancerPoliciesOfListener
-> Text -> SetLoadBalancerPoliciesOfListener)
-> Lens
SetLoadBalancerPoliciesOfListener
SetLoadBalancerPoliciesOfListener
Text
Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\SetLoadBalancerPoliciesOfListener' {Text
loadBalancerName :: Text
$sel:loadBalancerName:SetLoadBalancerPoliciesOfListener' :: SetLoadBalancerPoliciesOfListener -> Text
loadBalancerName} -> Text
loadBalancerName) (\s :: SetLoadBalancerPoliciesOfListener
s@SetLoadBalancerPoliciesOfListener' {} Text
a -> SetLoadBalancerPoliciesOfListener
s {$sel:loadBalancerName:SetLoadBalancerPoliciesOfListener' :: Text
loadBalancerName = Text
a} :: SetLoadBalancerPoliciesOfListener)
setLoadBalancerPoliciesOfListener_loadBalancerPort :: Lens.Lens' SetLoadBalancerPoliciesOfListener Prelude.Int
setLoadBalancerPoliciesOfListener_loadBalancerPort :: (Int -> f Int)
-> SetLoadBalancerPoliciesOfListener
-> f SetLoadBalancerPoliciesOfListener
setLoadBalancerPoliciesOfListener_loadBalancerPort = (SetLoadBalancerPoliciesOfListener -> Int)
-> (SetLoadBalancerPoliciesOfListener
-> Int -> SetLoadBalancerPoliciesOfListener)
-> Lens
SetLoadBalancerPoliciesOfListener
SetLoadBalancerPoliciesOfListener
Int
Int
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\SetLoadBalancerPoliciesOfListener' {Int
loadBalancerPort :: Int
$sel:loadBalancerPort:SetLoadBalancerPoliciesOfListener' :: SetLoadBalancerPoliciesOfListener -> Int
loadBalancerPort} -> Int
loadBalancerPort) (\s :: SetLoadBalancerPoliciesOfListener
s@SetLoadBalancerPoliciesOfListener' {} Int
a -> SetLoadBalancerPoliciesOfListener
s {$sel:loadBalancerPort:SetLoadBalancerPoliciesOfListener' :: Int
loadBalancerPort = Int
a} :: SetLoadBalancerPoliciesOfListener)
setLoadBalancerPoliciesOfListener_policyNames :: Lens.Lens' SetLoadBalancerPoliciesOfListener [Prelude.Text]
setLoadBalancerPoliciesOfListener_policyNames :: ([Text] -> f [Text])
-> SetLoadBalancerPoliciesOfListener
-> f SetLoadBalancerPoliciesOfListener
setLoadBalancerPoliciesOfListener_policyNames = (SetLoadBalancerPoliciesOfListener -> [Text])
-> (SetLoadBalancerPoliciesOfListener
-> [Text] -> SetLoadBalancerPoliciesOfListener)
-> Lens
SetLoadBalancerPoliciesOfListener
SetLoadBalancerPoliciesOfListener
[Text]
[Text]
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\SetLoadBalancerPoliciesOfListener' {[Text]
policyNames :: [Text]
$sel:policyNames:SetLoadBalancerPoliciesOfListener' :: SetLoadBalancerPoliciesOfListener -> [Text]
policyNames} -> [Text]
policyNames) (\s :: SetLoadBalancerPoliciesOfListener
s@SetLoadBalancerPoliciesOfListener' {} [Text]
a -> SetLoadBalancerPoliciesOfListener
s {$sel:policyNames:SetLoadBalancerPoliciesOfListener' :: [Text]
policyNames = [Text]
a} :: SetLoadBalancerPoliciesOfListener) (([Text] -> f [Text])
-> SetLoadBalancerPoliciesOfListener
-> f SetLoadBalancerPoliciesOfListener)
-> (([Text] -> f [Text]) -> [Text] -> f [Text])
-> ([Text] -> f [Text])
-> SetLoadBalancerPoliciesOfListener
-> f SetLoadBalancerPoliciesOfListener
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. ([Text] -> f [Text]) -> [Text] -> f [Text]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
instance
Core.AWSRequest
SetLoadBalancerPoliciesOfListener
where
type
AWSResponse SetLoadBalancerPoliciesOfListener =
SetLoadBalancerPoliciesOfListenerResponse
request :: SetLoadBalancerPoliciesOfListener
-> Request SetLoadBalancerPoliciesOfListener
request = Service
-> SetLoadBalancerPoliciesOfListener
-> Request SetLoadBalancerPoliciesOfListener
forall a. ToRequest a => Service -> a -> Request a
Request.postQuery Service
defaultService
response :: Logger
-> Service
-> Proxy SetLoadBalancerPoliciesOfListener
-> ClientResponse ClientBody
-> m (Either
Error
(ClientResponse (AWSResponse SetLoadBalancerPoliciesOfListener)))
response =
Text
-> (Int
-> ResponseHeaders
-> [Node]
-> Either String (AWSResponse SetLoadBalancerPoliciesOfListener))
-> Logger
-> Service
-> Proxy SetLoadBalancerPoliciesOfListener
-> ClientResponse ClientBody
-> m (Either
Error
(ClientResponse (AWSResponse SetLoadBalancerPoliciesOfListener)))
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
"SetLoadBalancerPoliciesOfListenerResult"
( \Int
s ResponseHeaders
h [Node]
x ->
Int -> SetLoadBalancerPoliciesOfListenerResponse
SetLoadBalancerPoliciesOfListenerResponse'
(Int -> SetLoadBalancerPoliciesOfListenerResponse)
-> Either String Int
-> Either String SetLoadBalancerPoliciesOfListenerResponse
forall (f :: * -> *) a b. Functor 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
SetLoadBalancerPoliciesOfListener
instance
Prelude.NFData
SetLoadBalancerPoliciesOfListener
instance
Core.ToHeaders
SetLoadBalancerPoliciesOfListener
where
toHeaders :: SetLoadBalancerPoliciesOfListener -> ResponseHeaders
toHeaders = ResponseHeaders
-> SetLoadBalancerPoliciesOfListener -> ResponseHeaders
forall a b. a -> b -> a
Prelude.const ResponseHeaders
forall a. Monoid a => a
Prelude.mempty
instance
Core.ToPath
SetLoadBalancerPoliciesOfListener
where
toPath :: SetLoadBalancerPoliciesOfListener -> ByteString
toPath = ByteString -> SetLoadBalancerPoliciesOfListener -> ByteString
forall a b. a -> b -> a
Prelude.const ByteString
"/"
instance
Core.ToQuery
SetLoadBalancerPoliciesOfListener
where
toQuery :: SetLoadBalancerPoliciesOfListener -> QueryString
toQuery SetLoadBalancerPoliciesOfListener' {Int
[Text]
Text
policyNames :: [Text]
loadBalancerPort :: Int
loadBalancerName :: Text
$sel:policyNames:SetLoadBalancerPoliciesOfListener' :: SetLoadBalancerPoliciesOfListener -> [Text]
$sel:loadBalancerPort:SetLoadBalancerPoliciesOfListener' :: SetLoadBalancerPoliciesOfListener -> Int
$sel:loadBalancerName:SetLoadBalancerPoliciesOfListener' :: SetLoadBalancerPoliciesOfListener -> 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
"SetLoadBalancerPoliciesOfListener" ::
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,
ByteString
"LoadBalancerPort" ByteString -> Int -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Int
loadBalancerPort,
ByteString
"PolicyNames"
ByteString -> QueryString -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: ByteString -> [Text] -> QueryString
forall a.
(IsList a, ToQuery (Item a)) =>
ByteString -> a -> QueryString
Core.toQueryList ByteString
"member" [Text]
policyNames
]
data SetLoadBalancerPoliciesOfListenerResponse = SetLoadBalancerPoliciesOfListenerResponse'
{
SetLoadBalancerPoliciesOfListenerResponse -> Int
httpStatus :: Prelude.Int
}
deriving (SetLoadBalancerPoliciesOfListenerResponse
-> SetLoadBalancerPoliciesOfListenerResponse -> Bool
(SetLoadBalancerPoliciesOfListenerResponse
-> SetLoadBalancerPoliciesOfListenerResponse -> Bool)
-> (SetLoadBalancerPoliciesOfListenerResponse
-> SetLoadBalancerPoliciesOfListenerResponse -> Bool)
-> Eq SetLoadBalancerPoliciesOfListenerResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: SetLoadBalancerPoliciesOfListenerResponse
-> SetLoadBalancerPoliciesOfListenerResponse -> Bool
$c/= :: SetLoadBalancerPoliciesOfListenerResponse
-> SetLoadBalancerPoliciesOfListenerResponse -> Bool
== :: SetLoadBalancerPoliciesOfListenerResponse
-> SetLoadBalancerPoliciesOfListenerResponse -> Bool
$c== :: SetLoadBalancerPoliciesOfListenerResponse
-> SetLoadBalancerPoliciesOfListenerResponse -> Bool
Prelude.Eq, ReadPrec [SetLoadBalancerPoliciesOfListenerResponse]
ReadPrec SetLoadBalancerPoliciesOfListenerResponse
Int -> ReadS SetLoadBalancerPoliciesOfListenerResponse
ReadS [SetLoadBalancerPoliciesOfListenerResponse]
(Int -> ReadS SetLoadBalancerPoliciesOfListenerResponse)
-> ReadS [SetLoadBalancerPoliciesOfListenerResponse]
-> ReadPrec SetLoadBalancerPoliciesOfListenerResponse
-> ReadPrec [SetLoadBalancerPoliciesOfListenerResponse]
-> Read SetLoadBalancerPoliciesOfListenerResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [SetLoadBalancerPoliciesOfListenerResponse]
$creadListPrec :: ReadPrec [SetLoadBalancerPoliciesOfListenerResponse]
readPrec :: ReadPrec SetLoadBalancerPoliciesOfListenerResponse
$creadPrec :: ReadPrec SetLoadBalancerPoliciesOfListenerResponse
readList :: ReadS [SetLoadBalancerPoliciesOfListenerResponse]
$creadList :: ReadS [SetLoadBalancerPoliciesOfListenerResponse]
readsPrec :: Int -> ReadS SetLoadBalancerPoliciesOfListenerResponse
$creadsPrec :: Int -> ReadS SetLoadBalancerPoliciesOfListenerResponse
Prelude.Read, Int -> SetLoadBalancerPoliciesOfListenerResponse -> ShowS
[SetLoadBalancerPoliciesOfListenerResponse] -> ShowS
SetLoadBalancerPoliciesOfListenerResponse -> String
(Int -> SetLoadBalancerPoliciesOfListenerResponse -> ShowS)
-> (SetLoadBalancerPoliciesOfListenerResponse -> String)
-> ([SetLoadBalancerPoliciesOfListenerResponse] -> ShowS)
-> Show SetLoadBalancerPoliciesOfListenerResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [SetLoadBalancerPoliciesOfListenerResponse] -> ShowS
$cshowList :: [SetLoadBalancerPoliciesOfListenerResponse] -> ShowS
show :: SetLoadBalancerPoliciesOfListenerResponse -> String
$cshow :: SetLoadBalancerPoliciesOfListenerResponse -> String
showsPrec :: Int -> SetLoadBalancerPoliciesOfListenerResponse -> ShowS
$cshowsPrec :: Int -> SetLoadBalancerPoliciesOfListenerResponse -> ShowS
Prelude.Show, (forall x.
SetLoadBalancerPoliciesOfListenerResponse
-> Rep SetLoadBalancerPoliciesOfListenerResponse x)
-> (forall x.
Rep SetLoadBalancerPoliciesOfListenerResponse x
-> SetLoadBalancerPoliciesOfListenerResponse)
-> Generic SetLoadBalancerPoliciesOfListenerResponse
forall x.
Rep SetLoadBalancerPoliciesOfListenerResponse x
-> SetLoadBalancerPoliciesOfListenerResponse
forall x.
SetLoadBalancerPoliciesOfListenerResponse
-> Rep SetLoadBalancerPoliciesOfListenerResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep SetLoadBalancerPoliciesOfListenerResponse x
-> SetLoadBalancerPoliciesOfListenerResponse
$cfrom :: forall x.
SetLoadBalancerPoliciesOfListenerResponse
-> Rep SetLoadBalancerPoliciesOfListenerResponse x
Prelude.Generic)
newSetLoadBalancerPoliciesOfListenerResponse ::
Prelude.Int ->
SetLoadBalancerPoliciesOfListenerResponse
newSetLoadBalancerPoliciesOfListenerResponse :: Int -> SetLoadBalancerPoliciesOfListenerResponse
newSetLoadBalancerPoliciesOfListenerResponse
Int
pHttpStatus_ =
SetLoadBalancerPoliciesOfListenerResponse' :: Int -> SetLoadBalancerPoliciesOfListenerResponse
SetLoadBalancerPoliciesOfListenerResponse'
{ $sel:httpStatus:SetLoadBalancerPoliciesOfListenerResponse' :: Int
httpStatus =
Int
pHttpStatus_
}
setLoadBalancerPoliciesOfListenerResponse_httpStatus :: Lens.Lens' SetLoadBalancerPoliciesOfListenerResponse Prelude.Int
setLoadBalancerPoliciesOfListenerResponse_httpStatus :: (Int -> f Int)
-> SetLoadBalancerPoliciesOfListenerResponse
-> f SetLoadBalancerPoliciesOfListenerResponse
setLoadBalancerPoliciesOfListenerResponse_httpStatus = (SetLoadBalancerPoliciesOfListenerResponse -> Int)
-> (SetLoadBalancerPoliciesOfListenerResponse
-> Int -> SetLoadBalancerPoliciesOfListenerResponse)
-> Lens
SetLoadBalancerPoliciesOfListenerResponse
SetLoadBalancerPoliciesOfListenerResponse
Int
Int
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\SetLoadBalancerPoliciesOfListenerResponse' {Int
httpStatus :: Int
$sel:httpStatus:SetLoadBalancerPoliciesOfListenerResponse' :: SetLoadBalancerPoliciesOfListenerResponse -> Int
httpStatus} -> Int
httpStatus) (\s :: SetLoadBalancerPoliciesOfListenerResponse
s@SetLoadBalancerPoliciesOfListenerResponse' {} Int
a -> SetLoadBalancerPoliciesOfListenerResponse
s {$sel:httpStatus:SetLoadBalancerPoliciesOfListenerResponse' :: Int
httpStatus = Int
a} :: SetLoadBalancerPoliciesOfListenerResponse)
instance
Prelude.NFData
SetLoadBalancerPoliciesOfListenerResponse