module Stratosphere.QuickSight.Analysis.ReferenceLineDynamicDataConfigurationProperty (
        module Exports, ReferenceLineDynamicDataConfigurationProperty(..),
        mkReferenceLineDynamicDataConfigurationProperty
    ) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import {-# SOURCE #-} Stratosphere.QuickSight.Analysis.AggregationFunctionProperty as Exports
import {-# SOURCE #-} Stratosphere.QuickSight.Analysis.ColumnIdentifierProperty as Exports
import {-# SOURCE #-} Stratosphere.QuickSight.Analysis.NumericalAggregationFunctionProperty as Exports
import Stratosphere.ResourceProperties
data ReferenceLineDynamicDataConfigurationProperty
  = -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-quicksight-analysis-referencelinedynamicdataconfiguration.html>
    ReferenceLineDynamicDataConfigurationProperty {ReferenceLineDynamicDataConfigurationProperty -> ()
haddock_workaround_ :: (),
                                                   -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-quicksight-analysis-referencelinedynamicdataconfiguration.html#cfn-quicksight-analysis-referencelinedynamicdataconfiguration-calculation>
                                                   ReferenceLineDynamicDataConfigurationProperty
-> NumericalAggregationFunctionProperty
calculation :: NumericalAggregationFunctionProperty,
                                                   -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-quicksight-analysis-referencelinedynamicdataconfiguration.html#cfn-quicksight-analysis-referencelinedynamicdataconfiguration-column>
                                                   ReferenceLineDynamicDataConfigurationProperty
-> ColumnIdentifierProperty
column :: ColumnIdentifierProperty,
                                                   -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-quicksight-analysis-referencelinedynamicdataconfiguration.html#cfn-quicksight-analysis-referencelinedynamicdataconfiguration-measureaggregationfunction>
                                                   ReferenceLineDynamicDataConfigurationProperty
-> Maybe AggregationFunctionProperty
measureAggregationFunction :: (Prelude.Maybe AggregationFunctionProperty)}
  deriving stock (ReferenceLineDynamicDataConfigurationProperty
-> ReferenceLineDynamicDataConfigurationProperty -> Bool
(ReferenceLineDynamicDataConfigurationProperty
 -> ReferenceLineDynamicDataConfigurationProperty -> Bool)
-> (ReferenceLineDynamicDataConfigurationProperty
    -> ReferenceLineDynamicDataConfigurationProperty -> Bool)
-> Eq ReferenceLineDynamicDataConfigurationProperty
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: ReferenceLineDynamicDataConfigurationProperty
-> ReferenceLineDynamicDataConfigurationProperty -> Bool
== :: ReferenceLineDynamicDataConfigurationProperty
-> ReferenceLineDynamicDataConfigurationProperty -> Bool
$c/= :: ReferenceLineDynamicDataConfigurationProperty
-> ReferenceLineDynamicDataConfigurationProperty -> Bool
/= :: ReferenceLineDynamicDataConfigurationProperty
-> ReferenceLineDynamicDataConfigurationProperty -> Bool
Prelude.Eq, Int -> ReferenceLineDynamicDataConfigurationProperty -> ShowS
[ReferenceLineDynamicDataConfigurationProperty] -> ShowS
ReferenceLineDynamicDataConfigurationProperty -> String
(Int -> ReferenceLineDynamicDataConfigurationProperty -> ShowS)
-> (ReferenceLineDynamicDataConfigurationProperty -> String)
-> ([ReferenceLineDynamicDataConfigurationProperty] -> ShowS)
-> Show ReferenceLineDynamicDataConfigurationProperty
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> ReferenceLineDynamicDataConfigurationProperty -> ShowS
showsPrec :: Int -> ReferenceLineDynamicDataConfigurationProperty -> ShowS
$cshow :: ReferenceLineDynamicDataConfigurationProperty -> String
show :: ReferenceLineDynamicDataConfigurationProperty -> String
$cshowList :: [ReferenceLineDynamicDataConfigurationProperty] -> ShowS
showList :: [ReferenceLineDynamicDataConfigurationProperty] -> ShowS
Prelude.Show)
mkReferenceLineDynamicDataConfigurationProperty ::
  NumericalAggregationFunctionProperty
  -> ColumnIdentifierProperty
     -> ReferenceLineDynamicDataConfigurationProperty
mkReferenceLineDynamicDataConfigurationProperty :: NumericalAggregationFunctionProperty
-> ColumnIdentifierProperty
-> ReferenceLineDynamicDataConfigurationProperty
mkReferenceLineDynamicDataConfigurationProperty NumericalAggregationFunctionProperty
calculation ColumnIdentifierProperty
column
  = ReferenceLineDynamicDataConfigurationProperty
      {haddock_workaround_ :: ()
haddock_workaround_ = (), calculation :: NumericalAggregationFunctionProperty
calculation = NumericalAggregationFunctionProperty
calculation,
       column :: ColumnIdentifierProperty
column = ColumnIdentifierProperty
column, measureAggregationFunction :: Maybe AggregationFunctionProperty
measureAggregationFunction = Maybe AggregationFunctionProperty
forall a. Maybe a
Prelude.Nothing}
instance ToResourceProperties ReferenceLineDynamicDataConfigurationProperty where
  toResourceProperties :: ReferenceLineDynamicDataConfigurationProperty -> ResourceProperties
toResourceProperties
    ReferenceLineDynamicDataConfigurationProperty {Maybe AggregationFunctionProperty
()
ColumnIdentifierProperty
NumericalAggregationFunctionProperty
haddock_workaround_ :: ReferenceLineDynamicDataConfigurationProperty -> ()
calculation :: ReferenceLineDynamicDataConfigurationProperty
-> NumericalAggregationFunctionProperty
column :: ReferenceLineDynamicDataConfigurationProperty
-> ColumnIdentifierProperty
measureAggregationFunction :: ReferenceLineDynamicDataConfigurationProperty
-> Maybe AggregationFunctionProperty
haddock_workaround_ :: ()
calculation :: NumericalAggregationFunctionProperty
column :: ColumnIdentifierProperty
measureAggregationFunction :: Maybe AggregationFunctionProperty
..}
    = ResourceProperties
        {awsType :: Text
awsType = Text
"AWS::QuickSight::Analysis.ReferenceLineDynamicDataConfiguration",
         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
"Calculation" Key -> NumericalAggregationFunctionProperty -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
JSON..= NumericalAggregationFunctionProperty
calculation, Key
"Column" Key -> ColumnIdentifierProperty -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
JSON..= ColumnIdentifierProperty
column]
                           ([Maybe (Key, Value)] -> [(Key, Value)]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
                              [Key -> AggregationFunctionProperty -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"MeasureAggregationFunction"
                                 (AggregationFunctionProperty -> (Key, Value))
-> Maybe AggregationFunctionProperty -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe AggregationFunctionProperty
measureAggregationFunction]))}
instance JSON.ToJSON ReferenceLineDynamicDataConfigurationProperty where
  toJSON :: ReferenceLineDynamicDataConfigurationProperty -> Value
toJSON ReferenceLineDynamicDataConfigurationProperty {Maybe AggregationFunctionProperty
()
ColumnIdentifierProperty
NumericalAggregationFunctionProperty
haddock_workaround_ :: ReferenceLineDynamicDataConfigurationProperty -> ()
calculation :: ReferenceLineDynamicDataConfigurationProperty
-> NumericalAggregationFunctionProperty
column :: ReferenceLineDynamicDataConfigurationProperty
-> ColumnIdentifierProperty
measureAggregationFunction :: ReferenceLineDynamicDataConfigurationProperty
-> Maybe AggregationFunctionProperty
haddock_workaround_ :: ()
calculation :: NumericalAggregationFunctionProperty
column :: ColumnIdentifierProperty
measureAggregationFunction :: Maybe AggregationFunctionProperty
..}
    = [(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
"Calculation" Key -> NumericalAggregationFunctionProperty -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
JSON..= NumericalAggregationFunctionProperty
calculation, Key
"Column" Key -> ColumnIdentifierProperty -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
JSON..= ColumnIdentifierProperty
column]
              ([Maybe (Key, Value)] -> [(Key, Value)]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
                 [Key -> AggregationFunctionProperty -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"MeasureAggregationFunction"
                    (AggregationFunctionProperty -> (Key, Value))
-> Maybe AggregationFunctionProperty -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe AggregationFunctionProperty
measureAggregationFunction])))
instance Property "Calculation" ReferenceLineDynamicDataConfigurationProperty where
  type PropertyType "Calculation" ReferenceLineDynamicDataConfigurationProperty = NumericalAggregationFunctionProperty
  set :: PropertyType
  "Calculation" ReferenceLineDynamicDataConfigurationProperty
-> ReferenceLineDynamicDataConfigurationProperty
-> ReferenceLineDynamicDataConfigurationProperty
set PropertyType
  "Calculation" ReferenceLineDynamicDataConfigurationProperty
newValue ReferenceLineDynamicDataConfigurationProperty {Maybe AggregationFunctionProperty
()
ColumnIdentifierProperty
NumericalAggregationFunctionProperty
haddock_workaround_ :: ReferenceLineDynamicDataConfigurationProperty -> ()
calculation :: ReferenceLineDynamicDataConfigurationProperty
-> NumericalAggregationFunctionProperty
column :: ReferenceLineDynamicDataConfigurationProperty
-> ColumnIdentifierProperty
measureAggregationFunction :: ReferenceLineDynamicDataConfigurationProperty
-> Maybe AggregationFunctionProperty
haddock_workaround_ :: ()
calculation :: NumericalAggregationFunctionProperty
column :: ColumnIdentifierProperty
measureAggregationFunction :: Maybe AggregationFunctionProperty
..}
    = ReferenceLineDynamicDataConfigurationProperty
        {calculation :: NumericalAggregationFunctionProperty
calculation = PropertyType
  "Calculation" ReferenceLineDynamicDataConfigurationProperty
NumericalAggregationFunctionProperty
newValue, Maybe AggregationFunctionProperty
()
ColumnIdentifierProperty
haddock_workaround_ :: ()
column :: ColumnIdentifierProperty
measureAggregationFunction :: Maybe AggregationFunctionProperty
haddock_workaround_ :: ()
column :: ColumnIdentifierProperty
measureAggregationFunction :: Maybe AggregationFunctionProperty
..}
instance Property "Column" ReferenceLineDynamicDataConfigurationProperty where
  type PropertyType "Column" ReferenceLineDynamicDataConfigurationProperty = ColumnIdentifierProperty
  set :: PropertyType "Column" ReferenceLineDynamicDataConfigurationProperty
-> ReferenceLineDynamicDataConfigurationProperty
-> ReferenceLineDynamicDataConfigurationProperty
set PropertyType "Column" ReferenceLineDynamicDataConfigurationProperty
newValue ReferenceLineDynamicDataConfigurationProperty {Maybe AggregationFunctionProperty
()
ColumnIdentifierProperty
NumericalAggregationFunctionProperty
haddock_workaround_ :: ReferenceLineDynamicDataConfigurationProperty -> ()
calculation :: ReferenceLineDynamicDataConfigurationProperty
-> NumericalAggregationFunctionProperty
column :: ReferenceLineDynamicDataConfigurationProperty
-> ColumnIdentifierProperty
measureAggregationFunction :: ReferenceLineDynamicDataConfigurationProperty
-> Maybe AggregationFunctionProperty
haddock_workaround_ :: ()
calculation :: NumericalAggregationFunctionProperty
column :: ColumnIdentifierProperty
measureAggregationFunction :: Maybe AggregationFunctionProperty
..}
    = ReferenceLineDynamicDataConfigurationProperty
        {column :: ColumnIdentifierProperty
column = PropertyType "Column" ReferenceLineDynamicDataConfigurationProperty
ColumnIdentifierProperty
newValue, Maybe AggregationFunctionProperty
()
NumericalAggregationFunctionProperty
haddock_workaround_ :: ()
calculation :: NumericalAggregationFunctionProperty
measureAggregationFunction :: Maybe AggregationFunctionProperty
haddock_workaround_ :: ()
calculation :: NumericalAggregationFunctionProperty
measureAggregationFunction :: Maybe AggregationFunctionProperty
..}
instance Property "MeasureAggregationFunction" ReferenceLineDynamicDataConfigurationProperty where
  type PropertyType "MeasureAggregationFunction" ReferenceLineDynamicDataConfigurationProperty = AggregationFunctionProperty
  set :: PropertyType
  "MeasureAggregationFunction"
  ReferenceLineDynamicDataConfigurationProperty
-> ReferenceLineDynamicDataConfigurationProperty
-> ReferenceLineDynamicDataConfigurationProperty
set PropertyType
  "MeasureAggregationFunction"
  ReferenceLineDynamicDataConfigurationProperty
newValue ReferenceLineDynamicDataConfigurationProperty {Maybe AggregationFunctionProperty
()
ColumnIdentifierProperty
NumericalAggregationFunctionProperty
haddock_workaround_ :: ReferenceLineDynamicDataConfigurationProperty -> ()
calculation :: ReferenceLineDynamicDataConfigurationProperty
-> NumericalAggregationFunctionProperty
column :: ReferenceLineDynamicDataConfigurationProperty
-> ColumnIdentifierProperty
measureAggregationFunction :: ReferenceLineDynamicDataConfigurationProperty
-> Maybe AggregationFunctionProperty
haddock_workaround_ :: ()
calculation :: NumericalAggregationFunctionProperty
column :: ColumnIdentifierProperty
measureAggregationFunction :: Maybe AggregationFunctionProperty
..}
    = ReferenceLineDynamicDataConfigurationProperty
        {measureAggregationFunction :: Maybe AggregationFunctionProperty
measureAggregationFunction = AggregationFunctionProperty -> Maybe AggregationFunctionProperty
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType
  "MeasureAggregationFunction"
  ReferenceLineDynamicDataConfigurationProperty
AggregationFunctionProperty
newValue, ()
ColumnIdentifierProperty
NumericalAggregationFunctionProperty
haddock_workaround_ :: ()
calculation :: NumericalAggregationFunctionProperty
column :: ColumnIdentifierProperty
haddock_workaround_ :: ()
calculation :: NumericalAggregationFunctionProperty
column :: ColumnIdentifierProperty
..}