{-# 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.SetLoadBalancerPoliciesForBackendServer
-- 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 set of policies associated with the specified port on which
-- the EC2 instance is listening with a new set of policies. At this time,
-- only the back-end server authentication policy type can be applied to
-- the instance ports; this policy type is composed of multiple public key
-- policies.
--
-- Each time you use @SetLoadBalancerPoliciesForBackendServer@ to enable
-- the policies, use the @PolicyNames@ parameter to list the policies that
-- you want to enable.
--
-- You can use DescribeLoadBalancers or DescribeLoadBalancerPolicies to
-- verify that the policy is associated with the EC2 instance.
--
-- For more information about enabling back-end instance authentication,
-- see
-- <https://docs.aws.amazon.com/elasticloadbalancing/latest/classic/elb-create-https-ssl-load-balancer.html#configure_backendauth_clt Configure Back-end Instance Authentication>
-- in the /Classic Load Balancers Guide/. For more information about Proxy
-- Protocol, see
-- <https://docs.aws.amazon.com/elasticloadbalancing/latest/classic/enable-proxy-protocol.html Configure Proxy Protocol Support>
-- in the /Classic Load Balancers Guide/.
module Amazonka.ELB.SetLoadBalancerPoliciesForBackendServer
  ( -- * Creating a Request
    SetLoadBalancerPoliciesForBackendServer (..),
    newSetLoadBalancerPoliciesForBackendServer,

    -- * Request Lenses
    setLoadBalancerPoliciesForBackendServer_loadBalancerName,
    setLoadBalancerPoliciesForBackendServer_instancePort,
    setLoadBalancerPoliciesForBackendServer_policyNames,

    -- * Destructuring the Response
    SetLoadBalancerPoliciesForBackendServerResponse (..),
    newSetLoadBalancerPoliciesForBackendServerResponse,

    -- * Response Lenses
    setLoadBalancerPoliciesForBackendServerResponse_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 SetLoadBalancerPoliciesForBackendServer.
--
-- /See:/ 'newSetLoadBalancerPoliciesForBackendServer' smart constructor.
data SetLoadBalancerPoliciesForBackendServer = SetLoadBalancerPoliciesForBackendServer'
  { -- | The name of the load balancer.
    SetLoadBalancerPoliciesForBackendServer -> Text
loadBalancerName :: Prelude.Text,
    -- | The port number associated with the EC2 instance.
    SetLoadBalancerPoliciesForBackendServer -> Int
instancePort :: Prelude.Int,
    -- | The names of the policies. If the list is empty, then all current
    -- polices are removed from the EC2 instance.
    SetLoadBalancerPoliciesForBackendServer -> [Text]
policyNames :: [Prelude.Text]
  }
  deriving (SetLoadBalancerPoliciesForBackendServer
-> SetLoadBalancerPoliciesForBackendServer -> Bool
(SetLoadBalancerPoliciesForBackendServer
 -> SetLoadBalancerPoliciesForBackendServer -> Bool)
-> (SetLoadBalancerPoliciesForBackendServer
    -> SetLoadBalancerPoliciesForBackendServer -> Bool)
-> Eq SetLoadBalancerPoliciesForBackendServer
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: SetLoadBalancerPoliciesForBackendServer
-> SetLoadBalancerPoliciesForBackendServer -> Bool
$c/= :: SetLoadBalancerPoliciesForBackendServer
-> SetLoadBalancerPoliciesForBackendServer -> Bool
== :: SetLoadBalancerPoliciesForBackendServer
-> SetLoadBalancerPoliciesForBackendServer -> Bool
$c== :: SetLoadBalancerPoliciesForBackendServer
-> SetLoadBalancerPoliciesForBackendServer -> Bool
Prelude.Eq, ReadPrec [SetLoadBalancerPoliciesForBackendServer]
ReadPrec SetLoadBalancerPoliciesForBackendServer
Int -> ReadS SetLoadBalancerPoliciesForBackendServer
ReadS [SetLoadBalancerPoliciesForBackendServer]
(Int -> ReadS SetLoadBalancerPoliciesForBackendServer)
-> ReadS [SetLoadBalancerPoliciesForBackendServer]
-> ReadPrec SetLoadBalancerPoliciesForBackendServer
-> ReadPrec [SetLoadBalancerPoliciesForBackendServer]
-> Read SetLoadBalancerPoliciesForBackendServer
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [SetLoadBalancerPoliciesForBackendServer]
$creadListPrec :: ReadPrec [SetLoadBalancerPoliciesForBackendServer]
readPrec :: ReadPrec SetLoadBalancerPoliciesForBackendServer
$creadPrec :: ReadPrec SetLoadBalancerPoliciesForBackendServer
readList :: ReadS [SetLoadBalancerPoliciesForBackendServer]
$creadList :: ReadS [SetLoadBalancerPoliciesForBackendServer]
readsPrec :: Int -> ReadS SetLoadBalancerPoliciesForBackendServer
$creadsPrec :: Int -> ReadS SetLoadBalancerPoliciesForBackendServer
Prelude.Read, Int -> SetLoadBalancerPoliciesForBackendServer -> ShowS
[SetLoadBalancerPoliciesForBackendServer] -> ShowS
SetLoadBalancerPoliciesForBackendServer -> String
(Int -> SetLoadBalancerPoliciesForBackendServer -> ShowS)
-> (SetLoadBalancerPoliciesForBackendServer -> String)
-> ([SetLoadBalancerPoliciesForBackendServer] -> ShowS)
-> Show SetLoadBalancerPoliciesForBackendServer
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [SetLoadBalancerPoliciesForBackendServer] -> ShowS
$cshowList :: [SetLoadBalancerPoliciesForBackendServer] -> ShowS
show :: SetLoadBalancerPoliciesForBackendServer -> String
$cshow :: SetLoadBalancerPoliciesForBackendServer -> String
showsPrec :: Int -> SetLoadBalancerPoliciesForBackendServer -> ShowS
$cshowsPrec :: Int -> SetLoadBalancerPoliciesForBackendServer -> ShowS
Prelude.Show, (forall x.
 SetLoadBalancerPoliciesForBackendServer
 -> Rep SetLoadBalancerPoliciesForBackendServer x)
-> (forall x.
    Rep SetLoadBalancerPoliciesForBackendServer x
    -> SetLoadBalancerPoliciesForBackendServer)
-> Generic SetLoadBalancerPoliciesForBackendServer
forall x.
Rep SetLoadBalancerPoliciesForBackendServer x
-> SetLoadBalancerPoliciesForBackendServer
forall x.
SetLoadBalancerPoliciesForBackendServer
-> Rep SetLoadBalancerPoliciesForBackendServer x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep SetLoadBalancerPoliciesForBackendServer x
-> SetLoadBalancerPoliciesForBackendServer
$cfrom :: forall x.
SetLoadBalancerPoliciesForBackendServer
-> Rep SetLoadBalancerPoliciesForBackendServer x
Prelude.Generic)

-- |
-- Create a value of 'SetLoadBalancerPoliciesForBackendServer' 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', 'setLoadBalancerPoliciesForBackendServer_loadBalancerName' - The name of the load balancer.
--
-- 'instancePort', 'setLoadBalancerPoliciesForBackendServer_instancePort' - The port number associated with the EC2 instance.
--
-- 'policyNames', 'setLoadBalancerPoliciesForBackendServer_policyNames' - The names of the policies. If the list is empty, then all current
-- polices are removed from the EC2 instance.
newSetLoadBalancerPoliciesForBackendServer ::
  -- | 'loadBalancerName'
  Prelude.Text ->
  -- | 'instancePort'
  Prelude.Int ->
  SetLoadBalancerPoliciesForBackendServer
newSetLoadBalancerPoliciesForBackendServer :: Text -> Int -> SetLoadBalancerPoliciesForBackendServer
newSetLoadBalancerPoliciesForBackendServer
  Text
pLoadBalancerName_
  Int
pInstancePort_ =
    SetLoadBalancerPoliciesForBackendServer' :: Text -> Int -> [Text] -> SetLoadBalancerPoliciesForBackendServer
SetLoadBalancerPoliciesForBackendServer'
      { $sel:loadBalancerName:SetLoadBalancerPoliciesForBackendServer' :: Text
loadBalancerName =
          Text
pLoadBalancerName_,
        $sel:instancePort:SetLoadBalancerPoliciesForBackendServer' :: Int
instancePort = Int
pInstancePort_,
        $sel:policyNames:SetLoadBalancerPoliciesForBackendServer' :: [Text]
policyNames = [Text]
forall a. Monoid a => a
Prelude.mempty
      }

-- | The name of the load balancer.
setLoadBalancerPoliciesForBackendServer_loadBalancerName :: Lens.Lens' SetLoadBalancerPoliciesForBackendServer Prelude.Text
setLoadBalancerPoliciesForBackendServer_loadBalancerName :: (Text -> f Text)
-> SetLoadBalancerPoliciesForBackendServer
-> f SetLoadBalancerPoliciesForBackendServer
setLoadBalancerPoliciesForBackendServer_loadBalancerName = (SetLoadBalancerPoliciesForBackendServer -> Text)
-> (SetLoadBalancerPoliciesForBackendServer
    -> Text -> SetLoadBalancerPoliciesForBackendServer)
-> Lens
     SetLoadBalancerPoliciesForBackendServer
     SetLoadBalancerPoliciesForBackendServer
     Text
     Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\SetLoadBalancerPoliciesForBackendServer' {Text
loadBalancerName :: Text
$sel:loadBalancerName:SetLoadBalancerPoliciesForBackendServer' :: SetLoadBalancerPoliciesForBackendServer -> Text
loadBalancerName} -> Text
loadBalancerName) (\s :: SetLoadBalancerPoliciesForBackendServer
s@SetLoadBalancerPoliciesForBackendServer' {} Text
a -> SetLoadBalancerPoliciesForBackendServer
s {$sel:loadBalancerName:SetLoadBalancerPoliciesForBackendServer' :: Text
loadBalancerName = Text
a} :: SetLoadBalancerPoliciesForBackendServer)

-- | The port number associated with the EC2 instance.
setLoadBalancerPoliciesForBackendServer_instancePort :: Lens.Lens' SetLoadBalancerPoliciesForBackendServer Prelude.Int
setLoadBalancerPoliciesForBackendServer_instancePort :: (Int -> f Int)
-> SetLoadBalancerPoliciesForBackendServer
-> f SetLoadBalancerPoliciesForBackendServer
setLoadBalancerPoliciesForBackendServer_instancePort = (SetLoadBalancerPoliciesForBackendServer -> Int)
-> (SetLoadBalancerPoliciesForBackendServer
    -> Int -> SetLoadBalancerPoliciesForBackendServer)
-> Lens
     SetLoadBalancerPoliciesForBackendServer
     SetLoadBalancerPoliciesForBackendServer
     Int
     Int
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\SetLoadBalancerPoliciesForBackendServer' {Int
instancePort :: Int
$sel:instancePort:SetLoadBalancerPoliciesForBackendServer' :: SetLoadBalancerPoliciesForBackendServer -> Int
instancePort} -> Int
instancePort) (\s :: SetLoadBalancerPoliciesForBackendServer
s@SetLoadBalancerPoliciesForBackendServer' {} Int
a -> SetLoadBalancerPoliciesForBackendServer
s {$sel:instancePort:SetLoadBalancerPoliciesForBackendServer' :: Int
instancePort = Int
a} :: SetLoadBalancerPoliciesForBackendServer)

-- | The names of the policies. If the list is empty, then all current
-- polices are removed from the EC2 instance.
setLoadBalancerPoliciesForBackendServer_policyNames :: Lens.Lens' SetLoadBalancerPoliciesForBackendServer [Prelude.Text]
setLoadBalancerPoliciesForBackendServer_policyNames :: ([Text] -> f [Text])
-> SetLoadBalancerPoliciesForBackendServer
-> f SetLoadBalancerPoliciesForBackendServer
setLoadBalancerPoliciesForBackendServer_policyNames = (SetLoadBalancerPoliciesForBackendServer -> [Text])
-> (SetLoadBalancerPoliciesForBackendServer
    -> [Text] -> SetLoadBalancerPoliciesForBackendServer)
-> Lens
     SetLoadBalancerPoliciesForBackendServer
     SetLoadBalancerPoliciesForBackendServer
     [Text]
     [Text]
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\SetLoadBalancerPoliciesForBackendServer' {[Text]
policyNames :: [Text]
$sel:policyNames:SetLoadBalancerPoliciesForBackendServer' :: SetLoadBalancerPoliciesForBackendServer -> [Text]
policyNames} -> [Text]
policyNames) (\s :: SetLoadBalancerPoliciesForBackendServer
s@SetLoadBalancerPoliciesForBackendServer' {} [Text]
a -> SetLoadBalancerPoliciesForBackendServer
s {$sel:policyNames:SetLoadBalancerPoliciesForBackendServer' :: [Text]
policyNames = [Text]
a} :: SetLoadBalancerPoliciesForBackendServer) (([Text] -> f [Text])
 -> SetLoadBalancerPoliciesForBackendServer
 -> f SetLoadBalancerPoliciesForBackendServer)
-> (([Text] -> f [Text]) -> [Text] -> f [Text])
-> ([Text] -> f [Text])
-> SetLoadBalancerPoliciesForBackendServer
-> f SetLoadBalancerPoliciesForBackendServer
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
    SetLoadBalancerPoliciesForBackendServer
  where
  type
    AWSResponse
      SetLoadBalancerPoliciesForBackendServer =
      SetLoadBalancerPoliciesForBackendServerResponse
  request :: SetLoadBalancerPoliciesForBackendServer
-> Request SetLoadBalancerPoliciesForBackendServer
request = Service
-> SetLoadBalancerPoliciesForBackendServer
-> Request SetLoadBalancerPoliciesForBackendServer
forall a. ToRequest a => Service -> a -> Request a
Request.postQuery Service
defaultService
  response :: Logger
-> Service
-> Proxy SetLoadBalancerPoliciesForBackendServer
-> ClientResponse ClientBody
-> m (Either
        Error
        (ClientResponse
           (AWSResponse SetLoadBalancerPoliciesForBackendServer)))
response =
    Text
-> (Int
    -> ResponseHeaders
    -> [Node]
    -> Either
         String (AWSResponse SetLoadBalancerPoliciesForBackendServer))
-> Logger
-> Service
-> Proxy SetLoadBalancerPoliciesForBackendServer
-> ClientResponse ClientBody
-> m (Either
        Error
        (ClientResponse
           (AWSResponse SetLoadBalancerPoliciesForBackendServer)))
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
"SetLoadBalancerPoliciesForBackendServerResult"
      ( \Int
s ResponseHeaders
h [Node]
x ->
          Int -> SetLoadBalancerPoliciesForBackendServerResponse
SetLoadBalancerPoliciesForBackendServerResponse'
            (Int -> SetLoadBalancerPoliciesForBackendServerResponse)
-> Either String Int
-> Either String SetLoadBalancerPoliciesForBackendServerResponse
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
    SetLoadBalancerPoliciesForBackendServer

instance
  Prelude.NFData
    SetLoadBalancerPoliciesForBackendServer

instance
  Core.ToHeaders
    SetLoadBalancerPoliciesForBackendServer
  where
  toHeaders :: SetLoadBalancerPoliciesForBackendServer -> ResponseHeaders
toHeaders = ResponseHeaders
-> SetLoadBalancerPoliciesForBackendServer -> ResponseHeaders
forall a b. a -> b -> a
Prelude.const ResponseHeaders
forall a. Monoid a => a
Prelude.mempty

instance
  Core.ToPath
    SetLoadBalancerPoliciesForBackendServer
  where
  toPath :: SetLoadBalancerPoliciesForBackendServer -> ByteString
toPath = ByteString -> SetLoadBalancerPoliciesForBackendServer -> ByteString
forall a b. a -> b -> a
Prelude.const ByteString
"/"

instance
  Core.ToQuery
    SetLoadBalancerPoliciesForBackendServer
  where
  toQuery :: SetLoadBalancerPoliciesForBackendServer -> QueryString
toQuery SetLoadBalancerPoliciesForBackendServer' {Int
[Text]
Text
policyNames :: [Text]
instancePort :: Int
loadBalancerName :: Text
$sel:policyNames:SetLoadBalancerPoliciesForBackendServer' :: SetLoadBalancerPoliciesForBackendServer -> [Text]
$sel:instancePort:SetLoadBalancerPoliciesForBackendServer' :: SetLoadBalancerPoliciesForBackendServer -> Int
$sel:loadBalancerName:SetLoadBalancerPoliciesForBackendServer' :: SetLoadBalancerPoliciesForBackendServer -> 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
"SetLoadBalancerPoliciesForBackendServer" ::
                      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
"InstancePort" ByteString -> Int -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Int
instancePort,
        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 SetLoadBalancerPoliciesForBackendServer.
--
-- /See:/ 'newSetLoadBalancerPoliciesForBackendServerResponse' smart constructor.
data SetLoadBalancerPoliciesForBackendServerResponse = SetLoadBalancerPoliciesForBackendServerResponse'
  { -- | The response's http status code.
    SetLoadBalancerPoliciesForBackendServerResponse -> Int
httpStatus :: Prelude.Int
  }
  deriving (SetLoadBalancerPoliciesForBackendServerResponse
-> SetLoadBalancerPoliciesForBackendServerResponse -> Bool
(SetLoadBalancerPoliciesForBackendServerResponse
 -> SetLoadBalancerPoliciesForBackendServerResponse -> Bool)
-> (SetLoadBalancerPoliciesForBackendServerResponse
    -> SetLoadBalancerPoliciesForBackendServerResponse -> Bool)
-> Eq SetLoadBalancerPoliciesForBackendServerResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: SetLoadBalancerPoliciesForBackendServerResponse
-> SetLoadBalancerPoliciesForBackendServerResponse -> Bool
$c/= :: SetLoadBalancerPoliciesForBackendServerResponse
-> SetLoadBalancerPoliciesForBackendServerResponse -> Bool
== :: SetLoadBalancerPoliciesForBackendServerResponse
-> SetLoadBalancerPoliciesForBackendServerResponse -> Bool
$c== :: SetLoadBalancerPoliciesForBackendServerResponse
-> SetLoadBalancerPoliciesForBackendServerResponse -> Bool
Prelude.Eq, ReadPrec [SetLoadBalancerPoliciesForBackendServerResponse]
ReadPrec SetLoadBalancerPoliciesForBackendServerResponse
Int -> ReadS SetLoadBalancerPoliciesForBackendServerResponse
ReadS [SetLoadBalancerPoliciesForBackendServerResponse]
(Int -> ReadS SetLoadBalancerPoliciesForBackendServerResponse)
-> ReadS [SetLoadBalancerPoliciesForBackendServerResponse]
-> ReadPrec SetLoadBalancerPoliciesForBackendServerResponse
-> ReadPrec [SetLoadBalancerPoliciesForBackendServerResponse]
-> Read SetLoadBalancerPoliciesForBackendServerResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [SetLoadBalancerPoliciesForBackendServerResponse]
$creadListPrec :: ReadPrec [SetLoadBalancerPoliciesForBackendServerResponse]
readPrec :: ReadPrec SetLoadBalancerPoliciesForBackendServerResponse
$creadPrec :: ReadPrec SetLoadBalancerPoliciesForBackendServerResponse
readList :: ReadS [SetLoadBalancerPoliciesForBackendServerResponse]
$creadList :: ReadS [SetLoadBalancerPoliciesForBackendServerResponse]
readsPrec :: Int -> ReadS SetLoadBalancerPoliciesForBackendServerResponse
$creadsPrec :: Int -> ReadS SetLoadBalancerPoliciesForBackendServerResponse
Prelude.Read, Int -> SetLoadBalancerPoliciesForBackendServerResponse -> ShowS
[SetLoadBalancerPoliciesForBackendServerResponse] -> ShowS
SetLoadBalancerPoliciesForBackendServerResponse -> String
(Int -> SetLoadBalancerPoliciesForBackendServerResponse -> ShowS)
-> (SetLoadBalancerPoliciesForBackendServerResponse -> String)
-> ([SetLoadBalancerPoliciesForBackendServerResponse] -> ShowS)
-> Show SetLoadBalancerPoliciesForBackendServerResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [SetLoadBalancerPoliciesForBackendServerResponse] -> ShowS
$cshowList :: [SetLoadBalancerPoliciesForBackendServerResponse] -> ShowS
show :: SetLoadBalancerPoliciesForBackendServerResponse -> String
$cshow :: SetLoadBalancerPoliciesForBackendServerResponse -> String
showsPrec :: Int -> SetLoadBalancerPoliciesForBackendServerResponse -> ShowS
$cshowsPrec :: Int -> SetLoadBalancerPoliciesForBackendServerResponse -> ShowS
Prelude.Show, (forall x.
 SetLoadBalancerPoliciesForBackendServerResponse
 -> Rep SetLoadBalancerPoliciesForBackendServerResponse x)
-> (forall x.
    Rep SetLoadBalancerPoliciesForBackendServerResponse x
    -> SetLoadBalancerPoliciesForBackendServerResponse)
-> Generic SetLoadBalancerPoliciesForBackendServerResponse
forall x.
Rep SetLoadBalancerPoliciesForBackendServerResponse x
-> SetLoadBalancerPoliciesForBackendServerResponse
forall x.
SetLoadBalancerPoliciesForBackendServerResponse
-> Rep SetLoadBalancerPoliciesForBackendServerResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep SetLoadBalancerPoliciesForBackendServerResponse x
-> SetLoadBalancerPoliciesForBackendServerResponse
$cfrom :: forall x.
SetLoadBalancerPoliciesForBackendServerResponse
-> Rep SetLoadBalancerPoliciesForBackendServerResponse x
Prelude.Generic)

-- |
-- Create a value of 'SetLoadBalancerPoliciesForBackendServerResponse' 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', 'setLoadBalancerPoliciesForBackendServerResponse_httpStatus' - The response's http status code.
newSetLoadBalancerPoliciesForBackendServerResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  SetLoadBalancerPoliciesForBackendServerResponse
newSetLoadBalancerPoliciesForBackendServerResponse :: Int -> SetLoadBalancerPoliciesForBackendServerResponse
newSetLoadBalancerPoliciesForBackendServerResponse
  Int
pHttpStatus_ =
    SetLoadBalancerPoliciesForBackendServerResponse' :: Int -> SetLoadBalancerPoliciesForBackendServerResponse
SetLoadBalancerPoliciesForBackendServerResponse'
      { $sel:httpStatus:SetLoadBalancerPoliciesForBackendServerResponse' :: Int
httpStatus =
          Int
pHttpStatus_
      }

-- | The response's http status code.
setLoadBalancerPoliciesForBackendServerResponse_httpStatus :: Lens.Lens' SetLoadBalancerPoliciesForBackendServerResponse Prelude.Int
setLoadBalancerPoliciesForBackendServerResponse_httpStatus :: (Int -> f Int)
-> SetLoadBalancerPoliciesForBackendServerResponse
-> f SetLoadBalancerPoliciesForBackendServerResponse
setLoadBalancerPoliciesForBackendServerResponse_httpStatus = (SetLoadBalancerPoliciesForBackendServerResponse -> Int)
-> (SetLoadBalancerPoliciesForBackendServerResponse
    -> Int -> SetLoadBalancerPoliciesForBackendServerResponse)
-> Lens
     SetLoadBalancerPoliciesForBackendServerResponse
     SetLoadBalancerPoliciesForBackendServerResponse
     Int
     Int
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\SetLoadBalancerPoliciesForBackendServerResponse' {Int
httpStatus :: Int
$sel:httpStatus:SetLoadBalancerPoliciesForBackendServerResponse' :: SetLoadBalancerPoliciesForBackendServerResponse -> Int
httpStatus} -> Int
httpStatus) (\s :: SetLoadBalancerPoliciesForBackendServerResponse
s@SetLoadBalancerPoliciesForBackendServerResponse' {} Int
a -> SetLoadBalancerPoliciesForBackendServerResponse
s {$sel:httpStatus:SetLoadBalancerPoliciesForBackendServerResponse' :: Int
httpStatus = Int
a} :: SetLoadBalancerPoliciesForBackendServerResponse)

instance
  Prelude.NFData
    SetLoadBalancerPoliciesForBackendServerResponse