{-# 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.CreateGeoMatchSet
-- 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 an GeoMatchSet, which you use to specify which web requests you
-- want to allow or block based on the country that the requests originate
-- from. For example, if you\'re receiving a lot of requests from one or
-- more countries and you want to block the requests, you can create an
-- @GeoMatchSet@ that contains those countries and then configure AWS WAF
-- to block the requests.
--
-- To create and configure a @GeoMatchSet@, perform the following steps:
--
-- 1.  Use GetChangeToken to get the change token that you provide in the
--     @ChangeToken@ parameter of a @CreateGeoMatchSet@ request.
--
-- 2.  Submit a @CreateGeoMatchSet@ request.
--
-- 3.  Use @GetChangeToken@ to get the change token that you provide in the
--     @ChangeToken@ parameter of an UpdateGeoMatchSet request.
--
-- 4.  Submit an @UpdateGeoMatchSetSet@ request to specify the countries
--     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.CreateGeoMatchSet
  ( -- * Creating a Request
    CreateGeoMatchSet (..),
    newCreateGeoMatchSet,

    -- * Request Lenses
    createGeoMatchSet_name,
    createGeoMatchSet_changeToken,

    -- * Destructuring the Response
    CreateGeoMatchSetResponse (..),
    newCreateGeoMatchSetResponse,

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

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

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

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

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

instance Prelude.NFData CreateGeoMatchSet

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

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

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

-- |
-- Create a value of 'CreateGeoMatchSetResponse' 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:
--
-- 'geoMatchSet', 'createGeoMatchSetResponse_geoMatchSet' - The GeoMatchSet returned in the @CreateGeoMatchSet@ response. The
-- @GeoMatchSet@ contains no @GeoMatchConstraints@.
--
-- 'changeToken', 'createGeoMatchSetResponse_changeToken' - The @ChangeToken@ that you used to submit the @CreateGeoMatchSet@
-- request. You can also use this value to query the status of the request.
-- For more information, see GetChangeTokenStatus.
--
-- 'httpStatus', 'createGeoMatchSetResponse_httpStatus' - The response's http status code.
newCreateGeoMatchSetResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  CreateGeoMatchSetResponse
newCreateGeoMatchSetResponse :: Int -> CreateGeoMatchSetResponse
newCreateGeoMatchSetResponse Int
pHttpStatus_ =
  CreateGeoMatchSetResponse' :: Maybe GeoMatchSet -> Maybe Text -> Int -> CreateGeoMatchSetResponse
CreateGeoMatchSetResponse'
    { $sel:geoMatchSet:CreateGeoMatchSetResponse' :: Maybe GeoMatchSet
geoMatchSet =
        Maybe GeoMatchSet
forall a. Maybe a
Prelude.Nothing,
      $sel:changeToken:CreateGeoMatchSetResponse' :: Maybe Text
changeToken = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:httpStatus:CreateGeoMatchSetResponse' :: Int
httpStatus = Int
pHttpStatus_
    }

-- | The GeoMatchSet returned in the @CreateGeoMatchSet@ response. The
-- @GeoMatchSet@ contains no @GeoMatchConstraints@.
createGeoMatchSetResponse_geoMatchSet :: Lens.Lens' CreateGeoMatchSetResponse (Prelude.Maybe GeoMatchSet)
createGeoMatchSetResponse_geoMatchSet :: (Maybe GeoMatchSet -> f (Maybe GeoMatchSet))
-> CreateGeoMatchSetResponse -> f CreateGeoMatchSetResponse
createGeoMatchSetResponse_geoMatchSet = (CreateGeoMatchSetResponse -> Maybe GeoMatchSet)
-> (CreateGeoMatchSetResponse
    -> Maybe GeoMatchSet -> CreateGeoMatchSetResponse)
-> Lens
     CreateGeoMatchSetResponse
     CreateGeoMatchSetResponse
     (Maybe GeoMatchSet)
     (Maybe GeoMatchSet)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateGeoMatchSetResponse' {Maybe GeoMatchSet
geoMatchSet :: Maybe GeoMatchSet
$sel:geoMatchSet:CreateGeoMatchSetResponse' :: CreateGeoMatchSetResponse -> Maybe GeoMatchSet
geoMatchSet} -> Maybe GeoMatchSet
geoMatchSet) (\s :: CreateGeoMatchSetResponse
s@CreateGeoMatchSetResponse' {} Maybe GeoMatchSet
a -> CreateGeoMatchSetResponse
s {$sel:geoMatchSet:CreateGeoMatchSetResponse' :: Maybe GeoMatchSet
geoMatchSet = Maybe GeoMatchSet
a} :: CreateGeoMatchSetResponse)

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

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

instance Prelude.NFData CreateGeoMatchSetResponse