module Stratosphere.QuickSight.Analysis.AxisScaleProperty (
module Exports, AxisScaleProperty(..), mkAxisScaleProperty
) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import {-# SOURCE #-} Stratosphere.QuickSight.Analysis.AxisLinearScaleProperty as Exports
import {-# SOURCE #-} Stratosphere.QuickSight.Analysis.AxisLogarithmicScaleProperty as Exports
import Stratosphere.ResourceProperties
data AxisScaleProperty
=
AxisScaleProperty {AxisScaleProperty -> ()
haddock_workaround_ :: (),
AxisScaleProperty -> Maybe AxisLinearScaleProperty
linear :: (Prelude.Maybe AxisLinearScaleProperty),
AxisScaleProperty -> Maybe AxisLogarithmicScaleProperty
logarithmic :: (Prelude.Maybe AxisLogarithmicScaleProperty)}
deriving stock (AxisScaleProperty -> AxisScaleProperty -> Bool
(AxisScaleProperty -> AxisScaleProperty -> Bool)
-> (AxisScaleProperty -> AxisScaleProperty -> Bool)
-> Eq AxisScaleProperty
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: AxisScaleProperty -> AxisScaleProperty -> Bool
== :: AxisScaleProperty -> AxisScaleProperty -> Bool
$c/= :: AxisScaleProperty -> AxisScaleProperty -> Bool
/= :: AxisScaleProperty -> AxisScaleProperty -> Bool
Prelude.Eq, Int -> AxisScaleProperty -> ShowS
[AxisScaleProperty] -> ShowS
AxisScaleProperty -> String
(Int -> AxisScaleProperty -> ShowS)
-> (AxisScaleProperty -> String)
-> ([AxisScaleProperty] -> ShowS)
-> Show AxisScaleProperty
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> AxisScaleProperty -> ShowS
showsPrec :: Int -> AxisScaleProperty -> ShowS
$cshow :: AxisScaleProperty -> String
show :: AxisScaleProperty -> String
$cshowList :: [AxisScaleProperty] -> ShowS
showList :: [AxisScaleProperty] -> ShowS
Prelude.Show)
mkAxisScaleProperty :: AxisScaleProperty
mkAxisScaleProperty :: AxisScaleProperty
mkAxisScaleProperty
= AxisScaleProperty
{haddock_workaround_ :: ()
haddock_workaround_ = (), linear :: Maybe AxisLinearScaleProperty
linear = Maybe AxisLinearScaleProperty
forall a. Maybe a
Prelude.Nothing,
logarithmic :: Maybe AxisLogarithmicScaleProperty
logarithmic = Maybe AxisLogarithmicScaleProperty
forall a. Maybe a
Prelude.Nothing}
instance ToResourceProperties AxisScaleProperty where
toResourceProperties :: AxisScaleProperty -> ResourceProperties
toResourceProperties AxisScaleProperty {Maybe AxisLinearScaleProperty
Maybe AxisLogarithmicScaleProperty
()
haddock_workaround_ :: AxisScaleProperty -> ()
linear :: AxisScaleProperty -> Maybe AxisLinearScaleProperty
logarithmic :: AxisScaleProperty -> Maybe AxisLogarithmicScaleProperty
haddock_workaround_ :: ()
linear :: Maybe AxisLinearScaleProperty
logarithmic :: Maybe AxisLogarithmicScaleProperty
..}
= ResourceProperties
{awsType :: Text
awsType = Text
"AWS::QuickSight::Analysis.AxisScale",
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 -> AxisLinearScaleProperty -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"Linear" (AxisLinearScaleProperty -> (Key, Value))
-> Maybe AxisLinearScaleProperty -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe AxisLinearScaleProperty
linear,
Key -> AxisLogarithmicScaleProperty -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"Logarithmic" (AxisLogarithmicScaleProperty -> (Key, Value))
-> Maybe AxisLogarithmicScaleProperty -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe AxisLogarithmicScaleProperty
logarithmic])}
instance JSON.ToJSON AxisScaleProperty where
toJSON :: AxisScaleProperty -> Value
toJSON AxisScaleProperty {Maybe AxisLinearScaleProperty
Maybe AxisLogarithmicScaleProperty
()
haddock_workaround_ :: AxisScaleProperty -> ()
linear :: AxisScaleProperty -> Maybe AxisLinearScaleProperty
logarithmic :: AxisScaleProperty -> Maybe AxisLogarithmicScaleProperty
haddock_workaround_ :: ()
linear :: Maybe AxisLinearScaleProperty
logarithmic :: Maybe AxisLogarithmicScaleProperty
..}
= [(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 -> AxisLinearScaleProperty -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"Linear" (AxisLinearScaleProperty -> (Key, Value))
-> Maybe AxisLinearScaleProperty -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe AxisLinearScaleProperty
linear,
Key -> AxisLogarithmicScaleProperty -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"Logarithmic" (AxisLogarithmicScaleProperty -> (Key, Value))
-> Maybe AxisLogarithmicScaleProperty -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe AxisLogarithmicScaleProperty
logarithmic]))
instance Property "Linear" AxisScaleProperty where
type PropertyType "Linear" AxisScaleProperty = AxisLinearScaleProperty
set :: PropertyType "Linear" AxisScaleProperty
-> AxisScaleProperty -> AxisScaleProperty
set PropertyType "Linear" AxisScaleProperty
newValue AxisScaleProperty {Maybe AxisLinearScaleProperty
Maybe AxisLogarithmicScaleProperty
()
haddock_workaround_ :: AxisScaleProperty -> ()
linear :: AxisScaleProperty -> Maybe AxisLinearScaleProperty
logarithmic :: AxisScaleProperty -> Maybe AxisLogarithmicScaleProperty
haddock_workaround_ :: ()
linear :: Maybe AxisLinearScaleProperty
logarithmic :: Maybe AxisLogarithmicScaleProperty
..}
= AxisScaleProperty {linear :: Maybe AxisLinearScaleProperty
linear = AxisLinearScaleProperty -> Maybe AxisLinearScaleProperty
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "Linear" AxisScaleProperty
AxisLinearScaleProperty
newValue, Maybe AxisLogarithmicScaleProperty
()
haddock_workaround_ :: ()
logarithmic :: Maybe AxisLogarithmicScaleProperty
haddock_workaround_ :: ()
logarithmic :: Maybe AxisLogarithmicScaleProperty
..}
instance Property "Logarithmic" AxisScaleProperty where
type PropertyType "Logarithmic" AxisScaleProperty = AxisLogarithmicScaleProperty
set :: PropertyType "Logarithmic" AxisScaleProperty
-> AxisScaleProperty -> AxisScaleProperty
set PropertyType "Logarithmic" AxisScaleProperty
newValue AxisScaleProperty {Maybe AxisLinearScaleProperty
Maybe AxisLogarithmicScaleProperty
()
haddock_workaround_ :: AxisScaleProperty -> ()
linear :: AxisScaleProperty -> Maybe AxisLinearScaleProperty
logarithmic :: AxisScaleProperty -> Maybe AxisLogarithmicScaleProperty
haddock_workaround_ :: ()
linear :: Maybe AxisLinearScaleProperty
logarithmic :: Maybe AxisLogarithmicScaleProperty
..}
= AxisScaleProperty {logarithmic :: Maybe AxisLogarithmicScaleProperty
logarithmic = AxisLogarithmicScaleProperty -> Maybe AxisLogarithmicScaleProperty
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "Logarithmic" AxisScaleProperty
AxisLogarithmicScaleProperty
newValue, Maybe AxisLinearScaleProperty
()
haddock_workaround_ :: ()
linear :: Maybe AxisLinearScaleProperty
haddock_workaround_ :: ()
linear :: Maybe AxisLinearScaleProperty
..}