module Stratosphere.AppSync.DataSource.RelationalDatabaseConfigProperty (
        module Exports, RelationalDatabaseConfigProperty(..),
        mkRelationalDatabaseConfigProperty
    ) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import {-# SOURCE #-} Stratosphere.AppSync.DataSource.RdsHttpEndpointConfigProperty as Exports
import Stratosphere.ResourceProperties
import Stratosphere.Value
data RelationalDatabaseConfigProperty
  = -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-appsync-datasource-relationaldatabaseconfig.html>
    RelationalDatabaseConfigProperty {RelationalDatabaseConfigProperty -> ()
haddock_workaround_ :: (),
                                      -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-appsync-datasource-relationaldatabaseconfig.html#cfn-appsync-datasource-relationaldatabaseconfig-rdshttpendpointconfig>
                                      RelationalDatabaseConfigProperty
-> Maybe RdsHttpEndpointConfigProperty
rdsHttpEndpointConfig :: (Prelude.Maybe RdsHttpEndpointConfigProperty),
                                      -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-appsync-datasource-relationaldatabaseconfig.html#cfn-appsync-datasource-relationaldatabaseconfig-relationaldatabasesourcetype>
                                      RelationalDatabaseConfigProperty -> Value Text
relationalDatabaseSourceType :: (Value Prelude.Text)}
  deriving stock (RelationalDatabaseConfigProperty
-> RelationalDatabaseConfigProperty -> Bool
(RelationalDatabaseConfigProperty
 -> RelationalDatabaseConfigProperty -> Bool)
-> (RelationalDatabaseConfigProperty
    -> RelationalDatabaseConfigProperty -> Bool)
-> Eq RelationalDatabaseConfigProperty
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: RelationalDatabaseConfigProperty
-> RelationalDatabaseConfigProperty -> Bool
== :: RelationalDatabaseConfigProperty
-> RelationalDatabaseConfigProperty -> Bool
$c/= :: RelationalDatabaseConfigProperty
-> RelationalDatabaseConfigProperty -> Bool
/= :: RelationalDatabaseConfigProperty
-> RelationalDatabaseConfigProperty -> Bool
Prelude.Eq, Int -> RelationalDatabaseConfigProperty -> ShowS
[RelationalDatabaseConfigProperty] -> ShowS
RelationalDatabaseConfigProperty -> String
(Int -> RelationalDatabaseConfigProperty -> ShowS)
-> (RelationalDatabaseConfigProperty -> String)
-> ([RelationalDatabaseConfigProperty] -> ShowS)
-> Show RelationalDatabaseConfigProperty
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> RelationalDatabaseConfigProperty -> ShowS
showsPrec :: Int -> RelationalDatabaseConfigProperty -> ShowS
$cshow :: RelationalDatabaseConfigProperty -> String
show :: RelationalDatabaseConfigProperty -> String
$cshowList :: [RelationalDatabaseConfigProperty] -> ShowS
showList :: [RelationalDatabaseConfigProperty] -> ShowS
Prelude.Show)
mkRelationalDatabaseConfigProperty ::
  Value Prelude.Text -> RelationalDatabaseConfigProperty
mkRelationalDatabaseConfigProperty :: Value Text -> RelationalDatabaseConfigProperty
mkRelationalDatabaseConfigProperty Value Text
relationalDatabaseSourceType
  = RelationalDatabaseConfigProperty
      {haddock_workaround_ :: ()
haddock_workaround_ = (),
       relationalDatabaseSourceType :: Value Text
relationalDatabaseSourceType = Value Text
relationalDatabaseSourceType,
       rdsHttpEndpointConfig :: Maybe RdsHttpEndpointConfigProperty
rdsHttpEndpointConfig = Maybe RdsHttpEndpointConfigProperty
forall a. Maybe a
Prelude.Nothing}
instance ToResourceProperties RelationalDatabaseConfigProperty where
  toResourceProperties :: RelationalDatabaseConfigProperty -> ResourceProperties
toResourceProperties RelationalDatabaseConfigProperty {Maybe RdsHttpEndpointConfigProperty
()
Value Text
haddock_workaround_ :: RelationalDatabaseConfigProperty -> ()
rdsHttpEndpointConfig :: RelationalDatabaseConfigProperty
-> Maybe RdsHttpEndpointConfigProperty
relationalDatabaseSourceType :: RelationalDatabaseConfigProperty -> Value Text
haddock_workaround_ :: ()
rdsHttpEndpointConfig :: Maybe RdsHttpEndpointConfigProperty
relationalDatabaseSourceType :: Value Text
..}
    = ResourceProperties
        {awsType :: Text
awsType = Text
"AWS::AppSync::DataSource.RelationalDatabaseConfig",
         supportsTags :: Bool
supportsTags = Bool
Prelude.False,
         properties :: Object
properties = [Item Object] -> Object
forall l. IsList l => [Item l] -> l
Prelude.fromList
                        ([(Key, Value)] -> [(Key, Value)] -> [(Key, Value)]
forall a. Semigroup a => a -> a -> a
(Prelude.<>)
                           [Key
"RelationalDatabaseSourceType"
                              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..= Value Text
relationalDatabaseSourceType]
                           ([Maybe (Key, Value)] -> [(Key, Value)]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
                              [Key -> RdsHttpEndpointConfigProperty -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"RdsHttpEndpointConfig"
                                 (RdsHttpEndpointConfigProperty -> (Key, Value))
-> Maybe RdsHttpEndpointConfigProperty -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe RdsHttpEndpointConfigProperty
rdsHttpEndpointConfig]))}
instance JSON.ToJSON RelationalDatabaseConfigProperty where
  toJSON :: RelationalDatabaseConfigProperty -> Value
toJSON RelationalDatabaseConfigProperty {Maybe RdsHttpEndpointConfigProperty
()
Value Text
haddock_workaround_ :: RelationalDatabaseConfigProperty -> ()
rdsHttpEndpointConfig :: RelationalDatabaseConfigProperty
-> Maybe RdsHttpEndpointConfigProperty
relationalDatabaseSourceType :: RelationalDatabaseConfigProperty -> Value Text
haddock_workaround_ :: ()
rdsHttpEndpointConfig :: Maybe RdsHttpEndpointConfigProperty
relationalDatabaseSourceType :: Value Text
..}
    = [(Key, Value)] -> Value
JSON.object
        ([Item [(Key, Value)]] -> [(Key, Value)]
forall l. IsList l => [Item l] -> l
Prelude.fromList
           ([(Key, Value)] -> [(Key, Value)] -> [(Key, Value)]
forall a. Semigroup a => a -> a -> a
(Prelude.<>)
              [Key
"RelationalDatabaseSourceType"
                 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..= Value Text
relationalDatabaseSourceType]
              ([Maybe (Key, Value)] -> [(Key, Value)]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
                 [Key -> RdsHttpEndpointConfigProperty -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"RdsHttpEndpointConfig"
                    (RdsHttpEndpointConfigProperty -> (Key, Value))
-> Maybe RdsHttpEndpointConfigProperty -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe RdsHttpEndpointConfigProperty
rdsHttpEndpointConfig])))
instance Property "RdsHttpEndpointConfig" RelationalDatabaseConfigProperty where
  type PropertyType "RdsHttpEndpointConfig" RelationalDatabaseConfigProperty = RdsHttpEndpointConfigProperty
  set :: PropertyType
  "RdsHttpEndpointConfig" RelationalDatabaseConfigProperty
-> RelationalDatabaseConfigProperty
-> RelationalDatabaseConfigProperty
set PropertyType
  "RdsHttpEndpointConfig" RelationalDatabaseConfigProperty
newValue RelationalDatabaseConfigProperty {Maybe RdsHttpEndpointConfigProperty
()
Value Text
haddock_workaround_ :: RelationalDatabaseConfigProperty -> ()
rdsHttpEndpointConfig :: RelationalDatabaseConfigProperty
-> Maybe RdsHttpEndpointConfigProperty
relationalDatabaseSourceType :: RelationalDatabaseConfigProperty -> Value Text
haddock_workaround_ :: ()
rdsHttpEndpointConfig :: Maybe RdsHttpEndpointConfigProperty
relationalDatabaseSourceType :: Value Text
..}
    = RelationalDatabaseConfigProperty
        {rdsHttpEndpointConfig :: Maybe RdsHttpEndpointConfigProperty
rdsHttpEndpointConfig = RdsHttpEndpointConfigProperty
-> Maybe RdsHttpEndpointConfigProperty
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType
  "RdsHttpEndpointConfig" RelationalDatabaseConfigProperty
RdsHttpEndpointConfigProperty
newValue, ()
Value Text
haddock_workaround_ :: ()
relationalDatabaseSourceType :: Value Text
haddock_workaround_ :: ()
relationalDatabaseSourceType :: Value Text
..}
instance Property "RelationalDatabaseSourceType" RelationalDatabaseConfigProperty where
  type PropertyType "RelationalDatabaseSourceType" RelationalDatabaseConfigProperty = Value Prelude.Text
  set :: PropertyType
  "RelationalDatabaseSourceType" RelationalDatabaseConfigProperty
-> RelationalDatabaseConfigProperty
-> RelationalDatabaseConfigProperty
set PropertyType
  "RelationalDatabaseSourceType" RelationalDatabaseConfigProperty
newValue RelationalDatabaseConfigProperty {Maybe RdsHttpEndpointConfigProperty
()
Value Text
haddock_workaround_ :: RelationalDatabaseConfigProperty -> ()
rdsHttpEndpointConfig :: RelationalDatabaseConfigProperty
-> Maybe RdsHttpEndpointConfigProperty
relationalDatabaseSourceType :: RelationalDatabaseConfigProperty -> Value Text
haddock_workaround_ :: ()
rdsHttpEndpointConfig :: Maybe RdsHttpEndpointConfigProperty
relationalDatabaseSourceType :: Value Text
..}
    = RelationalDatabaseConfigProperty
        {relationalDatabaseSourceType :: Value Text
relationalDatabaseSourceType = PropertyType
  "RelationalDatabaseSourceType" RelationalDatabaseConfigProperty
Value Text
newValue, Maybe RdsHttpEndpointConfigProperty
()
haddock_workaround_ :: ()
rdsHttpEndpointConfig :: Maybe RdsHttpEndpointConfigProperty
haddock_workaround_ :: ()
rdsHttpEndpointConfig :: Maybe RdsHttpEndpointConfigProperty
..}