google-apis-people_v1 0.1.0 → 0.6.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 3f3e5377d7a978895b91e501263874661109d2b94a3bef0cc546b78c0ff5ef53
4
- data.tar.gz: 1d204109fd5c0fe4c56e0668a0f0e9c76a1754ab7f0ceaa168424985371451fa
3
+ metadata.gz: 9d5439b1b76586dfa1192977b2420513ef4272527dfa2434e63c6e660e84d13b
4
+ data.tar.gz: 41e2ea8d5bc1c6fd6f608250380ca11771e3790ba6dd5219cd7b6fb3be1d0996
5
5
  SHA512:
6
- metadata.gz: a00727201a8d4b3c07a9ff72290e0ab680dff4d5778207d3cddd1e6508ba8c64a31bdb9272904e64b5ff696f50d023cf45044f51e0b160c2473433a22cdaf5e6
7
- data.tar.gz: 6bf04a621f398fdba9a9dd55dd7ef5193cd889f38d733a3a84dcb16b194badefc8037bb7bdcd55c9bc6c733b1c202176e8bb76f82c3305d9d22e88a3c92767b5
6
+ metadata.gz: 0070f44061c58c4b65a23489a69e3f51f75dfed556c65e8c45027717f5a31ee4f21aadadc10d020f62d9947c5a44505459dea65fdaeb57bf41df4a6985036bc1
7
+ data.tar.gz: ced4b423a81d5701f444370b0813e0332369c60ba8bd3bfff29ceebd80918459318f6920b94a54ff8b064d3fb1c7add0e60943d1b3aab1b9b8a6cf81d52d4b35
data/CHANGELOG.md CHANGED
@@ -1,5 +1,27 @@
1
1
  # Release history for google-apis-people_v1
2
2
 
3
+ ### v0.6.0 (2021-03-16)
4
+
5
+ * Regenerated from discovery document revision 20210315
6
+ * Regenerated using generator version 0.2.0
7
+
8
+ ### v0.5.0 (2021-03-04)
9
+
10
+ * Regenerated from discovery document revision 20210302
11
+
12
+ ### v0.4.0 (2021-02-24)
13
+
14
+ * Regenerated from discovery document revision 20210223
15
+
16
+ ### v0.3.0 (2021-02-19)
17
+
18
+ * Regenerated from discovery document revision 20210218
19
+
20
+ ### v0.2.0 (2021-01-21)
21
+
22
+ * Regenerated from discovery document revision 20210120
23
+ * Regenerated using generator version 0.1.2
24
+
3
25
  ### v0.1.0 (2021-01-07)
4
26
 
5
27
  * Regenerated from discovery document revision 20210105
@@ -44,10 +44,10 @@ module Google
44
44
  # View your street addresses
45
45
  AUTH_USER_ADDRESSES_READ = 'https://www.googleapis.com/auth/user.addresses.read'
46
46
 
47
- # View your complete date of birth
47
+ # See and download your exact date of birth
48
48
  AUTH_USER_BIRTHDAY_READ = 'https://www.googleapis.com/auth/user.birthday.read'
49
49
 
50
- # View your email addresses
50
+ # See and download all of your Google Account email addresses
51
51
  AUTH_USER_EMAILS_READ = 'https://www.googleapis.com/auth/user.emails.read'
52
52
 
53
53
  # See your gender
@@ -56,7 +56,7 @@ module Google
56
56
  # See your education, work history and org info
57
57
  AUTH_USER_ORGANIZATION_READ = 'https://www.googleapis.com/auth/user.organization.read'
58
58
 
59
- # View your phone numbers
59
+ # See and download your personal phone numbers
60
60
  AUTH_USER_PHONENUMBERS_READ = 'https://www.googleapis.com/auth/user.phonenumbers.read'
61
61
 
62
62
  # View your email address
@@ -137,6 +137,85 @@ module Google
137
137
  end
138
138
  end
139
139
 
140
+ # A request to create a batch of contacts.
141
+ class BatchCreateContactsRequest
142
+ include Google::Apis::Core::Hashable
143
+
144
+ # Required. The contact to create. Allows up to 200 contacts in a single request.
145
+ # Corresponds to the JSON property `contacts`
146
+ # @return [Array<Google::Apis::PeopleV1::ContactToCreate>]
147
+ attr_accessor :contacts
148
+
149
+ # Required. A field mask to restrict which fields on each person are returned in
150
+ # the response. Multiple fields can be specified by separating them with commas.
151
+ # If read mask is left empty, the post-mutate-get is skipped and no data will be
152
+ # returned in the response. Valid values are: * addresses * ageRanges *
153
+ # biographies * birthdays * calendarUrls * clientData * coverPhotos *
154
+ # emailAddresses * events * externalIds * genders * imClients * interests *
155
+ # locales * locations * memberships * metadata * miscKeywords * names *
156
+ # nicknames * occupations * organizations * phoneNumbers * photos * relations *
157
+ # sipAddresses * skills * urls * userDefined
158
+ # Corresponds to the JSON property `readMask`
159
+ # @return [String]
160
+ attr_accessor :read_mask
161
+
162
+ # Optional. A mask of what source types to return in the post mutate read.
163
+ # Defaults to READ_SOURCE_TYPE_CONTACT and READ_SOURCE_TYPE_PROFILE if not set.
164
+ # Corresponds to the JSON property `sources`
165
+ # @return [Array<String>]
166
+ attr_accessor :sources
167
+
168
+ def initialize(**args)
169
+ update!(**args)
170
+ end
171
+
172
+ # Update properties of this object
173
+ def update!(**args)
174
+ @contacts = args[:contacts] if args.key?(:contacts)
175
+ @read_mask = args[:read_mask] if args.key?(:read_mask)
176
+ @sources = args[:sources] if args.key?(:sources)
177
+ end
178
+ end
179
+
180
+ # The response to a request to create a batch of contacts.
181
+ class BatchCreateContactsResponse
182
+ include Google::Apis::Core::Hashable
183
+
184
+ # The contacts that were created, unless the request `read_mask` is empty.
185
+ # Corresponds to the JSON property `createdPeople`
186
+ # @return [Array<Google::Apis::PeopleV1::PersonResponse>]
187
+ attr_accessor :created_people
188
+
189
+ def initialize(**args)
190
+ update!(**args)
191
+ end
192
+
193
+ # Update properties of this object
194
+ def update!(**args)
195
+ @created_people = args[:created_people] if args.key?(:created_people)
196
+ end
197
+ end
198
+
199
+ # A request to delete a batch of existing contacts.
200
+ class BatchDeleteContactsRequest
201
+ include Google::Apis::Core::Hashable
202
+
203
+ # Required. The resource names of the contact to delete. It's repeatable. Allows
204
+ # up to 500 resource names in a single request.
205
+ # Corresponds to the JSON property `resourceNames`
206
+ # @return [Array<String>]
207
+ attr_accessor :resource_names
208
+
209
+ def initialize(**args)
210
+ update!(**args)
211
+ end
212
+
213
+ # Update properties of this object
214
+ def update!(**args)
215
+ @resource_names = args[:resource_names] if args.key?(:resource_names)
216
+ end
217
+ end
218
+
140
219
  # The response to a batch get contact groups request.
141
220
  class BatchGetContactGroupsResponse
142
221
  include Google::Apis::Core::Hashable
@@ -156,6 +235,80 @@ module Google
156
235
  end
157
236
  end
158
237
 
238
+ # A request to update a batch of contacts.
239
+ class BatchUpdateContactsRequest
240
+ include Google::Apis::Core::Hashable
241
+
242
+ # Required. A map of resource names to the person data to be updated. Allows up
243
+ # to 200 contacts in a single request.
244
+ # Corresponds to the JSON property `contacts`
245
+ # @return [Hash<String,Google::Apis::PeopleV1::Person>]
246
+ attr_accessor :contacts
247
+
248
+ # Required. A field mask to restrict which fields on each person are returned.
249
+ # Multiple fields can be specified by separating them with commas. If read mask
250
+ # is left empty, the post-mutate-get is skipped and no data will be returned in
251
+ # the response. Valid values are: * addresses * ageRanges * biographies *
252
+ # birthdays * calendarUrls * clientData * coverPhotos * emailAddresses * events *
253
+ # externalIds * genders * imClients * interests * locales * locations *
254
+ # memberships * metadata * miscKeywords * names * nicknames * occupations *
255
+ # organizations * phoneNumbers * photos * relations * sipAddresses * skills *
256
+ # urls * userDefined
257
+ # Corresponds to the JSON property `readMask`
258
+ # @return [String]
259
+ attr_accessor :read_mask
260
+
261
+ # Optional. A mask of what source types to return. Defaults to
262
+ # READ_SOURCE_TYPE_CONTACT and READ_SOURCE_TYPE_PROFILE if not set.
263
+ # Corresponds to the JSON property `sources`
264
+ # @return [Array<String>]
265
+ attr_accessor :sources
266
+
267
+ # Required. A field mask to restrict which fields on the person are updated.
268
+ # Multiple fields can be specified by separating them with commas. All specified
269
+ # fields will be replaced, or cleared if left empty for each person. Valid
270
+ # values are: * addresses * biographies * birthdays * calendarUrls * clientData *
271
+ # emailAddresses * events * externalIds * genders * imClients * interests *
272
+ # locales * locations * memberships * miscKeywords * names * nicknames *
273
+ # occupations * organizations * phoneNumbers * relations * sipAddresses * urls *
274
+ # userDefined
275
+ # Corresponds to the JSON property `updateMask`
276
+ # @return [String]
277
+ attr_accessor :update_mask
278
+
279
+ def initialize(**args)
280
+ update!(**args)
281
+ end
282
+
283
+ # Update properties of this object
284
+ def update!(**args)
285
+ @contacts = args[:contacts] if args.key?(:contacts)
286
+ @read_mask = args[:read_mask] if args.key?(:read_mask)
287
+ @sources = args[:sources] if args.key?(:sources)
288
+ @update_mask = args[:update_mask] if args.key?(:update_mask)
289
+ end
290
+ end
291
+
292
+ # The response to a request to create a batch of contacts.
293
+ class BatchUpdateContactsResponse
294
+ include Google::Apis::Core::Hashable
295
+
296
+ # A map of resource names to the contacts that were updated, unless the request `
297
+ # read_mask` is empty.
298
+ # Corresponds to the JSON property `updateResult`
299
+ # @return [Hash<String,Google::Apis::PeopleV1::PersonResponse>]
300
+ attr_accessor :update_result
301
+
302
+ def initialize(**args)
303
+ update!(**args)
304
+ end
305
+
306
+ # Update properties of this object
307
+ def update!(**args)
308
+ @update_result = args[:update_result] if args.key?(:update_result)
309
+ end
310
+ end
311
+
159
312
  # A person's short biography.
160
313
  class Biography
161
314
  include Google::Apis::Core::Hashable
@@ -327,6 +480,11 @@ module Google
327
480
  class ContactGroup
328
481
  include Google::Apis::Core::Hashable
329
482
 
483
+ # The group's client data.
484
+ # Corresponds to the JSON property `clientData`
485
+ # @return [Array<Google::Apis::PeopleV1::GroupClientData>]
486
+ attr_accessor :client_data
487
+
330
488
  # The [HTTP entity tag](https://en.wikipedia.org/wiki/HTTP_ETag) of the resource.
331
489
  # Used for web cache validation.
332
490
  # Corresponds to the JSON property `etag`
@@ -352,9 +510,8 @@ module Google
352
510
  attr_accessor :member_count
353
511
 
354
512
  # Output only. The list of contact person resource names that are members of the
355
- # contact group. The field is not populated for LIST requests and can only be
356
- # updated through the [ModifyContactGroupMembers](/people/api/rest/v1/
357
- # contactgroups/members/modify).
513
+ # contact group. The field is only populated for GET requests and will only
514
+ # return as many members as `maxMembers` in the get request.
358
515
  # Corresponds to the JSON property `memberResourceNames`
359
516
  # @return [Array<String>]
360
517
  attr_accessor :member_resource_names
@@ -382,6 +539,7 @@ module Google
382
539
 
383
540
  # Update properties of this object
384
541
  def update!(**args)
542
+ @client_data = args[:client_data] if args.key?(:client_data)
385
543
  @etag = args[:etag] if args.key?(:etag)
386
544
  @formatted_name = args[:formatted_name] if args.key?(:formatted_name)
387
545
  @group_type = args[:group_type] if args.key?(:group_type)
@@ -487,6 +645,28 @@ module Google
487
645
  end
488
646
  end
489
647
 
648
+ # A wrapper that contains the person data to populate a newly created source.
649
+ class ContactToCreate
650
+ include Google::Apis::Core::Hashable
651
+
652
+ # Information about a person merged from various data sources such as the
653
+ # authenticated user's contacts and profile data. Most fields can have multiple
654
+ # items. The items in a field have no guaranteed order, but each non-empty field
655
+ # is guaranteed to have exactly one field with `metadata.primary` set to true.
656
+ # Corresponds to the JSON property `contactPerson`
657
+ # @return [Google::Apis::PeopleV1::Person]
658
+ attr_accessor :contact_person
659
+
660
+ def initialize(**args)
661
+ update!(**args)
662
+ end
663
+
664
+ # Update properties of this object
665
+ def update!(**args)
666
+ @contact_person = args[:contact_person] if args.key?(:contact_person)
667
+ end
668
+ end
669
+
490
670
  # A request to copy an "Other contact" to my contacts group.
491
671
  class CopyOtherContactToMyContactsGroupRequest
492
672
  include Google::Apis::Core::Hashable
@@ -570,6 +750,13 @@ module Google
570
750
  # @return [Google::Apis::PeopleV1::ContactGroup]
571
751
  attr_accessor :contact_group
572
752
 
753
+ # Optional. A field mask to restrict which fields on the group are returned.
754
+ # Defaults to `metadata`, `groupType`, and `name` if not set or set to empty.
755
+ # Valid fields are: * clientData * groupType * metadata * name
756
+ # Corresponds to the JSON property `readGroupFields`
757
+ # @return [String]
758
+ attr_accessor :read_group_fields
759
+
573
760
  def initialize(**args)
574
761
  update!(**args)
575
762
  end
@@ -577,6 +764,7 @@ module Google
577
764
  # Update properties of this object
578
765
  def update!(**args)
579
766
  @contact_group = args[:contact_group] if args.key?(:contact_group)
767
+ @read_group_fields = args[:read_group_fields] if args.key?(:read_group_fields)
580
768
  end
581
769
  end
582
770
 
@@ -621,7 +809,7 @@ module Google
621
809
  end
622
810
  end
623
811
 
624
- # The response for deleteing a contact's photo.
812
+ # The response for deleting a contact's photo.
625
813
  class DeleteContactPhotoResponse
626
814
  include Google::Apis::Core::Hashable
627
815
 
@@ -931,6 +1119,32 @@ module Google
931
1119
  end
932
1120
  end
933
1121
 
1122
+ # Arbitrary client data that is populated by clients. Duplicate keys and values
1123
+ # are allowed.
1124
+ class GroupClientData
1125
+ include Google::Apis::Core::Hashable
1126
+
1127
+ # The client specified key of the client data.
1128
+ # Corresponds to the JSON property `key`
1129
+ # @return [String]
1130
+ attr_accessor :key
1131
+
1132
+ # The client specified value of the client data.
1133
+ # Corresponds to the JSON property `value`
1134
+ # @return [String]
1135
+ attr_accessor :value
1136
+
1137
+ def initialize(**args)
1138
+ update!(**args)
1139
+ end
1140
+
1141
+ # Update properties of this object
1142
+ def update!(**args)
1143
+ @key = args[:key] if args.key?(:key)
1144
+ @value = args[:value] if args.key?(:value)
1145
+ end
1146
+ end
1147
+
934
1148
  # A person's instant messaging client.
935
1149
  class ImClient
936
1150
  include Google::Apis::Core::Hashable
@@ -2296,6 +2510,47 @@ module Google
2296
2510
  end
2297
2511
  end
2298
2512
 
2513
+ # The response to a search request for the authenticated user, given a query.
2514
+ class SearchResponse
2515
+ include Google::Apis::Core::Hashable
2516
+
2517
+ # The results of the request.
2518
+ # Corresponds to the JSON property `results`
2519
+ # @return [Array<Google::Apis::PeopleV1::SearchResult>]
2520
+ attr_accessor :results
2521
+
2522
+ def initialize(**args)
2523
+ update!(**args)
2524
+ end
2525
+
2526
+ # Update properties of this object
2527
+ def update!(**args)
2528
+ @results = args[:results] if args.key?(:results)
2529
+ end
2530
+ end
2531
+
2532
+ # A result of a search query.
2533
+ class SearchResult
2534
+ include Google::Apis::Core::Hashable
2535
+
2536
+ # Information about a person merged from various data sources such as the
2537
+ # authenticated user's contacts and profile data. Most fields can have multiple
2538
+ # items. The items in a field have no guaranteed order, but each non-empty field
2539
+ # is guaranteed to have exactly one field with `metadata.primary` set to true.
2540
+ # Corresponds to the JSON property `person`
2541
+ # @return [Google::Apis::PeopleV1::Person]
2542
+ attr_accessor :person
2543
+
2544
+ def initialize(**args)
2545
+ update!(**args)
2546
+ end
2547
+
2548
+ # Update properties of this object
2549
+ def update!(**args)
2550
+ @person = args[:person] if args.key?(:person)
2551
+ end
2552
+ end
2553
+
2299
2554
  # A person's SIP address. Session Initial Protocol addresses are used for VoIP
2300
2555
  # communications to make voice or video calls over the internet.
2301
2556
  class SipAddress
@@ -2482,6 +2737,21 @@ module Google
2482
2737
  # @return [Google::Apis::PeopleV1::ContactGroup]
2483
2738
  attr_accessor :contact_group
2484
2739
 
2740
+ # Optional. A field mask to restrict which fields on the group are returned.
2741
+ # Defaults to `metadata`, `groupType`, and `name` if not set or set to empty.
2742
+ # Valid fields are: * clientData * groupType * memberCount * metadata * name
2743
+ # Corresponds to the JSON property `readGroupFields`
2744
+ # @return [String]
2745
+ attr_accessor :read_group_fields
2746
+
2747
+ # Optional. A field mask to restrict which fields on the group are updated.
2748
+ # Multiple fields can be specified by separating them with commas. Defaults to `
2749
+ # name` if not set or set to empty. Updated fields are replaced. Valid values
2750
+ # are: * clientData * name
2751
+ # Corresponds to the JSON property `updateGroupFields`
2752
+ # @return [String]
2753
+ attr_accessor :update_group_fields
2754
+
2485
2755
  def initialize(**args)
2486
2756
  update!(**args)
2487
2757
  end
@@ -2489,6 +2759,8 @@ module Google
2489
2759
  # Update properties of this object
2490
2760
  def update!(**args)
2491
2761
  @contact_group = args[:contact_group] if args.key?(:contact_group)
2762
+ @read_group_fields = args[:read_group_fields] if args.key?(:read_group_fields)
2763
+ @update_group_fields = args[:update_group_fields] if args.key?(:update_group_fields)
2492
2764
  end
2493
2765
  end
2494
2766
 
@@ -16,13 +16,13 @@ module Google
16
16
  module Apis
17
17
  module PeopleV1
18
18
  # Version of the google-apis-people_v1 gem
19
- GEM_VERSION = "0.1.0"
19
+ GEM_VERSION = "0.6.0"
20
20
 
21
21
  # Version of the code generator used to generate this client
22
- GENERATOR_VERSION = "0.1.1"
22
+ GENERATOR_VERSION = "0.2.0"
23
23
 
24
24
  # Revision of the discovery document this client was generated from
25
- REVISION = "20210105"
25
+ REVISION = "20210315"
26
26
  end
27
27
  end
28
28
  end
@@ -34,12 +34,42 @@ module Google
34
34
  include Google::Apis::Core::JsonObjectSupport
35
35
  end
36
36
 
37
+ class BatchCreateContactsRequest
38
+ class Representation < Google::Apis::Core::JsonRepresentation; end
39
+
40
+ include Google::Apis::Core::JsonObjectSupport
41
+ end
42
+
43
+ class BatchCreateContactsResponse
44
+ class Representation < Google::Apis::Core::JsonRepresentation; end
45
+
46
+ include Google::Apis::Core::JsonObjectSupport
47
+ end
48
+
49
+ class BatchDeleteContactsRequest
50
+ class Representation < Google::Apis::Core::JsonRepresentation; end
51
+
52
+ include Google::Apis::Core::JsonObjectSupport
53
+ end
54
+
37
55
  class BatchGetContactGroupsResponse
38
56
  class Representation < Google::Apis::Core::JsonRepresentation; end
39
57
 
40
58
  include Google::Apis::Core::JsonObjectSupport
41
59
  end
42
60
 
61
+ class BatchUpdateContactsRequest
62
+ class Representation < Google::Apis::Core::JsonRepresentation; end
63
+
64
+ include Google::Apis::Core::JsonObjectSupport
65
+ end
66
+
67
+ class BatchUpdateContactsResponse
68
+ class Representation < Google::Apis::Core::JsonRepresentation; end
69
+
70
+ include Google::Apis::Core::JsonObjectSupport
71
+ end
72
+
43
73
  class Biography
44
74
  class Representation < Google::Apis::Core::JsonRepresentation; end
45
75
 
@@ -94,6 +124,12 @@ module Google
94
124
  include Google::Apis::Core::JsonObjectSupport
95
125
  end
96
126
 
127
+ class ContactToCreate
128
+ class Representation < Google::Apis::Core::JsonRepresentation; end
129
+
130
+ include Google::Apis::Core::JsonObjectSupport
131
+ end
132
+
97
133
  class CopyOtherContactToMyContactsGroupRequest
98
134
  class Representation < Google::Apis::Core::JsonRepresentation; end
99
135
 
@@ -178,6 +214,12 @@ module Google
178
214
  include Google::Apis::Core::JsonObjectSupport
179
215
  end
180
216
 
217
+ class GroupClientData
218
+ class Representation < Google::Apis::Core::JsonRepresentation; end
219
+
220
+ include Google::Apis::Core::JsonObjectSupport
221
+ end
222
+
181
223
  class ImClient
182
224
  class Representation < Google::Apis::Core::JsonRepresentation; end
183
225
 
@@ -340,6 +382,18 @@ module Google
340
382
  include Google::Apis::Core::JsonObjectSupport
341
383
  end
342
384
 
385
+ class SearchResponse
386
+ class Representation < Google::Apis::Core::JsonRepresentation; end
387
+
388
+ include Google::Apis::Core::JsonObjectSupport
389
+ end
390
+
391
+ class SearchResult
392
+ class Representation < Google::Apis::Core::JsonRepresentation; end
393
+
394
+ include Google::Apis::Core::JsonObjectSupport
395
+ end
396
+
343
397
  class SipAddress
344
398
  class Representation < Google::Apis::Core::JsonRepresentation; end
345
399
 
@@ -428,6 +482,31 @@ module Google
428
482
  end
429
483
  end
430
484
 
485
+ class BatchCreateContactsRequest
486
+ # @private
487
+ class Representation < Google::Apis::Core::JsonRepresentation
488
+ collection :contacts, as: 'contacts', class: Google::Apis::PeopleV1::ContactToCreate, decorator: Google::Apis::PeopleV1::ContactToCreate::Representation
489
+
490
+ property :read_mask, as: 'readMask'
491
+ collection :sources, as: 'sources'
492
+ end
493
+ end
494
+
495
+ class BatchCreateContactsResponse
496
+ # @private
497
+ class Representation < Google::Apis::Core::JsonRepresentation
498
+ collection :created_people, as: 'createdPeople', class: Google::Apis::PeopleV1::PersonResponse, decorator: Google::Apis::PeopleV1::PersonResponse::Representation
499
+
500
+ end
501
+ end
502
+
503
+ class BatchDeleteContactsRequest
504
+ # @private
505
+ class Representation < Google::Apis::Core::JsonRepresentation
506
+ collection :resource_names, as: 'resourceNames'
507
+ end
508
+ end
509
+
431
510
  class BatchGetContactGroupsResponse
432
511
  # @private
433
512
  class Representation < Google::Apis::Core::JsonRepresentation
@@ -436,6 +515,25 @@ module Google
436
515
  end
437
516
  end
438
517
 
518
+ class BatchUpdateContactsRequest
519
+ # @private
520
+ class Representation < Google::Apis::Core::JsonRepresentation
521
+ hash :contacts, as: 'contacts', class: Google::Apis::PeopleV1::Person, decorator: Google::Apis::PeopleV1::Person::Representation
522
+
523
+ property :read_mask, as: 'readMask'
524
+ collection :sources, as: 'sources'
525
+ property :update_mask, as: 'updateMask'
526
+ end
527
+ end
528
+
529
+ class BatchUpdateContactsResponse
530
+ # @private
531
+ class Representation < Google::Apis::Core::JsonRepresentation
532
+ hash :update_result, as: 'updateResult', class: Google::Apis::PeopleV1::PersonResponse, decorator: Google::Apis::PeopleV1::PersonResponse::Representation
533
+
534
+ end
535
+ end
536
+
439
537
  class Biography
440
538
  # @private
441
539
  class Representation < Google::Apis::Core::JsonRepresentation
@@ -490,6 +588,8 @@ module Google
490
588
  class ContactGroup
491
589
  # @private
492
590
  class Representation < Google::Apis::Core::JsonRepresentation
591
+ collection :client_data, as: 'clientData', class: Google::Apis::PeopleV1::GroupClientData, decorator: Google::Apis::PeopleV1::GroupClientData::Representation
592
+
493
593
  property :etag, as: 'etag'
494
594
  property :formatted_name, as: 'formattedName'
495
595
  property :group_type, as: 'groupType'
@@ -529,6 +629,14 @@ module Google
529
629
  end
530
630
  end
531
631
 
632
+ class ContactToCreate
633
+ # @private
634
+ class Representation < Google::Apis::Core::JsonRepresentation
635
+ property :contact_person, as: 'contactPerson', class: Google::Apis::PeopleV1::Person, decorator: Google::Apis::PeopleV1::Person::Representation
636
+
637
+ end
638
+ end
639
+
532
640
  class CopyOtherContactToMyContactsGroupRequest
533
641
  # @private
534
642
  class Representation < Google::Apis::Core::JsonRepresentation
@@ -553,6 +661,7 @@ module Google
553
661
  class Representation < Google::Apis::Core::JsonRepresentation
554
662
  property :contact_group, as: 'contactGroup', class: Google::Apis::PeopleV1::ContactGroup, decorator: Google::Apis::PeopleV1::ContactGroup::Representation
555
663
 
664
+ property :read_group_fields, as: 'readGroupFields'
556
665
  end
557
666
  end
558
667
 
@@ -659,6 +768,14 @@ module Google
659
768
  end
660
769
  end
661
770
 
771
+ class GroupClientData
772
+ # @private
773
+ class Representation < Google::Apis::Core::JsonRepresentation
774
+ property :key, as: 'key'
775
+ property :value, as: 'value'
776
+ end
777
+ end
778
+
662
779
  class ImClient
663
780
  # @private
664
781
  class Representation < Google::Apis::Core::JsonRepresentation
@@ -1035,6 +1152,22 @@ module Google
1035
1152
  end
1036
1153
  end
1037
1154
 
1155
+ class SearchResponse
1156
+ # @private
1157
+ class Representation < Google::Apis::Core::JsonRepresentation
1158
+ collection :results, as: 'results', class: Google::Apis::PeopleV1::SearchResult, decorator: Google::Apis::PeopleV1::SearchResult::Representation
1159
+
1160
+ end
1161
+ end
1162
+
1163
+ class SearchResult
1164
+ # @private
1165
+ class Representation < Google::Apis::Core::JsonRepresentation
1166
+ property :person, as: 'person', class: Google::Apis::PeopleV1::Person, decorator: Google::Apis::PeopleV1::Person::Representation
1167
+
1168
+ end
1169
+ end
1170
+
1038
1171
  class SipAddress
1039
1172
  # @private
1040
1173
  class Representation < Google::Apis::Core::JsonRepresentation
@@ -1090,6 +1223,8 @@ module Google
1090
1223
  class Representation < Google::Apis::Core::JsonRepresentation
1091
1224
  property :contact_group, as: 'contactGroup', class: Google::Apis::PeopleV1::ContactGroup, decorator: Google::Apis::PeopleV1::ContactGroup::Representation
1092
1225
 
1226
+ property :read_group_fields, as: 'readGroupFields'
1227
+ property :update_group_fields, as: 'updateGroupFields'
1093
1228
  end
1094
1229
  end
1095
1230
 
@@ -51,6 +51,11 @@ module Google
51
51
 
52
52
  # Get a list of contact groups owned by the authenticated user by specifying a
53
53
  # list of contact group resource names.
54
+ # @param [String] group_fields
55
+ # Optional. A field mask to restrict which fields on the group are returned.
56
+ # Defaults to `metadata`, `groupType`, `memberCount`, and `name` if not set or
57
+ # set to empty. Valid fields are: * clientData * groupType * memberCount *
58
+ # metadata * name
54
59
  # @param [Fixnum] max_members
55
60
  # Optional. Specifies the maximum number of members to return for each group.
56
61
  # Defaults to 0 if not set, which will return zero members.
@@ -73,10 +78,11 @@ module Google
73
78
  # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
74
79
  # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
75
80
  # @raise [Google::Apis::AuthorizationError] Authorization is required
76
- def batch_contact_group_get(max_members: nil, resource_names: nil, fields: nil, quota_user: nil, options: nil, &block)
81
+ def batch_contact_group_get(group_fields: nil, max_members: nil, resource_names: nil, fields: nil, quota_user: nil, options: nil, &block)
77
82
  command = make_simple_command(:get, 'v1/contactGroups:batchGet', options)
78
83
  command.response_representation = Google::Apis::PeopleV1::BatchGetContactGroupsResponse::Representation
79
84
  command.response_class = Google::Apis::PeopleV1::BatchGetContactGroupsResponse
85
+ command.query['groupFields'] = group_fields unless group_fields.nil?
80
86
  command.query['maxMembers'] = max_members unless max_members.nil?
81
87
  command.query['resourceNames'] = resource_names unless resource_names.nil?
82
88
  command.query['fields'] = fields unless fields.nil?
@@ -152,6 +158,11 @@ module Google
152
158
  # contact group resource name.
153
159
  # @param [String] resource_name
154
160
  # Required. The resource name of the contact group to get.
161
+ # @param [String] group_fields
162
+ # Optional. A field mask to restrict which fields on the group are returned.
163
+ # Defaults to `metadata`, `groupType`, `memberCount`, and `name` if not set or
164
+ # set to empty. Valid fields are: * clientData * groupType * memberCount *
165
+ # metadata * name
155
166
  # @param [Fixnum] max_members
156
167
  # Optional. Specifies the maximum number of members to return. Defaults to 0 if
157
168
  # not set, which will return zero members.
@@ -172,11 +183,12 @@ module Google
172
183
  # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
173
184
  # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
174
185
  # @raise [Google::Apis::AuthorizationError] Authorization is required
175
- def get_contact_group(resource_name, max_members: nil, fields: nil, quota_user: nil, options: nil, &block)
186
+ def get_contact_group(resource_name, group_fields: nil, max_members: nil, fields: nil, quota_user: nil, options: nil, &block)
176
187
  command = make_simple_command(:get, 'v1/{+resourceName}', options)
177
188
  command.response_representation = Google::Apis::PeopleV1::ContactGroup::Representation
178
189
  command.response_class = Google::Apis::PeopleV1::ContactGroup
179
190
  command.params['resourceName'] = resource_name unless resource_name.nil?
191
+ command.query['groupFields'] = group_fields unless group_fields.nil?
180
192
  command.query['maxMembers'] = max_members unless max_members.nil?
181
193
  command.query['fields'] = fields unless fields.nil?
182
194
  command.query['quotaUser'] = quota_user unless quota_user.nil?
@@ -185,6 +197,11 @@ module Google
185
197
 
186
198
  # List all contact groups owned by the authenticated user. Members of the
187
199
  # contact groups are not populated.
200
+ # @param [String] group_fields
201
+ # Optional. A field mask to restrict which fields on the group are returned.
202
+ # Defaults to `metadata`, `groupType`, `memberCount`, and `name` if not set or
203
+ # set to empty. Valid fields are: * clientData * groupType * memberCount *
204
+ # metadata * name
188
205
  # @param [Fixnum] page_size
189
206
  # Optional. The maximum number of resources to return. Valid values are between
190
207
  # 1 and 1000, inclusive. Defaults to 30 if not set or set to 0.
@@ -212,10 +229,11 @@ module Google
212
229
  # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
213
230
  # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
214
231
  # @raise [Google::Apis::AuthorizationError] Authorization is required
215
- def list_contact_groups(page_size: nil, page_token: nil, sync_token: nil, fields: nil, quota_user: nil, options: nil, &block)
232
+ def list_contact_groups(group_fields: nil, page_size: nil, page_token: nil, sync_token: nil, fields: nil, quota_user: nil, options: nil, &block)
216
233
  command = make_simple_command(:get, 'v1/contactGroups', options)
217
234
  command.response_representation = Google::Apis::PeopleV1::ListContactGroupsResponse::Representation
218
235
  command.response_class = Google::Apis::PeopleV1::ListContactGroupsResponse
236
+ command.query['groupFields'] = group_fields unless group_fields.nil?
219
237
  command.query['pageSize'] = page_size unless page_size.nil?
220
238
  command.query['pageToken'] = page_token unless page_token.nil?
221
239
  command.query['syncToken'] = sync_token unless sync_token.nil?
@@ -384,6 +402,141 @@ module Google
384
402
  execute_or_queue_command(command, &block)
385
403
  end
386
404
 
405
+ # Provides a list of contacts in the authenticated user's other contacts that
406
+ # matches the search query.
407
+ # @param [Fixnum] page_size
408
+ # Optional. The number of results to return. Defaults to 10 if field is not set,
409
+ # or set to 0.
410
+ # @param [String] query
411
+ # Required. The plain-text query for the request. The query is used to match
412
+ # prefix phrases of the fields on a person. For example, a person with name "foo
413
+ # name" matches queries such as "f", "fo", "foo", "foo n", "nam", etc., but not "
414
+ # oo n".
415
+ # @param [String] read_mask
416
+ # Required. A field mask to restrict which fields on each person are returned.
417
+ # Multiple fields can be specified by separating them with commas. Valid values
418
+ # are: * emailAddresses * names * phoneNumbers
419
+ # @param [String] fields
420
+ # Selector specifying which fields to include in a partial response.
421
+ # @param [String] quota_user
422
+ # Available to use for quota purposes for server-side applications. Can be any
423
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
424
+ # @param [Google::Apis::RequestOptions] options
425
+ # Request-specific options
426
+ #
427
+ # @yield [result, err] Result & error if block supplied
428
+ # @yieldparam result [Google::Apis::PeopleV1::SearchResponse] parsed result object
429
+ # @yieldparam err [StandardError] error object if request failed
430
+ #
431
+ # @return [Google::Apis::PeopleV1::SearchResponse]
432
+ #
433
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
434
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
435
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
436
+ def search_other_contacts(page_size: nil, query: nil, read_mask: nil, fields: nil, quota_user: nil, options: nil, &block)
437
+ command = make_simple_command(:get, 'v1/otherContacts:search', options)
438
+ command.response_representation = Google::Apis::PeopleV1::SearchResponse::Representation
439
+ command.response_class = Google::Apis::PeopleV1::SearchResponse
440
+ command.query['pageSize'] = page_size unless page_size.nil?
441
+ command.query['query'] = query unless query.nil?
442
+ command.query['readMask'] = read_mask unless read_mask.nil?
443
+ command.query['fields'] = fields unless fields.nil?
444
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
445
+ execute_or_queue_command(command, &block)
446
+ end
447
+
448
+ # Create a batch of new contacts and return the PersonResponses for the newly
449
+ # created contacts.
450
+ # @param [Google::Apis::PeopleV1::BatchCreateContactsRequest] batch_create_contacts_request_object
451
+ # @param [String] fields
452
+ # Selector specifying which fields to include in a partial response.
453
+ # @param [String] quota_user
454
+ # Available to use for quota purposes for server-side applications. Can be any
455
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
456
+ # @param [Google::Apis::RequestOptions] options
457
+ # Request-specific options
458
+ #
459
+ # @yield [result, err] Result & error if block supplied
460
+ # @yieldparam result [Google::Apis::PeopleV1::BatchCreateContactsResponse] parsed result object
461
+ # @yieldparam err [StandardError] error object if request failed
462
+ #
463
+ # @return [Google::Apis::PeopleV1::BatchCreateContactsResponse]
464
+ #
465
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
466
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
467
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
468
+ def batch_person_create_contacts(batch_create_contacts_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
469
+ command = make_simple_command(:post, 'v1/people:batchCreateContacts', options)
470
+ command.request_representation = Google::Apis::PeopleV1::BatchCreateContactsRequest::Representation
471
+ command.request_object = batch_create_contacts_request_object
472
+ command.response_representation = Google::Apis::PeopleV1::BatchCreateContactsResponse::Representation
473
+ command.response_class = Google::Apis::PeopleV1::BatchCreateContactsResponse
474
+ command.query['fields'] = fields unless fields.nil?
475
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
476
+ execute_or_queue_command(command, &block)
477
+ end
478
+
479
+ # Delete a batch of contacts. Any non-contact data will not be deleted.
480
+ # @param [Google::Apis::PeopleV1::BatchDeleteContactsRequest] batch_delete_contacts_request_object
481
+ # @param [String] fields
482
+ # Selector specifying which fields to include in a partial response.
483
+ # @param [String] quota_user
484
+ # Available to use for quota purposes for server-side applications. Can be any
485
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
486
+ # @param [Google::Apis::RequestOptions] options
487
+ # Request-specific options
488
+ #
489
+ # @yield [result, err] Result & error if block supplied
490
+ # @yieldparam result [Google::Apis::PeopleV1::Empty] parsed result object
491
+ # @yieldparam err [StandardError] error object if request failed
492
+ #
493
+ # @return [Google::Apis::PeopleV1::Empty]
494
+ #
495
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
496
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
497
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
498
+ def batch_person_delete_contacts(batch_delete_contacts_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
499
+ command = make_simple_command(:post, 'v1/people:batchDeleteContacts', options)
500
+ command.request_representation = Google::Apis::PeopleV1::BatchDeleteContactsRequest::Representation
501
+ command.request_object = batch_delete_contacts_request_object
502
+ command.response_representation = Google::Apis::PeopleV1::Empty::Representation
503
+ command.response_class = Google::Apis::PeopleV1::Empty
504
+ command.query['fields'] = fields unless fields.nil?
505
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
506
+ execute_or_queue_command(command, &block)
507
+ end
508
+
509
+ # Update a batch of contacts and return a map of resource names to
510
+ # PersonResponses for the updated contacts.
511
+ # @param [Google::Apis::PeopleV1::BatchUpdateContactsRequest] batch_update_contacts_request_object
512
+ # @param [String] fields
513
+ # Selector specifying which fields to include in a partial response.
514
+ # @param [String] quota_user
515
+ # Available to use for quota purposes for server-side applications. Can be any
516
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
517
+ # @param [Google::Apis::RequestOptions] options
518
+ # Request-specific options
519
+ #
520
+ # @yield [result, err] Result & error if block supplied
521
+ # @yieldparam result [Google::Apis::PeopleV1::BatchUpdateContactsResponse] parsed result object
522
+ # @yieldparam err [StandardError] error object if request failed
523
+ #
524
+ # @return [Google::Apis::PeopleV1::BatchUpdateContactsResponse]
525
+ #
526
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
527
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
528
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
529
+ def batch_person_update_contacts(batch_update_contacts_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
530
+ command = make_simple_command(:post, 'v1/people:batchUpdateContacts', options)
531
+ command.request_representation = Google::Apis::PeopleV1::BatchUpdateContactsRequest::Representation
532
+ command.request_object = batch_update_contacts_request_object
533
+ command.response_representation = Google::Apis::PeopleV1::BatchUpdateContactsResponse::Representation
534
+ command.response_class = Google::Apis::PeopleV1::BatchUpdateContactsResponse
535
+ command.query['fields'] = fields unless fields.nil?
536
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
537
+ execute_or_queue_command(command, &block)
538
+ end
539
+
387
540
  # Create a new contact and return the person resource for that contact. The
388
541
  # request returns a 400 error if more than one field is specified on a field
389
542
  # that is a singleton for contact sources: * biographies * birthdays * genders *
@@ -682,6 +835,52 @@ module Google
682
835
  execute_or_queue_command(command, &block)
683
836
  end
684
837
 
838
+ # Provides a list of contacts in the authenticated user's grouped contacts that
839
+ # matches the search query.
840
+ # @param [Fixnum] page_size
841
+ # Optional. The number of results to return.
842
+ # @param [String] query
843
+ # Required. The plain-text query for the request. The query is used to match
844
+ # prefix phrases of the fields on a person. For example, a person with name "foo
845
+ # name" matches queries such as "f", "fo", "foo", "foo n", "nam", etc., but not "
846
+ # oo n".
847
+ # @param [String] read_mask
848
+ # Required. A field mask to restrict which fields on each person are returned.
849
+ # Multiple fields can be specified by separating them with commas. Valid values
850
+ # are: * addresses * ageRanges * biographies * birthdays * calendarUrls *
851
+ # clientData * coverPhotos * emailAddresses * events * externalIds * genders *
852
+ # imClients * interests * locales * locations * memberships * metadata *
853
+ # miscKeywords * names * nicknames * occupations * organizations * phoneNumbers *
854
+ # photos * relations * sipAddresses * skills * urls * userDefined
855
+ # @param [String] fields
856
+ # Selector specifying which fields to include in a partial response.
857
+ # @param [String] quota_user
858
+ # Available to use for quota purposes for server-side applications. Can be any
859
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
860
+ # @param [Google::Apis::RequestOptions] options
861
+ # Request-specific options
862
+ #
863
+ # @yield [result, err] Result & error if block supplied
864
+ # @yieldparam result [Google::Apis::PeopleV1::SearchResponse] parsed result object
865
+ # @yieldparam err [StandardError] error object if request failed
866
+ #
867
+ # @return [Google::Apis::PeopleV1::SearchResponse]
868
+ #
869
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
870
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
871
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
872
+ def search_person_contacts(page_size: nil, query: nil, read_mask: nil, fields: nil, quota_user: nil, options: nil, &block)
873
+ command = make_simple_command(:get, 'v1/people:searchContacts', options)
874
+ command.response_representation = Google::Apis::PeopleV1::SearchResponse::Representation
875
+ command.response_class = Google::Apis::PeopleV1::SearchResponse
876
+ command.query['pageSize'] = page_size unless page_size.nil?
877
+ command.query['query'] = query unless query.nil?
878
+ command.query['readMask'] = read_mask unless read_mask.nil?
879
+ command.query['fields'] = fields unless fields.nil?
880
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
881
+ execute_or_queue_command(command, &block)
882
+ end
883
+
685
884
  # Provides a list of domain profiles and domain contacts in the authenticated
686
885
  # user's domain directory that match the search query.
687
886
  # @param [Array<String>, String] merge_sources
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: google-apis-people_v1
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.6.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Google LLC
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2021-01-08 00:00:00.000000000 Z
11
+ date: 2021-03-22 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: google-apis-core
@@ -52,7 +52,7 @@ licenses:
52
52
  metadata:
53
53
  bug_tracker_uri: https://github.com/googleapis/google-api-ruby-client/issues
54
54
  changelog_uri: https://github.com/googleapis/google-api-ruby-client/tree/master/generated/google-apis-people_v1/CHANGELOG.md
55
- documentation_uri: https://googleapis.dev/ruby/google-apis-people_v1/v0.1.0
55
+ documentation_uri: https://googleapis.dev/ruby/google-apis-people_v1/v0.6.0
56
56
  source_code_uri: https://github.com/googleapis/google-api-ruby-client/tree/master/generated/google-apis-people_v1
57
57
  post_install_message:
58
58
  rdoc_options: []
@@ -62,14 +62,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
62
62
  requirements:
63
63
  - - ">="
64
64
  - !ruby/object:Gem::Version
65
- version: '2.4'
65
+ version: '2.5'
66
66
  required_rubygems_version: !ruby/object:Gem::Requirement
67
67
  requirements:
68
68
  - - ">="
69
69
  - !ruby/object:Gem::Version
70
70
  version: '0'
71
71
  requirements: []
72
- rubygems_version: 3.1.4
72
+ rubygems_version: 3.2.13
73
73
  signing_key:
74
74
  specification_version: 4
75
75
  summary: Simple REST client for People API V1