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

    -- * Request Lenses
    listRegexPatternSets_nextMarker,
    listRegexPatternSets_limit,

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

    -- * Response Lenses
    listRegexPatternSetsResponse_regexPatternSets,
    listRegexPatternSetsResponse_nextMarker,
    listRegexPatternSetsResponse_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:/ 'newListRegexPatternSets' smart constructor.
data ListRegexPatternSets = 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 -> Maybe Text
nextMarker :: Prelude.Maybe Prelude.Text,
    -- | 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
  }
  deriving (ListRegexPatternSets -> ListRegexPatternSets -> Bool
(ListRegexPatternSets -> ListRegexPatternSets -> Bool)
-> (ListRegexPatternSets -> ListRegexPatternSets -> Bool)
-> Eq ListRegexPatternSets
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]
(Int -> ReadS ListRegexPatternSets)
-> ReadS [ListRegexPatternSets]
-> ReadPrec ListRegexPatternSets
-> ReadPrec [ListRegexPatternSets]
-> Read 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
(Int -> ListRegexPatternSets -> ShowS)
-> (ListRegexPatternSets -> String)
-> ([ListRegexPatternSets] -> ShowS)
-> Show ListRegexPatternSets
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. ListRegexPatternSets -> Rep ListRegexPatternSets x)
-> (forall x. Rep ListRegexPatternSets x -> ListRegexPatternSets)
-> Generic ListRegexPatternSets
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:
--
-- '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.
--
-- '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.
newListRegexPatternSets ::
  ListRegexPatternSets
newListRegexPatternSets :: ListRegexPatternSets
newListRegexPatternSets =
  ListRegexPatternSets' :: Maybe Text -> Maybe Natural -> ListRegexPatternSets
ListRegexPatternSets'
    { $sel:nextMarker:ListRegexPatternSets' :: Maybe Text
nextMarker = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:limit:ListRegexPatternSets' :: Maybe Natural
limit = Maybe Natural
forall a. Maybe a
Prelude.Nothing
    }

-- | 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 :: (Maybe Text -> f (Maybe Text))
-> ListRegexPatternSets -> f ListRegexPatternSets
listRegexPatternSets_nextMarker = (ListRegexPatternSets -> Maybe Text)
-> (ListRegexPatternSets -> Maybe Text -> ListRegexPatternSets)
-> Lens
     ListRegexPatternSets ListRegexPatternSets (Maybe Text) (Maybe Text)
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)

-- | 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 :: (Maybe Natural -> f (Maybe Natural))
-> ListRegexPatternSets -> f ListRegexPatternSets
listRegexPatternSets_limit = (ListRegexPatternSets -> Maybe Natural)
-> (ListRegexPatternSets -> Maybe Natural -> ListRegexPatternSets)
-> Lens
     ListRegexPatternSets
     ListRegexPatternSets
     (Maybe Natural)
     (Maybe Natural)
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)

instance Core.AWSPager ListRegexPatternSets where
  page :: ListRegexPatternSets
-> AWSResponse ListRegexPatternSets -> Maybe ListRegexPatternSets
page ListRegexPatternSets
rq AWSResponse ListRegexPatternSets
rs
    | Maybe Text -> Bool
forall a. AWSTruncated a => a -> Bool
Core.stop
        ( AWSResponse ListRegexPatternSets
ListRegexPatternSetsResponse
rs
            ListRegexPatternSetsResponse
-> Getting (First Text) ListRegexPatternSetsResponse Text
-> Maybe Text
forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^? (Maybe Text -> Const (First Text) (Maybe Text))
-> ListRegexPatternSetsResponse
-> Const (First Text) ListRegexPatternSetsResponse
Lens' ListRegexPatternSetsResponse (Maybe Text)
listRegexPatternSetsResponse_nextMarker
              ((Maybe Text -> Const (First Text) (Maybe Text))
 -> ListRegexPatternSetsResponse
 -> Const (First Text) ListRegexPatternSetsResponse)
-> ((Text -> Const (First Text) Text)
    -> Maybe Text -> Const (First Text) (Maybe Text))
-> Getting (First Text) ListRegexPatternSetsResponse 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 ListRegexPatternSets
forall a. Maybe a
Prelude.Nothing
    | Maybe [RegexPatternSetSummary] -> Bool
forall a. AWSTruncated a => a -> Bool
Core.stop
        ( AWSResponse ListRegexPatternSets
ListRegexPatternSetsResponse
rs
            ListRegexPatternSetsResponse
-> Getting
     (First [RegexPatternSetSummary])
     ListRegexPatternSetsResponse
     [RegexPatternSetSummary]
-> Maybe [RegexPatternSetSummary]
forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^? (Maybe [RegexPatternSetSummary]
 -> Const
      (First [RegexPatternSetSummary]) (Maybe [RegexPatternSetSummary]))
-> ListRegexPatternSetsResponse
-> Const
     (First [RegexPatternSetSummary]) ListRegexPatternSetsResponse
Lens' ListRegexPatternSetsResponse (Maybe [RegexPatternSetSummary])
listRegexPatternSetsResponse_regexPatternSets
              ((Maybe [RegexPatternSetSummary]
  -> Const
       (First [RegexPatternSetSummary]) (Maybe [RegexPatternSetSummary]))
 -> ListRegexPatternSetsResponse
 -> Const
      (First [RegexPatternSetSummary]) ListRegexPatternSetsResponse)
-> (([RegexPatternSetSummary]
     -> Const (First [RegexPatternSetSummary]) [RegexPatternSetSummary])
    -> Maybe [RegexPatternSetSummary]
    -> Const
         (First [RegexPatternSetSummary]) (Maybe [RegexPatternSetSummary]))
-> Getting
     (First [RegexPatternSetSummary])
     ListRegexPatternSetsResponse
     [RegexPatternSetSummary]
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. ([RegexPatternSetSummary]
 -> Const (First [RegexPatternSetSummary]) [RegexPatternSetSummary])
-> Maybe [RegexPatternSetSummary]
-> Const
     (First [RegexPatternSetSummary]) (Maybe [RegexPatternSetSummary])
forall a b. Prism (Maybe a) (Maybe b) a b
Lens._Just
        ) =
      Maybe ListRegexPatternSets
forall a. Maybe a
Prelude.Nothing
    | Bool
Prelude.otherwise =
      ListRegexPatternSets -> Maybe ListRegexPatternSets
forall a. a -> Maybe a
Prelude.Just (ListRegexPatternSets -> Maybe ListRegexPatternSets)
-> ListRegexPatternSets -> Maybe ListRegexPatternSets
forall a b. (a -> b) -> a -> b
Prelude.$
        ListRegexPatternSets
rq
          ListRegexPatternSets
-> (ListRegexPatternSets -> ListRegexPatternSets)
-> ListRegexPatternSets
forall a b. a -> (a -> b) -> b
Prelude.& (Maybe Text -> Identity (Maybe Text))
-> ListRegexPatternSets -> Identity ListRegexPatternSets
Lens
  ListRegexPatternSets ListRegexPatternSets (Maybe Text) (Maybe Text)
listRegexPatternSets_nextMarker
          ((Maybe Text -> Identity (Maybe Text))
 -> ListRegexPatternSets -> Identity ListRegexPatternSets)
-> Maybe Text -> ListRegexPatternSets -> ListRegexPatternSets
forall s t a b. ASetter s t a b -> b -> s -> t
Lens..~ AWSResponse ListRegexPatternSets
ListRegexPatternSetsResponse
rs
          ListRegexPatternSetsResponse
-> Getting (First Text) ListRegexPatternSetsResponse Text
-> Maybe Text
forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^? (Maybe Text -> Const (First Text) (Maybe Text))
-> ListRegexPatternSetsResponse
-> Const (First Text) ListRegexPatternSetsResponse
Lens' ListRegexPatternSetsResponse (Maybe Text)
listRegexPatternSetsResponse_nextMarker
            ((Maybe Text -> Const (First Text) (Maybe Text))
 -> ListRegexPatternSetsResponse
 -> Const (First Text) ListRegexPatternSetsResponse)
-> ((Text -> Const (First Text) Text)
    -> Maybe Text -> Const (First Text) (Maybe Text))
-> Getting (First Text) ListRegexPatternSetsResponse 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 ListRegexPatternSets where
  type
    AWSResponse ListRegexPatternSets =
      ListRegexPatternSetsResponse
  request :: ListRegexPatternSets -> Request ListRegexPatternSets
request = Service -> ListRegexPatternSets -> Request ListRegexPatternSets
forall a. (ToRequest a, ToJSON a) => Service -> a -> Request a
Request.postJSON Service
defaultService
  response :: Logger
-> Service
-> Proxy ListRegexPatternSets
-> ClientResponse ClientBody
-> m (Either
        Error (ClientResponse (AWSResponse ListRegexPatternSets)))
response =
    (Int
 -> ResponseHeaders
 -> Object
 -> Either String (AWSResponse ListRegexPatternSets))
-> Logger
-> Service
-> Proxy ListRegexPatternSets
-> ClientResponse ClientBody
-> m (Either
        Error (ClientResponse (AWSResponse ListRegexPatternSets)))
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 [RegexPatternSetSummary]
-> Maybe Text -> Int -> ListRegexPatternSetsResponse
ListRegexPatternSetsResponse'
            (Maybe [RegexPatternSetSummary]
 -> Maybe Text -> Int -> ListRegexPatternSetsResponse)
-> Either String (Maybe [RegexPatternSetSummary])
-> Either
     String (Maybe Text -> Int -> ListRegexPatternSetsResponse)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> ( Object
x Object
-> Text -> Either String (Maybe (Maybe [RegexPatternSetSummary]))
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"RegexPatternSets"
                            Either String (Maybe (Maybe [RegexPatternSetSummary]))
-> Maybe [RegexPatternSetSummary]
-> Either String (Maybe [RegexPatternSetSummary])
forall (f :: * -> *) a. Functor f => f (Maybe a) -> a -> f a
Core..!@ Maybe [RegexPatternSetSummary]
forall a. Monoid a => a
Prelude.mempty
                        )
            Either String (Maybe Text -> Int -> ListRegexPatternSetsResponse)
-> Either String (Maybe Text)
-> Either String (Int -> ListRegexPatternSetsResponse)
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 -> ListRegexPatternSetsResponse)
-> Either String Int -> Either String ListRegexPatternSetsResponse
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 ListRegexPatternSets

instance Prelude.NFData ListRegexPatternSets

instance Core.ToHeaders ListRegexPatternSets where
  toHeaders :: ListRegexPatternSets -> ResponseHeaders
toHeaders =
    ResponseHeaders -> ListRegexPatternSets -> 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.ListRegexPatternSets" ::
                          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 ListRegexPatternSets where
  toJSON :: ListRegexPatternSets -> Value
toJSON ListRegexPatternSets' {Maybe Natural
Maybe Text
limit :: Maybe Natural
nextMarker :: Maybe Text
$sel:limit:ListRegexPatternSets' :: ListRegexPatternSets -> Maybe Natural
$sel:nextMarker:ListRegexPatternSets' :: ListRegexPatternSets -> 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 ListRegexPatternSets where
  toPath :: ListRegexPatternSets -> ByteString
toPath = ByteString -> ListRegexPatternSets -> ByteString
forall a b. a -> b -> a
Prelude.const ByteString
"/"

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

-- | /See:/ 'newListRegexPatternSetsResponse' smart constructor.
data ListRegexPatternSetsResponse = ListRegexPatternSetsResponse'
  { -- | An array of RegexPatternSetSummary objects.
    ListRegexPatternSetsResponse -> Maybe [RegexPatternSetSummary]
regexPatternSets :: Prelude.Maybe [RegexPatternSetSummary],
    -- | 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,
    -- | The response's http status code.
    ListRegexPatternSetsResponse -> Int
httpStatus :: Prelude.Int
  }
  deriving (ListRegexPatternSetsResponse
-> ListRegexPatternSetsResponse -> Bool
(ListRegexPatternSetsResponse
 -> ListRegexPatternSetsResponse -> Bool)
-> (ListRegexPatternSetsResponse
    -> ListRegexPatternSetsResponse -> Bool)
-> Eq ListRegexPatternSetsResponse
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]
(Int -> ReadS ListRegexPatternSetsResponse)
-> ReadS [ListRegexPatternSetsResponse]
-> ReadPrec ListRegexPatternSetsResponse
-> ReadPrec [ListRegexPatternSetsResponse]
-> Read 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
(Int -> ListRegexPatternSetsResponse -> ShowS)
-> (ListRegexPatternSetsResponse -> String)
-> ([ListRegexPatternSetsResponse] -> ShowS)
-> Show ListRegexPatternSetsResponse
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.
 ListRegexPatternSetsResponse -> Rep ListRegexPatternSetsResponse x)
-> (forall x.
    Rep ListRegexPatternSetsResponse x -> ListRegexPatternSetsResponse)
-> Generic ListRegexPatternSetsResponse
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:
--
-- 'regexPatternSets', 'listRegexPatternSetsResponse_regexPatternSets' - An array of RegexPatternSetSummary objects.
--
-- '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.
--
-- 'httpStatus', 'listRegexPatternSetsResponse_httpStatus' - The response's http status code.
newListRegexPatternSetsResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  ListRegexPatternSetsResponse
newListRegexPatternSetsResponse :: Int -> ListRegexPatternSetsResponse
newListRegexPatternSetsResponse Int
pHttpStatus_ =
  ListRegexPatternSetsResponse' :: Maybe [RegexPatternSetSummary]
-> Maybe Text -> Int -> ListRegexPatternSetsResponse
ListRegexPatternSetsResponse'
    { $sel:regexPatternSets:ListRegexPatternSetsResponse' :: Maybe [RegexPatternSetSummary]
regexPatternSets =
        Maybe [RegexPatternSetSummary]
forall a. Maybe a
Prelude.Nothing,
      $sel:nextMarker:ListRegexPatternSetsResponse' :: Maybe Text
nextMarker = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:httpStatus:ListRegexPatternSetsResponse' :: Int
httpStatus = Int
pHttpStatus_
    }

-- | An array of RegexPatternSetSummary objects.
listRegexPatternSetsResponse_regexPatternSets :: Lens.Lens' ListRegexPatternSetsResponse (Prelude.Maybe [RegexPatternSetSummary])
listRegexPatternSetsResponse_regexPatternSets :: (Maybe [RegexPatternSetSummary]
 -> f (Maybe [RegexPatternSetSummary]))
-> ListRegexPatternSetsResponse -> f ListRegexPatternSetsResponse
listRegexPatternSetsResponse_regexPatternSets = (ListRegexPatternSetsResponse -> Maybe [RegexPatternSetSummary])
-> (ListRegexPatternSetsResponse
    -> Maybe [RegexPatternSetSummary] -> ListRegexPatternSetsResponse)
-> Lens'
     ListRegexPatternSetsResponse (Maybe [RegexPatternSetSummary])
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) ((Maybe [RegexPatternSetSummary]
  -> f (Maybe [RegexPatternSetSummary]))
 -> ListRegexPatternSetsResponse -> f ListRegexPatternSetsResponse)
-> ((Maybe [RegexPatternSetSummary]
     -> f (Maybe [RegexPatternSetSummary]))
    -> Maybe [RegexPatternSetSummary]
    -> f (Maybe [RegexPatternSetSummary]))
-> (Maybe [RegexPatternSetSummary]
    -> f (Maybe [RegexPatternSetSummary]))
-> ListRegexPatternSetsResponse
-> f ListRegexPatternSetsResponse
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso
  [RegexPatternSetSummary]
  [RegexPatternSetSummary]
  [RegexPatternSetSummary]
  [RegexPatternSetSummary]
-> Iso
     (Maybe [RegexPatternSetSummary])
     (Maybe [RegexPatternSetSummary])
     (Maybe [RegexPatternSetSummary])
     (Maybe [RegexPatternSetSummary])
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
  [RegexPatternSetSummary]
  [RegexPatternSetSummary]
  [RegexPatternSetSummary]
  [RegexPatternSetSummary]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | 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 :: (Maybe Text -> f (Maybe Text))
-> ListRegexPatternSetsResponse -> f ListRegexPatternSetsResponse
listRegexPatternSetsResponse_nextMarker = (ListRegexPatternSetsResponse -> Maybe Text)
-> (ListRegexPatternSetsResponse
    -> Maybe Text -> ListRegexPatternSetsResponse)
-> Lens' ListRegexPatternSetsResponse (Maybe Text)
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)

-- | The response's http status code.
listRegexPatternSetsResponse_httpStatus :: Lens.Lens' ListRegexPatternSetsResponse Prelude.Int
listRegexPatternSetsResponse_httpStatus :: (Int -> f Int)
-> ListRegexPatternSetsResponse -> f ListRegexPatternSetsResponse
listRegexPatternSetsResponse_httpStatus = (ListRegexPatternSetsResponse -> Int)
-> (ListRegexPatternSetsResponse
    -> Int -> ListRegexPatternSetsResponse)
-> Lens
     ListRegexPatternSetsResponse ListRegexPatternSetsResponse Int Int
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