{-# 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.SizeConstraintSetUpdate where
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
import Amazonka.WAFRegional.Types.ChangeAction
import Amazonka.WAFRegional.Types.SizeConstraint
data SizeConstraintSetUpdate = SizeConstraintSetUpdate'
{
SizeConstraintSetUpdate -> ChangeAction
action :: ChangeAction,
SizeConstraintSetUpdate -> SizeConstraint
sizeConstraint :: SizeConstraint
}
deriving (SizeConstraintSetUpdate -> SizeConstraintSetUpdate -> Bool
(SizeConstraintSetUpdate -> SizeConstraintSetUpdate -> Bool)
-> (SizeConstraintSetUpdate -> SizeConstraintSetUpdate -> Bool)
-> Eq SizeConstraintSetUpdate
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: SizeConstraintSetUpdate -> SizeConstraintSetUpdate -> Bool
$c/= :: SizeConstraintSetUpdate -> SizeConstraintSetUpdate -> Bool
== :: SizeConstraintSetUpdate -> SizeConstraintSetUpdate -> Bool
$c== :: SizeConstraintSetUpdate -> SizeConstraintSetUpdate -> Bool
Prelude.Eq, ReadPrec [SizeConstraintSetUpdate]
ReadPrec SizeConstraintSetUpdate
Int -> ReadS SizeConstraintSetUpdate
ReadS [SizeConstraintSetUpdate]
(Int -> ReadS SizeConstraintSetUpdate)
-> ReadS [SizeConstraintSetUpdate]
-> ReadPrec SizeConstraintSetUpdate
-> ReadPrec [SizeConstraintSetUpdate]
-> Read SizeConstraintSetUpdate
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [SizeConstraintSetUpdate]
$creadListPrec :: ReadPrec [SizeConstraintSetUpdate]
readPrec :: ReadPrec SizeConstraintSetUpdate
$creadPrec :: ReadPrec SizeConstraintSetUpdate
readList :: ReadS [SizeConstraintSetUpdate]
$creadList :: ReadS [SizeConstraintSetUpdate]
readsPrec :: Int -> ReadS SizeConstraintSetUpdate
$creadsPrec :: Int -> ReadS SizeConstraintSetUpdate
Prelude.Read, Int -> SizeConstraintSetUpdate -> ShowS
[SizeConstraintSetUpdate] -> ShowS
SizeConstraintSetUpdate -> String
(Int -> SizeConstraintSetUpdate -> ShowS)
-> (SizeConstraintSetUpdate -> String)
-> ([SizeConstraintSetUpdate] -> ShowS)
-> Show SizeConstraintSetUpdate
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [SizeConstraintSetUpdate] -> ShowS
$cshowList :: [SizeConstraintSetUpdate] -> ShowS
show :: SizeConstraintSetUpdate -> String
$cshow :: SizeConstraintSetUpdate -> String
showsPrec :: Int -> SizeConstraintSetUpdate -> ShowS
$cshowsPrec :: Int -> SizeConstraintSetUpdate -> ShowS
Prelude.Show, (forall x.
SizeConstraintSetUpdate -> Rep SizeConstraintSetUpdate x)
-> (forall x.
Rep SizeConstraintSetUpdate x -> SizeConstraintSetUpdate)
-> Generic SizeConstraintSetUpdate
forall x. Rep SizeConstraintSetUpdate x -> SizeConstraintSetUpdate
forall x. SizeConstraintSetUpdate -> Rep SizeConstraintSetUpdate x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep SizeConstraintSetUpdate x -> SizeConstraintSetUpdate
$cfrom :: forall x. SizeConstraintSetUpdate -> Rep SizeConstraintSetUpdate x
Prelude.Generic)
newSizeConstraintSetUpdate ::
ChangeAction ->
SizeConstraint ->
SizeConstraintSetUpdate
newSizeConstraintSetUpdate :: ChangeAction -> SizeConstraint -> SizeConstraintSetUpdate
newSizeConstraintSetUpdate ChangeAction
pAction_ SizeConstraint
pSizeConstraint_ =
SizeConstraintSetUpdate' :: ChangeAction -> SizeConstraint -> SizeConstraintSetUpdate
SizeConstraintSetUpdate'
{ $sel:action:SizeConstraintSetUpdate' :: ChangeAction
action = ChangeAction
pAction_,
$sel:sizeConstraint:SizeConstraintSetUpdate' :: SizeConstraint
sizeConstraint = SizeConstraint
pSizeConstraint_
}
sizeConstraintSetUpdate_action :: Lens.Lens' SizeConstraintSetUpdate ChangeAction
sizeConstraintSetUpdate_action :: (ChangeAction -> f ChangeAction)
-> SizeConstraintSetUpdate -> f SizeConstraintSetUpdate
sizeConstraintSetUpdate_action = (SizeConstraintSetUpdate -> ChangeAction)
-> (SizeConstraintSetUpdate
-> ChangeAction -> SizeConstraintSetUpdate)
-> Lens
SizeConstraintSetUpdate
SizeConstraintSetUpdate
ChangeAction
ChangeAction
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\SizeConstraintSetUpdate' {ChangeAction
action :: ChangeAction
$sel:action:SizeConstraintSetUpdate' :: SizeConstraintSetUpdate -> ChangeAction
action} -> ChangeAction
action) (\s :: SizeConstraintSetUpdate
s@SizeConstraintSetUpdate' {} ChangeAction
a -> SizeConstraintSetUpdate
s {$sel:action:SizeConstraintSetUpdate' :: ChangeAction
action = ChangeAction
a} :: SizeConstraintSetUpdate)
sizeConstraintSetUpdate_sizeConstraint :: Lens.Lens' SizeConstraintSetUpdate SizeConstraint
sizeConstraintSetUpdate_sizeConstraint :: (SizeConstraint -> f SizeConstraint)
-> SizeConstraintSetUpdate -> f SizeConstraintSetUpdate
sizeConstraintSetUpdate_sizeConstraint = (SizeConstraintSetUpdate -> SizeConstraint)
-> (SizeConstraintSetUpdate
-> SizeConstraint -> SizeConstraintSetUpdate)
-> Lens
SizeConstraintSetUpdate
SizeConstraintSetUpdate
SizeConstraint
SizeConstraint
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\SizeConstraintSetUpdate' {SizeConstraint
sizeConstraint :: SizeConstraint
$sel:sizeConstraint:SizeConstraintSetUpdate' :: SizeConstraintSetUpdate -> SizeConstraint
sizeConstraint} -> SizeConstraint
sizeConstraint) (\s :: SizeConstraintSetUpdate
s@SizeConstraintSetUpdate' {} SizeConstraint
a -> SizeConstraintSetUpdate
s {$sel:sizeConstraint:SizeConstraintSetUpdate' :: SizeConstraint
sizeConstraint = SizeConstraint
a} :: SizeConstraintSetUpdate)
instance Prelude.Hashable SizeConstraintSetUpdate
instance Prelude.NFData SizeConstraintSetUpdate
instance Core.ToJSON SizeConstraintSetUpdate where
toJSON :: SizeConstraintSetUpdate -> Value
toJSON SizeConstraintSetUpdate' {ChangeAction
SizeConstraint
sizeConstraint :: SizeConstraint
action :: ChangeAction
$sel:sizeConstraint:SizeConstraintSetUpdate' :: SizeConstraintSetUpdate -> SizeConstraint
$sel:action:SizeConstraintSetUpdate' :: SizeConstraintSetUpdate -> ChangeAction
..} =
[Pair] -> Value
Core.object
( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
[ Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just (Text
"Action" Text -> ChangeAction -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= ChangeAction
action),
Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just
(Text
"SizeConstraint" Text -> SizeConstraint -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= SizeConstraint
sizeConstraint)
]
)