{-# 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.SSO.Types.AccountInfo where
import qualified Amazonka.Core as Core
import qualified Amazonka.Core.Lens.Internal as Lens
import qualified Amazonka.Data as Data
import qualified Amazonka.Prelude as Prelude
data AccountInfo = AccountInfo'
{
AccountInfo -> Maybe Text
accountId :: Prelude.Maybe Prelude.Text,
AccountInfo -> Maybe Text
accountName :: Prelude.Maybe Prelude.Text,
AccountInfo -> Maybe Text
emailAddress :: Prelude.Maybe Prelude.Text
}
deriving (AccountInfo -> AccountInfo -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: AccountInfo -> AccountInfo -> Bool
$c/= :: AccountInfo -> AccountInfo -> Bool
== :: AccountInfo -> AccountInfo -> Bool
$c== :: AccountInfo -> AccountInfo -> Bool
Prelude.Eq, ReadPrec [AccountInfo]
ReadPrec AccountInfo
Int -> ReadS AccountInfo
ReadS [AccountInfo]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [AccountInfo]
$creadListPrec :: ReadPrec [AccountInfo]
readPrec :: ReadPrec AccountInfo
$creadPrec :: ReadPrec AccountInfo
readList :: ReadS [AccountInfo]
$creadList :: ReadS [AccountInfo]
readsPrec :: Int -> ReadS AccountInfo
$creadsPrec :: Int -> ReadS AccountInfo
Prelude.Read, Int -> AccountInfo -> ShowS
[AccountInfo] -> ShowS
AccountInfo -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [AccountInfo] -> ShowS
$cshowList :: [AccountInfo] -> ShowS
show :: AccountInfo -> String
$cshow :: AccountInfo -> String
showsPrec :: Int -> AccountInfo -> ShowS
$cshowsPrec :: Int -> AccountInfo -> ShowS
Prelude.Show, forall x. Rep AccountInfo x -> AccountInfo
forall x. AccountInfo -> Rep AccountInfo x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep AccountInfo x -> AccountInfo
$cfrom :: forall x. AccountInfo -> Rep AccountInfo x
Prelude.Generic)
newAccountInfo ::
AccountInfo
newAccountInfo :: AccountInfo
newAccountInfo =
AccountInfo'
{ $sel:accountId:AccountInfo' :: Maybe Text
accountId = forall a. Maybe a
Prelude.Nothing,
$sel:accountName:AccountInfo' :: Maybe Text
accountName = forall a. Maybe a
Prelude.Nothing,
$sel:emailAddress:AccountInfo' :: Maybe Text
emailAddress = forall a. Maybe a
Prelude.Nothing
}
accountInfo_accountId :: Lens.Lens' AccountInfo (Prelude.Maybe Prelude.Text)
accountInfo_accountId :: Lens' AccountInfo (Maybe Text)
accountInfo_accountId = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AccountInfo' {Maybe Text
accountId :: Maybe Text
$sel:accountId:AccountInfo' :: AccountInfo -> Maybe Text
accountId} -> Maybe Text
accountId) (\s :: AccountInfo
s@AccountInfo' {} Maybe Text
a -> AccountInfo
s {$sel:accountId:AccountInfo' :: Maybe Text
accountId = Maybe Text
a} :: AccountInfo)
accountInfo_accountName :: Lens.Lens' AccountInfo (Prelude.Maybe Prelude.Text)
accountInfo_accountName :: Lens' AccountInfo (Maybe Text)
accountInfo_accountName = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AccountInfo' {Maybe Text
accountName :: Maybe Text
$sel:accountName:AccountInfo' :: AccountInfo -> Maybe Text
accountName} -> Maybe Text
accountName) (\s :: AccountInfo
s@AccountInfo' {} Maybe Text
a -> AccountInfo
s {$sel:accountName:AccountInfo' :: Maybe Text
accountName = Maybe Text
a} :: AccountInfo)
accountInfo_emailAddress :: Lens.Lens' AccountInfo (Prelude.Maybe Prelude.Text)
accountInfo_emailAddress :: Lens' AccountInfo (Maybe Text)
accountInfo_emailAddress = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AccountInfo' {Maybe Text
emailAddress :: Maybe Text
$sel:emailAddress:AccountInfo' :: AccountInfo -> Maybe Text
emailAddress} -> Maybe Text
emailAddress) (\s :: AccountInfo
s@AccountInfo' {} Maybe Text
a -> AccountInfo
s {$sel:emailAddress:AccountInfo' :: Maybe Text
emailAddress = Maybe Text
a} :: AccountInfo)
instance Data.FromJSON AccountInfo where
parseJSON :: Value -> Parser AccountInfo
parseJSON =
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Data.withObject
String
"AccountInfo"
( \Object
x ->
Maybe Text -> Maybe Text -> Maybe Text -> AccountInfo
AccountInfo'
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"accountId")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"accountName")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"emailAddress")
)
instance Prelude.Hashable AccountInfo where
hashWithSalt :: Int -> AccountInfo -> Int
hashWithSalt Int
_salt AccountInfo' {Maybe Text
emailAddress :: Maybe Text
accountName :: Maybe Text
accountId :: Maybe Text
$sel:emailAddress:AccountInfo' :: AccountInfo -> Maybe Text
$sel:accountName:AccountInfo' :: AccountInfo -> Maybe Text
$sel:accountId:AccountInfo' :: AccountInfo -> Maybe Text
..} =
Int
_salt
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
accountId
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
accountName
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
emailAddress
instance Prelude.NFData AccountInfo where
rnf :: AccountInfo -> ()
rnf AccountInfo' {Maybe Text
emailAddress :: Maybe Text
accountName :: Maybe Text
accountId :: Maybe Text
$sel:emailAddress:AccountInfo' :: AccountInfo -> Maybe Text
$sel:accountName:AccountInfo' :: AccountInfo -> Maybe Text
$sel:accountId:AccountInfo' :: AccountInfo -> Maybe Text
..} =
forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
accountId
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
accountName
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
emailAddress