module Stratosphere.QuickSight.Template.NumericalAggregationFunctionProperty (
        module Exports, NumericalAggregationFunctionProperty(..),
        mkNumericalAggregationFunctionProperty
    ) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import {-# SOURCE #-} Stratosphere.QuickSight.Template.PercentileAggregationProperty as Exports
import Stratosphere.ResourceProperties
import Stratosphere.Value
data NumericalAggregationFunctionProperty
  = -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-quicksight-template-numericalaggregationfunction.html>
    NumericalAggregationFunctionProperty {NumericalAggregationFunctionProperty -> ()
haddock_workaround_ :: (),
                                          -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-quicksight-template-numericalaggregationfunction.html#cfn-quicksight-template-numericalaggregationfunction-percentileaggregation>
                                          NumericalAggregationFunctionProperty
-> Maybe PercentileAggregationProperty
percentileAggregation :: (Prelude.Maybe PercentileAggregationProperty),
                                          -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-quicksight-template-numericalaggregationfunction.html#cfn-quicksight-template-numericalaggregationfunction-simplenumericalaggregation>
                                          NumericalAggregationFunctionProperty -> Maybe (Value Text)
simpleNumericalAggregation :: (Prelude.Maybe (Value Prelude.Text))}
  deriving stock (NumericalAggregationFunctionProperty
-> NumericalAggregationFunctionProperty -> Bool
(NumericalAggregationFunctionProperty
 -> NumericalAggregationFunctionProperty -> Bool)
-> (NumericalAggregationFunctionProperty
    -> NumericalAggregationFunctionProperty -> Bool)
-> Eq NumericalAggregationFunctionProperty
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: NumericalAggregationFunctionProperty
-> NumericalAggregationFunctionProperty -> Bool
== :: NumericalAggregationFunctionProperty
-> NumericalAggregationFunctionProperty -> Bool
$c/= :: NumericalAggregationFunctionProperty
-> NumericalAggregationFunctionProperty -> Bool
/= :: NumericalAggregationFunctionProperty
-> NumericalAggregationFunctionProperty -> Bool
Prelude.Eq, Int -> NumericalAggregationFunctionProperty -> ShowS
[NumericalAggregationFunctionProperty] -> ShowS
NumericalAggregationFunctionProperty -> String
(Int -> NumericalAggregationFunctionProperty -> ShowS)
-> (NumericalAggregationFunctionProperty -> String)
-> ([NumericalAggregationFunctionProperty] -> ShowS)
-> Show NumericalAggregationFunctionProperty
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> NumericalAggregationFunctionProperty -> ShowS
showsPrec :: Int -> NumericalAggregationFunctionProperty -> ShowS
$cshow :: NumericalAggregationFunctionProperty -> String
show :: NumericalAggregationFunctionProperty -> String
$cshowList :: [NumericalAggregationFunctionProperty] -> ShowS
showList :: [NumericalAggregationFunctionProperty] -> ShowS
Prelude.Show)
mkNumericalAggregationFunctionProperty ::
  NumericalAggregationFunctionProperty
mkNumericalAggregationFunctionProperty :: NumericalAggregationFunctionProperty
mkNumericalAggregationFunctionProperty
  = NumericalAggregationFunctionProperty
      {haddock_workaround_ :: ()
haddock_workaround_ = (), percentileAggregation :: Maybe PercentileAggregationProperty
percentileAggregation = Maybe PercentileAggregationProperty
forall a. Maybe a
Prelude.Nothing,
       simpleNumericalAggregation :: Maybe (Value Text)
simpleNumericalAggregation = Maybe (Value Text)
forall a. Maybe a
Prelude.Nothing}
instance ToResourceProperties NumericalAggregationFunctionProperty where
  toResourceProperties :: NumericalAggregationFunctionProperty -> ResourceProperties
toResourceProperties NumericalAggregationFunctionProperty {Maybe (Value Text)
Maybe PercentileAggregationProperty
()
haddock_workaround_ :: NumericalAggregationFunctionProperty -> ()
percentileAggregation :: NumericalAggregationFunctionProperty
-> Maybe PercentileAggregationProperty
simpleNumericalAggregation :: NumericalAggregationFunctionProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
percentileAggregation :: Maybe PercentileAggregationProperty
simpleNumericalAggregation :: Maybe (Value Text)
..}
    = ResourceProperties
        {awsType :: Text
awsType = Text
"AWS::QuickSight::Template.NumericalAggregationFunction",
         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 -> PercentileAggregationProperty -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"PercentileAggregation"
                              (PercentileAggregationProperty -> (Key, Value))
-> Maybe PercentileAggregationProperty -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe PercentileAggregationProperty
percentileAggregation,
                            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
"SimpleNumericalAggregation"
                              (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)
simpleNumericalAggregation])}
instance JSON.ToJSON NumericalAggregationFunctionProperty where
  toJSON :: NumericalAggregationFunctionProperty -> Value
toJSON NumericalAggregationFunctionProperty {Maybe (Value Text)
Maybe PercentileAggregationProperty
()
haddock_workaround_ :: NumericalAggregationFunctionProperty -> ()
percentileAggregation :: NumericalAggregationFunctionProperty
-> Maybe PercentileAggregationProperty
simpleNumericalAggregation :: NumericalAggregationFunctionProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
percentileAggregation :: Maybe PercentileAggregationProperty
simpleNumericalAggregation :: 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 -> PercentileAggregationProperty -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"PercentileAggregation"
                 (PercentileAggregationProperty -> (Key, Value))
-> Maybe PercentileAggregationProperty -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe PercentileAggregationProperty
percentileAggregation,
               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
"SimpleNumericalAggregation"
                 (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)
simpleNumericalAggregation]))
instance Property "PercentileAggregation" NumericalAggregationFunctionProperty where
  type PropertyType "PercentileAggregation" NumericalAggregationFunctionProperty = PercentileAggregationProperty
  set :: PropertyType
  "PercentileAggregation" NumericalAggregationFunctionProperty
-> NumericalAggregationFunctionProperty
-> NumericalAggregationFunctionProperty
set PropertyType
  "PercentileAggregation" NumericalAggregationFunctionProperty
newValue NumericalAggregationFunctionProperty {Maybe (Value Text)
Maybe PercentileAggregationProperty
()
haddock_workaround_ :: NumericalAggregationFunctionProperty -> ()
percentileAggregation :: NumericalAggregationFunctionProperty
-> Maybe PercentileAggregationProperty
simpleNumericalAggregation :: NumericalAggregationFunctionProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
percentileAggregation :: Maybe PercentileAggregationProperty
simpleNumericalAggregation :: Maybe (Value Text)
..}
    = NumericalAggregationFunctionProperty
        {percentileAggregation :: Maybe PercentileAggregationProperty
percentileAggregation = PercentileAggregationProperty
-> Maybe PercentileAggregationProperty
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType
  "PercentileAggregation" NumericalAggregationFunctionProperty
PercentileAggregationProperty
newValue, Maybe (Value Text)
()
haddock_workaround_ :: ()
simpleNumericalAggregation :: Maybe (Value Text)
haddock_workaround_ :: ()
simpleNumericalAggregation :: Maybe (Value Text)
..}
instance Property "SimpleNumericalAggregation" NumericalAggregationFunctionProperty where
  type PropertyType "SimpleNumericalAggregation" NumericalAggregationFunctionProperty = Value Prelude.Text
  set :: PropertyType
  "SimpleNumericalAggregation" NumericalAggregationFunctionProperty
-> NumericalAggregationFunctionProperty
-> NumericalAggregationFunctionProperty
set PropertyType
  "SimpleNumericalAggregation" NumericalAggregationFunctionProperty
newValue NumericalAggregationFunctionProperty {Maybe (Value Text)
Maybe PercentileAggregationProperty
()
haddock_workaround_ :: NumericalAggregationFunctionProperty -> ()
percentileAggregation :: NumericalAggregationFunctionProperty
-> Maybe PercentileAggregationProperty
simpleNumericalAggregation :: NumericalAggregationFunctionProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
percentileAggregation :: Maybe PercentileAggregationProperty
simpleNumericalAggregation :: Maybe (Value Text)
..}
    = NumericalAggregationFunctionProperty
        {simpleNumericalAggregation :: Maybe (Value Text)
simpleNumericalAggregation = Value Text -> Maybe (Value Text)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType
  "SimpleNumericalAggregation" NumericalAggregationFunctionProperty
Value Text
newValue, Maybe PercentileAggregationProperty
()
haddock_workaround_ :: ()
percentileAggregation :: Maybe PercentileAggregationProperty
haddock_workaround_ :: ()
percentileAggregation :: Maybe PercentileAggregationProperty
..}