{-# 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.ListRegexPatternSets
-- 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 RegexPatternSetSummary objects.
--
-- This operation returns paginated results.
module Amazonka.WAF.ListRegexPatternSets
  ( -- * Creating a Request
    ListRegexPatternSets (..),
    newListRegexPatternSets,

    -- * Request Lenses
    listRegexPatternSets_limit,
    listRegexPatternSets_nextMarker,

    -- * Destructuring the Response
    ListRegexPatternSetsResponse (..),
    newListRegexPatternSetsResponse,

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

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

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

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

instance Core.AWSPager ListRegexPatternSets where
  page :: ListRegexPatternSets
-> AWSResponse ListRegexPatternSets -> Maybe ListRegexPatternSets
page ListRegexPatternSets
rq AWSResponse ListRegexPatternSets
rs
    | forall a. AWSTruncated a => a -> Bool
Core.stop
        ( AWSResponse ListRegexPatternSets
rs
            forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^? Lens' ListRegexPatternSetsResponse (Maybe Text)
listRegexPatternSetsResponse_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 ListRegexPatternSets
rs
            forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^? Lens' ListRegexPatternSetsResponse (Maybe [RegexPatternSetSummary])
listRegexPatternSetsResponse_regexPatternSets
            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.$ ListRegexPatternSets
rq
          forall a b. a -> (a -> b) -> b
Prelude.& Lens' ListRegexPatternSets (Maybe Text)
listRegexPatternSets_nextMarker
          forall s t a b. ASetter s t a b -> b -> s -> t
Lens..~ AWSResponse ListRegexPatternSets
rs
          forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^? Lens' ListRegexPatternSetsResponse (Maybe Text)
listRegexPatternSetsResponse_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 ListRegexPatternSets where
  type
    AWSResponse ListRegexPatternSets =
      ListRegexPatternSetsResponse
  request :: (Service -> Service)
-> ListRegexPatternSets -> Request ListRegexPatternSets
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 ListRegexPatternSets
-> ClientResponse ClientBody
-> m (Either
        Error (ClientResponse (AWSResponse ListRegexPatternSets)))
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 [RegexPatternSetSummary]
-> Int
-> ListRegexPatternSetsResponse
ListRegexPatternSetsResponse'
            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
"RegexPatternSets"
                            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 ListRegexPatternSets where
  hashWithSalt :: Int -> ListRegexPatternSets -> Int
hashWithSalt Int
_salt ListRegexPatternSets' {Maybe Natural
Maybe Text
nextMarker :: Maybe Text
limit :: Maybe Natural
$sel:nextMarker:ListRegexPatternSets' :: ListRegexPatternSets -> Maybe Text
$sel:limit:ListRegexPatternSets' :: ListRegexPatternSets -> 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 ListRegexPatternSets where
  rnf :: ListRegexPatternSets -> ()
rnf ListRegexPatternSets' {Maybe Natural
Maybe Text
nextMarker :: Maybe Text
limit :: Maybe Natural
$sel:nextMarker:ListRegexPatternSets' :: ListRegexPatternSets -> Maybe Text
$sel:limit:ListRegexPatternSets' :: ListRegexPatternSets -> 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 ListRegexPatternSets where
  toHeaders :: ListRegexPatternSets -> 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.ListRegexPatternSets" ::
                          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 ListRegexPatternSets where
  toJSON :: ListRegexPatternSets -> Value
toJSON ListRegexPatternSets' {Maybe Natural
Maybe Text
nextMarker :: Maybe Text
limit :: Maybe Natural
$sel:nextMarker:ListRegexPatternSets' :: ListRegexPatternSets -> Maybe Text
$sel:limit:ListRegexPatternSets' :: ListRegexPatternSets -> 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 ListRegexPatternSets where
  toPath :: ListRegexPatternSets -> ByteString
toPath = forall a b. a -> b -> a
Prelude.const ByteString
"/"

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

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

-- |
-- Create a value of 'ListRegexPatternSetsResponse' 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', 'listRegexPatternSetsResponse_nextMarker' - If you have more @RegexPatternSet@ objects than the number that you
-- specified for @Limit@ in the request, the response includes a
-- @NextMarker@ value. To list more @RegexPatternSet@ objects, submit
-- another @ListRegexPatternSets@ request, and specify the @NextMarker@
-- value from the response in the @NextMarker@ value in the next request.
--
-- 'regexPatternSets', 'listRegexPatternSetsResponse_regexPatternSets' - An array of RegexPatternSetSummary objects.
--
-- 'httpStatus', 'listRegexPatternSetsResponse_httpStatus' - The response's http status code.
newListRegexPatternSetsResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  ListRegexPatternSetsResponse
newListRegexPatternSetsResponse :: Int -> ListRegexPatternSetsResponse
newListRegexPatternSetsResponse Int
pHttpStatus_ =
  ListRegexPatternSetsResponse'
    { $sel:nextMarker:ListRegexPatternSetsResponse' :: Maybe Text
nextMarker =
        forall a. Maybe a
Prelude.Nothing,
      $sel:regexPatternSets:ListRegexPatternSetsResponse' :: Maybe [RegexPatternSetSummary]
regexPatternSets = forall a. Maybe a
Prelude.Nothing,
      $sel:httpStatus:ListRegexPatternSetsResponse' :: Int
httpStatus = Int
pHttpStatus_
    }

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

-- | An array of RegexPatternSetSummary objects.
listRegexPatternSetsResponse_regexPatternSets :: Lens.Lens' ListRegexPatternSetsResponse (Prelude.Maybe [RegexPatternSetSummary])
listRegexPatternSetsResponse_regexPatternSets :: Lens' ListRegexPatternSetsResponse (Maybe [RegexPatternSetSummary])
listRegexPatternSetsResponse_regexPatternSets = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListRegexPatternSetsResponse' {Maybe [RegexPatternSetSummary]
regexPatternSets :: Maybe [RegexPatternSetSummary]
$sel:regexPatternSets:ListRegexPatternSetsResponse' :: ListRegexPatternSetsResponse -> Maybe [RegexPatternSetSummary]
regexPatternSets} -> Maybe [RegexPatternSetSummary]
regexPatternSets) (\s :: ListRegexPatternSetsResponse
s@ListRegexPatternSetsResponse' {} Maybe [RegexPatternSetSummary]
a -> ListRegexPatternSetsResponse
s {$sel:regexPatternSets:ListRegexPatternSetsResponse' :: Maybe [RegexPatternSetSummary]
regexPatternSets = Maybe [RegexPatternSetSummary]
a} :: ListRegexPatternSetsResponse) 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.
listRegexPatternSetsResponse_httpStatus :: Lens.Lens' ListRegexPatternSetsResponse Prelude.Int
listRegexPatternSetsResponse_httpStatus :: Lens' ListRegexPatternSetsResponse Int
listRegexPatternSetsResponse_httpStatus = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListRegexPatternSetsResponse' {Int
httpStatus :: Int
$sel:httpStatus:ListRegexPatternSetsResponse' :: ListRegexPatternSetsResponse -> Int
httpStatus} -> Int
httpStatus) (\s :: ListRegexPatternSetsResponse
s@ListRegexPatternSetsResponse' {} Int
a -> ListRegexPatternSetsResponse
s {$sel:httpStatus:ListRegexPatternSetsResponse' :: Int
httpStatus = Int
a} :: ListRegexPatternSetsResponse)

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