{-# 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.ListRuleGroups
-- 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 an array of RuleGroupSummary objects for the rule groups that
-- you manage.
module Amazonka.WAFV2.ListRuleGroups
  ( -- * Creating a Request
    ListRuleGroups (..),
    newListRuleGroups,

    -- * Request Lenses
    listRuleGroups_limit,
    listRuleGroups_nextMarker,
    listRuleGroups_scope,

    -- * Destructuring the Response
    ListRuleGroupsResponse (..),
    newListRuleGroupsResponse,

    -- * Response Lenses
    listRuleGroupsResponse_nextMarker,
    listRuleGroupsResponse_ruleGroups,
    listRuleGroupsResponse_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:/ 'newListRuleGroups' smart constructor.
data ListRuleGroups = ListRuleGroups'
  { -- | The maximum number of objects that you want WAF to return for this
    -- request. If more objects are available, in the response, WAF provides a
    -- @NextMarker@ value that you can use in a subsequent call to get the next
    -- batch of objects.
    ListRuleGroups -> Maybe Natural
limit :: Prelude.Maybe Prelude.Natural,
    -- | When you request a list of objects with a @Limit@ setting, if the number
    -- of objects that are still available for retrieval exceeds the limit, WAF
    -- returns a @NextMarker@ value in the response. To retrieve the next batch
    -- of objects, provide the marker from the prior call in your next request.
    ListRuleGroups -> Maybe Text
nextMarker :: 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.
    ListRuleGroups -> Scope
scope :: Scope
  }
  deriving (ListRuleGroups -> ListRuleGroups -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ListRuleGroups -> ListRuleGroups -> Bool
$c/= :: ListRuleGroups -> ListRuleGroups -> Bool
== :: ListRuleGroups -> ListRuleGroups -> Bool
$c== :: ListRuleGroups -> ListRuleGroups -> Bool
Prelude.Eq, ReadPrec [ListRuleGroups]
ReadPrec ListRuleGroups
Int -> ReadS ListRuleGroups
ReadS [ListRuleGroups]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ListRuleGroups]
$creadListPrec :: ReadPrec [ListRuleGroups]
readPrec :: ReadPrec ListRuleGroups
$creadPrec :: ReadPrec ListRuleGroups
readList :: ReadS [ListRuleGroups]
$creadList :: ReadS [ListRuleGroups]
readsPrec :: Int -> ReadS ListRuleGroups
$creadsPrec :: Int -> ReadS ListRuleGroups
Prelude.Read, Int -> ListRuleGroups -> ShowS
[ListRuleGroups] -> ShowS
ListRuleGroups -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ListRuleGroups] -> ShowS
$cshowList :: [ListRuleGroups] -> ShowS
show :: ListRuleGroups -> String
$cshow :: ListRuleGroups -> String
showsPrec :: Int -> ListRuleGroups -> ShowS
$cshowsPrec :: Int -> ListRuleGroups -> ShowS
Prelude.Show, forall x. Rep ListRuleGroups x -> ListRuleGroups
forall x. ListRuleGroups -> Rep ListRuleGroups x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep ListRuleGroups x -> ListRuleGroups
$cfrom :: forall x. ListRuleGroups -> Rep ListRuleGroups x
Prelude.Generic)

-- |
-- Create a value of 'ListRuleGroups' 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:
--
-- 'limit', 'listRuleGroups_limit' - The maximum number of objects that you want WAF to return for this
-- request. If more objects are available, in the response, WAF provides a
-- @NextMarker@ value that you can use in a subsequent call to get the next
-- batch of objects.
--
-- 'nextMarker', 'listRuleGroups_nextMarker' - When you request a list of objects with a @Limit@ setting, if the number
-- of objects that are still available for retrieval exceeds the limit, WAF
-- returns a @NextMarker@ value in the response. To retrieve the next batch
-- of objects, provide the marker from the prior call in your next request.
--
-- 'scope', 'listRuleGroups_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.
newListRuleGroups ::
  -- | 'scope'
  Scope ->
  ListRuleGroups
newListRuleGroups :: Scope -> ListRuleGroups
newListRuleGroups Scope
pScope_ =
  ListRuleGroups'
    { $sel:limit:ListRuleGroups' :: Maybe Natural
limit = forall a. Maybe a
Prelude.Nothing,
      $sel:nextMarker:ListRuleGroups' :: Maybe Text
nextMarker = forall a. Maybe a
Prelude.Nothing,
      $sel:scope:ListRuleGroups' :: Scope
scope = Scope
pScope_
    }

-- | The maximum number of objects that you want WAF to return for this
-- request. If more objects are available, in the response, WAF provides a
-- @NextMarker@ value that you can use in a subsequent call to get the next
-- batch of objects.
listRuleGroups_limit :: Lens.Lens' ListRuleGroups (Prelude.Maybe Prelude.Natural)
listRuleGroups_limit :: Lens' ListRuleGroups (Maybe Natural)
listRuleGroups_limit = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListRuleGroups' {Maybe Natural
limit :: Maybe Natural
$sel:limit:ListRuleGroups' :: ListRuleGroups -> Maybe Natural
limit} -> Maybe Natural
limit) (\s :: ListRuleGroups
s@ListRuleGroups' {} Maybe Natural
a -> ListRuleGroups
s {$sel:limit:ListRuleGroups' :: Maybe Natural
limit = Maybe Natural
a} :: ListRuleGroups)

-- | When you request a list of objects with a @Limit@ setting, if the number
-- of objects that are still available for retrieval exceeds the limit, WAF
-- returns a @NextMarker@ value in the response. To retrieve the next batch
-- of objects, provide the marker from the prior call in your next request.
listRuleGroups_nextMarker :: Lens.Lens' ListRuleGroups (Prelude.Maybe Prelude.Text)
listRuleGroups_nextMarker :: Lens' ListRuleGroups (Maybe Text)
listRuleGroups_nextMarker = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListRuleGroups' {Maybe Text
nextMarker :: Maybe Text
$sel:nextMarker:ListRuleGroups' :: ListRuleGroups -> Maybe Text
nextMarker} -> Maybe Text
nextMarker) (\s :: ListRuleGroups
s@ListRuleGroups' {} Maybe Text
a -> ListRuleGroups
s {$sel:nextMarker:ListRuleGroups' :: Maybe Text
nextMarker = Maybe Text
a} :: ListRuleGroups)

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

instance Core.AWSRequest ListRuleGroups where
  type
    AWSResponse ListRuleGroups =
      ListRuleGroupsResponse
  request :: (Service -> Service) -> ListRuleGroups -> Request ListRuleGroups
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 ListRuleGroups
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse ListRuleGroups)))
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 [RuleGroupSummary] -> Int -> ListRuleGroupsResponse
ListRuleGroupsResponse'
            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
"NextMarker")
            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
"RuleGroups" forall (f :: * -> *) a. Functor f => f (Maybe a) -> a -> f a
Core..!@ forall a. Monoid a => a
Prelude.mempty)
            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 ListRuleGroups where
  hashWithSalt :: Int -> ListRuleGroups -> Int
hashWithSalt Int
_salt ListRuleGroups' {Maybe Natural
Maybe Text
Scope
scope :: Scope
nextMarker :: Maybe Text
limit :: Maybe Natural
$sel:scope:ListRuleGroups' :: ListRuleGroups -> Scope
$sel:nextMarker:ListRuleGroups' :: ListRuleGroups -> Maybe Text
$sel:limit:ListRuleGroups' :: ListRuleGroups -> Maybe Natural
..} =
    Int
_salt
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Natural
limit
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
nextMarker
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Scope
scope

instance Prelude.NFData ListRuleGroups where
  rnf :: ListRuleGroups -> ()
rnf ListRuleGroups' {Maybe Natural
Maybe Text
Scope
scope :: Scope
nextMarker :: Maybe Text
limit :: Maybe Natural
$sel:scope:ListRuleGroups' :: ListRuleGroups -> Scope
$sel:nextMarker:ListRuleGroups' :: ListRuleGroups -> Maybe Text
$sel:limit:ListRuleGroups' :: ListRuleGroups -> Maybe Natural
..} =
    forall a. NFData a => a -> ()
Prelude.rnf Maybe Natural
limit
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
nextMarker
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Scope
scope

instance Data.ToHeaders ListRuleGroups where
  toHeaders :: ListRuleGroups -> 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.ListRuleGroups" ::
                          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 ListRuleGroups where
  toJSON :: ListRuleGroups -> Value
toJSON ListRuleGroups' {Maybe Natural
Maybe Text
Scope
scope :: Scope
nextMarker :: Maybe Text
limit :: Maybe Natural
$sel:scope:ListRuleGroups' :: ListRuleGroups -> Scope
$sel:nextMarker:ListRuleGroups' :: ListRuleGroups -> Maybe Text
$sel:limit:ListRuleGroups' :: ListRuleGroups -> Maybe Natural
..} =
    [Pair] -> Value
Data.object
      ( forall a. [Maybe a] -> [a]
Prelude.catMaybes
          [ (Key
"Limit" 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 Natural
limit,
            (Key
"NextMarker" 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
nextMarker,
            forall a. a -> Maybe a
Prelude.Just (Key
"Scope" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..= Scope
scope)
          ]
      )

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

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

-- | /See:/ 'newListRuleGroupsResponse' smart constructor.
data ListRuleGroupsResponse = ListRuleGroupsResponse'
  { -- | When you request a list of objects with a @Limit@ setting, if the number
    -- of objects that are still available for retrieval exceeds the limit, WAF
    -- returns a @NextMarker@ value in the response. To retrieve the next batch
    -- of objects, provide the marker from the prior call in your next request.
    ListRuleGroupsResponse -> Maybe Text
nextMarker :: Prelude.Maybe Prelude.Text,
    ListRuleGroupsResponse -> Maybe [RuleGroupSummary]
ruleGroups :: Prelude.Maybe [RuleGroupSummary],
    -- | The response's http status code.
    ListRuleGroupsResponse -> Int
httpStatus :: Prelude.Int
  }
  deriving (ListRuleGroupsResponse -> ListRuleGroupsResponse -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ListRuleGroupsResponse -> ListRuleGroupsResponse -> Bool
$c/= :: ListRuleGroupsResponse -> ListRuleGroupsResponse -> Bool
== :: ListRuleGroupsResponse -> ListRuleGroupsResponse -> Bool
$c== :: ListRuleGroupsResponse -> ListRuleGroupsResponse -> Bool
Prelude.Eq, ReadPrec [ListRuleGroupsResponse]
ReadPrec ListRuleGroupsResponse
Int -> ReadS ListRuleGroupsResponse
ReadS [ListRuleGroupsResponse]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ListRuleGroupsResponse]
$creadListPrec :: ReadPrec [ListRuleGroupsResponse]
readPrec :: ReadPrec ListRuleGroupsResponse
$creadPrec :: ReadPrec ListRuleGroupsResponse
readList :: ReadS [ListRuleGroupsResponse]
$creadList :: ReadS [ListRuleGroupsResponse]
readsPrec :: Int -> ReadS ListRuleGroupsResponse
$creadsPrec :: Int -> ReadS ListRuleGroupsResponse
Prelude.Read, Int -> ListRuleGroupsResponse -> ShowS
[ListRuleGroupsResponse] -> ShowS
ListRuleGroupsResponse -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ListRuleGroupsResponse] -> ShowS
$cshowList :: [ListRuleGroupsResponse] -> ShowS
show :: ListRuleGroupsResponse -> String
$cshow :: ListRuleGroupsResponse -> String
showsPrec :: Int -> ListRuleGroupsResponse -> ShowS
$cshowsPrec :: Int -> ListRuleGroupsResponse -> ShowS
Prelude.Show, forall x. Rep ListRuleGroupsResponse x -> ListRuleGroupsResponse
forall x. ListRuleGroupsResponse -> Rep ListRuleGroupsResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep ListRuleGroupsResponse x -> ListRuleGroupsResponse
$cfrom :: forall x. ListRuleGroupsResponse -> Rep ListRuleGroupsResponse x
Prelude.Generic)

-- |
-- Create a value of 'ListRuleGroupsResponse' 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:
--
-- 'nextMarker', 'listRuleGroupsResponse_nextMarker' - When you request a list of objects with a @Limit@ setting, if the number
-- of objects that are still available for retrieval exceeds the limit, WAF
-- returns a @NextMarker@ value in the response. To retrieve the next batch
-- of objects, provide the marker from the prior call in your next request.
--
-- 'ruleGroups', 'listRuleGroupsResponse_ruleGroups' -
--
-- 'httpStatus', 'listRuleGroupsResponse_httpStatus' - The response's http status code.
newListRuleGroupsResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  ListRuleGroupsResponse
newListRuleGroupsResponse :: Int -> ListRuleGroupsResponse
newListRuleGroupsResponse Int
pHttpStatus_ =
  ListRuleGroupsResponse'
    { $sel:nextMarker:ListRuleGroupsResponse' :: Maybe Text
nextMarker =
        forall a. Maybe a
Prelude.Nothing,
      $sel:ruleGroups:ListRuleGroupsResponse' :: Maybe [RuleGroupSummary]
ruleGroups = forall a. Maybe a
Prelude.Nothing,
      $sel:httpStatus:ListRuleGroupsResponse' :: Int
httpStatus = Int
pHttpStatus_
    }

-- | When you request a list of objects with a @Limit@ setting, if the number
-- of objects that are still available for retrieval exceeds the limit, WAF
-- returns a @NextMarker@ value in the response. To retrieve the next batch
-- of objects, provide the marker from the prior call in your next request.
listRuleGroupsResponse_nextMarker :: Lens.Lens' ListRuleGroupsResponse (Prelude.Maybe Prelude.Text)
listRuleGroupsResponse_nextMarker :: Lens' ListRuleGroupsResponse (Maybe Text)
listRuleGroupsResponse_nextMarker = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListRuleGroupsResponse' {Maybe Text
nextMarker :: Maybe Text
$sel:nextMarker:ListRuleGroupsResponse' :: ListRuleGroupsResponse -> Maybe Text
nextMarker} -> Maybe Text
nextMarker) (\s :: ListRuleGroupsResponse
s@ListRuleGroupsResponse' {} Maybe Text
a -> ListRuleGroupsResponse
s {$sel:nextMarker:ListRuleGroupsResponse' :: Maybe Text
nextMarker = Maybe Text
a} :: ListRuleGroupsResponse)

listRuleGroupsResponse_ruleGroups :: Lens.Lens' ListRuleGroupsResponse (Prelude.Maybe [RuleGroupSummary])
listRuleGroupsResponse_ruleGroups :: Lens' ListRuleGroupsResponse (Maybe [RuleGroupSummary])
listRuleGroupsResponse_ruleGroups = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListRuleGroupsResponse' {Maybe [RuleGroupSummary]
ruleGroups :: Maybe [RuleGroupSummary]
$sel:ruleGroups:ListRuleGroupsResponse' :: ListRuleGroupsResponse -> Maybe [RuleGroupSummary]
ruleGroups} -> Maybe [RuleGroupSummary]
ruleGroups) (\s :: ListRuleGroupsResponse
s@ListRuleGroupsResponse' {} Maybe [RuleGroupSummary]
a -> ListRuleGroupsResponse
s {$sel:ruleGroups:ListRuleGroupsResponse' :: Maybe [RuleGroupSummary]
ruleGroups = Maybe [RuleGroupSummary]
a} :: ListRuleGroupsResponse) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. 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 forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

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

instance Prelude.NFData ListRuleGroupsResponse where
  rnf :: ListRuleGroupsResponse -> ()
rnf ListRuleGroupsResponse' {Int
Maybe [RuleGroupSummary]
Maybe Text
httpStatus :: Int
ruleGroups :: Maybe [RuleGroupSummary]
nextMarker :: Maybe Text
$sel:httpStatus:ListRuleGroupsResponse' :: ListRuleGroupsResponse -> Int
$sel:ruleGroups:ListRuleGroupsResponse' :: ListRuleGroupsResponse -> Maybe [RuleGroupSummary]
$sel:nextMarker:ListRuleGroupsResponse' :: ListRuleGroupsResponse -> Maybe Text
..} =
    forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
nextMarker
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe [RuleGroupSummary]
ruleGroups
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Int
httpStatus