{-# 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.UpdateByteMatchSet
-- 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 ByteMatchTuple objects (filters) in a ByteMatchSet.
-- For each @ByteMatchTuple@ object, you specify the following values:
--
-- -   Whether to insert or delete the object from the array. If you want
--     to change a @ByteMatchSetUpdate@ object, you delete the existing
--     object and add a new one.
--
-- -   The part of a web request that you want AWS WAF to inspect, such as
--     a query string or the value of the @User-Agent@ header.
--
-- -   The bytes (typically a string that corresponds with ASCII
--     characters) that you want AWS WAF to look for. For more information,
--     including how you specify the values for the AWS WAF API and the AWS
--     CLI or SDKs, see @TargetString@ in the ByteMatchTuple data type.
--
-- -   Where to look, such as at the beginning or the end of a query
--     string.
--
-- -   Whether to perform any conversions on the request, such as
--     converting it to lowercase, before inspecting it for the specified
--     string.
--
-- For example, you can add a @ByteMatchSetUpdate@ object that matches web
-- requests in which @User-Agent@ headers contain the string @BadBot@. You
-- can then configure AWS WAF to block those requests.
--
-- To create and configure a @ByteMatchSet@, perform the following steps:
--
-- 1.  Create a @ByteMatchSet.@ For more information, see
--     CreateByteMatchSet.
--
-- 2.  Use GetChangeToken to get the change token that you provide in the
--     @ChangeToken@ parameter of an @UpdateByteMatchSet@ request.
--
-- 3.  Submit an @UpdateByteMatchSet@ 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 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.WAF.UpdateByteMatchSet
  ( -- * Creating a Request
    UpdateByteMatchSet (..),
    newUpdateByteMatchSet,

    -- * Request Lenses
    updateByteMatchSet_byteMatchSetId,
    updateByteMatchSet_changeToken,
    updateByteMatchSet_updates,

    -- * Destructuring the Response
    UpdateByteMatchSetResponse (..),
    newUpdateByteMatchSetResponse,

    -- * Response Lenses
    updateByteMatchSetResponse_changeToken,
    updateByteMatchSetResponse_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:/ 'newUpdateByteMatchSet' smart constructor.
data UpdateByteMatchSet = UpdateByteMatchSet'
  { -- | The @ByteMatchSetId@ of the ByteMatchSet that you want to update.
    -- @ByteMatchSetId@ is returned by CreateByteMatchSet and by
    -- ListByteMatchSets.
    UpdateByteMatchSet -> Text
byteMatchSetId :: Prelude.Text,
    -- | The value returned by the most recent call to GetChangeToken.
    UpdateByteMatchSet -> Text
changeToken :: Prelude.Text,
    -- | An array of @ByteMatchSetUpdate@ objects that you want to insert into or
    -- delete from a ByteMatchSet. For more information, see the applicable
    -- data types:
    --
    -- -   ByteMatchSetUpdate: Contains @Action@ and @ByteMatchTuple@
    --
    -- -   ByteMatchTuple: Contains @FieldToMatch@, @PositionalConstraint@,
    --     @TargetString@, and @TextTransformation@
    --
    -- -   FieldToMatch: Contains @Data@ and @Type@
    UpdateByteMatchSet -> NonEmpty ByteMatchSetUpdate
updates :: Prelude.NonEmpty ByteMatchSetUpdate
  }
  deriving (UpdateByteMatchSet -> UpdateByteMatchSet -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: UpdateByteMatchSet -> UpdateByteMatchSet -> Bool
$c/= :: UpdateByteMatchSet -> UpdateByteMatchSet -> Bool
== :: UpdateByteMatchSet -> UpdateByteMatchSet -> Bool
$c== :: UpdateByteMatchSet -> UpdateByteMatchSet -> Bool
Prelude.Eq, ReadPrec [UpdateByteMatchSet]
ReadPrec UpdateByteMatchSet
Int -> ReadS UpdateByteMatchSet
ReadS [UpdateByteMatchSet]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [UpdateByteMatchSet]
$creadListPrec :: ReadPrec [UpdateByteMatchSet]
readPrec :: ReadPrec UpdateByteMatchSet
$creadPrec :: ReadPrec UpdateByteMatchSet
readList :: ReadS [UpdateByteMatchSet]
$creadList :: ReadS [UpdateByteMatchSet]
readsPrec :: Int -> ReadS UpdateByteMatchSet
$creadsPrec :: Int -> ReadS UpdateByteMatchSet
Prelude.Read, Int -> UpdateByteMatchSet -> ShowS
[UpdateByteMatchSet] -> ShowS
UpdateByteMatchSet -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [UpdateByteMatchSet] -> ShowS
$cshowList :: [UpdateByteMatchSet] -> ShowS
show :: UpdateByteMatchSet -> String
$cshow :: UpdateByteMatchSet -> String
showsPrec :: Int -> UpdateByteMatchSet -> ShowS
$cshowsPrec :: Int -> UpdateByteMatchSet -> ShowS
Prelude.Show, forall x. Rep UpdateByteMatchSet x -> UpdateByteMatchSet
forall x. UpdateByteMatchSet -> Rep UpdateByteMatchSet x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep UpdateByteMatchSet x -> UpdateByteMatchSet
$cfrom :: forall x. UpdateByteMatchSet -> Rep UpdateByteMatchSet x
Prelude.Generic)

-- |
-- Create a value of 'UpdateByteMatchSet' 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:
--
-- 'byteMatchSetId', 'updateByteMatchSet_byteMatchSetId' - The @ByteMatchSetId@ of the ByteMatchSet that you want to update.
-- @ByteMatchSetId@ is returned by CreateByteMatchSet and by
-- ListByteMatchSets.
--
-- 'changeToken', 'updateByteMatchSet_changeToken' - The value returned by the most recent call to GetChangeToken.
--
-- 'updates', 'updateByteMatchSet_updates' - An array of @ByteMatchSetUpdate@ objects that you want to insert into or
-- delete from a ByteMatchSet. For more information, see the applicable
-- data types:
--
-- -   ByteMatchSetUpdate: Contains @Action@ and @ByteMatchTuple@
--
-- -   ByteMatchTuple: Contains @FieldToMatch@, @PositionalConstraint@,
--     @TargetString@, and @TextTransformation@
--
-- -   FieldToMatch: Contains @Data@ and @Type@
newUpdateByteMatchSet ::
  -- | 'byteMatchSetId'
  Prelude.Text ->
  -- | 'changeToken'
  Prelude.Text ->
  -- | 'updates'
  Prelude.NonEmpty ByteMatchSetUpdate ->
  UpdateByteMatchSet
newUpdateByteMatchSet :: Text -> Text -> NonEmpty ByteMatchSetUpdate -> UpdateByteMatchSet
newUpdateByteMatchSet
  Text
pByteMatchSetId_
  Text
pChangeToken_
  NonEmpty ByteMatchSetUpdate
pUpdates_ =
    UpdateByteMatchSet'
      { $sel:byteMatchSetId:UpdateByteMatchSet' :: Text
byteMatchSetId =
          Text
pByteMatchSetId_,
        $sel:changeToken:UpdateByteMatchSet' :: Text
changeToken = Text
pChangeToken_,
        $sel:updates:UpdateByteMatchSet' :: NonEmpty ByteMatchSetUpdate
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 ByteMatchSetUpdate
pUpdates_
      }

-- | The @ByteMatchSetId@ of the ByteMatchSet that you want to update.
-- @ByteMatchSetId@ is returned by CreateByteMatchSet and by
-- ListByteMatchSets.
updateByteMatchSet_byteMatchSetId :: Lens.Lens' UpdateByteMatchSet Prelude.Text
updateByteMatchSet_byteMatchSetId :: Lens' UpdateByteMatchSet Text
updateByteMatchSet_byteMatchSetId = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateByteMatchSet' {Text
byteMatchSetId :: Text
$sel:byteMatchSetId:UpdateByteMatchSet' :: UpdateByteMatchSet -> Text
byteMatchSetId} -> Text
byteMatchSetId) (\s :: UpdateByteMatchSet
s@UpdateByteMatchSet' {} Text
a -> UpdateByteMatchSet
s {$sel:byteMatchSetId:UpdateByteMatchSet' :: Text
byteMatchSetId = Text
a} :: UpdateByteMatchSet)

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

-- | An array of @ByteMatchSetUpdate@ objects that you want to insert into or
-- delete from a ByteMatchSet. For more information, see the applicable
-- data types:
--
-- -   ByteMatchSetUpdate: Contains @Action@ and @ByteMatchTuple@
--
-- -   ByteMatchTuple: Contains @FieldToMatch@, @PositionalConstraint@,
--     @TargetString@, and @TextTransformation@
--
-- -   FieldToMatch: Contains @Data@ and @Type@
updateByteMatchSet_updates :: Lens.Lens' UpdateByteMatchSet (Prelude.NonEmpty ByteMatchSetUpdate)
updateByteMatchSet_updates :: Lens' UpdateByteMatchSet (NonEmpty ByteMatchSetUpdate)
updateByteMatchSet_updates = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateByteMatchSet' {NonEmpty ByteMatchSetUpdate
updates :: NonEmpty ByteMatchSetUpdate
$sel:updates:UpdateByteMatchSet' :: UpdateByteMatchSet -> NonEmpty ByteMatchSetUpdate
updates} -> NonEmpty ByteMatchSetUpdate
updates) (\s :: UpdateByteMatchSet
s@UpdateByteMatchSet' {} NonEmpty ByteMatchSetUpdate
a -> UpdateByteMatchSet
s {$sel:updates:UpdateByteMatchSet' :: NonEmpty ByteMatchSetUpdate
updates = NonEmpty ByteMatchSetUpdate
a} :: UpdateByteMatchSet) 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 UpdateByteMatchSet where
  type
    AWSResponse UpdateByteMatchSet =
      UpdateByteMatchSetResponse
  request :: (Service -> Service)
-> UpdateByteMatchSet -> Request UpdateByteMatchSet
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 UpdateByteMatchSet
-> ClientResponse ClientBody
-> m (Either
        Error (ClientResponse (AWSResponse UpdateByteMatchSet)))
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 -> UpdateByteMatchSetResponse
UpdateByteMatchSetResponse'
            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 UpdateByteMatchSet where
  hashWithSalt :: Int -> UpdateByteMatchSet -> Int
hashWithSalt Int
_salt UpdateByteMatchSet' {NonEmpty ByteMatchSetUpdate
Text
updates :: NonEmpty ByteMatchSetUpdate
changeToken :: Text
byteMatchSetId :: Text
$sel:updates:UpdateByteMatchSet' :: UpdateByteMatchSet -> NonEmpty ByteMatchSetUpdate
$sel:changeToken:UpdateByteMatchSet' :: UpdateByteMatchSet -> Text
$sel:byteMatchSetId:UpdateByteMatchSet' :: UpdateByteMatchSet -> Text
..} =
    Int
_salt
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
byteMatchSetId
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
changeToken
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` NonEmpty ByteMatchSetUpdate
updates

instance Prelude.NFData UpdateByteMatchSet where
  rnf :: UpdateByteMatchSet -> ()
rnf UpdateByteMatchSet' {NonEmpty ByteMatchSetUpdate
Text
updates :: NonEmpty ByteMatchSetUpdate
changeToken :: Text
byteMatchSetId :: Text
$sel:updates:UpdateByteMatchSet' :: UpdateByteMatchSet -> NonEmpty ByteMatchSetUpdate
$sel:changeToken:UpdateByteMatchSet' :: UpdateByteMatchSet -> Text
$sel:byteMatchSetId:UpdateByteMatchSet' :: UpdateByteMatchSet -> Text
..} =
    forall a. NFData a => a -> ()
Prelude.rnf Text
byteMatchSetId
      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 ByteMatchSetUpdate
updates

instance Data.ToHeaders UpdateByteMatchSet where
  toHeaders :: UpdateByteMatchSet -> 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.UpdateByteMatchSet" ::
                          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 UpdateByteMatchSet where
  toJSON :: UpdateByteMatchSet -> Value
toJSON UpdateByteMatchSet' {NonEmpty ByteMatchSetUpdate
Text
updates :: NonEmpty ByteMatchSetUpdate
changeToken :: Text
byteMatchSetId :: Text
$sel:updates:UpdateByteMatchSet' :: UpdateByteMatchSet -> NonEmpty ByteMatchSetUpdate
$sel:changeToken:UpdateByteMatchSet' :: UpdateByteMatchSet -> Text
$sel:byteMatchSetId:UpdateByteMatchSet' :: UpdateByteMatchSet -> Text
..} =
    [Pair] -> Value
Data.object
      ( forall a. [Maybe a] -> [a]
Prelude.catMaybes
          [ forall a. a -> Maybe a
Prelude.Just
              (Key
"ByteMatchSetId" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..= Text
byteMatchSetId),
            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 ByteMatchSetUpdate
updates)
          ]
      )

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

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

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

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

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

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

instance Prelude.NFData UpdateByteMatchSetResponse where
  rnf :: UpdateByteMatchSetResponse -> ()
rnf UpdateByteMatchSetResponse' {Int
Maybe Text
httpStatus :: Int
changeToken :: Maybe Text
$sel:httpStatus:UpdateByteMatchSetResponse' :: UpdateByteMatchSetResponse -> Int
$sel:changeToken:UpdateByteMatchSetResponse' :: UpdateByteMatchSetResponse -> 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