module Stratosphere.QuickSight.DataSet.CustomSqlProperty (
        module Exports, CustomSqlProperty(..), mkCustomSqlProperty
    ) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import {-# SOURCE #-} Stratosphere.QuickSight.DataSet.InputColumnProperty as Exports
import Stratosphere.ResourceProperties
import Stratosphere.Value
data CustomSqlProperty
  = -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-quicksight-dataset-customsql.html>
    CustomSqlProperty {CustomSqlProperty -> ()
haddock_workaround_ :: (),
                       -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-quicksight-dataset-customsql.html#cfn-quicksight-dataset-customsql-columns>
                       CustomSqlProperty -> Maybe [InputColumnProperty]
columns :: (Prelude.Maybe [InputColumnProperty]),
                       -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-quicksight-dataset-customsql.html#cfn-quicksight-dataset-customsql-datasourcearn>
                       CustomSqlProperty -> Value Text
dataSourceArn :: (Value Prelude.Text),
                       -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-quicksight-dataset-customsql.html#cfn-quicksight-dataset-customsql-name>
                       CustomSqlProperty -> Value Text
name :: (Value Prelude.Text),
                       -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-quicksight-dataset-customsql.html#cfn-quicksight-dataset-customsql-sqlquery>
                       CustomSqlProperty -> Value Text
sqlQuery :: (Value Prelude.Text)}
  deriving stock (CustomSqlProperty -> CustomSqlProperty -> Bool
(CustomSqlProperty -> CustomSqlProperty -> Bool)
-> (CustomSqlProperty -> CustomSqlProperty -> Bool)
-> Eq CustomSqlProperty
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: CustomSqlProperty -> CustomSqlProperty -> Bool
== :: CustomSqlProperty -> CustomSqlProperty -> Bool
$c/= :: CustomSqlProperty -> CustomSqlProperty -> Bool
/= :: CustomSqlProperty -> CustomSqlProperty -> Bool
Prelude.Eq, Int -> CustomSqlProperty -> ShowS
[CustomSqlProperty] -> ShowS
CustomSqlProperty -> String
(Int -> CustomSqlProperty -> ShowS)
-> (CustomSqlProperty -> String)
-> ([CustomSqlProperty] -> ShowS)
-> Show CustomSqlProperty
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> CustomSqlProperty -> ShowS
showsPrec :: Int -> CustomSqlProperty -> ShowS
$cshow :: CustomSqlProperty -> String
show :: CustomSqlProperty -> String
$cshowList :: [CustomSqlProperty] -> ShowS
showList :: [CustomSqlProperty] -> ShowS
Prelude.Show)
mkCustomSqlProperty ::
  Value Prelude.Text
  -> Value Prelude.Text -> Value Prelude.Text -> CustomSqlProperty
mkCustomSqlProperty :: Value Text -> Value Text -> Value Text -> CustomSqlProperty
mkCustomSqlProperty Value Text
dataSourceArn Value Text
name Value Text
sqlQuery
  = CustomSqlProperty
      {haddock_workaround_ :: ()
haddock_workaround_ = (), dataSourceArn :: Value Text
dataSourceArn = Value Text
dataSourceArn,
       name :: Value Text
name = Value Text
name, sqlQuery :: Value Text
sqlQuery = Value Text
sqlQuery, columns :: Maybe [InputColumnProperty]
columns = Maybe [InputColumnProperty]
forall a. Maybe a
Prelude.Nothing}
instance ToResourceProperties CustomSqlProperty where
  toResourceProperties :: CustomSqlProperty -> ResourceProperties
toResourceProperties CustomSqlProperty {Maybe [InputColumnProperty]
()
Value Text
haddock_workaround_ :: CustomSqlProperty -> ()
columns :: CustomSqlProperty -> Maybe [InputColumnProperty]
dataSourceArn :: CustomSqlProperty -> Value Text
name :: CustomSqlProperty -> Value Text
sqlQuery :: CustomSqlProperty -> Value Text
haddock_workaround_ :: ()
columns :: Maybe [InputColumnProperty]
dataSourceArn :: Value Text
name :: Value Text
sqlQuery :: Value Text
..}
    = ResourceProperties
        {awsType :: Text
awsType = Text
"AWS::QuickSight::DataSet.CustomSql",
         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
"DataSourceArn" 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
dataSourceArn, Key
"Name" 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
name,
                            Key
"SqlQuery" 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
sqlQuery]
                           ([Maybe (Key, Value)] -> [(Key, Value)]
forall a. [Maybe a] -> [a]
Prelude.catMaybes [Key -> [InputColumnProperty] -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"Columns" ([InputColumnProperty] -> (Key, Value))
-> Maybe [InputColumnProperty] -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [InputColumnProperty]
columns]))}
instance JSON.ToJSON CustomSqlProperty where
  toJSON :: CustomSqlProperty -> Value
toJSON CustomSqlProperty {Maybe [InputColumnProperty]
()
Value Text
haddock_workaround_ :: CustomSqlProperty -> ()
columns :: CustomSqlProperty -> Maybe [InputColumnProperty]
dataSourceArn :: CustomSqlProperty -> Value Text
name :: CustomSqlProperty -> Value Text
sqlQuery :: CustomSqlProperty -> Value Text
haddock_workaround_ :: ()
columns :: Maybe [InputColumnProperty]
dataSourceArn :: Value Text
name :: Value Text
sqlQuery :: Value Text
..}
    = [(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
"DataSourceArn" 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
dataSourceArn, Key
"Name" 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
name,
               Key
"SqlQuery" 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
sqlQuery]
              ([Maybe (Key, Value)] -> [(Key, Value)]
forall a. [Maybe a] -> [a]
Prelude.catMaybes [Key -> [InputColumnProperty] -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"Columns" ([InputColumnProperty] -> (Key, Value))
-> Maybe [InputColumnProperty] -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [InputColumnProperty]
columns])))
instance Property "Columns" CustomSqlProperty where
  type PropertyType "Columns" CustomSqlProperty = [InputColumnProperty]
  set :: PropertyType "Columns" CustomSqlProperty
-> CustomSqlProperty -> CustomSqlProperty
set PropertyType "Columns" CustomSqlProperty
newValue CustomSqlProperty {Maybe [InputColumnProperty]
()
Value Text
haddock_workaround_ :: CustomSqlProperty -> ()
columns :: CustomSqlProperty -> Maybe [InputColumnProperty]
dataSourceArn :: CustomSqlProperty -> Value Text
name :: CustomSqlProperty -> Value Text
sqlQuery :: CustomSqlProperty -> Value Text
haddock_workaround_ :: ()
columns :: Maybe [InputColumnProperty]
dataSourceArn :: Value Text
name :: Value Text
sqlQuery :: Value Text
..}
    = CustomSqlProperty {columns :: Maybe [InputColumnProperty]
columns = [InputColumnProperty] -> Maybe [InputColumnProperty]
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure [InputColumnProperty]
PropertyType "Columns" CustomSqlProperty
newValue, ()
Value Text
haddock_workaround_ :: ()
dataSourceArn :: Value Text
name :: Value Text
sqlQuery :: Value Text
haddock_workaround_ :: ()
dataSourceArn :: Value Text
name :: Value Text
sqlQuery :: Value Text
..}
instance Property "DataSourceArn" CustomSqlProperty where
  type PropertyType "DataSourceArn" CustomSqlProperty = Value Prelude.Text
  set :: PropertyType "DataSourceArn" CustomSqlProperty
-> CustomSqlProperty -> CustomSqlProperty
set PropertyType "DataSourceArn" CustomSqlProperty
newValue CustomSqlProperty {Maybe [InputColumnProperty]
()
Value Text
haddock_workaround_ :: CustomSqlProperty -> ()
columns :: CustomSqlProperty -> Maybe [InputColumnProperty]
dataSourceArn :: CustomSqlProperty -> Value Text
name :: CustomSqlProperty -> Value Text
sqlQuery :: CustomSqlProperty -> Value Text
haddock_workaround_ :: ()
columns :: Maybe [InputColumnProperty]
dataSourceArn :: Value Text
name :: Value Text
sqlQuery :: Value Text
..}
    = CustomSqlProperty {dataSourceArn :: Value Text
dataSourceArn = PropertyType "DataSourceArn" CustomSqlProperty
Value Text
newValue, Maybe [InputColumnProperty]
()
Value Text
haddock_workaround_ :: ()
columns :: Maybe [InputColumnProperty]
name :: Value Text
sqlQuery :: Value Text
haddock_workaround_ :: ()
columns :: Maybe [InputColumnProperty]
name :: Value Text
sqlQuery :: Value Text
..}
instance Property "Name" CustomSqlProperty where
  type PropertyType "Name" CustomSqlProperty = Value Prelude.Text
  set :: PropertyType "Name" CustomSqlProperty
-> CustomSqlProperty -> CustomSqlProperty
set PropertyType "Name" CustomSqlProperty
newValue CustomSqlProperty {Maybe [InputColumnProperty]
()
Value Text
haddock_workaround_ :: CustomSqlProperty -> ()
columns :: CustomSqlProperty -> Maybe [InputColumnProperty]
dataSourceArn :: CustomSqlProperty -> Value Text
name :: CustomSqlProperty -> Value Text
sqlQuery :: CustomSqlProperty -> Value Text
haddock_workaround_ :: ()
columns :: Maybe [InputColumnProperty]
dataSourceArn :: Value Text
name :: Value Text
sqlQuery :: Value Text
..}
    = CustomSqlProperty {name :: Value Text
name = PropertyType "Name" CustomSqlProperty
Value Text
newValue, Maybe [InputColumnProperty]
()
Value Text
haddock_workaround_ :: ()
columns :: Maybe [InputColumnProperty]
dataSourceArn :: Value Text
sqlQuery :: Value Text
haddock_workaround_ :: ()
columns :: Maybe [InputColumnProperty]
dataSourceArn :: Value Text
sqlQuery :: Value Text
..}
instance Property "SqlQuery" CustomSqlProperty where
  type PropertyType "SqlQuery" CustomSqlProperty = Value Prelude.Text
  set :: PropertyType "SqlQuery" CustomSqlProperty
-> CustomSqlProperty -> CustomSqlProperty
set PropertyType "SqlQuery" CustomSqlProperty
newValue CustomSqlProperty {Maybe [InputColumnProperty]
()
Value Text
haddock_workaround_ :: CustomSqlProperty -> ()
columns :: CustomSqlProperty -> Maybe [InputColumnProperty]
dataSourceArn :: CustomSqlProperty -> Value Text
name :: CustomSqlProperty -> Value Text
sqlQuery :: CustomSqlProperty -> Value Text
haddock_workaround_ :: ()
columns :: Maybe [InputColumnProperty]
dataSourceArn :: Value Text
name :: Value Text
sqlQuery :: Value Text
..}
    = CustomSqlProperty {sqlQuery :: Value Text
sqlQuery = PropertyType "SqlQuery" CustomSqlProperty
Value Text
newValue, Maybe [InputColumnProperty]
()
Value Text
haddock_workaround_ :: ()
columns :: Maybe [InputColumnProperty]
dataSourceArn :: Value Text
name :: Value Text
haddock_workaround_ :: ()
columns :: Maybe [InputColumnProperty]
dataSourceArn :: Value Text
name :: Value Text
..}