module Stratosphere.AppSync.SourceApiAssociation (
        module Exports, SourceApiAssociation(..), mkSourceApiAssociation
    ) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import {-# SOURCE #-} Stratosphere.AppSync.SourceApiAssociation.SourceApiAssociationConfigProperty as Exports
import Stratosphere.ResourceProperties
import Stratosphere.Value
data SourceApiAssociation
  = -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-appsync-sourceapiassociation.html>
    SourceApiAssociation {SourceApiAssociation -> ()
haddock_workaround_ :: (),
                          -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-appsync-sourceapiassociation.html#cfn-appsync-sourceapiassociation-description>
                          SourceApiAssociation -> Maybe (Value Text)
description :: (Prelude.Maybe (Value Prelude.Text)),
                          -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-appsync-sourceapiassociation.html#cfn-appsync-sourceapiassociation-mergedapiidentifier>
                          SourceApiAssociation -> Maybe (Value Text)
mergedApiIdentifier :: (Prelude.Maybe (Value Prelude.Text)),
                          -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-appsync-sourceapiassociation.html#cfn-appsync-sourceapiassociation-sourceapiassociationconfig>
                          SourceApiAssociation -> Maybe SourceApiAssociationConfigProperty
sourceApiAssociationConfig :: (Prelude.Maybe SourceApiAssociationConfigProperty),
                          -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-appsync-sourceapiassociation.html#cfn-appsync-sourceapiassociation-sourceapiidentifier>
                          SourceApiAssociation -> Maybe (Value Text)
sourceApiIdentifier :: (Prelude.Maybe (Value Prelude.Text))}
  deriving stock (SourceApiAssociation -> SourceApiAssociation -> Bool
(SourceApiAssociation -> SourceApiAssociation -> Bool)
-> (SourceApiAssociation -> SourceApiAssociation -> Bool)
-> Eq SourceApiAssociation
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: SourceApiAssociation -> SourceApiAssociation -> Bool
== :: SourceApiAssociation -> SourceApiAssociation -> Bool
$c/= :: SourceApiAssociation -> SourceApiAssociation -> Bool
/= :: SourceApiAssociation -> SourceApiAssociation -> Bool
Prelude.Eq, Int -> SourceApiAssociation -> ShowS
[SourceApiAssociation] -> ShowS
SourceApiAssociation -> String
(Int -> SourceApiAssociation -> ShowS)
-> (SourceApiAssociation -> String)
-> ([SourceApiAssociation] -> ShowS)
-> Show SourceApiAssociation
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> SourceApiAssociation -> ShowS
showsPrec :: Int -> SourceApiAssociation -> ShowS
$cshow :: SourceApiAssociation -> String
show :: SourceApiAssociation -> String
$cshowList :: [SourceApiAssociation] -> ShowS
showList :: [SourceApiAssociation] -> ShowS
Prelude.Show)
mkSourceApiAssociation :: SourceApiAssociation
mkSourceApiAssociation :: SourceApiAssociation
mkSourceApiAssociation
  = SourceApiAssociation
      {haddock_workaround_ :: ()
haddock_workaround_ = (), description :: Maybe (Value Text)
description = Maybe (Value Text)
forall a. Maybe a
Prelude.Nothing,
       mergedApiIdentifier :: Maybe (Value Text)
mergedApiIdentifier = Maybe (Value Text)
forall a. Maybe a
Prelude.Nothing,
       sourceApiAssociationConfig :: Maybe SourceApiAssociationConfigProperty
sourceApiAssociationConfig = Maybe SourceApiAssociationConfigProperty
forall a. Maybe a
Prelude.Nothing,
       sourceApiIdentifier :: Maybe (Value Text)
sourceApiIdentifier = Maybe (Value Text)
forall a. Maybe a
Prelude.Nothing}
instance ToResourceProperties SourceApiAssociation where
  toResourceProperties :: SourceApiAssociation -> ResourceProperties
toResourceProperties SourceApiAssociation {Maybe (Value Text)
Maybe SourceApiAssociationConfigProperty
()
haddock_workaround_ :: SourceApiAssociation -> ()
description :: SourceApiAssociation -> Maybe (Value Text)
mergedApiIdentifier :: SourceApiAssociation -> Maybe (Value Text)
sourceApiAssociationConfig :: SourceApiAssociation -> Maybe SourceApiAssociationConfigProperty
sourceApiIdentifier :: SourceApiAssociation -> Maybe (Value Text)
haddock_workaround_ :: ()
description :: Maybe (Value Text)
mergedApiIdentifier :: Maybe (Value Text)
sourceApiAssociationConfig :: Maybe SourceApiAssociationConfigProperty
sourceApiIdentifier :: Maybe (Value Text)
..}
    = ResourceProperties
        {awsType :: Text
awsType = Text
"AWS::AppSync::SourceApiAssociation",
         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
"Description" (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)
description,
                            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
"MergedApiIdentifier" (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)
mergedApiIdentifier,
                            Key -> SourceApiAssociationConfigProperty -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"SourceApiAssociationConfig"
                              (SourceApiAssociationConfigProperty -> (Key, Value))
-> Maybe SourceApiAssociationConfigProperty -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe SourceApiAssociationConfigProperty
sourceApiAssociationConfig,
                            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
"SourceApiIdentifier" (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)
sourceApiIdentifier])}
instance JSON.ToJSON SourceApiAssociation where
  toJSON :: SourceApiAssociation -> Value
toJSON SourceApiAssociation {Maybe (Value Text)
Maybe SourceApiAssociationConfigProperty
()
haddock_workaround_ :: SourceApiAssociation -> ()
description :: SourceApiAssociation -> Maybe (Value Text)
mergedApiIdentifier :: SourceApiAssociation -> Maybe (Value Text)
sourceApiAssociationConfig :: SourceApiAssociation -> Maybe SourceApiAssociationConfigProperty
sourceApiIdentifier :: SourceApiAssociation -> Maybe (Value Text)
haddock_workaround_ :: ()
description :: Maybe (Value Text)
mergedApiIdentifier :: Maybe (Value Text)
sourceApiAssociationConfig :: Maybe SourceApiAssociationConfigProperty
sourceApiIdentifier :: 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
"Description" (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)
description,
               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
"MergedApiIdentifier" (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)
mergedApiIdentifier,
               Key -> SourceApiAssociationConfigProperty -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"SourceApiAssociationConfig"
                 (SourceApiAssociationConfigProperty -> (Key, Value))
-> Maybe SourceApiAssociationConfigProperty -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe SourceApiAssociationConfigProperty
sourceApiAssociationConfig,
               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
"SourceApiIdentifier" (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)
sourceApiIdentifier]))
instance Property "Description" SourceApiAssociation where
  type PropertyType "Description" SourceApiAssociation = Value Prelude.Text
  set :: PropertyType "Description" SourceApiAssociation
-> SourceApiAssociation -> SourceApiAssociation
set PropertyType "Description" SourceApiAssociation
newValue SourceApiAssociation {Maybe (Value Text)
Maybe SourceApiAssociationConfigProperty
()
haddock_workaround_ :: SourceApiAssociation -> ()
description :: SourceApiAssociation -> Maybe (Value Text)
mergedApiIdentifier :: SourceApiAssociation -> Maybe (Value Text)
sourceApiAssociationConfig :: SourceApiAssociation -> Maybe SourceApiAssociationConfigProperty
sourceApiIdentifier :: SourceApiAssociation -> Maybe (Value Text)
haddock_workaround_ :: ()
description :: Maybe (Value Text)
mergedApiIdentifier :: Maybe (Value Text)
sourceApiAssociationConfig :: Maybe SourceApiAssociationConfigProperty
sourceApiIdentifier :: Maybe (Value Text)
..}
    = SourceApiAssociation {description :: Maybe (Value Text)
description = Value Text -> Maybe (Value Text)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "Description" SourceApiAssociation
Value Text
newValue, Maybe (Value Text)
Maybe SourceApiAssociationConfigProperty
()
haddock_workaround_ :: ()
mergedApiIdentifier :: Maybe (Value Text)
sourceApiAssociationConfig :: Maybe SourceApiAssociationConfigProperty
sourceApiIdentifier :: Maybe (Value Text)
haddock_workaround_ :: ()
mergedApiIdentifier :: Maybe (Value Text)
sourceApiAssociationConfig :: Maybe SourceApiAssociationConfigProperty
sourceApiIdentifier :: Maybe (Value Text)
..}
instance Property "MergedApiIdentifier" SourceApiAssociation where
  type PropertyType "MergedApiIdentifier" SourceApiAssociation = Value Prelude.Text
  set :: PropertyType "MergedApiIdentifier" SourceApiAssociation
-> SourceApiAssociation -> SourceApiAssociation
set PropertyType "MergedApiIdentifier" SourceApiAssociation
newValue SourceApiAssociation {Maybe (Value Text)
Maybe SourceApiAssociationConfigProperty
()
haddock_workaround_ :: SourceApiAssociation -> ()
description :: SourceApiAssociation -> Maybe (Value Text)
mergedApiIdentifier :: SourceApiAssociation -> Maybe (Value Text)
sourceApiAssociationConfig :: SourceApiAssociation -> Maybe SourceApiAssociationConfigProperty
sourceApiIdentifier :: SourceApiAssociation -> Maybe (Value Text)
haddock_workaround_ :: ()
description :: Maybe (Value Text)
mergedApiIdentifier :: Maybe (Value Text)
sourceApiAssociationConfig :: Maybe SourceApiAssociationConfigProperty
sourceApiIdentifier :: Maybe (Value Text)
..}
    = SourceApiAssociation
        {mergedApiIdentifier :: Maybe (Value Text)
mergedApiIdentifier = Value Text -> Maybe (Value Text)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "MergedApiIdentifier" SourceApiAssociation
Value Text
newValue, Maybe (Value Text)
Maybe SourceApiAssociationConfigProperty
()
haddock_workaround_ :: ()
description :: Maybe (Value Text)
sourceApiAssociationConfig :: Maybe SourceApiAssociationConfigProperty
sourceApiIdentifier :: Maybe (Value Text)
haddock_workaround_ :: ()
description :: Maybe (Value Text)
sourceApiAssociationConfig :: Maybe SourceApiAssociationConfigProperty
sourceApiIdentifier :: Maybe (Value Text)
..}
instance Property "SourceApiAssociationConfig" SourceApiAssociation where
  type PropertyType "SourceApiAssociationConfig" SourceApiAssociation = SourceApiAssociationConfigProperty
  set :: PropertyType "SourceApiAssociationConfig" SourceApiAssociation
-> SourceApiAssociation -> SourceApiAssociation
set PropertyType "SourceApiAssociationConfig" SourceApiAssociation
newValue SourceApiAssociation {Maybe (Value Text)
Maybe SourceApiAssociationConfigProperty
()
haddock_workaround_ :: SourceApiAssociation -> ()
description :: SourceApiAssociation -> Maybe (Value Text)
mergedApiIdentifier :: SourceApiAssociation -> Maybe (Value Text)
sourceApiAssociationConfig :: SourceApiAssociation -> Maybe SourceApiAssociationConfigProperty
sourceApiIdentifier :: SourceApiAssociation -> Maybe (Value Text)
haddock_workaround_ :: ()
description :: Maybe (Value Text)
mergedApiIdentifier :: Maybe (Value Text)
sourceApiAssociationConfig :: Maybe SourceApiAssociationConfigProperty
sourceApiIdentifier :: Maybe (Value Text)
..}
    = SourceApiAssociation
        {sourceApiAssociationConfig :: Maybe SourceApiAssociationConfigProperty
sourceApiAssociationConfig = SourceApiAssociationConfigProperty
-> Maybe SourceApiAssociationConfigProperty
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "SourceApiAssociationConfig" SourceApiAssociation
SourceApiAssociationConfigProperty
newValue, Maybe (Value Text)
()
haddock_workaround_ :: ()
description :: Maybe (Value Text)
mergedApiIdentifier :: Maybe (Value Text)
sourceApiIdentifier :: Maybe (Value Text)
haddock_workaround_ :: ()
description :: Maybe (Value Text)
mergedApiIdentifier :: Maybe (Value Text)
sourceApiIdentifier :: Maybe (Value Text)
..}
instance Property "SourceApiIdentifier" SourceApiAssociation where
  type PropertyType "SourceApiIdentifier" SourceApiAssociation = Value Prelude.Text
  set :: PropertyType "SourceApiIdentifier" SourceApiAssociation
-> SourceApiAssociation -> SourceApiAssociation
set PropertyType "SourceApiIdentifier" SourceApiAssociation
newValue SourceApiAssociation {Maybe (Value Text)
Maybe SourceApiAssociationConfigProperty
()
haddock_workaround_ :: SourceApiAssociation -> ()
description :: SourceApiAssociation -> Maybe (Value Text)
mergedApiIdentifier :: SourceApiAssociation -> Maybe (Value Text)
sourceApiAssociationConfig :: SourceApiAssociation -> Maybe SourceApiAssociationConfigProperty
sourceApiIdentifier :: SourceApiAssociation -> Maybe (Value Text)
haddock_workaround_ :: ()
description :: Maybe (Value Text)
mergedApiIdentifier :: Maybe (Value Text)
sourceApiAssociationConfig :: Maybe SourceApiAssociationConfigProperty
sourceApiIdentifier :: Maybe (Value Text)
..}
    = SourceApiAssociation
        {sourceApiIdentifier :: Maybe (Value Text)
sourceApiIdentifier = Value Text -> Maybe (Value Text)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "SourceApiIdentifier" SourceApiAssociation
Value Text
newValue, Maybe (Value Text)
Maybe SourceApiAssociationConfigProperty
()
haddock_workaround_ :: ()
description :: Maybe (Value Text)
mergedApiIdentifier :: Maybe (Value Text)
sourceApiAssociationConfig :: Maybe SourceApiAssociationConfigProperty
haddock_workaround_ :: ()
description :: Maybe (Value Text)
mergedApiIdentifier :: Maybe (Value Text)
sourceApiAssociationConfig :: Maybe SourceApiAssociationConfigProperty
..}