module Stratosphere.QuickSight.Template.TemplateSourceEntityProperty (
        module Exports, TemplateSourceEntityProperty(..),
        mkTemplateSourceEntityProperty
    ) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import {-# SOURCE #-} Stratosphere.QuickSight.Template.TemplateSourceAnalysisProperty as Exports
import {-# SOURCE #-} Stratosphere.QuickSight.Template.TemplateSourceTemplateProperty as Exports
import Stratosphere.ResourceProperties
data TemplateSourceEntityProperty
  = -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-quicksight-template-templatesourceentity.html>
    TemplateSourceEntityProperty {TemplateSourceEntityProperty -> ()
haddock_workaround_ :: (),
                                  -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-quicksight-template-templatesourceentity.html#cfn-quicksight-template-templatesourceentity-sourceanalysis>
                                  TemplateSourceEntityProperty
-> Maybe TemplateSourceAnalysisProperty
sourceAnalysis :: (Prelude.Maybe TemplateSourceAnalysisProperty),
                                  -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-quicksight-template-templatesourceentity.html#cfn-quicksight-template-templatesourceentity-sourcetemplate>
                                  TemplateSourceEntityProperty
-> Maybe TemplateSourceTemplateProperty
sourceTemplate :: (Prelude.Maybe TemplateSourceTemplateProperty)}
  deriving stock (TemplateSourceEntityProperty
-> TemplateSourceEntityProperty -> Bool
(TemplateSourceEntityProperty
 -> TemplateSourceEntityProperty -> Bool)
-> (TemplateSourceEntityProperty
    -> TemplateSourceEntityProperty -> Bool)
-> Eq TemplateSourceEntityProperty
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: TemplateSourceEntityProperty
-> TemplateSourceEntityProperty -> Bool
== :: TemplateSourceEntityProperty
-> TemplateSourceEntityProperty -> Bool
$c/= :: TemplateSourceEntityProperty
-> TemplateSourceEntityProperty -> Bool
/= :: TemplateSourceEntityProperty
-> TemplateSourceEntityProperty -> Bool
Prelude.Eq, Int -> TemplateSourceEntityProperty -> ShowS
[TemplateSourceEntityProperty] -> ShowS
TemplateSourceEntityProperty -> String
(Int -> TemplateSourceEntityProperty -> ShowS)
-> (TemplateSourceEntityProperty -> String)
-> ([TemplateSourceEntityProperty] -> ShowS)
-> Show TemplateSourceEntityProperty
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> TemplateSourceEntityProperty -> ShowS
showsPrec :: Int -> TemplateSourceEntityProperty -> ShowS
$cshow :: TemplateSourceEntityProperty -> String
show :: TemplateSourceEntityProperty -> String
$cshowList :: [TemplateSourceEntityProperty] -> ShowS
showList :: [TemplateSourceEntityProperty] -> ShowS
Prelude.Show)
mkTemplateSourceEntityProperty :: TemplateSourceEntityProperty
mkTemplateSourceEntityProperty :: TemplateSourceEntityProperty
mkTemplateSourceEntityProperty
  = TemplateSourceEntityProperty
      {haddock_workaround_ :: ()
haddock_workaround_ = (), sourceAnalysis :: Maybe TemplateSourceAnalysisProperty
sourceAnalysis = Maybe TemplateSourceAnalysisProperty
forall a. Maybe a
Prelude.Nothing,
       sourceTemplate :: Maybe TemplateSourceTemplateProperty
sourceTemplate = Maybe TemplateSourceTemplateProperty
forall a. Maybe a
Prelude.Nothing}
instance ToResourceProperties TemplateSourceEntityProperty where
  toResourceProperties :: TemplateSourceEntityProperty -> ResourceProperties
toResourceProperties TemplateSourceEntityProperty {Maybe TemplateSourceAnalysisProperty
Maybe TemplateSourceTemplateProperty
()
haddock_workaround_ :: TemplateSourceEntityProperty -> ()
sourceAnalysis :: TemplateSourceEntityProperty
-> Maybe TemplateSourceAnalysisProperty
sourceTemplate :: TemplateSourceEntityProperty
-> Maybe TemplateSourceTemplateProperty
haddock_workaround_ :: ()
sourceAnalysis :: Maybe TemplateSourceAnalysisProperty
sourceTemplate :: Maybe TemplateSourceTemplateProperty
..}
    = ResourceProperties
        {awsType :: Text
awsType = Text
"AWS::QuickSight::Template.TemplateSourceEntity",
         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 -> TemplateSourceAnalysisProperty -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"SourceAnalysis" (TemplateSourceAnalysisProperty -> (Key, Value))
-> Maybe TemplateSourceAnalysisProperty -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe TemplateSourceAnalysisProperty
sourceAnalysis,
                            Key -> TemplateSourceTemplateProperty -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"SourceTemplate" (TemplateSourceTemplateProperty -> (Key, Value))
-> Maybe TemplateSourceTemplateProperty -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe TemplateSourceTemplateProperty
sourceTemplate])}
instance JSON.ToJSON TemplateSourceEntityProperty where
  toJSON :: TemplateSourceEntityProperty -> Value
toJSON TemplateSourceEntityProperty {Maybe TemplateSourceAnalysisProperty
Maybe TemplateSourceTemplateProperty
()
haddock_workaround_ :: TemplateSourceEntityProperty -> ()
sourceAnalysis :: TemplateSourceEntityProperty
-> Maybe TemplateSourceAnalysisProperty
sourceTemplate :: TemplateSourceEntityProperty
-> Maybe TemplateSourceTemplateProperty
haddock_workaround_ :: ()
sourceAnalysis :: Maybe TemplateSourceAnalysisProperty
sourceTemplate :: Maybe TemplateSourceTemplateProperty
..}
    = [(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 -> TemplateSourceAnalysisProperty -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"SourceAnalysis" (TemplateSourceAnalysisProperty -> (Key, Value))
-> Maybe TemplateSourceAnalysisProperty -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe TemplateSourceAnalysisProperty
sourceAnalysis,
               Key -> TemplateSourceTemplateProperty -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"SourceTemplate" (TemplateSourceTemplateProperty -> (Key, Value))
-> Maybe TemplateSourceTemplateProperty -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe TemplateSourceTemplateProperty
sourceTemplate]))
instance Property "SourceAnalysis" TemplateSourceEntityProperty where
  type PropertyType "SourceAnalysis" TemplateSourceEntityProperty = TemplateSourceAnalysisProperty
  set :: PropertyType "SourceAnalysis" TemplateSourceEntityProperty
-> TemplateSourceEntityProperty -> TemplateSourceEntityProperty
set PropertyType "SourceAnalysis" TemplateSourceEntityProperty
newValue TemplateSourceEntityProperty {Maybe TemplateSourceAnalysisProperty
Maybe TemplateSourceTemplateProperty
()
haddock_workaround_ :: TemplateSourceEntityProperty -> ()
sourceAnalysis :: TemplateSourceEntityProperty
-> Maybe TemplateSourceAnalysisProperty
sourceTemplate :: TemplateSourceEntityProperty
-> Maybe TemplateSourceTemplateProperty
haddock_workaround_ :: ()
sourceAnalysis :: Maybe TemplateSourceAnalysisProperty
sourceTemplate :: Maybe TemplateSourceTemplateProperty
..}
    = TemplateSourceEntityProperty
        {sourceAnalysis :: Maybe TemplateSourceAnalysisProperty
sourceAnalysis = TemplateSourceAnalysisProperty
-> Maybe TemplateSourceAnalysisProperty
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "SourceAnalysis" TemplateSourceEntityProperty
TemplateSourceAnalysisProperty
newValue, Maybe TemplateSourceTemplateProperty
()
haddock_workaround_ :: ()
sourceTemplate :: Maybe TemplateSourceTemplateProperty
haddock_workaround_ :: ()
sourceTemplate :: Maybe TemplateSourceTemplateProperty
..}
instance Property "SourceTemplate" TemplateSourceEntityProperty where
  type PropertyType "SourceTemplate" TemplateSourceEntityProperty = TemplateSourceTemplateProperty
  set :: PropertyType "SourceTemplate" TemplateSourceEntityProperty
-> TemplateSourceEntityProperty -> TemplateSourceEntityProperty
set PropertyType "SourceTemplate" TemplateSourceEntityProperty
newValue TemplateSourceEntityProperty {Maybe TemplateSourceAnalysisProperty
Maybe TemplateSourceTemplateProperty
()
haddock_workaround_ :: TemplateSourceEntityProperty -> ()
sourceAnalysis :: TemplateSourceEntityProperty
-> Maybe TemplateSourceAnalysisProperty
sourceTemplate :: TemplateSourceEntityProperty
-> Maybe TemplateSourceTemplateProperty
haddock_workaround_ :: ()
sourceAnalysis :: Maybe TemplateSourceAnalysisProperty
sourceTemplate :: Maybe TemplateSourceTemplateProperty
..}
    = TemplateSourceEntityProperty
        {sourceTemplate :: Maybe TemplateSourceTemplateProperty
sourceTemplate = TemplateSourceTemplateProperty
-> Maybe TemplateSourceTemplateProperty
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "SourceTemplate" TemplateSourceEntityProperty
TemplateSourceTemplateProperty
newValue, Maybe TemplateSourceAnalysisProperty
()
haddock_workaround_ :: ()
sourceAnalysis :: Maybe TemplateSourceAnalysisProperty
haddock_workaround_ :: ()
sourceAnalysis :: Maybe TemplateSourceAnalysisProperty
..}