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