module Stratosphere.QuickSight.Analysis.MetricComparisonComputationProperty (
module Exports, MetricComparisonComputationProperty(..),
mkMetricComparisonComputationProperty
) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import {-# SOURCE #-} Stratosphere.QuickSight.Analysis.DimensionFieldProperty as Exports
import {-# SOURCE #-} Stratosphere.QuickSight.Analysis.MeasureFieldProperty as Exports
import Stratosphere.ResourceProperties
import Stratosphere.Value
data MetricComparisonComputationProperty
=
MetricComparisonComputationProperty {MetricComparisonComputationProperty -> ()
haddock_workaround_ :: (),
MetricComparisonComputationProperty -> Value Text
computationId :: (Value Prelude.Text),
MetricComparisonComputationProperty -> Maybe MeasureFieldProperty
fromValue :: (Prelude.Maybe MeasureFieldProperty),
MetricComparisonComputationProperty -> Maybe (Value Text)
name :: (Prelude.Maybe (Value Prelude.Text)),
MetricComparisonComputationProperty -> Maybe MeasureFieldProperty
targetValue :: (Prelude.Maybe MeasureFieldProperty),
MetricComparisonComputationProperty -> Maybe DimensionFieldProperty
time :: (Prelude.Maybe DimensionFieldProperty)}
deriving stock (MetricComparisonComputationProperty
-> MetricComparisonComputationProperty -> Bool
(MetricComparisonComputationProperty
-> MetricComparisonComputationProperty -> Bool)
-> (MetricComparisonComputationProperty
-> MetricComparisonComputationProperty -> Bool)
-> Eq MetricComparisonComputationProperty
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: MetricComparisonComputationProperty
-> MetricComparisonComputationProperty -> Bool
== :: MetricComparisonComputationProperty
-> MetricComparisonComputationProperty -> Bool
$c/= :: MetricComparisonComputationProperty
-> MetricComparisonComputationProperty -> Bool
/= :: MetricComparisonComputationProperty
-> MetricComparisonComputationProperty -> Bool
Prelude.Eq, Int -> MetricComparisonComputationProperty -> ShowS
[MetricComparisonComputationProperty] -> ShowS
MetricComparisonComputationProperty -> String
(Int -> MetricComparisonComputationProperty -> ShowS)
-> (MetricComparisonComputationProperty -> String)
-> ([MetricComparisonComputationProperty] -> ShowS)
-> Show MetricComparisonComputationProperty
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> MetricComparisonComputationProperty -> ShowS
showsPrec :: Int -> MetricComparisonComputationProperty -> ShowS
$cshow :: MetricComparisonComputationProperty -> String
show :: MetricComparisonComputationProperty -> String
$cshowList :: [MetricComparisonComputationProperty] -> ShowS
showList :: [MetricComparisonComputationProperty] -> ShowS
Prelude.Show)
mkMetricComparisonComputationProperty ::
Value Prelude.Text -> MetricComparisonComputationProperty
mkMetricComparisonComputationProperty :: Value Text -> MetricComparisonComputationProperty
mkMetricComparisonComputationProperty Value Text
computationId
= MetricComparisonComputationProperty
{haddock_workaround_ :: ()
haddock_workaround_ = (), computationId :: Value Text
computationId = Value Text
computationId,
fromValue :: Maybe MeasureFieldProperty
fromValue = Maybe MeasureFieldProperty
forall a. Maybe a
Prelude.Nothing, name :: Maybe (Value Text)
name = Maybe (Value Text)
forall a. Maybe a
Prelude.Nothing,
targetValue :: Maybe MeasureFieldProperty
targetValue = Maybe MeasureFieldProperty
forall a. Maybe a
Prelude.Nothing, time :: Maybe DimensionFieldProperty
time = Maybe DimensionFieldProperty
forall a. Maybe a
Prelude.Nothing}
instance ToResourceProperties MetricComparisonComputationProperty where
toResourceProperties :: MetricComparisonComputationProperty -> ResourceProperties
toResourceProperties MetricComparisonComputationProperty {Maybe (Value Text)
Maybe MeasureFieldProperty
Maybe DimensionFieldProperty
()
Value Text
haddock_workaround_ :: MetricComparisonComputationProperty -> ()
computationId :: MetricComparisonComputationProperty -> Value Text
fromValue :: MetricComparisonComputationProperty -> Maybe MeasureFieldProperty
name :: MetricComparisonComputationProperty -> Maybe (Value Text)
targetValue :: MetricComparisonComputationProperty -> Maybe MeasureFieldProperty
time :: MetricComparisonComputationProperty -> Maybe DimensionFieldProperty
haddock_workaround_ :: ()
computationId :: Value Text
fromValue :: Maybe MeasureFieldProperty
name :: Maybe (Value Text)
targetValue :: Maybe MeasureFieldProperty
time :: Maybe DimensionFieldProperty
..}
= ResourceProperties
{awsType :: Text
awsType = Text
"AWS::QuickSight::Analysis.MetricComparisonComputation",
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 -> 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
"FromValue" (MeasureFieldProperty -> (Key, Value))
-> Maybe MeasureFieldProperty -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe MeasureFieldProperty
fromValue,
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
"TargetValue" (MeasureFieldProperty -> (Key, Value))
-> Maybe MeasureFieldProperty -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe MeasureFieldProperty
targetValue,
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]))}
instance JSON.ToJSON MetricComparisonComputationProperty where
toJSON :: MetricComparisonComputationProperty -> Value
toJSON MetricComparisonComputationProperty {Maybe (Value Text)
Maybe MeasureFieldProperty
Maybe DimensionFieldProperty
()
Value Text
haddock_workaround_ :: MetricComparisonComputationProperty -> ()
computationId :: MetricComparisonComputationProperty -> Value Text
fromValue :: MetricComparisonComputationProperty -> Maybe MeasureFieldProperty
name :: MetricComparisonComputationProperty -> Maybe (Value Text)
targetValue :: MetricComparisonComputationProperty -> Maybe MeasureFieldProperty
time :: MetricComparisonComputationProperty -> Maybe DimensionFieldProperty
haddock_workaround_ :: ()
computationId :: Value Text
fromValue :: Maybe MeasureFieldProperty
name :: Maybe (Value Text)
targetValue :: Maybe MeasureFieldProperty
time :: Maybe DimensionFieldProperty
..}
= [(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 -> 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
"FromValue" (MeasureFieldProperty -> (Key, Value))
-> Maybe MeasureFieldProperty -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe MeasureFieldProperty
fromValue,
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
"TargetValue" (MeasureFieldProperty -> (Key, Value))
-> Maybe MeasureFieldProperty -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe MeasureFieldProperty
targetValue,
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])))
instance Property "ComputationId" MetricComparisonComputationProperty where
type PropertyType "ComputationId" MetricComparisonComputationProperty = Value Prelude.Text
set :: PropertyType "ComputationId" MetricComparisonComputationProperty
-> MetricComparisonComputationProperty
-> MetricComparisonComputationProperty
set PropertyType "ComputationId" MetricComparisonComputationProperty
newValue MetricComparisonComputationProperty {Maybe (Value Text)
Maybe MeasureFieldProperty
Maybe DimensionFieldProperty
()
Value Text
haddock_workaround_ :: MetricComparisonComputationProperty -> ()
computationId :: MetricComparisonComputationProperty -> Value Text
fromValue :: MetricComparisonComputationProperty -> Maybe MeasureFieldProperty
name :: MetricComparisonComputationProperty -> Maybe (Value Text)
targetValue :: MetricComparisonComputationProperty -> Maybe MeasureFieldProperty
time :: MetricComparisonComputationProperty -> Maybe DimensionFieldProperty
haddock_workaround_ :: ()
computationId :: Value Text
fromValue :: Maybe MeasureFieldProperty
name :: Maybe (Value Text)
targetValue :: Maybe MeasureFieldProperty
time :: Maybe DimensionFieldProperty
..}
= MetricComparisonComputationProperty
{computationId :: Value Text
computationId = PropertyType "ComputationId" MetricComparisonComputationProperty
Value Text
newValue, Maybe (Value Text)
Maybe MeasureFieldProperty
Maybe DimensionFieldProperty
()
haddock_workaround_ :: ()
fromValue :: Maybe MeasureFieldProperty
name :: Maybe (Value Text)
targetValue :: Maybe MeasureFieldProperty
time :: Maybe DimensionFieldProperty
haddock_workaround_ :: ()
fromValue :: Maybe MeasureFieldProperty
name :: Maybe (Value Text)
targetValue :: Maybe MeasureFieldProperty
time :: Maybe DimensionFieldProperty
..}
instance Property "FromValue" MetricComparisonComputationProperty where
type PropertyType "FromValue" MetricComparisonComputationProperty = MeasureFieldProperty
set :: PropertyType "FromValue" MetricComparisonComputationProperty
-> MetricComparisonComputationProperty
-> MetricComparisonComputationProperty
set PropertyType "FromValue" MetricComparisonComputationProperty
newValue MetricComparisonComputationProperty {Maybe (Value Text)
Maybe MeasureFieldProperty
Maybe DimensionFieldProperty
()
Value Text
haddock_workaround_ :: MetricComparisonComputationProperty -> ()
computationId :: MetricComparisonComputationProperty -> Value Text
fromValue :: MetricComparisonComputationProperty -> Maybe MeasureFieldProperty
name :: MetricComparisonComputationProperty -> Maybe (Value Text)
targetValue :: MetricComparisonComputationProperty -> Maybe MeasureFieldProperty
time :: MetricComparisonComputationProperty -> Maybe DimensionFieldProperty
haddock_workaround_ :: ()
computationId :: Value Text
fromValue :: Maybe MeasureFieldProperty
name :: Maybe (Value Text)
targetValue :: Maybe MeasureFieldProperty
time :: Maybe DimensionFieldProperty
..}
= MetricComparisonComputationProperty
{fromValue :: Maybe MeasureFieldProperty
fromValue = MeasureFieldProperty -> Maybe MeasureFieldProperty
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "FromValue" MetricComparisonComputationProperty
MeasureFieldProperty
newValue, Maybe (Value Text)
Maybe MeasureFieldProperty
Maybe DimensionFieldProperty
()
Value Text
haddock_workaround_ :: ()
computationId :: Value Text
name :: Maybe (Value Text)
targetValue :: Maybe MeasureFieldProperty
time :: Maybe DimensionFieldProperty
haddock_workaround_ :: ()
computationId :: Value Text
name :: Maybe (Value Text)
targetValue :: Maybe MeasureFieldProperty
time :: Maybe DimensionFieldProperty
..}
instance Property "Name" MetricComparisonComputationProperty where
type PropertyType "Name" MetricComparisonComputationProperty = Value Prelude.Text
set :: PropertyType "Name" MetricComparisonComputationProperty
-> MetricComparisonComputationProperty
-> MetricComparisonComputationProperty
set PropertyType "Name" MetricComparisonComputationProperty
newValue MetricComparisonComputationProperty {Maybe (Value Text)
Maybe MeasureFieldProperty
Maybe DimensionFieldProperty
()
Value Text
haddock_workaround_ :: MetricComparisonComputationProperty -> ()
computationId :: MetricComparisonComputationProperty -> Value Text
fromValue :: MetricComparisonComputationProperty -> Maybe MeasureFieldProperty
name :: MetricComparisonComputationProperty -> Maybe (Value Text)
targetValue :: MetricComparisonComputationProperty -> Maybe MeasureFieldProperty
time :: MetricComparisonComputationProperty -> Maybe DimensionFieldProperty
haddock_workaround_ :: ()
computationId :: Value Text
fromValue :: Maybe MeasureFieldProperty
name :: Maybe (Value Text)
targetValue :: Maybe MeasureFieldProperty
time :: Maybe DimensionFieldProperty
..}
= MetricComparisonComputationProperty
{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" MetricComparisonComputationProperty
Value Text
newValue, Maybe MeasureFieldProperty
Maybe DimensionFieldProperty
()
Value Text
haddock_workaround_ :: ()
computationId :: Value Text
fromValue :: Maybe MeasureFieldProperty
targetValue :: Maybe MeasureFieldProperty
time :: Maybe DimensionFieldProperty
haddock_workaround_ :: ()
computationId :: Value Text
fromValue :: Maybe MeasureFieldProperty
targetValue :: Maybe MeasureFieldProperty
time :: Maybe DimensionFieldProperty
..}
instance Property "TargetValue" MetricComparisonComputationProperty where
type PropertyType "TargetValue" MetricComparisonComputationProperty = MeasureFieldProperty
set :: PropertyType "TargetValue" MetricComparisonComputationProperty
-> MetricComparisonComputationProperty
-> MetricComparisonComputationProperty
set PropertyType "TargetValue" MetricComparisonComputationProperty
newValue MetricComparisonComputationProperty {Maybe (Value Text)
Maybe MeasureFieldProperty
Maybe DimensionFieldProperty
()
Value Text
haddock_workaround_ :: MetricComparisonComputationProperty -> ()
computationId :: MetricComparisonComputationProperty -> Value Text
fromValue :: MetricComparisonComputationProperty -> Maybe MeasureFieldProperty
name :: MetricComparisonComputationProperty -> Maybe (Value Text)
targetValue :: MetricComparisonComputationProperty -> Maybe MeasureFieldProperty
time :: MetricComparisonComputationProperty -> Maybe DimensionFieldProperty
haddock_workaround_ :: ()
computationId :: Value Text
fromValue :: Maybe MeasureFieldProperty
name :: Maybe (Value Text)
targetValue :: Maybe MeasureFieldProperty
time :: Maybe DimensionFieldProperty
..}
= MetricComparisonComputationProperty
{targetValue :: Maybe MeasureFieldProperty
targetValue = MeasureFieldProperty -> Maybe MeasureFieldProperty
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "TargetValue" MetricComparisonComputationProperty
MeasureFieldProperty
newValue, Maybe (Value Text)
Maybe MeasureFieldProperty
Maybe DimensionFieldProperty
()
Value Text
haddock_workaround_ :: ()
computationId :: Value Text
fromValue :: Maybe MeasureFieldProperty
name :: Maybe (Value Text)
time :: Maybe DimensionFieldProperty
haddock_workaround_ :: ()
computationId :: Value Text
fromValue :: Maybe MeasureFieldProperty
name :: Maybe (Value Text)
time :: Maybe DimensionFieldProperty
..}
instance Property "Time" MetricComparisonComputationProperty where
type PropertyType "Time" MetricComparisonComputationProperty = DimensionFieldProperty
set :: PropertyType "Time" MetricComparisonComputationProperty
-> MetricComparisonComputationProperty
-> MetricComparisonComputationProperty
set PropertyType "Time" MetricComparisonComputationProperty
newValue MetricComparisonComputationProperty {Maybe (Value Text)
Maybe MeasureFieldProperty
Maybe DimensionFieldProperty
()
Value Text
haddock_workaround_ :: MetricComparisonComputationProperty -> ()
computationId :: MetricComparisonComputationProperty -> Value Text
fromValue :: MetricComparisonComputationProperty -> Maybe MeasureFieldProperty
name :: MetricComparisonComputationProperty -> Maybe (Value Text)
targetValue :: MetricComparisonComputationProperty -> Maybe MeasureFieldProperty
time :: MetricComparisonComputationProperty -> Maybe DimensionFieldProperty
haddock_workaround_ :: ()
computationId :: Value Text
fromValue :: Maybe MeasureFieldProperty
name :: Maybe (Value Text)
targetValue :: Maybe MeasureFieldProperty
time :: Maybe DimensionFieldProperty
..}
= MetricComparisonComputationProperty
{time :: Maybe DimensionFieldProperty
time = DimensionFieldProperty -> Maybe DimensionFieldProperty
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "Time" MetricComparisonComputationProperty
DimensionFieldProperty
newValue, Maybe (Value Text)
Maybe MeasureFieldProperty
()
Value Text
haddock_workaround_ :: ()
computationId :: Value Text
fromValue :: Maybe MeasureFieldProperty
name :: Maybe (Value Text)
targetValue :: Maybe MeasureFieldProperty
haddock_workaround_ :: ()
computationId :: Value Text
fromValue :: Maybe MeasureFieldProperty
name :: Maybe (Value Text)
targetValue :: Maybe MeasureFieldProperty
..}