{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE DuplicateRecordFields #-}
{-# LANGUAGE NamedFieldPuns #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE StrictData #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# OPTIONS_GHC -fno-warn-unused-imports #-}
{-# OPTIONS_GHC -fno-warn-unused-matches #-}

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

-- |
-- Module      : Amazonka.CustomerProfiles.Types.Profile
-- 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)
module Amazonka.CustomerProfiles.Types.Profile where

import qualified Amazonka.Core as Core
import Amazonka.CustomerProfiles.Types.Address
import Amazonka.CustomerProfiles.Types.Gender
import Amazonka.CustomerProfiles.Types.PartyType
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude

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

-- |
-- Create a value of 'Profile' 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', 'profile_shippingAddress' - The customer’s shipping address.
--
-- 'mobilePhoneNumber', 'profile_mobilePhoneNumber' - The customer’s mobile phone number.
--
-- 'mailingAddress', 'profile_mailingAddress' - The customer’s mailing address.
--
-- 'middleName', 'profile_middleName' - The customer’s middle name.
--
-- 'personalEmailAddress', 'profile_personalEmailAddress' - The customer’s personal email address.
--
-- 'lastName', 'profile_lastName' - The customer’s last name.
--
-- 'additionalInformation', 'profile_additionalInformation' - Any additional information relevant to the customer’s profile.
--
-- 'homePhoneNumber', 'profile_homePhoneNumber' - The customer’s home phone number.
--
-- 'address', 'profile_address' - A generic address associated with the customer that is not mailing,
-- shipping, or billing.
--
-- 'partyType', 'profile_partyType' - The type of profile used to describe the customer.
--
-- 'profileId', 'profile_profileId' - The unique identifier of a customer profile.
--
-- 'businessEmailAddress', 'profile_businessEmailAddress' - The customer’s business email address.
--
-- 'attributes', 'profile_attributes' - A key value pair of attributes of a customer profile.
--
-- 'gender', 'profile_gender' - The gender with which the customer identifies.
--
-- 'phoneNumber', 'profile_phoneNumber' - The customer\'s phone number, which has not been specified as a mobile,
-- home, or business number.
--
-- 'accountNumber', 'profile_accountNumber' - A unique account number that you have given to the customer.
--
-- 'emailAddress', 'profile_emailAddress' - The customer’s email address, which has not been specified as a personal
-- or business address.
--
-- 'firstName', 'profile_firstName' - The customer’s first name.
--
-- 'billingAddress', 'profile_billingAddress' - The customer’s billing address.
--
-- 'businessPhoneNumber', 'profile_businessPhoneNumber' - The customer’s home phone number.
--
-- 'birthDate', 'profile_birthDate' - The customer’s birth date.
--
-- 'businessName', 'profile_businessName' - The name of the customer’s business.
newProfile ::
  Profile
newProfile :: Profile
newProfile =
  Profile' :: Maybe Address
-> Maybe Text
-> Maybe Address
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Address
-> Maybe PartyType
-> Maybe Text
-> Maybe Text
-> Maybe (HashMap Text Text)
-> Maybe Gender
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Address
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Profile
Profile'
    { $sel:shippingAddress:Profile' :: Maybe Address
shippingAddress = Maybe Address
forall a. Maybe a
Prelude.Nothing,
      $sel:mobilePhoneNumber:Profile' :: Maybe Text
mobilePhoneNumber = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:mailingAddress:Profile' :: Maybe Address
mailingAddress = Maybe Address
forall a. Maybe a
Prelude.Nothing,
      $sel:middleName:Profile' :: Maybe Text
middleName = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:personalEmailAddress:Profile' :: Maybe Text
personalEmailAddress = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:lastName:Profile' :: Maybe Text
lastName = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:additionalInformation:Profile' :: Maybe Text
additionalInformation = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:homePhoneNumber:Profile' :: Maybe Text
homePhoneNumber = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:address:Profile' :: Maybe Address
address = Maybe Address
forall a. Maybe a
Prelude.Nothing,
      $sel:partyType:Profile' :: Maybe PartyType
partyType = Maybe PartyType
forall a. Maybe a
Prelude.Nothing,
      $sel:profileId:Profile' :: Maybe Text
profileId = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:businessEmailAddress:Profile' :: Maybe Text
businessEmailAddress = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:attributes:Profile' :: Maybe (HashMap Text Text)
attributes = Maybe (HashMap Text Text)
forall a. Maybe a
Prelude.Nothing,
      $sel:gender:Profile' :: Maybe Gender
gender = Maybe Gender
forall a. Maybe a
Prelude.Nothing,
      $sel:phoneNumber:Profile' :: Maybe Text
phoneNumber = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:accountNumber:Profile' :: Maybe Text
accountNumber = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:emailAddress:Profile' :: Maybe Text
emailAddress = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:firstName:Profile' :: Maybe Text
firstName = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:billingAddress:Profile' :: Maybe Address
billingAddress = Maybe Address
forall a. Maybe a
Prelude.Nothing,
      $sel:businessPhoneNumber:Profile' :: Maybe Text
businessPhoneNumber = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:birthDate:Profile' :: Maybe Text
birthDate = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:businessName:Profile' :: Maybe Text
businessName = Maybe Text
forall a. Maybe a
Prelude.Nothing
    }

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

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

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

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

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

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

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

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

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

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

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

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

-- | A key value pair of attributes of a customer profile.
profile_attributes :: Lens.Lens' Profile (Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text))
profile_attributes :: (Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
-> Profile -> f Profile
profile_attributes = (Profile -> Maybe (HashMap Text Text))
-> (Profile -> Maybe (HashMap Text Text) -> Profile)
-> Lens
     Profile
     Profile
     (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 (\Profile' {Maybe (HashMap Text Text)
attributes :: Maybe (HashMap Text Text)
$sel:attributes:Profile' :: Profile -> Maybe (HashMap Text Text)
attributes} -> Maybe (HashMap Text Text)
attributes) (\s :: Profile
s@Profile' {} Maybe (HashMap Text Text)
a -> Profile
s {$sel:attributes:Profile' :: Maybe (HashMap Text Text)
attributes = Maybe (HashMap Text Text)
a} :: Profile) ((Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
 -> Profile -> f Profile)
-> ((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)))
-> Profile
-> f Profile
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.
profile_gender :: Lens.Lens' Profile (Prelude.Maybe Gender)
profile_gender :: (Maybe Gender -> f (Maybe Gender)) -> Profile -> f Profile
profile_gender = (Profile -> Maybe Gender)
-> (Profile -> Maybe Gender -> Profile)
-> Lens Profile Profile (Maybe Gender) (Maybe Gender)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Profile' {Maybe Gender
gender :: Maybe Gender
$sel:gender:Profile' :: Profile -> Maybe Gender
gender} -> Maybe Gender
gender) (\s :: Profile
s@Profile' {} Maybe Gender
a -> Profile
s {$sel:gender:Profile' :: Maybe Gender
gender = Maybe Gender
a} :: Profile)

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

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

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

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

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

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

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

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

instance Core.FromJSON Profile where
  parseJSON :: Value -> Parser Profile
parseJSON =
    String -> (Object -> Parser Profile) -> Value -> Parser Profile
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
      String
"Profile"
      ( \Object
x ->
          Maybe Address
-> Maybe Text
-> Maybe Address
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Address
-> Maybe PartyType
-> Maybe Text
-> Maybe Text
-> Maybe (HashMap Text Text)
-> Maybe Gender
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Address
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Profile
Profile'
            (Maybe Address
 -> Maybe Text
 -> Maybe Address
 -> Maybe Text
 -> Maybe Text
 -> Maybe Text
 -> Maybe Text
 -> Maybe Text
 -> Maybe Address
 -> Maybe PartyType
 -> Maybe Text
 -> Maybe Text
 -> Maybe (HashMap Text Text)
 -> Maybe Gender
 -> Maybe Text
 -> Maybe Text
 -> Maybe Text
 -> Maybe Text
 -> Maybe Address
 -> Maybe Text
 -> Maybe Text
 -> Maybe Text
 -> Profile)
-> Parser (Maybe Address)
-> Parser
     (Maybe Text
      -> Maybe Address
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Address
      -> Maybe PartyType
      -> Maybe Text
      -> Maybe Text
      -> Maybe (HashMap Text Text)
      -> Maybe Gender
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Address
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Profile)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Parser (Maybe Address)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"ShippingAddress")
            Parser
  (Maybe Text
   -> Maybe Address
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Address
   -> Maybe PartyType
   -> Maybe Text
   -> Maybe Text
   -> Maybe (HashMap Text Text)
   -> Maybe Gender
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Address
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Profile)
-> Parser (Maybe Text)
-> Parser
     (Maybe Address
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Address
      -> Maybe PartyType
      -> Maybe Text
      -> Maybe Text
      -> Maybe (HashMap Text Text)
      -> Maybe Gender
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Address
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Profile)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"MobilePhoneNumber")
            Parser
  (Maybe Address
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Address
   -> Maybe PartyType
   -> Maybe Text
   -> Maybe Text
   -> Maybe (HashMap Text Text)
   -> Maybe Gender
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Address
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Profile)
-> Parser (Maybe Address)
-> Parser
     (Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Address
      -> Maybe PartyType
      -> Maybe Text
      -> Maybe Text
      -> Maybe (HashMap Text Text)
      -> Maybe Gender
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Address
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Profile)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Address)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"MailingAddress")
            Parser
  (Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Address
   -> Maybe PartyType
   -> Maybe Text
   -> Maybe Text
   -> Maybe (HashMap Text Text)
   -> Maybe Gender
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Address
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Profile)
-> Parser (Maybe Text)
-> Parser
     (Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Address
      -> Maybe PartyType
      -> Maybe Text
      -> Maybe Text
      -> Maybe (HashMap Text Text)
      -> Maybe Gender
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Address
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Profile)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"MiddleName")
            Parser
  (Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Address
   -> Maybe PartyType
   -> Maybe Text
   -> Maybe Text
   -> Maybe (HashMap Text Text)
   -> Maybe Gender
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Address
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Profile)
-> Parser (Maybe Text)
-> Parser
     (Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Address
      -> Maybe PartyType
      -> Maybe Text
      -> Maybe Text
      -> Maybe (HashMap Text Text)
      -> Maybe Gender
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Address
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Profile)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"PersonalEmailAddress")
            Parser
  (Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Address
   -> Maybe PartyType
   -> Maybe Text
   -> Maybe Text
   -> Maybe (HashMap Text Text)
   -> Maybe Gender
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Address
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Profile)
-> Parser (Maybe Text)
-> Parser
     (Maybe Text
      -> Maybe Text
      -> Maybe Address
      -> Maybe PartyType
      -> Maybe Text
      -> Maybe Text
      -> Maybe (HashMap Text Text)
      -> Maybe Gender
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Address
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Profile)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"LastName")
            Parser
  (Maybe Text
   -> Maybe Text
   -> Maybe Address
   -> Maybe PartyType
   -> Maybe Text
   -> Maybe Text
   -> Maybe (HashMap Text Text)
   -> Maybe Gender
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Address
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Profile)
-> Parser (Maybe Text)
-> Parser
     (Maybe Text
      -> Maybe Address
      -> Maybe PartyType
      -> Maybe Text
      -> Maybe Text
      -> Maybe (HashMap Text Text)
      -> Maybe Gender
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Address
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Profile)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"AdditionalInformation")
            Parser
  (Maybe Text
   -> Maybe Address
   -> Maybe PartyType
   -> Maybe Text
   -> Maybe Text
   -> Maybe (HashMap Text Text)
   -> Maybe Gender
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Address
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Profile)
-> Parser (Maybe Text)
-> Parser
     (Maybe Address
      -> Maybe PartyType
      -> Maybe Text
      -> Maybe Text
      -> Maybe (HashMap Text Text)
      -> Maybe Gender
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Address
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Profile)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"HomePhoneNumber")
            Parser
  (Maybe Address
   -> Maybe PartyType
   -> Maybe Text
   -> Maybe Text
   -> Maybe (HashMap Text Text)
   -> Maybe Gender
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Address
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Profile)
-> Parser (Maybe Address)
-> Parser
     (Maybe PartyType
      -> Maybe Text
      -> Maybe Text
      -> Maybe (HashMap Text Text)
      -> Maybe Gender
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Address
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Profile)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Address)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"Address")
            Parser
  (Maybe PartyType
   -> Maybe Text
   -> Maybe Text
   -> Maybe (HashMap Text Text)
   -> Maybe Gender
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Address
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Profile)
-> Parser (Maybe PartyType)
-> Parser
     (Maybe Text
      -> Maybe Text
      -> Maybe (HashMap Text Text)
      -> Maybe Gender
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Address
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Profile)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe PartyType)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"PartyType")
            Parser
  (Maybe Text
   -> Maybe Text
   -> Maybe (HashMap Text Text)
   -> Maybe Gender
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Address
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Profile)
-> Parser (Maybe Text)
-> Parser
     (Maybe Text
      -> Maybe (HashMap Text Text)
      -> Maybe Gender
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Address
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Profile)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"ProfileId")
            Parser
  (Maybe Text
   -> Maybe (HashMap Text Text)
   -> Maybe Gender
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Address
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Profile)
-> Parser (Maybe Text)
-> Parser
     (Maybe (HashMap Text Text)
      -> Maybe Gender
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Address
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Profile)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"BusinessEmailAddress")
            Parser
  (Maybe (HashMap Text Text)
   -> Maybe Gender
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Address
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Profile)
-> Parser (Maybe (HashMap Text Text))
-> Parser
     (Maybe Gender
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Address
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Profile)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe (Maybe (HashMap Text Text)))
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"Attributes" Parser (Maybe (Maybe (HashMap Text Text)))
-> Maybe (HashMap Text Text) -> Parser (Maybe (HashMap Text Text))
forall a. Parser (Maybe a) -> a -> Parser a
Core..!= Maybe (HashMap Text Text)
forall a. Monoid a => a
Prelude.mempty)
            Parser
  (Maybe Gender
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Address
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Profile)
-> Parser (Maybe Gender)
-> Parser
     (Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Address
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Profile)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Gender)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"Gender")
            Parser
  (Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Address
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Profile)
-> Parser (Maybe Text)
-> Parser
     (Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Address
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Profile)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"PhoneNumber")
            Parser
  (Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Address
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Profile)
-> Parser (Maybe Text)
-> Parser
     (Maybe Text
      -> Maybe Text
      -> Maybe Address
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Profile)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"AccountNumber")
            Parser
  (Maybe Text
   -> Maybe Text
   -> Maybe Address
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Profile)
-> Parser (Maybe Text)
-> Parser
     (Maybe Text
      -> Maybe Address
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Profile)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"EmailAddress")
            Parser
  (Maybe Text
   -> Maybe Address
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Profile)
-> Parser (Maybe Text)
-> Parser
     (Maybe Address
      -> Maybe Text -> Maybe Text -> Maybe Text -> Profile)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"FirstName")
            Parser
  (Maybe Address
   -> Maybe Text -> Maybe Text -> Maybe Text -> Profile)
-> Parser (Maybe Address)
-> Parser (Maybe Text -> Maybe Text -> Maybe Text -> Profile)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Address)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"BillingAddress")
            Parser (Maybe Text -> Maybe Text -> Maybe Text -> Profile)
-> Parser (Maybe Text)
-> Parser (Maybe Text -> Maybe Text -> Profile)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"BusinessPhoneNumber")
            Parser (Maybe Text -> Maybe Text -> Profile)
-> Parser (Maybe Text) -> Parser (Maybe Text -> Profile)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"BirthDate")
            Parser (Maybe Text -> Profile)
-> Parser (Maybe Text) -> Parser Profile
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"BusinessName")
      )

instance Prelude.Hashable Profile

instance Prelude.NFData Profile