module Stratosphere.QuickSight.Topic.DataAggregationProperty (
        DataAggregationProperty(..), mkDataAggregationProperty
    ) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import Stratosphere.ResourceProperties
import Stratosphere.Value
data DataAggregationProperty
  = -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-quicksight-topic-dataaggregation.html>
    DataAggregationProperty {DataAggregationProperty -> ()
haddock_workaround_ :: (),
                             -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-quicksight-topic-dataaggregation.html#cfn-quicksight-topic-dataaggregation-datasetrowdategranularity>
                             DataAggregationProperty -> Maybe (Value Text)
datasetRowDateGranularity :: (Prelude.Maybe (Value Prelude.Text)),
                             -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-quicksight-topic-dataaggregation.html#cfn-quicksight-topic-dataaggregation-defaultdatecolumnname>
                             DataAggregationProperty -> Maybe (Value Text)
defaultDateColumnName :: (Prelude.Maybe (Value Prelude.Text))}
  deriving stock (DataAggregationProperty -> DataAggregationProperty -> Bool
(DataAggregationProperty -> DataAggregationProperty -> Bool)
-> (DataAggregationProperty -> DataAggregationProperty -> Bool)
-> Eq DataAggregationProperty
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: DataAggregationProperty -> DataAggregationProperty -> Bool
== :: DataAggregationProperty -> DataAggregationProperty -> Bool
$c/= :: DataAggregationProperty -> DataAggregationProperty -> Bool
/= :: DataAggregationProperty -> DataAggregationProperty -> Bool
Prelude.Eq, Int -> DataAggregationProperty -> ShowS
[DataAggregationProperty] -> ShowS
DataAggregationProperty -> String
(Int -> DataAggregationProperty -> ShowS)
-> (DataAggregationProperty -> String)
-> ([DataAggregationProperty] -> ShowS)
-> Show DataAggregationProperty
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> DataAggregationProperty -> ShowS
showsPrec :: Int -> DataAggregationProperty -> ShowS
$cshow :: DataAggregationProperty -> String
show :: DataAggregationProperty -> String
$cshowList :: [DataAggregationProperty] -> ShowS
showList :: [DataAggregationProperty] -> ShowS
Prelude.Show)
mkDataAggregationProperty :: DataAggregationProperty
mkDataAggregationProperty :: DataAggregationProperty
mkDataAggregationProperty
  = DataAggregationProperty
      {haddock_workaround_ :: ()
haddock_workaround_ = (),
       datasetRowDateGranularity :: Maybe (Value Text)
datasetRowDateGranularity = Maybe (Value Text)
forall a. Maybe a
Prelude.Nothing,
       defaultDateColumnName :: Maybe (Value Text)
defaultDateColumnName = Maybe (Value Text)
forall a. Maybe a
Prelude.Nothing}
instance ToResourceProperties DataAggregationProperty where
  toResourceProperties :: DataAggregationProperty -> ResourceProperties
toResourceProperties DataAggregationProperty {Maybe (Value Text)
()
haddock_workaround_ :: DataAggregationProperty -> ()
datasetRowDateGranularity :: DataAggregationProperty -> Maybe (Value Text)
defaultDateColumnName :: DataAggregationProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
datasetRowDateGranularity :: Maybe (Value Text)
defaultDateColumnName :: Maybe (Value Text)
..}
    = ResourceProperties
        {awsType :: Text
awsType = Text
"AWS::QuickSight::Topic.DataAggregation",
         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 -> 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
"DatasetRowDateGranularity"
                              (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)
datasetRowDateGranularity,
                            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
"DefaultDateColumnName"
                              (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)
defaultDateColumnName])}
instance JSON.ToJSON DataAggregationProperty where
  toJSON :: DataAggregationProperty -> Value
toJSON DataAggregationProperty {Maybe (Value Text)
()
haddock_workaround_ :: DataAggregationProperty -> ()
datasetRowDateGranularity :: DataAggregationProperty -> Maybe (Value Text)
defaultDateColumnName :: DataAggregationProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
datasetRowDateGranularity :: Maybe (Value Text)
defaultDateColumnName :: Maybe (Value Text)
..}
    = [(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 -> 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
"DatasetRowDateGranularity"
                 (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)
datasetRowDateGranularity,
               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
"DefaultDateColumnName"
                 (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)
defaultDateColumnName]))
instance Property "DatasetRowDateGranularity" DataAggregationProperty where
  type PropertyType "DatasetRowDateGranularity" DataAggregationProperty = Value Prelude.Text
  set :: PropertyType "DatasetRowDateGranularity" DataAggregationProperty
-> DataAggregationProperty -> DataAggregationProperty
set PropertyType "DatasetRowDateGranularity" DataAggregationProperty
newValue DataAggregationProperty {Maybe (Value Text)
()
haddock_workaround_ :: DataAggregationProperty -> ()
datasetRowDateGranularity :: DataAggregationProperty -> Maybe (Value Text)
defaultDateColumnName :: DataAggregationProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
datasetRowDateGranularity :: Maybe (Value Text)
defaultDateColumnName :: Maybe (Value Text)
..}
    = DataAggregationProperty
        {datasetRowDateGranularity :: Maybe (Value Text)
datasetRowDateGranularity = Value Text -> Maybe (Value Text)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "DatasetRowDateGranularity" DataAggregationProperty
Value Text
newValue, Maybe (Value Text)
()
haddock_workaround_ :: ()
defaultDateColumnName :: Maybe (Value Text)
haddock_workaround_ :: ()
defaultDateColumnName :: Maybe (Value Text)
..}
instance Property "DefaultDateColumnName" DataAggregationProperty where
  type PropertyType "DefaultDateColumnName" DataAggregationProperty = Value Prelude.Text
  set :: PropertyType "DefaultDateColumnName" DataAggregationProperty
-> DataAggregationProperty -> DataAggregationProperty
set PropertyType "DefaultDateColumnName" DataAggregationProperty
newValue DataAggregationProperty {Maybe (Value Text)
()
haddock_workaround_ :: DataAggregationProperty -> ()
datasetRowDateGranularity :: DataAggregationProperty -> Maybe (Value Text)
defaultDateColumnName :: DataAggregationProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
datasetRowDateGranularity :: Maybe (Value Text)
defaultDateColumnName :: Maybe (Value Text)
..}
    = DataAggregationProperty
        {defaultDateColumnName :: Maybe (Value Text)
defaultDateColumnName = Value Text -> Maybe (Value Text)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "DefaultDateColumnName" DataAggregationProperty
Value Text
newValue, Maybe (Value Text)
()
haddock_workaround_ :: ()
datasetRowDateGranularity :: Maybe (Value Text)
haddock_workaround_ :: ()
datasetRowDateGranularity :: Maybe (Value Text)
..}