module Stratosphere.QuickSight.Template.TextConditionalFormatProperty (
module Exports, TextConditionalFormatProperty(..),
mkTextConditionalFormatProperty
) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import {-# SOURCE #-} Stratosphere.QuickSight.Template.ConditionalFormattingColorProperty as Exports
import {-# SOURCE #-} Stratosphere.QuickSight.Template.ConditionalFormattingIconProperty as Exports
import Stratosphere.ResourceProperties
data TextConditionalFormatProperty
=
TextConditionalFormatProperty {TextConditionalFormatProperty -> ()
haddock_workaround_ :: (),
TextConditionalFormatProperty
-> Maybe ConditionalFormattingColorProperty
backgroundColor :: (Prelude.Maybe ConditionalFormattingColorProperty),
TextConditionalFormatProperty
-> Maybe ConditionalFormattingIconProperty
icon :: (Prelude.Maybe ConditionalFormattingIconProperty),
TextConditionalFormatProperty
-> Maybe ConditionalFormattingColorProperty
textColor :: (Prelude.Maybe ConditionalFormattingColorProperty)}
deriving stock (TextConditionalFormatProperty
-> TextConditionalFormatProperty -> Bool
(TextConditionalFormatProperty
-> TextConditionalFormatProperty -> Bool)
-> (TextConditionalFormatProperty
-> TextConditionalFormatProperty -> Bool)
-> Eq TextConditionalFormatProperty
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: TextConditionalFormatProperty
-> TextConditionalFormatProperty -> Bool
== :: TextConditionalFormatProperty
-> TextConditionalFormatProperty -> Bool
$c/= :: TextConditionalFormatProperty
-> TextConditionalFormatProperty -> Bool
/= :: TextConditionalFormatProperty
-> TextConditionalFormatProperty -> Bool
Prelude.Eq, Int -> TextConditionalFormatProperty -> ShowS
[TextConditionalFormatProperty] -> ShowS
TextConditionalFormatProperty -> String
(Int -> TextConditionalFormatProperty -> ShowS)
-> (TextConditionalFormatProperty -> String)
-> ([TextConditionalFormatProperty] -> ShowS)
-> Show TextConditionalFormatProperty
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> TextConditionalFormatProperty -> ShowS
showsPrec :: Int -> TextConditionalFormatProperty -> ShowS
$cshow :: TextConditionalFormatProperty -> String
show :: TextConditionalFormatProperty -> String
$cshowList :: [TextConditionalFormatProperty] -> ShowS
showList :: [TextConditionalFormatProperty] -> ShowS
Prelude.Show)
mkTextConditionalFormatProperty :: TextConditionalFormatProperty
mkTextConditionalFormatProperty :: TextConditionalFormatProperty
mkTextConditionalFormatProperty
= TextConditionalFormatProperty
{haddock_workaround_ :: ()
haddock_workaround_ = (), backgroundColor :: Maybe ConditionalFormattingColorProperty
backgroundColor = Maybe ConditionalFormattingColorProperty
forall a. Maybe a
Prelude.Nothing,
icon :: Maybe ConditionalFormattingIconProperty
icon = Maybe ConditionalFormattingIconProperty
forall a. Maybe a
Prelude.Nothing, textColor :: Maybe ConditionalFormattingColorProperty
textColor = Maybe ConditionalFormattingColorProperty
forall a. Maybe a
Prelude.Nothing}
instance ToResourceProperties TextConditionalFormatProperty where
toResourceProperties :: TextConditionalFormatProperty -> ResourceProperties
toResourceProperties TextConditionalFormatProperty {Maybe ConditionalFormattingIconProperty
Maybe ConditionalFormattingColorProperty
()
haddock_workaround_ :: TextConditionalFormatProperty -> ()
backgroundColor :: TextConditionalFormatProperty
-> Maybe ConditionalFormattingColorProperty
icon :: TextConditionalFormatProperty
-> Maybe ConditionalFormattingIconProperty
textColor :: TextConditionalFormatProperty
-> Maybe ConditionalFormattingColorProperty
haddock_workaround_ :: ()
backgroundColor :: Maybe ConditionalFormattingColorProperty
icon :: Maybe ConditionalFormattingIconProperty
textColor :: Maybe ConditionalFormattingColorProperty
..}
= ResourceProperties
{awsType :: Text
awsType = Text
"AWS::QuickSight::Template.TextConditionalFormat",
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 -> ConditionalFormattingColorProperty -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"BackgroundColor" (ConditionalFormattingColorProperty -> (Key, Value))
-> Maybe ConditionalFormattingColorProperty -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe ConditionalFormattingColorProperty
backgroundColor,
Key -> ConditionalFormattingIconProperty -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"Icon" (ConditionalFormattingIconProperty -> (Key, Value))
-> Maybe ConditionalFormattingIconProperty -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe ConditionalFormattingIconProperty
icon,
Key -> ConditionalFormattingColorProperty -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"TextColor" (ConditionalFormattingColorProperty -> (Key, Value))
-> Maybe ConditionalFormattingColorProperty -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe ConditionalFormattingColorProperty
textColor])}
instance JSON.ToJSON TextConditionalFormatProperty where
toJSON :: TextConditionalFormatProperty -> Value
toJSON TextConditionalFormatProperty {Maybe ConditionalFormattingIconProperty
Maybe ConditionalFormattingColorProperty
()
haddock_workaround_ :: TextConditionalFormatProperty -> ()
backgroundColor :: TextConditionalFormatProperty
-> Maybe ConditionalFormattingColorProperty
icon :: TextConditionalFormatProperty
-> Maybe ConditionalFormattingIconProperty
textColor :: TextConditionalFormatProperty
-> Maybe ConditionalFormattingColorProperty
haddock_workaround_ :: ()
backgroundColor :: Maybe ConditionalFormattingColorProperty
icon :: Maybe ConditionalFormattingIconProperty
textColor :: Maybe ConditionalFormattingColorProperty
..}
= [(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 -> ConditionalFormattingColorProperty -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"BackgroundColor" (ConditionalFormattingColorProperty -> (Key, Value))
-> Maybe ConditionalFormattingColorProperty -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe ConditionalFormattingColorProperty
backgroundColor,
Key -> ConditionalFormattingIconProperty -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"Icon" (ConditionalFormattingIconProperty -> (Key, Value))
-> Maybe ConditionalFormattingIconProperty -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe ConditionalFormattingIconProperty
icon,
Key -> ConditionalFormattingColorProperty -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"TextColor" (ConditionalFormattingColorProperty -> (Key, Value))
-> Maybe ConditionalFormattingColorProperty -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe ConditionalFormattingColorProperty
textColor]))
instance Property "BackgroundColor" TextConditionalFormatProperty where
type PropertyType "BackgroundColor" TextConditionalFormatProperty = ConditionalFormattingColorProperty
set :: PropertyType "BackgroundColor" TextConditionalFormatProperty
-> TextConditionalFormatProperty -> TextConditionalFormatProperty
set PropertyType "BackgroundColor" TextConditionalFormatProperty
newValue TextConditionalFormatProperty {Maybe ConditionalFormattingIconProperty
Maybe ConditionalFormattingColorProperty
()
haddock_workaround_ :: TextConditionalFormatProperty -> ()
backgroundColor :: TextConditionalFormatProperty
-> Maybe ConditionalFormattingColorProperty
icon :: TextConditionalFormatProperty
-> Maybe ConditionalFormattingIconProperty
textColor :: TextConditionalFormatProperty
-> Maybe ConditionalFormattingColorProperty
haddock_workaround_ :: ()
backgroundColor :: Maybe ConditionalFormattingColorProperty
icon :: Maybe ConditionalFormattingIconProperty
textColor :: Maybe ConditionalFormattingColorProperty
..}
= TextConditionalFormatProperty
{backgroundColor :: Maybe ConditionalFormattingColorProperty
backgroundColor = ConditionalFormattingColorProperty
-> Maybe ConditionalFormattingColorProperty
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "BackgroundColor" TextConditionalFormatProperty
ConditionalFormattingColorProperty
newValue, Maybe ConditionalFormattingIconProperty
Maybe ConditionalFormattingColorProperty
()
haddock_workaround_ :: ()
icon :: Maybe ConditionalFormattingIconProperty
textColor :: Maybe ConditionalFormattingColorProperty
haddock_workaround_ :: ()
icon :: Maybe ConditionalFormattingIconProperty
textColor :: Maybe ConditionalFormattingColorProperty
..}
instance Property "Icon" TextConditionalFormatProperty where
type PropertyType "Icon" TextConditionalFormatProperty = ConditionalFormattingIconProperty
set :: PropertyType "Icon" TextConditionalFormatProperty
-> TextConditionalFormatProperty -> TextConditionalFormatProperty
set PropertyType "Icon" TextConditionalFormatProperty
newValue TextConditionalFormatProperty {Maybe ConditionalFormattingIconProperty
Maybe ConditionalFormattingColorProperty
()
haddock_workaround_ :: TextConditionalFormatProperty -> ()
backgroundColor :: TextConditionalFormatProperty
-> Maybe ConditionalFormattingColorProperty
icon :: TextConditionalFormatProperty
-> Maybe ConditionalFormattingIconProperty
textColor :: TextConditionalFormatProperty
-> Maybe ConditionalFormattingColorProperty
haddock_workaround_ :: ()
backgroundColor :: Maybe ConditionalFormattingColorProperty
icon :: Maybe ConditionalFormattingIconProperty
textColor :: Maybe ConditionalFormattingColorProperty
..}
= TextConditionalFormatProperty {icon :: Maybe ConditionalFormattingIconProperty
icon = ConditionalFormattingIconProperty
-> Maybe ConditionalFormattingIconProperty
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "Icon" TextConditionalFormatProperty
ConditionalFormattingIconProperty
newValue, Maybe ConditionalFormattingColorProperty
()
haddock_workaround_ :: ()
backgroundColor :: Maybe ConditionalFormattingColorProperty
textColor :: Maybe ConditionalFormattingColorProperty
haddock_workaround_ :: ()
backgroundColor :: Maybe ConditionalFormattingColorProperty
textColor :: Maybe ConditionalFormattingColorProperty
..}
instance Property "TextColor" TextConditionalFormatProperty where
type PropertyType "TextColor" TextConditionalFormatProperty = ConditionalFormattingColorProperty
set :: PropertyType "TextColor" TextConditionalFormatProperty
-> TextConditionalFormatProperty -> TextConditionalFormatProperty
set PropertyType "TextColor" TextConditionalFormatProperty
newValue TextConditionalFormatProperty {Maybe ConditionalFormattingIconProperty
Maybe ConditionalFormattingColorProperty
()
haddock_workaround_ :: TextConditionalFormatProperty -> ()
backgroundColor :: TextConditionalFormatProperty
-> Maybe ConditionalFormattingColorProperty
icon :: TextConditionalFormatProperty
-> Maybe ConditionalFormattingIconProperty
textColor :: TextConditionalFormatProperty
-> Maybe ConditionalFormattingColorProperty
haddock_workaround_ :: ()
backgroundColor :: Maybe ConditionalFormattingColorProperty
icon :: Maybe ConditionalFormattingIconProperty
textColor :: Maybe ConditionalFormattingColorProperty
..}
= TextConditionalFormatProperty
{textColor :: Maybe ConditionalFormattingColorProperty
textColor = ConditionalFormattingColorProperty
-> Maybe ConditionalFormattingColorProperty
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "TextColor" TextConditionalFormatProperty
ConditionalFormattingColorProperty
newValue, Maybe ConditionalFormattingIconProperty
Maybe ConditionalFormattingColorProperty
()
haddock_workaround_ :: ()
backgroundColor :: Maybe ConditionalFormattingColorProperty
icon :: Maybe ConditionalFormattingIconProperty
haddock_workaround_ :: ()
backgroundColor :: Maybe ConditionalFormattingColorProperty
icon :: Maybe ConditionalFormattingIconProperty
..}