{-# 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.ThemeVersion where
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
import Amazonka.QuickSight.Types.ResourceStatus
import Amazonka.QuickSight.Types.ThemeConfiguration
import Amazonka.QuickSight.Types.ThemeError
data ThemeVersion = ThemeVersion'
{
ThemeVersion -> Maybe ResourceStatus
status :: Prelude.Maybe ResourceStatus,
ThemeVersion -> Maybe Text
arn :: Prelude.Maybe Prelude.Text,
ThemeVersion -> Maybe POSIX
createdTime :: Prelude.Maybe Core.POSIX,
ThemeVersion -> Maybe Natural
versionNumber :: Prelude.Maybe Prelude.Natural,
ThemeVersion -> Maybe ThemeConfiguration
configuration :: Prelude.Maybe ThemeConfiguration,
ThemeVersion -> Maybe (NonEmpty ThemeError)
errors :: Prelude.Maybe (Prelude.NonEmpty ThemeError),
ThemeVersion -> Maybe Text
description :: Prelude.Maybe Prelude.Text,
ThemeVersion -> Maybe Text
baseThemeId :: Prelude.Maybe Prelude.Text
}
deriving (ThemeVersion -> ThemeVersion -> Bool
(ThemeVersion -> ThemeVersion -> Bool)
-> (ThemeVersion -> ThemeVersion -> Bool) -> Eq ThemeVersion
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ThemeVersion -> ThemeVersion -> Bool
$c/= :: ThemeVersion -> ThemeVersion -> Bool
== :: ThemeVersion -> ThemeVersion -> Bool
$c== :: ThemeVersion -> ThemeVersion -> Bool
Prelude.Eq, ReadPrec [ThemeVersion]
ReadPrec ThemeVersion
Int -> ReadS ThemeVersion
ReadS [ThemeVersion]
(Int -> ReadS ThemeVersion)
-> ReadS [ThemeVersion]
-> ReadPrec ThemeVersion
-> ReadPrec [ThemeVersion]
-> Read ThemeVersion
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ThemeVersion]
$creadListPrec :: ReadPrec [ThemeVersion]
readPrec :: ReadPrec ThemeVersion
$creadPrec :: ReadPrec ThemeVersion
readList :: ReadS [ThemeVersion]
$creadList :: ReadS [ThemeVersion]
readsPrec :: Int -> ReadS ThemeVersion
$creadsPrec :: Int -> ReadS ThemeVersion
Prelude.Read, Int -> ThemeVersion -> ShowS
[ThemeVersion] -> ShowS
ThemeVersion -> String
(Int -> ThemeVersion -> ShowS)
-> (ThemeVersion -> String)
-> ([ThemeVersion] -> ShowS)
-> Show ThemeVersion
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ThemeVersion] -> ShowS
$cshowList :: [ThemeVersion] -> ShowS
show :: ThemeVersion -> String
$cshow :: ThemeVersion -> String
showsPrec :: Int -> ThemeVersion -> ShowS
$cshowsPrec :: Int -> ThemeVersion -> ShowS
Prelude.Show, (forall x. ThemeVersion -> Rep ThemeVersion x)
-> (forall x. Rep ThemeVersion x -> ThemeVersion)
-> Generic ThemeVersion
forall x. Rep ThemeVersion x -> ThemeVersion
forall x. ThemeVersion -> Rep ThemeVersion x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep ThemeVersion x -> ThemeVersion
$cfrom :: forall x. ThemeVersion -> Rep ThemeVersion x
Prelude.Generic)
newThemeVersion ::
ThemeVersion
newThemeVersion :: ThemeVersion
newThemeVersion =
ThemeVersion' :: Maybe ResourceStatus
-> Maybe Text
-> Maybe POSIX
-> Maybe Natural
-> Maybe ThemeConfiguration
-> Maybe (NonEmpty ThemeError)
-> Maybe Text
-> Maybe Text
-> ThemeVersion
ThemeVersion'
{ $sel:status:ThemeVersion' :: Maybe ResourceStatus
status = Maybe ResourceStatus
forall a. Maybe a
Prelude.Nothing,
$sel:arn:ThemeVersion' :: Maybe Text
arn = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:createdTime:ThemeVersion' :: Maybe POSIX
createdTime = Maybe POSIX
forall a. Maybe a
Prelude.Nothing,
$sel:versionNumber:ThemeVersion' :: Maybe Natural
versionNumber = Maybe Natural
forall a. Maybe a
Prelude.Nothing,
$sel:configuration:ThemeVersion' :: Maybe ThemeConfiguration
configuration = Maybe ThemeConfiguration
forall a. Maybe a
Prelude.Nothing,
$sel:errors:ThemeVersion' :: Maybe (NonEmpty ThemeError)
errors = Maybe (NonEmpty ThemeError)
forall a. Maybe a
Prelude.Nothing,
$sel:description:ThemeVersion' :: Maybe Text
description = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:baseThemeId:ThemeVersion' :: Maybe Text
baseThemeId = Maybe Text
forall a. Maybe a
Prelude.Nothing
}
themeVersion_status :: Lens.Lens' ThemeVersion (Prelude.Maybe ResourceStatus)
themeVersion_status :: (Maybe ResourceStatus -> f (Maybe ResourceStatus))
-> ThemeVersion -> f ThemeVersion
themeVersion_status = (ThemeVersion -> Maybe ResourceStatus)
-> (ThemeVersion -> Maybe ResourceStatus -> ThemeVersion)
-> Lens
ThemeVersion
ThemeVersion
(Maybe ResourceStatus)
(Maybe ResourceStatus)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ThemeVersion' {Maybe ResourceStatus
status :: Maybe ResourceStatus
$sel:status:ThemeVersion' :: ThemeVersion -> Maybe ResourceStatus
status} -> Maybe ResourceStatus
status) (\s :: ThemeVersion
s@ThemeVersion' {} Maybe ResourceStatus
a -> ThemeVersion
s {$sel:status:ThemeVersion' :: Maybe ResourceStatus
status = Maybe ResourceStatus
a} :: ThemeVersion)
themeVersion_arn :: Lens.Lens' ThemeVersion (Prelude.Maybe Prelude.Text)
themeVersion_arn :: (Maybe Text -> f (Maybe Text)) -> ThemeVersion -> f ThemeVersion
themeVersion_arn = (ThemeVersion -> Maybe Text)
-> (ThemeVersion -> Maybe Text -> ThemeVersion)
-> Lens ThemeVersion ThemeVersion (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ThemeVersion' {Maybe Text
arn :: Maybe Text
$sel:arn:ThemeVersion' :: ThemeVersion -> Maybe Text
arn} -> Maybe Text
arn) (\s :: ThemeVersion
s@ThemeVersion' {} Maybe Text
a -> ThemeVersion
s {$sel:arn:ThemeVersion' :: Maybe Text
arn = Maybe Text
a} :: ThemeVersion)
themeVersion_createdTime :: Lens.Lens' ThemeVersion (Prelude.Maybe Prelude.UTCTime)
themeVersion_createdTime :: (Maybe UTCTime -> f (Maybe UTCTime))
-> ThemeVersion -> f ThemeVersion
themeVersion_createdTime = (ThemeVersion -> Maybe POSIX)
-> (ThemeVersion -> Maybe POSIX -> ThemeVersion)
-> Lens ThemeVersion ThemeVersion (Maybe POSIX) (Maybe POSIX)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ThemeVersion' {Maybe POSIX
createdTime :: Maybe POSIX
$sel:createdTime:ThemeVersion' :: ThemeVersion -> Maybe POSIX
createdTime} -> Maybe POSIX
createdTime) (\s :: ThemeVersion
s@ThemeVersion' {} Maybe POSIX
a -> ThemeVersion
s {$sel:createdTime:ThemeVersion' :: Maybe POSIX
createdTime = Maybe POSIX
a} :: ThemeVersion) ((Maybe POSIX -> f (Maybe POSIX))
-> ThemeVersion -> f ThemeVersion)
-> ((Maybe UTCTime -> f (Maybe UTCTime))
-> Maybe POSIX -> f (Maybe POSIX))
-> (Maybe UTCTime -> f (Maybe UTCTime))
-> ThemeVersion
-> f ThemeVersion
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
themeVersion_versionNumber :: Lens.Lens' ThemeVersion (Prelude.Maybe Prelude.Natural)
themeVersion_versionNumber :: (Maybe Natural -> f (Maybe Natural))
-> ThemeVersion -> f ThemeVersion
themeVersion_versionNumber = (ThemeVersion -> Maybe Natural)
-> (ThemeVersion -> Maybe Natural -> ThemeVersion)
-> Lens ThemeVersion ThemeVersion (Maybe Natural) (Maybe Natural)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ThemeVersion' {Maybe Natural
versionNumber :: Maybe Natural
$sel:versionNumber:ThemeVersion' :: ThemeVersion -> Maybe Natural
versionNumber} -> Maybe Natural
versionNumber) (\s :: ThemeVersion
s@ThemeVersion' {} Maybe Natural
a -> ThemeVersion
s {$sel:versionNumber:ThemeVersion' :: Maybe Natural
versionNumber = Maybe Natural
a} :: ThemeVersion)
themeVersion_configuration :: Lens.Lens' ThemeVersion (Prelude.Maybe ThemeConfiguration)
themeVersion_configuration :: (Maybe ThemeConfiguration -> f (Maybe ThemeConfiguration))
-> ThemeVersion -> f ThemeVersion
themeVersion_configuration = (ThemeVersion -> Maybe ThemeConfiguration)
-> (ThemeVersion -> Maybe ThemeConfiguration -> ThemeVersion)
-> Lens
ThemeVersion
ThemeVersion
(Maybe ThemeConfiguration)
(Maybe ThemeConfiguration)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ThemeVersion' {Maybe ThemeConfiguration
configuration :: Maybe ThemeConfiguration
$sel:configuration:ThemeVersion' :: ThemeVersion -> Maybe ThemeConfiguration
configuration} -> Maybe ThemeConfiguration
configuration) (\s :: ThemeVersion
s@ThemeVersion' {} Maybe ThemeConfiguration
a -> ThemeVersion
s {$sel:configuration:ThemeVersion' :: Maybe ThemeConfiguration
configuration = Maybe ThemeConfiguration
a} :: ThemeVersion)
themeVersion_errors :: Lens.Lens' ThemeVersion (Prelude.Maybe (Prelude.NonEmpty ThemeError))
themeVersion_errors :: (Maybe (NonEmpty ThemeError) -> f (Maybe (NonEmpty ThemeError)))
-> ThemeVersion -> f ThemeVersion
themeVersion_errors = (ThemeVersion -> Maybe (NonEmpty ThemeError))
-> (ThemeVersion -> Maybe (NonEmpty ThemeError) -> ThemeVersion)
-> Lens
ThemeVersion
ThemeVersion
(Maybe (NonEmpty ThemeError))
(Maybe (NonEmpty ThemeError))
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ThemeVersion' {Maybe (NonEmpty ThemeError)
errors :: Maybe (NonEmpty ThemeError)
$sel:errors:ThemeVersion' :: ThemeVersion -> Maybe (NonEmpty ThemeError)
errors} -> Maybe (NonEmpty ThemeError)
errors) (\s :: ThemeVersion
s@ThemeVersion' {} Maybe (NonEmpty ThemeError)
a -> ThemeVersion
s {$sel:errors:ThemeVersion' :: Maybe (NonEmpty ThemeError)
errors = Maybe (NonEmpty ThemeError)
a} :: ThemeVersion) ((Maybe (NonEmpty ThemeError) -> f (Maybe (NonEmpty ThemeError)))
-> ThemeVersion -> f ThemeVersion)
-> ((Maybe (NonEmpty ThemeError)
-> f (Maybe (NonEmpty ThemeError)))
-> Maybe (NonEmpty ThemeError) -> f (Maybe (NonEmpty ThemeError)))
-> (Maybe (NonEmpty ThemeError) -> f (Maybe (NonEmpty ThemeError)))
-> ThemeVersion
-> f ThemeVersion
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso
(NonEmpty ThemeError)
(NonEmpty ThemeError)
(NonEmpty ThemeError)
(NonEmpty ThemeError)
-> Iso
(Maybe (NonEmpty ThemeError))
(Maybe (NonEmpty ThemeError))
(Maybe (NonEmpty ThemeError))
(Maybe (NonEmpty ThemeError))
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
(NonEmpty ThemeError)
(NonEmpty ThemeError)
(NonEmpty ThemeError)
(NonEmpty ThemeError)
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
themeVersion_description :: Lens.Lens' ThemeVersion (Prelude.Maybe Prelude.Text)
themeVersion_description :: (Maybe Text -> f (Maybe Text)) -> ThemeVersion -> f ThemeVersion
themeVersion_description = (ThemeVersion -> Maybe Text)
-> (ThemeVersion -> Maybe Text -> ThemeVersion)
-> Lens ThemeVersion ThemeVersion (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ThemeVersion' {Maybe Text
description :: Maybe Text
$sel:description:ThemeVersion' :: ThemeVersion -> Maybe Text
description} -> Maybe Text
description) (\s :: ThemeVersion
s@ThemeVersion' {} Maybe Text
a -> ThemeVersion
s {$sel:description:ThemeVersion' :: Maybe Text
description = Maybe Text
a} :: ThemeVersion)
themeVersion_baseThemeId :: Lens.Lens' ThemeVersion (Prelude.Maybe Prelude.Text)
themeVersion_baseThemeId :: (Maybe Text -> f (Maybe Text)) -> ThemeVersion -> f ThemeVersion
themeVersion_baseThemeId = (ThemeVersion -> Maybe Text)
-> (ThemeVersion -> Maybe Text -> ThemeVersion)
-> Lens ThemeVersion ThemeVersion (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ThemeVersion' {Maybe Text
baseThemeId :: Maybe Text
$sel:baseThemeId:ThemeVersion' :: ThemeVersion -> Maybe Text
baseThemeId} -> Maybe Text
baseThemeId) (\s :: ThemeVersion
s@ThemeVersion' {} Maybe Text
a -> ThemeVersion
s {$sel:baseThemeId:ThemeVersion' :: Maybe Text
baseThemeId = Maybe Text
a} :: ThemeVersion)
instance Core.FromJSON ThemeVersion where
parseJSON :: Value -> Parser ThemeVersion
parseJSON =
String
-> (Object -> Parser ThemeVersion) -> Value -> Parser ThemeVersion
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
String
"ThemeVersion"
( \Object
x ->
Maybe ResourceStatus
-> Maybe Text
-> Maybe POSIX
-> Maybe Natural
-> Maybe ThemeConfiguration
-> Maybe (NonEmpty ThemeError)
-> Maybe Text
-> Maybe Text
-> ThemeVersion
ThemeVersion'
(Maybe ResourceStatus
-> Maybe Text
-> Maybe POSIX
-> Maybe Natural
-> Maybe ThemeConfiguration
-> Maybe (NonEmpty ThemeError)
-> Maybe Text
-> Maybe Text
-> ThemeVersion)
-> Parser (Maybe ResourceStatus)
-> Parser
(Maybe Text
-> Maybe POSIX
-> Maybe Natural
-> Maybe ThemeConfiguration
-> Maybe (NonEmpty ThemeError)
-> Maybe Text
-> Maybe Text
-> ThemeVersion)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Parser (Maybe ResourceStatus)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"Status")
Parser
(Maybe Text
-> Maybe POSIX
-> Maybe Natural
-> Maybe ThemeConfiguration
-> Maybe (NonEmpty ThemeError)
-> Maybe Text
-> Maybe Text
-> ThemeVersion)
-> Parser (Maybe Text)
-> Parser
(Maybe POSIX
-> Maybe Natural
-> Maybe ThemeConfiguration
-> Maybe (NonEmpty ThemeError)
-> Maybe Text
-> Maybe Text
-> ThemeVersion)
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 Natural
-> Maybe ThemeConfiguration
-> Maybe (NonEmpty ThemeError)
-> Maybe Text
-> Maybe Text
-> ThemeVersion)
-> Parser (Maybe POSIX)
-> Parser
(Maybe Natural
-> Maybe ThemeConfiguration
-> Maybe (NonEmpty ThemeError)
-> Maybe Text
-> Maybe Text
-> ThemeVersion)
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 Natural
-> Maybe ThemeConfiguration
-> Maybe (NonEmpty ThemeError)
-> Maybe Text
-> Maybe Text
-> ThemeVersion)
-> Parser (Maybe Natural)
-> Parser
(Maybe ThemeConfiguration
-> Maybe (NonEmpty ThemeError)
-> Maybe Text
-> Maybe Text
-> ThemeVersion)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Natural)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"VersionNumber")
Parser
(Maybe ThemeConfiguration
-> Maybe (NonEmpty ThemeError)
-> Maybe Text
-> Maybe Text
-> ThemeVersion)
-> Parser (Maybe ThemeConfiguration)
-> Parser
(Maybe (NonEmpty ThemeError)
-> Maybe Text -> Maybe Text -> ThemeVersion)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe ThemeConfiguration)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"Configuration")
Parser
(Maybe (NonEmpty ThemeError)
-> Maybe Text -> Maybe Text -> ThemeVersion)
-> Parser (Maybe (NonEmpty ThemeError))
-> Parser (Maybe Text -> Maybe Text -> ThemeVersion)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe (NonEmpty ThemeError))
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"Errors")
Parser (Maybe Text -> Maybe Text -> ThemeVersion)
-> Parser (Maybe Text) -> Parser (Maybe Text -> ThemeVersion)
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
"Description")
Parser (Maybe Text -> ThemeVersion)
-> Parser (Maybe Text) -> Parser ThemeVersion
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
"BaseThemeId")
)
instance Prelude.Hashable ThemeVersion
instance Prelude.NFData ThemeVersion