{-# 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.SqlInjectionMatchSetSummary
-- 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)
module Amazonka.WAFRegional.Types.SqlInjectionMatchSetSummary where

import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude

-- | 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.
--
-- The @Id@ and @Name@ of a @SqlInjectionMatchSet@.
--
-- /See:/ 'newSqlInjectionMatchSetSummary' smart constructor.
data SqlInjectionMatchSetSummary = SqlInjectionMatchSetSummary'
  { -- | A unique identifier for a @SqlInjectionMatchSet@. You use
    -- @SqlInjectionMatchSetId@ to get information about a
    -- @SqlInjectionMatchSet@ (see GetSqlInjectionMatchSet), update a
    -- @SqlInjectionMatchSet@ (see UpdateSqlInjectionMatchSet), insert a
    -- @SqlInjectionMatchSet@ into a @Rule@ or delete one from a @Rule@ (see
    -- UpdateRule), and delete a @SqlInjectionMatchSet@ from AWS WAF (see
    -- DeleteSqlInjectionMatchSet).
    --
    -- @SqlInjectionMatchSetId@ is returned by CreateSqlInjectionMatchSet and
    -- by ListSqlInjectionMatchSets.
    SqlInjectionMatchSetSummary -> Text
sqlInjectionMatchSetId :: Prelude.Text,
    -- | The name of the @SqlInjectionMatchSet@, if any, specified by @Id@.
    SqlInjectionMatchSetSummary -> Text
name :: Prelude.Text
  }
  deriving (SqlInjectionMatchSetSummary -> SqlInjectionMatchSetSummary -> Bool
(SqlInjectionMatchSetSummary
 -> SqlInjectionMatchSetSummary -> Bool)
-> (SqlInjectionMatchSetSummary
    -> SqlInjectionMatchSetSummary -> Bool)
-> Eq SqlInjectionMatchSetSummary
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: SqlInjectionMatchSetSummary -> SqlInjectionMatchSetSummary -> Bool
$c/= :: SqlInjectionMatchSetSummary -> SqlInjectionMatchSetSummary -> Bool
== :: SqlInjectionMatchSetSummary -> SqlInjectionMatchSetSummary -> Bool
$c== :: SqlInjectionMatchSetSummary -> SqlInjectionMatchSetSummary -> Bool
Prelude.Eq, ReadPrec [SqlInjectionMatchSetSummary]
ReadPrec SqlInjectionMatchSetSummary
Int -> ReadS SqlInjectionMatchSetSummary
ReadS [SqlInjectionMatchSetSummary]
(Int -> ReadS SqlInjectionMatchSetSummary)
-> ReadS [SqlInjectionMatchSetSummary]
-> ReadPrec SqlInjectionMatchSetSummary
-> ReadPrec [SqlInjectionMatchSetSummary]
-> Read SqlInjectionMatchSetSummary
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [SqlInjectionMatchSetSummary]
$creadListPrec :: ReadPrec [SqlInjectionMatchSetSummary]
readPrec :: ReadPrec SqlInjectionMatchSetSummary
$creadPrec :: ReadPrec SqlInjectionMatchSetSummary
readList :: ReadS [SqlInjectionMatchSetSummary]
$creadList :: ReadS [SqlInjectionMatchSetSummary]
readsPrec :: Int -> ReadS SqlInjectionMatchSetSummary
$creadsPrec :: Int -> ReadS SqlInjectionMatchSetSummary
Prelude.Read, Int -> SqlInjectionMatchSetSummary -> ShowS
[SqlInjectionMatchSetSummary] -> ShowS
SqlInjectionMatchSetSummary -> String
(Int -> SqlInjectionMatchSetSummary -> ShowS)
-> (SqlInjectionMatchSetSummary -> String)
-> ([SqlInjectionMatchSetSummary] -> ShowS)
-> Show SqlInjectionMatchSetSummary
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [SqlInjectionMatchSetSummary] -> ShowS
$cshowList :: [SqlInjectionMatchSetSummary] -> ShowS
show :: SqlInjectionMatchSetSummary -> String
$cshow :: SqlInjectionMatchSetSummary -> String
showsPrec :: Int -> SqlInjectionMatchSetSummary -> ShowS
$cshowsPrec :: Int -> SqlInjectionMatchSetSummary -> ShowS
Prelude.Show, (forall x.
 SqlInjectionMatchSetSummary -> Rep SqlInjectionMatchSetSummary x)
-> (forall x.
    Rep SqlInjectionMatchSetSummary x -> SqlInjectionMatchSetSummary)
-> Generic SqlInjectionMatchSetSummary
forall x.
Rep SqlInjectionMatchSetSummary x -> SqlInjectionMatchSetSummary
forall x.
SqlInjectionMatchSetSummary -> Rep SqlInjectionMatchSetSummary x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep SqlInjectionMatchSetSummary x -> SqlInjectionMatchSetSummary
$cfrom :: forall x.
SqlInjectionMatchSetSummary -> Rep SqlInjectionMatchSetSummary x
Prelude.Generic)

-- |
-- Create a value of 'SqlInjectionMatchSetSummary' 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:
--
-- 'sqlInjectionMatchSetId', 'sqlInjectionMatchSetSummary_sqlInjectionMatchSetId' - A unique identifier for a @SqlInjectionMatchSet@. You use
-- @SqlInjectionMatchSetId@ to get information about a
-- @SqlInjectionMatchSet@ (see GetSqlInjectionMatchSet), update a
-- @SqlInjectionMatchSet@ (see UpdateSqlInjectionMatchSet), insert a
-- @SqlInjectionMatchSet@ into a @Rule@ or delete one from a @Rule@ (see
-- UpdateRule), and delete a @SqlInjectionMatchSet@ from AWS WAF (see
-- DeleteSqlInjectionMatchSet).
--
-- @SqlInjectionMatchSetId@ is returned by CreateSqlInjectionMatchSet and
-- by ListSqlInjectionMatchSets.
--
-- 'name', 'sqlInjectionMatchSetSummary_name' - The name of the @SqlInjectionMatchSet@, if any, specified by @Id@.
newSqlInjectionMatchSetSummary ::
  -- | 'sqlInjectionMatchSetId'
  Prelude.Text ->
  -- | 'name'
  Prelude.Text ->
  SqlInjectionMatchSetSummary
newSqlInjectionMatchSetSummary :: Text -> Text -> SqlInjectionMatchSetSummary
newSqlInjectionMatchSetSummary
  Text
pSqlInjectionMatchSetId_
  Text
pName_ =
    SqlInjectionMatchSetSummary' :: Text -> Text -> SqlInjectionMatchSetSummary
SqlInjectionMatchSetSummary'
      { $sel:sqlInjectionMatchSetId:SqlInjectionMatchSetSummary' :: Text
sqlInjectionMatchSetId =
          Text
pSqlInjectionMatchSetId_,
        $sel:name:SqlInjectionMatchSetSummary' :: Text
name = Text
pName_
      }

-- | A unique identifier for a @SqlInjectionMatchSet@. You use
-- @SqlInjectionMatchSetId@ to get information about a
-- @SqlInjectionMatchSet@ (see GetSqlInjectionMatchSet), update a
-- @SqlInjectionMatchSet@ (see UpdateSqlInjectionMatchSet), insert a
-- @SqlInjectionMatchSet@ into a @Rule@ or delete one from a @Rule@ (see
-- UpdateRule), and delete a @SqlInjectionMatchSet@ from AWS WAF (see
-- DeleteSqlInjectionMatchSet).
--
-- @SqlInjectionMatchSetId@ is returned by CreateSqlInjectionMatchSet and
-- by ListSqlInjectionMatchSets.
sqlInjectionMatchSetSummary_sqlInjectionMatchSetId :: Lens.Lens' SqlInjectionMatchSetSummary Prelude.Text
sqlInjectionMatchSetSummary_sqlInjectionMatchSetId :: (Text -> f Text)
-> SqlInjectionMatchSetSummary -> f SqlInjectionMatchSetSummary
sqlInjectionMatchSetSummary_sqlInjectionMatchSetId = (SqlInjectionMatchSetSummary -> Text)
-> (SqlInjectionMatchSetSummary
    -> Text -> SqlInjectionMatchSetSummary)
-> Lens
     SqlInjectionMatchSetSummary SqlInjectionMatchSetSummary Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\SqlInjectionMatchSetSummary' {Text
sqlInjectionMatchSetId :: Text
$sel:sqlInjectionMatchSetId:SqlInjectionMatchSetSummary' :: SqlInjectionMatchSetSummary -> Text
sqlInjectionMatchSetId} -> Text
sqlInjectionMatchSetId) (\s :: SqlInjectionMatchSetSummary
s@SqlInjectionMatchSetSummary' {} Text
a -> SqlInjectionMatchSetSummary
s {$sel:sqlInjectionMatchSetId:SqlInjectionMatchSetSummary' :: Text
sqlInjectionMatchSetId = Text
a} :: SqlInjectionMatchSetSummary)

-- | The name of the @SqlInjectionMatchSet@, if any, specified by @Id@.
sqlInjectionMatchSetSummary_name :: Lens.Lens' SqlInjectionMatchSetSummary Prelude.Text
sqlInjectionMatchSetSummary_name :: (Text -> f Text)
-> SqlInjectionMatchSetSummary -> f SqlInjectionMatchSetSummary
sqlInjectionMatchSetSummary_name = (SqlInjectionMatchSetSummary -> Text)
-> (SqlInjectionMatchSetSummary
    -> Text -> SqlInjectionMatchSetSummary)
-> Lens
     SqlInjectionMatchSetSummary SqlInjectionMatchSetSummary Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\SqlInjectionMatchSetSummary' {Text
name :: Text
$sel:name:SqlInjectionMatchSetSummary' :: SqlInjectionMatchSetSummary -> Text
name} -> Text
name) (\s :: SqlInjectionMatchSetSummary
s@SqlInjectionMatchSetSummary' {} Text
a -> SqlInjectionMatchSetSummary
s {$sel:name:SqlInjectionMatchSetSummary' :: Text
name = Text
a} :: SqlInjectionMatchSetSummary)

instance Core.FromJSON SqlInjectionMatchSetSummary where
  parseJSON :: Value -> Parser SqlInjectionMatchSetSummary
parseJSON =
    String
-> (Object -> Parser SqlInjectionMatchSetSummary)
-> Value
-> Parser SqlInjectionMatchSetSummary
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
      String
"SqlInjectionMatchSetSummary"
      ( \Object
x ->
          Text -> Text -> SqlInjectionMatchSetSummary
SqlInjectionMatchSetSummary'
            (Text -> Text -> SqlInjectionMatchSetSummary)
-> Parser Text -> Parser (Text -> SqlInjectionMatchSetSummary)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Parser Text
forall a. FromJSON a => Object -> Text -> Parser a
Core..: Text
"SqlInjectionMatchSetId")
            Parser (Text -> SqlInjectionMatchSetSummary)
-> Parser Text -> Parser SqlInjectionMatchSetSummary
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser Text
forall a. FromJSON a => Object -> Text -> Parser a
Core..: Text
"Name")
      )

instance Prelude.Hashable SqlInjectionMatchSetSummary

instance Prelude.NFData SqlInjectionMatchSetSummary