{-# 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.AccountSettings where
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
import Amazonka.QuickSight.Types.Edition
data AccountSettings = AccountSettings'
{
AccountSettings -> Maybe Edition
edition :: Prelude.Maybe Edition,
AccountSettings -> Maybe Text
accountName :: Prelude.Maybe Prelude.Text,
AccountSettings -> Maybe Text
defaultNamespace :: Prelude.Maybe Prelude.Text,
AccountSettings -> Maybe Text
notificationEmail :: Prelude.Maybe Prelude.Text
}
deriving (AccountSettings -> AccountSettings -> Bool
(AccountSettings -> AccountSettings -> Bool)
-> (AccountSettings -> AccountSettings -> Bool)
-> Eq AccountSettings
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: AccountSettings -> AccountSettings -> Bool
$c/= :: AccountSettings -> AccountSettings -> Bool
== :: AccountSettings -> AccountSettings -> Bool
$c== :: AccountSettings -> AccountSettings -> Bool
Prelude.Eq, ReadPrec [AccountSettings]
ReadPrec AccountSettings
Int -> ReadS AccountSettings
ReadS [AccountSettings]
(Int -> ReadS AccountSettings)
-> ReadS [AccountSettings]
-> ReadPrec AccountSettings
-> ReadPrec [AccountSettings]
-> Read AccountSettings
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [AccountSettings]
$creadListPrec :: ReadPrec [AccountSettings]
readPrec :: ReadPrec AccountSettings
$creadPrec :: ReadPrec AccountSettings
readList :: ReadS [AccountSettings]
$creadList :: ReadS [AccountSettings]
readsPrec :: Int -> ReadS AccountSettings
$creadsPrec :: Int -> ReadS AccountSettings
Prelude.Read, Int -> AccountSettings -> ShowS
[AccountSettings] -> ShowS
AccountSettings -> String
(Int -> AccountSettings -> ShowS)
-> (AccountSettings -> String)
-> ([AccountSettings] -> ShowS)
-> Show AccountSettings
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [AccountSettings] -> ShowS
$cshowList :: [AccountSettings] -> ShowS
show :: AccountSettings -> String
$cshow :: AccountSettings -> String
showsPrec :: Int -> AccountSettings -> ShowS
$cshowsPrec :: Int -> AccountSettings -> ShowS
Prelude.Show, (forall x. AccountSettings -> Rep AccountSettings x)
-> (forall x. Rep AccountSettings x -> AccountSettings)
-> Generic AccountSettings
forall x. Rep AccountSettings x -> AccountSettings
forall x. AccountSettings -> Rep AccountSettings x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep AccountSettings x -> AccountSettings
$cfrom :: forall x. AccountSettings -> Rep AccountSettings x
Prelude.Generic)
newAccountSettings ::
AccountSettings
newAccountSettings :: AccountSettings
newAccountSettings =
AccountSettings' :: Maybe Edition
-> Maybe Text -> Maybe Text -> Maybe Text -> AccountSettings
AccountSettings'
{ $sel:edition:AccountSettings' :: Maybe Edition
edition = Maybe Edition
forall a. Maybe a
Prelude.Nothing,
$sel:accountName:AccountSettings' :: Maybe Text
accountName = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:defaultNamespace:AccountSettings' :: Maybe Text
defaultNamespace = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:notificationEmail:AccountSettings' :: Maybe Text
notificationEmail = Maybe Text
forall a. Maybe a
Prelude.Nothing
}
accountSettings_edition :: Lens.Lens' AccountSettings (Prelude.Maybe Edition)
accountSettings_edition :: (Maybe Edition -> f (Maybe Edition))
-> AccountSettings -> f AccountSettings
accountSettings_edition = (AccountSettings -> Maybe Edition)
-> (AccountSettings -> Maybe Edition -> AccountSettings)
-> Lens
AccountSettings AccountSettings (Maybe Edition) (Maybe Edition)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AccountSettings' {Maybe Edition
edition :: Maybe Edition
$sel:edition:AccountSettings' :: AccountSettings -> Maybe Edition
edition} -> Maybe Edition
edition) (\s :: AccountSettings
s@AccountSettings' {} Maybe Edition
a -> AccountSettings
s {$sel:edition:AccountSettings' :: Maybe Edition
edition = Maybe Edition
a} :: AccountSettings)
accountSettings_accountName :: Lens.Lens' AccountSettings (Prelude.Maybe Prelude.Text)
accountSettings_accountName :: (Maybe Text -> f (Maybe Text))
-> AccountSettings -> f AccountSettings
accountSettings_accountName = (AccountSettings -> Maybe Text)
-> (AccountSettings -> Maybe Text -> AccountSettings)
-> Lens AccountSettings AccountSettings (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AccountSettings' {Maybe Text
accountName :: Maybe Text
$sel:accountName:AccountSettings' :: AccountSettings -> Maybe Text
accountName} -> Maybe Text
accountName) (\s :: AccountSettings
s@AccountSettings' {} Maybe Text
a -> AccountSettings
s {$sel:accountName:AccountSettings' :: Maybe Text
accountName = Maybe Text
a} :: AccountSettings)
accountSettings_defaultNamespace :: Lens.Lens' AccountSettings (Prelude.Maybe Prelude.Text)
accountSettings_defaultNamespace :: (Maybe Text -> f (Maybe Text))
-> AccountSettings -> f AccountSettings
accountSettings_defaultNamespace = (AccountSettings -> Maybe Text)
-> (AccountSettings -> Maybe Text -> AccountSettings)
-> Lens AccountSettings AccountSettings (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AccountSettings' {Maybe Text
defaultNamespace :: Maybe Text
$sel:defaultNamespace:AccountSettings' :: AccountSettings -> Maybe Text
defaultNamespace} -> Maybe Text
defaultNamespace) (\s :: AccountSettings
s@AccountSettings' {} Maybe Text
a -> AccountSettings
s {$sel:defaultNamespace:AccountSettings' :: Maybe Text
defaultNamespace = Maybe Text
a} :: AccountSettings)
accountSettings_notificationEmail :: Lens.Lens' AccountSettings (Prelude.Maybe Prelude.Text)
accountSettings_notificationEmail :: (Maybe Text -> f (Maybe Text))
-> AccountSettings -> f AccountSettings
accountSettings_notificationEmail = (AccountSettings -> Maybe Text)
-> (AccountSettings -> Maybe Text -> AccountSettings)
-> Lens AccountSettings AccountSettings (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AccountSettings' {Maybe Text
notificationEmail :: Maybe Text
$sel:notificationEmail:AccountSettings' :: AccountSettings -> Maybe Text
notificationEmail} -> Maybe Text
notificationEmail) (\s :: AccountSettings
s@AccountSettings' {} Maybe Text
a -> AccountSettings
s {$sel:notificationEmail:AccountSettings' :: Maybe Text
notificationEmail = Maybe Text
a} :: AccountSettings)
instance Core.FromJSON AccountSettings where
parseJSON :: Value -> Parser AccountSettings
parseJSON =
String
-> (Object -> Parser AccountSettings)
-> Value
-> Parser AccountSettings
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
String
"AccountSettings"
( \Object
x ->
Maybe Edition
-> Maybe Text -> Maybe Text -> Maybe Text -> AccountSettings
AccountSettings'
(Maybe Edition
-> Maybe Text -> Maybe Text -> Maybe Text -> AccountSettings)
-> Parser (Maybe Edition)
-> Parser
(Maybe Text -> Maybe Text -> Maybe Text -> AccountSettings)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Parser (Maybe Edition)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"Edition")
Parser (Maybe Text -> Maybe Text -> Maybe Text -> AccountSettings)
-> Parser (Maybe Text)
-> Parser (Maybe Text -> Maybe Text -> AccountSettings)
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
"AccountName")
Parser (Maybe Text -> Maybe Text -> AccountSettings)
-> Parser (Maybe Text) -> Parser (Maybe Text -> AccountSettings)
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
"DefaultNamespace")
Parser (Maybe Text -> AccountSettings)
-> Parser (Maybe Text) -> Parser AccountSettings
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
"NotificationEmail")
)
instance Prelude.Hashable AccountSettings
instance Prelude.NFData AccountSettings