module Stratosphere.BCMDataExports.Export.DataQueryProperty (
        DataQueryProperty(..), mkDataQueryProperty
    ) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import Stratosphere.ResourceProperties
import Stratosphere.Value
data DataQueryProperty
  = -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-bcmdataexports-export-dataquery.html>
    DataQueryProperty {DataQueryProperty -> ()
haddock_workaround_ :: (),
                       -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-bcmdataexports-export-dataquery.html#cfn-bcmdataexports-export-dataquery-querystatement>
                       DataQueryProperty -> Value Text
queryStatement :: (Value Prelude.Text),
                       -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-bcmdataexports-export-dataquery.html#cfn-bcmdataexports-export-dataquery-tableconfigurations>
                       DataQueryProperty -> Maybe Object
tableConfigurations :: (Prelude.Maybe JSON.Object)}
  deriving stock (DataQueryProperty -> DataQueryProperty -> Bool
(DataQueryProperty -> DataQueryProperty -> Bool)
-> (DataQueryProperty -> DataQueryProperty -> Bool)
-> Eq DataQueryProperty
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: DataQueryProperty -> DataQueryProperty -> Bool
== :: DataQueryProperty -> DataQueryProperty -> Bool
$c/= :: DataQueryProperty -> DataQueryProperty -> Bool
/= :: DataQueryProperty -> DataQueryProperty -> Bool
Prelude.Eq, Int -> DataQueryProperty -> ShowS
[DataQueryProperty] -> ShowS
DataQueryProperty -> String
(Int -> DataQueryProperty -> ShowS)
-> (DataQueryProperty -> String)
-> ([DataQueryProperty] -> ShowS)
-> Show DataQueryProperty
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> DataQueryProperty -> ShowS
showsPrec :: Int -> DataQueryProperty -> ShowS
$cshow :: DataQueryProperty -> String
show :: DataQueryProperty -> String
$cshowList :: [DataQueryProperty] -> ShowS
showList :: [DataQueryProperty] -> ShowS
Prelude.Show)
mkDataQueryProperty :: Value Prelude.Text -> DataQueryProperty
mkDataQueryProperty :: Value Text -> DataQueryProperty
mkDataQueryProperty Value Text
queryStatement
  = DataQueryProperty
      {haddock_workaround_ :: ()
haddock_workaround_ = (), queryStatement :: Value Text
queryStatement = Value Text
queryStatement,
       tableConfigurations :: Maybe Object
tableConfigurations = Maybe Object
forall a. Maybe a
Prelude.Nothing}
instance ToResourceProperties DataQueryProperty where
  toResourceProperties :: DataQueryProperty -> ResourceProperties
toResourceProperties DataQueryProperty {Maybe Object
()
Value Text
haddock_workaround_ :: DataQueryProperty -> ()
queryStatement :: DataQueryProperty -> Value Text
tableConfigurations :: DataQueryProperty -> Maybe Object
haddock_workaround_ :: ()
queryStatement :: Value Text
tableConfigurations :: Maybe Object
..}
    = ResourceProperties
        {awsType :: Text
awsType = Text
"AWS::BCMDataExports::Export.DataQuery",
         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]
                           ([Maybe (Key, Value)] -> [(Key, Value)]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
                              [Key -> Object -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"TableConfigurations"
                                 (Object -> (Key, Value)) -> Maybe Object -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Object
tableConfigurations]))}
instance JSON.ToJSON DataQueryProperty where
  toJSON :: DataQueryProperty -> Value
toJSON DataQueryProperty {Maybe Object
()
Value Text
haddock_workaround_ :: DataQueryProperty -> ()
queryStatement :: DataQueryProperty -> Value Text
tableConfigurations :: DataQueryProperty -> Maybe Object
haddock_workaround_ :: ()
queryStatement :: Value Text
tableConfigurations :: Maybe Object
..}
    = [(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]
              ([Maybe (Key, Value)] -> [(Key, Value)]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
                 [Key -> Object -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"TableConfigurations"
                    (Object -> (Key, Value)) -> Maybe Object -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Object
tableConfigurations])))
instance Property "QueryStatement" DataQueryProperty where
  type PropertyType "QueryStatement" DataQueryProperty = Value Prelude.Text
  set :: PropertyType "QueryStatement" DataQueryProperty
-> DataQueryProperty -> DataQueryProperty
set PropertyType "QueryStatement" DataQueryProperty
newValue DataQueryProperty {Maybe Object
()
Value Text
haddock_workaround_ :: DataQueryProperty -> ()
queryStatement :: DataQueryProperty -> Value Text
tableConfigurations :: DataQueryProperty -> Maybe Object
haddock_workaround_ :: ()
queryStatement :: Value Text
tableConfigurations :: Maybe Object
..}
    = DataQueryProperty {queryStatement :: Value Text
queryStatement = PropertyType "QueryStatement" DataQueryProperty
Value Text
newValue, Maybe Object
()
haddock_workaround_ :: ()
tableConfigurations :: Maybe Object
haddock_workaround_ :: ()
tableConfigurations :: Maybe Object
..}
instance Property "TableConfigurations" DataQueryProperty where
  type PropertyType "TableConfigurations" DataQueryProperty = JSON.Object
  set :: PropertyType "TableConfigurations" DataQueryProperty
-> DataQueryProperty -> DataQueryProperty
set PropertyType "TableConfigurations" DataQueryProperty
newValue DataQueryProperty {Maybe Object
()
Value Text
haddock_workaround_ :: DataQueryProperty -> ()
queryStatement :: DataQueryProperty -> Value Text
tableConfigurations :: DataQueryProperty -> Maybe Object
haddock_workaround_ :: ()
queryStatement :: Value Text
tableConfigurations :: Maybe Object
..}
    = DataQueryProperty
        {tableConfigurations :: Maybe Object
tableConfigurations = Object -> Maybe Object
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure Object
PropertyType "TableConfigurations" DataQueryProperty
newValue, ()
Value Text
haddock_workaround_ :: ()
queryStatement :: Value Text
haddock_workaround_ :: ()
queryStatement :: Value Text
..}