module Network.Google.People.Types.Product where
import Network.Google.People.Types.Sum
import Network.Google.Prelude
data Photo = Photo'
{ _pURL :: !(Maybe Text)
, _pMetadata :: !(Maybe FieldMetadata)
} deriving (Eq,Show,Data,Typeable,Generic)
photo
:: Photo
photo =
Photo'
{ _pURL = Nothing
, _pMetadata = Nothing
}
pURL :: Lens' Photo (Maybe Text)
pURL = lens _pURL (\ s a -> s{_pURL = a})
pMetadata :: Lens' Photo (Maybe FieldMetadata)
pMetadata
= lens _pMetadata (\ s a -> s{_pMetadata = a})
instance FromJSON Photo where
parseJSON
= withObject "Photo"
(\ o ->
Photo' <$> (o .:? "url") <*> (o .:? "metadata"))
instance ToJSON Photo where
toJSON Photo'{..}
= object
(catMaybes
[("url" .=) <$> _pURL,
("metadata" .=) <$> _pMetadata])
data Event = Event'
{ _eDate :: !(Maybe Date)
, _eMetadata :: !(Maybe FieldMetadata)
, _eType :: !(Maybe Text)
, _eFormattedType :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
event
:: Event
event =
Event'
{ _eDate = Nothing
, _eMetadata = Nothing
, _eType = Nothing
, _eFormattedType = Nothing
}
eDate :: Lens' Event (Maybe Date)
eDate = lens _eDate (\ s a -> s{_eDate = a})
eMetadata :: Lens' Event (Maybe FieldMetadata)
eMetadata
= lens _eMetadata (\ s a -> s{_eMetadata = a})
eType :: Lens' Event (Maybe Text)
eType = lens _eType (\ s a -> s{_eType = a})
eFormattedType :: Lens' Event (Maybe Text)
eFormattedType
= lens _eFormattedType
(\ s a -> s{_eFormattedType = a})
instance FromJSON Event where
parseJSON
= withObject "Event"
(\ o ->
Event' <$>
(o .:? "date") <*> (o .:? "metadata") <*>
(o .:? "type")
<*> (o .:? "formattedType"))
instance ToJSON Event where
toJSON Event'{..}
= object
(catMaybes
[("date" .=) <$> _eDate,
("metadata" .=) <$> _eMetadata,
("type" .=) <$> _eType,
("formattedType" .=) <$> _eFormattedType])
data ListConnectionsResponse = ListConnectionsResponse'
{ _lcrNextPageToken :: !(Maybe Text)
, _lcrConnections :: !(Maybe [Person])
, _lcrNextSyncToken :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
listConnectionsResponse
:: ListConnectionsResponse
listConnectionsResponse =
ListConnectionsResponse'
{ _lcrNextPageToken = Nothing
, _lcrConnections = Nothing
, _lcrNextSyncToken = Nothing
}
lcrNextPageToken :: Lens' ListConnectionsResponse (Maybe Text)
lcrNextPageToken
= lens _lcrNextPageToken
(\ s a -> s{_lcrNextPageToken = a})
lcrConnections :: Lens' ListConnectionsResponse [Person]
lcrConnections
= lens _lcrConnections
(\ s a -> s{_lcrConnections = a})
. _Default
. _Coerce
lcrNextSyncToken :: Lens' ListConnectionsResponse (Maybe Text)
lcrNextSyncToken
= lens _lcrNextSyncToken
(\ s a -> s{_lcrNextSyncToken = a})
instance FromJSON ListConnectionsResponse where
parseJSON
= withObject "ListConnectionsResponse"
(\ o ->
ListConnectionsResponse' <$>
(o .:? "nextPageToken") <*>
(o .:? "connections" .!= mempty)
<*> (o .:? "nextSyncToken"))
instance ToJSON ListConnectionsResponse where
toJSON ListConnectionsResponse'{..}
= object
(catMaybes
[("nextPageToken" .=) <$> _lcrNextPageToken,
("connections" .=) <$> _lcrConnections,
("nextSyncToken" .=) <$> _lcrNextSyncToken])
newtype DomainMembership = DomainMembership'
{ _dmInViewerDomain :: Maybe Bool
} deriving (Eq,Show,Data,Typeable,Generic)
domainMembership
:: DomainMembership
domainMembership =
DomainMembership'
{ _dmInViewerDomain = Nothing
}
dmInViewerDomain :: Lens' DomainMembership (Maybe Bool)
dmInViewerDomain
= lens _dmInViewerDomain
(\ s a -> s{_dmInViewerDomain = a})
instance FromJSON DomainMembership where
parseJSON
= withObject "DomainMembership"
(\ o ->
DomainMembership' <$> (o .:? "inViewerDomain"))
instance ToJSON DomainMembership where
toJSON DomainMembership'{..}
= object
(catMaybes
[("inViewerDomain" .=) <$> _dmInViewerDomain])
data RelationshipInterest = RelationshipInterest'
{ _riValue :: !(Maybe Text)
, _riMetadata :: !(Maybe FieldMetadata)
, _riFormattedValue :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
relationshipInterest
:: RelationshipInterest
relationshipInterest =
RelationshipInterest'
{ _riValue = Nothing
, _riMetadata = Nothing
, _riFormattedValue = Nothing
}
riValue :: Lens' RelationshipInterest (Maybe Text)
riValue = lens _riValue (\ s a -> s{_riValue = a})
riMetadata :: Lens' RelationshipInterest (Maybe FieldMetadata)
riMetadata
= lens _riMetadata (\ s a -> s{_riMetadata = a})
riFormattedValue :: Lens' RelationshipInterest (Maybe Text)
riFormattedValue
= lens _riFormattedValue
(\ s a -> s{_riFormattedValue = a})
instance FromJSON RelationshipInterest where
parseJSON
= withObject "RelationshipInterest"
(\ o ->
RelationshipInterest' <$>
(o .:? "value") <*> (o .:? "metadata") <*>
(o .:? "formattedValue"))
instance ToJSON RelationshipInterest where
toJSON RelationshipInterest'{..}
= object
(catMaybes
[("value" .=) <$> _riValue,
("metadata" .=) <$> _riMetadata,
("formattedValue" .=) <$> _riFormattedValue])
data BraggingRights = BraggingRights'
{ _brValue :: !(Maybe Text)
, _brMetadata :: !(Maybe FieldMetadata)
} deriving (Eq,Show,Data,Typeable,Generic)
braggingRights
:: BraggingRights
braggingRights =
BraggingRights'
{ _brValue = Nothing
, _brMetadata = Nothing
}
brValue :: Lens' BraggingRights (Maybe Text)
brValue = lens _brValue (\ s a -> s{_brValue = a})
brMetadata :: Lens' BraggingRights (Maybe FieldMetadata)
brMetadata
= lens _brMetadata (\ s a -> s{_brMetadata = a})
instance FromJSON BraggingRights where
parseJSON
= withObject "BraggingRights"
(\ o ->
BraggingRights' <$>
(o .:? "value") <*> (o .:? "metadata"))
instance ToJSON BraggingRights where
toJSON BraggingRights'{..}
= object
(catMaybes
[("value" .=) <$> _brValue,
("metadata" .=) <$> _brMetadata])
data Membership = Membership'
{ _mDomainMembership :: !(Maybe DomainMembership)
, _mContactGroupMembership :: !(Maybe ContactGroupMembership)
, _mMetadata :: !(Maybe FieldMetadata)
} deriving (Eq,Show,Data,Typeable,Generic)
membership
:: Membership
membership =
Membership'
{ _mDomainMembership = Nothing
, _mContactGroupMembership = Nothing
, _mMetadata = Nothing
}
mDomainMembership :: Lens' Membership (Maybe DomainMembership)
mDomainMembership
= lens _mDomainMembership
(\ s a -> s{_mDomainMembership = a})
mContactGroupMembership :: Lens' Membership (Maybe ContactGroupMembership)
mContactGroupMembership
= lens _mContactGroupMembership
(\ s a -> s{_mContactGroupMembership = a})
mMetadata :: Lens' Membership (Maybe FieldMetadata)
mMetadata
= lens _mMetadata (\ s a -> s{_mMetadata = a})
instance FromJSON Membership where
parseJSON
= withObject "Membership"
(\ o ->
Membership' <$>
(o .:? "domainMembership") <*>
(o .:? "contactGroupMembership")
<*> (o .:? "metadata"))
instance ToJSON Membership where
toJSON Membership'{..}
= object
(catMaybes
[("domainMembership" .=) <$> _mDomainMembership,
("contactGroupMembership" .=) <$>
_mContactGroupMembership,
("metadata" .=) <$> _mMetadata])
data Person = Person'
{ _perEmailAddresses :: !(Maybe [EmailAddress])
, _perAgeRange :: !(Maybe Text)
, _perEtag :: !(Maybe Text)
, _perResidences :: !(Maybe [Residence])
, _perBiographies :: !(Maybe [Biography])
, _perTaglines :: !(Maybe [Tagline])
, _perBraggingRights :: !(Maybe [BraggingRights])
, _perBirthdays :: !(Maybe [Birthday])
, _perResourceName :: !(Maybe Text)
, _perRelations :: !(Maybe [Relation])
, _perURLs :: !(Maybe [URL])
, _perAddresses :: !(Maybe [Address])
, _perNicknames :: !(Maybe [Nickname])
, _perRelationshipStatuses :: !(Maybe [RelationshipStatus])
, _perImClients :: !(Maybe [ImClient])
, _perPhoneNumbers :: !(Maybe [PhoneNumber])
, _perOccupations :: !(Maybe [Occupation])
, _perNames :: !(Maybe [Name])
, _perGenders :: !(Maybe [Gender])
, _perPhotos :: !(Maybe [Photo])
, _perEvents :: !(Maybe [Event])
, _perCoverPhotos :: !(Maybe [CoverPhoto])
, _perSkills :: !(Maybe [Skill])
, _perMetadata :: !(Maybe PersonMetadata)
, _perInterests :: !(Maybe [Interest])
, _perOrganizations :: !(Maybe [Organization])
, _perLocales :: !(Maybe [Locale])
, _perMemberships :: !(Maybe [Membership])
, _perRelationshipInterests :: !(Maybe [RelationshipInterest])
} deriving (Eq,Show,Data,Typeable,Generic)
person
:: Person
person =
Person'
{ _perEmailAddresses = Nothing
, _perAgeRange = Nothing
, _perEtag = Nothing
, _perResidences = Nothing
, _perBiographies = Nothing
, _perTaglines = Nothing
, _perBraggingRights = Nothing
, _perBirthdays = Nothing
, _perResourceName = Nothing
, _perRelations = Nothing
, _perURLs = Nothing
, _perAddresses = Nothing
, _perNicknames = Nothing
, _perRelationshipStatuses = Nothing
, _perImClients = Nothing
, _perPhoneNumbers = Nothing
, _perOccupations = Nothing
, _perNames = Nothing
, _perGenders = Nothing
, _perPhotos = Nothing
, _perEvents = Nothing
, _perCoverPhotos = Nothing
, _perSkills = Nothing
, _perMetadata = Nothing
, _perInterests = Nothing
, _perOrganizations = Nothing
, _perLocales = Nothing
, _perMemberships = Nothing
, _perRelationshipInterests = Nothing
}
perEmailAddresses :: Lens' Person [EmailAddress]
perEmailAddresses
= lens _perEmailAddresses
(\ s a -> s{_perEmailAddresses = a})
. _Default
. _Coerce
perAgeRange :: Lens' Person (Maybe Text)
perAgeRange
= lens _perAgeRange (\ s a -> s{_perAgeRange = a})
perEtag :: Lens' Person (Maybe Text)
perEtag = lens _perEtag (\ s a -> s{_perEtag = a})
perResidences :: Lens' Person [Residence]
perResidences
= lens _perResidences
(\ s a -> s{_perResidences = a})
. _Default
. _Coerce
perBiographies :: Lens' Person [Biography]
perBiographies
= lens _perBiographies
(\ s a -> s{_perBiographies = a})
. _Default
. _Coerce
perTaglines :: Lens' Person [Tagline]
perTaglines
= lens _perTaglines (\ s a -> s{_perTaglines = a}) .
_Default
. _Coerce
perBraggingRights :: Lens' Person [BraggingRights]
perBraggingRights
= lens _perBraggingRights
(\ s a -> s{_perBraggingRights = a})
. _Default
. _Coerce
perBirthdays :: Lens' Person [Birthday]
perBirthdays
= lens _perBirthdays (\ s a -> s{_perBirthdays = a})
. _Default
. _Coerce
perResourceName :: Lens' Person (Maybe Text)
perResourceName
= lens _perResourceName
(\ s a -> s{_perResourceName = a})
perRelations :: Lens' Person [Relation]
perRelations
= lens _perRelations (\ s a -> s{_perRelations = a})
. _Default
. _Coerce
perURLs :: Lens' Person [URL]
perURLs
= lens _perURLs (\ s a -> s{_perURLs = a}) . _Default
. _Coerce
perAddresses :: Lens' Person [Address]
perAddresses
= lens _perAddresses (\ s a -> s{_perAddresses = a})
. _Default
. _Coerce
perNicknames :: Lens' Person [Nickname]
perNicknames
= lens _perNicknames (\ s a -> s{_perNicknames = a})
. _Default
. _Coerce
perRelationshipStatuses :: Lens' Person [RelationshipStatus]
perRelationshipStatuses
= lens _perRelationshipStatuses
(\ s a -> s{_perRelationshipStatuses = a})
. _Default
. _Coerce
perImClients :: Lens' Person [ImClient]
perImClients
= lens _perImClients (\ s a -> s{_perImClients = a})
. _Default
. _Coerce
perPhoneNumbers :: Lens' Person [PhoneNumber]
perPhoneNumbers
= lens _perPhoneNumbers
(\ s a -> s{_perPhoneNumbers = a})
. _Default
. _Coerce
perOccupations :: Lens' Person [Occupation]
perOccupations
= lens _perOccupations
(\ s a -> s{_perOccupations = a})
. _Default
. _Coerce
perNames :: Lens' Person [Name]
perNames
= lens _perNames (\ s a -> s{_perNames = a}) .
_Default
. _Coerce
perGenders :: Lens' Person [Gender]
perGenders
= lens _perGenders (\ s a -> s{_perGenders = a}) .
_Default
. _Coerce
perPhotos :: Lens' Person [Photo]
perPhotos
= lens _perPhotos (\ s a -> s{_perPhotos = a}) .
_Default
. _Coerce
perEvents :: Lens' Person [Event]
perEvents
= lens _perEvents (\ s a -> s{_perEvents = a}) .
_Default
. _Coerce
perCoverPhotos :: Lens' Person [CoverPhoto]
perCoverPhotos
= lens _perCoverPhotos
(\ s a -> s{_perCoverPhotos = a})
. _Default
. _Coerce
perSkills :: Lens' Person [Skill]
perSkills
= lens _perSkills (\ s a -> s{_perSkills = a}) .
_Default
. _Coerce
perMetadata :: Lens' Person (Maybe PersonMetadata)
perMetadata
= lens _perMetadata (\ s a -> s{_perMetadata = a})
perInterests :: Lens' Person [Interest]
perInterests
= lens _perInterests (\ s a -> s{_perInterests = a})
. _Default
. _Coerce
perOrganizations :: Lens' Person [Organization]
perOrganizations
= lens _perOrganizations
(\ s a -> s{_perOrganizations = a})
. _Default
. _Coerce
perLocales :: Lens' Person [Locale]
perLocales
= lens _perLocales (\ s a -> s{_perLocales = a}) .
_Default
. _Coerce
perMemberships :: Lens' Person [Membership]
perMemberships
= lens _perMemberships
(\ s a -> s{_perMemberships = a})
. _Default
. _Coerce
perRelationshipInterests :: Lens' Person [RelationshipInterest]
perRelationshipInterests
= lens _perRelationshipInterests
(\ s a -> s{_perRelationshipInterests = a})
. _Default
. _Coerce
instance FromJSON Person where
parseJSON
= withObject "Person"
(\ o ->
Person' <$>
(o .:? "emailAddresses" .!= mempty) <*>
(o .:? "ageRange")
<*> (o .:? "etag")
<*> (o .:? "residences" .!= mempty)
<*> (o .:? "biographies" .!= mempty)
<*> (o .:? "taglines" .!= mempty)
<*> (o .:? "braggingRights" .!= mempty)
<*> (o .:? "birthdays" .!= mempty)
<*> (o .:? "resourceName")
<*> (o .:? "relations" .!= mempty)
<*> (o .:? "urls" .!= mempty)
<*> (o .:? "addresses" .!= mempty)
<*> (o .:? "nicknames" .!= mempty)
<*> (o .:? "relationshipStatuses" .!= mempty)
<*> (o .:? "imClients" .!= mempty)
<*> (o .:? "phoneNumbers" .!= mempty)
<*> (o .:? "occupations" .!= mempty)
<*> (o .:? "names" .!= mempty)
<*> (o .:? "genders" .!= mempty)
<*> (o .:? "photos" .!= mempty)
<*> (o .:? "events" .!= mempty)
<*> (o .:? "coverPhotos" .!= mempty)
<*> (o .:? "skills" .!= mempty)
<*> (o .:? "metadata")
<*> (o .:? "interests" .!= mempty)
<*> (o .:? "organizations" .!= mempty)
<*> (o .:? "locales" .!= mempty)
<*> (o .:? "memberships" .!= mempty)
<*> (o .:? "relationshipInterests" .!= mempty))
instance ToJSON Person where
toJSON Person'{..}
= object
(catMaybes
[("emailAddresses" .=) <$> _perEmailAddresses,
("ageRange" .=) <$> _perAgeRange,
("etag" .=) <$> _perEtag,
("residences" .=) <$> _perResidences,
("biographies" .=) <$> _perBiographies,
("taglines" .=) <$> _perTaglines,
("braggingRights" .=) <$> _perBraggingRights,
("birthdays" .=) <$> _perBirthdays,
("resourceName" .=) <$> _perResourceName,
("relations" .=) <$> _perRelations,
("urls" .=) <$> _perURLs,
("addresses" .=) <$> _perAddresses,
("nicknames" .=) <$> _perNicknames,
("relationshipStatuses" .=) <$>
_perRelationshipStatuses,
("imClients" .=) <$> _perImClients,
("phoneNumbers" .=) <$> _perPhoneNumbers,
("occupations" .=) <$> _perOccupations,
("names" .=) <$> _perNames,
("genders" .=) <$> _perGenders,
("photos" .=) <$> _perPhotos,
("events" .=) <$> _perEvents,
("coverPhotos" .=) <$> _perCoverPhotos,
("skills" .=) <$> _perSkills,
("metadata" .=) <$> _perMetadata,
("interests" .=) <$> _perInterests,
("organizations" .=) <$> _perOrganizations,
("locales" .=) <$> _perLocales,
("memberships" .=) <$> _perMemberships,
("relationshipInterests" .=) <$>
_perRelationshipInterests])
newtype ContactGroupMembership = ContactGroupMembership'
{ _cgmContactGroupId :: Maybe Text
} deriving (Eq,Show,Data,Typeable,Generic)
contactGroupMembership
:: ContactGroupMembership
contactGroupMembership =
ContactGroupMembership'
{ _cgmContactGroupId = Nothing
}
cgmContactGroupId :: Lens' ContactGroupMembership (Maybe Text)
cgmContactGroupId
= lens _cgmContactGroupId
(\ s a -> s{_cgmContactGroupId = a})
instance FromJSON ContactGroupMembership where
parseJSON
= withObject "ContactGroupMembership"
(\ o ->
ContactGroupMembership' <$> (o .:? "contactGroupId"))
instance ToJSON ContactGroupMembership where
toJSON ContactGroupMembership'{..}
= object
(catMaybes
[("contactGroupId" .=) <$> _cgmContactGroupId])
data Locale = Locale'
{ _lValue :: !(Maybe Text)
, _lMetadata :: !(Maybe FieldMetadata)
} deriving (Eq,Show,Data,Typeable,Generic)
locale
:: Locale
locale =
Locale'
{ _lValue = Nothing
, _lMetadata = Nothing
}
lValue :: Lens' Locale (Maybe Text)
lValue = lens _lValue (\ s a -> s{_lValue = a})
lMetadata :: Lens' Locale (Maybe FieldMetadata)
lMetadata
= lens _lMetadata (\ s a -> s{_lMetadata = a})
instance FromJSON Locale where
parseJSON
= withObject "Locale"
(\ o ->
Locale' <$> (o .:? "value") <*> (o .:? "metadata"))
instance ToJSON Locale where
toJSON Locale'{..}
= object
(catMaybes
[("value" .=) <$> _lValue,
("metadata" .=) <$> _lMetadata])
data RelationshipStatus = RelationshipStatus'
{ _rsValue :: !(Maybe Text)
, _rsMetadata :: !(Maybe FieldMetadata)
, _rsFormattedValue :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
relationshipStatus
:: RelationshipStatus
relationshipStatus =
RelationshipStatus'
{ _rsValue = Nothing
, _rsMetadata = Nothing
, _rsFormattedValue = Nothing
}
rsValue :: Lens' RelationshipStatus (Maybe Text)
rsValue = lens _rsValue (\ s a -> s{_rsValue = a})
rsMetadata :: Lens' RelationshipStatus (Maybe FieldMetadata)
rsMetadata
= lens _rsMetadata (\ s a -> s{_rsMetadata = a})
rsFormattedValue :: Lens' RelationshipStatus (Maybe Text)
rsFormattedValue
= lens _rsFormattedValue
(\ s a -> s{_rsFormattedValue = a})
instance FromJSON RelationshipStatus where
parseJSON
= withObject "RelationshipStatus"
(\ o ->
RelationshipStatus' <$>
(o .:? "value") <*> (o .:? "metadata") <*>
(o .:? "formattedValue"))
instance ToJSON RelationshipStatus where
toJSON RelationshipStatus'{..}
= object
(catMaybes
[("value" .=) <$> _rsValue,
("metadata" .=) <$> _rsMetadata,
("formattedValue" .=) <$> _rsFormattedValue])
data URL = URL'
{ _uValue :: !(Maybe Text)
, _uMetadata :: !(Maybe FieldMetadata)
, _uType :: !(Maybe Text)
, _uFormattedType :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
url
:: URL
url =
URL'
{ _uValue = Nothing
, _uMetadata = Nothing
, _uType = Nothing
, _uFormattedType = Nothing
}
uValue :: Lens' URL (Maybe Text)
uValue = lens _uValue (\ s a -> s{_uValue = a})
uMetadata :: Lens' URL (Maybe FieldMetadata)
uMetadata
= lens _uMetadata (\ s a -> s{_uMetadata = a})
uType :: Lens' URL (Maybe Text)
uType = lens _uType (\ s a -> s{_uType = a})
uFormattedType :: Lens' URL (Maybe Text)
uFormattedType
= lens _uFormattedType
(\ s a -> s{_uFormattedType = a})
instance FromJSON URL where
parseJSON
= withObject "URL"
(\ o ->
URL' <$>
(o .:? "value") <*> (o .:? "metadata") <*>
(o .:? "type")
<*> (o .:? "formattedType"))
instance ToJSON URL where
toJSON URL'{..}
= object
(catMaybes
[("value" .=) <$> _uValue,
("metadata" .=) <$> _uMetadata,
("type" .=) <$> _uType,
("formattedType" .=) <$> _uFormattedType])
data Address = Address'
{ _aStreetAddress :: !(Maybe Text)
, _aPoBox :: !(Maybe Text)
, _aCountry :: !(Maybe Text)
, _aPostalCode :: !(Maybe Text)
, _aExtendedAddress :: !(Maybe Text)
, _aCity :: !(Maybe Text)
, _aMetadata :: !(Maybe FieldMetadata)
, _aCountryCode :: !(Maybe Text)
, _aFormattedValue :: !(Maybe Text)
, _aRegion :: !(Maybe Text)
, _aType :: !(Maybe Text)
, _aFormattedType :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
address
:: Address
address =
Address'
{ _aStreetAddress = Nothing
, _aPoBox = Nothing
, _aCountry = Nothing
, _aPostalCode = Nothing
, _aExtendedAddress = Nothing
, _aCity = Nothing
, _aMetadata = Nothing
, _aCountryCode = Nothing
, _aFormattedValue = Nothing
, _aRegion = Nothing
, _aType = Nothing
, _aFormattedType = Nothing
}
aStreetAddress :: Lens' Address (Maybe Text)
aStreetAddress
= lens _aStreetAddress
(\ s a -> s{_aStreetAddress = a})
aPoBox :: Lens' Address (Maybe Text)
aPoBox = lens _aPoBox (\ s a -> s{_aPoBox = a})
aCountry :: Lens' Address (Maybe Text)
aCountry = lens _aCountry (\ s a -> s{_aCountry = a})
aPostalCode :: Lens' Address (Maybe Text)
aPostalCode
= lens _aPostalCode (\ s a -> s{_aPostalCode = a})
aExtendedAddress :: Lens' Address (Maybe Text)
aExtendedAddress
= lens _aExtendedAddress
(\ s a -> s{_aExtendedAddress = a})
aCity :: Lens' Address (Maybe Text)
aCity = lens _aCity (\ s a -> s{_aCity = a})
aMetadata :: Lens' Address (Maybe FieldMetadata)
aMetadata
= lens _aMetadata (\ s a -> s{_aMetadata = a})
aCountryCode :: Lens' Address (Maybe Text)
aCountryCode
= lens _aCountryCode (\ s a -> s{_aCountryCode = a})
aFormattedValue :: Lens' Address (Maybe Text)
aFormattedValue
= lens _aFormattedValue
(\ s a -> s{_aFormattedValue = a})
aRegion :: Lens' Address (Maybe Text)
aRegion = lens _aRegion (\ s a -> s{_aRegion = a})
aType :: Lens' Address (Maybe Text)
aType = lens _aType (\ s a -> s{_aType = a})
aFormattedType :: Lens' Address (Maybe Text)
aFormattedType
= lens _aFormattedType
(\ s a -> s{_aFormattedType = a})
instance FromJSON Address where
parseJSON
= withObject "Address"
(\ o ->
Address' <$>
(o .:? "streetAddress") <*> (o .:? "poBox") <*>
(o .:? "country")
<*> (o .:? "postalCode")
<*> (o .:? "extendedAddress")
<*> (o .:? "city")
<*> (o .:? "metadata")
<*> (o .:? "countryCode")
<*> (o .:? "formattedValue")
<*> (o .:? "region")
<*> (o .:? "type")
<*> (o .:? "formattedType"))
instance ToJSON Address where
toJSON Address'{..}
= object
(catMaybes
[("streetAddress" .=) <$> _aStreetAddress,
("poBox" .=) <$> _aPoBox,
("country" .=) <$> _aCountry,
("postalCode" .=) <$> _aPostalCode,
("extendedAddress" .=) <$> _aExtendedAddress,
("city" .=) <$> _aCity,
("metadata" .=) <$> _aMetadata,
("countryCode" .=) <$> _aCountryCode,
("formattedValue" .=) <$> _aFormattedValue,
("region" .=) <$> _aRegion, ("type" .=) <$> _aType,
("formattedType" .=) <$> _aFormattedType])
data Relation = Relation'
{ _rPerson :: !(Maybe Text)
, _rMetadata :: !(Maybe FieldMetadata)
, _rType :: !(Maybe Text)
, _rFormattedType :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
relation
:: Relation
relation =
Relation'
{ _rPerson = Nothing
, _rMetadata = Nothing
, _rType = Nothing
, _rFormattedType = Nothing
}
rPerson :: Lens' Relation (Maybe Text)
rPerson = lens _rPerson (\ s a -> s{_rPerson = a})
rMetadata :: Lens' Relation (Maybe FieldMetadata)
rMetadata
= lens _rMetadata (\ s a -> s{_rMetadata = a})
rType :: Lens' Relation (Maybe Text)
rType = lens _rType (\ s a -> s{_rType = a})
rFormattedType :: Lens' Relation (Maybe Text)
rFormattedType
= lens _rFormattedType
(\ s a -> s{_rFormattedType = a})
instance FromJSON Relation where
parseJSON
= withObject "Relation"
(\ o ->
Relation' <$>
(o .:? "person") <*> (o .:? "metadata") <*>
(o .:? "type")
<*> (o .:? "formattedType"))
instance ToJSON Relation where
toJSON Relation'{..}
= object
(catMaybes
[("person" .=) <$> _rPerson,
("metadata" .=) <$> _rMetadata,
("type" .=) <$> _rType,
("formattedType" .=) <$> _rFormattedType])
newtype GetPeopleResponse = GetPeopleResponse'
{ _gprResponses :: Maybe [PersonResponse]
} deriving (Eq,Show,Data,Typeable,Generic)
getPeopleResponse
:: GetPeopleResponse
getPeopleResponse =
GetPeopleResponse'
{ _gprResponses = Nothing
}
gprResponses :: Lens' GetPeopleResponse [PersonResponse]
gprResponses
= lens _gprResponses (\ s a -> s{_gprResponses = a})
. _Default
. _Coerce
instance FromJSON GetPeopleResponse where
parseJSON
= withObject "GetPeopleResponse"
(\ o ->
GetPeopleResponse' <$>
(o .:? "responses" .!= mempty))
instance ToJSON GetPeopleResponse where
toJSON GetPeopleResponse'{..}
= object
(catMaybes [("responses" .=) <$> _gprResponses])
data Birthday = Birthday'
{ _bText :: !(Maybe Text)
, _bDate :: !(Maybe Date)
, _bMetadata :: !(Maybe FieldMetadata)
} deriving (Eq,Show,Data,Typeable,Generic)
birthday
:: Birthday
birthday =
Birthday'
{ _bText = Nothing
, _bDate = Nothing
, _bMetadata = Nothing
}
bText :: Lens' Birthday (Maybe Text)
bText = lens _bText (\ s a -> s{_bText = a})
bDate :: Lens' Birthday (Maybe Date)
bDate = lens _bDate (\ s a -> s{_bDate = a})
bMetadata :: Lens' Birthday (Maybe FieldMetadata)
bMetadata
= lens _bMetadata (\ s a -> s{_bMetadata = a})
instance FromJSON Birthday where
parseJSON
= withObject "Birthday"
(\ o ->
Birthday' <$>
(o .:? "text") <*> (o .:? "date") <*>
(o .:? "metadata"))
instance ToJSON Birthday where
toJSON Birthday'{..}
= object
(catMaybes
[("text" .=) <$> _bText, ("date" .=) <$> _bDate,
("metadata" .=) <$> _bMetadata])
data Date = Date'
{ _dDay :: !(Maybe (Textual Int32))
, _dYear :: !(Maybe (Textual Int32))
, _dMonth :: !(Maybe (Textual Int32))
} deriving (Eq,Show,Data,Typeable,Generic)
date
:: Date
date =
Date'
{ _dDay = Nothing
, _dYear = Nothing
, _dMonth = Nothing
}
dDay :: Lens' Date (Maybe Int32)
dDay
= lens _dDay (\ s a -> s{_dDay = a}) .
mapping _Coerce
dYear :: Lens' Date (Maybe Int32)
dYear
= lens _dYear (\ s a -> s{_dYear = a}) .
mapping _Coerce
dMonth :: Lens' Date (Maybe Int32)
dMonth
= lens _dMonth (\ s a -> s{_dMonth = a}) .
mapping _Coerce
instance FromJSON Date where
parseJSON
= withObject "Date"
(\ o ->
Date' <$>
(o .:? "day") <*> (o .:? "year") <*> (o .:? "month"))
instance ToJSON Date where
toJSON Date'{..}
= object
(catMaybes
[("day" .=) <$> _dDay, ("year" .=) <$> _dYear,
("month" .=) <$> _dMonth])
data Tagline = Tagline'
{ _tValue :: !(Maybe Text)
, _tMetadata :: !(Maybe FieldMetadata)
} deriving (Eq,Show,Data,Typeable,Generic)
tagline
:: Tagline
tagline =
Tagline'
{ _tValue = Nothing
, _tMetadata = Nothing
}
tValue :: Lens' Tagline (Maybe Text)
tValue = lens _tValue (\ s a -> s{_tValue = a})
tMetadata :: Lens' Tagline (Maybe FieldMetadata)
tMetadata
= lens _tMetadata (\ s a -> s{_tMetadata = a})
instance FromJSON Tagline where
parseJSON
= withObject "Tagline"
(\ o ->
Tagline' <$> (o .:? "value") <*> (o .:? "metadata"))
instance ToJSON Tagline where
toJSON Tagline'{..}
= object
(catMaybes
[("value" .=) <$> _tValue,
("metadata" .=) <$> _tMetadata])
data Residence = Residence'
{ _resValue :: !(Maybe Text)
, _resCurrent :: !(Maybe Bool)
, _resMetadata :: !(Maybe FieldMetadata)
} deriving (Eq,Show,Data,Typeable,Generic)
residence
:: Residence
residence =
Residence'
{ _resValue = Nothing
, _resCurrent = Nothing
, _resMetadata = Nothing
}
resValue :: Lens' Residence (Maybe Text)
resValue = lens _resValue (\ s a -> s{_resValue = a})
resCurrent :: Lens' Residence (Maybe Bool)
resCurrent
= lens _resCurrent (\ s a -> s{_resCurrent = a})
resMetadata :: Lens' Residence (Maybe FieldMetadata)
resMetadata
= lens _resMetadata (\ s a -> s{_resMetadata = a})
instance FromJSON Residence where
parseJSON
= withObject "Residence"
(\ o ->
Residence' <$>
(o .:? "value") <*> (o .:? "current") <*>
(o .:? "metadata"))
instance ToJSON Residence where
toJSON Residence'{..}
= object
(catMaybes
[("value" .=) <$> _resValue,
("current" .=) <$> _resCurrent,
("metadata" .=) <$> _resMetadata])
data Gender = Gender'
{ _gValue :: !(Maybe Text)
, _gMetadata :: !(Maybe FieldMetadata)
, _gFormattedValue :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
gender
:: Gender
gender =
Gender'
{ _gValue = Nothing
, _gMetadata = Nothing
, _gFormattedValue = Nothing
}
gValue :: Lens' Gender (Maybe Text)
gValue = lens _gValue (\ s a -> s{_gValue = a})
gMetadata :: Lens' Gender (Maybe FieldMetadata)
gMetadata
= lens _gMetadata (\ s a -> s{_gMetadata = a})
gFormattedValue :: Lens' Gender (Maybe Text)
gFormattedValue
= lens _gFormattedValue
(\ s a -> s{_gFormattedValue = a})
instance FromJSON Gender where
parseJSON
= withObject "Gender"
(\ o ->
Gender' <$>
(o .:? "value") <*> (o .:? "metadata") <*>
(o .:? "formattedValue"))
instance ToJSON Gender where
toJSON Gender'{..}
= object
(catMaybes
[("value" .=) <$> _gValue,
("metadata" .=) <$> _gMetadata,
("formattedValue" .=) <$> _gFormattedValue])
data Name = Name'
{ _nGivenName :: !(Maybe Text)
, _nPhoneticHonorificSuffix :: !(Maybe Text)
, _nMiddleName :: !(Maybe Text)
, _nPhoneticMiddleName :: !(Maybe Text)
, _nPhoneticFamilyName :: !(Maybe Text)
, _nPhoneticHonorificPrefix :: !(Maybe Text)
, _nHonorificPrefix :: !(Maybe Text)
, _nFamilyName :: !(Maybe Text)
, _nMetadata :: !(Maybe FieldMetadata)
, _nDisplayName :: !(Maybe Text)
, _nPhoneticGivenName :: !(Maybe Text)
, _nHonorificSuffix :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
name
:: Name
name =
Name'
{ _nGivenName = Nothing
, _nPhoneticHonorificSuffix = Nothing
, _nMiddleName = Nothing
, _nPhoneticMiddleName = Nothing
, _nPhoneticFamilyName = Nothing
, _nPhoneticHonorificPrefix = Nothing
, _nHonorificPrefix = Nothing
, _nFamilyName = Nothing
, _nMetadata = Nothing
, _nDisplayName = Nothing
, _nPhoneticGivenName = Nothing
, _nHonorificSuffix = Nothing
}
nGivenName :: Lens' Name (Maybe Text)
nGivenName
= lens _nGivenName (\ s a -> s{_nGivenName = a})
nPhoneticHonorificSuffix :: Lens' Name (Maybe Text)
nPhoneticHonorificSuffix
= lens _nPhoneticHonorificSuffix
(\ s a -> s{_nPhoneticHonorificSuffix = a})
nMiddleName :: Lens' Name (Maybe Text)
nMiddleName
= lens _nMiddleName (\ s a -> s{_nMiddleName = a})
nPhoneticMiddleName :: Lens' Name (Maybe Text)
nPhoneticMiddleName
= lens _nPhoneticMiddleName
(\ s a -> s{_nPhoneticMiddleName = a})
nPhoneticFamilyName :: Lens' Name (Maybe Text)
nPhoneticFamilyName
= lens _nPhoneticFamilyName
(\ s a -> s{_nPhoneticFamilyName = a})
nPhoneticHonorificPrefix :: Lens' Name (Maybe Text)
nPhoneticHonorificPrefix
= lens _nPhoneticHonorificPrefix
(\ s a -> s{_nPhoneticHonorificPrefix = a})
nHonorificPrefix :: Lens' Name (Maybe Text)
nHonorificPrefix
= lens _nHonorificPrefix
(\ s a -> s{_nHonorificPrefix = a})
nFamilyName :: Lens' Name (Maybe Text)
nFamilyName
= lens _nFamilyName (\ s a -> s{_nFamilyName = a})
nMetadata :: Lens' Name (Maybe FieldMetadata)
nMetadata
= lens _nMetadata (\ s a -> s{_nMetadata = a})
nDisplayName :: Lens' Name (Maybe Text)
nDisplayName
= lens _nDisplayName (\ s a -> s{_nDisplayName = a})
nPhoneticGivenName :: Lens' Name (Maybe Text)
nPhoneticGivenName
= lens _nPhoneticGivenName
(\ s a -> s{_nPhoneticGivenName = a})
nHonorificSuffix :: Lens' Name (Maybe Text)
nHonorificSuffix
= lens _nHonorificSuffix
(\ s a -> s{_nHonorificSuffix = a})
instance FromJSON Name where
parseJSON
= withObject "Name"
(\ o ->
Name' <$>
(o .:? "givenName") <*>
(o .:? "phoneticHonorificSuffix")
<*> (o .:? "middleName")
<*> (o .:? "phoneticMiddleName")
<*> (o .:? "phoneticFamilyName")
<*> (o .:? "phoneticHonorificPrefix")
<*> (o .:? "honorificPrefix")
<*> (o .:? "familyName")
<*> (o .:? "metadata")
<*> (o .:? "displayName")
<*> (o .:? "phoneticGivenName")
<*> (o .:? "honorificSuffix"))
instance ToJSON Name where
toJSON Name'{..}
= object
(catMaybes
[("givenName" .=) <$> _nGivenName,
("phoneticHonorificSuffix" .=) <$>
_nPhoneticHonorificSuffix,
("middleName" .=) <$> _nMiddleName,
("phoneticMiddleName" .=) <$> _nPhoneticMiddleName,
("phoneticFamilyName" .=) <$> _nPhoneticFamilyName,
("phoneticHonorificPrefix" .=) <$>
_nPhoneticHonorificPrefix,
("honorificPrefix" .=) <$> _nHonorificPrefix,
("familyName" .=) <$> _nFamilyName,
("metadata" .=) <$> _nMetadata,
("displayName" .=) <$> _nDisplayName,
("phoneticGivenName" .=) <$> _nPhoneticGivenName,
("honorificSuffix" .=) <$> _nHonorificSuffix])
data FieldMetadata = FieldMetadata'
{ _fmVerified :: !(Maybe Bool)
, _fmPrimary :: !(Maybe Bool)
, _fmSource :: !(Maybe Source)
} deriving (Eq,Show,Data,Typeable,Generic)
fieldMetadata
:: FieldMetadata
fieldMetadata =
FieldMetadata'
{ _fmVerified = Nothing
, _fmPrimary = Nothing
, _fmSource = Nothing
}
fmVerified :: Lens' FieldMetadata (Maybe Bool)
fmVerified
= lens _fmVerified (\ s a -> s{_fmVerified = a})
fmPrimary :: Lens' FieldMetadata (Maybe Bool)
fmPrimary
= lens _fmPrimary (\ s a -> s{_fmPrimary = a})
fmSource :: Lens' FieldMetadata (Maybe Source)
fmSource = lens _fmSource (\ s a -> s{_fmSource = a})
instance FromJSON FieldMetadata where
parseJSON
= withObject "FieldMetadata"
(\ o ->
FieldMetadata' <$>
(o .:? "verified") <*> (o .:? "primary") <*>
(o .:? "source"))
instance ToJSON FieldMetadata where
toJSON FieldMetadata'{..}
= object
(catMaybes
[("verified" .=) <$> _fmVerified,
("primary" .=) <$> _fmPrimary,
("source" .=) <$> _fmSource])
data PhoneNumber = PhoneNumber'
{ _pnCanonicalForm :: !(Maybe Text)
, _pnValue :: !(Maybe Text)
, _pnMetadata :: !(Maybe FieldMetadata)
, _pnType :: !(Maybe Text)
, _pnFormattedType :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
phoneNumber
:: PhoneNumber
phoneNumber =
PhoneNumber'
{ _pnCanonicalForm = Nothing
, _pnValue = Nothing
, _pnMetadata = Nothing
, _pnType = Nothing
, _pnFormattedType = Nothing
}
pnCanonicalForm :: Lens' PhoneNumber (Maybe Text)
pnCanonicalForm
= lens _pnCanonicalForm
(\ s a -> s{_pnCanonicalForm = a})
pnValue :: Lens' PhoneNumber (Maybe Text)
pnValue = lens _pnValue (\ s a -> s{_pnValue = a})
pnMetadata :: Lens' PhoneNumber (Maybe FieldMetadata)
pnMetadata
= lens _pnMetadata (\ s a -> s{_pnMetadata = a})
pnType :: Lens' PhoneNumber (Maybe Text)
pnType = lens _pnType (\ s a -> s{_pnType = a})
pnFormattedType :: Lens' PhoneNumber (Maybe Text)
pnFormattedType
= lens _pnFormattedType
(\ s a -> s{_pnFormattedType = a})
instance FromJSON PhoneNumber where
parseJSON
= withObject "PhoneNumber"
(\ o ->
PhoneNumber' <$>
(o .:? "canonicalForm") <*> (o .:? "value") <*>
(o .:? "metadata")
<*> (o .:? "type")
<*> (o .:? "formattedType"))
instance ToJSON PhoneNumber where
toJSON PhoneNumber'{..}
= object
(catMaybes
[("canonicalForm" .=) <$> _pnCanonicalForm,
("value" .=) <$> _pnValue,
("metadata" .=) <$> _pnMetadata,
("type" .=) <$> _pnType,
("formattedType" .=) <$> _pnFormattedType])
data Occupation = Occupation'
{ _oValue :: !(Maybe Text)
, _oMetadata :: !(Maybe FieldMetadata)
} deriving (Eq,Show,Data,Typeable,Generic)
occupation
:: Occupation
occupation =
Occupation'
{ _oValue = Nothing
, _oMetadata = Nothing
}
oValue :: Lens' Occupation (Maybe Text)
oValue = lens _oValue (\ s a -> s{_oValue = a})
oMetadata :: Lens' Occupation (Maybe FieldMetadata)
oMetadata
= lens _oMetadata (\ s a -> s{_oMetadata = a})
instance FromJSON Occupation where
parseJSON
= withObject "Occupation"
(\ o ->
Occupation' <$>
(o .:? "value") <*> (o .:? "metadata"))
instance ToJSON Occupation where
toJSON Occupation'{..}
= object
(catMaybes
[("value" .=) <$> _oValue,
("metadata" .=) <$> _oMetadata])
data EmailAddress = EmailAddress'
{ _eaValue :: !(Maybe Text)
, _eaMetadata :: !(Maybe FieldMetadata)
, _eaType :: !(Maybe Text)
, _eaFormattedType :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
emailAddress
:: EmailAddress
emailAddress =
EmailAddress'
{ _eaValue = Nothing
, _eaMetadata = Nothing
, _eaType = Nothing
, _eaFormattedType = Nothing
}
eaValue :: Lens' EmailAddress (Maybe Text)
eaValue = lens _eaValue (\ s a -> s{_eaValue = a})
eaMetadata :: Lens' EmailAddress (Maybe FieldMetadata)
eaMetadata
= lens _eaMetadata (\ s a -> s{_eaMetadata = a})
eaType :: Lens' EmailAddress (Maybe Text)
eaType = lens _eaType (\ s a -> s{_eaType = a})
eaFormattedType :: Lens' EmailAddress (Maybe Text)
eaFormattedType
= lens _eaFormattedType
(\ s a -> s{_eaFormattedType = a})
instance FromJSON EmailAddress where
parseJSON
= withObject "EmailAddress"
(\ o ->
EmailAddress' <$>
(o .:? "value") <*> (o .:? "metadata") <*>
(o .:? "type")
<*> (o .:? "formattedType"))
instance ToJSON EmailAddress where
toJSON EmailAddress'{..}
= object
(catMaybes
[("value" .=) <$> _eaValue,
("metadata" .=) <$> _eaMetadata,
("type" .=) <$> _eaType,
("formattedType" .=) <$> _eaFormattedType])
data Source = Source'
{ _sId :: !(Maybe Text)
, _sType :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
source
:: Source
source =
Source'
{ _sId = Nothing
, _sType = Nothing
}
sId :: Lens' Source (Maybe Text)
sId = lens _sId (\ s a -> s{_sId = a})
sType :: Lens' Source (Maybe Text)
sType = lens _sType (\ s a -> s{_sType = a})
instance FromJSON Source where
parseJSON
= withObject "Source"
(\ o -> Source' <$> (o .:? "id") <*> (o .:? "type"))
instance ToJSON Source where
toJSON Source'{..}
= object
(catMaybes
[("id" .=) <$> _sId, ("type" .=) <$> _sType])
data ImClient = ImClient'
{ _icFormattedProtocol :: !(Maybe Text)
, _icUsername :: !(Maybe Text)
, _icProtocol :: !(Maybe Text)
, _icMetadata :: !(Maybe FieldMetadata)
, _icType :: !(Maybe Text)
, _icFormattedType :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
imClient
:: ImClient
imClient =
ImClient'
{ _icFormattedProtocol = Nothing
, _icUsername = Nothing
, _icProtocol = Nothing
, _icMetadata = Nothing
, _icType = Nothing
, _icFormattedType = Nothing
}
icFormattedProtocol :: Lens' ImClient (Maybe Text)
icFormattedProtocol
= lens _icFormattedProtocol
(\ s a -> s{_icFormattedProtocol = a})
icUsername :: Lens' ImClient (Maybe Text)
icUsername
= lens _icUsername (\ s a -> s{_icUsername = a})
icProtocol :: Lens' ImClient (Maybe Text)
icProtocol
= lens _icProtocol (\ s a -> s{_icProtocol = a})
icMetadata :: Lens' ImClient (Maybe FieldMetadata)
icMetadata
= lens _icMetadata (\ s a -> s{_icMetadata = a})
icType :: Lens' ImClient (Maybe Text)
icType = lens _icType (\ s a -> s{_icType = a})
icFormattedType :: Lens' ImClient (Maybe Text)
icFormattedType
= lens _icFormattedType
(\ s a -> s{_icFormattedType = a})
instance FromJSON ImClient where
parseJSON
= withObject "ImClient"
(\ o ->
ImClient' <$>
(o .:? "formattedProtocol") <*> (o .:? "username")
<*> (o .:? "protocol")
<*> (o .:? "metadata")
<*> (o .:? "type")
<*> (o .:? "formattedType"))
instance ToJSON ImClient where
toJSON ImClient'{..}
= object
(catMaybes
[("formattedProtocol" .=) <$> _icFormattedProtocol,
("username" .=) <$> _icUsername,
("protocol" .=) <$> _icProtocol,
("metadata" .=) <$> _icMetadata,
("type" .=) <$> _icType,
("formattedType" .=) <$> _icFormattedType])
data PersonMetadata = PersonMetadata'
{ _pmPreviousResourceNames :: !(Maybe [Text])
, _pmObjectType :: !(Maybe Text)
, _pmSources :: !(Maybe [Source])
, _pmDeleted :: !(Maybe Bool)
} deriving (Eq,Show,Data,Typeable,Generic)
personMetadata
:: PersonMetadata
personMetadata =
PersonMetadata'
{ _pmPreviousResourceNames = Nothing
, _pmObjectType = Nothing
, _pmSources = Nothing
, _pmDeleted = Nothing
}
pmPreviousResourceNames :: Lens' PersonMetadata [Text]
pmPreviousResourceNames
= lens _pmPreviousResourceNames
(\ s a -> s{_pmPreviousResourceNames = a})
. _Default
. _Coerce
pmObjectType :: Lens' PersonMetadata (Maybe Text)
pmObjectType
= lens _pmObjectType (\ s a -> s{_pmObjectType = a})
pmSources :: Lens' PersonMetadata [Source]
pmSources
= lens _pmSources (\ s a -> s{_pmSources = a}) .
_Default
. _Coerce
pmDeleted :: Lens' PersonMetadata (Maybe Bool)
pmDeleted
= lens _pmDeleted (\ s a -> s{_pmDeleted = a})
instance FromJSON PersonMetadata where
parseJSON
= withObject "PersonMetadata"
(\ o ->
PersonMetadata' <$>
(o .:? "previousResourceNames" .!= mempty) <*>
(o .:? "objectType")
<*> (o .:? "sources" .!= mempty)
<*> (o .:? "deleted"))
instance ToJSON PersonMetadata where
toJSON PersonMetadata'{..}
= object
(catMaybes
[("previousResourceNames" .=) <$>
_pmPreviousResourceNames,
("objectType" .=) <$> _pmObjectType,
("sources" .=) <$> _pmSources,
("deleted" .=) <$> _pmDeleted])
data Nickname = Nickname'
{ _nicValue :: !(Maybe Text)
, _nicMetadata :: !(Maybe FieldMetadata)
, _nicType :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
nickname
:: Nickname
nickname =
Nickname'
{ _nicValue = Nothing
, _nicMetadata = Nothing
, _nicType = Nothing
}
nicValue :: Lens' Nickname (Maybe Text)
nicValue = lens _nicValue (\ s a -> s{_nicValue = a})
nicMetadata :: Lens' Nickname (Maybe FieldMetadata)
nicMetadata
= lens _nicMetadata (\ s a -> s{_nicMetadata = a})
nicType :: Lens' Nickname (Maybe Text)
nicType = lens _nicType (\ s a -> s{_nicType = a})
instance FromJSON Nickname where
parseJSON
= withObject "Nickname"
(\ o ->
Nickname' <$>
(o .:? "value") <*> (o .:? "metadata") <*>
(o .:? "type"))
instance ToJSON Nickname where
toJSON Nickname'{..}
= object
(catMaybes
[("value" .=) <$> _nicValue,
("metadata" .=) <$> _nicMetadata,
("type" .=) <$> _nicType])
data Organization = Organization'
{ _orgDePartment :: !(Maybe Text)
, _orgLocation :: !(Maybe Text)
, _orgDomain :: !(Maybe Text)
, _orgEndDate :: !(Maybe Date)
, _orgSymbol :: !(Maybe Text)
, _orgJobDescription :: !(Maybe Text)
, _orgCurrent :: !(Maybe Bool)
, _orgStartDate :: !(Maybe Date)
, _orgName :: !(Maybe Text)
, _orgMetadata :: !(Maybe FieldMetadata)
, _orgPhoneticName :: !(Maybe Text)
, _orgTitle :: !(Maybe Text)
, _orgType :: !(Maybe Text)
, _orgFormattedType :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
organization
:: Organization
organization =
Organization'
{ _orgDePartment = Nothing
, _orgLocation = Nothing
, _orgDomain = Nothing
, _orgEndDate = Nothing
, _orgSymbol = Nothing
, _orgJobDescription = Nothing
, _orgCurrent = Nothing
, _orgStartDate = Nothing
, _orgName = Nothing
, _orgMetadata = Nothing
, _orgPhoneticName = Nothing
, _orgTitle = Nothing
, _orgType = Nothing
, _orgFormattedType = Nothing
}
orgDePartment :: Lens' Organization (Maybe Text)
orgDePartment
= lens _orgDePartment
(\ s a -> s{_orgDePartment = a})
orgLocation :: Lens' Organization (Maybe Text)
orgLocation
= lens _orgLocation (\ s a -> s{_orgLocation = a})
orgDomain :: Lens' Organization (Maybe Text)
orgDomain
= lens _orgDomain (\ s a -> s{_orgDomain = a})
orgEndDate :: Lens' Organization (Maybe Date)
orgEndDate
= lens _orgEndDate (\ s a -> s{_orgEndDate = a})
orgSymbol :: Lens' Organization (Maybe Text)
orgSymbol
= lens _orgSymbol (\ s a -> s{_orgSymbol = a})
orgJobDescription :: Lens' Organization (Maybe Text)
orgJobDescription
= lens _orgJobDescription
(\ s a -> s{_orgJobDescription = a})
orgCurrent :: Lens' Organization (Maybe Bool)
orgCurrent
= lens _orgCurrent (\ s a -> s{_orgCurrent = a})
orgStartDate :: Lens' Organization (Maybe Date)
orgStartDate
= lens _orgStartDate (\ s a -> s{_orgStartDate = a})
orgName :: Lens' Organization (Maybe Text)
orgName = lens _orgName (\ s a -> s{_orgName = a})
orgMetadata :: Lens' Organization (Maybe FieldMetadata)
orgMetadata
= lens _orgMetadata (\ s a -> s{_orgMetadata = a})
orgPhoneticName :: Lens' Organization (Maybe Text)
orgPhoneticName
= lens _orgPhoneticName
(\ s a -> s{_orgPhoneticName = a})
orgTitle :: Lens' Organization (Maybe Text)
orgTitle = lens _orgTitle (\ s a -> s{_orgTitle = a})
orgType :: Lens' Organization (Maybe Text)
orgType = lens _orgType (\ s a -> s{_orgType = a})
orgFormattedType :: Lens' Organization (Maybe Text)
orgFormattedType
= lens _orgFormattedType
(\ s a -> s{_orgFormattedType = a})
instance FromJSON Organization where
parseJSON
= withObject "Organization"
(\ o ->
Organization' <$>
(o .:? "department") <*> (o .:? "location") <*>
(o .:? "domain")
<*> (o .:? "endDate")
<*> (o .:? "symbol")
<*> (o .:? "jobDescription")
<*> (o .:? "current")
<*> (o .:? "startDate")
<*> (o .:? "name")
<*> (o .:? "metadata")
<*> (o .:? "phoneticName")
<*> (o .:? "title")
<*> (o .:? "type")
<*> (o .:? "formattedType"))
instance ToJSON Organization where
toJSON Organization'{..}
= object
(catMaybes
[("department" .=) <$> _orgDePartment,
("location" .=) <$> _orgLocation,
("domain" .=) <$> _orgDomain,
("endDate" .=) <$> _orgEndDate,
("symbol" .=) <$> _orgSymbol,
("jobDescription" .=) <$> _orgJobDescription,
("current" .=) <$> _orgCurrent,
("startDate" .=) <$> _orgStartDate,
("name" .=) <$> _orgName,
("metadata" .=) <$> _orgMetadata,
("phoneticName" .=) <$> _orgPhoneticName,
("title" .=) <$> _orgTitle, ("type" .=) <$> _orgType,
("formattedType" .=) <$> _orgFormattedType])
data Interest = Interest'
{ _iValue :: !(Maybe Text)
, _iMetadata :: !(Maybe FieldMetadata)
} deriving (Eq,Show,Data,Typeable,Generic)
interest
:: Interest
interest =
Interest'
{ _iValue = Nothing
, _iMetadata = Nothing
}
iValue :: Lens' Interest (Maybe Text)
iValue = lens _iValue (\ s a -> s{_iValue = a})
iMetadata :: Lens' Interest (Maybe FieldMetadata)
iMetadata
= lens _iMetadata (\ s a -> s{_iMetadata = a})
instance FromJSON Interest where
parseJSON
= withObject "Interest"
(\ o ->
Interest' <$> (o .:? "value") <*> (o .:? "metadata"))
instance ToJSON Interest where
toJSON Interest'{..}
= object
(catMaybes
[("value" .=) <$> _iValue,
("metadata" .=) <$> _iMetadata])
data PersonResponse = PersonResponse'
{ _prRequestedResourceName :: !(Maybe Text)
, _prPerson :: !(Maybe Person)
, _prHTTPStatusCode :: !(Maybe (Textual Int32))
} deriving (Eq,Show,Data,Typeable,Generic)
personResponse
:: PersonResponse
personResponse =
PersonResponse'
{ _prRequestedResourceName = Nothing
, _prPerson = Nothing
, _prHTTPStatusCode = Nothing
}
prRequestedResourceName :: Lens' PersonResponse (Maybe Text)
prRequestedResourceName
= lens _prRequestedResourceName
(\ s a -> s{_prRequestedResourceName = a})
prPerson :: Lens' PersonResponse (Maybe Person)
prPerson = lens _prPerson (\ s a -> s{_prPerson = a})
prHTTPStatusCode :: Lens' PersonResponse (Maybe Int32)
prHTTPStatusCode
= lens _prHTTPStatusCode
(\ s a -> s{_prHTTPStatusCode = a})
. mapping _Coerce
instance FromJSON PersonResponse where
parseJSON
= withObject "PersonResponse"
(\ o ->
PersonResponse' <$>
(o .:? "requestedResourceName") <*> (o .:? "person")
<*> (o .:? "httpStatusCode"))
instance ToJSON PersonResponse where
toJSON PersonResponse'{..}
= object
(catMaybes
[("requestedResourceName" .=) <$>
_prRequestedResourceName,
("person" .=) <$> _prPerson,
("httpStatusCode" .=) <$> _prHTTPStatusCode])
data Skill = Skill'
{ _sValue :: !(Maybe Text)
, _sMetadata :: !(Maybe FieldMetadata)
} deriving (Eq,Show,Data,Typeable,Generic)
skill
:: Skill
skill =
Skill'
{ _sValue = Nothing
, _sMetadata = Nothing
}
sValue :: Lens' Skill (Maybe Text)
sValue = lens _sValue (\ s a -> s{_sValue = a})
sMetadata :: Lens' Skill (Maybe FieldMetadata)
sMetadata
= lens _sMetadata (\ s a -> s{_sMetadata = a})
instance FromJSON Skill where
parseJSON
= withObject "Skill"
(\ o ->
Skill' <$> (o .:? "value") <*> (o .:? "metadata"))
instance ToJSON Skill where
toJSON Skill'{..}
= object
(catMaybes
[("value" .=) <$> _sValue,
("metadata" .=) <$> _sMetadata])
data Biography = Biography'
{ _bioValue :: !(Maybe Text)
, _bioMetadata :: !(Maybe FieldMetadata)
} deriving (Eq,Show,Data,Typeable,Generic)
biography
:: Biography
biography =
Biography'
{ _bioValue = Nothing
, _bioMetadata = Nothing
}
bioValue :: Lens' Biography (Maybe Text)
bioValue = lens _bioValue (\ s a -> s{_bioValue = a})
bioMetadata :: Lens' Biography (Maybe FieldMetadata)
bioMetadata
= lens _bioMetadata (\ s a -> s{_bioMetadata = a})
instance FromJSON Biography where
parseJSON
= withObject "Biography"
(\ o ->
Biography' <$>
(o .:? "value") <*> (o .:? "metadata"))
instance ToJSON Biography where
toJSON Biography'{..}
= object
(catMaybes
[("value" .=) <$> _bioValue,
("metadata" .=) <$> _bioMetadata])
data CoverPhoto = CoverPhoto'
{ _cpDefault :: !(Maybe Bool)
, _cpURL :: !(Maybe Text)
, _cpMetadata :: !(Maybe FieldMetadata)
} deriving (Eq,Show,Data,Typeable,Generic)
coverPhoto
:: CoverPhoto
coverPhoto =
CoverPhoto'
{ _cpDefault = Nothing
, _cpURL = Nothing
, _cpMetadata = Nothing
}
cpDefault :: Lens' CoverPhoto (Maybe Bool)
cpDefault
= lens _cpDefault (\ s a -> s{_cpDefault = a})
cpURL :: Lens' CoverPhoto (Maybe Text)
cpURL = lens _cpURL (\ s a -> s{_cpURL = a})
cpMetadata :: Lens' CoverPhoto (Maybe FieldMetadata)
cpMetadata
= lens _cpMetadata (\ s a -> s{_cpMetadata = a})
instance FromJSON CoverPhoto where
parseJSON
= withObject "CoverPhoto"
(\ o ->
CoverPhoto' <$>
(o .:? "default") <*> (o .:? "url") <*>
(o .:? "metadata"))
instance ToJSON CoverPhoto where
toJSON CoverPhoto'{..}
= object
(catMaybes
[("default" .=) <$> _cpDefault,
("url" .=) <$> _cpURL,
("metadata" .=) <$> _cpMetadata])