module Stratosphere.AppSync.ChannelNamespace.IntegrationProperty (
module Exports, IntegrationProperty(..), mkIntegrationProperty
) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import {-# SOURCE #-} Stratosphere.AppSync.ChannelNamespace.LambdaConfigProperty as Exports
import Stratosphere.ResourceProperties
import Stratosphere.Value
data IntegrationProperty
=
IntegrationProperty {IntegrationProperty -> ()
haddock_workaround_ :: (),
IntegrationProperty -> Value Text
dataSourceName :: (Value Prelude.Text),
IntegrationProperty -> Maybe LambdaConfigProperty
lambdaConfig :: (Prelude.Maybe LambdaConfigProperty)}
deriving stock (IntegrationProperty -> IntegrationProperty -> Bool
(IntegrationProperty -> IntegrationProperty -> Bool)
-> (IntegrationProperty -> IntegrationProperty -> Bool)
-> Eq IntegrationProperty
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: IntegrationProperty -> IntegrationProperty -> Bool
== :: IntegrationProperty -> IntegrationProperty -> Bool
$c/= :: IntegrationProperty -> IntegrationProperty -> Bool
/= :: IntegrationProperty -> IntegrationProperty -> Bool
Prelude.Eq, Int -> IntegrationProperty -> ShowS
[IntegrationProperty] -> ShowS
IntegrationProperty -> String
(Int -> IntegrationProperty -> ShowS)
-> (IntegrationProperty -> String)
-> ([IntegrationProperty] -> ShowS)
-> Show IntegrationProperty
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> IntegrationProperty -> ShowS
showsPrec :: Int -> IntegrationProperty -> ShowS
$cshow :: IntegrationProperty -> String
show :: IntegrationProperty -> String
$cshowList :: [IntegrationProperty] -> ShowS
showList :: [IntegrationProperty] -> ShowS
Prelude.Show)
mkIntegrationProperty :: Value Prelude.Text -> IntegrationProperty
mkIntegrationProperty :: Value Text -> IntegrationProperty
mkIntegrationProperty Value Text
dataSourceName
= IntegrationProperty
{haddock_workaround_ :: ()
haddock_workaround_ = (), dataSourceName :: Value Text
dataSourceName = Value Text
dataSourceName,
lambdaConfig :: Maybe LambdaConfigProperty
lambdaConfig = Maybe LambdaConfigProperty
forall a. Maybe a
Prelude.Nothing}
instance ToResourceProperties IntegrationProperty where
toResourceProperties :: IntegrationProperty -> ResourceProperties
toResourceProperties IntegrationProperty {Maybe LambdaConfigProperty
()
Value Text
haddock_workaround_ :: IntegrationProperty -> ()
dataSourceName :: IntegrationProperty -> Value Text
lambdaConfig :: IntegrationProperty -> Maybe LambdaConfigProperty
haddock_workaround_ :: ()
dataSourceName :: Value Text
lambdaConfig :: Maybe LambdaConfigProperty
..}
= ResourceProperties
{awsType :: Text
awsType = Text
"AWS::AppSync::ChannelNamespace.Integration",
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
"DataSourceName" 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
dataSourceName]
([Maybe (Key, Value)] -> [(Key, Value)]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
[Key -> LambdaConfigProperty -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"LambdaConfig" (LambdaConfigProperty -> (Key, Value))
-> Maybe LambdaConfigProperty -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe LambdaConfigProperty
lambdaConfig]))}
instance JSON.ToJSON IntegrationProperty where
toJSON :: IntegrationProperty -> Value
toJSON IntegrationProperty {Maybe LambdaConfigProperty
()
Value Text
haddock_workaround_ :: IntegrationProperty -> ()
dataSourceName :: IntegrationProperty -> Value Text
lambdaConfig :: IntegrationProperty -> Maybe LambdaConfigProperty
haddock_workaround_ :: ()
dataSourceName :: Value Text
lambdaConfig :: Maybe LambdaConfigProperty
..}
= [(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
"DataSourceName" 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
dataSourceName]
([Maybe (Key, Value)] -> [(Key, Value)]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
[Key -> LambdaConfigProperty -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"LambdaConfig" (LambdaConfigProperty -> (Key, Value))
-> Maybe LambdaConfigProperty -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe LambdaConfigProperty
lambdaConfig])))
instance Property "DataSourceName" IntegrationProperty where
type PropertyType "DataSourceName" IntegrationProperty = Value Prelude.Text
set :: PropertyType "DataSourceName" IntegrationProperty
-> IntegrationProperty -> IntegrationProperty
set PropertyType "DataSourceName" IntegrationProperty
newValue IntegrationProperty {Maybe LambdaConfigProperty
()
Value Text
haddock_workaround_ :: IntegrationProperty -> ()
dataSourceName :: IntegrationProperty -> Value Text
lambdaConfig :: IntegrationProperty -> Maybe LambdaConfigProperty
haddock_workaround_ :: ()
dataSourceName :: Value Text
lambdaConfig :: Maybe LambdaConfigProperty
..}
= IntegrationProperty {dataSourceName :: Value Text
dataSourceName = PropertyType "DataSourceName" IntegrationProperty
Value Text
newValue, Maybe LambdaConfigProperty
()
haddock_workaround_ :: ()
lambdaConfig :: Maybe LambdaConfigProperty
haddock_workaround_ :: ()
lambdaConfig :: Maybe LambdaConfigProperty
..}
instance Property "LambdaConfig" IntegrationProperty where
type PropertyType "LambdaConfig" IntegrationProperty = LambdaConfigProperty
set :: PropertyType "LambdaConfig" IntegrationProperty
-> IntegrationProperty -> IntegrationProperty
set PropertyType "LambdaConfig" IntegrationProperty
newValue IntegrationProperty {Maybe LambdaConfigProperty
()
Value Text
haddock_workaround_ :: IntegrationProperty -> ()
dataSourceName :: IntegrationProperty -> Value Text
lambdaConfig :: IntegrationProperty -> Maybe LambdaConfigProperty
haddock_workaround_ :: ()
dataSourceName :: Value Text
lambdaConfig :: Maybe LambdaConfigProperty
..}
= IntegrationProperty {lambdaConfig :: Maybe LambdaConfigProperty
lambdaConfig = LambdaConfigProperty -> Maybe LambdaConfigProperty
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "LambdaConfig" IntegrationProperty
LambdaConfigProperty
newValue, ()
Value Text
haddock_workaround_ :: ()
dataSourceName :: Value Text
haddock_workaround_ :: ()
dataSourceName :: Value Text
..}