{-# 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.ListAvailableManagedRuleGroups
-- 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 managed rule groups that are available for you to
-- use. This list includes all Amazon Web Services Managed Rules rule
-- groups and all of the Amazon Web Services Marketplace managed rule
-- groups that you\'re subscribed to.
module Amazonka.WAFV2.ListAvailableManagedRuleGroups
  ( -- * Creating a Request
    ListAvailableManagedRuleGroups (..),
    newListAvailableManagedRuleGroups,

    -- * Request Lenses
    listAvailableManagedRuleGroups_limit,
    listAvailableManagedRuleGroups_nextMarker,
    listAvailableManagedRuleGroups_scope,

    -- * Destructuring the Response
    ListAvailableManagedRuleGroupsResponse (..),
    newListAvailableManagedRuleGroupsResponse,

    -- * Response Lenses
    listAvailableManagedRuleGroupsResponse_managedRuleGroups,
    listAvailableManagedRuleGroupsResponse_nextMarker,
    listAvailableManagedRuleGroupsResponse_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:/ 'newListAvailableManagedRuleGroups' smart constructor.
data ListAvailableManagedRuleGroups = ListAvailableManagedRuleGroups'
  { -- | 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.
    ListAvailableManagedRuleGroups -> 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.
    ListAvailableManagedRuleGroups -> 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.
    ListAvailableManagedRuleGroups -> Scope
scope :: Scope
  }
  deriving (ListAvailableManagedRuleGroups
-> ListAvailableManagedRuleGroups -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ListAvailableManagedRuleGroups
-> ListAvailableManagedRuleGroups -> Bool
$c/= :: ListAvailableManagedRuleGroups
-> ListAvailableManagedRuleGroups -> Bool
== :: ListAvailableManagedRuleGroups
-> ListAvailableManagedRuleGroups -> Bool
$c== :: ListAvailableManagedRuleGroups
-> ListAvailableManagedRuleGroups -> Bool
Prelude.Eq, ReadPrec [ListAvailableManagedRuleGroups]
ReadPrec ListAvailableManagedRuleGroups
Int -> ReadS ListAvailableManagedRuleGroups
ReadS [ListAvailableManagedRuleGroups]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ListAvailableManagedRuleGroups]
$creadListPrec :: ReadPrec [ListAvailableManagedRuleGroups]
readPrec :: ReadPrec ListAvailableManagedRuleGroups
$creadPrec :: ReadPrec ListAvailableManagedRuleGroups
readList :: ReadS [ListAvailableManagedRuleGroups]
$creadList :: ReadS [ListAvailableManagedRuleGroups]
readsPrec :: Int -> ReadS ListAvailableManagedRuleGroups
$creadsPrec :: Int -> ReadS ListAvailableManagedRuleGroups
Prelude.Read, Int -> ListAvailableManagedRuleGroups -> ShowS
[ListAvailableManagedRuleGroups] -> ShowS
ListAvailableManagedRuleGroups -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ListAvailableManagedRuleGroups] -> ShowS
$cshowList :: [ListAvailableManagedRuleGroups] -> ShowS
show :: ListAvailableManagedRuleGroups -> String
$cshow :: ListAvailableManagedRuleGroups -> String
showsPrec :: Int -> ListAvailableManagedRuleGroups -> ShowS
$cshowsPrec :: Int -> ListAvailableManagedRuleGroups -> ShowS
Prelude.Show, forall x.
Rep ListAvailableManagedRuleGroups x
-> ListAvailableManagedRuleGroups
forall x.
ListAvailableManagedRuleGroups
-> Rep ListAvailableManagedRuleGroups x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep ListAvailableManagedRuleGroups x
-> ListAvailableManagedRuleGroups
$cfrom :: forall x.
ListAvailableManagedRuleGroups
-> Rep ListAvailableManagedRuleGroups x
Prelude.Generic)

-- |
-- Create a value of 'ListAvailableManagedRuleGroups' 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', 'listAvailableManagedRuleGroups_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', 'listAvailableManagedRuleGroups_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', 'listAvailableManagedRuleGroups_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.
newListAvailableManagedRuleGroups ::
  -- | 'scope'
  Scope ->
  ListAvailableManagedRuleGroups
newListAvailableManagedRuleGroups :: Scope -> ListAvailableManagedRuleGroups
newListAvailableManagedRuleGroups Scope
pScope_ =
  ListAvailableManagedRuleGroups'
    { $sel:limit:ListAvailableManagedRuleGroups' :: Maybe Natural
limit =
        forall a. Maybe a
Prelude.Nothing,
      $sel:nextMarker:ListAvailableManagedRuleGroups' :: Maybe Text
nextMarker = forall a. Maybe a
Prelude.Nothing,
      $sel:scope:ListAvailableManagedRuleGroups' :: 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.
listAvailableManagedRuleGroups_limit :: Lens.Lens' ListAvailableManagedRuleGroups (Prelude.Maybe Prelude.Natural)
listAvailableManagedRuleGroups_limit :: Lens' ListAvailableManagedRuleGroups (Maybe Natural)
listAvailableManagedRuleGroups_limit = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListAvailableManagedRuleGroups' {Maybe Natural
limit :: Maybe Natural
$sel:limit:ListAvailableManagedRuleGroups' :: ListAvailableManagedRuleGroups -> Maybe Natural
limit} -> Maybe Natural
limit) (\s :: ListAvailableManagedRuleGroups
s@ListAvailableManagedRuleGroups' {} Maybe Natural
a -> ListAvailableManagedRuleGroups
s {$sel:limit:ListAvailableManagedRuleGroups' :: Maybe Natural
limit = Maybe Natural
a} :: ListAvailableManagedRuleGroups)

-- | 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.
listAvailableManagedRuleGroups_nextMarker :: Lens.Lens' ListAvailableManagedRuleGroups (Prelude.Maybe Prelude.Text)
listAvailableManagedRuleGroups_nextMarker :: Lens' ListAvailableManagedRuleGroups (Maybe Text)
listAvailableManagedRuleGroups_nextMarker = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListAvailableManagedRuleGroups' {Maybe Text
nextMarker :: Maybe Text
$sel:nextMarker:ListAvailableManagedRuleGroups' :: ListAvailableManagedRuleGroups -> Maybe Text
nextMarker} -> Maybe Text
nextMarker) (\s :: ListAvailableManagedRuleGroups
s@ListAvailableManagedRuleGroups' {} Maybe Text
a -> ListAvailableManagedRuleGroups
s {$sel:nextMarker:ListAvailableManagedRuleGroups' :: Maybe Text
nextMarker = Maybe Text
a} :: ListAvailableManagedRuleGroups)

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

instance
  Core.AWSRequest
    ListAvailableManagedRuleGroups
  where
  type
    AWSResponse ListAvailableManagedRuleGroups =
      ListAvailableManagedRuleGroupsResponse
  request :: (Service -> Service)
-> ListAvailableManagedRuleGroups
-> Request ListAvailableManagedRuleGroups
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 ListAvailableManagedRuleGroups
-> ClientResponse ClientBody
-> m (Either
        Error
        (ClientResponse (AWSResponse ListAvailableManagedRuleGroups)))
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 [ManagedRuleGroupSummary]
-> Maybe Text -> Int -> ListAvailableManagedRuleGroupsResponse
ListAvailableManagedRuleGroupsResponse'
            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
"ManagedRuleGroups"
                            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.<*> (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.<*> (forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure (forall a. Enum a => a -> Int
Prelude.fromEnum Int
s))
      )

instance
  Prelude.Hashable
    ListAvailableManagedRuleGroups
  where
  hashWithSalt :: Int -> ListAvailableManagedRuleGroups -> Int
hashWithSalt
    Int
_salt
    ListAvailableManagedRuleGroups' {Maybe Natural
Maybe Text
Scope
scope :: Scope
nextMarker :: Maybe Text
limit :: Maybe Natural
$sel:scope:ListAvailableManagedRuleGroups' :: ListAvailableManagedRuleGroups -> Scope
$sel:nextMarker:ListAvailableManagedRuleGroups' :: ListAvailableManagedRuleGroups -> Maybe Text
$sel:limit:ListAvailableManagedRuleGroups' :: ListAvailableManagedRuleGroups -> 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
    ListAvailableManagedRuleGroups
  where
  rnf :: ListAvailableManagedRuleGroups -> ()
rnf ListAvailableManagedRuleGroups' {Maybe Natural
Maybe Text
Scope
scope :: Scope
nextMarker :: Maybe Text
limit :: Maybe Natural
$sel:scope:ListAvailableManagedRuleGroups' :: ListAvailableManagedRuleGroups -> Scope
$sel:nextMarker:ListAvailableManagedRuleGroups' :: ListAvailableManagedRuleGroups -> Maybe Text
$sel:limit:ListAvailableManagedRuleGroups' :: ListAvailableManagedRuleGroups -> 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
    ListAvailableManagedRuleGroups
  where
  toHeaders :: ListAvailableManagedRuleGroups -> 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.ListAvailableManagedRuleGroups" ::
                          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 ListAvailableManagedRuleGroups where
  toJSON :: ListAvailableManagedRuleGroups -> Value
toJSON ListAvailableManagedRuleGroups' {Maybe Natural
Maybe Text
Scope
scope :: Scope
nextMarker :: Maybe Text
limit :: Maybe Natural
$sel:scope:ListAvailableManagedRuleGroups' :: ListAvailableManagedRuleGroups -> Scope
$sel:nextMarker:ListAvailableManagedRuleGroups' :: ListAvailableManagedRuleGroups -> Maybe Text
$sel:limit:ListAvailableManagedRuleGroups' :: ListAvailableManagedRuleGroups -> 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 ListAvailableManagedRuleGroups where
  toPath :: ListAvailableManagedRuleGroups -> ByteString
toPath = forall a b. a -> b -> a
Prelude.const ByteString
"/"

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

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

-- |
-- Create a value of 'ListAvailableManagedRuleGroupsResponse' 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:
--
-- 'managedRuleGroups', 'listAvailableManagedRuleGroupsResponse_managedRuleGroups' -
--
-- 'nextMarker', 'listAvailableManagedRuleGroupsResponse_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.
--
-- 'httpStatus', 'listAvailableManagedRuleGroupsResponse_httpStatus' - The response's http status code.
newListAvailableManagedRuleGroupsResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  ListAvailableManagedRuleGroupsResponse
newListAvailableManagedRuleGroupsResponse :: Int -> ListAvailableManagedRuleGroupsResponse
newListAvailableManagedRuleGroupsResponse
  Int
pHttpStatus_ =
    ListAvailableManagedRuleGroupsResponse'
      { $sel:managedRuleGroups:ListAvailableManagedRuleGroupsResponse' :: Maybe [ManagedRuleGroupSummary]
managedRuleGroups =
          forall a. Maybe a
Prelude.Nothing,
        $sel:nextMarker:ListAvailableManagedRuleGroupsResponse' :: Maybe Text
nextMarker = forall a. Maybe a
Prelude.Nothing,
        $sel:httpStatus:ListAvailableManagedRuleGroupsResponse' :: Int
httpStatus = Int
pHttpStatus_
      }

listAvailableManagedRuleGroupsResponse_managedRuleGroups :: Lens.Lens' ListAvailableManagedRuleGroupsResponse (Prelude.Maybe [ManagedRuleGroupSummary])
listAvailableManagedRuleGroupsResponse_managedRuleGroups :: Lens'
  ListAvailableManagedRuleGroupsResponse
  (Maybe [ManagedRuleGroupSummary])
listAvailableManagedRuleGroupsResponse_managedRuleGroups = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListAvailableManagedRuleGroupsResponse' {Maybe [ManagedRuleGroupSummary]
managedRuleGroups :: Maybe [ManagedRuleGroupSummary]
$sel:managedRuleGroups:ListAvailableManagedRuleGroupsResponse' :: ListAvailableManagedRuleGroupsResponse
-> Maybe [ManagedRuleGroupSummary]
managedRuleGroups} -> Maybe [ManagedRuleGroupSummary]
managedRuleGroups) (\s :: ListAvailableManagedRuleGroupsResponse
s@ListAvailableManagedRuleGroupsResponse' {} Maybe [ManagedRuleGroupSummary]
a -> ListAvailableManagedRuleGroupsResponse
s {$sel:managedRuleGroups:ListAvailableManagedRuleGroupsResponse' :: Maybe [ManagedRuleGroupSummary]
managedRuleGroups = Maybe [ManagedRuleGroupSummary]
a} :: ListAvailableManagedRuleGroupsResponse) 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

-- | 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.
listAvailableManagedRuleGroupsResponse_nextMarker :: Lens.Lens' ListAvailableManagedRuleGroupsResponse (Prelude.Maybe Prelude.Text)
listAvailableManagedRuleGroupsResponse_nextMarker :: Lens' ListAvailableManagedRuleGroupsResponse (Maybe Text)
listAvailableManagedRuleGroupsResponse_nextMarker = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListAvailableManagedRuleGroupsResponse' {Maybe Text
nextMarker :: Maybe Text
$sel:nextMarker:ListAvailableManagedRuleGroupsResponse' :: ListAvailableManagedRuleGroupsResponse -> Maybe Text
nextMarker} -> Maybe Text
nextMarker) (\s :: ListAvailableManagedRuleGroupsResponse
s@ListAvailableManagedRuleGroupsResponse' {} Maybe Text
a -> ListAvailableManagedRuleGroupsResponse
s {$sel:nextMarker:ListAvailableManagedRuleGroupsResponse' :: Maybe Text
nextMarker = Maybe Text
a} :: ListAvailableManagedRuleGroupsResponse)

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

instance
  Prelude.NFData
    ListAvailableManagedRuleGroupsResponse
  where
  rnf :: ListAvailableManagedRuleGroupsResponse -> ()
rnf ListAvailableManagedRuleGroupsResponse' {Int
Maybe [ManagedRuleGroupSummary]
Maybe Text
httpStatus :: Int
nextMarker :: Maybe Text
managedRuleGroups :: Maybe [ManagedRuleGroupSummary]
$sel:httpStatus:ListAvailableManagedRuleGroupsResponse' :: ListAvailableManagedRuleGroupsResponse -> Int
$sel:nextMarker:ListAvailableManagedRuleGroupsResponse' :: ListAvailableManagedRuleGroupsResponse -> Maybe Text
$sel:managedRuleGroups:ListAvailableManagedRuleGroupsResponse' :: ListAvailableManagedRuleGroupsResponse
-> Maybe [ManagedRuleGroupSummary]
..} =
    forall a. NFData a => a -> ()
Prelude.rnf Maybe [ManagedRuleGroupSummary]
managedRuleGroups
      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 Int
httpStatus