{-# 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.WAFRegional.CreateRegexMatchSet
-- 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.
--
-- Creates a RegexMatchSet. You then use UpdateRegexMatchSet to identify
-- the part of a web request that you want AWS WAF to inspect, such as the
-- values of the @User-Agent@ header or the query string. For example, you
-- can create a @RegexMatchSet@ that contains a @RegexMatchTuple@ that
-- looks for any requests with @User-Agent@ headers that match a
-- @RegexPatternSet@ with pattern @B[a\@]dB[o0]t@. You can then configure
-- AWS WAF to reject those requests.
--
-- To create and configure a @RegexMatchSet@, perform the following steps:
--
-- 1.  Use GetChangeToken to get the change token that you provide in the
--     @ChangeToken@ parameter of a @CreateRegexMatchSet@ request.
--
-- 2.  Submit a @CreateRegexMatchSet@ request.
--
-- 3.  Use @GetChangeToken@ to get the change token that you provide in the
--     @ChangeToken@ parameter of an @UpdateRegexMatchSet@ request.
--
-- 4.  Submit an UpdateRegexMatchSet request to specify the part of the
--     request that you want AWS WAF to inspect (for example, the header or
--     the URI) and the value, using a @RegexPatternSet@, that you want AWS
--     WAF to watch for.
--
-- For more information about how to use the AWS WAF API to allow or block
-- HTTP requests, see the
-- <https://docs.aws.amazon.com/waf/latest/developerguide/ AWS WAF Developer Guide>.
module Amazonka.WAFRegional.CreateRegexMatchSet
  ( -- * Creating a Request
    CreateRegexMatchSet (..),
    newCreateRegexMatchSet,

    -- * Request Lenses
    createRegexMatchSet_name,
    createRegexMatchSet_changeToken,

    -- * Destructuring the Response
    CreateRegexMatchSetResponse (..),
    newCreateRegexMatchSetResponse,

    -- * Response Lenses
    createRegexMatchSetResponse_regexMatchSet,
    createRegexMatchSetResponse_changeToken,
    createRegexMatchSetResponse_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.WAFRegional.Types

-- | /See:/ 'newCreateRegexMatchSet' smart constructor.
data CreateRegexMatchSet = CreateRegexMatchSet'
  { -- | A friendly name or description of the RegexMatchSet. You can\'t change
    -- @Name@ after you create a @RegexMatchSet@.
    CreateRegexMatchSet -> Text
name :: Prelude.Text,
    -- | The value returned by the most recent call to GetChangeToken.
    CreateRegexMatchSet -> Text
changeToken :: Prelude.Text
  }
  deriving (CreateRegexMatchSet -> CreateRegexMatchSet -> Bool
(CreateRegexMatchSet -> CreateRegexMatchSet -> Bool)
-> (CreateRegexMatchSet -> CreateRegexMatchSet -> Bool)
-> Eq CreateRegexMatchSet
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: CreateRegexMatchSet -> CreateRegexMatchSet -> Bool
$c/= :: CreateRegexMatchSet -> CreateRegexMatchSet -> Bool
== :: CreateRegexMatchSet -> CreateRegexMatchSet -> Bool
$c== :: CreateRegexMatchSet -> CreateRegexMatchSet -> Bool
Prelude.Eq, ReadPrec [CreateRegexMatchSet]
ReadPrec CreateRegexMatchSet
Int -> ReadS CreateRegexMatchSet
ReadS [CreateRegexMatchSet]
(Int -> ReadS CreateRegexMatchSet)
-> ReadS [CreateRegexMatchSet]
-> ReadPrec CreateRegexMatchSet
-> ReadPrec [CreateRegexMatchSet]
-> Read CreateRegexMatchSet
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [CreateRegexMatchSet]
$creadListPrec :: ReadPrec [CreateRegexMatchSet]
readPrec :: ReadPrec CreateRegexMatchSet
$creadPrec :: ReadPrec CreateRegexMatchSet
readList :: ReadS [CreateRegexMatchSet]
$creadList :: ReadS [CreateRegexMatchSet]
readsPrec :: Int -> ReadS CreateRegexMatchSet
$creadsPrec :: Int -> ReadS CreateRegexMatchSet
Prelude.Read, Int -> CreateRegexMatchSet -> ShowS
[CreateRegexMatchSet] -> ShowS
CreateRegexMatchSet -> String
(Int -> CreateRegexMatchSet -> ShowS)
-> (CreateRegexMatchSet -> String)
-> ([CreateRegexMatchSet] -> ShowS)
-> Show CreateRegexMatchSet
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [CreateRegexMatchSet] -> ShowS
$cshowList :: [CreateRegexMatchSet] -> ShowS
show :: CreateRegexMatchSet -> String
$cshow :: CreateRegexMatchSet -> String
showsPrec :: Int -> CreateRegexMatchSet -> ShowS
$cshowsPrec :: Int -> CreateRegexMatchSet -> ShowS
Prelude.Show, (forall x. CreateRegexMatchSet -> Rep CreateRegexMatchSet x)
-> (forall x. Rep CreateRegexMatchSet x -> CreateRegexMatchSet)
-> Generic CreateRegexMatchSet
forall x. Rep CreateRegexMatchSet x -> CreateRegexMatchSet
forall x. CreateRegexMatchSet -> Rep CreateRegexMatchSet x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep CreateRegexMatchSet x -> CreateRegexMatchSet
$cfrom :: forall x. CreateRegexMatchSet -> Rep CreateRegexMatchSet x
Prelude.Generic)

-- |
-- Create a value of 'CreateRegexMatchSet' 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:
--
-- 'name', 'createRegexMatchSet_name' - A friendly name or description of the RegexMatchSet. You can\'t change
-- @Name@ after you create a @RegexMatchSet@.
--
-- 'changeToken', 'createRegexMatchSet_changeToken' - The value returned by the most recent call to GetChangeToken.
newCreateRegexMatchSet ::
  -- | 'name'
  Prelude.Text ->
  -- | 'changeToken'
  Prelude.Text ->
  CreateRegexMatchSet
newCreateRegexMatchSet :: Text -> Text -> CreateRegexMatchSet
newCreateRegexMatchSet Text
pName_ Text
pChangeToken_ =
  CreateRegexMatchSet' :: Text -> Text -> CreateRegexMatchSet
CreateRegexMatchSet'
    { $sel:name:CreateRegexMatchSet' :: Text
name = Text
pName_,
      $sel:changeToken:CreateRegexMatchSet' :: Text
changeToken = Text
pChangeToken_
    }

-- | A friendly name or description of the RegexMatchSet. You can\'t change
-- @Name@ after you create a @RegexMatchSet@.
createRegexMatchSet_name :: Lens.Lens' CreateRegexMatchSet Prelude.Text
createRegexMatchSet_name :: (Text -> f Text) -> CreateRegexMatchSet -> f CreateRegexMatchSet
createRegexMatchSet_name = (CreateRegexMatchSet -> Text)
-> (CreateRegexMatchSet -> Text -> CreateRegexMatchSet)
-> Lens CreateRegexMatchSet CreateRegexMatchSet Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateRegexMatchSet' {Text
name :: Text
$sel:name:CreateRegexMatchSet' :: CreateRegexMatchSet -> Text
name} -> Text
name) (\s :: CreateRegexMatchSet
s@CreateRegexMatchSet' {} Text
a -> CreateRegexMatchSet
s {$sel:name:CreateRegexMatchSet' :: Text
name = Text
a} :: CreateRegexMatchSet)

-- | The value returned by the most recent call to GetChangeToken.
createRegexMatchSet_changeToken :: Lens.Lens' CreateRegexMatchSet Prelude.Text
createRegexMatchSet_changeToken :: (Text -> f Text) -> CreateRegexMatchSet -> f CreateRegexMatchSet
createRegexMatchSet_changeToken = (CreateRegexMatchSet -> Text)
-> (CreateRegexMatchSet -> Text -> CreateRegexMatchSet)
-> Lens CreateRegexMatchSet CreateRegexMatchSet Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateRegexMatchSet' {Text
changeToken :: Text
$sel:changeToken:CreateRegexMatchSet' :: CreateRegexMatchSet -> Text
changeToken} -> Text
changeToken) (\s :: CreateRegexMatchSet
s@CreateRegexMatchSet' {} Text
a -> CreateRegexMatchSet
s {$sel:changeToken:CreateRegexMatchSet' :: Text
changeToken = Text
a} :: CreateRegexMatchSet)

instance Core.AWSRequest CreateRegexMatchSet where
  type
    AWSResponse CreateRegexMatchSet =
      CreateRegexMatchSetResponse
  request :: CreateRegexMatchSet -> Request CreateRegexMatchSet
request = Service -> CreateRegexMatchSet -> Request CreateRegexMatchSet
forall a. (ToRequest a, ToJSON a) => Service -> a -> Request a
Request.postJSON Service
defaultService
  response :: Logger
-> Service
-> Proxy CreateRegexMatchSet
-> ClientResponse ClientBody
-> m (Either
        Error (ClientResponse (AWSResponse CreateRegexMatchSet)))
response =
    (Int
 -> ResponseHeaders
 -> Object
 -> Either String (AWSResponse CreateRegexMatchSet))
-> Logger
-> Service
-> Proxy CreateRegexMatchSet
-> ClientResponse ClientBody
-> m (Either
        Error (ClientResponse (AWSResponse CreateRegexMatchSet)))
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 RegexMatchSet
-> Maybe Text -> Int -> CreateRegexMatchSetResponse
CreateRegexMatchSetResponse'
            (Maybe RegexMatchSet
 -> Maybe Text -> Int -> CreateRegexMatchSetResponse)
-> Either String (Maybe RegexMatchSet)
-> Either String (Maybe Text -> Int -> CreateRegexMatchSetResponse)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Either String (Maybe RegexMatchSet)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"RegexMatchSet")
            Either String (Maybe Text -> Int -> CreateRegexMatchSetResponse)
-> Either String (Maybe Text)
-> Either String (Int -> CreateRegexMatchSetResponse)
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
"ChangeToken")
            Either String (Int -> CreateRegexMatchSetResponse)
-> Either String Int -> Either String CreateRegexMatchSetResponse
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 CreateRegexMatchSet

instance Prelude.NFData CreateRegexMatchSet

instance Core.ToHeaders CreateRegexMatchSet where
  toHeaders :: CreateRegexMatchSet -> ResponseHeaders
toHeaders =
    ResponseHeaders -> CreateRegexMatchSet -> 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_Regional_20161128.CreateRegexMatchSet" ::
                          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 CreateRegexMatchSet where
  toJSON :: CreateRegexMatchSet -> Value
toJSON CreateRegexMatchSet' {Text
changeToken :: Text
name :: Text
$sel:changeToken:CreateRegexMatchSet' :: CreateRegexMatchSet -> Text
$sel:name:CreateRegexMatchSet' :: CreateRegexMatchSet -> Text
..} =
    [Pair] -> Value
Core.object
      ( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
          [ Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just (Text
"Name" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Text
name),
            Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just (Text
"ChangeToken" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Text
changeToken)
          ]
      )

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

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

-- | /See:/ 'newCreateRegexMatchSetResponse' smart constructor.
data CreateRegexMatchSetResponse = CreateRegexMatchSetResponse'
  { -- | A RegexMatchSet that contains no @RegexMatchTuple@ objects.
    CreateRegexMatchSetResponse -> Maybe RegexMatchSet
regexMatchSet :: Prelude.Maybe RegexMatchSet,
    -- | The @ChangeToken@ that you used to submit the @CreateRegexMatchSet@
    -- request. You can also use this value to query the status of the request.
    -- For more information, see GetChangeTokenStatus.
    CreateRegexMatchSetResponse -> Maybe Text
changeToken :: Prelude.Maybe Prelude.Text,
    -- | The response's http status code.
    CreateRegexMatchSetResponse -> Int
httpStatus :: Prelude.Int
  }
  deriving (CreateRegexMatchSetResponse -> CreateRegexMatchSetResponse -> Bool
(CreateRegexMatchSetResponse
 -> CreateRegexMatchSetResponse -> Bool)
-> (CreateRegexMatchSetResponse
    -> CreateRegexMatchSetResponse -> Bool)
-> Eq CreateRegexMatchSetResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: CreateRegexMatchSetResponse -> CreateRegexMatchSetResponse -> Bool
$c/= :: CreateRegexMatchSetResponse -> CreateRegexMatchSetResponse -> Bool
== :: CreateRegexMatchSetResponse -> CreateRegexMatchSetResponse -> Bool
$c== :: CreateRegexMatchSetResponse -> CreateRegexMatchSetResponse -> Bool
Prelude.Eq, ReadPrec [CreateRegexMatchSetResponse]
ReadPrec CreateRegexMatchSetResponse
Int -> ReadS CreateRegexMatchSetResponse
ReadS [CreateRegexMatchSetResponse]
(Int -> ReadS CreateRegexMatchSetResponse)
-> ReadS [CreateRegexMatchSetResponse]
-> ReadPrec CreateRegexMatchSetResponse
-> ReadPrec [CreateRegexMatchSetResponse]
-> Read CreateRegexMatchSetResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [CreateRegexMatchSetResponse]
$creadListPrec :: ReadPrec [CreateRegexMatchSetResponse]
readPrec :: ReadPrec CreateRegexMatchSetResponse
$creadPrec :: ReadPrec CreateRegexMatchSetResponse
readList :: ReadS [CreateRegexMatchSetResponse]
$creadList :: ReadS [CreateRegexMatchSetResponse]
readsPrec :: Int -> ReadS CreateRegexMatchSetResponse
$creadsPrec :: Int -> ReadS CreateRegexMatchSetResponse
Prelude.Read, Int -> CreateRegexMatchSetResponse -> ShowS
[CreateRegexMatchSetResponse] -> ShowS
CreateRegexMatchSetResponse -> String
(Int -> CreateRegexMatchSetResponse -> ShowS)
-> (CreateRegexMatchSetResponse -> String)
-> ([CreateRegexMatchSetResponse] -> ShowS)
-> Show CreateRegexMatchSetResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [CreateRegexMatchSetResponse] -> ShowS
$cshowList :: [CreateRegexMatchSetResponse] -> ShowS
show :: CreateRegexMatchSetResponse -> String
$cshow :: CreateRegexMatchSetResponse -> String
showsPrec :: Int -> CreateRegexMatchSetResponse -> ShowS
$cshowsPrec :: Int -> CreateRegexMatchSetResponse -> ShowS
Prelude.Show, (forall x.
 CreateRegexMatchSetResponse -> Rep CreateRegexMatchSetResponse x)
-> (forall x.
    Rep CreateRegexMatchSetResponse x -> CreateRegexMatchSetResponse)
-> Generic CreateRegexMatchSetResponse
forall x.
Rep CreateRegexMatchSetResponse x -> CreateRegexMatchSetResponse
forall x.
CreateRegexMatchSetResponse -> Rep CreateRegexMatchSetResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep CreateRegexMatchSetResponse x -> CreateRegexMatchSetResponse
$cfrom :: forall x.
CreateRegexMatchSetResponse -> Rep CreateRegexMatchSetResponse x
Prelude.Generic)

-- |
-- Create a value of 'CreateRegexMatchSetResponse' 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:
--
-- 'regexMatchSet', 'createRegexMatchSetResponse_regexMatchSet' - A RegexMatchSet that contains no @RegexMatchTuple@ objects.
--
-- 'changeToken', 'createRegexMatchSetResponse_changeToken' - The @ChangeToken@ that you used to submit the @CreateRegexMatchSet@
-- request. You can also use this value to query the status of the request.
-- For more information, see GetChangeTokenStatus.
--
-- 'httpStatus', 'createRegexMatchSetResponse_httpStatus' - The response's http status code.
newCreateRegexMatchSetResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  CreateRegexMatchSetResponse
newCreateRegexMatchSetResponse :: Int -> CreateRegexMatchSetResponse
newCreateRegexMatchSetResponse Int
pHttpStatus_ =
  CreateRegexMatchSetResponse' :: Maybe RegexMatchSet
-> Maybe Text -> Int -> CreateRegexMatchSetResponse
CreateRegexMatchSetResponse'
    { $sel:regexMatchSet:CreateRegexMatchSetResponse' :: Maybe RegexMatchSet
regexMatchSet =
        Maybe RegexMatchSet
forall a. Maybe a
Prelude.Nothing,
      $sel:changeToken:CreateRegexMatchSetResponse' :: Maybe Text
changeToken = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:httpStatus:CreateRegexMatchSetResponse' :: Int
httpStatus = Int
pHttpStatus_
    }

-- | A RegexMatchSet that contains no @RegexMatchTuple@ objects.
createRegexMatchSetResponse_regexMatchSet :: Lens.Lens' CreateRegexMatchSetResponse (Prelude.Maybe RegexMatchSet)
createRegexMatchSetResponse_regexMatchSet :: (Maybe RegexMatchSet -> f (Maybe RegexMatchSet))
-> CreateRegexMatchSetResponse -> f CreateRegexMatchSetResponse
createRegexMatchSetResponse_regexMatchSet = (CreateRegexMatchSetResponse -> Maybe RegexMatchSet)
-> (CreateRegexMatchSetResponse
    -> Maybe RegexMatchSet -> CreateRegexMatchSetResponse)
-> Lens
     CreateRegexMatchSetResponse
     CreateRegexMatchSetResponse
     (Maybe RegexMatchSet)
     (Maybe RegexMatchSet)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateRegexMatchSetResponse' {Maybe RegexMatchSet
regexMatchSet :: Maybe RegexMatchSet
$sel:regexMatchSet:CreateRegexMatchSetResponse' :: CreateRegexMatchSetResponse -> Maybe RegexMatchSet
regexMatchSet} -> Maybe RegexMatchSet
regexMatchSet) (\s :: CreateRegexMatchSetResponse
s@CreateRegexMatchSetResponse' {} Maybe RegexMatchSet
a -> CreateRegexMatchSetResponse
s {$sel:regexMatchSet:CreateRegexMatchSetResponse' :: Maybe RegexMatchSet
regexMatchSet = Maybe RegexMatchSet
a} :: CreateRegexMatchSetResponse)

-- | The @ChangeToken@ that you used to submit the @CreateRegexMatchSet@
-- request. You can also use this value to query the status of the request.
-- For more information, see GetChangeTokenStatus.
createRegexMatchSetResponse_changeToken :: Lens.Lens' CreateRegexMatchSetResponse (Prelude.Maybe Prelude.Text)
createRegexMatchSetResponse_changeToken :: (Maybe Text -> f (Maybe Text))
-> CreateRegexMatchSetResponse -> f CreateRegexMatchSetResponse
createRegexMatchSetResponse_changeToken = (CreateRegexMatchSetResponse -> Maybe Text)
-> (CreateRegexMatchSetResponse
    -> Maybe Text -> CreateRegexMatchSetResponse)
-> Lens
     CreateRegexMatchSetResponse
     CreateRegexMatchSetResponse
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateRegexMatchSetResponse' {Maybe Text
changeToken :: Maybe Text
$sel:changeToken:CreateRegexMatchSetResponse' :: CreateRegexMatchSetResponse -> Maybe Text
changeToken} -> Maybe Text
changeToken) (\s :: CreateRegexMatchSetResponse
s@CreateRegexMatchSetResponse' {} Maybe Text
a -> CreateRegexMatchSetResponse
s {$sel:changeToken:CreateRegexMatchSetResponse' :: Maybe Text
changeToken = Maybe Text
a} :: CreateRegexMatchSetResponse)

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

instance Prelude.NFData CreateRegexMatchSetResponse