module Stratosphere.WAFv2.WebACL.BodyProperty (
        BodyProperty(..), mkBodyProperty
    ) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import Stratosphere.ResourceProperties
import Stratosphere.Value
data BodyProperty
  = -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-wafv2-webacl-body.html>
    BodyProperty {BodyProperty -> ()
haddock_workaround_ :: (),
                  -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-wafv2-webacl-body.html#cfn-wafv2-webacl-body-oversizehandling>
                  BodyProperty -> Maybe (Value Text)
oversizeHandling :: (Prelude.Maybe (Value Prelude.Text))}
  deriving stock (BodyProperty -> BodyProperty -> Bool
(BodyProperty -> BodyProperty -> Bool)
-> (BodyProperty -> BodyProperty -> Bool) -> Eq BodyProperty
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: BodyProperty -> BodyProperty -> Bool
== :: BodyProperty -> BodyProperty -> Bool
$c/= :: BodyProperty -> BodyProperty -> Bool
/= :: BodyProperty -> BodyProperty -> Bool
Prelude.Eq, Int -> BodyProperty -> ShowS
[BodyProperty] -> ShowS
BodyProperty -> String
(Int -> BodyProperty -> ShowS)
-> (BodyProperty -> String)
-> ([BodyProperty] -> ShowS)
-> Show BodyProperty
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> BodyProperty -> ShowS
showsPrec :: Int -> BodyProperty -> ShowS
$cshow :: BodyProperty -> String
show :: BodyProperty -> String
$cshowList :: [BodyProperty] -> ShowS
showList :: [BodyProperty] -> ShowS
Prelude.Show)
mkBodyProperty :: BodyProperty
mkBodyProperty :: BodyProperty
mkBodyProperty
  = BodyProperty
      {haddock_workaround_ :: ()
haddock_workaround_ = (), oversizeHandling :: Maybe (Value Text)
oversizeHandling = Maybe (Value Text)
forall a. Maybe a
Prelude.Nothing}
instance ToResourceProperties BodyProperty where
  toResourceProperties :: BodyProperty -> ResourceProperties
toResourceProperties BodyProperty {Maybe (Value Text)
()
haddock_workaround_ :: BodyProperty -> ()
oversizeHandling :: BodyProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
oversizeHandling :: Maybe (Value Text)
..}
    = ResourceProperties
        {awsType :: Text
awsType = Text
"AWS::WAFv2::WebACL.Body", supportsTags :: Bool
supportsTags = Bool
Prelude.False,
         properties :: Object
properties = [Item Object] -> Object
forall l. IsList l => [Item l] -> l
Prelude.fromList
                        ([Maybe (Key, Value)] -> [(Key, Value)]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
                           [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..=) Key
"OversizeHandling" (Value Text -> (Key, Value))
-> Maybe (Value Text) -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (Value Text)
oversizeHandling])}
instance JSON.ToJSON BodyProperty where
  toJSON :: BodyProperty -> Value
toJSON BodyProperty {Maybe (Value Text)
()
haddock_workaround_ :: BodyProperty -> ()
oversizeHandling :: BodyProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
oversizeHandling :: Maybe (Value Text)
..}
    = [(Key, Value)] -> Value
JSON.object
        ([Item [(Key, Value)]] -> [(Key, Value)]
forall l. IsList l => [Item l] -> l
Prelude.fromList
           ([Maybe (Key, Value)] -> [(Key, Value)]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
              [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..=) Key
"OversizeHandling" (Value Text -> (Key, Value))
-> Maybe (Value Text) -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (Value Text)
oversizeHandling]))
instance Property "OversizeHandling" BodyProperty where
  type PropertyType "OversizeHandling" BodyProperty = Value Prelude.Text
  set :: PropertyType "OversizeHandling" BodyProperty
-> BodyProperty -> BodyProperty
set PropertyType "OversizeHandling" BodyProperty
newValue BodyProperty {Maybe (Value Text)
()
haddock_workaround_ :: BodyProperty -> ()
oversizeHandling :: BodyProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
oversizeHandling :: Maybe (Value Text)
..}
    = BodyProperty {oversizeHandling :: Maybe (Value Text)
oversizeHandling = Value Text -> Maybe (Value Text)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "OversizeHandling" BodyProperty
Value Text
newValue, ()
haddock_workaround_ :: ()
haddock_workaround_ :: ()
..}