{-# 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.CreateRegexPatternSet
-- 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 @RegexPatternSet@. You then use UpdateRegexPatternSet to
-- specify the regular expression (regex) pattern that you want AWS WAF to
-- search for, such as @B[a\@]dB[o0]t@. You can then configure AWS WAF to
-- reject those requests.
--
-- To create and configure a @RegexPatternSet@, perform the following
-- steps:
--
-- 1.  Use GetChangeToken to get the change token that you provide in the
--     @ChangeToken@ parameter of a @CreateRegexPatternSet@ request.
--
-- 2.  Submit a @CreateRegexPatternSet@ request.
--
-- 3.  Use @GetChangeToken@ to get the change token that you provide in the
--     @ChangeToken@ parameter of an @UpdateRegexPatternSet@ request.
--
-- 4.  Submit an UpdateRegexPatternSet request to specify the string 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.CreateRegexPatternSet
  ( -- * Creating a Request
    CreateRegexPatternSet (..),
    newCreateRegexPatternSet,

    -- * Request Lenses
    createRegexPatternSet_name,
    createRegexPatternSet_changeToken,

    -- * Destructuring the Response
    CreateRegexPatternSetResponse (..),
    newCreateRegexPatternSetResponse,

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

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

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

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

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

instance Prelude.NFData CreateRegexPatternSet

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

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

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

-- |
-- Create a value of 'CreateRegexPatternSetResponse' 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:
--
-- 'regexPatternSet', 'createRegexPatternSetResponse_regexPatternSet' - A RegexPatternSet that contains no objects.
--
-- 'changeToken', 'createRegexPatternSetResponse_changeToken' - The @ChangeToken@ that you used to submit the @CreateRegexPatternSet@
-- request. You can also use this value to query the status of the request.
-- For more information, see GetChangeTokenStatus.
--
-- 'httpStatus', 'createRegexPatternSetResponse_httpStatus' - The response's http status code.
newCreateRegexPatternSetResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  CreateRegexPatternSetResponse
newCreateRegexPatternSetResponse :: Int -> CreateRegexPatternSetResponse
newCreateRegexPatternSetResponse Int
pHttpStatus_ =
  CreateRegexPatternSetResponse' :: Maybe RegexPatternSet
-> Maybe Text -> Int -> CreateRegexPatternSetResponse
CreateRegexPatternSetResponse'
    { $sel:regexPatternSet:CreateRegexPatternSetResponse' :: Maybe RegexPatternSet
regexPatternSet =
        Maybe RegexPatternSet
forall a. Maybe a
Prelude.Nothing,
      $sel:changeToken:CreateRegexPatternSetResponse' :: Maybe Text
changeToken = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:httpStatus:CreateRegexPatternSetResponse' :: Int
httpStatus = Int
pHttpStatus_
    }

-- | A RegexPatternSet that contains no objects.
createRegexPatternSetResponse_regexPatternSet :: Lens.Lens' CreateRegexPatternSetResponse (Prelude.Maybe RegexPatternSet)
createRegexPatternSetResponse_regexPatternSet :: (Maybe RegexPatternSet -> f (Maybe RegexPatternSet))
-> CreateRegexPatternSetResponse -> f CreateRegexPatternSetResponse
createRegexPatternSetResponse_regexPatternSet = (CreateRegexPatternSetResponse -> Maybe RegexPatternSet)
-> (CreateRegexPatternSetResponse
    -> Maybe RegexPatternSet -> CreateRegexPatternSetResponse)
-> Lens
     CreateRegexPatternSetResponse
     CreateRegexPatternSetResponse
     (Maybe RegexPatternSet)
     (Maybe RegexPatternSet)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateRegexPatternSetResponse' {Maybe RegexPatternSet
regexPatternSet :: Maybe RegexPatternSet
$sel:regexPatternSet:CreateRegexPatternSetResponse' :: CreateRegexPatternSetResponse -> Maybe RegexPatternSet
regexPatternSet} -> Maybe RegexPatternSet
regexPatternSet) (\s :: CreateRegexPatternSetResponse
s@CreateRegexPatternSetResponse' {} Maybe RegexPatternSet
a -> CreateRegexPatternSetResponse
s {$sel:regexPatternSet:CreateRegexPatternSetResponse' :: Maybe RegexPatternSet
regexPatternSet = Maybe RegexPatternSet
a} :: CreateRegexPatternSetResponse)

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

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

instance Prelude.NFData CreateRegexPatternSetResponse