module Stratosphere.Athena.PreparedStatement (
PreparedStatement(..), mkPreparedStatement
) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import Stratosphere.ResourceProperties
import Stratosphere.Value
data PreparedStatement
=
PreparedStatement {PreparedStatement -> ()
haddock_workaround_ :: (),
PreparedStatement -> Maybe (Value Text)
description :: (Prelude.Maybe (Value Prelude.Text)),
PreparedStatement -> Value Text
queryStatement :: (Value Prelude.Text),
PreparedStatement -> Value Text
statementName :: (Value Prelude.Text),
PreparedStatement -> Value Text
workGroup :: (Value Prelude.Text)}
deriving stock (PreparedStatement -> PreparedStatement -> Bool
(PreparedStatement -> PreparedStatement -> Bool)
-> (PreparedStatement -> PreparedStatement -> Bool)
-> Eq PreparedStatement
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: PreparedStatement -> PreparedStatement -> Bool
== :: PreparedStatement -> PreparedStatement -> Bool
$c/= :: PreparedStatement -> PreparedStatement -> Bool
/= :: PreparedStatement -> PreparedStatement -> Bool
Prelude.Eq, Int -> PreparedStatement -> ShowS
[PreparedStatement] -> ShowS
PreparedStatement -> String
(Int -> PreparedStatement -> ShowS)
-> (PreparedStatement -> String)
-> ([PreparedStatement] -> ShowS)
-> Show PreparedStatement
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> PreparedStatement -> ShowS
showsPrec :: Int -> PreparedStatement -> ShowS
$cshow :: PreparedStatement -> String
show :: PreparedStatement -> String
$cshowList :: [PreparedStatement] -> ShowS
showList :: [PreparedStatement] -> ShowS
Prelude.Show)
mkPreparedStatement ::
Value Prelude.Text
-> Value Prelude.Text -> Value Prelude.Text -> PreparedStatement
mkPreparedStatement :: Value Text -> Value Text -> Value Text -> PreparedStatement
mkPreparedStatement Value Text
queryStatement Value Text
statementName Value Text
workGroup
= PreparedStatement
{haddock_workaround_ :: ()
haddock_workaround_ = (), queryStatement :: Value Text
queryStatement = Value Text
queryStatement,
statementName :: Value Text
statementName = Value Text
statementName, workGroup :: Value Text
workGroup = Value Text
workGroup,
description :: Maybe (Value Text)
description = Maybe (Value Text)
forall a. Maybe a
Prelude.Nothing}
instance ToResourceProperties PreparedStatement where
toResourceProperties :: PreparedStatement -> ResourceProperties
toResourceProperties PreparedStatement {Maybe (Value Text)
()
Value Text
haddock_workaround_ :: PreparedStatement -> ()
description :: PreparedStatement -> Maybe (Value Text)
queryStatement :: PreparedStatement -> Value Text
statementName :: PreparedStatement -> Value Text
workGroup :: PreparedStatement -> Value Text
haddock_workaround_ :: ()
description :: Maybe (Value Text)
queryStatement :: Value Text
statementName :: Value Text
workGroup :: Value Text
..}
= ResourceProperties
{awsType :: Text
awsType = Text
"AWS::Athena::PreparedStatement",
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
"QueryStatement" 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
queryStatement,
Key
"StatementName" 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
statementName,
Key
"WorkGroup" 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
workGroup]
([Maybe (Key, Value)] -> [(Key, Value)]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
[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..=) Key
"Description" (Value Text -> (Key, Value))
-> Maybe (Value Text) -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (Value Text)
description]))}
instance JSON.ToJSON PreparedStatement where
toJSON :: PreparedStatement -> Value
toJSON PreparedStatement {Maybe (Value Text)
()
Value Text
haddock_workaround_ :: PreparedStatement -> ()
description :: PreparedStatement -> Maybe (Value Text)
queryStatement :: PreparedStatement -> Value Text
statementName :: PreparedStatement -> Value Text
workGroup :: PreparedStatement -> Value Text
haddock_workaround_ :: ()
description :: Maybe (Value Text)
queryStatement :: Value Text
statementName :: Value Text
workGroup :: 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
"QueryStatement" 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
queryStatement,
Key
"StatementName" 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
statementName,
Key
"WorkGroup" 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
workGroup]
([Maybe (Key, Value)] -> [(Key, Value)]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
[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..=) Key
"Description" (Value Text -> (Key, Value))
-> Maybe (Value Text) -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (Value Text)
description])))
instance Property "Description" PreparedStatement where
type PropertyType "Description" PreparedStatement = Value Prelude.Text
set :: PropertyType "Description" PreparedStatement
-> PreparedStatement -> PreparedStatement
set PropertyType "Description" PreparedStatement
newValue PreparedStatement {Maybe (Value Text)
()
Value Text
haddock_workaround_ :: PreparedStatement -> ()
description :: PreparedStatement -> Maybe (Value Text)
queryStatement :: PreparedStatement -> Value Text
statementName :: PreparedStatement -> Value Text
workGroup :: PreparedStatement -> Value Text
haddock_workaround_ :: ()
description :: Maybe (Value Text)
queryStatement :: Value Text
statementName :: Value Text
workGroup :: Value Text
..}
= PreparedStatement {description :: Maybe (Value Text)
description = Value Text -> Maybe (Value Text)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "Description" PreparedStatement
Value Text
newValue, ()
Value Text
haddock_workaround_ :: ()
queryStatement :: Value Text
statementName :: Value Text
workGroup :: Value Text
haddock_workaround_ :: ()
queryStatement :: Value Text
statementName :: Value Text
workGroup :: Value Text
..}
instance Property "QueryStatement" PreparedStatement where
type PropertyType "QueryStatement" PreparedStatement = Value Prelude.Text
set :: PropertyType "QueryStatement" PreparedStatement
-> PreparedStatement -> PreparedStatement
set PropertyType "QueryStatement" PreparedStatement
newValue PreparedStatement {Maybe (Value Text)
()
Value Text
haddock_workaround_ :: PreparedStatement -> ()
description :: PreparedStatement -> Maybe (Value Text)
queryStatement :: PreparedStatement -> Value Text
statementName :: PreparedStatement -> Value Text
workGroup :: PreparedStatement -> Value Text
haddock_workaround_ :: ()
description :: Maybe (Value Text)
queryStatement :: Value Text
statementName :: Value Text
workGroup :: Value Text
..}
= PreparedStatement {queryStatement :: Value Text
queryStatement = PropertyType "QueryStatement" PreparedStatement
Value Text
newValue, Maybe (Value Text)
()
Value Text
haddock_workaround_ :: ()
description :: Maybe (Value Text)
statementName :: Value Text
workGroup :: Value Text
haddock_workaround_ :: ()
description :: Maybe (Value Text)
statementName :: Value Text
workGroup :: Value Text
..}
instance Property "StatementName" PreparedStatement where
type PropertyType "StatementName" PreparedStatement = Value Prelude.Text
set :: PropertyType "StatementName" PreparedStatement
-> PreparedStatement -> PreparedStatement
set PropertyType "StatementName" PreparedStatement
newValue PreparedStatement {Maybe (Value Text)
()
Value Text
haddock_workaround_ :: PreparedStatement -> ()
description :: PreparedStatement -> Maybe (Value Text)
queryStatement :: PreparedStatement -> Value Text
statementName :: PreparedStatement -> Value Text
workGroup :: PreparedStatement -> Value Text
haddock_workaround_ :: ()
description :: Maybe (Value Text)
queryStatement :: Value Text
statementName :: Value Text
workGroup :: Value Text
..}
= PreparedStatement {statementName :: Value Text
statementName = PropertyType "StatementName" PreparedStatement
Value Text
newValue, Maybe (Value Text)
()
Value Text
haddock_workaround_ :: ()
description :: Maybe (Value Text)
queryStatement :: Value Text
workGroup :: Value Text
haddock_workaround_ :: ()
description :: Maybe (Value Text)
queryStatement :: Value Text
workGroup :: Value Text
..}
instance Property "WorkGroup" PreparedStatement where
type PropertyType "WorkGroup" PreparedStatement = Value Prelude.Text
set :: PropertyType "WorkGroup" PreparedStatement
-> PreparedStatement -> PreparedStatement
set PropertyType "WorkGroup" PreparedStatement
newValue PreparedStatement {Maybe (Value Text)
()
Value Text
haddock_workaround_ :: PreparedStatement -> ()
description :: PreparedStatement -> Maybe (Value Text)
queryStatement :: PreparedStatement -> Value Text
statementName :: PreparedStatement -> Value Text
workGroup :: PreparedStatement -> Value Text
haddock_workaround_ :: ()
description :: Maybe (Value Text)
queryStatement :: Value Text
statementName :: Value Text
workGroup :: Value Text
..}
= PreparedStatement {workGroup :: Value Text
workGroup = PropertyType "WorkGroup" PreparedStatement
Value Text
newValue, Maybe (Value Text)
()
Value Text
haddock_workaround_ :: ()
description :: Maybe (Value Text)
queryStatement :: Value Text
statementName :: Value Text
haddock_workaround_ :: ()
description :: Maybe (Value Text)
queryStatement :: Value Text
statementName :: Value Text
..}