module Stratosphere.Wisdom.KnowledgeBase.SourceConfigurationProperty (
        module Exports, SourceConfigurationProperty(..),
        mkSourceConfigurationProperty
    ) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import {-# SOURCE #-} Stratosphere.Wisdom.KnowledgeBase.AppIntegrationsConfigurationProperty as Exports
import {-# SOURCE #-} Stratosphere.Wisdom.KnowledgeBase.ManagedSourceConfigurationProperty as Exports
import Stratosphere.ResourceProperties
data SourceConfigurationProperty
  = -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-wisdom-knowledgebase-sourceconfiguration.html>
    SourceConfigurationProperty {SourceConfigurationProperty -> ()
haddock_workaround_ :: (),
                                 -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-wisdom-knowledgebase-sourceconfiguration.html#cfn-wisdom-knowledgebase-sourceconfiguration-appintegrations>
                                 SourceConfigurationProperty
-> Maybe AppIntegrationsConfigurationProperty
appIntegrations :: (Prelude.Maybe AppIntegrationsConfigurationProperty),
                                 -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-wisdom-knowledgebase-sourceconfiguration.html#cfn-wisdom-knowledgebase-sourceconfiguration-managedsourceconfiguration>
                                 SourceConfigurationProperty
-> Maybe ManagedSourceConfigurationProperty
managedSourceConfiguration :: (Prelude.Maybe ManagedSourceConfigurationProperty)}
  deriving stock (SourceConfigurationProperty -> SourceConfigurationProperty -> Bool
(SourceConfigurationProperty
 -> SourceConfigurationProperty -> Bool)
-> (SourceConfigurationProperty
    -> SourceConfigurationProperty -> Bool)
-> Eq SourceConfigurationProperty
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: SourceConfigurationProperty -> SourceConfigurationProperty -> Bool
== :: SourceConfigurationProperty -> SourceConfigurationProperty -> Bool
$c/= :: SourceConfigurationProperty -> SourceConfigurationProperty -> Bool
/= :: SourceConfigurationProperty -> SourceConfigurationProperty -> Bool
Prelude.Eq, Int -> SourceConfigurationProperty -> ShowS
[SourceConfigurationProperty] -> ShowS
SourceConfigurationProperty -> String
(Int -> SourceConfigurationProperty -> ShowS)
-> (SourceConfigurationProperty -> String)
-> ([SourceConfigurationProperty] -> ShowS)
-> Show SourceConfigurationProperty
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> SourceConfigurationProperty -> ShowS
showsPrec :: Int -> SourceConfigurationProperty -> ShowS
$cshow :: SourceConfigurationProperty -> String
show :: SourceConfigurationProperty -> String
$cshowList :: [SourceConfigurationProperty] -> ShowS
showList :: [SourceConfigurationProperty] -> ShowS
Prelude.Show)
mkSourceConfigurationProperty :: SourceConfigurationProperty
mkSourceConfigurationProperty :: SourceConfigurationProperty
mkSourceConfigurationProperty
  = SourceConfigurationProperty
      {haddock_workaround_ :: ()
haddock_workaround_ = (), appIntegrations :: Maybe AppIntegrationsConfigurationProperty
appIntegrations = Maybe AppIntegrationsConfigurationProperty
forall a. Maybe a
Prelude.Nothing,
       managedSourceConfiguration :: Maybe ManagedSourceConfigurationProperty
managedSourceConfiguration = Maybe ManagedSourceConfigurationProperty
forall a. Maybe a
Prelude.Nothing}
instance ToResourceProperties SourceConfigurationProperty where
  toResourceProperties :: SourceConfigurationProperty -> ResourceProperties
toResourceProperties SourceConfigurationProperty {Maybe AppIntegrationsConfigurationProperty
Maybe ManagedSourceConfigurationProperty
()
haddock_workaround_ :: SourceConfigurationProperty -> ()
appIntegrations :: SourceConfigurationProperty
-> Maybe AppIntegrationsConfigurationProperty
managedSourceConfiguration :: SourceConfigurationProperty
-> Maybe ManagedSourceConfigurationProperty
haddock_workaround_ :: ()
appIntegrations :: Maybe AppIntegrationsConfigurationProperty
managedSourceConfiguration :: Maybe ManagedSourceConfigurationProperty
..}
    = ResourceProperties
        {awsType :: Text
awsType = Text
"AWS::Wisdom::KnowledgeBase.SourceConfiguration",
         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 -> AppIntegrationsConfigurationProperty -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"AppIntegrations" (AppIntegrationsConfigurationProperty -> (Key, Value))
-> Maybe AppIntegrationsConfigurationProperty -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe AppIntegrationsConfigurationProperty
appIntegrations,
                            Key -> ManagedSourceConfigurationProperty -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"ManagedSourceConfiguration"
                              (ManagedSourceConfigurationProperty -> (Key, Value))
-> Maybe ManagedSourceConfigurationProperty -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe ManagedSourceConfigurationProperty
managedSourceConfiguration])}
instance JSON.ToJSON SourceConfigurationProperty where
  toJSON :: SourceConfigurationProperty -> Value
toJSON SourceConfigurationProperty {Maybe AppIntegrationsConfigurationProperty
Maybe ManagedSourceConfigurationProperty
()
haddock_workaround_ :: SourceConfigurationProperty -> ()
appIntegrations :: SourceConfigurationProperty
-> Maybe AppIntegrationsConfigurationProperty
managedSourceConfiguration :: SourceConfigurationProperty
-> Maybe ManagedSourceConfigurationProperty
haddock_workaround_ :: ()
appIntegrations :: Maybe AppIntegrationsConfigurationProperty
managedSourceConfiguration :: Maybe ManagedSourceConfigurationProperty
..}
    = [(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 -> AppIntegrationsConfigurationProperty -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"AppIntegrations" (AppIntegrationsConfigurationProperty -> (Key, Value))
-> Maybe AppIntegrationsConfigurationProperty -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe AppIntegrationsConfigurationProperty
appIntegrations,
               Key -> ManagedSourceConfigurationProperty -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"ManagedSourceConfiguration"
                 (ManagedSourceConfigurationProperty -> (Key, Value))
-> Maybe ManagedSourceConfigurationProperty -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe ManagedSourceConfigurationProperty
managedSourceConfiguration]))
instance Property "AppIntegrations" SourceConfigurationProperty where
  type PropertyType "AppIntegrations" SourceConfigurationProperty = AppIntegrationsConfigurationProperty
  set :: PropertyType "AppIntegrations" SourceConfigurationProperty
-> SourceConfigurationProperty -> SourceConfigurationProperty
set PropertyType "AppIntegrations" SourceConfigurationProperty
newValue SourceConfigurationProperty {Maybe AppIntegrationsConfigurationProperty
Maybe ManagedSourceConfigurationProperty
()
haddock_workaround_ :: SourceConfigurationProperty -> ()
appIntegrations :: SourceConfigurationProperty
-> Maybe AppIntegrationsConfigurationProperty
managedSourceConfiguration :: SourceConfigurationProperty
-> Maybe ManagedSourceConfigurationProperty
haddock_workaround_ :: ()
appIntegrations :: Maybe AppIntegrationsConfigurationProperty
managedSourceConfiguration :: Maybe ManagedSourceConfigurationProperty
..}
    = SourceConfigurationProperty
        {appIntegrations :: Maybe AppIntegrationsConfigurationProperty
appIntegrations = AppIntegrationsConfigurationProperty
-> Maybe AppIntegrationsConfigurationProperty
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "AppIntegrations" SourceConfigurationProperty
AppIntegrationsConfigurationProperty
newValue, Maybe ManagedSourceConfigurationProperty
()
haddock_workaround_ :: ()
managedSourceConfiguration :: Maybe ManagedSourceConfigurationProperty
haddock_workaround_ :: ()
managedSourceConfiguration :: Maybe ManagedSourceConfigurationProperty
..}
instance Property "ManagedSourceConfiguration" SourceConfigurationProperty where
  type PropertyType "ManagedSourceConfiguration" SourceConfigurationProperty = ManagedSourceConfigurationProperty
  set :: PropertyType
  "ManagedSourceConfiguration" SourceConfigurationProperty
-> SourceConfigurationProperty -> SourceConfigurationProperty
set PropertyType
  "ManagedSourceConfiguration" SourceConfigurationProperty
newValue SourceConfigurationProperty {Maybe AppIntegrationsConfigurationProperty
Maybe ManagedSourceConfigurationProperty
()
haddock_workaround_ :: SourceConfigurationProperty -> ()
appIntegrations :: SourceConfigurationProperty
-> Maybe AppIntegrationsConfigurationProperty
managedSourceConfiguration :: SourceConfigurationProperty
-> Maybe ManagedSourceConfigurationProperty
haddock_workaround_ :: ()
appIntegrations :: Maybe AppIntegrationsConfigurationProperty
managedSourceConfiguration :: Maybe ManagedSourceConfigurationProperty
..}
    = SourceConfigurationProperty
        {managedSourceConfiguration :: Maybe ManagedSourceConfigurationProperty
managedSourceConfiguration = ManagedSourceConfigurationProperty
-> Maybe ManagedSourceConfigurationProperty
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType
  "ManagedSourceConfiguration" SourceConfigurationProperty
ManagedSourceConfigurationProperty
newValue, Maybe AppIntegrationsConfigurationProperty
()
haddock_workaround_ :: ()
appIntegrations :: Maybe AppIntegrationsConfigurationProperty
haddock_workaround_ :: ()
appIntegrations :: Maybe AppIntegrationsConfigurationProperty
..}