{-# 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.SESV2.Types.AccountDetails where
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
import Amazonka.SESV2.Types.ContactLanguage
import Amazonka.SESV2.Types.MailType
import Amazonka.SESV2.Types.ReviewDetails
data AccountDetails = AccountDetails'
{
AccountDetails -> Maybe ReviewDetails
reviewDetails :: Prelude.Maybe ReviewDetails,
AccountDetails -> Maybe MailType
mailType :: Prelude.Maybe MailType,
AccountDetails -> Maybe (Sensitive Text)
useCaseDescription :: Prelude.Maybe (Core.Sensitive Prelude.Text),
AccountDetails -> Maybe ContactLanguage
contactLanguage :: Prelude.Maybe ContactLanguage,
AccountDetails -> Maybe (Sensitive (NonEmpty (Sensitive Text)))
additionalContactEmailAddresses :: Prelude.Maybe (Core.Sensitive (Prelude.NonEmpty (Core.Sensitive Prelude.Text))),
AccountDetails -> Maybe (Sensitive Text)
websiteURL :: Prelude.Maybe (Core.Sensitive Prelude.Text)
}
deriving (AccountDetails -> AccountDetails -> Bool
(AccountDetails -> AccountDetails -> Bool)
-> (AccountDetails -> AccountDetails -> Bool) -> Eq AccountDetails
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: AccountDetails -> AccountDetails -> Bool
$c/= :: AccountDetails -> AccountDetails -> Bool
== :: AccountDetails -> AccountDetails -> Bool
$c== :: AccountDetails -> AccountDetails -> Bool
Prelude.Eq, Int -> AccountDetails -> ShowS
[AccountDetails] -> ShowS
AccountDetails -> String
(Int -> AccountDetails -> ShowS)
-> (AccountDetails -> String)
-> ([AccountDetails] -> ShowS)
-> Show AccountDetails
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [AccountDetails] -> ShowS
$cshowList :: [AccountDetails] -> ShowS
show :: AccountDetails -> String
$cshow :: AccountDetails -> String
showsPrec :: Int -> AccountDetails -> ShowS
$cshowsPrec :: Int -> AccountDetails -> ShowS
Prelude.Show, (forall x. AccountDetails -> Rep AccountDetails x)
-> (forall x. Rep AccountDetails x -> AccountDetails)
-> Generic AccountDetails
forall x. Rep AccountDetails x -> AccountDetails
forall x. AccountDetails -> Rep AccountDetails x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep AccountDetails x -> AccountDetails
$cfrom :: forall x. AccountDetails -> Rep AccountDetails x
Prelude.Generic)
newAccountDetails ::
AccountDetails
newAccountDetails :: AccountDetails
newAccountDetails =
AccountDetails' :: Maybe ReviewDetails
-> Maybe MailType
-> Maybe (Sensitive Text)
-> Maybe ContactLanguage
-> Maybe (Sensitive (NonEmpty (Sensitive Text)))
-> Maybe (Sensitive Text)
-> AccountDetails
AccountDetails'
{ $sel:reviewDetails:AccountDetails' :: Maybe ReviewDetails
reviewDetails = Maybe ReviewDetails
forall a. Maybe a
Prelude.Nothing,
$sel:mailType:AccountDetails' :: Maybe MailType
mailType = Maybe MailType
forall a. Maybe a
Prelude.Nothing,
$sel:useCaseDescription:AccountDetails' :: Maybe (Sensitive Text)
useCaseDescription = Maybe (Sensitive Text)
forall a. Maybe a
Prelude.Nothing,
$sel:contactLanguage:AccountDetails' :: Maybe ContactLanguage
contactLanguage = Maybe ContactLanguage
forall a. Maybe a
Prelude.Nothing,
$sel:additionalContactEmailAddresses:AccountDetails' :: Maybe (Sensitive (NonEmpty (Sensitive Text)))
additionalContactEmailAddresses = Maybe (Sensitive (NonEmpty (Sensitive Text)))
forall a. Maybe a
Prelude.Nothing,
$sel:websiteURL:AccountDetails' :: Maybe (Sensitive Text)
websiteURL = Maybe (Sensitive Text)
forall a. Maybe a
Prelude.Nothing
}
accountDetails_reviewDetails :: Lens.Lens' AccountDetails (Prelude.Maybe ReviewDetails)
accountDetails_reviewDetails :: (Maybe ReviewDetails -> f (Maybe ReviewDetails))
-> AccountDetails -> f AccountDetails
accountDetails_reviewDetails = (AccountDetails -> Maybe ReviewDetails)
-> (AccountDetails -> Maybe ReviewDetails -> AccountDetails)
-> Lens
AccountDetails
AccountDetails
(Maybe ReviewDetails)
(Maybe ReviewDetails)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AccountDetails' {Maybe ReviewDetails
reviewDetails :: Maybe ReviewDetails
$sel:reviewDetails:AccountDetails' :: AccountDetails -> Maybe ReviewDetails
reviewDetails} -> Maybe ReviewDetails
reviewDetails) (\s :: AccountDetails
s@AccountDetails' {} Maybe ReviewDetails
a -> AccountDetails
s {$sel:reviewDetails:AccountDetails' :: Maybe ReviewDetails
reviewDetails = Maybe ReviewDetails
a} :: AccountDetails)
accountDetails_mailType :: Lens.Lens' AccountDetails (Prelude.Maybe MailType)
accountDetails_mailType :: (Maybe MailType -> f (Maybe MailType))
-> AccountDetails -> f AccountDetails
accountDetails_mailType = (AccountDetails -> Maybe MailType)
-> (AccountDetails -> Maybe MailType -> AccountDetails)
-> Lens
AccountDetails AccountDetails (Maybe MailType) (Maybe MailType)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AccountDetails' {Maybe MailType
mailType :: Maybe MailType
$sel:mailType:AccountDetails' :: AccountDetails -> Maybe MailType
mailType} -> Maybe MailType
mailType) (\s :: AccountDetails
s@AccountDetails' {} Maybe MailType
a -> AccountDetails
s {$sel:mailType:AccountDetails' :: Maybe MailType
mailType = Maybe MailType
a} :: AccountDetails)
accountDetails_useCaseDescription :: Lens.Lens' AccountDetails (Prelude.Maybe Prelude.Text)
accountDetails_useCaseDescription :: (Maybe Text -> f (Maybe Text))
-> AccountDetails -> f AccountDetails
accountDetails_useCaseDescription = (AccountDetails -> Maybe (Sensitive Text))
-> (AccountDetails -> Maybe (Sensitive Text) -> AccountDetails)
-> Lens
AccountDetails
AccountDetails
(Maybe (Sensitive Text))
(Maybe (Sensitive Text))
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AccountDetails' {Maybe (Sensitive Text)
useCaseDescription :: Maybe (Sensitive Text)
$sel:useCaseDescription:AccountDetails' :: AccountDetails -> Maybe (Sensitive Text)
useCaseDescription} -> Maybe (Sensitive Text)
useCaseDescription) (\s :: AccountDetails
s@AccountDetails' {} Maybe (Sensitive Text)
a -> AccountDetails
s {$sel:useCaseDescription:AccountDetails' :: Maybe (Sensitive Text)
useCaseDescription = Maybe (Sensitive Text)
a} :: AccountDetails) ((Maybe (Sensitive Text) -> f (Maybe (Sensitive Text)))
-> AccountDetails -> f AccountDetails)
-> ((Maybe Text -> f (Maybe Text))
-> Maybe (Sensitive Text) -> f (Maybe (Sensitive Text)))
-> (Maybe Text -> f (Maybe Text))
-> AccountDetails
-> f AccountDetails
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso (Sensitive Text) (Sensitive Text) Text Text
-> Iso
(Maybe (Sensitive Text))
(Maybe (Sensitive Text))
(Maybe Text)
(Maybe Text)
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 (Sensitive Text) (Sensitive Text) Text Text
forall a. Iso' (Sensitive a) a
Core._Sensitive
accountDetails_contactLanguage :: Lens.Lens' AccountDetails (Prelude.Maybe ContactLanguage)
accountDetails_contactLanguage :: (Maybe ContactLanguage -> f (Maybe ContactLanguage))
-> AccountDetails -> f AccountDetails
accountDetails_contactLanguage = (AccountDetails -> Maybe ContactLanguage)
-> (AccountDetails -> Maybe ContactLanguage -> AccountDetails)
-> Lens
AccountDetails
AccountDetails
(Maybe ContactLanguage)
(Maybe ContactLanguage)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AccountDetails' {Maybe ContactLanguage
contactLanguage :: Maybe ContactLanguage
$sel:contactLanguage:AccountDetails' :: AccountDetails -> Maybe ContactLanguage
contactLanguage} -> Maybe ContactLanguage
contactLanguage) (\s :: AccountDetails
s@AccountDetails' {} Maybe ContactLanguage
a -> AccountDetails
s {$sel:contactLanguage:AccountDetails' :: Maybe ContactLanguage
contactLanguage = Maybe ContactLanguage
a} :: AccountDetails)
accountDetails_additionalContactEmailAddresses :: Lens.Lens' AccountDetails (Prelude.Maybe (Prelude.NonEmpty Prelude.Text))
accountDetails_additionalContactEmailAddresses :: (Maybe (NonEmpty Text) -> f (Maybe (NonEmpty Text)))
-> AccountDetails -> f AccountDetails
accountDetails_additionalContactEmailAddresses = (AccountDetails -> Maybe (Sensitive (NonEmpty (Sensitive Text))))
-> (AccountDetails
-> Maybe (Sensitive (NonEmpty (Sensitive Text))) -> AccountDetails)
-> Lens
AccountDetails
AccountDetails
(Maybe (Sensitive (NonEmpty (Sensitive Text))))
(Maybe (Sensitive (NonEmpty (Sensitive Text))))
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AccountDetails' {Maybe (Sensitive (NonEmpty (Sensitive Text)))
additionalContactEmailAddresses :: Maybe (Sensitive (NonEmpty (Sensitive Text)))
$sel:additionalContactEmailAddresses:AccountDetails' :: AccountDetails -> Maybe (Sensitive (NonEmpty (Sensitive Text)))
additionalContactEmailAddresses} -> Maybe (Sensitive (NonEmpty (Sensitive Text)))
additionalContactEmailAddresses) (\s :: AccountDetails
s@AccountDetails' {} Maybe (Sensitive (NonEmpty (Sensitive Text)))
a -> AccountDetails
s {$sel:additionalContactEmailAddresses:AccountDetails' :: Maybe (Sensitive (NonEmpty (Sensitive Text)))
additionalContactEmailAddresses = Maybe (Sensitive (NonEmpty (Sensitive Text)))
a} :: AccountDetails) ((Maybe (Sensitive (NonEmpty (Sensitive Text)))
-> f (Maybe (Sensitive (NonEmpty (Sensitive Text)))))
-> AccountDetails -> f AccountDetails)
-> ((Maybe (NonEmpty Text) -> f (Maybe (NonEmpty Text)))
-> Maybe (Sensitive (NonEmpty (Sensitive Text)))
-> f (Maybe (Sensitive (NonEmpty (Sensitive Text)))))
-> (Maybe (NonEmpty Text) -> f (Maybe (NonEmpty Text)))
-> AccountDetails
-> f AccountDetails
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso
(Sensitive (NonEmpty (Sensitive Text)))
(Sensitive (NonEmpty (Sensitive Text)))
(NonEmpty Text)
(NonEmpty Text)
-> Iso
(Maybe (Sensitive (NonEmpty (Sensitive Text))))
(Maybe (Sensitive (NonEmpty (Sensitive Text))))
(Maybe (NonEmpty Text))
(Maybe (NonEmpty Text))
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 (Exchange
(NonEmpty Text)
(NonEmpty Text)
(NonEmpty (Sensitive Text))
(Identity (NonEmpty (Sensitive Text)))
-> Exchange
(NonEmpty Text)
(NonEmpty Text)
(Sensitive (NonEmpty (Sensitive Text)))
(Identity (Sensitive (NonEmpty (Sensitive Text))))
forall a. Iso' (Sensitive a) a
Core._Sensitive (Exchange
(NonEmpty Text)
(NonEmpty Text)
(NonEmpty (Sensitive Text))
(Identity (NonEmpty (Sensitive Text)))
-> Exchange
(NonEmpty Text)
(NonEmpty Text)
(Sensitive (NonEmpty (Sensitive Text)))
(Identity (Sensitive (NonEmpty (Sensitive Text)))))
-> (Exchange
(NonEmpty Text)
(NonEmpty Text)
(NonEmpty Text)
(Identity (NonEmpty Text))
-> Exchange
(NonEmpty Text)
(NonEmpty Text)
(NonEmpty (Sensitive Text))
(Identity (NonEmpty (Sensitive Text))))
-> AnIso
(Sensitive (NonEmpty (Sensitive Text)))
(Sensitive (NonEmpty (Sensitive Text)))
(NonEmpty Text)
(NonEmpty Text)
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. Exchange
(NonEmpty Text)
(NonEmpty Text)
(NonEmpty Text)
(Identity (NonEmpty Text))
-> Exchange
(NonEmpty Text)
(NonEmpty Text)
(NonEmpty (Sensitive Text))
(Identity (NonEmpty (Sensitive Text)))
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced)
accountDetails_websiteURL :: Lens.Lens' AccountDetails (Prelude.Maybe Prelude.Text)
accountDetails_websiteURL :: (Maybe Text -> f (Maybe Text))
-> AccountDetails -> f AccountDetails
accountDetails_websiteURL = (AccountDetails -> Maybe (Sensitive Text))
-> (AccountDetails -> Maybe (Sensitive Text) -> AccountDetails)
-> Lens
AccountDetails
AccountDetails
(Maybe (Sensitive Text))
(Maybe (Sensitive Text))
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AccountDetails' {Maybe (Sensitive Text)
websiteURL :: Maybe (Sensitive Text)
$sel:websiteURL:AccountDetails' :: AccountDetails -> Maybe (Sensitive Text)
websiteURL} -> Maybe (Sensitive Text)
websiteURL) (\s :: AccountDetails
s@AccountDetails' {} Maybe (Sensitive Text)
a -> AccountDetails
s {$sel:websiteURL:AccountDetails' :: Maybe (Sensitive Text)
websiteURL = Maybe (Sensitive Text)
a} :: AccountDetails) ((Maybe (Sensitive Text) -> f (Maybe (Sensitive Text)))
-> AccountDetails -> f AccountDetails)
-> ((Maybe Text -> f (Maybe Text))
-> Maybe (Sensitive Text) -> f (Maybe (Sensitive Text)))
-> (Maybe Text -> f (Maybe Text))
-> AccountDetails
-> f AccountDetails
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso (Sensitive Text) (Sensitive Text) Text Text
-> Iso
(Maybe (Sensitive Text))
(Maybe (Sensitive Text))
(Maybe Text)
(Maybe Text)
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 (Sensitive Text) (Sensitive Text) Text Text
forall a. Iso' (Sensitive a) a
Core._Sensitive
instance Core.FromJSON AccountDetails where
parseJSON :: Value -> Parser AccountDetails
parseJSON =
String
-> (Object -> Parser AccountDetails)
-> Value
-> Parser AccountDetails
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
String
"AccountDetails"
( \Object
x ->
Maybe ReviewDetails
-> Maybe MailType
-> Maybe (Sensitive Text)
-> Maybe ContactLanguage
-> Maybe (Sensitive (NonEmpty (Sensitive Text)))
-> Maybe (Sensitive Text)
-> AccountDetails
AccountDetails'
(Maybe ReviewDetails
-> Maybe MailType
-> Maybe (Sensitive Text)
-> Maybe ContactLanguage
-> Maybe (Sensitive (NonEmpty (Sensitive Text)))
-> Maybe (Sensitive Text)
-> AccountDetails)
-> Parser (Maybe ReviewDetails)
-> Parser
(Maybe MailType
-> Maybe (Sensitive Text)
-> Maybe ContactLanguage
-> Maybe (Sensitive (NonEmpty (Sensitive Text)))
-> Maybe (Sensitive Text)
-> AccountDetails)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Parser (Maybe ReviewDetails)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"ReviewDetails")
Parser
(Maybe MailType
-> Maybe (Sensitive Text)
-> Maybe ContactLanguage
-> Maybe (Sensitive (NonEmpty (Sensitive Text)))
-> Maybe (Sensitive Text)
-> AccountDetails)
-> Parser (Maybe MailType)
-> Parser
(Maybe (Sensitive Text)
-> Maybe ContactLanguage
-> Maybe (Sensitive (NonEmpty (Sensitive Text)))
-> Maybe (Sensitive Text)
-> AccountDetails)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe MailType)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"MailType")
Parser
(Maybe (Sensitive Text)
-> Maybe ContactLanguage
-> Maybe (Sensitive (NonEmpty (Sensitive Text)))
-> Maybe (Sensitive Text)
-> AccountDetails)
-> Parser (Maybe (Sensitive Text))
-> Parser
(Maybe ContactLanguage
-> Maybe (Sensitive (NonEmpty (Sensitive Text)))
-> Maybe (Sensitive Text)
-> AccountDetails)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe (Sensitive Text))
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"UseCaseDescription")
Parser
(Maybe ContactLanguage
-> Maybe (Sensitive (NonEmpty (Sensitive Text)))
-> Maybe (Sensitive Text)
-> AccountDetails)
-> Parser (Maybe ContactLanguage)
-> Parser
(Maybe (Sensitive (NonEmpty (Sensitive Text)))
-> Maybe (Sensitive Text) -> AccountDetails)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe ContactLanguage)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"ContactLanguage")
Parser
(Maybe (Sensitive (NonEmpty (Sensitive Text)))
-> Maybe (Sensitive Text) -> AccountDetails)
-> Parser (Maybe (Sensitive (NonEmpty (Sensitive Text))))
-> Parser (Maybe (Sensitive Text) -> AccountDetails)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object
-> Text -> Parser (Maybe (Sensitive (NonEmpty (Sensitive Text))))
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"AdditionalContactEmailAddresses")
Parser (Maybe (Sensitive Text) -> AccountDetails)
-> Parser (Maybe (Sensitive Text)) -> Parser AccountDetails
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe (Sensitive Text))
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"WebsiteURL")
)
instance Prelude.Hashable AccountDetails
instance Prelude.NFData AccountDetails