module Stratosphere.QuickSight.Theme.FontProperty (
FontProperty(..), mkFontProperty
) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import Stratosphere.ResourceProperties
import Stratosphere.Value
data FontProperty
=
FontProperty {FontProperty -> ()
haddock_workaround_ :: (),
FontProperty -> Maybe (Value Text)
fontFamily :: (Prelude.Maybe (Value Prelude.Text))}
deriving stock (FontProperty -> FontProperty -> Bool
(FontProperty -> FontProperty -> Bool)
-> (FontProperty -> FontProperty -> Bool) -> Eq FontProperty
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: FontProperty -> FontProperty -> Bool
== :: FontProperty -> FontProperty -> Bool
$c/= :: FontProperty -> FontProperty -> Bool
/= :: FontProperty -> FontProperty -> Bool
Prelude.Eq, Int -> FontProperty -> ShowS
[FontProperty] -> ShowS
FontProperty -> String
(Int -> FontProperty -> ShowS)
-> (FontProperty -> String)
-> ([FontProperty] -> ShowS)
-> Show FontProperty
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> FontProperty -> ShowS
showsPrec :: Int -> FontProperty -> ShowS
$cshow :: FontProperty -> String
show :: FontProperty -> String
$cshowList :: [FontProperty] -> ShowS
showList :: [FontProperty] -> ShowS
Prelude.Show)
mkFontProperty :: FontProperty
mkFontProperty :: FontProperty
mkFontProperty
= FontProperty
{haddock_workaround_ :: ()
haddock_workaround_ = (), fontFamily :: Maybe (Value Text)
fontFamily = Maybe (Value Text)
forall a. Maybe a
Prelude.Nothing}
instance ToResourceProperties FontProperty where
toResourceProperties :: FontProperty -> ResourceProperties
toResourceProperties FontProperty {Maybe (Value Text)
()
haddock_workaround_ :: FontProperty -> ()
fontFamily :: FontProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
fontFamily :: Maybe (Value Text)
..}
= ResourceProperties
{awsType :: Text
awsType = Text
"AWS::QuickSight::Theme.Font",
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
"FontFamily" (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)
fontFamily])}
instance JSON.ToJSON FontProperty where
toJSON :: FontProperty -> Value
toJSON FontProperty {Maybe (Value Text)
()
haddock_workaround_ :: FontProperty -> ()
fontFamily :: FontProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
fontFamily :: Maybe (Value Text)
..}
= [(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
"FontFamily" (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)
fontFamily]))
instance Property "FontFamily" FontProperty where
type PropertyType "FontFamily" FontProperty = Value Prelude.Text
set :: PropertyType "FontFamily" FontProperty
-> FontProperty -> FontProperty
set PropertyType "FontFamily" FontProperty
newValue FontProperty {Maybe (Value Text)
()
haddock_workaround_ :: FontProperty -> ()
fontFamily :: FontProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
fontFamily :: Maybe (Value Text)
..}
= FontProperty {fontFamily :: Maybe (Value Text)
fontFamily = Value Text -> Maybe (Value Text)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "FontFamily" FontProperty
Value Text
newValue, ()
haddock_workaround_ :: ()
haddock_workaround_ :: ()
..}