google-apis-people_v1 0.3.0 → 0.8.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: 2b3000c1e5b55a6b44207383937def0b322c5356e703e2ac3b5a3ed5069157f6
4
- data.tar.gz: 4c02b061b73de6b5470f14c376511242e90823e7d3947122d5bb3694eefbf87e
3
+ metadata.gz: e11b89a8e80ab4658833f8f1855258148de969889a371c59dd83b106de16c3c6
4
+ data.tar.gz: c9ec437b9581bff7fa9598cdae293949d983111407aa2cff051ad8cb5c616713
5
5
  SHA512:
6
- metadata.gz: 9b0e27a06d9145d27ca4eb0a4977459090df2b43da764de39b7322639eac86f2429792a4aba1ae0a4b22ba4a8fa3d7f3d948d9f793cb733e41d0149a8ce01375
7
- data.tar.gz: cee02ec058f448406add0fc6758c41b3fd24febac09647c30e09cb18fef2986dd89601997636c6b1b283a9d50372c7ab975987164d74c4f6733b726b86b82b58
6
+ metadata.gz: ecd81e4b3b43fea69662e880805a8d279a38d69cb8982f32d8ffe99f5f2c2b7dfb43707aad9a1471c729e6bd1367ddfd3cdf789106af851b3895f579a9e34cb4
7
+ data.tar.gz: 7235ccc06d0c40a475a614c41cc002fd10755dce99671dbb55f238db2a0036502a8736d3f19e568c19c83bf5126c86b1b6048b86f71fa440d2c7098fda5ecbbe
data/CHANGELOG.md CHANGED
@@ -1,5 +1,26 @@
1
1
  # Release history for google-apis-people_v1
2
2
 
3
+ ### v0.8.0 (2021-03-31)
4
+
5
+ * Regenerated from discovery document revision 20210330
6
+
7
+ ### v0.7.0 (2021-03-24)
8
+
9
+ * Regenerated from discovery document revision 20210322
10
+
11
+ ### v0.6.0 (2021-03-16)
12
+
13
+ * Regenerated from discovery document revision 20210315
14
+ * Regenerated using generator version 0.2.0
15
+
16
+ ### v0.5.0 (2021-03-04)
17
+
18
+ * Regenerated from discovery document revision 20210302
19
+
20
+ ### v0.4.0 (2021-02-24)
21
+
22
+ * Regenerated from discovery document revision 20210223
23
+
3
24
  ### v0.3.0 (2021-02-19)
4
25
 
5
26
  * Regenerated from discovery document revision 20210218
@@ -59,7 +59,7 @@ module Google
59
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
- # View your email address
62
+ # See your primary Google Account email address
63
63
  AUTH_USERINFO_EMAIL = 'https://www.googleapis.com/auth/userinfo.email'
64
64
 
65
65
  # See your personal info, including any personal info you've made publicly available
@@ -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
@@ -492,6 +645,28 @@ module Google
492
645
  end
493
646
  end
494
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
+
495
670
  # A request to copy an "Other contact" to my contacts group.
496
671
  class CopyOtherContactToMyContactsGroupRequest
497
672
  include Google::Apis::Core::Hashable
@@ -634,7 +809,7 @@ module Google
634
809
  end
635
810
  end
636
811
 
637
- # The response for deleteing a contact's photo.
812
+ # The response for deleting a contact's photo.
638
813
  class DeleteContactPhotoResponse
639
814
  include Google::Apis::Core::Hashable
640
815
 
@@ -945,7 +1120,7 @@ module Google
945
1120
  end
946
1121
 
947
1122
  # Arbitrary client data that is populated by clients. Duplicate keys and values
948
- # are allowed. LINT.IfChange(GroupClientData)
1123
+ # are allowed.
949
1124
  class GroupClientData
950
1125
  include Google::Apis::Core::Hashable
951
1126
 
@@ -2335,6 +2510,47 @@ module Google
2335
2510
  end
2336
2511
  end
2337
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
+
2338
2554
  # A person's SIP address. Session Initial Protocol addresses are used for VoIP
2339
2555
  # communications to make voice or video calls over the internet.
2340
2556
  class SipAddress
@@ -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.3.0"
19
+ GEM_VERSION = "0.8.0"
20
20
 
21
21
  # Version of the code generator used to generate this client
22
- GENERATOR_VERSION = "0.1.2"
22
+ GENERATOR_VERSION = "0.2.0"
23
23
 
24
24
  # Revision of the discovery document this client was generated from
25
- REVISION = "20210218"
25
+ REVISION = "20210330"
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
 
@@ -346,6 +382,18 @@ module Google
346
382
  include Google::Apis::Core::JsonObjectSupport
347
383
  end
348
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
+
349
397
  class SipAddress
350
398
  class Representation < Google::Apis::Core::JsonRepresentation; end
351
399
 
@@ -434,6 +482,31 @@ module Google
434
482
  end
435
483
  end
436
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
+
437
510
  class BatchGetContactGroupsResponse
438
511
  # @private
439
512
  class Representation < Google::Apis::Core::JsonRepresentation
@@ -442,6 +515,25 @@ module Google
442
515
  end
443
516
  end
444
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
+
445
537
  class Biography
446
538
  # @private
447
539
  class Representation < Google::Apis::Core::JsonRepresentation
@@ -537,6 +629,14 @@ module Google
537
629
  end
538
630
  end
539
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
+
540
640
  class CopyOtherContactToMyContactsGroupRequest
541
641
  # @private
542
642
  class Representation < Google::Apis::Core::JsonRepresentation
@@ -1052,6 +1152,22 @@ module Google
1052
1152
  end
1053
1153
  end
1054
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
+
1055
1171
  class SipAddress
1056
1172
  # @private
1057
1173
  class Representation < Google::Apis::Core::JsonRepresentation
@@ -402,6 +402,145 @@ module Google
402
402
  execute_or_queue_command(command, &block)
403
403
  end
404
404
 
405
+ # Provides a list of contacts in the authenticated user's other contacts that
406
+ # matches the search query. The query matches on a contact's `names`, `
407
+ # emailAddresses`, and `phoneNumbers` fields that are from the OTHER_CONTACT
408
+ # source.
409
+ # @param [Fixnum] page_size
410
+ # Optional. The number of results to return. Defaults to 10 if field is not set,
411
+ # or set to 0.
412
+ # @param [String] query
413
+ # Required. The plain-text query for the request. The query is used to match
414
+ # prefix phrases of the fields on a person. For example, a person with name "foo
415
+ # name" matches queries such as "f", "fo", "foo", "foo n", "nam", etc., but not "
416
+ # oo n".
417
+ # @param [String] read_mask
418
+ # Required. A field mask to restrict which fields on each person are returned.
419
+ # Multiple fields can be specified by separating them with commas. Valid values
420
+ # are: * emailAddresses * names * phoneNumbers
421
+ # @param [String] fields
422
+ # Selector specifying which fields to include in a partial response.
423
+ # @param [String] quota_user
424
+ # Available to use for quota purposes for server-side applications. Can be any
425
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
426
+ # @param [Google::Apis::RequestOptions] options
427
+ # Request-specific options
428
+ #
429
+ # @yield [result, err] Result & error if block supplied
430
+ # @yieldparam result [Google::Apis::PeopleV1::SearchResponse] parsed result object
431
+ # @yieldparam err [StandardError] error object if request failed
432
+ #
433
+ # @return [Google::Apis::PeopleV1::SearchResponse]
434
+ #
435
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
436
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
437
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
438
+ def search_other_contacts(page_size: nil, query: nil, read_mask: nil, fields: nil, quota_user: nil, options: nil, &block)
439
+ command = make_simple_command(:get, 'v1/otherContacts:search', options)
440
+ command.response_representation = Google::Apis::PeopleV1::SearchResponse::Representation
441
+ command.response_class = Google::Apis::PeopleV1::SearchResponse
442
+ command.query['pageSize'] = page_size unless page_size.nil?
443
+ command.query['query'] = query unless query.nil?
444
+ command.query['readMask'] = read_mask unless read_mask.nil?
445
+ command.query['fields'] = fields unless fields.nil?
446
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
447
+ execute_or_queue_command(command, &block)
448
+ end
449
+
450
+ # Create a batch of new contacts and return the PersonResponses for the newly
451
+ # created contacts. Limited to 10 parallel requests per user.
452
+ # @param [Google::Apis::PeopleV1::BatchCreateContactsRequest] batch_create_contacts_request_object
453
+ # @param [String] fields
454
+ # Selector specifying which fields to include in a partial response.
455
+ # @param [String] quota_user
456
+ # Available to use for quota purposes for server-side applications. Can be any
457
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
458
+ # @param [Google::Apis::RequestOptions] options
459
+ # Request-specific options
460
+ #
461
+ # @yield [result, err] Result & error if block supplied
462
+ # @yieldparam result [Google::Apis::PeopleV1::BatchCreateContactsResponse] parsed result object
463
+ # @yieldparam err [StandardError] error object if request failed
464
+ #
465
+ # @return [Google::Apis::PeopleV1::BatchCreateContactsResponse]
466
+ #
467
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
468
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
469
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
470
+ def batch_person_create_contacts(batch_create_contacts_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
471
+ command = make_simple_command(:post, 'v1/people:batchCreateContacts', options)
472
+ command.request_representation = Google::Apis::PeopleV1::BatchCreateContactsRequest::Representation
473
+ command.request_object = batch_create_contacts_request_object
474
+ command.response_representation = Google::Apis::PeopleV1::BatchCreateContactsResponse::Representation
475
+ command.response_class = Google::Apis::PeopleV1::BatchCreateContactsResponse
476
+ command.query['fields'] = fields unless fields.nil?
477
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
478
+ execute_or_queue_command(command, &block)
479
+ end
480
+
481
+ # Delete a batch of contacts. Any non-contact data will not be deleted. Limited
482
+ # to 10 parallel requests per user.
483
+ # @param [Google::Apis::PeopleV1::BatchDeleteContactsRequest] batch_delete_contacts_request_object
484
+ # @param [String] fields
485
+ # Selector specifying which fields to include in a partial response.
486
+ # @param [String] quota_user
487
+ # Available to use for quota purposes for server-side applications. Can be any
488
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
489
+ # @param [Google::Apis::RequestOptions] options
490
+ # Request-specific options
491
+ #
492
+ # @yield [result, err] Result & error if block supplied
493
+ # @yieldparam result [Google::Apis::PeopleV1::Empty] parsed result object
494
+ # @yieldparam err [StandardError] error object if request failed
495
+ #
496
+ # @return [Google::Apis::PeopleV1::Empty]
497
+ #
498
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
499
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
500
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
501
+ def batch_person_delete_contacts(batch_delete_contacts_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
502
+ command = make_simple_command(:post, 'v1/people:batchDeleteContacts', options)
503
+ command.request_representation = Google::Apis::PeopleV1::BatchDeleteContactsRequest::Representation
504
+ command.request_object = batch_delete_contacts_request_object
505
+ command.response_representation = Google::Apis::PeopleV1::Empty::Representation
506
+ command.response_class = Google::Apis::PeopleV1::Empty
507
+ command.query['fields'] = fields unless fields.nil?
508
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
509
+ execute_or_queue_command(command, &block)
510
+ end
511
+
512
+ # Update a batch of contacts and return a map of resource names to
513
+ # PersonResponses for the updated contacts. Limited to 10 parallel requests per
514
+ # user.
515
+ # @param [Google::Apis::PeopleV1::BatchUpdateContactsRequest] batch_update_contacts_request_object
516
+ # @param [String] fields
517
+ # Selector specifying which fields to include in a partial response.
518
+ # @param [String] quota_user
519
+ # Available to use for quota purposes for server-side applications. Can be any
520
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
521
+ # @param [Google::Apis::RequestOptions] options
522
+ # Request-specific options
523
+ #
524
+ # @yield [result, err] Result & error if block supplied
525
+ # @yieldparam result [Google::Apis::PeopleV1::BatchUpdateContactsResponse] parsed result object
526
+ # @yieldparam err [StandardError] error object if request failed
527
+ #
528
+ # @return [Google::Apis::PeopleV1::BatchUpdateContactsResponse]
529
+ #
530
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
531
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
532
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
533
+ def batch_person_update_contacts(batch_update_contacts_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
534
+ command = make_simple_command(:post, 'v1/people:batchUpdateContacts', options)
535
+ command.request_representation = Google::Apis::PeopleV1::BatchUpdateContactsRequest::Representation
536
+ command.request_object = batch_update_contacts_request_object
537
+ command.response_representation = Google::Apis::PeopleV1::BatchUpdateContactsResponse::Representation
538
+ command.response_class = Google::Apis::PeopleV1::BatchUpdateContactsResponse
539
+ command.query['fields'] = fields unless fields.nil?
540
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
541
+ execute_or_queue_command(command, &block)
542
+ end
543
+
405
544
  # Create a new contact and return the person resource for that contact. The
406
545
  # request returns a 400 error if more than one field is specified on a field
407
546
  # that is a singleton for contact sources: * biographies * birthdays * genders *
@@ -700,6 +839,54 @@ module Google
700
839
  execute_or_queue_command(command, &block)
701
840
  end
702
841
 
842
+ # Provides a list of contacts in the authenticated user's grouped contacts that
843
+ # matches the search query. The query matches on a contact's `names`, `nickNames`
844
+ # , `emailAddresses`, `phoneNumbers`, and `organizations` fields that are from
845
+ # the CONTACT" source.
846
+ # @param [Fixnum] page_size
847
+ # Optional. The number of results to return.
848
+ # @param [String] query
849
+ # Required. The plain-text query for the request. The query is used to match
850
+ # prefix phrases of the fields on a person. For example, a person with name "foo
851
+ # name" matches queries such as "f", "fo", "foo", "foo n", "nam", etc., but not "
852
+ # oo n".
853
+ # @param [String] read_mask
854
+ # Required. A field mask to restrict which fields on each person are returned.
855
+ # Multiple fields can be specified by separating them with commas. Valid values
856
+ # are: * addresses * ageRanges * biographies * birthdays * calendarUrls *
857
+ # clientData * coverPhotos * emailAddresses * events * externalIds * genders *
858
+ # imClients * interests * locales * locations * memberships * metadata *
859
+ # miscKeywords * names * nicknames * occupations * organizations * phoneNumbers *
860
+ # photos * relations * sipAddresses * skills * urls * userDefined
861
+ # @param [String] fields
862
+ # Selector specifying which fields to include in a partial response.
863
+ # @param [String] quota_user
864
+ # Available to use for quota purposes for server-side applications. Can be any
865
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
866
+ # @param [Google::Apis::RequestOptions] options
867
+ # Request-specific options
868
+ #
869
+ # @yield [result, err] Result & error if block supplied
870
+ # @yieldparam result [Google::Apis::PeopleV1::SearchResponse] parsed result object
871
+ # @yieldparam err [StandardError] error object if request failed
872
+ #
873
+ # @return [Google::Apis::PeopleV1::SearchResponse]
874
+ #
875
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
876
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
877
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
878
+ def search_person_contacts(page_size: nil, query: nil, read_mask: nil, fields: nil, quota_user: nil, options: nil, &block)
879
+ command = make_simple_command(:get, 'v1/people:searchContacts', options)
880
+ command.response_representation = Google::Apis::PeopleV1::SearchResponse::Representation
881
+ command.response_class = Google::Apis::PeopleV1::SearchResponse
882
+ command.query['pageSize'] = page_size unless page_size.nil?
883
+ command.query['query'] = query unless query.nil?
884
+ command.query['readMask'] = read_mask unless read_mask.nil?
885
+ command.query['fields'] = fields unless fields.nil?
886
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
887
+ execute_or_queue_command(command, &block)
888
+ end
889
+
703
890
  # Provides a list of domain profiles and domain contacts in the authenticated
704
891
  # user's domain directory that match the search query.
705
892
  # @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.3.0
4
+ version: 0.8.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-02-22 00:00:00.000000000 Z
11
+ date: 2021-04-05 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.3.0
55
+ documentation_uri: https://googleapis.dev/ruby/google-apis-people_v1/v0.8.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.2.6
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