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