module Stratosphere.QuickSight.Template.GrowthRateComputationProperty (
        module Exports, GrowthRateComputationProperty(..),
        mkGrowthRateComputationProperty
    ) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import {-# SOURCE #-} Stratosphere.QuickSight.Template.DimensionFieldProperty as Exports
import {-# SOURCE #-} Stratosphere.QuickSight.Template.MeasureFieldProperty as Exports
import Stratosphere.ResourceProperties
import Stratosphere.Value
data GrowthRateComputationProperty
  = -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-quicksight-template-growthratecomputation.html>
    GrowthRateComputationProperty {GrowthRateComputationProperty -> ()
haddock_workaround_ :: (),
                                   -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-quicksight-template-growthratecomputation.html#cfn-quicksight-template-growthratecomputation-computationid>
                                   GrowthRateComputationProperty -> Value Text
computationId :: (Value Prelude.Text),
                                   -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-quicksight-template-growthratecomputation.html#cfn-quicksight-template-growthratecomputation-name>
                                   GrowthRateComputationProperty -> Maybe (Value Text)
name :: (Prelude.Maybe (Value Prelude.Text)),
                                   -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-quicksight-template-growthratecomputation.html#cfn-quicksight-template-growthratecomputation-periodsize>
                                   GrowthRateComputationProperty -> Maybe (Value Double)
periodSize :: (Prelude.Maybe (Value Prelude.Double)),
                                   -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-quicksight-template-growthratecomputation.html#cfn-quicksight-template-growthratecomputation-time>
                                   GrowthRateComputationProperty -> Maybe DimensionFieldProperty
time :: (Prelude.Maybe DimensionFieldProperty),
                                   -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-quicksight-template-growthratecomputation.html#cfn-quicksight-template-growthratecomputation-value>
                                   GrowthRateComputationProperty -> Maybe MeasureFieldProperty
value :: (Prelude.Maybe MeasureFieldProperty)}
  deriving stock (GrowthRateComputationProperty
-> GrowthRateComputationProperty -> Bool
(GrowthRateComputationProperty
 -> GrowthRateComputationProperty -> Bool)
-> (GrowthRateComputationProperty
    -> GrowthRateComputationProperty -> Bool)
-> Eq GrowthRateComputationProperty
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: GrowthRateComputationProperty
-> GrowthRateComputationProperty -> Bool
== :: GrowthRateComputationProperty
-> GrowthRateComputationProperty -> Bool
$c/= :: GrowthRateComputationProperty
-> GrowthRateComputationProperty -> Bool
/= :: GrowthRateComputationProperty
-> GrowthRateComputationProperty -> Bool
Prelude.Eq, Int -> GrowthRateComputationProperty -> ShowS
[GrowthRateComputationProperty] -> ShowS
GrowthRateComputationProperty -> String
(Int -> GrowthRateComputationProperty -> ShowS)
-> (GrowthRateComputationProperty -> String)
-> ([GrowthRateComputationProperty] -> ShowS)
-> Show GrowthRateComputationProperty
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> GrowthRateComputationProperty -> ShowS
showsPrec :: Int -> GrowthRateComputationProperty -> ShowS
$cshow :: GrowthRateComputationProperty -> String
show :: GrowthRateComputationProperty -> String
$cshowList :: [GrowthRateComputationProperty] -> ShowS
showList :: [GrowthRateComputationProperty] -> ShowS
Prelude.Show)
mkGrowthRateComputationProperty ::
  Value Prelude.Text -> GrowthRateComputationProperty
mkGrowthRateComputationProperty :: Value Text -> GrowthRateComputationProperty
mkGrowthRateComputationProperty Value Text
computationId
  = GrowthRateComputationProperty
      {haddock_workaround_ :: ()
haddock_workaround_ = (), computationId :: Value Text
computationId = Value Text
computationId,
       name :: Maybe (Value Text)
name = Maybe (Value Text)
forall a. Maybe a
Prelude.Nothing, periodSize :: Maybe (Value Double)
periodSize = Maybe (Value Double)
forall a. Maybe a
Prelude.Nothing,
       time :: Maybe DimensionFieldProperty
time = Maybe DimensionFieldProperty
forall a. Maybe a
Prelude.Nothing, value :: Maybe MeasureFieldProperty
value = Maybe MeasureFieldProperty
forall a. Maybe a
Prelude.Nothing}
instance ToResourceProperties GrowthRateComputationProperty where
  toResourceProperties :: GrowthRateComputationProperty -> ResourceProperties
toResourceProperties GrowthRateComputationProperty {Maybe (Value Double)
Maybe (Value Text)
Maybe MeasureFieldProperty
Maybe DimensionFieldProperty
()
Value Text
haddock_workaround_ :: GrowthRateComputationProperty -> ()
computationId :: GrowthRateComputationProperty -> Value Text
name :: GrowthRateComputationProperty -> Maybe (Value Text)
periodSize :: GrowthRateComputationProperty -> Maybe (Value Double)
time :: GrowthRateComputationProperty -> Maybe DimensionFieldProperty
value :: GrowthRateComputationProperty -> Maybe MeasureFieldProperty
haddock_workaround_ :: ()
computationId :: Value Text
name :: Maybe (Value Text)
periodSize :: Maybe (Value Double)
time :: Maybe DimensionFieldProperty
value :: Maybe MeasureFieldProperty
..}
    = ResourceProperties
        {awsType :: Text
awsType = Text
"AWS::QuickSight::Template.GrowthRateComputation",
         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
"ComputationId" 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
computationId]
                           ([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
"Name" (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)
name,
                               Key -> Value Double -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"PeriodSize" (Value Double -> (Key, Value))
-> Maybe (Value Double) -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (Value Double)
periodSize,
                               Key -> DimensionFieldProperty -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"Time" (DimensionFieldProperty -> (Key, Value))
-> Maybe DimensionFieldProperty -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe DimensionFieldProperty
time,
                               Key -> MeasureFieldProperty -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"Value" (MeasureFieldProperty -> (Key, Value))
-> Maybe MeasureFieldProperty -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe MeasureFieldProperty
value]))}
instance JSON.ToJSON GrowthRateComputationProperty where
  toJSON :: GrowthRateComputationProperty -> Value
toJSON GrowthRateComputationProperty {Maybe (Value Double)
Maybe (Value Text)
Maybe MeasureFieldProperty
Maybe DimensionFieldProperty
()
Value Text
haddock_workaround_ :: GrowthRateComputationProperty -> ()
computationId :: GrowthRateComputationProperty -> Value Text
name :: GrowthRateComputationProperty -> Maybe (Value Text)
periodSize :: GrowthRateComputationProperty -> Maybe (Value Double)
time :: GrowthRateComputationProperty -> Maybe DimensionFieldProperty
value :: GrowthRateComputationProperty -> Maybe MeasureFieldProperty
haddock_workaround_ :: ()
computationId :: Value Text
name :: Maybe (Value Text)
periodSize :: Maybe (Value Double)
time :: Maybe DimensionFieldProperty
value :: Maybe MeasureFieldProperty
..}
    = [(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
"ComputationId" 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
computationId]
              ([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
"Name" (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)
name,
                  Key -> Value Double -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"PeriodSize" (Value Double -> (Key, Value))
-> Maybe (Value Double) -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (Value Double)
periodSize,
                  Key -> DimensionFieldProperty -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"Time" (DimensionFieldProperty -> (Key, Value))
-> Maybe DimensionFieldProperty -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe DimensionFieldProperty
time,
                  Key -> MeasureFieldProperty -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"Value" (MeasureFieldProperty -> (Key, Value))
-> Maybe MeasureFieldProperty -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe MeasureFieldProperty
value])))
instance Property "ComputationId" GrowthRateComputationProperty where
  type PropertyType "ComputationId" GrowthRateComputationProperty = Value Prelude.Text
  set :: PropertyType "ComputationId" GrowthRateComputationProperty
-> GrowthRateComputationProperty -> GrowthRateComputationProperty
set PropertyType "ComputationId" GrowthRateComputationProperty
newValue GrowthRateComputationProperty {Maybe (Value Double)
Maybe (Value Text)
Maybe MeasureFieldProperty
Maybe DimensionFieldProperty
()
Value Text
haddock_workaround_ :: GrowthRateComputationProperty -> ()
computationId :: GrowthRateComputationProperty -> Value Text
name :: GrowthRateComputationProperty -> Maybe (Value Text)
periodSize :: GrowthRateComputationProperty -> Maybe (Value Double)
time :: GrowthRateComputationProperty -> Maybe DimensionFieldProperty
value :: GrowthRateComputationProperty -> Maybe MeasureFieldProperty
haddock_workaround_ :: ()
computationId :: Value Text
name :: Maybe (Value Text)
periodSize :: Maybe (Value Double)
time :: Maybe DimensionFieldProperty
value :: Maybe MeasureFieldProperty
..}
    = GrowthRateComputationProperty {computationId :: Value Text
computationId = PropertyType "ComputationId" GrowthRateComputationProperty
Value Text
newValue, Maybe (Value Double)
Maybe (Value Text)
Maybe MeasureFieldProperty
Maybe DimensionFieldProperty
()
haddock_workaround_ :: ()
name :: Maybe (Value Text)
periodSize :: Maybe (Value Double)
time :: Maybe DimensionFieldProperty
value :: Maybe MeasureFieldProperty
haddock_workaround_ :: ()
name :: Maybe (Value Text)
periodSize :: Maybe (Value Double)
time :: Maybe DimensionFieldProperty
value :: Maybe MeasureFieldProperty
..}
instance Property "Name" GrowthRateComputationProperty where
  type PropertyType "Name" GrowthRateComputationProperty = Value Prelude.Text
  set :: PropertyType "Name" GrowthRateComputationProperty
-> GrowthRateComputationProperty -> GrowthRateComputationProperty
set PropertyType "Name" GrowthRateComputationProperty
newValue GrowthRateComputationProperty {Maybe (Value Double)
Maybe (Value Text)
Maybe MeasureFieldProperty
Maybe DimensionFieldProperty
()
Value Text
haddock_workaround_ :: GrowthRateComputationProperty -> ()
computationId :: GrowthRateComputationProperty -> Value Text
name :: GrowthRateComputationProperty -> Maybe (Value Text)
periodSize :: GrowthRateComputationProperty -> Maybe (Value Double)
time :: GrowthRateComputationProperty -> Maybe DimensionFieldProperty
value :: GrowthRateComputationProperty -> Maybe MeasureFieldProperty
haddock_workaround_ :: ()
computationId :: Value Text
name :: Maybe (Value Text)
periodSize :: Maybe (Value Double)
time :: Maybe DimensionFieldProperty
value :: Maybe MeasureFieldProperty
..}
    = GrowthRateComputationProperty {name :: Maybe (Value Text)
name = Value Text -> Maybe (Value Text)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "Name" GrowthRateComputationProperty
Value Text
newValue, Maybe (Value Double)
Maybe MeasureFieldProperty
Maybe DimensionFieldProperty
()
Value Text
haddock_workaround_ :: ()
computationId :: Value Text
periodSize :: Maybe (Value Double)
time :: Maybe DimensionFieldProperty
value :: Maybe MeasureFieldProperty
haddock_workaround_ :: ()
computationId :: Value Text
periodSize :: Maybe (Value Double)
time :: Maybe DimensionFieldProperty
value :: Maybe MeasureFieldProperty
..}
instance Property "PeriodSize" GrowthRateComputationProperty where
  type PropertyType "PeriodSize" GrowthRateComputationProperty = Value Prelude.Double
  set :: PropertyType "PeriodSize" GrowthRateComputationProperty
-> GrowthRateComputationProperty -> GrowthRateComputationProperty
set PropertyType "PeriodSize" GrowthRateComputationProperty
newValue GrowthRateComputationProperty {Maybe (Value Double)
Maybe (Value Text)
Maybe MeasureFieldProperty
Maybe DimensionFieldProperty
()
Value Text
haddock_workaround_ :: GrowthRateComputationProperty -> ()
computationId :: GrowthRateComputationProperty -> Value Text
name :: GrowthRateComputationProperty -> Maybe (Value Text)
periodSize :: GrowthRateComputationProperty -> Maybe (Value Double)
time :: GrowthRateComputationProperty -> Maybe DimensionFieldProperty
value :: GrowthRateComputationProperty -> Maybe MeasureFieldProperty
haddock_workaround_ :: ()
computationId :: Value Text
name :: Maybe (Value Text)
periodSize :: Maybe (Value Double)
time :: Maybe DimensionFieldProperty
value :: Maybe MeasureFieldProperty
..}
    = GrowthRateComputationProperty
        {periodSize :: Maybe (Value Double)
periodSize = Value Double -> Maybe (Value Double)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "PeriodSize" GrowthRateComputationProperty
Value Double
newValue, Maybe (Value Text)
Maybe MeasureFieldProperty
Maybe DimensionFieldProperty
()
Value Text
haddock_workaround_ :: ()
computationId :: Value Text
name :: Maybe (Value Text)
time :: Maybe DimensionFieldProperty
value :: Maybe MeasureFieldProperty
haddock_workaround_ :: ()
computationId :: Value Text
name :: Maybe (Value Text)
time :: Maybe DimensionFieldProperty
value :: Maybe MeasureFieldProperty
..}
instance Property "Time" GrowthRateComputationProperty where
  type PropertyType "Time" GrowthRateComputationProperty = DimensionFieldProperty
  set :: PropertyType "Time" GrowthRateComputationProperty
-> GrowthRateComputationProperty -> GrowthRateComputationProperty
set PropertyType "Time" GrowthRateComputationProperty
newValue GrowthRateComputationProperty {Maybe (Value Double)
Maybe (Value Text)
Maybe MeasureFieldProperty
Maybe DimensionFieldProperty
()
Value Text
haddock_workaround_ :: GrowthRateComputationProperty -> ()
computationId :: GrowthRateComputationProperty -> Value Text
name :: GrowthRateComputationProperty -> Maybe (Value Text)
periodSize :: GrowthRateComputationProperty -> Maybe (Value Double)
time :: GrowthRateComputationProperty -> Maybe DimensionFieldProperty
value :: GrowthRateComputationProperty -> Maybe MeasureFieldProperty
haddock_workaround_ :: ()
computationId :: Value Text
name :: Maybe (Value Text)
periodSize :: Maybe (Value Double)
time :: Maybe DimensionFieldProperty
value :: Maybe MeasureFieldProperty
..}
    = GrowthRateComputationProperty {time :: Maybe DimensionFieldProperty
time = DimensionFieldProperty -> Maybe DimensionFieldProperty
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "Time" GrowthRateComputationProperty
DimensionFieldProperty
newValue, Maybe (Value Double)
Maybe (Value Text)
Maybe MeasureFieldProperty
()
Value Text
haddock_workaround_ :: ()
computationId :: Value Text
name :: Maybe (Value Text)
periodSize :: Maybe (Value Double)
value :: Maybe MeasureFieldProperty
haddock_workaround_ :: ()
computationId :: Value Text
name :: Maybe (Value Text)
periodSize :: Maybe (Value Double)
value :: Maybe MeasureFieldProperty
..}
instance Property "Value" GrowthRateComputationProperty where
  type PropertyType "Value" GrowthRateComputationProperty = MeasureFieldProperty
  set :: PropertyType "Value" GrowthRateComputationProperty
-> GrowthRateComputationProperty -> GrowthRateComputationProperty
set PropertyType "Value" GrowthRateComputationProperty
newValue GrowthRateComputationProperty {Maybe (Value Double)
Maybe (Value Text)
Maybe MeasureFieldProperty
Maybe DimensionFieldProperty
()
Value Text
haddock_workaround_ :: GrowthRateComputationProperty -> ()
computationId :: GrowthRateComputationProperty -> Value Text
name :: GrowthRateComputationProperty -> Maybe (Value Text)
periodSize :: GrowthRateComputationProperty -> Maybe (Value Double)
time :: GrowthRateComputationProperty -> Maybe DimensionFieldProperty
value :: GrowthRateComputationProperty -> Maybe MeasureFieldProperty
haddock_workaround_ :: ()
computationId :: Value Text
name :: Maybe (Value Text)
periodSize :: Maybe (Value Double)
time :: Maybe DimensionFieldProperty
value :: Maybe MeasureFieldProperty
..}
    = GrowthRateComputationProperty {value :: Maybe MeasureFieldProperty
value = MeasureFieldProperty -> Maybe MeasureFieldProperty
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "Value" GrowthRateComputationProperty
MeasureFieldProperty
newValue, Maybe (Value Double)
Maybe (Value Text)
Maybe DimensionFieldProperty
()
Value Text
haddock_workaround_ :: ()
computationId :: Value Text
name :: Maybe (Value Text)
periodSize :: Maybe (Value Double)
time :: Maybe DimensionFieldProperty
haddock_workaround_ :: ()
computationId :: Value Text
name :: Maybe (Value Text)
periodSize :: Maybe (Value Double)
time :: Maybe DimensionFieldProperty
..}