{-# 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.CreateLBCookieStickinessPolicy
-- 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)
--
-- Generates a stickiness policy with sticky session lifetimes controlled
-- by the lifetime of the browser (user-agent) or a specified expiration
-- period. This policy can be associated only with HTTP\/HTTPS listeners.
--
-- When a load balancer implements this policy, the load balancer uses a
-- special cookie to track the instance for each request. When the load
-- balancer receives a request, it first checks to see if this cookie is
-- present in the request. If so, the load balancer sends the request to
-- the application server specified in the cookie. If not, the load
-- balancer sends the request to a server that is chosen based on the
-- existing load-balancing algorithm.
--
-- A cookie is inserted into the response for binding subsequent requests
-- from the same user to that server. The validity of the cookie is based
-- on the cookie expiration time, which is specified in the policy
-- configuration.
--
-- For more information, see
-- <https://docs.aws.amazon.com/elasticloadbalancing/latest/classic/elb-sticky-sessions.html#enable-sticky-sessions-duration Duration-Based Session Stickiness>
-- in the /Classic Load Balancers Guide/.
module Amazonka.ELB.CreateLBCookieStickinessPolicy
  ( -- * Creating a Request
    CreateLBCookieStickinessPolicy (..),
    newCreateLBCookieStickinessPolicy,

    -- * Request Lenses
    createLBCookieStickinessPolicy_cookieExpirationPeriod,
    createLBCookieStickinessPolicy_loadBalancerName,
    createLBCookieStickinessPolicy_policyName,

    -- * Destructuring the Response
    CreateLBCookieStickinessPolicyResponse (..),
    newCreateLBCookieStickinessPolicyResponse,

    -- * Response Lenses
    createLBCookieStickinessPolicyResponse_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 CreateLBCookieStickinessPolicy.
--
-- /See:/ 'newCreateLBCookieStickinessPolicy' smart constructor.
data CreateLBCookieStickinessPolicy = CreateLBCookieStickinessPolicy'
  { -- | The time period, in seconds, after which the cookie should be considered
    -- stale. If you do not specify this parameter, the default value is 0,
    -- which indicates that the sticky session should last for the duration of
    -- the browser session.
    CreateLBCookieStickinessPolicy -> Maybe Integer
cookieExpirationPeriod :: Prelude.Maybe Prelude.Integer,
    -- | The name of the load balancer.
    CreateLBCookieStickinessPolicy -> Text
loadBalancerName :: Prelude.Text,
    -- | The name of the policy being created. Policy names must consist of
    -- alphanumeric characters and dashes (-). This name must be unique within
    -- the set of policies for this load balancer.
    CreateLBCookieStickinessPolicy -> Text
policyName :: Prelude.Text
  }
  deriving (CreateLBCookieStickinessPolicy
-> CreateLBCookieStickinessPolicy -> Bool
(CreateLBCookieStickinessPolicy
 -> CreateLBCookieStickinessPolicy -> Bool)
-> (CreateLBCookieStickinessPolicy
    -> CreateLBCookieStickinessPolicy -> Bool)
-> Eq CreateLBCookieStickinessPolicy
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: CreateLBCookieStickinessPolicy
-> CreateLBCookieStickinessPolicy -> Bool
$c/= :: CreateLBCookieStickinessPolicy
-> CreateLBCookieStickinessPolicy -> Bool
== :: CreateLBCookieStickinessPolicy
-> CreateLBCookieStickinessPolicy -> Bool
$c== :: CreateLBCookieStickinessPolicy
-> CreateLBCookieStickinessPolicy -> Bool
Prelude.Eq, ReadPrec [CreateLBCookieStickinessPolicy]
ReadPrec CreateLBCookieStickinessPolicy
Int -> ReadS CreateLBCookieStickinessPolicy
ReadS [CreateLBCookieStickinessPolicy]
(Int -> ReadS CreateLBCookieStickinessPolicy)
-> ReadS [CreateLBCookieStickinessPolicy]
-> ReadPrec CreateLBCookieStickinessPolicy
-> ReadPrec [CreateLBCookieStickinessPolicy]
-> Read CreateLBCookieStickinessPolicy
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [CreateLBCookieStickinessPolicy]
$creadListPrec :: ReadPrec [CreateLBCookieStickinessPolicy]
readPrec :: ReadPrec CreateLBCookieStickinessPolicy
$creadPrec :: ReadPrec CreateLBCookieStickinessPolicy
readList :: ReadS [CreateLBCookieStickinessPolicy]
$creadList :: ReadS [CreateLBCookieStickinessPolicy]
readsPrec :: Int -> ReadS CreateLBCookieStickinessPolicy
$creadsPrec :: Int -> ReadS CreateLBCookieStickinessPolicy
Prelude.Read, Int -> CreateLBCookieStickinessPolicy -> ShowS
[CreateLBCookieStickinessPolicy] -> ShowS
CreateLBCookieStickinessPolicy -> String
(Int -> CreateLBCookieStickinessPolicy -> ShowS)
-> (CreateLBCookieStickinessPolicy -> String)
-> ([CreateLBCookieStickinessPolicy] -> ShowS)
-> Show CreateLBCookieStickinessPolicy
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [CreateLBCookieStickinessPolicy] -> ShowS
$cshowList :: [CreateLBCookieStickinessPolicy] -> ShowS
show :: CreateLBCookieStickinessPolicy -> String
$cshow :: CreateLBCookieStickinessPolicy -> String
showsPrec :: Int -> CreateLBCookieStickinessPolicy -> ShowS
$cshowsPrec :: Int -> CreateLBCookieStickinessPolicy -> ShowS
Prelude.Show, (forall x.
 CreateLBCookieStickinessPolicy
 -> Rep CreateLBCookieStickinessPolicy x)
-> (forall x.
    Rep CreateLBCookieStickinessPolicy x
    -> CreateLBCookieStickinessPolicy)
-> Generic CreateLBCookieStickinessPolicy
forall x.
Rep CreateLBCookieStickinessPolicy x
-> CreateLBCookieStickinessPolicy
forall x.
CreateLBCookieStickinessPolicy
-> Rep CreateLBCookieStickinessPolicy x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep CreateLBCookieStickinessPolicy x
-> CreateLBCookieStickinessPolicy
$cfrom :: forall x.
CreateLBCookieStickinessPolicy
-> Rep CreateLBCookieStickinessPolicy x
Prelude.Generic)

-- |
-- Create a value of 'CreateLBCookieStickinessPolicy' 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:
--
-- 'cookieExpirationPeriod', 'createLBCookieStickinessPolicy_cookieExpirationPeriod' - The time period, in seconds, after which the cookie should be considered
-- stale. If you do not specify this parameter, the default value is 0,
-- which indicates that the sticky session should last for the duration of
-- the browser session.
--
-- 'loadBalancerName', 'createLBCookieStickinessPolicy_loadBalancerName' - The name of the load balancer.
--
-- 'policyName', 'createLBCookieStickinessPolicy_policyName' - The name of the policy being created. Policy names must consist of
-- alphanumeric characters and dashes (-). This name must be unique within
-- the set of policies for this load balancer.
newCreateLBCookieStickinessPolicy ::
  -- | 'loadBalancerName'
  Prelude.Text ->
  -- | 'policyName'
  Prelude.Text ->
  CreateLBCookieStickinessPolicy
newCreateLBCookieStickinessPolicy :: Text -> Text -> CreateLBCookieStickinessPolicy
newCreateLBCookieStickinessPolicy
  Text
pLoadBalancerName_
  Text
pPolicyName_ =
    CreateLBCookieStickinessPolicy' :: Maybe Integer -> Text -> Text -> CreateLBCookieStickinessPolicy
CreateLBCookieStickinessPolicy'
      { $sel:cookieExpirationPeriod:CreateLBCookieStickinessPolicy' :: Maybe Integer
cookieExpirationPeriod =
          Maybe Integer
forall a. Maybe a
Prelude.Nothing,
        $sel:loadBalancerName:CreateLBCookieStickinessPolicy' :: Text
loadBalancerName = Text
pLoadBalancerName_,
        $sel:policyName:CreateLBCookieStickinessPolicy' :: Text
policyName = Text
pPolicyName_
      }

-- | The time period, in seconds, after which the cookie should be considered
-- stale. If you do not specify this parameter, the default value is 0,
-- which indicates that the sticky session should last for the duration of
-- the browser session.
createLBCookieStickinessPolicy_cookieExpirationPeriod :: Lens.Lens' CreateLBCookieStickinessPolicy (Prelude.Maybe Prelude.Integer)
createLBCookieStickinessPolicy_cookieExpirationPeriod :: (Maybe Integer -> f (Maybe Integer))
-> CreateLBCookieStickinessPolicy
-> f CreateLBCookieStickinessPolicy
createLBCookieStickinessPolicy_cookieExpirationPeriod = (CreateLBCookieStickinessPolicy -> Maybe Integer)
-> (CreateLBCookieStickinessPolicy
    -> Maybe Integer -> CreateLBCookieStickinessPolicy)
-> Lens
     CreateLBCookieStickinessPolicy
     CreateLBCookieStickinessPolicy
     (Maybe Integer)
     (Maybe Integer)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateLBCookieStickinessPolicy' {Maybe Integer
cookieExpirationPeriod :: Maybe Integer
$sel:cookieExpirationPeriod:CreateLBCookieStickinessPolicy' :: CreateLBCookieStickinessPolicy -> Maybe Integer
cookieExpirationPeriod} -> Maybe Integer
cookieExpirationPeriod) (\s :: CreateLBCookieStickinessPolicy
s@CreateLBCookieStickinessPolicy' {} Maybe Integer
a -> CreateLBCookieStickinessPolicy
s {$sel:cookieExpirationPeriod:CreateLBCookieStickinessPolicy' :: Maybe Integer
cookieExpirationPeriod = Maybe Integer
a} :: CreateLBCookieStickinessPolicy)

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

-- | The name of the policy being created. Policy names must consist of
-- alphanumeric characters and dashes (-). This name must be unique within
-- the set of policies for this load balancer.
createLBCookieStickinessPolicy_policyName :: Lens.Lens' CreateLBCookieStickinessPolicy Prelude.Text
createLBCookieStickinessPolicy_policyName :: (Text -> f Text)
-> CreateLBCookieStickinessPolicy
-> f CreateLBCookieStickinessPolicy
createLBCookieStickinessPolicy_policyName = (CreateLBCookieStickinessPolicy -> Text)
-> (CreateLBCookieStickinessPolicy
    -> Text -> CreateLBCookieStickinessPolicy)
-> Lens
     CreateLBCookieStickinessPolicy
     CreateLBCookieStickinessPolicy
     Text
     Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateLBCookieStickinessPolicy' {Text
policyName :: Text
$sel:policyName:CreateLBCookieStickinessPolicy' :: CreateLBCookieStickinessPolicy -> Text
policyName} -> Text
policyName) (\s :: CreateLBCookieStickinessPolicy
s@CreateLBCookieStickinessPolicy' {} Text
a -> CreateLBCookieStickinessPolicy
s {$sel:policyName:CreateLBCookieStickinessPolicy' :: Text
policyName = Text
a} :: CreateLBCookieStickinessPolicy)

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

instance
  Prelude.NFData
    CreateLBCookieStickinessPolicy

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

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

instance Core.ToQuery CreateLBCookieStickinessPolicy where
  toQuery :: CreateLBCookieStickinessPolicy -> QueryString
toQuery CreateLBCookieStickinessPolicy' {Maybe Integer
Text
policyName :: Text
loadBalancerName :: Text
cookieExpirationPeriod :: Maybe Integer
$sel:policyName:CreateLBCookieStickinessPolicy' :: CreateLBCookieStickinessPolicy -> Text
$sel:loadBalancerName:CreateLBCookieStickinessPolicy' :: CreateLBCookieStickinessPolicy -> Text
$sel:cookieExpirationPeriod:CreateLBCookieStickinessPolicy' :: CreateLBCookieStickinessPolicy -> Maybe Integer
..} =
    [QueryString] -> QueryString
forall a. Monoid a => [a] -> a
Prelude.mconcat
      [ ByteString
"Action"
          ByteString -> ByteString -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: ( ByteString
"CreateLBCookieStickinessPolicy" ::
                      Prelude.ByteString
                  ),
        ByteString
"Version"
          ByteString -> ByteString -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: (ByteString
"2012-06-01" :: Prelude.ByteString),
        ByteString
"CookieExpirationPeriod"
          ByteString -> Maybe Integer -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Maybe Integer
cookieExpirationPeriod,
        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
      ]

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

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

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

instance
  Prelude.NFData
    CreateLBCookieStickinessPolicyResponse