{-# 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.ListRegexMatchSets
-- Copyright   : (c) 2013-2021 Brendan Hay
-- License     : Mozilla Public License, v. 2.0.
-- Maintainer  : Brendan Hay <brendan.g.hay+amazonka@gmail.com>
-- Stability   : auto-generated
-- Portability : non-portable (GHC extensions)
--
-- This is __AWS WAF Classic__ documentation. For more information, see
-- <https://docs.aws.amazon.com/waf/latest/developerguide/classic-waf-chapter.html AWS WAF Classic>
-- in the developer guide.
--
-- __For the latest version of AWS WAF__, use the AWS WAFV2 API and see the
-- <https://docs.aws.amazon.com/waf/latest/developerguide/waf-chapter.html AWS WAF Developer Guide>.
-- With the latest version, AWS WAF has a single set of endpoints for
-- regional and global use.
--
-- Returns an array of RegexMatchSetSummary objects.
--
-- This operation returns paginated results.
module Amazonka.WAF.ListRegexMatchSets
  ( -- * Creating a Request
    ListRegexMatchSets (..),
    newListRegexMatchSets,

    -- * Request Lenses
    listRegexMatchSets_nextMarker,
    listRegexMatchSets_limit,

    -- * Destructuring the Response
    ListRegexMatchSetsResponse (..),
    newListRegexMatchSetsResponse,

    -- * Response Lenses
    listRegexMatchSetsResponse_regexMatchSets,
    listRegexMatchSetsResponse_nextMarker,
    listRegexMatchSetsResponse_httpStatus,
  )
where

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

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

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

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

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

instance Core.AWSPager ListRegexMatchSets where
  page :: ListRegexMatchSets
-> AWSResponse ListRegexMatchSets -> Maybe ListRegexMatchSets
page ListRegexMatchSets
rq AWSResponse ListRegexMatchSets
rs
    | Maybe Text -> Bool
forall a. AWSTruncated a => a -> Bool
Core.stop
        ( AWSResponse ListRegexMatchSets
ListRegexMatchSetsResponse
rs
            ListRegexMatchSetsResponse
-> Getting (First Text) ListRegexMatchSetsResponse Text
-> Maybe Text
forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^? (Maybe Text -> Const (First Text) (Maybe Text))
-> ListRegexMatchSetsResponse
-> Const (First Text) ListRegexMatchSetsResponse
Lens' ListRegexMatchSetsResponse (Maybe Text)
listRegexMatchSetsResponse_nextMarker
              ((Maybe Text -> Const (First Text) (Maybe Text))
 -> ListRegexMatchSetsResponse
 -> Const (First Text) ListRegexMatchSetsResponse)
-> ((Text -> Const (First Text) Text)
    -> Maybe Text -> Const (First Text) (Maybe Text))
-> Getting (First Text) ListRegexMatchSetsResponse Text
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. (Text -> Const (First Text) Text)
-> Maybe Text -> Const (First Text) (Maybe Text)
forall a b. Prism (Maybe a) (Maybe b) a b
Lens._Just
        ) =
      Maybe ListRegexMatchSets
forall a. Maybe a
Prelude.Nothing
    | Maybe [RegexMatchSetSummary] -> Bool
forall a. AWSTruncated a => a -> Bool
Core.stop
        ( AWSResponse ListRegexMatchSets
ListRegexMatchSetsResponse
rs
            ListRegexMatchSetsResponse
-> Getting
     (First [RegexMatchSetSummary])
     ListRegexMatchSetsResponse
     [RegexMatchSetSummary]
-> Maybe [RegexMatchSetSummary]
forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^? (Maybe [RegexMatchSetSummary]
 -> Const
      (First [RegexMatchSetSummary]) (Maybe [RegexMatchSetSummary]))
-> ListRegexMatchSetsResponse
-> Const (First [RegexMatchSetSummary]) ListRegexMatchSetsResponse
Lens' ListRegexMatchSetsResponse (Maybe [RegexMatchSetSummary])
listRegexMatchSetsResponse_regexMatchSets
              ((Maybe [RegexMatchSetSummary]
  -> Const
       (First [RegexMatchSetSummary]) (Maybe [RegexMatchSetSummary]))
 -> ListRegexMatchSetsResponse
 -> Const (First [RegexMatchSetSummary]) ListRegexMatchSetsResponse)
-> (([RegexMatchSetSummary]
     -> Const (First [RegexMatchSetSummary]) [RegexMatchSetSummary])
    -> Maybe [RegexMatchSetSummary]
    -> Const
         (First [RegexMatchSetSummary]) (Maybe [RegexMatchSetSummary]))
-> Getting
     (First [RegexMatchSetSummary])
     ListRegexMatchSetsResponse
     [RegexMatchSetSummary]
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. ([RegexMatchSetSummary]
 -> Const (First [RegexMatchSetSummary]) [RegexMatchSetSummary])
-> Maybe [RegexMatchSetSummary]
-> Const
     (First [RegexMatchSetSummary]) (Maybe [RegexMatchSetSummary])
forall a b. Prism (Maybe a) (Maybe b) a b
Lens._Just
        ) =
      Maybe ListRegexMatchSets
forall a. Maybe a
Prelude.Nothing
    | Bool
Prelude.otherwise =
      ListRegexMatchSets -> Maybe ListRegexMatchSets
forall a. a -> Maybe a
Prelude.Just (ListRegexMatchSets -> Maybe ListRegexMatchSets)
-> ListRegexMatchSets -> Maybe ListRegexMatchSets
forall a b. (a -> b) -> a -> b
Prelude.$
        ListRegexMatchSets
rq
          ListRegexMatchSets
-> (ListRegexMatchSets -> ListRegexMatchSets) -> ListRegexMatchSets
forall a b. a -> (a -> b) -> b
Prelude.& (Maybe Text -> Identity (Maybe Text))
-> ListRegexMatchSets -> Identity ListRegexMatchSets
Lens
  ListRegexMatchSets ListRegexMatchSets (Maybe Text) (Maybe Text)
listRegexMatchSets_nextMarker
          ((Maybe Text -> Identity (Maybe Text))
 -> ListRegexMatchSets -> Identity ListRegexMatchSets)
-> Maybe Text -> ListRegexMatchSets -> ListRegexMatchSets
forall s t a b. ASetter s t a b -> b -> s -> t
Lens..~ AWSResponse ListRegexMatchSets
ListRegexMatchSetsResponse
rs
          ListRegexMatchSetsResponse
-> Getting (First Text) ListRegexMatchSetsResponse Text
-> Maybe Text
forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^? (Maybe Text -> Const (First Text) (Maybe Text))
-> ListRegexMatchSetsResponse
-> Const (First Text) ListRegexMatchSetsResponse
Lens' ListRegexMatchSetsResponse (Maybe Text)
listRegexMatchSetsResponse_nextMarker
            ((Maybe Text -> Const (First Text) (Maybe Text))
 -> ListRegexMatchSetsResponse
 -> Const (First Text) ListRegexMatchSetsResponse)
-> ((Text -> Const (First Text) Text)
    -> Maybe Text -> Const (First Text) (Maybe Text))
-> Getting (First Text) ListRegexMatchSetsResponse Text
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. (Text -> Const (First Text) Text)
-> Maybe Text -> Const (First Text) (Maybe Text)
forall a b. Prism (Maybe a) (Maybe b) a b
Lens._Just

instance Core.AWSRequest ListRegexMatchSets where
  type
    AWSResponse ListRegexMatchSets =
      ListRegexMatchSetsResponse
  request :: ListRegexMatchSets -> Request ListRegexMatchSets
request = Service -> ListRegexMatchSets -> Request ListRegexMatchSets
forall a. (ToRequest a, ToJSON a) => Service -> a -> Request a
Request.postJSON Service
defaultService
  response :: Logger
-> Service
-> Proxy ListRegexMatchSets
-> ClientResponse ClientBody
-> m (Either
        Error (ClientResponse (AWSResponse ListRegexMatchSets)))
response =
    (Int
 -> ResponseHeaders
 -> Object
 -> Either String (AWSResponse ListRegexMatchSets))
-> Logger
-> Service
-> Proxy ListRegexMatchSets
-> ClientResponse ClientBody
-> m (Either
        Error (ClientResponse (AWSResponse ListRegexMatchSets)))
forall (m :: * -> *) a.
MonadResource m =>
(Int -> ResponseHeaders -> Object -> Either String (AWSResponse a))
-> Logger
-> Service
-> Proxy a
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse a)))
Response.receiveJSON
      ( \Int
s ResponseHeaders
h Object
x ->
          Maybe [RegexMatchSetSummary]
-> Maybe Text -> Int -> ListRegexMatchSetsResponse
ListRegexMatchSetsResponse'
            (Maybe [RegexMatchSetSummary]
 -> Maybe Text -> Int -> ListRegexMatchSetsResponse)
-> Either String (Maybe [RegexMatchSetSummary])
-> Either String (Maybe Text -> Int -> ListRegexMatchSetsResponse)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object
-> Text -> Either String (Maybe (Maybe [RegexMatchSetSummary]))
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"RegexMatchSets" Either String (Maybe (Maybe [RegexMatchSetSummary]))
-> Maybe [RegexMatchSetSummary]
-> Either String (Maybe [RegexMatchSetSummary])
forall (f :: * -> *) a. Functor f => f (Maybe a) -> a -> f a
Core..!@ Maybe [RegexMatchSetSummary]
forall a. Monoid a => a
Prelude.mempty)
            Either String (Maybe Text -> Int -> ListRegexMatchSetsResponse)
-> Either String (Maybe Text)
-> Either String (Int -> ListRegexMatchSetsResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String (Maybe Text)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"NextMarker")
            Either String (Int -> ListRegexMatchSetsResponse)
-> Either String Int -> Either String ListRegexMatchSetsResponse
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Int -> Either String Int
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure (Int -> Int
forall a. Enum a => a -> Int
Prelude.fromEnum Int
s))
      )

instance Prelude.Hashable ListRegexMatchSets

instance Prelude.NFData ListRegexMatchSets

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

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

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

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

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

-- |
-- Create a value of 'ListRegexMatchSetsResponse' 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:
--
-- 'regexMatchSets', 'listRegexMatchSetsResponse_regexMatchSets' - An array of RegexMatchSetSummary objects.
--
-- 'nextMarker', 'listRegexMatchSetsResponse_nextMarker' - If you have more @RegexMatchSet@ objects than the number that you
-- specified for @Limit@ in the request, the response includes a
-- @NextMarker@ value. To list more @RegexMatchSet@ objects, submit another
-- @ListRegexMatchSets@ request, and specify the @NextMarker@ value from
-- the response in the @NextMarker@ value in the next request.
--
-- 'httpStatus', 'listRegexMatchSetsResponse_httpStatus' - The response's http status code.
newListRegexMatchSetsResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  ListRegexMatchSetsResponse
newListRegexMatchSetsResponse :: Int -> ListRegexMatchSetsResponse
newListRegexMatchSetsResponse Int
pHttpStatus_ =
  ListRegexMatchSetsResponse' :: Maybe [RegexMatchSetSummary]
-> Maybe Text -> Int -> ListRegexMatchSetsResponse
ListRegexMatchSetsResponse'
    { $sel:regexMatchSets:ListRegexMatchSetsResponse' :: Maybe [RegexMatchSetSummary]
regexMatchSets =
        Maybe [RegexMatchSetSummary]
forall a. Maybe a
Prelude.Nothing,
      $sel:nextMarker:ListRegexMatchSetsResponse' :: Maybe Text
nextMarker = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:httpStatus:ListRegexMatchSetsResponse' :: Int
httpStatus = Int
pHttpStatus_
    }

-- | An array of RegexMatchSetSummary objects.
listRegexMatchSetsResponse_regexMatchSets :: Lens.Lens' ListRegexMatchSetsResponse (Prelude.Maybe [RegexMatchSetSummary])
listRegexMatchSetsResponse_regexMatchSets :: (Maybe [RegexMatchSetSummary] -> f (Maybe [RegexMatchSetSummary]))
-> ListRegexMatchSetsResponse -> f ListRegexMatchSetsResponse
listRegexMatchSetsResponse_regexMatchSets = (ListRegexMatchSetsResponse -> Maybe [RegexMatchSetSummary])
-> (ListRegexMatchSetsResponse
    -> Maybe [RegexMatchSetSummary] -> ListRegexMatchSetsResponse)
-> Lens' ListRegexMatchSetsResponse (Maybe [RegexMatchSetSummary])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListRegexMatchSetsResponse' {Maybe [RegexMatchSetSummary]
regexMatchSets :: Maybe [RegexMatchSetSummary]
$sel:regexMatchSets:ListRegexMatchSetsResponse' :: ListRegexMatchSetsResponse -> Maybe [RegexMatchSetSummary]
regexMatchSets} -> Maybe [RegexMatchSetSummary]
regexMatchSets) (\s :: ListRegexMatchSetsResponse
s@ListRegexMatchSetsResponse' {} Maybe [RegexMatchSetSummary]
a -> ListRegexMatchSetsResponse
s {$sel:regexMatchSets:ListRegexMatchSetsResponse' :: Maybe [RegexMatchSetSummary]
regexMatchSets = Maybe [RegexMatchSetSummary]
a} :: ListRegexMatchSetsResponse) ((Maybe [RegexMatchSetSummary] -> f (Maybe [RegexMatchSetSummary]))
 -> ListRegexMatchSetsResponse -> f ListRegexMatchSetsResponse)
-> ((Maybe [RegexMatchSetSummary]
     -> f (Maybe [RegexMatchSetSummary]))
    -> Maybe [RegexMatchSetSummary]
    -> f (Maybe [RegexMatchSetSummary]))
-> (Maybe [RegexMatchSetSummary]
    -> f (Maybe [RegexMatchSetSummary]))
-> ListRegexMatchSetsResponse
-> f ListRegexMatchSetsResponse
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso
  [RegexMatchSetSummary]
  [RegexMatchSetSummary]
  [RegexMatchSetSummary]
  [RegexMatchSetSummary]
-> Iso
     (Maybe [RegexMatchSetSummary])
     (Maybe [RegexMatchSetSummary])
     (Maybe [RegexMatchSetSummary])
     (Maybe [RegexMatchSetSummary])
forall (f :: * -> *) (g :: * -> *) s t a b.
(Functor f, Functor g) =>
AnIso s t a b -> Iso (f s) (g t) (f a) (g b)
Lens.mapping AnIso
  [RegexMatchSetSummary]
  [RegexMatchSetSummary]
  [RegexMatchSetSummary]
  [RegexMatchSetSummary]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

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

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

instance Prelude.NFData ListRegexMatchSetsResponse