module Stratosphere.AppSync.SourceApiAssociation.SourceApiAssociationConfigProperty (
        SourceApiAssociationConfigProperty(..),
        mkSourceApiAssociationConfigProperty
    ) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import Stratosphere.ResourceProperties
import Stratosphere.Value
data SourceApiAssociationConfigProperty
  = -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-appsync-sourceapiassociation-sourceapiassociationconfig.html>
    SourceApiAssociationConfigProperty {SourceApiAssociationConfigProperty -> ()
haddock_workaround_ :: (),
                                        -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-appsync-sourceapiassociation-sourceapiassociationconfig.html#cfn-appsync-sourceapiassociation-sourceapiassociationconfig-mergetype>
                                        SourceApiAssociationConfigProperty -> Maybe (Value Text)
mergeType :: (Prelude.Maybe (Value Prelude.Text))}
  deriving stock (SourceApiAssociationConfigProperty
-> SourceApiAssociationConfigProperty -> Bool
(SourceApiAssociationConfigProperty
 -> SourceApiAssociationConfigProperty -> Bool)
-> (SourceApiAssociationConfigProperty
    -> SourceApiAssociationConfigProperty -> Bool)
-> Eq SourceApiAssociationConfigProperty
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: SourceApiAssociationConfigProperty
-> SourceApiAssociationConfigProperty -> Bool
== :: SourceApiAssociationConfigProperty
-> SourceApiAssociationConfigProperty -> Bool
$c/= :: SourceApiAssociationConfigProperty
-> SourceApiAssociationConfigProperty -> Bool
/= :: SourceApiAssociationConfigProperty
-> SourceApiAssociationConfigProperty -> Bool
Prelude.Eq, Int -> SourceApiAssociationConfigProperty -> ShowS
[SourceApiAssociationConfigProperty] -> ShowS
SourceApiAssociationConfigProperty -> String
(Int -> SourceApiAssociationConfigProperty -> ShowS)
-> (SourceApiAssociationConfigProperty -> String)
-> ([SourceApiAssociationConfigProperty] -> ShowS)
-> Show SourceApiAssociationConfigProperty
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> SourceApiAssociationConfigProperty -> ShowS
showsPrec :: Int -> SourceApiAssociationConfigProperty -> ShowS
$cshow :: SourceApiAssociationConfigProperty -> String
show :: SourceApiAssociationConfigProperty -> String
$cshowList :: [SourceApiAssociationConfigProperty] -> ShowS
showList :: [SourceApiAssociationConfigProperty] -> ShowS
Prelude.Show)
mkSourceApiAssociationConfigProperty ::
  SourceApiAssociationConfigProperty
mkSourceApiAssociationConfigProperty :: SourceApiAssociationConfigProperty
mkSourceApiAssociationConfigProperty
  = SourceApiAssociationConfigProperty
      {haddock_workaround_ :: ()
haddock_workaround_ = (), mergeType :: Maybe (Value Text)
mergeType = Maybe (Value Text)
forall a. Maybe a
Prelude.Nothing}
instance ToResourceProperties SourceApiAssociationConfigProperty where
  toResourceProperties :: SourceApiAssociationConfigProperty -> ResourceProperties
toResourceProperties SourceApiAssociationConfigProperty {Maybe (Value Text)
()
haddock_workaround_ :: SourceApiAssociationConfigProperty -> ()
mergeType :: SourceApiAssociationConfigProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
mergeType :: Maybe (Value Text)
..}
    = ResourceProperties
        {awsType :: Text
awsType = Text
"AWS::AppSync::SourceApiAssociation.SourceApiAssociationConfig",
         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
"MergeType" (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)
mergeType])}
instance JSON.ToJSON SourceApiAssociationConfigProperty where
  toJSON :: SourceApiAssociationConfigProperty -> Value
toJSON SourceApiAssociationConfigProperty {Maybe (Value Text)
()
haddock_workaround_ :: SourceApiAssociationConfigProperty -> ()
mergeType :: SourceApiAssociationConfigProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
mergeType :: 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
"MergeType" (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)
mergeType]))
instance Property "MergeType" SourceApiAssociationConfigProperty where
  type PropertyType "MergeType" SourceApiAssociationConfigProperty = Value Prelude.Text
  set :: PropertyType "MergeType" SourceApiAssociationConfigProperty
-> SourceApiAssociationConfigProperty
-> SourceApiAssociationConfigProperty
set PropertyType "MergeType" SourceApiAssociationConfigProperty
newValue SourceApiAssociationConfigProperty {Maybe (Value Text)
()
haddock_workaround_ :: SourceApiAssociationConfigProperty -> ()
mergeType :: SourceApiAssociationConfigProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
mergeType :: Maybe (Value Text)
..}
    = SourceApiAssociationConfigProperty
        {mergeType :: Maybe (Value Text)
mergeType = Value Text -> Maybe (Value Text)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "MergeType" SourceApiAssociationConfigProperty
Value Text
newValue, ()
haddock_workaround_ :: ()
haddock_workaround_ :: ()
..}