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