module Stratosphere.WAFv2.WebACL.FieldToProtectProperty (
        FieldToProtectProperty(..), mkFieldToProtectProperty
    ) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import Stratosphere.ResourceProperties
import Stratosphere.Value
data FieldToProtectProperty
  = -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-wafv2-webacl-fieldtoprotect.html>
    FieldToProtectProperty {FieldToProtectProperty -> ()
haddock_workaround_ :: (),
                            -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-wafv2-webacl-fieldtoprotect.html#cfn-wafv2-webacl-fieldtoprotect-fieldkeys>
                            FieldToProtectProperty -> Maybe (ValueList Text)
fieldKeys :: (Prelude.Maybe (ValueList Prelude.Text)),
                            -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-wafv2-webacl-fieldtoprotect.html#cfn-wafv2-webacl-fieldtoprotect-fieldtype>
                            FieldToProtectProperty -> Value Text
fieldType :: (Value Prelude.Text)}
  deriving stock (FieldToProtectProperty -> FieldToProtectProperty -> Bool
(FieldToProtectProperty -> FieldToProtectProperty -> Bool)
-> (FieldToProtectProperty -> FieldToProtectProperty -> Bool)
-> Eq FieldToProtectProperty
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: FieldToProtectProperty -> FieldToProtectProperty -> Bool
== :: FieldToProtectProperty -> FieldToProtectProperty -> Bool
$c/= :: FieldToProtectProperty -> FieldToProtectProperty -> Bool
/= :: FieldToProtectProperty -> FieldToProtectProperty -> Bool
Prelude.Eq, Int -> FieldToProtectProperty -> ShowS
[FieldToProtectProperty] -> ShowS
FieldToProtectProperty -> String
(Int -> FieldToProtectProperty -> ShowS)
-> (FieldToProtectProperty -> String)
-> ([FieldToProtectProperty] -> ShowS)
-> Show FieldToProtectProperty
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> FieldToProtectProperty -> ShowS
showsPrec :: Int -> FieldToProtectProperty -> ShowS
$cshow :: FieldToProtectProperty -> String
show :: FieldToProtectProperty -> String
$cshowList :: [FieldToProtectProperty] -> ShowS
showList :: [FieldToProtectProperty] -> ShowS
Prelude.Show)
mkFieldToProtectProperty ::
  Value Prelude.Text -> FieldToProtectProperty
mkFieldToProtectProperty :: Value Text -> FieldToProtectProperty
mkFieldToProtectProperty Value Text
fieldType
  = FieldToProtectProperty
      {haddock_workaround_ :: ()
haddock_workaround_ = (), fieldType :: Value Text
fieldType = Value Text
fieldType,
       fieldKeys :: Maybe (ValueList Text)
fieldKeys = Maybe (ValueList Text)
forall a. Maybe a
Prelude.Nothing}
instance ToResourceProperties FieldToProtectProperty where
  toResourceProperties :: FieldToProtectProperty -> ResourceProperties
toResourceProperties FieldToProtectProperty {Maybe (ValueList Text)
()
Value Text
haddock_workaround_ :: FieldToProtectProperty -> ()
fieldKeys :: FieldToProtectProperty -> Maybe (ValueList Text)
fieldType :: FieldToProtectProperty -> Value Text
haddock_workaround_ :: ()
fieldKeys :: Maybe (ValueList Text)
fieldType :: Value Text
..}
    = ResourceProperties
        {awsType :: Text
awsType = Text
"AWS::WAFv2::WebACL.FieldToProtect",
         supportsTags :: Bool
supportsTags = Bool
Prelude.False,
         properties :: Object
properties = [Item Object] -> Object
forall l. IsList l => [Item l] -> l
Prelude.fromList
                        ([(Key, Value)] -> [(Key, Value)] -> [(Key, Value)]
forall a. Semigroup a => a -> a -> a
(Prelude.<>)
                           [Key
"FieldType" Key -> Value Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
JSON..= Value Text
fieldType]
                           ([Maybe (Key, Value)] -> [(Key, Value)]
forall a. [Maybe a] -> [a]
Prelude.catMaybes [Key -> ValueList Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"FieldKeys" (ValueList Text -> (Key, Value))
-> Maybe (ValueList Text) -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (ValueList Text)
fieldKeys]))}
instance JSON.ToJSON FieldToProtectProperty where
  toJSON :: FieldToProtectProperty -> Value
toJSON FieldToProtectProperty {Maybe (ValueList Text)
()
Value Text
haddock_workaround_ :: FieldToProtectProperty -> ()
fieldKeys :: FieldToProtectProperty -> Maybe (ValueList Text)
fieldType :: FieldToProtectProperty -> Value Text
haddock_workaround_ :: ()
fieldKeys :: Maybe (ValueList Text)
fieldType :: Value Text
..}
    = [(Key, Value)] -> Value
JSON.object
        ([Item [(Key, Value)]] -> [(Key, Value)]
forall l. IsList l => [Item l] -> l
Prelude.fromList
           ([(Key, Value)] -> [(Key, Value)] -> [(Key, Value)]
forall a. Semigroup a => a -> a -> a
(Prelude.<>)
              [Key
"FieldType" Key -> Value Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
JSON..= Value Text
fieldType]
              ([Maybe (Key, Value)] -> [(Key, Value)]
forall a. [Maybe a] -> [a]
Prelude.catMaybes [Key -> ValueList Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"FieldKeys" (ValueList Text -> (Key, Value))
-> Maybe (ValueList Text) -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (ValueList Text)
fieldKeys])))
instance Property "FieldKeys" FieldToProtectProperty where
  type PropertyType "FieldKeys" FieldToProtectProperty = ValueList Prelude.Text
  set :: PropertyType "FieldKeys" FieldToProtectProperty
-> FieldToProtectProperty -> FieldToProtectProperty
set PropertyType "FieldKeys" FieldToProtectProperty
newValue FieldToProtectProperty {Maybe (ValueList Text)
()
Value Text
haddock_workaround_ :: FieldToProtectProperty -> ()
fieldKeys :: FieldToProtectProperty -> Maybe (ValueList Text)
fieldType :: FieldToProtectProperty -> Value Text
haddock_workaround_ :: ()
fieldKeys :: Maybe (ValueList Text)
fieldType :: Value Text
..}
    = FieldToProtectProperty {fieldKeys :: Maybe (ValueList Text)
fieldKeys = ValueList Text -> Maybe (ValueList Text)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "FieldKeys" FieldToProtectProperty
ValueList Text
newValue, ()
Value Text
haddock_workaround_ :: ()
fieldType :: Value Text
haddock_workaround_ :: ()
fieldType :: Value Text
..}
instance Property "FieldType" FieldToProtectProperty where
  type PropertyType "FieldType" FieldToProtectProperty = Value Prelude.Text
  set :: PropertyType "FieldType" FieldToProtectProperty
-> FieldToProtectProperty -> FieldToProtectProperty
set PropertyType "FieldType" FieldToProtectProperty
newValue FieldToProtectProperty {Maybe (ValueList Text)
()
Value Text
haddock_workaround_ :: FieldToProtectProperty -> ()
fieldKeys :: FieldToProtectProperty -> Maybe (ValueList Text)
fieldType :: FieldToProtectProperty -> Value Text
haddock_workaround_ :: ()
fieldKeys :: Maybe (ValueList Text)
fieldType :: Value Text
..}
    = FieldToProtectProperty {fieldType :: Value Text
fieldType = PropertyType "FieldType" FieldToProtectProperty
Value Text
newValue, Maybe (ValueList Text)
()
haddock_workaround_ :: ()
fieldKeys :: Maybe (ValueList Text)
haddock_workaround_ :: ()
fieldKeys :: Maybe (ValueList Text)
..}