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