{-# 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.UpdateXssMatchSet
-- 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.
--
-- Inserts or deletes XssMatchTuple objects (filters) in an XssMatchSet.
-- For each @XssMatchTuple@ object, you specify the following values:
--
-- -   @Action@: Whether to insert the object into or delete the object
--     from the array. To change an @XssMatchTuple@, you delete the
--     existing object and add a new one.
--
-- -   @FieldToMatch@: The part of web requests that you want AWS WAF to
--     inspect and, if you want AWS WAF to inspect a header or custom query
--     parameter, the name of the header or parameter.
--
-- -   @TextTransformation@: Which text transformation, if any, to perform
--     on the web request before inspecting the request for cross-site
--     scripting attacks.
--
--     You can only specify a single type of TextTransformation.
--
-- You use @XssMatchSet@ objects to specify which CloudFront requests that
-- you want to allow, block, or count. For example, if you\'re receiving
-- requests that contain cross-site scripting attacks in the request body
-- and you want to block the requests, you can create an @XssMatchSet@ with
-- the applicable settings, and then configure AWS WAF to block the
-- requests.
--
-- To create and configure an @XssMatchSet@, perform the following steps:
--
-- 1.  Submit a CreateXssMatchSet request.
--
-- 2.  Use GetChangeToken to get the change token that you provide in the
--     @ChangeToken@ parameter of an UpdateIPSet request.
--
-- 3.  Submit an @UpdateXssMatchSet@ request to specify the parts of web
--     requests that you want AWS WAF to inspect for cross-site scripting
--     attacks.
--
-- 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.UpdateXssMatchSet
  ( -- * Creating a Request
    UpdateXssMatchSet (..),
    newUpdateXssMatchSet,

    -- * Request Lenses
    updateXssMatchSet_xssMatchSetId,
    updateXssMatchSet_changeToken,
    updateXssMatchSet_updates,

    -- * Destructuring the Response
    UpdateXssMatchSetResponse (..),
    newUpdateXssMatchSetResponse,

    -- * Response Lenses
    updateXssMatchSetResponse_changeToken,
    updateXssMatchSetResponse_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.WAF.Types

-- | A request to update an XssMatchSet.
--
-- /See:/ 'newUpdateXssMatchSet' smart constructor.
data UpdateXssMatchSet = UpdateXssMatchSet'
  { -- | The @XssMatchSetId@ of the @XssMatchSet@ that you want to update.
    -- @XssMatchSetId@ is returned by CreateXssMatchSet and by
    -- ListXssMatchSets.
    UpdateXssMatchSet -> Text
xssMatchSetId :: Prelude.Text,
    -- | The value returned by the most recent call to GetChangeToken.
    UpdateXssMatchSet -> Text
changeToken :: Prelude.Text,
    -- | An array of @XssMatchSetUpdate@ objects that you want to insert into or
    -- delete from an XssMatchSet. For more information, see the applicable
    -- data types:
    --
    -- -   XssMatchSetUpdate: Contains @Action@ and @XssMatchTuple@
    --
    -- -   XssMatchTuple: Contains @FieldToMatch@ and @TextTransformation@
    --
    -- -   FieldToMatch: Contains @Data@ and @Type@
    UpdateXssMatchSet -> NonEmpty XssMatchSetUpdate
updates :: Prelude.NonEmpty XssMatchSetUpdate
  }
  deriving (UpdateXssMatchSet -> UpdateXssMatchSet -> Bool
(UpdateXssMatchSet -> UpdateXssMatchSet -> Bool)
-> (UpdateXssMatchSet -> UpdateXssMatchSet -> Bool)
-> Eq UpdateXssMatchSet
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: UpdateXssMatchSet -> UpdateXssMatchSet -> Bool
$c/= :: UpdateXssMatchSet -> UpdateXssMatchSet -> Bool
== :: UpdateXssMatchSet -> UpdateXssMatchSet -> Bool
$c== :: UpdateXssMatchSet -> UpdateXssMatchSet -> Bool
Prelude.Eq, ReadPrec [UpdateXssMatchSet]
ReadPrec UpdateXssMatchSet
Int -> ReadS UpdateXssMatchSet
ReadS [UpdateXssMatchSet]
(Int -> ReadS UpdateXssMatchSet)
-> ReadS [UpdateXssMatchSet]
-> ReadPrec UpdateXssMatchSet
-> ReadPrec [UpdateXssMatchSet]
-> Read UpdateXssMatchSet
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [UpdateXssMatchSet]
$creadListPrec :: ReadPrec [UpdateXssMatchSet]
readPrec :: ReadPrec UpdateXssMatchSet
$creadPrec :: ReadPrec UpdateXssMatchSet
readList :: ReadS [UpdateXssMatchSet]
$creadList :: ReadS [UpdateXssMatchSet]
readsPrec :: Int -> ReadS UpdateXssMatchSet
$creadsPrec :: Int -> ReadS UpdateXssMatchSet
Prelude.Read, Int -> UpdateXssMatchSet -> ShowS
[UpdateXssMatchSet] -> ShowS
UpdateXssMatchSet -> String
(Int -> UpdateXssMatchSet -> ShowS)
-> (UpdateXssMatchSet -> String)
-> ([UpdateXssMatchSet] -> ShowS)
-> Show UpdateXssMatchSet
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [UpdateXssMatchSet] -> ShowS
$cshowList :: [UpdateXssMatchSet] -> ShowS
show :: UpdateXssMatchSet -> String
$cshow :: UpdateXssMatchSet -> String
showsPrec :: Int -> UpdateXssMatchSet -> ShowS
$cshowsPrec :: Int -> UpdateXssMatchSet -> ShowS
Prelude.Show, (forall x. UpdateXssMatchSet -> Rep UpdateXssMatchSet x)
-> (forall x. Rep UpdateXssMatchSet x -> UpdateXssMatchSet)
-> Generic UpdateXssMatchSet
forall x. Rep UpdateXssMatchSet x -> UpdateXssMatchSet
forall x. UpdateXssMatchSet -> Rep UpdateXssMatchSet x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep UpdateXssMatchSet x -> UpdateXssMatchSet
$cfrom :: forall x. UpdateXssMatchSet -> Rep UpdateXssMatchSet x
Prelude.Generic)

-- |
-- Create a value of 'UpdateXssMatchSet' 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:
--
-- 'xssMatchSetId', 'updateXssMatchSet_xssMatchSetId' - The @XssMatchSetId@ of the @XssMatchSet@ that you want to update.
-- @XssMatchSetId@ is returned by CreateXssMatchSet and by
-- ListXssMatchSets.
--
-- 'changeToken', 'updateXssMatchSet_changeToken' - The value returned by the most recent call to GetChangeToken.
--
-- 'updates', 'updateXssMatchSet_updates' - An array of @XssMatchSetUpdate@ objects that you want to insert into or
-- delete from an XssMatchSet. For more information, see the applicable
-- data types:
--
-- -   XssMatchSetUpdate: Contains @Action@ and @XssMatchTuple@
--
-- -   XssMatchTuple: Contains @FieldToMatch@ and @TextTransformation@
--
-- -   FieldToMatch: Contains @Data@ and @Type@
newUpdateXssMatchSet ::
  -- | 'xssMatchSetId'
  Prelude.Text ->
  -- | 'changeToken'
  Prelude.Text ->
  -- | 'updates'
  Prelude.NonEmpty XssMatchSetUpdate ->
  UpdateXssMatchSet
newUpdateXssMatchSet :: Text -> Text -> NonEmpty XssMatchSetUpdate -> UpdateXssMatchSet
newUpdateXssMatchSet
  Text
pXssMatchSetId_
  Text
pChangeToken_
  NonEmpty XssMatchSetUpdate
pUpdates_ =
    UpdateXssMatchSet' :: Text -> Text -> NonEmpty XssMatchSetUpdate -> UpdateXssMatchSet
UpdateXssMatchSet'
      { $sel:xssMatchSetId:UpdateXssMatchSet' :: Text
xssMatchSetId = Text
pXssMatchSetId_,
        $sel:changeToken:UpdateXssMatchSet' :: Text
changeToken = Text
pChangeToken_,
        $sel:updates:UpdateXssMatchSet' :: NonEmpty XssMatchSetUpdate
updates = Tagged
  (NonEmpty XssMatchSetUpdate)
  (Identity (NonEmpty XssMatchSetUpdate))
-> Tagged
     (NonEmpty XssMatchSetUpdate)
     (Identity (NonEmpty XssMatchSetUpdate))
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced (Tagged
   (NonEmpty XssMatchSetUpdate)
   (Identity (NonEmpty XssMatchSetUpdate))
 -> Tagged
      (NonEmpty XssMatchSetUpdate)
      (Identity (NonEmpty XssMatchSetUpdate)))
-> NonEmpty XssMatchSetUpdate -> NonEmpty XssMatchSetUpdate
forall t b. AReview t b -> b -> t
Lens.# NonEmpty XssMatchSetUpdate
pUpdates_
      }

-- | The @XssMatchSetId@ of the @XssMatchSet@ that you want to update.
-- @XssMatchSetId@ is returned by CreateXssMatchSet and by
-- ListXssMatchSets.
updateXssMatchSet_xssMatchSetId :: Lens.Lens' UpdateXssMatchSet Prelude.Text
updateXssMatchSet_xssMatchSetId :: (Text -> f Text) -> UpdateXssMatchSet -> f UpdateXssMatchSet
updateXssMatchSet_xssMatchSetId = (UpdateXssMatchSet -> Text)
-> (UpdateXssMatchSet -> Text -> UpdateXssMatchSet)
-> Lens UpdateXssMatchSet UpdateXssMatchSet Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateXssMatchSet' {Text
xssMatchSetId :: Text
$sel:xssMatchSetId:UpdateXssMatchSet' :: UpdateXssMatchSet -> Text
xssMatchSetId} -> Text
xssMatchSetId) (\s :: UpdateXssMatchSet
s@UpdateXssMatchSet' {} Text
a -> UpdateXssMatchSet
s {$sel:xssMatchSetId:UpdateXssMatchSet' :: Text
xssMatchSetId = Text
a} :: UpdateXssMatchSet)

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

-- | An array of @XssMatchSetUpdate@ objects that you want to insert into or
-- delete from an XssMatchSet. For more information, see the applicable
-- data types:
--
-- -   XssMatchSetUpdate: Contains @Action@ and @XssMatchTuple@
--
-- -   XssMatchTuple: Contains @FieldToMatch@ and @TextTransformation@
--
-- -   FieldToMatch: Contains @Data@ and @Type@
updateXssMatchSet_updates :: Lens.Lens' UpdateXssMatchSet (Prelude.NonEmpty XssMatchSetUpdate)
updateXssMatchSet_updates :: (NonEmpty XssMatchSetUpdate -> f (NonEmpty XssMatchSetUpdate))
-> UpdateXssMatchSet -> f UpdateXssMatchSet
updateXssMatchSet_updates = (UpdateXssMatchSet -> NonEmpty XssMatchSetUpdate)
-> (UpdateXssMatchSet
    -> NonEmpty XssMatchSetUpdate -> UpdateXssMatchSet)
-> Lens
     UpdateXssMatchSet
     UpdateXssMatchSet
     (NonEmpty XssMatchSetUpdate)
     (NonEmpty XssMatchSetUpdate)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateXssMatchSet' {NonEmpty XssMatchSetUpdate
updates :: NonEmpty XssMatchSetUpdate
$sel:updates:UpdateXssMatchSet' :: UpdateXssMatchSet -> NonEmpty XssMatchSetUpdate
updates} -> NonEmpty XssMatchSetUpdate
updates) (\s :: UpdateXssMatchSet
s@UpdateXssMatchSet' {} NonEmpty XssMatchSetUpdate
a -> UpdateXssMatchSet
s {$sel:updates:UpdateXssMatchSet' :: NonEmpty XssMatchSetUpdate
updates = NonEmpty XssMatchSetUpdate
a} :: UpdateXssMatchSet) ((NonEmpty XssMatchSetUpdate -> f (NonEmpty XssMatchSetUpdate))
 -> UpdateXssMatchSet -> f UpdateXssMatchSet)
-> ((NonEmpty XssMatchSetUpdate -> f (NonEmpty XssMatchSetUpdate))
    -> NonEmpty XssMatchSetUpdate -> f (NonEmpty XssMatchSetUpdate))
-> (NonEmpty XssMatchSetUpdate -> f (NonEmpty XssMatchSetUpdate))
-> UpdateXssMatchSet
-> f UpdateXssMatchSet
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. (NonEmpty XssMatchSetUpdate -> f (NonEmpty XssMatchSetUpdate))
-> NonEmpty XssMatchSetUpdate -> f (NonEmpty XssMatchSetUpdate)
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

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

instance Prelude.NFData UpdateXssMatchSet

instance Core.ToHeaders UpdateXssMatchSet where
  toHeaders :: UpdateXssMatchSet -> ResponseHeaders
toHeaders =
    ResponseHeaders -> UpdateXssMatchSet -> 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_20150824.UpdateXssMatchSet" ::
                          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 UpdateXssMatchSet where
  toJSON :: UpdateXssMatchSet -> Value
toJSON UpdateXssMatchSet' {NonEmpty XssMatchSetUpdate
Text
updates :: NonEmpty XssMatchSetUpdate
changeToken :: Text
xssMatchSetId :: Text
$sel:updates:UpdateXssMatchSet' :: UpdateXssMatchSet -> NonEmpty XssMatchSetUpdate
$sel:changeToken:UpdateXssMatchSet' :: UpdateXssMatchSet -> Text
$sel:xssMatchSetId:UpdateXssMatchSet' :: UpdateXssMatchSet -> 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
"XssMatchSetId" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Text
xssMatchSetId),
            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),
            Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just (Text
"Updates" Text -> NonEmpty XssMatchSetUpdate -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= NonEmpty XssMatchSetUpdate
updates)
          ]
      )

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

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

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

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

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

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

instance Prelude.NFData UpdateXssMatchSetResponse