{-# 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 #-}

-- Derived from AWS service descriptions, licensed under Apache 2.0.

-- |
-- Module      : Amazonka.CustomerProfiles.CreateProfile
-- Copyright   : (c) 2013-2021 Brendan Hay
-- License     : Mozilla Public License, v. 2.0.
-- Maintainer  : Brendan Hay <brendan.g.hay+amazonka@gmail.com>
-- Stability   : auto-generated
-- Portability : non-portable (GHC extensions)
--
-- Creates a standard profile.
--
-- A standard profile represents the following attributes for a customer
-- profile in a domain.
module Amazonka.CustomerProfiles.CreateProfile
  ( -- * Creating a Request
    CreateProfile (..),
    newCreateProfile,

    -- * Request Lenses
    createProfile_shippingAddress,
    createProfile_mobilePhoneNumber,
    createProfile_mailingAddress,
    createProfile_middleName,
    createProfile_personalEmailAddress,
    createProfile_lastName,
    createProfile_additionalInformation,
    createProfile_homePhoneNumber,
    createProfile_address,
    createProfile_partyType,
    createProfile_businessEmailAddress,
    createProfile_attributes,
    createProfile_gender,
    createProfile_phoneNumber,
    createProfile_accountNumber,
    createProfile_emailAddress,
    createProfile_firstName,
    createProfile_billingAddress,
    createProfile_businessPhoneNumber,
    createProfile_birthDate,
    createProfile_businessName,
    createProfile_domainName,

    -- * Destructuring the Response
    CreateProfileResponse (..),
    newCreateProfileResponse,

    -- * Response Lenses
    createProfileResponse_httpStatus,
    createProfileResponse_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

-- | /See:/ 'newCreateProfile' smart constructor.
data CreateProfile = CreateProfile'
  { -- | The customer’s shipping address.
    CreateProfile -> Maybe Address
shippingAddress :: Prelude.Maybe Address,
    -- | The customer’s mobile phone number.
    CreateProfile -> Maybe Text
mobilePhoneNumber :: Prelude.Maybe Prelude.Text,
    -- | The customer’s mailing address.
    CreateProfile -> Maybe Address
mailingAddress :: Prelude.Maybe Address,
    -- | The customer’s middle name.
    CreateProfile -> Maybe Text
middleName :: Prelude.Maybe Prelude.Text,
    -- | The customer’s personal email address.
    CreateProfile -> Maybe Text
personalEmailAddress :: Prelude.Maybe Prelude.Text,
    -- | The customer’s last name.
    CreateProfile -> Maybe Text
lastName :: Prelude.Maybe Prelude.Text,
    -- | Any additional information relevant to the customer’s profile.
    CreateProfile -> Maybe Text
additionalInformation :: Prelude.Maybe Prelude.Text,
    -- | The customer’s home phone number.
    CreateProfile -> Maybe Text
homePhoneNumber :: Prelude.Maybe Prelude.Text,
    -- | A generic address associated with the customer that is not mailing,
    -- shipping, or billing.
    CreateProfile -> Maybe Address
address :: Prelude.Maybe Address,
    -- | The type of profile used to describe the customer.
    CreateProfile -> Maybe PartyType
partyType :: Prelude.Maybe PartyType,
    -- | The customer’s business email address.
    CreateProfile -> Maybe Text
businessEmailAddress :: Prelude.Maybe Prelude.Text,
    -- | A key value pair of attributes of a customer profile.
    CreateProfile -> Maybe (HashMap Text Text)
attributes :: Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text),
    -- | The gender with which the customer identifies.
    CreateProfile -> Maybe Gender
gender :: Prelude.Maybe Gender,
    -- | The customer’s phone number, which has not been specified as a mobile,
    -- home, or business number.
    CreateProfile -> Maybe Text
phoneNumber :: Prelude.Maybe Prelude.Text,
    -- | A unique account number that you have given to the customer.
    CreateProfile -> Maybe Text
accountNumber :: Prelude.Maybe Prelude.Text,
    -- | The customer’s email address, which has not been specified as a personal
    -- or business address.
    CreateProfile -> Maybe Text
emailAddress :: Prelude.Maybe Prelude.Text,
    -- | The customer’s first name.
    CreateProfile -> Maybe Text
firstName :: Prelude.Maybe Prelude.Text,
    -- | The customer’s billing address.
    CreateProfile -> Maybe Address
billingAddress :: Prelude.Maybe Address,
    -- | The customer’s business phone number.
    CreateProfile -> Maybe Text
businessPhoneNumber :: Prelude.Maybe Prelude.Text,
    -- | The customer’s birth date.
    CreateProfile -> Maybe Text
birthDate :: Prelude.Maybe Prelude.Text,
    -- | The name of the customer’s business.
    CreateProfile -> Maybe Text
businessName :: Prelude.Maybe Prelude.Text,
    -- | The unique name of the domain.
    CreateProfile -> Text
domainName :: Prelude.Text
  }
  deriving (CreateProfile -> CreateProfile -> Bool
(CreateProfile -> CreateProfile -> Bool)
-> (CreateProfile -> CreateProfile -> Bool) -> Eq CreateProfile
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: CreateProfile -> CreateProfile -> Bool
$c/= :: CreateProfile -> CreateProfile -> Bool
== :: CreateProfile -> CreateProfile -> Bool
$c== :: CreateProfile -> CreateProfile -> Bool
Prelude.Eq, ReadPrec [CreateProfile]
ReadPrec CreateProfile
Int -> ReadS CreateProfile
ReadS [CreateProfile]
(Int -> ReadS CreateProfile)
-> ReadS [CreateProfile]
-> ReadPrec CreateProfile
-> ReadPrec [CreateProfile]
-> Read CreateProfile
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [CreateProfile]
$creadListPrec :: ReadPrec [CreateProfile]
readPrec :: ReadPrec CreateProfile
$creadPrec :: ReadPrec CreateProfile
readList :: ReadS [CreateProfile]
$creadList :: ReadS [CreateProfile]
readsPrec :: Int -> ReadS CreateProfile
$creadsPrec :: Int -> ReadS CreateProfile
Prelude.Read, Int -> CreateProfile -> ShowS
[CreateProfile] -> ShowS
CreateProfile -> String
(Int -> CreateProfile -> ShowS)
-> (CreateProfile -> String)
-> ([CreateProfile] -> ShowS)
-> Show CreateProfile
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [CreateProfile] -> ShowS
$cshowList :: [CreateProfile] -> ShowS
show :: CreateProfile -> String
$cshow :: CreateProfile -> String
showsPrec :: Int -> CreateProfile -> ShowS
$cshowsPrec :: Int -> CreateProfile -> ShowS
Prelude.Show, (forall x. CreateProfile -> Rep CreateProfile x)
-> (forall x. Rep CreateProfile x -> CreateProfile)
-> Generic CreateProfile
forall x. Rep CreateProfile x -> CreateProfile
forall x. CreateProfile -> Rep CreateProfile x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep CreateProfile x -> CreateProfile
$cfrom :: forall x. CreateProfile -> Rep CreateProfile x
Prelude.Generic)

-- |
-- Create a value of 'CreateProfile' with all optional fields omitted.
--
-- Use <https://hackage.haskell.org/package/generic-lens generic-lens> or <https://hackage.haskell.org/package/optics optics> to modify other optional fields.
--
-- The following record fields are available, with the corresponding lenses provided
-- for backwards compatibility:
--
-- 'shippingAddress', 'createProfile_shippingAddress' - The customer’s shipping address.
--
-- 'mobilePhoneNumber', 'createProfile_mobilePhoneNumber' - The customer’s mobile phone number.
--
-- 'mailingAddress', 'createProfile_mailingAddress' - The customer’s mailing address.
--
-- 'middleName', 'createProfile_middleName' - The customer’s middle name.
--
-- 'personalEmailAddress', 'createProfile_personalEmailAddress' - The customer’s personal email address.
--
-- 'lastName', 'createProfile_lastName' - The customer’s last name.
--
-- 'additionalInformation', 'createProfile_additionalInformation' - Any additional information relevant to the customer’s profile.
--
-- 'homePhoneNumber', 'createProfile_homePhoneNumber' - The customer’s home phone number.
--
-- 'address', 'createProfile_address' - A generic address associated with the customer that is not mailing,
-- shipping, or billing.
--
-- 'partyType', 'createProfile_partyType' - The type of profile used to describe the customer.
--
-- 'businessEmailAddress', 'createProfile_businessEmailAddress' - The customer’s business email address.
--
-- 'attributes', 'createProfile_attributes' - A key value pair of attributes of a customer profile.
--
-- 'gender', 'createProfile_gender' - The gender with which the customer identifies.
--
-- 'phoneNumber', 'createProfile_phoneNumber' - The customer’s phone number, which has not been specified as a mobile,
-- home, or business number.
--
-- 'accountNumber', 'createProfile_accountNumber' - A unique account number that you have given to the customer.
--
-- 'emailAddress', 'createProfile_emailAddress' - The customer’s email address, which has not been specified as a personal
-- or business address.
--
-- 'firstName', 'createProfile_firstName' - The customer’s first name.
--
-- 'billingAddress', 'createProfile_billingAddress' - The customer’s billing address.
--
-- 'businessPhoneNumber', 'createProfile_businessPhoneNumber' - The customer’s business phone number.
--
-- 'birthDate', 'createProfile_birthDate' - The customer’s birth date.
--
-- 'businessName', 'createProfile_businessName' - The name of the customer’s business.
--
-- 'domainName', 'createProfile_domainName' - The unique name of the domain.
newCreateProfile ::
  -- | 'domainName'
  Prelude.Text ->
  CreateProfile
newCreateProfile :: Text -> CreateProfile
newCreateProfile Text
pDomainName_ =
  CreateProfile' :: Maybe Address
-> Maybe Text
-> Maybe Address
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Address
-> Maybe PartyType
-> Maybe Text
-> Maybe (HashMap Text Text)
-> Maybe Gender
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Address
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Text
-> CreateProfile
CreateProfile'
    { $sel:shippingAddress:CreateProfile' :: Maybe Address
shippingAddress = Maybe Address
forall a. Maybe a
Prelude.Nothing,
      $sel:mobilePhoneNumber:CreateProfile' :: Maybe Text
mobilePhoneNumber = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:mailingAddress:CreateProfile' :: Maybe Address
mailingAddress = Maybe Address
forall a. Maybe a
Prelude.Nothing,
      $sel:middleName:CreateProfile' :: Maybe Text
middleName = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:personalEmailAddress:CreateProfile' :: Maybe Text
personalEmailAddress = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:lastName:CreateProfile' :: Maybe Text
lastName = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:additionalInformation:CreateProfile' :: Maybe Text
additionalInformation = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:homePhoneNumber:CreateProfile' :: Maybe Text
homePhoneNumber = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:address:CreateProfile' :: Maybe Address
address = Maybe Address
forall a. Maybe a
Prelude.Nothing,
      $sel:partyType:CreateProfile' :: Maybe PartyType
partyType = Maybe PartyType
forall a. Maybe a
Prelude.Nothing,
      $sel:businessEmailAddress:CreateProfile' :: Maybe Text
businessEmailAddress = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:attributes:CreateProfile' :: Maybe (HashMap Text Text)
attributes = Maybe (HashMap Text Text)
forall a. Maybe a
Prelude.Nothing,
      $sel:gender:CreateProfile' :: Maybe Gender
gender = Maybe Gender
forall a. Maybe a
Prelude.Nothing,
      $sel:phoneNumber:CreateProfile' :: Maybe Text
phoneNumber = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:accountNumber:CreateProfile' :: Maybe Text
accountNumber = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:emailAddress:CreateProfile' :: Maybe Text
emailAddress = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:firstName:CreateProfile' :: Maybe Text
firstName = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:billingAddress:CreateProfile' :: Maybe Address
billingAddress = Maybe Address
forall a. Maybe a
Prelude.Nothing,
      $sel:businessPhoneNumber:CreateProfile' :: Maybe Text
businessPhoneNumber = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:birthDate:CreateProfile' :: Maybe Text
birthDate = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:businessName:CreateProfile' :: Maybe Text
businessName = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:domainName:CreateProfile' :: Text
domainName = Text
pDomainName_
    }

-- | The customer’s shipping address.
createProfile_shippingAddress :: Lens.Lens' CreateProfile (Prelude.Maybe Address)
createProfile_shippingAddress :: (Maybe Address -> f (Maybe Address))
-> CreateProfile -> f CreateProfile
createProfile_shippingAddress = (CreateProfile -> Maybe Address)
-> (CreateProfile -> Maybe Address -> CreateProfile)
-> Lens CreateProfile CreateProfile (Maybe Address) (Maybe Address)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateProfile' {Maybe Address
shippingAddress :: Maybe Address
$sel:shippingAddress:CreateProfile' :: CreateProfile -> Maybe Address
shippingAddress} -> Maybe Address
shippingAddress) (\s :: CreateProfile
s@CreateProfile' {} Maybe Address
a -> CreateProfile
s {$sel:shippingAddress:CreateProfile' :: Maybe Address
shippingAddress = Maybe Address
a} :: CreateProfile)

-- | The customer’s mobile phone number.
createProfile_mobilePhoneNumber :: Lens.Lens' CreateProfile (Prelude.Maybe Prelude.Text)
createProfile_mobilePhoneNumber :: (Maybe Text -> f (Maybe Text)) -> CreateProfile -> f CreateProfile
createProfile_mobilePhoneNumber = (CreateProfile -> Maybe Text)
-> (CreateProfile -> Maybe Text -> CreateProfile)
-> Lens CreateProfile CreateProfile (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateProfile' {Maybe Text
mobilePhoneNumber :: Maybe Text
$sel:mobilePhoneNumber:CreateProfile' :: CreateProfile -> Maybe Text
mobilePhoneNumber} -> Maybe Text
mobilePhoneNumber) (\s :: CreateProfile
s@CreateProfile' {} Maybe Text
a -> CreateProfile
s {$sel:mobilePhoneNumber:CreateProfile' :: Maybe Text
mobilePhoneNumber = Maybe Text
a} :: CreateProfile)

-- | The customer’s mailing address.
createProfile_mailingAddress :: Lens.Lens' CreateProfile (Prelude.Maybe Address)
createProfile_mailingAddress :: (Maybe Address -> f (Maybe Address))
-> CreateProfile -> f CreateProfile
createProfile_mailingAddress = (CreateProfile -> Maybe Address)
-> (CreateProfile -> Maybe Address -> CreateProfile)
-> Lens CreateProfile CreateProfile (Maybe Address) (Maybe Address)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateProfile' {Maybe Address
mailingAddress :: Maybe Address
$sel:mailingAddress:CreateProfile' :: CreateProfile -> Maybe Address
mailingAddress} -> Maybe Address
mailingAddress) (\s :: CreateProfile
s@CreateProfile' {} Maybe Address
a -> CreateProfile
s {$sel:mailingAddress:CreateProfile' :: Maybe Address
mailingAddress = Maybe Address
a} :: CreateProfile)

-- | The customer’s middle name.
createProfile_middleName :: Lens.Lens' CreateProfile (Prelude.Maybe Prelude.Text)
createProfile_middleName :: (Maybe Text -> f (Maybe Text)) -> CreateProfile -> f CreateProfile
createProfile_middleName = (CreateProfile -> Maybe Text)
-> (CreateProfile -> Maybe Text -> CreateProfile)
-> Lens CreateProfile CreateProfile (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateProfile' {Maybe Text
middleName :: Maybe Text
$sel:middleName:CreateProfile' :: CreateProfile -> Maybe Text
middleName} -> Maybe Text
middleName) (\s :: CreateProfile
s@CreateProfile' {} Maybe Text
a -> CreateProfile
s {$sel:middleName:CreateProfile' :: Maybe Text
middleName = Maybe Text
a} :: CreateProfile)

-- | The customer’s personal email address.
createProfile_personalEmailAddress :: Lens.Lens' CreateProfile (Prelude.Maybe Prelude.Text)
createProfile_personalEmailAddress :: (Maybe Text -> f (Maybe Text)) -> CreateProfile -> f CreateProfile
createProfile_personalEmailAddress = (CreateProfile -> Maybe Text)
-> (CreateProfile -> Maybe Text -> CreateProfile)
-> Lens CreateProfile CreateProfile (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateProfile' {Maybe Text
personalEmailAddress :: Maybe Text
$sel:personalEmailAddress:CreateProfile' :: CreateProfile -> Maybe Text
personalEmailAddress} -> Maybe Text
personalEmailAddress) (\s :: CreateProfile
s@CreateProfile' {} Maybe Text
a -> CreateProfile
s {$sel:personalEmailAddress:CreateProfile' :: Maybe Text
personalEmailAddress = Maybe Text
a} :: CreateProfile)

-- | The customer’s last name.
createProfile_lastName :: Lens.Lens' CreateProfile (Prelude.Maybe Prelude.Text)
createProfile_lastName :: (Maybe Text -> f (Maybe Text)) -> CreateProfile -> f CreateProfile
createProfile_lastName = (CreateProfile -> Maybe Text)
-> (CreateProfile -> Maybe Text -> CreateProfile)
-> Lens CreateProfile CreateProfile (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateProfile' {Maybe Text
lastName :: Maybe Text
$sel:lastName:CreateProfile' :: CreateProfile -> Maybe Text
lastName} -> Maybe Text
lastName) (\s :: CreateProfile
s@CreateProfile' {} Maybe Text
a -> CreateProfile
s {$sel:lastName:CreateProfile' :: Maybe Text
lastName = Maybe Text
a} :: CreateProfile)

-- | Any additional information relevant to the customer’s profile.
createProfile_additionalInformation :: Lens.Lens' CreateProfile (Prelude.Maybe Prelude.Text)
createProfile_additionalInformation :: (Maybe Text -> f (Maybe Text)) -> CreateProfile -> f CreateProfile
createProfile_additionalInformation = (CreateProfile -> Maybe Text)
-> (CreateProfile -> Maybe Text -> CreateProfile)
-> Lens CreateProfile CreateProfile (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateProfile' {Maybe Text
additionalInformation :: Maybe Text
$sel:additionalInformation:CreateProfile' :: CreateProfile -> Maybe Text
additionalInformation} -> Maybe Text
additionalInformation) (\s :: CreateProfile
s@CreateProfile' {} Maybe Text
a -> CreateProfile
s {$sel:additionalInformation:CreateProfile' :: Maybe Text
additionalInformation = Maybe Text
a} :: CreateProfile)

-- | The customer’s home phone number.
createProfile_homePhoneNumber :: Lens.Lens' CreateProfile (Prelude.Maybe Prelude.Text)
createProfile_homePhoneNumber :: (Maybe Text -> f (Maybe Text)) -> CreateProfile -> f CreateProfile
createProfile_homePhoneNumber = (CreateProfile -> Maybe Text)
-> (CreateProfile -> Maybe Text -> CreateProfile)
-> Lens CreateProfile CreateProfile (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateProfile' {Maybe Text
homePhoneNumber :: Maybe Text
$sel:homePhoneNumber:CreateProfile' :: CreateProfile -> Maybe Text
homePhoneNumber} -> Maybe Text
homePhoneNumber) (\s :: CreateProfile
s@CreateProfile' {} Maybe Text
a -> CreateProfile
s {$sel:homePhoneNumber:CreateProfile' :: Maybe Text
homePhoneNumber = Maybe Text
a} :: CreateProfile)

-- | A generic address associated with the customer that is not mailing,
-- shipping, or billing.
createProfile_address :: Lens.Lens' CreateProfile (Prelude.Maybe Address)
createProfile_address :: (Maybe Address -> f (Maybe Address))
-> CreateProfile -> f CreateProfile
createProfile_address = (CreateProfile -> Maybe Address)
-> (CreateProfile -> Maybe Address -> CreateProfile)
-> Lens CreateProfile CreateProfile (Maybe Address) (Maybe Address)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateProfile' {Maybe Address
address :: Maybe Address
$sel:address:CreateProfile' :: CreateProfile -> Maybe Address
address} -> Maybe Address
address) (\s :: CreateProfile
s@CreateProfile' {} Maybe Address
a -> CreateProfile
s {$sel:address:CreateProfile' :: Maybe Address
address = Maybe Address
a} :: CreateProfile)

-- | The type of profile used to describe the customer.
createProfile_partyType :: Lens.Lens' CreateProfile (Prelude.Maybe PartyType)
createProfile_partyType :: (Maybe PartyType -> f (Maybe PartyType))
-> CreateProfile -> f CreateProfile
createProfile_partyType = (CreateProfile -> Maybe PartyType)
-> (CreateProfile -> Maybe PartyType -> CreateProfile)
-> Lens
     CreateProfile CreateProfile (Maybe PartyType) (Maybe PartyType)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateProfile' {Maybe PartyType
partyType :: Maybe PartyType
$sel:partyType:CreateProfile' :: CreateProfile -> Maybe PartyType
partyType} -> Maybe PartyType
partyType) (\s :: CreateProfile
s@CreateProfile' {} Maybe PartyType
a -> CreateProfile
s {$sel:partyType:CreateProfile' :: Maybe PartyType
partyType = Maybe PartyType
a} :: CreateProfile)

-- | The customer’s business email address.
createProfile_businessEmailAddress :: Lens.Lens' CreateProfile (Prelude.Maybe Prelude.Text)
createProfile_businessEmailAddress :: (Maybe Text -> f (Maybe Text)) -> CreateProfile -> f CreateProfile
createProfile_businessEmailAddress = (CreateProfile -> Maybe Text)
-> (CreateProfile -> Maybe Text -> CreateProfile)
-> Lens CreateProfile CreateProfile (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateProfile' {Maybe Text
businessEmailAddress :: Maybe Text
$sel:businessEmailAddress:CreateProfile' :: CreateProfile -> Maybe Text
businessEmailAddress} -> Maybe Text
businessEmailAddress) (\s :: CreateProfile
s@CreateProfile' {} Maybe Text
a -> CreateProfile
s {$sel:businessEmailAddress:CreateProfile' :: Maybe Text
businessEmailAddress = Maybe Text
a} :: CreateProfile)

-- | A key value pair of attributes of a customer profile.
createProfile_attributes :: Lens.Lens' CreateProfile (Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text))
createProfile_attributes :: (Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
-> CreateProfile -> f CreateProfile
createProfile_attributes = (CreateProfile -> Maybe (HashMap Text Text))
-> (CreateProfile -> Maybe (HashMap Text Text) -> CreateProfile)
-> Lens
     CreateProfile
     CreateProfile
     (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 (\CreateProfile' {Maybe (HashMap Text Text)
attributes :: Maybe (HashMap Text Text)
$sel:attributes:CreateProfile' :: CreateProfile -> Maybe (HashMap Text Text)
attributes} -> Maybe (HashMap Text Text)
attributes) (\s :: CreateProfile
s@CreateProfile' {} Maybe (HashMap Text Text)
a -> CreateProfile
s {$sel:attributes:CreateProfile' :: Maybe (HashMap Text Text)
attributes = Maybe (HashMap Text Text)
a} :: CreateProfile) ((Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
 -> CreateProfile -> f CreateProfile)
-> ((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)))
-> CreateProfile
-> f CreateProfile
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

-- | The gender with which the customer identifies.
createProfile_gender :: Lens.Lens' CreateProfile (Prelude.Maybe Gender)
createProfile_gender :: (Maybe Gender -> f (Maybe Gender))
-> CreateProfile -> f CreateProfile
createProfile_gender = (CreateProfile -> Maybe Gender)
-> (CreateProfile -> Maybe Gender -> CreateProfile)
-> Lens CreateProfile CreateProfile (Maybe Gender) (Maybe Gender)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateProfile' {Maybe Gender
gender :: Maybe Gender
$sel:gender:CreateProfile' :: CreateProfile -> Maybe Gender
gender} -> Maybe Gender
gender) (\s :: CreateProfile
s@CreateProfile' {} Maybe Gender
a -> CreateProfile
s {$sel:gender:CreateProfile' :: Maybe Gender
gender = Maybe Gender
a} :: CreateProfile)

-- | The customer’s phone number, which has not been specified as a mobile,
-- home, or business number.
createProfile_phoneNumber :: Lens.Lens' CreateProfile (Prelude.Maybe Prelude.Text)
createProfile_phoneNumber :: (Maybe Text -> f (Maybe Text)) -> CreateProfile -> f CreateProfile
createProfile_phoneNumber = (CreateProfile -> Maybe Text)
-> (CreateProfile -> Maybe Text -> CreateProfile)
-> Lens CreateProfile CreateProfile (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateProfile' {Maybe Text
phoneNumber :: Maybe Text
$sel:phoneNumber:CreateProfile' :: CreateProfile -> Maybe Text
phoneNumber} -> Maybe Text
phoneNumber) (\s :: CreateProfile
s@CreateProfile' {} Maybe Text
a -> CreateProfile
s {$sel:phoneNumber:CreateProfile' :: Maybe Text
phoneNumber = Maybe Text
a} :: CreateProfile)

-- | A unique account number that you have given to the customer.
createProfile_accountNumber :: Lens.Lens' CreateProfile (Prelude.Maybe Prelude.Text)
createProfile_accountNumber :: (Maybe Text -> f (Maybe Text)) -> CreateProfile -> f CreateProfile
createProfile_accountNumber = (CreateProfile -> Maybe Text)
-> (CreateProfile -> Maybe Text -> CreateProfile)
-> Lens CreateProfile CreateProfile (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateProfile' {Maybe Text
accountNumber :: Maybe Text
$sel:accountNumber:CreateProfile' :: CreateProfile -> Maybe Text
accountNumber} -> Maybe Text
accountNumber) (\s :: CreateProfile
s@CreateProfile' {} Maybe Text
a -> CreateProfile
s {$sel:accountNumber:CreateProfile' :: Maybe Text
accountNumber = Maybe Text
a} :: CreateProfile)

-- | The customer’s email address, which has not been specified as a personal
-- or business address.
createProfile_emailAddress :: Lens.Lens' CreateProfile (Prelude.Maybe Prelude.Text)
createProfile_emailAddress :: (Maybe Text -> f (Maybe Text)) -> CreateProfile -> f CreateProfile
createProfile_emailAddress = (CreateProfile -> Maybe Text)
-> (CreateProfile -> Maybe Text -> CreateProfile)
-> Lens CreateProfile CreateProfile (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateProfile' {Maybe Text
emailAddress :: Maybe Text
$sel:emailAddress:CreateProfile' :: CreateProfile -> Maybe Text
emailAddress} -> Maybe Text
emailAddress) (\s :: CreateProfile
s@CreateProfile' {} Maybe Text
a -> CreateProfile
s {$sel:emailAddress:CreateProfile' :: Maybe Text
emailAddress = Maybe Text
a} :: CreateProfile)

-- | The customer’s first name.
createProfile_firstName :: Lens.Lens' CreateProfile (Prelude.Maybe Prelude.Text)
createProfile_firstName :: (Maybe Text -> f (Maybe Text)) -> CreateProfile -> f CreateProfile
createProfile_firstName = (CreateProfile -> Maybe Text)
-> (CreateProfile -> Maybe Text -> CreateProfile)
-> Lens CreateProfile CreateProfile (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateProfile' {Maybe Text
firstName :: Maybe Text
$sel:firstName:CreateProfile' :: CreateProfile -> Maybe Text
firstName} -> Maybe Text
firstName) (\s :: CreateProfile
s@CreateProfile' {} Maybe Text
a -> CreateProfile
s {$sel:firstName:CreateProfile' :: Maybe Text
firstName = Maybe Text
a} :: CreateProfile)

-- | The customer’s billing address.
createProfile_billingAddress :: Lens.Lens' CreateProfile (Prelude.Maybe Address)
createProfile_billingAddress :: (Maybe Address -> f (Maybe Address))
-> CreateProfile -> f CreateProfile
createProfile_billingAddress = (CreateProfile -> Maybe Address)
-> (CreateProfile -> Maybe Address -> CreateProfile)
-> Lens CreateProfile CreateProfile (Maybe Address) (Maybe Address)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateProfile' {Maybe Address
billingAddress :: Maybe Address
$sel:billingAddress:CreateProfile' :: CreateProfile -> Maybe Address
billingAddress} -> Maybe Address
billingAddress) (\s :: CreateProfile
s@CreateProfile' {} Maybe Address
a -> CreateProfile
s {$sel:billingAddress:CreateProfile' :: Maybe Address
billingAddress = Maybe Address
a} :: CreateProfile)

-- | The customer’s business phone number.
createProfile_businessPhoneNumber :: Lens.Lens' CreateProfile (Prelude.Maybe Prelude.Text)
createProfile_businessPhoneNumber :: (Maybe Text -> f (Maybe Text)) -> CreateProfile -> f CreateProfile
createProfile_businessPhoneNumber = (CreateProfile -> Maybe Text)
-> (CreateProfile -> Maybe Text -> CreateProfile)
-> Lens CreateProfile CreateProfile (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateProfile' {Maybe Text
businessPhoneNumber :: Maybe Text
$sel:businessPhoneNumber:CreateProfile' :: CreateProfile -> Maybe Text
businessPhoneNumber} -> Maybe Text
businessPhoneNumber) (\s :: CreateProfile
s@CreateProfile' {} Maybe Text
a -> CreateProfile
s {$sel:businessPhoneNumber:CreateProfile' :: Maybe Text
businessPhoneNumber = Maybe Text
a} :: CreateProfile)

-- | The customer’s birth date.
createProfile_birthDate :: Lens.Lens' CreateProfile (Prelude.Maybe Prelude.Text)
createProfile_birthDate :: (Maybe Text -> f (Maybe Text)) -> CreateProfile -> f CreateProfile
createProfile_birthDate = (CreateProfile -> Maybe Text)
-> (CreateProfile -> Maybe Text -> CreateProfile)
-> Lens CreateProfile CreateProfile (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateProfile' {Maybe Text
birthDate :: Maybe Text
$sel:birthDate:CreateProfile' :: CreateProfile -> Maybe Text
birthDate} -> Maybe Text
birthDate) (\s :: CreateProfile
s@CreateProfile' {} Maybe Text
a -> CreateProfile
s {$sel:birthDate:CreateProfile' :: Maybe Text
birthDate = Maybe Text
a} :: CreateProfile)

-- | The name of the customer’s business.
createProfile_businessName :: Lens.Lens' CreateProfile (Prelude.Maybe Prelude.Text)
createProfile_businessName :: (Maybe Text -> f (Maybe Text)) -> CreateProfile -> f CreateProfile
createProfile_businessName = (CreateProfile -> Maybe Text)
-> (CreateProfile -> Maybe Text -> CreateProfile)
-> Lens CreateProfile CreateProfile (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateProfile' {Maybe Text
businessName :: Maybe Text
$sel:businessName:CreateProfile' :: CreateProfile -> Maybe Text
businessName} -> Maybe Text
businessName) (\s :: CreateProfile
s@CreateProfile' {} Maybe Text
a -> CreateProfile
s {$sel:businessName:CreateProfile' :: Maybe Text
businessName = Maybe Text
a} :: CreateProfile)

-- | The unique name of the domain.
createProfile_domainName :: Lens.Lens' CreateProfile Prelude.Text
createProfile_domainName :: (Text -> f Text) -> CreateProfile -> f CreateProfile
createProfile_domainName = (CreateProfile -> Text)
-> (CreateProfile -> Text -> CreateProfile)
-> Lens CreateProfile CreateProfile Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateProfile' {Text
domainName :: Text
$sel:domainName:CreateProfile' :: CreateProfile -> Text
domainName} -> Text
domainName) (\s :: CreateProfile
s@CreateProfile' {} Text
a -> CreateProfile
s {$sel:domainName:CreateProfile' :: Text
domainName = Text
a} :: CreateProfile)

instance Core.AWSRequest CreateProfile where
  type
    AWSResponse CreateProfile =
      CreateProfileResponse
  request :: CreateProfile -> Request CreateProfile
request = Service -> CreateProfile -> Request CreateProfile
forall a. (ToRequest a, ToJSON a) => Service -> a -> Request a
Request.postJSON Service
defaultService
  response :: Logger
-> Service
-> Proxy CreateProfile
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse CreateProfile)))
response =
    (Int
 -> ResponseHeaders
 -> Object
 -> Either String (AWSResponse CreateProfile))
-> Logger
-> Service
-> Proxy CreateProfile
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse CreateProfile)))
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 -> CreateProfileResponse
CreateProfileResponse'
            (Int -> Text -> CreateProfileResponse)
-> Either String Int
-> Either String (Text -> CreateProfileResponse)
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 -> CreateProfileResponse)
-> Either String Text -> Either String CreateProfileResponse
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 CreateProfile

instance Prelude.NFData CreateProfile

instance Core.ToHeaders CreateProfile where
  toHeaders :: CreateProfile -> ResponseHeaders
toHeaders =
    ResponseHeaders -> CreateProfile -> 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 CreateProfile where
  toJSON :: CreateProfile -> Value
toJSON CreateProfile' {Maybe Text
Maybe (HashMap Text Text)
Maybe Address
Maybe Gender
Maybe PartyType
Text
domainName :: Text
businessName :: Maybe Text
birthDate :: Maybe Text
businessPhoneNumber :: Maybe Text
billingAddress :: Maybe Address
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 Address
homePhoneNumber :: Maybe Text
additionalInformation :: Maybe Text
lastName :: Maybe Text
personalEmailAddress :: Maybe Text
middleName :: Maybe Text
mailingAddress :: Maybe Address
mobilePhoneNumber :: Maybe Text
shippingAddress :: Maybe Address
$sel:domainName:CreateProfile' :: CreateProfile -> Text
$sel:businessName:CreateProfile' :: CreateProfile -> Maybe Text
$sel:birthDate:CreateProfile' :: CreateProfile -> Maybe Text
$sel:businessPhoneNumber:CreateProfile' :: CreateProfile -> Maybe Text
$sel:billingAddress:CreateProfile' :: CreateProfile -> Maybe Address
$sel:firstName:CreateProfile' :: CreateProfile -> Maybe Text
$sel:emailAddress:CreateProfile' :: CreateProfile -> Maybe Text
$sel:accountNumber:CreateProfile' :: CreateProfile -> Maybe Text
$sel:phoneNumber:CreateProfile' :: CreateProfile -> Maybe Text
$sel:gender:CreateProfile' :: CreateProfile -> Maybe Gender
$sel:attributes:CreateProfile' :: CreateProfile -> Maybe (HashMap Text Text)
$sel:businessEmailAddress:CreateProfile' :: CreateProfile -> Maybe Text
$sel:partyType:CreateProfile' :: CreateProfile -> Maybe PartyType
$sel:address:CreateProfile' :: CreateProfile -> Maybe Address
$sel:homePhoneNumber:CreateProfile' :: CreateProfile -> Maybe Text
$sel:additionalInformation:CreateProfile' :: CreateProfile -> Maybe Text
$sel:lastName:CreateProfile' :: CreateProfile -> Maybe Text
$sel:personalEmailAddress:CreateProfile' :: CreateProfile -> Maybe Text
$sel:middleName:CreateProfile' :: CreateProfile -> Maybe Text
$sel:mailingAddress:CreateProfile' :: CreateProfile -> Maybe Address
$sel:mobilePhoneNumber:CreateProfile' :: CreateProfile -> Maybe Text
$sel:shippingAddress:CreateProfile' :: CreateProfile -> Maybe Address
..} =
    [Pair] -> Value
Core.object
      ( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
          [ (Text
"ShippingAddress" Text -> Address -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
              (Address -> Pair) -> Maybe Address -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Address
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 -> Address -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
              (Address -> Pair) -> Maybe Address -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Address
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 -> Address -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (Address -> Pair) -> Maybe Address -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Address
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 -> Address -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
              (Address -> Pair) -> Maybe Address -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Address
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
          ]
      )

instance Core.ToPath CreateProfile where
  toPath :: CreateProfile -> ByteString
toPath CreateProfile' {Maybe Text
Maybe (HashMap Text Text)
Maybe Address
Maybe Gender
Maybe PartyType
Text
domainName :: Text
businessName :: Maybe Text
birthDate :: Maybe Text
businessPhoneNumber :: Maybe Text
billingAddress :: Maybe Address
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 Address
homePhoneNumber :: Maybe Text
additionalInformation :: Maybe Text
lastName :: Maybe Text
personalEmailAddress :: Maybe Text
middleName :: Maybe Text
mailingAddress :: Maybe Address
mobilePhoneNumber :: Maybe Text
shippingAddress :: Maybe Address
$sel:domainName:CreateProfile' :: CreateProfile -> Text
$sel:businessName:CreateProfile' :: CreateProfile -> Maybe Text
$sel:birthDate:CreateProfile' :: CreateProfile -> Maybe Text
$sel:businessPhoneNumber:CreateProfile' :: CreateProfile -> Maybe Text
$sel:billingAddress:CreateProfile' :: CreateProfile -> Maybe Address
$sel:firstName:CreateProfile' :: CreateProfile -> Maybe Text
$sel:emailAddress:CreateProfile' :: CreateProfile -> Maybe Text
$sel:accountNumber:CreateProfile' :: CreateProfile -> Maybe Text
$sel:phoneNumber:CreateProfile' :: CreateProfile -> Maybe Text
$sel:gender:CreateProfile' :: CreateProfile -> Maybe Gender
$sel:attributes:CreateProfile' :: CreateProfile -> Maybe (HashMap Text Text)
$sel:businessEmailAddress:CreateProfile' :: CreateProfile -> Maybe Text
$sel:partyType:CreateProfile' :: CreateProfile -> Maybe PartyType
$sel:address:CreateProfile' :: CreateProfile -> Maybe Address
$sel:homePhoneNumber:CreateProfile' :: CreateProfile -> Maybe Text
$sel:additionalInformation:CreateProfile' :: CreateProfile -> Maybe Text
$sel:lastName:CreateProfile' :: CreateProfile -> Maybe Text
$sel:personalEmailAddress:CreateProfile' :: CreateProfile -> Maybe Text
$sel:middleName:CreateProfile' :: CreateProfile -> Maybe Text
$sel:mailingAddress:CreateProfile' :: CreateProfile -> Maybe Address
$sel:mobilePhoneNumber:CreateProfile' :: CreateProfile -> Maybe Text
$sel:shippingAddress:CreateProfile' :: CreateProfile -> Maybe Address
..} =
    [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 CreateProfile where
  toQuery :: CreateProfile -> QueryString
toQuery = QueryString -> CreateProfile -> QueryString
forall a b. a -> b -> a
Prelude.const QueryString
forall a. Monoid a => a
Prelude.mempty

-- | /See:/ 'newCreateProfileResponse' smart constructor.
data CreateProfileResponse = CreateProfileResponse'
  { -- | The response's http status code.
    CreateProfileResponse -> Int
httpStatus :: Prelude.Int,
    -- | The unique identifier of a customer profile.
    CreateProfileResponse -> Text
profileId :: Prelude.Text
  }
  deriving (CreateProfileResponse -> CreateProfileResponse -> Bool
(CreateProfileResponse -> CreateProfileResponse -> Bool)
-> (CreateProfileResponse -> CreateProfileResponse -> Bool)
-> Eq CreateProfileResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: CreateProfileResponse -> CreateProfileResponse -> Bool
$c/= :: CreateProfileResponse -> CreateProfileResponse -> Bool
== :: CreateProfileResponse -> CreateProfileResponse -> Bool
$c== :: CreateProfileResponse -> CreateProfileResponse -> Bool
Prelude.Eq, ReadPrec [CreateProfileResponse]
ReadPrec CreateProfileResponse
Int -> ReadS CreateProfileResponse
ReadS [CreateProfileResponse]
(Int -> ReadS CreateProfileResponse)
-> ReadS [CreateProfileResponse]
-> ReadPrec CreateProfileResponse
-> ReadPrec [CreateProfileResponse]
-> Read CreateProfileResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [CreateProfileResponse]
$creadListPrec :: ReadPrec [CreateProfileResponse]
readPrec :: ReadPrec CreateProfileResponse
$creadPrec :: ReadPrec CreateProfileResponse
readList :: ReadS [CreateProfileResponse]
$creadList :: ReadS [CreateProfileResponse]
readsPrec :: Int -> ReadS CreateProfileResponse
$creadsPrec :: Int -> ReadS CreateProfileResponse
Prelude.Read, Int -> CreateProfileResponse -> ShowS
[CreateProfileResponse] -> ShowS
CreateProfileResponse -> String
(Int -> CreateProfileResponse -> ShowS)
-> (CreateProfileResponse -> String)
-> ([CreateProfileResponse] -> ShowS)
-> Show CreateProfileResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [CreateProfileResponse] -> ShowS
$cshowList :: [CreateProfileResponse] -> ShowS
show :: CreateProfileResponse -> String
$cshow :: CreateProfileResponse -> String
showsPrec :: Int -> CreateProfileResponse -> ShowS
$cshowsPrec :: Int -> CreateProfileResponse -> ShowS
Prelude.Show, (forall x. CreateProfileResponse -> Rep CreateProfileResponse x)
-> (forall x. Rep CreateProfileResponse x -> CreateProfileResponse)
-> Generic CreateProfileResponse
forall x. Rep CreateProfileResponse x -> CreateProfileResponse
forall x. CreateProfileResponse -> Rep CreateProfileResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep CreateProfileResponse x -> CreateProfileResponse
$cfrom :: forall x. CreateProfileResponse -> Rep CreateProfileResponse x
Prelude.Generic)

-- |
-- Create a value of 'CreateProfileResponse' with all optional fields omitted.
--
-- Use <https://hackage.haskell.org/package/generic-lens generic-lens> or <https://hackage.haskell.org/package/optics optics> to modify other optional fields.
--
-- The following record fields are available, with the corresponding lenses provided
-- for backwards compatibility:
--
-- 'httpStatus', 'createProfileResponse_httpStatus' - The response's http status code.
--
-- 'profileId', 'createProfileResponse_profileId' - The unique identifier of a customer profile.
newCreateProfileResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  -- | 'profileId'
  Prelude.Text ->
  CreateProfileResponse
newCreateProfileResponse :: Int -> Text -> CreateProfileResponse
newCreateProfileResponse Int
pHttpStatus_ Text
pProfileId_ =
  CreateProfileResponse' :: Int -> Text -> CreateProfileResponse
CreateProfileResponse'
    { $sel:httpStatus:CreateProfileResponse' :: Int
httpStatus = Int
pHttpStatus_,
      $sel:profileId:CreateProfileResponse' :: Text
profileId = Text
pProfileId_
    }

-- | The response's http status code.
createProfileResponse_httpStatus :: Lens.Lens' CreateProfileResponse Prelude.Int
createProfileResponse_httpStatus :: (Int -> f Int) -> CreateProfileResponse -> f CreateProfileResponse
createProfileResponse_httpStatus = (CreateProfileResponse -> Int)
-> (CreateProfileResponse -> Int -> CreateProfileResponse)
-> Lens CreateProfileResponse CreateProfileResponse Int Int
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateProfileResponse' {Int
httpStatus :: Int
$sel:httpStatus:CreateProfileResponse' :: CreateProfileResponse -> Int
httpStatus} -> Int
httpStatus) (\s :: CreateProfileResponse
s@CreateProfileResponse' {} Int
a -> CreateProfileResponse
s {$sel:httpStatus:CreateProfileResponse' :: Int
httpStatus = Int
a} :: CreateProfileResponse)

-- | The unique identifier of a customer profile.
createProfileResponse_profileId :: Lens.Lens' CreateProfileResponse Prelude.Text
createProfileResponse_profileId :: (Text -> f Text)
-> CreateProfileResponse -> f CreateProfileResponse
createProfileResponse_profileId = (CreateProfileResponse -> Text)
-> (CreateProfileResponse -> Text -> CreateProfileResponse)
-> Lens CreateProfileResponse CreateProfileResponse Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateProfileResponse' {Text
profileId :: Text
$sel:profileId:CreateProfileResponse' :: CreateProfileResponse -> Text
profileId} -> Text
profileId) (\s :: CreateProfileResponse
s@CreateProfileResponse' {} Text
a -> CreateProfileResponse
s {$sel:profileId:CreateProfileResponse' :: Text
profileId = Text
a} :: CreateProfileResponse)

instance Prelude.NFData CreateProfileResponse