module Stratosphere.QuickSight.Analysis.TotalAggregationComputationProperty (
        module Exports, TotalAggregationComputationProperty(..),
        mkTotalAggregationComputationProperty
    ) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import {-# SOURCE #-} Stratosphere.QuickSight.Analysis.MeasureFieldProperty as Exports
import Stratosphere.ResourceProperties
import Stratosphere.Value
data TotalAggregationComputationProperty
  = -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-quicksight-analysis-totalaggregationcomputation.html>
    TotalAggregationComputationProperty {TotalAggregationComputationProperty -> ()
haddock_workaround_ :: (),
                                         -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-quicksight-analysis-totalaggregationcomputation.html#cfn-quicksight-analysis-totalaggregationcomputation-computationid>
                                         TotalAggregationComputationProperty -> Value Text
computationId :: (Value Prelude.Text),
                                         -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-quicksight-analysis-totalaggregationcomputation.html#cfn-quicksight-analysis-totalaggregationcomputation-name>
                                         TotalAggregationComputationProperty -> Maybe (Value Text)
name :: (Prelude.Maybe (Value Prelude.Text)),
                                         -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-quicksight-analysis-totalaggregationcomputation.html#cfn-quicksight-analysis-totalaggregationcomputation-value>
                                         TotalAggregationComputationProperty -> Maybe MeasureFieldProperty
value :: (Prelude.Maybe MeasureFieldProperty)}
  deriving stock (TotalAggregationComputationProperty
-> TotalAggregationComputationProperty -> Bool
(TotalAggregationComputationProperty
 -> TotalAggregationComputationProperty -> Bool)
-> (TotalAggregationComputationProperty
    -> TotalAggregationComputationProperty -> Bool)
-> Eq TotalAggregationComputationProperty
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: TotalAggregationComputationProperty
-> TotalAggregationComputationProperty -> Bool
== :: TotalAggregationComputationProperty
-> TotalAggregationComputationProperty -> Bool
$c/= :: TotalAggregationComputationProperty
-> TotalAggregationComputationProperty -> Bool
/= :: TotalAggregationComputationProperty
-> TotalAggregationComputationProperty -> Bool
Prelude.Eq, Int -> TotalAggregationComputationProperty -> ShowS
[TotalAggregationComputationProperty] -> ShowS
TotalAggregationComputationProperty -> String
(Int -> TotalAggregationComputationProperty -> ShowS)
-> (TotalAggregationComputationProperty -> String)
-> ([TotalAggregationComputationProperty] -> ShowS)
-> Show TotalAggregationComputationProperty
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> TotalAggregationComputationProperty -> ShowS
showsPrec :: Int -> TotalAggregationComputationProperty -> ShowS
$cshow :: TotalAggregationComputationProperty -> String
show :: TotalAggregationComputationProperty -> String
$cshowList :: [TotalAggregationComputationProperty] -> ShowS
showList :: [TotalAggregationComputationProperty] -> ShowS
Prelude.Show)
mkTotalAggregationComputationProperty ::
  Value Prelude.Text -> TotalAggregationComputationProperty
mkTotalAggregationComputationProperty :: Value Text -> TotalAggregationComputationProperty
mkTotalAggregationComputationProperty Value Text
computationId
  = TotalAggregationComputationProperty
      {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, value :: Maybe MeasureFieldProperty
value = Maybe MeasureFieldProperty
forall a. Maybe a
Prelude.Nothing}
instance ToResourceProperties TotalAggregationComputationProperty where
  toResourceProperties :: TotalAggregationComputationProperty -> ResourceProperties
toResourceProperties TotalAggregationComputationProperty {Maybe (Value Text)
Maybe MeasureFieldProperty
()
Value Text
haddock_workaround_ :: TotalAggregationComputationProperty -> ()
computationId :: TotalAggregationComputationProperty -> Value Text
name :: TotalAggregationComputationProperty -> Maybe (Value Text)
value :: TotalAggregationComputationProperty -> Maybe MeasureFieldProperty
haddock_workaround_ :: ()
computationId :: Value Text
name :: Maybe (Value Text)
value :: Maybe MeasureFieldProperty
..}
    = ResourceProperties
        {awsType :: Text
awsType = Text
"AWS::QuickSight::Analysis.TotalAggregationComputation",
         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 -> 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 TotalAggregationComputationProperty where
  toJSON :: TotalAggregationComputationProperty -> Value
toJSON TotalAggregationComputationProperty {Maybe (Value Text)
Maybe MeasureFieldProperty
()
Value Text
haddock_workaround_ :: TotalAggregationComputationProperty -> ()
computationId :: TotalAggregationComputationProperty -> Value Text
name :: TotalAggregationComputationProperty -> Maybe (Value Text)
value :: TotalAggregationComputationProperty -> Maybe MeasureFieldProperty
haddock_workaround_ :: ()
computationId :: Value Text
name :: Maybe (Value Text)
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 -> 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" TotalAggregationComputationProperty where
  type PropertyType "ComputationId" TotalAggregationComputationProperty = Value Prelude.Text
  set :: PropertyType "ComputationId" TotalAggregationComputationProperty
-> TotalAggregationComputationProperty
-> TotalAggregationComputationProperty
set PropertyType "ComputationId" TotalAggregationComputationProperty
newValue TotalAggregationComputationProperty {Maybe (Value Text)
Maybe MeasureFieldProperty
()
Value Text
haddock_workaround_ :: TotalAggregationComputationProperty -> ()
computationId :: TotalAggregationComputationProperty -> Value Text
name :: TotalAggregationComputationProperty -> Maybe (Value Text)
value :: TotalAggregationComputationProperty -> Maybe MeasureFieldProperty
haddock_workaround_ :: ()
computationId :: Value Text
name :: Maybe (Value Text)
value :: Maybe MeasureFieldProperty
..}
    = TotalAggregationComputationProperty
        {computationId :: Value Text
computationId = PropertyType "ComputationId" TotalAggregationComputationProperty
Value Text
newValue, Maybe (Value Text)
Maybe MeasureFieldProperty
()
haddock_workaround_ :: ()
name :: Maybe (Value Text)
value :: Maybe MeasureFieldProperty
haddock_workaround_ :: ()
name :: Maybe (Value Text)
value :: Maybe MeasureFieldProperty
..}
instance Property "Name" TotalAggregationComputationProperty where
  type PropertyType "Name" TotalAggregationComputationProperty = Value Prelude.Text
  set :: PropertyType "Name" TotalAggregationComputationProperty
-> TotalAggregationComputationProperty
-> TotalAggregationComputationProperty
set PropertyType "Name" TotalAggregationComputationProperty
newValue TotalAggregationComputationProperty {Maybe (Value Text)
Maybe MeasureFieldProperty
()
Value Text
haddock_workaround_ :: TotalAggregationComputationProperty -> ()
computationId :: TotalAggregationComputationProperty -> Value Text
name :: TotalAggregationComputationProperty -> Maybe (Value Text)
value :: TotalAggregationComputationProperty -> Maybe MeasureFieldProperty
haddock_workaround_ :: ()
computationId :: Value Text
name :: Maybe (Value Text)
value :: Maybe MeasureFieldProperty
..}
    = TotalAggregationComputationProperty
        {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" TotalAggregationComputationProperty
Value Text
newValue, Maybe MeasureFieldProperty
()
Value Text
haddock_workaround_ :: ()
computationId :: Value Text
value :: Maybe MeasureFieldProperty
haddock_workaround_ :: ()
computationId :: Value Text
value :: Maybe MeasureFieldProperty
..}
instance Property "Value" TotalAggregationComputationProperty where
  type PropertyType "Value" TotalAggregationComputationProperty = MeasureFieldProperty
  set :: PropertyType "Value" TotalAggregationComputationProperty
-> TotalAggregationComputationProperty
-> TotalAggregationComputationProperty
set PropertyType "Value" TotalAggregationComputationProperty
newValue TotalAggregationComputationProperty {Maybe (Value Text)
Maybe MeasureFieldProperty
()
Value Text
haddock_workaround_ :: TotalAggregationComputationProperty -> ()
computationId :: TotalAggregationComputationProperty -> Value Text
name :: TotalAggregationComputationProperty -> Maybe (Value Text)
value :: TotalAggregationComputationProperty -> Maybe MeasureFieldProperty
haddock_workaround_ :: ()
computationId :: Value Text
name :: Maybe (Value Text)
value :: Maybe MeasureFieldProperty
..}
    = TotalAggregationComputationProperty
        {value :: Maybe MeasureFieldProperty
value = MeasureFieldProperty -> Maybe MeasureFieldProperty
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "Value" TotalAggregationComputationProperty
MeasureFieldProperty
newValue, Maybe (Value Text)
()
Value Text
haddock_workaround_ :: ()
computationId :: Value Text
name :: Maybe (Value Text)
haddock_workaround_ :: ()
computationId :: Value Text
name :: Maybe (Value Text)
..}