{-# 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 #-}

-- Derived from AWS service descriptions, licensed under Apache 2.0.

-- |
-- Module      : Amazonka.ELB.SetLoadBalancerPoliciesOfListener
-- Copyright   : (c) 2013-2021 Brendan Hay
-- License     : Mozilla Public License, v. 2.0.
-- Maintainer  : Brendan Hay <brendan.g.hay+amazonka@gmail.com>
-- Stability   : auto-generated
-- Portability : non-portable (GHC extensions)
--
-- Replaces the current set of policies for the specified load balancer
-- port with the specified set of policies.
--
-- To enable back-end server authentication, use
-- SetLoadBalancerPoliciesForBackendServer.
--
-- For more information about setting policies, see
-- <https://docs.aws.amazon.com/elasticloadbalancing/latest/classic/ssl-config-update.html Update the SSL Negotiation Configuration>,
-- <https://docs.aws.amazon.com/elasticloadbalancing/latest/classic/elb-sticky-sessions.html#enable-sticky-sessions-duration Duration-Based Session Stickiness>,
-- and
-- <https://docs.aws.amazon.com/elasticloadbalancing/latest/classic/elb-sticky-sessions.html#enable-sticky-sessions-application Application-Controlled Session Stickiness>
-- in the /Classic Load Balancers Guide/.
module Amazonka.ELB.SetLoadBalancerPoliciesOfListener
  ( -- * Creating a Request
    SetLoadBalancerPoliciesOfListener (..),
    newSetLoadBalancerPoliciesOfListener,

    -- * Request Lenses
    setLoadBalancerPoliciesOfListener_loadBalancerName,
    setLoadBalancerPoliciesOfListener_loadBalancerPort,
    setLoadBalancerPoliciesOfListener_policyNames,

    -- * Destructuring the Response
    SetLoadBalancerPoliciesOfListenerResponse (..),
    newSetLoadBalancerPoliciesOfListenerResponse,

    -- * Response Lenses
    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

-- | Contains the parameters for SetLoadBalancePoliciesOfListener.
--
-- /See:/ 'newSetLoadBalancerPoliciesOfListener' smart constructor.
data SetLoadBalancerPoliciesOfListener = SetLoadBalancerPoliciesOfListener'
  { -- | The name of the load balancer.
    SetLoadBalancerPoliciesOfListener -> Text
loadBalancerName :: Prelude.Text,
    -- | The external port of the load balancer.
    SetLoadBalancerPoliciesOfListener -> Int
loadBalancerPort :: Prelude.Int,
    -- | The names of the policies. This list must include all policies to be
    -- enabled. If you omit a policy that is currently enabled, it is disabled.
    -- If the list is empty, all current policies are disabled.
    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)

-- |
-- Create a value of 'SetLoadBalancerPoliciesOfListener' with all optional fields omitted.
--
-- Use <https://hackage.haskell.org/package/generic-lens generic-lens> or <https://hackage.haskell.org/package/optics optics> to modify other optional fields.
--
-- The following record fields are available, with the corresponding lenses provided
-- for backwards compatibility:
--
-- 'loadBalancerName', 'setLoadBalancerPoliciesOfListener_loadBalancerName' - The name of the load balancer.
--
-- 'loadBalancerPort', 'setLoadBalancerPoliciesOfListener_loadBalancerPort' - The external port of the load balancer.
--
-- 'policyNames', 'setLoadBalancerPoliciesOfListener_policyNames' - The names of the policies. This list must include all policies to be
-- enabled. If you omit a policy that is currently enabled, it is disabled.
-- If the list is empty, all current policies are disabled.
newSetLoadBalancerPoliciesOfListener ::
  -- | 'loadBalancerName'
  Prelude.Text ->
  -- | 'loadBalancerPort'
  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
      }

-- | The name of the load balancer.
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)

-- | The external port of the load balancer.
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)

-- | The names of the policies. This list must include all policies to be
-- enabled. If you omit a policy that is currently enabled, it is disabled.
-- If the list is empty, all current policies are disabled.
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
      ]

-- | Contains the output of SetLoadBalancePoliciesOfListener.
--
-- /See:/ 'newSetLoadBalancerPoliciesOfListenerResponse' smart constructor.
data SetLoadBalancerPoliciesOfListenerResponse = SetLoadBalancerPoliciesOfListenerResponse'
  { -- | The response's http status code.
    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)

-- |
-- Create a value of 'SetLoadBalancerPoliciesOfListenerResponse' with all optional fields omitted.
--
-- Use <https://hackage.haskell.org/package/generic-lens generic-lens> or <https://hackage.haskell.org/package/optics optics> to modify other optional fields.
--
-- The following record fields are available, with the corresponding lenses provided
-- for backwards compatibility:
--
-- 'httpStatus', 'setLoadBalancerPoliciesOfListenerResponse_httpStatus' - The response's http status code.
newSetLoadBalancerPoliciesOfListenerResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  SetLoadBalancerPoliciesOfListenerResponse
newSetLoadBalancerPoliciesOfListenerResponse :: Int -> SetLoadBalancerPoliciesOfListenerResponse
newSetLoadBalancerPoliciesOfListenerResponse
  Int
pHttpStatus_ =
    SetLoadBalancerPoliciesOfListenerResponse' :: Int -> SetLoadBalancerPoliciesOfListenerResponse
SetLoadBalancerPoliciesOfListenerResponse'
      { $sel:httpStatus:SetLoadBalancerPoliciesOfListenerResponse' :: Int
httpStatus =
          Int
pHttpStatus_
      }

-- | The response's http status code.
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