{-# 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.FinSpace.Types.SuperuserParameters 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 SuperuserParameters = SuperuserParameters'
{
SuperuserParameters -> Sensitive Text
emailAddress :: Data.Sensitive Prelude.Text,
SuperuserParameters -> Text
firstName :: Prelude.Text,
SuperuserParameters -> Text
lastName :: Prelude.Text
}
deriving (SuperuserParameters -> SuperuserParameters -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: SuperuserParameters -> SuperuserParameters -> Bool
$c/= :: SuperuserParameters -> SuperuserParameters -> Bool
== :: SuperuserParameters -> SuperuserParameters -> Bool
$c== :: SuperuserParameters -> SuperuserParameters -> Bool
Prelude.Eq, Int -> SuperuserParameters -> ShowS
[SuperuserParameters] -> ShowS
SuperuserParameters -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [SuperuserParameters] -> ShowS
$cshowList :: [SuperuserParameters] -> ShowS
show :: SuperuserParameters -> String
$cshow :: SuperuserParameters -> String
showsPrec :: Int -> SuperuserParameters -> ShowS
$cshowsPrec :: Int -> SuperuserParameters -> ShowS
Prelude.Show, forall x. Rep SuperuserParameters x -> SuperuserParameters
forall x. SuperuserParameters -> Rep SuperuserParameters x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep SuperuserParameters x -> SuperuserParameters
$cfrom :: forall x. SuperuserParameters -> Rep SuperuserParameters x
Prelude.Generic)
newSuperuserParameters ::
Prelude.Text ->
Prelude.Text ->
Prelude.Text ->
SuperuserParameters
newSuperuserParameters :: Text -> Text -> Text -> SuperuserParameters
newSuperuserParameters
Text
pEmailAddress_
Text
pFirstName_
Text
pLastName_ =
SuperuserParameters'
{ $sel:emailAddress:SuperuserParameters' :: Sensitive Text
emailAddress =
forall a. Iso' (Sensitive a) a
Data._Sensitive forall t b. AReview t b -> b -> t
Lens.# Text
pEmailAddress_,
$sel:firstName:SuperuserParameters' :: Text
firstName = Text
pFirstName_,
$sel:lastName:SuperuserParameters' :: Text
lastName = Text
pLastName_
}
superuserParameters_emailAddress :: Lens.Lens' SuperuserParameters Prelude.Text
superuserParameters_emailAddress :: Lens' SuperuserParameters Text
superuserParameters_emailAddress = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\SuperuserParameters' {Sensitive Text
emailAddress :: Sensitive Text
$sel:emailAddress:SuperuserParameters' :: SuperuserParameters -> Sensitive Text
emailAddress} -> Sensitive Text
emailAddress) (\s :: SuperuserParameters
s@SuperuserParameters' {} Sensitive Text
a -> SuperuserParameters
s {$sel:emailAddress:SuperuserParameters' :: Sensitive Text
emailAddress = Sensitive Text
a} :: SuperuserParameters) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall a. Iso' (Sensitive a) a
Data._Sensitive
superuserParameters_firstName :: Lens.Lens' SuperuserParameters Prelude.Text
superuserParameters_firstName :: Lens' SuperuserParameters Text
superuserParameters_firstName = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\SuperuserParameters' {Text
firstName :: Text
$sel:firstName:SuperuserParameters' :: SuperuserParameters -> Text
firstName} -> Text
firstName) (\s :: SuperuserParameters
s@SuperuserParameters' {} Text
a -> SuperuserParameters
s {$sel:firstName:SuperuserParameters' :: Text
firstName = Text
a} :: SuperuserParameters)
superuserParameters_lastName :: Lens.Lens' SuperuserParameters Prelude.Text
superuserParameters_lastName :: Lens' SuperuserParameters Text
superuserParameters_lastName = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\SuperuserParameters' {Text
lastName :: Text
$sel:lastName:SuperuserParameters' :: SuperuserParameters -> Text
lastName} -> Text
lastName) (\s :: SuperuserParameters
s@SuperuserParameters' {} Text
a -> SuperuserParameters
s {$sel:lastName:SuperuserParameters' :: Text
lastName = Text
a} :: SuperuserParameters)
instance Prelude.Hashable SuperuserParameters where
hashWithSalt :: Int -> SuperuserParameters -> Int
hashWithSalt Int
_salt SuperuserParameters' {Text
Sensitive Text
lastName :: Text
firstName :: Text
emailAddress :: Sensitive Text
$sel:lastName:SuperuserParameters' :: SuperuserParameters -> Text
$sel:firstName:SuperuserParameters' :: SuperuserParameters -> Text
$sel:emailAddress:SuperuserParameters' :: SuperuserParameters -> Sensitive Text
..} =
Int
_salt
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Sensitive Text
emailAddress
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
firstName
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
lastName
instance Prelude.NFData SuperuserParameters where
rnf :: SuperuserParameters -> ()
rnf SuperuserParameters' {Text
Sensitive Text
lastName :: Text
firstName :: Text
emailAddress :: Sensitive Text
$sel:lastName:SuperuserParameters' :: SuperuserParameters -> Text
$sel:firstName:SuperuserParameters' :: SuperuserParameters -> Text
$sel:emailAddress:SuperuserParameters' :: SuperuserParameters -> Sensitive Text
..} =
forall a. NFData a => a -> ()
Prelude.rnf Sensitive Text
emailAddress
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Text
firstName
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Text
lastName
instance Data.ToJSON SuperuserParameters where
toJSON :: SuperuserParameters -> Value
toJSON SuperuserParameters' {Text
Sensitive Text
lastName :: Text
firstName :: Text
emailAddress :: Sensitive Text
$sel:lastName:SuperuserParameters' :: SuperuserParameters -> Text
$sel:firstName:SuperuserParameters' :: SuperuserParameters -> Text
$sel:emailAddress:SuperuserParameters' :: SuperuserParameters -> Sensitive Text
..} =
[Pair] -> Value
Data.object
( forall a. [Maybe a] -> [a]
Prelude.catMaybes
[ forall a. a -> Maybe a
Prelude.Just (Key
"emailAddress" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..= Sensitive Text
emailAddress),
forall a. a -> Maybe a
Prelude.Just (Key
"firstName" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..= Text
firstName),
forall a. a -> Maybe a
Prelude.Just (Key
"lastName" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..= Text
lastName)
]
)