module Stratosphere.QuickSight.DataSet.LogicalTableProperty (
        module Exports, LogicalTableProperty(..), mkLogicalTableProperty
    ) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import {-# SOURCE #-} Stratosphere.QuickSight.DataSet.LogicalTableSourceProperty as Exports
import {-# SOURCE #-} Stratosphere.QuickSight.DataSet.TransformOperationProperty as Exports
import Stratosphere.ResourceProperties
import Stratosphere.Value
data LogicalTableProperty
  = -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-quicksight-dataset-logicaltable.html>
    LogicalTableProperty {LogicalTableProperty -> ()
haddock_workaround_ :: (),
                          -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-quicksight-dataset-logicaltable.html#cfn-quicksight-dataset-logicaltable-alias>
                          LogicalTableProperty -> Value Text
alias :: (Value Prelude.Text),
                          -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-quicksight-dataset-logicaltable.html#cfn-quicksight-dataset-logicaltable-datatransforms>
                          LogicalTableProperty -> Maybe [TransformOperationProperty]
dataTransforms :: (Prelude.Maybe [TransformOperationProperty]),
                          -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-quicksight-dataset-logicaltable.html#cfn-quicksight-dataset-logicaltable-source>
                          LogicalTableProperty -> Maybe LogicalTableSourceProperty
source :: (Prelude.Maybe LogicalTableSourceProperty)}
  deriving stock (LogicalTableProperty -> LogicalTableProperty -> Bool
(LogicalTableProperty -> LogicalTableProperty -> Bool)
-> (LogicalTableProperty -> LogicalTableProperty -> Bool)
-> Eq LogicalTableProperty
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: LogicalTableProperty -> LogicalTableProperty -> Bool
== :: LogicalTableProperty -> LogicalTableProperty -> Bool
$c/= :: LogicalTableProperty -> LogicalTableProperty -> Bool
/= :: LogicalTableProperty -> LogicalTableProperty -> Bool
Prelude.Eq, Int -> LogicalTableProperty -> ShowS
[LogicalTableProperty] -> ShowS
LogicalTableProperty -> String
(Int -> LogicalTableProperty -> ShowS)
-> (LogicalTableProperty -> String)
-> ([LogicalTableProperty] -> ShowS)
-> Show LogicalTableProperty
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> LogicalTableProperty -> ShowS
showsPrec :: Int -> LogicalTableProperty -> ShowS
$cshow :: LogicalTableProperty -> String
show :: LogicalTableProperty -> String
$cshowList :: [LogicalTableProperty] -> ShowS
showList :: [LogicalTableProperty] -> ShowS
Prelude.Show)
mkLogicalTableProperty ::
  Value Prelude.Text -> LogicalTableProperty
mkLogicalTableProperty :: Value Text -> LogicalTableProperty
mkLogicalTableProperty Value Text
alias
  = LogicalTableProperty
      {haddock_workaround_ :: ()
haddock_workaround_ = (), alias :: Value Text
alias = Value Text
alias,
       dataTransforms :: Maybe [TransformOperationProperty]
dataTransforms = Maybe [TransformOperationProperty]
forall a. Maybe a
Prelude.Nothing, source :: Maybe LogicalTableSourceProperty
source = Maybe LogicalTableSourceProperty
forall a. Maybe a
Prelude.Nothing}
instance ToResourceProperties LogicalTableProperty where
  toResourceProperties :: LogicalTableProperty -> ResourceProperties
toResourceProperties LogicalTableProperty {Maybe [TransformOperationProperty]
Maybe LogicalTableSourceProperty
()
Value Text
haddock_workaround_ :: LogicalTableProperty -> ()
alias :: LogicalTableProperty -> Value Text
dataTransforms :: LogicalTableProperty -> Maybe [TransformOperationProperty]
source :: LogicalTableProperty -> Maybe LogicalTableSourceProperty
haddock_workaround_ :: ()
alias :: Value Text
dataTransforms :: Maybe [TransformOperationProperty]
source :: Maybe LogicalTableSourceProperty
..}
    = ResourceProperties
        {awsType :: Text
awsType = Text
"AWS::QuickSight::DataSet.LogicalTable",
         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
"Alias" 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
alias]
                           ([Maybe (Key, Value)] -> [(Key, Value)]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
                              [Key -> [TransformOperationProperty] -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"DataTransforms" ([TransformOperationProperty] -> (Key, Value))
-> Maybe [TransformOperationProperty] -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [TransformOperationProperty]
dataTransforms,
                               Key -> LogicalTableSourceProperty -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"Source" (LogicalTableSourceProperty -> (Key, Value))
-> Maybe LogicalTableSourceProperty -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe LogicalTableSourceProperty
source]))}
instance JSON.ToJSON LogicalTableProperty where
  toJSON :: LogicalTableProperty -> Value
toJSON LogicalTableProperty {Maybe [TransformOperationProperty]
Maybe LogicalTableSourceProperty
()
Value Text
haddock_workaround_ :: LogicalTableProperty -> ()
alias :: LogicalTableProperty -> Value Text
dataTransforms :: LogicalTableProperty -> Maybe [TransformOperationProperty]
source :: LogicalTableProperty -> Maybe LogicalTableSourceProperty
haddock_workaround_ :: ()
alias :: Value Text
dataTransforms :: Maybe [TransformOperationProperty]
source :: Maybe LogicalTableSourceProperty
..}
    = [(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
"Alias" 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
alias]
              ([Maybe (Key, Value)] -> [(Key, Value)]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
                 [Key -> [TransformOperationProperty] -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"DataTransforms" ([TransformOperationProperty] -> (Key, Value))
-> Maybe [TransformOperationProperty] -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [TransformOperationProperty]
dataTransforms,
                  Key -> LogicalTableSourceProperty -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"Source" (LogicalTableSourceProperty -> (Key, Value))
-> Maybe LogicalTableSourceProperty -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe LogicalTableSourceProperty
source])))
instance Property "Alias" LogicalTableProperty where
  type PropertyType "Alias" LogicalTableProperty = Value Prelude.Text
  set :: PropertyType "Alias" LogicalTableProperty
-> LogicalTableProperty -> LogicalTableProperty
set PropertyType "Alias" LogicalTableProperty
newValue LogicalTableProperty {Maybe [TransformOperationProperty]
Maybe LogicalTableSourceProperty
()
Value Text
haddock_workaround_ :: LogicalTableProperty -> ()
alias :: LogicalTableProperty -> Value Text
dataTransforms :: LogicalTableProperty -> Maybe [TransformOperationProperty]
source :: LogicalTableProperty -> Maybe LogicalTableSourceProperty
haddock_workaround_ :: ()
alias :: Value Text
dataTransforms :: Maybe [TransformOperationProperty]
source :: Maybe LogicalTableSourceProperty
..}
    = LogicalTableProperty {alias :: Value Text
alias = PropertyType "Alias" LogicalTableProperty
Value Text
newValue, Maybe [TransformOperationProperty]
Maybe LogicalTableSourceProperty
()
haddock_workaround_ :: ()
dataTransforms :: Maybe [TransformOperationProperty]
source :: Maybe LogicalTableSourceProperty
haddock_workaround_ :: ()
dataTransforms :: Maybe [TransformOperationProperty]
source :: Maybe LogicalTableSourceProperty
..}
instance Property "DataTransforms" LogicalTableProperty where
  type PropertyType "DataTransforms" LogicalTableProperty = [TransformOperationProperty]
  set :: PropertyType "DataTransforms" LogicalTableProperty
-> LogicalTableProperty -> LogicalTableProperty
set PropertyType "DataTransforms" LogicalTableProperty
newValue LogicalTableProperty {Maybe [TransformOperationProperty]
Maybe LogicalTableSourceProperty
()
Value Text
haddock_workaround_ :: LogicalTableProperty -> ()
alias :: LogicalTableProperty -> Value Text
dataTransforms :: LogicalTableProperty -> Maybe [TransformOperationProperty]
source :: LogicalTableProperty -> Maybe LogicalTableSourceProperty
haddock_workaround_ :: ()
alias :: Value Text
dataTransforms :: Maybe [TransformOperationProperty]
source :: Maybe LogicalTableSourceProperty
..}
    = LogicalTableProperty {dataTransforms :: Maybe [TransformOperationProperty]
dataTransforms = [TransformOperationProperty] -> Maybe [TransformOperationProperty]
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure [TransformOperationProperty]
PropertyType "DataTransforms" LogicalTableProperty
newValue, Maybe LogicalTableSourceProperty
()
Value Text
haddock_workaround_ :: ()
alias :: Value Text
source :: Maybe LogicalTableSourceProperty
haddock_workaround_ :: ()
alias :: Value Text
source :: Maybe LogicalTableSourceProperty
..}
instance Property "Source" LogicalTableProperty where
  type PropertyType "Source" LogicalTableProperty = LogicalTableSourceProperty
  set :: PropertyType "Source" LogicalTableProperty
-> LogicalTableProperty -> LogicalTableProperty
set PropertyType "Source" LogicalTableProperty
newValue LogicalTableProperty {Maybe [TransformOperationProperty]
Maybe LogicalTableSourceProperty
()
Value Text
haddock_workaround_ :: LogicalTableProperty -> ()
alias :: LogicalTableProperty -> Value Text
dataTransforms :: LogicalTableProperty -> Maybe [TransformOperationProperty]
source :: LogicalTableProperty -> Maybe LogicalTableSourceProperty
haddock_workaround_ :: ()
alias :: Value Text
dataTransforms :: Maybe [TransformOperationProperty]
source :: Maybe LogicalTableSourceProperty
..}
    = LogicalTableProperty {source :: Maybe LogicalTableSourceProperty
source = LogicalTableSourceProperty -> Maybe LogicalTableSourceProperty
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "Source" LogicalTableProperty
LogicalTableSourceProperty
newValue, Maybe [TransformOperationProperty]
()
Value Text
haddock_workaround_ :: ()
alias :: Value Text
dataTransforms :: Maybe [TransformOperationProperty]
haddock_workaround_ :: ()
alias :: Value Text
dataTransforms :: Maybe [TransformOperationProperty]
..}