{-# 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.SqlInjectionMatchSetUpdate -- 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.SqlInjectionMatchSetUpdate 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.ChangeAction import Amazonka.WAFRegional.Types.SqlInjectionMatchTuple -- | 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. -- -- Specifies the part of a web request that you want to inspect for -- snippets of malicious SQL code and indicates whether you want to add the -- specification to a SqlInjectionMatchSet or delete it from a -- @SqlInjectionMatchSet@. -- -- /See:/ 'newSqlInjectionMatchSetUpdate' smart constructor. data SqlInjectionMatchSetUpdate = SqlInjectionMatchSetUpdate' { -- | Specify @INSERT@ to add a SqlInjectionMatchSetUpdate to a -- SqlInjectionMatchSet. Use @DELETE@ to remove a -- @SqlInjectionMatchSetUpdate@ from a @SqlInjectionMatchSet@. action :: ChangeAction, -- | Specifies the part of a web request that you want AWS WAF to inspect for -- snippets of malicious SQL code and, if you want AWS WAF to inspect a -- header, the name of the header. sqlInjectionMatchTuple :: SqlInjectionMatchTuple } deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic) -- | -- Create a value of 'SqlInjectionMatchSetUpdate' 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: -- -- 'action', 'sqlInjectionMatchSetUpdate_action' - Specify @INSERT@ to add a SqlInjectionMatchSetUpdate to a -- SqlInjectionMatchSet. Use @DELETE@ to remove a -- @SqlInjectionMatchSetUpdate@ from a @SqlInjectionMatchSet@. -- -- 'sqlInjectionMatchTuple', 'sqlInjectionMatchSetUpdate_sqlInjectionMatchTuple' - Specifies the part of a web request that you want AWS WAF to inspect for -- snippets of malicious SQL code and, if you want AWS WAF to inspect a -- header, the name of the header. newSqlInjectionMatchSetUpdate :: -- | 'action' ChangeAction -> -- | 'sqlInjectionMatchTuple' SqlInjectionMatchTuple -> SqlInjectionMatchSetUpdate newSqlInjectionMatchSetUpdate pAction_ pSqlInjectionMatchTuple_ = SqlInjectionMatchSetUpdate' { action = pAction_, sqlInjectionMatchTuple = pSqlInjectionMatchTuple_ } -- | Specify @INSERT@ to add a SqlInjectionMatchSetUpdate to a -- SqlInjectionMatchSet. Use @DELETE@ to remove a -- @SqlInjectionMatchSetUpdate@ from a @SqlInjectionMatchSet@. sqlInjectionMatchSetUpdate_action :: Lens.Lens' SqlInjectionMatchSetUpdate ChangeAction sqlInjectionMatchSetUpdate_action = Lens.lens (\SqlInjectionMatchSetUpdate' {action} -> action) (\s@SqlInjectionMatchSetUpdate' {} a -> s {action = a} :: SqlInjectionMatchSetUpdate) -- | Specifies the part of a web request that you want AWS WAF to inspect for -- snippets of malicious SQL code and, if you want AWS WAF to inspect a -- header, the name of the header. sqlInjectionMatchSetUpdate_sqlInjectionMatchTuple :: Lens.Lens' SqlInjectionMatchSetUpdate SqlInjectionMatchTuple sqlInjectionMatchSetUpdate_sqlInjectionMatchTuple = Lens.lens (\SqlInjectionMatchSetUpdate' {sqlInjectionMatchTuple} -> sqlInjectionMatchTuple) (\s@SqlInjectionMatchSetUpdate' {} a -> s {sqlInjectionMatchTuple = a} :: SqlInjectionMatchSetUpdate) instance Prelude.Hashable SqlInjectionMatchSetUpdate where hashWithSalt _salt SqlInjectionMatchSetUpdate' {..} = _salt `Prelude.hashWithSalt` action `Prelude.hashWithSalt` sqlInjectionMatchTuple instance Prelude.NFData SqlInjectionMatchSetUpdate where rnf SqlInjectionMatchSetUpdate' {..} = Prelude.rnf action `Prelude.seq` Prelude.rnf sqlInjectionMatchTuple instance Data.ToJSON SqlInjectionMatchSetUpdate where toJSON SqlInjectionMatchSetUpdate' {..} = Data.object ( Prelude.catMaybes [ Prelude.Just ("Action" Data..= action), Prelude.Just ( "SqlInjectionMatchTuple" Data..= sqlInjectionMatchTuple ) ] )