{-# 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.WAFV2.GetManagedRuleSet
-- Copyright   : (c) 2013-2023 Brendan Hay
-- License     : Mozilla Public License, v. 2.0.
-- Maintainer  : Brendan Hay
-- Stability   : auto-generated
-- Portability : non-portable (GHC extensions)
--
-- Retrieves the specified managed rule set.
--
-- This is intended for use only by vendors of managed rule sets. Vendors
-- are Amazon Web Services and Amazon Web Services Marketplace sellers.
--
-- Vendors, you can use the managed rule set APIs to provide controlled
-- rollout of your versioned managed rule group offerings for your
-- customers. The APIs are @ListManagedRuleSets@, @GetManagedRuleSet@,
-- @PutManagedRuleSetVersions@, and
-- @UpdateManagedRuleSetVersionExpiryDate@.
module Amazonka.WAFV2.GetManagedRuleSet
  ( -- * Creating a Request
    GetManagedRuleSet (..),
    newGetManagedRuleSet,

    -- * Request Lenses
    getManagedRuleSet_name,
    getManagedRuleSet_scope,
    getManagedRuleSet_id,

    -- * Destructuring the Response
    GetManagedRuleSetResponse (..),
    newGetManagedRuleSetResponse,

    -- * Response Lenses
    getManagedRuleSetResponse_lockToken,
    getManagedRuleSetResponse_managedRuleSet,
    getManagedRuleSetResponse_httpStatus,
  )
where

import qualified Amazonka.Core as Core
import qualified Amazonka.Core.Lens.Internal as Lens
import qualified Amazonka.Data as Data
import qualified Amazonka.Prelude as Prelude
import qualified Amazonka.Request as Request
import qualified Amazonka.Response as Response
import Amazonka.WAFV2.Types

-- | /See:/ 'newGetManagedRuleSet' smart constructor.
data GetManagedRuleSet = GetManagedRuleSet'
  { -- | The name of the managed rule set. You use this, along with the rule set
    -- ID, to identify the rule set.
    --
    -- This name is assigned to the corresponding managed rule group, which
    -- your customers can access and use.
    GetManagedRuleSet -> Text
name :: Prelude.Text,
    -- | Specifies whether this is for an Amazon CloudFront distribution or for a
    -- regional application. A regional application can be an Application Load
    -- Balancer (ALB), an Amazon API Gateway REST API, an AppSync GraphQL API,
    -- or an Amazon Cognito user pool.
    --
    -- To work with CloudFront, you must also specify the Region US East (N.
    -- Virginia) as follows:
    --
    -- -   CLI - Specify the Region when you use the CloudFront scope:
    --     @--scope=CLOUDFRONT --region=us-east-1@.
    --
    -- -   API and SDKs - For all calls, use the Region endpoint us-east-1.
    GetManagedRuleSet -> Scope
scope :: Scope,
    -- | A unique identifier for the managed rule set. The ID is returned in the
    -- responses to commands like @list@. You provide it to operations like
    -- @get@ and @update@.
    GetManagedRuleSet -> Text
id :: Prelude.Text
  }
  deriving (GetManagedRuleSet -> GetManagedRuleSet -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: GetManagedRuleSet -> GetManagedRuleSet -> Bool
$c/= :: GetManagedRuleSet -> GetManagedRuleSet -> Bool
== :: GetManagedRuleSet -> GetManagedRuleSet -> Bool
$c== :: GetManagedRuleSet -> GetManagedRuleSet -> Bool
Prelude.Eq, ReadPrec [GetManagedRuleSet]
ReadPrec GetManagedRuleSet
Int -> ReadS GetManagedRuleSet
ReadS [GetManagedRuleSet]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [GetManagedRuleSet]
$creadListPrec :: ReadPrec [GetManagedRuleSet]
readPrec :: ReadPrec GetManagedRuleSet
$creadPrec :: ReadPrec GetManagedRuleSet
readList :: ReadS [GetManagedRuleSet]
$creadList :: ReadS [GetManagedRuleSet]
readsPrec :: Int -> ReadS GetManagedRuleSet
$creadsPrec :: Int -> ReadS GetManagedRuleSet
Prelude.Read, Int -> GetManagedRuleSet -> ShowS
[GetManagedRuleSet] -> ShowS
GetManagedRuleSet -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [GetManagedRuleSet] -> ShowS
$cshowList :: [GetManagedRuleSet] -> ShowS
show :: GetManagedRuleSet -> String
$cshow :: GetManagedRuleSet -> String
showsPrec :: Int -> GetManagedRuleSet -> ShowS
$cshowsPrec :: Int -> GetManagedRuleSet -> ShowS
Prelude.Show, forall x. Rep GetManagedRuleSet x -> GetManagedRuleSet
forall x. GetManagedRuleSet -> Rep GetManagedRuleSet x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep GetManagedRuleSet x -> GetManagedRuleSet
$cfrom :: forall x. GetManagedRuleSet -> Rep GetManagedRuleSet x
Prelude.Generic)

-- |
-- Create a value of 'GetManagedRuleSet' 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:
--
-- 'name', 'getManagedRuleSet_name' - The name of the managed rule set. You use this, along with the rule set
-- ID, to identify the rule set.
--
-- This name is assigned to the corresponding managed rule group, which
-- your customers can access and use.
--
-- 'scope', 'getManagedRuleSet_scope' - Specifies whether this is for an Amazon CloudFront distribution or for a
-- regional application. A regional application can be an Application Load
-- Balancer (ALB), an Amazon API Gateway REST API, an AppSync GraphQL API,
-- or an Amazon Cognito user pool.
--
-- To work with CloudFront, you must also specify the Region US East (N.
-- Virginia) as follows:
--
-- -   CLI - Specify the Region when you use the CloudFront scope:
--     @--scope=CLOUDFRONT --region=us-east-1@.
--
-- -   API and SDKs - For all calls, use the Region endpoint us-east-1.
--
-- 'id', 'getManagedRuleSet_id' - A unique identifier for the managed rule set. The ID is returned in the
-- responses to commands like @list@. You provide it to operations like
-- @get@ and @update@.
newGetManagedRuleSet ::
  -- | 'name'
  Prelude.Text ->
  -- | 'scope'
  Scope ->
  -- | 'id'
  Prelude.Text ->
  GetManagedRuleSet
newGetManagedRuleSet :: Text -> Scope -> Text -> GetManagedRuleSet
newGetManagedRuleSet Text
pName_ Scope
pScope_ Text
pId_ =
  GetManagedRuleSet'
    { $sel:name:GetManagedRuleSet' :: Text
name = Text
pName_,
      $sel:scope:GetManagedRuleSet' :: Scope
scope = Scope
pScope_,
      $sel:id:GetManagedRuleSet' :: Text
id = Text
pId_
    }

-- | The name of the managed rule set. You use this, along with the rule set
-- ID, to identify the rule set.
--
-- This name is assigned to the corresponding managed rule group, which
-- your customers can access and use.
getManagedRuleSet_name :: Lens.Lens' GetManagedRuleSet Prelude.Text
getManagedRuleSet_name :: Lens' GetManagedRuleSet Text
getManagedRuleSet_name = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetManagedRuleSet' {Text
name :: Text
$sel:name:GetManagedRuleSet' :: GetManagedRuleSet -> Text
name} -> Text
name) (\s :: GetManagedRuleSet
s@GetManagedRuleSet' {} Text
a -> GetManagedRuleSet
s {$sel:name:GetManagedRuleSet' :: Text
name = Text
a} :: GetManagedRuleSet)

-- | Specifies whether this is for an Amazon CloudFront distribution or for a
-- regional application. A regional application can be an Application Load
-- Balancer (ALB), an Amazon API Gateway REST API, an AppSync GraphQL API,
-- or an Amazon Cognito user pool.
--
-- To work with CloudFront, you must also specify the Region US East (N.
-- Virginia) as follows:
--
-- -   CLI - Specify the Region when you use the CloudFront scope:
--     @--scope=CLOUDFRONT --region=us-east-1@.
--
-- -   API and SDKs - For all calls, use the Region endpoint us-east-1.
getManagedRuleSet_scope :: Lens.Lens' GetManagedRuleSet Scope
getManagedRuleSet_scope :: Lens' GetManagedRuleSet Scope
getManagedRuleSet_scope = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetManagedRuleSet' {Scope
scope :: Scope
$sel:scope:GetManagedRuleSet' :: GetManagedRuleSet -> Scope
scope} -> Scope
scope) (\s :: GetManagedRuleSet
s@GetManagedRuleSet' {} Scope
a -> GetManagedRuleSet
s {$sel:scope:GetManagedRuleSet' :: Scope
scope = Scope
a} :: GetManagedRuleSet)

-- | A unique identifier for the managed rule set. The ID is returned in the
-- responses to commands like @list@. You provide it to operations like
-- @get@ and @update@.
getManagedRuleSet_id :: Lens.Lens' GetManagedRuleSet Prelude.Text
getManagedRuleSet_id :: Lens' GetManagedRuleSet Text
getManagedRuleSet_id = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetManagedRuleSet' {Text
id :: Text
$sel:id:GetManagedRuleSet' :: GetManagedRuleSet -> Text
id} -> Text
id) (\s :: GetManagedRuleSet
s@GetManagedRuleSet' {} Text
a -> GetManagedRuleSet
s {$sel:id:GetManagedRuleSet' :: Text
id = Text
a} :: GetManagedRuleSet)

instance Core.AWSRequest GetManagedRuleSet where
  type
    AWSResponse GetManagedRuleSet =
      GetManagedRuleSetResponse
  request :: (Service -> Service)
-> GetManagedRuleSet -> Request GetManagedRuleSet
request Service -> Service
overrides =
    forall a. (ToRequest a, ToJSON a) => Service -> a -> Request a
Request.postJSON (Service -> Service
overrides Service
defaultService)
  response :: forall (m :: * -> *).
MonadResource m =>
(ByteStringLazy -> IO ByteStringLazy)
-> Service
-> Proxy GetManagedRuleSet
-> ClientResponse ClientBody
-> m (Either
        Error (ClientResponse (AWSResponse GetManagedRuleSet)))
response =
    forall (m :: * -> *) a.
MonadResource m =>
(Int -> ResponseHeaders -> Object -> Either String (AWSResponse a))
-> (ByteStringLazy -> IO ByteStringLazy)
-> Service
-> Proxy a
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse a)))
Response.receiveJSON
      ( \Int
s ResponseHeaders
h Object
x ->
          Maybe Text
-> Maybe ManagedRuleSet -> Int -> GetManagedRuleSetResponse
GetManagedRuleSetResponse'
            forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x forall a. FromJSON a => Object -> Key -> Either String (Maybe a)
Data..?> Key
"LockToken")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Either String (Maybe a)
Data..?> Key
"ManagedRuleSet")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure (forall a. Enum a => a -> Int
Prelude.fromEnum Int
s))
      )

instance Prelude.Hashable GetManagedRuleSet where
  hashWithSalt :: Int -> GetManagedRuleSet -> Int
hashWithSalt Int
_salt GetManagedRuleSet' {Text
Scope
id :: Text
scope :: Scope
name :: Text
$sel:id:GetManagedRuleSet' :: GetManagedRuleSet -> Text
$sel:scope:GetManagedRuleSet' :: GetManagedRuleSet -> Scope
$sel:name:GetManagedRuleSet' :: GetManagedRuleSet -> Text
..} =
    Int
_salt
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
name
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Scope
scope
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
id

instance Prelude.NFData GetManagedRuleSet where
  rnf :: GetManagedRuleSet -> ()
rnf GetManagedRuleSet' {Text
Scope
id :: Text
scope :: Scope
name :: Text
$sel:id:GetManagedRuleSet' :: GetManagedRuleSet -> Text
$sel:scope:GetManagedRuleSet' :: GetManagedRuleSet -> Scope
$sel:name:GetManagedRuleSet' :: GetManagedRuleSet -> Text
..} =
    forall a. NFData a => a -> ()
Prelude.rnf Text
name
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Scope
scope
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Text
id

instance Data.ToHeaders GetManagedRuleSet where
  toHeaders :: GetManagedRuleSet -> ResponseHeaders
toHeaders =
    forall a b. a -> b -> a
Prelude.const
      ( forall a. Monoid a => [a] -> a
Prelude.mconcat
          [ HeaderName
"X-Amz-Target"
              forall a. ToHeader a => HeaderName -> a -> ResponseHeaders
Data.=# ( ByteString
"AWSWAF_20190729.GetManagedRuleSet" ::
                          Prelude.ByteString
                      ),
            HeaderName
"Content-Type"
              forall a. ToHeader a => HeaderName -> a -> ResponseHeaders
Data.=# ( ByteString
"application/x-amz-json-1.1" ::
                          Prelude.ByteString
                      )
          ]
      )

instance Data.ToJSON GetManagedRuleSet where
  toJSON :: GetManagedRuleSet -> Value
toJSON GetManagedRuleSet' {Text
Scope
id :: Text
scope :: Scope
name :: Text
$sel:id:GetManagedRuleSet' :: GetManagedRuleSet -> Text
$sel:scope:GetManagedRuleSet' :: GetManagedRuleSet -> Scope
$sel:name:GetManagedRuleSet' :: GetManagedRuleSet -> Text
..} =
    [Pair] -> Value
Data.object
      ( forall a. [Maybe a] -> [a]
Prelude.catMaybes
          [ forall a. a -> Maybe a
Prelude.Just (Key
"Name" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..= Text
name),
            forall a. a -> Maybe a
Prelude.Just (Key
"Scope" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..= Scope
scope),
            forall a. a -> Maybe a
Prelude.Just (Key
"Id" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..= Text
id)
          ]
      )

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

instance Data.ToQuery GetManagedRuleSet where
  toQuery :: GetManagedRuleSet -> QueryString
toQuery = forall a b. a -> b -> a
Prelude.const forall a. Monoid a => a
Prelude.mempty

-- | /See:/ 'newGetManagedRuleSetResponse' smart constructor.
data GetManagedRuleSetResponse = GetManagedRuleSetResponse'
  { -- | A token used for optimistic locking. WAF returns a token to your @get@
    -- and @list@ requests, to mark the state of the entity at the time of the
    -- request. To make changes to the entity associated with the token, you
    -- provide the token to operations like @update@ and @delete@. WAF uses the
    -- token to ensure that no changes have been made to the entity since you
    -- last retrieved it. If a change has been made, the update fails with a
    -- @WAFOptimisticLockException@. If this happens, perform another @get@,
    -- and use the new token returned by that operation.
    GetManagedRuleSetResponse -> Maybe Text
lockToken :: Prelude.Maybe Prelude.Text,
    -- | The managed rule set that you requested.
    GetManagedRuleSetResponse -> Maybe ManagedRuleSet
managedRuleSet :: Prelude.Maybe ManagedRuleSet,
    -- | The response's http status code.
    GetManagedRuleSetResponse -> Int
httpStatus :: Prelude.Int
  }
  deriving (GetManagedRuleSetResponse -> GetManagedRuleSetResponse -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: GetManagedRuleSetResponse -> GetManagedRuleSetResponse -> Bool
$c/= :: GetManagedRuleSetResponse -> GetManagedRuleSetResponse -> Bool
== :: GetManagedRuleSetResponse -> GetManagedRuleSetResponse -> Bool
$c== :: GetManagedRuleSetResponse -> GetManagedRuleSetResponse -> Bool
Prelude.Eq, ReadPrec [GetManagedRuleSetResponse]
ReadPrec GetManagedRuleSetResponse
Int -> ReadS GetManagedRuleSetResponse
ReadS [GetManagedRuleSetResponse]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [GetManagedRuleSetResponse]
$creadListPrec :: ReadPrec [GetManagedRuleSetResponse]
readPrec :: ReadPrec GetManagedRuleSetResponse
$creadPrec :: ReadPrec GetManagedRuleSetResponse
readList :: ReadS [GetManagedRuleSetResponse]
$creadList :: ReadS [GetManagedRuleSetResponse]
readsPrec :: Int -> ReadS GetManagedRuleSetResponse
$creadsPrec :: Int -> ReadS GetManagedRuleSetResponse
Prelude.Read, Int -> GetManagedRuleSetResponse -> ShowS
[GetManagedRuleSetResponse] -> ShowS
GetManagedRuleSetResponse -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [GetManagedRuleSetResponse] -> ShowS
$cshowList :: [GetManagedRuleSetResponse] -> ShowS
show :: GetManagedRuleSetResponse -> String
$cshow :: GetManagedRuleSetResponse -> String
showsPrec :: Int -> GetManagedRuleSetResponse -> ShowS
$cshowsPrec :: Int -> GetManagedRuleSetResponse -> ShowS
Prelude.Show, forall x.
Rep GetManagedRuleSetResponse x -> GetManagedRuleSetResponse
forall x.
GetManagedRuleSetResponse -> Rep GetManagedRuleSetResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep GetManagedRuleSetResponse x -> GetManagedRuleSetResponse
$cfrom :: forall x.
GetManagedRuleSetResponse -> Rep GetManagedRuleSetResponse x
Prelude.Generic)

-- |
-- Create a value of 'GetManagedRuleSetResponse' 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:
--
-- 'lockToken', 'getManagedRuleSetResponse_lockToken' - A token used for optimistic locking. WAF returns a token to your @get@
-- and @list@ requests, to mark the state of the entity at the time of the
-- request. To make changes to the entity associated with the token, you
-- provide the token to operations like @update@ and @delete@. WAF uses the
-- token to ensure that no changes have been made to the entity since you
-- last retrieved it. If a change has been made, the update fails with a
-- @WAFOptimisticLockException@. If this happens, perform another @get@,
-- and use the new token returned by that operation.
--
-- 'managedRuleSet', 'getManagedRuleSetResponse_managedRuleSet' - The managed rule set that you requested.
--
-- 'httpStatus', 'getManagedRuleSetResponse_httpStatus' - The response's http status code.
newGetManagedRuleSetResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  GetManagedRuleSetResponse
newGetManagedRuleSetResponse :: Int -> GetManagedRuleSetResponse
newGetManagedRuleSetResponse Int
pHttpStatus_ =
  GetManagedRuleSetResponse'
    { $sel:lockToken:GetManagedRuleSetResponse' :: Maybe Text
lockToken =
        forall a. Maybe a
Prelude.Nothing,
      $sel:managedRuleSet:GetManagedRuleSetResponse' :: Maybe ManagedRuleSet
managedRuleSet = forall a. Maybe a
Prelude.Nothing,
      $sel:httpStatus:GetManagedRuleSetResponse' :: Int
httpStatus = Int
pHttpStatus_
    }

-- | A token used for optimistic locking. WAF returns a token to your @get@
-- and @list@ requests, to mark the state of the entity at the time of the
-- request. To make changes to the entity associated with the token, you
-- provide the token to operations like @update@ and @delete@. WAF uses the
-- token to ensure that no changes have been made to the entity since you
-- last retrieved it. If a change has been made, the update fails with a
-- @WAFOptimisticLockException@. If this happens, perform another @get@,
-- and use the new token returned by that operation.
getManagedRuleSetResponse_lockToken :: Lens.Lens' GetManagedRuleSetResponse (Prelude.Maybe Prelude.Text)
getManagedRuleSetResponse_lockToken :: Lens' GetManagedRuleSetResponse (Maybe Text)
getManagedRuleSetResponse_lockToken = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetManagedRuleSetResponse' {Maybe Text
lockToken :: Maybe Text
$sel:lockToken:GetManagedRuleSetResponse' :: GetManagedRuleSetResponse -> Maybe Text
lockToken} -> Maybe Text
lockToken) (\s :: GetManagedRuleSetResponse
s@GetManagedRuleSetResponse' {} Maybe Text
a -> GetManagedRuleSetResponse
s {$sel:lockToken:GetManagedRuleSetResponse' :: Maybe Text
lockToken = Maybe Text
a} :: GetManagedRuleSetResponse)

-- | The managed rule set that you requested.
getManagedRuleSetResponse_managedRuleSet :: Lens.Lens' GetManagedRuleSetResponse (Prelude.Maybe ManagedRuleSet)
getManagedRuleSetResponse_managedRuleSet :: Lens' GetManagedRuleSetResponse (Maybe ManagedRuleSet)
getManagedRuleSetResponse_managedRuleSet = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetManagedRuleSetResponse' {Maybe ManagedRuleSet
managedRuleSet :: Maybe ManagedRuleSet
$sel:managedRuleSet:GetManagedRuleSetResponse' :: GetManagedRuleSetResponse -> Maybe ManagedRuleSet
managedRuleSet} -> Maybe ManagedRuleSet
managedRuleSet) (\s :: GetManagedRuleSetResponse
s@GetManagedRuleSetResponse' {} Maybe ManagedRuleSet
a -> GetManagedRuleSetResponse
s {$sel:managedRuleSet:GetManagedRuleSetResponse' :: Maybe ManagedRuleSet
managedRuleSet = Maybe ManagedRuleSet
a} :: GetManagedRuleSetResponse)

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

instance Prelude.NFData GetManagedRuleSetResponse where
  rnf :: GetManagedRuleSetResponse -> ()
rnf GetManagedRuleSetResponse' {Int
Maybe Text
Maybe ManagedRuleSet
httpStatus :: Int
managedRuleSet :: Maybe ManagedRuleSet
lockToken :: Maybe Text
$sel:httpStatus:GetManagedRuleSetResponse' :: GetManagedRuleSetResponse -> Int
$sel:managedRuleSet:GetManagedRuleSetResponse' :: GetManagedRuleSetResponse -> Maybe ManagedRuleSet
$sel:lockToken:GetManagedRuleSetResponse' :: GetManagedRuleSetResponse -> Maybe Text
..} =
    forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
lockToken
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe ManagedRuleSet
managedRuleSet
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Int
httpStatus