module Stratosphere.QuickSight.DataSet.PhysicalTableProperty (
module Exports, PhysicalTableProperty(..), mkPhysicalTableProperty
) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import {-# SOURCE #-} Stratosphere.QuickSight.DataSet.CustomSqlProperty as Exports
import {-# SOURCE #-} Stratosphere.QuickSight.DataSet.RelationalTableProperty as Exports
import {-# SOURCE #-} Stratosphere.QuickSight.DataSet.S3SourceProperty as Exports
import Stratosphere.ResourceProperties
data PhysicalTableProperty
=
PhysicalTableProperty {PhysicalTableProperty -> ()
haddock_workaround_ :: (),
PhysicalTableProperty -> Maybe CustomSqlProperty
customSql :: (Prelude.Maybe CustomSqlProperty),
PhysicalTableProperty -> Maybe RelationalTableProperty
relationalTable :: (Prelude.Maybe RelationalTableProperty),
PhysicalTableProperty -> Maybe S3SourceProperty
s3Source :: (Prelude.Maybe S3SourceProperty)}
deriving stock (PhysicalTableProperty -> PhysicalTableProperty -> Bool
(PhysicalTableProperty -> PhysicalTableProperty -> Bool)
-> (PhysicalTableProperty -> PhysicalTableProperty -> Bool)
-> Eq PhysicalTableProperty
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: PhysicalTableProperty -> PhysicalTableProperty -> Bool
== :: PhysicalTableProperty -> PhysicalTableProperty -> Bool
$c/= :: PhysicalTableProperty -> PhysicalTableProperty -> Bool
/= :: PhysicalTableProperty -> PhysicalTableProperty -> Bool
Prelude.Eq, Int -> PhysicalTableProperty -> ShowS
[PhysicalTableProperty] -> ShowS
PhysicalTableProperty -> String
(Int -> PhysicalTableProperty -> ShowS)
-> (PhysicalTableProperty -> String)
-> ([PhysicalTableProperty] -> ShowS)
-> Show PhysicalTableProperty
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> PhysicalTableProperty -> ShowS
showsPrec :: Int -> PhysicalTableProperty -> ShowS
$cshow :: PhysicalTableProperty -> String
show :: PhysicalTableProperty -> String
$cshowList :: [PhysicalTableProperty] -> ShowS
showList :: [PhysicalTableProperty] -> ShowS
Prelude.Show)
mkPhysicalTableProperty :: PhysicalTableProperty
mkPhysicalTableProperty :: PhysicalTableProperty
mkPhysicalTableProperty
= PhysicalTableProperty
{haddock_workaround_ :: ()
haddock_workaround_ = (), customSql :: Maybe CustomSqlProperty
customSql = Maybe CustomSqlProperty
forall a. Maybe a
Prelude.Nothing,
relationalTable :: Maybe RelationalTableProperty
relationalTable = Maybe RelationalTableProperty
forall a. Maybe a
Prelude.Nothing, s3Source :: Maybe S3SourceProperty
s3Source = Maybe S3SourceProperty
forall a. Maybe a
Prelude.Nothing}
instance ToResourceProperties PhysicalTableProperty where
toResourceProperties :: PhysicalTableProperty -> ResourceProperties
toResourceProperties PhysicalTableProperty {Maybe CustomSqlProperty
Maybe RelationalTableProperty
Maybe S3SourceProperty
()
haddock_workaround_ :: PhysicalTableProperty -> ()
customSql :: PhysicalTableProperty -> Maybe CustomSqlProperty
relationalTable :: PhysicalTableProperty -> Maybe RelationalTableProperty
s3Source :: PhysicalTableProperty -> Maybe S3SourceProperty
haddock_workaround_ :: ()
customSql :: Maybe CustomSqlProperty
relationalTable :: Maybe RelationalTableProperty
s3Source :: Maybe S3SourceProperty
..}
= ResourceProperties
{awsType :: Text
awsType = Text
"AWS::QuickSight::DataSet.PhysicalTable",
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 -> CustomSqlProperty -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"CustomSql" (CustomSqlProperty -> (Key, Value))
-> Maybe CustomSqlProperty -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe CustomSqlProperty
customSql,
Key -> RelationalTableProperty -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"RelationalTable" (RelationalTableProperty -> (Key, Value))
-> Maybe RelationalTableProperty -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe RelationalTableProperty
relationalTable,
Key -> S3SourceProperty -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"S3Source" (S3SourceProperty -> (Key, Value))
-> Maybe S3SourceProperty -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe S3SourceProperty
s3Source])}
instance JSON.ToJSON PhysicalTableProperty where
toJSON :: PhysicalTableProperty -> Value
toJSON PhysicalTableProperty {Maybe CustomSqlProperty
Maybe RelationalTableProperty
Maybe S3SourceProperty
()
haddock_workaround_ :: PhysicalTableProperty -> ()
customSql :: PhysicalTableProperty -> Maybe CustomSqlProperty
relationalTable :: PhysicalTableProperty -> Maybe RelationalTableProperty
s3Source :: PhysicalTableProperty -> Maybe S3SourceProperty
haddock_workaround_ :: ()
customSql :: Maybe CustomSqlProperty
relationalTable :: Maybe RelationalTableProperty
s3Source :: Maybe S3SourceProperty
..}
= [(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 -> CustomSqlProperty -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"CustomSql" (CustomSqlProperty -> (Key, Value))
-> Maybe CustomSqlProperty -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe CustomSqlProperty
customSql,
Key -> RelationalTableProperty -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"RelationalTable" (RelationalTableProperty -> (Key, Value))
-> Maybe RelationalTableProperty -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe RelationalTableProperty
relationalTable,
Key -> S3SourceProperty -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"S3Source" (S3SourceProperty -> (Key, Value))
-> Maybe S3SourceProperty -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe S3SourceProperty
s3Source]))
instance Property "CustomSql" PhysicalTableProperty where
type PropertyType "CustomSql" PhysicalTableProperty = CustomSqlProperty
set :: PropertyType "CustomSql" PhysicalTableProperty
-> PhysicalTableProperty -> PhysicalTableProperty
set PropertyType "CustomSql" PhysicalTableProperty
newValue PhysicalTableProperty {Maybe CustomSqlProperty
Maybe RelationalTableProperty
Maybe S3SourceProperty
()
haddock_workaround_ :: PhysicalTableProperty -> ()
customSql :: PhysicalTableProperty -> Maybe CustomSqlProperty
relationalTable :: PhysicalTableProperty -> Maybe RelationalTableProperty
s3Source :: PhysicalTableProperty -> Maybe S3SourceProperty
haddock_workaround_ :: ()
customSql :: Maybe CustomSqlProperty
relationalTable :: Maybe RelationalTableProperty
s3Source :: Maybe S3SourceProperty
..}
= PhysicalTableProperty {customSql :: Maybe CustomSqlProperty
customSql = CustomSqlProperty -> Maybe CustomSqlProperty
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "CustomSql" PhysicalTableProperty
CustomSqlProperty
newValue, Maybe RelationalTableProperty
Maybe S3SourceProperty
()
haddock_workaround_ :: ()
relationalTable :: Maybe RelationalTableProperty
s3Source :: Maybe S3SourceProperty
haddock_workaround_ :: ()
relationalTable :: Maybe RelationalTableProperty
s3Source :: Maybe S3SourceProperty
..}
instance Property "RelationalTable" PhysicalTableProperty where
type PropertyType "RelationalTable" PhysicalTableProperty = RelationalTableProperty
set :: PropertyType "RelationalTable" PhysicalTableProperty
-> PhysicalTableProperty -> PhysicalTableProperty
set PropertyType "RelationalTable" PhysicalTableProperty
newValue PhysicalTableProperty {Maybe CustomSqlProperty
Maybe RelationalTableProperty
Maybe S3SourceProperty
()
haddock_workaround_ :: PhysicalTableProperty -> ()
customSql :: PhysicalTableProperty -> Maybe CustomSqlProperty
relationalTable :: PhysicalTableProperty -> Maybe RelationalTableProperty
s3Source :: PhysicalTableProperty -> Maybe S3SourceProperty
haddock_workaround_ :: ()
customSql :: Maybe CustomSqlProperty
relationalTable :: Maybe RelationalTableProperty
s3Source :: Maybe S3SourceProperty
..}
= PhysicalTableProperty
{relationalTable :: Maybe RelationalTableProperty
relationalTable = RelationalTableProperty -> Maybe RelationalTableProperty
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "RelationalTable" PhysicalTableProperty
RelationalTableProperty
newValue, Maybe CustomSqlProperty
Maybe S3SourceProperty
()
haddock_workaround_ :: ()
customSql :: Maybe CustomSqlProperty
s3Source :: Maybe S3SourceProperty
haddock_workaround_ :: ()
customSql :: Maybe CustomSqlProperty
s3Source :: Maybe S3SourceProperty
..}
instance Property "S3Source" PhysicalTableProperty where
type PropertyType "S3Source" PhysicalTableProperty = S3SourceProperty
set :: PropertyType "S3Source" PhysicalTableProperty
-> PhysicalTableProperty -> PhysicalTableProperty
set PropertyType "S3Source" PhysicalTableProperty
newValue PhysicalTableProperty {Maybe CustomSqlProperty
Maybe RelationalTableProperty
Maybe S3SourceProperty
()
haddock_workaround_ :: PhysicalTableProperty -> ()
customSql :: PhysicalTableProperty -> Maybe CustomSqlProperty
relationalTable :: PhysicalTableProperty -> Maybe RelationalTableProperty
s3Source :: PhysicalTableProperty -> Maybe S3SourceProperty
haddock_workaround_ :: ()
customSql :: Maybe CustomSqlProperty
relationalTable :: Maybe RelationalTableProperty
s3Source :: Maybe S3SourceProperty
..}
= PhysicalTableProperty {s3Source :: Maybe S3SourceProperty
s3Source = S3SourceProperty -> Maybe S3SourceProperty
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "S3Source" PhysicalTableProperty
S3SourceProperty
newValue, Maybe CustomSqlProperty
Maybe RelationalTableProperty
()
haddock_workaround_ :: ()
customSql :: Maybe CustomSqlProperty
relationalTable :: Maybe RelationalTableProperty
haddock_workaround_ :: ()
customSql :: Maybe CustomSqlProperty
relationalTable :: Maybe RelationalTableProperty
..}