{-# 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.ListManagedRuleSets
-- Copyright   : (c) 2013-2023 Brendan Hay
-- License     : Mozilla Public License, v. 2.0.
-- Maintainer  : Brendan Hay
-- Stability   : auto-generated
-- Portability : non-portable (GHC extensions)
--
-- Retrieves the managed rule sets that you own.
--
-- This is intended for use only by vendors of managed rule sets. Vendors
-- are Amazon Web Services and Amazon Web Services Marketplace sellers.
--
-- Vendors, you can use the managed rule set APIs to provide controlled
-- rollout of your versioned managed rule group offerings for your
-- customers. The APIs are @ListManagedRuleSets@, @GetManagedRuleSet@,
-- @PutManagedRuleSetVersions@, and
-- @UpdateManagedRuleSetVersionExpiryDate@.
module Amazonka.WAFV2.ListManagedRuleSets
  ( -- * Creating a Request
    ListManagedRuleSets (..),
    newListManagedRuleSets,

    -- * Request Lenses
    listManagedRuleSets_limit,
    listManagedRuleSets_nextMarker,
    listManagedRuleSets_scope,

    -- * Destructuring the Response
    ListManagedRuleSetsResponse (..),
    newListManagedRuleSetsResponse,

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

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

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

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

instance Core.AWSRequest ListManagedRuleSets where
  type
    AWSResponse ListManagedRuleSets =
      ListManagedRuleSetsResponse
  request :: (Service -> Service)
-> ListManagedRuleSets -> Request ListManagedRuleSets
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 ListManagedRuleSets
-> ClientResponse ClientBody
-> m (Either
        Error (ClientResponse (AWSResponse ListManagedRuleSets)))
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 [ManagedRuleSetSummary]
-> Maybe Text -> Int -> ListManagedRuleSetsResponse
ListManagedRuleSetsResponse'
            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
"ManagedRuleSets"
                            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 ListManagedRuleSets where
  hashWithSalt :: Int -> ListManagedRuleSets -> Int
hashWithSalt Int
_salt ListManagedRuleSets' {Maybe Natural
Maybe Text
Scope
scope :: Scope
nextMarker :: Maybe Text
limit :: Maybe Natural
$sel:scope:ListManagedRuleSets' :: ListManagedRuleSets -> Scope
$sel:nextMarker:ListManagedRuleSets' :: ListManagedRuleSets -> Maybe Text
$sel:limit:ListManagedRuleSets' :: ListManagedRuleSets -> 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 ListManagedRuleSets where
  rnf :: ListManagedRuleSets -> ()
rnf ListManagedRuleSets' {Maybe Natural
Maybe Text
Scope
scope :: Scope
nextMarker :: Maybe Text
limit :: Maybe Natural
$sel:scope:ListManagedRuleSets' :: ListManagedRuleSets -> Scope
$sel:nextMarker:ListManagedRuleSets' :: ListManagedRuleSets -> Maybe Text
$sel:limit:ListManagedRuleSets' :: ListManagedRuleSets -> 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 ListManagedRuleSets where
  toHeaders :: ListManagedRuleSets -> 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.ListManagedRuleSets" ::
                          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 ListManagedRuleSets where
  toJSON :: ListManagedRuleSets -> Value
toJSON ListManagedRuleSets' {Maybe Natural
Maybe Text
Scope
scope :: Scope
nextMarker :: Maybe Text
limit :: Maybe Natural
$sel:scope:ListManagedRuleSets' :: ListManagedRuleSets -> Scope
$sel:nextMarker:ListManagedRuleSets' :: ListManagedRuleSets -> Maybe Text
$sel:limit:ListManagedRuleSets' :: ListManagedRuleSets -> 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 ListManagedRuleSets where
  toPath :: ListManagedRuleSets -> ByteString
toPath = forall a b. a -> b -> a
Prelude.const ByteString
"/"

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

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

-- |
-- Create a value of 'ListManagedRuleSetsResponse' 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:
--
-- 'managedRuleSets', 'listManagedRuleSetsResponse_managedRuleSets' - Your managed rule sets.
--
-- 'nextMarker', 'listManagedRuleSetsResponse_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', 'listManagedRuleSetsResponse_httpStatus' - The response's http status code.
newListManagedRuleSetsResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  ListManagedRuleSetsResponse
newListManagedRuleSetsResponse :: Int -> ListManagedRuleSetsResponse
newListManagedRuleSetsResponse Int
pHttpStatus_ =
  ListManagedRuleSetsResponse'
    { $sel:managedRuleSets:ListManagedRuleSetsResponse' :: Maybe [ManagedRuleSetSummary]
managedRuleSets =
        forall a. Maybe a
Prelude.Nothing,
      $sel:nextMarker:ListManagedRuleSetsResponse' :: Maybe Text
nextMarker = forall a. Maybe a
Prelude.Nothing,
      $sel:httpStatus:ListManagedRuleSetsResponse' :: Int
httpStatus = Int
pHttpStatus_
    }

-- | Your managed rule sets.
listManagedRuleSetsResponse_managedRuleSets :: Lens.Lens' ListManagedRuleSetsResponse (Prelude.Maybe [ManagedRuleSetSummary])
listManagedRuleSetsResponse_managedRuleSets :: Lens' ListManagedRuleSetsResponse (Maybe [ManagedRuleSetSummary])
listManagedRuleSetsResponse_managedRuleSets = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListManagedRuleSetsResponse' {Maybe [ManagedRuleSetSummary]
managedRuleSets :: Maybe [ManagedRuleSetSummary]
$sel:managedRuleSets:ListManagedRuleSetsResponse' :: ListManagedRuleSetsResponse -> Maybe [ManagedRuleSetSummary]
managedRuleSets} -> Maybe [ManagedRuleSetSummary]
managedRuleSets) (\s :: ListManagedRuleSetsResponse
s@ListManagedRuleSetsResponse' {} Maybe [ManagedRuleSetSummary]
a -> ListManagedRuleSetsResponse
s {$sel:managedRuleSets:ListManagedRuleSetsResponse' :: Maybe [ManagedRuleSetSummary]
managedRuleSets = Maybe [ManagedRuleSetSummary]
a} :: ListManagedRuleSetsResponse) 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.
listManagedRuleSetsResponse_nextMarker :: Lens.Lens' ListManagedRuleSetsResponse (Prelude.Maybe Prelude.Text)
listManagedRuleSetsResponse_nextMarker :: Lens' ListManagedRuleSetsResponse (Maybe Text)
listManagedRuleSetsResponse_nextMarker = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListManagedRuleSetsResponse' {Maybe Text
nextMarker :: Maybe Text
$sel:nextMarker:ListManagedRuleSetsResponse' :: ListManagedRuleSetsResponse -> Maybe Text
nextMarker} -> Maybe Text
nextMarker) (\s :: ListManagedRuleSetsResponse
s@ListManagedRuleSetsResponse' {} Maybe Text
a -> ListManagedRuleSetsResponse
s {$sel:nextMarker:ListManagedRuleSetsResponse' :: Maybe Text
nextMarker = Maybe Text
a} :: ListManagedRuleSetsResponse)

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

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