{-# 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 #-}
module Amazonka.WAFRegional.Types.XssMatchSetUpdate 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.XssMatchTuple
data XssMatchSetUpdate = XssMatchSetUpdate'
{
XssMatchSetUpdate -> ChangeAction
action :: ChangeAction,
XssMatchSetUpdate -> XssMatchTuple
xssMatchTuple :: XssMatchTuple
}
deriving (XssMatchSetUpdate -> XssMatchSetUpdate -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: XssMatchSetUpdate -> XssMatchSetUpdate -> Bool
$c/= :: XssMatchSetUpdate -> XssMatchSetUpdate -> Bool
== :: XssMatchSetUpdate -> XssMatchSetUpdate -> Bool
$c== :: XssMatchSetUpdate -> XssMatchSetUpdate -> Bool
Prelude.Eq, ReadPrec [XssMatchSetUpdate]
ReadPrec XssMatchSetUpdate
Int -> ReadS XssMatchSetUpdate
ReadS [XssMatchSetUpdate]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [XssMatchSetUpdate]
$creadListPrec :: ReadPrec [XssMatchSetUpdate]
readPrec :: ReadPrec XssMatchSetUpdate
$creadPrec :: ReadPrec XssMatchSetUpdate
readList :: ReadS [XssMatchSetUpdate]
$creadList :: ReadS [XssMatchSetUpdate]
readsPrec :: Int -> ReadS XssMatchSetUpdate
$creadsPrec :: Int -> ReadS XssMatchSetUpdate
Prelude.Read, Int -> XssMatchSetUpdate -> ShowS
[XssMatchSetUpdate] -> ShowS
XssMatchSetUpdate -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [XssMatchSetUpdate] -> ShowS
$cshowList :: [XssMatchSetUpdate] -> ShowS
show :: XssMatchSetUpdate -> String
$cshow :: XssMatchSetUpdate -> String
showsPrec :: Int -> XssMatchSetUpdate -> ShowS
$cshowsPrec :: Int -> XssMatchSetUpdate -> ShowS
Prelude.Show, forall x. Rep XssMatchSetUpdate x -> XssMatchSetUpdate
forall x. XssMatchSetUpdate -> Rep XssMatchSetUpdate x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep XssMatchSetUpdate x -> XssMatchSetUpdate
$cfrom :: forall x. XssMatchSetUpdate -> Rep XssMatchSetUpdate x
Prelude.Generic)
newXssMatchSetUpdate ::
ChangeAction ->
XssMatchTuple ->
XssMatchSetUpdate
newXssMatchSetUpdate :: ChangeAction -> XssMatchTuple -> XssMatchSetUpdate
newXssMatchSetUpdate ChangeAction
pAction_ XssMatchTuple
pXssMatchTuple_ =
XssMatchSetUpdate'
{ $sel:action:XssMatchSetUpdate' :: ChangeAction
action = ChangeAction
pAction_,
$sel:xssMatchTuple:XssMatchSetUpdate' :: XssMatchTuple
xssMatchTuple = XssMatchTuple
pXssMatchTuple_
}
xssMatchSetUpdate_action :: Lens.Lens' XssMatchSetUpdate ChangeAction
xssMatchSetUpdate_action :: Lens' XssMatchSetUpdate ChangeAction
xssMatchSetUpdate_action = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\XssMatchSetUpdate' {ChangeAction
action :: ChangeAction
$sel:action:XssMatchSetUpdate' :: XssMatchSetUpdate -> ChangeAction
action} -> ChangeAction
action) (\s :: XssMatchSetUpdate
s@XssMatchSetUpdate' {} ChangeAction
a -> XssMatchSetUpdate
s {$sel:action:XssMatchSetUpdate' :: ChangeAction
action = ChangeAction
a} :: XssMatchSetUpdate)
xssMatchSetUpdate_xssMatchTuple :: Lens.Lens' XssMatchSetUpdate XssMatchTuple
xssMatchSetUpdate_xssMatchTuple :: Lens' XssMatchSetUpdate XssMatchTuple
xssMatchSetUpdate_xssMatchTuple = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\XssMatchSetUpdate' {XssMatchTuple
xssMatchTuple :: XssMatchTuple
$sel:xssMatchTuple:XssMatchSetUpdate' :: XssMatchSetUpdate -> XssMatchTuple
xssMatchTuple} -> XssMatchTuple
xssMatchTuple) (\s :: XssMatchSetUpdate
s@XssMatchSetUpdate' {} XssMatchTuple
a -> XssMatchSetUpdate
s {$sel:xssMatchTuple:XssMatchSetUpdate' :: XssMatchTuple
xssMatchTuple = XssMatchTuple
a} :: XssMatchSetUpdate)
instance Prelude.Hashable XssMatchSetUpdate where
hashWithSalt :: Int -> XssMatchSetUpdate -> Int
hashWithSalt Int
_salt XssMatchSetUpdate' {ChangeAction
XssMatchTuple
xssMatchTuple :: XssMatchTuple
action :: ChangeAction
$sel:xssMatchTuple:XssMatchSetUpdate' :: XssMatchSetUpdate -> XssMatchTuple
$sel:action:XssMatchSetUpdate' :: XssMatchSetUpdate -> ChangeAction
..} =
Int
_salt
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` ChangeAction
action
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` XssMatchTuple
xssMatchTuple
instance Prelude.NFData XssMatchSetUpdate where
rnf :: XssMatchSetUpdate -> ()
rnf XssMatchSetUpdate' {ChangeAction
XssMatchTuple
xssMatchTuple :: XssMatchTuple
action :: ChangeAction
$sel:xssMatchTuple:XssMatchSetUpdate' :: XssMatchSetUpdate -> XssMatchTuple
$sel:action:XssMatchSetUpdate' :: XssMatchSetUpdate -> ChangeAction
..} =
forall a. NFData a => a -> ()
Prelude.rnf ChangeAction
action
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf XssMatchTuple
xssMatchTuple
instance Data.ToJSON XssMatchSetUpdate where
toJSON :: XssMatchSetUpdate -> Value
toJSON XssMatchSetUpdate' {ChangeAction
XssMatchTuple
xssMatchTuple :: XssMatchTuple
action :: ChangeAction
$sel:xssMatchTuple:XssMatchSetUpdate' :: XssMatchSetUpdate -> XssMatchTuple
$sel:action:XssMatchSetUpdate' :: XssMatchSetUpdate -> ChangeAction
..} =
[Pair] -> Value
Data.object
( forall a. [Maybe a] -> [a]
Prelude.catMaybes
[ forall a. a -> Maybe a
Prelude.Just (Key
"Action" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..= ChangeAction
action),
forall a. a -> Maybe a
Prelude.Just
(Key
"XssMatchTuple" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..= XssMatchTuple
xssMatchTuple)
]
)