{-# 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.WAF.ListSubscribedRuleGroups
-- Copyright   : (c) 2013-2023 Brendan Hay
-- License     : Mozilla Public License, v. 2.0.
-- Maintainer  : Brendan Hay
-- 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 that you are subscribed to.
--
-- This operation returns paginated results.
module Amazonka.WAF.ListSubscribedRuleGroups
  ( -- * Creating a Request
    ListSubscribedRuleGroups (..),
    newListSubscribedRuleGroups,

    -- * Request Lenses
    listSubscribedRuleGroups_limit,
    listSubscribedRuleGroups_nextMarker,

    -- * Destructuring the Response
    ListSubscribedRuleGroupsResponse (..),
    newListSubscribedRuleGroupsResponse,

    -- * Response Lenses
    listSubscribedRuleGroupsResponse_nextMarker,
    listSubscribedRuleGroupsResponse_ruleGroups,
    listSubscribedRuleGroupsResponse_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.WAF.Types

-- | /See:/ 'newListSubscribedRuleGroups' smart constructor.
data ListSubscribedRuleGroups = ListSubscribedRuleGroups'
  { -- | Specifies the number of subscribed rule groups that you want AWS WAF to
    -- return for this request. If you have more objects than the number you
    -- specify for @Limit@, the response includes a @NextMarker@ value that you
    -- can use to get another batch of objects.
    ListSubscribedRuleGroups -> Maybe Natural
limit :: Prelude.Maybe Prelude.Natural,
    -- | If you specify a value for @Limit@ and you have more
    -- @ByteMatchSets@subscribed rule groups than the value of @Limit@, AWS WAF
    -- returns a @NextMarker@ value in the response that allows you to list
    -- another group of subscribed rule groups. For the second and subsequent
    -- @ListSubscribedRuleGroupsRequest@ requests, specify the value of
    -- @NextMarker@ from the previous response to get information about another
    -- batch of subscribed rule groups.
    ListSubscribedRuleGroups -> Maybe Text
nextMarker :: Prelude.Maybe Prelude.Text
  }
  deriving (ListSubscribedRuleGroups -> ListSubscribedRuleGroups -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ListSubscribedRuleGroups -> ListSubscribedRuleGroups -> Bool
$c/= :: ListSubscribedRuleGroups -> ListSubscribedRuleGroups -> Bool
== :: ListSubscribedRuleGroups -> ListSubscribedRuleGroups -> Bool
$c== :: ListSubscribedRuleGroups -> ListSubscribedRuleGroups -> Bool
Prelude.Eq, ReadPrec [ListSubscribedRuleGroups]
ReadPrec ListSubscribedRuleGroups
Int -> ReadS ListSubscribedRuleGroups
ReadS [ListSubscribedRuleGroups]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ListSubscribedRuleGroups]
$creadListPrec :: ReadPrec [ListSubscribedRuleGroups]
readPrec :: ReadPrec ListSubscribedRuleGroups
$creadPrec :: ReadPrec ListSubscribedRuleGroups
readList :: ReadS [ListSubscribedRuleGroups]
$creadList :: ReadS [ListSubscribedRuleGroups]
readsPrec :: Int -> ReadS ListSubscribedRuleGroups
$creadsPrec :: Int -> ReadS ListSubscribedRuleGroups
Prelude.Read, Int -> ListSubscribedRuleGroups -> ShowS
[ListSubscribedRuleGroups] -> ShowS
ListSubscribedRuleGroups -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ListSubscribedRuleGroups] -> ShowS
$cshowList :: [ListSubscribedRuleGroups] -> ShowS
show :: ListSubscribedRuleGroups -> String
$cshow :: ListSubscribedRuleGroups -> String
showsPrec :: Int -> ListSubscribedRuleGroups -> ShowS
$cshowsPrec :: Int -> ListSubscribedRuleGroups -> ShowS
Prelude.Show, forall x.
Rep ListSubscribedRuleGroups x -> ListSubscribedRuleGroups
forall x.
ListSubscribedRuleGroups -> Rep ListSubscribedRuleGroups x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep ListSubscribedRuleGroups x -> ListSubscribedRuleGroups
$cfrom :: forall x.
ListSubscribedRuleGroups -> Rep ListSubscribedRuleGroups x
Prelude.Generic)

-- |
-- Create a value of 'ListSubscribedRuleGroups' 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', 'listSubscribedRuleGroups_limit' - Specifies the number of subscribed rule groups that you want AWS WAF to
-- return for this request. If you have more objects than the number you
-- specify for @Limit@, the response includes a @NextMarker@ value that you
-- can use to get another batch of objects.
--
-- 'nextMarker', 'listSubscribedRuleGroups_nextMarker' - If you specify a value for @Limit@ and you have more
-- @ByteMatchSets@subscribed rule groups than the value of @Limit@, AWS WAF
-- returns a @NextMarker@ value in the response that allows you to list
-- another group of subscribed rule groups. For the second and subsequent
-- @ListSubscribedRuleGroupsRequest@ requests, specify the value of
-- @NextMarker@ from the previous response to get information about another
-- batch of subscribed rule groups.
newListSubscribedRuleGroups ::
  ListSubscribedRuleGroups
newListSubscribedRuleGroups :: ListSubscribedRuleGroups
newListSubscribedRuleGroups =
  ListSubscribedRuleGroups'
    { $sel:limit:ListSubscribedRuleGroups' :: Maybe Natural
limit = forall a. Maybe a
Prelude.Nothing,
      $sel:nextMarker:ListSubscribedRuleGroups' :: Maybe Text
nextMarker = forall a. Maybe a
Prelude.Nothing
    }

-- | Specifies the number of subscribed rule groups that you want AWS WAF to
-- return for this request. If you have more objects than the number you
-- specify for @Limit@, the response includes a @NextMarker@ value that you
-- can use to get another batch of objects.
listSubscribedRuleGroups_limit :: Lens.Lens' ListSubscribedRuleGroups (Prelude.Maybe Prelude.Natural)
listSubscribedRuleGroups_limit :: Lens' ListSubscribedRuleGroups (Maybe Natural)
listSubscribedRuleGroups_limit = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListSubscribedRuleGroups' {Maybe Natural
limit :: Maybe Natural
$sel:limit:ListSubscribedRuleGroups' :: ListSubscribedRuleGroups -> Maybe Natural
limit} -> Maybe Natural
limit) (\s :: ListSubscribedRuleGroups
s@ListSubscribedRuleGroups' {} Maybe Natural
a -> ListSubscribedRuleGroups
s {$sel:limit:ListSubscribedRuleGroups' :: Maybe Natural
limit = Maybe Natural
a} :: ListSubscribedRuleGroups)

-- | If you specify a value for @Limit@ and you have more
-- @ByteMatchSets@subscribed rule groups than the value of @Limit@, AWS WAF
-- returns a @NextMarker@ value in the response that allows you to list
-- another group of subscribed rule groups. For the second and subsequent
-- @ListSubscribedRuleGroupsRequest@ requests, specify the value of
-- @NextMarker@ from the previous response to get information about another
-- batch of subscribed rule groups.
listSubscribedRuleGroups_nextMarker :: Lens.Lens' ListSubscribedRuleGroups (Prelude.Maybe Prelude.Text)
listSubscribedRuleGroups_nextMarker :: Lens' ListSubscribedRuleGroups (Maybe Text)
listSubscribedRuleGroups_nextMarker = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListSubscribedRuleGroups' {Maybe Text
nextMarker :: Maybe Text
$sel:nextMarker:ListSubscribedRuleGroups' :: ListSubscribedRuleGroups -> Maybe Text
nextMarker} -> Maybe Text
nextMarker) (\s :: ListSubscribedRuleGroups
s@ListSubscribedRuleGroups' {} Maybe Text
a -> ListSubscribedRuleGroups
s {$sel:nextMarker:ListSubscribedRuleGroups' :: Maybe Text
nextMarker = Maybe Text
a} :: ListSubscribedRuleGroups)

instance Core.AWSPager ListSubscribedRuleGroups where
  page :: ListSubscribedRuleGroups
-> AWSResponse ListSubscribedRuleGroups
-> Maybe ListSubscribedRuleGroups
page ListSubscribedRuleGroups
rq AWSResponse ListSubscribedRuleGroups
rs
    | forall a. AWSTruncated a => a -> Bool
Core.stop
        ( AWSResponse ListSubscribedRuleGroups
rs
            forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^? Lens' ListSubscribedRuleGroupsResponse (Maybe Text)
listSubscribedRuleGroupsResponse_nextMarker
            forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall a b. Prism (Maybe a) (Maybe b) a b
Lens._Just
        ) =
        forall a. Maybe a
Prelude.Nothing
    | forall a. AWSTruncated a => a -> Bool
Core.stop
        ( AWSResponse ListSubscribedRuleGroups
rs
            forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^? Lens'
  ListSubscribedRuleGroupsResponse
  (Maybe [SubscribedRuleGroupSummary])
listSubscribedRuleGroupsResponse_ruleGroups
            forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall a b. Prism (Maybe a) (Maybe b) a b
Lens._Just
        ) =
        forall a. Maybe a
Prelude.Nothing
    | Bool
Prelude.otherwise =
        forall a. a -> Maybe a
Prelude.Just
          forall a b. (a -> b) -> a -> b
Prelude.$ ListSubscribedRuleGroups
rq
          forall a b. a -> (a -> b) -> b
Prelude.& Lens' ListSubscribedRuleGroups (Maybe Text)
listSubscribedRuleGroups_nextMarker
          forall s t a b. ASetter s t a b -> b -> s -> t
Lens..~ AWSResponse ListSubscribedRuleGroups
rs
          forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^? Lens' ListSubscribedRuleGroupsResponse (Maybe Text)
listSubscribedRuleGroupsResponse_nextMarker
          forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall a b. Prism (Maybe a) (Maybe b) a b
Lens._Just

instance Core.AWSRequest ListSubscribedRuleGroups where
  type
    AWSResponse ListSubscribedRuleGroups =
      ListSubscribedRuleGroupsResponse
  request :: (Service -> Service)
-> ListSubscribedRuleGroups -> Request ListSubscribedRuleGroups
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 ListSubscribedRuleGroups
-> ClientResponse ClientBody
-> m (Either
        Error (ClientResponse (AWSResponse ListSubscribedRuleGroups)))
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 [SubscribedRuleGroupSummary]
-> Int
-> ListSubscribedRuleGroupsResponse
ListSubscribedRuleGroupsResponse'
            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 ListSubscribedRuleGroups where
  hashWithSalt :: Int -> ListSubscribedRuleGroups -> Int
hashWithSalt Int
_salt ListSubscribedRuleGroups' {Maybe Natural
Maybe Text
nextMarker :: Maybe Text
limit :: Maybe Natural
$sel:nextMarker:ListSubscribedRuleGroups' :: ListSubscribedRuleGroups -> Maybe Text
$sel:limit:ListSubscribedRuleGroups' :: ListSubscribedRuleGroups -> 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

instance Prelude.NFData ListSubscribedRuleGroups where
  rnf :: ListSubscribedRuleGroups -> ()
rnf ListSubscribedRuleGroups' {Maybe Natural
Maybe Text
nextMarker :: Maybe Text
limit :: Maybe Natural
$sel:nextMarker:ListSubscribedRuleGroups' :: ListSubscribedRuleGroups -> Maybe Text
$sel:limit:ListSubscribedRuleGroups' :: ListSubscribedRuleGroups -> 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

instance Data.ToHeaders ListSubscribedRuleGroups where
  toHeaders :: ListSubscribedRuleGroups -> 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_20150824.ListSubscribedRuleGroups" ::
                          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 ListSubscribedRuleGroups where
  toJSON :: ListSubscribedRuleGroups -> Value
toJSON ListSubscribedRuleGroups' {Maybe Natural
Maybe Text
nextMarker :: Maybe Text
limit :: Maybe Natural
$sel:nextMarker:ListSubscribedRuleGroups' :: ListSubscribedRuleGroups -> Maybe Text
$sel:limit:ListSubscribedRuleGroups' :: ListSubscribedRuleGroups -> 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
          ]
      )

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

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

-- | /See:/ 'newListSubscribedRuleGroupsResponse' smart constructor.
data ListSubscribedRuleGroupsResponse = ListSubscribedRuleGroupsResponse'
  { -- | If you have more objects than the number that you specified for @Limit@
    -- in the request, the response includes a @NextMarker@ value. To list more
    -- objects, submit another @ListSubscribedRuleGroups@ request, and specify
    -- the @NextMarker@ value from the response in the @NextMarker@ value in
    -- the next request.
    ListSubscribedRuleGroupsResponse -> Maybe Text
nextMarker :: Prelude.Maybe Prelude.Text,
    -- | An array of RuleGroup objects.
    ListSubscribedRuleGroupsResponse
-> Maybe [SubscribedRuleGroupSummary]
ruleGroups :: Prelude.Maybe [SubscribedRuleGroupSummary],
    -- | The response's http status code.
    ListSubscribedRuleGroupsResponse -> Int
httpStatus :: Prelude.Int
  }
  deriving (ListSubscribedRuleGroupsResponse
-> ListSubscribedRuleGroupsResponse -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ListSubscribedRuleGroupsResponse
-> ListSubscribedRuleGroupsResponse -> Bool
$c/= :: ListSubscribedRuleGroupsResponse
-> ListSubscribedRuleGroupsResponse -> Bool
== :: ListSubscribedRuleGroupsResponse
-> ListSubscribedRuleGroupsResponse -> Bool
$c== :: ListSubscribedRuleGroupsResponse
-> ListSubscribedRuleGroupsResponse -> Bool
Prelude.Eq, ReadPrec [ListSubscribedRuleGroupsResponse]
ReadPrec ListSubscribedRuleGroupsResponse
Int -> ReadS ListSubscribedRuleGroupsResponse
ReadS [ListSubscribedRuleGroupsResponse]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ListSubscribedRuleGroupsResponse]
$creadListPrec :: ReadPrec [ListSubscribedRuleGroupsResponse]
readPrec :: ReadPrec ListSubscribedRuleGroupsResponse
$creadPrec :: ReadPrec ListSubscribedRuleGroupsResponse
readList :: ReadS [ListSubscribedRuleGroupsResponse]
$creadList :: ReadS [ListSubscribedRuleGroupsResponse]
readsPrec :: Int -> ReadS ListSubscribedRuleGroupsResponse
$creadsPrec :: Int -> ReadS ListSubscribedRuleGroupsResponse
Prelude.Read, Int -> ListSubscribedRuleGroupsResponse -> ShowS
[ListSubscribedRuleGroupsResponse] -> ShowS
ListSubscribedRuleGroupsResponse -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ListSubscribedRuleGroupsResponse] -> ShowS
$cshowList :: [ListSubscribedRuleGroupsResponse] -> ShowS
show :: ListSubscribedRuleGroupsResponse -> String
$cshow :: ListSubscribedRuleGroupsResponse -> String
showsPrec :: Int -> ListSubscribedRuleGroupsResponse -> ShowS
$cshowsPrec :: Int -> ListSubscribedRuleGroupsResponse -> ShowS
Prelude.Show, forall x.
Rep ListSubscribedRuleGroupsResponse x
-> ListSubscribedRuleGroupsResponse
forall x.
ListSubscribedRuleGroupsResponse
-> Rep ListSubscribedRuleGroupsResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep ListSubscribedRuleGroupsResponse x
-> ListSubscribedRuleGroupsResponse
$cfrom :: forall x.
ListSubscribedRuleGroupsResponse
-> Rep ListSubscribedRuleGroupsResponse x
Prelude.Generic)

-- |
-- Create a value of 'ListSubscribedRuleGroupsResponse' 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', 'listSubscribedRuleGroupsResponse_nextMarker' - If you have more objects than the number that you specified for @Limit@
-- in the request, the response includes a @NextMarker@ value. To list more
-- objects, submit another @ListSubscribedRuleGroups@ request, and specify
-- the @NextMarker@ value from the response in the @NextMarker@ value in
-- the next request.
--
-- 'ruleGroups', 'listSubscribedRuleGroupsResponse_ruleGroups' - An array of RuleGroup objects.
--
-- 'httpStatus', 'listSubscribedRuleGroupsResponse_httpStatus' - The response's http status code.
newListSubscribedRuleGroupsResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  ListSubscribedRuleGroupsResponse
newListSubscribedRuleGroupsResponse :: Int -> ListSubscribedRuleGroupsResponse
newListSubscribedRuleGroupsResponse Int
pHttpStatus_ =
  ListSubscribedRuleGroupsResponse'
    { $sel:nextMarker:ListSubscribedRuleGroupsResponse' :: Maybe Text
nextMarker =
        forall a. Maybe a
Prelude.Nothing,
      $sel:ruleGroups:ListSubscribedRuleGroupsResponse' :: Maybe [SubscribedRuleGroupSummary]
ruleGroups = forall a. Maybe a
Prelude.Nothing,
      $sel:httpStatus:ListSubscribedRuleGroupsResponse' :: Int
httpStatus = Int
pHttpStatus_
    }

-- | If you have more objects than the number that you specified for @Limit@
-- in the request, the response includes a @NextMarker@ value. To list more
-- objects, submit another @ListSubscribedRuleGroups@ request, and specify
-- the @NextMarker@ value from the response in the @NextMarker@ value in
-- the next request.
listSubscribedRuleGroupsResponse_nextMarker :: Lens.Lens' ListSubscribedRuleGroupsResponse (Prelude.Maybe Prelude.Text)
listSubscribedRuleGroupsResponse_nextMarker :: Lens' ListSubscribedRuleGroupsResponse (Maybe Text)
listSubscribedRuleGroupsResponse_nextMarker = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListSubscribedRuleGroupsResponse' {Maybe Text
nextMarker :: Maybe Text
$sel:nextMarker:ListSubscribedRuleGroupsResponse' :: ListSubscribedRuleGroupsResponse -> Maybe Text
nextMarker} -> Maybe Text
nextMarker) (\s :: ListSubscribedRuleGroupsResponse
s@ListSubscribedRuleGroupsResponse' {} Maybe Text
a -> ListSubscribedRuleGroupsResponse
s {$sel:nextMarker:ListSubscribedRuleGroupsResponse' :: Maybe Text
nextMarker = Maybe Text
a} :: ListSubscribedRuleGroupsResponse)

-- | An array of RuleGroup objects.
listSubscribedRuleGroupsResponse_ruleGroups :: Lens.Lens' ListSubscribedRuleGroupsResponse (Prelude.Maybe [SubscribedRuleGroupSummary])
listSubscribedRuleGroupsResponse_ruleGroups :: Lens'
  ListSubscribedRuleGroupsResponse
  (Maybe [SubscribedRuleGroupSummary])
listSubscribedRuleGroupsResponse_ruleGroups = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListSubscribedRuleGroupsResponse' {Maybe [SubscribedRuleGroupSummary]
ruleGroups :: Maybe [SubscribedRuleGroupSummary]
$sel:ruleGroups:ListSubscribedRuleGroupsResponse' :: ListSubscribedRuleGroupsResponse
-> Maybe [SubscribedRuleGroupSummary]
ruleGroups} -> Maybe [SubscribedRuleGroupSummary]
ruleGroups) (\s :: ListSubscribedRuleGroupsResponse
s@ListSubscribedRuleGroupsResponse' {} Maybe [SubscribedRuleGroupSummary]
a -> ListSubscribedRuleGroupsResponse
s {$sel:ruleGroups:ListSubscribedRuleGroupsResponse' :: Maybe [SubscribedRuleGroupSummary]
ruleGroups = Maybe [SubscribedRuleGroupSummary]
a} :: ListSubscribedRuleGroupsResponse) 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.
listSubscribedRuleGroupsResponse_httpStatus :: Lens.Lens' ListSubscribedRuleGroupsResponse Prelude.Int
listSubscribedRuleGroupsResponse_httpStatus :: Lens' ListSubscribedRuleGroupsResponse Int
listSubscribedRuleGroupsResponse_httpStatus = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListSubscribedRuleGroupsResponse' {Int
httpStatus :: Int
$sel:httpStatus:ListSubscribedRuleGroupsResponse' :: ListSubscribedRuleGroupsResponse -> Int
httpStatus} -> Int
httpStatus) (\s :: ListSubscribedRuleGroupsResponse
s@ListSubscribedRuleGroupsResponse' {} Int
a -> ListSubscribedRuleGroupsResponse
s {$sel:httpStatus:ListSubscribedRuleGroupsResponse' :: Int
httpStatus = Int
a} :: ListSubscribedRuleGroupsResponse)

instance
  Prelude.NFData
    ListSubscribedRuleGroupsResponse
  where
  rnf :: ListSubscribedRuleGroupsResponse -> ()
rnf ListSubscribedRuleGroupsResponse' {Int
Maybe [SubscribedRuleGroupSummary]
Maybe Text
httpStatus :: Int
ruleGroups :: Maybe [SubscribedRuleGroupSummary]
nextMarker :: Maybe Text
$sel:httpStatus:ListSubscribedRuleGroupsResponse' :: ListSubscribedRuleGroupsResponse -> Int
$sel:ruleGroups:ListSubscribedRuleGroupsResponse' :: ListSubscribedRuleGroupsResponse
-> Maybe [SubscribedRuleGroupSummary]
$sel:nextMarker:ListSubscribedRuleGroupsResponse' :: ListSubscribedRuleGroupsResponse -> 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 [SubscribedRuleGroupSummary]
ruleGroups
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Int
httpStatus