{-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE DuplicateRecordFields #-} {-# LANGUAGE NamedFieldPuns #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE RecordWildCards #-} {-# LANGUAGE StrictData #-} {-# LANGUAGE NoImplicitPrelude #-} {-# 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.Types.XssMatchSet -- Copyright : (c) 2013-2023 Brendan Hay -- License : Mozilla Public License, v. 2.0. -- Maintainer : Brendan Hay -- Stability : auto-generated -- Portability : non-portable (GHC extensions) module Amazonka.WAFRegional.Types.XssMatchSet 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 Amazonka.WAFRegional.Types.XssMatchTuple -- | This is __AWS WAF Classic__ documentation. For more information, see -- -- in the developer guide. -- -- __For the latest version of AWS WAF__, use the AWS WAFV2 API and see the -- . -- With the latest version, AWS WAF has a single set of endpoints for -- regional and global use. -- -- A complex type that contains @XssMatchTuple@ objects, which specify the -- parts of web requests that you want AWS WAF to inspect for cross-site -- scripting attacks and, if you want AWS WAF to inspect a header, the name -- of the header. If a @XssMatchSet@ contains more than one @XssMatchTuple@ -- object, a request needs to include cross-site scripting attacks in only -- one of the specified parts of the request to be considered a match. -- -- /See:/ 'newXssMatchSet' smart constructor. data XssMatchSet = XssMatchSet' { -- | The name, if any, of the @XssMatchSet@. name :: Prelude.Maybe Prelude.Text, -- | A unique identifier for an @XssMatchSet@. You use @XssMatchSetId@ to get -- information about an @XssMatchSet@ (see GetXssMatchSet), update an -- @XssMatchSet@ (see UpdateXssMatchSet), insert an @XssMatchSet@ into a -- @Rule@ or delete one from a @Rule@ (see UpdateRule), and delete an -- @XssMatchSet@ from AWS WAF (see DeleteXssMatchSet). -- -- @XssMatchSetId@ is returned by CreateXssMatchSet and by -- ListXssMatchSets. xssMatchSetId :: Prelude.Text, -- | Specifies the parts of web requests that you want to inspect for -- cross-site scripting attacks. xssMatchTuples :: [XssMatchTuple] } deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic) -- | -- Create a value of 'XssMatchSet' with all optional fields omitted. -- -- Use or to modify other optional fields. -- -- The following record fields are available, with the corresponding lenses provided -- for backwards compatibility: -- -- 'name', 'xssMatchSet_name' - The name, if any, of the @XssMatchSet@. -- -- 'xssMatchSetId', 'xssMatchSet_xssMatchSetId' - A unique identifier for an @XssMatchSet@. You use @XssMatchSetId@ to get -- information about an @XssMatchSet@ (see GetXssMatchSet), update an -- @XssMatchSet@ (see UpdateXssMatchSet), insert an @XssMatchSet@ into a -- @Rule@ or delete one from a @Rule@ (see UpdateRule), and delete an -- @XssMatchSet@ from AWS WAF (see DeleteXssMatchSet). -- -- @XssMatchSetId@ is returned by CreateXssMatchSet and by -- ListXssMatchSets. -- -- 'xssMatchTuples', 'xssMatchSet_xssMatchTuples' - Specifies the parts of web requests that you want to inspect for -- cross-site scripting attacks. newXssMatchSet :: -- | 'xssMatchSetId' Prelude.Text -> XssMatchSet newXssMatchSet pXssMatchSetId_ = XssMatchSet' { name = Prelude.Nothing, xssMatchSetId = pXssMatchSetId_, xssMatchTuples = Prelude.mempty } -- | The name, if any, of the @XssMatchSet@. xssMatchSet_name :: Lens.Lens' XssMatchSet (Prelude.Maybe Prelude.Text) xssMatchSet_name = Lens.lens (\XssMatchSet' {name} -> name) (\s@XssMatchSet' {} a -> s {name = a} :: XssMatchSet) -- | A unique identifier for an @XssMatchSet@. You use @XssMatchSetId@ to get -- information about an @XssMatchSet@ (see GetXssMatchSet), update an -- @XssMatchSet@ (see UpdateXssMatchSet), insert an @XssMatchSet@ into a -- @Rule@ or delete one from a @Rule@ (see UpdateRule), and delete an -- @XssMatchSet@ from AWS WAF (see DeleteXssMatchSet). -- -- @XssMatchSetId@ is returned by CreateXssMatchSet and by -- ListXssMatchSets. xssMatchSet_xssMatchSetId :: Lens.Lens' XssMatchSet Prelude.Text xssMatchSet_xssMatchSetId = Lens.lens (\XssMatchSet' {xssMatchSetId} -> xssMatchSetId) (\s@XssMatchSet' {} a -> s {xssMatchSetId = a} :: XssMatchSet) -- | Specifies the parts of web requests that you want to inspect for -- cross-site scripting attacks. xssMatchSet_xssMatchTuples :: Lens.Lens' XssMatchSet [XssMatchTuple] xssMatchSet_xssMatchTuples = Lens.lens (\XssMatchSet' {xssMatchTuples} -> xssMatchTuples) (\s@XssMatchSet' {} a -> s {xssMatchTuples = a} :: XssMatchSet) Prelude.. Lens.coerced instance Data.FromJSON XssMatchSet where parseJSON = Data.withObject "XssMatchSet" ( \x -> XssMatchSet' Prelude.<$> (x Data..:? "Name") Prelude.<*> (x Data..: "XssMatchSetId") Prelude.<*> ( x Data..:? "XssMatchTuples" Data..!= Prelude.mempty ) ) instance Prelude.Hashable XssMatchSet where hashWithSalt _salt XssMatchSet' {..} = _salt `Prelude.hashWithSalt` name `Prelude.hashWithSalt` xssMatchSetId `Prelude.hashWithSalt` xssMatchTuples instance Prelude.NFData XssMatchSet where rnf XssMatchSet' {..} = Prelude.rnf name `Prelude.seq` Prelude.rnf xssMatchSetId `Prelude.seq` Prelude.rnf xssMatchTuples