{-# 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.GetRuleGroup
-- 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 RuleGroup.
module Amazonka.WAFV2.GetRuleGroup
  ( -- * Creating a Request
    GetRuleGroup (..),
    newGetRuleGroup,

    -- * Request Lenses
    getRuleGroup_arn,
    getRuleGroup_id,
    getRuleGroup_name,
    getRuleGroup_scope,

    -- * Destructuring the Response
    GetRuleGroupResponse (..),
    newGetRuleGroupResponse,

    -- * Response Lenses
    getRuleGroupResponse_lockToken,
    getRuleGroupResponse_ruleGroup,
    getRuleGroupResponse_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:/ 'newGetRuleGroup' smart constructor.
data GetRuleGroup = GetRuleGroup'
  { -- | The Amazon Resource Name (ARN) of the entity.
    GetRuleGroup -> Maybe Text
arn :: Prelude.Maybe Prelude.Text,
    -- | A unique identifier for the rule group. This ID is returned in the
    -- responses to create and list commands. You provide it to operations like
    -- update and delete.
    GetRuleGroup -> Maybe Text
id :: Prelude.Maybe Prelude.Text,
    -- | The name of the rule group. You cannot change the name of a rule group
    -- after you create it.
    GetRuleGroup -> Maybe Text
name :: Prelude.Maybe 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.
    GetRuleGroup -> Maybe Scope
scope :: Prelude.Maybe Scope
  }
  deriving (GetRuleGroup -> GetRuleGroup -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: GetRuleGroup -> GetRuleGroup -> Bool
$c/= :: GetRuleGroup -> GetRuleGroup -> Bool
== :: GetRuleGroup -> GetRuleGroup -> Bool
$c== :: GetRuleGroup -> GetRuleGroup -> Bool
Prelude.Eq, ReadPrec [GetRuleGroup]
ReadPrec GetRuleGroup
Int -> ReadS GetRuleGroup
ReadS [GetRuleGroup]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [GetRuleGroup]
$creadListPrec :: ReadPrec [GetRuleGroup]
readPrec :: ReadPrec GetRuleGroup
$creadPrec :: ReadPrec GetRuleGroup
readList :: ReadS [GetRuleGroup]
$creadList :: ReadS [GetRuleGroup]
readsPrec :: Int -> ReadS GetRuleGroup
$creadsPrec :: Int -> ReadS GetRuleGroup
Prelude.Read, Int -> GetRuleGroup -> ShowS
[GetRuleGroup] -> ShowS
GetRuleGroup -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [GetRuleGroup] -> ShowS
$cshowList :: [GetRuleGroup] -> ShowS
show :: GetRuleGroup -> String
$cshow :: GetRuleGroup -> String
showsPrec :: Int -> GetRuleGroup -> ShowS
$cshowsPrec :: Int -> GetRuleGroup -> ShowS
Prelude.Show, forall x. Rep GetRuleGroup x -> GetRuleGroup
forall x. GetRuleGroup -> Rep GetRuleGroup x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep GetRuleGroup x -> GetRuleGroup
$cfrom :: forall x. GetRuleGroup -> Rep GetRuleGroup x
Prelude.Generic)

-- |
-- Create a value of 'GetRuleGroup' 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:
--
-- 'arn', 'getRuleGroup_arn' - The Amazon Resource Name (ARN) of the entity.
--
-- 'id', 'getRuleGroup_id' - A unique identifier for the rule group. This ID is returned in the
-- responses to create and list commands. You provide it to operations like
-- update and delete.
--
-- 'name', 'getRuleGroup_name' - The name of the rule group. You cannot change the name of a rule group
-- after you create it.
--
-- 'scope', 'getRuleGroup_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.
newGetRuleGroup ::
  GetRuleGroup
newGetRuleGroup :: GetRuleGroup
newGetRuleGroup =
  GetRuleGroup'
    { $sel:arn:GetRuleGroup' :: Maybe Text
arn = forall a. Maybe a
Prelude.Nothing,
      $sel:id:GetRuleGroup' :: Maybe Text
id = forall a. Maybe a
Prelude.Nothing,
      $sel:name:GetRuleGroup' :: Maybe Text
name = forall a. Maybe a
Prelude.Nothing,
      $sel:scope:GetRuleGroup' :: Maybe Scope
scope = forall a. Maybe a
Prelude.Nothing
    }

-- | The Amazon Resource Name (ARN) of the entity.
getRuleGroup_arn :: Lens.Lens' GetRuleGroup (Prelude.Maybe Prelude.Text)
getRuleGroup_arn :: Lens' GetRuleGroup (Maybe Text)
getRuleGroup_arn = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetRuleGroup' {Maybe Text
arn :: Maybe Text
$sel:arn:GetRuleGroup' :: GetRuleGroup -> Maybe Text
arn} -> Maybe Text
arn) (\s :: GetRuleGroup
s@GetRuleGroup' {} Maybe Text
a -> GetRuleGroup
s {$sel:arn:GetRuleGroup' :: Maybe Text
arn = Maybe Text
a} :: GetRuleGroup)

-- | A unique identifier for the rule group. This ID is returned in the
-- responses to create and list commands. You provide it to operations like
-- update and delete.
getRuleGroup_id :: Lens.Lens' GetRuleGroup (Prelude.Maybe Prelude.Text)
getRuleGroup_id :: Lens' GetRuleGroup (Maybe Text)
getRuleGroup_id = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetRuleGroup' {Maybe Text
id :: Maybe Text
$sel:id:GetRuleGroup' :: GetRuleGroup -> Maybe Text
id} -> Maybe Text
id) (\s :: GetRuleGroup
s@GetRuleGroup' {} Maybe Text
a -> GetRuleGroup
s {$sel:id:GetRuleGroup' :: Maybe Text
id = Maybe Text
a} :: GetRuleGroup)

-- | The name of the rule group. You cannot change the name of a rule group
-- after you create it.
getRuleGroup_name :: Lens.Lens' GetRuleGroup (Prelude.Maybe Prelude.Text)
getRuleGroup_name :: Lens' GetRuleGroup (Maybe Text)
getRuleGroup_name = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetRuleGroup' {Maybe Text
name :: Maybe Text
$sel:name:GetRuleGroup' :: GetRuleGroup -> Maybe Text
name} -> Maybe Text
name) (\s :: GetRuleGroup
s@GetRuleGroup' {} Maybe Text
a -> GetRuleGroup
s {$sel:name:GetRuleGroup' :: Maybe Text
name = Maybe Text
a} :: GetRuleGroup)

-- | 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.
getRuleGroup_scope :: Lens.Lens' GetRuleGroup (Prelude.Maybe Scope)
getRuleGroup_scope :: Lens' GetRuleGroup (Maybe Scope)
getRuleGroup_scope = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetRuleGroup' {Maybe Scope
scope :: Maybe Scope
$sel:scope:GetRuleGroup' :: GetRuleGroup -> Maybe Scope
scope} -> Maybe Scope
scope) (\s :: GetRuleGroup
s@GetRuleGroup' {} Maybe Scope
a -> GetRuleGroup
s {$sel:scope:GetRuleGroup' :: Maybe Scope
scope = Maybe Scope
a} :: GetRuleGroup)

instance Core.AWSRequest GetRuleGroup where
  type AWSResponse GetRuleGroup = GetRuleGroupResponse
  request :: (Service -> Service) -> GetRuleGroup -> Request GetRuleGroup
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 GetRuleGroup
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse GetRuleGroup)))
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 RuleGroup -> Int -> GetRuleGroupResponse
GetRuleGroupResponse'
            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
"RuleGroup")
            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 GetRuleGroup where
  hashWithSalt :: Int -> GetRuleGroup -> Int
hashWithSalt Int
_salt GetRuleGroup' {Maybe Text
Maybe Scope
scope :: Maybe Scope
name :: Maybe Text
id :: Maybe Text
arn :: Maybe Text
$sel:scope:GetRuleGroup' :: GetRuleGroup -> Maybe Scope
$sel:name:GetRuleGroup' :: GetRuleGroup -> Maybe Text
$sel:id:GetRuleGroup' :: GetRuleGroup -> Maybe Text
$sel:arn:GetRuleGroup' :: GetRuleGroup -> Maybe Text
..} =
    Int
_salt
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
arn
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
id
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
name
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Scope
scope

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

instance Data.ToHeaders GetRuleGroup where
  toHeaders :: GetRuleGroup -> 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.GetRuleGroup" ::
                          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 GetRuleGroup where
  toJSON :: GetRuleGroup -> Value
toJSON GetRuleGroup' {Maybe Text
Maybe Scope
scope :: Maybe Scope
name :: Maybe Text
id :: Maybe Text
arn :: Maybe Text
$sel:scope:GetRuleGroup' :: GetRuleGroup -> Maybe Scope
$sel:name:GetRuleGroup' :: GetRuleGroup -> Maybe Text
$sel:id:GetRuleGroup' :: GetRuleGroup -> Maybe Text
$sel:arn:GetRuleGroup' :: GetRuleGroup -> Maybe Text
..} =
    [Pair] -> Value
Data.object
      ( forall a. [Maybe a] -> [a]
Prelude.catMaybes
          [ (Key
"ARN" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=) forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
arn,
            (Key
"Id" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=) forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
id,
            (Key
"Name" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=) forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
name,
            (Key
"Scope" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=) forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Scope
scope
          ]
      )

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

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

-- | /See:/ 'newGetRuleGroupResponse' smart constructor.
data GetRuleGroupResponse = GetRuleGroupResponse'
  { -- | 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.
    GetRuleGroupResponse -> Maybe Text
lockToken :: Prelude.Maybe Prelude.Text,
    GetRuleGroupResponse -> Maybe RuleGroup
ruleGroup :: Prelude.Maybe RuleGroup,
    -- | The response's http status code.
    GetRuleGroupResponse -> Int
httpStatus :: Prelude.Int
  }
  deriving (GetRuleGroupResponse -> GetRuleGroupResponse -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: GetRuleGroupResponse -> GetRuleGroupResponse -> Bool
$c/= :: GetRuleGroupResponse -> GetRuleGroupResponse -> Bool
== :: GetRuleGroupResponse -> GetRuleGroupResponse -> Bool
$c== :: GetRuleGroupResponse -> GetRuleGroupResponse -> Bool
Prelude.Eq, ReadPrec [GetRuleGroupResponse]
ReadPrec GetRuleGroupResponse
Int -> ReadS GetRuleGroupResponse
ReadS [GetRuleGroupResponse]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [GetRuleGroupResponse]
$creadListPrec :: ReadPrec [GetRuleGroupResponse]
readPrec :: ReadPrec GetRuleGroupResponse
$creadPrec :: ReadPrec GetRuleGroupResponse
readList :: ReadS [GetRuleGroupResponse]
$creadList :: ReadS [GetRuleGroupResponse]
readsPrec :: Int -> ReadS GetRuleGroupResponse
$creadsPrec :: Int -> ReadS GetRuleGroupResponse
Prelude.Read, Int -> GetRuleGroupResponse -> ShowS
[GetRuleGroupResponse] -> ShowS
GetRuleGroupResponse -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [GetRuleGroupResponse] -> ShowS
$cshowList :: [GetRuleGroupResponse] -> ShowS
show :: GetRuleGroupResponse -> String
$cshow :: GetRuleGroupResponse -> String
showsPrec :: Int -> GetRuleGroupResponse -> ShowS
$cshowsPrec :: Int -> GetRuleGroupResponse -> ShowS
Prelude.Show, forall x. Rep GetRuleGroupResponse x -> GetRuleGroupResponse
forall x. GetRuleGroupResponse -> Rep GetRuleGroupResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep GetRuleGroupResponse x -> GetRuleGroupResponse
$cfrom :: forall x. GetRuleGroupResponse -> Rep GetRuleGroupResponse x
Prelude.Generic)

-- |
-- Create a value of 'GetRuleGroupResponse' 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', 'getRuleGroupResponse_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.
--
-- 'ruleGroup', 'getRuleGroupResponse_ruleGroup' -
--
-- 'httpStatus', 'getRuleGroupResponse_httpStatus' - The response's http status code.
newGetRuleGroupResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  GetRuleGroupResponse
newGetRuleGroupResponse :: Int -> GetRuleGroupResponse
newGetRuleGroupResponse Int
pHttpStatus_ =
  GetRuleGroupResponse'
    { $sel:lockToken:GetRuleGroupResponse' :: Maybe Text
lockToken = forall a. Maybe a
Prelude.Nothing,
      $sel:ruleGroup:GetRuleGroupResponse' :: Maybe RuleGroup
ruleGroup = forall a. Maybe a
Prelude.Nothing,
      $sel:httpStatus:GetRuleGroupResponse' :: 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.
getRuleGroupResponse_lockToken :: Lens.Lens' GetRuleGroupResponse (Prelude.Maybe Prelude.Text)
getRuleGroupResponse_lockToken :: Lens' GetRuleGroupResponse (Maybe Text)
getRuleGroupResponse_lockToken = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetRuleGroupResponse' {Maybe Text
lockToken :: Maybe Text
$sel:lockToken:GetRuleGroupResponse' :: GetRuleGroupResponse -> Maybe Text
lockToken} -> Maybe Text
lockToken) (\s :: GetRuleGroupResponse
s@GetRuleGroupResponse' {} Maybe Text
a -> GetRuleGroupResponse
s {$sel:lockToken:GetRuleGroupResponse' :: Maybe Text
lockToken = Maybe Text
a} :: GetRuleGroupResponse)

getRuleGroupResponse_ruleGroup :: Lens.Lens' GetRuleGroupResponse (Prelude.Maybe RuleGroup)
getRuleGroupResponse_ruleGroup :: Lens' GetRuleGroupResponse (Maybe RuleGroup)
getRuleGroupResponse_ruleGroup = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetRuleGroupResponse' {Maybe RuleGroup
ruleGroup :: Maybe RuleGroup
$sel:ruleGroup:GetRuleGroupResponse' :: GetRuleGroupResponse -> Maybe RuleGroup
ruleGroup} -> Maybe RuleGroup
ruleGroup) (\s :: GetRuleGroupResponse
s@GetRuleGroupResponse' {} Maybe RuleGroup
a -> GetRuleGroupResponse
s {$sel:ruleGroup:GetRuleGroupResponse' :: Maybe RuleGroup
ruleGroup = Maybe RuleGroup
a} :: GetRuleGroupResponse)

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

instance Prelude.NFData GetRuleGroupResponse where
  rnf :: GetRuleGroupResponse -> ()
rnf GetRuleGroupResponse' {Int
Maybe Text
Maybe RuleGroup
httpStatus :: Int
ruleGroup :: Maybe RuleGroup
lockToken :: Maybe Text
$sel:httpStatus:GetRuleGroupResponse' :: GetRuleGroupResponse -> Int
$sel:ruleGroup:GetRuleGroupResponse' :: GetRuleGroupResponse -> Maybe RuleGroup
$sel:lockToken:GetRuleGroupResponse' :: GetRuleGroupResponse -> 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 RuleGroup
ruleGroup
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Int
httpStatus