{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE DuplicateRecordFields #-}
{-# LANGUAGE NamedFieldPuns #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE StrictData #-}
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# OPTIONS_GHC -fno-warn-unused-binds #-}
{-# OPTIONS_GHC -fno-warn-unused-imports #-}
{-# OPTIONS_GHC -fno-warn-unused-matches #-}
module Amazonka.CustomerProfiles.UpdateProfile
(
UpdateProfile (..),
newUpdateProfile,
updateProfile_shippingAddress,
updateProfile_mobilePhoneNumber,
updateProfile_mailingAddress,
updateProfile_middleName,
updateProfile_personalEmailAddress,
updateProfile_lastName,
updateProfile_additionalInformation,
updateProfile_homePhoneNumber,
updateProfile_address,
updateProfile_partyType,
updateProfile_businessEmailAddress,
updateProfile_attributes,
updateProfile_gender,
updateProfile_phoneNumber,
updateProfile_accountNumber,
updateProfile_emailAddress,
updateProfile_firstName,
updateProfile_billingAddress,
updateProfile_businessPhoneNumber,
updateProfile_birthDate,
updateProfile_businessName,
updateProfile_domainName,
updateProfile_profileId,
UpdateProfileResponse (..),
newUpdateProfileResponse,
updateProfileResponse_httpStatus,
updateProfileResponse_profileId,
)
where
import qualified Amazonka.Core as Core
import Amazonka.CustomerProfiles.Types
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
import qualified Amazonka.Request as Request
import qualified Amazonka.Response as Response
data UpdateProfile = UpdateProfile'
{
UpdateProfile -> Maybe UpdateAddress
shippingAddress :: Prelude.Maybe UpdateAddress,
UpdateProfile -> Maybe Text
mobilePhoneNumber :: Prelude.Maybe Prelude.Text,
UpdateProfile -> Maybe UpdateAddress
mailingAddress :: Prelude.Maybe UpdateAddress,
UpdateProfile -> Maybe Text
middleName :: Prelude.Maybe Prelude.Text,
UpdateProfile -> Maybe Text
personalEmailAddress :: Prelude.Maybe Prelude.Text,
UpdateProfile -> Maybe Text
lastName :: Prelude.Maybe Prelude.Text,
UpdateProfile -> Maybe Text
additionalInformation :: Prelude.Maybe Prelude.Text,
UpdateProfile -> Maybe Text
homePhoneNumber :: Prelude.Maybe Prelude.Text,
UpdateProfile -> Maybe UpdateAddress
address :: Prelude.Maybe UpdateAddress,
UpdateProfile -> Maybe PartyType
partyType :: Prelude.Maybe PartyType,
UpdateProfile -> Maybe Text
businessEmailAddress :: Prelude.Maybe Prelude.Text,
UpdateProfile -> Maybe (HashMap Text Text)
attributes :: Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text),
UpdateProfile -> Maybe Gender
gender :: Prelude.Maybe Gender,
UpdateProfile -> Maybe Text
phoneNumber :: Prelude.Maybe Prelude.Text,
UpdateProfile -> Maybe Text
accountNumber :: Prelude.Maybe Prelude.Text,
UpdateProfile -> Maybe Text
emailAddress :: Prelude.Maybe Prelude.Text,
UpdateProfile -> Maybe Text
firstName :: Prelude.Maybe Prelude.Text,
UpdateProfile -> Maybe UpdateAddress
billingAddress :: Prelude.Maybe UpdateAddress,
UpdateProfile -> Maybe Text
businessPhoneNumber :: Prelude.Maybe Prelude.Text,
UpdateProfile -> Maybe Text
birthDate :: Prelude.Maybe Prelude.Text,
UpdateProfile -> Maybe Text
businessName :: Prelude.Maybe Prelude.Text,
UpdateProfile -> Text
domainName :: Prelude.Text,
UpdateProfile -> Text
profileId :: Prelude.Text
}
deriving (UpdateProfile -> UpdateProfile -> Bool
(UpdateProfile -> UpdateProfile -> Bool)
-> (UpdateProfile -> UpdateProfile -> Bool) -> Eq UpdateProfile
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: UpdateProfile -> UpdateProfile -> Bool
$c/= :: UpdateProfile -> UpdateProfile -> Bool
== :: UpdateProfile -> UpdateProfile -> Bool
$c== :: UpdateProfile -> UpdateProfile -> Bool
Prelude.Eq, ReadPrec [UpdateProfile]
ReadPrec UpdateProfile
Int -> ReadS UpdateProfile
ReadS [UpdateProfile]
(Int -> ReadS UpdateProfile)
-> ReadS [UpdateProfile]
-> ReadPrec UpdateProfile
-> ReadPrec [UpdateProfile]
-> Read UpdateProfile
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [UpdateProfile]
$creadListPrec :: ReadPrec [UpdateProfile]
readPrec :: ReadPrec UpdateProfile
$creadPrec :: ReadPrec UpdateProfile
readList :: ReadS [UpdateProfile]
$creadList :: ReadS [UpdateProfile]
readsPrec :: Int -> ReadS UpdateProfile
$creadsPrec :: Int -> ReadS UpdateProfile
Prelude.Read, Int -> UpdateProfile -> ShowS
[UpdateProfile] -> ShowS
UpdateProfile -> String
(Int -> UpdateProfile -> ShowS)
-> (UpdateProfile -> String)
-> ([UpdateProfile] -> ShowS)
-> Show UpdateProfile
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [UpdateProfile] -> ShowS
$cshowList :: [UpdateProfile] -> ShowS
show :: UpdateProfile -> String
$cshow :: UpdateProfile -> String
showsPrec :: Int -> UpdateProfile -> ShowS
$cshowsPrec :: Int -> UpdateProfile -> ShowS
Prelude.Show, (forall x. UpdateProfile -> Rep UpdateProfile x)
-> (forall x. Rep UpdateProfile x -> UpdateProfile)
-> Generic UpdateProfile
forall x. Rep UpdateProfile x -> UpdateProfile
forall x. UpdateProfile -> Rep UpdateProfile x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep UpdateProfile x -> UpdateProfile
$cfrom :: forall x. UpdateProfile -> Rep UpdateProfile x
Prelude.Generic)
newUpdateProfile ::
Prelude.Text ->
Prelude.Text ->
UpdateProfile
newUpdateProfile :: Text -> Text -> UpdateProfile
newUpdateProfile Text
pDomainName_ Text
pProfileId_ =
UpdateProfile' :: Maybe UpdateAddress
-> Maybe Text
-> Maybe UpdateAddress
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe UpdateAddress
-> Maybe PartyType
-> Maybe Text
-> Maybe (HashMap Text Text)
-> Maybe Gender
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe UpdateAddress
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Text
-> Text
-> UpdateProfile
UpdateProfile'
{ $sel:shippingAddress:UpdateProfile' :: Maybe UpdateAddress
shippingAddress = Maybe UpdateAddress
forall a. Maybe a
Prelude.Nothing,
$sel:mobilePhoneNumber:UpdateProfile' :: Maybe Text
mobilePhoneNumber = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:mailingAddress:UpdateProfile' :: Maybe UpdateAddress
mailingAddress = Maybe UpdateAddress
forall a. Maybe a
Prelude.Nothing,
$sel:middleName:UpdateProfile' :: Maybe Text
middleName = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:personalEmailAddress:UpdateProfile' :: Maybe Text
personalEmailAddress = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:lastName:UpdateProfile' :: Maybe Text
lastName = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:additionalInformation:UpdateProfile' :: Maybe Text
additionalInformation = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:homePhoneNumber:UpdateProfile' :: Maybe Text
homePhoneNumber = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:address:UpdateProfile' :: Maybe UpdateAddress
address = Maybe UpdateAddress
forall a. Maybe a
Prelude.Nothing,
$sel:partyType:UpdateProfile' :: Maybe PartyType
partyType = Maybe PartyType
forall a. Maybe a
Prelude.Nothing,
$sel:businessEmailAddress:UpdateProfile' :: Maybe Text
businessEmailAddress = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:attributes:UpdateProfile' :: Maybe (HashMap Text Text)
attributes = Maybe (HashMap Text Text)
forall a. Maybe a
Prelude.Nothing,
$sel:gender:UpdateProfile' :: Maybe Gender
gender = Maybe Gender
forall a. Maybe a
Prelude.Nothing,
$sel:phoneNumber:UpdateProfile' :: Maybe Text
phoneNumber = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:accountNumber:UpdateProfile' :: Maybe Text
accountNumber = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:emailAddress:UpdateProfile' :: Maybe Text
emailAddress = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:firstName:UpdateProfile' :: Maybe Text
firstName = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:billingAddress:UpdateProfile' :: Maybe UpdateAddress
billingAddress = Maybe UpdateAddress
forall a. Maybe a
Prelude.Nothing,
$sel:businessPhoneNumber:UpdateProfile' :: Maybe Text
businessPhoneNumber = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:birthDate:UpdateProfile' :: Maybe Text
birthDate = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:businessName:UpdateProfile' :: Maybe Text
businessName = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:domainName:UpdateProfile' :: Text
domainName = Text
pDomainName_,
$sel:profileId:UpdateProfile' :: Text
profileId = Text
pProfileId_
}
updateProfile_shippingAddress :: Lens.Lens' UpdateProfile (Prelude.Maybe UpdateAddress)
updateProfile_shippingAddress :: (Maybe UpdateAddress -> f (Maybe UpdateAddress))
-> UpdateProfile -> f UpdateProfile
updateProfile_shippingAddress = (UpdateProfile -> Maybe UpdateAddress)
-> (UpdateProfile -> Maybe UpdateAddress -> UpdateProfile)
-> Lens
UpdateProfile
UpdateProfile
(Maybe UpdateAddress)
(Maybe UpdateAddress)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateProfile' {Maybe UpdateAddress
shippingAddress :: Maybe UpdateAddress
$sel:shippingAddress:UpdateProfile' :: UpdateProfile -> Maybe UpdateAddress
shippingAddress} -> Maybe UpdateAddress
shippingAddress) (\s :: UpdateProfile
s@UpdateProfile' {} Maybe UpdateAddress
a -> UpdateProfile
s {$sel:shippingAddress:UpdateProfile' :: Maybe UpdateAddress
shippingAddress = Maybe UpdateAddress
a} :: UpdateProfile)
updateProfile_mobilePhoneNumber :: Lens.Lens' UpdateProfile (Prelude.Maybe Prelude.Text)
updateProfile_mobilePhoneNumber :: (Maybe Text -> f (Maybe Text)) -> UpdateProfile -> f UpdateProfile
updateProfile_mobilePhoneNumber = (UpdateProfile -> Maybe Text)
-> (UpdateProfile -> Maybe Text -> UpdateProfile)
-> Lens UpdateProfile UpdateProfile (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateProfile' {Maybe Text
mobilePhoneNumber :: Maybe Text
$sel:mobilePhoneNumber:UpdateProfile' :: UpdateProfile -> Maybe Text
mobilePhoneNumber} -> Maybe Text
mobilePhoneNumber) (\s :: UpdateProfile
s@UpdateProfile' {} Maybe Text
a -> UpdateProfile
s {$sel:mobilePhoneNumber:UpdateProfile' :: Maybe Text
mobilePhoneNumber = Maybe Text
a} :: UpdateProfile)
updateProfile_mailingAddress :: Lens.Lens' UpdateProfile (Prelude.Maybe UpdateAddress)
updateProfile_mailingAddress :: (Maybe UpdateAddress -> f (Maybe UpdateAddress))
-> UpdateProfile -> f UpdateProfile
updateProfile_mailingAddress = (UpdateProfile -> Maybe UpdateAddress)
-> (UpdateProfile -> Maybe UpdateAddress -> UpdateProfile)
-> Lens
UpdateProfile
UpdateProfile
(Maybe UpdateAddress)
(Maybe UpdateAddress)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateProfile' {Maybe UpdateAddress
mailingAddress :: Maybe UpdateAddress
$sel:mailingAddress:UpdateProfile' :: UpdateProfile -> Maybe UpdateAddress
mailingAddress} -> Maybe UpdateAddress
mailingAddress) (\s :: UpdateProfile
s@UpdateProfile' {} Maybe UpdateAddress
a -> UpdateProfile
s {$sel:mailingAddress:UpdateProfile' :: Maybe UpdateAddress
mailingAddress = Maybe UpdateAddress
a} :: UpdateProfile)
updateProfile_middleName :: Lens.Lens' UpdateProfile (Prelude.Maybe Prelude.Text)
updateProfile_middleName :: (Maybe Text -> f (Maybe Text)) -> UpdateProfile -> f UpdateProfile
updateProfile_middleName = (UpdateProfile -> Maybe Text)
-> (UpdateProfile -> Maybe Text -> UpdateProfile)
-> Lens UpdateProfile UpdateProfile (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateProfile' {Maybe Text
middleName :: Maybe Text
$sel:middleName:UpdateProfile' :: UpdateProfile -> Maybe Text
middleName} -> Maybe Text
middleName) (\s :: UpdateProfile
s@UpdateProfile' {} Maybe Text
a -> UpdateProfile
s {$sel:middleName:UpdateProfile' :: Maybe Text
middleName = Maybe Text
a} :: UpdateProfile)
updateProfile_personalEmailAddress :: Lens.Lens' UpdateProfile (Prelude.Maybe Prelude.Text)
updateProfile_personalEmailAddress :: (Maybe Text -> f (Maybe Text)) -> UpdateProfile -> f UpdateProfile
updateProfile_personalEmailAddress = (UpdateProfile -> Maybe Text)
-> (UpdateProfile -> Maybe Text -> UpdateProfile)
-> Lens UpdateProfile UpdateProfile (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateProfile' {Maybe Text
personalEmailAddress :: Maybe Text
$sel:personalEmailAddress:UpdateProfile' :: UpdateProfile -> Maybe Text
personalEmailAddress} -> Maybe Text
personalEmailAddress) (\s :: UpdateProfile
s@UpdateProfile' {} Maybe Text
a -> UpdateProfile
s {$sel:personalEmailAddress:UpdateProfile' :: Maybe Text
personalEmailAddress = Maybe Text
a} :: UpdateProfile)
updateProfile_lastName :: Lens.Lens' UpdateProfile (Prelude.Maybe Prelude.Text)
updateProfile_lastName :: (Maybe Text -> f (Maybe Text)) -> UpdateProfile -> f UpdateProfile
updateProfile_lastName = (UpdateProfile -> Maybe Text)
-> (UpdateProfile -> Maybe Text -> UpdateProfile)
-> Lens UpdateProfile UpdateProfile (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateProfile' {Maybe Text
lastName :: Maybe Text
$sel:lastName:UpdateProfile' :: UpdateProfile -> Maybe Text
lastName} -> Maybe Text
lastName) (\s :: UpdateProfile
s@UpdateProfile' {} Maybe Text
a -> UpdateProfile
s {$sel:lastName:UpdateProfile' :: Maybe Text
lastName = Maybe Text
a} :: UpdateProfile)
updateProfile_additionalInformation :: Lens.Lens' UpdateProfile (Prelude.Maybe Prelude.Text)
updateProfile_additionalInformation :: (Maybe Text -> f (Maybe Text)) -> UpdateProfile -> f UpdateProfile
updateProfile_additionalInformation = (UpdateProfile -> Maybe Text)
-> (UpdateProfile -> Maybe Text -> UpdateProfile)
-> Lens UpdateProfile UpdateProfile (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateProfile' {Maybe Text
additionalInformation :: Maybe Text
$sel:additionalInformation:UpdateProfile' :: UpdateProfile -> Maybe Text
additionalInformation} -> Maybe Text
additionalInformation) (\s :: UpdateProfile
s@UpdateProfile' {} Maybe Text
a -> UpdateProfile
s {$sel:additionalInformation:UpdateProfile' :: Maybe Text
additionalInformation = Maybe Text
a} :: UpdateProfile)
updateProfile_homePhoneNumber :: Lens.Lens' UpdateProfile (Prelude.Maybe Prelude.Text)
updateProfile_homePhoneNumber :: (Maybe Text -> f (Maybe Text)) -> UpdateProfile -> f UpdateProfile
updateProfile_homePhoneNumber = (UpdateProfile -> Maybe Text)
-> (UpdateProfile -> Maybe Text -> UpdateProfile)
-> Lens UpdateProfile UpdateProfile (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateProfile' {Maybe Text
homePhoneNumber :: Maybe Text
$sel:homePhoneNumber:UpdateProfile' :: UpdateProfile -> Maybe Text
homePhoneNumber} -> Maybe Text
homePhoneNumber) (\s :: UpdateProfile
s@UpdateProfile' {} Maybe Text
a -> UpdateProfile
s {$sel:homePhoneNumber:UpdateProfile' :: Maybe Text
homePhoneNumber = Maybe Text
a} :: UpdateProfile)
updateProfile_address :: Lens.Lens' UpdateProfile (Prelude.Maybe UpdateAddress)
updateProfile_address :: (Maybe UpdateAddress -> f (Maybe UpdateAddress))
-> UpdateProfile -> f UpdateProfile
updateProfile_address = (UpdateProfile -> Maybe UpdateAddress)
-> (UpdateProfile -> Maybe UpdateAddress -> UpdateProfile)
-> Lens
UpdateProfile
UpdateProfile
(Maybe UpdateAddress)
(Maybe UpdateAddress)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateProfile' {Maybe UpdateAddress
address :: Maybe UpdateAddress
$sel:address:UpdateProfile' :: UpdateProfile -> Maybe UpdateAddress
address} -> Maybe UpdateAddress
address) (\s :: UpdateProfile
s@UpdateProfile' {} Maybe UpdateAddress
a -> UpdateProfile
s {$sel:address:UpdateProfile' :: Maybe UpdateAddress
address = Maybe UpdateAddress
a} :: UpdateProfile)
updateProfile_partyType :: Lens.Lens' UpdateProfile (Prelude.Maybe PartyType)
updateProfile_partyType :: (Maybe PartyType -> f (Maybe PartyType))
-> UpdateProfile -> f UpdateProfile
updateProfile_partyType = (UpdateProfile -> Maybe PartyType)
-> (UpdateProfile -> Maybe PartyType -> UpdateProfile)
-> Lens
UpdateProfile UpdateProfile (Maybe PartyType) (Maybe PartyType)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateProfile' {Maybe PartyType
partyType :: Maybe PartyType
$sel:partyType:UpdateProfile' :: UpdateProfile -> Maybe PartyType
partyType} -> Maybe PartyType
partyType) (\s :: UpdateProfile
s@UpdateProfile' {} Maybe PartyType
a -> UpdateProfile
s {$sel:partyType:UpdateProfile' :: Maybe PartyType
partyType = Maybe PartyType
a} :: UpdateProfile)
updateProfile_businessEmailAddress :: Lens.Lens' UpdateProfile (Prelude.Maybe Prelude.Text)
updateProfile_businessEmailAddress :: (Maybe Text -> f (Maybe Text)) -> UpdateProfile -> f UpdateProfile
updateProfile_businessEmailAddress = (UpdateProfile -> Maybe Text)
-> (UpdateProfile -> Maybe Text -> UpdateProfile)
-> Lens UpdateProfile UpdateProfile (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateProfile' {Maybe Text
businessEmailAddress :: Maybe Text
$sel:businessEmailAddress:UpdateProfile' :: UpdateProfile -> Maybe Text
businessEmailAddress} -> Maybe Text
businessEmailAddress) (\s :: UpdateProfile
s@UpdateProfile' {} Maybe Text
a -> UpdateProfile
s {$sel:businessEmailAddress:UpdateProfile' :: Maybe Text
businessEmailAddress = Maybe Text
a} :: UpdateProfile)
updateProfile_attributes :: Lens.Lens' UpdateProfile (Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text))
updateProfile_attributes :: (Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
-> UpdateProfile -> f UpdateProfile
updateProfile_attributes = (UpdateProfile -> Maybe (HashMap Text Text))
-> (UpdateProfile -> Maybe (HashMap Text Text) -> UpdateProfile)
-> Lens
UpdateProfile
UpdateProfile
(Maybe (HashMap Text Text))
(Maybe (HashMap Text Text))
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateProfile' {Maybe (HashMap Text Text)
attributes :: Maybe (HashMap Text Text)
$sel:attributes:UpdateProfile' :: UpdateProfile -> Maybe (HashMap Text Text)
attributes} -> Maybe (HashMap Text Text)
attributes) (\s :: UpdateProfile
s@UpdateProfile' {} Maybe (HashMap Text Text)
a -> UpdateProfile
s {$sel:attributes:UpdateProfile' :: Maybe (HashMap Text Text)
attributes = Maybe (HashMap Text Text)
a} :: UpdateProfile) ((Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
-> UpdateProfile -> f UpdateProfile)
-> ((Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
-> Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
-> (Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
-> UpdateProfile
-> f UpdateProfile
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso
(HashMap Text Text)
(HashMap Text Text)
(HashMap Text Text)
(HashMap Text Text)
-> Iso
(Maybe (HashMap Text Text))
(Maybe (HashMap Text Text))
(Maybe (HashMap Text Text))
(Maybe (HashMap Text 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
(HashMap Text Text)
(HashMap Text Text)
(HashMap Text Text)
(HashMap Text Text)
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
updateProfile_gender :: Lens.Lens' UpdateProfile (Prelude.Maybe Gender)
updateProfile_gender :: (Maybe Gender -> f (Maybe Gender))
-> UpdateProfile -> f UpdateProfile
updateProfile_gender = (UpdateProfile -> Maybe Gender)
-> (UpdateProfile -> Maybe Gender -> UpdateProfile)
-> Lens UpdateProfile UpdateProfile (Maybe Gender) (Maybe Gender)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateProfile' {Maybe Gender
gender :: Maybe Gender
$sel:gender:UpdateProfile' :: UpdateProfile -> Maybe Gender
gender} -> Maybe Gender
gender) (\s :: UpdateProfile
s@UpdateProfile' {} Maybe Gender
a -> UpdateProfile
s {$sel:gender:UpdateProfile' :: Maybe Gender
gender = Maybe Gender
a} :: UpdateProfile)
updateProfile_phoneNumber :: Lens.Lens' UpdateProfile (Prelude.Maybe Prelude.Text)
updateProfile_phoneNumber :: (Maybe Text -> f (Maybe Text)) -> UpdateProfile -> f UpdateProfile
updateProfile_phoneNumber = (UpdateProfile -> Maybe Text)
-> (UpdateProfile -> Maybe Text -> UpdateProfile)
-> Lens UpdateProfile UpdateProfile (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateProfile' {Maybe Text
phoneNumber :: Maybe Text
$sel:phoneNumber:UpdateProfile' :: UpdateProfile -> Maybe Text
phoneNumber} -> Maybe Text
phoneNumber) (\s :: UpdateProfile
s@UpdateProfile' {} Maybe Text
a -> UpdateProfile
s {$sel:phoneNumber:UpdateProfile' :: Maybe Text
phoneNumber = Maybe Text
a} :: UpdateProfile)
updateProfile_accountNumber :: Lens.Lens' UpdateProfile (Prelude.Maybe Prelude.Text)
updateProfile_accountNumber :: (Maybe Text -> f (Maybe Text)) -> UpdateProfile -> f UpdateProfile
updateProfile_accountNumber = (UpdateProfile -> Maybe Text)
-> (UpdateProfile -> Maybe Text -> UpdateProfile)
-> Lens UpdateProfile UpdateProfile (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateProfile' {Maybe Text
accountNumber :: Maybe Text
$sel:accountNumber:UpdateProfile' :: UpdateProfile -> Maybe Text
accountNumber} -> Maybe Text
accountNumber) (\s :: UpdateProfile
s@UpdateProfile' {} Maybe Text
a -> UpdateProfile
s {$sel:accountNumber:UpdateProfile' :: Maybe Text
accountNumber = Maybe Text
a} :: UpdateProfile)
updateProfile_emailAddress :: Lens.Lens' UpdateProfile (Prelude.Maybe Prelude.Text)
updateProfile_emailAddress :: (Maybe Text -> f (Maybe Text)) -> UpdateProfile -> f UpdateProfile
updateProfile_emailAddress = (UpdateProfile -> Maybe Text)
-> (UpdateProfile -> Maybe Text -> UpdateProfile)
-> Lens UpdateProfile UpdateProfile (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateProfile' {Maybe Text
emailAddress :: Maybe Text
$sel:emailAddress:UpdateProfile' :: UpdateProfile -> Maybe Text
emailAddress} -> Maybe Text
emailAddress) (\s :: UpdateProfile
s@UpdateProfile' {} Maybe Text
a -> UpdateProfile
s {$sel:emailAddress:UpdateProfile' :: Maybe Text
emailAddress = Maybe Text
a} :: UpdateProfile)
updateProfile_firstName :: Lens.Lens' UpdateProfile (Prelude.Maybe Prelude.Text)
updateProfile_firstName :: (Maybe Text -> f (Maybe Text)) -> UpdateProfile -> f UpdateProfile
updateProfile_firstName = (UpdateProfile -> Maybe Text)
-> (UpdateProfile -> Maybe Text -> UpdateProfile)
-> Lens UpdateProfile UpdateProfile (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateProfile' {Maybe Text
firstName :: Maybe Text
$sel:firstName:UpdateProfile' :: UpdateProfile -> Maybe Text
firstName} -> Maybe Text
firstName) (\s :: UpdateProfile
s@UpdateProfile' {} Maybe Text
a -> UpdateProfile
s {$sel:firstName:UpdateProfile' :: Maybe Text
firstName = Maybe Text
a} :: UpdateProfile)
updateProfile_billingAddress :: Lens.Lens' UpdateProfile (Prelude.Maybe UpdateAddress)
updateProfile_billingAddress :: (Maybe UpdateAddress -> f (Maybe UpdateAddress))
-> UpdateProfile -> f UpdateProfile
updateProfile_billingAddress = (UpdateProfile -> Maybe UpdateAddress)
-> (UpdateProfile -> Maybe UpdateAddress -> UpdateProfile)
-> Lens
UpdateProfile
UpdateProfile
(Maybe UpdateAddress)
(Maybe UpdateAddress)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateProfile' {Maybe UpdateAddress
billingAddress :: Maybe UpdateAddress
$sel:billingAddress:UpdateProfile' :: UpdateProfile -> Maybe UpdateAddress
billingAddress} -> Maybe UpdateAddress
billingAddress) (\s :: UpdateProfile
s@UpdateProfile' {} Maybe UpdateAddress
a -> UpdateProfile
s {$sel:billingAddress:UpdateProfile' :: Maybe UpdateAddress
billingAddress = Maybe UpdateAddress
a} :: UpdateProfile)
updateProfile_businessPhoneNumber :: Lens.Lens' UpdateProfile (Prelude.Maybe Prelude.Text)
updateProfile_businessPhoneNumber :: (Maybe Text -> f (Maybe Text)) -> UpdateProfile -> f UpdateProfile
updateProfile_businessPhoneNumber = (UpdateProfile -> Maybe Text)
-> (UpdateProfile -> Maybe Text -> UpdateProfile)
-> Lens UpdateProfile UpdateProfile (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateProfile' {Maybe Text
businessPhoneNumber :: Maybe Text
$sel:businessPhoneNumber:UpdateProfile' :: UpdateProfile -> Maybe Text
businessPhoneNumber} -> Maybe Text
businessPhoneNumber) (\s :: UpdateProfile
s@UpdateProfile' {} Maybe Text
a -> UpdateProfile
s {$sel:businessPhoneNumber:UpdateProfile' :: Maybe Text
businessPhoneNumber = Maybe Text
a} :: UpdateProfile)
updateProfile_birthDate :: Lens.Lens' UpdateProfile (Prelude.Maybe Prelude.Text)
updateProfile_birthDate :: (Maybe Text -> f (Maybe Text)) -> UpdateProfile -> f UpdateProfile
updateProfile_birthDate = (UpdateProfile -> Maybe Text)
-> (UpdateProfile -> Maybe Text -> UpdateProfile)
-> Lens UpdateProfile UpdateProfile (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateProfile' {Maybe Text
birthDate :: Maybe Text
$sel:birthDate:UpdateProfile' :: UpdateProfile -> Maybe Text
birthDate} -> Maybe Text
birthDate) (\s :: UpdateProfile
s@UpdateProfile' {} Maybe Text
a -> UpdateProfile
s {$sel:birthDate:UpdateProfile' :: Maybe Text
birthDate = Maybe Text
a} :: UpdateProfile)
updateProfile_businessName :: Lens.Lens' UpdateProfile (Prelude.Maybe Prelude.Text)
updateProfile_businessName :: (Maybe Text -> f (Maybe Text)) -> UpdateProfile -> f UpdateProfile
updateProfile_businessName = (UpdateProfile -> Maybe Text)
-> (UpdateProfile -> Maybe Text -> UpdateProfile)
-> Lens UpdateProfile UpdateProfile (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateProfile' {Maybe Text
businessName :: Maybe Text
$sel:businessName:UpdateProfile' :: UpdateProfile -> Maybe Text
businessName} -> Maybe Text
businessName) (\s :: UpdateProfile
s@UpdateProfile' {} Maybe Text
a -> UpdateProfile
s {$sel:businessName:UpdateProfile' :: Maybe Text
businessName = Maybe Text
a} :: UpdateProfile)
updateProfile_domainName :: Lens.Lens' UpdateProfile Prelude.Text
updateProfile_domainName :: (Text -> f Text) -> UpdateProfile -> f UpdateProfile
updateProfile_domainName = (UpdateProfile -> Text)
-> (UpdateProfile -> Text -> UpdateProfile)
-> Lens UpdateProfile UpdateProfile Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateProfile' {Text
domainName :: Text
$sel:domainName:UpdateProfile' :: UpdateProfile -> Text
domainName} -> Text
domainName) (\s :: UpdateProfile
s@UpdateProfile' {} Text
a -> UpdateProfile
s {$sel:domainName:UpdateProfile' :: Text
domainName = Text
a} :: UpdateProfile)
updateProfile_profileId :: Lens.Lens' UpdateProfile Prelude.Text
updateProfile_profileId :: (Text -> f Text) -> UpdateProfile -> f UpdateProfile
updateProfile_profileId = (UpdateProfile -> Text)
-> (UpdateProfile -> Text -> UpdateProfile)
-> Lens UpdateProfile UpdateProfile Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateProfile' {Text
profileId :: Text
$sel:profileId:UpdateProfile' :: UpdateProfile -> Text
profileId} -> Text
profileId) (\s :: UpdateProfile
s@UpdateProfile' {} Text
a -> UpdateProfile
s {$sel:profileId:UpdateProfile' :: Text
profileId = Text
a} :: UpdateProfile)
instance Core.AWSRequest UpdateProfile where
type
AWSResponse UpdateProfile =
UpdateProfileResponse
request :: UpdateProfile -> Request UpdateProfile
request = Service -> UpdateProfile -> Request UpdateProfile
forall a. (ToRequest a, ToJSON a) => Service -> a -> Request a
Request.putJSON Service
defaultService
response :: Logger
-> Service
-> Proxy UpdateProfile
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse UpdateProfile)))
response =
(Int
-> ResponseHeaders
-> Object
-> Either String (AWSResponse UpdateProfile))
-> Logger
-> Service
-> Proxy UpdateProfile
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse UpdateProfile)))
forall (m :: * -> *) a.
MonadResource m =>
(Int -> ResponseHeaders -> Object -> Either String (AWSResponse a))
-> Logger
-> Service
-> Proxy a
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse a)))
Response.receiveJSON
( \Int
s ResponseHeaders
h Object
x ->
Int -> Text -> UpdateProfileResponse
UpdateProfileResponse'
(Int -> Text -> UpdateProfileResponse)
-> Either String Int
-> Either String (Text -> UpdateProfileResponse)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Int -> Either String Int
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure (Int -> Int
forall a. Enum a => a -> Int
Prelude.fromEnum Int
s))
Either String (Text -> UpdateProfileResponse)
-> Either String Text -> Either String UpdateProfileResponse
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String Text
forall a. FromJSON a => Object -> Text -> Either String a
Core..:> Text
"ProfileId")
)
instance Prelude.Hashable UpdateProfile
instance Prelude.NFData UpdateProfile
instance Core.ToHeaders UpdateProfile where
toHeaders :: UpdateProfile -> ResponseHeaders
toHeaders =
ResponseHeaders -> UpdateProfile -> ResponseHeaders
forall a b. a -> b -> a
Prelude.const
( [ResponseHeaders] -> ResponseHeaders
forall a. Monoid a => [a] -> a
Prelude.mconcat
[ HeaderName
"Content-Type"
HeaderName -> ByteString -> ResponseHeaders
forall a. ToHeader a => HeaderName -> a -> ResponseHeaders
Core.=# ( ByteString
"application/x-amz-json-1.1" ::
Prelude.ByteString
)
]
)
instance Core.ToJSON UpdateProfile where
toJSON :: UpdateProfile -> Value
toJSON UpdateProfile' {Maybe Text
Maybe (HashMap Text Text)
Maybe Gender
Maybe PartyType
Maybe UpdateAddress
Text
profileId :: Text
domainName :: Text
businessName :: Maybe Text
birthDate :: Maybe Text
businessPhoneNumber :: Maybe Text
billingAddress :: Maybe UpdateAddress
firstName :: Maybe Text
emailAddress :: Maybe Text
accountNumber :: Maybe Text
phoneNumber :: Maybe Text
gender :: Maybe Gender
attributes :: Maybe (HashMap Text Text)
businessEmailAddress :: Maybe Text
partyType :: Maybe PartyType
address :: Maybe UpdateAddress
homePhoneNumber :: Maybe Text
additionalInformation :: Maybe Text
lastName :: Maybe Text
personalEmailAddress :: Maybe Text
middleName :: Maybe Text
mailingAddress :: Maybe UpdateAddress
mobilePhoneNumber :: Maybe Text
shippingAddress :: Maybe UpdateAddress
$sel:profileId:UpdateProfile' :: UpdateProfile -> Text
$sel:domainName:UpdateProfile' :: UpdateProfile -> Text
$sel:businessName:UpdateProfile' :: UpdateProfile -> Maybe Text
$sel:birthDate:UpdateProfile' :: UpdateProfile -> Maybe Text
$sel:businessPhoneNumber:UpdateProfile' :: UpdateProfile -> Maybe Text
$sel:billingAddress:UpdateProfile' :: UpdateProfile -> Maybe UpdateAddress
$sel:firstName:UpdateProfile' :: UpdateProfile -> Maybe Text
$sel:emailAddress:UpdateProfile' :: UpdateProfile -> Maybe Text
$sel:accountNumber:UpdateProfile' :: UpdateProfile -> Maybe Text
$sel:phoneNumber:UpdateProfile' :: UpdateProfile -> Maybe Text
$sel:gender:UpdateProfile' :: UpdateProfile -> Maybe Gender
$sel:attributes:UpdateProfile' :: UpdateProfile -> Maybe (HashMap Text Text)
$sel:businessEmailAddress:UpdateProfile' :: UpdateProfile -> Maybe Text
$sel:partyType:UpdateProfile' :: UpdateProfile -> Maybe PartyType
$sel:address:UpdateProfile' :: UpdateProfile -> Maybe UpdateAddress
$sel:homePhoneNumber:UpdateProfile' :: UpdateProfile -> Maybe Text
$sel:additionalInformation:UpdateProfile' :: UpdateProfile -> Maybe Text
$sel:lastName:UpdateProfile' :: UpdateProfile -> Maybe Text
$sel:personalEmailAddress:UpdateProfile' :: UpdateProfile -> Maybe Text
$sel:middleName:UpdateProfile' :: UpdateProfile -> Maybe Text
$sel:mailingAddress:UpdateProfile' :: UpdateProfile -> Maybe UpdateAddress
$sel:mobilePhoneNumber:UpdateProfile' :: UpdateProfile -> Maybe Text
$sel:shippingAddress:UpdateProfile' :: UpdateProfile -> Maybe UpdateAddress
..} =
[Pair] -> Value
Core.object
( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
[ (Text
"ShippingAddress" Text -> UpdateAddress -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
(UpdateAddress -> Pair) -> Maybe UpdateAddress -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe UpdateAddress
shippingAddress,
(Text
"MobilePhoneNumber" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
(Text -> Pair) -> Maybe Text -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
mobilePhoneNumber,
(Text
"MailingAddress" Text -> UpdateAddress -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
(UpdateAddress -> Pair) -> Maybe UpdateAddress -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe UpdateAddress
mailingAddress,
(Text
"MiddleName" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (Text -> Pair) -> Maybe Text -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
middleName,
(Text
"PersonalEmailAddress" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
(Text -> Pair) -> Maybe Text -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
personalEmailAddress,
(Text
"LastName" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (Text -> Pair) -> Maybe Text -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
lastName,
(Text
"AdditionalInformation" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
(Text -> Pair) -> Maybe Text -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
additionalInformation,
(Text
"HomePhoneNumber" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
(Text -> Pair) -> Maybe Text -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
homePhoneNumber,
(Text
"Address" Text -> UpdateAddress -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (UpdateAddress -> Pair) -> Maybe UpdateAddress -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe UpdateAddress
address,
(Text
"PartyType" Text -> PartyType -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (PartyType -> Pair) -> Maybe PartyType -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe PartyType
partyType,
(Text
"BusinessEmailAddress" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
(Text -> Pair) -> Maybe Text -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
businessEmailAddress,
(Text
"Attributes" Text -> HashMap Text Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (HashMap Text Text -> Pair)
-> Maybe (HashMap Text Text) -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (HashMap Text Text)
attributes,
(Text
"Gender" Text -> Gender -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (Gender -> Pair) -> Maybe Gender -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Gender
gender,
(Text
"PhoneNumber" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (Text -> Pair) -> Maybe Text -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
phoneNumber,
(Text
"AccountNumber" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (Text -> Pair) -> Maybe Text -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
accountNumber,
(Text
"EmailAddress" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (Text -> Pair) -> Maybe Text -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
emailAddress,
(Text
"FirstName" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (Text -> Pair) -> Maybe Text -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
firstName,
(Text
"BillingAddress" Text -> UpdateAddress -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
(UpdateAddress -> Pair) -> Maybe UpdateAddress -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe UpdateAddress
billingAddress,
(Text
"BusinessPhoneNumber" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
(Text -> Pair) -> Maybe Text -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
businessPhoneNumber,
(Text
"BirthDate" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (Text -> Pair) -> Maybe Text -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
birthDate,
(Text
"BusinessName" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (Text -> Pair) -> Maybe Text -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
businessName,
Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just (Text
"ProfileId" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Text
profileId)
]
)
instance Core.ToPath UpdateProfile where
toPath :: UpdateProfile -> ByteString
toPath UpdateProfile' {Maybe Text
Maybe (HashMap Text Text)
Maybe Gender
Maybe PartyType
Maybe UpdateAddress
Text
profileId :: Text
domainName :: Text
businessName :: Maybe Text
birthDate :: Maybe Text
businessPhoneNumber :: Maybe Text
billingAddress :: Maybe UpdateAddress
firstName :: Maybe Text
emailAddress :: Maybe Text
accountNumber :: Maybe Text
phoneNumber :: Maybe Text
gender :: Maybe Gender
attributes :: Maybe (HashMap Text Text)
businessEmailAddress :: Maybe Text
partyType :: Maybe PartyType
address :: Maybe UpdateAddress
homePhoneNumber :: Maybe Text
additionalInformation :: Maybe Text
lastName :: Maybe Text
personalEmailAddress :: Maybe Text
middleName :: Maybe Text
mailingAddress :: Maybe UpdateAddress
mobilePhoneNumber :: Maybe Text
shippingAddress :: Maybe UpdateAddress
$sel:profileId:UpdateProfile' :: UpdateProfile -> Text
$sel:domainName:UpdateProfile' :: UpdateProfile -> Text
$sel:businessName:UpdateProfile' :: UpdateProfile -> Maybe Text
$sel:birthDate:UpdateProfile' :: UpdateProfile -> Maybe Text
$sel:businessPhoneNumber:UpdateProfile' :: UpdateProfile -> Maybe Text
$sel:billingAddress:UpdateProfile' :: UpdateProfile -> Maybe UpdateAddress
$sel:firstName:UpdateProfile' :: UpdateProfile -> Maybe Text
$sel:emailAddress:UpdateProfile' :: UpdateProfile -> Maybe Text
$sel:accountNumber:UpdateProfile' :: UpdateProfile -> Maybe Text
$sel:phoneNumber:UpdateProfile' :: UpdateProfile -> Maybe Text
$sel:gender:UpdateProfile' :: UpdateProfile -> Maybe Gender
$sel:attributes:UpdateProfile' :: UpdateProfile -> Maybe (HashMap Text Text)
$sel:businessEmailAddress:UpdateProfile' :: UpdateProfile -> Maybe Text
$sel:partyType:UpdateProfile' :: UpdateProfile -> Maybe PartyType
$sel:address:UpdateProfile' :: UpdateProfile -> Maybe UpdateAddress
$sel:homePhoneNumber:UpdateProfile' :: UpdateProfile -> Maybe Text
$sel:additionalInformation:UpdateProfile' :: UpdateProfile -> Maybe Text
$sel:lastName:UpdateProfile' :: UpdateProfile -> Maybe Text
$sel:personalEmailAddress:UpdateProfile' :: UpdateProfile -> Maybe Text
$sel:middleName:UpdateProfile' :: UpdateProfile -> Maybe Text
$sel:mailingAddress:UpdateProfile' :: UpdateProfile -> Maybe UpdateAddress
$sel:mobilePhoneNumber:UpdateProfile' :: UpdateProfile -> Maybe Text
$sel:shippingAddress:UpdateProfile' :: UpdateProfile -> Maybe UpdateAddress
..} =
[ByteString] -> ByteString
forall a. Monoid a => [a] -> a
Prelude.mconcat
[ByteString
"/domains/", Text -> ByteString
forall a. ToByteString a => a -> ByteString
Core.toBS Text
domainName, ByteString
"/profiles"]
instance Core.ToQuery UpdateProfile where
toQuery :: UpdateProfile -> QueryString
toQuery = QueryString -> UpdateProfile -> QueryString
forall a b. a -> b -> a
Prelude.const QueryString
forall a. Monoid a => a
Prelude.mempty
data UpdateProfileResponse = UpdateProfileResponse'
{
UpdateProfileResponse -> Int
httpStatus :: Prelude.Int,
UpdateProfileResponse -> Text
profileId :: Prelude.Text
}
deriving (UpdateProfileResponse -> UpdateProfileResponse -> Bool
(UpdateProfileResponse -> UpdateProfileResponse -> Bool)
-> (UpdateProfileResponse -> UpdateProfileResponse -> Bool)
-> Eq UpdateProfileResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: UpdateProfileResponse -> UpdateProfileResponse -> Bool
$c/= :: UpdateProfileResponse -> UpdateProfileResponse -> Bool
== :: UpdateProfileResponse -> UpdateProfileResponse -> Bool
$c== :: UpdateProfileResponse -> UpdateProfileResponse -> Bool
Prelude.Eq, ReadPrec [UpdateProfileResponse]
ReadPrec UpdateProfileResponse
Int -> ReadS UpdateProfileResponse
ReadS [UpdateProfileResponse]
(Int -> ReadS UpdateProfileResponse)
-> ReadS [UpdateProfileResponse]
-> ReadPrec UpdateProfileResponse
-> ReadPrec [UpdateProfileResponse]
-> Read UpdateProfileResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [UpdateProfileResponse]
$creadListPrec :: ReadPrec [UpdateProfileResponse]
readPrec :: ReadPrec UpdateProfileResponse
$creadPrec :: ReadPrec UpdateProfileResponse
readList :: ReadS [UpdateProfileResponse]
$creadList :: ReadS [UpdateProfileResponse]
readsPrec :: Int -> ReadS UpdateProfileResponse
$creadsPrec :: Int -> ReadS UpdateProfileResponse
Prelude.Read, Int -> UpdateProfileResponse -> ShowS
[UpdateProfileResponse] -> ShowS
UpdateProfileResponse -> String
(Int -> UpdateProfileResponse -> ShowS)
-> (UpdateProfileResponse -> String)
-> ([UpdateProfileResponse] -> ShowS)
-> Show UpdateProfileResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [UpdateProfileResponse] -> ShowS
$cshowList :: [UpdateProfileResponse] -> ShowS
show :: UpdateProfileResponse -> String
$cshow :: UpdateProfileResponse -> String
showsPrec :: Int -> UpdateProfileResponse -> ShowS
$cshowsPrec :: Int -> UpdateProfileResponse -> ShowS
Prelude.Show, (forall x. UpdateProfileResponse -> Rep UpdateProfileResponse x)
-> (forall x. Rep UpdateProfileResponse x -> UpdateProfileResponse)
-> Generic UpdateProfileResponse
forall x. Rep UpdateProfileResponse x -> UpdateProfileResponse
forall x. UpdateProfileResponse -> Rep UpdateProfileResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep UpdateProfileResponse x -> UpdateProfileResponse
$cfrom :: forall x. UpdateProfileResponse -> Rep UpdateProfileResponse x
Prelude.Generic)
newUpdateProfileResponse ::
Prelude.Int ->
Prelude.Text ->
UpdateProfileResponse
newUpdateProfileResponse :: Int -> Text -> UpdateProfileResponse
newUpdateProfileResponse Int
pHttpStatus_ Text
pProfileId_ =
UpdateProfileResponse' :: Int -> Text -> UpdateProfileResponse
UpdateProfileResponse'
{ $sel:httpStatus:UpdateProfileResponse' :: Int
httpStatus = Int
pHttpStatus_,
$sel:profileId:UpdateProfileResponse' :: Text
profileId = Text
pProfileId_
}
updateProfileResponse_httpStatus :: Lens.Lens' UpdateProfileResponse Prelude.Int
updateProfileResponse_httpStatus :: (Int -> f Int) -> UpdateProfileResponse -> f UpdateProfileResponse
updateProfileResponse_httpStatus = (UpdateProfileResponse -> Int)
-> (UpdateProfileResponse -> Int -> UpdateProfileResponse)
-> Lens UpdateProfileResponse UpdateProfileResponse Int Int
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateProfileResponse' {Int
httpStatus :: Int
$sel:httpStatus:UpdateProfileResponse' :: UpdateProfileResponse -> Int
httpStatus} -> Int
httpStatus) (\s :: UpdateProfileResponse
s@UpdateProfileResponse' {} Int
a -> UpdateProfileResponse
s {$sel:httpStatus:UpdateProfileResponse' :: Int
httpStatus = Int
a} :: UpdateProfileResponse)
updateProfileResponse_profileId :: Lens.Lens' UpdateProfileResponse Prelude.Text
updateProfileResponse_profileId :: (Text -> f Text)
-> UpdateProfileResponse -> f UpdateProfileResponse
updateProfileResponse_profileId = (UpdateProfileResponse -> Text)
-> (UpdateProfileResponse -> Text -> UpdateProfileResponse)
-> Lens UpdateProfileResponse UpdateProfileResponse Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateProfileResponse' {Text
profileId :: Text
$sel:profileId:UpdateProfileResponse' :: UpdateProfileResponse -> Text
profileId} -> Text
profileId) (\s :: UpdateProfileResponse
s@UpdateProfileResponse' {} Text
a -> UpdateProfileResponse
s {$sel:profileId:UpdateProfileResponse' :: Text
profileId = Text
a} :: UpdateProfileResponse)
instance Prelude.NFData UpdateProfileResponse