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