1// Copyright 2021 Google LLC.
2// Use of this source code is governed by a BSD-style
3// license that can be found in the LICENSE file.
4
5// Code generated file. DO NOT EDIT.
6
7// Package people provides access to the People API.
8//
9// For product documentation, see: https://developers.google.com/people/
10//
11// Creating a client
12//
13// Usage example:
14//
15//   import "google.golang.org/api/people/v1"
16//   ...
17//   ctx := context.Background()
18//   peopleService, err := people.NewService(ctx)
19//
20// In this example, Google Application Default Credentials are used for authentication.
21//
22// For information on how to create and obtain Application Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials.
23//
24// Other authentication options
25//
26// By default, all available scopes (see "Constants") are used to authenticate. To restrict scopes, use option.WithScopes:
27//
28//   peopleService, err := people.NewService(ctx, option.WithScopes(people.UserinfoProfileScope))
29//
30// To use an API key for authentication (note: some APIs do not support API keys), use option.WithAPIKey:
31//
32//   peopleService, err := people.NewService(ctx, option.WithAPIKey("AIza..."))
33//
34// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth flow), use option.WithTokenSource:
35//
36//   config := &oauth2.Config{...}
37//   // ...
38//   token, err := config.Exchange(ctx, ...)
39//   peopleService, err := people.NewService(ctx, option.WithTokenSource(config.TokenSource(ctx, token)))
40//
41// See https://godoc.org/google.golang.org/api/option/ for details on options.
42package people // import "google.golang.org/api/people/v1"
43
44import (
45	"bytes"
46	"context"
47	"encoding/json"
48	"errors"
49	"fmt"
50	"io"
51	"net/http"
52	"net/url"
53	"strconv"
54	"strings"
55
56	googleapi "google.golang.org/api/googleapi"
57	gensupport "google.golang.org/api/internal/gensupport"
58	option "google.golang.org/api/option"
59	internaloption "google.golang.org/api/option/internaloption"
60	htransport "google.golang.org/api/transport/http"
61)
62
63// Always reference these packages, just in case the auto-generated code
64// below doesn't.
65var _ = bytes.NewBuffer
66var _ = strconv.Itoa
67var _ = fmt.Sprintf
68var _ = json.NewDecoder
69var _ = io.Copy
70var _ = url.Parse
71var _ = gensupport.MarshalJSON
72var _ = googleapi.Version
73var _ = errors.New
74var _ = strings.Replace
75var _ = context.Canceled
76var _ = internaloption.WithDefaultEndpoint
77
78const apiId = "people:v1"
79const apiName = "people"
80const apiVersion = "v1"
81const basePath = "https://people.googleapis.com/"
82const mtlsBasePath = "https://people.mtls.googleapis.com/"
83
84// OAuth2 scopes used by this API.
85const (
86	// See, edit, download, and permanently delete your contacts
87	ContactsScope = "https://www.googleapis.com/auth/contacts"
88
89	// See and download contact info automatically saved in your "Other
90	// contacts"
91	ContactsOtherReadonlyScope = "https://www.googleapis.com/auth/contacts.other.readonly"
92
93	// See and download your contacts
94	ContactsReadonlyScope = "https://www.googleapis.com/auth/contacts.readonly"
95
96	// See and download your organization's GSuite directory
97	DirectoryReadonlyScope = "https://www.googleapis.com/auth/directory.readonly"
98
99	// View your street addresses
100	UserAddressesReadScope = "https://www.googleapis.com/auth/user.addresses.read"
101
102	// See and download your exact date of birth
103	UserBirthdayReadScope = "https://www.googleapis.com/auth/user.birthday.read"
104
105	// See and download all of your Google Account email addresses
106	UserEmailsReadScope = "https://www.googleapis.com/auth/user.emails.read"
107
108	// See your gender
109	UserGenderReadScope = "https://www.googleapis.com/auth/user.gender.read"
110
111	// See your education, work history and org info
112	UserOrganizationReadScope = "https://www.googleapis.com/auth/user.organization.read"
113
114	// See and download your personal phone numbers
115	UserPhonenumbersReadScope = "https://www.googleapis.com/auth/user.phonenumbers.read"
116
117	// See your primary Google Account email address
118	UserinfoEmailScope = "https://www.googleapis.com/auth/userinfo.email"
119
120	// See your personal info, including any personal info you've made
121	// publicly available
122	UserinfoProfileScope = "https://www.googleapis.com/auth/userinfo.profile"
123)
124
125// NewService creates a new Service.
126func NewService(ctx context.Context, opts ...option.ClientOption) (*Service, error) {
127	scopesOption := option.WithScopes(
128		"https://www.googleapis.com/auth/contacts",
129		"https://www.googleapis.com/auth/contacts.other.readonly",
130		"https://www.googleapis.com/auth/contacts.readonly",
131		"https://www.googleapis.com/auth/directory.readonly",
132		"https://www.googleapis.com/auth/user.addresses.read",
133		"https://www.googleapis.com/auth/user.birthday.read",
134		"https://www.googleapis.com/auth/user.emails.read",
135		"https://www.googleapis.com/auth/user.gender.read",
136		"https://www.googleapis.com/auth/user.organization.read",
137		"https://www.googleapis.com/auth/user.phonenumbers.read",
138		"https://www.googleapis.com/auth/userinfo.email",
139		"https://www.googleapis.com/auth/userinfo.profile",
140	)
141	// NOTE: prepend, so we don't override user-specified scopes.
142	opts = append([]option.ClientOption{scopesOption}, opts...)
143	opts = append(opts, internaloption.WithDefaultEndpoint(basePath))
144	opts = append(opts, internaloption.WithDefaultMTLSEndpoint(mtlsBasePath))
145	client, endpoint, err := htransport.NewClient(ctx, opts...)
146	if err != nil {
147		return nil, err
148	}
149	s, err := New(client)
150	if err != nil {
151		return nil, err
152	}
153	if endpoint != "" {
154		s.BasePath = endpoint
155	}
156	return s, nil
157}
158
159// New creates a new Service. It uses the provided http.Client for requests.
160//
161// Deprecated: please use NewService instead.
162// To provide a custom HTTP client, use option.WithHTTPClient.
163// If you are using google.golang.org/api/googleapis/transport.APIKey, use option.WithAPIKey with NewService instead.
164func New(client *http.Client) (*Service, error) {
165	if client == nil {
166		return nil, errors.New("client is nil")
167	}
168	s := &Service{client: client, BasePath: basePath}
169	s.ContactGroups = NewContactGroupsService(s)
170	s.OtherContacts = NewOtherContactsService(s)
171	s.People = NewPeopleService(s)
172	return s, nil
173}
174
175type Service struct {
176	client    *http.Client
177	BasePath  string // API endpoint base URL
178	UserAgent string // optional additional User-Agent fragment
179
180	ContactGroups *ContactGroupsService
181
182	OtherContacts *OtherContactsService
183
184	People *PeopleService
185}
186
187func (s *Service) userAgent() string {
188	if s.UserAgent == "" {
189		return googleapi.UserAgent
190	}
191	return googleapi.UserAgent + " " + s.UserAgent
192}
193
194func NewContactGroupsService(s *Service) *ContactGroupsService {
195	rs := &ContactGroupsService{s: s}
196	rs.Members = NewContactGroupsMembersService(s)
197	return rs
198}
199
200type ContactGroupsService struct {
201	s *Service
202
203	Members *ContactGroupsMembersService
204}
205
206func NewContactGroupsMembersService(s *Service) *ContactGroupsMembersService {
207	rs := &ContactGroupsMembersService{s: s}
208	return rs
209}
210
211type ContactGroupsMembersService struct {
212	s *Service
213}
214
215func NewOtherContactsService(s *Service) *OtherContactsService {
216	rs := &OtherContactsService{s: s}
217	return rs
218}
219
220type OtherContactsService struct {
221	s *Service
222}
223
224func NewPeopleService(s *Service) *PeopleService {
225	rs := &PeopleService{s: s}
226	rs.Connections = NewPeopleConnectionsService(s)
227	return rs
228}
229
230type PeopleService struct {
231	s *Service
232
233	Connections *PeopleConnectionsService
234}
235
236func NewPeopleConnectionsService(s *Service) *PeopleConnectionsService {
237	rs := &PeopleConnectionsService{s: s}
238	return rs
239}
240
241type PeopleConnectionsService struct {
242	s *Service
243}
244
245// Address: A person's physical address. May be a P.O. box or street
246// address. All fields are optional.
247type Address struct {
248	// City: The city of the address.
249	City string `json:"city,omitempty"`
250
251	// Country: The country of the address.
252	Country string `json:"country,omitempty"`
253
254	// CountryCode: The ISO 3166-1 alpha-2
255	// (http://www.iso.org/iso/country_codes.htm) country code of the
256	// address.
257	CountryCode string `json:"countryCode,omitempty"`
258
259	// ExtendedAddress: The extended address of the address; for example,
260	// the apartment number.
261	ExtendedAddress string `json:"extendedAddress,omitempty"`
262
263	// FormattedType: Output only. The type of the address translated and
264	// formatted in the viewer's account locale or the `Accept-Language`
265	// HTTP header locale.
266	FormattedType string `json:"formattedType,omitempty"`
267
268	// FormattedValue: The unstructured value of the address. If this is not
269	// set by the user it will be automatically constructed from structured
270	// values.
271	FormattedValue string `json:"formattedValue,omitempty"`
272
273	// Metadata: Metadata about the address.
274	Metadata *FieldMetadata `json:"metadata,omitempty"`
275
276	// PoBox: The P.O. box of the address.
277	PoBox string `json:"poBox,omitempty"`
278
279	// PostalCode: The postal code of the address.
280	PostalCode string `json:"postalCode,omitempty"`
281
282	// Region: The region of the address; for example, the state or
283	// province.
284	Region string `json:"region,omitempty"`
285
286	// StreetAddress: The street address.
287	StreetAddress string `json:"streetAddress,omitempty"`
288
289	// Type: The type of the address. The type can be custom or one of these
290	// predefined values: * `home` * `work` * `other`
291	Type string `json:"type,omitempty"`
292
293	// ForceSendFields is a list of field names (e.g. "City") to
294	// unconditionally include in API requests. By default, fields with
295	// empty or default values are omitted from API requests. However, any
296	// non-pointer, non-interface field appearing in ForceSendFields will be
297	// sent to the server regardless of whether the field is empty or not.
298	// This may be used to include empty fields in Patch requests.
299	ForceSendFields []string `json:"-"`
300
301	// NullFields is a list of field names (e.g. "City") to include in API
302	// requests with the JSON null value. By default, fields with empty
303	// values are omitted from API requests. However, any field with an
304	// empty value appearing in NullFields will be sent to the server as
305	// null. It is an error if a field in this list has a non-empty value.
306	// This may be used to include null fields in Patch requests.
307	NullFields []string `json:"-"`
308}
309
310func (s *Address) MarshalJSON() ([]byte, error) {
311	type NoMethod Address
312	raw := NoMethod(*s)
313	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
314}
315
316// AgeRangeType: A person's age range.
317type AgeRangeType struct {
318	// AgeRange: The age range.
319	//
320	// Possible values:
321	//   "AGE_RANGE_UNSPECIFIED" - Unspecified.
322	//   "LESS_THAN_EIGHTEEN" - Younger than eighteen.
323	//   "EIGHTEEN_TO_TWENTY" - Between eighteen and twenty.
324	//   "TWENTY_ONE_OR_OLDER" - Twenty-one and older.
325	AgeRange string `json:"ageRange,omitempty"`
326
327	// Metadata: Metadata about the age range.
328	Metadata *FieldMetadata `json:"metadata,omitempty"`
329
330	// ForceSendFields is a list of field names (e.g. "AgeRange") to
331	// unconditionally include in API requests. By default, fields with
332	// empty or default values are omitted from API requests. However, any
333	// non-pointer, non-interface field appearing in ForceSendFields will be
334	// sent to the server regardless of whether the field is empty or not.
335	// This may be used to include empty fields in Patch requests.
336	ForceSendFields []string `json:"-"`
337
338	// NullFields is a list of field names (e.g. "AgeRange") to include in
339	// API requests with the JSON null value. By default, fields with empty
340	// values are omitted from API requests. However, any field with an
341	// empty value appearing in NullFields will be sent to the server as
342	// null. It is an error if a field in this list has a non-empty value.
343	// This may be used to include null fields in Patch requests.
344	NullFields []string `json:"-"`
345}
346
347func (s *AgeRangeType) MarshalJSON() ([]byte, error) {
348	type NoMethod AgeRangeType
349	raw := NoMethod(*s)
350	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
351}
352
353// BatchCreateContactsRequest: A request to create a batch of contacts.
354type BatchCreateContactsRequest struct {
355	// Contacts: Required. The contact to create. Allows up to 200 contacts
356	// in a single request.
357	Contacts []*ContactToCreate `json:"contacts,omitempty"`
358
359	// ReadMask: Required. A field mask to restrict which fields on each
360	// person are returned in the response. Multiple fields can be specified
361	// by separating them with commas. If read mask is left empty, the
362	// post-mutate-get is skipped and no data will be returned in the
363	// response. Valid values are: * addresses * ageRanges * biographies *
364	// birthdays * calendarUrls * clientData * coverPhotos * emailAddresses
365	// * events * externalIds * genders * imClients * interests * locales *
366	// locations * memberships * metadata * miscKeywords * names * nicknames
367	// * occupations * organizations * phoneNumbers * photos * relations *
368	// sipAddresses * skills * urls * userDefined
369	ReadMask string `json:"readMask,omitempty"`
370
371	// Sources: Optional. A mask of what source types to return in the post
372	// mutate read. Defaults to READ_SOURCE_TYPE_CONTACT and
373	// READ_SOURCE_TYPE_PROFILE if not set.
374	//
375	// Possible values:
376	//   "READ_SOURCE_TYPE_UNSPECIFIED" - Unspecified.
377	//   "READ_SOURCE_TYPE_PROFILE" - Returns SourceType.ACCOUNT,
378	// SourceType.DOMAIN_PROFILE, and SourceType.PROFILE.
379	//   "READ_SOURCE_TYPE_CONTACT" - Returns SourceType.CONTACT.
380	//   "READ_SOURCE_TYPE_DOMAIN_CONTACT" - Returns
381	// SourceType.DOMAIN_CONTACT.
382	Sources []string `json:"sources,omitempty"`
383
384	// ForceSendFields is a list of field names (e.g. "Contacts") to
385	// unconditionally include in API requests. By default, fields with
386	// empty or default values are omitted from API requests. However, any
387	// non-pointer, non-interface field appearing in ForceSendFields will be
388	// sent to the server regardless of whether the field is empty or not.
389	// This may be used to include empty fields in Patch requests.
390	ForceSendFields []string `json:"-"`
391
392	// NullFields is a list of field names (e.g. "Contacts") to include in
393	// API requests with the JSON null value. By default, fields with empty
394	// values are omitted from API requests. However, any field with an
395	// empty value appearing in NullFields will be sent to the server as
396	// null. It is an error if a field in this list has a non-empty value.
397	// This may be used to include null fields in Patch requests.
398	NullFields []string `json:"-"`
399}
400
401func (s *BatchCreateContactsRequest) MarshalJSON() ([]byte, error) {
402	type NoMethod BatchCreateContactsRequest
403	raw := NoMethod(*s)
404	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
405}
406
407// BatchCreateContactsResponse: If not successful, returns
408// BatchCreateContactsErrorDetails which contains a list of errors for
409// each invalid contact. The response to a request to create a batch of
410// contacts.
411type BatchCreateContactsResponse struct {
412	// CreatedPeople: The contacts that were created, unless the request
413	// `read_mask` is empty.
414	CreatedPeople []*PersonResponse `json:"createdPeople,omitempty"`
415
416	// ServerResponse contains the HTTP response code and headers from the
417	// server.
418	googleapi.ServerResponse `json:"-"`
419
420	// ForceSendFields is a list of field names (e.g. "CreatedPeople") to
421	// unconditionally include in API requests. By default, fields with
422	// empty or default values are omitted from API requests. However, any
423	// non-pointer, non-interface field appearing in ForceSendFields will be
424	// sent to the server regardless of whether the field is empty or not.
425	// This may be used to include empty fields in Patch requests.
426	ForceSendFields []string `json:"-"`
427
428	// NullFields is a list of field names (e.g. "CreatedPeople") to include
429	// in API requests with the JSON null value. By default, fields with
430	// empty values are omitted from API requests. However, any field with
431	// an empty value appearing in NullFields will be sent to the server as
432	// null. It is an error if a field in this list has a non-empty value.
433	// This may be used to include null fields in Patch requests.
434	NullFields []string `json:"-"`
435}
436
437func (s *BatchCreateContactsResponse) MarshalJSON() ([]byte, error) {
438	type NoMethod BatchCreateContactsResponse
439	raw := NoMethod(*s)
440	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
441}
442
443// BatchDeleteContactsRequest: A request to delete a batch of existing
444// contacts.
445type BatchDeleteContactsRequest struct {
446	// ResourceNames: Required. The resource names of the contact to delete.
447	// It's repeatable. Allows up to 500 resource names in a single request.
448	ResourceNames []string `json:"resourceNames,omitempty"`
449
450	// ForceSendFields is a list of field names (e.g. "ResourceNames") to
451	// unconditionally include in API requests. By default, fields with
452	// empty or default values are omitted from API requests. However, any
453	// non-pointer, non-interface field appearing in ForceSendFields will be
454	// sent to the server regardless of whether the field is empty or not.
455	// This may be used to include empty fields in Patch requests.
456	ForceSendFields []string `json:"-"`
457
458	// NullFields is a list of field names (e.g. "ResourceNames") to include
459	// in API requests with the JSON null value. By default, fields with
460	// empty values are omitted from API requests. However, any field with
461	// an empty value appearing in NullFields will be sent to the server as
462	// null. It is an error if a field in this list has a non-empty value.
463	// This may be used to include null fields in Patch requests.
464	NullFields []string `json:"-"`
465}
466
467func (s *BatchDeleteContactsRequest) MarshalJSON() ([]byte, error) {
468	type NoMethod BatchDeleteContactsRequest
469	raw := NoMethod(*s)
470	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
471}
472
473// BatchGetContactGroupsResponse: The response to a batch get contact
474// groups request.
475type BatchGetContactGroupsResponse struct {
476	// Responses: The list of responses for each requested contact group
477	// resource.
478	Responses []*ContactGroupResponse `json:"responses,omitempty"`
479
480	// ServerResponse contains the HTTP response code and headers from the
481	// server.
482	googleapi.ServerResponse `json:"-"`
483
484	// ForceSendFields is a list of field names (e.g. "Responses") to
485	// unconditionally include in API requests. By default, fields with
486	// empty or default values are omitted from API requests. However, any
487	// non-pointer, non-interface field appearing in ForceSendFields will be
488	// sent to the server regardless of whether the field is empty or not.
489	// This may be used to include empty fields in Patch requests.
490	ForceSendFields []string `json:"-"`
491
492	// NullFields is a list of field names (e.g. "Responses") to include in
493	// API requests with the JSON null value. By default, fields with empty
494	// values are omitted from API requests. However, any field with an
495	// empty value appearing in NullFields will be sent to the server as
496	// null. It is an error if a field in this list has a non-empty value.
497	// This may be used to include null fields in Patch requests.
498	NullFields []string `json:"-"`
499}
500
501func (s *BatchGetContactGroupsResponse) MarshalJSON() ([]byte, error) {
502	type NoMethod BatchGetContactGroupsResponse
503	raw := NoMethod(*s)
504	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
505}
506
507// BatchUpdateContactsRequest: A request to update a batch of contacts.
508type BatchUpdateContactsRequest struct {
509	// Contacts: Required. A map of resource names to the person data to be
510	// updated. Allows up to 200 contacts in a single request.
511	Contacts map[string]Person `json:"contacts,omitempty"`
512
513	// ReadMask: Required. A field mask to restrict which fields on each
514	// person are returned. Multiple fields can be specified by separating
515	// them with commas. If read mask is left empty, the post-mutate-get is
516	// skipped and no data will be returned in the response. Valid values
517	// are: * addresses * ageRanges * biographies * birthdays * calendarUrls
518	// * clientData * coverPhotos * emailAddresses * events * externalIds *
519	// genders * imClients * interests * locales * locations * memberships *
520	// metadata * miscKeywords * names * nicknames * occupations *
521	// organizations * phoneNumbers * photos * relations * sipAddresses *
522	// skills * urls * userDefined
523	ReadMask string `json:"readMask,omitempty"`
524
525	// Sources: Optional. A mask of what source types to return. Defaults to
526	// READ_SOURCE_TYPE_CONTACT and READ_SOURCE_TYPE_PROFILE if not set.
527	//
528	// Possible values:
529	//   "READ_SOURCE_TYPE_UNSPECIFIED" - Unspecified.
530	//   "READ_SOURCE_TYPE_PROFILE" - Returns SourceType.ACCOUNT,
531	// SourceType.DOMAIN_PROFILE, and SourceType.PROFILE.
532	//   "READ_SOURCE_TYPE_CONTACT" - Returns SourceType.CONTACT.
533	//   "READ_SOURCE_TYPE_DOMAIN_CONTACT" - Returns
534	// SourceType.DOMAIN_CONTACT.
535	Sources []string `json:"sources,omitempty"`
536
537	// UpdateMask: Required. A field mask to restrict which fields on the
538	// person are updated. Multiple fields can be specified by separating
539	// them with commas. All specified fields will be replaced, or cleared
540	// if left empty for each person. Valid values are: * addresses *
541	// biographies * birthdays * calendarUrls * clientData * emailAddresses
542	// * events * externalIds * genders * imClients * interests * locales *
543	// locations * memberships * miscKeywords * names * nicknames *
544	// occupations * organizations * phoneNumbers * relations * sipAddresses
545	// * urls * userDefined
546	UpdateMask string `json:"updateMask,omitempty"`
547
548	// ForceSendFields is a list of field names (e.g. "Contacts") to
549	// unconditionally include in API requests. By default, fields with
550	// empty or default values are omitted from API requests. However, any
551	// non-pointer, non-interface field appearing in ForceSendFields will be
552	// sent to the server regardless of whether the field is empty or not.
553	// This may be used to include empty fields in Patch requests.
554	ForceSendFields []string `json:"-"`
555
556	// NullFields is a list of field names (e.g. "Contacts") to include in
557	// API requests with the JSON null value. By default, fields with empty
558	// values are omitted from API requests. However, any field with an
559	// empty value appearing in NullFields will be sent to the server as
560	// null. It is an error if a field in this list has a non-empty value.
561	// This may be used to include null fields in Patch requests.
562	NullFields []string `json:"-"`
563}
564
565func (s *BatchUpdateContactsRequest) MarshalJSON() ([]byte, error) {
566	type NoMethod BatchUpdateContactsRequest
567	raw := NoMethod(*s)
568	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
569}
570
571// BatchUpdateContactsResponse: If not successful, returns
572// BatchUpdateContactsErrorDetails, a list of errors corresponding to
573// each contact. The response to a request to update a batch of
574// contacts.
575type BatchUpdateContactsResponse struct {
576	// UpdateResult: A map of resource names to the contacts that were
577	// updated, unless the request `read_mask` is empty.
578	UpdateResult map[string]PersonResponse `json:"updateResult,omitempty"`
579
580	// ServerResponse contains the HTTP response code and headers from the
581	// server.
582	googleapi.ServerResponse `json:"-"`
583
584	// ForceSendFields is a list of field names (e.g. "UpdateResult") to
585	// unconditionally include in API requests. By default, fields with
586	// empty or default values are omitted from API requests. However, any
587	// non-pointer, non-interface field appearing in ForceSendFields will be
588	// sent to the server regardless of whether the field is empty or not.
589	// This may be used to include empty fields in Patch requests.
590	ForceSendFields []string `json:"-"`
591
592	// NullFields is a list of field names (e.g. "UpdateResult") to include
593	// in API requests with the JSON null value. By default, fields with
594	// empty values are omitted from API requests. However, any field with
595	// an empty value appearing in NullFields will be sent to the server as
596	// null. It is an error if a field in this list has a non-empty value.
597	// This may be used to include null fields in Patch requests.
598	NullFields []string `json:"-"`
599}
600
601func (s *BatchUpdateContactsResponse) MarshalJSON() ([]byte, error) {
602	type NoMethod BatchUpdateContactsResponse
603	raw := NoMethod(*s)
604	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
605}
606
607// Biography: A person's short biography.
608type Biography struct {
609	// ContentType: The content type of the biography.
610	//
611	// Possible values:
612	//   "CONTENT_TYPE_UNSPECIFIED" - Unspecified.
613	//   "TEXT_PLAIN" - Plain text.
614	//   "TEXT_HTML" - HTML text.
615	ContentType string `json:"contentType,omitempty"`
616
617	// Metadata: Metadata about the biography.
618	Metadata *FieldMetadata `json:"metadata,omitempty"`
619
620	// Value: The short biography.
621	Value string `json:"value,omitempty"`
622
623	// ForceSendFields is a list of field names (e.g. "ContentType") to
624	// unconditionally include in API requests. By default, fields with
625	// empty or default values are omitted from API requests. However, any
626	// non-pointer, non-interface field appearing in ForceSendFields will be
627	// sent to the server regardless of whether the field is empty or not.
628	// This may be used to include empty fields in Patch requests.
629	ForceSendFields []string `json:"-"`
630
631	// NullFields is a list of field names (e.g. "ContentType") to include
632	// in API requests with the JSON null value. By default, fields with
633	// empty values are omitted from API requests. However, any field with
634	// an empty value appearing in NullFields will be sent to the server as
635	// null. It is an error if a field in this list has a non-empty value.
636	// This may be used to include null fields in Patch requests.
637	NullFields []string `json:"-"`
638}
639
640func (s *Biography) MarshalJSON() ([]byte, error) {
641	type NoMethod Biography
642	raw := NoMethod(*s)
643	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
644}
645
646// Birthday: A person's birthday. At least one of the `date` and `text`
647// fields are specified. The `date` and `text` fields typically
648// represent the same date, but are not guaranteed to.
649type Birthday struct {
650	// Date: The date of the birthday.
651	Date *Date `json:"date,omitempty"`
652
653	// Metadata: Metadata about the birthday.
654	Metadata *FieldMetadata `json:"metadata,omitempty"`
655
656	// Text: A free-form string representing the user's birthday.
657	Text string `json:"text,omitempty"`
658
659	// ForceSendFields is a list of field names (e.g. "Date") to
660	// unconditionally include in API requests. By default, fields with
661	// empty or default values are omitted from API requests. However, any
662	// non-pointer, non-interface field appearing in ForceSendFields will be
663	// sent to the server regardless of whether the field is empty or not.
664	// This may be used to include empty fields in Patch requests.
665	ForceSendFields []string `json:"-"`
666
667	// NullFields is a list of field names (e.g. "Date") to include in API
668	// requests with the JSON null value. By default, fields with empty
669	// values are omitted from API requests. However, any field with an
670	// empty value appearing in NullFields will be sent to the server as
671	// null. It is an error if a field in this list has a non-empty value.
672	// This may be used to include null fields in Patch requests.
673	NullFields []string `json:"-"`
674}
675
676func (s *Birthday) MarshalJSON() ([]byte, error) {
677	type NoMethod Birthday
678	raw := NoMethod(*s)
679	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
680}
681
682// BraggingRights: **DEPRECATED**: No data will be returned A person's
683// bragging rights.
684type BraggingRights struct {
685	// Metadata: Metadata about the bragging rights.
686	Metadata *FieldMetadata `json:"metadata,omitempty"`
687
688	// Value: The bragging rights; for example, `climbed mount everest`.
689	Value string `json:"value,omitempty"`
690
691	// ForceSendFields is a list of field names (e.g. "Metadata") to
692	// unconditionally include in API requests. By default, fields with
693	// empty or default values are omitted from API requests. However, any
694	// non-pointer, non-interface field appearing in ForceSendFields will be
695	// sent to the server regardless of whether the field is empty or not.
696	// This may be used to include empty fields in Patch requests.
697	ForceSendFields []string `json:"-"`
698
699	// NullFields is a list of field names (e.g. "Metadata") to include in
700	// API requests with the JSON null value. By default, fields with empty
701	// values are omitted from API requests. However, any field with an
702	// empty value appearing in NullFields will be sent to the server as
703	// null. It is an error if a field in this list has a non-empty value.
704	// This may be used to include null fields in Patch requests.
705	NullFields []string `json:"-"`
706}
707
708func (s *BraggingRights) MarshalJSON() ([]byte, error) {
709	type NoMethod BraggingRights
710	raw := NoMethod(*s)
711	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
712}
713
714// CalendarUrl: A person's calendar URL.
715type CalendarUrl struct {
716	// FormattedType: Output only. The type of the calendar URL translated
717	// and formatted in the viewer's account locale or the `Accept-Language`
718	// HTTP header locale.
719	FormattedType string `json:"formattedType,omitempty"`
720
721	// Metadata: Metadata about the calendar URL.
722	Metadata *FieldMetadata `json:"metadata,omitempty"`
723
724	// Type: The type of the calendar URL. The type can be custom or one of
725	// these predefined values: * `home` * `freeBusy` * `work`
726	Type string `json:"type,omitempty"`
727
728	// Url: The calendar URL.
729	Url string `json:"url,omitempty"`
730
731	// ForceSendFields is a list of field names (e.g. "FormattedType") to
732	// unconditionally include in API requests. By default, fields with
733	// empty or default values are omitted from API requests. However, any
734	// non-pointer, non-interface field appearing in ForceSendFields will be
735	// sent to the server regardless of whether the field is empty or not.
736	// This may be used to include empty fields in Patch requests.
737	ForceSendFields []string `json:"-"`
738
739	// NullFields is a list of field names (e.g. "FormattedType") to include
740	// in API requests with the JSON null value. By default, fields with
741	// empty values are omitted from API requests. However, any field with
742	// an empty value appearing in NullFields will be sent to the server as
743	// null. It is an error if a field in this list has a non-empty value.
744	// This may be used to include null fields in Patch requests.
745	NullFields []string `json:"-"`
746}
747
748func (s *CalendarUrl) MarshalJSON() ([]byte, error) {
749	type NoMethod CalendarUrl
750	raw := NoMethod(*s)
751	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
752}
753
754// ClientData: Arbitrary client data that is populated by clients.
755// Duplicate keys and values are allowed.
756type ClientData struct {
757	// Key: The client specified key of the client data.
758	Key string `json:"key,omitempty"`
759
760	// Metadata: Metadata about the client data.
761	Metadata *FieldMetadata `json:"metadata,omitempty"`
762
763	// Value: The client specified value of the client data.
764	Value string `json:"value,omitempty"`
765
766	// ForceSendFields is a list of field names (e.g. "Key") to
767	// unconditionally include in API requests. By default, fields with
768	// empty or default values are omitted from API requests. However, any
769	// non-pointer, non-interface field appearing in ForceSendFields will be
770	// sent to the server regardless of whether the field is empty or not.
771	// This may be used to include empty fields in Patch requests.
772	ForceSendFields []string `json:"-"`
773
774	// NullFields is a list of field names (e.g. "Key") to include in API
775	// requests with the JSON null value. By default, fields with empty
776	// values are omitted from API requests. However, any field with an
777	// empty value appearing in NullFields will be sent to the server as
778	// null. It is an error if a field in this list has a non-empty value.
779	// This may be used to include null fields in Patch requests.
780	NullFields []string `json:"-"`
781}
782
783func (s *ClientData) MarshalJSON() ([]byte, error) {
784	type NoMethod ClientData
785	raw := NoMethod(*s)
786	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
787}
788
789// ContactGroup: A contact group.
790type ContactGroup struct {
791	// ClientData: The group's client data.
792	ClientData []*GroupClientData `json:"clientData,omitempty"`
793
794	// Etag: The HTTP entity tag (https://en.wikipedia.org/wiki/HTTP_ETag)
795	// of the resource. Used for web cache validation.
796	Etag string `json:"etag,omitempty"`
797
798	// FormattedName: Output only. The name translated and formatted in the
799	// viewer's account locale or the `Accept-Language` HTTP header locale
800	// for system groups names. Group names set by the owner are the same as
801	// name.
802	FormattedName string `json:"formattedName,omitempty"`
803
804	// GroupType: Output only. The contact group type.
805	//
806	// Possible values:
807	//   "GROUP_TYPE_UNSPECIFIED" - Unspecified.
808	//   "USER_CONTACT_GROUP" - User defined contact group.
809	//   "SYSTEM_CONTACT_GROUP" - System defined contact group.
810	GroupType string `json:"groupType,omitempty"`
811
812	// MemberCount: Output only. The total number of contacts in the group
813	// irrespective of max members in specified in the request.
814	MemberCount int64 `json:"memberCount,omitempty"`
815
816	// MemberResourceNames: Output only. The list of contact person resource
817	// names that are members of the contact group. The field is only
818	// populated for GET requests and will only return as many members as
819	// `maxMembers` in the get request.
820	MemberResourceNames []string `json:"memberResourceNames,omitempty"`
821
822	// Metadata: Output only. Metadata about the contact group.
823	Metadata *ContactGroupMetadata `json:"metadata,omitempty"`
824
825	// Name: The contact group name set by the group owner or a system
826	// provided name for system groups. For `contactGroups.create`
827	// (/people/api/rest/v1/contactGroups/create) or `contactGroups.update`
828	// (/people/api/rest/v1/contactGroups/update) the name must be unique to
829	// the users contact groups. Attempting to create a group with a
830	// duplicate name will return a HTTP 409 error.
831	Name string `json:"name,omitempty"`
832
833	// ResourceName: The resource name for the contact group, assigned by
834	// the server. An ASCII string, in the form of
835	// `contactGroups/{contact_group_id}`.
836	ResourceName string `json:"resourceName,omitempty"`
837
838	// ServerResponse contains the HTTP response code and headers from the
839	// server.
840	googleapi.ServerResponse `json:"-"`
841
842	// ForceSendFields is a list of field names (e.g. "ClientData") to
843	// unconditionally include in API requests. By default, fields with
844	// empty or default values are omitted from API requests. However, any
845	// non-pointer, non-interface field appearing in ForceSendFields will be
846	// sent to the server regardless of whether the field is empty or not.
847	// This may be used to include empty fields in Patch requests.
848	ForceSendFields []string `json:"-"`
849
850	// NullFields is a list of field names (e.g. "ClientData") to include in
851	// API requests with the JSON null value. By default, fields with empty
852	// values are omitted from API requests. However, any field with an
853	// empty value appearing in NullFields will be sent to the server as
854	// null. It is an error if a field in this list has a non-empty value.
855	// This may be used to include null fields in Patch requests.
856	NullFields []string `json:"-"`
857}
858
859func (s *ContactGroup) MarshalJSON() ([]byte, error) {
860	type NoMethod ContactGroup
861	raw := NoMethod(*s)
862	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
863}
864
865// ContactGroupMembership: A Google contact group membership.
866type ContactGroupMembership struct {
867	// ContactGroupId: Output only. The contact group ID for the contact
868	// group membership.
869	ContactGroupId string `json:"contactGroupId,omitempty"`
870
871	// ContactGroupResourceName: The resource name for the contact group,
872	// assigned by the server. An ASCII string, in the form of
873	// `contactGroups/{contact_group_id}`. Only contact_group_resource_name
874	// can be used for modifying memberships. Any contact group membership
875	// can be removed, but only user group or "myContacts" or "starred"
876	// system groups memberships can be added. A contact must always have at
877	// least one contact group membership.
878	ContactGroupResourceName string `json:"contactGroupResourceName,omitempty"`
879
880	// ForceSendFields is a list of field names (e.g. "ContactGroupId") to
881	// unconditionally include in API requests. By default, fields with
882	// empty or default values are omitted from API requests. However, any
883	// non-pointer, non-interface field appearing in ForceSendFields will be
884	// sent to the server regardless of whether the field is empty or not.
885	// This may be used to include empty fields in Patch requests.
886	ForceSendFields []string `json:"-"`
887
888	// NullFields is a list of field names (e.g. "ContactGroupId") to
889	// include in API requests with the JSON null value. By default, fields
890	// with empty values are omitted from API requests. However, any field
891	// with an empty value appearing in NullFields will be sent to the
892	// server as null. It is an error if a field in this list has a
893	// non-empty value. This may be used to include null fields in Patch
894	// requests.
895	NullFields []string `json:"-"`
896}
897
898func (s *ContactGroupMembership) MarshalJSON() ([]byte, error) {
899	type NoMethod ContactGroupMembership
900	raw := NoMethod(*s)
901	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
902}
903
904// ContactGroupMetadata: The metadata about a contact group.
905type ContactGroupMetadata struct {
906	// Deleted: Output only. True if the contact group resource has been
907	// deleted. Populated only for `ListContactGroups`
908	// (/people/api/rest/v1/contactgroups/list) requests that include a sync
909	// token.
910	Deleted bool `json:"deleted,omitempty"`
911
912	// UpdateTime: Output only. The time the group was last updated.
913	UpdateTime string `json:"updateTime,omitempty"`
914
915	// ForceSendFields is a list of field names (e.g. "Deleted") to
916	// unconditionally include in API requests. By default, fields with
917	// empty or default values are omitted from API requests. However, any
918	// non-pointer, non-interface field appearing in ForceSendFields will be
919	// sent to the server regardless of whether the field is empty or not.
920	// This may be used to include empty fields in Patch requests.
921	ForceSendFields []string `json:"-"`
922
923	// NullFields is a list of field names (e.g. "Deleted") to include in
924	// API requests with the JSON null value. By default, fields with empty
925	// values are omitted from API requests. However, any field with an
926	// empty value appearing in NullFields will be sent to the server as
927	// null. It is an error if a field in this list has a non-empty value.
928	// This may be used to include null fields in Patch requests.
929	NullFields []string `json:"-"`
930}
931
932func (s *ContactGroupMetadata) MarshalJSON() ([]byte, error) {
933	type NoMethod ContactGroupMetadata
934	raw := NoMethod(*s)
935	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
936}
937
938// ContactGroupResponse: The response for a specific contact group.
939type ContactGroupResponse struct {
940	// ContactGroup: The contact group.
941	ContactGroup *ContactGroup `json:"contactGroup,omitempty"`
942
943	// RequestedResourceName: The original requested resource name.
944	RequestedResourceName string `json:"requestedResourceName,omitempty"`
945
946	// Status: The status of the response.
947	Status *Status `json:"status,omitempty"`
948
949	// ForceSendFields is a list of field names (e.g. "ContactGroup") to
950	// unconditionally include in API requests. By default, fields with
951	// empty or default values are omitted from API requests. However, any
952	// non-pointer, non-interface field appearing in ForceSendFields will be
953	// sent to the server regardless of whether the field is empty or not.
954	// This may be used to include empty fields in Patch requests.
955	ForceSendFields []string `json:"-"`
956
957	// NullFields is a list of field names (e.g. "ContactGroup") to include
958	// in API requests with the JSON null value. By default, fields with
959	// empty values are omitted from API requests. However, any field with
960	// an empty value appearing in NullFields will be sent to the server as
961	// null. It is an error if a field in this list has a non-empty value.
962	// This may be used to include null fields in Patch requests.
963	NullFields []string `json:"-"`
964}
965
966func (s *ContactGroupResponse) MarshalJSON() ([]byte, error) {
967	type NoMethod ContactGroupResponse
968	raw := NoMethod(*s)
969	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
970}
971
972// ContactToCreate: A wrapper that contains the person data to populate
973// a newly created source.
974type ContactToCreate struct {
975	// ContactPerson: Required. The person data to populate a newly created
976	// source.
977	ContactPerson *Person `json:"contactPerson,omitempty"`
978
979	// ForceSendFields is a list of field names (e.g. "ContactPerson") to
980	// unconditionally include in API requests. By default, fields with
981	// empty or default values are omitted from API requests. However, any
982	// non-pointer, non-interface field appearing in ForceSendFields will be
983	// sent to the server regardless of whether the field is empty or not.
984	// This may be used to include empty fields in Patch requests.
985	ForceSendFields []string `json:"-"`
986
987	// NullFields is a list of field names (e.g. "ContactPerson") to include
988	// in API requests with the JSON null value. By default, fields with
989	// empty values are omitted from API requests. However, any field with
990	// an empty value appearing in NullFields will be sent to the server as
991	// null. It is an error if a field in this list has a non-empty value.
992	// This may be used to include null fields in Patch requests.
993	NullFields []string `json:"-"`
994}
995
996func (s *ContactToCreate) MarshalJSON() ([]byte, error) {
997	type NoMethod ContactToCreate
998	raw := NoMethod(*s)
999	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1000}
1001
1002// CopyOtherContactToMyContactsGroupRequest: A request to copy an "Other
1003// contact" to my contacts group.
1004type CopyOtherContactToMyContactsGroupRequest struct {
1005	// CopyMask: Required. A field mask to restrict which fields are copied
1006	// into the new contact. Valid values are: * emailAddresses * names *
1007	// phoneNumbers
1008	CopyMask string `json:"copyMask,omitempty"`
1009
1010	// ReadMask: Optional. A field mask to restrict which fields on the
1011	// person are returned. Multiple fields can be specified by separating
1012	// them with commas. Defaults to the copy mask with metadata and
1013	// membership fields if not set. Valid values are: * addresses *
1014	// ageRanges * biographies * birthdays * calendarUrls * clientData *
1015	// coverPhotos * emailAddresses * events * externalIds * genders *
1016	// imClients * interests * locales * locations * memberships * metadata
1017	// * miscKeywords * names * nicknames * occupations * organizations *
1018	// phoneNumbers * photos * relations * sipAddresses * skills * urls *
1019	// userDefined
1020	ReadMask string `json:"readMask,omitempty"`
1021
1022	// Sources: Optional. A mask of what source types to return. Defaults to
1023	// READ_SOURCE_TYPE_CONTACT and READ_SOURCE_TYPE_PROFILE if not set.
1024	//
1025	// Possible values:
1026	//   "READ_SOURCE_TYPE_UNSPECIFIED" - Unspecified.
1027	//   "READ_SOURCE_TYPE_PROFILE" - Returns SourceType.ACCOUNT,
1028	// SourceType.DOMAIN_PROFILE, and SourceType.PROFILE.
1029	//   "READ_SOURCE_TYPE_CONTACT" - Returns SourceType.CONTACT.
1030	//   "READ_SOURCE_TYPE_DOMAIN_CONTACT" - Returns
1031	// SourceType.DOMAIN_CONTACT.
1032	Sources []string `json:"sources,omitempty"`
1033
1034	// ForceSendFields is a list of field names (e.g. "CopyMask") to
1035	// unconditionally include in API requests. By default, fields with
1036	// empty or default values are omitted from API requests. However, any
1037	// non-pointer, non-interface field appearing in ForceSendFields will be
1038	// sent to the server regardless of whether the field is empty or not.
1039	// This may be used to include empty fields in Patch requests.
1040	ForceSendFields []string `json:"-"`
1041
1042	// NullFields is a list of field names (e.g. "CopyMask") to include in
1043	// API requests with the JSON null value. By default, fields with empty
1044	// values are omitted from API requests. However, any field with an
1045	// empty value appearing in NullFields will be sent to the server as
1046	// null. It is an error if a field in this list has a non-empty value.
1047	// This may be used to include null fields in Patch requests.
1048	NullFields []string `json:"-"`
1049}
1050
1051func (s *CopyOtherContactToMyContactsGroupRequest) MarshalJSON() ([]byte, error) {
1052	type NoMethod CopyOtherContactToMyContactsGroupRequest
1053	raw := NoMethod(*s)
1054	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1055}
1056
1057// CoverPhoto: A person's cover photo. A large image shown on the
1058// person's profile page that represents who they are or what they care
1059// about.
1060type CoverPhoto struct {
1061	// Default: True if the cover photo is the default cover photo; false if
1062	// the cover photo is a user-provided cover photo.
1063	Default bool `json:"default,omitempty"`
1064
1065	// Metadata: Metadata about the cover photo.
1066	Metadata *FieldMetadata `json:"metadata,omitempty"`
1067
1068	// Url: The URL of the cover photo.
1069	Url string `json:"url,omitempty"`
1070
1071	// ForceSendFields is a list of field names (e.g. "Default") to
1072	// unconditionally include in API requests. By default, fields with
1073	// empty or default values are omitted from API requests. However, any
1074	// non-pointer, non-interface field appearing in ForceSendFields will be
1075	// sent to the server regardless of whether the field is empty or not.
1076	// This may be used to include empty fields in Patch requests.
1077	ForceSendFields []string `json:"-"`
1078
1079	// NullFields is a list of field names (e.g. "Default") to include in
1080	// API requests with the JSON null value. By default, fields with empty
1081	// values are omitted from API requests. However, any field with an
1082	// empty value appearing in NullFields will be sent to the server as
1083	// null. It is an error if a field in this list has a non-empty value.
1084	// This may be used to include null fields in Patch requests.
1085	NullFields []string `json:"-"`
1086}
1087
1088func (s *CoverPhoto) MarshalJSON() ([]byte, error) {
1089	type NoMethod CoverPhoto
1090	raw := NoMethod(*s)
1091	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1092}
1093
1094// CreateContactGroupRequest: A request to create a new contact group.
1095type CreateContactGroupRequest struct {
1096	// ContactGroup: Required. The contact group to create.
1097	ContactGroup *ContactGroup `json:"contactGroup,omitempty"`
1098
1099	// ReadGroupFields: Optional. A field mask to restrict which fields on
1100	// the group are returned. Defaults to `metadata`, `groupType`, and
1101	// `name` if not set or set to empty. Valid fields are: * clientData *
1102	// groupType * metadata * name
1103	ReadGroupFields string `json:"readGroupFields,omitempty"`
1104
1105	// ForceSendFields is a list of field names (e.g. "ContactGroup") to
1106	// unconditionally include in API requests. By default, fields with
1107	// empty or default values are omitted from API requests. However, any
1108	// non-pointer, non-interface field appearing in ForceSendFields will be
1109	// sent to the server regardless of whether the field is empty or not.
1110	// This may be used to include empty fields in Patch requests.
1111	ForceSendFields []string `json:"-"`
1112
1113	// NullFields is a list of field names (e.g. "ContactGroup") to include
1114	// in API requests with the JSON null value. By default, fields with
1115	// empty values are omitted from API requests. However, any field with
1116	// an empty value appearing in NullFields will be sent to the server as
1117	// null. It is an error if a field in this list has a non-empty value.
1118	// This may be used to include null fields in Patch requests.
1119	NullFields []string `json:"-"`
1120}
1121
1122func (s *CreateContactGroupRequest) MarshalJSON() ([]byte, error) {
1123	type NoMethod CreateContactGroupRequest
1124	raw := NoMethod(*s)
1125	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1126}
1127
1128// Date: Represents a whole or partial calendar date, such as a
1129// birthday. The time of day and time zone are either specified
1130// elsewhere or are insignificant. The date is relative to the Gregorian
1131// Calendar. This can represent one of the following: * A full date,
1132// with non-zero year, month, and day values * A month and day value,
1133// with a zero year, such as an anniversary * A year on its own, with
1134// zero month and day values * A year and month value, with a zero day,
1135// such as a credit card expiration date Related types are
1136// google.type.TimeOfDay and `google.protobuf.Timestamp`.
1137type Date struct {
1138	// Day: Day of a month. Must be from 1 to 31 and valid for the year and
1139	// month, or 0 to specify a year by itself or a year and month where the
1140	// day isn't significant.
1141	Day int64 `json:"day,omitempty"`
1142
1143	// Month: Month of a year. Must be from 1 to 12, or 0 to specify a year
1144	// without a month and day.
1145	Month int64 `json:"month,omitempty"`
1146
1147	// Year: Year of the date. Must be from 1 to 9999, or 0 to specify a
1148	// date without a year.
1149	Year int64 `json:"year,omitempty"`
1150
1151	// ForceSendFields is a list of field names (e.g. "Day") to
1152	// unconditionally include in API requests. By default, fields with
1153	// empty or default values are omitted from API requests. However, any
1154	// non-pointer, non-interface field appearing in ForceSendFields will be
1155	// sent to the server regardless of whether the field is empty or not.
1156	// This may be used to include empty fields in Patch requests.
1157	ForceSendFields []string `json:"-"`
1158
1159	// NullFields is a list of field names (e.g. "Day") to include in API
1160	// requests with the JSON null value. By default, fields with empty
1161	// values are omitted from API requests. However, any field with an
1162	// empty value appearing in NullFields will be sent to the server as
1163	// null. It is an error if a field in this list has a non-empty value.
1164	// This may be used to include null fields in Patch requests.
1165	NullFields []string `json:"-"`
1166}
1167
1168func (s *Date) MarshalJSON() ([]byte, error) {
1169	type NoMethod Date
1170	raw := NoMethod(*s)
1171	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1172}
1173
1174// DeleteContactPhotoResponse: The response for deleting a contact's
1175// photo.
1176type DeleteContactPhotoResponse struct {
1177	// Person: The updated person, if person_fields is set in the
1178	// DeleteContactPhotoRequest; otherwise this will be unset.
1179	Person *Person `json:"person,omitempty"`
1180
1181	// ServerResponse contains the HTTP response code and headers from the
1182	// server.
1183	googleapi.ServerResponse `json:"-"`
1184
1185	// ForceSendFields is a list of field names (e.g. "Person") to
1186	// unconditionally include in API requests. By default, fields with
1187	// empty or default values are omitted from API requests. However, any
1188	// non-pointer, non-interface field appearing in ForceSendFields will be
1189	// sent to the server regardless of whether the field is empty or not.
1190	// This may be used to include empty fields in Patch requests.
1191	ForceSendFields []string `json:"-"`
1192
1193	// NullFields is a list of field names (e.g. "Person") to include in API
1194	// requests with the JSON null value. By default, fields with empty
1195	// values are omitted from API requests. However, any field with an
1196	// empty value appearing in NullFields will be sent to the server as
1197	// null. It is an error if a field in this list has a non-empty value.
1198	// This may be used to include null fields in Patch requests.
1199	NullFields []string `json:"-"`
1200}
1201
1202func (s *DeleteContactPhotoResponse) MarshalJSON() ([]byte, error) {
1203	type NoMethod DeleteContactPhotoResponse
1204	raw := NoMethod(*s)
1205	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1206}
1207
1208// DomainMembership: A Google Workspace Domain membership.
1209type DomainMembership struct {
1210	// InViewerDomain: True if the person is in the viewer's Google
1211	// Workspace domain.
1212	InViewerDomain bool `json:"inViewerDomain,omitempty"`
1213
1214	// ForceSendFields is a list of field names (e.g. "InViewerDomain") to
1215	// unconditionally include in API requests. By default, fields with
1216	// empty or default values are omitted from API requests. However, any
1217	// non-pointer, non-interface field appearing in ForceSendFields will be
1218	// sent to the server regardless of whether the field is empty or not.
1219	// This may be used to include empty fields in Patch requests.
1220	ForceSendFields []string `json:"-"`
1221
1222	// NullFields is a list of field names (e.g. "InViewerDomain") to
1223	// include in API requests with the JSON null value. By default, fields
1224	// with empty values are omitted from API requests. However, any field
1225	// with an empty value appearing in NullFields will be sent to the
1226	// server as null. It is an error if a field in this list has a
1227	// non-empty value. This may be used to include null fields in Patch
1228	// requests.
1229	NullFields []string `json:"-"`
1230}
1231
1232func (s *DomainMembership) MarshalJSON() ([]byte, error) {
1233	type NoMethod DomainMembership
1234	raw := NoMethod(*s)
1235	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1236}
1237
1238// EmailAddress: A person's email address.
1239type EmailAddress struct {
1240	// DisplayName: The display name of the email.
1241	DisplayName string `json:"displayName,omitempty"`
1242
1243	// FormattedType: Output only. The type of the email address translated
1244	// and formatted in the viewer's account locale or the `Accept-Language`
1245	// HTTP header locale.
1246	FormattedType string `json:"formattedType,omitempty"`
1247
1248	// Metadata: Metadata about the email address.
1249	Metadata *FieldMetadata `json:"metadata,omitempty"`
1250
1251	// Type: The type of the email address. The type can be custom or one of
1252	// these predefined values: * `home` * `work` * `other`
1253	Type string `json:"type,omitempty"`
1254
1255	// Value: The email address.
1256	Value string `json:"value,omitempty"`
1257
1258	// ForceSendFields is a list of field names (e.g. "DisplayName") to
1259	// unconditionally include in API requests. By default, fields with
1260	// empty or default values are omitted from API requests. However, any
1261	// non-pointer, non-interface field appearing in ForceSendFields will be
1262	// sent to the server regardless of whether the field is empty or not.
1263	// This may be used to include empty fields in Patch requests.
1264	ForceSendFields []string `json:"-"`
1265
1266	// NullFields is a list of field names (e.g. "DisplayName") to include
1267	// in API requests with the JSON null value. By default, fields with
1268	// empty values are omitted from API requests. However, any field with
1269	// an empty value appearing in NullFields will be sent to the server as
1270	// null. It is an error if a field in this list has a non-empty value.
1271	// This may be used to include null fields in Patch requests.
1272	NullFields []string `json:"-"`
1273}
1274
1275func (s *EmailAddress) MarshalJSON() ([]byte, error) {
1276	type NoMethod EmailAddress
1277	raw := NoMethod(*s)
1278	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1279}
1280
1281// Empty: A generic empty message that you can re-use to avoid defining
1282// duplicated empty messages in your APIs. A typical example is to use
1283// it as the request or the response type of an API method. For
1284// instance: service Foo { rpc Bar(google.protobuf.Empty) returns
1285// (google.protobuf.Empty); } The JSON representation for `Empty` is
1286// empty JSON object `{}`.
1287type Empty struct {
1288	// ServerResponse contains the HTTP response code and headers from the
1289	// server.
1290	googleapi.ServerResponse `json:"-"`
1291}
1292
1293// Event: An event related to the person.
1294type Event struct {
1295	// Date: The date of the event.
1296	Date *Date `json:"date,omitempty"`
1297
1298	// FormattedType: Output only. The type of the event translated and
1299	// formatted in the viewer's account locale or the `Accept-Language`
1300	// HTTP header locale.
1301	FormattedType string `json:"formattedType,omitempty"`
1302
1303	// Metadata: Metadata about the event.
1304	Metadata *FieldMetadata `json:"metadata,omitempty"`
1305
1306	// Type: The type of the event. The type can be custom or one of these
1307	// predefined values: * `anniversary` * `other`
1308	Type string `json:"type,omitempty"`
1309
1310	// ForceSendFields is a list of field names (e.g. "Date") to
1311	// unconditionally include in API requests. By default, fields with
1312	// empty or default values are omitted from API requests. However, any
1313	// non-pointer, non-interface field appearing in ForceSendFields will be
1314	// sent to the server regardless of whether the field is empty or not.
1315	// This may be used to include empty fields in Patch requests.
1316	ForceSendFields []string `json:"-"`
1317
1318	// NullFields is a list of field names (e.g. "Date") to include in API
1319	// requests with the JSON null value. By default, fields with empty
1320	// values are omitted from API requests. However, any field with an
1321	// empty value appearing in NullFields will be sent to the server as
1322	// null. It is an error if a field in this list has a non-empty value.
1323	// This may be used to include null fields in Patch requests.
1324	NullFields []string `json:"-"`
1325}
1326
1327func (s *Event) MarshalJSON() ([]byte, error) {
1328	type NoMethod Event
1329	raw := NoMethod(*s)
1330	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1331}
1332
1333// ExternalId: An identifier from an external entity related to the
1334// person.
1335type ExternalId struct {
1336	// FormattedType: Output only. The type of the event translated and
1337	// formatted in the viewer's account locale or the `Accept-Language`
1338	// HTTP header locale.
1339	FormattedType string `json:"formattedType,omitempty"`
1340
1341	// Metadata: Metadata about the external ID.
1342	Metadata *FieldMetadata `json:"metadata,omitempty"`
1343
1344	// Type: The type of the external ID. The type can be custom or one of
1345	// these predefined values: * `account` * `customer` * `loginId` *
1346	// `network` * `organization`
1347	Type string `json:"type,omitempty"`
1348
1349	// Value: The value of the external ID.
1350	Value string `json:"value,omitempty"`
1351
1352	// ForceSendFields is a list of field names (e.g. "FormattedType") to
1353	// unconditionally include in API requests. By default, fields with
1354	// empty or default values are omitted from API requests. However, any
1355	// non-pointer, non-interface field appearing in ForceSendFields will be
1356	// sent to the server regardless of whether the field is empty or not.
1357	// This may be used to include empty fields in Patch requests.
1358	ForceSendFields []string `json:"-"`
1359
1360	// NullFields is a list of field names (e.g. "FormattedType") to include
1361	// in API requests with the JSON null value. By default, fields with
1362	// empty values are omitted from API requests. However, any field with
1363	// an empty value appearing in NullFields will be sent to the server as
1364	// null. It is an error if a field in this list has a non-empty value.
1365	// This may be used to include null fields in Patch requests.
1366	NullFields []string `json:"-"`
1367}
1368
1369func (s *ExternalId) MarshalJSON() ([]byte, error) {
1370	type NoMethod ExternalId
1371	raw := NoMethod(*s)
1372	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1373}
1374
1375// FieldMetadata: Metadata about a field.
1376type FieldMetadata struct {
1377	// Primary: Output only. True if the field is the primary field for all
1378	// sources in the person. Each person will have at most one field with
1379	// `primary` set to true.
1380	Primary bool `json:"primary,omitempty"`
1381
1382	// Source: The source of the field.
1383	Source *Source `json:"source,omitempty"`
1384
1385	// SourcePrimary: True if the field is the primary field for the source.
1386	// Each source must have at most one field with `source_primary` set to
1387	// true.
1388	SourcePrimary bool `json:"sourcePrimary,omitempty"`
1389
1390	// Verified: Output only. True if the field is verified; false if the
1391	// field is unverified. A verified field is typically a name, email
1392	// address, phone number, or website that has been confirmed to be owned
1393	// by the person.
1394	Verified bool `json:"verified,omitempty"`
1395
1396	// ForceSendFields is a list of field names (e.g. "Primary") to
1397	// unconditionally include in API requests. By default, fields with
1398	// empty or default values are omitted from API requests. However, any
1399	// non-pointer, non-interface field appearing in ForceSendFields will be
1400	// sent to the server regardless of whether the field is empty or not.
1401	// This may be used to include empty fields in Patch requests.
1402	ForceSendFields []string `json:"-"`
1403
1404	// NullFields is a list of field names (e.g. "Primary") to include in
1405	// API requests with the JSON null value. By default, fields with empty
1406	// values are omitted from API requests. However, any field with an
1407	// empty value appearing in NullFields will be sent to the server as
1408	// null. It is an error if a field in this list has a non-empty value.
1409	// This may be used to include null fields in Patch requests.
1410	NullFields []string `json:"-"`
1411}
1412
1413func (s *FieldMetadata) MarshalJSON() ([]byte, error) {
1414	type NoMethod FieldMetadata
1415	raw := NoMethod(*s)
1416	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1417}
1418
1419// FileAs: The name that should be used to sort the person in a list.
1420type FileAs struct {
1421	// Metadata: Metadata about the file-as.
1422	Metadata *FieldMetadata `json:"metadata,omitempty"`
1423
1424	// Value: The file-as value
1425	Value string `json:"value,omitempty"`
1426
1427	// ForceSendFields is a list of field names (e.g. "Metadata") to
1428	// unconditionally include in API requests. By default, fields with
1429	// empty or default values are omitted from API requests. However, any
1430	// non-pointer, non-interface field appearing in ForceSendFields will be
1431	// sent to the server regardless of whether the field is empty or not.
1432	// This may be used to include empty fields in Patch requests.
1433	ForceSendFields []string `json:"-"`
1434
1435	// NullFields is a list of field names (e.g. "Metadata") to include in
1436	// API requests with the JSON null value. By default, fields with empty
1437	// values are omitted from API requests. However, any field with an
1438	// empty value appearing in NullFields will be sent to the server as
1439	// null. It is an error if a field in this list has a non-empty value.
1440	// This may be used to include null fields in Patch requests.
1441	NullFields []string `json:"-"`
1442}
1443
1444func (s *FileAs) MarshalJSON() ([]byte, error) {
1445	type NoMethod FileAs
1446	raw := NoMethod(*s)
1447	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1448}
1449
1450// Gender: A person's gender.
1451type Gender struct {
1452	// AddressMeAs: Free form text field for pronouns that should be used to
1453	// address the person. Common values are: * `he`/`him` * `she`/`her` *
1454	// `they`/`them`
1455	AddressMeAs string `json:"addressMeAs,omitempty"`
1456
1457	// FormattedValue: Output only. The value of the gender translated and
1458	// formatted in the viewer's account locale or the `Accept-Language`
1459	// HTTP header locale. Unspecified or custom value are not localized.
1460	FormattedValue string `json:"formattedValue,omitempty"`
1461
1462	// Metadata: Metadata about the gender.
1463	Metadata *FieldMetadata `json:"metadata,omitempty"`
1464
1465	// Value: The gender for the person. The gender can be custom or one of
1466	// these predefined values: * `male` * `female` * `unspecified`
1467	Value string `json:"value,omitempty"`
1468
1469	// ForceSendFields is a list of field names (e.g. "AddressMeAs") to
1470	// unconditionally include in API requests. By default, fields with
1471	// empty or default values are omitted from API requests. However, any
1472	// non-pointer, non-interface field appearing in ForceSendFields will be
1473	// sent to the server regardless of whether the field is empty or not.
1474	// This may be used to include empty fields in Patch requests.
1475	ForceSendFields []string `json:"-"`
1476
1477	// NullFields is a list of field names (e.g. "AddressMeAs") to include
1478	// in API requests with the JSON null value. By default, fields with
1479	// empty values are omitted from API requests. However, any field with
1480	// an empty value appearing in NullFields will be sent to the server as
1481	// null. It is an error if a field in this list has a non-empty value.
1482	// This may be used to include null fields in Patch requests.
1483	NullFields []string `json:"-"`
1484}
1485
1486func (s *Gender) MarshalJSON() ([]byte, error) {
1487	type NoMethod Gender
1488	raw := NoMethod(*s)
1489	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1490}
1491
1492// GetPeopleResponse: The response to a get request for a list of people
1493// by resource name.
1494type GetPeopleResponse struct {
1495	// Responses: The response for each requested resource name.
1496	Responses []*PersonResponse `json:"responses,omitempty"`
1497
1498	// ServerResponse contains the HTTP response code and headers from the
1499	// server.
1500	googleapi.ServerResponse `json:"-"`
1501
1502	// ForceSendFields is a list of field names (e.g. "Responses") to
1503	// unconditionally include in API requests. By default, fields with
1504	// empty or default values are omitted from API requests. However, any
1505	// non-pointer, non-interface field appearing in ForceSendFields will be
1506	// sent to the server regardless of whether the field is empty or not.
1507	// This may be used to include empty fields in Patch requests.
1508	ForceSendFields []string `json:"-"`
1509
1510	// NullFields is a list of field names (e.g. "Responses") to include in
1511	// API requests with the JSON null value. By default, fields with empty
1512	// values are omitted from API requests. However, any field with an
1513	// empty value appearing in NullFields will be sent to the server as
1514	// null. It is an error if a field in this list has a non-empty value.
1515	// This may be used to include null fields in Patch requests.
1516	NullFields []string `json:"-"`
1517}
1518
1519func (s *GetPeopleResponse) MarshalJSON() ([]byte, error) {
1520	type NoMethod GetPeopleResponse
1521	raw := NoMethod(*s)
1522	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1523}
1524
1525// GroupClientData: Arbitrary client data that is populated by clients.
1526// Duplicate keys and values are allowed.
1527type GroupClientData struct {
1528	// Key: The client specified key of the client data.
1529	Key string `json:"key,omitempty"`
1530
1531	// Value: The client specified value of the client data.
1532	Value string `json:"value,omitempty"`
1533
1534	// ForceSendFields is a list of field names (e.g. "Key") to
1535	// unconditionally include in API requests. By default, fields with
1536	// empty or default values are omitted from API requests. However, any
1537	// non-pointer, non-interface field appearing in ForceSendFields will be
1538	// sent to the server regardless of whether the field is empty or not.
1539	// This may be used to include empty fields in Patch requests.
1540	ForceSendFields []string `json:"-"`
1541
1542	// NullFields is a list of field names (e.g. "Key") to include in API
1543	// requests with the JSON null value. By default, fields with empty
1544	// values are omitted from API requests. However, any field with an
1545	// empty value appearing in NullFields will be sent to the server as
1546	// null. It is an error if a field in this list has a non-empty value.
1547	// This may be used to include null fields in Patch requests.
1548	NullFields []string `json:"-"`
1549}
1550
1551func (s *GroupClientData) MarshalJSON() ([]byte, error) {
1552	type NoMethod GroupClientData
1553	raw := NoMethod(*s)
1554	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1555}
1556
1557// ImClient: A person's instant messaging client.
1558type ImClient struct {
1559	// FormattedProtocol: Output only. The protocol of the IM client
1560	// formatted in the viewer's account locale or the `Accept-Language`
1561	// HTTP header locale.
1562	FormattedProtocol string `json:"formattedProtocol,omitempty"`
1563
1564	// FormattedType: Output only. The type of the IM client translated and
1565	// formatted in the viewer's account locale or the `Accept-Language`
1566	// HTTP header locale.
1567	FormattedType string `json:"formattedType,omitempty"`
1568
1569	// Metadata: Metadata about the IM client.
1570	Metadata *FieldMetadata `json:"metadata,omitempty"`
1571
1572	// Protocol: The protocol of the IM client. The protocol can be custom
1573	// or one of these predefined values: * `aim` * `msn` * `yahoo` *
1574	// `skype` * `qq` * `googleTalk` * `icq` * `jabber` * `netMeeting`
1575	Protocol string `json:"protocol,omitempty"`
1576
1577	// Type: The type of the IM client. The type can be custom or one of
1578	// these predefined values: * `home` * `work` * `other`
1579	Type string `json:"type,omitempty"`
1580
1581	// Username: The user name used in the IM client.
1582	Username string `json:"username,omitempty"`
1583
1584	// ForceSendFields is a list of field names (e.g. "FormattedProtocol")
1585	// to unconditionally include in API requests. By default, fields with
1586	// empty or default values are omitted from API requests. However, any
1587	// non-pointer, non-interface field appearing in ForceSendFields will be
1588	// sent to the server regardless of whether the field is empty or not.
1589	// This may be used to include empty fields in Patch requests.
1590	ForceSendFields []string `json:"-"`
1591
1592	// NullFields is a list of field names (e.g. "FormattedProtocol") to
1593	// include in API requests with the JSON null value. By default, fields
1594	// with empty values are omitted from API requests. However, any field
1595	// with an empty value appearing in NullFields will be sent to the
1596	// server as null. It is an error if a field in this list has a
1597	// non-empty value. This may be used to include null fields in Patch
1598	// requests.
1599	NullFields []string `json:"-"`
1600}
1601
1602func (s *ImClient) MarshalJSON() ([]byte, error) {
1603	type NoMethod ImClient
1604	raw := NoMethod(*s)
1605	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1606}
1607
1608// Interest: One of the person's interests.
1609type Interest struct {
1610	// Metadata: Metadata about the interest.
1611	Metadata *FieldMetadata `json:"metadata,omitempty"`
1612
1613	// Value: The interest; for example, `stargazing`.
1614	Value string `json:"value,omitempty"`
1615
1616	// ForceSendFields is a list of field names (e.g. "Metadata") to
1617	// unconditionally include in API requests. By default, fields with
1618	// empty or default values are omitted from API requests. However, any
1619	// non-pointer, non-interface field appearing in ForceSendFields will be
1620	// sent to the server regardless of whether the field is empty or not.
1621	// This may be used to include empty fields in Patch requests.
1622	ForceSendFields []string `json:"-"`
1623
1624	// NullFields is a list of field names (e.g. "Metadata") to include in
1625	// API requests with the JSON null value. By default, fields with empty
1626	// values are omitted from API requests. However, any field with an
1627	// empty value appearing in NullFields will be sent to the server as
1628	// null. It is an error if a field in this list has a non-empty value.
1629	// This may be used to include null fields in Patch requests.
1630	NullFields []string `json:"-"`
1631}
1632
1633func (s *Interest) MarshalJSON() ([]byte, error) {
1634	type NoMethod Interest
1635	raw := NoMethod(*s)
1636	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1637}
1638
1639// ListConnectionsResponse: The response to a request for the
1640// authenticated user's connections.
1641type ListConnectionsResponse struct {
1642	// Connections: The list of people that the requestor is connected to.
1643	Connections []*Person `json:"connections,omitempty"`
1644
1645	// NextPageToken: A token, which can be sent as `page_token` to retrieve
1646	// the next page. If this field is omitted, there are no subsequent
1647	// pages.
1648	NextPageToken string `json:"nextPageToken,omitempty"`
1649
1650	// NextSyncToken: A token, which can be sent as `sync_token` to retrieve
1651	// changes since the last request. Request must set `request_sync_token`
1652	// to return the sync token. When the response is paginated, only the
1653	// last page will contain `nextSyncToken`.
1654	NextSyncToken string `json:"nextSyncToken,omitempty"`
1655
1656	// TotalItems: The total number of items in the list without pagination.
1657	TotalItems int64 `json:"totalItems,omitempty"`
1658
1659	// TotalPeople: **DEPRECATED** (Please use totalItems) The total number
1660	// of people in the list without pagination.
1661	TotalPeople int64 `json:"totalPeople,omitempty"`
1662
1663	// ServerResponse contains the HTTP response code and headers from the
1664	// server.
1665	googleapi.ServerResponse `json:"-"`
1666
1667	// ForceSendFields is a list of field names (e.g. "Connections") to
1668	// unconditionally include in API requests. By default, fields with
1669	// empty or default values are omitted from API requests. However, any
1670	// non-pointer, non-interface field appearing in ForceSendFields will be
1671	// sent to the server regardless of whether the field is empty or not.
1672	// This may be used to include empty fields in Patch requests.
1673	ForceSendFields []string `json:"-"`
1674
1675	// NullFields is a list of field names (e.g. "Connections") to include
1676	// in API requests with the JSON null value. By default, fields with
1677	// empty values are omitted from API requests. However, any field with
1678	// an empty value appearing in NullFields will be sent to the server as
1679	// null. It is an error if a field in this list has a non-empty value.
1680	// This may be used to include null fields in Patch requests.
1681	NullFields []string `json:"-"`
1682}
1683
1684func (s *ListConnectionsResponse) MarshalJSON() ([]byte, error) {
1685	type NoMethod ListConnectionsResponse
1686	raw := NoMethod(*s)
1687	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1688}
1689
1690// ListContactGroupsResponse: The response to a list contact groups
1691// request.
1692type ListContactGroupsResponse struct {
1693	// ContactGroups: The list of contact groups. Members of the contact
1694	// groups are not populated.
1695	ContactGroups []*ContactGroup `json:"contactGroups,omitempty"`
1696
1697	// NextPageToken: The token that can be used to retrieve the next page
1698	// of results.
1699	NextPageToken string `json:"nextPageToken,omitempty"`
1700
1701	// NextSyncToken: The token that can be used to retrieve changes since
1702	// the last request.
1703	NextSyncToken string `json:"nextSyncToken,omitempty"`
1704
1705	// TotalItems: The total number of items in the list without pagination.
1706	TotalItems int64 `json:"totalItems,omitempty"`
1707
1708	// ServerResponse contains the HTTP response code and headers from the
1709	// server.
1710	googleapi.ServerResponse `json:"-"`
1711
1712	// ForceSendFields is a list of field names (e.g. "ContactGroups") to
1713	// unconditionally include in API requests. By default, fields with
1714	// empty or default values are omitted from API requests. However, any
1715	// non-pointer, non-interface field appearing in ForceSendFields will be
1716	// sent to the server regardless of whether the field is empty or not.
1717	// This may be used to include empty fields in Patch requests.
1718	ForceSendFields []string `json:"-"`
1719
1720	// NullFields is a list of field names (e.g. "ContactGroups") to include
1721	// in API requests with the JSON null value. By default, fields with
1722	// empty values are omitted from API requests. However, any field with
1723	// an empty value appearing in NullFields will be sent to the server as
1724	// null. It is an error if a field in this list has a non-empty value.
1725	// This may be used to include null fields in Patch requests.
1726	NullFields []string `json:"-"`
1727}
1728
1729func (s *ListContactGroupsResponse) MarshalJSON() ([]byte, error) {
1730	type NoMethod ListContactGroupsResponse
1731	raw := NoMethod(*s)
1732	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1733}
1734
1735// ListDirectoryPeopleResponse: The response to a request for the
1736// authenticated user's domain directory.
1737type ListDirectoryPeopleResponse struct {
1738	// NextPageToken: A token, which can be sent as `page_token` to retrieve
1739	// the next page. If this field is omitted, there are no subsequent
1740	// pages.
1741	NextPageToken string `json:"nextPageToken,omitempty"`
1742
1743	// NextSyncToken: A token, which can be sent as `sync_token` to retrieve
1744	// changes since the last request. Request must set `request_sync_token`
1745	// to return the sync token.
1746	NextSyncToken string `json:"nextSyncToken,omitempty"`
1747
1748	// People: The list of people in the domain directory.
1749	People []*Person `json:"people,omitempty"`
1750
1751	// ServerResponse contains the HTTP response code and headers from the
1752	// server.
1753	googleapi.ServerResponse `json:"-"`
1754
1755	// ForceSendFields is a list of field names (e.g. "NextPageToken") to
1756	// unconditionally include in API requests. By default, fields with
1757	// empty or default values are omitted from API requests. However, any
1758	// non-pointer, non-interface field appearing in ForceSendFields will be
1759	// sent to the server regardless of whether the field is empty or not.
1760	// This may be used to include empty fields in Patch requests.
1761	ForceSendFields []string `json:"-"`
1762
1763	// NullFields is a list of field names (e.g. "NextPageToken") to include
1764	// in API requests with the JSON null value. By default, fields with
1765	// empty values are omitted from API requests. However, any field with
1766	// an empty value appearing in NullFields will be sent to the server as
1767	// null. It is an error if a field in this list has a non-empty value.
1768	// This may be used to include null fields in Patch requests.
1769	NullFields []string `json:"-"`
1770}
1771
1772func (s *ListDirectoryPeopleResponse) MarshalJSON() ([]byte, error) {
1773	type NoMethod ListDirectoryPeopleResponse
1774	raw := NoMethod(*s)
1775	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1776}
1777
1778// ListOtherContactsResponse: The response to a request for the
1779// authenticated user's "Other contacts".
1780type ListOtherContactsResponse struct {
1781	// NextPageToken: A token, which can be sent as `page_token` to retrieve
1782	// the next page. If this field is omitted, there are no subsequent
1783	// pages.
1784	NextPageToken string `json:"nextPageToken,omitempty"`
1785
1786	// NextSyncToken: A token, which can be sent as `sync_token` to retrieve
1787	// changes since the last request. Request must set `request_sync_token`
1788	// to return the sync token.
1789	NextSyncToken string `json:"nextSyncToken,omitempty"`
1790
1791	// OtherContacts: The list of "Other contacts" returned as Person
1792	// resources. "Other contacts" support a limited subset of fields. See
1793	// ListOtherContactsRequest.request_mask for more detailed information.
1794	OtherContacts []*Person `json:"otherContacts,omitempty"`
1795
1796	// TotalSize: The total number of other contacts in the list without
1797	// pagination.
1798	TotalSize int64 `json:"totalSize,omitempty"`
1799
1800	// ServerResponse contains the HTTP response code and headers from the
1801	// server.
1802	googleapi.ServerResponse `json:"-"`
1803
1804	// ForceSendFields is a list of field names (e.g. "NextPageToken") to
1805	// unconditionally include in API requests. By default, fields with
1806	// empty or default values are omitted from API requests. However, any
1807	// non-pointer, non-interface field appearing in ForceSendFields will be
1808	// sent to the server regardless of whether the field is empty or not.
1809	// This may be used to include empty fields in Patch requests.
1810	ForceSendFields []string `json:"-"`
1811
1812	// NullFields is a list of field names (e.g. "NextPageToken") to include
1813	// in API requests with the JSON null value. By default, fields with
1814	// empty values are omitted from API requests. However, any field with
1815	// an empty value appearing in NullFields will be sent to the server as
1816	// null. It is an error if a field in this list has a non-empty value.
1817	// This may be used to include null fields in Patch requests.
1818	NullFields []string `json:"-"`
1819}
1820
1821func (s *ListOtherContactsResponse) MarshalJSON() ([]byte, error) {
1822	type NoMethod ListOtherContactsResponse
1823	raw := NoMethod(*s)
1824	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1825}
1826
1827// Locale: A person's locale preference.
1828type Locale struct {
1829	// Metadata: Metadata about the locale.
1830	Metadata *FieldMetadata `json:"metadata,omitempty"`
1831
1832	// Value: The well-formed IETF BCP 47
1833	// (https://tools.ietf.org/html/bcp47) language tag representing the
1834	// locale.
1835	Value string `json:"value,omitempty"`
1836
1837	// ForceSendFields is a list of field names (e.g. "Metadata") to
1838	// unconditionally include in API requests. By default, fields with
1839	// empty or default values are omitted from API requests. However, any
1840	// non-pointer, non-interface field appearing in ForceSendFields will be
1841	// sent to the server regardless of whether the field is empty or not.
1842	// This may be used to include empty fields in Patch requests.
1843	ForceSendFields []string `json:"-"`
1844
1845	// NullFields is a list of field names (e.g. "Metadata") to include in
1846	// API requests with the JSON null value. By default, fields with empty
1847	// values are omitted from API requests. However, any field with an
1848	// empty value appearing in NullFields will be sent to the server as
1849	// null. It is an error if a field in this list has a non-empty value.
1850	// This may be used to include null fields in Patch requests.
1851	NullFields []string `json:"-"`
1852}
1853
1854func (s *Locale) MarshalJSON() ([]byte, error) {
1855	type NoMethod Locale
1856	raw := NoMethod(*s)
1857	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1858}
1859
1860// Location: A person's location.
1861type Location struct {
1862	// BuildingId: The building identifier.
1863	BuildingId string `json:"buildingId,omitempty"`
1864
1865	// Current: Whether the location is the current location.
1866	Current bool `json:"current,omitempty"`
1867
1868	// DeskCode: The individual desk location.
1869	DeskCode string `json:"deskCode,omitempty"`
1870
1871	// Floor: The floor name or number.
1872	Floor string `json:"floor,omitempty"`
1873
1874	// FloorSection: The floor section in `floor_name`.
1875	FloorSection string `json:"floorSection,omitempty"`
1876
1877	// Metadata: Metadata about the location.
1878	Metadata *FieldMetadata `json:"metadata,omitempty"`
1879
1880	// Type: The type of the location. The type can be custom or one of
1881	// these predefined values: * `desk` * `grewUp`
1882	Type string `json:"type,omitempty"`
1883
1884	// Value: The free-form value of the location.
1885	Value string `json:"value,omitempty"`
1886
1887	// ForceSendFields is a list of field names (e.g. "BuildingId") to
1888	// unconditionally include in API requests. By default, fields with
1889	// empty or default values are omitted from API requests. However, any
1890	// non-pointer, non-interface field appearing in ForceSendFields will be
1891	// sent to the server regardless of whether the field is empty or not.
1892	// This may be used to include empty fields in Patch requests.
1893	ForceSendFields []string `json:"-"`
1894
1895	// NullFields is a list of field names (e.g. "BuildingId") to include in
1896	// API requests with the JSON null value. By default, fields with empty
1897	// values are omitted from API requests. However, any field with an
1898	// empty value appearing in NullFields will be sent to the server as
1899	// null. It is an error if a field in this list has a non-empty value.
1900	// This may be used to include null fields in Patch requests.
1901	NullFields []string `json:"-"`
1902}
1903
1904func (s *Location) MarshalJSON() ([]byte, error) {
1905	type NoMethod Location
1906	raw := NoMethod(*s)
1907	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1908}
1909
1910// Membership: A person's membership in a group. Only contact group
1911// memberships can be modified.
1912type Membership struct {
1913	// ContactGroupMembership: The contact group membership.
1914	ContactGroupMembership *ContactGroupMembership `json:"contactGroupMembership,omitempty"`
1915
1916	// DomainMembership: Output only. The domain membership.
1917	DomainMembership *DomainMembership `json:"domainMembership,omitempty"`
1918
1919	// Metadata: Metadata about the membership.
1920	Metadata *FieldMetadata `json:"metadata,omitempty"`
1921
1922	// ForceSendFields is a list of field names (e.g.
1923	// "ContactGroupMembership") to unconditionally include in API requests.
1924	// By default, fields with empty or default values are omitted from API
1925	// requests. However, any non-pointer, non-interface field appearing in
1926	// ForceSendFields will be sent to the server regardless of whether the
1927	// field is empty or not. This may be used to include empty fields in
1928	// Patch requests.
1929	ForceSendFields []string `json:"-"`
1930
1931	// NullFields is a list of field names (e.g. "ContactGroupMembership")
1932	// to include in API requests with the JSON null value. By default,
1933	// fields with empty values are omitted from API requests. However, any
1934	// field with an empty value appearing in NullFields will be sent to the
1935	// server as null. It is an error if a field in this list has a
1936	// non-empty value. This may be used to include null fields in Patch
1937	// requests.
1938	NullFields []string `json:"-"`
1939}
1940
1941func (s *Membership) MarshalJSON() ([]byte, error) {
1942	type NoMethod Membership
1943	raw := NoMethod(*s)
1944	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1945}
1946
1947// MiscKeyword: A person's miscellaneous keyword.
1948type MiscKeyword struct {
1949	// FormattedType: Output only. The type of the miscellaneous keyword
1950	// translated and formatted in the viewer's account locale or the
1951	// `Accept-Language` HTTP header locale.
1952	FormattedType string `json:"formattedType,omitempty"`
1953
1954	// Metadata: Metadata about the miscellaneous keyword.
1955	Metadata *FieldMetadata `json:"metadata,omitempty"`
1956
1957	// Type: The miscellaneous keyword type.
1958	//
1959	// Possible values:
1960	//   "TYPE_UNSPECIFIED" - Unspecified.
1961	//   "OUTLOOK_BILLING_INFORMATION" - Outlook field for billing
1962	// information.
1963	//   "OUTLOOK_DIRECTORY_SERVER" - Outlook field for directory server.
1964	//   "OUTLOOK_KEYWORD" - Outlook field for keyword.
1965	//   "OUTLOOK_MILEAGE" - Outlook field for mileage.
1966	//   "OUTLOOK_PRIORITY" - Outlook field for priority.
1967	//   "OUTLOOK_SENSITIVITY" - Outlook field for sensitivity.
1968	//   "OUTLOOK_SUBJECT" - Outlook field for subject.
1969	//   "OUTLOOK_USER" - Outlook field for user.
1970	//   "HOME" - Home.
1971	//   "WORK" - Work.
1972	//   "OTHER" - Other.
1973	Type string `json:"type,omitempty"`
1974
1975	// Value: The value of the miscellaneous keyword.
1976	Value string `json:"value,omitempty"`
1977
1978	// ForceSendFields is a list of field names (e.g. "FormattedType") to
1979	// unconditionally include in API requests. By default, fields with
1980	// empty or default values are omitted from API requests. However, any
1981	// non-pointer, non-interface field appearing in ForceSendFields will be
1982	// sent to the server regardless of whether the field is empty or not.
1983	// This may be used to include empty fields in Patch requests.
1984	ForceSendFields []string `json:"-"`
1985
1986	// NullFields is a list of field names (e.g. "FormattedType") to include
1987	// in API requests with the JSON null value. By default, fields with
1988	// empty values are omitted from API requests. However, any field with
1989	// an empty value appearing in NullFields will be sent to the server as
1990	// null. It is an error if a field in this list has a non-empty value.
1991	// This may be used to include null fields in Patch requests.
1992	NullFields []string `json:"-"`
1993}
1994
1995func (s *MiscKeyword) MarshalJSON() ([]byte, error) {
1996	type NoMethod MiscKeyword
1997	raw := NoMethod(*s)
1998	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1999}
2000
2001// ModifyContactGroupMembersRequest: A request to modify an existing
2002// contact group's members. Contacts can be removed from any group but
2003// they can only be added to a user group or "myContacts" or "starred"
2004// system groups.
2005type ModifyContactGroupMembersRequest struct {
2006	// ResourceNamesToAdd: Optional. The resource names of the contact
2007	// people to add in the form of `people/{person_id}`. The total number
2008	// of resource names in `resource_names_to_add` and
2009	// `resource_names_to_remove` must be less than or equal to 1000.
2010	ResourceNamesToAdd []string `json:"resourceNamesToAdd,omitempty"`
2011
2012	// ResourceNamesToRemove: Optional. The resource names of the contact
2013	// people to remove in the form of `people/{person_id}`. The total
2014	// number of resource names in `resource_names_to_add` and
2015	// `resource_names_to_remove` must be less than or equal to 1000.
2016	ResourceNamesToRemove []string `json:"resourceNamesToRemove,omitempty"`
2017
2018	// ForceSendFields is a list of field names (e.g. "ResourceNamesToAdd")
2019	// to unconditionally include in API requests. By default, fields with
2020	// empty or default values are omitted from API requests. However, any
2021	// non-pointer, non-interface field appearing in ForceSendFields will be
2022	// sent to the server regardless of whether the field is empty or not.
2023	// This may be used to include empty fields in Patch requests.
2024	ForceSendFields []string `json:"-"`
2025
2026	// NullFields is a list of field names (e.g. "ResourceNamesToAdd") to
2027	// include in API requests with the JSON null value. By default, fields
2028	// with empty values are omitted from API requests. However, any field
2029	// with an empty value appearing in NullFields will be sent to the
2030	// server as null. It is an error if a field in this list has a
2031	// non-empty value. This may be used to include null fields in Patch
2032	// requests.
2033	NullFields []string `json:"-"`
2034}
2035
2036func (s *ModifyContactGroupMembersRequest) MarshalJSON() ([]byte, error) {
2037	type NoMethod ModifyContactGroupMembersRequest
2038	raw := NoMethod(*s)
2039	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
2040}
2041
2042// ModifyContactGroupMembersResponse: The response to a modify contact
2043// group members request.
2044type ModifyContactGroupMembersResponse struct {
2045	// CanNotRemoveLastContactGroupResourceNames: The contact people
2046	// resource names that cannot be removed from their last contact group.
2047	CanNotRemoveLastContactGroupResourceNames []string `json:"canNotRemoveLastContactGroupResourceNames,omitempty"`
2048
2049	// NotFoundResourceNames: The contact people resource names that were
2050	// not found.
2051	NotFoundResourceNames []string `json:"notFoundResourceNames,omitempty"`
2052
2053	// ServerResponse contains the HTTP response code and headers from the
2054	// server.
2055	googleapi.ServerResponse `json:"-"`
2056
2057	// ForceSendFields is a list of field names (e.g.
2058	// "CanNotRemoveLastContactGroupResourceNames") to unconditionally
2059	// include in API requests. By default, fields with empty or default
2060	// values are omitted from API requests. However, any non-pointer,
2061	// non-interface field appearing in ForceSendFields will be sent to the
2062	// server regardless of whether the field is empty or not. This may be
2063	// used to include empty fields in Patch requests.
2064	ForceSendFields []string `json:"-"`
2065
2066	// NullFields is a list of field names (e.g.
2067	// "CanNotRemoveLastContactGroupResourceNames") to include in API
2068	// requests with the JSON null value. By default, fields with empty
2069	// values are omitted from API requests. However, any field with an
2070	// empty value appearing in NullFields will be sent to the server as
2071	// null. It is an error if a field in this list has a non-empty value.
2072	// This may be used to include null fields in Patch requests.
2073	NullFields []string `json:"-"`
2074}
2075
2076func (s *ModifyContactGroupMembersResponse) MarshalJSON() ([]byte, error) {
2077	type NoMethod ModifyContactGroupMembersResponse
2078	raw := NoMethod(*s)
2079	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
2080}
2081
2082// Name: A person's name. If the name is a mononym, the family name is
2083// empty.
2084type Name struct {
2085	// DisplayName: Output only. The display name formatted according to the
2086	// locale specified by the viewer's account or the `Accept-Language`
2087	// HTTP header.
2088	DisplayName string `json:"displayName,omitempty"`
2089
2090	// DisplayNameLastFirst: Output only. The display name with the last
2091	// name first formatted according to the locale specified by the
2092	// viewer's account or the `Accept-Language` HTTP header.
2093	DisplayNameLastFirst string `json:"displayNameLastFirst,omitempty"`
2094
2095	// FamilyName: The family name.
2096	FamilyName string `json:"familyName,omitempty"`
2097
2098	// GivenName: The given name.
2099	GivenName string `json:"givenName,omitempty"`
2100
2101	// HonorificPrefix: The honorific prefixes, such as `Mrs.` or `Dr.`
2102	HonorificPrefix string `json:"honorificPrefix,omitempty"`
2103
2104	// HonorificSuffix: The honorific suffixes, such as `Jr.`
2105	HonorificSuffix string `json:"honorificSuffix,omitempty"`
2106
2107	// Metadata: Metadata about the name.
2108	Metadata *FieldMetadata `json:"metadata,omitempty"`
2109
2110	// MiddleName: The middle name(s).
2111	MiddleName string `json:"middleName,omitempty"`
2112
2113	// PhoneticFamilyName: The family name spelled as it sounds.
2114	PhoneticFamilyName string `json:"phoneticFamilyName,omitempty"`
2115
2116	// PhoneticFullName: The full name spelled as it sounds.
2117	PhoneticFullName string `json:"phoneticFullName,omitempty"`
2118
2119	// PhoneticGivenName: The given name spelled as it sounds.
2120	PhoneticGivenName string `json:"phoneticGivenName,omitempty"`
2121
2122	// PhoneticHonorificPrefix: The honorific prefixes spelled as they
2123	// sound.
2124	PhoneticHonorificPrefix string `json:"phoneticHonorificPrefix,omitempty"`
2125
2126	// PhoneticHonorificSuffix: The honorific suffixes spelled as they
2127	// sound.
2128	PhoneticHonorificSuffix string `json:"phoneticHonorificSuffix,omitempty"`
2129
2130	// PhoneticMiddleName: The middle name(s) spelled as they sound.
2131	PhoneticMiddleName string `json:"phoneticMiddleName,omitempty"`
2132
2133	// UnstructuredName: The free form name value.
2134	UnstructuredName string `json:"unstructuredName,omitempty"`
2135
2136	// ForceSendFields is a list of field names (e.g. "DisplayName") to
2137	// unconditionally include in API requests. By default, fields with
2138	// empty or default values are omitted from API requests. However, any
2139	// non-pointer, non-interface field appearing in ForceSendFields will be
2140	// sent to the server regardless of whether the field is empty or not.
2141	// This may be used to include empty fields in Patch requests.
2142	ForceSendFields []string `json:"-"`
2143
2144	// NullFields is a list of field names (e.g. "DisplayName") to include
2145	// in API requests with the JSON null value. By default, fields with
2146	// empty values are omitted from API requests. However, any field with
2147	// an empty value appearing in NullFields will be sent to the server as
2148	// null. It is an error if a field in this list has a non-empty value.
2149	// This may be used to include null fields in Patch requests.
2150	NullFields []string `json:"-"`
2151}
2152
2153func (s *Name) MarshalJSON() ([]byte, error) {
2154	type NoMethod Name
2155	raw := NoMethod(*s)
2156	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
2157}
2158
2159// Nickname: A person's nickname.
2160type Nickname struct {
2161	// Metadata: Metadata about the nickname.
2162	Metadata *FieldMetadata `json:"metadata,omitempty"`
2163
2164	// Type: The type of the nickname.
2165	//
2166	// Possible values:
2167	//   "DEFAULT" - Generic nickname.
2168	//   "MAIDEN_NAME" - Maiden name or birth family name. Used when the
2169	// person's family name has changed as a result of marriage.
2170	//   "INITIALS" - Initials.
2171	//   "GPLUS" - Google+ profile nickname.
2172	//   "OTHER_NAME" - A professional affiliation or other name; for
2173	// example, `Dr. Smith.`
2174	//   "ALTERNATE_NAME" - Alternate name person is known by.
2175	//   "SHORT_NAME" - A shorter version of the person's name.
2176	Type string `json:"type,omitempty"`
2177
2178	// Value: The nickname.
2179	Value string `json:"value,omitempty"`
2180
2181	// ForceSendFields is a list of field names (e.g. "Metadata") to
2182	// unconditionally include in API requests. By default, fields with
2183	// empty or default values are omitted from API requests. However, any
2184	// non-pointer, non-interface field appearing in ForceSendFields will be
2185	// sent to the server regardless of whether the field is empty or not.
2186	// This may be used to include empty fields in Patch requests.
2187	ForceSendFields []string `json:"-"`
2188
2189	// NullFields is a list of field names (e.g. "Metadata") to include in
2190	// API requests with the JSON null value. By default, fields with empty
2191	// values are omitted from API requests. However, any field with an
2192	// empty value appearing in NullFields will be sent to the server as
2193	// null. It is an error if a field in this list has a non-empty value.
2194	// This may be used to include null fields in Patch requests.
2195	NullFields []string `json:"-"`
2196}
2197
2198func (s *Nickname) MarshalJSON() ([]byte, error) {
2199	type NoMethod Nickname
2200	raw := NoMethod(*s)
2201	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
2202}
2203
2204// Occupation: A person's occupation.
2205type Occupation struct {
2206	// Metadata: Metadata about the occupation.
2207	Metadata *FieldMetadata `json:"metadata,omitempty"`
2208
2209	// Value: The occupation; for example, `carpenter`.
2210	Value string `json:"value,omitempty"`
2211
2212	// ForceSendFields is a list of field names (e.g. "Metadata") to
2213	// unconditionally include in API requests. By default, fields with
2214	// empty or default values are omitted from API requests. However, any
2215	// non-pointer, non-interface field appearing in ForceSendFields will be
2216	// sent to the server regardless of whether the field is empty or not.
2217	// This may be used to include empty fields in Patch requests.
2218	ForceSendFields []string `json:"-"`
2219
2220	// NullFields is a list of field names (e.g. "Metadata") to include in
2221	// API requests with the JSON null value. By default, fields with empty
2222	// values are omitted from API requests. However, any field with an
2223	// empty value appearing in NullFields will be sent to the server as
2224	// null. It is an error if a field in this list has a non-empty value.
2225	// This may be used to include null fields in Patch requests.
2226	NullFields []string `json:"-"`
2227}
2228
2229func (s *Occupation) MarshalJSON() ([]byte, error) {
2230	type NoMethod Occupation
2231	raw := NoMethod(*s)
2232	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
2233}
2234
2235// Organization: A person's past or current organization. Overlapping
2236// date ranges are permitted.
2237type Organization struct {
2238	// CostCenter: The person's cost center at the organization.
2239	CostCenter string `json:"costCenter,omitempty"`
2240
2241	// Current: True if the organization is the person's current
2242	// organization; false if the organization is a past organization.
2243	Current bool `json:"current,omitempty"`
2244
2245	// Department: The person's department at the organization.
2246	Department string `json:"department,omitempty"`
2247
2248	// Domain: The domain name associated with the organization; for
2249	// example, `google.com`.
2250	Domain string `json:"domain,omitempty"`
2251
2252	// EndDate: The end date when the person left the organization.
2253	EndDate *Date `json:"endDate,omitempty"`
2254
2255	// FormattedType: Output only. The type of the organization translated
2256	// and formatted in the viewer's account locale or the `Accept-Language`
2257	// HTTP header locale.
2258	FormattedType string `json:"formattedType,omitempty"`
2259
2260	// FullTimeEquivalentMillipercent: The person's full-time equivalent
2261	// millipercent within the organization (100000 = 100%).
2262	FullTimeEquivalentMillipercent int64 `json:"fullTimeEquivalentMillipercent,omitempty"`
2263
2264	// JobDescription: The person's job description at the organization.
2265	JobDescription string `json:"jobDescription,omitempty"`
2266
2267	// Location: The location of the organization office the person works
2268	// at.
2269	Location string `json:"location,omitempty"`
2270
2271	// Metadata: Metadata about the organization.
2272	Metadata *FieldMetadata `json:"metadata,omitempty"`
2273
2274	// Name: The name of the organization.
2275	Name string `json:"name,omitempty"`
2276
2277	// PhoneticName: The phonetic name of the organization.
2278	PhoneticName string `json:"phoneticName,omitempty"`
2279
2280	// StartDate: The start date when the person joined the organization.
2281	StartDate *Date `json:"startDate,omitempty"`
2282
2283	// Symbol: The symbol associated with the organization; for example, a
2284	// stock ticker symbol, abbreviation, or acronym.
2285	Symbol string `json:"symbol,omitempty"`
2286
2287	// Title: The person's job title at the organization.
2288	Title string `json:"title,omitempty"`
2289
2290	// Type: The type of the organization. The type can be custom or one of
2291	// these predefined values: * `work` * `school`
2292	Type string `json:"type,omitempty"`
2293
2294	// ForceSendFields is a list of field names (e.g. "CostCenter") to
2295	// unconditionally include in API requests. By default, fields with
2296	// empty or default values are omitted from API requests. However, any
2297	// non-pointer, non-interface field appearing in ForceSendFields will be
2298	// sent to the server regardless of whether the field is empty or not.
2299	// This may be used to include empty fields in Patch requests.
2300	ForceSendFields []string `json:"-"`
2301
2302	// NullFields is a list of field names (e.g. "CostCenter") to include in
2303	// API requests with the JSON null value. By default, fields with empty
2304	// values are omitted from API requests. However, any field with an
2305	// empty value appearing in NullFields will be sent to the server as
2306	// null. It is an error if a field in this list has a non-empty value.
2307	// This may be used to include null fields in Patch requests.
2308	NullFields []string `json:"-"`
2309}
2310
2311func (s *Organization) MarshalJSON() ([]byte, error) {
2312	type NoMethod Organization
2313	raw := NoMethod(*s)
2314	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
2315}
2316
2317// Person: Information about a person merged from various data sources
2318// such as the authenticated user's contacts and profile data. Most
2319// fields can have multiple items. The items in a field have no
2320// guaranteed order, but each non-empty field is guaranteed to have
2321// exactly one field with `metadata.primary` set to true.
2322type Person struct {
2323	// Addresses: The person's street addresses.
2324	Addresses []*Address `json:"addresses,omitempty"`
2325
2326	// AgeRange: Output only. **DEPRECATED** (Please use `person.ageRanges`
2327	// instead) The person's age range.
2328	//
2329	// Possible values:
2330	//   "AGE_RANGE_UNSPECIFIED" - Unspecified.
2331	//   "LESS_THAN_EIGHTEEN" - Younger than eighteen.
2332	//   "EIGHTEEN_TO_TWENTY" - Between eighteen and twenty.
2333	//   "TWENTY_ONE_OR_OLDER" - Twenty-one and older.
2334	AgeRange string `json:"ageRange,omitempty"`
2335
2336	// AgeRanges: Output only. The person's age ranges.
2337	AgeRanges []*AgeRangeType `json:"ageRanges,omitempty"`
2338
2339	// Biographies: The person's biographies. This field is a singleton for
2340	// contact sources.
2341	Biographies []*Biography `json:"biographies,omitempty"`
2342
2343	// Birthdays: The person's birthdays. This field is a singleton for
2344	// contact sources.
2345	Birthdays []*Birthday `json:"birthdays,omitempty"`
2346
2347	// BraggingRights: **DEPRECATED**: No data will be returned The person's
2348	// bragging rights.
2349	BraggingRights []*BraggingRights `json:"braggingRights,omitempty"`
2350
2351	// CalendarUrls: The person's calendar URLs.
2352	CalendarUrls []*CalendarUrl `json:"calendarUrls,omitempty"`
2353
2354	// ClientData: The person's client data.
2355	ClientData []*ClientData `json:"clientData,omitempty"`
2356
2357	// CoverPhotos: Output only. The person's cover photos.
2358	CoverPhotos []*CoverPhoto `json:"coverPhotos,omitempty"`
2359
2360	// EmailAddresses: The person's email addresses. For
2361	// `people.connections.list` and `otherContacts.list` the number of
2362	// email addresses is limited to 100. If a Person has more email
2363	// addresses the entire set can be obtained by calling GetPeople.
2364	EmailAddresses []*EmailAddress `json:"emailAddresses,omitempty"`
2365
2366	// Etag: The HTTP entity tag (https://en.wikipedia.org/wiki/HTTP_ETag)
2367	// of the resource. Used for web cache validation.
2368	Etag string `json:"etag,omitempty"`
2369
2370	// Events: The person's events.
2371	Events []*Event `json:"events,omitempty"`
2372
2373	// ExternalIds: The person's external IDs.
2374	ExternalIds []*ExternalId `json:"externalIds,omitempty"`
2375
2376	// FileAses: The person's file-ases.
2377	FileAses []*FileAs `json:"fileAses,omitempty"`
2378
2379	// Genders: The person's genders. This field is a singleton for contact
2380	// sources.
2381	Genders []*Gender `json:"genders,omitempty"`
2382
2383	// ImClients: The person's instant messaging clients.
2384	ImClients []*ImClient `json:"imClients,omitempty"`
2385
2386	// Interests: The person's interests.
2387	Interests []*Interest `json:"interests,omitempty"`
2388
2389	// Locales: The person's locale preferences.
2390	Locales []*Locale `json:"locales,omitempty"`
2391
2392	// Locations: The person's locations.
2393	Locations []*Location `json:"locations,omitempty"`
2394
2395	// Memberships: The person's group memberships.
2396	Memberships []*Membership `json:"memberships,omitempty"`
2397
2398	// Metadata: Output only. Metadata about the person.
2399	Metadata *PersonMetadata `json:"metadata,omitempty"`
2400
2401	// MiscKeywords: The person's miscellaneous keywords.
2402	MiscKeywords []*MiscKeyword `json:"miscKeywords,omitempty"`
2403
2404	// Names: The person's names. This field is a singleton for contact
2405	// sources.
2406	Names []*Name `json:"names,omitempty"`
2407
2408	// Nicknames: The person's nicknames.
2409	Nicknames []*Nickname `json:"nicknames,omitempty"`
2410
2411	// Occupations: The person's occupations.
2412	Occupations []*Occupation `json:"occupations,omitempty"`
2413
2414	// Organizations: The person's past or current organizations.
2415	Organizations []*Organization `json:"organizations,omitempty"`
2416
2417	// PhoneNumbers: The person's phone numbers. For
2418	// `people.connections.list` and `otherContacts.list` the number of
2419	// phone numbers is limited to 100. If a Person has more phone numbers
2420	// the entire set can be obtained by calling GetPeople.
2421	PhoneNumbers []*PhoneNumber `json:"phoneNumbers,omitempty"`
2422
2423	// Photos: Output only. The person's photos.
2424	Photos []*Photo `json:"photos,omitempty"`
2425
2426	// Relations: The person's relations.
2427	Relations []*Relation `json:"relations,omitempty"`
2428
2429	// RelationshipInterests: Output only. **DEPRECATED**: No data will be
2430	// returned The person's relationship interests.
2431	RelationshipInterests []*RelationshipInterest `json:"relationshipInterests,omitempty"`
2432
2433	// RelationshipStatuses: Output only. **DEPRECATED**: No data will be
2434	// returned The person's relationship statuses.
2435	RelationshipStatuses []*RelationshipStatus `json:"relationshipStatuses,omitempty"`
2436
2437	// Residences: **DEPRECATED**: (Please use `person.locations` instead)
2438	// The person's residences.
2439	Residences []*Residence `json:"residences,omitempty"`
2440
2441	// ResourceName: The resource name for the person, assigned by the
2442	// server. An ASCII string with a max length of 27 characters, in the
2443	// form of `people/{person_id}`.
2444	ResourceName string `json:"resourceName,omitempty"`
2445
2446	// SipAddresses: The person's SIP addresses.
2447	SipAddresses []*SipAddress `json:"sipAddresses,omitempty"`
2448
2449	// Skills: The person's skills.
2450	Skills []*Skill `json:"skills,omitempty"`
2451
2452	// Taglines: Output only. **DEPRECATED**: No data will be returned The
2453	// person's taglines.
2454	Taglines []*Tagline `json:"taglines,omitempty"`
2455
2456	// Urls: The person's associated URLs.
2457	Urls []*Url `json:"urls,omitempty"`
2458
2459	// UserDefined: The person's user defined data.
2460	UserDefined []*UserDefined `json:"userDefined,omitempty"`
2461
2462	// ServerResponse contains the HTTP response code and headers from the
2463	// server.
2464	googleapi.ServerResponse `json:"-"`
2465
2466	// ForceSendFields is a list of field names (e.g. "Addresses") to
2467	// unconditionally include in API requests. By default, fields with
2468	// empty or default values are omitted from API requests. However, any
2469	// non-pointer, non-interface field appearing in ForceSendFields will be
2470	// sent to the server regardless of whether the field is empty or not.
2471	// This may be used to include empty fields in Patch requests.
2472	ForceSendFields []string `json:"-"`
2473
2474	// NullFields is a list of field names (e.g. "Addresses") to include in
2475	// API requests with the JSON null value. By default, fields with empty
2476	// values are omitted from API requests. However, any field with an
2477	// empty value appearing in NullFields will be sent to the server as
2478	// null. It is an error if a field in this list has a non-empty value.
2479	// This may be used to include null fields in Patch requests.
2480	NullFields []string `json:"-"`
2481}
2482
2483func (s *Person) MarshalJSON() ([]byte, error) {
2484	type NoMethod Person
2485	raw := NoMethod(*s)
2486	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
2487}
2488
2489// PersonMetadata: The metadata about a person.
2490type PersonMetadata struct {
2491	// Deleted: Output only. True if the person resource has been deleted.
2492	// Populated only for `people.connections.list` and `otherContacts.list`
2493	// sync requests.
2494	Deleted bool `json:"deleted,omitempty"`
2495
2496	// LinkedPeopleResourceNames: Output only. Resource names of people
2497	// linked to this resource.
2498	LinkedPeopleResourceNames []string `json:"linkedPeopleResourceNames,omitempty"`
2499
2500	// ObjectType: Output only. **DEPRECATED** (Please use
2501	// `person.metadata.sources.profileMetadata.objectType` instead) The
2502	// type of the person object.
2503	//
2504	// Possible values:
2505	//   "OBJECT_TYPE_UNSPECIFIED" - Unspecified.
2506	//   "PERSON" - Person.
2507	//   "PAGE" - [Currents
2508	// Page.](https://workspace.google.com/products/currents/)
2509	ObjectType string `json:"objectType,omitempty"`
2510
2511	// PreviousResourceNames: Output only. Any former resource names this
2512	// person has had. Populated only for `people.connections.list` requests
2513	// that include a sync token. The resource name may change when adding
2514	// or removing fields that link a contact and profile such as a verified
2515	// email, verified phone number, or profile URL.
2516	PreviousResourceNames []string `json:"previousResourceNames,omitempty"`
2517
2518	// Sources: The sources of data for the person.
2519	Sources []*Source `json:"sources,omitempty"`
2520
2521	// ForceSendFields is a list of field names (e.g. "Deleted") to
2522	// unconditionally include in API requests. By default, fields with
2523	// empty or default values are omitted from API requests. However, any
2524	// non-pointer, non-interface field appearing in ForceSendFields will be
2525	// sent to the server regardless of whether the field is empty or not.
2526	// This may be used to include empty fields in Patch requests.
2527	ForceSendFields []string `json:"-"`
2528
2529	// NullFields is a list of field names (e.g. "Deleted") to include in
2530	// API requests with the JSON null value. By default, fields with empty
2531	// values are omitted from API requests. However, any field with an
2532	// empty value appearing in NullFields will be sent to the server as
2533	// null. It is an error if a field in this list has a non-empty value.
2534	// This may be used to include null fields in Patch requests.
2535	NullFields []string `json:"-"`
2536}
2537
2538func (s *PersonMetadata) MarshalJSON() ([]byte, error) {
2539	type NoMethod PersonMetadata
2540	raw := NoMethod(*s)
2541	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
2542}
2543
2544// PersonResponse: The response for a single person
2545type PersonResponse struct {
2546	// HttpStatusCode: **DEPRECATED** (Please use status instead) [HTTP 1.1
2547	// status code]
2548	// (http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html).
2549	HttpStatusCode int64 `json:"httpStatusCode,omitempty"`
2550
2551	// Person: The person.
2552	Person *Person `json:"person,omitempty"`
2553
2554	// RequestedResourceName: The original requested resource name. May be
2555	// different than the resource name on the returned person. The resource
2556	// name can change when adding or removing fields that link a contact
2557	// and profile such as a verified email, verified phone number, or a
2558	// profile URL.
2559	RequestedResourceName string `json:"requestedResourceName,omitempty"`
2560
2561	// Status: The status of the response.
2562	Status *Status `json:"status,omitempty"`
2563
2564	// ForceSendFields is a list of field names (e.g. "HttpStatusCode") to
2565	// unconditionally include in API requests. By default, fields with
2566	// empty or default values are omitted from API requests. However, any
2567	// non-pointer, non-interface field appearing in ForceSendFields will be
2568	// sent to the server regardless of whether the field is empty or not.
2569	// This may be used to include empty fields in Patch requests.
2570	ForceSendFields []string `json:"-"`
2571
2572	// NullFields is a list of field names (e.g. "HttpStatusCode") to
2573	// include in API requests with the JSON null value. By default, fields
2574	// with empty values are omitted from API requests. However, any field
2575	// with an empty value appearing in NullFields will be sent to the
2576	// server as null. It is an error if a field in this list has a
2577	// non-empty value. This may be used to include null fields in Patch
2578	// requests.
2579	NullFields []string `json:"-"`
2580}
2581
2582func (s *PersonResponse) MarshalJSON() ([]byte, error) {
2583	type NoMethod PersonResponse
2584	raw := NoMethod(*s)
2585	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
2586}
2587
2588// PhoneNumber: A person's phone number.
2589type PhoneNumber struct {
2590	// CanonicalForm: Output only. The canonicalized ITU-T E.164
2591	// (https://law.resource.org/pub/us/cfr/ibr/004/itu-t.E.164.1.2008.pdf)
2592	// form of the phone number.
2593	CanonicalForm string `json:"canonicalForm,omitempty"`
2594
2595	// FormattedType: Output only. The type of the phone number translated
2596	// and formatted in the viewer's account locale or the `Accept-Language`
2597	// HTTP header locale.
2598	FormattedType string `json:"formattedType,omitempty"`
2599
2600	// Metadata: Metadata about the phone number.
2601	Metadata *FieldMetadata `json:"metadata,omitempty"`
2602
2603	// Type: The type of the phone number. The type can be custom or one of
2604	// these predefined values: * `home` * `work` * `mobile` * `homeFax` *
2605	// `workFax` * `otherFax` * `pager` * `workMobile` * `workPager` *
2606	// `main` * `googleVoice` * `other`
2607	Type string `json:"type,omitempty"`
2608
2609	// Value: The phone number.
2610	Value string `json:"value,omitempty"`
2611
2612	// ForceSendFields is a list of field names (e.g. "CanonicalForm") to
2613	// unconditionally include in API requests. By default, fields with
2614	// empty or default values are omitted from API requests. However, any
2615	// non-pointer, non-interface field appearing in ForceSendFields will be
2616	// sent to the server regardless of whether the field is empty or not.
2617	// This may be used to include empty fields in Patch requests.
2618	ForceSendFields []string `json:"-"`
2619
2620	// NullFields is a list of field names (e.g. "CanonicalForm") to include
2621	// in API requests with the JSON null value. By default, fields with
2622	// empty values are omitted from API requests. However, any field with
2623	// an empty value appearing in NullFields will be sent to the server as
2624	// null. It is an error if a field in this list has a non-empty value.
2625	// This may be used to include null fields in Patch requests.
2626	NullFields []string `json:"-"`
2627}
2628
2629func (s *PhoneNumber) MarshalJSON() ([]byte, error) {
2630	type NoMethod PhoneNumber
2631	raw := NoMethod(*s)
2632	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
2633}
2634
2635// Photo: A person's photo. A picture shown next to the person's name to
2636// help others recognize the person.
2637type Photo struct {
2638	// Default: True if the photo is a default photo; false if the photo is
2639	// a user-provided photo.
2640	Default bool `json:"default,omitempty"`
2641
2642	// Metadata: Metadata about the photo.
2643	Metadata *FieldMetadata `json:"metadata,omitempty"`
2644
2645	// Url: The URL of the photo. You can change the desired size by
2646	// appending a query parameter `sz={size}` at the end of the url, where
2647	// {size} is the size in pixels. Example:
2648	// https://lh3.googleusercontent.com/-T_wVWLlmg7w/AAAAAAAAAAI/AAAAAAAABa8/00gzXvDBYqw/s100/photo.jpg?sz=50
2649	Url string `json:"url,omitempty"`
2650
2651	// ForceSendFields is a list of field names (e.g. "Default") to
2652	// unconditionally include in API requests. By default, fields with
2653	// empty or default values are omitted from API requests. However, any
2654	// non-pointer, non-interface field appearing in ForceSendFields will be
2655	// sent to the server regardless of whether the field is empty or not.
2656	// This may be used to include empty fields in Patch requests.
2657	ForceSendFields []string `json:"-"`
2658
2659	// NullFields is a list of field names (e.g. "Default") to include in
2660	// API requests with the JSON null value. By default, fields with empty
2661	// values are omitted from API requests. However, any field with an
2662	// empty value appearing in NullFields will be sent to the server as
2663	// null. It is an error if a field in this list has a non-empty value.
2664	// This may be used to include null fields in Patch requests.
2665	NullFields []string `json:"-"`
2666}
2667
2668func (s *Photo) MarshalJSON() ([]byte, error) {
2669	type NoMethod Photo
2670	raw := NoMethod(*s)
2671	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
2672}
2673
2674// ProfileMetadata: The metadata about a profile.
2675type ProfileMetadata struct {
2676	// ObjectType: Output only. The profile object type.
2677	//
2678	// Possible values:
2679	//   "OBJECT_TYPE_UNSPECIFIED" - Unspecified.
2680	//   "PERSON" - Person.
2681	//   "PAGE" - [Currents
2682	// Page.](https://workspace.google.com/products/currents/)
2683	ObjectType string `json:"objectType,omitempty"`
2684
2685	// UserTypes: Output only. The user types.
2686	//
2687	// Possible values:
2688	//   "USER_TYPE_UNKNOWN" - The user type is not known.
2689	//   "GOOGLE_USER" - The user is a Google user.
2690	//   "GPLUS_USER" - The user is a Currents user.
2691	//   "GOOGLE_APPS_USER" - The user is a Google Workspace user.
2692	UserTypes []string `json:"userTypes,omitempty"`
2693
2694	// ForceSendFields is a list of field names (e.g. "ObjectType") to
2695	// unconditionally include in API requests. By default, fields with
2696	// empty or default values are omitted from API requests. However, any
2697	// non-pointer, non-interface field appearing in ForceSendFields will be
2698	// sent to the server regardless of whether the field is empty or not.
2699	// This may be used to include empty fields in Patch requests.
2700	ForceSendFields []string `json:"-"`
2701
2702	// NullFields is a list of field names (e.g. "ObjectType") to include in
2703	// API requests with the JSON null value. By default, fields with empty
2704	// values are omitted from API requests. However, any field with an
2705	// empty value appearing in NullFields will be sent to the server as
2706	// null. It is an error if a field in this list has a non-empty value.
2707	// This may be used to include null fields in Patch requests.
2708	NullFields []string `json:"-"`
2709}
2710
2711func (s *ProfileMetadata) MarshalJSON() ([]byte, error) {
2712	type NoMethod ProfileMetadata
2713	raw := NoMethod(*s)
2714	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
2715}
2716
2717// Relation: A person's relation to another person.
2718type Relation struct {
2719	// FormattedType: Output only. The type of the relation translated and
2720	// formatted in the viewer's account locale or the locale specified in
2721	// the Accept-Language HTTP header.
2722	FormattedType string `json:"formattedType,omitempty"`
2723
2724	// Metadata: Metadata about the relation.
2725	Metadata *FieldMetadata `json:"metadata,omitempty"`
2726
2727	// Person: The name of the other person this relation refers to.
2728	Person string `json:"person,omitempty"`
2729
2730	// Type: The person's relation to the other person. The type can be
2731	// custom or one of these predefined values: * `spouse` * `child` *
2732	// `mother` * `father` * `parent` * `brother` * `sister` * `friend` *
2733	// `relative` * `domesticPartner` * `manager` * `assistant` *
2734	// `referredBy` * `partner`
2735	Type string `json:"type,omitempty"`
2736
2737	// ForceSendFields is a list of field names (e.g. "FormattedType") to
2738	// unconditionally include in API requests. By default, fields with
2739	// empty or default values are omitted from API requests. However, any
2740	// non-pointer, non-interface field appearing in ForceSendFields will be
2741	// sent to the server regardless of whether the field is empty or not.
2742	// This may be used to include empty fields in Patch requests.
2743	ForceSendFields []string `json:"-"`
2744
2745	// NullFields is a list of field names (e.g. "FormattedType") to include
2746	// in API requests with the JSON null value. By default, fields with
2747	// empty values are omitted from API requests. However, any field with
2748	// an empty value appearing in NullFields will be sent to the server as
2749	// null. It is an error if a field in this list has a non-empty value.
2750	// This may be used to include null fields in Patch requests.
2751	NullFields []string `json:"-"`
2752}
2753
2754func (s *Relation) MarshalJSON() ([]byte, error) {
2755	type NoMethod Relation
2756	raw := NoMethod(*s)
2757	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
2758}
2759
2760// RelationshipInterest: **DEPRECATED**: No data will be returned A
2761// person's relationship interest .
2762type RelationshipInterest struct {
2763	// FormattedValue: Output only. The value of the relationship interest
2764	// translated and formatted in the viewer's account locale or the locale
2765	// specified in the Accept-Language HTTP header.
2766	FormattedValue string `json:"formattedValue,omitempty"`
2767
2768	// Metadata: Metadata about the relationship interest.
2769	Metadata *FieldMetadata `json:"metadata,omitempty"`
2770
2771	// Value: The kind of relationship the person is looking for. The value
2772	// can be custom or one of these predefined values: * `friend` * `date`
2773	// * `relationship` * `networking`
2774	Value string `json:"value,omitempty"`
2775
2776	// ForceSendFields is a list of field names (e.g. "FormattedValue") to
2777	// unconditionally include in API requests. By default, fields with
2778	// empty or default values are omitted from API requests. However, any
2779	// non-pointer, non-interface field appearing in ForceSendFields will be
2780	// sent to the server regardless of whether the field is empty or not.
2781	// This may be used to include empty fields in Patch requests.
2782	ForceSendFields []string `json:"-"`
2783
2784	// NullFields is a list of field names (e.g. "FormattedValue") to
2785	// include in API requests with the JSON null value. By default, fields
2786	// with empty values are omitted from API requests. However, any field
2787	// with an empty value appearing in NullFields will be sent to the
2788	// server as null. It is an error if a field in this list has a
2789	// non-empty value. This may be used to include null fields in Patch
2790	// requests.
2791	NullFields []string `json:"-"`
2792}
2793
2794func (s *RelationshipInterest) MarshalJSON() ([]byte, error) {
2795	type NoMethod RelationshipInterest
2796	raw := NoMethod(*s)
2797	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
2798}
2799
2800// RelationshipStatus: **DEPRECATED**: No data will be returned A
2801// person's relationship status.
2802type RelationshipStatus struct {
2803	// FormattedValue: Output only. The value of the relationship status
2804	// translated and formatted in the viewer's account locale or the
2805	// `Accept-Language` HTTP header locale.
2806	FormattedValue string `json:"formattedValue,omitempty"`
2807
2808	// Metadata: Metadata about the relationship status.
2809	Metadata *FieldMetadata `json:"metadata,omitempty"`
2810
2811	// Value: The relationship status. The value can be custom or one of
2812	// these predefined values: * `single` * `inARelationship` * `engaged` *
2813	// `married` * `itsComplicated` * `openRelationship` * `widowed` *
2814	// `inDomesticPartnership` * `inCivilUnion`
2815	Value string `json:"value,omitempty"`
2816
2817	// ForceSendFields is a list of field names (e.g. "FormattedValue") to
2818	// unconditionally include in API requests. By default, fields with
2819	// empty or default values are omitted from API requests. However, any
2820	// non-pointer, non-interface field appearing in ForceSendFields will be
2821	// sent to the server regardless of whether the field is empty or not.
2822	// This may be used to include empty fields in Patch requests.
2823	ForceSendFields []string `json:"-"`
2824
2825	// NullFields is a list of field names (e.g. "FormattedValue") to
2826	// include in API requests with the JSON null value. By default, fields
2827	// with empty values are omitted from API requests. However, any field
2828	// with an empty value appearing in NullFields will be sent to the
2829	// server as null. It is an error if a field in this list has a
2830	// non-empty value. This may be used to include null fields in Patch
2831	// requests.
2832	NullFields []string `json:"-"`
2833}
2834
2835func (s *RelationshipStatus) MarshalJSON() ([]byte, error) {
2836	type NoMethod RelationshipStatus
2837	raw := NoMethod(*s)
2838	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
2839}
2840
2841// Residence: **DEPRECATED**: Please use `person.locations` instead. A
2842// person's past or current residence.
2843type Residence struct {
2844	// Current: True if the residence is the person's current residence;
2845	// false if the residence is a past residence.
2846	Current bool `json:"current,omitempty"`
2847
2848	// Metadata: Metadata about the residence.
2849	Metadata *FieldMetadata `json:"metadata,omitempty"`
2850
2851	// Value: The address of the residence.
2852	Value string `json:"value,omitempty"`
2853
2854	// ForceSendFields is a list of field names (e.g. "Current") to
2855	// unconditionally include in API requests. By default, fields with
2856	// empty or default values are omitted from API requests. However, any
2857	// non-pointer, non-interface field appearing in ForceSendFields will be
2858	// sent to the server regardless of whether the field is empty or not.
2859	// This may be used to include empty fields in Patch requests.
2860	ForceSendFields []string `json:"-"`
2861
2862	// NullFields is a list of field names (e.g. "Current") to include in
2863	// API requests with the JSON null value. By default, fields with empty
2864	// values are omitted from API requests. However, any field with an
2865	// empty value appearing in NullFields will be sent to the server as
2866	// null. It is an error if a field in this list has a non-empty value.
2867	// This may be used to include null fields in Patch requests.
2868	NullFields []string `json:"-"`
2869}
2870
2871func (s *Residence) MarshalJSON() ([]byte, error) {
2872	type NoMethod Residence
2873	raw := NoMethod(*s)
2874	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
2875}
2876
2877// SearchDirectoryPeopleResponse: The response to a request for people
2878// in the authenticated user's domain directory that match the specified
2879// query.
2880type SearchDirectoryPeopleResponse struct {
2881	// NextPageToken: A token, which can be sent as `page_token` to retrieve
2882	// the next page. If this field is omitted, there are no subsequent
2883	// pages.
2884	NextPageToken string `json:"nextPageToken,omitempty"`
2885
2886	// People: The list of people in the domain directory that match the
2887	// query.
2888	People []*Person `json:"people,omitempty"`
2889
2890	// TotalSize: The total number of items in the list without pagination.
2891	TotalSize int64 `json:"totalSize,omitempty"`
2892
2893	// ServerResponse contains the HTTP response code and headers from the
2894	// server.
2895	googleapi.ServerResponse `json:"-"`
2896
2897	// ForceSendFields is a list of field names (e.g. "NextPageToken") to
2898	// unconditionally include in API requests. By default, fields with
2899	// empty or default values are omitted from API requests. However, any
2900	// non-pointer, non-interface field appearing in ForceSendFields will be
2901	// sent to the server regardless of whether the field is empty or not.
2902	// This may be used to include empty fields in Patch requests.
2903	ForceSendFields []string `json:"-"`
2904
2905	// NullFields is a list of field names (e.g. "NextPageToken") to include
2906	// in API requests with the JSON null value. By default, fields with
2907	// empty values are omitted from API requests. However, any field with
2908	// an empty value appearing in NullFields will be sent to the server as
2909	// null. It is an error if a field in this list has a non-empty value.
2910	// This may be used to include null fields in Patch requests.
2911	NullFields []string `json:"-"`
2912}
2913
2914func (s *SearchDirectoryPeopleResponse) MarshalJSON() ([]byte, error) {
2915	type NoMethod SearchDirectoryPeopleResponse
2916	raw := NoMethod(*s)
2917	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
2918}
2919
2920// SearchResponse: The response to a search request for the
2921// authenticated user, given a query.
2922type SearchResponse struct {
2923	// Results: The results of the request.
2924	Results []*SearchResult `json:"results,omitempty"`
2925
2926	// ServerResponse contains the HTTP response code and headers from the
2927	// server.
2928	googleapi.ServerResponse `json:"-"`
2929
2930	// ForceSendFields is a list of field names (e.g. "Results") to
2931	// unconditionally include in API requests. By default, fields with
2932	// empty or default values are omitted from API requests. However, any
2933	// non-pointer, non-interface field appearing in ForceSendFields will be
2934	// sent to the server regardless of whether the field is empty or not.
2935	// This may be used to include empty fields in Patch requests.
2936	ForceSendFields []string `json:"-"`
2937
2938	// NullFields is a list of field names (e.g. "Results") to include in
2939	// API requests with the JSON null value. By default, fields with empty
2940	// values are omitted from API requests. However, any field with an
2941	// empty value appearing in NullFields will be sent to the server as
2942	// null. It is an error if a field in this list has a non-empty value.
2943	// This may be used to include null fields in Patch requests.
2944	NullFields []string `json:"-"`
2945}
2946
2947func (s *SearchResponse) MarshalJSON() ([]byte, error) {
2948	type NoMethod SearchResponse
2949	raw := NoMethod(*s)
2950	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
2951}
2952
2953// SearchResult: A result of a search query.
2954type SearchResult struct {
2955	// Person: The matched Person.
2956	Person *Person `json:"person,omitempty"`
2957
2958	// ForceSendFields is a list of field names (e.g. "Person") to
2959	// unconditionally include in API requests. By default, fields with
2960	// empty or default values are omitted from API requests. However, any
2961	// non-pointer, non-interface field appearing in ForceSendFields will be
2962	// sent to the server regardless of whether the field is empty or not.
2963	// This may be used to include empty fields in Patch requests.
2964	ForceSendFields []string `json:"-"`
2965
2966	// NullFields is a list of field names (e.g. "Person") to include in API
2967	// requests with the JSON null value. By default, fields with empty
2968	// values are omitted from API requests. However, any field with an
2969	// empty value appearing in NullFields will be sent to the server as
2970	// null. It is an error if a field in this list has a non-empty value.
2971	// This may be used to include null fields in Patch requests.
2972	NullFields []string `json:"-"`
2973}
2974
2975func (s *SearchResult) MarshalJSON() ([]byte, error) {
2976	type NoMethod SearchResult
2977	raw := NoMethod(*s)
2978	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
2979}
2980
2981// SipAddress: A person's SIP address. Session Initial Protocol
2982// addresses are used for VoIP communications to make voice or video
2983// calls over the internet.
2984type SipAddress struct {
2985	// FormattedType: Output only. The type of the SIP address translated
2986	// and formatted in the viewer's account locale or the `Accept-Language`
2987	// HTTP header locale.
2988	FormattedType string `json:"formattedType,omitempty"`
2989
2990	// Metadata: Metadata about the SIP address.
2991	Metadata *FieldMetadata `json:"metadata,omitempty"`
2992
2993	// Type: The type of the SIP address. The type can be custom or or one
2994	// of these predefined values: * `home` * `work` * `mobile` * `other`
2995	Type string `json:"type,omitempty"`
2996
2997	// Value: The SIP address in the RFC 3261 19.1
2998	// (https://tools.ietf.org/html/rfc3261#section-19.1) SIP URI format.
2999	Value string `json:"value,omitempty"`
3000
3001	// ForceSendFields is a list of field names (e.g. "FormattedType") to
3002	// unconditionally include in API requests. By default, fields with
3003	// empty or default values are omitted from API requests. However, any
3004	// non-pointer, non-interface field appearing in ForceSendFields will be
3005	// sent to the server regardless of whether the field is empty or not.
3006	// This may be used to include empty fields in Patch requests.
3007	ForceSendFields []string `json:"-"`
3008
3009	// NullFields is a list of field names (e.g. "FormattedType") to include
3010	// in API requests with the JSON null value. By default, fields with
3011	// empty values are omitted from API requests. However, any field with
3012	// an empty value appearing in NullFields will be sent to the server as
3013	// null. It is an error if a field in this list has a non-empty value.
3014	// This may be used to include null fields in Patch requests.
3015	NullFields []string `json:"-"`
3016}
3017
3018func (s *SipAddress) MarshalJSON() ([]byte, error) {
3019	type NoMethod SipAddress
3020	raw := NoMethod(*s)
3021	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
3022}
3023
3024// Skill: A skill that the person has.
3025type Skill struct {
3026	// Metadata: Metadata about the skill.
3027	Metadata *FieldMetadata `json:"metadata,omitempty"`
3028
3029	// Value: The skill; for example, `underwater basket weaving`.
3030	Value string `json:"value,omitempty"`
3031
3032	// ForceSendFields is a list of field names (e.g. "Metadata") to
3033	// unconditionally include in API requests. By default, fields with
3034	// empty or default values are omitted from API requests. However, any
3035	// non-pointer, non-interface field appearing in ForceSendFields will be
3036	// sent to the server regardless of whether the field is empty or not.
3037	// This may be used to include empty fields in Patch requests.
3038	ForceSendFields []string `json:"-"`
3039
3040	// NullFields is a list of field names (e.g. "Metadata") to include in
3041	// API requests with the JSON null value. By default, fields with empty
3042	// values are omitted from API requests. However, any field with an
3043	// empty value appearing in NullFields will be sent to the server as
3044	// null. It is an error if a field in this list has a non-empty value.
3045	// This may be used to include null fields in Patch requests.
3046	NullFields []string `json:"-"`
3047}
3048
3049func (s *Skill) MarshalJSON() ([]byte, error) {
3050	type NoMethod Skill
3051	raw := NoMethod(*s)
3052	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
3053}
3054
3055// Source: The source of a field.
3056type Source struct {
3057	// Etag: **Only populated in `person.metadata.sources`.** The HTTP
3058	// entity tag (https://en.wikipedia.org/wiki/HTTP_ETag) of the source.
3059	// Used for web cache validation.
3060	Etag string `json:"etag,omitempty"`
3061
3062	// Id: The unique identifier within the source type generated by the
3063	// server.
3064	Id string `json:"id,omitempty"`
3065
3066	// ProfileMetadata: Output only. **Only populated in
3067	// `person.metadata.sources`.** Metadata about a source of type PROFILE.
3068	ProfileMetadata *ProfileMetadata `json:"profileMetadata,omitempty"`
3069
3070	// Type: The source type.
3071	//
3072	// Possible values:
3073	//   "SOURCE_TYPE_UNSPECIFIED" - Unspecified.
3074	//   "ACCOUNT" - [Google Account](https://accounts.google.com).
3075	//   "PROFILE" - [Google profile](https://profiles.google.com). You can
3076	// view the profile at
3077	// [https://profiles.google.com/](https://profiles.google.com/){id},
3078	// where {id} is the source id.
3079	//   "DOMAIN_PROFILE" - [Google Workspace domain
3080	// profile](https://support.google.com/a/answer/1628008).
3081	//   "CONTACT" - [Google contact](https://contacts.google.com). You can
3082	// view the contact at
3083	// [https://contact.google.com/](https://contact.google.com/){id}, where
3084	// {id} is the source id.
3085	//   "OTHER_CONTACT" - [Google "Other
3086	// contact"](https://contacts.google.com/other).
3087	//   "DOMAIN_CONTACT" - [Google Workspace domain shared
3088	// contact](https://support.google.com/a/answer/9281635).
3089	Type string `json:"type,omitempty"`
3090
3091	// UpdateTime: Output only. **Only populated in
3092	// `person.metadata.sources`.** Last update timestamp of this source.
3093	UpdateTime string `json:"updateTime,omitempty"`
3094
3095	// ForceSendFields is a list of field names (e.g. "Etag") to
3096	// unconditionally include in API requests. By default, fields with
3097	// empty or default values are omitted from API requests. However, any
3098	// non-pointer, non-interface field appearing in ForceSendFields will be
3099	// sent to the server regardless of whether the field is empty or not.
3100	// This may be used to include empty fields in Patch requests.
3101	ForceSendFields []string `json:"-"`
3102
3103	// NullFields is a list of field names (e.g. "Etag") to include in API
3104	// requests with the JSON null value. By default, fields with empty
3105	// values are omitted from API requests. However, any field with an
3106	// empty value appearing in NullFields will be sent to the server as
3107	// null. It is an error if a field in this list has a non-empty value.
3108	// This may be used to include null fields in Patch requests.
3109	NullFields []string `json:"-"`
3110}
3111
3112func (s *Source) MarshalJSON() ([]byte, error) {
3113	type NoMethod Source
3114	raw := NoMethod(*s)
3115	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
3116}
3117
3118// Status: The `Status` type defines a logical error model that is
3119// suitable for different programming environments, including REST APIs
3120// and RPC APIs. It is used by gRPC (https://github.com/grpc). Each
3121// `Status` message contains three pieces of data: error code, error
3122// message, and error details. You can find out more about this error
3123// model and how to work with it in the API Design Guide
3124// (https://cloud.google.com/apis/design/errors).
3125type Status struct {
3126	// Code: The status code, which should be an enum value of
3127	// google.rpc.Code.
3128	Code int64 `json:"code,omitempty"`
3129
3130	// Details: A list of messages that carry the error details. There is a
3131	// common set of message types for APIs to use.
3132	Details []googleapi.RawMessage `json:"details,omitempty"`
3133
3134	// Message: A developer-facing error message, which should be in
3135	// English. Any user-facing error message should be localized and sent
3136	// in the google.rpc.Status.details field, or localized by the client.
3137	Message string `json:"message,omitempty"`
3138
3139	// ForceSendFields is a list of field names (e.g. "Code") to
3140	// unconditionally include in API requests. By default, fields with
3141	// empty or default values are omitted from API requests. However, any
3142	// non-pointer, non-interface field appearing in ForceSendFields will be
3143	// sent to the server regardless of whether the field is empty or not.
3144	// This may be used to include empty fields in Patch requests.
3145	ForceSendFields []string `json:"-"`
3146
3147	// NullFields is a list of field names (e.g. "Code") to include in API
3148	// requests with the JSON null value. By default, fields with empty
3149	// values are omitted from API requests. However, any field with an
3150	// empty value appearing in NullFields will be sent to the server as
3151	// null. It is an error if a field in this list has a non-empty value.
3152	// This may be used to include null fields in Patch requests.
3153	NullFields []string `json:"-"`
3154}
3155
3156func (s *Status) MarshalJSON() ([]byte, error) {
3157	type NoMethod Status
3158	raw := NoMethod(*s)
3159	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
3160}
3161
3162// Tagline: **DEPRECATED**: No data will be returned A brief one-line
3163// description of the person.
3164type Tagline struct {
3165	// Metadata: Metadata about the tagline.
3166	Metadata *FieldMetadata `json:"metadata,omitempty"`
3167
3168	// Value: The tagline.
3169	Value string `json:"value,omitempty"`
3170
3171	// ForceSendFields is a list of field names (e.g. "Metadata") to
3172	// unconditionally include in API requests. By default, fields with
3173	// empty or default values are omitted from API requests. However, any
3174	// non-pointer, non-interface field appearing in ForceSendFields will be
3175	// sent to the server regardless of whether the field is empty or not.
3176	// This may be used to include empty fields in Patch requests.
3177	ForceSendFields []string `json:"-"`
3178
3179	// NullFields is a list of field names (e.g. "Metadata") to include in
3180	// API requests with the JSON null value. By default, fields with empty
3181	// values are omitted from API requests. However, any field with an
3182	// empty value appearing in NullFields will be sent to the server as
3183	// null. It is an error if a field in this list has a non-empty value.
3184	// This may be used to include null fields in Patch requests.
3185	NullFields []string `json:"-"`
3186}
3187
3188func (s *Tagline) MarshalJSON() ([]byte, error) {
3189	type NoMethod Tagline
3190	raw := NoMethod(*s)
3191	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
3192}
3193
3194// UpdateContactGroupRequest: A request to update an existing user
3195// contact group. All updated fields will be replaced.
3196type UpdateContactGroupRequest struct {
3197	// ContactGroup: Required. The contact group to update.
3198	ContactGroup *ContactGroup `json:"contactGroup,omitempty"`
3199
3200	// ReadGroupFields: Optional. A field mask to restrict which fields on
3201	// the group are returned. Defaults to `metadata`, `groupType`, and
3202	// `name` if not set or set to empty. Valid fields are: * clientData *
3203	// groupType * memberCount * metadata * name
3204	ReadGroupFields string `json:"readGroupFields,omitempty"`
3205
3206	// UpdateGroupFields: Optional. A field mask to restrict which fields on
3207	// the group are updated. Multiple fields can be specified by separating
3208	// them with commas. Defaults to `name` if not set or set to empty.
3209	// Updated fields are replaced. Valid values are: * clientData * name
3210	UpdateGroupFields string `json:"updateGroupFields,omitempty"`
3211
3212	// ForceSendFields is a list of field names (e.g. "ContactGroup") to
3213	// unconditionally include in API requests. By default, fields with
3214	// empty or default values are omitted from API requests. However, any
3215	// non-pointer, non-interface field appearing in ForceSendFields will be
3216	// sent to the server regardless of whether the field is empty or not.
3217	// This may be used to include empty fields in Patch requests.
3218	ForceSendFields []string `json:"-"`
3219
3220	// NullFields is a list of field names (e.g. "ContactGroup") to include
3221	// in API requests with the JSON null value. By default, fields with
3222	// empty values are omitted from API requests. However, any field with
3223	// an empty value appearing in NullFields will be sent to the server as
3224	// null. It is an error if a field in this list has a non-empty value.
3225	// This may be used to include null fields in Patch requests.
3226	NullFields []string `json:"-"`
3227}
3228
3229func (s *UpdateContactGroupRequest) MarshalJSON() ([]byte, error) {
3230	type NoMethod UpdateContactGroupRequest
3231	raw := NoMethod(*s)
3232	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
3233}
3234
3235// UpdateContactPhotoRequest: A request to update an existing contact's
3236// photo. All requests must have a valid photo format: JPEG or PNG.
3237type UpdateContactPhotoRequest struct {
3238	// PersonFields: Optional. A field mask to restrict which fields on the
3239	// person are returned. Multiple fields can be specified by separating
3240	// them with commas. Defaults to empty if not set, which will skip the
3241	// post mutate get. Valid values are: * addresses * ageRanges *
3242	// biographies * birthdays * calendarUrls * clientData * coverPhotos *
3243	// emailAddresses * events * externalIds * genders * imClients *
3244	// interests * locales * locations * memberships * metadata *
3245	// miscKeywords * names * nicknames * occupations * organizations *
3246	// phoneNumbers * photos * relations * sipAddresses * skills * urls *
3247	// userDefined
3248	PersonFields string `json:"personFields,omitempty"`
3249
3250	// PhotoBytes: Required. Raw photo bytes
3251	PhotoBytes string `json:"photoBytes,omitempty"`
3252
3253	// Sources: Optional. A mask of what source types to return. Defaults to
3254	// READ_SOURCE_TYPE_CONTACT and READ_SOURCE_TYPE_PROFILE if not set.
3255	//
3256	// Possible values:
3257	//   "READ_SOURCE_TYPE_UNSPECIFIED" - Unspecified.
3258	//   "READ_SOURCE_TYPE_PROFILE" - Returns SourceType.ACCOUNT,
3259	// SourceType.DOMAIN_PROFILE, and SourceType.PROFILE.
3260	//   "READ_SOURCE_TYPE_CONTACT" - Returns SourceType.CONTACT.
3261	//   "READ_SOURCE_TYPE_DOMAIN_CONTACT" - Returns
3262	// SourceType.DOMAIN_CONTACT.
3263	Sources []string `json:"sources,omitempty"`
3264
3265	// ForceSendFields is a list of field names (e.g. "PersonFields") to
3266	// unconditionally include in API requests. By default, fields with
3267	// empty or default values are omitted from API requests. However, any
3268	// non-pointer, non-interface field appearing in ForceSendFields will be
3269	// sent to the server regardless of whether the field is empty or not.
3270	// This may be used to include empty fields in Patch requests.
3271	ForceSendFields []string `json:"-"`
3272
3273	// NullFields is a list of field names (e.g. "PersonFields") to include
3274	// in API requests with the JSON null value. By default, fields with
3275	// empty values are omitted from API requests. However, any field with
3276	// an empty value appearing in NullFields will be sent to the server as
3277	// null. It is an error if a field in this list has a non-empty value.
3278	// This may be used to include null fields in Patch requests.
3279	NullFields []string `json:"-"`
3280}
3281
3282func (s *UpdateContactPhotoRequest) MarshalJSON() ([]byte, error) {
3283	type NoMethod UpdateContactPhotoRequest
3284	raw := NoMethod(*s)
3285	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
3286}
3287
3288// UpdateContactPhotoResponse: The response for updating a contact's
3289// photo.
3290type UpdateContactPhotoResponse struct {
3291	// Person: The updated person, if person_fields is set in the
3292	// UpdateContactPhotoRequest; otherwise this will be unset.
3293	Person *Person `json:"person,omitempty"`
3294
3295	// ServerResponse contains the HTTP response code and headers from the
3296	// server.
3297	googleapi.ServerResponse `json:"-"`
3298
3299	// ForceSendFields is a list of field names (e.g. "Person") to
3300	// unconditionally include in API requests. By default, fields with
3301	// empty or default values are omitted from API requests. However, any
3302	// non-pointer, non-interface field appearing in ForceSendFields will be
3303	// sent to the server regardless of whether the field is empty or not.
3304	// This may be used to include empty fields in Patch requests.
3305	ForceSendFields []string `json:"-"`
3306
3307	// NullFields is a list of field names (e.g. "Person") to include in API
3308	// requests with the JSON null value. By default, fields with empty
3309	// values are omitted from API requests. However, any field with an
3310	// empty value appearing in NullFields will be sent to the server as
3311	// null. It is an error if a field in this list has a non-empty value.
3312	// This may be used to include null fields in Patch requests.
3313	NullFields []string `json:"-"`
3314}
3315
3316func (s *UpdateContactPhotoResponse) MarshalJSON() ([]byte, error) {
3317	type NoMethod UpdateContactPhotoResponse
3318	raw := NoMethod(*s)
3319	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
3320}
3321
3322// Url: A person's associated URLs.
3323type Url struct {
3324	// FormattedType: Output only. The type of the URL translated and
3325	// formatted in the viewer's account locale or the `Accept-Language`
3326	// HTTP header locale.
3327	FormattedType string `json:"formattedType,omitempty"`
3328
3329	// Metadata: Metadata about the URL.
3330	Metadata *FieldMetadata `json:"metadata,omitempty"`
3331
3332	// Type: The type of the URL. The type can be custom or one of these
3333	// predefined values: * `home` * `work` * `blog` * `profile` *
3334	// `homePage` * `ftp` * `reservations` * `appInstallPage`: website for a
3335	// Currents application. * `other`
3336	Type string `json:"type,omitempty"`
3337
3338	// Value: The URL.
3339	Value string `json:"value,omitempty"`
3340
3341	// ForceSendFields is a list of field names (e.g. "FormattedType") to
3342	// unconditionally include in API requests. By default, fields with
3343	// empty or default values are omitted from API requests. However, any
3344	// non-pointer, non-interface field appearing in ForceSendFields will be
3345	// sent to the server regardless of whether the field is empty or not.
3346	// This may be used to include empty fields in Patch requests.
3347	ForceSendFields []string `json:"-"`
3348
3349	// NullFields is a list of field names (e.g. "FormattedType") to include
3350	// in API requests with the JSON null value. By default, fields with
3351	// empty values are omitted from API requests. However, any field with
3352	// an empty value appearing in NullFields will be sent to the server as
3353	// null. It is an error if a field in this list has a non-empty value.
3354	// This may be used to include null fields in Patch requests.
3355	NullFields []string `json:"-"`
3356}
3357
3358func (s *Url) MarshalJSON() ([]byte, error) {
3359	type NoMethod Url
3360	raw := NoMethod(*s)
3361	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
3362}
3363
3364// UserDefined: Arbitrary user data that is populated by the end users.
3365type UserDefined struct {
3366	// Key: The end user specified key of the user defined data.
3367	Key string `json:"key,omitempty"`
3368
3369	// Metadata: Metadata about the user defined data.
3370	Metadata *FieldMetadata `json:"metadata,omitempty"`
3371
3372	// Value: The end user specified value of the user defined data.
3373	Value string `json:"value,omitempty"`
3374
3375	// ForceSendFields is a list of field names (e.g. "Key") to
3376	// unconditionally include in API requests. By default, fields with
3377	// empty or default values are omitted from API requests. However, any
3378	// non-pointer, non-interface field appearing in ForceSendFields will be
3379	// sent to the server regardless of whether the field is empty or not.
3380	// This may be used to include empty fields in Patch requests.
3381	ForceSendFields []string `json:"-"`
3382
3383	// NullFields is a list of field names (e.g. "Key") to include in API
3384	// requests with the JSON null value. By default, fields with empty
3385	// values are omitted from API requests. However, any field with an
3386	// empty value appearing in NullFields will be sent to the server as
3387	// null. It is an error if a field in this list has a non-empty value.
3388	// This may be used to include null fields in Patch requests.
3389	NullFields []string `json:"-"`
3390}
3391
3392func (s *UserDefined) MarshalJSON() ([]byte, error) {
3393	type NoMethod UserDefined
3394	raw := NoMethod(*s)
3395	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
3396}
3397
3398// method id "people.contactGroups.batchGet":
3399
3400type ContactGroupsBatchGetCall struct {
3401	s            *Service
3402	urlParams_   gensupport.URLParams
3403	ifNoneMatch_ string
3404	ctx_         context.Context
3405	header_      http.Header
3406}
3407
3408// BatchGet: Get a list of contact groups owned by the authenticated
3409// user by specifying a list of contact group resource names.
3410func (r *ContactGroupsService) BatchGet() *ContactGroupsBatchGetCall {
3411	c := &ContactGroupsBatchGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
3412	return c
3413}
3414
3415// GroupFields sets the optional parameter "groupFields": A field mask
3416// to restrict which fields on the group are returned. Defaults to
3417// `metadata`, `groupType`, `memberCount`, and `name` if not set or set
3418// to empty. Valid fields are: * clientData * groupType * memberCount *
3419// metadata * name
3420func (c *ContactGroupsBatchGetCall) GroupFields(groupFields string) *ContactGroupsBatchGetCall {
3421	c.urlParams_.Set("groupFields", groupFields)
3422	return c
3423}
3424
3425// MaxMembers sets the optional parameter "maxMembers": Specifies the
3426// maximum number of members to return for each group. Defaults to 0 if
3427// not set, which will return zero members.
3428func (c *ContactGroupsBatchGetCall) MaxMembers(maxMembers int64) *ContactGroupsBatchGetCall {
3429	c.urlParams_.Set("maxMembers", fmt.Sprint(maxMembers))
3430	return c
3431}
3432
3433// ResourceNames sets the optional parameter "resourceNames": Required.
3434// The resource names of the contact groups to get. There is a maximum
3435// of 200 resource names.
3436func (c *ContactGroupsBatchGetCall) ResourceNames(resourceNames ...string) *ContactGroupsBatchGetCall {
3437	c.urlParams_.SetMulti("resourceNames", append([]string{}, resourceNames...))
3438	return c
3439}
3440
3441// Fields allows partial responses to be retrieved. See
3442// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
3443// for more information.
3444func (c *ContactGroupsBatchGetCall) Fields(s ...googleapi.Field) *ContactGroupsBatchGetCall {
3445	c.urlParams_.Set("fields", googleapi.CombineFields(s))
3446	return c
3447}
3448
3449// IfNoneMatch sets the optional parameter which makes the operation
3450// fail if the object's ETag matches the given value. This is useful for
3451// getting updates only after the object has changed since the last
3452// request. Use googleapi.IsNotModified to check whether the response
3453// error from Do is the result of In-None-Match.
3454func (c *ContactGroupsBatchGetCall) IfNoneMatch(entityTag string) *ContactGroupsBatchGetCall {
3455	c.ifNoneMatch_ = entityTag
3456	return c
3457}
3458
3459// Context sets the context to be used in this call's Do method. Any
3460// pending HTTP request will be aborted if the provided context is
3461// canceled.
3462func (c *ContactGroupsBatchGetCall) Context(ctx context.Context) *ContactGroupsBatchGetCall {
3463	c.ctx_ = ctx
3464	return c
3465}
3466
3467// Header returns an http.Header that can be modified by the caller to
3468// add HTTP headers to the request.
3469func (c *ContactGroupsBatchGetCall) Header() http.Header {
3470	if c.header_ == nil {
3471		c.header_ = make(http.Header)
3472	}
3473	return c.header_
3474}
3475
3476func (c *ContactGroupsBatchGetCall) doRequest(alt string) (*http.Response, error) {
3477	reqHeaders := make(http.Header)
3478	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20211027")
3479	for k, v := range c.header_ {
3480		reqHeaders[k] = v
3481	}
3482	reqHeaders.Set("User-Agent", c.s.userAgent())
3483	if c.ifNoneMatch_ != "" {
3484		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
3485	}
3486	var body io.Reader = nil
3487	c.urlParams_.Set("alt", alt)
3488	c.urlParams_.Set("prettyPrint", "false")
3489	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/contactGroups:batchGet")
3490	urls += "?" + c.urlParams_.Encode()
3491	req, err := http.NewRequest("GET", urls, body)
3492	if err != nil {
3493		return nil, err
3494	}
3495	req.Header = reqHeaders
3496	return gensupport.SendRequest(c.ctx_, c.s.client, req)
3497}
3498
3499// Do executes the "people.contactGroups.batchGet" call.
3500// Exactly one of *BatchGetContactGroupsResponse or error will be
3501// non-nil. Any non-2xx status code is an error. Response headers are in
3502// either *BatchGetContactGroupsResponse.ServerResponse.Header or (if a
3503// response was returned at all) in error.(*googleapi.Error).Header. Use
3504// googleapi.IsNotModified to check whether the returned error was
3505// because http.StatusNotModified was returned.
3506func (c *ContactGroupsBatchGetCall) Do(opts ...googleapi.CallOption) (*BatchGetContactGroupsResponse, error) {
3507	gensupport.SetOptions(c.urlParams_, opts...)
3508	res, err := c.doRequest("json")
3509	if res != nil && res.StatusCode == http.StatusNotModified {
3510		if res.Body != nil {
3511			res.Body.Close()
3512		}
3513		return nil, &googleapi.Error{
3514			Code:   res.StatusCode,
3515			Header: res.Header,
3516		}
3517	}
3518	if err != nil {
3519		return nil, err
3520	}
3521	defer googleapi.CloseBody(res)
3522	if err := googleapi.CheckResponse(res); err != nil {
3523		return nil, err
3524	}
3525	ret := &BatchGetContactGroupsResponse{
3526		ServerResponse: googleapi.ServerResponse{
3527			Header:         res.Header,
3528			HTTPStatusCode: res.StatusCode,
3529		},
3530	}
3531	target := &ret
3532	if err := gensupport.DecodeResponse(target, res); err != nil {
3533		return nil, err
3534	}
3535	return ret, nil
3536	// {
3537	//   "description": "Get a list of contact groups owned by the authenticated user by specifying a list of contact group resource names.",
3538	//   "flatPath": "v1/contactGroups:batchGet",
3539	//   "httpMethod": "GET",
3540	//   "id": "people.contactGroups.batchGet",
3541	//   "parameterOrder": [],
3542	//   "parameters": {
3543	//     "groupFields": {
3544	//       "description": "Optional. A field mask to restrict which fields on the group are returned. Defaults to `metadata`, `groupType`, `memberCount`, and `name` if not set or set to empty. Valid fields are: * clientData * groupType * memberCount * metadata * name",
3545	//       "format": "google-fieldmask",
3546	//       "location": "query",
3547	//       "type": "string"
3548	//     },
3549	//     "maxMembers": {
3550	//       "description": "Optional. Specifies the maximum number of members to return for each group. Defaults to 0 if not set, which will return zero members.",
3551	//       "format": "int32",
3552	//       "location": "query",
3553	//       "type": "integer"
3554	//     },
3555	//     "resourceNames": {
3556	//       "description": "Required. The resource names of the contact groups to get. There is a maximum of 200 resource names.",
3557	//       "location": "query",
3558	//       "repeated": true,
3559	//       "type": "string"
3560	//     }
3561	//   },
3562	//   "path": "v1/contactGroups:batchGet",
3563	//   "response": {
3564	//     "$ref": "BatchGetContactGroupsResponse"
3565	//   },
3566	//   "scopes": [
3567	//     "https://www.googleapis.com/auth/contacts",
3568	//     "https://www.googleapis.com/auth/contacts.readonly"
3569	//   ]
3570	// }
3571
3572}
3573
3574// method id "people.contactGroups.create":
3575
3576type ContactGroupsCreateCall struct {
3577	s                         *Service
3578	createcontactgrouprequest *CreateContactGroupRequest
3579	urlParams_                gensupport.URLParams
3580	ctx_                      context.Context
3581	header_                   http.Header
3582}
3583
3584// Create: Create a new contact group owned by the authenticated user.
3585// Created contact group names must be unique to the users contact
3586// groups. Attempting to create a group with a duplicate name will
3587// return a HTTP 409 error.
3588func (r *ContactGroupsService) Create(createcontactgrouprequest *CreateContactGroupRequest) *ContactGroupsCreateCall {
3589	c := &ContactGroupsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
3590	c.createcontactgrouprequest = createcontactgrouprequest
3591	return c
3592}
3593
3594// Fields allows partial responses to be retrieved. See
3595// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
3596// for more information.
3597func (c *ContactGroupsCreateCall) Fields(s ...googleapi.Field) *ContactGroupsCreateCall {
3598	c.urlParams_.Set("fields", googleapi.CombineFields(s))
3599	return c
3600}
3601
3602// Context sets the context to be used in this call's Do method. Any
3603// pending HTTP request will be aborted if the provided context is
3604// canceled.
3605func (c *ContactGroupsCreateCall) Context(ctx context.Context) *ContactGroupsCreateCall {
3606	c.ctx_ = ctx
3607	return c
3608}
3609
3610// Header returns an http.Header that can be modified by the caller to
3611// add HTTP headers to the request.
3612func (c *ContactGroupsCreateCall) Header() http.Header {
3613	if c.header_ == nil {
3614		c.header_ = make(http.Header)
3615	}
3616	return c.header_
3617}
3618
3619func (c *ContactGroupsCreateCall) doRequest(alt string) (*http.Response, error) {
3620	reqHeaders := make(http.Header)
3621	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20211027")
3622	for k, v := range c.header_ {
3623		reqHeaders[k] = v
3624	}
3625	reqHeaders.Set("User-Agent", c.s.userAgent())
3626	var body io.Reader = nil
3627	body, err := googleapi.WithoutDataWrapper.JSONReader(c.createcontactgrouprequest)
3628	if err != nil {
3629		return nil, err
3630	}
3631	reqHeaders.Set("Content-Type", "application/json")
3632	c.urlParams_.Set("alt", alt)
3633	c.urlParams_.Set("prettyPrint", "false")
3634	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/contactGroups")
3635	urls += "?" + c.urlParams_.Encode()
3636	req, err := http.NewRequest("POST", urls, body)
3637	if err != nil {
3638		return nil, err
3639	}
3640	req.Header = reqHeaders
3641	return gensupport.SendRequest(c.ctx_, c.s.client, req)
3642}
3643
3644// Do executes the "people.contactGroups.create" call.
3645// Exactly one of *ContactGroup or error will be non-nil. Any non-2xx
3646// status code is an error. Response headers are in either
3647// *ContactGroup.ServerResponse.Header or (if a response was returned at
3648// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
3649// to check whether the returned error was because
3650// http.StatusNotModified was returned.
3651func (c *ContactGroupsCreateCall) Do(opts ...googleapi.CallOption) (*ContactGroup, error) {
3652	gensupport.SetOptions(c.urlParams_, opts...)
3653	res, err := c.doRequest("json")
3654	if res != nil && res.StatusCode == http.StatusNotModified {
3655		if res.Body != nil {
3656			res.Body.Close()
3657		}
3658		return nil, &googleapi.Error{
3659			Code:   res.StatusCode,
3660			Header: res.Header,
3661		}
3662	}
3663	if err != nil {
3664		return nil, err
3665	}
3666	defer googleapi.CloseBody(res)
3667	if err := googleapi.CheckResponse(res); err != nil {
3668		return nil, err
3669	}
3670	ret := &ContactGroup{
3671		ServerResponse: googleapi.ServerResponse{
3672			Header:         res.Header,
3673			HTTPStatusCode: res.StatusCode,
3674		},
3675	}
3676	target := &ret
3677	if err := gensupport.DecodeResponse(target, res); err != nil {
3678		return nil, err
3679	}
3680	return ret, nil
3681	// {
3682	//   "description": "Create a new contact group owned by the authenticated user. Created contact group names must be unique to the users contact groups. Attempting to create a group with a duplicate name will return a HTTP 409 error.",
3683	//   "flatPath": "v1/contactGroups",
3684	//   "httpMethod": "POST",
3685	//   "id": "people.contactGroups.create",
3686	//   "parameterOrder": [],
3687	//   "parameters": {},
3688	//   "path": "v1/contactGroups",
3689	//   "request": {
3690	//     "$ref": "CreateContactGroupRequest"
3691	//   },
3692	//   "response": {
3693	//     "$ref": "ContactGroup"
3694	//   },
3695	//   "scopes": [
3696	//     "https://www.googleapis.com/auth/contacts"
3697	//   ]
3698	// }
3699
3700}
3701
3702// method id "people.contactGroups.delete":
3703
3704type ContactGroupsDeleteCall struct {
3705	s            *Service
3706	resourceName string
3707	urlParams_   gensupport.URLParams
3708	ctx_         context.Context
3709	header_      http.Header
3710}
3711
3712// Delete: Delete an existing contact group owned by the authenticated
3713// user by specifying a contact group resource name.
3714//
3715// - resourceName: The resource name of the contact group to delete.
3716func (r *ContactGroupsService) Delete(resourceName string) *ContactGroupsDeleteCall {
3717	c := &ContactGroupsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
3718	c.resourceName = resourceName
3719	return c
3720}
3721
3722// DeleteContacts sets the optional parameter "deleteContacts": Set to
3723// true to also delete the contacts in the specified group.
3724func (c *ContactGroupsDeleteCall) DeleteContacts(deleteContacts bool) *ContactGroupsDeleteCall {
3725	c.urlParams_.Set("deleteContacts", fmt.Sprint(deleteContacts))
3726	return c
3727}
3728
3729// Fields allows partial responses to be retrieved. See
3730// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
3731// for more information.
3732func (c *ContactGroupsDeleteCall) Fields(s ...googleapi.Field) *ContactGroupsDeleteCall {
3733	c.urlParams_.Set("fields", googleapi.CombineFields(s))
3734	return c
3735}
3736
3737// Context sets the context to be used in this call's Do method. Any
3738// pending HTTP request will be aborted if the provided context is
3739// canceled.
3740func (c *ContactGroupsDeleteCall) Context(ctx context.Context) *ContactGroupsDeleteCall {
3741	c.ctx_ = ctx
3742	return c
3743}
3744
3745// Header returns an http.Header that can be modified by the caller to
3746// add HTTP headers to the request.
3747func (c *ContactGroupsDeleteCall) Header() http.Header {
3748	if c.header_ == nil {
3749		c.header_ = make(http.Header)
3750	}
3751	return c.header_
3752}
3753
3754func (c *ContactGroupsDeleteCall) doRequest(alt string) (*http.Response, error) {
3755	reqHeaders := make(http.Header)
3756	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20211027")
3757	for k, v := range c.header_ {
3758		reqHeaders[k] = v
3759	}
3760	reqHeaders.Set("User-Agent", c.s.userAgent())
3761	var body io.Reader = nil
3762	c.urlParams_.Set("alt", alt)
3763	c.urlParams_.Set("prettyPrint", "false")
3764	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+resourceName}")
3765	urls += "?" + c.urlParams_.Encode()
3766	req, err := http.NewRequest("DELETE", urls, body)
3767	if err != nil {
3768		return nil, err
3769	}
3770	req.Header = reqHeaders
3771	googleapi.Expand(req.URL, map[string]string{
3772		"resourceName": c.resourceName,
3773	})
3774	return gensupport.SendRequest(c.ctx_, c.s.client, req)
3775}
3776
3777// Do executes the "people.contactGroups.delete" call.
3778// Exactly one of *Empty or error will be non-nil. Any non-2xx status
3779// code is an error. Response headers are in either
3780// *Empty.ServerResponse.Header or (if a response was returned at all)
3781// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
3782// check whether the returned error was because http.StatusNotModified
3783// was returned.
3784func (c *ContactGroupsDeleteCall) Do(opts ...googleapi.CallOption) (*Empty, error) {
3785	gensupport.SetOptions(c.urlParams_, opts...)
3786	res, err := c.doRequest("json")
3787	if res != nil && res.StatusCode == http.StatusNotModified {
3788		if res.Body != nil {
3789			res.Body.Close()
3790		}
3791		return nil, &googleapi.Error{
3792			Code:   res.StatusCode,
3793			Header: res.Header,
3794		}
3795	}
3796	if err != nil {
3797		return nil, err
3798	}
3799	defer googleapi.CloseBody(res)
3800	if err := googleapi.CheckResponse(res); err != nil {
3801		return nil, err
3802	}
3803	ret := &Empty{
3804		ServerResponse: googleapi.ServerResponse{
3805			Header:         res.Header,
3806			HTTPStatusCode: res.StatusCode,
3807		},
3808	}
3809	target := &ret
3810	if err := gensupport.DecodeResponse(target, res); err != nil {
3811		return nil, err
3812	}
3813	return ret, nil
3814	// {
3815	//   "description": "Delete an existing contact group owned by the authenticated user by specifying a contact group resource name.",
3816	//   "flatPath": "v1/contactGroups/{contactGroupsId}",
3817	//   "httpMethod": "DELETE",
3818	//   "id": "people.contactGroups.delete",
3819	//   "parameterOrder": [
3820	//     "resourceName"
3821	//   ],
3822	//   "parameters": {
3823	//     "deleteContacts": {
3824	//       "description": "Optional. Set to true to also delete the contacts in the specified group.",
3825	//       "location": "query",
3826	//       "type": "boolean"
3827	//     },
3828	//     "resourceName": {
3829	//       "description": "Required. The resource name of the contact group to delete.",
3830	//       "location": "path",
3831	//       "pattern": "^contactGroups/[^/]+$",
3832	//       "required": true,
3833	//       "type": "string"
3834	//     }
3835	//   },
3836	//   "path": "v1/{+resourceName}",
3837	//   "response": {
3838	//     "$ref": "Empty"
3839	//   },
3840	//   "scopes": [
3841	//     "https://www.googleapis.com/auth/contacts"
3842	//   ]
3843	// }
3844
3845}
3846
3847// method id "people.contactGroups.get":
3848
3849type ContactGroupsGetCall struct {
3850	s            *Service
3851	resourceName string
3852	urlParams_   gensupport.URLParams
3853	ifNoneMatch_ string
3854	ctx_         context.Context
3855	header_      http.Header
3856}
3857
3858// Get: Get a specific contact group owned by the authenticated user by
3859// specifying a contact group resource name.
3860//
3861// - resourceName: The resource name of the contact group to get.
3862func (r *ContactGroupsService) Get(resourceName string) *ContactGroupsGetCall {
3863	c := &ContactGroupsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
3864	c.resourceName = resourceName
3865	return c
3866}
3867
3868// GroupFields sets the optional parameter "groupFields": A field mask
3869// to restrict which fields on the group are returned. Defaults to
3870// `metadata`, `groupType`, `memberCount`, and `name` if not set or set
3871// to empty. Valid fields are: * clientData * groupType * memberCount *
3872// metadata * name
3873func (c *ContactGroupsGetCall) GroupFields(groupFields string) *ContactGroupsGetCall {
3874	c.urlParams_.Set("groupFields", groupFields)
3875	return c
3876}
3877
3878// MaxMembers sets the optional parameter "maxMembers": Specifies the
3879// maximum number of members to return. Defaults to 0 if not set, which
3880// will return zero members.
3881func (c *ContactGroupsGetCall) MaxMembers(maxMembers int64) *ContactGroupsGetCall {
3882	c.urlParams_.Set("maxMembers", fmt.Sprint(maxMembers))
3883	return c
3884}
3885
3886// Fields allows partial responses to be retrieved. See
3887// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
3888// for more information.
3889func (c *ContactGroupsGetCall) Fields(s ...googleapi.Field) *ContactGroupsGetCall {
3890	c.urlParams_.Set("fields", googleapi.CombineFields(s))
3891	return c
3892}
3893
3894// IfNoneMatch sets the optional parameter which makes the operation
3895// fail if the object's ETag matches the given value. This is useful for
3896// getting updates only after the object has changed since the last
3897// request. Use googleapi.IsNotModified to check whether the response
3898// error from Do is the result of In-None-Match.
3899func (c *ContactGroupsGetCall) IfNoneMatch(entityTag string) *ContactGroupsGetCall {
3900	c.ifNoneMatch_ = entityTag
3901	return c
3902}
3903
3904// Context sets the context to be used in this call's Do method. Any
3905// pending HTTP request will be aborted if the provided context is
3906// canceled.
3907func (c *ContactGroupsGetCall) Context(ctx context.Context) *ContactGroupsGetCall {
3908	c.ctx_ = ctx
3909	return c
3910}
3911
3912// Header returns an http.Header that can be modified by the caller to
3913// add HTTP headers to the request.
3914func (c *ContactGroupsGetCall) Header() http.Header {
3915	if c.header_ == nil {
3916		c.header_ = make(http.Header)
3917	}
3918	return c.header_
3919}
3920
3921func (c *ContactGroupsGetCall) doRequest(alt string) (*http.Response, error) {
3922	reqHeaders := make(http.Header)
3923	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20211027")
3924	for k, v := range c.header_ {
3925		reqHeaders[k] = v
3926	}
3927	reqHeaders.Set("User-Agent", c.s.userAgent())
3928	if c.ifNoneMatch_ != "" {
3929		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
3930	}
3931	var body io.Reader = nil
3932	c.urlParams_.Set("alt", alt)
3933	c.urlParams_.Set("prettyPrint", "false")
3934	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+resourceName}")
3935	urls += "?" + c.urlParams_.Encode()
3936	req, err := http.NewRequest("GET", urls, body)
3937	if err != nil {
3938		return nil, err
3939	}
3940	req.Header = reqHeaders
3941	googleapi.Expand(req.URL, map[string]string{
3942		"resourceName": c.resourceName,
3943	})
3944	return gensupport.SendRequest(c.ctx_, c.s.client, req)
3945}
3946
3947// Do executes the "people.contactGroups.get" call.
3948// Exactly one of *ContactGroup or error will be non-nil. Any non-2xx
3949// status code is an error. Response headers are in either
3950// *ContactGroup.ServerResponse.Header or (if a response was returned at
3951// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
3952// to check whether the returned error was because
3953// http.StatusNotModified was returned.
3954func (c *ContactGroupsGetCall) Do(opts ...googleapi.CallOption) (*ContactGroup, error) {
3955	gensupport.SetOptions(c.urlParams_, opts...)
3956	res, err := c.doRequest("json")
3957	if res != nil && res.StatusCode == http.StatusNotModified {
3958		if res.Body != nil {
3959			res.Body.Close()
3960		}
3961		return nil, &googleapi.Error{
3962			Code:   res.StatusCode,
3963			Header: res.Header,
3964		}
3965	}
3966	if err != nil {
3967		return nil, err
3968	}
3969	defer googleapi.CloseBody(res)
3970	if err := googleapi.CheckResponse(res); err != nil {
3971		return nil, err
3972	}
3973	ret := &ContactGroup{
3974		ServerResponse: googleapi.ServerResponse{
3975			Header:         res.Header,
3976			HTTPStatusCode: res.StatusCode,
3977		},
3978	}
3979	target := &ret
3980	if err := gensupport.DecodeResponse(target, res); err != nil {
3981		return nil, err
3982	}
3983	return ret, nil
3984	// {
3985	//   "description": "Get a specific contact group owned by the authenticated user by specifying a contact group resource name.",
3986	//   "flatPath": "v1/contactGroups/{contactGroupsId}",
3987	//   "httpMethod": "GET",
3988	//   "id": "people.contactGroups.get",
3989	//   "parameterOrder": [
3990	//     "resourceName"
3991	//   ],
3992	//   "parameters": {
3993	//     "groupFields": {
3994	//       "description": "Optional. A field mask to restrict which fields on the group are returned. Defaults to `metadata`, `groupType`, `memberCount`, and `name` if not set or set to empty. Valid fields are: * clientData * groupType * memberCount * metadata * name",
3995	//       "format": "google-fieldmask",
3996	//       "location": "query",
3997	//       "type": "string"
3998	//     },
3999	//     "maxMembers": {
4000	//       "description": "Optional. Specifies the maximum number of members to return. Defaults to 0 if not set, which will return zero members.",
4001	//       "format": "int32",
4002	//       "location": "query",
4003	//       "type": "integer"
4004	//     },
4005	//     "resourceName": {
4006	//       "description": "Required. The resource name of the contact group to get.",
4007	//       "location": "path",
4008	//       "pattern": "^contactGroups/[^/]+$",
4009	//       "required": true,
4010	//       "type": "string"
4011	//     }
4012	//   },
4013	//   "path": "v1/{+resourceName}",
4014	//   "response": {
4015	//     "$ref": "ContactGroup"
4016	//   },
4017	//   "scopes": [
4018	//     "https://www.googleapis.com/auth/contacts",
4019	//     "https://www.googleapis.com/auth/contacts.readonly"
4020	//   ]
4021	// }
4022
4023}
4024
4025// method id "people.contactGroups.list":
4026
4027type ContactGroupsListCall struct {
4028	s            *Service
4029	urlParams_   gensupport.URLParams
4030	ifNoneMatch_ string
4031	ctx_         context.Context
4032	header_      http.Header
4033}
4034
4035// List: List all contact groups owned by the authenticated user.
4036// Members of the contact groups are not populated.
4037func (r *ContactGroupsService) List() *ContactGroupsListCall {
4038	c := &ContactGroupsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
4039	return c
4040}
4041
4042// GroupFields sets the optional parameter "groupFields": A field mask
4043// to restrict which fields on the group are returned. Defaults to
4044// `metadata`, `groupType`, `memberCount`, and `name` if not set or set
4045// to empty. Valid fields are: * clientData * groupType * memberCount *
4046// metadata * name
4047func (c *ContactGroupsListCall) GroupFields(groupFields string) *ContactGroupsListCall {
4048	c.urlParams_.Set("groupFields", groupFields)
4049	return c
4050}
4051
4052// PageSize sets the optional parameter "pageSize": The maximum number
4053// of resources to return. Valid values are between 1 and 1000,
4054// inclusive. Defaults to 30 if not set or set to 0.
4055func (c *ContactGroupsListCall) PageSize(pageSize int64) *ContactGroupsListCall {
4056	c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
4057	return c
4058}
4059
4060// PageToken sets the optional parameter "pageToken": The
4061// next_page_token value returned from a previous call to
4062// ListContactGroups (/people/api/rest/v1/contactgroups/list). Requests
4063// the next page of resources.
4064func (c *ContactGroupsListCall) PageToken(pageToken string) *ContactGroupsListCall {
4065	c.urlParams_.Set("pageToken", pageToken)
4066	return c
4067}
4068
4069// SyncToken sets the optional parameter "syncToken": A sync token,
4070// returned by a previous call to `contactgroups.list`. Only resources
4071// changed since the sync token was created will be returned.
4072func (c *ContactGroupsListCall) SyncToken(syncToken string) *ContactGroupsListCall {
4073	c.urlParams_.Set("syncToken", syncToken)
4074	return c
4075}
4076
4077// Fields allows partial responses to be retrieved. See
4078// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
4079// for more information.
4080func (c *ContactGroupsListCall) Fields(s ...googleapi.Field) *ContactGroupsListCall {
4081	c.urlParams_.Set("fields", googleapi.CombineFields(s))
4082	return c
4083}
4084
4085// IfNoneMatch sets the optional parameter which makes the operation
4086// fail if the object's ETag matches the given value. This is useful for
4087// getting updates only after the object has changed since the last
4088// request. Use googleapi.IsNotModified to check whether the response
4089// error from Do is the result of In-None-Match.
4090func (c *ContactGroupsListCall) IfNoneMatch(entityTag string) *ContactGroupsListCall {
4091	c.ifNoneMatch_ = entityTag
4092	return c
4093}
4094
4095// Context sets the context to be used in this call's Do method. Any
4096// pending HTTP request will be aborted if the provided context is
4097// canceled.
4098func (c *ContactGroupsListCall) Context(ctx context.Context) *ContactGroupsListCall {
4099	c.ctx_ = ctx
4100	return c
4101}
4102
4103// Header returns an http.Header that can be modified by the caller to
4104// add HTTP headers to the request.
4105func (c *ContactGroupsListCall) Header() http.Header {
4106	if c.header_ == nil {
4107		c.header_ = make(http.Header)
4108	}
4109	return c.header_
4110}
4111
4112func (c *ContactGroupsListCall) doRequest(alt string) (*http.Response, error) {
4113	reqHeaders := make(http.Header)
4114	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20211027")
4115	for k, v := range c.header_ {
4116		reqHeaders[k] = v
4117	}
4118	reqHeaders.Set("User-Agent", c.s.userAgent())
4119	if c.ifNoneMatch_ != "" {
4120		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
4121	}
4122	var body io.Reader = nil
4123	c.urlParams_.Set("alt", alt)
4124	c.urlParams_.Set("prettyPrint", "false")
4125	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/contactGroups")
4126	urls += "?" + c.urlParams_.Encode()
4127	req, err := http.NewRequest("GET", urls, body)
4128	if err != nil {
4129		return nil, err
4130	}
4131	req.Header = reqHeaders
4132	return gensupport.SendRequest(c.ctx_, c.s.client, req)
4133}
4134
4135// Do executes the "people.contactGroups.list" call.
4136// Exactly one of *ListContactGroupsResponse or error will be non-nil.
4137// Any non-2xx status code is an error. Response headers are in either
4138// *ListContactGroupsResponse.ServerResponse.Header or (if a response
4139// was returned at all) in error.(*googleapi.Error).Header. Use
4140// googleapi.IsNotModified to check whether the returned error was
4141// because http.StatusNotModified was returned.
4142func (c *ContactGroupsListCall) Do(opts ...googleapi.CallOption) (*ListContactGroupsResponse, error) {
4143	gensupport.SetOptions(c.urlParams_, opts...)
4144	res, err := c.doRequest("json")
4145	if res != nil && res.StatusCode == http.StatusNotModified {
4146		if res.Body != nil {
4147			res.Body.Close()
4148		}
4149		return nil, &googleapi.Error{
4150			Code:   res.StatusCode,
4151			Header: res.Header,
4152		}
4153	}
4154	if err != nil {
4155		return nil, err
4156	}
4157	defer googleapi.CloseBody(res)
4158	if err := googleapi.CheckResponse(res); err != nil {
4159		return nil, err
4160	}
4161	ret := &ListContactGroupsResponse{
4162		ServerResponse: googleapi.ServerResponse{
4163			Header:         res.Header,
4164			HTTPStatusCode: res.StatusCode,
4165		},
4166	}
4167	target := &ret
4168	if err := gensupport.DecodeResponse(target, res); err != nil {
4169		return nil, err
4170	}
4171	return ret, nil
4172	// {
4173	//   "description": "List all contact groups owned by the authenticated user. Members of the contact groups are not populated.",
4174	//   "flatPath": "v1/contactGroups",
4175	//   "httpMethod": "GET",
4176	//   "id": "people.contactGroups.list",
4177	//   "parameterOrder": [],
4178	//   "parameters": {
4179	//     "groupFields": {
4180	//       "description": "Optional. A field mask to restrict which fields on the group are returned. Defaults to `metadata`, `groupType`, `memberCount`, and `name` if not set or set to empty. Valid fields are: * clientData * groupType * memberCount * metadata * name",
4181	//       "format": "google-fieldmask",
4182	//       "location": "query",
4183	//       "type": "string"
4184	//     },
4185	//     "pageSize": {
4186	//       "description": "Optional. The maximum number of resources to return. Valid values are between 1 and 1000, inclusive. Defaults to 30 if not set or set to 0.",
4187	//       "format": "int32",
4188	//       "location": "query",
4189	//       "type": "integer"
4190	//     },
4191	//     "pageToken": {
4192	//       "description": "Optional. The next_page_token value returned from a previous call to [ListContactGroups](/people/api/rest/v1/contactgroups/list). Requests the next page of resources.",
4193	//       "location": "query",
4194	//       "type": "string"
4195	//     },
4196	//     "syncToken": {
4197	//       "description": "Optional. A sync token, returned by a previous call to `contactgroups.list`. Only resources changed since the sync token was created will be returned.",
4198	//       "location": "query",
4199	//       "type": "string"
4200	//     }
4201	//   },
4202	//   "path": "v1/contactGroups",
4203	//   "response": {
4204	//     "$ref": "ListContactGroupsResponse"
4205	//   },
4206	//   "scopes": [
4207	//     "https://www.googleapis.com/auth/contacts",
4208	//     "https://www.googleapis.com/auth/contacts.readonly"
4209	//   ]
4210	// }
4211
4212}
4213
4214// Pages invokes f for each page of results.
4215// A non-nil error returned from f will halt the iteration.
4216// The provided context supersedes any context provided to the Context method.
4217func (c *ContactGroupsListCall) Pages(ctx context.Context, f func(*ListContactGroupsResponse) error) error {
4218	c.ctx_ = ctx
4219	defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
4220	for {
4221		x, err := c.Do()
4222		if err != nil {
4223			return err
4224		}
4225		if err := f(x); err != nil {
4226			return err
4227		}
4228		if x.NextPageToken == "" {
4229			return nil
4230		}
4231		c.PageToken(x.NextPageToken)
4232	}
4233}
4234
4235// method id "people.contactGroups.update":
4236
4237type ContactGroupsUpdateCall struct {
4238	s                         *Service
4239	resourceName              string
4240	updatecontactgrouprequest *UpdateContactGroupRequest
4241	urlParams_                gensupport.URLParams
4242	ctx_                      context.Context
4243	header_                   http.Header
4244}
4245
4246// Update: Update the name of an existing contact group owned by the
4247// authenticated user. Updated contact group names must be unique to the
4248// users contact groups. Attempting to create a group with a duplicate
4249// name will return a HTTP 409 error.
4250//
4251// - resourceName: The resource name for the contact group, assigned by
4252//   the server. An ASCII string, in the form of
4253//   `contactGroups/{contact_group_id}`.
4254func (r *ContactGroupsService) Update(resourceName string, updatecontactgrouprequest *UpdateContactGroupRequest) *ContactGroupsUpdateCall {
4255	c := &ContactGroupsUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
4256	c.resourceName = resourceName
4257	c.updatecontactgrouprequest = updatecontactgrouprequest
4258	return c
4259}
4260
4261// Fields allows partial responses to be retrieved. See
4262// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
4263// for more information.
4264func (c *ContactGroupsUpdateCall) Fields(s ...googleapi.Field) *ContactGroupsUpdateCall {
4265	c.urlParams_.Set("fields", googleapi.CombineFields(s))
4266	return c
4267}
4268
4269// Context sets the context to be used in this call's Do method. Any
4270// pending HTTP request will be aborted if the provided context is
4271// canceled.
4272func (c *ContactGroupsUpdateCall) Context(ctx context.Context) *ContactGroupsUpdateCall {
4273	c.ctx_ = ctx
4274	return c
4275}
4276
4277// Header returns an http.Header that can be modified by the caller to
4278// add HTTP headers to the request.
4279func (c *ContactGroupsUpdateCall) Header() http.Header {
4280	if c.header_ == nil {
4281		c.header_ = make(http.Header)
4282	}
4283	return c.header_
4284}
4285
4286func (c *ContactGroupsUpdateCall) doRequest(alt string) (*http.Response, error) {
4287	reqHeaders := make(http.Header)
4288	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20211027")
4289	for k, v := range c.header_ {
4290		reqHeaders[k] = v
4291	}
4292	reqHeaders.Set("User-Agent", c.s.userAgent())
4293	var body io.Reader = nil
4294	body, err := googleapi.WithoutDataWrapper.JSONReader(c.updatecontactgrouprequest)
4295	if err != nil {
4296		return nil, err
4297	}
4298	reqHeaders.Set("Content-Type", "application/json")
4299	c.urlParams_.Set("alt", alt)
4300	c.urlParams_.Set("prettyPrint", "false")
4301	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+resourceName}")
4302	urls += "?" + c.urlParams_.Encode()
4303	req, err := http.NewRequest("PUT", urls, body)
4304	if err != nil {
4305		return nil, err
4306	}
4307	req.Header = reqHeaders
4308	googleapi.Expand(req.URL, map[string]string{
4309		"resourceName": c.resourceName,
4310	})
4311	return gensupport.SendRequest(c.ctx_, c.s.client, req)
4312}
4313
4314// Do executes the "people.contactGroups.update" call.
4315// Exactly one of *ContactGroup or error will be non-nil. Any non-2xx
4316// status code is an error. Response headers are in either
4317// *ContactGroup.ServerResponse.Header or (if a response was returned at
4318// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
4319// to check whether the returned error was because
4320// http.StatusNotModified was returned.
4321func (c *ContactGroupsUpdateCall) Do(opts ...googleapi.CallOption) (*ContactGroup, error) {
4322	gensupport.SetOptions(c.urlParams_, opts...)
4323	res, err := c.doRequest("json")
4324	if res != nil && res.StatusCode == http.StatusNotModified {
4325		if res.Body != nil {
4326			res.Body.Close()
4327		}
4328		return nil, &googleapi.Error{
4329			Code:   res.StatusCode,
4330			Header: res.Header,
4331		}
4332	}
4333	if err != nil {
4334		return nil, err
4335	}
4336	defer googleapi.CloseBody(res)
4337	if err := googleapi.CheckResponse(res); err != nil {
4338		return nil, err
4339	}
4340	ret := &ContactGroup{
4341		ServerResponse: googleapi.ServerResponse{
4342			Header:         res.Header,
4343			HTTPStatusCode: res.StatusCode,
4344		},
4345	}
4346	target := &ret
4347	if err := gensupport.DecodeResponse(target, res); err != nil {
4348		return nil, err
4349	}
4350	return ret, nil
4351	// {
4352	//   "description": "Update the name of an existing contact group owned by the authenticated user. Updated contact group names must be unique to the users contact groups. Attempting to create a group with a duplicate name will return a HTTP 409 error.",
4353	//   "flatPath": "v1/contactGroups/{contactGroupsId}",
4354	//   "httpMethod": "PUT",
4355	//   "id": "people.contactGroups.update",
4356	//   "parameterOrder": [
4357	//     "resourceName"
4358	//   ],
4359	//   "parameters": {
4360	//     "resourceName": {
4361	//       "description": "The resource name for the contact group, assigned by the server. An ASCII string, in the form of `contactGroups/{contact_group_id}`.",
4362	//       "location": "path",
4363	//       "pattern": "^contactGroups/[^/]+$",
4364	//       "required": true,
4365	//       "type": "string"
4366	//     }
4367	//   },
4368	//   "path": "v1/{+resourceName}",
4369	//   "request": {
4370	//     "$ref": "UpdateContactGroupRequest"
4371	//   },
4372	//   "response": {
4373	//     "$ref": "ContactGroup"
4374	//   },
4375	//   "scopes": [
4376	//     "https://www.googleapis.com/auth/contacts"
4377	//   ]
4378	// }
4379
4380}
4381
4382// method id "people.contactGroups.members.modify":
4383
4384type ContactGroupsMembersModifyCall struct {
4385	s                                *Service
4386	resourceName                     string
4387	modifycontactgroupmembersrequest *ModifyContactGroupMembersRequest
4388	urlParams_                       gensupport.URLParams
4389	ctx_                             context.Context
4390	header_                          http.Header
4391}
4392
4393// Modify: Modify the members of a contact group owned by the
4394// authenticated user. The only system contact groups that can have
4395// members added are `contactGroups/myContacts` and
4396// `contactGroups/starred`. Other system contact groups are deprecated
4397// and can only have contacts removed.
4398//
4399// - resourceName: The resource name of the contact group to modify.
4400func (r *ContactGroupsMembersService) Modify(resourceName string, modifycontactgroupmembersrequest *ModifyContactGroupMembersRequest) *ContactGroupsMembersModifyCall {
4401	c := &ContactGroupsMembersModifyCall{s: r.s, urlParams_: make(gensupport.URLParams)}
4402	c.resourceName = resourceName
4403	c.modifycontactgroupmembersrequest = modifycontactgroupmembersrequest
4404	return c
4405}
4406
4407// Fields allows partial responses to be retrieved. See
4408// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
4409// for more information.
4410func (c *ContactGroupsMembersModifyCall) Fields(s ...googleapi.Field) *ContactGroupsMembersModifyCall {
4411	c.urlParams_.Set("fields", googleapi.CombineFields(s))
4412	return c
4413}
4414
4415// Context sets the context to be used in this call's Do method. Any
4416// pending HTTP request will be aborted if the provided context is
4417// canceled.
4418func (c *ContactGroupsMembersModifyCall) Context(ctx context.Context) *ContactGroupsMembersModifyCall {
4419	c.ctx_ = ctx
4420	return c
4421}
4422
4423// Header returns an http.Header that can be modified by the caller to
4424// add HTTP headers to the request.
4425func (c *ContactGroupsMembersModifyCall) Header() http.Header {
4426	if c.header_ == nil {
4427		c.header_ = make(http.Header)
4428	}
4429	return c.header_
4430}
4431
4432func (c *ContactGroupsMembersModifyCall) doRequest(alt string) (*http.Response, error) {
4433	reqHeaders := make(http.Header)
4434	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20211027")
4435	for k, v := range c.header_ {
4436		reqHeaders[k] = v
4437	}
4438	reqHeaders.Set("User-Agent", c.s.userAgent())
4439	var body io.Reader = nil
4440	body, err := googleapi.WithoutDataWrapper.JSONReader(c.modifycontactgroupmembersrequest)
4441	if err != nil {
4442		return nil, err
4443	}
4444	reqHeaders.Set("Content-Type", "application/json")
4445	c.urlParams_.Set("alt", alt)
4446	c.urlParams_.Set("prettyPrint", "false")
4447	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+resourceName}/members:modify")
4448	urls += "?" + c.urlParams_.Encode()
4449	req, err := http.NewRequest("POST", urls, body)
4450	if err != nil {
4451		return nil, err
4452	}
4453	req.Header = reqHeaders
4454	googleapi.Expand(req.URL, map[string]string{
4455		"resourceName": c.resourceName,
4456	})
4457	return gensupport.SendRequest(c.ctx_, c.s.client, req)
4458}
4459
4460// Do executes the "people.contactGroups.members.modify" call.
4461// Exactly one of *ModifyContactGroupMembersResponse or error will be
4462// non-nil. Any non-2xx status code is an error. Response headers are in
4463// either *ModifyContactGroupMembersResponse.ServerResponse.Header or
4464// (if a response was returned at all) in
4465// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
4466// whether the returned error was because http.StatusNotModified was
4467// returned.
4468func (c *ContactGroupsMembersModifyCall) Do(opts ...googleapi.CallOption) (*ModifyContactGroupMembersResponse, error) {
4469	gensupport.SetOptions(c.urlParams_, opts...)
4470	res, err := c.doRequest("json")
4471	if res != nil && res.StatusCode == http.StatusNotModified {
4472		if res.Body != nil {
4473			res.Body.Close()
4474		}
4475		return nil, &googleapi.Error{
4476			Code:   res.StatusCode,
4477			Header: res.Header,
4478		}
4479	}
4480	if err != nil {
4481		return nil, err
4482	}
4483	defer googleapi.CloseBody(res)
4484	if err := googleapi.CheckResponse(res); err != nil {
4485		return nil, err
4486	}
4487	ret := &ModifyContactGroupMembersResponse{
4488		ServerResponse: googleapi.ServerResponse{
4489			Header:         res.Header,
4490			HTTPStatusCode: res.StatusCode,
4491		},
4492	}
4493	target := &ret
4494	if err := gensupport.DecodeResponse(target, res); err != nil {
4495		return nil, err
4496	}
4497	return ret, nil
4498	// {
4499	//   "description": "Modify the members of a contact group owned by the authenticated user. The only system contact groups that can have members added are `contactGroups/myContacts` and `contactGroups/starred`. Other system contact groups are deprecated and can only have contacts removed.",
4500	//   "flatPath": "v1/contactGroups/{contactGroupsId}/members:modify",
4501	//   "httpMethod": "POST",
4502	//   "id": "people.contactGroups.members.modify",
4503	//   "parameterOrder": [
4504	//     "resourceName"
4505	//   ],
4506	//   "parameters": {
4507	//     "resourceName": {
4508	//       "description": "Required. The resource name of the contact group to modify.",
4509	//       "location": "path",
4510	//       "pattern": "^contactGroups/[^/]+$",
4511	//       "required": true,
4512	//       "type": "string"
4513	//     }
4514	//   },
4515	//   "path": "v1/{+resourceName}/members:modify",
4516	//   "request": {
4517	//     "$ref": "ModifyContactGroupMembersRequest"
4518	//   },
4519	//   "response": {
4520	//     "$ref": "ModifyContactGroupMembersResponse"
4521	//   },
4522	//   "scopes": [
4523	//     "https://www.googleapis.com/auth/contacts"
4524	//   ]
4525	// }
4526
4527}
4528
4529// method id "people.otherContacts.copyOtherContactToMyContactsGroup":
4530
4531type OtherContactsCopyOtherContactToMyContactsGroupCall struct {
4532	s                                        *Service
4533	resourceName                             string
4534	copyothercontacttomycontactsgrouprequest *CopyOtherContactToMyContactsGroupRequest
4535	urlParams_                               gensupport.URLParams
4536	ctx_                                     context.Context
4537	header_                                  http.Header
4538}
4539
4540// CopyOtherContactToMyContactsGroup: Copies an "Other contact" to a new
4541// contact in the user's "myContacts" group
4542//
4543// - resourceName: The resource name of the "Other contact" to copy.
4544func (r *OtherContactsService) CopyOtherContactToMyContactsGroup(resourceName string, copyothercontacttomycontactsgrouprequest *CopyOtherContactToMyContactsGroupRequest) *OtherContactsCopyOtherContactToMyContactsGroupCall {
4545	c := &OtherContactsCopyOtherContactToMyContactsGroupCall{s: r.s, urlParams_: make(gensupport.URLParams)}
4546	c.resourceName = resourceName
4547	c.copyothercontacttomycontactsgrouprequest = copyothercontacttomycontactsgrouprequest
4548	return c
4549}
4550
4551// Fields allows partial responses to be retrieved. See
4552// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
4553// for more information.
4554func (c *OtherContactsCopyOtherContactToMyContactsGroupCall) Fields(s ...googleapi.Field) *OtherContactsCopyOtherContactToMyContactsGroupCall {
4555	c.urlParams_.Set("fields", googleapi.CombineFields(s))
4556	return c
4557}
4558
4559// Context sets the context to be used in this call's Do method. Any
4560// pending HTTP request will be aborted if the provided context is
4561// canceled.
4562func (c *OtherContactsCopyOtherContactToMyContactsGroupCall) Context(ctx context.Context) *OtherContactsCopyOtherContactToMyContactsGroupCall {
4563	c.ctx_ = ctx
4564	return c
4565}
4566
4567// Header returns an http.Header that can be modified by the caller to
4568// add HTTP headers to the request.
4569func (c *OtherContactsCopyOtherContactToMyContactsGroupCall) Header() http.Header {
4570	if c.header_ == nil {
4571		c.header_ = make(http.Header)
4572	}
4573	return c.header_
4574}
4575
4576func (c *OtherContactsCopyOtherContactToMyContactsGroupCall) doRequest(alt string) (*http.Response, error) {
4577	reqHeaders := make(http.Header)
4578	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20211027")
4579	for k, v := range c.header_ {
4580		reqHeaders[k] = v
4581	}
4582	reqHeaders.Set("User-Agent", c.s.userAgent())
4583	var body io.Reader = nil
4584	body, err := googleapi.WithoutDataWrapper.JSONReader(c.copyothercontacttomycontactsgrouprequest)
4585	if err != nil {
4586		return nil, err
4587	}
4588	reqHeaders.Set("Content-Type", "application/json")
4589	c.urlParams_.Set("alt", alt)
4590	c.urlParams_.Set("prettyPrint", "false")
4591	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+resourceName}:copyOtherContactToMyContactsGroup")
4592	urls += "?" + c.urlParams_.Encode()
4593	req, err := http.NewRequest("POST", urls, body)
4594	if err != nil {
4595		return nil, err
4596	}
4597	req.Header = reqHeaders
4598	googleapi.Expand(req.URL, map[string]string{
4599		"resourceName": c.resourceName,
4600	})
4601	return gensupport.SendRequest(c.ctx_, c.s.client, req)
4602}
4603
4604// Do executes the "people.otherContacts.copyOtherContactToMyContactsGroup" call.
4605// Exactly one of *Person or error will be non-nil. Any non-2xx status
4606// code is an error. Response headers are in either
4607// *Person.ServerResponse.Header or (if a response was returned at all)
4608// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
4609// check whether the returned error was because http.StatusNotModified
4610// was returned.
4611func (c *OtherContactsCopyOtherContactToMyContactsGroupCall) Do(opts ...googleapi.CallOption) (*Person, error) {
4612	gensupport.SetOptions(c.urlParams_, opts...)
4613	res, err := c.doRequest("json")
4614	if res != nil && res.StatusCode == http.StatusNotModified {
4615		if res.Body != nil {
4616			res.Body.Close()
4617		}
4618		return nil, &googleapi.Error{
4619			Code:   res.StatusCode,
4620			Header: res.Header,
4621		}
4622	}
4623	if err != nil {
4624		return nil, err
4625	}
4626	defer googleapi.CloseBody(res)
4627	if err := googleapi.CheckResponse(res); err != nil {
4628		return nil, err
4629	}
4630	ret := &Person{
4631		ServerResponse: googleapi.ServerResponse{
4632			Header:         res.Header,
4633			HTTPStatusCode: res.StatusCode,
4634		},
4635	}
4636	target := &ret
4637	if err := gensupport.DecodeResponse(target, res); err != nil {
4638		return nil, err
4639	}
4640	return ret, nil
4641	// {
4642	//   "description": "Copies an \"Other contact\" to a new contact in the user's \"myContacts\" group",
4643	//   "flatPath": "v1/otherContacts/{otherContactsId}:copyOtherContactToMyContactsGroup",
4644	//   "httpMethod": "POST",
4645	//   "id": "people.otherContacts.copyOtherContactToMyContactsGroup",
4646	//   "parameterOrder": [
4647	//     "resourceName"
4648	//   ],
4649	//   "parameters": {
4650	//     "resourceName": {
4651	//       "description": "Required. The resource name of the \"Other contact\" to copy.",
4652	//       "location": "path",
4653	//       "pattern": "^otherContacts/[^/]+$",
4654	//       "required": true,
4655	//       "type": "string"
4656	//     }
4657	//   },
4658	//   "path": "v1/{+resourceName}:copyOtherContactToMyContactsGroup",
4659	//   "request": {
4660	//     "$ref": "CopyOtherContactToMyContactsGroupRequest"
4661	//   },
4662	//   "response": {
4663	//     "$ref": "Person"
4664	//   },
4665	//   "scopes": [
4666	//     "https://www.googleapis.com/auth/contacts",
4667	//     "https://www.googleapis.com/auth/contacts.other.readonly"
4668	//   ]
4669	// }
4670
4671}
4672
4673// method id "people.otherContacts.list":
4674
4675type OtherContactsListCall struct {
4676	s            *Service
4677	urlParams_   gensupport.URLParams
4678	ifNoneMatch_ string
4679	ctx_         context.Context
4680	header_      http.Header
4681}
4682
4683// List: List all "Other contacts", that is contacts that are not in a
4684// contact group. "Other contacts" are typically auto created contacts
4685// from interactions. Sync tokens expire 7 days after the full sync. A
4686// request with an expired sync token will result in a 410 error. In the
4687// case of such an error clients should make a full sync request without
4688// a `sync_token`. The first page of a full sync request has an
4689// additional quota. If the quota is exceeded, a 429 error will be
4690// returned. This quota is fixed and can not be increased. When the
4691// `sync_token` is specified, resources deleted since the last sync will
4692// be returned as a person with `PersonMetadata.deleted` set to true.
4693// When the `page_token` or `sync_token` is specified, all other request
4694// parameters must match the first call. Writes may have a propagation
4695// delay of several minutes for sync requests. Incremental syncs are not
4696// intended for read-after-write use cases. See example usage at List
4697// the user's other contacts that have changed
4698// (/people/v1/other-contacts#list_the_users_other_contacts_that_have_cha
4699// nged).
4700func (r *OtherContactsService) List() *OtherContactsListCall {
4701	c := &OtherContactsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
4702	return c
4703}
4704
4705// PageSize sets the optional parameter "pageSize": The number of "Other
4706// contacts" to include in the response. Valid values are between 1 and
4707// 1000, inclusive. Defaults to 100 if not set or set to 0.
4708func (c *OtherContactsListCall) PageSize(pageSize int64) *OtherContactsListCall {
4709	c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
4710	return c
4711}
4712
4713// PageToken sets the optional parameter "pageToken": A page token,
4714// received from a previous response `next_page_token`. Provide this to
4715// retrieve the subsequent page. When paginating, all other parameters
4716// provided to `otherContacts.list` must match the first call that
4717// provided the page token.
4718func (c *OtherContactsListCall) PageToken(pageToken string) *OtherContactsListCall {
4719	c.urlParams_.Set("pageToken", pageToken)
4720	return c
4721}
4722
4723// ReadMask sets the optional parameter "readMask": Required. A field
4724// mask to restrict which fields on each person are returned. Multiple
4725// fields can be specified by separating them with commas. What values
4726// are valid depend on what ReadSourceType is used. If
4727// READ_SOURCE_TYPE_CONTACT is used, valid values are: * emailAddresses
4728// * metadata * names * phoneNumbers * photos If
4729// READ_SOURCE_TYPE_PROFILE is used, valid values are: * addresses *
4730// ageRanges * biographies * birthdays * calendarUrls * clientData *
4731// coverPhotos * emailAddresses * events * externalIds * genders *
4732// imClients * interests * locales * locations * memberships * metadata
4733// * miscKeywords * names * nicknames * occupations * organizations *
4734// phoneNumbers * photos * relations * sipAddresses * skills * urls *
4735// userDefined
4736func (c *OtherContactsListCall) ReadMask(readMask string) *OtherContactsListCall {
4737	c.urlParams_.Set("readMask", readMask)
4738	return c
4739}
4740
4741// RequestSyncToken sets the optional parameter "requestSyncToken":
4742// Whether the response should return `next_sync_token` on the last page
4743// of results. It can be used to get incremental changes since the last
4744// request by setting it on the request `sync_token`. More details about
4745// sync behavior at `otherContacts.list`.
4746func (c *OtherContactsListCall) RequestSyncToken(requestSyncToken bool) *OtherContactsListCall {
4747	c.urlParams_.Set("requestSyncToken", fmt.Sprint(requestSyncToken))
4748	return c
4749}
4750
4751// Sources sets the optional parameter "sources": A mask of what source
4752// types to return. Defaults to READ_SOURCE_TYPE_CONTACT if not set.
4753//
4754// Possible values:
4755//   "READ_SOURCE_TYPE_UNSPECIFIED" - Unspecified.
4756//   "READ_SOURCE_TYPE_PROFILE" - Returns SourceType.ACCOUNT,
4757// SourceType.DOMAIN_PROFILE, and SourceType.PROFILE.
4758//   "READ_SOURCE_TYPE_CONTACT" - Returns SourceType.CONTACT.
4759//   "READ_SOURCE_TYPE_DOMAIN_CONTACT" - Returns
4760// SourceType.DOMAIN_CONTACT.
4761func (c *OtherContactsListCall) Sources(sources ...string) *OtherContactsListCall {
4762	c.urlParams_.SetMulti("sources", append([]string{}, sources...))
4763	return c
4764}
4765
4766// SyncToken sets the optional parameter "syncToken": A sync token,
4767// received from a previous response `next_sync_token` Provide this to
4768// retrieve only the resources changed since the last request. When
4769// syncing, all other parameters provided to `otherContacts.list` must
4770// match the first call that provided the sync token. More details about
4771// sync behavior at `otherContacts.list`.
4772func (c *OtherContactsListCall) SyncToken(syncToken string) *OtherContactsListCall {
4773	c.urlParams_.Set("syncToken", syncToken)
4774	return c
4775}
4776
4777// Fields allows partial responses to be retrieved. See
4778// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
4779// for more information.
4780func (c *OtherContactsListCall) Fields(s ...googleapi.Field) *OtherContactsListCall {
4781	c.urlParams_.Set("fields", googleapi.CombineFields(s))
4782	return c
4783}
4784
4785// IfNoneMatch sets the optional parameter which makes the operation
4786// fail if the object's ETag matches the given value. This is useful for
4787// getting updates only after the object has changed since the last
4788// request. Use googleapi.IsNotModified to check whether the response
4789// error from Do is the result of In-None-Match.
4790func (c *OtherContactsListCall) IfNoneMatch(entityTag string) *OtherContactsListCall {
4791	c.ifNoneMatch_ = entityTag
4792	return c
4793}
4794
4795// Context sets the context to be used in this call's Do method. Any
4796// pending HTTP request will be aborted if the provided context is
4797// canceled.
4798func (c *OtherContactsListCall) Context(ctx context.Context) *OtherContactsListCall {
4799	c.ctx_ = ctx
4800	return c
4801}
4802
4803// Header returns an http.Header that can be modified by the caller to
4804// add HTTP headers to the request.
4805func (c *OtherContactsListCall) Header() http.Header {
4806	if c.header_ == nil {
4807		c.header_ = make(http.Header)
4808	}
4809	return c.header_
4810}
4811
4812func (c *OtherContactsListCall) doRequest(alt string) (*http.Response, error) {
4813	reqHeaders := make(http.Header)
4814	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20211027")
4815	for k, v := range c.header_ {
4816		reqHeaders[k] = v
4817	}
4818	reqHeaders.Set("User-Agent", c.s.userAgent())
4819	if c.ifNoneMatch_ != "" {
4820		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
4821	}
4822	var body io.Reader = nil
4823	c.urlParams_.Set("alt", alt)
4824	c.urlParams_.Set("prettyPrint", "false")
4825	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/otherContacts")
4826	urls += "?" + c.urlParams_.Encode()
4827	req, err := http.NewRequest("GET", urls, body)
4828	if err != nil {
4829		return nil, err
4830	}
4831	req.Header = reqHeaders
4832	return gensupport.SendRequest(c.ctx_, c.s.client, req)
4833}
4834
4835// Do executes the "people.otherContacts.list" call.
4836// Exactly one of *ListOtherContactsResponse or error will be non-nil.
4837// Any non-2xx status code is an error. Response headers are in either
4838// *ListOtherContactsResponse.ServerResponse.Header or (if a response
4839// was returned at all) in error.(*googleapi.Error).Header. Use
4840// googleapi.IsNotModified to check whether the returned error was
4841// because http.StatusNotModified was returned.
4842func (c *OtherContactsListCall) Do(opts ...googleapi.CallOption) (*ListOtherContactsResponse, error) {
4843	gensupport.SetOptions(c.urlParams_, opts...)
4844	res, err := c.doRequest("json")
4845	if res != nil && res.StatusCode == http.StatusNotModified {
4846		if res.Body != nil {
4847			res.Body.Close()
4848		}
4849		return nil, &googleapi.Error{
4850			Code:   res.StatusCode,
4851			Header: res.Header,
4852		}
4853	}
4854	if err != nil {
4855		return nil, err
4856	}
4857	defer googleapi.CloseBody(res)
4858	if err := googleapi.CheckResponse(res); err != nil {
4859		return nil, err
4860	}
4861	ret := &ListOtherContactsResponse{
4862		ServerResponse: googleapi.ServerResponse{
4863			Header:         res.Header,
4864			HTTPStatusCode: res.StatusCode,
4865		},
4866	}
4867	target := &ret
4868	if err := gensupport.DecodeResponse(target, res); err != nil {
4869		return nil, err
4870	}
4871	return ret, nil
4872	// {
4873	//   "description": "List all \"Other contacts\", that is contacts that are not in a contact group. \"Other contacts\" are typically auto created contacts from interactions. Sync tokens expire 7 days after the full sync. A request with an expired sync token will result in a 410 error. In the case of such an error clients should make a full sync request without a `sync_token`. The first page of a full sync request has an additional quota. If the quota is exceeded, a 429 error will be returned. This quota is fixed and can not be increased. When the `sync_token` is specified, resources deleted since the last sync will be returned as a person with `PersonMetadata.deleted` set to true. When the `page_token` or `sync_token` is specified, all other request parameters must match the first call. Writes may have a propagation delay of several minutes for sync requests. Incremental syncs are not intended for read-after-write use cases. See example usage at [List the user's other contacts that have changed](/people/v1/other-contacts#list_the_users_other_contacts_that_have_changed).",
4874	//   "flatPath": "v1/otherContacts",
4875	//   "httpMethod": "GET",
4876	//   "id": "people.otherContacts.list",
4877	//   "parameterOrder": [],
4878	//   "parameters": {
4879	//     "pageSize": {
4880	//       "description": "Optional. The number of \"Other contacts\" to include in the response. Valid values are between 1 and 1000, inclusive. Defaults to 100 if not set or set to 0.",
4881	//       "format": "int32",
4882	//       "location": "query",
4883	//       "type": "integer"
4884	//     },
4885	//     "pageToken": {
4886	//       "description": "Optional. A page token, received from a previous response `next_page_token`. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to `otherContacts.list` must match the first call that provided the page token.",
4887	//       "location": "query",
4888	//       "type": "string"
4889	//     },
4890	//     "readMask": {
4891	//       "description": "Required. A field mask to restrict which fields on each person are returned. Multiple fields can be specified by separating them with commas. What values are valid depend on what ReadSourceType is used. If READ_SOURCE_TYPE_CONTACT is used, valid values are: * emailAddresses * metadata * names * phoneNumbers * photos If READ_SOURCE_TYPE_PROFILE is used, 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",
4892	//       "format": "google-fieldmask",
4893	//       "location": "query",
4894	//       "type": "string"
4895	//     },
4896	//     "requestSyncToken": {
4897	//       "description": "Optional. Whether the response should return `next_sync_token` on the last page of results. It can be used to get incremental changes since the last request by setting it on the request `sync_token`. More details about sync behavior at `otherContacts.list`.",
4898	//       "location": "query",
4899	//       "type": "boolean"
4900	//     },
4901	//     "sources": {
4902	//       "description": "Optional. A mask of what source types to return. Defaults to READ_SOURCE_TYPE_CONTACT if not set.",
4903	//       "enum": [
4904	//         "READ_SOURCE_TYPE_UNSPECIFIED",
4905	//         "READ_SOURCE_TYPE_PROFILE",
4906	//         "READ_SOURCE_TYPE_CONTACT",
4907	//         "READ_SOURCE_TYPE_DOMAIN_CONTACT"
4908	//       ],
4909	//       "enumDescriptions": [
4910	//         "Unspecified.",
4911	//         "Returns SourceType.ACCOUNT, SourceType.DOMAIN_PROFILE, and SourceType.PROFILE.",
4912	//         "Returns SourceType.CONTACT.",
4913	//         "Returns SourceType.DOMAIN_CONTACT."
4914	//       ],
4915	//       "location": "query",
4916	//       "repeated": true,
4917	//       "type": "string"
4918	//     },
4919	//     "syncToken": {
4920	//       "description": "Optional. A sync token, received from a previous response `next_sync_token` Provide this to retrieve only the resources changed since the last request. When syncing, all other parameters provided to `otherContacts.list` must match the first call that provided the sync token. More details about sync behavior at `otherContacts.list`.",
4921	//       "location": "query",
4922	//       "type": "string"
4923	//     }
4924	//   },
4925	//   "path": "v1/otherContacts",
4926	//   "response": {
4927	//     "$ref": "ListOtherContactsResponse"
4928	//   },
4929	//   "scopes": [
4930	//     "https://www.googleapis.com/auth/contacts.other.readonly"
4931	//   ]
4932	// }
4933
4934}
4935
4936// Pages invokes f for each page of results.
4937// A non-nil error returned from f will halt the iteration.
4938// The provided context supersedes any context provided to the Context method.
4939func (c *OtherContactsListCall) Pages(ctx context.Context, f func(*ListOtherContactsResponse) error) error {
4940	c.ctx_ = ctx
4941	defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
4942	for {
4943		x, err := c.Do()
4944		if err != nil {
4945			return err
4946		}
4947		if err := f(x); err != nil {
4948			return err
4949		}
4950		if x.NextPageToken == "" {
4951			return nil
4952		}
4953		c.PageToken(x.NextPageToken)
4954	}
4955}
4956
4957// method id "people.otherContacts.search":
4958
4959type OtherContactsSearchCall struct {
4960	s            *Service
4961	urlParams_   gensupport.URLParams
4962	ifNoneMatch_ string
4963	ctx_         context.Context
4964	header_      http.Header
4965}
4966
4967// Search: Provides a list of contacts in the authenticated user's other
4968// contacts that matches the search query. The query matches on a
4969// contact's `names`, `emailAddresses`, and `phoneNumbers` fields that
4970// are from the OTHER_CONTACT source. **IMPORTANT**: Before searching,
4971// clients should send a warmup request with an empty query to update
4972// the cache. See
4973// https://developers.google.com/people/v1/other-contacts#search_the_users_other_contacts
4974func (r *OtherContactsService) Search() *OtherContactsSearchCall {
4975	c := &OtherContactsSearchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
4976	return c
4977}
4978
4979// PageSize sets the optional parameter "pageSize": The number of
4980// results to return. Defaults to 10 if field is not set, or set to 0.
4981// Values greater than 30 will be capped to 30.
4982func (c *OtherContactsSearchCall) PageSize(pageSize int64) *OtherContactsSearchCall {
4983	c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
4984	return c
4985}
4986
4987// Query sets the optional parameter "query": Required. The plain-text
4988// query for the request. The query is used to match prefix phrases of
4989// the fields on a person. For example, a person with name "foo name"
4990// matches queries such as "f", "fo", "foo", "foo n", "nam", etc., but
4991// not "oo n".
4992func (c *OtherContactsSearchCall) Query(query string) *OtherContactsSearchCall {
4993	c.urlParams_.Set("query", query)
4994	return c
4995}
4996
4997// ReadMask sets the optional parameter "readMask": Required. A field
4998// mask to restrict which fields on each person are returned. Multiple
4999// fields can be specified by separating them with commas. Valid values
5000// are: * emailAddresses * metadata * names * phoneNumbers
5001func (c *OtherContactsSearchCall) ReadMask(readMask string) *OtherContactsSearchCall {
5002	c.urlParams_.Set("readMask", readMask)
5003	return c
5004}
5005
5006// Fields allows partial responses to be retrieved. See
5007// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
5008// for more information.
5009func (c *OtherContactsSearchCall) Fields(s ...googleapi.Field) *OtherContactsSearchCall {
5010	c.urlParams_.Set("fields", googleapi.CombineFields(s))
5011	return c
5012}
5013
5014// IfNoneMatch sets the optional parameter which makes the operation
5015// fail if the object's ETag matches the given value. This is useful for
5016// getting updates only after the object has changed since the last
5017// request. Use googleapi.IsNotModified to check whether the response
5018// error from Do is the result of In-None-Match.
5019func (c *OtherContactsSearchCall) IfNoneMatch(entityTag string) *OtherContactsSearchCall {
5020	c.ifNoneMatch_ = entityTag
5021	return c
5022}
5023
5024// Context sets the context to be used in this call's Do method. Any
5025// pending HTTP request will be aborted if the provided context is
5026// canceled.
5027func (c *OtherContactsSearchCall) Context(ctx context.Context) *OtherContactsSearchCall {
5028	c.ctx_ = ctx
5029	return c
5030}
5031
5032// Header returns an http.Header that can be modified by the caller to
5033// add HTTP headers to the request.
5034func (c *OtherContactsSearchCall) Header() http.Header {
5035	if c.header_ == nil {
5036		c.header_ = make(http.Header)
5037	}
5038	return c.header_
5039}
5040
5041func (c *OtherContactsSearchCall) doRequest(alt string) (*http.Response, error) {
5042	reqHeaders := make(http.Header)
5043	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20211027")
5044	for k, v := range c.header_ {
5045		reqHeaders[k] = v
5046	}
5047	reqHeaders.Set("User-Agent", c.s.userAgent())
5048	if c.ifNoneMatch_ != "" {
5049		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
5050	}
5051	var body io.Reader = nil
5052	c.urlParams_.Set("alt", alt)
5053	c.urlParams_.Set("prettyPrint", "false")
5054	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/otherContacts:search")
5055	urls += "?" + c.urlParams_.Encode()
5056	req, err := http.NewRequest("GET", urls, body)
5057	if err != nil {
5058		return nil, err
5059	}
5060	req.Header = reqHeaders
5061	return gensupport.SendRequest(c.ctx_, c.s.client, req)
5062}
5063
5064// Do executes the "people.otherContacts.search" call.
5065// Exactly one of *SearchResponse or error will be non-nil. Any non-2xx
5066// status code is an error. Response headers are in either
5067// *SearchResponse.ServerResponse.Header or (if a response was returned
5068// at all) in error.(*googleapi.Error).Header. Use
5069// googleapi.IsNotModified to check whether the returned error was
5070// because http.StatusNotModified was returned.
5071func (c *OtherContactsSearchCall) Do(opts ...googleapi.CallOption) (*SearchResponse, error) {
5072	gensupport.SetOptions(c.urlParams_, opts...)
5073	res, err := c.doRequest("json")
5074	if res != nil && res.StatusCode == http.StatusNotModified {
5075		if res.Body != nil {
5076			res.Body.Close()
5077		}
5078		return nil, &googleapi.Error{
5079			Code:   res.StatusCode,
5080			Header: res.Header,
5081		}
5082	}
5083	if err != nil {
5084		return nil, err
5085	}
5086	defer googleapi.CloseBody(res)
5087	if err := googleapi.CheckResponse(res); err != nil {
5088		return nil, err
5089	}
5090	ret := &SearchResponse{
5091		ServerResponse: googleapi.ServerResponse{
5092			Header:         res.Header,
5093			HTTPStatusCode: res.StatusCode,
5094		},
5095	}
5096	target := &ret
5097	if err := gensupport.DecodeResponse(target, res); err != nil {
5098		return nil, err
5099	}
5100	return ret, nil
5101	// {
5102	//   "description": "Provides a list of contacts in the authenticated user's other contacts that matches the search query. The query matches on a contact's `names`, `emailAddresses`, and `phoneNumbers` fields that are from the OTHER_CONTACT source. **IMPORTANT**: Before searching, clients should send a warmup request with an empty query to update the cache. See https://developers.google.com/people/v1/other-contacts#search_the_users_other_contacts",
5103	//   "flatPath": "v1/otherContacts:search",
5104	//   "httpMethod": "GET",
5105	//   "id": "people.otherContacts.search",
5106	//   "parameterOrder": [],
5107	//   "parameters": {
5108	//     "pageSize": {
5109	//       "description": "Optional. The number of results to return. Defaults to 10 if field is not set, or set to 0. Values greater than 30 will be capped to 30.",
5110	//       "format": "int32",
5111	//       "location": "query",
5112	//       "type": "integer"
5113	//     },
5114	//     "query": {
5115	//       "description": "Required. The plain-text query for the request. The query is used to match prefix phrases of the fields on a person. For example, a person with name \"foo name\" matches queries such as \"f\", \"fo\", \"foo\", \"foo n\", \"nam\", etc., but not \"oo n\".",
5116	//       "location": "query",
5117	//       "type": "string"
5118	//     },
5119	//     "readMask": {
5120	//       "description": "Required. A field mask to restrict which fields on each person are returned. Multiple fields can be specified by separating them with commas. Valid values are: * emailAddresses * metadata * names * phoneNumbers",
5121	//       "format": "google-fieldmask",
5122	//       "location": "query",
5123	//       "type": "string"
5124	//     }
5125	//   },
5126	//   "path": "v1/otherContacts:search",
5127	//   "response": {
5128	//     "$ref": "SearchResponse"
5129	//   },
5130	//   "scopes": [
5131	//     "https://www.googleapis.com/auth/contacts.other.readonly"
5132	//   ]
5133	// }
5134
5135}
5136
5137// method id "people.people.batchCreateContacts":
5138
5139type PeopleBatchCreateContactsCall struct {
5140	s                          *Service
5141	batchcreatecontactsrequest *BatchCreateContactsRequest
5142	urlParams_                 gensupport.URLParams
5143	ctx_                       context.Context
5144	header_                    http.Header
5145}
5146
5147// BatchCreateContacts: Create a batch of new contacts and return the
5148// PersonResponses for the newly created contacts. Limited to 10
5149// parallel requests per user.
5150func (r *PeopleService) BatchCreateContacts(batchcreatecontactsrequest *BatchCreateContactsRequest) *PeopleBatchCreateContactsCall {
5151	c := &PeopleBatchCreateContactsCall{s: r.s, urlParams_: make(gensupport.URLParams)}
5152	c.batchcreatecontactsrequest = batchcreatecontactsrequest
5153	return c
5154}
5155
5156// Fields allows partial responses to be retrieved. See
5157// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
5158// for more information.
5159func (c *PeopleBatchCreateContactsCall) Fields(s ...googleapi.Field) *PeopleBatchCreateContactsCall {
5160	c.urlParams_.Set("fields", googleapi.CombineFields(s))
5161	return c
5162}
5163
5164// Context sets the context to be used in this call's Do method. Any
5165// pending HTTP request will be aborted if the provided context is
5166// canceled.
5167func (c *PeopleBatchCreateContactsCall) Context(ctx context.Context) *PeopleBatchCreateContactsCall {
5168	c.ctx_ = ctx
5169	return c
5170}
5171
5172// Header returns an http.Header that can be modified by the caller to
5173// add HTTP headers to the request.
5174func (c *PeopleBatchCreateContactsCall) Header() http.Header {
5175	if c.header_ == nil {
5176		c.header_ = make(http.Header)
5177	}
5178	return c.header_
5179}
5180
5181func (c *PeopleBatchCreateContactsCall) doRequest(alt string) (*http.Response, error) {
5182	reqHeaders := make(http.Header)
5183	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20211027")
5184	for k, v := range c.header_ {
5185		reqHeaders[k] = v
5186	}
5187	reqHeaders.Set("User-Agent", c.s.userAgent())
5188	var body io.Reader = nil
5189	body, err := googleapi.WithoutDataWrapper.JSONReader(c.batchcreatecontactsrequest)
5190	if err != nil {
5191		return nil, err
5192	}
5193	reqHeaders.Set("Content-Type", "application/json")
5194	c.urlParams_.Set("alt", alt)
5195	c.urlParams_.Set("prettyPrint", "false")
5196	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/people:batchCreateContacts")
5197	urls += "?" + c.urlParams_.Encode()
5198	req, err := http.NewRequest("POST", urls, body)
5199	if err != nil {
5200		return nil, err
5201	}
5202	req.Header = reqHeaders
5203	return gensupport.SendRequest(c.ctx_, c.s.client, req)
5204}
5205
5206// Do executes the "people.people.batchCreateContacts" call.
5207// Exactly one of *BatchCreateContactsResponse or error will be non-nil.
5208// Any non-2xx status code is an error. Response headers are in either
5209// *BatchCreateContactsResponse.ServerResponse.Header or (if a response
5210// was returned at all) in error.(*googleapi.Error).Header. Use
5211// googleapi.IsNotModified to check whether the returned error was
5212// because http.StatusNotModified was returned.
5213func (c *PeopleBatchCreateContactsCall) Do(opts ...googleapi.CallOption) (*BatchCreateContactsResponse, error) {
5214	gensupport.SetOptions(c.urlParams_, opts...)
5215	res, err := c.doRequest("json")
5216	if res != nil && res.StatusCode == http.StatusNotModified {
5217		if res.Body != nil {
5218			res.Body.Close()
5219		}
5220		return nil, &googleapi.Error{
5221			Code:   res.StatusCode,
5222			Header: res.Header,
5223		}
5224	}
5225	if err != nil {
5226		return nil, err
5227	}
5228	defer googleapi.CloseBody(res)
5229	if err := googleapi.CheckResponse(res); err != nil {
5230		return nil, err
5231	}
5232	ret := &BatchCreateContactsResponse{
5233		ServerResponse: googleapi.ServerResponse{
5234			Header:         res.Header,
5235			HTTPStatusCode: res.StatusCode,
5236		},
5237	}
5238	target := &ret
5239	if err := gensupport.DecodeResponse(target, res); err != nil {
5240		return nil, err
5241	}
5242	return ret, nil
5243	// {
5244	//   "description": "Create a batch of new contacts and return the PersonResponses for the newly created contacts. Limited to 10 parallel requests per user.",
5245	//   "flatPath": "v1/people:batchCreateContacts",
5246	//   "httpMethod": "POST",
5247	//   "id": "people.people.batchCreateContacts",
5248	//   "parameterOrder": [],
5249	//   "parameters": {},
5250	//   "path": "v1/people:batchCreateContacts",
5251	//   "request": {
5252	//     "$ref": "BatchCreateContactsRequest"
5253	//   },
5254	//   "response": {
5255	//     "$ref": "BatchCreateContactsResponse"
5256	//   },
5257	//   "scopes": [
5258	//     "https://www.googleapis.com/auth/contacts"
5259	//   ]
5260	// }
5261
5262}
5263
5264// method id "people.people.batchDeleteContacts":
5265
5266type PeopleBatchDeleteContactsCall struct {
5267	s                          *Service
5268	batchdeletecontactsrequest *BatchDeleteContactsRequest
5269	urlParams_                 gensupport.URLParams
5270	ctx_                       context.Context
5271	header_                    http.Header
5272}
5273
5274// BatchDeleteContacts: Delete a batch of contacts. Any non-contact data
5275// will not be deleted. Limited to 10 parallel requests per user.
5276func (r *PeopleService) BatchDeleteContacts(batchdeletecontactsrequest *BatchDeleteContactsRequest) *PeopleBatchDeleteContactsCall {
5277	c := &PeopleBatchDeleteContactsCall{s: r.s, urlParams_: make(gensupport.URLParams)}
5278	c.batchdeletecontactsrequest = batchdeletecontactsrequest
5279	return c
5280}
5281
5282// Fields allows partial responses to be retrieved. See
5283// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
5284// for more information.
5285func (c *PeopleBatchDeleteContactsCall) Fields(s ...googleapi.Field) *PeopleBatchDeleteContactsCall {
5286	c.urlParams_.Set("fields", googleapi.CombineFields(s))
5287	return c
5288}
5289
5290// Context sets the context to be used in this call's Do method. Any
5291// pending HTTP request will be aborted if the provided context is
5292// canceled.
5293func (c *PeopleBatchDeleteContactsCall) Context(ctx context.Context) *PeopleBatchDeleteContactsCall {
5294	c.ctx_ = ctx
5295	return c
5296}
5297
5298// Header returns an http.Header that can be modified by the caller to
5299// add HTTP headers to the request.
5300func (c *PeopleBatchDeleteContactsCall) Header() http.Header {
5301	if c.header_ == nil {
5302		c.header_ = make(http.Header)
5303	}
5304	return c.header_
5305}
5306
5307func (c *PeopleBatchDeleteContactsCall) doRequest(alt string) (*http.Response, error) {
5308	reqHeaders := make(http.Header)
5309	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20211027")
5310	for k, v := range c.header_ {
5311		reqHeaders[k] = v
5312	}
5313	reqHeaders.Set("User-Agent", c.s.userAgent())
5314	var body io.Reader = nil
5315	body, err := googleapi.WithoutDataWrapper.JSONReader(c.batchdeletecontactsrequest)
5316	if err != nil {
5317		return nil, err
5318	}
5319	reqHeaders.Set("Content-Type", "application/json")
5320	c.urlParams_.Set("alt", alt)
5321	c.urlParams_.Set("prettyPrint", "false")
5322	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/people:batchDeleteContacts")
5323	urls += "?" + c.urlParams_.Encode()
5324	req, err := http.NewRequest("POST", urls, body)
5325	if err != nil {
5326		return nil, err
5327	}
5328	req.Header = reqHeaders
5329	return gensupport.SendRequest(c.ctx_, c.s.client, req)
5330}
5331
5332// Do executes the "people.people.batchDeleteContacts" call.
5333// Exactly one of *Empty or error will be non-nil. Any non-2xx status
5334// code is an error. Response headers are in either
5335// *Empty.ServerResponse.Header or (if a response was returned at all)
5336// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
5337// check whether the returned error was because http.StatusNotModified
5338// was returned.
5339func (c *PeopleBatchDeleteContactsCall) Do(opts ...googleapi.CallOption) (*Empty, error) {
5340	gensupport.SetOptions(c.urlParams_, opts...)
5341	res, err := c.doRequest("json")
5342	if res != nil && res.StatusCode == http.StatusNotModified {
5343		if res.Body != nil {
5344			res.Body.Close()
5345		}
5346		return nil, &googleapi.Error{
5347			Code:   res.StatusCode,
5348			Header: res.Header,
5349		}
5350	}
5351	if err != nil {
5352		return nil, err
5353	}
5354	defer googleapi.CloseBody(res)
5355	if err := googleapi.CheckResponse(res); err != nil {
5356		return nil, err
5357	}
5358	ret := &Empty{
5359		ServerResponse: googleapi.ServerResponse{
5360			Header:         res.Header,
5361			HTTPStatusCode: res.StatusCode,
5362		},
5363	}
5364	target := &ret
5365	if err := gensupport.DecodeResponse(target, res); err != nil {
5366		return nil, err
5367	}
5368	return ret, nil
5369	// {
5370	//   "description": "Delete a batch of contacts. Any non-contact data will not be deleted. Limited to 10 parallel requests per user.",
5371	//   "flatPath": "v1/people:batchDeleteContacts",
5372	//   "httpMethod": "POST",
5373	//   "id": "people.people.batchDeleteContacts",
5374	//   "parameterOrder": [],
5375	//   "parameters": {},
5376	//   "path": "v1/people:batchDeleteContacts",
5377	//   "request": {
5378	//     "$ref": "BatchDeleteContactsRequest"
5379	//   },
5380	//   "response": {
5381	//     "$ref": "Empty"
5382	//   },
5383	//   "scopes": [
5384	//     "https://www.googleapis.com/auth/contacts"
5385	//   ]
5386	// }
5387
5388}
5389
5390// method id "people.people.batchUpdateContacts":
5391
5392type PeopleBatchUpdateContactsCall struct {
5393	s                          *Service
5394	batchupdatecontactsrequest *BatchUpdateContactsRequest
5395	urlParams_                 gensupport.URLParams
5396	ctx_                       context.Context
5397	header_                    http.Header
5398}
5399
5400// BatchUpdateContacts: Update a batch of contacts and return a map of
5401// resource names to PersonResponses for the updated contacts. Limited
5402// to 10 parallel requests per user.
5403func (r *PeopleService) BatchUpdateContacts(batchupdatecontactsrequest *BatchUpdateContactsRequest) *PeopleBatchUpdateContactsCall {
5404	c := &PeopleBatchUpdateContactsCall{s: r.s, urlParams_: make(gensupport.URLParams)}
5405	c.batchupdatecontactsrequest = batchupdatecontactsrequest
5406	return c
5407}
5408
5409// Fields allows partial responses to be retrieved. See
5410// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
5411// for more information.
5412func (c *PeopleBatchUpdateContactsCall) Fields(s ...googleapi.Field) *PeopleBatchUpdateContactsCall {
5413	c.urlParams_.Set("fields", googleapi.CombineFields(s))
5414	return c
5415}
5416
5417// Context sets the context to be used in this call's Do method. Any
5418// pending HTTP request will be aborted if the provided context is
5419// canceled.
5420func (c *PeopleBatchUpdateContactsCall) Context(ctx context.Context) *PeopleBatchUpdateContactsCall {
5421	c.ctx_ = ctx
5422	return c
5423}
5424
5425// Header returns an http.Header that can be modified by the caller to
5426// add HTTP headers to the request.
5427func (c *PeopleBatchUpdateContactsCall) Header() http.Header {
5428	if c.header_ == nil {
5429		c.header_ = make(http.Header)
5430	}
5431	return c.header_
5432}
5433
5434func (c *PeopleBatchUpdateContactsCall) doRequest(alt string) (*http.Response, error) {
5435	reqHeaders := make(http.Header)
5436	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20211027")
5437	for k, v := range c.header_ {
5438		reqHeaders[k] = v
5439	}
5440	reqHeaders.Set("User-Agent", c.s.userAgent())
5441	var body io.Reader = nil
5442	body, err := googleapi.WithoutDataWrapper.JSONReader(c.batchupdatecontactsrequest)
5443	if err != nil {
5444		return nil, err
5445	}
5446	reqHeaders.Set("Content-Type", "application/json")
5447	c.urlParams_.Set("alt", alt)
5448	c.urlParams_.Set("prettyPrint", "false")
5449	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/people:batchUpdateContacts")
5450	urls += "?" + c.urlParams_.Encode()
5451	req, err := http.NewRequest("POST", urls, body)
5452	if err != nil {
5453		return nil, err
5454	}
5455	req.Header = reqHeaders
5456	return gensupport.SendRequest(c.ctx_, c.s.client, req)
5457}
5458
5459// Do executes the "people.people.batchUpdateContacts" call.
5460// Exactly one of *BatchUpdateContactsResponse or error will be non-nil.
5461// Any non-2xx status code is an error. Response headers are in either
5462// *BatchUpdateContactsResponse.ServerResponse.Header or (if a response
5463// was returned at all) in error.(*googleapi.Error).Header. Use
5464// googleapi.IsNotModified to check whether the returned error was
5465// because http.StatusNotModified was returned.
5466func (c *PeopleBatchUpdateContactsCall) Do(opts ...googleapi.CallOption) (*BatchUpdateContactsResponse, error) {
5467	gensupport.SetOptions(c.urlParams_, opts...)
5468	res, err := c.doRequest("json")
5469	if res != nil && res.StatusCode == http.StatusNotModified {
5470		if res.Body != nil {
5471			res.Body.Close()
5472		}
5473		return nil, &googleapi.Error{
5474			Code:   res.StatusCode,
5475			Header: res.Header,
5476		}
5477	}
5478	if err != nil {
5479		return nil, err
5480	}
5481	defer googleapi.CloseBody(res)
5482	if err := googleapi.CheckResponse(res); err != nil {
5483		return nil, err
5484	}
5485	ret := &BatchUpdateContactsResponse{
5486		ServerResponse: googleapi.ServerResponse{
5487			Header:         res.Header,
5488			HTTPStatusCode: res.StatusCode,
5489		},
5490	}
5491	target := &ret
5492	if err := gensupport.DecodeResponse(target, res); err != nil {
5493		return nil, err
5494	}
5495	return ret, nil
5496	// {
5497	//   "description": "Update a batch of contacts and return a map of resource names to PersonResponses for the updated contacts. Limited to 10 parallel requests per user.",
5498	//   "flatPath": "v1/people:batchUpdateContacts",
5499	//   "httpMethod": "POST",
5500	//   "id": "people.people.batchUpdateContacts",
5501	//   "parameterOrder": [],
5502	//   "parameters": {},
5503	//   "path": "v1/people:batchUpdateContacts",
5504	//   "request": {
5505	//     "$ref": "BatchUpdateContactsRequest"
5506	//   },
5507	//   "response": {
5508	//     "$ref": "BatchUpdateContactsResponse"
5509	//   },
5510	//   "scopes": [
5511	//     "https://www.googleapis.com/auth/contacts"
5512	//   ]
5513	// }
5514
5515}
5516
5517// method id "people.people.createContact":
5518
5519type PeopleCreateContactCall struct {
5520	s          *Service
5521	person     *Person
5522	urlParams_ gensupport.URLParams
5523	ctx_       context.Context
5524	header_    http.Header
5525}
5526
5527// CreateContact: Create a new contact and return the person resource
5528// for that contact. The request returns a 400 error if more than one
5529// field is specified on a field that is a singleton for contact
5530// sources: * biographies * birthdays * genders * names
5531func (r *PeopleService) CreateContact(person *Person) *PeopleCreateContactCall {
5532	c := &PeopleCreateContactCall{s: r.s, urlParams_: make(gensupport.URLParams)}
5533	c.person = person
5534	return c
5535}
5536
5537// PersonFields sets the optional parameter "personFields": Required. A
5538// field mask to restrict which fields on each person are returned.
5539// Multiple fields can be specified by separating them with commas.
5540// Defaults to all fields if not set. Valid values are: * addresses *
5541// ageRanges * biographies * birthdays * calendarUrls * clientData *
5542// coverPhotos * emailAddresses * events * externalIds * genders *
5543// imClients * interests * locales * locations * memberships * metadata
5544// * miscKeywords * names * nicknames * occupations * organizations *
5545// phoneNumbers * photos * relations * sipAddresses * skills * urls *
5546// userDefined
5547func (c *PeopleCreateContactCall) PersonFields(personFields string) *PeopleCreateContactCall {
5548	c.urlParams_.Set("personFields", personFields)
5549	return c
5550}
5551
5552// Sources sets the optional parameter "sources": A mask of what source
5553// types to return. Defaults to READ_SOURCE_TYPE_CONTACT and
5554// READ_SOURCE_TYPE_PROFILE if not set.
5555//
5556// Possible values:
5557//   "READ_SOURCE_TYPE_UNSPECIFIED" - Unspecified.
5558//   "READ_SOURCE_TYPE_PROFILE" - Returns SourceType.ACCOUNT,
5559// SourceType.DOMAIN_PROFILE, and SourceType.PROFILE.
5560//   "READ_SOURCE_TYPE_CONTACT" - Returns SourceType.CONTACT.
5561//   "READ_SOURCE_TYPE_DOMAIN_CONTACT" - Returns
5562// SourceType.DOMAIN_CONTACT.
5563func (c *PeopleCreateContactCall) Sources(sources ...string) *PeopleCreateContactCall {
5564	c.urlParams_.SetMulti("sources", append([]string{}, sources...))
5565	return c
5566}
5567
5568// Fields allows partial responses to be retrieved. See
5569// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
5570// for more information.
5571func (c *PeopleCreateContactCall) Fields(s ...googleapi.Field) *PeopleCreateContactCall {
5572	c.urlParams_.Set("fields", googleapi.CombineFields(s))
5573	return c
5574}
5575
5576// Context sets the context to be used in this call's Do method. Any
5577// pending HTTP request will be aborted if the provided context is
5578// canceled.
5579func (c *PeopleCreateContactCall) Context(ctx context.Context) *PeopleCreateContactCall {
5580	c.ctx_ = ctx
5581	return c
5582}
5583
5584// Header returns an http.Header that can be modified by the caller to
5585// add HTTP headers to the request.
5586func (c *PeopleCreateContactCall) Header() http.Header {
5587	if c.header_ == nil {
5588		c.header_ = make(http.Header)
5589	}
5590	return c.header_
5591}
5592
5593func (c *PeopleCreateContactCall) doRequest(alt string) (*http.Response, error) {
5594	reqHeaders := make(http.Header)
5595	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20211027")
5596	for k, v := range c.header_ {
5597		reqHeaders[k] = v
5598	}
5599	reqHeaders.Set("User-Agent", c.s.userAgent())
5600	var body io.Reader = nil
5601	body, err := googleapi.WithoutDataWrapper.JSONReader(c.person)
5602	if err != nil {
5603		return nil, err
5604	}
5605	reqHeaders.Set("Content-Type", "application/json")
5606	c.urlParams_.Set("alt", alt)
5607	c.urlParams_.Set("prettyPrint", "false")
5608	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/people:createContact")
5609	urls += "?" + c.urlParams_.Encode()
5610	req, err := http.NewRequest("POST", urls, body)
5611	if err != nil {
5612		return nil, err
5613	}
5614	req.Header = reqHeaders
5615	return gensupport.SendRequest(c.ctx_, c.s.client, req)
5616}
5617
5618// Do executes the "people.people.createContact" call.
5619// Exactly one of *Person or error will be non-nil. Any non-2xx status
5620// code is an error. Response headers are in either
5621// *Person.ServerResponse.Header or (if a response was returned at all)
5622// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
5623// check whether the returned error was because http.StatusNotModified
5624// was returned.
5625func (c *PeopleCreateContactCall) Do(opts ...googleapi.CallOption) (*Person, error) {
5626	gensupport.SetOptions(c.urlParams_, opts...)
5627	res, err := c.doRequest("json")
5628	if res != nil && res.StatusCode == http.StatusNotModified {
5629		if res.Body != nil {
5630			res.Body.Close()
5631		}
5632		return nil, &googleapi.Error{
5633			Code:   res.StatusCode,
5634			Header: res.Header,
5635		}
5636	}
5637	if err != nil {
5638		return nil, err
5639	}
5640	defer googleapi.CloseBody(res)
5641	if err := googleapi.CheckResponse(res); err != nil {
5642		return nil, err
5643	}
5644	ret := &Person{
5645		ServerResponse: googleapi.ServerResponse{
5646			Header:         res.Header,
5647			HTTPStatusCode: res.StatusCode,
5648		},
5649	}
5650	target := &ret
5651	if err := gensupport.DecodeResponse(target, res); err != nil {
5652		return nil, err
5653	}
5654	return ret, nil
5655	// {
5656	//   "description": "Create a new contact and return the person resource for that contact. The request returns a 400 error if more than one field is specified on a field that is a singleton for contact sources: * biographies * birthdays * genders * names",
5657	//   "flatPath": "v1/people:createContact",
5658	//   "httpMethod": "POST",
5659	//   "id": "people.people.createContact",
5660	//   "parameterOrder": [],
5661	//   "parameters": {
5662	//     "personFields": {
5663	//       "description": "Required. A field mask to restrict which fields on each person are returned. Multiple fields can be specified by separating them with commas. Defaults to all 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",
5664	//       "format": "google-fieldmask",
5665	//       "location": "query",
5666	//       "type": "string"
5667	//     },
5668	//     "sources": {
5669	//       "description": "Optional. A mask of what source types to return. Defaults to READ_SOURCE_TYPE_CONTACT and READ_SOURCE_TYPE_PROFILE if not set.",
5670	//       "enum": [
5671	//         "READ_SOURCE_TYPE_UNSPECIFIED",
5672	//         "READ_SOURCE_TYPE_PROFILE",
5673	//         "READ_SOURCE_TYPE_CONTACT",
5674	//         "READ_SOURCE_TYPE_DOMAIN_CONTACT"
5675	//       ],
5676	//       "enumDescriptions": [
5677	//         "Unspecified.",
5678	//         "Returns SourceType.ACCOUNT, SourceType.DOMAIN_PROFILE, and SourceType.PROFILE.",
5679	//         "Returns SourceType.CONTACT.",
5680	//         "Returns SourceType.DOMAIN_CONTACT."
5681	//       ],
5682	//       "location": "query",
5683	//       "repeated": true,
5684	//       "type": "string"
5685	//     }
5686	//   },
5687	//   "path": "v1/people:createContact",
5688	//   "request": {
5689	//     "$ref": "Person"
5690	//   },
5691	//   "response": {
5692	//     "$ref": "Person"
5693	//   },
5694	//   "scopes": [
5695	//     "https://www.googleapis.com/auth/contacts"
5696	//   ]
5697	// }
5698
5699}
5700
5701// method id "people.people.deleteContact":
5702
5703type PeopleDeleteContactCall struct {
5704	s            *Service
5705	resourceName string
5706	urlParams_   gensupport.URLParams
5707	ctx_         context.Context
5708	header_      http.Header
5709}
5710
5711// DeleteContact: Delete a contact person. Any non-contact data will not
5712// be deleted.
5713//
5714// - resourceName: The resource name of the contact to delete.
5715func (r *PeopleService) DeleteContact(resourceName string) *PeopleDeleteContactCall {
5716	c := &PeopleDeleteContactCall{s: r.s, urlParams_: make(gensupport.URLParams)}
5717	c.resourceName = resourceName
5718	return c
5719}
5720
5721// Fields allows partial responses to be retrieved. See
5722// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
5723// for more information.
5724func (c *PeopleDeleteContactCall) Fields(s ...googleapi.Field) *PeopleDeleteContactCall {
5725	c.urlParams_.Set("fields", googleapi.CombineFields(s))
5726	return c
5727}
5728
5729// Context sets the context to be used in this call's Do method. Any
5730// pending HTTP request will be aborted if the provided context is
5731// canceled.
5732func (c *PeopleDeleteContactCall) Context(ctx context.Context) *PeopleDeleteContactCall {
5733	c.ctx_ = ctx
5734	return c
5735}
5736
5737// Header returns an http.Header that can be modified by the caller to
5738// add HTTP headers to the request.
5739func (c *PeopleDeleteContactCall) Header() http.Header {
5740	if c.header_ == nil {
5741		c.header_ = make(http.Header)
5742	}
5743	return c.header_
5744}
5745
5746func (c *PeopleDeleteContactCall) doRequest(alt string) (*http.Response, error) {
5747	reqHeaders := make(http.Header)
5748	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20211027")
5749	for k, v := range c.header_ {
5750		reqHeaders[k] = v
5751	}
5752	reqHeaders.Set("User-Agent", c.s.userAgent())
5753	var body io.Reader = nil
5754	c.urlParams_.Set("alt", alt)
5755	c.urlParams_.Set("prettyPrint", "false")
5756	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+resourceName}:deleteContact")
5757	urls += "?" + c.urlParams_.Encode()
5758	req, err := http.NewRequest("DELETE", urls, body)
5759	if err != nil {
5760		return nil, err
5761	}
5762	req.Header = reqHeaders
5763	googleapi.Expand(req.URL, map[string]string{
5764		"resourceName": c.resourceName,
5765	})
5766	return gensupport.SendRequest(c.ctx_, c.s.client, req)
5767}
5768
5769// Do executes the "people.people.deleteContact" call.
5770// Exactly one of *Empty or error will be non-nil. Any non-2xx status
5771// code is an error. Response headers are in either
5772// *Empty.ServerResponse.Header or (if a response was returned at all)
5773// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
5774// check whether the returned error was because http.StatusNotModified
5775// was returned.
5776func (c *PeopleDeleteContactCall) Do(opts ...googleapi.CallOption) (*Empty, error) {
5777	gensupport.SetOptions(c.urlParams_, opts...)
5778	res, err := c.doRequest("json")
5779	if res != nil && res.StatusCode == http.StatusNotModified {
5780		if res.Body != nil {
5781			res.Body.Close()
5782		}
5783		return nil, &googleapi.Error{
5784			Code:   res.StatusCode,
5785			Header: res.Header,
5786		}
5787	}
5788	if err != nil {
5789		return nil, err
5790	}
5791	defer googleapi.CloseBody(res)
5792	if err := googleapi.CheckResponse(res); err != nil {
5793		return nil, err
5794	}
5795	ret := &Empty{
5796		ServerResponse: googleapi.ServerResponse{
5797			Header:         res.Header,
5798			HTTPStatusCode: res.StatusCode,
5799		},
5800	}
5801	target := &ret
5802	if err := gensupport.DecodeResponse(target, res); err != nil {
5803		return nil, err
5804	}
5805	return ret, nil
5806	// {
5807	//   "description": "Delete a contact person. Any non-contact data will not be deleted.",
5808	//   "flatPath": "v1/people/{peopleId}:deleteContact",
5809	//   "httpMethod": "DELETE",
5810	//   "id": "people.people.deleteContact",
5811	//   "parameterOrder": [
5812	//     "resourceName"
5813	//   ],
5814	//   "parameters": {
5815	//     "resourceName": {
5816	//       "description": "Required. The resource name of the contact to delete.",
5817	//       "location": "path",
5818	//       "pattern": "^people/[^/]+$",
5819	//       "required": true,
5820	//       "type": "string"
5821	//     }
5822	//   },
5823	//   "path": "v1/{+resourceName}:deleteContact",
5824	//   "response": {
5825	//     "$ref": "Empty"
5826	//   },
5827	//   "scopes": [
5828	//     "https://www.googleapis.com/auth/contacts"
5829	//   ]
5830	// }
5831
5832}
5833
5834// method id "people.people.deleteContactPhoto":
5835
5836type PeopleDeleteContactPhotoCall struct {
5837	s            *Service
5838	resourceName string
5839	urlParams_   gensupport.URLParams
5840	ctx_         context.Context
5841	header_      http.Header
5842}
5843
5844// DeleteContactPhoto: Delete a contact's photo.
5845//
5846// - resourceName: The resource name of the contact whose photo will be
5847//   deleted.
5848func (r *PeopleService) DeleteContactPhoto(resourceName string) *PeopleDeleteContactPhotoCall {
5849	c := &PeopleDeleteContactPhotoCall{s: r.s, urlParams_: make(gensupport.URLParams)}
5850	c.resourceName = resourceName
5851	return c
5852}
5853
5854// PersonFields sets the optional parameter "personFields": A field mask
5855// to restrict which fields on the person are returned. Multiple fields
5856// can be specified by separating them with commas. Defaults to empty if
5857// not set, which will skip the post mutate get. Valid values are: *
5858// addresses * ageRanges * biographies * birthdays * calendarUrls *
5859// clientData * coverPhotos * emailAddresses * events * externalIds *
5860// genders * imClients * interests * locales * locations * memberships *
5861// metadata * miscKeywords * names * nicknames * occupations *
5862// organizations * phoneNumbers * photos * relations * sipAddresses *
5863// skills * urls * userDefined
5864func (c *PeopleDeleteContactPhotoCall) PersonFields(personFields string) *PeopleDeleteContactPhotoCall {
5865	c.urlParams_.Set("personFields", personFields)
5866	return c
5867}
5868
5869// Sources sets the optional parameter "sources": A mask of what source
5870// types to return. Defaults to READ_SOURCE_TYPE_CONTACT and
5871// READ_SOURCE_TYPE_PROFILE if not set.
5872//
5873// Possible values:
5874//   "READ_SOURCE_TYPE_UNSPECIFIED" - Unspecified.
5875//   "READ_SOURCE_TYPE_PROFILE" - Returns SourceType.ACCOUNT,
5876// SourceType.DOMAIN_PROFILE, and SourceType.PROFILE.
5877//   "READ_SOURCE_TYPE_CONTACT" - Returns SourceType.CONTACT.
5878//   "READ_SOURCE_TYPE_DOMAIN_CONTACT" - Returns
5879// SourceType.DOMAIN_CONTACT.
5880func (c *PeopleDeleteContactPhotoCall) Sources(sources ...string) *PeopleDeleteContactPhotoCall {
5881	c.urlParams_.SetMulti("sources", append([]string{}, sources...))
5882	return c
5883}
5884
5885// Fields allows partial responses to be retrieved. See
5886// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
5887// for more information.
5888func (c *PeopleDeleteContactPhotoCall) Fields(s ...googleapi.Field) *PeopleDeleteContactPhotoCall {
5889	c.urlParams_.Set("fields", googleapi.CombineFields(s))
5890	return c
5891}
5892
5893// Context sets the context to be used in this call's Do method. Any
5894// pending HTTP request will be aborted if the provided context is
5895// canceled.
5896func (c *PeopleDeleteContactPhotoCall) Context(ctx context.Context) *PeopleDeleteContactPhotoCall {
5897	c.ctx_ = ctx
5898	return c
5899}
5900
5901// Header returns an http.Header that can be modified by the caller to
5902// add HTTP headers to the request.
5903func (c *PeopleDeleteContactPhotoCall) Header() http.Header {
5904	if c.header_ == nil {
5905		c.header_ = make(http.Header)
5906	}
5907	return c.header_
5908}
5909
5910func (c *PeopleDeleteContactPhotoCall) doRequest(alt string) (*http.Response, error) {
5911	reqHeaders := make(http.Header)
5912	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20211027")
5913	for k, v := range c.header_ {
5914		reqHeaders[k] = v
5915	}
5916	reqHeaders.Set("User-Agent", c.s.userAgent())
5917	var body io.Reader = nil
5918	c.urlParams_.Set("alt", alt)
5919	c.urlParams_.Set("prettyPrint", "false")
5920	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+resourceName}:deleteContactPhoto")
5921	urls += "?" + c.urlParams_.Encode()
5922	req, err := http.NewRequest("DELETE", urls, body)
5923	if err != nil {
5924		return nil, err
5925	}
5926	req.Header = reqHeaders
5927	googleapi.Expand(req.URL, map[string]string{
5928		"resourceName": c.resourceName,
5929	})
5930	return gensupport.SendRequest(c.ctx_, c.s.client, req)
5931}
5932
5933// Do executes the "people.people.deleteContactPhoto" call.
5934// Exactly one of *DeleteContactPhotoResponse or error will be non-nil.
5935// Any non-2xx status code is an error. Response headers are in either
5936// *DeleteContactPhotoResponse.ServerResponse.Header or (if a response
5937// was returned at all) in error.(*googleapi.Error).Header. Use
5938// googleapi.IsNotModified to check whether the returned error was
5939// because http.StatusNotModified was returned.
5940func (c *PeopleDeleteContactPhotoCall) Do(opts ...googleapi.CallOption) (*DeleteContactPhotoResponse, error) {
5941	gensupport.SetOptions(c.urlParams_, opts...)
5942	res, err := c.doRequest("json")
5943	if res != nil && res.StatusCode == http.StatusNotModified {
5944		if res.Body != nil {
5945			res.Body.Close()
5946		}
5947		return nil, &googleapi.Error{
5948			Code:   res.StatusCode,
5949			Header: res.Header,
5950		}
5951	}
5952	if err != nil {
5953		return nil, err
5954	}
5955	defer googleapi.CloseBody(res)
5956	if err := googleapi.CheckResponse(res); err != nil {
5957		return nil, err
5958	}
5959	ret := &DeleteContactPhotoResponse{
5960		ServerResponse: googleapi.ServerResponse{
5961			Header:         res.Header,
5962			HTTPStatusCode: res.StatusCode,
5963		},
5964	}
5965	target := &ret
5966	if err := gensupport.DecodeResponse(target, res); err != nil {
5967		return nil, err
5968	}
5969	return ret, nil
5970	// {
5971	//   "description": "Delete a contact's photo.",
5972	//   "flatPath": "v1/people/{peopleId}:deleteContactPhoto",
5973	//   "httpMethod": "DELETE",
5974	//   "id": "people.people.deleteContactPhoto",
5975	//   "parameterOrder": [
5976	//     "resourceName"
5977	//   ],
5978	//   "parameters": {
5979	//     "personFields": {
5980	//       "description": "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 empty if not set, which will skip the post mutate get. 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",
5981	//       "format": "google-fieldmask",
5982	//       "location": "query",
5983	//       "type": "string"
5984	//     },
5985	//     "resourceName": {
5986	//       "description": "Required. The resource name of the contact whose photo will be deleted.",
5987	//       "location": "path",
5988	//       "pattern": "^people/[^/]+$",
5989	//       "required": true,
5990	//       "type": "string"
5991	//     },
5992	//     "sources": {
5993	//       "description": "Optional. A mask of what source types to return. Defaults to READ_SOURCE_TYPE_CONTACT and READ_SOURCE_TYPE_PROFILE if not set.",
5994	//       "enum": [
5995	//         "READ_SOURCE_TYPE_UNSPECIFIED",
5996	//         "READ_SOURCE_TYPE_PROFILE",
5997	//         "READ_SOURCE_TYPE_CONTACT",
5998	//         "READ_SOURCE_TYPE_DOMAIN_CONTACT"
5999	//       ],
6000	//       "enumDescriptions": [
6001	//         "Unspecified.",
6002	//         "Returns SourceType.ACCOUNT, SourceType.DOMAIN_PROFILE, and SourceType.PROFILE.",
6003	//         "Returns SourceType.CONTACT.",
6004	//         "Returns SourceType.DOMAIN_CONTACT."
6005	//       ],
6006	//       "location": "query",
6007	//       "repeated": true,
6008	//       "type": "string"
6009	//     }
6010	//   },
6011	//   "path": "v1/{+resourceName}:deleteContactPhoto",
6012	//   "response": {
6013	//     "$ref": "DeleteContactPhotoResponse"
6014	//   },
6015	//   "scopes": [
6016	//     "https://www.googleapis.com/auth/contacts"
6017	//   ]
6018	// }
6019
6020}
6021
6022// method id "people.people.get":
6023
6024type PeopleGetCall struct {
6025	s            *Service
6026	resourceName string
6027	urlParams_   gensupport.URLParams
6028	ifNoneMatch_ string
6029	ctx_         context.Context
6030	header_      http.Header
6031}
6032
6033// Get: Provides information about a person by specifying a resource
6034// name. Use `people/me` to indicate the authenticated user. The request
6035// returns a 400 error if 'personFields' is not specified.
6036//
6037// - resourceName: The resource name of the person to provide
6038//   information about. - To get information about the authenticated
6039//   user, specify `people/me`. - To get information about a google
6040//   account, specify `people/{account_id}`. - To get information about
6041//   a contact, specify the resource name that identifies the contact as
6042//   returned by `people.connections.list`.
6043func (r *PeopleService) Get(resourceName string) *PeopleGetCall {
6044	c := &PeopleGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
6045	c.resourceName = resourceName
6046	return c
6047}
6048
6049// PersonFields sets the optional parameter "personFields": Required. A
6050// field mask to restrict which fields on the person are returned.
6051// Multiple fields can be specified by separating them with commas.
6052// Valid values are: * addresses * ageRanges * biographies * birthdays *
6053// calendarUrls * clientData * coverPhotos * emailAddresses * events *
6054// externalIds * genders * imClients * interests * locales * locations *
6055// memberships * metadata * miscKeywords * names * nicknames *
6056// occupations * organizations * phoneNumbers * photos * relations *
6057// sipAddresses * skills * urls * userDefined
6058func (c *PeopleGetCall) PersonFields(personFields string) *PeopleGetCall {
6059	c.urlParams_.Set("personFields", personFields)
6060	return c
6061}
6062
6063// RequestMaskIncludeField sets the optional parameter
6064// "requestMask.includeField": Required. Comma-separated list of person
6065// fields to be included in the response. Each path should start with
6066// `person.`: for example, `person.names` or `person.photos`.
6067func (c *PeopleGetCall) RequestMaskIncludeField(requestMaskIncludeField string) *PeopleGetCall {
6068	c.urlParams_.Set("requestMask.includeField", requestMaskIncludeField)
6069	return c
6070}
6071
6072// Sources sets the optional parameter "sources": A mask of what source
6073// types to return. Defaults to READ_SOURCE_TYPE_PROFILE and
6074// READ_SOURCE_TYPE_CONTACT if not set.
6075//
6076// Possible values:
6077//   "READ_SOURCE_TYPE_UNSPECIFIED" - Unspecified.
6078//   "READ_SOURCE_TYPE_PROFILE" - Returns SourceType.ACCOUNT,
6079// SourceType.DOMAIN_PROFILE, and SourceType.PROFILE.
6080//   "READ_SOURCE_TYPE_CONTACT" - Returns SourceType.CONTACT.
6081//   "READ_SOURCE_TYPE_DOMAIN_CONTACT" - Returns
6082// SourceType.DOMAIN_CONTACT.
6083func (c *PeopleGetCall) Sources(sources ...string) *PeopleGetCall {
6084	c.urlParams_.SetMulti("sources", append([]string{}, sources...))
6085	return c
6086}
6087
6088// Fields allows partial responses to be retrieved. See
6089// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
6090// for more information.
6091func (c *PeopleGetCall) Fields(s ...googleapi.Field) *PeopleGetCall {
6092	c.urlParams_.Set("fields", googleapi.CombineFields(s))
6093	return c
6094}
6095
6096// IfNoneMatch sets the optional parameter which makes the operation
6097// fail if the object's ETag matches the given value. This is useful for
6098// getting updates only after the object has changed since the last
6099// request. Use googleapi.IsNotModified to check whether the response
6100// error from Do is the result of In-None-Match.
6101func (c *PeopleGetCall) IfNoneMatch(entityTag string) *PeopleGetCall {
6102	c.ifNoneMatch_ = entityTag
6103	return c
6104}
6105
6106// Context sets the context to be used in this call's Do method. Any
6107// pending HTTP request will be aborted if the provided context is
6108// canceled.
6109func (c *PeopleGetCall) Context(ctx context.Context) *PeopleGetCall {
6110	c.ctx_ = ctx
6111	return c
6112}
6113
6114// Header returns an http.Header that can be modified by the caller to
6115// add HTTP headers to the request.
6116func (c *PeopleGetCall) Header() http.Header {
6117	if c.header_ == nil {
6118		c.header_ = make(http.Header)
6119	}
6120	return c.header_
6121}
6122
6123func (c *PeopleGetCall) doRequest(alt string) (*http.Response, error) {
6124	reqHeaders := make(http.Header)
6125	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20211027")
6126	for k, v := range c.header_ {
6127		reqHeaders[k] = v
6128	}
6129	reqHeaders.Set("User-Agent", c.s.userAgent())
6130	if c.ifNoneMatch_ != "" {
6131		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
6132	}
6133	var body io.Reader = nil
6134	c.urlParams_.Set("alt", alt)
6135	c.urlParams_.Set("prettyPrint", "false")
6136	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+resourceName}")
6137	urls += "?" + c.urlParams_.Encode()
6138	req, err := http.NewRequest("GET", urls, body)
6139	if err != nil {
6140		return nil, err
6141	}
6142	req.Header = reqHeaders
6143	googleapi.Expand(req.URL, map[string]string{
6144		"resourceName": c.resourceName,
6145	})
6146	return gensupport.SendRequest(c.ctx_, c.s.client, req)
6147}
6148
6149// Do executes the "people.people.get" call.
6150// Exactly one of *Person or error will be non-nil. Any non-2xx status
6151// code is an error. Response headers are in either
6152// *Person.ServerResponse.Header or (if a response was returned at all)
6153// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
6154// check whether the returned error was because http.StatusNotModified
6155// was returned.
6156func (c *PeopleGetCall) Do(opts ...googleapi.CallOption) (*Person, error) {
6157	gensupport.SetOptions(c.urlParams_, opts...)
6158	res, err := c.doRequest("json")
6159	if res != nil && res.StatusCode == http.StatusNotModified {
6160		if res.Body != nil {
6161			res.Body.Close()
6162		}
6163		return nil, &googleapi.Error{
6164			Code:   res.StatusCode,
6165			Header: res.Header,
6166		}
6167	}
6168	if err != nil {
6169		return nil, err
6170	}
6171	defer googleapi.CloseBody(res)
6172	if err := googleapi.CheckResponse(res); err != nil {
6173		return nil, err
6174	}
6175	ret := &Person{
6176		ServerResponse: googleapi.ServerResponse{
6177			Header:         res.Header,
6178			HTTPStatusCode: res.StatusCode,
6179		},
6180	}
6181	target := &ret
6182	if err := gensupport.DecodeResponse(target, res); err != nil {
6183		return nil, err
6184	}
6185	return ret, nil
6186	// {
6187	//   "description": "Provides information about a person by specifying a resource name. Use `people/me` to indicate the authenticated user. The request returns a 400 error if 'personFields' is not specified.",
6188	//   "flatPath": "v1/people/{peopleId}",
6189	//   "httpMethod": "GET",
6190	//   "id": "people.people.get",
6191	//   "parameterOrder": [
6192	//     "resourceName"
6193	//   ],
6194	//   "parameters": {
6195	//     "personFields": {
6196	//       "description": "Required. A field mask to restrict which fields on the person are returned. Multiple fields can be specified by separating them with commas. 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",
6197	//       "format": "google-fieldmask",
6198	//       "location": "query",
6199	//       "type": "string"
6200	//     },
6201	//     "requestMask.includeField": {
6202	//       "description": "Required. Comma-separated list of person fields to be included in the response. Each path should start with `person.`: for example, `person.names` or `person.photos`.",
6203	//       "format": "google-fieldmask",
6204	//       "location": "query",
6205	//       "type": "string"
6206	//     },
6207	//     "resourceName": {
6208	//       "description": "Required. The resource name of the person to provide information about. - To get information about the authenticated user, specify `people/me`. - To get information about a google account, specify `people/{account_id}`. - To get information about a contact, specify the resource name that identifies the contact as returned by `people.connections.list`.",
6209	//       "location": "path",
6210	//       "pattern": "^people/[^/]+$",
6211	//       "required": true,
6212	//       "type": "string"
6213	//     },
6214	//     "sources": {
6215	//       "description": "Optional. A mask of what source types to return. Defaults to READ_SOURCE_TYPE_PROFILE and READ_SOURCE_TYPE_CONTACT if not set.",
6216	//       "enum": [
6217	//         "READ_SOURCE_TYPE_UNSPECIFIED",
6218	//         "READ_SOURCE_TYPE_PROFILE",
6219	//         "READ_SOURCE_TYPE_CONTACT",
6220	//         "READ_SOURCE_TYPE_DOMAIN_CONTACT"
6221	//       ],
6222	//       "enumDescriptions": [
6223	//         "Unspecified.",
6224	//         "Returns SourceType.ACCOUNT, SourceType.DOMAIN_PROFILE, and SourceType.PROFILE.",
6225	//         "Returns SourceType.CONTACT.",
6226	//         "Returns SourceType.DOMAIN_CONTACT."
6227	//       ],
6228	//       "location": "query",
6229	//       "repeated": true,
6230	//       "type": "string"
6231	//     }
6232	//   },
6233	//   "path": "v1/{+resourceName}",
6234	//   "response": {
6235	//     "$ref": "Person"
6236	//   },
6237	//   "scopes": [
6238	//     "https://www.googleapis.com/auth/contacts",
6239	//     "https://www.googleapis.com/auth/contacts.readonly",
6240	//     "https://www.googleapis.com/auth/directory.readonly",
6241	//     "https://www.googleapis.com/auth/user.addresses.read",
6242	//     "https://www.googleapis.com/auth/user.birthday.read",
6243	//     "https://www.googleapis.com/auth/user.emails.read",
6244	//     "https://www.googleapis.com/auth/user.gender.read",
6245	//     "https://www.googleapis.com/auth/user.organization.read",
6246	//     "https://www.googleapis.com/auth/user.phonenumbers.read",
6247	//     "https://www.googleapis.com/auth/userinfo.email",
6248	//     "https://www.googleapis.com/auth/userinfo.profile"
6249	//   ]
6250	// }
6251
6252}
6253
6254// method id "people.people.getBatchGet":
6255
6256type PeopleGetBatchGetCall struct {
6257	s            *Service
6258	urlParams_   gensupport.URLParams
6259	ifNoneMatch_ string
6260	ctx_         context.Context
6261	header_      http.Header
6262}
6263
6264// GetBatchGet: Provides information about a list of specific people by
6265// specifying a list of requested resource names. Use `people/me` to
6266// indicate the authenticated user. The request returns a 400 error if
6267// 'personFields' is not specified.
6268func (r *PeopleService) GetBatchGet() *PeopleGetBatchGetCall {
6269	c := &PeopleGetBatchGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
6270	return c
6271}
6272
6273// PersonFields sets the optional parameter "personFields": Required. A
6274// field mask to restrict which fields on each person are returned.
6275// Multiple fields can be specified by separating them with commas.
6276// Valid values are: * addresses * ageRanges * biographies * birthdays *
6277// calendarUrls * clientData * coverPhotos * emailAddresses * events *
6278// externalIds * genders * imClients * interests * locales * locations *
6279// memberships * metadata * miscKeywords * names * nicknames *
6280// occupations * organizations * phoneNumbers * photos * relations *
6281// sipAddresses * skills * urls * userDefined
6282func (c *PeopleGetBatchGetCall) PersonFields(personFields string) *PeopleGetBatchGetCall {
6283	c.urlParams_.Set("personFields", personFields)
6284	return c
6285}
6286
6287// RequestMaskIncludeField sets the optional parameter
6288// "requestMask.includeField": Required. Comma-separated list of person
6289// fields to be included in the response. Each path should start with
6290// `person.`: for example, `person.names` or `person.photos`.
6291func (c *PeopleGetBatchGetCall) RequestMaskIncludeField(requestMaskIncludeField string) *PeopleGetBatchGetCall {
6292	c.urlParams_.Set("requestMask.includeField", requestMaskIncludeField)
6293	return c
6294}
6295
6296// ResourceNames sets the optional parameter "resourceNames": Required.
6297// The resource names of the people to provide information about. It's
6298// repeatable. The URL query parameter should be
6299// resourceNames=<name1>&resourceNames=<name2>&... - To get information
6300// about the authenticated user, specify `people/me`. - To get
6301// information about a google account, specify `people/{account_id}`. -
6302// To get information about a contact, specify the resource name that
6303// identifies the contact as returned by `people.connections.list`.
6304// There is a maximum of 200 resource names.
6305func (c *PeopleGetBatchGetCall) ResourceNames(resourceNames ...string) *PeopleGetBatchGetCall {
6306	c.urlParams_.SetMulti("resourceNames", append([]string{}, resourceNames...))
6307	return c
6308}
6309
6310// Sources sets the optional parameter "sources": A mask of what source
6311// types to return. Defaults to READ_SOURCE_TYPE_CONTACT and
6312// READ_SOURCE_TYPE_PROFILE if not set.
6313//
6314// Possible values:
6315//   "READ_SOURCE_TYPE_UNSPECIFIED" - Unspecified.
6316//   "READ_SOURCE_TYPE_PROFILE" - Returns SourceType.ACCOUNT,
6317// SourceType.DOMAIN_PROFILE, and SourceType.PROFILE.
6318//   "READ_SOURCE_TYPE_CONTACT" - Returns SourceType.CONTACT.
6319//   "READ_SOURCE_TYPE_DOMAIN_CONTACT" - Returns
6320// SourceType.DOMAIN_CONTACT.
6321func (c *PeopleGetBatchGetCall) Sources(sources ...string) *PeopleGetBatchGetCall {
6322	c.urlParams_.SetMulti("sources", append([]string{}, sources...))
6323	return c
6324}
6325
6326// Fields allows partial responses to be retrieved. See
6327// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
6328// for more information.
6329func (c *PeopleGetBatchGetCall) Fields(s ...googleapi.Field) *PeopleGetBatchGetCall {
6330	c.urlParams_.Set("fields", googleapi.CombineFields(s))
6331	return c
6332}
6333
6334// IfNoneMatch sets the optional parameter which makes the operation
6335// fail if the object's ETag matches the given value. This is useful for
6336// getting updates only after the object has changed since the last
6337// request. Use googleapi.IsNotModified to check whether the response
6338// error from Do is the result of In-None-Match.
6339func (c *PeopleGetBatchGetCall) IfNoneMatch(entityTag string) *PeopleGetBatchGetCall {
6340	c.ifNoneMatch_ = entityTag
6341	return c
6342}
6343
6344// Context sets the context to be used in this call's Do method. Any
6345// pending HTTP request will be aborted if the provided context is
6346// canceled.
6347func (c *PeopleGetBatchGetCall) Context(ctx context.Context) *PeopleGetBatchGetCall {
6348	c.ctx_ = ctx
6349	return c
6350}
6351
6352// Header returns an http.Header that can be modified by the caller to
6353// add HTTP headers to the request.
6354func (c *PeopleGetBatchGetCall) Header() http.Header {
6355	if c.header_ == nil {
6356		c.header_ = make(http.Header)
6357	}
6358	return c.header_
6359}
6360
6361func (c *PeopleGetBatchGetCall) doRequest(alt string) (*http.Response, error) {
6362	reqHeaders := make(http.Header)
6363	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20211027")
6364	for k, v := range c.header_ {
6365		reqHeaders[k] = v
6366	}
6367	reqHeaders.Set("User-Agent", c.s.userAgent())
6368	if c.ifNoneMatch_ != "" {
6369		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
6370	}
6371	var body io.Reader = nil
6372	c.urlParams_.Set("alt", alt)
6373	c.urlParams_.Set("prettyPrint", "false")
6374	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/people:batchGet")
6375	urls += "?" + c.urlParams_.Encode()
6376	req, err := http.NewRequest("GET", urls, body)
6377	if err != nil {
6378		return nil, err
6379	}
6380	req.Header = reqHeaders
6381	return gensupport.SendRequest(c.ctx_, c.s.client, req)
6382}
6383
6384// Do executes the "people.people.getBatchGet" call.
6385// Exactly one of *GetPeopleResponse or error will be non-nil. Any
6386// non-2xx status code is an error. Response headers are in either
6387// *GetPeopleResponse.ServerResponse.Header or (if a response was
6388// returned at all) in error.(*googleapi.Error).Header. Use
6389// googleapi.IsNotModified to check whether the returned error was
6390// because http.StatusNotModified was returned.
6391func (c *PeopleGetBatchGetCall) Do(opts ...googleapi.CallOption) (*GetPeopleResponse, error) {
6392	gensupport.SetOptions(c.urlParams_, opts...)
6393	res, err := c.doRequest("json")
6394	if res != nil && res.StatusCode == http.StatusNotModified {
6395		if res.Body != nil {
6396			res.Body.Close()
6397		}
6398		return nil, &googleapi.Error{
6399			Code:   res.StatusCode,
6400			Header: res.Header,
6401		}
6402	}
6403	if err != nil {
6404		return nil, err
6405	}
6406	defer googleapi.CloseBody(res)
6407	if err := googleapi.CheckResponse(res); err != nil {
6408		return nil, err
6409	}
6410	ret := &GetPeopleResponse{
6411		ServerResponse: googleapi.ServerResponse{
6412			Header:         res.Header,
6413			HTTPStatusCode: res.StatusCode,
6414		},
6415	}
6416	target := &ret
6417	if err := gensupport.DecodeResponse(target, res); err != nil {
6418		return nil, err
6419	}
6420	return ret, nil
6421	// {
6422	//   "description": "Provides information about a list of specific people by specifying a list of requested resource names. Use `people/me` to indicate the authenticated user. The request returns a 400 error if 'personFields' is not specified.",
6423	//   "flatPath": "v1/people:batchGet",
6424	//   "httpMethod": "GET",
6425	//   "id": "people.people.getBatchGet",
6426	//   "parameterOrder": [],
6427	//   "parameters": {
6428	//     "personFields": {
6429	//       "description": "Required. A field mask to restrict which fields on each person are returned. Multiple fields can be specified by separating them with commas. 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",
6430	//       "format": "google-fieldmask",
6431	//       "location": "query",
6432	//       "type": "string"
6433	//     },
6434	//     "requestMask.includeField": {
6435	//       "description": "Required. Comma-separated list of person fields to be included in the response. Each path should start with `person.`: for example, `person.names` or `person.photos`.",
6436	//       "format": "google-fieldmask",
6437	//       "location": "query",
6438	//       "type": "string"
6439	//     },
6440	//     "resourceNames": {
6441	//       "description": "Required. The resource names of the people to provide information about. It's repeatable. The URL query parameter should be resourceNames=\u003cname1\u003e\u0026resourceNames=\u003cname2\u003e\u0026... - To get information about the authenticated user, specify `people/me`. - To get information about a google account, specify `people/{account_id}`. - To get information about a contact, specify the resource name that identifies the contact as returned by `people.connections.list`. There is a maximum of 200 resource names.",
6442	//       "location": "query",
6443	//       "repeated": true,
6444	//       "type": "string"
6445	//     },
6446	//     "sources": {
6447	//       "description": "Optional. A mask of what source types to return. Defaults to READ_SOURCE_TYPE_CONTACT and READ_SOURCE_TYPE_PROFILE if not set.",
6448	//       "enum": [
6449	//         "READ_SOURCE_TYPE_UNSPECIFIED",
6450	//         "READ_SOURCE_TYPE_PROFILE",
6451	//         "READ_SOURCE_TYPE_CONTACT",
6452	//         "READ_SOURCE_TYPE_DOMAIN_CONTACT"
6453	//       ],
6454	//       "enumDescriptions": [
6455	//         "Unspecified.",
6456	//         "Returns SourceType.ACCOUNT, SourceType.DOMAIN_PROFILE, and SourceType.PROFILE.",
6457	//         "Returns SourceType.CONTACT.",
6458	//         "Returns SourceType.DOMAIN_CONTACT."
6459	//       ],
6460	//       "location": "query",
6461	//       "repeated": true,
6462	//       "type": "string"
6463	//     }
6464	//   },
6465	//   "path": "v1/people:batchGet",
6466	//   "response": {
6467	//     "$ref": "GetPeopleResponse"
6468	//   },
6469	//   "scopes": [
6470	//     "https://www.googleapis.com/auth/contacts",
6471	//     "https://www.googleapis.com/auth/contacts.readonly",
6472	//     "https://www.googleapis.com/auth/directory.readonly",
6473	//     "https://www.googleapis.com/auth/user.addresses.read",
6474	//     "https://www.googleapis.com/auth/user.birthday.read",
6475	//     "https://www.googleapis.com/auth/user.emails.read",
6476	//     "https://www.googleapis.com/auth/user.gender.read",
6477	//     "https://www.googleapis.com/auth/user.organization.read",
6478	//     "https://www.googleapis.com/auth/user.phonenumbers.read",
6479	//     "https://www.googleapis.com/auth/userinfo.email",
6480	//     "https://www.googleapis.com/auth/userinfo.profile"
6481	//   ]
6482	// }
6483
6484}
6485
6486// method id "people.people.listDirectoryPeople":
6487
6488type PeopleListDirectoryPeopleCall struct {
6489	s            *Service
6490	urlParams_   gensupport.URLParams
6491	ifNoneMatch_ string
6492	ctx_         context.Context
6493	header_      http.Header
6494}
6495
6496// ListDirectoryPeople: Provides a list of domain profiles and domain
6497// contacts in the authenticated user's domain directory. When the
6498// `sync_token` is specified, resources deleted since the last sync will
6499// be returned as a person with `PersonMetadata.deleted` set to true.
6500// When the `page_token` or `sync_token` is specified, all other request
6501// parameters must match the first call. Writes may have a propagation
6502// delay of several minutes for sync requests. Incremental syncs are not
6503// intended for read-after-write use cases. See example usage at List
6504// the directory people that have changed
6505// (/people/v1/directory#list_the_directory_people_that_have_changed).
6506func (r *PeopleService) ListDirectoryPeople() *PeopleListDirectoryPeopleCall {
6507	c := &PeopleListDirectoryPeopleCall{s: r.s, urlParams_: make(gensupport.URLParams)}
6508	return c
6509}
6510
6511// MergeSources sets the optional parameter "mergeSources": Additional
6512// data to merge into the directory sources if they are connected
6513// through verified join keys such as email addresses or phone numbers.
6514//
6515// Possible values:
6516//   "DIRECTORY_MERGE_SOURCE_TYPE_UNSPECIFIED" - Unspecified.
6517//   "DIRECTORY_MERGE_SOURCE_TYPE_CONTACT" - User owned contact.
6518func (c *PeopleListDirectoryPeopleCall) MergeSources(mergeSources ...string) *PeopleListDirectoryPeopleCall {
6519	c.urlParams_.SetMulti("mergeSources", append([]string{}, mergeSources...))
6520	return c
6521}
6522
6523// PageSize sets the optional parameter "pageSize": The number of people
6524// to include in the response. Valid values are between 1 and 1000,
6525// inclusive. Defaults to 100 if not set or set to 0.
6526func (c *PeopleListDirectoryPeopleCall) PageSize(pageSize int64) *PeopleListDirectoryPeopleCall {
6527	c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
6528	return c
6529}
6530
6531// PageToken sets the optional parameter "pageToken": A page token,
6532// received from a previous response `next_page_token`. Provide this to
6533// retrieve the subsequent page. When paginating, all other parameters
6534// provided to `people.listDirectoryPeople` must match the first call
6535// that provided the page token.
6536func (c *PeopleListDirectoryPeopleCall) PageToken(pageToken string) *PeopleListDirectoryPeopleCall {
6537	c.urlParams_.Set("pageToken", pageToken)
6538	return c
6539}
6540
6541// ReadMask sets the optional parameter "readMask": Required. A field
6542// mask to restrict which fields on each person are returned. Multiple
6543// fields can be specified by separating them with commas. Valid values
6544// are: * addresses * ageRanges * biographies * birthdays * calendarUrls
6545// * clientData * coverPhotos * emailAddresses * events * externalIds *
6546// genders * imClients * interests * locales * locations * memberships *
6547// metadata * miscKeywords * names * nicknames * occupations *
6548// organizations * phoneNumbers * photos * relations * sipAddresses *
6549// skills * urls * userDefined
6550func (c *PeopleListDirectoryPeopleCall) ReadMask(readMask string) *PeopleListDirectoryPeopleCall {
6551	c.urlParams_.Set("readMask", readMask)
6552	return c
6553}
6554
6555// RequestSyncToken sets the optional parameter "requestSyncToken":
6556// Whether the response should return `next_sync_token`. It can be used
6557// to get incremental changes since the last request by setting it on
6558// the request `sync_token`. More details about sync behavior at
6559// `people.listDirectoryPeople`.
6560func (c *PeopleListDirectoryPeopleCall) RequestSyncToken(requestSyncToken bool) *PeopleListDirectoryPeopleCall {
6561	c.urlParams_.Set("requestSyncToken", fmt.Sprint(requestSyncToken))
6562	return c
6563}
6564
6565// Sources sets the optional parameter "sources": Required. Directory
6566// sources to return.
6567//
6568// Possible values:
6569//   "DIRECTORY_SOURCE_TYPE_UNSPECIFIED" - Unspecified.
6570//   "DIRECTORY_SOURCE_TYPE_DOMAIN_CONTACT" - Google Workspace domain
6571// shared contact.
6572//   "DIRECTORY_SOURCE_TYPE_DOMAIN_PROFILE" - Google Workspace domain
6573// profile.
6574func (c *PeopleListDirectoryPeopleCall) Sources(sources ...string) *PeopleListDirectoryPeopleCall {
6575	c.urlParams_.SetMulti("sources", append([]string{}, sources...))
6576	return c
6577}
6578
6579// SyncToken sets the optional parameter "syncToken": A sync token,
6580// received from a previous response `next_sync_token` Provide this to
6581// retrieve only the resources changed since the last request. When
6582// syncing, all other parameters provided to
6583// `people.listDirectoryPeople` must match the first call that provided
6584// the sync token. More details about sync behavior at
6585// `people.listDirectoryPeople`.
6586func (c *PeopleListDirectoryPeopleCall) SyncToken(syncToken string) *PeopleListDirectoryPeopleCall {
6587	c.urlParams_.Set("syncToken", syncToken)
6588	return c
6589}
6590
6591// Fields allows partial responses to be retrieved. See
6592// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
6593// for more information.
6594func (c *PeopleListDirectoryPeopleCall) Fields(s ...googleapi.Field) *PeopleListDirectoryPeopleCall {
6595	c.urlParams_.Set("fields", googleapi.CombineFields(s))
6596	return c
6597}
6598
6599// IfNoneMatch sets the optional parameter which makes the operation
6600// fail if the object's ETag matches the given value. This is useful for
6601// getting updates only after the object has changed since the last
6602// request. Use googleapi.IsNotModified to check whether the response
6603// error from Do is the result of In-None-Match.
6604func (c *PeopleListDirectoryPeopleCall) IfNoneMatch(entityTag string) *PeopleListDirectoryPeopleCall {
6605	c.ifNoneMatch_ = entityTag
6606	return c
6607}
6608
6609// Context sets the context to be used in this call's Do method. Any
6610// pending HTTP request will be aborted if the provided context is
6611// canceled.
6612func (c *PeopleListDirectoryPeopleCall) Context(ctx context.Context) *PeopleListDirectoryPeopleCall {
6613	c.ctx_ = ctx
6614	return c
6615}
6616
6617// Header returns an http.Header that can be modified by the caller to
6618// add HTTP headers to the request.
6619func (c *PeopleListDirectoryPeopleCall) Header() http.Header {
6620	if c.header_ == nil {
6621		c.header_ = make(http.Header)
6622	}
6623	return c.header_
6624}
6625
6626func (c *PeopleListDirectoryPeopleCall) doRequest(alt string) (*http.Response, error) {
6627	reqHeaders := make(http.Header)
6628	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20211027")
6629	for k, v := range c.header_ {
6630		reqHeaders[k] = v
6631	}
6632	reqHeaders.Set("User-Agent", c.s.userAgent())
6633	if c.ifNoneMatch_ != "" {
6634		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
6635	}
6636	var body io.Reader = nil
6637	c.urlParams_.Set("alt", alt)
6638	c.urlParams_.Set("prettyPrint", "false")
6639	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/people:listDirectoryPeople")
6640	urls += "?" + c.urlParams_.Encode()
6641	req, err := http.NewRequest("GET", urls, body)
6642	if err != nil {
6643		return nil, err
6644	}
6645	req.Header = reqHeaders
6646	return gensupport.SendRequest(c.ctx_, c.s.client, req)
6647}
6648
6649// Do executes the "people.people.listDirectoryPeople" call.
6650// Exactly one of *ListDirectoryPeopleResponse or error will be non-nil.
6651// Any non-2xx status code is an error. Response headers are in either
6652// *ListDirectoryPeopleResponse.ServerResponse.Header or (if a response
6653// was returned at all) in error.(*googleapi.Error).Header. Use
6654// googleapi.IsNotModified to check whether the returned error was
6655// because http.StatusNotModified was returned.
6656func (c *PeopleListDirectoryPeopleCall) Do(opts ...googleapi.CallOption) (*ListDirectoryPeopleResponse, error) {
6657	gensupport.SetOptions(c.urlParams_, opts...)
6658	res, err := c.doRequest("json")
6659	if res != nil && res.StatusCode == http.StatusNotModified {
6660		if res.Body != nil {
6661			res.Body.Close()
6662		}
6663		return nil, &googleapi.Error{
6664			Code:   res.StatusCode,
6665			Header: res.Header,
6666		}
6667	}
6668	if err != nil {
6669		return nil, err
6670	}
6671	defer googleapi.CloseBody(res)
6672	if err := googleapi.CheckResponse(res); err != nil {
6673		return nil, err
6674	}
6675	ret := &ListDirectoryPeopleResponse{
6676		ServerResponse: googleapi.ServerResponse{
6677			Header:         res.Header,
6678			HTTPStatusCode: res.StatusCode,
6679		},
6680	}
6681	target := &ret
6682	if err := gensupport.DecodeResponse(target, res); err != nil {
6683		return nil, err
6684	}
6685	return ret, nil
6686	// {
6687	//   "description": "Provides a list of domain profiles and domain contacts in the authenticated user's domain directory. When the `sync_token` is specified, resources deleted since the last sync will be returned as a person with `PersonMetadata.deleted` set to true. When the `page_token` or `sync_token` is specified, all other request parameters must match the first call. Writes may have a propagation delay of several minutes for sync requests. Incremental syncs are not intended for read-after-write use cases. See example usage at [List the directory people that have changed](/people/v1/directory#list_the_directory_people_that_have_changed).",
6688	//   "flatPath": "v1/people:listDirectoryPeople",
6689	//   "httpMethod": "GET",
6690	//   "id": "people.people.listDirectoryPeople",
6691	//   "parameterOrder": [],
6692	//   "parameters": {
6693	//     "mergeSources": {
6694	//       "description": "Optional. Additional data to merge into the directory sources if they are connected through verified join keys such as email addresses or phone numbers.",
6695	//       "enum": [
6696	//         "DIRECTORY_MERGE_SOURCE_TYPE_UNSPECIFIED",
6697	//         "DIRECTORY_MERGE_SOURCE_TYPE_CONTACT"
6698	//       ],
6699	//       "enumDescriptions": [
6700	//         "Unspecified.",
6701	//         "User owned contact."
6702	//       ],
6703	//       "location": "query",
6704	//       "repeated": true,
6705	//       "type": "string"
6706	//     },
6707	//     "pageSize": {
6708	//       "description": "Optional. The number of people to include in the response. Valid values are between 1 and 1000, inclusive. Defaults to 100 if not set or set to 0.",
6709	//       "format": "int32",
6710	//       "location": "query",
6711	//       "type": "integer"
6712	//     },
6713	//     "pageToken": {
6714	//       "description": "Optional. A page token, received from a previous response `next_page_token`. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to `people.listDirectoryPeople` must match the first call that provided the page token.",
6715	//       "location": "query",
6716	//       "type": "string"
6717	//     },
6718	//     "readMask": {
6719	//       "description": "Required. A field mask to restrict which fields on each person are returned. Multiple fields can be specified by separating them with commas. 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",
6720	//       "format": "google-fieldmask",
6721	//       "location": "query",
6722	//       "type": "string"
6723	//     },
6724	//     "requestSyncToken": {
6725	//       "description": "Optional. Whether the response should return `next_sync_token`. It can be used to get incremental changes since the last request by setting it on the request `sync_token`. More details about sync behavior at `people.listDirectoryPeople`.",
6726	//       "location": "query",
6727	//       "type": "boolean"
6728	//     },
6729	//     "sources": {
6730	//       "description": "Required. Directory sources to return.",
6731	//       "enum": [
6732	//         "DIRECTORY_SOURCE_TYPE_UNSPECIFIED",
6733	//         "DIRECTORY_SOURCE_TYPE_DOMAIN_CONTACT",
6734	//         "DIRECTORY_SOURCE_TYPE_DOMAIN_PROFILE"
6735	//       ],
6736	//       "enumDescriptions": [
6737	//         "Unspecified.",
6738	//         "Google Workspace domain shared contact.",
6739	//         "Google Workspace domain profile."
6740	//       ],
6741	//       "location": "query",
6742	//       "repeated": true,
6743	//       "type": "string"
6744	//     },
6745	//     "syncToken": {
6746	//       "description": "Optional. A sync token, received from a previous response `next_sync_token` Provide this to retrieve only the resources changed since the last request. When syncing, all other parameters provided to `people.listDirectoryPeople` must match the first call that provided the sync token. More details about sync behavior at `people.listDirectoryPeople`.",
6747	//       "location": "query",
6748	//       "type": "string"
6749	//     }
6750	//   },
6751	//   "path": "v1/people:listDirectoryPeople",
6752	//   "response": {
6753	//     "$ref": "ListDirectoryPeopleResponse"
6754	//   },
6755	//   "scopes": [
6756	//     "https://www.googleapis.com/auth/directory.readonly"
6757	//   ]
6758	// }
6759
6760}
6761
6762// Pages invokes f for each page of results.
6763// A non-nil error returned from f will halt the iteration.
6764// The provided context supersedes any context provided to the Context method.
6765func (c *PeopleListDirectoryPeopleCall) Pages(ctx context.Context, f func(*ListDirectoryPeopleResponse) error) error {
6766	c.ctx_ = ctx
6767	defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
6768	for {
6769		x, err := c.Do()
6770		if err != nil {
6771			return err
6772		}
6773		if err := f(x); err != nil {
6774			return err
6775		}
6776		if x.NextPageToken == "" {
6777			return nil
6778		}
6779		c.PageToken(x.NextPageToken)
6780	}
6781}
6782
6783// method id "people.people.searchContacts":
6784
6785type PeopleSearchContactsCall struct {
6786	s            *Service
6787	urlParams_   gensupport.URLParams
6788	ifNoneMatch_ string
6789	ctx_         context.Context
6790	header_      http.Header
6791}
6792
6793// SearchContacts: Provides a list of contacts in the authenticated
6794// user's grouped contacts that matches the search query. The query
6795// matches on a contact's `names`, `nickNames`, `emailAddresses`,
6796// `phoneNumbers`, and `organizations` fields that are from the CONTACT
6797// source. **IMPORTANT**: Before searching, clients should send a warmup
6798// request with an empty query to update the cache. See
6799// https://developers.google.com/people/v1/contacts#search_the_users_contacts
6800func (r *PeopleService) SearchContacts() *PeopleSearchContactsCall {
6801	c := &PeopleSearchContactsCall{s: r.s, urlParams_: make(gensupport.URLParams)}
6802	return c
6803}
6804
6805// PageSize sets the optional parameter "pageSize": The number of
6806// results to return. Defaults to 10 if field is not set, or set to 0.
6807// Values greater than 30 will be capped to 30.
6808func (c *PeopleSearchContactsCall) PageSize(pageSize int64) *PeopleSearchContactsCall {
6809	c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
6810	return c
6811}
6812
6813// Query sets the optional parameter "query": Required. The plain-text
6814// query for the request. The query is used to match prefix phrases of
6815// the fields on a person. For example, a person with name "foo name"
6816// matches queries such as "f", "fo", "foo", "foo n", "nam", etc., but
6817// not "oo n".
6818func (c *PeopleSearchContactsCall) Query(query string) *PeopleSearchContactsCall {
6819	c.urlParams_.Set("query", query)
6820	return c
6821}
6822
6823// ReadMask sets the optional parameter "readMask": Required. A field
6824// mask to restrict which fields on each person are returned. Multiple
6825// fields can be specified by separating them with commas. Valid values
6826// are: * addresses * ageRanges * biographies * birthdays * calendarUrls
6827// * clientData * coverPhotos * emailAddresses * events * externalIds *
6828// genders * imClients * interests * locales * locations * memberships *
6829// metadata * miscKeywords * names * nicknames * occupations *
6830// organizations * phoneNumbers * photos * relations * sipAddresses *
6831// skills * urls * userDefined
6832func (c *PeopleSearchContactsCall) ReadMask(readMask string) *PeopleSearchContactsCall {
6833	c.urlParams_.Set("readMask", readMask)
6834	return c
6835}
6836
6837// Sources sets the optional parameter "sources": A mask of what source
6838// types to return. Defaults to READ_SOURCE_TYPE_CONTACT if not set.
6839//
6840// Possible values:
6841//   "READ_SOURCE_TYPE_UNSPECIFIED" - Unspecified.
6842//   "READ_SOURCE_TYPE_PROFILE" - Returns SourceType.ACCOUNT,
6843// SourceType.DOMAIN_PROFILE, and SourceType.PROFILE.
6844//   "READ_SOURCE_TYPE_CONTACT" - Returns SourceType.CONTACT.
6845//   "READ_SOURCE_TYPE_DOMAIN_CONTACT" - Returns
6846// SourceType.DOMAIN_CONTACT.
6847func (c *PeopleSearchContactsCall) Sources(sources ...string) *PeopleSearchContactsCall {
6848	c.urlParams_.SetMulti("sources", append([]string{}, sources...))
6849	return c
6850}
6851
6852// Fields allows partial responses to be retrieved. See
6853// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
6854// for more information.
6855func (c *PeopleSearchContactsCall) Fields(s ...googleapi.Field) *PeopleSearchContactsCall {
6856	c.urlParams_.Set("fields", googleapi.CombineFields(s))
6857	return c
6858}
6859
6860// IfNoneMatch sets the optional parameter which makes the operation
6861// fail if the object's ETag matches the given value. This is useful for
6862// getting updates only after the object has changed since the last
6863// request. Use googleapi.IsNotModified to check whether the response
6864// error from Do is the result of In-None-Match.
6865func (c *PeopleSearchContactsCall) IfNoneMatch(entityTag string) *PeopleSearchContactsCall {
6866	c.ifNoneMatch_ = entityTag
6867	return c
6868}
6869
6870// Context sets the context to be used in this call's Do method. Any
6871// pending HTTP request will be aborted if the provided context is
6872// canceled.
6873func (c *PeopleSearchContactsCall) Context(ctx context.Context) *PeopleSearchContactsCall {
6874	c.ctx_ = ctx
6875	return c
6876}
6877
6878// Header returns an http.Header that can be modified by the caller to
6879// add HTTP headers to the request.
6880func (c *PeopleSearchContactsCall) Header() http.Header {
6881	if c.header_ == nil {
6882		c.header_ = make(http.Header)
6883	}
6884	return c.header_
6885}
6886
6887func (c *PeopleSearchContactsCall) doRequest(alt string) (*http.Response, error) {
6888	reqHeaders := make(http.Header)
6889	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20211027")
6890	for k, v := range c.header_ {
6891		reqHeaders[k] = v
6892	}
6893	reqHeaders.Set("User-Agent", c.s.userAgent())
6894	if c.ifNoneMatch_ != "" {
6895		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
6896	}
6897	var body io.Reader = nil
6898	c.urlParams_.Set("alt", alt)
6899	c.urlParams_.Set("prettyPrint", "false")
6900	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/people:searchContacts")
6901	urls += "?" + c.urlParams_.Encode()
6902	req, err := http.NewRequest("GET", urls, body)
6903	if err != nil {
6904		return nil, err
6905	}
6906	req.Header = reqHeaders
6907	return gensupport.SendRequest(c.ctx_, c.s.client, req)
6908}
6909
6910// Do executes the "people.people.searchContacts" call.
6911// Exactly one of *SearchResponse or error will be non-nil. Any non-2xx
6912// status code is an error. Response headers are in either
6913// *SearchResponse.ServerResponse.Header or (if a response was returned
6914// at all) in error.(*googleapi.Error).Header. Use
6915// googleapi.IsNotModified to check whether the returned error was
6916// because http.StatusNotModified was returned.
6917func (c *PeopleSearchContactsCall) Do(opts ...googleapi.CallOption) (*SearchResponse, error) {
6918	gensupport.SetOptions(c.urlParams_, opts...)
6919	res, err := c.doRequest("json")
6920	if res != nil && res.StatusCode == http.StatusNotModified {
6921		if res.Body != nil {
6922			res.Body.Close()
6923		}
6924		return nil, &googleapi.Error{
6925			Code:   res.StatusCode,
6926			Header: res.Header,
6927		}
6928	}
6929	if err != nil {
6930		return nil, err
6931	}
6932	defer googleapi.CloseBody(res)
6933	if err := googleapi.CheckResponse(res); err != nil {
6934		return nil, err
6935	}
6936	ret := &SearchResponse{
6937		ServerResponse: googleapi.ServerResponse{
6938			Header:         res.Header,
6939			HTTPStatusCode: res.StatusCode,
6940		},
6941	}
6942	target := &ret
6943	if err := gensupport.DecodeResponse(target, res); err != nil {
6944		return nil, err
6945	}
6946	return ret, nil
6947	// {
6948	//   "description": "Provides a list of contacts in the authenticated user's grouped contacts that matches the search query. The query matches on a contact's `names`, `nickNames`, `emailAddresses`, `phoneNumbers`, and `organizations` fields that are from the CONTACT source. **IMPORTANT**: Before searching, clients should send a warmup request with an empty query to update the cache. See https://developers.google.com/people/v1/contacts#search_the_users_contacts",
6949	//   "flatPath": "v1/people:searchContacts",
6950	//   "httpMethod": "GET",
6951	//   "id": "people.people.searchContacts",
6952	//   "parameterOrder": [],
6953	//   "parameters": {
6954	//     "pageSize": {
6955	//       "description": "Optional. The number of results to return. Defaults to 10 if field is not set, or set to 0. Values greater than 30 will be capped to 30.",
6956	//       "format": "int32",
6957	//       "location": "query",
6958	//       "type": "integer"
6959	//     },
6960	//     "query": {
6961	//       "description": "Required. The plain-text query for the request. The query is used to match prefix phrases of the fields on a person. For example, a person with name \"foo name\" matches queries such as \"f\", \"fo\", \"foo\", \"foo n\", \"nam\", etc., but not \"oo n\".",
6962	//       "location": "query",
6963	//       "type": "string"
6964	//     },
6965	//     "readMask": {
6966	//       "description": "Required. A field mask to restrict which fields on each person are returned. Multiple fields can be specified by separating them with commas. 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",
6967	//       "format": "google-fieldmask",
6968	//       "location": "query",
6969	//       "type": "string"
6970	//     },
6971	//     "sources": {
6972	//       "description": "Optional. A mask of what source types to return. Defaults to READ_SOURCE_TYPE_CONTACT if not set.",
6973	//       "enum": [
6974	//         "READ_SOURCE_TYPE_UNSPECIFIED",
6975	//         "READ_SOURCE_TYPE_PROFILE",
6976	//         "READ_SOURCE_TYPE_CONTACT",
6977	//         "READ_SOURCE_TYPE_DOMAIN_CONTACT"
6978	//       ],
6979	//       "enumDescriptions": [
6980	//         "Unspecified.",
6981	//         "Returns SourceType.ACCOUNT, SourceType.DOMAIN_PROFILE, and SourceType.PROFILE.",
6982	//         "Returns SourceType.CONTACT.",
6983	//         "Returns SourceType.DOMAIN_CONTACT."
6984	//       ],
6985	//       "location": "query",
6986	//       "repeated": true,
6987	//       "type": "string"
6988	//     }
6989	//   },
6990	//   "path": "v1/people:searchContacts",
6991	//   "response": {
6992	//     "$ref": "SearchResponse"
6993	//   },
6994	//   "scopes": [
6995	//     "https://www.googleapis.com/auth/contacts",
6996	//     "https://www.googleapis.com/auth/contacts.readonly"
6997	//   ]
6998	// }
6999
7000}
7001
7002// method id "people.people.searchDirectoryPeople":
7003
7004type PeopleSearchDirectoryPeopleCall struct {
7005	s            *Service
7006	urlParams_   gensupport.URLParams
7007	ifNoneMatch_ string
7008	ctx_         context.Context
7009	header_      http.Header
7010}
7011
7012// SearchDirectoryPeople: Provides a list of domain profiles and domain
7013// contacts in the authenticated user's domain directory that match the
7014// search query.
7015func (r *PeopleService) SearchDirectoryPeople() *PeopleSearchDirectoryPeopleCall {
7016	c := &PeopleSearchDirectoryPeopleCall{s: r.s, urlParams_: make(gensupport.URLParams)}
7017	return c
7018}
7019
7020// MergeSources sets the optional parameter "mergeSources": Additional
7021// data to merge into the directory sources if they are connected
7022// through verified join keys such as email addresses or phone numbers.
7023//
7024// Possible values:
7025//   "DIRECTORY_MERGE_SOURCE_TYPE_UNSPECIFIED" - Unspecified.
7026//   "DIRECTORY_MERGE_SOURCE_TYPE_CONTACT" - User owned contact.
7027func (c *PeopleSearchDirectoryPeopleCall) MergeSources(mergeSources ...string) *PeopleSearchDirectoryPeopleCall {
7028	c.urlParams_.SetMulti("mergeSources", append([]string{}, mergeSources...))
7029	return c
7030}
7031
7032// PageSize sets the optional parameter "pageSize": The number of people
7033// to include in the response. Valid values are between 1 and 500,
7034// inclusive. Defaults to 100 if not set or set to 0.
7035func (c *PeopleSearchDirectoryPeopleCall) PageSize(pageSize int64) *PeopleSearchDirectoryPeopleCall {
7036	c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
7037	return c
7038}
7039
7040// PageToken sets the optional parameter "pageToken": A page token,
7041// received from a previous response `next_page_token`. Provide this to
7042// retrieve the subsequent page. When paginating, all other parameters
7043// provided to `SearchDirectoryPeople` must match the first call that
7044// provided the page token.
7045func (c *PeopleSearchDirectoryPeopleCall) PageToken(pageToken string) *PeopleSearchDirectoryPeopleCall {
7046	c.urlParams_.Set("pageToken", pageToken)
7047	return c
7048}
7049
7050// Query sets the optional parameter "query": Required. Prefix query
7051// that matches fields in the person. Does NOT use the read_mask for
7052// determining what fields to match.
7053func (c *PeopleSearchDirectoryPeopleCall) Query(query string) *PeopleSearchDirectoryPeopleCall {
7054	c.urlParams_.Set("query", query)
7055	return c
7056}
7057
7058// ReadMask sets the optional parameter "readMask": Required. A field
7059// mask to restrict which fields on each person are returned. Multiple
7060// fields can be specified by separating them with commas. Valid values
7061// are: * addresses * ageRanges * biographies * birthdays * calendarUrls
7062// * clientData * coverPhotos * emailAddresses * events * externalIds *
7063// genders * imClients * interests * locales * locations * memberships *
7064// metadata * miscKeywords * names * nicknames * occupations *
7065// organizations * phoneNumbers * photos * relations * sipAddresses *
7066// skills * urls * userDefined
7067func (c *PeopleSearchDirectoryPeopleCall) ReadMask(readMask string) *PeopleSearchDirectoryPeopleCall {
7068	c.urlParams_.Set("readMask", readMask)
7069	return c
7070}
7071
7072// Sources sets the optional parameter "sources": Required. Directory
7073// sources to return.
7074//
7075// Possible values:
7076//   "DIRECTORY_SOURCE_TYPE_UNSPECIFIED" - Unspecified.
7077//   "DIRECTORY_SOURCE_TYPE_DOMAIN_CONTACT" - Google Workspace domain
7078// shared contact.
7079//   "DIRECTORY_SOURCE_TYPE_DOMAIN_PROFILE" - Google Workspace domain
7080// profile.
7081func (c *PeopleSearchDirectoryPeopleCall) Sources(sources ...string) *PeopleSearchDirectoryPeopleCall {
7082	c.urlParams_.SetMulti("sources", append([]string{}, sources...))
7083	return c
7084}
7085
7086// Fields allows partial responses to be retrieved. See
7087// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
7088// for more information.
7089func (c *PeopleSearchDirectoryPeopleCall) Fields(s ...googleapi.Field) *PeopleSearchDirectoryPeopleCall {
7090	c.urlParams_.Set("fields", googleapi.CombineFields(s))
7091	return c
7092}
7093
7094// IfNoneMatch sets the optional parameter which makes the operation
7095// fail if the object's ETag matches the given value. This is useful for
7096// getting updates only after the object has changed since the last
7097// request. Use googleapi.IsNotModified to check whether the response
7098// error from Do is the result of In-None-Match.
7099func (c *PeopleSearchDirectoryPeopleCall) IfNoneMatch(entityTag string) *PeopleSearchDirectoryPeopleCall {
7100	c.ifNoneMatch_ = entityTag
7101	return c
7102}
7103
7104// Context sets the context to be used in this call's Do method. Any
7105// pending HTTP request will be aborted if the provided context is
7106// canceled.
7107func (c *PeopleSearchDirectoryPeopleCall) Context(ctx context.Context) *PeopleSearchDirectoryPeopleCall {
7108	c.ctx_ = ctx
7109	return c
7110}
7111
7112// Header returns an http.Header that can be modified by the caller to
7113// add HTTP headers to the request.
7114func (c *PeopleSearchDirectoryPeopleCall) Header() http.Header {
7115	if c.header_ == nil {
7116		c.header_ = make(http.Header)
7117	}
7118	return c.header_
7119}
7120
7121func (c *PeopleSearchDirectoryPeopleCall) doRequest(alt string) (*http.Response, error) {
7122	reqHeaders := make(http.Header)
7123	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20211027")
7124	for k, v := range c.header_ {
7125		reqHeaders[k] = v
7126	}
7127	reqHeaders.Set("User-Agent", c.s.userAgent())
7128	if c.ifNoneMatch_ != "" {
7129		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
7130	}
7131	var body io.Reader = nil
7132	c.urlParams_.Set("alt", alt)
7133	c.urlParams_.Set("prettyPrint", "false")
7134	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/people:searchDirectoryPeople")
7135	urls += "?" + c.urlParams_.Encode()
7136	req, err := http.NewRequest("GET", urls, body)
7137	if err != nil {
7138		return nil, err
7139	}
7140	req.Header = reqHeaders
7141	return gensupport.SendRequest(c.ctx_, c.s.client, req)
7142}
7143
7144// Do executes the "people.people.searchDirectoryPeople" call.
7145// Exactly one of *SearchDirectoryPeopleResponse or error will be
7146// non-nil. Any non-2xx status code is an error. Response headers are in
7147// either *SearchDirectoryPeopleResponse.ServerResponse.Header or (if a
7148// response was returned at all) in error.(*googleapi.Error).Header. Use
7149// googleapi.IsNotModified to check whether the returned error was
7150// because http.StatusNotModified was returned.
7151func (c *PeopleSearchDirectoryPeopleCall) Do(opts ...googleapi.CallOption) (*SearchDirectoryPeopleResponse, error) {
7152	gensupport.SetOptions(c.urlParams_, opts...)
7153	res, err := c.doRequest("json")
7154	if res != nil && res.StatusCode == http.StatusNotModified {
7155		if res.Body != nil {
7156			res.Body.Close()
7157		}
7158		return nil, &googleapi.Error{
7159			Code:   res.StatusCode,
7160			Header: res.Header,
7161		}
7162	}
7163	if err != nil {
7164		return nil, err
7165	}
7166	defer googleapi.CloseBody(res)
7167	if err := googleapi.CheckResponse(res); err != nil {
7168		return nil, err
7169	}
7170	ret := &SearchDirectoryPeopleResponse{
7171		ServerResponse: googleapi.ServerResponse{
7172			Header:         res.Header,
7173			HTTPStatusCode: res.StatusCode,
7174		},
7175	}
7176	target := &ret
7177	if err := gensupport.DecodeResponse(target, res); err != nil {
7178		return nil, err
7179	}
7180	return ret, nil
7181	// {
7182	//   "description": "Provides a list of domain profiles and domain contacts in the authenticated user's domain directory that match the search query.",
7183	//   "flatPath": "v1/people:searchDirectoryPeople",
7184	//   "httpMethod": "GET",
7185	//   "id": "people.people.searchDirectoryPeople",
7186	//   "parameterOrder": [],
7187	//   "parameters": {
7188	//     "mergeSources": {
7189	//       "description": "Optional. Additional data to merge into the directory sources if they are connected through verified join keys such as email addresses or phone numbers.",
7190	//       "enum": [
7191	//         "DIRECTORY_MERGE_SOURCE_TYPE_UNSPECIFIED",
7192	//         "DIRECTORY_MERGE_SOURCE_TYPE_CONTACT"
7193	//       ],
7194	//       "enumDescriptions": [
7195	//         "Unspecified.",
7196	//         "User owned contact."
7197	//       ],
7198	//       "location": "query",
7199	//       "repeated": true,
7200	//       "type": "string"
7201	//     },
7202	//     "pageSize": {
7203	//       "description": "Optional. The number of people to include in the response. Valid values are between 1 and 500, inclusive. Defaults to 100 if not set or set to 0.",
7204	//       "format": "int32",
7205	//       "location": "query",
7206	//       "type": "integer"
7207	//     },
7208	//     "pageToken": {
7209	//       "description": "Optional. A page token, received from a previous response `next_page_token`. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to `SearchDirectoryPeople` must match the first call that provided the page token.",
7210	//       "location": "query",
7211	//       "type": "string"
7212	//     },
7213	//     "query": {
7214	//       "description": "Required. Prefix query that matches fields in the person. Does NOT use the read_mask for determining what fields to match.",
7215	//       "location": "query",
7216	//       "type": "string"
7217	//     },
7218	//     "readMask": {
7219	//       "description": "Required. A field mask to restrict which fields on each person are returned. Multiple fields can be specified by separating them with commas. 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",
7220	//       "format": "google-fieldmask",
7221	//       "location": "query",
7222	//       "type": "string"
7223	//     },
7224	//     "sources": {
7225	//       "description": "Required. Directory sources to return.",
7226	//       "enum": [
7227	//         "DIRECTORY_SOURCE_TYPE_UNSPECIFIED",
7228	//         "DIRECTORY_SOURCE_TYPE_DOMAIN_CONTACT",
7229	//         "DIRECTORY_SOURCE_TYPE_DOMAIN_PROFILE"
7230	//       ],
7231	//       "enumDescriptions": [
7232	//         "Unspecified.",
7233	//         "Google Workspace domain shared contact.",
7234	//         "Google Workspace domain profile."
7235	//       ],
7236	//       "location": "query",
7237	//       "repeated": true,
7238	//       "type": "string"
7239	//     }
7240	//   },
7241	//   "path": "v1/people:searchDirectoryPeople",
7242	//   "response": {
7243	//     "$ref": "SearchDirectoryPeopleResponse"
7244	//   },
7245	//   "scopes": [
7246	//     "https://www.googleapis.com/auth/directory.readonly"
7247	//   ]
7248	// }
7249
7250}
7251
7252// Pages invokes f for each page of results.
7253// A non-nil error returned from f will halt the iteration.
7254// The provided context supersedes any context provided to the Context method.
7255func (c *PeopleSearchDirectoryPeopleCall) Pages(ctx context.Context, f func(*SearchDirectoryPeopleResponse) error) error {
7256	c.ctx_ = ctx
7257	defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
7258	for {
7259		x, err := c.Do()
7260		if err != nil {
7261			return err
7262		}
7263		if err := f(x); err != nil {
7264			return err
7265		}
7266		if x.NextPageToken == "" {
7267			return nil
7268		}
7269		c.PageToken(x.NextPageToken)
7270	}
7271}
7272
7273// method id "people.people.updateContact":
7274
7275type PeopleUpdateContactCall struct {
7276	s            *Service
7277	resourceName string
7278	person       *Person
7279	urlParams_   gensupport.URLParams
7280	ctx_         context.Context
7281	header_      http.Header
7282}
7283
7284// UpdateContact: Update contact data for an existing contact person.
7285// Any non-contact data will not be modified. Any non-contact data in
7286// the person to update will be ignored. All fields specified in the
7287// `update_mask` will be replaced. The server returns a 400 error if
7288// `person.metadata.sources` is not specified for the contact to be
7289// updated or if there is no contact source. The server returns a 400
7290// error with reason "failedPrecondition" if
7291// `person.metadata.sources.etag` is different than the contact's etag,
7292// which indicates the contact has changed since its data was read.
7293// Clients should get the latest person and merge their updates into the
7294// latest person. The server returns a 400 error if `memberships` are
7295// being updated and there are no contact group memberships specified on
7296// the person. The server returns a 400 error if more than one field is
7297// specified on a field that is a singleton for contact sources: *
7298// biographies * birthdays * genders * names
7299//
7300// - resourceName: The resource name for the person, assigned by the
7301//   server. An ASCII string with a max length of 27 characters, in the
7302//   form of `people/{person_id}`.
7303func (r *PeopleService) UpdateContact(resourceName string, person *Person) *PeopleUpdateContactCall {
7304	c := &PeopleUpdateContactCall{s: r.s, urlParams_: make(gensupport.URLParams)}
7305	c.resourceName = resourceName
7306	c.person = person
7307	return c
7308}
7309
7310// PersonFields sets the optional parameter "personFields": A field mask
7311// to restrict which fields on each person are returned. Multiple fields
7312// can be specified by separating them with commas. Defaults to all
7313// fields if not set. Valid values are: * addresses * ageRanges *
7314// biographies * birthdays * calendarUrls * clientData * coverPhotos *
7315// emailAddresses * events * externalIds * genders * imClients *
7316// interests * locales * locations * memberships * metadata *
7317// miscKeywords * names * nicknames * occupations * organizations *
7318// phoneNumbers * photos * relations * sipAddresses * skills * urls *
7319// userDefined
7320func (c *PeopleUpdateContactCall) PersonFields(personFields string) *PeopleUpdateContactCall {
7321	c.urlParams_.Set("personFields", personFields)
7322	return c
7323}
7324
7325// Sources sets the optional parameter "sources": A mask of what source
7326// types to return. Defaults to READ_SOURCE_TYPE_CONTACT and
7327// READ_SOURCE_TYPE_PROFILE if not set.
7328//
7329// Possible values:
7330//   "READ_SOURCE_TYPE_UNSPECIFIED" - Unspecified.
7331//   "READ_SOURCE_TYPE_PROFILE" - Returns SourceType.ACCOUNT,
7332// SourceType.DOMAIN_PROFILE, and SourceType.PROFILE.
7333//   "READ_SOURCE_TYPE_CONTACT" - Returns SourceType.CONTACT.
7334//   "READ_SOURCE_TYPE_DOMAIN_CONTACT" - Returns
7335// SourceType.DOMAIN_CONTACT.
7336func (c *PeopleUpdateContactCall) Sources(sources ...string) *PeopleUpdateContactCall {
7337	c.urlParams_.SetMulti("sources", append([]string{}, sources...))
7338	return c
7339}
7340
7341// UpdatePersonFields sets the optional parameter "updatePersonFields":
7342// Required. A field mask to restrict which fields on the person are
7343// updated. Multiple fields can be specified by separating them with
7344// commas. All updated fields will be replaced. Valid values are: *
7345// addresses * biographies * birthdays * calendarUrls * clientData *
7346// emailAddresses * events * externalIds * genders * imClients *
7347// interests * locales * locations * memberships * miscKeywords * names
7348// * nicknames * occupations * organizations * phoneNumbers * relations
7349// * sipAddresses * urls * userDefined
7350func (c *PeopleUpdateContactCall) UpdatePersonFields(updatePersonFields string) *PeopleUpdateContactCall {
7351	c.urlParams_.Set("updatePersonFields", updatePersonFields)
7352	return c
7353}
7354
7355// Fields allows partial responses to be retrieved. See
7356// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
7357// for more information.
7358func (c *PeopleUpdateContactCall) Fields(s ...googleapi.Field) *PeopleUpdateContactCall {
7359	c.urlParams_.Set("fields", googleapi.CombineFields(s))
7360	return c
7361}
7362
7363// Context sets the context to be used in this call's Do method. Any
7364// pending HTTP request will be aborted if the provided context is
7365// canceled.
7366func (c *PeopleUpdateContactCall) Context(ctx context.Context) *PeopleUpdateContactCall {
7367	c.ctx_ = ctx
7368	return c
7369}
7370
7371// Header returns an http.Header that can be modified by the caller to
7372// add HTTP headers to the request.
7373func (c *PeopleUpdateContactCall) Header() http.Header {
7374	if c.header_ == nil {
7375		c.header_ = make(http.Header)
7376	}
7377	return c.header_
7378}
7379
7380func (c *PeopleUpdateContactCall) doRequest(alt string) (*http.Response, error) {
7381	reqHeaders := make(http.Header)
7382	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20211027")
7383	for k, v := range c.header_ {
7384		reqHeaders[k] = v
7385	}
7386	reqHeaders.Set("User-Agent", c.s.userAgent())
7387	var body io.Reader = nil
7388	body, err := googleapi.WithoutDataWrapper.JSONReader(c.person)
7389	if err != nil {
7390		return nil, err
7391	}
7392	reqHeaders.Set("Content-Type", "application/json")
7393	c.urlParams_.Set("alt", alt)
7394	c.urlParams_.Set("prettyPrint", "false")
7395	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+resourceName}:updateContact")
7396	urls += "?" + c.urlParams_.Encode()
7397	req, err := http.NewRequest("PATCH", urls, body)
7398	if err != nil {
7399		return nil, err
7400	}
7401	req.Header = reqHeaders
7402	googleapi.Expand(req.URL, map[string]string{
7403		"resourceName": c.resourceName,
7404	})
7405	return gensupport.SendRequest(c.ctx_, c.s.client, req)
7406}
7407
7408// Do executes the "people.people.updateContact" call.
7409// Exactly one of *Person or error will be non-nil. Any non-2xx status
7410// code is an error. Response headers are in either
7411// *Person.ServerResponse.Header or (if a response was returned at all)
7412// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
7413// check whether the returned error was because http.StatusNotModified
7414// was returned.
7415func (c *PeopleUpdateContactCall) Do(opts ...googleapi.CallOption) (*Person, error) {
7416	gensupport.SetOptions(c.urlParams_, opts...)
7417	res, err := c.doRequest("json")
7418	if res != nil && res.StatusCode == http.StatusNotModified {
7419		if res.Body != nil {
7420			res.Body.Close()
7421		}
7422		return nil, &googleapi.Error{
7423			Code:   res.StatusCode,
7424			Header: res.Header,
7425		}
7426	}
7427	if err != nil {
7428		return nil, err
7429	}
7430	defer googleapi.CloseBody(res)
7431	if err := googleapi.CheckResponse(res); err != nil {
7432		return nil, err
7433	}
7434	ret := &Person{
7435		ServerResponse: googleapi.ServerResponse{
7436			Header:         res.Header,
7437			HTTPStatusCode: res.StatusCode,
7438		},
7439	}
7440	target := &ret
7441	if err := gensupport.DecodeResponse(target, res); err != nil {
7442		return nil, err
7443	}
7444	return ret, nil
7445	// {
7446	//   "description": "Update contact data for an existing contact person. Any non-contact data will not be modified. Any non-contact data in the person to update will be ignored. All fields specified in the `update_mask` will be replaced. The server returns a 400 error if `person.metadata.sources` is not specified for the contact to be updated or if there is no contact source. The server returns a 400 error with reason `\"failedPrecondition\"` if `person.metadata.sources.etag` is different than the contact's etag, which indicates the contact has changed since its data was read. Clients should get the latest person and merge their updates into the latest person. The server returns a 400 error if `memberships` are being updated and there are no contact group memberships specified on the person. The server returns a 400 error if more than one field is specified on a field that is a singleton for contact sources: * biographies * birthdays * genders * names",
7447	//   "flatPath": "v1/people/{peopleId}:updateContact",
7448	//   "httpMethod": "PATCH",
7449	//   "id": "people.people.updateContact",
7450	//   "parameterOrder": [
7451	//     "resourceName"
7452	//   ],
7453	//   "parameters": {
7454	//     "personFields": {
7455	//       "description": "Optional. A field mask to restrict which fields on each person are returned. Multiple fields can be specified by separating them with commas. Defaults to all 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",
7456	//       "format": "google-fieldmask",
7457	//       "location": "query",
7458	//       "type": "string"
7459	//     },
7460	//     "resourceName": {
7461	//       "description": "The resource name for the person, assigned by the server. An ASCII string with a max length of 27 characters, in the form of `people/{person_id}`.",
7462	//       "location": "path",
7463	//       "pattern": "^people/[^/]+$",
7464	//       "required": true,
7465	//       "type": "string"
7466	//     },
7467	//     "sources": {
7468	//       "description": "Optional. A mask of what source types to return. Defaults to READ_SOURCE_TYPE_CONTACT and READ_SOURCE_TYPE_PROFILE if not set.",
7469	//       "enum": [
7470	//         "READ_SOURCE_TYPE_UNSPECIFIED",
7471	//         "READ_SOURCE_TYPE_PROFILE",
7472	//         "READ_SOURCE_TYPE_CONTACT",
7473	//         "READ_SOURCE_TYPE_DOMAIN_CONTACT"
7474	//       ],
7475	//       "enumDescriptions": [
7476	//         "Unspecified.",
7477	//         "Returns SourceType.ACCOUNT, SourceType.DOMAIN_PROFILE, and SourceType.PROFILE.",
7478	//         "Returns SourceType.CONTACT.",
7479	//         "Returns SourceType.DOMAIN_CONTACT."
7480	//       ],
7481	//       "location": "query",
7482	//       "repeated": true,
7483	//       "type": "string"
7484	//     },
7485	//     "updatePersonFields": {
7486	//       "description": "Required. A field mask to restrict which fields on the person are updated. Multiple fields can be specified by separating them with commas. All updated fields will be replaced. Valid values are: * addresses * biographies * birthdays * calendarUrls * clientData * emailAddresses * events * externalIds * genders * imClients * interests * locales * locations * memberships * miscKeywords * names * nicknames * occupations * organizations * phoneNumbers * relations * sipAddresses * urls * userDefined",
7487	//       "format": "google-fieldmask",
7488	//       "location": "query",
7489	//       "type": "string"
7490	//     }
7491	//   },
7492	//   "path": "v1/{+resourceName}:updateContact",
7493	//   "request": {
7494	//     "$ref": "Person"
7495	//   },
7496	//   "response": {
7497	//     "$ref": "Person"
7498	//   },
7499	//   "scopes": [
7500	//     "https://www.googleapis.com/auth/contacts"
7501	//   ]
7502	// }
7503
7504}
7505
7506// method id "people.people.updateContactPhoto":
7507
7508type PeopleUpdateContactPhotoCall struct {
7509	s                         *Service
7510	resourceName              string
7511	updatecontactphotorequest *UpdateContactPhotoRequest
7512	urlParams_                gensupport.URLParams
7513	ctx_                      context.Context
7514	header_                   http.Header
7515}
7516
7517// UpdateContactPhoto: Update a contact's photo.
7518//
7519// - resourceName: Person resource name.
7520func (r *PeopleService) UpdateContactPhoto(resourceName string, updatecontactphotorequest *UpdateContactPhotoRequest) *PeopleUpdateContactPhotoCall {
7521	c := &PeopleUpdateContactPhotoCall{s: r.s, urlParams_: make(gensupport.URLParams)}
7522	c.resourceName = resourceName
7523	c.updatecontactphotorequest = updatecontactphotorequest
7524	return c
7525}
7526
7527// Fields allows partial responses to be retrieved. See
7528// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
7529// for more information.
7530func (c *PeopleUpdateContactPhotoCall) Fields(s ...googleapi.Field) *PeopleUpdateContactPhotoCall {
7531	c.urlParams_.Set("fields", googleapi.CombineFields(s))
7532	return c
7533}
7534
7535// Context sets the context to be used in this call's Do method. Any
7536// pending HTTP request will be aborted if the provided context is
7537// canceled.
7538func (c *PeopleUpdateContactPhotoCall) Context(ctx context.Context) *PeopleUpdateContactPhotoCall {
7539	c.ctx_ = ctx
7540	return c
7541}
7542
7543// Header returns an http.Header that can be modified by the caller to
7544// add HTTP headers to the request.
7545func (c *PeopleUpdateContactPhotoCall) Header() http.Header {
7546	if c.header_ == nil {
7547		c.header_ = make(http.Header)
7548	}
7549	return c.header_
7550}
7551
7552func (c *PeopleUpdateContactPhotoCall) doRequest(alt string) (*http.Response, error) {
7553	reqHeaders := make(http.Header)
7554	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20211027")
7555	for k, v := range c.header_ {
7556		reqHeaders[k] = v
7557	}
7558	reqHeaders.Set("User-Agent", c.s.userAgent())
7559	var body io.Reader = nil
7560	body, err := googleapi.WithoutDataWrapper.JSONReader(c.updatecontactphotorequest)
7561	if err != nil {
7562		return nil, err
7563	}
7564	reqHeaders.Set("Content-Type", "application/json")
7565	c.urlParams_.Set("alt", alt)
7566	c.urlParams_.Set("prettyPrint", "false")
7567	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+resourceName}:updateContactPhoto")
7568	urls += "?" + c.urlParams_.Encode()
7569	req, err := http.NewRequest("PATCH", urls, body)
7570	if err != nil {
7571		return nil, err
7572	}
7573	req.Header = reqHeaders
7574	googleapi.Expand(req.URL, map[string]string{
7575		"resourceName": c.resourceName,
7576	})
7577	return gensupport.SendRequest(c.ctx_, c.s.client, req)
7578}
7579
7580// Do executes the "people.people.updateContactPhoto" call.
7581// Exactly one of *UpdateContactPhotoResponse or error will be non-nil.
7582// Any non-2xx status code is an error. Response headers are in either
7583// *UpdateContactPhotoResponse.ServerResponse.Header or (if a response
7584// was returned at all) in error.(*googleapi.Error).Header. Use
7585// googleapi.IsNotModified to check whether the returned error was
7586// because http.StatusNotModified was returned.
7587func (c *PeopleUpdateContactPhotoCall) Do(opts ...googleapi.CallOption) (*UpdateContactPhotoResponse, error) {
7588	gensupport.SetOptions(c.urlParams_, opts...)
7589	res, err := c.doRequest("json")
7590	if res != nil && res.StatusCode == http.StatusNotModified {
7591		if res.Body != nil {
7592			res.Body.Close()
7593		}
7594		return nil, &googleapi.Error{
7595			Code:   res.StatusCode,
7596			Header: res.Header,
7597		}
7598	}
7599	if err != nil {
7600		return nil, err
7601	}
7602	defer googleapi.CloseBody(res)
7603	if err := googleapi.CheckResponse(res); err != nil {
7604		return nil, err
7605	}
7606	ret := &UpdateContactPhotoResponse{
7607		ServerResponse: googleapi.ServerResponse{
7608			Header:         res.Header,
7609			HTTPStatusCode: res.StatusCode,
7610		},
7611	}
7612	target := &ret
7613	if err := gensupport.DecodeResponse(target, res); err != nil {
7614		return nil, err
7615	}
7616	return ret, nil
7617	// {
7618	//   "description": "Update a contact's photo.",
7619	//   "flatPath": "v1/people/{peopleId}:updateContactPhoto",
7620	//   "httpMethod": "PATCH",
7621	//   "id": "people.people.updateContactPhoto",
7622	//   "parameterOrder": [
7623	//     "resourceName"
7624	//   ],
7625	//   "parameters": {
7626	//     "resourceName": {
7627	//       "description": "Required. Person resource name",
7628	//       "location": "path",
7629	//       "pattern": "^people/[^/]+$",
7630	//       "required": true,
7631	//       "type": "string"
7632	//     }
7633	//   },
7634	//   "path": "v1/{+resourceName}:updateContactPhoto",
7635	//   "request": {
7636	//     "$ref": "UpdateContactPhotoRequest"
7637	//   },
7638	//   "response": {
7639	//     "$ref": "UpdateContactPhotoResponse"
7640	//   },
7641	//   "scopes": [
7642	//     "https://www.googleapis.com/auth/contacts"
7643	//   ]
7644	// }
7645
7646}
7647
7648// method id "people.people.connections.list":
7649
7650type PeopleConnectionsListCall struct {
7651	s            *Service
7652	resourceName string
7653	urlParams_   gensupport.URLParams
7654	ifNoneMatch_ string
7655	ctx_         context.Context
7656	header_      http.Header
7657}
7658
7659// List: Provides a list of the authenticated user's contacts. Sync
7660// tokens expire 7 days after the full sync. A request with an expired
7661// sync token will result in a 410 error. In the case of such an error
7662// clients should make a full sync request without a `sync_token`. The
7663// first page of a full sync request has an additional quota. If the
7664// quota is exceeded, a 429 error will be returned. This quota is fixed
7665// and can not be increased. When the `sync_token` is specified,
7666// resources deleted since the last sync will be returned as a person
7667// with `PersonMetadata.deleted` set to true. When the `page_token` or
7668// `sync_token` is specified, all other request parameters must match
7669// the first call. Writes may have a propagation delay of several
7670// minutes for sync requests. Incremental syncs are not intended for
7671// read-after-write use cases. See example usage at List the user's
7672// contacts that have changed
7673// (/people/v1/contacts#list_the_users_contacts_that_have_changed).
7674//
7675// - resourceName: The resource name to return connections for. Only
7676//   `people/me` is valid.
7677func (r *PeopleConnectionsService) List(resourceName string) *PeopleConnectionsListCall {
7678	c := &PeopleConnectionsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
7679	c.resourceName = resourceName
7680	return c
7681}
7682
7683// PageSize sets the optional parameter "pageSize": The number of
7684// connections to include in the response. Valid values are between 1
7685// and 1000, inclusive. Defaults to 100 if not set or set to 0.
7686func (c *PeopleConnectionsListCall) PageSize(pageSize int64) *PeopleConnectionsListCall {
7687	c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
7688	return c
7689}
7690
7691// PageToken sets the optional parameter "pageToken": A page token,
7692// received from a previous response `next_page_token`. Provide this to
7693// retrieve the subsequent page. When paginating, all other parameters
7694// provided to `people.connections.list` must match the first call that
7695// provided the page token.
7696func (c *PeopleConnectionsListCall) PageToken(pageToken string) *PeopleConnectionsListCall {
7697	c.urlParams_.Set("pageToken", pageToken)
7698	return c
7699}
7700
7701// PersonFields sets the optional parameter "personFields": Required. A
7702// field mask to restrict which fields on each person are returned.
7703// Multiple fields can be specified by separating them with commas.
7704// Valid values are: * addresses * ageRanges * biographies * birthdays *
7705// calendarUrls * clientData * coverPhotos * emailAddresses * events *
7706// externalIds * genders * imClients * interests * locales * locations *
7707// memberships * metadata * miscKeywords * names * nicknames *
7708// occupations * organizations * phoneNumbers * photos * relations *
7709// sipAddresses * skills * urls * userDefined
7710func (c *PeopleConnectionsListCall) PersonFields(personFields string) *PeopleConnectionsListCall {
7711	c.urlParams_.Set("personFields", personFields)
7712	return c
7713}
7714
7715// RequestMaskIncludeField sets the optional parameter
7716// "requestMask.includeField": Required. Comma-separated list of person
7717// fields to be included in the response. Each path should start with
7718// `person.`: for example, `person.names` or `person.photos`.
7719func (c *PeopleConnectionsListCall) RequestMaskIncludeField(requestMaskIncludeField string) *PeopleConnectionsListCall {
7720	c.urlParams_.Set("requestMask.includeField", requestMaskIncludeField)
7721	return c
7722}
7723
7724// RequestSyncToken sets the optional parameter "requestSyncToken":
7725// Whether the response should return `next_sync_token` on the last page
7726// of results. It can be used to get incremental changes since the last
7727// request by setting it on the request `sync_token`. More details about
7728// sync behavior at `people.connections.list`.
7729func (c *PeopleConnectionsListCall) RequestSyncToken(requestSyncToken bool) *PeopleConnectionsListCall {
7730	c.urlParams_.Set("requestSyncToken", fmt.Sprint(requestSyncToken))
7731	return c
7732}
7733
7734// SortOrder sets the optional parameter "sortOrder": The order in which
7735// the connections should be sorted. Defaults to
7736// `LAST_MODIFIED_ASCENDING`.
7737//
7738// Possible values:
7739//   "LAST_MODIFIED_ASCENDING" - Sort people by when they were changed;
7740// older entries first.
7741//   "LAST_MODIFIED_DESCENDING" - Sort people by when they were changed;
7742// newer entries first.
7743//   "FIRST_NAME_ASCENDING" - Sort people by first name.
7744//   "LAST_NAME_ASCENDING" - Sort people by last name.
7745func (c *PeopleConnectionsListCall) SortOrder(sortOrder string) *PeopleConnectionsListCall {
7746	c.urlParams_.Set("sortOrder", sortOrder)
7747	return c
7748}
7749
7750// Sources sets the optional parameter "sources": A mask of what source
7751// types to return. Defaults to READ_SOURCE_TYPE_CONTACT and
7752// READ_SOURCE_TYPE_PROFILE if not set.
7753//
7754// Possible values:
7755//   "READ_SOURCE_TYPE_UNSPECIFIED" - Unspecified.
7756//   "READ_SOURCE_TYPE_PROFILE" - Returns SourceType.ACCOUNT,
7757// SourceType.DOMAIN_PROFILE, and SourceType.PROFILE.
7758//   "READ_SOURCE_TYPE_CONTACT" - Returns SourceType.CONTACT.
7759//   "READ_SOURCE_TYPE_DOMAIN_CONTACT" - Returns
7760// SourceType.DOMAIN_CONTACT.
7761func (c *PeopleConnectionsListCall) Sources(sources ...string) *PeopleConnectionsListCall {
7762	c.urlParams_.SetMulti("sources", append([]string{}, sources...))
7763	return c
7764}
7765
7766// SyncToken sets the optional parameter "syncToken": A sync token,
7767// received from a previous response `next_sync_token` Provide this to
7768// retrieve only the resources changed since the last request. When
7769// syncing, all other parameters provided to `people.connections.list`
7770// must match the first call that provided the sync token. More details
7771// about sync behavior at `people.connections.list`.
7772func (c *PeopleConnectionsListCall) SyncToken(syncToken string) *PeopleConnectionsListCall {
7773	c.urlParams_.Set("syncToken", syncToken)
7774	return c
7775}
7776
7777// Fields allows partial responses to be retrieved. See
7778// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
7779// for more information.
7780func (c *PeopleConnectionsListCall) Fields(s ...googleapi.Field) *PeopleConnectionsListCall {
7781	c.urlParams_.Set("fields", googleapi.CombineFields(s))
7782	return c
7783}
7784
7785// IfNoneMatch sets the optional parameter which makes the operation
7786// fail if the object's ETag matches the given value. This is useful for
7787// getting updates only after the object has changed since the last
7788// request. Use googleapi.IsNotModified to check whether the response
7789// error from Do is the result of In-None-Match.
7790func (c *PeopleConnectionsListCall) IfNoneMatch(entityTag string) *PeopleConnectionsListCall {
7791	c.ifNoneMatch_ = entityTag
7792	return c
7793}
7794
7795// Context sets the context to be used in this call's Do method. Any
7796// pending HTTP request will be aborted if the provided context is
7797// canceled.
7798func (c *PeopleConnectionsListCall) Context(ctx context.Context) *PeopleConnectionsListCall {
7799	c.ctx_ = ctx
7800	return c
7801}
7802
7803// Header returns an http.Header that can be modified by the caller to
7804// add HTTP headers to the request.
7805func (c *PeopleConnectionsListCall) Header() http.Header {
7806	if c.header_ == nil {
7807		c.header_ = make(http.Header)
7808	}
7809	return c.header_
7810}
7811
7812func (c *PeopleConnectionsListCall) doRequest(alt string) (*http.Response, error) {
7813	reqHeaders := make(http.Header)
7814	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20211027")
7815	for k, v := range c.header_ {
7816		reqHeaders[k] = v
7817	}
7818	reqHeaders.Set("User-Agent", c.s.userAgent())
7819	if c.ifNoneMatch_ != "" {
7820		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
7821	}
7822	var body io.Reader = nil
7823	c.urlParams_.Set("alt", alt)
7824	c.urlParams_.Set("prettyPrint", "false")
7825	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+resourceName}/connections")
7826	urls += "?" + c.urlParams_.Encode()
7827	req, err := http.NewRequest("GET", urls, body)
7828	if err != nil {
7829		return nil, err
7830	}
7831	req.Header = reqHeaders
7832	googleapi.Expand(req.URL, map[string]string{
7833		"resourceName": c.resourceName,
7834	})
7835	return gensupport.SendRequest(c.ctx_, c.s.client, req)
7836}
7837
7838// Do executes the "people.people.connections.list" call.
7839// Exactly one of *ListConnectionsResponse or error will be non-nil. Any
7840// non-2xx status code is an error. Response headers are in either
7841// *ListConnectionsResponse.ServerResponse.Header or (if a response was
7842// returned at all) in error.(*googleapi.Error).Header. Use
7843// googleapi.IsNotModified to check whether the returned error was
7844// because http.StatusNotModified was returned.
7845func (c *PeopleConnectionsListCall) Do(opts ...googleapi.CallOption) (*ListConnectionsResponse, error) {
7846	gensupport.SetOptions(c.urlParams_, opts...)
7847	res, err := c.doRequest("json")
7848	if res != nil && res.StatusCode == http.StatusNotModified {
7849		if res.Body != nil {
7850			res.Body.Close()
7851		}
7852		return nil, &googleapi.Error{
7853			Code:   res.StatusCode,
7854			Header: res.Header,
7855		}
7856	}
7857	if err != nil {
7858		return nil, err
7859	}
7860	defer googleapi.CloseBody(res)
7861	if err := googleapi.CheckResponse(res); err != nil {
7862		return nil, err
7863	}
7864	ret := &ListConnectionsResponse{
7865		ServerResponse: googleapi.ServerResponse{
7866			Header:         res.Header,
7867			HTTPStatusCode: res.StatusCode,
7868		},
7869	}
7870	target := &ret
7871	if err := gensupport.DecodeResponse(target, res); err != nil {
7872		return nil, err
7873	}
7874	return ret, nil
7875	// {
7876	//   "description": "Provides a list of the authenticated user's contacts. Sync tokens expire 7 days after the full sync. A request with an expired sync token will result in a 410 error. In the case of such an error clients should make a full sync request without a `sync_token`. The first page of a full sync request has an additional quota. If the quota is exceeded, a 429 error will be returned. This quota is fixed and can not be increased. When the `sync_token` is specified, resources deleted since the last sync will be returned as a person with `PersonMetadata.deleted` set to true. When the `page_token` or `sync_token` is specified, all other request parameters must match the first call. Writes may have a propagation delay of several minutes for sync requests. Incremental syncs are not intended for read-after-write use cases. See example usage at [List the user's contacts that have changed](/people/v1/contacts#list_the_users_contacts_that_have_changed).",
7877	//   "flatPath": "v1/people/{peopleId}/connections",
7878	//   "httpMethod": "GET",
7879	//   "id": "people.people.connections.list",
7880	//   "parameterOrder": [
7881	//     "resourceName"
7882	//   ],
7883	//   "parameters": {
7884	//     "pageSize": {
7885	//       "description": "Optional. The number of connections to include in the response. Valid values are between 1 and 1000, inclusive. Defaults to 100 if not set or set to 0.",
7886	//       "format": "int32",
7887	//       "location": "query",
7888	//       "type": "integer"
7889	//     },
7890	//     "pageToken": {
7891	//       "description": "Optional. A page token, received from a previous response `next_page_token`. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to `people.connections.list` must match the first call that provided the page token.",
7892	//       "location": "query",
7893	//       "type": "string"
7894	//     },
7895	//     "personFields": {
7896	//       "description": "Required. A field mask to restrict which fields on each person are returned. Multiple fields can be specified by separating them with commas. 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",
7897	//       "format": "google-fieldmask",
7898	//       "location": "query",
7899	//       "type": "string"
7900	//     },
7901	//     "requestMask.includeField": {
7902	//       "description": "Required. Comma-separated list of person fields to be included in the response. Each path should start with `person.`: for example, `person.names` or `person.photos`.",
7903	//       "format": "google-fieldmask",
7904	//       "location": "query",
7905	//       "type": "string"
7906	//     },
7907	//     "requestSyncToken": {
7908	//       "description": "Optional. Whether the response should return `next_sync_token` on the last page of results. It can be used to get incremental changes since the last request by setting it on the request `sync_token`. More details about sync behavior at `people.connections.list`.",
7909	//       "location": "query",
7910	//       "type": "boolean"
7911	//     },
7912	//     "resourceName": {
7913	//       "description": "Required. The resource name to return connections for. Only `people/me` is valid.",
7914	//       "location": "path",
7915	//       "pattern": "^people/[^/]+$",
7916	//       "required": true,
7917	//       "type": "string"
7918	//     },
7919	//     "sortOrder": {
7920	//       "description": "Optional. The order in which the connections should be sorted. Defaults to `LAST_MODIFIED_ASCENDING`.",
7921	//       "enum": [
7922	//         "LAST_MODIFIED_ASCENDING",
7923	//         "LAST_MODIFIED_DESCENDING",
7924	//         "FIRST_NAME_ASCENDING",
7925	//         "LAST_NAME_ASCENDING"
7926	//       ],
7927	//       "enumDescriptions": [
7928	//         "Sort people by when they were changed; older entries first.",
7929	//         "Sort people by when they were changed; newer entries first.",
7930	//         "Sort people by first name.",
7931	//         "Sort people by last name."
7932	//       ],
7933	//       "location": "query",
7934	//       "type": "string"
7935	//     },
7936	//     "sources": {
7937	//       "description": "Optional. A mask of what source types to return. Defaults to READ_SOURCE_TYPE_CONTACT and READ_SOURCE_TYPE_PROFILE if not set.",
7938	//       "enum": [
7939	//         "READ_SOURCE_TYPE_UNSPECIFIED",
7940	//         "READ_SOURCE_TYPE_PROFILE",
7941	//         "READ_SOURCE_TYPE_CONTACT",
7942	//         "READ_SOURCE_TYPE_DOMAIN_CONTACT"
7943	//       ],
7944	//       "enumDescriptions": [
7945	//         "Unspecified.",
7946	//         "Returns SourceType.ACCOUNT, SourceType.DOMAIN_PROFILE, and SourceType.PROFILE.",
7947	//         "Returns SourceType.CONTACT.",
7948	//         "Returns SourceType.DOMAIN_CONTACT."
7949	//       ],
7950	//       "location": "query",
7951	//       "repeated": true,
7952	//       "type": "string"
7953	//     },
7954	//     "syncToken": {
7955	//       "description": "Optional. A sync token, received from a previous response `next_sync_token` Provide this to retrieve only the resources changed since the last request. When syncing, all other parameters provided to `people.connections.list` must match the first call that provided the sync token. More details about sync behavior at `people.connections.list`.",
7956	//       "location": "query",
7957	//       "type": "string"
7958	//     }
7959	//   },
7960	//   "path": "v1/{+resourceName}/connections",
7961	//   "response": {
7962	//     "$ref": "ListConnectionsResponse"
7963	//   },
7964	//   "scopes": [
7965	//     "https://www.googleapis.com/auth/contacts",
7966	//     "https://www.googleapis.com/auth/contacts.readonly"
7967	//   ]
7968	// }
7969
7970}
7971
7972// Pages invokes f for each page of results.
7973// A non-nil error returned from f will halt the iteration.
7974// The provided context supersedes any context provided to the Context method.
7975func (c *PeopleConnectionsListCall) Pages(ctx context.Context, f func(*ListConnectionsResponse) error) error {
7976	c.ctx_ = ctx
7977	defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
7978	for {
7979		x, err := c.Do()
7980		if err != nil {
7981			return err
7982		}
7983		if err := f(x); err != nil {
7984			return err
7985		}
7986		if x.NextPageToken == "" {
7987			return nil
7988		}
7989		c.PageToken(x.NextPageToken)
7990	}
7991}
7992