{-# 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.WAF.Types.RegexMatchSetUpdate 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.WAF.Types.ChangeAction
import Amazonka.WAF.Types.RegexMatchTuple
data RegexMatchSetUpdate = RegexMatchSetUpdate'
{
RegexMatchSetUpdate -> ChangeAction
action :: ChangeAction,
RegexMatchSetUpdate -> RegexMatchTuple
regexMatchTuple :: RegexMatchTuple
}
deriving (RegexMatchSetUpdate -> RegexMatchSetUpdate -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: RegexMatchSetUpdate -> RegexMatchSetUpdate -> Bool
$c/= :: RegexMatchSetUpdate -> RegexMatchSetUpdate -> Bool
== :: RegexMatchSetUpdate -> RegexMatchSetUpdate -> Bool
$c== :: RegexMatchSetUpdate -> RegexMatchSetUpdate -> Bool
Prelude.Eq, ReadPrec [RegexMatchSetUpdate]
ReadPrec RegexMatchSetUpdate
Int -> ReadS RegexMatchSetUpdate
ReadS [RegexMatchSetUpdate]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [RegexMatchSetUpdate]
$creadListPrec :: ReadPrec [RegexMatchSetUpdate]
readPrec :: ReadPrec RegexMatchSetUpdate
$creadPrec :: ReadPrec RegexMatchSetUpdate
readList :: ReadS [RegexMatchSetUpdate]
$creadList :: ReadS [RegexMatchSetUpdate]
readsPrec :: Int -> ReadS RegexMatchSetUpdate
$creadsPrec :: Int -> ReadS RegexMatchSetUpdate
Prelude.Read, Int -> RegexMatchSetUpdate -> ShowS
[RegexMatchSetUpdate] -> ShowS
RegexMatchSetUpdate -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [RegexMatchSetUpdate] -> ShowS
$cshowList :: [RegexMatchSetUpdate] -> ShowS
show :: RegexMatchSetUpdate -> String
$cshow :: RegexMatchSetUpdate -> String
showsPrec :: Int -> RegexMatchSetUpdate -> ShowS
$cshowsPrec :: Int -> RegexMatchSetUpdate -> ShowS
Prelude.Show, forall x. Rep RegexMatchSetUpdate x -> RegexMatchSetUpdate
forall x. RegexMatchSetUpdate -> Rep RegexMatchSetUpdate x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep RegexMatchSetUpdate x -> RegexMatchSetUpdate
$cfrom :: forall x. RegexMatchSetUpdate -> Rep RegexMatchSetUpdate x
Prelude.Generic)
newRegexMatchSetUpdate ::
ChangeAction ->
RegexMatchTuple ->
RegexMatchSetUpdate
newRegexMatchSetUpdate :: ChangeAction -> RegexMatchTuple -> RegexMatchSetUpdate
newRegexMatchSetUpdate ChangeAction
pAction_ RegexMatchTuple
pRegexMatchTuple_ =
RegexMatchSetUpdate'
{ $sel:action:RegexMatchSetUpdate' :: ChangeAction
action = ChangeAction
pAction_,
$sel:regexMatchTuple:RegexMatchSetUpdate' :: RegexMatchTuple
regexMatchTuple = RegexMatchTuple
pRegexMatchTuple_
}
regexMatchSetUpdate_action :: Lens.Lens' RegexMatchSetUpdate ChangeAction
regexMatchSetUpdate_action :: Lens' RegexMatchSetUpdate ChangeAction
regexMatchSetUpdate_action = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\RegexMatchSetUpdate' {ChangeAction
action :: ChangeAction
$sel:action:RegexMatchSetUpdate' :: RegexMatchSetUpdate -> ChangeAction
action} -> ChangeAction
action) (\s :: RegexMatchSetUpdate
s@RegexMatchSetUpdate' {} ChangeAction
a -> RegexMatchSetUpdate
s {$sel:action:RegexMatchSetUpdate' :: ChangeAction
action = ChangeAction
a} :: RegexMatchSetUpdate)
regexMatchSetUpdate_regexMatchTuple :: Lens.Lens' RegexMatchSetUpdate RegexMatchTuple
regexMatchSetUpdate_regexMatchTuple :: Lens' RegexMatchSetUpdate RegexMatchTuple
regexMatchSetUpdate_regexMatchTuple = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\RegexMatchSetUpdate' {RegexMatchTuple
regexMatchTuple :: RegexMatchTuple
$sel:regexMatchTuple:RegexMatchSetUpdate' :: RegexMatchSetUpdate -> RegexMatchTuple
regexMatchTuple} -> RegexMatchTuple
regexMatchTuple) (\s :: RegexMatchSetUpdate
s@RegexMatchSetUpdate' {} RegexMatchTuple
a -> RegexMatchSetUpdate
s {$sel:regexMatchTuple:RegexMatchSetUpdate' :: RegexMatchTuple
regexMatchTuple = RegexMatchTuple
a} :: RegexMatchSetUpdate)
instance Prelude.Hashable RegexMatchSetUpdate where
hashWithSalt :: Int -> RegexMatchSetUpdate -> Int
hashWithSalt Int
_salt RegexMatchSetUpdate' {ChangeAction
RegexMatchTuple
regexMatchTuple :: RegexMatchTuple
action :: ChangeAction
$sel:regexMatchTuple:RegexMatchSetUpdate' :: RegexMatchSetUpdate -> RegexMatchTuple
$sel:action:RegexMatchSetUpdate' :: RegexMatchSetUpdate -> ChangeAction
..} =
Int
_salt
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` ChangeAction
action
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` RegexMatchTuple
regexMatchTuple
instance Prelude.NFData RegexMatchSetUpdate where
rnf :: RegexMatchSetUpdate -> ()
rnf RegexMatchSetUpdate' {ChangeAction
RegexMatchTuple
regexMatchTuple :: RegexMatchTuple
action :: ChangeAction
$sel:regexMatchTuple:RegexMatchSetUpdate' :: RegexMatchSetUpdate -> RegexMatchTuple
$sel:action:RegexMatchSetUpdate' :: RegexMatchSetUpdate -> 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 RegexMatchTuple
regexMatchTuple
instance Data.ToJSON RegexMatchSetUpdate where
toJSON :: RegexMatchSetUpdate -> Value
toJSON RegexMatchSetUpdate' {ChangeAction
RegexMatchTuple
regexMatchTuple :: RegexMatchTuple
action :: ChangeAction
$sel:regexMatchTuple:RegexMatchSetUpdate' :: RegexMatchSetUpdate -> RegexMatchTuple
$sel:action:RegexMatchSetUpdate' :: RegexMatchSetUpdate -> 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
"RegexMatchTuple" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..= RegexMatchTuple
regexMatchTuple)
]
)