{-# 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.Theme where
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
import Amazonka.QuickSight.Types.ThemeType
import Amazonka.QuickSight.Types.ThemeVersion
data Theme = Theme'
{
Theme -> Maybe Text
themeId :: Prelude.Maybe Prelude.Text,
Theme -> Maybe POSIX
lastUpdatedTime :: Prelude.Maybe Core.POSIX,
Theme -> Maybe Text
arn :: Prelude.Maybe Prelude.Text,
Theme -> Maybe POSIX
createdTime :: Prelude.Maybe Core.POSIX,
Theme -> Maybe Text
name :: Prelude.Maybe Prelude.Text,
Theme -> Maybe ThemeVersion
version :: Prelude.Maybe ThemeVersion,
Theme -> Maybe ThemeType
type' :: Prelude.Maybe ThemeType
}
deriving (Theme -> Theme -> Bool
(Theme -> Theme -> Bool) -> (Theme -> Theme -> Bool) -> Eq Theme
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: Theme -> Theme -> Bool
$c/= :: Theme -> Theme -> Bool
== :: Theme -> Theme -> Bool
$c== :: Theme -> Theme -> Bool
Prelude.Eq, ReadPrec [Theme]
ReadPrec Theme
Int -> ReadS Theme
ReadS [Theme]
(Int -> ReadS Theme)
-> ReadS [Theme]
-> ReadPrec Theme
-> ReadPrec [Theme]
-> Read Theme
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [Theme]
$creadListPrec :: ReadPrec [Theme]
readPrec :: ReadPrec Theme
$creadPrec :: ReadPrec Theme
readList :: ReadS [Theme]
$creadList :: ReadS [Theme]
readsPrec :: Int -> ReadS Theme
$creadsPrec :: Int -> ReadS Theme
Prelude.Read, Int -> Theme -> ShowS
[Theme] -> ShowS
Theme -> String
(Int -> Theme -> ShowS)
-> (Theme -> String) -> ([Theme] -> ShowS) -> Show Theme
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [Theme] -> ShowS
$cshowList :: [Theme] -> ShowS
show :: Theme -> String
$cshow :: Theme -> String
showsPrec :: Int -> Theme -> ShowS
$cshowsPrec :: Int -> Theme -> ShowS
Prelude.Show, (forall x. Theme -> Rep Theme x)
-> (forall x. Rep Theme x -> Theme) -> Generic Theme
forall x. Rep Theme x -> Theme
forall x. Theme -> Rep Theme x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep Theme x -> Theme
$cfrom :: forall x. Theme -> Rep Theme x
Prelude.Generic)
newTheme ::
Theme
newTheme :: Theme
newTheme =
Theme' :: Maybe Text
-> Maybe POSIX
-> Maybe Text
-> Maybe POSIX
-> Maybe Text
-> Maybe ThemeVersion
-> Maybe ThemeType
-> Theme
Theme'
{ $sel:themeId:Theme' :: Maybe Text
themeId = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:lastUpdatedTime:Theme' :: Maybe POSIX
lastUpdatedTime = Maybe POSIX
forall a. Maybe a
Prelude.Nothing,
$sel:arn:Theme' :: Maybe Text
arn = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:createdTime:Theme' :: Maybe POSIX
createdTime = Maybe POSIX
forall a. Maybe a
Prelude.Nothing,
$sel:name:Theme' :: Maybe Text
name = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:version:Theme' :: Maybe ThemeVersion
version = Maybe ThemeVersion
forall a. Maybe a
Prelude.Nothing,
$sel:type':Theme' :: Maybe ThemeType
type' = Maybe ThemeType
forall a. Maybe a
Prelude.Nothing
}
theme_themeId :: Lens.Lens' Theme (Prelude.Maybe Prelude.Text)
theme_themeId :: (Maybe Text -> f (Maybe Text)) -> Theme -> f Theme
theme_themeId = (Theme -> Maybe Text)
-> (Theme -> Maybe Text -> Theme)
-> Lens Theme Theme (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Theme' {Maybe Text
themeId :: Maybe Text
$sel:themeId:Theme' :: Theme -> Maybe Text
themeId} -> Maybe Text
themeId) (\s :: Theme
s@Theme' {} Maybe Text
a -> Theme
s {$sel:themeId:Theme' :: Maybe Text
themeId = Maybe Text
a} :: Theme)
theme_lastUpdatedTime :: Lens.Lens' Theme (Prelude.Maybe Prelude.UTCTime)
theme_lastUpdatedTime :: (Maybe UTCTime -> f (Maybe UTCTime)) -> Theme -> f Theme
theme_lastUpdatedTime = (Theme -> Maybe POSIX)
-> (Theme -> Maybe POSIX -> Theme)
-> Lens Theme Theme (Maybe POSIX) (Maybe POSIX)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Theme' {Maybe POSIX
lastUpdatedTime :: Maybe POSIX
$sel:lastUpdatedTime:Theme' :: Theme -> Maybe POSIX
lastUpdatedTime} -> Maybe POSIX
lastUpdatedTime) (\s :: Theme
s@Theme' {} Maybe POSIX
a -> Theme
s {$sel:lastUpdatedTime:Theme' :: Maybe POSIX
lastUpdatedTime = Maybe POSIX
a} :: Theme) ((Maybe POSIX -> f (Maybe POSIX)) -> Theme -> f Theme)
-> ((Maybe UTCTime -> f (Maybe UTCTime))
-> Maybe POSIX -> f (Maybe POSIX))
-> (Maybe UTCTime -> f (Maybe UTCTime))
-> Theme
-> f Theme
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso POSIX POSIX UTCTime UTCTime
-> Iso (Maybe POSIX) (Maybe POSIX) (Maybe UTCTime) (Maybe UTCTime)
forall (f :: * -> *) (g :: * -> *) s t a b.
(Functor f, Functor g) =>
AnIso s t a b -> Iso (f s) (g t) (f a) (g b)
Lens.mapping AnIso POSIX POSIX UTCTime UTCTime
forall (a :: Format). Iso' (Time a) UTCTime
Core._Time
theme_arn :: Lens.Lens' Theme (Prelude.Maybe Prelude.Text)
theme_arn :: (Maybe Text -> f (Maybe Text)) -> Theme -> f Theme
theme_arn = (Theme -> Maybe Text)
-> (Theme -> Maybe Text -> Theme)
-> Lens Theme Theme (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Theme' {Maybe Text
arn :: Maybe Text
$sel:arn:Theme' :: Theme -> Maybe Text
arn} -> Maybe Text
arn) (\s :: Theme
s@Theme' {} Maybe Text
a -> Theme
s {$sel:arn:Theme' :: Maybe Text
arn = Maybe Text
a} :: Theme)
theme_createdTime :: Lens.Lens' Theme (Prelude.Maybe Prelude.UTCTime)
theme_createdTime :: (Maybe UTCTime -> f (Maybe UTCTime)) -> Theme -> f Theme
theme_createdTime = (Theme -> Maybe POSIX)
-> (Theme -> Maybe POSIX -> Theme)
-> Lens Theme Theme (Maybe POSIX) (Maybe POSIX)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Theme' {Maybe POSIX
createdTime :: Maybe POSIX
$sel:createdTime:Theme' :: Theme -> Maybe POSIX
createdTime} -> Maybe POSIX
createdTime) (\s :: Theme
s@Theme' {} Maybe POSIX
a -> Theme
s {$sel:createdTime:Theme' :: Maybe POSIX
createdTime = Maybe POSIX
a} :: Theme) ((Maybe POSIX -> f (Maybe POSIX)) -> Theme -> f Theme)
-> ((Maybe UTCTime -> f (Maybe UTCTime))
-> Maybe POSIX -> f (Maybe POSIX))
-> (Maybe UTCTime -> f (Maybe UTCTime))
-> Theme
-> f Theme
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso POSIX POSIX UTCTime UTCTime
-> Iso (Maybe POSIX) (Maybe POSIX) (Maybe UTCTime) (Maybe UTCTime)
forall (f :: * -> *) (g :: * -> *) s t a b.
(Functor f, Functor g) =>
AnIso s t a b -> Iso (f s) (g t) (f a) (g b)
Lens.mapping AnIso POSIX POSIX UTCTime UTCTime
forall (a :: Format). Iso' (Time a) UTCTime
Core._Time
theme_name :: Lens.Lens' Theme (Prelude.Maybe Prelude.Text)
theme_name :: (Maybe Text -> f (Maybe Text)) -> Theme -> f Theme
theme_name = (Theme -> Maybe Text)
-> (Theme -> Maybe Text -> Theme)
-> Lens Theme Theme (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Theme' {Maybe Text
name :: Maybe Text
$sel:name:Theme' :: Theme -> Maybe Text
name} -> Maybe Text
name) (\s :: Theme
s@Theme' {} Maybe Text
a -> Theme
s {$sel:name:Theme' :: Maybe Text
name = Maybe Text
a} :: Theme)
theme_version :: Lens.Lens' Theme (Prelude.Maybe ThemeVersion)
theme_version :: (Maybe ThemeVersion -> f (Maybe ThemeVersion)) -> Theme -> f Theme
theme_version = (Theme -> Maybe ThemeVersion)
-> (Theme -> Maybe ThemeVersion -> Theme)
-> Lens Theme Theme (Maybe ThemeVersion) (Maybe ThemeVersion)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Theme' {Maybe ThemeVersion
version :: Maybe ThemeVersion
$sel:version:Theme' :: Theme -> Maybe ThemeVersion
version} -> Maybe ThemeVersion
version) (\s :: Theme
s@Theme' {} Maybe ThemeVersion
a -> Theme
s {$sel:version:Theme' :: Maybe ThemeVersion
version = Maybe ThemeVersion
a} :: Theme)
theme_type :: Lens.Lens' Theme (Prelude.Maybe ThemeType)
theme_type :: (Maybe ThemeType -> f (Maybe ThemeType)) -> Theme -> f Theme
theme_type = (Theme -> Maybe ThemeType)
-> (Theme -> Maybe ThemeType -> Theme)
-> Lens Theme Theme (Maybe ThemeType) (Maybe ThemeType)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Theme' {Maybe ThemeType
type' :: Maybe ThemeType
$sel:type':Theme' :: Theme -> Maybe ThemeType
type'} -> Maybe ThemeType
type') (\s :: Theme
s@Theme' {} Maybe ThemeType
a -> Theme
s {$sel:type':Theme' :: Maybe ThemeType
type' = Maybe ThemeType
a} :: Theme)
instance Core.FromJSON Theme where
parseJSON :: Value -> Parser Theme
parseJSON =
String -> (Object -> Parser Theme) -> Value -> Parser Theme
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
String
"Theme"
( \Object
x ->
Maybe Text
-> Maybe POSIX
-> Maybe Text
-> Maybe POSIX
-> Maybe Text
-> Maybe ThemeVersion
-> Maybe ThemeType
-> Theme
Theme'
(Maybe Text
-> Maybe POSIX
-> Maybe Text
-> Maybe POSIX
-> Maybe Text
-> Maybe ThemeVersion
-> Maybe ThemeType
-> Theme)
-> Parser (Maybe Text)
-> Parser
(Maybe POSIX
-> Maybe Text
-> Maybe POSIX
-> Maybe Text
-> Maybe ThemeVersion
-> Maybe ThemeType
-> Theme)
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
"ThemeId")
Parser
(Maybe POSIX
-> Maybe Text
-> Maybe POSIX
-> Maybe Text
-> Maybe ThemeVersion
-> Maybe ThemeType
-> Theme)
-> Parser (Maybe POSIX)
-> Parser
(Maybe Text
-> Maybe POSIX
-> Maybe Text
-> Maybe ThemeVersion
-> Maybe ThemeType
-> Theme)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe POSIX)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"LastUpdatedTime")
Parser
(Maybe Text
-> Maybe POSIX
-> Maybe Text
-> Maybe ThemeVersion
-> Maybe ThemeType
-> Theme)
-> Parser (Maybe Text)
-> Parser
(Maybe POSIX
-> Maybe Text -> Maybe ThemeVersion -> Maybe ThemeType -> Theme)
forall (f :: * -> *) a b. Applicative f => 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
"Arn")
Parser
(Maybe POSIX
-> Maybe Text -> Maybe ThemeVersion -> Maybe ThemeType -> Theme)
-> Parser (Maybe POSIX)
-> Parser
(Maybe Text -> Maybe ThemeVersion -> Maybe ThemeType -> Theme)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe POSIX)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"CreatedTime")
Parser
(Maybe Text -> Maybe ThemeVersion -> Maybe ThemeType -> Theme)
-> Parser (Maybe Text)
-> Parser (Maybe ThemeVersion -> Maybe ThemeType -> Theme)
forall (f :: * -> *) a b. Applicative f => 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
"Name")
Parser (Maybe ThemeVersion -> Maybe ThemeType -> Theme)
-> Parser (Maybe ThemeVersion) -> Parser (Maybe ThemeType -> Theme)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe ThemeVersion)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"Version")
Parser (Maybe ThemeType -> Theme)
-> Parser (Maybe ThemeType) -> Parser Theme
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe ThemeType)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"Type")
)
instance Prelude.Hashable Theme
instance Prelude.NFData Theme