{-# 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.UpdateGeoMatchSet
-- Copyright   : (c) 2013-2023 Brendan Hay
-- License     : Mozilla Public License, v. 2.0.
-- Maintainer  : Brendan Hay
-- 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.
--
-- Inserts or deletes GeoMatchConstraint objects in an @GeoMatchSet@. For
-- each @GeoMatchConstraint@ object, you specify the following values:
--
-- -   Whether to insert or delete the object from the array. If you want
--     to change an @GeoMatchConstraint@ object, you delete the existing
--     object and add a new one.
--
-- -   The @Type@. The only valid value for @Type@ is @Country@.
--
-- -   The @Value@, which is a two character code for the country to add to
--     the @GeoMatchConstraint@ object. Valid codes are listed in
--     GeoMatchConstraint$Value.
--
-- To create and configure an @GeoMatchSet@, perform the following steps:
--
-- 1.  Submit a CreateGeoMatchSet request.
--
-- 2.  Use GetChangeToken to get the change token that you provide in the
--     @ChangeToken@ parameter of an UpdateGeoMatchSet request.
--
-- 3.  Submit an @UpdateGeoMatchSet@ request to specify the country that
--     you want AWS WAF to watch for.
--
-- When you update an @GeoMatchSet@, you specify the country that you want
-- to add and\/or the country that you want to delete. If you want to
-- change a country, you delete the existing country and add the new one.
--
-- 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.WAF.UpdateGeoMatchSet
  ( -- * Creating a Request
    UpdateGeoMatchSet (..),
    newUpdateGeoMatchSet,

    -- * Request Lenses
    updateGeoMatchSet_geoMatchSetId,
    updateGeoMatchSet_changeToken,
    updateGeoMatchSet_updates,

    -- * Destructuring the Response
    UpdateGeoMatchSetResponse (..),
    newUpdateGeoMatchSetResponse,

    -- * Response Lenses
    updateGeoMatchSetResponse_changeToken,
    updateGeoMatchSetResponse_httpStatus,
  )
where

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

-- | /See:/ 'newUpdateGeoMatchSet' smart constructor.
data UpdateGeoMatchSet = UpdateGeoMatchSet'
  { -- | The @GeoMatchSetId@ of the GeoMatchSet that you want to update.
    -- @GeoMatchSetId@ is returned by CreateGeoMatchSet and by
    -- ListGeoMatchSets.
    UpdateGeoMatchSet -> Text
geoMatchSetId :: Prelude.Text,
    -- | The value returned by the most recent call to GetChangeToken.
    UpdateGeoMatchSet -> Text
changeToken :: Prelude.Text,
    -- | An array of @GeoMatchSetUpdate@ objects that you want to insert into or
    -- delete from an GeoMatchSet. For more information, see the applicable
    -- data types:
    --
    -- -   GeoMatchSetUpdate: Contains @Action@ and @GeoMatchConstraint@
    --
    -- -   GeoMatchConstraint: Contains @Type@ and @Value@
    --
    --     You can have only one @Type@ and @Value@ per @GeoMatchConstraint@.
    --     To add multiple countries, include multiple @GeoMatchSetUpdate@
    --     objects in your request.
    UpdateGeoMatchSet -> NonEmpty GeoMatchSetUpdate
updates :: Prelude.NonEmpty GeoMatchSetUpdate
  }
  deriving (UpdateGeoMatchSet -> UpdateGeoMatchSet -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: UpdateGeoMatchSet -> UpdateGeoMatchSet -> Bool
$c/= :: UpdateGeoMatchSet -> UpdateGeoMatchSet -> Bool
== :: UpdateGeoMatchSet -> UpdateGeoMatchSet -> Bool
$c== :: UpdateGeoMatchSet -> UpdateGeoMatchSet -> Bool
Prelude.Eq, ReadPrec [UpdateGeoMatchSet]
ReadPrec UpdateGeoMatchSet
Int -> ReadS UpdateGeoMatchSet
ReadS [UpdateGeoMatchSet]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [UpdateGeoMatchSet]
$creadListPrec :: ReadPrec [UpdateGeoMatchSet]
readPrec :: ReadPrec UpdateGeoMatchSet
$creadPrec :: ReadPrec UpdateGeoMatchSet
readList :: ReadS [UpdateGeoMatchSet]
$creadList :: ReadS [UpdateGeoMatchSet]
readsPrec :: Int -> ReadS UpdateGeoMatchSet
$creadsPrec :: Int -> ReadS UpdateGeoMatchSet
Prelude.Read, Int -> UpdateGeoMatchSet -> ShowS
[UpdateGeoMatchSet] -> ShowS
UpdateGeoMatchSet -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [UpdateGeoMatchSet] -> ShowS
$cshowList :: [UpdateGeoMatchSet] -> ShowS
show :: UpdateGeoMatchSet -> String
$cshow :: UpdateGeoMatchSet -> String
showsPrec :: Int -> UpdateGeoMatchSet -> ShowS
$cshowsPrec :: Int -> UpdateGeoMatchSet -> ShowS
Prelude.Show, forall x. Rep UpdateGeoMatchSet x -> UpdateGeoMatchSet
forall x. UpdateGeoMatchSet -> Rep UpdateGeoMatchSet x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep UpdateGeoMatchSet x -> UpdateGeoMatchSet
$cfrom :: forall x. UpdateGeoMatchSet -> Rep UpdateGeoMatchSet x
Prelude.Generic)

-- |
-- Create a value of 'UpdateGeoMatchSet' 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:
--
-- 'geoMatchSetId', 'updateGeoMatchSet_geoMatchSetId' - The @GeoMatchSetId@ of the GeoMatchSet that you want to update.
-- @GeoMatchSetId@ is returned by CreateGeoMatchSet and by
-- ListGeoMatchSets.
--
-- 'changeToken', 'updateGeoMatchSet_changeToken' - The value returned by the most recent call to GetChangeToken.
--
-- 'updates', 'updateGeoMatchSet_updates' - An array of @GeoMatchSetUpdate@ objects that you want to insert into or
-- delete from an GeoMatchSet. For more information, see the applicable
-- data types:
--
-- -   GeoMatchSetUpdate: Contains @Action@ and @GeoMatchConstraint@
--
-- -   GeoMatchConstraint: Contains @Type@ and @Value@
--
--     You can have only one @Type@ and @Value@ per @GeoMatchConstraint@.
--     To add multiple countries, include multiple @GeoMatchSetUpdate@
--     objects in your request.
newUpdateGeoMatchSet ::
  -- | 'geoMatchSetId'
  Prelude.Text ->
  -- | 'changeToken'
  Prelude.Text ->
  -- | 'updates'
  Prelude.NonEmpty GeoMatchSetUpdate ->
  UpdateGeoMatchSet
newUpdateGeoMatchSet :: Text -> Text -> NonEmpty GeoMatchSetUpdate -> UpdateGeoMatchSet
newUpdateGeoMatchSet
  Text
pGeoMatchSetId_
  Text
pChangeToken_
  NonEmpty GeoMatchSetUpdate
pUpdates_ =
    UpdateGeoMatchSet'
      { $sel:geoMatchSetId:UpdateGeoMatchSet' :: Text
geoMatchSetId = Text
pGeoMatchSetId_,
        $sel:changeToken:UpdateGeoMatchSet' :: Text
changeToken = Text
pChangeToken_,
        $sel:updates:UpdateGeoMatchSet' :: NonEmpty GeoMatchSetUpdate
updates = forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced forall t b. AReview t b -> b -> t
Lens.# NonEmpty GeoMatchSetUpdate
pUpdates_
      }

-- | The @GeoMatchSetId@ of the GeoMatchSet that you want to update.
-- @GeoMatchSetId@ is returned by CreateGeoMatchSet and by
-- ListGeoMatchSets.
updateGeoMatchSet_geoMatchSetId :: Lens.Lens' UpdateGeoMatchSet Prelude.Text
updateGeoMatchSet_geoMatchSetId :: Lens' UpdateGeoMatchSet Text
updateGeoMatchSet_geoMatchSetId = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateGeoMatchSet' {Text
geoMatchSetId :: Text
$sel:geoMatchSetId:UpdateGeoMatchSet' :: UpdateGeoMatchSet -> Text
geoMatchSetId} -> Text
geoMatchSetId) (\s :: UpdateGeoMatchSet
s@UpdateGeoMatchSet' {} Text
a -> UpdateGeoMatchSet
s {$sel:geoMatchSetId:UpdateGeoMatchSet' :: Text
geoMatchSetId = Text
a} :: UpdateGeoMatchSet)

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

-- | An array of @GeoMatchSetUpdate@ objects that you want to insert into or
-- delete from an GeoMatchSet. For more information, see the applicable
-- data types:
--
-- -   GeoMatchSetUpdate: Contains @Action@ and @GeoMatchConstraint@
--
-- -   GeoMatchConstraint: Contains @Type@ and @Value@
--
--     You can have only one @Type@ and @Value@ per @GeoMatchConstraint@.
--     To add multiple countries, include multiple @GeoMatchSetUpdate@
--     objects in your request.
updateGeoMatchSet_updates :: Lens.Lens' UpdateGeoMatchSet (Prelude.NonEmpty GeoMatchSetUpdate)
updateGeoMatchSet_updates :: Lens' UpdateGeoMatchSet (NonEmpty GeoMatchSetUpdate)
updateGeoMatchSet_updates = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateGeoMatchSet' {NonEmpty GeoMatchSetUpdate
updates :: NonEmpty GeoMatchSetUpdate
$sel:updates:UpdateGeoMatchSet' :: UpdateGeoMatchSet -> NonEmpty GeoMatchSetUpdate
updates} -> NonEmpty GeoMatchSetUpdate
updates) (\s :: UpdateGeoMatchSet
s@UpdateGeoMatchSet' {} NonEmpty GeoMatchSetUpdate
a -> UpdateGeoMatchSet
s {$sel:updates:UpdateGeoMatchSet' :: NonEmpty GeoMatchSetUpdate
updates = NonEmpty GeoMatchSetUpdate
a} :: UpdateGeoMatchSet) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

instance Core.AWSRequest UpdateGeoMatchSet where
  type
    AWSResponse UpdateGeoMatchSet =
      UpdateGeoMatchSetResponse
  request :: (Service -> Service)
-> UpdateGeoMatchSet -> Request UpdateGeoMatchSet
request Service -> Service
overrides =
    forall a. (ToRequest a, ToJSON a) => Service -> a -> Request a
Request.postJSON (Service -> Service
overrides Service
defaultService)
  response :: forall (m :: * -> *).
MonadResource m =>
(ByteStringLazy -> IO ByteStringLazy)
-> Service
-> Proxy UpdateGeoMatchSet
-> ClientResponse ClientBody
-> m (Either
        Error (ClientResponse (AWSResponse UpdateGeoMatchSet)))
response =
    forall (m :: * -> *) a.
MonadResource m =>
(Int -> ResponseHeaders -> Object -> Either String (AWSResponse a))
-> (ByteStringLazy -> IO ByteStringLazy)
-> Service
-> Proxy a
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse a)))
Response.receiveJSON
      ( \Int
s ResponseHeaders
h Object
x ->
          Maybe Text -> Int -> UpdateGeoMatchSetResponse
UpdateGeoMatchSetResponse'
            forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x forall a. FromJSON a => Object -> Key -> Either String (Maybe a)
Data..?> Key
"ChangeToken")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure (forall a. Enum a => a -> Int
Prelude.fromEnum Int
s))
      )

instance Prelude.Hashable UpdateGeoMatchSet where
  hashWithSalt :: Int -> UpdateGeoMatchSet -> Int
hashWithSalt Int
_salt UpdateGeoMatchSet' {NonEmpty GeoMatchSetUpdate
Text
updates :: NonEmpty GeoMatchSetUpdate
changeToken :: Text
geoMatchSetId :: Text
$sel:updates:UpdateGeoMatchSet' :: UpdateGeoMatchSet -> NonEmpty GeoMatchSetUpdate
$sel:changeToken:UpdateGeoMatchSet' :: UpdateGeoMatchSet -> Text
$sel:geoMatchSetId:UpdateGeoMatchSet' :: UpdateGeoMatchSet -> Text
..} =
    Int
_salt
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
geoMatchSetId
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
changeToken
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` NonEmpty GeoMatchSetUpdate
updates

instance Prelude.NFData UpdateGeoMatchSet where
  rnf :: UpdateGeoMatchSet -> ()
rnf UpdateGeoMatchSet' {NonEmpty GeoMatchSetUpdate
Text
updates :: NonEmpty GeoMatchSetUpdate
changeToken :: Text
geoMatchSetId :: Text
$sel:updates:UpdateGeoMatchSet' :: UpdateGeoMatchSet -> NonEmpty GeoMatchSetUpdate
$sel:changeToken:UpdateGeoMatchSet' :: UpdateGeoMatchSet -> Text
$sel:geoMatchSetId:UpdateGeoMatchSet' :: UpdateGeoMatchSet -> Text
..} =
    forall a. NFData a => a -> ()
Prelude.rnf Text
geoMatchSetId
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Text
changeToken
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf NonEmpty GeoMatchSetUpdate
updates

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

instance Data.ToJSON UpdateGeoMatchSet where
  toJSON :: UpdateGeoMatchSet -> Value
toJSON UpdateGeoMatchSet' {NonEmpty GeoMatchSetUpdate
Text
updates :: NonEmpty GeoMatchSetUpdate
changeToken :: Text
geoMatchSetId :: Text
$sel:updates:UpdateGeoMatchSet' :: UpdateGeoMatchSet -> NonEmpty GeoMatchSetUpdate
$sel:changeToken:UpdateGeoMatchSet' :: UpdateGeoMatchSet -> Text
$sel:geoMatchSetId:UpdateGeoMatchSet' :: UpdateGeoMatchSet -> Text
..} =
    [Pair] -> Value
Data.object
      ( forall a. [Maybe a] -> [a]
Prelude.catMaybes
          [ forall a. a -> Maybe a
Prelude.Just
              (Key
"GeoMatchSetId" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..= Text
geoMatchSetId),
            forall a. a -> Maybe a
Prelude.Just (Key
"ChangeToken" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..= Text
changeToken),
            forall a. a -> Maybe a
Prelude.Just (Key
"Updates" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..= NonEmpty GeoMatchSetUpdate
updates)
          ]
      )

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

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

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

-- |
-- Create a value of 'UpdateGeoMatchSetResponse' 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:
--
-- 'changeToken', 'updateGeoMatchSetResponse_changeToken' - The @ChangeToken@ that you used to submit the @UpdateGeoMatchSet@
-- request. You can also use this value to query the status of the request.
-- For more information, see GetChangeTokenStatus.
--
-- 'httpStatus', 'updateGeoMatchSetResponse_httpStatus' - The response's http status code.
newUpdateGeoMatchSetResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  UpdateGeoMatchSetResponse
newUpdateGeoMatchSetResponse :: Int -> UpdateGeoMatchSetResponse
newUpdateGeoMatchSetResponse Int
pHttpStatus_ =
  UpdateGeoMatchSetResponse'
    { $sel:changeToken:UpdateGeoMatchSetResponse' :: Maybe Text
changeToken =
        forall a. Maybe a
Prelude.Nothing,
      $sel:httpStatus:UpdateGeoMatchSetResponse' :: Int
httpStatus = Int
pHttpStatus_
    }

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

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

instance Prelude.NFData UpdateGeoMatchSetResponse where
  rnf :: UpdateGeoMatchSetResponse -> ()
rnf UpdateGeoMatchSetResponse' {Int
Maybe Text
httpStatus :: Int
changeToken :: Maybe Text
$sel:httpStatus:UpdateGeoMatchSetResponse' :: UpdateGeoMatchSetResponse -> Int
$sel:changeToken:UpdateGeoMatchSetResponse' :: UpdateGeoMatchSetResponse -> Maybe Text
..} =
    forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
changeToken
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Int
httpStatus