module Stratosphere.WAFv2.RuleGroup.LabelSummaryProperty (
        LabelSummaryProperty(..), mkLabelSummaryProperty
    ) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import Stratosphere.ResourceProperties
import Stratosphere.Value
data LabelSummaryProperty
  = -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-wafv2-rulegroup-labelsummary.html>
    LabelSummaryProperty {LabelSummaryProperty -> ()
haddock_workaround_ :: (),
                          -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-wafv2-rulegroup-labelsummary.html#cfn-wafv2-rulegroup-labelsummary-name>
                          LabelSummaryProperty -> Maybe (Value Text)
name :: (Prelude.Maybe (Value Prelude.Text))}
  deriving stock (LabelSummaryProperty -> LabelSummaryProperty -> Bool
(LabelSummaryProperty -> LabelSummaryProperty -> Bool)
-> (LabelSummaryProperty -> LabelSummaryProperty -> Bool)
-> Eq LabelSummaryProperty
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: LabelSummaryProperty -> LabelSummaryProperty -> Bool
== :: LabelSummaryProperty -> LabelSummaryProperty -> Bool
$c/= :: LabelSummaryProperty -> LabelSummaryProperty -> Bool
/= :: LabelSummaryProperty -> LabelSummaryProperty -> Bool
Prelude.Eq, Int -> LabelSummaryProperty -> ShowS
[LabelSummaryProperty] -> ShowS
LabelSummaryProperty -> String
(Int -> LabelSummaryProperty -> ShowS)
-> (LabelSummaryProperty -> String)
-> ([LabelSummaryProperty] -> ShowS)
-> Show LabelSummaryProperty
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> LabelSummaryProperty -> ShowS
showsPrec :: Int -> LabelSummaryProperty -> ShowS
$cshow :: LabelSummaryProperty -> String
show :: LabelSummaryProperty -> String
$cshowList :: [LabelSummaryProperty] -> ShowS
showList :: [LabelSummaryProperty] -> ShowS
Prelude.Show)
mkLabelSummaryProperty :: LabelSummaryProperty
mkLabelSummaryProperty :: LabelSummaryProperty
mkLabelSummaryProperty
  = LabelSummaryProperty
      {haddock_workaround_ :: ()
haddock_workaround_ = (), name :: Maybe (Value Text)
name = Maybe (Value Text)
forall a. Maybe a
Prelude.Nothing}
instance ToResourceProperties LabelSummaryProperty where
  toResourceProperties :: LabelSummaryProperty -> ResourceProperties
toResourceProperties LabelSummaryProperty {Maybe (Value Text)
()
haddock_workaround_ :: LabelSummaryProperty -> ()
name :: LabelSummaryProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
name :: Maybe (Value Text)
..}
    = ResourceProperties
        {awsType :: Text
awsType = Text
"AWS::WAFv2::RuleGroup.LabelSummary",
         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
"Name" (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)
name])}
instance JSON.ToJSON LabelSummaryProperty where
  toJSON :: LabelSummaryProperty -> Value
toJSON LabelSummaryProperty {Maybe (Value Text)
()
haddock_workaround_ :: LabelSummaryProperty -> ()
name :: LabelSummaryProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
name :: 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
"Name" (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)
name]))
instance Property "Name" LabelSummaryProperty where
  type PropertyType "Name" LabelSummaryProperty = Value Prelude.Text
  set :: PropertyType "Name" LabelSummaryProperty
-> LabelSummaryProperty -> LabelSummaryProperty
set PropertyType "Name" LabelSummaryProperty
newValue LabelSummaryProperty {Maybe (Value Text)
()
haddock_workaround_ :: LabelSummaryProperty -> ()
name :: LabelSummaryProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
name :: Maybe (Value Text)
..}
    = LabelSummaryProperty {name :: Maybe (Value Text)
name = Value Text -> Maybe (Value Text)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "Name" LabelSummaryProperty
Value Text
newValue, ()
haddock_workaround_ :: ()
haddock_workaround_ :: ()
..}