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