{-# 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.CreateLoadBalancerPolicy
-- 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)
--
-- Creates a policy with the specified attributes for the specified load
-- balancer.
--
-- Policies are settings that are saved for your load balancer and that can
-- be applied to the listener or the application server, depending on the
-- policy type.
module Amazonka.ELB.CreateLoadBalancerPolicy
  ( -- * Creating a Request
    CreateLoadBalancerPolicy (..),
    newCreateLoadBalancerPolicy,

    -- * Request Lenses
    createLoadBalancerPolicy_policyAttributes,
    createLoadBalancerPolicy_loadBalancerName,
    createLoadBalancerPolicy_policyName,
    createLoadBalancerPolicy_policyTypeName,

    -- * Destructuring the Response
    CreateLoadBalancerPolicyResponse (..),
    newCreateLoadBalancerPolicyResponse,

    -- * Response Lenses
    createLoadBalancerPolicyResponse_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 CreateLoadBalancerPolicy.
--
-- /See:/ 'newCreateLoadBalancerPolicy' smart constructor.
data CreateLoadBalancerPolicy = CreateLoadBalancerPolicy'
  { -- | The policy attributes.
    CreateLoadBalancerPolicy -> Maybe [PolicyAttribute]
policyAttributes :: Prelude.Maybe [PolicyAttribute],
    -- | The name of the load balancer.
    CreateLoadBalancerPolicy -> Text
loadBalancerName :: Prelude.Text,
    -- | The name of the load balancer policy to be created. This name must be
    -- unique within the set of policies for this load balancer.
    CreateLoadBalancerPolicy -> Text
policyName :: Prelude.Text,
    -- | The name of the base policy type. To get the list of policy types, use
    -- DescribeLoadBalancerPolicyTypes.
    CreateLoadBalancerPolicy -> Text
policyTypeName :: Prelude.Text
  }
  deriving (CreateLoadBalancerPolicy -> CreateLoadBalancerPolicy -> Bool
(CreateLoadBalancerPolicy -> CreateLoadBalancerPolicy -> Bool)
-> (CreateLoadBalancerPolicy -> CreateLoadBalancerPolicy -> Bool)
-> Eq CreateLoadBalancerPolicy
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: CreateLoadBalancerPolicy -> CreateLoadBalancerPolicy -> Bool
$c/= :: CreateLoadBalancerPolicy -> CreateLoadBalancerPolicy -> Bool
== :: CreateLoadBalancerPolicy -> CreateLoadBalancerPolicy -> Bool
$c== :: CreateLoadBalancerPolicy -> CreateLoadBalancerPolicy -> Bool
Prelude.Eq, ReadPrec [CreateLoadBalancerPolicy]
ReadPrec CreateLoadBalancerPolicy
Int -> ReadS CreateLoadBalancerPolicy
ReadS [CreateLoadBalancerPolicy]
(Int -> ReadS CreateLoadBalancerPolicy)
-> ReadS [CreateLoadBalancerPolicy]
-> ReadPrec CreateLoadBalancerPolicy
-> ReadPrec [CreateLoadBalancerPolicy]
-> Read CreateLoadBalancerPolicy
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [CreateLoadBalancerPolicy]
$creadListPrec :: ReadPrec [CreateLoadBalancerPolicy]
readPrec :: ReadPrec CreateLoadBalancerPolicy
$creadPrec :: ReadPrec CreateLoadBalancerPolicy
readList :: ReadS [CreateLoadBalancerPolicy]
$creadList :: ReadS [CreateLoadBalancerPolicy]
readsPrec :: Int -> ReadS CreateLoadBalancerPolicy
$creadsPrec :: Int -> ReadS CreateLoadBalancerPolicy
Prelude.Read, Int -> CreateLoadBalancerPolicy -> ShowS
[CreateLoadBalancerPolicy] -> ShowS
CreateLoadBalancerPolicy -> String
(Int -> CreateLoadBalancerPolicy -> ShowS)
-> (CreateLoadBalancerPolicy -> String)
-> ([CreateLoadBalancerPolicy] -> ShowS)
-> Show CreateLoadBalancerPolicy
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [CreateLoadBalancerPolicy] -> ShowS
$cshowList :: [CreateLoadBalancerPolicy] -> ShowS
show :: CreateLoadBalancerPolicy -> String
$cshow :: CreateLoadBalancerPolicy -> String
showsPrec :: Int -> CreateLoadBalancerPolicy -> ShowS
$cshowsPrec :: Int -> CreateLoadBalancerPolicy -> ShowS
Prelude.Show, (forall x.
 CreateLoadBalancerPolicy -> Rep CreateLoadBalancerPolicy x)
-> (forall x.
    Rep CreateLoadBalancerPolicy x -> CreateLoadBalancerPolicy)
-> Generic CreateLoadBalancerPolicy
forall x.
Rep CreateLoadBalancerPolicy x -> CreateLoadBalancerPolicy
forall x.
CreateLoadBalancerPolicy -> Rep CreateLoadBalancerPolicy x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep CreateLoadBalancerPolicy x -> CreateLoadBalancerPolicy
$cfrom :: forall x.
CreateLoadBalancerPolicy -> Rep CreateLoadBalancerPolicy x
Prelude.Generic)

-- |
-- Create a value of 'CreateLoadBalancerPolicy' 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:
--
-- 'policyAttributes', 'createLoadBalancerPolicy_policyAttributes' - The policy attributes.
--
-- 'loadBalancerName', 'createLoadBalancerPolicy_loadBalancerName' - The name of the load balancer.
--
-- 'policyName', 'createLoadBalancerPolicy_policyName' - The name of the load balancer policy to be created. This name must be
-- unique within the set of policies for this load balancer.
--
-- 'policyTypeName', 'createLoadBalancerPolicy_policyTypeName' - The name of the base policy type. To get the list of policy types, use
-- DescribeLoadBalancerPolicyTypes.
newCreateLoadBalancerPolicy ::
  -- | 'loadBalancerName'
  Prelude.Text ->
  -- | 'policyName'
  Prelude.Text ->
  -- | 'policyTypeName'
  Prelude.Text ->
  CreateLoadBalancerPolicy
newCreateLoadBalancerPolicy :: Text -> Text -> Text -> CreateLoadBalancerPolicy
newCreateLoadBalancerPolicy
  Text
pLoadBalancerName_
  Text
pPolicyName_
  Text
pPolicyTypeName_ =
    CreateLoadBalancerPolicy' :: Maybe [PolicyAttribute]
-> Text -> Text -> Text -> CreateLoadBalancerPolicy
CreateLoadBalancerPolicy'
      { $sel:policyAttributes:CreateLoadBalancerPolicy' :: Maybe [PolicyAttribute]
policyAttributes =
          Maybe [PolicyAttribute]
forall a. Maybe a
Prelude.Nothing,
        $sel:loadBalancerName:CreateLoadBalancerPolicy' :: Text
loadBalancerName = Text
pLoadBalancerName_,
        $sel:policyName:CreateLoadBalancerPolicy' :: Text
policyName = Text
pPolicyName_,
        $sel:policyTypeName:CreateLoadBalancerPolicy' :: Text
policyTypeName = Text
pPolicyTypeName_
      }

-- | The policy attributes.
createLoadBalancerPolicy_policyAttributes :: Lens.Lens' CreateLoadBalancerPolicy (Prelude.Maybe [PolicyAttribute])
createLoadBalancerPolicy_policyAttributes :: (Maybe [PolicyAttribute] -> f (Maybe [PolicyAttribute]))
-> CreateLoadBalancerPolicy -> f CreateLoadBalancerPolicy
createLoadBalancerPolicy_policyAttributes = (CreateLoadBalancerPolicy -> Maybe [PolicyAttribute])
-> (CreateLoadBalancerPolicy
    -> Maybe [PolicyAttribute] -> CreateLoadBalancerPolicy)
-> Lens
     CreateLoadBalancerPolicy
     CreateLoadBalancerPolicy
     (Maybe [PolicyAttribute])
     (Maybe [PolicyAttribute])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateLoadBalancerPolicy' {Maybe [PolicyAttribute]
policyAttributes :: Maybe [PolicyAttribute]
$sel:policyAttributes:CreateLoadBalancerPolicy' :: CreateLoadBalancerPolicy -> Maybe [PolicyAttribute]
policyAttributes} -> Maybe [PolicyAttribute]
policyAttributes) (\s :: CreateLoadBalancerPolicy
s@CreateLoadBalancerPolicy' {} Maybe [PolicyAttribute]
a -> CreateLoadBalancerPolicy
s {$sel:policyAttributes:CreateLoadBalancerPolicy' :: Maybe [PolicyAttribute]
policyAttributes = Maybe [PolicyAttribute]
a} :: CreateLoadBalancerPolicy) ((Maybe [PolicyAttribute] -> f (Maybe [PolicyAttribute]))
 -> CreateLoadBalancerPolicy -> f CreateLoadBalancerPolicy)
-> ((Maybe [PolicyAttribute] -> f (Maybe [PolicyAttribute]))
    -> Maybe [PolicyAttribute] -> f (Maybe [PolicyAttribute]))
-> (Maybe [PolicyAttribute] -> f (Maybe [PolicyAttribute]))
-> CreateLoadBalancerPolicy
-> f CreateLoadBalancerPolicy
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso
  [PolicyAttribute]
  [PolicyAttribute]
  [PolicyAttribute]
  [PolicyAttribute]
-> Iso
     (Maybe [PolicyAttribute])
     (Maybe [PolicyAttribute])
     (Maybe [PolicyAttribute])
     (Maybe [PolicyAttribute])
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
  [PolicyAttribute]
  [PolicyAttribute]
  [PolicyAttribute]
  [PolicyAttribute]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

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

-- | The name of the load balancer policy to be created. This name must be
-- unique within the set of policies for this load balancer.
createLoadBalancerPolicy_policyName :: Lens.Lens' CreateLoadBalancerPolicy Prelude.Text
createLoadBalancerPolicy_policyName :: (Text -> f Text)
-> CreateLoadBalancerPolicy -> f CreateLoadBalancerPolicy
createLoadBalancerPolicy_policyName = (CreateLoadBalancerPolicy -> Text)
-> (CreateLoadBalancerPolicy -> Text -> CreateLoadBalancerPolicy)
-> Lens CreateLoadBalancerPolicy CreateLoadBalancerPolicy Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateLoadBalancerPolicy' {Text
policyName :: Text
$sel:policyName:CreateLoadBalancerPolicy' :: CreateLoadBalancerPolicy -> Text
policyName} -> Text
policyName) (\s :: CreateLoadBalancerPolicy
s@CreateLoadBalancerPolicy' {} Text
a -> CreateLoadBalancerPolicy
s {$sel:policyName:CreateLoadBalancerPolicy' :: Text
policyName = Text
a} :: CreateLoadBalancerPolicy)

-- | The name of the base policy type. To get the list of policy types, use
-- DescribeLoadBalancerPolicyTypes.
createLoadBalancerPolicy_policyTypeName :: Lens.Lens' CreateLoadBalancerPolicy Prelude.Text
createLoadBalancerPolicy_policyTypeName :: (Text -> f Text)
-> CreateLoadBalancerPolicy -> f CreateLoadBalancerPolicy
createLoadBalancerPolicy_policyTypeName = (CreateLoadBalancerPolicy -> Text)
-> (CreateLoadBalancerPolicy -> Text -> CreateLoadBalancerPolicy)
-> Lens CreateLoadBalancerPolicy CreateLoadBalancerPolicy Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateLoadBalancerPolicy' {Text
policyTypeName :: Text
$sel:policyTypeName:CreateLoadBalancerPolicy' :: CreateLoadBalancerPolicy -> Text
policyTypeName} -> Text
policyTypeName) (\s :: CreateLoadBalancerPolicy
s@CreateLoadBalancerPolicy' {} Text
a -> CreateLoadBalancerPolicy
s {$sel:policyTypeName:CreateLoadBalancerPolicy' :: Text
policyTypeName = Text
a} :: CreateLoadBalancerPolicy)

instance Core.AWSRequest CreateLoadBalancerPolicy where
  type
    AWSResponse CreateLoadBalancerPolicy =
      CreateLoadBalancerPolicyResponse
  request :: CreateLoadBalancerPolicy -> Request CreateLoadBalancerPolicy
request = Service
-> CreateLoadBalancerPolicy -> Request CreateLoadBalancerPolicy
forall a. ToRequest a => Service -> a -> Request a
Request.postQuery Service
defaultService
  response :: Logger
-> Service
-> Proxy CreateLoadBalancerPolicy
-> ClientResponse ClientBody
-> m (Either
        Error (ClientResponse (AWSResponse CreateLoadBalancerPolicy)))
response =
    Text
-> (Int
    -> ResponseHeaders
    -> [Node]
    -> Either String (AWSResponse CreateLoadBalancerPolicy))
-> Logger
-> Service
-> Proxy CreateLoadBalancerPolicy
-> ClientResponse ClientBody
-> m (Either
        Error (ClientResponse (AWSResponse CreateLoadBalancerPolicy)))
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
"CreateLoadBalancerPolicyResult"
      ( \Int
s ResponseHeaders
h [Node]
x ->
          Int -> CreateLoadBalancerPolicyResponse
CreateLoadBalancerPolicyResponse'
            (Int -> CreateLoadBalancerPolicyResponse)
-> Either String Int
-> Either String CreateLoadBalancerPolicyResponse
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 CreateLoadBalancerPolicy

instance Prelude.NFData CreateLoadBalancerPolicy

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

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

instance Core.ToQuery CreateLoadBalancerPolicy where
  toQuery :: CreateLoadBalancerPolicy -> QueryString
toQuery CreateLoadBalancerPolicy' {Maybe [PolicyAttribute]
Text
policyTypeName :: Text
policyName :: Text
loadBalancerName :: Text
policyAttributes :: Maybe [PolicyAttribute]
$sel:policyTypeName:CreateLoadBalancerPolicy' :: CreateLoadBalancerPolicy -> Text
$sel:policyName:CreateLoadBalancerPolicy' :: CreateLoadBalancerPolicy -> Text
$sel:loadBalancerName:CreateLoadBalancerPolicy' :: CreateLoadBalancerPolicy -> Text
$sel:policyAttributes:CreateLoadBalancerPolicy' :: CreateLoadBalancerPolicy -> Maybe [PolicyAttribute]
..} =
    [QueryString] -> QueryString
forall a. Monoid a => [a] -> a
Prelude.mconcat
      [ ByteString
"Action"
          ByteString -> ByteString -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: (ByteString
"CreateLoadBalancerPolicy" :: Prelude.ByteString),
        ByteString
"Version"
          ByteString -> ByteString -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: (ByteString
"2012-06-01" :: Prelude.ByteString),
        ByteString
"PolicyAttributes"
          ByteString -> QueryString -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Maybe QueryString -> QueryString
forall a. ToQuery a => a -> QueryString
Core.toQuery
            ( ByteString -> [PolicyAttribute] -> QueryString
forall a.
(IsList a, ToQuery (Item a)) =>
ByteString -> a -> QueryString
Core.toQueryList ByteString
"member"
                ([PolicyAttribute] -> QueryString)
-> Maybe [PolicyAttribute] -> Maybe QueryString
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [PolicyAttribute]
policyAttributes
            ),
        ByteString
"LoadBalancerName" ByteString -> Text -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Text
loadBalancerName,
        ByteString
"PolicyName" ByteString -> Text -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Text
policyName,
        ByteString
"PolicyTypeName" ByteString -> Text -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Text
policyTypeName
      ]

-- | Contains the output of CreateLoadBalancerPolicy.
--
-- /See:/ 'newCreateLoadBalancerPolicyResponse' smart constructor.
data CreateLoadBalancerPolicyResponse = CreateLoadBalancerPolicyResponse'
  { -- | The response's http status code.
    CreateLoadBalancerPolicyResponse -> Int
httpStatus :: Prelude.Int
  }
  deriving (CreateLoadBalancerPolicyResponse
-> CreateLoadBalancerPolicyResponse -> Bool
(CreateLoadBalancerPolicyResponse
 -> CreateLoadBalancerPolicyResponse -> Bool)
-> (CreateLoadBalancerPolicyResponse
    -> CreateLoadBalancerPolicyResponse -> Bool)
-> Eq CreateLoadBalancerPolicyResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: CreateLoadBalancerPolicyResponse
-> CreateLoadBalancerPolicyResponse -> Bool
$c/= :: CreateLoadBalancerPolicyResponse
-> CreateLoadBalancerPolicyResponse -> Bool
== :: CreateLoadBalancerPolicyResponse
-> CreateLoadBalancerPolicyResponse -> Bool
$c== :: CreateLoadBalancerPolicyResponse
-> CreateLoadBalancerPolicyResponse -> Bool
Prelude.Eq, ReadPrec [CreateLoadBalancerPolicyResponse]
ReadPrec CreateLoadBalancerPolicyResponse
Int -> ReadS CreateLoadBalancerPolicyResponse
ReadS [CreateLoadBalancerPolicyResponse]
(Int -> ReadS CreateLoadBalancerPolicyResponse)
-> ReadS [CreateLoadBalancerPolicyResponse]
-> ReadPrec CreateLoadBalancerPolicyResponse
-> ReadPrec [CreateLoadBalancerPolicyResponse]
-> Read CreateLoadBalancerPolicyResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [CreateLoadBalancerPolicyResponse]
$creadListPrec :: ReadPrec [CreateLoadBalancerPolicyResponse]
readPrec :: ReadPrec CreateLoadBalancerPolicyResponse
$creadPrec :: ReadPrec CreateLoadBalancerPolicyResponse
readList :: ReadS [CreateLoadBalancerPolicyResponse]
$creadList :: ReadS [CreateLoadBalancerPolicyResponse]
readsPrec :: Int -> ReadS CreateLoadBalancerPolicyResponse
$creadsPrec :: Int -> ReadS CreateLoadBalancerPolicyResponse
Prelude.Read, Int -> CreateLoadBalancerPolicyResponse -> ShowS
[CreateLoadBalancerPolicyResponse] -> ShowS
CreateLoadBalancerPolicyResponse -> String
(Int -> CreateLoadBalancerPolicyResponse -> ShowS)
-> (CreateLoadBalancerPolicyResponse -> String)
-> ([CreateLoadBalancerPolicyResponse] -> ShowS)
-> Show CreateLoadBalancerPolicyResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [CreateLoadBalancerPolicyResponse] -> ShowS
$cshowList :: [CreateLoadBalancerPolicyResponse] -> ShowS
show :: CreateLoadBalancerPolicyResponse -> String
$cshow :: CreateLoadBalancerPolicyResponse -> String
showsPrec :: Int -> CreateLoadBalancerPolicyResponse -> ShowS
$cshowsPrec :: Int -> CreateLoadBalancerPolicyResponse -> ShowS
Prelude.Show, (forall x.
 CreateLoadBalancerPolicyResponse
 -> Rep CreateLoadBalancerPolicyResponse x)
-> (forall x.
    Rep CreateLoadBalancerPolicyResponse x
    -> CreateLoadBalancerPolicyResponse)
-> Generic CreateLoadBalancerPolicyResponse
forall x.
Rep CreateLoadBalancerPolicyResponse x
-> CreateLoadBalancerPolicyResponse
forall x.
CreateLoadBalancerPolicyResponse
-> Rep CreateLoadBalancerPolicyResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep CreateLoadBalancerPolicyResponse x
-> CreateLoadBalancerPolicyResponse
$cfrom :: forall x.
CreateLoadBalancerPolicyResponse
-> Rep CreateLoadBalancerPolicyResponse x
Prelude.Generic)

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

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

instance
  Prelude.NFData
    CreateLoadBalancerPolicyResponse