module Stratosphere.Logs.Transformer.ParseCloudfrontProperty (
ParseCloudfrontProperty(..), mkParseCloudfrontProperty
) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import Stratosphere.ResourceProperties
import Stratosphere.Value
data ParseCloudfrontProperty
=
ParseCloudfrontProperty {ParseCloudfrontProperty -> ()
haddock_workaround_ :: (),
ParseCloudfrontProperty -> Maybe (Value Text)
source :: (Prelude.Maybe (Value Prelude.Text))}
deriving stock (ParseCloudfrontProperty -> ParseCloudfrontProperty -> Bool
(ParseCloudfrontProperty -> ParseCloudfrontProperty -> Bool)
-> (ParseCloudfrontProperty -> ParseCloudfrontProperty -> Bool)
-> Eq ParseCloudfrontProperty
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: ParseCloudfrontProperty -> ParseCloudfrontProperty -> Bool
== :: ParseCloudfrontProperty -> ParseCloudfrontProperty -> Bool
$c/= :: ParseCloudfrontProperty -> ParseCloudfrontProperty -> Bool
/= :: ParseCloudfrontProperty -> ParseCloudfrontProperty -> Bool
Prelude.Eq, Int -> ParseCloudfrontProperty -> ShowS
[ParseCloudfrontProperty] -> ShowS
ParseCloudfrontProperty -> String
(Int -> ParseCloudfrontProperty -> ShowS)
-> (ParseCloudfrontProperty -> String)
-> ([ParseCloudfrontProperty] -> ShowS)
-> Show ParseCloudfrontProperty
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> ParseCloudfrontProperty -> ShowS
showsPrec :: Int -> ParseCloudfrontProperty -> ShowS
$cshow :: ParseCloudfrontProperty -> String
show :: ParseCloudfrontProperty -> String
$cshowList :: [ParseCloudfrontProperty] -> ShowS
showList :: [ParseCloudfrontProperty] -> ShowS
Prelude.Show)
mkParseCloudfrontProperty :: ParseCloudfrontProperty
mkParseCloudfrontProperty :: ParseCloudfrontProperty
mkParseCloudfrontProperty
= ParseCloudfrontProperty
{haddock_workaround_ :: ()
haddock_workaround_ = (), source :: Maybe (Value Text)
source = Maybe (Value Text)
forall a. Maybe a
Prelude.Nothing}
instance ToResourceProperties ParseCloudfrontProperty where
toResourceProperties :: ParseCloudfrontProperty -> ResourceProperties
toResourceProperties ParseCloudfrontProperty {Maybe (Value Text)
()
haddock_workaround_ :: ParseCloudfrontProperty -> ()
source :: ParseCloudfrontProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
source :: Maybe (Value Text)
..}
= ResourceProperties
{awsType :: Text
awsType = Text
"AWS::Logs::Transformer.ParseCloudfront",
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 ParseCloudfrontProperty where
toJSON :: ParseCloudfrontProperty -> Value
toJSON ParseCloudfrontProperty {Maybe (Value Text)
()
haddock_workaround_ :: ParseCloudfrontProperty -> ()
source :: ParseCloudfrontProperty -> 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" ParseCloudfrontProperty where
type PropertyType "Source" ParseCloudfrontProperty = Value Prelude.Text
set :: PropertyType "Source" ParseCloudfrontProperty
-> ParseCloudfrontProperty -> ParseCloudfrontProperty
set PropertyType "Source" ParseCloudfrontProperty
newValue ParseCloudfrontProperty {Maybe (Value Text)
()
haddock_workaround_ :: ParseCloudfrontProperty -> ()
source :: ParseCloudfrontProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
source :: Maybe (Value Text)
..}
= ParseCloudfrontProperty {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" ParseCloudfrontProperty
Value Text
newValue, ()
haddock_workaround_ :: ()
haddock_workaround_ :: ()
..}