on develop help sign in
Generating people API library
commit9465e3511bd0d632be3bfcef1773600373cfc5a9 authorBrendan Hay <brendan.g.hay@gmail.com> dateFri 18 Mar 2016, 15:46 (11 years ago) parentb3fd66a
13 files changed+4588
gogol-people/LICENSE+367 gogol-people/Makefile+1 gogol-people/README.md+28 gogol-people/Setup.hs+2 gogol-people/gen/Network/Google/People.hs+362 gogol-people/gen/Network/Google/People/Types.hs+372 gogol-people/gen/Network/Google/People/Types/Product.hs+2764 gogol-people/gen/Network/Google/People/Types/Sum.hs+19 gogol-people/gen/Network/Google/Resource/People/People/Connections/List.hs+242 gogol-people/gen/Network/Google/Resource/People/People/Get.hs+187 gogol-people/gen/Network/Google/Resource/People/People/GetBatchGet.hs+195 gogol-people/gogol-people.cabal+49 gogol-people/src/.gitkeep
gogol-people/LICENSEnew file+367
@@ -0,0 +1,367 @@
1+Mozilla Public License Version 2.0
2+==================================
3+
4+1. Definitions
5+--------------
6+
7+1.1. "Contributor"
8+ means each individual or legal entity that creates, contributes to
9+ the creation of, or owns Covered Software.
10+
11+1.2. "Contributor Version"
12+ means the combination of the Contributions of others (if any) used
13+ by a Contributor and that particular Contributor's Contribution.
14+
15+1.3. "Contribution"
16+ means Covered Software of a particular Contributor.
17+
18+1.4. "Covered Software"
19+ means Source Code Form to which the initial Contributor has attached
20+ the notice in Exhibit A, the Executable Form of such Source Code
21+ Form, and Modifications of such Source Code Form, in each case
22+ including portions thereof.
23+
24+1.5. "Incompatible With Secondary Licenses"
25+ means
26+
27+ (a) that the initial Contributor has attached the notice described
28+ in Exhibit B to the Covered Software; or
29+
30+ (b) that the Covered Software was made available under the terms of
31+ version 1.1 or earlier of the License, but not also under the
32+ terms of a Secondary License.
33+
34+1.6. "Executable Form"
35+ means any form of the work other than Source Code Form.
36+
37+1.7. "Larger Work"
38+ means a work that combines Covered Software with other material, in
39+ a separate file or files, that is not Covered Software.
40+
41+1.8. "License"
42+ means this document.
43+
44+1.9. "Licensable"
45+ means having the right to grant, to the maximum extent possible,
46+ whether at the time of the initial grant or subsequently, any and
47+ all of the rights conveyed by this License.
48+
49+1.10. "Modifications"
50+ means any of the following:
51+
52+ (a) any file in Source Code Form that results from an addition to,
53+ deletion from, or modification of the contents of Covered
54+ Software; or
55+
56+ (b) any new file in Source Code Form that contains any Covered
57+ Software.
58+
59+1.11. "Patent Claims" of a Contributor
60+ means any patent claim(s), including without limitation, method,
61+ process, and apparatus claims, in any patent Licensable by such
62+ Contributor that would be infringed, but for the grant of the
63+ License, by the making, using, selling, offering for sale, having
64+ made, import, or transfer of either its Contributions or its
65+ Contributor Version.
66+
67+1.12. "Secondary License"
68+ means either the GNU General Public License, Version 2.0, the GNU
69+ Lesser General Public License, Version 2.1, the GNU Affero General
70+ Public License, Version 3.0, or any later versions of those
71+ licenses.
72+
73+1.13. "Source Code Form"
74+ means the form of the work preferred for making modifications.
75+
76+1.14. "You" (or "Your")
77+ means an individual or a legal entity exercising rights under this
78+ License. For legal entities, "You" includes any entity that
79+ controls, is controlled by, or is under common control with You. For
80+ purposes of this definition, "control" means (a) the power, direct
81+ or indirect, to cause the direction or management of such entity,
82+ whether by contract or otherwise, or (b) ownership of more than
83+ fifty percent (50%) of the outstanding shares or beneficial
84+ ownership of such entity.
85+
86+2. License Grants and Conditions
87+--------------------------------
88+
89+2.1. Grants
90+
91+Each Contributor hereby grants You a world-wide, royalty-free,
92+non-exclusive license:
93+
94+(a) under intellectual property rights (other than patent or trademark)
95+ Licensable by such Contributor to use, reproduce, make available,
96+ modify, display, perform, distribute, and otherwise exploit its
97+ Contributions, either on an unmodified basis, with Modifications, or
98+ as part of a Larger Work; and
99+
100+(b) under Patent Claims of such Contributor to make, use, sell, offer
101+ for sale, have made, import, and otherwise transfer either its
102+ Contributions or its Contributor Version.
103+
104+2.2. Effective Date
105+
106+The licenses granted in Section 2.1 with respect to any Contribution
107+become effective for each Contribution on the date the Contributor first
108+distributes such Contribution.
109+
110+2.3. Limitations on Grant Scope
111+
112+The licenses granted in this Section 2 are the only rights granted under
113+this License. No additional rights or licenses will be implied from the
114+distribution or licensing of Covered Software under this License.
115+Notwithstanding Section 2.1(b) above, no patent license is granted by a
116+Contributor:
117+
118+(a) for any code that a Contributor has removed from Covered Software;
119+ or
120+
121+(b) for infringements caused by: (i) Your and any other third party's
122+ modifications of Covered Software, or (ii) the combination of its
123+ Contributions with other software (except as part of its Contributor
124+ Version); or
125+
126+(c) under Patent Claims infringed by Covered Software in the absence of
127+ its Contributions.
128+
129+This License does not grant any rights in the trademarks, service marks,
130+or logos of any Contributor (except as may be necessary to comply with
131+the notice requirements in Section 3.4).
132+
133+2.4. Subsequent Licenses
134+
135+No Contributor makes additional grants as a result of Your choice to
136+distribute the Covered Software under a subsequent version of this
137+License (see Section 10.2) or under the terms of a Secondary License (if
138+permitted under the terms of Section 3.3).
139+
140+2.5. Representation
141+
142+Each Contributor represents that the Contributor believes its
143+Contributions are its original creation(s) or it has sufficient rights
144+to grant the rights to its Contributions conveyed by this License.
145+
146+2.6. Fair Use
147+
148+This License is not intended to limit any rights You have under
149+applicable copyright doctrines of fair use, fair dealing, or other
150+equivalents.
151+
152+2.7. Conditions
153+
154+Sections 3.1, 3.2, 3.3, and 3.4 are conditions of the licenses granted
155+in Section 2.1.
156+
157+3. Responsibilities
158+-------------------
159+
160+3.1. Distribution of Source Form
161+
162+All distribution of Covered Software in Source Code Form, including any
163+Modifications that You create or to which You contribute, must be under
164+the terms of this License. You must inform recipients that the Source
165+Code Form of the Covered Software is governed by the terms of this
166+License, and how they can obtain a copy of this License. You may not
167+attempt to alter or restrict the recipients' rights in the Source Code
168+Form.
169+
170+3.2. Distribution of Executable Form
171+
172+If You distribute Covered Software in Executable Form then:
173+
174+(a) such Covered Software must also be made available in Source Code
175+ Form, as described in Section 3.1, and You must inform recipients of
176+ the Executable Form how they can obtain a copy of such Source Code
177+ Form by reasonable means in a timely manner, at a charge no more
178+ than the cost of distribution to the recipient; and
179+
180+(b) You may distribute such Executable Form under the terms of this
181+ License, or sublicense it under different terms, provided that the
182+ license for the Executable Form does not attempt to limit or alter
183+ the recipients' rights in the Source Code Form under this License.
184+
185+3.3. Distribution of a Larger Work
186+
187+You may create and distribute a Larger Work under terms of Your choice,
188+provided that You also comply with the requirements of this License for
189+the Covered Software. If the Larger Work is a combination of Covered
190+Software with a work governed by one or more Secondary Licenses, and the
191+Covered Software is not Incompatible With Secondary Licenses, this
192+License permits You to additionally distribute such Covered Software
193+under the terms of such Secondary License(s), so that the recipient of
194+the Larger Work may, at their option, further distribute the Covered
195+Software under the terms of either this License or such Secondary
196+License(s).
197+
198+3.4. Notices
199+
200+You may not remove or alter the substance of any license notices
201+(including copyright notices, patent notices, disclaimers of warranty,
202+or limitations of liability) contained within the Source Code Form of
203+the Covered Software, except that You may alter any license notices to
204+the extent required to remedy known factual inaccuracies.
205+
206+3.5. Application of Additional Terms
207+
208+You may choose to offer, and to charge a fee for, warranty, support,
209+indemnity or liability obligations to one or more recipients of Covered
210+Software. However, You may do so only on Your own behalf, and not on
211+behalf of any Contributor. You must make it absolutely clear that any
212+such warranty, support, indemnity, or liability obligation is offered by
213+You alone, and You hereby agree to indemnify every Contributor for any
214+liability incurred by such Contributor as a result of warranty, support,
215+indemnity or liability terms You offer. You may include additional
216+disclaimers of warranty and limitations of liability specific to any
217+jurisdiction.
218+
219+4. Inability to Comply Due to Statute or Regulation
220+---------------------------------------------------
221+
222+If it is impossible for You to comply with any of the terms of this
223+License with respect to some or all of the Covered Software due to
224+statute, judicial order, or regulation then You must: (a) comply with
225+the terms of this License to the maximum extent possible; and (b)
226+describe the limitations and the code they affect. Such description must
227+be placed in a text file included with all distributions of the Covered
228+Software under this License. Except to the extent prohibited by statute
229+or regulation, such description must be sufficiently detailed for a
230+recipient of ordinary skill to be able to understand it.
231+
232+5. Termination
233+--------------
234+
235+5.1. The rights granted under this License will terminate automatically
236+if You fail to comply with any of its terms. However, if You become
237+compliant, then the rights granted under this License from a particular
238+Contributor are reinstated (a) provisionally, unless and until such
239+Contributor explicitly and finally terminates Your grants, and (b) on an
240+ongoing basis, if such Contributor fails to notify You of the
241+non-compliance by some reasonable means prior to 60 days after You have
242+come back into compliance. Moreover, Your grants from a particular
243+Contributor are reinstated on an ongoing basis if such Contributor
244+notifies You of the non-compliance by some reasonable means, this is the
245+first time You have received notice of non-compliance with this License
246+from such Contributor, and You become compliant prior to 30 days after
247+Your receipt of the notice.
248+
249+5.2. If You initiate litigation against any entity by asserting a patent
250+infringement claim (excluding declaratory judgment actions,
251+counter-claims, and cross-claims) alleging that a Contributor Version
252+directly or indirectly infringes any patent, then the rights granted to
253+You by any and all Contributors for the Covered Software under Section
254+2.1 of this License shall terminate.
255+
256+5.3. In the event of termination under Sections 5.1 or 5.2 above, all
257+end user license agreements (excluding distributors and resellers) which
258+have been validly granted by You or Your distributors under this License
259+prior to termination shall survive termination.
260+
261+************************************************************************
262+* *
263+* 6. Disclaimer of Warranty *
264+* ------------------------- *
265+* *
266+* Covered Software is provided under this License on an "as is" *
267+* basis, without warranty of any kind, either expressed, implied, or *
268+* statutory, including, without limitation, warranties that the *
269+* Covered Software is free of defects, merchantable, fit for a *
270+* particular purpose or non-infringing. The entire risk as to the *
271+* quality and performance of the Covered Software is with You. *
272+* Should any Covered Software prove defective in any respect, You *
273+* (not any Contributor) assume the cost of any necessary servicing, *
274+* repair, or correction. This disclaimer of warranty constitutes an *
275+* essential part of this License. No use of any Covered Software is *
276+* authorized under this License except under this disclaimer. *
277+* *
278+************************************************************************
279+
280+************************************************************************
281+* *
282+* 7. Limitation of Liability *
283+* -------------------------- *
284+* *
285+* Under no circumstances and under no legal theory, whether tort *
286+* (including negligence), contract, or otherwise, shall any *
287+* Contributor, or anyone who distributes Covered Software as *
288+* permitted above, be liable to You for any direct, indirect, *
289+* special, incidental, or consequential damages of any character *
290+* including, without limitation, damages for lost profits, loss of *
291+* goodwill, work stoppage, computer failure or malfunction, or any *
292+* and all other commercial damages or losses, even if such party *
293+* shall have been informed of the possibility of such damages. This *
294+* limitation of liability shall not apply to liability for death or *
295+* personal injury resulting from such party's negligence to the *
296+* extent applicable law prohibits such limitation. Some *
297+* jurisdictions do not allow the exclusion or limitation of *
298+* incidental or consequential damages, so this exclusion and *
299+* limitation may not apply to You. *
300+* *
301+************************************************************************
302+
303+8. Litigation
304+-------------
305+
306+Any litigation relating to this License may be brought only in the
307+courts of a jurisdiction where the defendant maintains its principal
308+place of business and such litigation shall be governed by laws of that
309+jurisdiction, without reference to its conflict-of-law provisions.
310+Nothing in this Section shall prevent a party's ability to bring
311+cross-claims or counter-claims.
312+
313+9. Miscellaneous
314+----------------
315+
316+This License represents the complete agreement concerning the subject
317+matter hereof. If any provision of this License is held to be
318+unenforceable, such provision shall be reformed only to the extent
319+necessary to make it enforceable. Any law or regulation which provides
320+that the language of a contract shall be construed against the drafter
321+shall not be used to construe this License against a Contributor.
322+
323+10. Versions of the License
324+---------------------------
325+
326+10.1. New Versions
327+
328+Mozilla Foundation is the license steward. Except as provided in Section
329+10.3, no one other than the license steward has the right to modify or
330+publish new versions of this License. Each version will be given a
331+distinguishing version number.
332+
333+10.2. Effect of New Versions
334+
335+You may distribute the Covered Software under the terms of the version
336+of the License under which You originally received the Covered Software,
337+or under the terms of any subsequent version published by the license
338+steward.
339+
340+10.3. Modified Versions
341+
342+If you create software not governed by this License, and you want to
343+create a new license for such software, you may create and use a
344+modified version of this License if you rename the license and remove
345+any references to the name of the license steward (except to note that
346+such modified license differs from this License).
347+
348+10.4. Distributing Source Code Form that is Incompatible With Secondary
349+Licenses
350+
351+If You choose to distribute Source Code Form that is Incompatible With
352+Secondary Licenses under the terms of this version of the License, the
353+notice described in Exhibit B of this License must be attached.
354+
355+Exhibit A - Source Code Form License Notice
356+-------------------------------------------
357+
358+ This Source Code Form is subject to the terms of the Mozilla Public
359+ License, v. 2.0. If a copy of the MPL was not distributed with this
360+ file, You can obtain one at http://mozilla.org/MPL/2.0/.
361+
362+If it is not possible or desirable to put the notice in a particular
363+file, then You may include the notice in a location (such as a LICENSE
364+file in a relevant directory) where a recipient would be likely to look
365+for such a notice.
366+
367+You may add additional accurate notices of copyright ownership.
gogol-people/Makefilenew file+1
@@ -0,0 +1 @@
1+include ../share/library.mk
gogol-people/README.mdnew file+28
@@ -0,0 +1,28 @@
1+# gogol-people
2+
3+* [Version](#version)
4+* [Description](#description)
5+* [Contribute](#contribute)
6+* [Licence](#licence)
7+
8+
9+## Version
10+
11+`0.0.1`
12+
13+
14+## Description
15+
16+A client library for the Google People.
17+
18+
19+## Contribute
20+
21+For any problems, comments, or feedback please create an issue [here on GitHub](https://github.com/brendanhay/gogol/issues).
22+
23+> _Note:_ this library is an auto-generated Haskell package. Please see `gogol-gen` for more information.
24+
25+
26+## Licence
27+
28+`gogol-people` is released under the [Mozilla Public License Version 2.0](http://www.mozilla.org/MPL/).
gogol-people/Setup.hsnew file+2
@@ -0,0 +1,2 @@
1+import Distribution.Simple
2+main = defaultMain
gogol-people/gen/Network/Google/People.hsnew file+362
@@ -0,0 +1,362 @@
1+{-# LANGUAGE DataKinds #-}
2+{-# LANGUAGE NoImplicitPrelude #-}
3+{-# LANGUAGE TypeOperators #-}
4+
5+{-# OPTIONS_GHC -fno-warn-unused-imports #-}
6+{-# OPTIONS_GHC -fno-warn-duplicate-exports #-}
7+
8+-- |
9+-- Module : Network.Google.People
10+-- Copyright : (c) 2015 Brendan Hay
11+-- License : Mozilla Public License, v. 2.0.
12+-- Maintainer : Brendan Hay <brendan.g.hay@gmail.com>
13+-- Stability : auto-generated
14+-- Portability : non-portable (GHC extensions)
15+--
16+-- The Google People API service gives access to information about profiles
17+-- and contacts.
18+--
19+-- /See:/ <https://developers.google.com/people/ Google People API Reference>
20+module Network.Google.People
21+ (
22+ -- * Service Configuration
23+ peopleService
24+
25+ -- * OAuth Scopes
26+ , userBirthdayReadScope
27+ , userinfoProfileScope
28+ , plusLoginScope
29+ , userPhonenumbersReadScope
30+ , userinfoEmailScope
31+ , contactsReadonlyScope
32+ , userAddressesReadScope
33+ , contactsScope
34+ , userEmailsReadScope
35+
36+ -- * API Declaration
37+ , PeopleAPI
38+
39+ -- * Resources
40+
41+ -- ** people.people.connections.list
42+ , module Network.Google.Resource.People.People.Connections.List
43+
44+ -- ** people.people.get
45+ , module Network.Google.Resource.People.People.Get
46+
47+ -- ** people.people.getBatchGet
48+ , module Network.Google.Resource.People.People.GetBatchGet
49+
50+ -- * Types
51+
52+ -- ** Photo
53+ , Photo
54+ , photo
55+ , pURL
56+ , pMetadata
57+
58+ -- ** Event
59+ , Event
60+ , event
61+ , eDate
62+ , eMetadata
63+ , eType
64+ , eFormattedType
65+
66+ -- ** ListConnectionsResponse
67+ , ListConnectionsResponse
68+ , listConnectionsResponse
69+ , lcrNextPageToken
70+ , lcrConnections
71+ , lcrNextSyncToken
72+
73+ -- ** DomainMembership
74+ , DomainMembership
75+ , domainMembership
76+ , dmInViewerDomain
77+
78+ -- ** RelationshipInterest
79+ , RelationshipInterest
80+ , relationshipInterest
81+ , riValue
82+ , riMetadata
83+ , riFormattedValue
84+
85+ -- ** BraggingRights
86+ , BraggingRights
87+ , braggingRights
88+ , brValue
89+ , brMetadata
90+
91+ -- ** Membership
92+ , Membership
93+ , membership
94+ , mDomainMembership
95+ , mContactGroupMembership
96+ , mMetadata
97+
98+ -- ** Person
99+ , Person
100+ , person
101+ , perEmailAddresses
102+ , perAgeRange
103+ , perEtag
104+ , perResidences
105+ , perBiographies
106+ , perTaglines
107+ , perBraggingRights
108+ , perBirthdays
109+ , perResourceName
110+ , perRelations
111+ , perURLs
112+ , perAddresses
113+ , perNicknames
114+ , perRelationshipStatuses
115+ , perImClients
116+ , perPhoneNumbers
117+ , perOccupations
118+ , perNames
119+ , perGenders
120+ , perPhotos
121+ , perEvents
122+ , perCoverPhotos
123+ , perSkills
124+ , perMetadata
125+ , perInterests
126+ , perOrganizations
127+ , perLocales
128+ , perMemberships
129+ , perRelationshipInterests
130+
131+ -- ** ContactGroupMembership
132+ , ContactGroupMembership
133+ , contactGroupMembership
134+ , cgmContactGroupId
135+
136+ -- ** Locale
137+ , Locale
138+ , locale
139+ , lValue
140+ , lMetadata
141+
142+ -- ** RelationshipStatus
143+ , RelationshipStatus
144+ , relationshipStatus
145+ , rsValue
146+ , rsMetadata
147+ , rsFormattedValue
148+
149+ -- ** URL
150+ , URL
151+ , url
152+ , uValue
153+ , uMetadata
154+ , uType
155+ , uFormattedType
156+
157+ -- ** Address
158+ , Address
159+ , address
160+ , aStreetAddress
161+ , aPoBox
162+ , aCountry
163+ , aPostalCode
164+ , aExtendedAddress
165+ , aCity
166+ , aMetadata
167+ , aCountryCode
168+ , aFormattedValue
169+ , aRegion
170+ , aType
171+ , aFormattedType
172+
173+ -- ** Relation
174+ , Relation
175+ , relation
176+ , rPerson
177+ , rMetadata
178+ , rType
179+ , rFormattedType
180+
181+ -- ** GetPeopleResponse
182+ , GetPeopleResponse
183+ , getPeopleResponse
184+ , gprResponses
185+
186+ -- ** Birthday
187+ , Birthday
188+ , birthday
189+ , bText
190+ , bDate
191+ , bMetadata
192+
193+ -- ** Date
194+ , Date
195+ , date
196+ , dDay
197+ , dYear
198+ , dMonth
199+
200+ -- ** Tagline
201+ , Tagline
202+ , tagline
203+ , tValue
204+ , tMetadata
205+
206+ -- ** Residence
207+ , Residence
208+ , residence
209+ , resValue
210+ , resCurrent
211+ , resMetadata
212+
213+ -- ** Gender
214+ , Gender
215+ , gender
216+ , gValue
217+ , gMetadata
218+ , gFormattedValue
219+
220+ -- ** Name
221+ , Name
222+ , name
223+ , nGivenName
224+ , nPhoneticHonorificSuffix
225+ , nMiddleName
226+ , nPhoneticMiddleName
227+ , nPhoneticFamilyName
228+ , nPhoneticHonorificPrefix
229+ , nHonorificPrefix
230+ , nFamilyName
231+ , nMetadata
232+ , nDisplayName
233+ , nPhoneticGivenName
234+ , nHonorificSuffix
235+
236+ -- ** FieldMetadata
237+ , FieldMetadata
238+ , fieldMetadata
239+ , fmVerified
240+ , fmPrimary
241+ , fmSource
242+
243+ -- ** PhoneNumber
244+ , PhoneNumber
245+ , phoneNumber
246+ , pnCanonicalForm
247+ , pnValue
248+ , pnMetadata
249+ , pnType
250+ , pnFormattedType
251+
252+ -- ** Occupation
253+ , Occupation
254+ , occupation
255+ , oValue
256+ , oMetadata
257+
258+ -- ** EmailAddress
259+ , EmailAddress
260+ , emailAddress
261+ , eaValue
262+ , eaMetadata
263+ , eaType
264+ , eaFormattedType
265+
266+ -- ** Source
267+ , Source
268+ , source
269+ , sId
270+ , sType
271+
272+ -- ** ImClient
273+ , ImClient
274+ , imClient
275+ , icFormattedProtocol
276+ , icUsername
277+ , icProtocol
278+ , icMetadata
279+ , icType
280+ , icFormattedType
281+
282+ -- ** PersonMetadata
283+ , PersonMetadata
284+ , personMetadata
285+ , pmPreviousResourceNames
286+ , pmObjectType
287+ , pmSources
288+ , pmDeleted
289+
290+ -- ** Nickname
291+ , Nickname
292+ , nickname
293+ , nicValue
294+ , nicMetadata
295+ , nicType
296+
297+ -- ** Organization
298+ , Organization
299+ , organization
300+ , orgDePartment
301+ , orgLocation
302+ , orgDomain
303+ , orgEndDate
304+ , orgSymbol
305+ , orgJobDescription
306+ , orgCurrent
307+ , orgStartDate
308+ , orgName
309+ , orgMetadata
310+ , orgPhoneticName
311+ , orgTitle
312+ , orgType
313+ , orgFormattedType
314+
315+ -- ** Interest
316+ , Interest
317+ , interest
318+ , iValue
319+ , iMetadata
320+
321+ -- ** PersonResponse
322+ , PersonResponse
323+ , personResponse
324+ , prRequestedResourceName
325+ , prPerson
326+ , prHTTPStatusCode
327+
328+ -- ** Skill
329+ , Skill
330+ , skill
331+ , sValue
332+ , sMetadata
333+
334+ -- ** Biography
335+ , Biography
336+ , biography
337+ , bioValue
338+ , bioMetadata
339+
340+ -- ** CoverPhoto
341+ , CoverPhoto
342+ , coverPhoto
343+ , cpDefault
344+ , cpURL
345+ , cpMetadata
346+ ) where
347+
348+import Network.Google.People.Types
349+import Network.Google.Prelude
350+import Network.Google.Resource.People.People.Connections.List
351+import Network.Google.Resource.People.People.Get
352+import Network.Google.Resource.People.People.GetBatchGet
353+
354+{- $resources
355+TODO
356+-}
357+
358+-- | Represents the entirety of the methods and resources available for the Google People API service.
359+type PeopleAPI =
360+ PeopleConnectionsListResource :<|>
361+ PeopleGetBatchGetResource
362+ :<|> PeopleGetResource
gogol-people/gen/Network/Google/People/Types.hsnew file+372
@@ -0,0 +1,372 @@
1+{-# LANGUAGE DeriveDataTypeable #-}
2+{-# LANGUAGE DeriveGeneric #-}
3+{-# LANGUAGE NoImplicitPrelude #-}
4+{-# LANGUAGE OverloadedStrings #-}
5+
6+{-# OPTIONS_GHC -fno-warn-unused-imports #-}
7+
8+-- |
9+-- Module : Network.Google.People.Types
10+-- Copyright : (c) 2015 Brendan Hay
11+-- License : Mozilla Public License, v. 2.0.
12+-- Maintainer : Brendan Hay <brendan.g.hay@gmail.com>
13+-- Stability : auto-generated
14+-- Portability : non-portable (GHC extensions)
15+--
16+module Network.Google.People.Types
17+ (
18+ -- * Service Configuration
19+ peopleService
20+
21+ -- * OAuth Scopes
22+ , userBirthdayReadScope
23+ , userinfoProfileScope
24+ , plusLoginScope
25+ , userPhonenumbersReadScope
26+ , userinfoEmailScope
27+ , contactsReadonlyScope
28+ , userAddressesReadScope
29+ , contactsScope
30+ , userEmailsReadScope
31+
32+ -- * Photo
33+ , Photo
34+ , photo
35+ , pURL
36+ , pMetadata
37+
38+ -- * Event
39+ , Event
40+ , event
41+ , eDate
42+ , eMetadata
43+ , eType
44+ , eFormattedType
45+
46+ -- * ListConnectionsResponse
47+ , ListConnectionsResponse
48+ , listConnectionsResponse
49+ , lcrNextPageToken
50+ , lcrConnections
51+ , lcrNextSyncToken
52+
53+ -- * DomainMembership
54+ , DomainMembership
55+ , domainMembership
56+ , dmInViewerDomain
57+
58+ -- * RelationshipInterest
59+ , RelationshipInterest
60+ , relationshipInterest
61+ , riValue
62+ , riMetadata
63+ , riFormattedValue
64+
65+ -- * BraggingRights
66+ , BraggingRights
67+ , braggingRights
68+ , brValue
69+ , brMetadata
70+
71+ -- * Membership
72+ , Membership
73+ , membership
74+ , mDomainMembership
75+ , mContactGroupMembership
76+ , mMetadata
77+
78+ -- * Person
79+ , Person
80+ , person
81+ , perEmailAddresses
82+ , perAgeRange
83+ , perEtag
84+ , perResidences
85+ , perBiographies
86+ , perTaglines
87+ , perBraggingRights
88+ , perBirthdays
89+ , perResourceName
90+ , perRelations
91+ , perURLs
92+ , perAddresses
93+ , perNicknames
94+ , perRelationshipStatuses
95+ , perImClients
96+ , perPhoneNumbers
97+ , perOccupations
98+ , perNames
99+ , perGenders
100+ , perPhotos
101+ , perEvents
102+ , perCoverPhotos
103+ , perSkills
104+ , perMetadata
105+ , perInterests
106+ , perOrganizations
107+ , perLocales
108+ , perMemberships
109+ , perRelationshipInterests
110+
111+ -- * ContactGroupMembership
112+ , ContactGroupMembership
113+ , contactGroupMembership
114+ , cgmContactGroupId
115+
116+ -- * Locale
117+ , Locale
118+ , locale
119+ , lValue
120+ , lMetadata
121+
122+ -- * RelationshipStatus
123+ , RelationshipStatus
124+ , relationshipStatus
125+ , rsValue
126+ , rsMetadata
127+ , rsFormattedValue
128+
129+ -- * URL
130+ , URL
131+ , url
132+ , uValue
133+ , uMetadata
134+ , uType
135+ , uFormattedType
136+
137+ -- * Address
138+ , Address
139+ , address
140+ , aStreetAddress
141+ , aPoBox
142+ , aCountry
143+ , aPostalCode
144+ , aExtendedAddress
145+ , aCity
146+ , aMetadata
147+ , aCountryCode
148+ , aFormattedValue
149+ , aRegion
150+ , aType
151+ , aFormattedType
152+
153+ -- * Relation
154+ , Relation
155+ , relation
156+ , rPerson
157+ , rMetadata
158+ , rType
159+ , rFormattedType
160+
161+ -- * GetPeopleResponse
162+ , GetPeopleResponse
163+ , getPeopleResponse
164+ , gprResponses
165+
166+ -- * Birthday
167+ , Birthday
168+ , birthday
169+ , bText
170+ , bDate
171+ , bMetadata
172+
173+ -- * Date
174+ , Date
175+ , date
176+ , dDay
177+ , dYear
178+ , dMonth
179+
180+ -- * Tagline
181+ , Tagline
182+ , tagline
183+ , tValue
184+ , tMetadata
185+
186+ -- * Residence
187+ , Residence
188+ , residence
189+ , resValue
190+ , resCurrent
191+ , resMetadata
192+
193+ -- * Gender
194+ , Gender
195+ , gender
196+ , gValue
197+ , gMetadata
198+ , gFormattedValue
199+
200+ -- * Name
201+ , Name
202+ , name
203+ , nGivenName
204+ , nPhoneticHonorificSuffix
205+ , nMiddleName
206+ , nPhoneticMiddleName
207+ , nPhoneticFamilyName
208+ , nPhoneticHonorificPrefix
209+ , nHonorificPrefix
210+ , nFamilyName
211+ , nMetadata
212+ , nDisplayName
213+ , nPhoneticGivenName
214+ , nHonorificSuffix
215+
216+ -- * FieldMetadata
217+ , FieldMetadata
218+ , fieldMetadata
219+ , fmVerified
220+ , fmPrimary
221+ , fmSource
222+
223+ -- * PhoneNumber
224+ , PhoneNumber
225+ , phoneNumber
226+ , pnCanonicalForm
227+ , pnValue
228+ , pnMetadata
229+ , pnType
230+ , pnFormattedType
231+
232+ -- * Occupation
233+ , Occupation
234+ , occupation
235+ , oValue
236+ , oMetadata
237+
238+ -- * EmailAddress
239+ , EmailAddress
240+ , emailAddress
241+ , eaValue
242+ , eaMetadata
243+ , eaType
244+ , eaFormattedType
245+
246+ -- * Source
247+ , Source
248+ , source
249+ , sId
250+ , sType
251+
252+ -- * ImClient
253+ , ImClient
254+ , imClient
255+ , icFormattedProtocol
256+ , icUsername
257+ , icProtocol
258+ , icMetadata
259+ , icType
260+ , icFormattedType
261+
262+ -- * PersonMetadata
263+ , PersonMetadata
264+ , personMetadata
265+ , pmPreviousResourceNames
266+ , pmObjectType
267+ , pmSources
268+ , pmDeleted
269+
270+ -- * Nickname
271+ , Nickname
272+ , nickname
273+ , nicValue
274+ , nicMetadata
275+ , nicType
276+
277+ -- * Organization
278+ , Organization
279+ , organization
280+ , orgDePartment
281+ , orgLocation
282+ , orgDomain
283+ , orgEndDate
284+ , orgSymbol
285+ , orgJobDescription
286+ , orgCurrent
287+ , orgStartDate
288+ , orgName
289+ , orgMetadata
290+ , orgPhoneticName
291+ , orgTitle
292+ , orgType
293+ , orgFormattedType
294+
295+ -- * Interest
296+ , Interest
297+ , interest
298+ , iValue
299+ , iMetadata
300+
301+ -- * PersonResponse
302+ , PersonResponse
303+ , personResponse
304+ , prRequestedResourceName
305+ , prPerson
306+ , prHTTPStatusCode
307+
308+ -- * Skill
309+ , Skill
310+ , skill
311+ , sValue
312+ , sMetadata
313+
314+ -- * Biography
315+ , Biography
316+ , biography
317+ , bioValue
318+ , bioMetadata
319+
320+ -- * CoverPhoto
321+ , CoverPhoto
322+ , coverPhoto
323+ , cpDefault
324+ , cpURL
325+ , cpMetadata
326+ ) where
327+
328+import Network.Google.People.Types.Product
329+import Network.Google.People.Types.Sum
330+import Network.Google.Prelude
331+
332+-- | Default request referring to version 'v1' of the Google People API. This contains the host and root path used as a starting point for constructing service requests.
333+peopleService :: ServiceConfig
334+peopleService
335+ = defaultService (ServiceId "people:v1")
336+ "people.googleapis.com"
337+
338+-- | View your complete date of birth
339+userBirthdayReadScope :: OAuthScope
340+userBirthdayReadScope = "https://www.googleapis.com/auth/user.birthday.read";
341+
342+-- | View your basic profile info
343+userinfoProfileScope :: OAuthScope
344+userinfoProfileScope = "https://www.googleapis.com/auth/userinfo.profile";
345+
346+-- | Know your basic profile info and list of people in your circles.
347+plusLoginScope :: OAuthScope
348+plusLoginScope = "https://www.googleapis.com/auth/plus.login";
349+
350+-- | View your phone numbers
351+userPhonenumbersReadScope :: OAuthScope
352+userPhonenumbersReadScope = "https://www.googleapis.com/auth/user.phonenumbers.read";
353+
354+-- | View your email address
355+userinfoEmailScope :: OAuthScope
356+userinfoEmailScope = "https://www.googleapis.com/auth/userinfo.email";
357+
358+-- | View your contacts
359+contactsReadonlyScope :: OAuthScope
360+contactsReadonlyScope = "https://www.googleapis.com/auth/contacts.readonly";
361+
362+-- | View your street addresses
363+userAddressesReadScope :: OAuthScope
364+userAddressesReadScope = "https://www.googleapis.com/auth/user.addresses.read";
365+
366+-- | Manage your contacts
367+contactsScope :: OAuthScope
368+contactsScope = "https://www.googleapis.com/auth/contacts";
369+
370+-- | View your email addresses
371+userEmailsReadScope :: OAuthScope
372+userEmailsReadScope = "https://www.googleapis.com/auth/user.emails.read";
gogol-people/gen/Network/Google/People/Types/Product.hsnew file+2764
@@ -0,0 +1,2764 @@
1+{-# LANGUAGE DeriveDataTypeable #-}
2+{-# LANGUAGE DeriveGeneric #-}
3+{-# LANGUAGE NoImplicitPrelude #-}
4+{-# LANGUAGE OverloadedStrings #-}
5+{-# LANGUAGE RecordWildCards #-}
6+
7+{-# OPTIONS_GHC -fno-warn-unused-binds #-}
8+{-# OPTIONS_GHC -fno-warn-unused-imports #-}
9+
10+-- |
11+-- Module : Network.Google.People.Types.Product
12+-- Copyright : (c) 2015 Brendan Hay
13+-- License : Mozilla Public License, v. 2.0.
14+-- Maintainer : Brendan Hay <brendan.g.hay@gmail.com>
15+-- Stability : auto-generated
16+-- Portability : non-portable (GHC extensions)
17+--
18+module Network.Google.People.Types.Product where
19+
20+import Network.Google.People.Types.Sum
21+import Network.Google.Prelude
22+
23+-- | A person\'s photo. A picture shown next to the person\'s name to help
24+-- others recognize the person.
25+--
26+-- /See:/ 'photo' smart constructor.
27+data Photo = Photo
28+ { _pURL :: !(Maybe Text)
29+ , _pMetadata :: !(Maybe FieldMetadata)
30+ } deriving (Eq,Show,Data,Typeable,Generic)
31+
32+-- | Creates a value of 'Photo' with the minimum fields required to make a request.
33+--
34+-- Use one of the following lenses to modify other fields as desired:
35+--
36+-- * 'pURL'
37+--
38+-- * 'pMetadata'
39+photo
40+ :: Photo
41+photo =
42+ Photo
43+ { _pURL = Nothing
44+ , _pMetadata = Nothing
45+ }
46+
47+-- | The URL of the photo.
48+pURL :: Lens' Photo (Maybe Text)
49+pURL = lens _pURL (\ s a -> s{_pURL = a})
50+
51+-- | Metadata about the photo.
52+pMetadata :: Lens' Photo (Maybe FieldMetadata)
53+pMetadata
54+ = lens _pMetadata (\ s a -> s{_pMetadata = a})
55+
56+instance FromJSON Photo where
57+ parseJSON
58+ = withObject "Photo"
59+ (\ o ->
60+ Photo <$> (o .:? "url") <*> (o .:? "metadata"))
61+
62+instance ToJSON Photo where
63+ toJSON Photo{..}
64+ = object
65+ (catMaybes
66+ [("url" .=) <$> _pURL,
67+ ("metadata" .=) <$> _pMetadata])
68+
69+-- | An event related to the person.
70+--
71+-- /See:/ 'event' smart constructor.
72+data Event = Event
73+ { _eDate :: !(Maybe Date)
74+ , _eMetadata :: !(Maybe FieldMetadata)
75+ , _eType :: !(Maybe Text)
76+ , _eFormattedType :: !(Maybe Text)
77+ } deriving (Eq,Show,Data,Typeable,Generic)
78+
79+-- | Creates a value of 'Event' with the minimum fields required to make a request.
80+--
81+-- Use one of the following lenses to modify other fields as desired:
82+--
83+-- * 'eDate'
84+--
85+-- * 'eMetadata'
86+--
87+-- * 'eType'
88+--
89+-- * 'eFormattedType'
90+event
91+ :: Event
92+event =
93+ Event
94+ { _eDate = Nothing
95+ , _eMetadata = Nothing
96+ , _eType = Nothing
97+ , _eFormattedType = Nothing
98+ }
99+
100+-- | The date of the event.
101+eDate :: Lens' Event (Maybe Date)
102+eDate = lens _eDate (\ s a -> s{_eDate = a})
103+
104+-- | Metadata about the event.
105+eMetadata :: Lens' Event (Maybe FieldMetadata)
106+eMetadata
107+ = lens _eMetadata (\ s a -> s{_eMetadata = a})
108+
109+-- | The type of the event. The type can be custom or predefined. Possible
110+-- values include, but are not limited to, the following: * \`anniversary\`
111+-- * \`other\`
112+eType :: Lens' Event (Maybe Text)
113+eType = lens _eType (\ s a -> s{_eType = a})
114+
115+-- | The read-only type of the event translated and formatted in the
116+-- viewer\'s account locale or the \`Accept-Language\` HTTP header locale.
117+eFormattedType :: Lens' Event (Maybe Text)
118+eFormattedType
119+ = lens _eFormattedType
120+ (\ s a -> s{_eFormattedType = a})
121+
122+instance FromJSON Event where
123+ parseJSON
124+ = withObject "Event"
125+ (\ o ->
126+ Event <$>
127+ (o .:? "date") <*> (o .:? "metadata") <*>
128+ (o .:? "type")
129+ <*> (o .:? "formattedType"))
130+
131+instance ToJSON Event where
132+ toJSON Event{..}
133+ = object
134+ (catMaybes
135+ [("date" .=) <$> _eDate,
136+ ("metadata" .=) <$> _eMetadata,
137+ ("type" .=) <$> _eType,
138+ ("formattedType" .=) <$> _eFormattedType])
139+
140+--
141+-- /See:/ 'listConnectionsResponse' smart constructor.
142+data ListConnectionsResponse = ListConnectionsResponse
143+ { _lcrNextPageToken :: !(Maybe Text)
144+ , _lcrConnections :: !(Maybe [Person])
145+ , _lcrNextSyncToken :: !(Maybe Text)
146+ } deriving (Eq,Show,Data,Typeable,Generic)
147+
148+-- | Creates a value of 'ListConnectionsResponse' with the minimum fields required to make a request.
149+--
150+-- Use one of the following lenses to modify other fields as desired:
151+--
152+-- * 'lcrNextPageToken'
153+--
154+-- * 'lcrConnections'
155+--
156+-- * 'lcrNextSyncToken'
157+listConnectionsResponse
158+ :: ListConnectionsResponse
159+listConnectionsResponse =
160+ ListConnectionsResponse
161+ { _lcrNextPageToken = Nothing
162+ , _lcrConnections = Nothing
163+ , _lcrNextSyncToken = Nothing
164+ }
165+
166+-- | The token that can be used to retrieve the next page of results.
167+lcrNextPageToken :: Lens' ListConnectionsResponse (Maybe Text)
168+lcrNextPageToken
169+ = lens _lcrNextPageToken
170+ (\ s a -> s{_lcrNextPageToken = a})
171+
172+-- | The list of people that the requestor is connected to.
173+lcrConnections :: Lens' ListConnectionsResponse [Person]
174+lcrConnections
175+ = lens _lcrConnections
176+ (\ s a -> s{_lcrConnections = a})
177+ . _Default
178+ . _Coerce
179+
180+-- | The token that can be used to retrieve changes since the last request.
181+lcrNextSyncToken :: Lens' ListConnectionsResponse (Maybe Text)
182+lcrNextSyncToken
183+ = lens _lcrNextSyncToken
184+ (\ s a -> s{_lcrNextSyncToken = a})
185+
186+instance FromJSON ListConnectionsResponse where
187+ parseJSON
188+ = withObject "ListConnectionsResponse"
189+ (\ o ->
190+ ListConnectionsResponse <$>
191+ (o .:? "nextPageToken") <*>
192+ (o .:? "connections" .!= mempty)
193+ <*> (o .:? "nextSyncToken"))
194+
195+instance ToJSON ListConnectionsResponse where
196+ toJSON ListConnectionsResponse{..}
197+ = object
198+ (catMaybes
199+ [("nextPageToken" .=) <$> _lcrNextPageToken,
200+ ("connections" .=) <$> _lcrConnections,
201+ ("nextSyncToken" .=) <$> _lcrNextSyncToken])
202+
203+-- | A Google Apps Domain membership.
204+--
205+-- /See:/ 'domainMembership' smart constructor.
206+newtype DomainMembership = DomainMembership
207+ { _dmInViewerDomain :: Maybe Bool
208+ } deriving (Eq,Show,Data,Typeable,Generic)
209+
210+-- | Creates a value of 'DomainMembership' with the minimum fields required to make a request.
211+--
212+-- Use one of the following lenses to modify other fields as desired:
213+--
214+-- * 'dmInViewerDomain'
215+domainMembership
216+ :: DomainMembership
217+domainMembership =
218+ DomainMembership
219+ { _dmInViewerDomain = Nothing
220+ }
221+
222+-- | True if the person is in the viewer\'s Google Apps domain.
223+dmInViewerDomain :: Lens' DomainMembership (Maybe Bool)
224+dmInViewerDomain
225+ = lens _dmInViewerDomain
226+ (\ s a -> s{_dmInViewerDomain = a})
227+
228+instance FromJSON DomainMembership where
229+ parseJSON
230+ = withObject "DomainMembership"
231+ (\ o ->
232+ DomainMembership <$> (o .:? "inViewerDomain"))
233+
234+instance ToJSON DomainMembership where
235+ toJSON DomainMembership{..}
236+ = object
237+ (catMaybes
238+ [("inViewerDomain" .=) <$> _dmInViewerDomain])
239+
240+-- | The kind of relationship the person is looking for.
241+--
242+-- /See:/ 'relationshipInterest' smart constructor.
243+data RelationshipInterest = RelationshipInterest
244+ { _riValue :: !(Maybe Text)
245+ , _riMetadata :: !(Maybe FieldMetadata)
246+ , _riFormattedValue :: !(Maybe Text)
247+ } deriving (Eq,Show,Data,Typeable,Generic)
248+
249+-- | Creates a value of 'RelationshipInterest' with the minimum fields required to make a request.
250+--
251+-- Use one of the following lenses to modify other fields as desired:
252+--
253+-- * 'riValue'
254+--
255+-- * 'riMetadata'
256+--
257+-- * 'riFormattedValue'
258+relationshipInterest
259+ :: RelationshipInterest
260+relationshipInterest =
261+ RelationshipInterest
262+ { _riValue = Nothing
263+ , _riMetadata = Nothing
264+ , _riFormattedValue = Nothing
265+ }
266+
267+-- | The kind of relationship the person is looking for. The value can be
268+-- custom or predefined. Possible values include, but are not limited to,
269+-- the following values: * \`friend\` * \`date\` * \`relationship\` *
270+-- \`networking\`
271+riValue :: Lens' RelationshipInterest (Maybe Text)
272+riValue = lens _riValue (\ s a -> s{_riValue = a})
273+
274+-- | Metadata about the relationship interest.
275+riMetadata :: Lens' RelationshipInterest (Maybe FieldMetadata)
276+riMetadata
277+ = lens _riMetadata (\ s a -> s{_riMetadata = a})
278+
279+-- | The value of the relationship interest translated and formatted in the
280+-- viewer\'s account locale or the locale specified in the Accept-Language
281+-- HTTP header.
282+riFormattedValue :: Lens' RelationshipInterest (Maybe Text)
283+riFormattedValue
284+ = lens _riFormattedValue
285+ (\ s a -> s{_riFormattedValue = a})
286+
287+instance FromJSON RelationshipInterest where
288+ parseJSON
289+ = withObject "RelationshipInterest"
290+ (\ o ->
291+ RelationshipInterest <$>
292+ (o .:? "value") <*> (o .:? "metadata") <*>
293+ (o .:? "formattedValue"))
294+
295+instance ToJSON RelationshipInterest where
296+ toJSON RelationshipInterest{..}
297+ = object
298+ (catMaybes
299+ [("value" .=) <$> _riValue,
300+ ("metadata" .=) <$> _riMetadata,
301+ ("formattedValue" .=) <$> _riFormattedValue])
302+
303+-- | A person\'s bragging rights.
304+--
305+-- /See:/ 'braggingRights' smart constructor.
306+data BraggingRights = BraggingRights
307+ { _brValue :: !(Maybe Text)
308+ , _brMetadata :: !(Maybe FieldMetadata)
309+ } deriving (Eq,Show,Data,Typeable,Generic)
310+
311+-- | Creates a value of 'BraggingRights' with the minimum fields required to make a request.
312+--
313+-- Use one of the following lenses to modify other fields as desired:
314+--
315+-- * 'brValue'
316+--
317+-- * 'brMetadata'
318+braggingRights
319+ :: BraggingRights
320+braggingRights =
321+ BraggingRights
322+ { _brValue = Nothing
323+ , _brMetadata = Nothing
324+ }
325+
326+-- | The bragging rights; for example, \`climbed mount everest\`.
327+brValue :: Lens' BraggingRights (Maybe Text)
328+brValue = lens _brValue (\ s a -> s{_brValue = a})
329+
330+-- | Metadata about the bragging rights.
331+brMetadata :: Lens' BraggingRights (Maybe FieldMetadata)
332+brMetadata
333+ = lens _brMetadata (\ s a -> s{_brMetadata = a})
334+
335+instance FromJSON BraggingRights where
336+ parseJSON
337+ = withObject "BraggingRights"
338+ (\ o ->
339+ BraggingRights <$>
340+ (o .:? "value") <*> (o .:? "metadata"))
341+
342+instance ToJSON BraggingRights where
343+ toJSON BraggingRights{..}
344+ = object
345+ (catMaybes
346+ [("value" .=) <$> _brValue,
347+ ("metadata" .=) <$> _brMetadata])
348+
349+-- | A person\'s membership in a group.
350+--
351+-- /See:/ 'membership' smart constructor.
352+data Membership = Membership
353+ { _mDomainMembership :: !(Maybe DomainMembership)
354+ , _mContactGroupMembership :: !(Maybe ContactGroupMembership)
355+ , _mMetadata :: !(Maybe FieldMetadata)
356+ } deriving (Eq,Show,Data,Typeable,Generic)
357+
358+-- | Creates a value of 'Membership' with the minimum fields required to make a request.
359+--
360+-- Use one of the following lenses to modify other fields as desired:
361+--
362+-- * 'mDomainMembership'
363+--
364+-- * 'mContactGroupMembership'
365+--
366+-- * 'mMetadata'
367+membership
368+ :: Membership
369+membership =
370+ Membership
371+ { _mDomainMembership = Nothing
372+ , _mContactGroupMembership = Nothing
373+ , _mMetadata = Nothing
374+ }
375+
376+-- | The domain membership.
377+mDomainMembership :: Lens' Membership (Maybe DomainMembership)
378+mDomainMembership
379+ = lens _mDomainMembership
380+ (\ s a -> s{_mDomainMembership = a})
381+
382+-- | The contact group membership.
383+mContactGroupMembership :: Lens' Membership (Maybe ContactGroupMembership)
384+mContactGroupMembership
385+ = lens _mContactGroupMembership
386+ (\ s a -> s{_mContactGroupMembership = a})
387+
388+-- | Metadata about the membership.
389+mMetadata :: Lens' Membership (Maybe FieldMetadata)
390+mMetadata
391+ = lens _mMetadata (\ s a -> s{_mMetadata = a})
392+
393+instance FromJSON Membership where
394+ parseJSON
395+ = withObject "Membership"
396+ (\ o ->
397+ Membership <$>
398+ (o .:? "domainMembership") <*>
399+ (o .:? "contactGroupMembership")
400+ <*> (o .:? "metadata"))
401+
402+instance ToJSON Membership where
403+ toJSON Membership{..}
404+ = object
405+ (catMaybes
406+ [("domainMembership" .=) <$> _mDomainMembership,
407+ ("contactGroupMembership" .=) <$>
408+ _mContactGroupMembership,
409+ ("metadata" .=) <$> _mMetadata])
410+
411+-- | Information about a person merged from various data sources such as the
412+-- authenticated user\'s contacts and profile data. Fields other than IDs,
413+-- metadata, and group memberships are user-edited. Most fields can have
414+-- multiple items. The items in a field have no guaranteed order, but each
415+-- non-empty field is guaranteed to have exactly one field with
416+-- \`metadata.primary\` set to true.
417+--
418+-- /See:/ 'person' smart constructor.
419+data Person = Person
420+ { _perEmailAddresses :: !(Maybe [EmailAddress])
421+ , _perAgeRange :: !(Maybe Text)
422+ , _perEtag :: !(Maybe Text)
423+ , _perResidences :: !(Maybe [Residence])
424+ , _perBiographies :: !(Maybe [Biography])
425+ , _perTaglines :: !(Maybe [Tagline])
426+ , _perBraggingRights :: !(Maybe [BraggingRights])
427+ , _perBirthdays :: !(Maybe [Birthday])
428+ , _perResourceName :: !(Maybe Text)
429+ , _perRelations :: !(Maybe [Relation])
430+ , _perURLs :: !(Maybe [URL])
431+ , _perAddresses :: !(Maybe [Address])
432+ , _perNicknames :: !(Maybe [Nickname])
433+ , _perRelationshipStatuses :: !(Maybe [RelationshipStatus])
434+ , _perImClients :: !(Maybe [ImClient])
435+ , _perPhoneNumbers :: !(Maybe [PhoneNumber])
436+ , _perOccupations :: !(Maybe [Occupation])
437+ , _perNames :: !(Maybe [Name])
438+ , _perGenders :: !(Maybe [Gender])
439+ , _perPhotos :: !(Maybe [Photo])
440+ , _perEvents :: !(Maybe [Event])
441+ , _perCoverPhotos :: !(Maybe [CoverPhoto])
442+ , _perSkills :: !(Maybe [Skill])
443+ , _perMetadata :: !(Maybe PersonMetadata)
444+ , _perInterests :: !(Maybe [Interest])
445+ , _perOrganizations :: !(Maybe [Organization])
446+ , _perLocales :: !(Maybe [Locale])
447+ , _perMemberships :: !(Maybe [Membership])
448+ , _perRelationshipInterests :: !(Maybe [RelationshipInterest])
449+ } deriving (Eq,Show,Data,Typeable,Generic)
450+
451+-- | Creates a value of 'Person' with the minimum fields required to make a request.
452+--
453+-- Use one of the following lenses to modify other fields as desired:
454+--
455+-- * 'perEmailAddresses'
456+--
457+-- * 'perAgeRange'
458+--
459+-- * 'perEtag'
460+--
461+-- * 'perResidences'
462+--
463+-- * 'perBiographies'
464+--
465+-- * 'perTaglines'
466+--
467+-- * 'perBraggingRights'
468+--
469+-- * 'perBirthdays'
470+--
471+-- * 'perResourceName'
472+--
473+-- * 'perRelations'
474+--
475+-- * 'perURLs'
476+--
477+-- * 'perAddresses'
478+--
479+-- * 'perNicknames'
480+--
481+-- * 'perRelationshipStatuses'
482+--
483+-- * 'perImClients'
484+--
485+-- * 'perPhoneNumbers'
486+--
487+-- * 'perOccupations'
488+--
489+-- * 'perNames'
490+--
491+-- * 'perGenders'
492+--
493+-- * 'perPhotos'
494+--
495+-- * 'perEvents'
496+--
497+-- * 'perCoverPhotos'
498+--
499+-- * 'perSkills'
500+--
501+-- * 'perMetadata'
502+--
503+-- * 'perInterests'
504+--
505+-- * 'perOrganizations'
506+--
507+-- * 'perLocales'
508+--
509+-- * 'perMemberships'
510+--
511+-- * 'perRelationshipInterests'
512+person
513+ :: Person
514+person =
515+ Person
516+ { _perEmailAddresses = Nothing
517+ , _perAgeRange = Nothing
518+ , _perEtag = Nothing
519+ , _perResidences = Nothing
520+ , _perBiographies = Nothing
521+ , _perTaglines = Nothing
522+ , _perBraggingRights = Nothing
523+ , _perBirthdays = Nothing
524+ , _perResourceName = Nothing
525+ , _perRelations = Nothing
526+ , _perURLs = Nothing
527+ , _perAddresses = Nothing
528+ , _perNicknames = Nothing
529+ , _perRelationshipStatuses = Nothing
530+ , _perImClients = Nothing
531+ , _perPhoneNumbers = Nothing
532+ , _perOccupations = Nothing
533+ , _perNames = Nothing
534+ , _perGenders = Nothing
535+ , _perPhotos = Nothing
536+ , _perEvents = Nothing
537+ , _perCoverPhotos = Nothing
538+ , _perSkills = Nothing
539+ , _perMetadata = Nothing
540+ , _perInterests = Nothing
541+ , _perOrganizations = Nothing
542+ , _perLocales = Nothing
543+ , _perMemberships = Nothing
544+ , _perRelationshipInterests = Nothing
545+ }
546+
547+-- | The person\'s email addresses.
548+perEmailAddresses :: Lens' Person [EmailAddress]
549+perEmailAddresses
550+ = lens _perEmailAddresses
551+ (\ s a -> s{_perEmailAddresses = a})
552+ . _Default
553+ . _Coerce
554+
555+-- | The person\'s age range.
556+perAgeRange :: Lens' Person (Maybe Text)
557+perAgeRange
558+ = lens _perAgeRange (\ s a -> s{_perAgeRange = a})
559+
560+-- | The [HTTP entity tag](https:\/\/en.wikipedia.org\/wiki\/HTTP_ETag) of
561+-- the resource. Used for web cache validation.
562+perEtag :: Lens' Person (Maybe Text)
563+perEtag = lens _perEtag (\ s a -> s{_perEtag = a})
564+
565+-- | The person\'s residences.
566+perResidences :: Lens' Person [Residence]
567+perResidences
568+ = lens _perResidences
569+ (\ s a -> s{_perResidences = a})
570+ . _Default
571+ . _Coerce
572+
573+-- | The person\'s biographies.
574+perBiographies :: Lens' Person [Biography]
575+perBiographies
576+ = lens _perBiographies
577+ (\ s a -> s{_perBiographies = a})
578+ . _Default
579+ . _Coerce
580+
581+-- | The person\'s taglines.
582+perTaglines :: Lens' Person [Tagline]
583+perTaglines
584+ = lens _perTaglines (\ s a -> s{_perTaglines = a}) .
585+ _Default
586+ . _Coerce
587+
588+-- | The person\'s bragging rights.
589+perBraggingRights :: Lens' Person [BraggingRights]
590+perBraggingRights
591+ = lens _perBraggingRights
592+ (\ s a -> s{_perBraggingRights = a})
593+ . _Default
594+ . _Coerce
595+
596+-- | The person\'s birthdays.
597+perBirthdays :: Lens' Person [Birthday]
598+perBirthdays
599+ = lens _perBirthdays (\ s a -> s{_perBirthdays = a})
600+ . _Default
601+ . _Coerce
602+
603+-- | The resource name for the person, assigned by the server. An ASCII
604+-- string with a max length of 27 characters. Always starts with
605+-- \`people\/\`.
606+perResourceName :: Lens' Person (Maybe Text)
607+perResourceName
608+ = lens _perResourceName
609+ (\ s a -> s{_perResourceName = a})
610+
611+-- | The person\'s relations.
612+perRelations :: Lens' Person [Relation]
613+perRelations
614+ = lens _perRelations (\ s a -> s{_perRelations = a})
615+ . _Default
616+ . _Coerce
617+
618+-- | The person\'s associated URLs.
619+perURLs :: Lens' Person [URL]
620+perURLs
621+ = lens _perURLs (\ s a -> s{_perURLs = a}) . _Default
622+ . _Coerce
623+
624+-- | The person\'s street addresses.
625+perAddresses :: Lens' Person [Address]
626+perAddresses
627+ = lens _perAddresses (\ s a -> s{_perAddresses = a})
628+ . _Default
629+ . _Coerce
630+
631+-- | The person\'s nicknames.
632+perNicknames :: Lens' Person [Nickname]
633+perNicknames
634+ = lens _perNicknames (\ s a -> s{_perNicknames = a})
635+ . _Default
636+ . _Coerce
637+
638+-- | The person\'s relationship statuses.
639+perRelationshipStatuses :: Lens' Person [RelationshipStatus]
640+perRelationshipStatuses
641+ = lens _perRelationshipStatuses
642+ (\ s a -> s{_perRelationshipStatuses = a})
643+ . _Default
644+ . _Coerce
645+
646+-- | The person\'s instant messaging clients.
647+perImClients :: Lens' Person [ImClient]
648+perImClients
649+ = lens _perImClients (\ s a -> s{_perImClients = a})
650+ . _Default
651+ . _Coerce
652+
653+-- | The person\'s phone numbers.
654+perPhoneNumbers :: Lens' Person [PhoneNumber]
655+perPhoneNumbers
656+ = lens _perPhoneNumbers
657+ (\ s a -> s{_perPhoneNumbers = a})
658+ . _Default
659+ . _Coerce
660+
661+-- | The person\'s occupations.
662+perOccupations :: Lens' Person [Occupation]
663+perOccupations
664+ = lens _perOccupations
665+ (\ s a -> s{_perOccupations = a})
666+ . _Default
667+ . _Coerce
668+
669+-- | The person\'s names.
670+perNames :: Lens' Person [Name]
671+perNames
672+ = lens _perNames (\ s a -> s{_perNames = a}) .
673+ _Default
674+ . _Coerce
675+
676+-- | The person\'s genders.
677+perGenders :: Lens' Person [Gender]
678+perGenders
679+ = lens _perGenders (\ s a -> s{_perGenders = a}) .
680+ _Default
681+ . _Coerce
682+
683+-- | The person\'s photos.
684+perPhotos :: Lens' Person [Photo]
685+perPhotos
686+ = lens _perPhotos (\ s a -> s{_perPhotos = a}) .
687+ _Default
688+ . _Coerce
689+
690+-- | The person\'s events.
691+perEvents :: Lens' Person [Event]
692+perEvents
693+ = lens _perEvents (\ s a -> s{_perEvents = a}) .
694+ _Default
695+ . _Coerce
696+
697+-- | The person\'s cover photos.
698+perCoverPhotos :: Lens' Person [CoverPhoto]
699+perCoverPhotos
700+ = lens _perCoverPhotos
701+ (\ s a -> s{_perCoverPhotos = a})
702+ . _Default
703+ . _Coerce
704+
705+-- | The person\'s skills.
706+perSkills :: Lens' Person [Skill]
707+perSkills
708+ = lens _perSkills (\ s a -> s{_perSkills = a}) .
709+ _Default
710+ . _Coerce
711+
712+-- | Metadata about the person.
713+perMetadata :: Lens' Person (Maybe PersonMetadata)
714+perMetadata
715+ = lens _perMetadata (\ s a -> s{_perMetadata = a})
716+
717+-- | The person\'s interests.
718+perInterests :: Lens' Person [Interest]
719+perInterests
720+ = lens _perInterests (\ s a -> s{_perInterests = a})
721+ . _Default
722+ . _Coerce
723+
724+-- | The person\'s past or current organizations.
725+perOrganizations :: Lens' Person [Organization]
726+perOrganizations
727+ = lens _perOrganizations
728+ (\ s a -> s{_perOrganizations = a})
729+ . _Default
730+ . _Coerce
731+
732+-- | The person\'s locale preferences.
733+perLocales :: Lens' Person [Locale]
734+perLocales
735+ = lens _perLocales (\ s a -> s{_perLocales = a}) .
736+ _Default
737+ . _Coerce
738+
739+-- | The person\'s group memberships.
740+perMemberships :: Lens' Person [Membership]
741+perMemberships
742+ = lens _perMemberships
743+ (\ s a -> s{_perMemberships = a})
744+ . _Default
745+ . _Coerce
746+
747+-- | The kind of relationship the person is looking for.
748+perRelationshipInterests :: Lens' Person [RelationshipInterest]
749+perRelationshipInterests
750+ = lens _perRelationshipInterests
751+ (\ s a -> s{_perRelationshipInterests = a})
752+ . _Default
753+ . _Coerce
754+
755+instance FromJSON Person where
756+ parseJSON
757+ = withObject "Person"
758+ (\ o ->
759+ Person <$>
760+ (o .:? "emailAddresses" .!= mempty) <*>
761+ (o .:? "ageRange")
762+ <*> (o .:? "etag")
763+ <*> (o .:? "residences" .!= mempty)
764+ <*> (o .:? "biographies" .!= mempty)
765+ <*> (o .:? "taglines" .!= mempty)
766+ <*> (o .:? "braggingRights" .!= mempty)
767+ <*> (o .:? "birthdays" .!= mempty)
768+ <*> (o .:? "resourceName")
769+ <*> (o .:? "relations" .!= mempty)
770+ <*> (o .:? "urls" .!= mempty)
771+ <*> (o .:? "addresses" .!= mempty)
772+ <*> (o .:? "nicknames" .!= mempty)
773+ <*> (o .:? "relationshipStatuses" .!= mempty)
774+ <*> (o .:? "imClients" .!= mempty)
775+ <*> (o .:? "phoneNumbers" .!= mempty)
776+ <*> (o .:? "occupations" .!= mempty)
777+ <*> (o .:? "names" .!= mempty)
778+ <*> (o .:? "genders" .!= mempty)
779+ <*> (o .:? "photos" .!= mempty)
780+ <*> (o .:? "events" .!= mempty)
781+ <*> (o .:? "coverPhotos" .!= mempty)
782+ <*> (o .:? "skills" .!= mempty)
783+ <*> (o .:? "metadata")
784+ <*> (o .:? "interests" .!= mempty)
785+ <*> (o .:? "organizations" .!= mempty)
786+ <*> (o .:? "locales" .!= mempty)
787+ <*> (o .:? "memberships" .!= mempty)
788+ <*> (o .:? "relationshipInterests" .!= mempty))
789+
790+instance ToJSON Person where
791+ toJSON Person{..}
792+ = object
793+ (catMaybes
794+ [("emailAddresses" .=) <$> _perEmailAddresses,
795+ ("ageRange" .=) <$> _perAgeRange,
796+ ("etag" .=) <$> _perEtag,
797+ ("residences" .=) <$> _perResidences,
798+ ("biographies" .=) <$> _perBiographies,
799+ ("taglines" .=) <$> _perTaglines,
800+ ("braggingRights" .=) <$> _perBraggingRights,
801+ ("birthdays" .=) <$> _perBirthdays,
802+ ("resourceName" .=) <$> _perResourceName,
803+ ("relations" .=) <$> _perRelations,
804+ ("urls" .=) <$> _perURLs,
805+ ("addresses" .=) <$> _perAddresses,
806+ ("nicknames" .=) <$> _perNicknames,
807+ ("relationshipStatuses" .=) <$>
808+ _perRelationshipStatuses,
809+ ("imClients" .=) <$> _perImClients,
810+ ("phoneNumbers" .=) <$> _perPhoneNumbers,
811+ ("occupations" .=) <$> _perOccupations,
812+ ("names" .=) <$> _perNames,
813+ ("genders" .=) <$> _perGenders,
814+ ("photos" .=) <$> _perPhotos,
815+ ("events" .=) <$> _perEvents,
816+ ("coverPhotos" .=) <$> _perCoverPhotos,
817+ ("skills" .=) <$> _perSkills,
818+ ("metadata" .=) <$> _perMetadata,
819+ ("interests" .=) <$> _perInterests,
820+ ("organizations" .=) <$> _perOrganizations,
821+ ("locales" .=) <$> _perLocales,
822+ ("memberships" .=) <$> _perMemberships,
823+ ("relationshipInterests" .=) <$>
824+ _perRelationshipInterests])
825+
826+-- | A Google contact group membership.
827+--
828+-- /See:/ 'contactGroupMembership' smart constructor.
829+newtype ContactGroupMembership = ContactGroupMembership
830+ { _cgmContactGroupId :: Maybe Text
831+ } deriving (Eq,Show,Data,Typeable,Generic)
832+
833+-- | Creates a value of 'ContactGroupMembership' with the minimum fields required to make a request.
834+--
835+-- Use one of the following lenses to modify other fields as desired:
836+--
837+-- * 'cgmContactGroupId'
838+contactGroupMembership
839+ :: ContactGroupMembership
840+contactGroupMembership =
841+ ContactGroupMembership
842+ { _cgmContactGroupId = Nothing
843+ }
844+
845+-- | The contact group ID for the contact group membership. The contact group
846+-- ID can be custom or predefined. Possible values include, but are not
847+-- limited to, the following: * \`myContacts\` * \`starred\` * A numerical
848+-- ID for user-created groups.
849+cgmContactGroupId :: Lens' ContactGroupMembership (Maybe Text)
850+cgmContactGroupId
851+ = lens _cgmContactGroupId
852+ (\ s a -> s{_cgmContactGroupId = a})
853+
854+instance FromJSON ContactGroupMembership where
855+ parseJSON
856+ = withObject "ContactGroupMembership"
857+ (\ o ->
858+ ContactGroupMembership <$> (o .:? "contactGroupId"))
859+
860+instance ToJSON ContactGroupMembership where
861+ toJSON ContactGroupMembership{..}
862+ = object
863+ (catMaybes
864+ [("contactGroupId" .=) <$> _cgmContactGroupId])
865+
866+-- | A person\'s locale preference.
867+--
868+-- /See:/ 'locale' smart constructor.
869+data Locale = Locale
870+ { _lValue :: !(Maybe Text)
871+ , _lMetadata :: !(Maybe FieldMetadata)
872+ } deriving (Eq,Show,Data,Typeable,Generic)
873+
874+-- | Creates a value of 'Locale' with the minimum fields required to make a request.
875+--
876+-- Use one of the following lenses to modify other fields as desired:
877+--
878+-- * 'lValue'
879+--
880+-- * 'lMetadata'
881+locale
882+ :: Locale
883+locale =
884+ Locale
885+ { _lValue = Nothing
886+ , _lMetadata = Nothing
887+ }
888+
889+-- | The well-formed [IETF BCP 47](https:\/\/tools.ietf.org\/html\/bcp47)
890+-- language tag representing the locale.
891+lValue :: Lens' Locale (Maybe Text)
892+lValue = lens _lValue (\ s a -> s{_lValue = a})
893+
894+-- | Metadata about the locale.
895+lMetadata :: Lens' Locale (Maybe FieldMetadata)
896+lMetadata
897+ = lens _lMetadata (\ s a -> s{_lMetadata = a})
898+
899+instance FromJSON Locale where
900+ parseJSON
901+ = withObject "Locale"
902+ (\ o ->
903+ Locale <$> (o .:? "value") <*> (o .:? "metadata"))
904+
905+instance ToJSON Locale where
906+ toJSON Locale{..}
907+ = object
908+ (catMaybes
909+ [("value" .=) <$> _lValue,
910+ ("metadata" .=) <$> _lMetadata])
911+
912+-- | A person\'s relationship status.
913+--
914+-- /See:/ 'relationshipStatus' smart constructor.
915+data RelationshipStatus = RelationshipStatus
916+ { _rsValue :: !(Maybe Text)
917+ , _rsMetadata :: !(Maybe FieldMetadata)
918+ , _rsFormattedValue :: !(Maybe Text)
919+ } deriving (Eq,Show,Data,Typeable,Generic)
920+
921+-- | Creates a value of 'RelationshipStatus' with the minimum fields required to make a request.
922+--
923+-- Use one of the following lenses to modify other fields as desired:
924+--
925+-- * 'rsValue'
926+--
927+-- * 'rsMetadata'
928+--
929+-- * 'rsFormattedValue'
930+relationshipStatus
931+ :: RelationshipStatus
932+relationshipStatus =
933+ RelationshipStatus
934+ { _rsValue = Nothing
935+ , _rsMetadata = Nothing
936+ , _rsFormattedValue = Nothing
937+ }
938+
939+-- | The relationship status. The value can be custom or predefined. Possible
940+-- values include, but are not limited to, the following: * \`single\` *
941+-- \`inARelationship\` * \`engaged\` * \`married\` * \`itsComplicated\` *
942+-- \`openRelationship\` * \`widowed\` * \`inDomesticPartnership\` *
943+-- \`inCivilUnion\`
944+rsValue :: Lens' RelationshipStatus (Maybe Text)
945+rsValue = lens _rsValue (\ s a -> s{_rsValue = a})
946+
947+-- | Metadata about the relationship status.
948+rsMetadata :: Lens' RelationshipStatus (Maybe FieldMetadata)
949+rsMetadata
950+ = lens _rsMetadata (\ s a -> s{_rsMetadata = a})
951+
952+-- | The read-only value of the relationship status translated and formatted
953+-- in the viewer\'s account locale or the \`Accept-Language\` HTTP header
954+-- locale.
955+rsFormattedValue :: Lens' RelationshipStatus (Maybe Text)
956+rsFormattedValue
957+ = lens _rsFormattedValue
958+ (\ s a -> s{_rsFormattedValue = a})
959+
960+instance FromJSON RelationshipStatus where
961+ parseJSON
962+ = withObject "RelationshipStatus"
963+ (\ o ->
964+ RelationshipStatus <$>
965+ (o .:? "value") <*> (o .:? "metadata") <*>
966+ (o .:? "formattedValue"))
967+
968+instance ToJSON RelationshipStatus where
969+ toJSON RelationshipStatus{..}
970+ = object
971+ (catMaybes
972+ [("value" .=) <$> _rsValue,
973+ ("metadata" .=) <$> _rsMetadata,
974+ ("formattedValue" .=) <$> _rsFormattedValue])
975+
976+-- | A person\'s associated URLs.
977+--
978+-- /See:/ 'url' smart constructor.
979+data URL = URL
980+ { _uValue :: !(Maybe Text)
981+ , _uMetadata :: !(Maybe FieldMetadata)
982+ , _uType :: !(Maybe Text)
983+ , _uFormattedType :: !(Maybe Text)
984+ } deriving (Eq,Show,Data,Typeable,Generic)
985+
986+-- | Creates a value of 'URL' with the minimum fields required to make a request.
987+--
988+-- Use one of the following lenses to modify other fields as desired:
989+--
990+-- * 'uValue'
991+--
992+-- * 'uMetadata'
993+--
994+-- * 'uType'
995+--
996+-- * 'uFormattedType'
997+url
998+ :: URL
999+url =
1000+ URL
1001+ { _uValue = Nothing
1002+ , _uMetadata = Nothing
1003+ , _uType = Nothing
1004+ , _uFormattedType = Nothing
1005+ }
1006+
1007+-- | The URL.
1008+uValue :: Lens' URL (Maybe Text)
1009+uValue = lens _uValue (\ s a -> s{_uValue = a})
1010+
1011+-- | Metadata about the URL.
1012+uMetadata :: Lens' URL (Maybe FieldMetadata)
1013+uMetadata
1014+ = lens _uMetadata (\ s a -> s{_uMetadata = a})
1015+
1016+-- | The type of the URL. The type can be custom or predefined. Possible
1017+-- values include, but are not limited to, the following: * \`home\` *
1018+-- \`work\` * \`blog\` * \`profile\` * \`homePage\` * \`ftp\` *
1019+-- \`reservations\` * \`appInstallPage\`: website for a Google+
1020+-- application. * \`other\`
1021+uType :: Lens' URL (Maybe Text)
1022+uType = lens _uType (\ s a -> s{_uType = a})
1023+
1024+-- | The read-only type of the URL translated and formatted in the viewer\'s
1025+-- account locale or the \`Accept-Language\` HTTP header locale.
1026+uFormattedType :: Lens' URL (Maybe Text)
1027+uFormattedType
1028+ = lens _uFormattedType
1029+ (\ s a -> s{_uFormattedType = a})
1030+
1031+instance FromJSON URL where
1032+ parseJSON
1033+ = withObject "URL"
1034+ (\ o ->
1035+ URL <$>
1036+ (o .:? "value") <*> (o .:? "metadata") <*>
1037+ (o .:? "type")
1038+ <*> (o .:? "formattedType"))
1039+
1040+instance ToJSON URL where
1041+ toJSON URL{..}
1042+ = object
1043+ (catMaybes
1044+ [("value" .=) <$> _uValue,
1045+ ("metadata" .=) <$> _uMetadata,
1046+ ("type" .=) <$> _uType,
1047+ ("formattedType" .=) <$> _uFormattedType])
1048+
1049+-- | A person\'s physical address. May be a P.O. box or street address. All
1050+-- fields are optional.
1051+--
1052+-- /See:/ 'address' smart constructor.
1053+data Address = Address
1054+ { _aStreetAddress :: !(Maybe Text)
1055+ , _aPoBox :: !(Maybe Text)
1056+ , _aCountry :: !(Maybe Text)
1057+ , _aPostalCode :: !(Maybe Text)
1058+ , _aExtendedAddress :: !(Maybe Text)
1059+ , _aCity :: !(Maybe Text)
1060+ , _aMetadata :: !(Maybe FieldMetadata)
1061+ , _aCountryCode :: !(Maybe Text)
1062+ , _aFormattedValue :: !(Maybe Text)
1063+ , _aRegion :: !(Maybe Text)
1064+ , _aType :: !(Maybe Text)
1065+ , _aFormattedType :: !(Maybe Text)
1066+ } deriving (Eq,Show,Data,Typeable,Generic)
1067+
1068+-- | Creates a value of 'Address' with the minimum fields required to make a request.
1069+--
1070+-- Use one of the following lenses to modify other fields as desired:
1071+--
1072+-- * 'aStreetAddress'
1073+--
1074+-- * 'aPoBox'
1075+--
1076+-- * 'aCountry'
1077+--
1078+-- * 'aPostalCode'
1079+--
1080+-- * 'aExtendedAddress'
1081+--
1082+-- * 'aCity'
1083+--
1084+-- * 'aMetadata'
1085+--
1086+-- * 'aCountryCode'
1087+--
1088+-- * 'aFormattedValue'
1089+--
1090+-- * 'aRegion'
1091+--
1092+-- * 'aType'
1093+--
1094+-- * 'aFormattedType'
1095+address
1096+ :: Address
1097+address =
1098+ Address
1099+ { _aStreetAddress = Nothing
1100+ , _aPoBox = Nothing
1101+ , _aCountry = Nothing
1102+ , _aPostalCode = Nothing
1103+ , _aExtendedAddress = Nothing
1104+ , _aCity = Nothing
1105+ , _aMetadata = Nothing
1106+ , _aCountryCode = Nothing
1107+ , _aFormattedValue = Nothing
1108+ , _aRegion = Nothing
1109+ , _aType = Nothing
1110+ , _aFormattedType = Nothing
1111+ }
1112+
1113+-- | The street address.
1114+aStreetAddress :: Lens' Address (Maybe Text)
1115+aStreetAddress
1116+ = lens _aStreetAddress
1117+ (\ s a -> s{_aStreetAddress = a})
1118+
1119+-- | The P.O. box of the address.
1120+aPoBox :: Lens' Address (Maybe Text)
1121+aPoBox = lens _aPoBox (\ s a -> s{_aPoBox = a})
1122+
1123+-- | The country of the address.
1124+aCountry :: Lens' Address (Maybe Text)
1125+aCountry = lens _aCountry (\ s a -> s{_aCountry = a})
1126+
1127+-- | The postal code of the address.
1128+aPostalCode :: Lens' Address (Maybe Text)
1129+aPostalCode
1130+ = lens _aPostalCode (\ s a -> s{_aPostalCode = a})
1131+
1132+-- | The extended address of the address; for example, the apartment number.
1133+aExtendedAddress :: Lens' Address (Maybe Text)
1134+aExtendedAddress
1135+ = lens _aExtendedAddress
1136+ (\ s a -> s{_aExtendedAddress = a})
1137+
1138+-- | The city of the address.
1139+aCity :: Lens' Address (Maybe Text)
1140+aCity = lens _aCity (\ s a -> s{_aCity = a})
1141+
1142+-- | Metadata about the address.
1143+aMetadata :: Lens' Address (Maybe FieldMetadata)
1144+aMetadata
1145+ = lens _aMetadata (\ s a -> s{_aMetadata = a})
1146+
1147+-- | The [ISO 3166-1 alpha-2](http:\/\/www.iso.org\/iso\/country_codes.htm)
1148+-- country code of the address.
1149+aCountryCode :: Lens' Address (Maybe Text)
1150+aCountryCode
1151+ = lens _aCountryCode (\ s a -> s{_aCountryCode = a})
1152+
1153+-- | The read-only value of the address formatted in the viewer\'s account
1154+-- locale or the \`Accept-Language\` HTTP header locale.
1155+aFormattedValue :: Lens' Address (Maybe Text)
1156+aFormattedValue
1157+ = lens _aFormattedValue
1158+ (\ s a -> s{_aFormattedValue = a})
1159+
1160+-- | The region of the address; for example, the state or province.
1161+aRegion :: Lens' Address (Maybe Text)
1162+aRegion = lens _aRegion (\ s a -> s{_aRegion = a})
1163+
1164+-- | The type of the address. The type can be custom or predefined. Possible
1165+-- values include, but are not limited to, the following: * \`home\` *
1166+-- \`work\` * \`other\`
1167+aType :: Lens' Address (Maybe Text)
1168+aType = lens _aType (\ s a -> s{_aType = a})
1169+
1170+-- | The read-only type of the address translated and formatted in the
1171+-- viewer\'s account locale or the \`Accept-Language\` HTTP header locale.
1172+aFormattedType :: Lens' Address (Maybe Text)
1173+aFormattedType
1174+ = lens _aFormattedType
1175+ (\ s a -> s{_aFormattedType = a})
1176+
1177+instance FromJSON Address where
1178+ parseJSON
1179+ = withObject "Address"
1180+ (\ o ->
1181+ Address <$>
1182+ (o .:? "streetAddress") <*> (o .:? "poBox") <*>
1183+ (o .:? "country")
1184+ <*> (o .:? "postalCode")
1185+ <*> (o .:? "extendedAddress")
1186+ <*> (o .:? "city")
1187+ <*> (o .:? "metadata")
1188+ <*> (o .:? "countryCode")
1189+ <*> (o .:? "formattedValue")
1190+ <*> (o .:? "region")
1191+ <*> (o .:? "type")
1192+ <*> (o .:? "formattedType"))
1193+
1194+instance ToJSON Address where
1195+ toJSON Address{..}
1196+ = object
1197+ (catMaybes
1198+ [("streetAddress" .=) <$> _aStreetAddress,
1199+ ("poBox" .=) <$> _aPoBox,
1200+ ("country" .=) <$> _aCountry,
1201+ ("postalCode" .=) <$> _aPostalCode,
1202+ ("extendedAddress" .=) <$> _aExtendedAddress,
1203+ ("city" .=) <$> _aCity,
1204+ ("metadata" .=) <$> _aMetadata,
1205+ ("countryCode" .=) <$> _aCountryCode,
1206+ ("formattedValue" .=) <$> _aFormattedValue,
1207+ ("region" .=) <$> _aRegion, ("type" .=) <$> _aType,
1208+ ("formattedType" .=) <$> _aFormattedType])
1209+
1210+-- | A person\'s relation to another person.
1211+--
1212+-- /See:/ 'relation' smart constructor.
1213+data Relation = Relation
1214+ { _rPerson :: !(Maybe Text)
1215+ , _rMetadata :: !(Maybe FieldMetadata)
1216+ , _rType :: !(Maybe Text)
1217+ , _rFormattedType :: !(Maybe Text)
1218+ } deriving (Eq,Show,Data,Typeable,Generic)
1219+
1220+-- | Creates a value of 'Relation' with the minimum fields required to make a request.
1221+--
1222+-- Use one of the following lenses to modify other fields as desired:
1223+--
1224+-- * 'rPerson'
1225+--
1226+-- * 'rMetadata'
1227+--
1228+-- * 'rType'
1229+--
1230+-- * 'rFormattedType'
1231+relation
1232+ :: Relation
1233+relation =
1234+ Relation
1235+ { _rPerson = Nothing
1236+ , _rMetadata = Nothing
1237+ , _rType = Nothing
1238+ , _rFormattedType = Nothing
1239+ }
1240+
1241+-- | The name of the other person this relation refers to.
1242+rPerson :: Lens' Relation (Maybe Text)
1243+rPerson = lens _rPerson (\ s a -> s{_rPerson = a})
1244+
1245+-- | Metadata about the relation.
1246+rMetadata :: Lens' Relation (Maybe FieldMetadata)
1247+rMetadata
1248+ = lens _rMetadata (\ s a -> s{_rMetadata = a})
1249+
1250+-- | The person\'s relation to the other person. The type can be custom or
1251+-- predefined. Possible values include, but are not limited to, the
1252+-- following values: * \`spouse\` * \`child\` * \`mother\` * \`father\` *
1253+-- \`parent\` * \`brother\` * \`sister\` * \`friend\` * \`relative\` *
1254+-- \`domesticPartner\` * \`manager\` * \`assistant\` * \`referredBy\` *
1255+-- \`partner\`
1256+rType :: Lens' Relation (Maybe Text)
1257+rType = lens _rType (\ s a -> s{_rType = a})
1258+
1259+-- | The type of the relation translated and formatted in the viewer\'s
1260+-- account locale or the locale specified in the Accept-Language HTTP
1261+-- header.
1262+rFormattedType :: Lens' Relation (Maybe Text)
1263+rFormattedType
1264+ = lens _rFormattedType
1265+ (\ s a -> s{_rFormattedType = a})
1266+
1267+instance FromJSON Relation where
1268+ parseJSON
1269+ = withObject "Relation"
1270+ (\ o ->
1271+ Relation <$>
1272+ (o .:? "person") <*> (o .:? "metadata") <*>
1273+ (o .:? "type")
1274+ <*> (o .:? "formattedType"))
1275+
1276+instance ToJSON Relation where
1277+ toJSON Relation{..}
1278+ = object
1279+ (catMaybes
1280+ [("person" .=) <$> _rPerson,
1281+ ("metadata" .=) <$> _rMetadata,
1282+ ("type" .=) <$> _rType,
1283+ ("formattedType" .=) <$> _rFormattedType])
1284+
1285+--
1286+-- /See:/ 'getPeopleResponse' smart constructor.
1287+newtype GetPeopleResponse = GetPeopleResponse
1288+ { _gprResponses :: Maybe [PersonResponse]
1289+ } deriving (Eq,Show,Data,Typeable,Generic)
1290+
1291+-- | Creates a value of 'GetPeopleResponse' with the minimum fields required to make a request.
1292+--
1293+-- Use one of the following lenses to modify other fields as desired:
1294+--
1295+-- * 'gprResponses'
1296+getPeopleResponse
1297+ :: GetPeopleResponse
1298+getPeopleResponse =
1299+ GetPeopleResponse
1300+ { _gprResponses = Nothing
1301+ }
1302+
1303+-- | The response for each requested resource name.
1304+gprResponses :: Lens' GetPeopleResponse [PersonResponse]
1305+gprResponses
1306+ = lens _gprResponses (\ s a -> s{_gprResponses = a})
1307+ . _Default
1308+ . _Coerce
1309+
1310+instance FromJSON GetPeopleResponse where
1311+ parseJSON
1312+ = withObject "GetPeopleResponse"
1313+ (\ o ->
1314+ GetPeopleResponse <$> (o .:? "responses" .!= mempty))
1315+
1316+instance ToJSON GetPeopleResponse where
1317+ toJSON GetPeopleResponse{..}
1318+ = object
1319+ (catMaybes [("responses" .=) <$> _gprResponses])
1320+
1321+-- | A person\'s birthday. At least one of the \`date\` and \`text\` fields
1322+-- are specified. The \`date\` and \`text\` fields typically represent the
1323+-- same date, but are not guaranteed to.
1324+--
1325+-- /See:/ 'birthday' smart constructor.
1326+data Birthday = Birthday
1327+ { _bText :: !(Maybe Text)
1328+ , _bDate :: !(Maybe Date)
1329+ , _bMetadata :: !(Maybe FieldMetadata)
1330+ } deriving (Eq,Show,Data,Typeable,Generic)
1331+
1332+-- | Creates a value of 'Birthday' with the minimum fields required to make a request.
1333+--
1334+-- Use one of the following lenses to modify other fields as desired:
1335+--
1336+-- * 'bText'
1337+--
1338+-- * 'bDate'
1339+--
1340+-- * 'bMetadata'
1341+birthday
1342+ :: Birthday
1343+birthday =
1344+ Birthday
1345+ { _bText = Nothing
1346+ , _bDate = Nothing
1347+ , _bMetadata = Nothing
1348+ }
1349+
1350+-- | A free-form string representing the user\'s birthday.
1351+bText :: Lens' Birthday (Maybe Text)
1352+bText = lens _bText (\ s a -> s{_bText = a})
1353+
1354+-- | The date of the birthday.
1355+bDate :: Lens' Birthday (Maybe Date)
1356+bDate = lens _bDate (\ s a -> s{_bDate = a})
1357+
1358+-- | Metadata about the birthday.
1359+bMetadata :: Lens' Birthday (Maybe FieldMetadata)
1360+bMetadata
1361+ = lens _bMetadata (\ s a -> s{_bMetadata = a})
1362+
1363+instance FromJSON Birthday where
1364+ parseJSON
1365+ = withObject "Birthday"
1366+ (\ o ->
1367+ Birthday <$>
1368+ (o .:? "text") <*> (o .:? "date") <*>
1369+ (o .:? "metadata"))
1370+
1371+instance ToJSON Birthday where
1372+ toJSON Birthday{..}
1373+ = object
1374+ (catMaybes
1375+ [("text" .=) <$> _bText, ("date" .=) <$> _bDate,
1376+ ("metadata" .=) <$> _bMetadata])
1377+
1378+-- | Represents a whole calendar date, for example a date of birth. The time
1379+-- of day and time zone are either specified elsewhere or are not
1380+-- significant. The date is relative to the [Proleptic Gregorian
1381+-- Calendar](https:\/\/en.wikipedia.org\/wiki\/Proleptic_Gregorian_calendar).
1382+-- The day may be 0 to represent a year and month where the day is not
1383+-- significant. The year may be 0 to represent a month and day independent
1384+-- of year; for example, anniversary date.
1385+--
1386+-- /See:/ 'date' smart constructor.
1387+data Date = Date
1388+ { _dDay :: !(Maybe (Textual Int32))
1389+ , _dYear :: !(Maybe (Textual Int32))
1390+ , _dMonth :: !(Maybe (Textual Int32))
1391+ } deriving (Eq,Show,Data,Typeable,Generic)
1392+
1393+-- | Creates a value of 'Date' with the minimum fields required to make a request.
1394+--
1395+-- Use one of the following lenses to modify other fields as desired:
1396+--
1397+-- * 'dDay'
1398+--
1399+-- * 'dYear'
1400+--
1401+-- * 'dMonth'
1402+date
1403+ :: Date
1404+date =
1405+ Date
1406+ { _dDay = Nothing
1407+ , _dYear = Nothing
1408+ , _dMonth = Nothing
1409+ }
1410+
1411+-- | Day of month. Must be from 1 to 31 and valid for the year and month, or
1412+-- 0 if specifying a year\/month where the day is not significant.
1413+dDay :: Lens' Date (Maybe Int32)
1414+dDay
1415+ = lens _dDay (\ s a -> s{_dDay = a}) .
1416+ mapping _Coerce
1417+
1418+-- | Year of date. Must be from 1 to 9999, or 0 if specifying a date without
1419+-- a year.
1420+dYear :: Lens' Date (Maybe Int32)
1421+dYear
1422+ = lens _dYear (\ s a -> s{_dYear = a}) .
1423+ mapping _Coerce
1424+
1425+-- | Month of year. Must be from 1 to 12.
1426+dMonth :: Lens' Date (Maybe Int32)
1427+dMonth
1428+ = lens _dMonth (\ s a -> s{_dMonth = a}) .
1429+ mapping _Coerce
1430+
1431+instance FromJSON Date where
1432+ parseJSON
1433+ = withObject "Date"
1434+ (\ o ->
1435+ Date <$>
1436+ (o .:? "day") <*> (o .:? "year") <*> (o .:? "month"))
1437+
1438+instance ToJSON Date where
1439+ toJSON Date{..}
1440+ = object
1441+ (catMaybes
1442+ [("day" .=) <$> _dDay, ("year" .=) <$> _dYear,
1443+ ("month" .=) <$> _dMonth])
1444+
1445+-- | A brief one-line description of the person.
1446+--
1447+-- /See:/ 'tagline' smart constructor.
1448+data Tagline = Tagline
1449+ { _tValue :: !(Maybe Text)
1450+ , _tMetadata :: !(Maybe FieldMetadata)
1451+ } deriving (Eq,Show,Data,Typeable,Generic)
1452+
1453+-- | Creates a value of 'Tagline' with the minimum fields required to make a request.
1454+--
1455+-- Use one of the following lenses to modify other fields as desired:
1456+--
1457+-- * 'tValue'
1458+--
1459+-- * 'tMetadata'
1460+tagline
1461+ :: Tagline
1462+tagline =
1463+ Tagline
1464+ { _tValue = Nothing
1465+ , _tMetadata = Nothing
1466+ }
1467+
1468+-- | The tagline.
1469+tValue :: Lens' Tagline (Maybe Text)
1470+tValue = lens _tValue (\ s a -> s{_tValue = a})
1471+
1472+-- | Metadata about the tagline.
1473+tMetadata :: Lens' Tagline (Maybe FieldMetadata)
1474+tMetadata
1475+ = lens _tMetadata (\ s a -> s{_tMetadata = a})
1476+
1477+instance FromJSON Tagline where
1478+ parseJSON
1479+ = withObject "Tagline"
1480+ (\ o ->
1481+ Tagline <$> (o .:? "value") <*> (o .:? "metadata"))
1482+
1483+instance ToJSON Tagline where
1484+ toJSON Tagline{..}
1485+ = object
1486+ (catMaybes
1487+ [("value" .=) <$> _tValue,
1488+ ("metadata" .=) <$> _tMetadata])
1489+
1490+-- | A person\'s past or current residence.
1491+--
1492+-- /See:/ 'residence' smart constructor.
1493+data Residence = Residence
1494+ { _resValue :: !(Maybe Text)
1495+ , _resCurrent :: !(Maybe Bool)
1496+ , _resMetadata :: !(Maybe FieldMetadata)
1497+ } deriving (Eq,Show,Data,Typeable,Generic)
1498+
1499+-- | Creates a value of 'Residence' with the minimum fields required to make a request.
1500+--
1501+-- Use one of the following lenses to modify other fields as desired:
1502+--
1503+-- * 'resValue'
1504+--
1505+-- * 'resCurrent'
1506+--
1507+-- * 'resMetadata'
1508+residence
1509+ :: Residence
1510+residence =
1511+ Residence
1512+ { _resValue = Nothing
1513+ , _resCurrent = Nothing
1514+ , _resMetadata = Nothing
1515+ }
1516+
1517+-- | The address of the residence.
1518+resValue :: Lens' Residence (Maybe Text)
1519+resValue = lens _resValue (\ s a -> s{_resValue = a})
1520+
1521+-- | True if the residence is the person\'s current residence; false if the
1522+-- residence is a past residence.
1523+resCurrent :: Lens' Residence (Maybe Bool)
1524+resCurrent
1525+ = lens _resCurrent (\ s a -> s{_resCurrent = a})
1526+
1527+-- | Metadata about the residence.
1528+resMetadata :: Lens' Residence (Maybe FieldMetadata)
1529+resMetadata
1530+ = lens _resMetadata (\ s a -> s{_resMetadata = a})
1531+
1532+instance FromJSON Residence where
1533+ parseJSON
1534+ = withObject "Residence"
1535+ (\ o ->
1536+ Residence <$>
1537+ (o .:? "value") <*> (o .:? "current") <*>
1538+ (o .:? "metadata"))
1539+
1540+instance ToJSON Residence where
1541+ toJSON Residence{..}
1542+ = object
1543+ (catMaybes
1544+ [("value" .=) <$> _resValue,
1545+ ("current" .=) <$> _resCurrent,
1546+ ("metadata" .=) <$> _resMetadata])
1547+
1548+-- | A person\'s gender.
1549+--
1550+-- /See:/ 'gender' smart constructor.
1551+data Gender = Gender
1552+ { _gValue :: !(Maybe Text)
1553+ , _gMetadata :: !(Maybe FieldMetadata)
1554+ , _gFormattedValue :: !(Maybe Text)
1555+ } deriving (Eq,Show,Data,Typeable,Generic)
1556+
1557+-- | Creates a value of 'Gender' with the minimum fields required to make a request.
1558+--
1559+-- Use one of the following lenses to modify other fields as desired:
1560+--
1561+-- * 'gValue'
1562+--
1563+-- * 'gMetadata'
1564+--
1565+-- * 'gFormattedValue'
1566+gender
1567+ :: Gender
1568+gender =
1569+ Gender
1570+ { _gValue = Nothing
1571+ , _gMetadata = Nothing
1572+ , _gFormattedValue = Nothing
1573+ }
1574+
1575+-- | The gender for the person. The gender can be custom or predefined.
1576+-- Possible values include, but are not limited to, the following: *
1577+-- \`male\` * \`female\` * \`other\` * \`unknown\`
1578+gValue :: Lens' Gender (Maybe Text)
1579+gValue = lens _gValue (\ s a -> s{_gValue = a})
1580+
1581+-- | Metadata about the gender.
1582+gMetadata :: Lens' Gender (Maybe FieldMetadata)
1583+gMetadata
1584+ = lens _gMetadata (\ s a -> s{_gMetadata = a})
1585+
1586+-- | The read-only value of the gender translated and formatted in the
1587+-- viewer\'s account locale or the \`Accept-Language\` HTTP header locale.
1588+gFormattedValue :: Lens' Gender (Maybe Text)
1589+gFormattedValue
1590+ = lens _gFormattedValue
1591+ (\ s a -> s{_gFormattedValue = a})
1592+
1593+instance FromJSON Gender where
1594+ parseJSON
1595+ = withObject "Gender"
1596+ (\ o ->
1597+ Gender <$>
1598+ (o .:? "value") <*> (o .:? "metadata") <*>
1599+ (o .:? "formattedValue"))
1600+
1601+instance ToJSON Gender where
1602+ toJSON Gender{..}
1603+ = object
1604+ (catMaybes
1605+ [("value" .=) <$> _gValue,
1606+ ("metadata" .=) <$> _gMetadata,
1607+ ("formattedValue" .=) <$> _gFormattedValue])
1608+
1609+-- | A person\'s name. If the name is a mononym, the family name is empty.
1610+--
1611+-- /See:/ 'name' smart constructor.
1612+data Name = Name
1613+ { _nGivenName :: !(Maybe Text)
1614+ , _nPhoneticHonorificSuffix :: !(Maybe Text)
1615+ , _nMiddleName :: !(Maybe Text)
1616+ , _nPhoneticMiddleName :: !(Maybe Text)
1617+ , _nPhoneticFamilyName :: !(Maybe Text)
1618+ , _nPhoneticHonorificPrefix :: !(Maybe Text)
1619+ , _nHonorificPrefix :: !(Maybe Text)
1620+ , _nFamilyName :: !(Maybe Text)
1621+ , _nMetadata :: !(Maybe FieldMetadata)
1622+ , _nDisplayName :: !(Maybe Text)
1623+ , _nPhoneticGivenName :: !(Maybe Text)
1624+ , _nHonorificSuffix :: !(Maybe Text)
1625+ } deriving (Eq,Show,Data,Typeable,Generic)
1626+
1627+-- | Creates a value of 'Name' with the minimum fields required to make a request.
1628+--
1629+-- Use one of the following lenses to modify other fields as desired:
1630+--
1631+-- * 'nGivenName'
1632+--
1633+-- * 'nPhoneticHonorificSuffix'
1634+--
1635+-- * 'nMiddleName'
1636+--
1637+-- * 'nPhoneticMiddleName'
1638+--
1639+-- * 'nPhoneticFamilyName'
1640+--
1641+-- * 'nPhoneticHonorificPrefix'
1642+--
1643+-- * 'nHonorificPrefix'
1644+--
1645+-- * 'nFamilyName'
1646+--
1647+-- * 'nMetadata'
1648+--
1649+-- * 'nDisplayName'
1650+--
1651+-- * 'nPhoneticGivenName'
1652+--
1653+-- * 'nHonorificSuffix'
1654+name
1655+ :: Name
1656+name =
1657+ Name
1658+ { _nGivenName = Nothing
1659+ , _nPhoneticHonorificSuffix = Nothing
1660+ , _nMiddleName = Nothing
1661+ , _nPhoneticMiddleName = Nothing
1662+ , _nPhoneticFamilyName = Nothing
1663+ , _nPhoneticHonorificPrefix = Nothing
1664+ , _nHonorificPrefix = Nothing
1665+ , _nFamilyName = Nothing
1666+ , _nMetadata = Nothing
1667+ , _nDisplayName = Nothing
1668+ , _nPhoneticGivenName = Nothing
1669+ , _nHonorificSuffix = Nothing
1670+ }
1671+
1672+-- | The given name.
1673+nGivenName :: Lens' Name (Maybe Text)
1674+nGivenName
1675+ = lens _nGivenName (\ s a -> s{_nGivenName = a})
1676+
1677+-- | The honorific suffixes spelled as they sound.
1678+nPhoneticHonorificSuffix :: Lens' Name (Maybe Text)
1679+nPhoneticHonorificSuffix
1680+ = lens _nPhoneticHonorificSuffix
1681+ (\ s a -> s{_nPhoneticHonorificSuffix = a})
1682+
1683+-- | The middle name(s).
1684+nMiddleName :: Lens' Name (Maybe Text)
1685+nMiddleName
1686+ = lens _nMiddleName (\ s a -> s{_nMiddleName = a})
1687+
1688+-- | The middle name(s) spelled as they sound.
1689+nPhoneticMiddleName :: Lens' Name (Maybe Text)
1690+nPhoneticMiddleName
1691+ = lens _nPhoneticMiddleName
1692+ (\ s a -> s{_nPhoneticMiddleName = a})
1693+
1694+-- | The family name spelled as it sounds.
1695+nPhoneticFamilyName :: Lens' Name (Maybe Text)
1696+nPhoneticFamilyName
1697+ = lens _nPhoneticFamilyName
1698+ (\ s a -> s{_nPhoneticFamilyName = a})
1699+
1700+-- | The honorific prefixes spelled as they sound.
1701+nPhoneticHonorificPrefix :: Lens' Name (Maybe Text)
1702+nPhoneticHonorificPrefix
1703+ = lens _nPhoneticHonorificPrefix
1704+ (\ s a -> s{_nPhoneticHonorificPrefix = a})
1705+
1706+-- | The honorific prefixes, such as \`Mrs.\` or \`Dr.\`
1707+nHonorificPrefix :: Lens' Name (Maybe Text)
1708+nHonorificPrefix
1709+ = lens _nHonorificPrefix
1710+ (\ s a -> s{_nHonorificPrefix = a})
1711+
1712+-- | The family name.
1713+nFamilyName :: Lens' Name (Maybe Text)
1714+nFamilyName
1715+ = lens _nFamilyName (\ s a -> s{_nFamilyName = a})
1716+
1717+-- | Metadata about the name.
1718+nMetadata :: Lens' Name (Maybe FieldMetadata)
1719+nMetadata
1720+ = lens _nMetadata (\ s a -> s{_nMetadata = a})
1721+
1722+-- | The display name formatted according to the locale specified by the
1723+-- viewer\'s account or the Accept-Language HTTP header.
1724+nDisplayName :: Lens' Name (Maybe Text)
1725+nDisplayName
1726+ = lens _nDisplayName (\ s a -> s{_nDisplayName = a})
1727+
1728+-- | The given name spelled as it sounds.
1729+nPhoneticGivenName :: Lens' Name (Maybe Text)
1730+nPhoneticGivenName
1731+ = lens _nPhoneticGivenName
1732+ (\ s a -> s{_nPhoneticGivenName = a})
1733+
1734+-- | The honorific suffixes, such as \`Jr.\`
1735+nHonorificSuffix :: Lens' Name (Maybe Text)
1736+nHonorificSuffix
1737+ = lens _nHonorificSuffix
1738+ (\ s a -> s{_nHonorificSuffix = a})
1739+
1740+instance FromJSON Name where
1741+ parseJSON
1742+ = withObject "Name"
1743+ (\ o ->
1744+ Name <$>
1745+ (o .:? "givenName") <*>
1746+ (o .:? "phoneticHonorificSuffix")
1747+ <*> (o .:? "middleName")
1748+ <*> (o .:? "phoneticMiddleName")
1749+ <*> (o .:? "phoneticFamilyName")
1750+ <*> (o .:? "phoneticHonorificPrefix")
1751+ <*> (o .:? "honorificPrefix")
1752+ <*> (o .:? "familyName")
1753+ <*> (o .:? "metadata")
1754+ <*> (o .:? "displayName")
1755+ <*> (o .:? "phoneticGivenName")
1756+ <*> (o .:? "honorificSuffix"))
1757+
1758+instance ToJSON Name where
1759+ toJSON Name{..}
1760+ = object
1761+ (catMaybes
1762+ [("givenName" .=) <$> _nGivenName,
1763+ ("phoneticHonorificSuffix" .=) <$>
1764+ _nPhoneticHonorificSuffix,
1765+ ("middleName" .=) <$> _nMiddleName,
1766+ ("phoneticMiddleName" .=) <$> _nPhoneticMiddleName,
1767+ ("phoneticFamilyName" .=) <$> _nPhoneticFamilyName,
1768+ ("phoneticHonorificPrefix" .=) <$>
1769+ _nPhoneticHonorificPrefix,
1770+ ("honorificPrefix" .=) <$> _nHonorificPrefix,
1771+ ("familyName" .=) <$> _nFamilyName,
1772+ ("metadata" .=) <$> _nMetadata,
1773+ ("displayName" .=) <$> _nDisplayName,
1774+ ("phoneticGivenName" .=) <$> _nPhoneticGivenName,
1775+ ("honorificSuffix" .=) <$> _nHonorificSuffix])
1776+
1777+-- | Metadata about a field.
1778+--
1779+-- /See:/ 'fieldMetadata' smart constructor.
1780+data FieldMetadata = FieldMetadata
1781+ { _fmVerified :: !(Maybe Bool)
1782+ , _fmPrimary :: !(Maybe Bool)
1783+ , _fmSource :: !(Maybe Source)
1784+ } deriving (Eq,Show,Data,Typeable,Generic)
1785+
1786+-- | Creates a value of 'FieldMetadata' with the minimum fields required to make a request.
1787+--
1788+-- Use one of the following lenses to modify other fields as desired:
1789+--
1790+-- * 'fmVerified'
1791+--
1792+-- * 'fmPrimary'
1793+--
1794+-- * 'fmSource'
1795+fieldMetadata
1796+ :: FieldMetadata
1797+fieldMetadata =
1798+ FieldMetadata
1799+ { _fmVerified = Nothing
1800+ , _fmPrimary = Nothing
1801+ , _fmSource = Nothing
1802+ }
1803+
1804+-- | True if the field is verified; false if the field is unverified. A
1805+-- verified field is typically a name, email address, phone number, or
1806+-- website that has been confirmed to be owned by the person.
1807+fmVerified :: Lens' FieldMetadata (Maybe Bool)
1808+fmVerified
1809+ = lens _fmVerified (\ s a -> s{_fmVerified = a})
1810+
1811+-- | True if the field is the primary field; false if the field is a
1812+-- secondary field.
1813+fmPrimary :: Lens' FieldMetadata (Maybe Bool)
1814+fmPrimary
1815+ = lens _fmPrimary (\ s a -> s{_fmPrimary = a})
1816+
1817+-- | The source of the field.
1818+fmSource :: Lens' FieldMetadata (Maybe Source)
1819+fmSource = lens _fmSource (\ s a -> s{_fmSource = a})
1820+
1821+instance FromJSON FieldMetadata where
1822+ parseJSON
1823+ = withObject "FieldMetadata"
1824+ (\ o ->
1825+ FieldMetadata <$>
1826+ (o .:? "verified") <*> (o .:? "primary") <*>
1827+ (o .:? "source"))
1828+
1829+instance ToJSON FieldMetadata where
1830+ toJSON FieldMetadata{..}
1831+ = object
1832+ (catMaybes
1833+ [("verified" .=) <$> _fmVerified,
1834+ ("primary" .=) <$> _fmPrimary,
1835+ ("source" .=) <$> _fmSource])
1836+
1837+-- | A person\'s phone number.
1838+--
1839+-- /See:/ 'phoneNumber' smart constructor.
1840+data PhoneNumber = PhoneNumber
1841+ { _pnCanonicalForm :: !(Maybe Text)
1842+ , _pnValue :: !(Maybe Text)
1843+ , _pnMetadata :: !(Maybe FieldMetadata)
1844+ , _pnType :: !(Maybe Text)
1845+ , _pnFormattedType :: !(Maybe Text)
1846+ } deriving (Eq,Show,Data,Typeable,Generic)
1847+
1848+-- | Creates a value of 'PhoneNumber' with the minimum fields required to make a request.
1849+--
1850+-- Use one of the following lenses to modify other fields as desired:
1851+--
1852+-- * 'pnCanonicalForm'
1853+--
1854+-- * 'pnValue'
1855+--
1856+-- * 'pnMetadata'
1857+--
1858+-- * 'pnType'
1859+--
1860+-- * 'pnFormattedType'
1861+phoneNumber
1862+ :: PhoneNumber
1863+phoneNumber =
1864+ PhoneNumber
1865+ { _pnCanonicalForm = Nothing
1866+ , _pnValue = Nothing
1867+ , _pnMetadata = Nothing
1868+ , _pnType = Nothing
1869+ , _pnFormattedType = Nothing
1870+ }
1871+
1872+-- | The read-only canonicalized [ITU-T
1873+-- E.164](https:\/\/law.resource.org\/pub\/us\/cfr\/ibr\/004\/itu-t.E.164.1.2008.pdf)
1874+-- form of the phone number.
1875+pnCanonicalForm :: Lens' PhoneNumber (Maybe Text)
1876+pnCanonicalForm
1877+ = lens _pnCanonicalForm
1878+ (\ s a -> s{_pnCanonicalForm = a})
1879+
1880+-- | The phone number.
1881+pnValue :: Lens' PhoneNumber (Maybe Text)
1882+pnValue = lens _pnValue (\ s a -> s{_pnValue = a})
1883+
1884+-- | Metadata about the phone number.
1885+pnMetadata :: Lens' PhoneNumber (Maybe FieldMetadata)
1886+pnMetadata
1887+ = lens _pnMetadata (\ s a -> s{_pnMetadata = a})
1888+
1889+-- | The type of the phone number. The type can be custom or predefined.
1890+-- Possible values include, but are not limited to, the following: *
1891+-- \`home\` * \`work\` * \`mobile\` * \`homeFax\` * \`workFax\` *
1892+-- \`otherFax\` * \`pager\` * \`workMobile\` * \`workPager\` * \`main\` *
1893+-- \`googleVoice\` * \`other\`
1894+pnType :: Lens' PhoneNumber (Maybe Text)
1895+pnType = lens _pnType (\ s a -> s{_pnType = a})
1896+
1897+-- | The read-only type of the phone number translated and formatted in the
1898+-- viewer\'s account locale or the the \`Accept-Language\` HTTP header
1899+-- locale.
1900+pnFormattedType :: Lens' PhoneNumber (Maybe Text)
1901+pnFormattedType
1902+ = lens _pnFormattedType
1903+ (\ s a -> s{_pnFormattedType = a})
1904+
1905+instance FromJSON PhoneNumber where
1906+ parseJSON
1907+ = withObject "PhoneNumber"
1908+ (\ o ->
1909+ PhoneNumber <$>
1910+ (o .:? "canonicalForm") <*> (o .:? "value") <*>
1911+ (o .:? "metadata")
1912+ <*> (o .:? "type")
1913+ <*> (o .:? "formattedType"))
1914+
1915+instance ToJSON PhoneNumber where
1916+ toJSON PhoneNumber{..}
1917+ = object
1918+ (catMaybes
1919+ [("canonicalForm" .=) <$> _pnCanonicalForm,
1920+ ("value" .=) <$> _pnValue,
1921+ ("metadata" .=) <$> _pnMetadata,
1922+ ("type" .=) <$> _pnType,
1923+ ("formattedType" .=) <$> _pnFormattedType])
1924+
1925+-- | A person\'s occupation.
1926+--
1927+-- /See:/ 'occupation' smart constructor.
1928+data Occupation = Occupation
1929+ { _oValue :: !(Maybe Text)
1930+ , _oMetadata :: !(Maybe FieldMetadata)
1931+ } deriving (Eq,Show,Data,Typeable,Generic)
1932+
1933+-- | Creates a value of 'Occupation' with the minimum fields required to make a request.
1934+--
1935+-- Use one of the following lenses to modify other fields as desired:
1936+--
1937+-- * 'oValue'
1938+--
1939+-- * 'oMetadata'
1940+occupation
1941+ :: Occupation
1942+occupation =
1943+ Occupation
1944+ { _oValue = Nothing
1945+ , _oMetadata = Nothing
1946+ }
1947+
1948+-- | The occupation; for example, \`carpenter\`.
1949+oValue :: Lens' Occupation (Maybe Text)
1950+oValue = lens _oValue (\ s a -> s{_oValue = a})
1951+
1952+-- | Metadata about the occupation.
1953+oMetadata :: Lens' Occupation (Maybe FieldMetadata)
1954+oMetadata
1955+ = lens _oMetadata (\ s a -> s{_oMetadata = a})
1956+
1957+instance FromJSON Occupation where
1958+ parseJSON
1959+ = withObject "Occupation"
1960+ (\ o ->
1961+ Occupation <$>
1962+ (o .:? "value") <*> (o .:? "metadata"))
1963+
1964+instance ToJSON Occupation where
1965+ toJSON Occupation{..}
1966+ = object
1967+ (catMaybes
1968+ [("value" .=) <$> _oValue,
1969+ ("metadata" .=) <$> _oMetadata])
1970+
1971+-- | A person\'s email address.
1972+--
1973+-- /See:/ 'emailAddress' smart constructor.
1974+data EmailAddress = EmailAddress
1975+ { _eaValue :: !(Maybe Text)
1976+ , _eaMetadata :: !(Maybe FieldMetadata)
1977+ , _eaType :: !(Maybe Text)
1978+ , _eaFormattedType :: !(Maybe Text)
1979+ } deriving (Eq,Show,Data,Typeable,Generic)
1980+
1981+-- | Creates a value of 'EmailAddress' with the minimum fields required to make a request.
1982+--
1983+-- Use one of the following lenses to modify other fields as desired:
1984+--
1985+-- * 'eaValue'
1986+--
1987+-- * 'eaMetadata'
1988+--
1989+-- * 'eaType'
1990+--
1991+-- * 'eaFormattedType'
1992+emailAddress
1993+ :: EmailAddress
1994+emailAddress =
1995+ EmailAddress
1996+ { _eaValue = Nothing
1997+ , _eaMetadata = Nothing
1998+ , _eaType = Nothing
1999+ , _eaFormattedType = Nothing
2000+ }
2001+
2002+-- | The email address.
2003+eaValue :: Lens' EmailAddress (Maybe Text)
2004+eaValue = lens _eaValue (\ s a -> s{_eaValue = a})
2005+
2006+-- | Metadata about the email address.
2007+eaMetadata :: Lens' EmailAddress (Maybe FieldMetadata)
2008+eaMetadata
2009+ = lens _eaMetadata (\ s a -> s{_eaMetadata = a})
2010+
2011+-- | The type of the email address. The type can be custom or predefined.
2012+-- Possible values include, but are not limited to, the following: *
2013+-- \`home\` * \`work\` * \`other\`
2014+eaType :: Lens' EmailAddress (Maybe Text)
2015+eaType = lens _eaType (\ s a -> s{_eaType = a})
2016+
2017+-- | The read-only type of the email address translated and formatted in the
2018+-- viewer\'s account locale or the \`Accept-Language\` HTTP header locale.
2019+eaFormattedType :: Lens' EmailAddress (Maybe Text)
2020+eaFormattedType
2021+ = lens _eaFormattedType
2022+ (\ s a -> s{_eaFormattedType = a})
2023+
2024+instance FromJSON EmailAddress where
2025+ parseJSON
2026+ = withObject "EmailAddress"
2027+ (\ o ->
2028+ EmailAddress <$>
2029+ (o .:? "value") <*> (o .:? "metadata") <*>
2030+ (o .:? "type")
2031+ <*> (o .:? "formattedType"))
2032+
2033+instance ToJSON EmailAddress where
2034+ toJSON EmailAddress{..}
2035+ = object
2036+ (catMaybes
2037+ [("value" .=) <$> _eaValue,
2038+ ("metadata" .=) <$> _eaMetadata,
2039+ ("type" .=) <$> _eaType,
2040+ ("formattedType" .=) <$> _eaFormattedType])
2041+
2042+-- | The source of a field.
2043+--
2044+-- /See:/ 'source' smart constructor.
2045+data Source = Source
2046+ { _sId :: !(Maybe Text)
2047+ , _sType :: !(Maybe Text)
2048+ } deriving (Eq,Show,Data,Typeable,Generic)
2049+
2050+-- | Creates a value of 'Source' with the minimum fields required to make a request.
2051+--
2052+-- Use one of the following lenses to modify other fields as desired:
2053+--
2054+-- * 'sId'
2055+--
2056+-- * 'sType'
2057+source
2058+ :: Source
2059+source =
2060+ Source
2061+ { _sId = Nothing
2062+ , _sType = Nothing
2063+ }
2064+
2065+-- | A unique identifier within the source type generated by the server.
2066+sId :: Lens' Source (Maybe Text)
2067+sId = lens _sId (\ s a -> s{_sId = a})
2068+
2069+-- | The source type.
2070+sType :: Lens' Source (Maybe Text)
2071+sType = lens _sType (\ s a -> s{_sType = a})
2072+
2073+instance FromJSON Source where
2074+ parseJSON
2075+ = withObject "Source"
2076+ (\ o -> Source <$> (o .:? "id") <*> (o .:? "type"))
2077+
2078+instance ToJSON Source where
2079+ toJSON Source{..}
2080+ = object
2081+ (catMaybes
2082+ [("id" .=) <$> _sId, ("type" .=) <$> _sType])
2083+
2084+-- | A person\'s instant messaging client.
2085+--
2086+-- /See:/ 'imClient' smart constructor.
2087+data ImClient = ImClient
2088+ { _icFormattedProtocol :: !(Maybe Text)
2089+ , _icUsername :: !(Maybe Text)
2090+ , _icProtocol :: !(Maybe Text)
2091+ , _icMetadata :: !(Maybe FieldMetadata)
2092+ , _icType :: !(Maybe Text)
2093+ , _icFormattedType :: !(Maybe Text)
2094+ } deriving (Eq,Show,Data,Typeable,Generic)
2095+
2096+-- | Creates a value of 'ImClient' with the minimum fields required to make a request.
2097+--
2098+-- Use one of the following lenses to modify other fields as desired:
2099+--
2100+-- * 'icFormattedProtocol'
2101+--
2102+-- * 'icUsername'
2103+--
2104+-- * 'icProtocol'
2105+--
2106+-- * 'icMetadata'
2107+--
2108+-- * 'icType'
2109+--
2110+-- * 'icFormattedType'
2111+imClient
2112+ :: ImClient
2113+imClient =
2114+ ImClient
2115+ { _icFormattedProtocol = Nothing
2116+ , _icUsername = Nothing
2117+ , _icProtocol = Nothing
2118+ , _icMetadata = Nothing
2119+ , _icType = Nothing
2120+ , _icFormattedType = Nothing
2121+ }
2122+
2123+-- | The read-only protocol of the IM client formatted in the viewer\'s
2124+-- account locale or the \`Accept-Language\` HTTP header locale.
2125+icFormattedProtocol :: Lens' ImClient (Maybe Text)
2126+icFormattedProtocol
2127+ = lens _icFormattedProtocol
2128+ (\ s a -> s{_icFormattedProtocol = a})
2129+
2130+-- | The user name used in the IM client.
2131+icUsername :: Lens' ImClient (Maybe Text)
2132+icUsername
2133+ = lens _icUsername (\ s a -> s{_icUsername = a})
2134+
2135+-- | The protocol of the IM client. The protocol can be custom or predefined.
2136+-- Possible values include, but are not limited to, the following: *
2137+-- \`aim\` * \`msn\` * \`yahoo\` * \`skype\` * \`qq\` * \`googleTalk\` *
2138+-- \`icq\` * \`jabber\` * \`netMeeting\`
2139+icProtocol :: Lens' ImClient (Maybe Text)
2140+icProtocol
2141+ = lens _icProtocol (\ s a -> s{_icProtocol = a})
2142+
2143+-- | Metadata about the IM client.
2144+icMetadata :: Lens' ImClient (Maybe FieldMetadata)
2145+icMetadata
2146+ = lens _icMetadata (\ s a -> s{_icMetadata = a})
2147+
2148+-- | The type of the IM client. The type can be custom or predefined.
2149+-- Possible values include, but are not limited to, the following: *
2150+-- \`home\` * \`work\` * \`other\`
2151+icType :: Lens' ImClient (Maybe Text)
2152+icType = lens _icType (\ s a -> s{_icType = a})
2153+
2154+-- | The read-only type of the IM client translated and formatted in the
2155+-- viewer\'s account locale or the \`Accept-Language\` HTTP header locale.
2156+icFormattedType :: Lens' ImClient (Maybe Text)
2157+icFormattedType
2158+ = lens _icFormattedType
2159+ (\ s a -> s{_icFormattedType = a})
2160+
2161+instance FromJSON ImClient where
2162+ parseJSON
2163+ = withObject "ImClient"
2164+ (\ o ->
2165+ ImClient <$>
2166+ (o .:? "formattedProtocol") <*> (o .:? "username")
2167+ <*> (o .:? "protocol")
2168+ <*> (o .:? "metadata")
2169+ <*> (o .:? "type")
2170+ <*> (o .:? "formattedType"))
2171+
2172+instance ToJSON ImClient where
2173+ toJSON ImClient{..}
2174+ = object
2175+ (catMaybes
2176+ [("formattedProtocol" .=) <$> _icFormattedProtocol,
2177+ ("username" .=) <$> _icUsername,
2178+ ("protocol" .=) <$> _icProtocol,
2179+ ("metadata" .=) <$> _icMetadata,
2180+ ("type" .=) <$> _icType,
2181+ ("formattedType" .=) <$> _icFormattedType])
2182+
2183+-- | Metadata about a person.
2184+--
2185+-- /See:/ 'personMetadata' smart constructor.
2186+data PersonMetadata = PersonMetadata
2187+ { _pmPreviousResourceNames :: !(Maybe [Text])
2188+ , _pmObjectType :: !(Maybe Text)
2189+ , _pmSources :: !(Maybe [Source])
2190+ , _pmDeleted :: !(Maybe Bool)
2191+ } deriving (Eq,Show,Data,Typeable,Generic)
2192+
2193+-- | Creates a value of 'PersonMetadata' with the minimum fields required to make a request.
2194+--
2195+-- Use one of the following lenses to modify other fields as desired:
2196+--
2197+-- * 'pmPreviousResourceNames'
2198+--
2199+-- * 'pmObjectType'
2200+--
2201+-- * 'pmSources'
2202+--
2203+-- * 'pmDeleted'
2204+personMetadata
2205+ :: PersonMetadata
2206+personMetadata =
2207+ PersonMetadata
2208+ { _pmPreviousResourceNames = Nothing
2209+ , _pmObjectType = Nothing
2210+ , _pmSources = Nothing
2211+ , _pmDeleted = Nothing
2212+ }
2213+
2214+-- | Any former resource names this person has had. Populated only for
2215+-- [\`connections.list\`](\/people\/api\/rest\/v1\/people.connections\/list)
2216+-- requests that include a sync token. The resource name may change when
2217+-- adding or removing fields that link a contact and profile such as a
2218+-- verified email, verified phone number, or profile URL.
2219+pmPreviousResourceNames :: Lens' PersonMetadata [Text]
2220+pmPreviousResourceNames
2221+ = lens _pmPreviousResourceNames
2222+ (\ s a -> s{_pmPreviousResourceNames = a})
2223+ . _Default
2224+ . _Coerce
2225+
2226+-- | The type of the person object.
2227+pmObjectType :: Lens' PersonMetadata (Maybe Text)
2228+pmObjectType
2229+ = lens _pmObjectType (\ s a -> s{_pmObjectType = a})
2230+
2231+-- | The sources of data for the person.
2232+pmSources :: Lens' PersonMetadata [Source]
2233+pmSources
2234+ = lens _pmSources (\ s a -> s{_pmSources = a}) .
2235+ _Default
2236+ . _Coerce
2237+
2238+-- | True if the person resource has been deleted. Populated only for
2239+-- [\`connections.list\`](\/people\/api\/rest\/v1\/people.connections\/list)
2240+-- requests that include a sync token.
2241+pmDeleted :: Lens' PersonMetadata (Maybe Bool)
2242+pmDeleted
2243+ = lens _pmDeleted (\ s a -> s{_pmDeleted = a})
2244+
2245+instance FromJSON PersonMetadata where
2246+ parseJSON
2247+ = withObject "PersonMetadata"
2248+ (\ o ->
2249+ PersonMetadata <$>
2250+ (o .:? "previousResourceNames" .!= mempty) <*>
2251+ (o .:? "objectType")
2252+ <*> (o .:? "sources" .!= mempty)
2253+ <*> (o .:? "deleted"))
2254+
2255+instance ToJSON PersonMetadata where
2256+ toJSON PersonMetadata{..}
2257+ = object
2258+ (catMaybes
2259+ [("previousResourceNames" .=) <$>
2260+ _pmPreviousResourceNames,
2261+ ("objectType" .=) <$> _pmObjectType,
2262+ ("sources" .=) <$> _pmSources,
2263+ ("deleted" .=) <$> _pmDeleted])
2264+
2265+-- | A person\'s nickname.
2266+--
2267+-- /See:/ 'nickname' smart constructor.
2268+data Nickname = Nickname
2269+ { _nicValue :: !(Maybe Text)
2270+ , _nicMetadata :: !(Maybe FieldMetadata)
2271+ , _nicType :: !(Maybe Text)
2272+ } deriving (Eq,Show,Data,Typeable,Generic)
2273+
2274+-- | Creates a value of 'Nickname' with the minimum fields required to make a request.
2275+--
2276+-- Use one of the following lenses to modify other fields as desired:
2277+--
2278+-- * 'nicValue'
2279+--
2280+-- * 'nicMetadata'
2281+--
2282+-- * 'nicType'
2283+nickname
2284+ :: Nickname
2285+nickname =
2286+ Nickname
2287+ { _nicValue = Nothing
2288+ , _nicMetadata = Nothing
2289+ , _nicType = Nothing
2290+ }
2291+
2292+-- | The nickname.
2293+nicValue :: Lens' Nickname (Maybe Text)
2294+nicValue = lens _nicValue (\ s a -> s{_nicValue = a})
2295+
2296+-- | Metadata about the nickname.
2297+nicMetadata :: Lens' Nickname (Maybe FieldMetadata)
2298+nicMetadata
2299+ = lens _nicMetadata (\ s a -> s{_nicMetadata = a})
2300+
2301+-- | The type of the nickname.
2302+nicType :: Lens' Nickname (Maybe Text)
2303+nicType = lens _nicType (\ s a -> s{_nicType = a})
2304+
2305+instance FromJSON Nickname where
2306+ parseJSON
2307+ = withObject "Nickname"
2308+ (\ o ->
2309+ Nickname <$>
2310+ (o .:? "value") <*> (o .:? "metadata") <*>
2311+ (o .:? "type"))
2312+
2313+instance ToJSON Nickname where
2314+ toJSON Nickname{..}
2315+ = object
2316+ (catMaybes
2317+ [("value" .=) <$> _nicValue,
2318+ ("metadata" .=) <$> _nicMetadata,
2319+ ("type" .=) <$> _nicType])
2320+
2321+-- | A person\'s past or current organization. Overlapping date ranges are
2322+-- permitted.
2323+--
2324+-- /See:/ 'organization' smart constructor.
2325+data Organization = Organization
2326+ { _orgDePartment :: !(Maybe Text)
2327+ , _orgLocation :: !(Maybe Text)
2328+ , _orgDomain :: !(Maybe Text)
2329+ , _orgEndDate :: !(Maybe Date)
2330+ , _orgSymbol :: !(Maybe Text)
2331+ , _orgJobDescription :: !(Maybe Text)
2332+ , _orgCurrent :: !(Maybe Bool)
2333+ , _orgStartDate :: !(Maybe Date)
2334+ , _orgName :: !(Maybe Text)
2335+ , _orgMetadata :: !(Maybe FieldMetadata)
2336+ , _orgPhoneticName :: !(Maybe Text)
2337+ , _orgTitle :: !(Maybe Text)
2338+ , _orgType :: !(Maybe Text)
2339+ , _orgFormattedType :: !(Maybe Text)
2340+ } deriving (Eq,Show,Data,Typeable,Generic)
2341+
2342+-- | Creates a value of 'Organization' with the minimum fields required to make a request.
2343+--
2344+-- Use one of the following lenses to modify other fields as desired:
2345+--
2346+-- * 'orgDePartment'
2347+--
2348+-- * 'orgLocation'
2349+--
2350+-- * 'orgDomain'
2351+--
2352+-- * 'orgEndDate'
2353+--
2354+-- * 'orgSymbol'
2355+--
2356+-- * 'orgJobDescription'
2357+--
2358+-- * 'orgCurrent'
2359+--
2360+-- * 'orgStartDate'
2361+--
2362+-- * 'orgName'
2363+--
2364+-- * 'orgMetadata'
2365+--
2366+-- * 'orgPhoneticName'
2367+--
2368+-- * 'orgTitle'
2369+--
2370+-- * 'orgType'
2371+--
2372+-- * 'orgFormattedType'
2373+organization
2374+ :: Organization
2375+organization =
2376+ Organization
2377+ { _orgDePartment = Nothing
2378+ , _orgLocation = Nothing
2379+ , _orgDomain = Nothing
2380+ , _orgEndDate = Nothing
2381+ , _orgSymbol = Nothing
2382+ , _orgJobDescription = Nothing
2383+ , _orgCurrent = Nothing
2384+ , _orgStartDate = Nothing
2385+ , _orgName = Nothing
2386+ , _orgMetadata = Nothing
2387+ , _orgPhoneticName = Nothing
2388+ , _orgTitle = Nothing
2389+ , _orgType = Nothing
2390+ , _orgFormattedType = Nothing
2391+ }
2392+
2393+-- | The person\'s department at the organization.
2394+orgDePartment :: Lens' Organization (Maybe Text)
2395+orgDePartment
2396+ = lens _orgDePartment
2397+ (\ s a -> s{_orgDePartment = a})
2398+
2399+-- | The location of the organization office the person works at.
2400+orgLocation :: Lens' Organization (Maybe Text)
2401+orgLocation
2402+ = lens _orgLocation (\ s a -> s{_orgLocation = a})
2403+
2404+-- | The domain name associated with the organization; for example,
2405+-- \`google.com\`.
2406+orgDomain :: Lens' Organization (Maybe Text)
2407+orgDomain
2408+ = lens _orgDomain (\ s a -> s{_orgDomain = a})
2409+
2410+-- | The end date when the person left the organization.
2411+orgEndDate :: Lens' Organization (Maybe Date)
2412+orgEndDate
2413+ = lens _orgEndDate (\ s a -> s{_orgEndDate = a})
2414+
2415+-- | The symbol associated with the organization; for example, a stock ticker
2416+-- symbol, abbreviation, or acronym.
2417+orgSymbol :: Lens' Organization (Maybe Text)
2418+orgSymbol
2419+ = lens _orgSymbol (\ s a -> s{_orgSymbol = a})
2420+
2421+-- | The person\'s job description at the organization.
2422+orgJobDescription :: Lens' Organization (Maybe Text)
2423+orgJobDescription
2424+ = lens _orgJobDescription
2425+ (\ s a -> s{_orgJobDescription = a})
2426+
2427+-- | True if the organization is the person\'s current organization; false if
2428+-- the organization is a past organization.
2429+orgCurrent :: Lens' Organization (Maybe Bool)
2430+orgCurrent
2431+ = lens _orgCurrent (\ s a -> s{_orgCurrent = a})
2432+
2433+-- | The start date when the person joined the organization.
2434+orgStartDate :: Lens' Organization (Maybe Date)
2435+orgStartDate
2436+ = lens _orgStartDate (\ s a -> s{_orgStartDate = a})
2437+
2438+-- | The name of the organization.
2439+orgName :: Lens' Organization (Maybe Text)
2440+orgName = lens _orgName (\ s a -> s{_orgName = a})
2441+
2442+-- | Metadata about the organization.
2443+orgMetadata :: Lens' Organization (Maybe FieldMetadata)
2444+orgMetadata
2445+ = lens _orgMetadata (\ s a -> s{_orgMetadata = a})
2446+
2447+-- | The phonetic name of the organization.
2448+orgPhoneticName :: Lens' Organization (Maybe Text)
2449+orgPhoneticName
2450+ = lens _orgPhoneticName
2451+ (\ s a -> s{_orgPhoneticName = a})
2452+
2453+-- | The person\'s job title at the organization.
2454+orgTitle :: Lens' Organization (Maybe Text)
2455+orgTitle = lens _orgTitle (\ s a -> s{_orgTitle = a})
2456+
2457+-- | The type of the organization. The type can be custom or predefined.
2458+-- Possible values include, but are not limited to, the following: *
2459+-- \`work\` * \`school\`
2460+orgType :: Lens' Organization (Maybe Text)
2461+orgType = lens _orgType (\ s a -> s{_orgType = a})
2462+
2463+-- | The read-only type of the organization translated and formatted in the
2464+-- viewer\'s account locale or the \`Accept-Language\` HTTP header locale.
2465+orgFormattedType :: Lens' Organization (Maybe Text)
2466+orgFormattedType
2467+ = lens _orgFormattedType
2468+ (\ s a -> s{_orgFormattedType = a})
2469+
2470+instance FromJSON Organization where
2471+ parseJSON
2472+ = withObject "Organization"
2473+ (\ o ->
2474+ Organization <$>
2475+ (o .:? "department") <*> (o .:? "location") <*>
2476+ (o .:? "domain")
2477+ <*> (o .:? "endDate")
2478+ <*> (o .:? "symbol")
2479+ <*> (o .:? "jobDescription")
2480+ <*> (o .:? "current")
2481+ <*> (o .:? "startDate")
2482+ <*> (o .:? "name")
2483+ <*> (o .:? "metadata")
2484+ <*> (o .:? "phoneticName")
2485+ <*> (o .:? "title")
2486+ <*> (o .:? "type")
2487+ <*> (o .:? "formattedType"))
2488+
2489+instance ToJSON Organization where
2490+ toJSON Organization{..}
2491+ = object
2492+ (catMaybes
2493+ [("department" .=) <$> _orgDePartment,
2494+ ("location" .=) <$> _orgLocation,
2495+ ("domain" .=) <$> _orgDomain,
2496+ ("endDate" .=) <$> _orgEndDate,
2497+ ("symbol" .=) <$> _orgSymbol,
2498+ ("jobDescription" .=) <$> _orgJobDescription,
2499+ ("current" .=) <$> _orgCurrent,
2500+ ("startDate" .=) <$> _orgStartDate,
2501+ ("name" .=) <$> _orgName,
2502+ ("metadata" .=) <$> _orgMetadata,
2503+ ("phoneticName" .=) <$> _orgPhoneticName,
2504+ ("title" .=) <$> _orgTitle, ("type" .=) <$> _orgType,
2505+ ("formattedType" .=) <$> _orgFormattedType])
2506+
2507+-- | One of the person\'s interests.
2508+--
2509+-- /See:/ 'interest' smart constructor.
2510+data Interest = Interest
2511+ { _iValue :: !(Maybe Text)
2512+ , _iMetadata :: !(Maybe FieldMetadata)
2513+ } deriving (Eq,Show,Data,Typeable,Generic)
2514+
2515+-- | Creates a value of 'Interest' with the minimum fields required to make a request.
2516+--
2517+-- Use one of the following lenses to modify other fields as desired:
2518+--
2519+-- * 'iValue'
2520+--
2521+-- * 'iMetadata'
2522+interest
2523+ :: Interest
2524+interest =
2525+ Interest
2526+ { _iValue = Nothing
2527+ , _iMetadata = Nothing
2528+ }
2529+
2530+-- | The interest; for example, \`stargazing\`.
2531+iValue :: Lens' Interest (Maybe Text)
2532+iValue = lens _iValue (\ s a -> s{_iValue = a})
2533+
2534+-- | Metadata about the interest.
2535+iMetadata :: Lens' Interest (Maybe FieldMetadata)
2536+iMetadata
2537+ = lens _iMetadata (\ s a -> s{_iMetadata = a})
2538+
2539+instance FromJSON Interest where
2540+ parseJSON
2541+ = withObject "Interest"
2542+ (\ o ->
2543+ Interest <$> (o .:? "value") <*> (o .:? "metadata"))
2544+
2545+instance ToJSON Interest where
2546+ toJSON Interest{..}
2547+ = object
2548+ (catMaybes
2549+ [("value" .=) <$> _iValue,
2550+ ("metadata" .=) <$> _iMetadata])
2551+
2552+-- | The response for a single person
2553+--
2554+-- /See:/ 'personResponse' smart constructor.
2555+data PersonResponse = PersonResponse
2556+ { _prRequestedResourceName :: !(Maybe Text)
2557+ , _prPerson :: !(Maybe Person)
2558+ , _prHTTPStatusCode :: !(Maybe (Textual Int32))
2559+ } deriving (Eq,Show,Data,Typeable,Generic)
2560+
2561+-- | Creates a value of 'PersonResponse' with the minimum fields required to make a request.
2562+--
2563+-- Use one of the following lenses to modify other fields as desired:
2564+--
2565+-- * 'prRequestedResourceName'
2566+--
2567+-- * 'prPerson'
2568+--
2569+-- * 'prHTTPStatusCode'
2570+personResponse
2571+ :: PersonResponse
2572+personResponse =
2573+ PersonResponse
2574+ { _prRequestedResourceName = Nothing
2575+ , _prPerson = Nothing
2576+ , _prHTTPStatusCode = Nothing
2577+ }
2578+
2579+-- | The original requested resource name. May be different than the resource
2580+-- name on the returned person. The resource name can change when adding or
2581+-- removing fields that link a contact and profile such as a verified
2582+-- email, verified phone number, or a profile URL.
2583+prRequestedResourceName :: Lens' PersonResponse (Maybe Text)
2584+prRequestedResourceName
2585+ = lens _prRequestedResourceName
2586+ (\ s a -> s{_prRequestedResourceName = a})
2587+
2588+-- | The person.
2589+prPerson :: Lens' PersonResponse (Maybe Person)
2590+prPerson = lens _prPerson (\ s a -> s{_prPerson = a})
2591+
2592+-- | [HTTP 1.1 status
2593+-- code](http:\/\/www.w3.org\/Protocols\/rfc2616\/rfc2616-sec10.html).
2594+prHTTPStatusCode :: Lens' PersonResponse (Maybe Int32)
2595+prHTTPStatusCode
2596+ = lens _prHTTPStatusCode
2597+ (\ s a -> s{_prHTTPStatusCode = a})
2598+ . mapping _Coerce
2599+
2600+instance FromJSON PersonResponse where
2601+ parseJSON
2602+ = withObject "PersonResponse"
2603+ (\ o ->
2604+ PersonResponse <$>
2605+ (o .:? "requestedResourceName") <*> (o .:? "person")
2606+ <*> (o .:? "httpStatusCode"))
2607+
2608+instance ToJSON PersonResponse where
2609+ toJSON PersonResponse{..}
2610+ = object
2611+ (catMaybes
2612+ [("requestedResourceName" .=) <$>
2613+ _prRequestedResourceName,
2614+ ("person" .=) <$> _prPerson,
2615+ ("httpStatusCode" .=) <$> _prHTTPStatusCode])
2616+
2617+-- | A skill that the person has.
2618+--
2619+-- /See:/ 'skill' smart constructor.
2620+data Skill = Skill
2621+ { _sValue :: !(Maybe Text)
2622+ , _sMetadata :: !(Maybe FieldMetadata)
2623+ } deriving (Eq,Show,Data,Typeable,Generic)
2624+
2625+-- | Creates a value of 'Skill' with the minimum fields required to make a request.
2626+--
2627+-- Use one of the following lenses to modify other fields as desired:
2628+--
2629+-- * 'sValue'
2630+--
2631+-- * 'sMetadata'
2632+skill
2633+ :: Skill
2634+skill =
2635+ Skill
2636+ { _sValue = Nothing
2637+ , _sMetadata = Nothing
2638+ }
2639+
2640+-- | The skill; for example, \`underwater basket weaving\`.
2641+sValue :: Lens' Skill (Maybe Text)
2642+sValue = lens _sValue (\ s a -> s{_sValue = a})
2643+
2644+-- | Metadata about the skill.
2645+sMetadata :: Lens' Skill (Maybe FieldMetadata)
2646+sMetadata
2647+ = lens _sMetadata (\ s a -> s{_sMetadata = a})
2648+
2649+instance FromJSON Skill where
2650+ parseJSON
2651+ = withObject "Skill"
2652+ (\ o ->
2653+ Skill <$> (o .:? "value") <*> (o .:? "metadata"))
2654+
2655+instance ToJSON Skill where
2656+ toJSON Skill{..}
2657+ = object
2658+ (catMaybes
2659+ [("value" .=) <$> _sValue,
2660+ ("metadata" .=) <$> _sMetadata])
2661+
2662+-- | A person\'s short biography.
2663+--
2664+-- /See:/ 'biography' smart constructor.
2665+data Biography = Biography
2666+ { _bioValue :: !(Maybe Text)
2667+ , _bioMetadata :: !(Maybe FieldMetadata)
2668+ } deriving (Eq,Show,Data,Typeable,Generic)
2669+
2670+-- | Creates a value of 'Biography' with the minimum fields required to make a request.
2671+--
2672+-- Use one of the following lenses to modify other fields as desired:
2673+--
2674+-- * 'bioValue'
2675+--
2676+-- * 'bioMetadata'
2677+biography
2678+ :: Biography
2679+biography =
2680+ Biography
2681+ { _bioValue = Nothing
2682+ , _bioMetadata = Nothing
2683+ }
2684+
2685+-- | The short biography.
2686+bioValue :: Lens' Biography (Maybe Text)
2687+bioValue = lens _bioValue (\ s a -> s{_bioValue = a})
2688+
2689+-- | Metadata about the biography.
2690+bioMetadata :: Lens' Biography (Maybe FieldMetadata)
2691+bioMetadata
2692+ = lens _bioMetadata (\ s a -> s{_bioMetadata = a})
2693+
2694+instance FromJSON Biography where
2695+ parseJSON
2696+ = withObject "Biography"
2697+ (\ o ->
2698+ Biography <$> (o .:? "value") <*> (o .:? "metadata"))
2699+
2700+instance ToJSON Biography where
2701+ toJSON Biography{..}
2702+ = object
2703+ (catMaybes
2704+ [("value" .=) <$> _bioValue,
2705+ ("metadata" .=) <$> _bioMetadata])
2706+
2707+-- | A person\'s cover photo. A large image shown on the person\'s profile
2708+-- page that represents who they are or what they care about.
2709+--
2710+-- /See:/ 'coverPhoto' smart constructor.
2711+data CoverPhoto = CoverPhoto
2712+ { _cpDefault :: !(Maybe Bool)
2713+ , _cpURL :: !(Maybe Text)
2714+ , _cpMetadata :: !(Maybe FieldMetadata)
2715+ } deriving (Eq,Show,Data,Typeable,Generic)
2716+
2717+-- | Creates a value of 'CoverPhoto' with the minimum fields required to make a request.
2718+--
2719+-- Use one of the following lenses to modify other fields as desired:
2720+--
2721+-- * 'cpDefault'
2722+--
2723+-- * 'cpURL'
2724+--
2725+-- * 'cpMetadata'
2726+coverPhoto
2727+ :: CoverPhoto
2728+coverPhoto =
2729+ CoverPhoto
2730+ { _cpDefault = Nothing
2731+ , _cpURL = Nothing
2732+ , _cpMetadata = Nothing
2733+ }
2734+
2735+-- | True if the cover photo is the default cover photo; false if the cover
2736+-- photo is a user-provided cover photo.
2737+cpDefault :: Lens' CoverPhoto (Maybe Bool)
2738+cpDefault
2739+ = lens _cpDefault (\ s a -> s{_cpDefault = a})
2740+
2741+-- | The URL of the cover photo.
2742+cpURL :: Lens' CoverPhoto (Maybe Text)
2743+cpURL = lens _cpURL (\ s a -> s{_cpURL = a})
2744+
2745+-- | Metadata about the cover photo.
2746+cpMetadata :: Lens' CoverPhoto (Maybe FieldMetadata)
2747+cpMetadata
2748+ = lens _cpMetadata (\ s a -> s{_cpMetadata = a})
2749+
2750+instance FromJSON CoverPhoto where
2751+ parseJSON
2752+ = withObject "CoverPhoto"
2753+ (\ o ->
2754+ CoverPhoto <$>
2755+ (o .:? "default") <*> (o .:? "url") <*>
2756+ (o .:? "metadata"))
2757+
2758+instance ToJSON CoverPhoto where
2759+ toJSON CoverPhoto{..}
2760+ = object
2761+ (catMaybes
2762+ [("default" .=) <$> _cpDefault,
2763+ ("url" .=) <$> _cpURL,
2764+ ("metadata" .=) <$> _cpMetadata])
gogol-people/gen/Network/Google/People/Types/Sum.hsnew file+19
@@ -0,0 +1,19 @@
1+{-# LANGUAGE DeriveDataTypeable #-}
2+{-# LANGUAGE DeriveGeneric #-}
3+{-# LANGUAGE LambdaCase #-}
4+{-# LANGUAGE NoImplicitPrelude #-}
5+{-# LANGUAGE OverloadedStrings #-}
6+
7+{-# OPTIONS_GHC -fno-warn-unused-imports #-}
8+
9+-- |
10+-- Module : Network.Google.People.Types.Sum
11+-- Copyright : (c) 2015 Brendan Hay
12+-- License : Mozilla Public License, v. 2.0.
13+-- Maintainer : Brendan Hay <brendan.g.hay@gmail.com>
14+-- Stability : auto-generated
15+-- Portability : non-portable (GHC extensions)
16+--
17+module Network.Google.People.Types.Sum where
18+
19+import Network.Google.Prelude
gogol-people/gen/Network/Google/Resource/People/People/Connections/List.hsnew file+242
@@ -0,0 +1,242 @@
1+{-# LANGUAGE DataKinds #-}
2+{-# LANGUAGE DeriveDataTypeable #-}
3+{-# LANGUAGE DeriveGeneric #-}
4+{-# LANGUAGE FlexibleInstances #-}
5+{-# LANGUAGE NoImplicitPrelude #-}
6+{-# LANGUAGE OverloadedStrings #-}
7+{-# LANGUAGE RecordWildCards #-}
8+{-# LANGUAGE TypeFamilies #-}
9+{-# LANGUAGE TypeOperators #-}
10+
11+{-# OPTIONS_GHC -fno-warn-duplicate-exports #-}
12+{-# OPTIONS_GHC -fno-warn-unused-binds #-}
13+{-# OPTIONS_GHC -fno-warn-unused-imports #-}
14+
15+-- |
16+-- Module : Network.Google.Resource.People.People.Connections.List
17+-- Copyright : (c) 2015 Brendan Hay
18+-- License : Mozilla Public License, v. 2.0.
19+-- Maintainer : Brendan Hay <brendan.g.hay@gmail.com>
20+-- Stability : auto-generated
21+-- Portability : non-portable (GHC extensions)
22+--
23+-- Provides a list of the authenticated user\'s contacts merged with any
24+-- linked profiles.
25+--
26+-- /See:/ <https://developers.google.com/people/ Google People API Reference> for @people.people.connections.list@.
27+module Network.Google.Resource.People.People.Connections.List
28+ (
29+ -- * REST Resource
30+ PeopleConnectionsListResource
31+
32+ -- * Creating a Request
33+ , peopleConnectionsList
34+ , PeopleConnectionsList
35+
36+ -- * Request Lenses
37+ , pclSyncToken
38+ , pclXgafv
39+ , pclUploadProtocol
40+ , pclResourceName
41+ , pclRequestMaskIncludeField
42+ , pclPp
43+ , pclAccessToken
44+ , pclUploadType
45+ , pclSortOrder
46+ , pclBearerToken
47+ , pclPageToken
48+ , pclPageSize
49+ , pclCallback
50+ ) where
51+
52+import Network.Google.People.Types
53+import Network.Google.Prelude
54+
55+-- | A resource alias for @people.people.connections.list@ method which the
56+-- 'PeopleConnectionsList' request conforms to.
57+type PeopleConnectionsListResource =
58+ "v1" :>
59+ Capture "resourceName" Text :>
60+ "connections" :>
61+ QueryParam "syncToken" Text :>
62+ QueryParam "$.xgafv" Text :>
63+ QueryParam "upload_protocol" Text :>
64+ QueryParam "requestMask.includeField" Text :>
65+ QueryParam "pp" Bool :>
66+ QueryParam "access_token" Text :>
67+ QueryParam "uploadType" Text :>
68+ QueryParam "sortOrder" Text :>
69+ QueryParam "bearer_token" Text :>
70+ QueryParam "pageToken" Text :>
71+ QueryParam "pageSize" (Textual Int32) :>
72+ QueryParam "callback" Text :>
73+ QueryParam "alt" AltJSON :>
74+ Get '[JSON] ListConnectionsResponse
75+
76+-- | Provides a list of the authenticated user\'s contacts merged with any
77+-- linked profiles.
78+--
79+-- /See:/ 'peopleConnectionsList' smart constructor.
80+data PeopleConnectionsList = PeopleConnectionsList
81+ { _pclSyncToken :: !(Maybe Text)
82+ , _pclXgafv :: !(Maybe Text)
83+ , _pclUploadProtocol :: !(Maybe Text)
84+ , _pclResourceName :: !Text
85+ , _pclRequestMaskIncludeField :: !(Maybe Text)
86+ , _pclPp :: !Bool
87+ , _pclAccessToken :: !(Maybe Text)
88+ , _pclUploadType :: !(Maybe Text)
89+ , _pclSortOrder :: !(Maybe Text)
90+ , _pclBearerToken :: !(Maybe Text)
91+ , _pclPageToken :: !(Maybe Text)
92+ , _pclPageSize :: !(Maybe (Textual Int32))
93+ , _pclCallback :: !(Maybe Text)
94+ } deriving (Eq,Show,Data,Typeable,Generic)
95+
96+-- | Creates a value of 'PeopleConnectionsList' with the minimum fields required to make a request.
97+--
98+-- Use one of the following lenses to modify other fields as desired:
99+--
100+-- * 'pclSyncToken'
101+--
102+-- * 'pclXgafv'
103+--
104+-- * 'pclUploadProtocol'
105+--
106+-- * 'pclResourceName'
107+--
108+-- * 'pclRequestMaskIncludeField'
109+--
110+-- * 'pclPp'
111+--
112+-- * 'pclAccessToken'
113+--
114+-- * 'pclUploadType'
115+--
116+-- * 'pclSortOrder'
117+--
118+-- * 'pclBearerToken'
119+--
120+-- * 'pclPageToken'
121+--
122+-- * 'pclPageSize'
123+--
124+-- * 'pclCallback'
125+peopleConnectionsList
126+ :: Text -- ^ 'pclResourceName'
127+ -> PeopleConnectionsList
128+peopleConnectionsList pPclResourceName_ =
129+ PeopleConnectionsList
130+ { _pclSyncToken = Nothing
131+ , _pclXgafv = Nothing
132+ , _pclUploadProtocol = Nothing
133+ , _pclResourceName = pPclResourceName_
134+ , _pclRequestMaskIncludeField = Nothing
135+ , _pclPp = True
136+ , _pclAccessToken = Nothing
137+ , _pclUploadType = Nothing
138+ , _pclSortOrder = Nothing
139+ , _pclBearerToken = Nothing
140+ , _pclPageToken = Nothing
141+ , _pclPageSize = Nothing
142+ , _pclCallback = Nothing
143+ }
144+
145+-- | A sync token, returned by a previous call to
146+-- \`people.connections.list\`. Only resources changed since the sync token
147+-- was created are returned.
148+pclSyncToken :: Lens' PeopleConnectionsList (Maybe Text)
149+pclSyncToken
150+ = lens _pclSyncToken (\ s a -> s{_pclSyncToken = a})
151+
152+-- | V1 error format.
153+pclXgafv :: Lens' PeopleConnectionsList (Maybe Text)
154+pclXgafv = lens _pclXgafv (\ s a -> s{_pclXgafv = a})
155+
156+-- | Upload protocol for media (e.g. \"raw\", \"multipart\").
157+pclUploadProtocol :: Lens' PeopleConnectionsList (Maybe Text)
158+pclUploadProtocol
159+ = lens _pclUploadProtocol
160+ (\ s a -> s{_pclUploadProtocol = a})
161+
162+-- | The resource name to return connections for. Only \`people\/me\` is
163+-- valid.
164+pclResourceName :: Lens' PeopleConnectionsList Text
165+pclResourceName
166+ = lens _pclResourceName
167+ (\ s a -> s{_pclResourceName = a})
168+
169+-- | Comma-separated list of fields to be included in the response. Omitting
170+-- this field will include all fields. Each path should start with
171+-- \`person.\`: for example, \`person.names\` or \`person.photos\`.
172+pclRequestMaskIncludeField :: Lens' PeopleConnectionsList (Maybe Text)
173+pclRequestMaskIncludeField
174+ = lens _pclRequestMaskIncludeField
175+ (\ s a -> s{_pclRequestMaskIncludeField = a})
176+
177+-- | Pretty-print response.
178+pclPp :: Lens' PeopleConnectionsList Bool
179+pclPp = lens _pclPp (\ s a -> s{_pclPp = a})
180+
181+-- | OAuth access token.
182+pclAccessToken :: Lens' PeopleConnectionsList (Maybe Text)
183+pclAccessToken
184+ = lens _pclAccessToken
185+ (\ s a -> s{_pclAccessToken = a})
186+
187+-- | Legacy upload protocol for media (e.g. \"media\", \"multipart\").
188+pclUploadType :: Lens' PeopleConnectionsList (Maybe Text)
189+pclUploadType
190+ = lens _pclUploadType
191+ (\ s a -> s{_pclUploadType = a})
192+
193+-- | The order in which the connections should be sorted. Defaults to
194+-- \`LAST_MODIFIED_ASCENDING\`.
195+pclSortOrder :: Lens' PeopleConnectionsList (Maybe Text)
196+pclSortOrder
197+ = lens _pclSortOrder (\ s a -> s{_pclSortOrder = a})
198+
199+-- | OAuth bearer token.
200+pclBearerToken :: Lens' PeopleConnectionsList (Maybe Text)
201+pclBearerToken
202+ = lens _pclBearerToken
203+ (\ s a -> s{_pclBearerToken = a})
204+
205+-- | The token of the page to be returned.
206+pclPageToken :: Lens' PeopleConnectionsList (Maybe Text)
207+pclPageToken
208+ = lens _pclPageToken (\ s a -> s{_pclPageToken = a})
209+
210+-- | The number of connections to include in the response. Valid values are
211+-- between 1 and 500, inclusive. Defaults to 100.
212+pclPageSize :: Lens' PeopleConnectionsList (Maybe Int32)
213+pclPageSize
214+ = lens _pclPageSize (\ s a -> s{_pclPageSize = a}) .
215+ mapping _Coerce
216+
217+-- | JSONP
218+pclCallback :: Lens' PeopleConnectionsList (Maybe Text)
219+pclCallback
220+ = lens _pclCallback (\ s a -> s{_pclCallback = a})
221+
222+instance GoogleRequest PeopleConnectionsList where
223+ type Rs PeopleConnectionsList =
224+ ListConnectionsResponse
225+ requestClient PeopleConnectionsList{..}
226+ = go _pclResourceName _pclSyncToken _pclXgafv
227+ _pclUploadProtocol
228+ _pclRequestMaskIncludeField
229+ (Just _pclPp)
230+ _pclAccessToken
231+ _pclUploadType
232+ _pclSortOrder
233+ _pclBearerToken
234+ _pclPageToken
235+ _pclPageSize
236+ _pclCallback
237+ (Just AltJSON)
238+ peopleService
239+ where go
240+ = buildClient
241+ (Proxy :: Proxy PeopleConnectionsListResource)
242+ mempty
gogol-people/gen/Network/Google/Resource/People/People/Get.hsnew file+187
@@ -0,0 +1,187 @@
1+{-# LANGUAGE DataKinds #-}
2+{-# LANGUAGE DeriveDataTypeable #-}
3+{-# LANGUAGE DeriveGeneric #-}
4+{-# LANGUAGE FlexibleInstances #-}
5+{-# LANGUAGE NoImplicitPrelude #-}
6+{-# LANGUAGE OverloadedStrings #-}
7+{-# LANGUAGE RecordWildCards #-}
8+{-# LANGUAGE TypeFamilies #-}
9+{-# LANGUAGE TypeOperators #-}
10+
11+{-# OPTIONS_GHC -fno-warn-duplicate-exports #-}
12+{-# OPTIONS_GHC -fno-warn-unused-binds #-}
13+{-# OPTIONS_GHC -fno-warn-unused-imports #-}
14+
15+-- |
16+-- Module : Network.Google.Resource.People.People.Get
17+-- Copyright : (c) 2015 Brendan Hay
18+-- License : Mozilla Public License, v. 2.0.
19+-- Maintainer : Brendan Hay <brendan.g.hay@gmail.com>
20+-- Stability : auto-generated
21+-- Portability : non-portable (GHC extensions)
22+--
23+-- Provides information about a person resource for a resource name. Use
24+-- \`people\/me\` to indicate the authenticated user.
25+--
26+-- /See:/ <https://developers.google.com/people/ Google People API Reference> for @people.people.get@.
27+module Network.Google.Resource.People.People.Get
28+ (
29+ -- * REST Resource
30+ PeopleGetResource
31+
32+ -- * Creating a Request
33+ , peopleGet
34+ , PeopleGet
35+
36+ -- * Request Lenses
37+ , pgXgafv
38+ , pgUploadProtocol
39+ , pgResourceName
40+ , pgRequestMaskIncludeField
41+ , pgPp
42+ , pgAccessToken
43+ , pgUploadType
44+ , pgBearerToken
45+ , pgCallback
46+ ) where
47+
48+import Network.Google.People.Types
49+import Network.Google.Prelude
50+
51+-- | A resource alias for @people.people.get@ method which the
52+-- 'PeopleGet' request conforms to.
53+type PeopleGetResource =
54+ "v1" :>
55+ Capture "resourceName" Text :>
56+ QueryParam "$.xgafv" Text :>
57+ QueryParam "upload_protocol" Text :>
58+ QueryParam "requestMask.includeField" Text :>
59+ QueryParam "pp" Bool :>
60+ QueryParam "access_token" Text :>
61+ QueryParam "uploadType" Text :>
62+ QueryParam "bearer_token" Text :>
63+ QueryParam "callback" Text :>
64+ QueryParam "alt" AltJSON :> Get '[JSON] Person
65+
66+-- | Provides information about a person resource for a resource name. Use
67+-- \`people\/me\` to indicate the authenticated user.
68+--
69+-- /See:/ 'peopleGet' smart constructor.
70+data PeopleGet = PeopleGet
71+ { _pgXgafv :: !(Maybe Text)
72+ , _pgUploadProtocol :: !(Maybe Text)
73+ , _pgResourceName :: !Text
74+ , _pgRequestMaskIncludeField :: !(Maybe Text)
75+ , _pgPp :: !Bool
76+ , _pgAccessToken :: !(Maybe Text)
77+ , _pgUploadType :: !(Maybe Text)
78+ , _pgBearerToken :: !(Maybe Text)
79+ , _pgCallback :: !(Maybe Text)
80+ } deriving (Eq,Show,Data,Typeable,Generic)
81+
82+-- | Creates a value of 'PeopleGet' with the minimum fields required to make a request.
83+--
84+-- Use one of the following lenses to modify other fields as desired:
85+--
86+-- * 'pgXgafv'
87+--
88+-- * 'pgUploadProtocol'
89+--
90+-- * 'pgResourceName'
91+--
92+-- * 'pgRequestMaskIncludeField'
93+--
94+-- * 'pgPp'
95+--
96+-- * 'pgAccessToken'
97+--
98+-- * 'pgUploadType'
99+--
100+-- * 'pgBearerToken'
101+--
102+-- * 'pgCallback'
103+peopleGet
104+ :: Text -- ^ 'pgResourceName'
105+ -> PeopleGet
106+peopleGet pPgResourceName_ =
107+ PeopleGet
108+ { _pgXgafv = Nothing
109+ , _pgUploadProtocol = Nothing
110+ , _pgResourceName = pPgResourceName_
111+ , _pgRequestMaskIncludeField = Nothing
112+ , _pgPp = True
113+ , _pgAccessToken = Nothing
114+ , _pgUploadType = Nothing
115+ , _pgBearerToken = Nothing
116+ , _pgCallback = Nothing
117+ }
118+
119+-- | V1 error format.
120+pgXgafv :: Lens' PeopleGet (Maybe Text)
121+pgXgafv = lens _pgXgafv (\ s a -> s{_pgXgafv = a})
122+
123+-- | Upload protocol for media (e.g. \"raw\", \"multipart\").
124+pgUploadProtocol :: Lens' PeopleGet (Maybe Text)
125+pgUploadProtocol
126+ = lens _pgUploadProtocol
127+ (\ s a -> s{_pgUploadProtocol = a})
128+
129+-- | The resource name of the person to provide information about. - To get
130+-- information about the authenticated user, specify \`people\/me\`. - To
131+-- get information about any user, specify the resource name that
132+-- identifies the user, such as the resource names returned by
133+-- [\`people.connections.list\`](\/people\/api\/rest\/v1\/people.connections\/list).
134+pgResourceName :: Lens' PeopleGet Text
135+pgResourceName
136+ = lens _pgResourceName
137+ (\ s a -> s{_pgResourceName = a})
138+
139+-- | Comma-separated list of fields to be included in the response. Omitting
140+-- this field will include all fields. Each path should start with
141+-- \`person.\`: for example, \`person.names\` or \`person.photos\`.
142+pgRequestMaskIncludeField :: Lens' PeopleGet (Maybe Text)
143+pgRequestMaskIncludeField
144+ = lens _pgRequestMaskIncludeField
145+ (\ s a -> s{_pgRequestMaskIncludeField = a})
146+
147+-- | Pretty-print response.
148+pgPp :: Lens' PeopleGet Bool
149+pgPp = lens _pgPp (\ s a -> s{_pgPp = a})
150+
151+-- | OAuth access token.
152+pgAccessToken :: Lens' PeopleGet (Maybe Text)
153+pgAccessToken
154+ = lens _pgAccessToken
155+ (\ s a -> s{_pgAccessToken = a})
156+
157+-- | Legacy upload protocol for media (e.g. \"media\", \"multipart\").
158+pgUploadType :: Lens' PeopleGet (Maybe Text)
159+pgUploadType
160+ = lens _pgUploadType (\ s a -> s{_pgUploadType = a})
161+
162+-- | OAuth bearer token.
163+pgBearerToken :: Lens' PeopleGet (Maybe Text)
164+pgBearerToken
165+ = lens _pgBearerToken
166+ (\ s a -> s{_pgBearerToken = a})
167+
168+-- | JSONP
169+pgCallback :: Lens' PeopleGet (Maybe Text)
170+pgCallback
171+ = lens _pgCallback (\ s a -> s{_pgCallback = a})
172+
173+instance GoogleRequest PeopleGet where
174+ type Rs PeopleGet = Person
175+ requestClient PeopleGet{..}
176+ = go _pgResourceName _pgXgafv _pgUploadProtocol
177+ _pgRequestMaskIncludeField
178+ (Just _pgPp)
179+ _pgAccessToken
180+ _pgUploadType
181+ _pgBearerToken
182+ _pgCallback
183+ (Just AltJSON)
184+ peopleService
185+ where go
186+ = buildClient (Proxy :: Proxy PeopleGetResource)
187+ mempty
gogol-people/gen/Network/Google/Resource/People/People/GetBatchGet.hsnew file+195
@@ -0,0 +1,195 @@
1+{-# LANGUAGE DataKinds #-}
2+{-# LANGUAGE DeriveDataTypeable #-}
3+{-# LANGUAGE DeriveGeneric #-}
4+{-# LANGUAGE FlexibleInstances #-}
5+{-# LANGUAGE NoImplicitPrelude #-}
6+{-# LANGUAGE OverloadedStrings #-}
7+{-# LANGUAGE RecordWildCards #-}
8+{-# LANGUAGE TypeFamilies #-}
9+{-# LANGUAGE TypeOperators #-}
10+
11+{-# OPTIONS_GHC -fno-warn-duplicate-exports #-}
12+{-# OPTIONS_GHC -fno-warn-unused-binds #-}
13+{-# OPTIONS_GHC -fno-warn-unused-imports #-}
14+
15+-- |
16+-- Module : Network.Google.Resource.People.People.GetBatchGet
17+-- Copyright : (c) 2015 Brendan Hay
18+-- License : Mozilla Public License, v. 2.0.
19+-- Maintainer : Brendan Hay <brendan.g.hay@gmail.com>
20+-- Stability : auto-generated
21+-- Portability : non-portable (GHC extensions)
22+--
23+-- Provides information about a list of specific people by specifying a
24+-- list of requested resource names. Use \`people\/me\` to indicate the
25+-- authenticated user.
26+--
27+-- /See:/ <https://developers.google.com/people/ Google People API Reference> for @people.people.getBatchGet@.
28+module Network.Google.Resource.People.People.GetBatchGet
29+ (
30+ -- * REST Resource
31+ PeopleGetBatchGetResource
32+
33+ -- * Creating a Request
34+ , peopleGetBatchGet
35+ , PeopleGetBatchGet
36+
37+ -- * Request Lenses
38+ , pgbgXgafv
39+ , pgbgUploadProtocol
40+ , pgbgRequestMaskIncludeField
41+ , pgbgPp
42+ , pgbgAccessToken
43+ , pgbgUploadType
44+ , pgbgBearerToken
45+ , pgbgResourceNames
46+ , pgbgCallback
47+ ) where
48+
49+import Network.Google.People.Types
50+import Network.Google.Prelude
51+
52+-- | A resource alias for @people.people.getBatchGet@ method which the
53+-- 'PeopleGetBatchGet' request conforms to.
54+type PeopleGetBatchGetResource =
55+ "v1" :>
56+ "people:batchGet" :>
57+ QueryParam "$.xgafv" Text :>
58+ QueryParam "upload_protocol" Text :>
59+ QueryParam "requestMask.includeField" Text :>
60+ QueryParam "pp" Bool :>
61+ QueryParam "access_token" Text :>
62+ QueryParam "uploadType" Text :>
63+ QueryParam "bearer_token" Text :>
64+ QueryParams "resourceNames" Text :>
65+ QueryParam "callback" Text :>
66+ QueryParam "alt" AltJSON :>
67+ Get '[JSON] GetPeopleResponse
68+
69+-- | Provides information about a list of specific people by specifying a
70+-- list of requested resource names. Use \`people\/me\` to indicate the
71+-- authenticated user.
72+--
73+-- /See:/ 'peopleGetBatchGet' smart constructor.
74+data PeopleGetBatchGet = PeopleGetBatchGet
75+ { _pgbgXgafv :: !(Maybe Text)
76+ , _pgbgUploadProtocol :: !(Maybe Text)
77+ , _pgbgRequestMaskIncludeField :: !(Maybe Text)
78+ , _pgbgPp :: !Bool
79+ , _pgbgAccessToken :: !(Maybe Text)
80+ , _pgbgUploadType :: !(Maybe Text)
81+ , _pgbgBearerToken :: !(Maybe Text)
82+ , _pgbgResourceNames :: !(Maybe [Text])
83+ , _pgbgCallback :: !(Maybe Text)
84+ } deriving (Eq,Show,Data,Typeable,Generic)
85+
86+-- | Creates a value of 'PeopleGetBatchGet' with the minimum fields required to make a request.
87+--
88+-- Use one of the following lenses to modify other fields as desired:
89+--
90+-- * 'pgbgXgafv'
91+--
92+-- * 'pgbgUploadProtocol'
93+--
94+-- * 'pgbgRequestMaskIncludeField'
95+--
96+-- * 'pgbgPp'
97+--
98+-- * 'pgbgAccessToken'
99+--
100+-- * 'pgbgUploadType'
101+--
102+-- * 'pgbgBearerToken'
103+--
104+-- * 'pgbgResourceNames'
105+--
106+-- * 'pgbgCallback'
107+peopleGetBatchGet
108+ :: PeopleGetBatchGet
109+peopleGetBatchGet =
110+ PeopleGetBatchGet
111+ { _pgbgXgafv = Nothing
112+ , _pgbgUploadProtocol = Nothing
113+ , _pgbgRequestMaskIncludeField = Nothing
114+ , _pgbgPp = True
115+ , _pgbgAccessToken = Nothing
116+ , _pgbgUploadType = Nothing
117+ , _pgbgBearerToken = Nothing
118+ , _pgbgResourceNames = Nothing
119+ , _pgbgCallback = Nothing
120+ }
121+
122+-- | V1 error format.
123+pgbgXgafv :: Lens' PeopleGetBatchGet (Maybe Text)
124+pgbgXgafv
125+ = lens _pgbgXgafv (\ s a -> s{_pgbgXgafv = a})
126+
127+-- | Upload protocol for media (e.g. \"raw\", \"multipart\").
128+pgbgUploadProtocol :: Lens' PeopleGetBatchGet (Maybe Text)
129+pgbgUploadProtocol
130+ = lens _pgbgUploadProtocol
131+ (\ s a -> s{_pgbgUploadProtocol = a})
132+
133+-- | Comma-separated list of fields to be included in the response. Omitting
134+-- this field will include all fields. Each path should start with
135+-- \`person.\`: for example, \`person.names\` or \`person.photos\`.
136+pgbgRequestMaskIncludeField :: Lens' PeopleGetBatchGet (Maybe Text)
137+pgbgRequestMaskIncludeField
138+ = lens _pgbgRequestMaskIncludeField
139+ (\ s a -> s{_pgbgRequestMaskIncludeField = a})
140+
141+-- | Pretty-print response.
142+pgbgPp :: Lens' PeopleGetBatchGet Bool
143+pgbgPp = lens _pgbgPp (\ s a -> s{_pgbgPp = a})
144+
145+-- | OAuth access token.
146+pgbgAccessToken :: Lens' PeopleGetBatchGet (Maybe Text)
147+pgbgAccessToken
148+ = lens _pgbgAccessToken
149+ (\ s a -> s{_pgbgAccessToken = a})
150+
151+-- | Legacy upload protocol for media (e.g. \"media\", \"multipart\").
152+pgbgUploadType :: Lens' PeopleGetBatchGet (Maybe Text)
153+pgbgUploadType
154+ = lens _pgbgUploadType
155+ (\ s a -> s{_pgbgUploadType = a})
156+
157+-- | OAuth bearer token.
158+pgbgBearerToken :: Lens' PeopleGetBatchGet (Maybe Text)
159+pgbgBearerToken
160+ = lens _pgbgBearerToken
161+ (\ s a -> s{_pgbgBearerToken = a})
162+
163+-- | The resource name, such as one returned by
164+-- [\`people.connections.list\`](\/people\/api\/rest\/v1\/people.connections\/list),
165+-- of one of the people to provide information about. You can include this
166+-- parameter up to 50 times in one request.
167+pgbgResourceNames :: Lens' PeopleGetBatchGet [Text]
168+pgbgResourceNames
169+ = lens _pgbgResourceNames
170+ (\ s a -> s{_pgbgResourceNames = a})
171+ . _Default
172+ . _Coerce
173+
174+-- | JSONP
175+pgbgCallback :: Lens' PeopleGetBatchGet (Maybe Text)
176+pgbgCallback
177+ = lens _pgbgCallback (\ s a -> s{_pgbgCallback = a})
178+
179+instance GoogleRequest PeopleGetBatchGet where
180+ type Rs PeopleGetBatchGet = GetPeopleResponse
181+ requestClient PeopleGetBatchGet{..}
182+ = go _pgbgXgafv _pgbgUploadProtocol
183+ _pgbgRequestMaskIncludeField
184+ (Just _pgbgPp)
185+ _pgbgAccessToken
186+ _pgbgUploadType
187+ _pgbgBearerToken
188+ (_pgbgResourceNames ^. _Default)
189+ _pgbgCallback
190+ (Just AltJSON)
191+ peopleService
192+ where go
193+ = buildClient
194+ (Proxy :: Proxy PeopleGetBatchGetResource)
195+ mempty
gogol-people/gogol-people.cabalnew file+49
@@ -0,0 +1,49 @@
1+name: gogol-people
2+version: 0.0.1
3+synopsis: Google People SDK.
4+homepage: https://github.com/brendanhay/gogol
5+bug-reports: https://github.com/brendanhay/gogol/issues
6+license: OtherLicense
7+license-file: LICENSE
8+author: Brendan Hay
9+maintainer: Brendan Hay <brendan.g.hay@gmail.com>
10+copyright: Copyright (c) 2015 Brendan Hay
11+category: Network, Google, Cloud
12+build-type: Simple
13+cabal-version: >= 1.10
14+extra-source-files: README.md
15+
16+description:
17+ The Google People API service gives access to information about profiles
18+ and contacts.
19+ .
20+ /Warning:/ This is an experimental prototype/preview release which is still
21+ under exploratory development and not intended for public use, caveat emptor!
22+ .
23+ This library is compatible with version @v1@
24+ of the API.
25+
26+source-repository head
27+ type: git
28+ location: git://github.com/brendanhay/gogol.git
29+
30+library
31+ default-language: Haskell2010
32+ hs-source-dirs: src gen
33+
34+ ghc-options: -Wall
35+
36+ exposed-modules:
37+ Network.Google.People
38+ , Network.Google.People.Types
39+ , Network.Google.Resource.People.People.Connections.List
40+ , Network.Google.Resource.People.People.Get
41+ , Network.Google.Resource.People.People.GetBatchGet
42+
43+ other-modules:
44+ Network.Google.People.Types.Product
45+ , Network.Google.People.Types.Sum
46+
47+ build-depends:
48+ gogol-core == 0.0.1.*
49+ , base >= 4.7 && < 5
gogol-people/src/.gitkeepnew file

No changes to the content.