{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE DuplicateRecordFields #-}
{-# LANGUAGE NamedFieldPuns #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE StrictData #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# OPTIONS_GHC -fno-warn-unused-imports #-}
{-# OPTIONS_GHC -fno-warn-unused-matches #-}
module Amazonka.QuickSight.Types.AccountCustomization where
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
data AccountCustomization = AccountCustomization'
{
AccountCustomization -> Maybe Text
defaultTheme :: Prelude.Maybe Prelude.Text
}
deriving (AccountCustomization -> AccountCustomization -> Bool
(AccountCustomization -> AccountCustomization -> Bool)
-> (AccountCustomization -> AccountCustomization -> Bool)
-> Eq AccountCustomization
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: AccountCustomization -> AccountCustomization -> Bool
$c/= :: AccountCustomization -> AccountCustomization -> Bool
== :: AccountCustomization -> AccountCustomization -> Bool
$c== :: AccountCustomization -> AccountCustomization -> Bool
Prelude.Eq, ReadPrec [AccountCustomization]
ReadPrec AccountCustomization
Int -> ReadS AccountCustomization
ReadS [AccountCustomization]
(Int -> ReadS AccountCustomization)
-> ReadS [AccountCustomization]
-> ReadPrec AccountCustomization
-> ReadPrec [AccountCustomization]
-> Read AccountCustomization
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [AccountCustomization]
$creadListPrec :: ReadPrec [AccountCustomization]
readPrec :: ReadPrec AccountCustomization
$creadPrec :: ReadPrec AccountCustomization
readList :: ReadS [AccountCustomization]
$creadList :: ReadS [AccountCustomization]
readsPrec :: Int -> ReadS AccountCustomization
$creadsPrec :: Int -> ReadS AccountCustomization
Prelude.Read, Int -> AccountCustomization -> ShowS
[AccountCustomization] -> ShowS
AccountCustomization -> String
(Int -> AccountCustomization -> ShowS)
-> (AccountCustomization -> String)
-> ([AccountCustomization] -> ShowS)
-> Show AccountCustomization
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [AccountCustomization] -> ShowS
$cshowList :: [AccountCustomization] -> ShowS
show :: AccountCustomization -> String
$cshow :: AccountCustomization -> String
showsPrec :: Int -> AccountCustomization -> ShowS
$cshowsPrec :: Int -> AccountCustomization -> ShowS
Prelude.Show, (forall x. AccountCustomization -> Rep AccountCustomization x)
-> (forall x. Rep AccountCustomization x -> AccountCustomization)
-> Generic AccountCustomization
forall x. Rep AccountCustomization x -> AccountCustomization
forall x. AccountCustomization -> Rep AccountCustomization x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep AccountCustomization x -> AccountCustomization
$cfrom :: forall x. AccountCustomization -> Rep AccountCustomization x
Prelude.Generic)
newAccountCustomization ::
AccountCustomization
newAccountCustomization :: AccountCustomization
newAccountCustomization =
AccountCustomization' :: Maybe Text -> AccountCustomization
AccountCustomization'
{ $sel:defaultTheme:AccountCustomization' :: Maybe Text
defaultTheme =
Maybe Text
forall a. Maybe a
Prelude.Nothing
}
accountCustomization_defaultTheme :: Lens.Lens' AccountCustomization (Prelude.Maybe Prelude.Text)
accountCustomization_defaultTheme :: (Maybe Text -> f (Maybe Text))
-> AccountCustomization -> f AccountCustomization
accountCustomization_defaultTheme = (AccountCustomization -> Maybe Text)
-> (AccountCustomization -> Maybe Text -> AccountCustomization)
-> Lens
AccountCustomization AccountCustomization (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AccountCustomization' {Maybe Text
defaultTheme :: Maybe Text
$sel:defaultTheme:AccountCustomization' :: AccountCustomization -> Maybe Text
defaultTheme} -> Maybe Text
defaultTheme) (\s :: AccountCustomization
s@AccountCustomization' {} Maybe Text
a -> AccountCustomization
s {$sel:defaultTheme:AccountCustomization' :: Maybe Text
defaultTheme = Maybe Text
a} :: AccountCustomization)
instance Core.FromJSON AccountCustomization where
parseJSON :: Value -> Parser AccountCustomization
parseJSON =
String
-> (Object -> Parser AccountCustomization)
-> Value
-> Parser AccountCustomization
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
String
"AccountCustomization"
( \Object
x ->
Maybe Text -> AccountCustomization
AccountCustomization'
(Maybe Text -> AccountCustomization)
-> Parser (Maybe Text) -> Parser AccountCustomization
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"DefaultTheme")
)
instance Prelude.Hashable AccountCustomization
instance Prelude.NFData AccountCustomization
instance Core.ToJSON AccountCustomization where
toJSON :: AccountCustomization -> Value
toJSON AccountCustomization' {Maybe Text
defaultTheme :: Maybe Text
$sel:defaultTheme:AccountCustomization' :: AccountCustomization -> Maybe Text
..} =
[Pair] -> Value
Core.object
( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
[(Text
"DefaultTheme" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (Text -> Pair) -> Maybe Text -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
defaultTheme]
)