/
classes.rb
2630 lines (2180 loc) · 102 KB
/
classes.rb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
# Copyright 2015 Google Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
require 'date'
require 'google/apis/core/base_service'
require 'google/apis/core/json_representation'
require 'google/apis/core/hashable'
require 'google/apis/errors'
module Google
module Apis
module PeopleV1
# A person's physical address. May be a P.O. box or street address. All fields
# are optional.
class Address
include Google::Apis::Core::Hashable
# The city of the address.
# Corresponds to the JSON property `city`
# @return [String]
attr_accessor :city
# The country of the address.
# Corresponds to the JSON property `country`
# @return [String]
attr_accessor :country
# The [ISO 3166-1 alpha-2](http://www.iso.org/iso/country_codes.htm) country
# code of the address.
# Corresponds to the JSON property `countryCode`
# @return [String]
attr_accessor :country_code
# The extended address of the address; for example, the apartment number.
# Corresponds to the JSON property `extendedAddress`
# @return [String]
attr_accessor :extended_address
# Output only. The type of the address translated and formatted in the viewer's
# account locale or the `Accept-Language` HTTP header locale.
# Corresponds to the JSON property `formattedType`
# @return [String]
attr_accessor :formatted_type
# The unstructured value of the address. If this is not set by the user it will
# be automatically constructed from structured values.
# Corresponds to the JSON property `formattedValue`
# @return [String]
attr_accessor :formatted_value
# Metadata about a field.
# Corresponds to the JSON property `metadata`
# @return [Google::Apis::PeopleV1::FieldMetadata]
attr_accessor :metadata
# The P.O. box of the address.
# Corresponds to the JSON property `poBox`
# @return [String]
attr_accessor :po_box
# The postal code of the address.
# Corresponds to the JSON property `postalCode`
# @return [String]
attr_accessor :postal_code
# The region of the address; for example, the state or province.
# Corresponds to the JSON property `region`
# @return [String]
attr_accessor :region
# The street address.
# Corresponds to the JSON property `streetAddress`
# @return [String]
attr_accessor :street_address
# The type of the address. The type can be custom or one of these predefined
# values: * `home` * `work` * `other`
# Corresponds to the JSON property `type`
# @return [String]
attr_accessor :type
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@city = args[:city] if args.key?(:city)
@country = args[:country] if args.key?(:country)
@country_code = args[:country_code] if args.key?(:country_code)
@extended_address = args[:extended_address] if args.key?(:extended_address)
@formatted_type = args[:formatted_type] if args.key?(:formatted_type)
@formatted_value = args[:formatted_value] if args.key?(:formatted_value)
@metadata = args[:metadata] if args.key?(:metadata)
@po_box = args[:po_box] if args.key?(:po_box)
@postal_code = args[:postal_code] if args.key?(:postal_code)
@region = args[:region] if args.key?(:region)
@street_address = args[:street_address] if args.key?(:street_address)
@type = args[:type] if args.key?(:type)
end
end
# A person's age range.
class AgeRangeType
include Google::Apis::Core::Hashable
# The age range.
# Corresponds to the JSON property `ageRange`
# @return [String]
attr_accessor :age_range
# Metadata about a field.
# Corresponds to the JSON property `metadata`
# @return [Google::Apis::PeopleV1::FieldMetadata]
attr_accessor :metadata
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@age_range = args[:age_range] if args.key?(:age_range)
@metadata = args[:metadata] if args.key?(:metadata)
end
end
# The response to a batch get contact groups request.
class BatchGetContactGroupsResponse
include Google::Apis::Core::Hashable
# The list of responses for each requested contact group resource.
# Corresponds to the JSON property `responses`
# @return [Array<Google::Apis::PeopleV1::ContactGroupResponse>]
attr_accessor :responses
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@responses = args[:responses] if args.key?(:responses)
end
end
# A person's short biography.
class Biography
include Google::Apis::Core::Hashable
# The content type of the biography.
# Corresponds to the JSON property `contentType`
# @return [String]
attr_accessor :content_type
# Metadata about a field.
# Corresponds to the JSON property `metadata`
# @return [Google::Apis::PeopleV1::FieldMetadata]
attr_accessor :metadata
# The short biography.
# Corresponds to the JSON property `value`
# @return [String]
attr_accessor :value
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@content_type = args[:content_type] if args.key?(:content_type)
@metadata = args[:metadata] if args.key?(:metadata)
@value = args[:value] if args.key?(:value)
end
end
# A person's birthday. At least one of the `date` and `text` fields are
# specified. The `date` and `text` fields typically represent the same date, but
# are not guaranteed to.
class Birthday
include Google::Apis::Core::Hashable
# Represents a whole or partial calendar date, such as a birthday. The time of
# day and time zone are either specified elsewhere or are insignificant. The
# date is relative to the Gregorian Calendar. This can represent one of the
# following: * A full date, with non-zero year, month, and day values * A month
# and day value, with a zero year, such as an anniversary * A year on its own,
# with zero month and day values * A year and month value, with a zero day, such
# as a credit card expiration date Related types are google.type.TimeOfDay and `
# google.protobuf.Timestamp`.
# Corresponds to the JSON property `date`
# @return [Google::Apis::PeopleV1::Date]
attr_accessor :date
# Metadata about a field.
# Corresponds to the JSON property `metadata`
# @return [Google::Apis::PeopleV1::FieldMetadata]
attr_accessor :metadata
# A free-form string representing the user's birthday.
# Corresponds to the JSON property `text`
# @return [String]
attr_accessor :text
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@date = args[:date] if args.key?(:date)
@metadata = args[:metadata] if args.key?(:metadata)
@text = args[:text] if args.key?(:text)
end
end
# **DEPRECATED**: No data will be returned A person's bragging rights.
class BraggingRights
include Google::Apis::Core::Hashable
# Metadata about a field.
# Corresponds to the JSON property `metadata`
# @return [Google::Apis::PeopleV1::FieldMetadata]
attr_accessor :metadata
# The bragging rights; for example, `climbed mount everest`.
# Corresponds to the JSON property `value`
# @return [String]
attr_accessor :value
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@metadata = args[:metadata] if args.key?(:metadata)
@value = args[:value] if args.key?(:value)
end
end
# A person's calendar URL.
class CalendarUrl
include Google::Apis::Core::Hashable
# Output only. The type of the calendar URL translated and formatted in the
# viewer's account locale or the `Accept-Language` HTTP header locale.
# Corresponds to the JSON property `formattedType`
# @return [String]
attr_accessor :formatted_type
# Metadata about a field.
# Corresponds to the JSON property `metadata`
# @return [Google::Apis::PeopleV1::FieldMetadata]
attr_accessor :metadata
# The type of the calendar URL. The type can be custom or one of these
# predefined values: * `home` * `freeBusy` * `work`
# Corresponds to the JSON property `type`
# @return [String]
attr_accessor :type
# The calendar URL.
# Corresponds to the JSON property `url`
# @return [String]
attr_accessor :url
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@formatted_type = args[:formatted_type] if args.key?(:formatted_type)
@metadata = args[:metadata] if args.key?(:metadata)
@type = args[:type] if args.key?(:type)
@url = args[:url] if args.key?(:url)
end
end
# Arbitrary client data that is populated by clients. Duplicate keys and values
# are allowed.
class ClientData
include Google::Apis::Core::Hashable
# The client specified key of the client data.
# Corresponds to the JSON property `key`
# @return [String]
attr_accessor :key
# Metadata about a field.
# Corresponds to the JSON property `metadata`
# @return [Google::Apis::PeopleV1::FieldMetadata]
attr_accessor :metadata
# The client specified value of the client data.
# Corresponds to the JSON property `value`
# @return [String]
attr_accessor :value
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@key = args[:key] if args.key?(:key)
@metadata = args[:metadata] if args.key?(:metadata)
@value = args[:value] if args.key?(:value)
end
end
# A contact group.
class ContactGroup
include Google::Apis::Core::Hashable
# The [HTTP entity tag](https://en.wikipedia.org/wiki/HTTP_ETag) of the resource.
# Used for web cache validation.
# Corresponds to the JSON property `etag`
# @return [String]
attr_accessor :etag
# Output only. The name translated and formatted in the viewer's account locale
# or the `Accept-Language` HTTP header locale for system groups names. Group
# names set by the owner are the same as name.
# Corresponds to the JSON property `formattedName`
# @return [String]
attr_accessor :formatted_name
# Output only. The contact group type.
# Corresponds to the JSON property `groupType`
# @return [String]
attr_accessor :group_type
# Output only. The total number of contacts in the group irrespective of max
# members in specified in the request.
# Corresponds to the JSON property `memberCount`
# @return [Fixnum]
attr_accessor :member_count
# Output only. The list of contact person resource names that are members of the
# contact group. The field is not populated for LIST requests and can only be
# updated through the [ModifyContactGroupMembers](/people/api/rest/v1/
# contactgroups/members/modify).
# Corresponds to the JSON property `memberResourceNames`
# @return [Array<String>]
attr_accessor :member_resource_names
# The metadata about a contact group.
# Corresponds to the JSON property `metadata`
# @return [Google::Apis::PeopleV1::ContactGroupMetadata]
attr_accessor :metadata
# The contact group name set by the group owner or a system provided name for
# system groups.
# Corresponds to the JSON property `name`
# @return [String]
attr_accessor :name
# The resource name for the contact group, assigned by the server. An ASCII
# string, in the form of `contactGroups/`contact_group_id``.
# Corresponds to the JSON property `resourceName`
# @return [String]
attr_accessor :resource_name
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@etag = args[:etag] if args.key?(:etag)
@formatted_name = args[:formatted_name] if args.key?(:formatted_name)
@group_type = args[:group_type] if args.key?(:group_type)
@member_count = args[:member_count] if args.key?(:member_count)
@member_resource_names = args[:member_resource_names] if args.key?(:member_resource_names)
@metadata = args[:metadata] if args.key?(:metadata)
@name = args[:name] if args.key?(:name)
@resource_name = args[:resource_name] if args.key?(:resource_name)
end
end
# A Google contact group membership.
class ContactGroupMembership
include Google::Apis::Core::Hashable
# Output only. The contact group ID for the contact group membership.
# Corresponds to the JSON property `contactGroupId`
# @return [String]
attr_accessor :contact_group_id
# The resource name for the contact group, assigned by the server. An ASCII
# string, in the form of `contactGroups/`contact_group_id``. Only
# contact_group_resource_name can be used for modifying memberships. Any contact
# group membership can be removed, but only user group or "myContacts" or "
# starred" system groups memberships can be added. A contact must always have at
# least one contact group membership.
# Corresponds to the JSON property `contactGroupResourceName`
# @return [String]
attr_accessor :contact_group_resource_name
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@contact_group_id = args[:contact_group_id] if args.key?(:contact_group_id)
@contact_group_resource_name = args[:contact_group_resource_name] if args.key?(:contact_group_resource_name)
end
end
# The metadata about a contact group.
class ContactGroupMetadata
include Google::Apis::Core::Hashable
# Output only. True if the contact group resource has been deleted. Populated
# only for [`ListContactGroups`](/people/api/rest/v1/contactgroups/list)
# requests that include a sync token.
# Corresponds to the JSON property `deleted`
# @return [Boolean]
attr_accessor :deleted
alias_method :deleted?, :deleted
# Output only. The time the group was last updated.
# Corresponds to the JSON property `updateTime`
# @return [String]
attr_accessor :update_time
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@deleted = args[:deleted] if args.key?(:deleted)
@update_time = args[:update_time] if args.key?(:update_time)
end
end
# The response for a specific contact group.
class ContactGroupResponse
include Google::Apis::Core::Hashable
# A contact group.
# Corresponds to the JSON property `contactGroup`
# @return [Google::Apis::PeopleV1::ContactGroup]
attr_accessor :contact_group
# The original requested resource name.
# Corresponds to the JSON property `requestedResourceName`
# @return [String]
attr_accessor :requested_resource_name
# The `Status` type defines a logical error model that is suitable for different
# programming environments, including REST APIs and RPC APIs. It is used by [
# gRPC](https://github.com/grpc). Each `Status` message contains three pieces of
# data: error code, error message, and error details. You can find out more
# about this error model and how to work with it in the [API Design Guide](https:
# //cloud.google.com/apis/design/errors).
# Corresponds to the JSON property `status`
# @return [Google::Apis::PeopleV1::Status]
attr_accessor :status
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@contact_group = args[:contact_group] if args.key?(:contact_group)
@requested_resource_name = args[:requested_resource_name] if args.key?(:requested_resource_name)
@status = args[:status] if args.key?(:status)
end
end
# A request to copy an "Other contact" to my contacts group.
class CopyOtherContactToMyContactsGroupRequest
include Google::Apis::Core::Hashable
# Required. A field mask to restrict which fields are copied into the new
# contact. Valid values are: * emailAddresses * names * phoneNumbers
# Corresponds to the JSON property `copyMask`
# @return [String]
attr_accessor :copy_mask
# Optional. A field mask to restrict which fields on the person are returned.
# Multiple fields can be specified by separating them with commas. Defaults to
# the copy mask with metadata and membership fields if not set. Valid values are:
# * addresses * ageRanges * biographies * birthdays * calendarUrls * clientData
# * coverPhotos * emailAddresses * events * externalIds * genders * imClients *
# interests * locales * locations * memberships * metadata * miscKeywords *
# names * nicknames * occupations * organizations * phoneNumbers * photos *
# relations * sipAddresses * skills * urls * userDefined
# Corresponds to the JSON property `readMask`
# @return [String]
attr_accessor :read_mask
# Optional. A mask of what source types to return. Defaults to
# READ_SOURCE_TYPE_CONTACT and READ_SOURCE_TYPE_PROFILE if not set.
# Corresponds to the JSON property `sources`
# @return [Array<String>]
attr_accessor :sources
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@copy_mask = args[:copy_mask] if args.key?(:copy_mask)
@read_mask = args[:read_mask] if args.key?(:read_mask)
@sources = args[:sources] if args.key?(:sources)
end
end
# A person's cover photo. A large image shown on the person's profile page that
# represents who they are or what they care about.
class CoverPhoto
include Google::Apis::Core::Hashable
# True if the cover photo is the default cover photo; false if the cover photo
# is a user-provided cover photo.
# Corresponds to the JSON property `default`
# @return [Boolean]
attr_accessor :default
alias_method :default?, :default
# Metadata about a field.
# Corresponds to the JSON property `metadata`
# @return [Google::Apis::PeopleV1::FieldMetadata]
attr_accessor :metadata
# The URL of the cover photo.
# Corresponds to the JSON property `url`
# @return [String]
attr_accessor :url
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@default = args[:default] if args.key?(:default)
@metadata = args[:metadata] if args.key?(:metadata)
@url = args[:url] if args.key?(:url)
end
end
# A request to create a new contact group.
class CreateContactGroupRequest
include Google::Apis::Core::Hashable
# A contact group.
# Corresponds to the JSON property `contactGroup`
# @return [Google::Apis::PeopleV1::ContactGroup]
attr_accessor :contact_group
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@contact_group = args[:contact_group] if args.key?(:contact_group)
end
end
# Represents a whole or partial calendar date, such as a birthday. The time of
# day and time zone are either specified elsewhere or are insignificant. The
# date is relative to the Gregorian Calendar. This can represent one of the
# following: * A full date, with non-zero year, month, and day values * A month
# and day value, with a zero year, such as an anniversary * A year on its own,
# with zero month and day values * A year and month value, with a zero day, such
# as a credit card expiration date Related types are google.type.TimeOfDay and `
# google.protobuf.Timestamp`.
class Date
include Google::Apis::Core::Hashable
# Day of a month. Must be from 1 to 31 and valid for the year and month, or 0 to
# specify a year by itself or a year and month where the day isn't significant.
# Corresponds to the JSON property `day`
# @return [Fixnum]
attr_accessor :day
# Month of a year. Must be from 1 to 12, or 0 to specify a year without a month
# and day.
# Corresponds to the JSON property `month`
# @return [Fixnum]
attr_accessor :month
# Year of the date. Must be from 1 to 9999, or 0 to specify a date without a
# year.
# Corresponds to the JSON property `year`
# @return [Fixnum]
attr_accessor :year
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@day = args[:day] if args.key?(:day)
@month = args[:month] if args.key?(:month)
@year = args[:year] if args.key?(:year)
end
end
# The response for deleteing a contact's photo.
class DeleteContactPhotoResponse
include Google::Apis::Core::Hashable
# Information about a person merged from various data sources such as the
# authenticated user's contacts and profile data. Most fields can have multiple
# items. The items in a field have no guaranteed order, but each non-empty field
# is guaranteed to have exactly one field with `metadata.primary` set to true.
# Corresponds to the JSON property `person`
# @return [Google::Apis::PeopleV1::Person]
attr_accessor :person
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@person = args[:person] if args.key?(:person)
end
end
# A G Suite Domain membership.
class DomainMembership
include Google::Apis::Core::Hashable
# True if the person is in the viewer's G Suite domain.
# Corresponds to the JSON property `inViewerDomain`
# @return [Boolean]
attr_accessor :in_viewer_domain
alias_method :in_viewer_domain?, :in_viewer_domain
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@in_viewer_domain = args[:in_viewer_domain] if args.key?(:in_viewer_domain)
end
end
# A person's email address.
class EmailAddress
include Google::Apis::Core::Hashable
# The display name of the email.
# Corresponds to the JSON property `displayName`
# @return [String]
attr_accessor :display_name
# Output only. The type of the email address translated and formatted in the
# viewer's account locale or the `Accept-Language` HTTP header locale.
# Corresponds to the JSON property `formattedType`
# @return [String]
attr_accessor :formatted_type
# Metadata about a field.
# Corresponds to the JSON property `metadata`
# @return [Google::Apis::PeopleV1::FieldMetadata]
attr_accessor :metadata
# The type of the email address. The type can be custom or one of these
# predefined values: * `home` * `work` * `other`
# Corresponds to the JSON property `type`
# @return [String]
attr_accessor :type
# The email address.
# Corresponds to the JSON property `value`
# @return [String]
attr_accessor :value
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@display_name = args[:display_name] if args.key?(:display_name)
@formatted_type = args[:formatted_type] if args.key?(:formatted_type)
@metadata = args[:metadata] if args.key?(:metadata)
@type = args[:type] if args.key?(:type)
@value = args[:value] if args.key?(:value)
end
end
# A generic empty message that you can re-use to avoid defining duplicated empty
# messages in your APIs. A typical example is to use it as the request or the
# response type of an API method. For instance: service Foo ` rpc Bar(google.
# protobuf.Empty) returns (google.protobuf.Empty); ` The JSON representation for
# `Empty` is empty JSON object ````.
class Empty
include Google::Apis::Core::Hashable
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
end
end
# An event related to the person.
class Event
include Google::Apis::Core::Hashable
# Represents a whole or partial calendar date, such as a birthday. The time of
# day and time zone are either specified elsewhere or are insignificant. The
# date is relative to the Gregorian Calendar. This can represent one of the
# following: * A full date, with non-zero year, month, and day values * A month
# and day value, with a zero year, such as an anniversary * A year on its own,
# with zero month and day values * A year and month value, with a zero day, such
# as a credit card expiration date Related types are google.type.TimeOfDay and `
# google.protobuf.Timestamp`.
# Corresponds to the JSON property `date`
# @return [Google::Apis::PeopleV1::Date]
attr_accessor :date
# Output only. The type of the event translated and formatted in the viewer's
# account locale or the `Accept-Language` HTTP header locale.
# Corresponds to the JSON property `formattedType`
# @return [String]
attr_accessor :formatted_type
# Metadata about a field.
# Corresponds to the JSON property `metadata`
# @return [Google::Apis::PeopleV1::FieldMetadata]
attr_accessor :metadata
# The type of the event. The type can be custom or one of these predefined
# values: * `anniversary` * `other`
# Corresponds to the JSON property `type`
# @return [String]
attr_accessor :type
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@date = args[:date] if args.key?(:date)
@formatted_type = args[:formatted_type] if args.key?(:formatted_type)
@metadata = args[:metadata] if args.key?(:metadata)
@type = args[:type] if args.key?(:type)
end
end
# An identifier from an external entity related to the person.
class ExternalId
include Google::Apis::Core::Hashable
# Output only. The type of the event translated and formatted in the viewer's
# account locale or the `Accept-Language` HTTP header locale.
# Corresponds to the JSON property `formattedType`
# @return [String]
attr_accessor :formatted_type
# Metadata about a field.
# Corresponds to the JSON property `metadata`
# @return [Google::Apis::PeopleV1::FieldMetadata]
attr_accessor :metadata
# The type of the external ID. The type can be custom or one of these predefined
# values: * `account` * `customer` * `loginId` * `network` * `organization`
# Corresponds to the JSON property `type`
# @return [String]
attr_accessor :type
# The value of the external ID.
# Corresponds to the JSON property `value`
# @return [String]
attr_accessor :value
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@formatted_type = args[:formatted_type] if args.key?(:formatted_type)
@metadata = args[:metadata] if args.key?(:metadata)
@type = args[:type] if args.key?(:type)
@value = args[:value] if args.key?(:value)
end
end
# Metadata about a field.
class FieldMetadata
include Google::Apis::Core::Hashable
# True if the field is the primary field; false if the field is a secondary
# field.
# Corresponds to the JSON property `primary`
# @return [Boolean]
attr_accessor :primary
alias_method :primary?, :primary
# The source of a field.
# Corresponds to the JSON property `source`
# @return [Google::Apis::PeopleV1::Source]
attr_accessor :source
# Output only. True if the field is verified; false if the field is unverified.
# A verified field is typically a name, email address, phone number, or website
# that has been confirmed to be owned by the person.
# Corresponds to the JSON property `verified`
# @return [Boolean]
attr_accessor :verified
alias_method :verified?, :verified
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@primary = args[:primary] if args.key?(:primary)
@source = args[:source] if args.key?(:source)
@verified = args[:verified] if args.key?(:verified)
end
end
# The name that should be used to sort the person in a list.
class FileAs
include Google::Apis::Core::Hashable
# Metadata about a field.
# Corresponds to the JSON property `metadata`
# @return [Google::Apis::PeopleV1::FieldMetadata]
attr_accessor :metadata
# The file-as value
# Corresponds to the JSON property `value`
# @return [String]
attr_accessor :value
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@metadata = args[:metadata] if args.key?(:metadata)
@value = args[:value] if args.key?(:value)
end
end
# A person's gender.
class Gender
include Google::Apis::Core::Hashable
# The type of pronouns that should be used to address the person. The value can
# be custom or one of these predefined values: * `male` * `female` * `other`
# Corresponds to the JSON property `addressMeAs`
# @return [String]
attr_accessor :address_me_as
# Output only. The value of the gender translated and formatted in the viewer's
# account locale or the `Accept-Language` HTTP header locale. Unspecified or
# custom value are not localized.
# Corresponds to the JSON property `formattedValue`
# @return [String]
attr_accessor :formatted_value
# Metadata about a field.
# Corresponds to the JSON property `metadata`
# @return [Google::Apis::PeopleV1::FieldMetadata]
attr_accessor :metadata
# The gender for the person. The gender can be custom or one of these predefined
# values: * `male` * `female` * `unspecified`
# Corresponds to the JSON property `value`
# @return [String]
attr_accessor :value
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@address_me_as = args[:address_me_as] if args.key?(:address_me_as)
@formatted_value = args[:formatted_value] if args.key?(:formatted_value)
@metadata = args[:metadata] if args.key?(:metadata)
@value = args[:value] if args.key?(:value)
end
end
# The response to a get request for a list of people by resource name.
class GetPeopleResponse
include Google::Apis::Core::Hashable
# The response for each requested resource name.
# Corresponds to the JSON property `responses`
# @return [Array<Google::Apis::PeopleV1::PersonResponse>]
attr_accessor :responses
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@responses = args[:responses] if args.key?(:responses)
end
end
# A person's instant messaging client.
class ImClient
include Google::Apis::Core::Hashable
# Output only. The protocol of the IM client formatted in the viewer's account
# locale or the `Accept-Language` HTTP header locale.
# Corresponds to the JSON property `formattedProtocol`
# @return [String]
attr_accessor :formatted_protocol
# Output only. The type of the IM client translated and formatted in the viewer'
# s account locale or the `Accept-Language` HTTP header locale.
# Corresponds to the JSON property `formattedType`
# @return [String]
attr_accessor :formatted_type
# Metadata about a field.
# Corresponds to the JSON property `metadata`
# @return [Google::Apis::PeopleV1::FieldMetadata]
attr_accessor :metadata
# The protocol of the IM client. The protocol can be custom or one of these
# predefined values: * `aim` * `msn` * `yahoo` * `skype` * `qq` * `googleTalk` *
# `icq` * `jabber` * `netMeeting`
# Corresponds to the JSON property `protocol`
# @return [String]
attr_accessor :protocol
# The type of the IM client. The type can be custom or one of these predefined
# values: * `home` * `work` * `other`
# Corresponds to the JSON property `type`
# @return [String]
attr_accessor :type
# The user name used in the IM client.
# Corresponds to the JSON property `username`
# @return [String]
attr_accessor :username
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@formatted_protocol = args[:formatted_protocol] if args.key?(:formatted_protocol)
@formatted_type = args[:formatted_type] if args.key?(:formatted_type)
@metadata = args[:metadata] if args.key?(:metadata)
@protocol = args[:protocol] if args.key?(:protocol)
@type = args[:type] if args.key?(:type)
@username = args[:username] if args.key?(:username)
end
end
# One of the person's interests.
class Interest
include Google::Apis::Core::Hashable
# Metadata about a field.
# Corresponds to the JSON property `metadata`
# @return [Google::Apis::PeopleV1::FieldMetadata]
attr_accessor :metadata
# The interest; for example, `stargazing`.
# Corresponds to the JSON property `value`
# @return [String]
attr_accessor :value