{-# 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.WAFRegional.ListRuleGroups
-- 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)
--
-- This is __AWS WAF Classic__ documentation. For more information, see
-- <https://docs.aws.amazon.com/waf/latest/developerguide/classic-waf-chapter.html AWS WAF Classic>
-- in the developer guide.
--
-- __For the latest version of AWS WAF__, use the AWS WAFV2 API and see the
-- <https://docs.aws.amazon.com/waf/latest/developerguide/waf-chapter.html AWS WAF Developer Guide>.
-- With the latest version, AWS WAF has a single set of endpoints for
-- regional and global use.
--
-- Returns an array of RuleGroup objects.
module Amazonka.WAFRegional.ListRuleGroups
  ( -- * Creating a Request
    ListRuleGroups (..),
    newListRuleGroups,

    -- * Request Lenses
    listRuleGroups_nextMarker,
    listRuleGroups_limit,

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

    -- * Response Lenses
    listRuleGroupsResponse_ruleGroups,
    listRuleGroupsResponse_nextMarker,
    listRuleGroupsResponse_httpStatus,
  )
where

import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
import qualified Amazonka.Request as Request
import qualified Amazonka.Response as Response
import Amazonka.WAFRegional.Types

-- | /See:/ 'newListRuleGroups' smart constructor.
data ListRuleGroups = ListRuleGroups'
  { -- | If you specify a value for @Limit@ and you have more @RuleGroups@ than
    -- the value of @Limit@, AWS WAF returns a @NextMarker@ value in the
    -- response that allows you to list another group of @RuleGroups@. For the
    -- second and subsequent @ListRuleGroups@ requests, specify the value of
    -- @NextMarker@ from the previous response to get information about another
    -- batch of @RuleGroups@.
    ListRuleGroups -> Maybe Text
nextMarker :: Prelude.Maybe Prelude.Text,
    -- | Specifies the number of @RuleGroups@ that you want AWS WAF to return for
    -- this request. If you have more @RuleGroups@ than the number that you
    -- specify for @Limit@, the response includes a @NextMarker@ value that you
    -- can use to get another batch of @RuleGroups@.
    ListRuleGroups -> Maybe Natural
limit :: Prelude.Maybe Prelude.Natural
  }
  deriving (ListRuleGroups -> ListRuleGroups -> Bool
(ListRuleGroups -> ListRuleGroups -> Bool)
-> (ListRuleGroups -> ListRuleGroups -> Bool) -> Eq ListRuleGroups
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]
(Int -> ReadS ListRuleGroups)
-> ReadS [ListRuleGroups]
-> ReadPrec ListRuleGroups
-> ReadPrec [ListRuleGroups]
-> Read 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
(Int -> ListRuleGroups -> ShowS)
-> (ListRuleGroups -> String)
-> ([ListRuleGroups] -> ShowS)
-> Show ListRuleGroups
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. ListRuleGroups -> Rep ListRuleGroups x)
-> (forall x. Rep ListRuleGroups x -> ListRuleGroups)
-> Generic ListRuleGroups
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:
--
-- 'nextMarker', 'listRuleGroups_nextMarker' - If you specify a value for @Limit@ and you have more @RuleGroups@ than
-- the value of @Limit@, AWS WAF returns a @NextMarker@ value in the
-- response that allows you to list another group of @RuleGroups@. For the
-- second and subsequent @ListRuleGroups@ requests, specify the value of
-- @NextMarker@ from the previous response to get information about another
-- batch of @RuleGroups@.
--
-- 'limit', 'listRuleGroups_limit' - Specifies the number of @RuleGroups@ that you want AWS WAF to return for
-- this request. If you have more @RuleGroups@ than the number that you
-- specify for @Limit@, the response includes a @NextMarker@ value that you
-- can use to get another batch of @RuleGroups@.
newListRuleGroups ::
  ListRuleGroups
newListRuleGroups :: ListRuleGroups
newListRuleGroups =
  ListRuleGroups' :: Maybe Text -> Maybe Natural -> ListRuleGroups
ListRuleGroups'
    { $sel:nextMarker:ListRuleGroups' :: Maybe Text
nextMarker = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:limit:ListRuleGroups' :: Maybe Natural
limit = Maybe Natural
forall a. Maybe a
Prelude.Nothing
    }

-- | If you specify a value for @Limit@ and you have more @RuleGroups@ than
-- the value of @Limit@, AWS WAF returns a @NextMarker@ value in the
-- response that allows you to list another group of @RuleGroups@. For the
-- second and subsequent @ListRuleGroups@ requests, specify the value of
-- @NextMarker@ from the previous response to get information about another
-- batch of @RuleGroups@.
listRuleGroups_nextMarker :: Lens.Lens' ListRuleGroups (Prelude.Maybe Prelude.Text)
listRuleGroups_nextMarker :: (Maybe Text -> f (Maybe Text))
-> ListRuleGroups -> f ListRuleGroups
listRuleGroups_nextMarker = (ListRuleGroups -> Maybe Text)
-> (ListRuleGroups -> Maybe Text -> ListRuleGroups)
-> Lens ListRuleGroups ListRuleGroups (Maybe Text) (Maybe Text)
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 the number of @RuleGroups@ that you want AWS WAF to return for
-- this request. If you have more @RuleGroups@ than the number that you
-- specify for @Limit@, the response includes a @NextMarker@ value that you
-- can use to get another batch of @RuleGroups@.
listRuleGroups_limit :: Lens.Lens' ListRuleGroups (Prelude.Maybe Prelude.Natural)
listRuleGroups_limit :: (Maybe Natural -> f (Maybe Natural))
-> ListRuleGroups -> f ListRuleGroups
listRuleGroups_limit = (ListRuleGroups -> Maybe Natural)
-> (ListRuleGroups -> Maybe Natural -> ListRuleGroups)
-> Lens
     ListRuleGroups ListRuleGroups (Maybe Natural) (Maybe Natural)
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)

instance Core.AWSRequest ListRuleGroups where
  type
    AWSResponse ListRuleGroups =
      ListRuleGroupsResponse
  request :: ListRuleGroups -> Request ListRuleGroups
request = Service -> ListRuleGroups -> Request ListRuleGroups
forall a. (ToRequest a, ToJSON a) => Service -> a -> Request a
Request.postJSON Service
defaultService
  response :: Logger
-> Service
-> Proxy ListRuleGroups
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse ListRuleGroups)))
response =
    (Int
 -> ResponseHeaders
 -> Object
 -> Either String (AWSResponse ListRuleGroups))
-> Logger
-> Service
-> Proxy ListRuleGroups
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse ListRuleGroups)))
forall (m :: * -> *) a.
MonadResource m =>
(Int -> ResponseHeaders -> Object -> Either String (AWSResponse a))
-> Logger
-> Service
-> Proxy a
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse a)))
Response.receiveJSON
      ( \Int
s ResponseHeaders
h Object
x ->
          Maybe [RuleGroupSummary]
-> Maybe Text -> Int -> ListRuleGroupsResponse
ListRuleGroupsResponse'
            (Maybe [RuleGroupSummary]
 -> Maybe Text -> Int -> ListRuleGroupsResponse)
-> Either String (Maybe [RuleGroupSummary])
-> Either String (Maybe Text -> Int -> ListRuleGroupsResponse)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Either String (Maybe (Maybe [RuleGroupSummary]))
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"RuleGroups" Either String (Maybe (Maybe [RuleGroupSummary]))
-> Maybe [RuleGroupSummary]
-> Either String (Maybe [RuleGroupSummary])
forall (f :: * -> *) a. Functor f => f (Maybe a) -> a -> f a
Core..!@ Maybe [RuleGroupSummary]
forall a. Monoid a => a
Prelude.mempty)
            Either String (Maybe Text -> Int -> ListRuleGroupsResponse)
-> Either String (Maybe Text)
-> Either String (Int -> ListRuleGroupsResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String (Maybe Text)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"NextMarker")
            Either String (Int -> ListRuleGroupsResponse)
-> Either String Int -> Either String ListRuleGroupsResponse
forall (f :: * -> *) a b. Applicative f => 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 ListRuleGroups

instance Prelude.NFData ListRuleGroups

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

instance Core.ToJSON ListRuleGroups where
  toJSON :: ListRuleGroups -> Value
toJSON ListRuleGroups' {Maybe Natural
Maybe Text
limit :: Maybe Natural
nextMarker :: Maybe Text
$sel:limit:ListRuleGroups' :: ListRuleGroups -> Maybe Natural
$sel:nextMarker:ListRuleGroups' :: ListRuleGroups -> Maybe Text
..} =
    [Pair] -> Value
Core.object
      ( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
          [ (Text
"NextMarker" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (Text -> Pair) -> Maybe Text -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
nextMarker,
            (Text
"Limit" Text -> Natural -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (Natural -> Pair) -> Maybe Natural -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Natural
limit
          ]
      )

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

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

-- | /See:/ 'newListRuleGroupsResponse' smart constructor.
data ListRuleGroupsResponse = ListRuleGroupsResponse'
  { -- | An array of RuleGroup objects.
    ListRuleGroupsResponse -> Maybe [RuleGroupSummary]
ruleGroups :: Prelude.Maybe [RuleGroupSummary],
    -- | If you have more @RuleGroups@ than the number that you specified for
    -- @Limit@ in the request, the response includes a @NextMarker@ value. To
    -- list more @RuleGroups@, submit another @ListRuleGroups@ request, and
    -- specify the @NextMarker@ value from the response in the @NextMarker@
    -- value in the next request.
    ListRuleGroupsResponse -> Maybe Text
nextMarker :: Prelude.Maybe Prelude.Text,
    -- | The response's http status code.
    ListRuleGroupsResponse -> Int
httpStatus :: Prelude.Int
  }
  deriving (ListRuleGroupsResponse -> ListRuleGroupsResponse -> Bool
(ListRuleGroupsResponse -> ListRuleGroupsResponse -> Bool)
-> (ListRuleGroupsResponse -> ListRuleGroupsResponse -> Bool)
-> Eq ListRuleGroupsResponse
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]
(Int -> ReadS ListRuleGroupsResponse)
-> ReadS [ListRuleGroupsResponse]
-> ReadPrec ListRuleGroupsResponse
-> ReadPrec [ListRuleGroupsResponse]
-> Read 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
(Int -> ListRuleGroupsResponse -> ShowS)
-> (ListRuleGroupsResponse -> String)
-> ([ListRuleGroupsResponse] -> ShowS)
-> Show ListRuleGroupsResponse
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. ListRuleGroupsResponse -> Rep ListRuleGroupsResponse x)
-> (forall x.
    Rep ListRuleGroupsResponse x -> ListRuleGroupsResponse)
-> Generic ListRuleGroupsResponse
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:
--
-- 'ruleGroups', 'listRuleGroupsResponse_ruleGroups' - An array of RuleGroup objects.
--
-- 'nextMarker', 'listRuleGroupsResponse_nextMarker' - If you have more @RuleGroups@ than the number that you specified for
-- @Limit@ in the request, the response includes a @NextMarker@ value. To
-- list more @RuleGroups@, submit another @ListRuleGroups@ request, and
-- specify the @NextMarker@ value from the response in the @NextMarker@
-- value in the next request.
--
-- 'httpStatus', 'listRuleGroupsResponse_httpStatus' - The response's http status code.
newListRuleGroupsResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  ListRuleGroupsResponse
newListRuleGroupsResponse :: Int -> ListRuleGroupsResponse
newListRuleGroupsResponse Int
pHttpStatus_ =
  ListRuleGroupsResponse' :: Maybe [RuleGroupSummary]
-> Maybe Text -> Int -> ListRuleGroupsResponse
ListRuleGroupsResponse'
    { $sel:ruleGroups:ListRuleGroupsResponse' :: Maybe [RuleGroupSummary]
ruleGroups =
        Maybe [RuleGroupSummary]
forall a. Maybe a
Prelude.Nothing,
      $sel:nextMarker:ListRuleGroupsResponse' :: Maybe Text
nextMarker = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:httpStatus:ListRuleGroupsResponse' :: Int
httpStatus = Int
pHttpStatus_
    }

-- | An array of RuleGroup objects.
listRuleGroupsResponse_ruleGroups :: Lens.Lens' ListRuleGroupsResponse (Prelude.Maybe [RuleGroupSummary])
listRuleGroupsResponse_ruleGroups :: (Maybe [RuleGroupSummary] -> f (Maybe [RuleGroupSummary]))
-> ListRuleGroupsResponse -> f ListRuleGroupsResponse
listRuleGroupsResponse_ruleGroups = (ListRuleGroupsResponse -> Maybe [RuleGroupSummary])
-> (ListRuleGroupsResponse
    -> Maybe [RuleGroupSummary] -> ListRuleGroupsResponse)
-> Lens
     ListRuleGroupsResponse
     ListRuleGroupsResponse
     (Maybe [RuleGroupSummary])
     (Maybe [RuleGroupSummary])
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) ((Maybe [RuleGroupSummary] -> f (Maybe [RuleGroupSummary]))
 -> ListRuleGroupsResponse -> f ListRuleGroupsResponse)
-> ((Maybe [RuleGroupSummary] -> f (Maybe [RuleGroupSummary]))
    -> Maybe [RuleGroupSummary] -> f (Maybe [RuleGroupSummary]))
-> (Maybe [RuleGroupSummary] -> f (Maybe [RuleGroupSummary]))
-> ListRuleGroupsResponse
-> f ListRuleGroupsResponse
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso
  [RuleGroupSummary]
  [RuleGroupSummary]
  [RuleGroupSummary]
  [RuleGroupSummary]
-> Iso
     (Maybe [RuleGroupSummary])
     (Maybe [RuleGroupSummary])
     (Maybe [RuleGroupSummary])
     (Maybe [RuleGroupSummary])
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
  [RuleGroupSummary]
  [RuleGroupSummary]
  [RuleGroupSummary]
  [RuleGroupSummary]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | If you have more @RuleGroups@ than the number that you specified for
-- @Limit@ in the request, the response includes a @NextMarker@ value. To
-- list more @RuleGroups@, submit another @ListRuleGroups@ request, and
-- specify the @NextMarker@ value from the response in the @NextMarker@
-- value in the next request.
listRuleGroupsResponse_nextMarker :: Lens.Lens' ListRuleGroupsResponse (Prelude.Maybe Prelude.Text)
listRuleGroupsResponse_nextMarker :: (Maybe Text -> f (Maybe Text))
-> ListRuleGroupsResponse -> f ListRuleGroupsResponse
listRuleGroupsResponse_nextMarker = (ListRuleGroupsResponse -> Maybe Text)
-> (ListRuleGroupsResponse -> Maybe Text -> ListRuleGroupsResponse)
-> Lens
     ListRuleGroupsResponse
     ListRuleGroupsResponse
     (Maybe Text)
     (Maybe Text)
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)

-- | The response's http status code.
listRuleGroupsResponse_httpStatus :: Lens.Lens' ListRuleGroupsResponse Prelude.Int
listRuleGroupsResponse_httpStatus :: (Int -> f Int)
-> ListRuleGroupsResponse -> f ListRuleGroupsResponse
listRuleGroupsResponse_httpStatus = (ListRuleGroupsResponse -> Int)
-> (ListRuleGroupsResponse -> Int -> ListRuleGroupsResponse)
-> Lens ListRuleGroupsResponse ListRuleGroupsResponse Int Int
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