1// Copyright 2019 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	htransport "google.golang.org/api/transport/http"
60)
61
62// Always reference these packages, just in case the auto-generated code
63// below doesn't.
64var _ = bytes.NewBuffer
65var _ = strconv.Itoa
66var _ = fmt.Sprintf
67var _ = json.NewDecoder
68var _ = io.Copy
69var _ = url.Parse
70var _ = gensupport.MarshalJSON
71var _ = googleapi.Version
72var _ = errors.New
73var _ = strings.Replace
74var _ = context.Canceled
75
76const apiId = "people:v1"
77const apiName = "people"
78const apiVersion = "v1"
79const basePath = "https://people.googleapis.com/"
80
81// OAuth2 scopes used by this API.
82const (
83	// See, edit, download, and permanently delete your contacts
84	ContactsScope = "https://www.googleapis.com/auth/contacts"
85
86	// See and download your contacts
87	ContactsReadonlyScope = "https://www.googleapis.com/auth/contacts.readonly"
88
89	// View your street addresses
90	UserAddressesReadScope = "https://www.googleapis.com/auth/user.addresses.read"
91
92	// View your complete date of birth
93	UserBirthdayReadScope = "https://www.googleapis.com/auth/user.birthday.read"
94
95	// View your email addresses
96	UserEmailsReadScope = "https://www.googleapis.com/auth/user.emails.read"
97
98	// View your phone numbers
99	UserPhonenumbersReadScope = "https://www.googleapis.com/auth/user.phonenumbers.read"
100
101	// View your email address
102	UserinfoEmailScope = "https://www.googleapis.com/auth/userinfo.email"
103
104	// See your personal info, including any personal info you've made
105	// publicly available
106	UserinfoProfileScope = "https://www.googleapis.com/auth/userinfo.profile"
107)
108
109// NewService creates a new Service.
110func NewService(ctx context.Context, opts ...option.ClientOption) (*Service, error) {
111	scopesOption := option.WithScopes(
112		"https://www.googleapis.com/auth/contacts",
113		"https://www.googleapis.com/auth/contacts.readonly",
114		"https://www.googleapis.com/auth/user.addresses.read",
115		"https://www.googleapis.com/auth/user.birthday.read",
116		"https://www.googleapis.com/auth/user.emails.read",
117		"https://www.googleapis.com/auth/user.phonenumbers.read",
118		"https://www.googleapis.com/auth/userinfo.email",
119		"https://www.googleapis.com/auth/userinfo.profile",
120	)
121	// NOTE: prepend, so we don't override user-specified scopes.
122	opts = append([]option.ClientOption{scopesOption}, opts...)
123	client, endpoint, err := htransport.NewClient(ctx, opts...)
124	if err != nil {
125		return nil, err
126	}
127	s, err := New(client)
128	if err != nil {
129		return nil, err
130	}
131	if endpoint != "" {
132		s.BasePath = endpoint
133	}
134	return s, nil
135}
136
137// New creates a new Service. It uses the provided http.Client for requests.
138//
139// Deprecated: please use NewService instead.
140// To provide a custom HTTP client, use option.WithHTTPClient.
141// If you are using google.golang.org/api/googleapis/transport.APIKey, use option.WithAPIKey with NewService instead.
142func New(client *http.Client) (*Service, error) {
143	if client == nil {
144		return nil, errors.New("client is nil")
145	}
146	s := &Service{client: client, BasePath: basePath}
147	s.ContactGroups = NewContactGroupsService(s)
148	s.People = NewPeopleService(s)
149	return s, nil
150}
151
152type Service struct {
153	client    *http.Client
154	BasePath  string // API endpoint base URL
155	UserAgent string // optional additional User-Agent fragment
156
157	ContactGroups *ContactGroupsService
158
159	People *PeopleService
160}
161
162func (s *Service) userAgent() string {
163	if s.UserAgent == "" {
164		return googleapi.UserAgent
165	}
166	return googleapi.UserAgent + " " + s.UserAgent
167}
168
169func NewContactGroupsService(s *Service) *ContactGroupsService {
170	rs := &ContactGroupsService{s: s}
171	rs.Members = NewContactGroupsMembersService(s)
172	return rs
173}
174
175type ContactGroupsService struct {
176	s *Service
177
178	Members *ContactGroupsMembersService
179}
180
181func NewContactGroupsMembersService(s *Service) *ContactGroupsMembersService {
182	rs := &ContactGroupsMembersService{s: s}
183	return rs
184}
185
186type ContactGroupsMembersService struct {
187	s *Service
188}
189
190func NewPeopleService(s *Service) *PeopleService {
191	rs := &PeopleService{s: s}
192	rs.Connections = NewPeopleConnectionsService(s)
193	return rs
194}
195
196type PeopleService struct {
197	s *Service
198
199	Connections *PeopleConnectionsService
200}
201
202func NewPeopleConnectionsService(s *Service) *PeopleConnectionsService {
203	rs := &PeopleConnectionsService{s: s}
204	return rs
205}
206
207type PeopleConnectionsService struct {
208	s *Service
209}
210
211// Address: A person's physical address. May be a P.O. box or street
212// address. All fields
213// are optional.
214type Address struct {
215	// City: The city of the address.
216	City string `json:"city,omitempty"`
217
218	// Country: The country of the address.
219	Country string `json:"country,omitempty"`
220
221	// CountryCode: The [ISO 3166-1
222	// alpha-2](http://www.iso.org/iso/country_codes.htm) country
223	// code of the address.
224	CountryCode string `json:"countryCode,omitempty"`
225
226	// ExtendedAddress: The extended address of the address; for example,
227	// the apartment number.
228	ExtendedAddress string `json:"extendedAddress,omitempty"`
229
230	// FormattedType: Output only. The type of the address translated and
231	// formatted in the viewer's
232	// account locale or the `Accept-Language` HTTP header locale.
233	FormattedType string `json:"formattedType,omitempty"`
234
235	// FormattedValue: The unstructured value of the address. If this is not
236	// set by the user it
237	// will be automatically constructed from structured values.
238	FormattedValue string `json:"formattedValue,omitempty"`
239
240	// Metadata: Metadata about the address.
241	Metadata *FieldMetadata `json:"metadata,omitempty"`
242
243	// PoBox: The P.O. box of the address.
244	PoBox string `json:"poBox,omitempty"`
245
246	// PostalCode: The postal code of the address.
247	PostalCode string `json:"postalCode,omitempty"`
248
249	// Region: The region of the address; for example, the state or
250	// province.
251	Region string `json:"region,omitempty"`
252
253	// StreetAddress: The street address.
254	StreetAddress string `json:"streetAddress,omitempty"`
255
256	// Type: The type of the address. The type can be custom or one of these
257	// predefined
258	// values:
259	//
260	// * `home`
261	// * `work`
262	// * `other`
263	Type string `json:"type,omitempty"`
264
265	// ForceSendFields is a list of field names (e.g. "City") to
266	// unconditionally include in API requests. By default, fields with
267	// empty values are omitted from API requests. However, any non-pointer,
268	// non-interface field appearing in ForceSendFields will be sent to the
269	// server regardless of whether the field is empty or not. This may be
270	// used to include empty fields in Patch requests.
271	ForceSendFields []string `json:"-"`
272
273	// NullFields is a list of field names (e.g. "City") to include in API
274	// requests with the JSON null value. By default, fields with empty
275	// values are omitted from API requests. However, any field with an
276	// empty value appearing in NullFields will be sent to the server as
277	// null. It is an error if a field in this list has a non-empty value.
278	// This may be used to include null fields in Patch requests.
279	NullFields []string `json:"-"`
280}
281
282func (s *Address) MarshalJSON() ([]byte, error) {
283	type NoMethod Address
284	raw := NoMethod(*s)
285	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
286}
287
288// AgeRangeType: A person's age range.
289type AgeRangeType struct {
290	// AgeRange: The age range.
291	//
292	// Possible values:
293	//   "AGE_RANGE_UNSPECIFIED" - Unspecified.
294	//   "LESS_THAN_EIGHTEEN" - Younger than eighteen.
295	//   "EIGHTEEN_TO_TWENTY" - Between eighteen and twenty.
296	//   "TWENTY_ONE_OR_OLDER" - Twenty-one and older.
297	AgeRange string `json:"ageRange,omitempty"`
298
299	// Metadata: Metadata about the age range.
300	Metadata *FieldMetadata `json:"metadata,omitempty"`
301
302	// ForceSendFields is a list of field names (e.g. "AgeRange") to
303	// unconditionally include in API requests. By default, fields with
304	// empty values are omitted from API requests. However, any non-pointer,
305	// non-interface field appearing in ForceSendFields will be sent to the
306	// server regardless of whether the field is empty or not. This may be
307	// used to include empty fields in Patch requests.
308	ForceSendFields []string `json:"-"`
309
310	// NullFields is a list of field names (e.g. "AgeRange") to include in
311	// API requests with the JSON null value. By default, fields with empty
312	// values are omitted from API requests. However, any field with an
313	// empty value appearing in NullFields will be sent to the server as
314	// null. It is an error if a field in this list has a non-empty value.
315	// This may be used to include null fields in Patch requests.
316	NullFields []string `json:"-"`
317}
318
319func (s *AgeRangeType) MarshalJSON() ([]byte, error) {
320	type NoMethod AgeRangeType
321	raw := NoMethod(*s)
322	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
323}
324
325// BatchGetContactGroupsResponse: The response to a batch get contact
326// groups request.
327type BatchGetContactGroupsResponse struct {
328	// Responses: The list of responses for each requested contact group
329	// resource.
330	Responses []*ContactGroupResponse `json:"responses,omitempty"`
331
332	// ServerResponse contains the HTTP response code and headers from the
333	// server.
334	googleapi.ServerResponse `json:"-"`
335
336	// ForceSendFields is a list of field names (e.g. "Responses") to
337	// unconditionally include in API requests. By default, fields with
338	// empty values are omitted from API requests. However, any non-pointer,
339	// non-interface field appearing in ForceSendFields will be sent to the
340	// server regardless of whether the field is empty or not. This may be
341	// used to include empty fields in Patch requests.
342	ForceSendFields []string `json:"-"`
343
344	// NullFields is a list of field names (e.g. "Responses") to include in
345	// API requests with the JSON null value. By default, fields with empty
346	// values are omitted from API requests. However, any field with an
347	// empty value appearing in NullFields will be sent to the server as
348	// null. It is an error if a field in this list has a non-empty value.
349	// This may be used to include null fields in Patch requests.
350	NullFields []string `json:"-"`
351}
352
353func (s *BatchGetContactGroupsResponse) MarshalJSON() ([]byte, error) {
354	type NoMethod BatchGetContactGroupsResponse
355	raw := NoMethod(*s)
356	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
357}
358
359// Biography: A person's short biography.
360type Biography struct {
361	// ContentType: The content type of the biography.
362	//
363	// Possible values:
364	//   "CONTENT_TYPE_UNSPECIFIED" - Unspecified.
365	//   "TEXT_PLAIN" - Plain text.
366	//   "TEXT_HTML" - HTML text.
367	ContentType string `json:"contentType,omitempty"`
368
369	// Metadata: Metadata about the biography.
370	Metadata *FieldMetadata `json:"metadata,omitempty"`
371
372	// Value: The short biography.
373	Value string `json:"value,omitempty"`
374
375	// ForceSendFields is a list of field names (e.g. "ContentType") to
376	// unconditionally include in API requests. By default, fields with
377	// empty values are omitted from API requests. However, any non-pointer,
378	// non-interface field appearing in ForceSendFields will be sent to the
379	// server regardless of whether the field is empty or not. This may be
380	// used to include empty fields in Patch requests.
381	ForceSendFields []string `json:"-"`
382
383	// NullFields is a list of field names (e.g. "ContentType") to include
384	// in API requests with the JSON null value. By default, fields with
385	// empty values are omitted from API requests. However, any field with
386	// an empty value appearing in NullFields will be sent to the server as
387	// null. It is an error if a field in this list has a non-empty value.
388	// This may be used to include null fields in Patch requests.
389	NullFields []string `json:"-"`
390}
391
392func (s *Biography) MarshalJSON() ([]byte, error) {
393	type NoMethod Biography
394	raw := NoMethod(*s)
395	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
396}
397
398// Birthday: A person's birthday. At least one of the `date` and `text`
399// fields are
400// specified. The `date` and `text` fields typically represent the
401// same
402// date, but are not guaranteed to.
403type Birthday struct {
404	// Date: The date of the birthday.
405	Date *Date `json:"date,omitempty"`
406
407	// Metadata: Metadata about the birthday.
408	Metadata *FieldMetadata `json:"metadata,omitempty"`
409
410	// Text: A free-form string representing the user's birthday.
411	Text string `json:"text,omitempty"`
412
413	// ForceSendFields is a list of field names (e.g. "Date") to
414	// unconditionally include in API requests. By default, fields with
415	// empty values are omitted from API requests. However, any non-pointer,
416	// non-interface field appearing in ForceSendFields will be sent to the
417	// server regardless of whether the field is empty or not. This may be
418	// used to include empty fields in Patch requests.
419	ForceSendFields []string `json:"-"`
420
421	// NullFields is a list of field names (e.g. "Date") to include in API
422	// requests with the JSON null value. By default, fields with empty
423	// values are omitted from API requests. However, any field with an
424	// empty value appearing in NullFields will be sent to the server as
425	// null. It is an error if a field in this list has a non-empty value.
426	// This may be used to include null fields in Patch requests.
427	NullFields []string `json:"-"`
428}
429
430func (s *Birthday) MarshalJSON() ([]byte, error) {
431	type NoMethod Birthday
432	raw := NoMethod(*s)
433	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
434}
435
436// BraggingRights: A person's bragging rights.
437type BraggingRights struct {
438	// Metadata: Metadata about the bragging rights.
439	Metadata *FieldMetadata `json:"metadata,omitempty"`
440
441	// Value: The bragging rights; for example, `climbed mount everest`.
442	Value string `json:"value,omitempty"`
443
444	// ForceSendFields is a list of field names (e.g. "Metadata") to
445	// unconditionally include in API requests. By default, fields with
446	// empty values are omitted from API requests. However, any non-pointer,
447	// non-interface field appearing in ForceSendFields will be sent to the
448	// server regardless of whether the field is empty or not. This may be
449	// used to include empty fields in Patch requests.
450	ForceSendFields []string `json:"-"`
451
452	// NullFields is a list of field names (e.g. "Metadata") to include in
453	// API requests with the JSON null value. By default, fields with empty
454	// values are omitted from API requests. However, any field with an
455	// empty value appearing in NullFields will be sent to the server as
456	// null. It is an error if a field in this list has a non-empty value.
457	// This may be used to include null fields in Patch requests.
458	NullFields []string `json:"-"`
459}
460
461func (s *BraggingRights) MarshalJSON() ([]byte, error) {
462	type NoMethod BraggingRights
463	raw := NoMethod(*s)
464	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
465}
466
467// ContactGroup: A contact group.
468type ContactGroup struct {
469	// Etag: The [HTTP entity tag](https://en.wikipedia.org/wiki/HTTP_ETag)
470	// of the
471	// resource. Used for web cache validation.
472	Etag string `json:"etag,omitempty"`
473
474	// FormattedName: Output only. The name translated and formatted in the
475	// viewer's account locale
476	// or the `Accept-Language` HTTP header locale for system groups
477	// names.
478	// Group names set by the owner are the same as name.
479	FormattedName string `json:"formattedName,omitempty"`
480
481	// GroupType: Output only. The contact group type.
482	//
483	// Possible values:
484	//   "GROUP_TYPE_UNSPECIFIED" - Unspecified.
485	//   "USER_CONTACT_GROUP" - User defined contact group.
486	//   "SYSTEM_CONTACT_GROUP" - System defined contact group.
487	GroupType string `json:"groupType,omitempty"`
488
489	// MemberCount: Output only. The total number of contacts in the group
490	// irrespective of max members in
491	// specified in the request.
492	MemberCount int64 `json:"memberCount,omitempty"`
493
494	// MemberResourceNames: Output only. The list of contact person resource
495	// names that are members of the contact
496	// group. The field is not populated for LIST requests and can only be
497	// updated
498	// through
499	// the
500	// [ModifyContactGroupMembers](/people/api/rest/v1/contactgroups/memb
501	// ers/modify).
502	MemberResourceNames []string `json:"memberResourceNames,omitempty"`
503
504	// Metadata: Output only. Metadata about the contact group.
505	Metadata *ContactGroupMetadata `json:"metadata,omitempty"`
506
507	// Name: The contact group name set by the group owner or a system
508	// provided name
509	// for system groups.
510	Name string `json:"name,omitempty"`
511
512	// ResourceName: The resource name for the contact group, assigned by
513	// the server. An ASCII
514	// string, in the form of `contactGroups/`<var>contact_group_id</var>.
515	ResourceName string `json:"resourceName,omitempty"`
516
517	// ServerResponse contains the HTTP response code and headers from the
518	// server.
519	googleapi.ServerResponse `json:"-"`
520
521	// ForceSendFields is a list of field names (e.g. "Etag") to
522	// unconditionally include in API requests. By default, fields with
523	// empty values are omitted from API requests. However, any non-pointer,
524	// non-interface field appearing in ForceSendFields will be sent to the
525	// server regardless of whether the field is empty or not. This may be
526	// used to include empty fields in Patch requests.
527	ForceSendFields []string `json:"-"`
528
529	// NullFields is a list of field names (e.g. "Etag") to include in API
530	// requests with the JSON null value. By default, fields with empty
531	// values are omitted from API requests. However, any field with an
532	// empty value appearing in NullFields will be sent to the server as
533	// null. It is an error if a field in this list has a non-empty value.
534	// This may be used to include null fields in Patch requests.
535	NullFields []string `json:"-"`
536}
537
538func (s *ContactGroup) MarshalJSON() ([]byte, error) {
539	type NoMethod ContactGroup
540	raw := NoMethod(*s)
541	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
542}
543
544// ContactGroupMembership: A Google contact group membership.
545type ContactGroupMembership struct {
546	// ContactGroupId: Output only. The contact group ID for the contact
547	// group membership.
548	ContactGroupId string `json:"contactGroupId,omitempty"`
549
550	// ContactGroupResourceName: The resource name for the contact group,
551	// assigned by the server. An ASCII
552	// string, in the form of
553	// `contactGroups/`<var>contact_group_id</var>.
554	// Only contact_group_resource_name can be used for modifying
555	// memberships.
556	// Any contact group membership can be removed, but only user group
557	// or
558	// "myContacts" or "starred" system groups memberships can be added.
559	// A
560	// contact must always have at least one contact group membership.
561	ContactGroupResourceName string `json:"contactGroupResourceName,omitempty"`
562
563	// ForceSendFields is a list of field names (e.g. "ContactGroupId") to
564	// unconditionally include in API requests. By default, fields with
565	// empty values are omitted from API requests. However, any non-pointer,
566	// non-interface field appearing in ForceSendFields will be sent to the
567	// server regardless of whether the field is empty or not. This may be
568	// used to include empty fields in Patch requests.
569	ForceSendFields []string `json:"-"`
570
571	// NullFields is a list of field names (e.g. "ContactGroupId") to
572	// include in API requests with the JSON null value. By default, fields
573	// with empty values are omitted from API requests. However, any field
574	// with an empty value appearing in NullFields will be sent to the
575	// server as null. It is an error if a field in this list has a
576	// non-empty value. This may be used to include null fields in Patch
577	// requests.
578	NullFields []string `json:"-"`
579}
580
581func (s *ContactGroupMembership) MarshalJSON() ([]byte, error) {
582	type NoMethod ContactGroupMembership
583	raw := NoMethod(*s)
584	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
585}
586
587// ContactGroupMetadata: The metadata about a contact group.
588type ContactGroupMetadata struct {
589	// Deleted: Output only. True if the contact group resource has been
590	// deleted. Populated only
591	// for
592	// [`ListContactGroups`](/people/api/rest/v1/contactgroups/list)
593	// requests
594	// that include a sync token.
595	Deleted bool `json:"deleted,omitempty"`
596
597	// UpdateTime: Output only. The time the group was last updated.
598	UpdateTime string `json:"updateTime,omitempty"`
599
600	// ForceSendFields is a list of field names (e.g. "Deleted") to
601	// unconditionally include in API requests. By default, fields with
602	// empty values are omitted from API requests. However, any non-pointer,
603	// non-interface field appearing in ForceSendFields will be sent to the
604	// server regardless of whether the field is empty or not. This may be
605	// used to include empty fields in Patch requests.
606	ForceSendFields []string `json:"-"`
607
608	// NullFields is a list of field names (e.g. "Deleted") to include in
609	// API requests with the JSON null value. By default, fields with empty
610	// values are omitted from API requests. However, any field with an
611	// empty value appearing in NullFields will be sent to the server as
612	// null. It is an error if a field in this list has a non-empty value.
613	// This may be used to include null fields in Patch requests.
614	NullFields []string `json:"-"`
615}
616
617func (s *ContactGroupMetadata) MarshalJSON() ([]byte, error) {
618	type NoMethod ContactGroupMetadata
619	raw := NoMethod(*s)
620	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
621}
622
623// ContactGroupResponse: The response for a specific contact group.
624type ContactGroupResponse struct {
625	// ContactGroup: The contact group.
626	ContactGroup *ContactGroup `json:"contactGroup,omitempty"`
627
628	// RequestedResourceName: The original requested resource name.
629	RequestedResourceName string `json:"requestedResourceName,omitempty"`
630
631	// Status: The status of the response.
632	Status *Status `json:"status,omitempty"`
633
634	// ForceSendFields is a list of field names (e.g. "ContactGroup") to
635	// unconditionally include in API requests. By default, fields with
636	// empty values are omitted from API requests. However, any non-pointer,
637	// non-interface field appearing in ForceSendFields will be sent to the
638	// server regardless of whether the field is empty or not. This may be
639	// used to include empty fields in Patch requests.
640	ForceSendFields []string `json:"-"`
641
642	// NullFields is a list of field names (e.g. "ContactGroup") to include
643	// in API requests with the JSON null value. By default, fields with
644	// empty values are omitted from API requests. However, any field with
645	// an empty value appearing in NullFields will be sent to the server as
646	// null. It is an error if a field in this list has a non-empty value.
647	// This may be used to include null fields in Patch requests.
648	NullFields []string `json:"-"`
649}
650
651func (s *ContactGroupResponse) MarshalJSON() ([]byte, error) {
652	type NoMethod ContactGroupResponse
653	raw := NoMethod(*s)
654	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
655}
656
657// CoverPhoto: A person's cover photo. A large image shown on the
658// person's
659// profile page that represents who they are or what they care about.
660type CoverPhoto struct {
661	// Default: True if the cover photo is the default cover photo;
662	// false if the cover photo is a user-provided cover photo.
663	Default bool `json:"default,omitempty"`
664
665	// Metadata: Metadata about the cover photo.
666	Metadata *FieldMetadata `json:"metadata,omitempty"`
667
668	// Url: The URL of the cover photo.
669	Url string `json:"url,omitempty"`
670
671	// ForceSendFields is a list of field names (e.g. "Default") to
672	// unconditionally include in API requests. By default, fields with
673	// empty values are omitted from API requests. However, any non-pointer,
674	// non-interface field appearing in ForceSendFields will be sent to the
675	// server regardless of whether the field is empty or not. This may be
676	// used to include empty fields in Patch requests.
677	ForceSendFields []string `json:"-"`
678
679	// NullFields is a list of field names (e.g. "Default") to include in
680	// API requests with the JSON null value. By default, fields with empty
681	// values are omitted from API requests. However, any field with an
682	// empty value appearing in NullFields will be sent to the server as
683	// null. It is an error if a field in this list has a non-empty value.
684	// This may be used to include null fields in Patch requests.
685	NullFields []string `json:"-"`
686}
687
688func (s *CoverPhoto) MarshalJSON() ([]byte, error) {
689	type NoMethod CoverPhoto
690	raw := NoMethod(*s)
691	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
692}
693
694// CreateContactGroupRequest: A request to create a new contact group.
695type CreateContactGroupRequest struct {
696	// ContactGroup: Required. The contact group to create.
697	ContactGroup *ContactGroup `json:"contactGroup,omitempty"`
698
699	// ForceSendFields is a list of field names (e.g. "ContactGroup") to
700	// unconditionally include in API requests. By default, fields with
701	// empty values are omitted from API requests. However, any non-pointer,
702	// non-interface field appearing in ForceSendFields will be sent to the
703	// server regardless of whether the field is empty or not. This may be
704	// used to include empty fields in Patch requests.
705	ForceSendFields []string `json:"-"`
706
707	// NullFields is a list of field names (e.g. "ContactGroup") to include
708	// in API requests with the JSON null value. By default, fields with
709	// empty values are omitted from API requests. However, any field with
710	// an empty value appearing in NullFields will be sent to the server as
711	// null. It is an error if a field in this list has a non-empty value.
712	// This may be used to include null fields in Patch requests.
713	NullFields []string `json:"-"`
714}
715
716func (s *CreateContactGroupRequest) MarshalJSON() ([]byte, error) {
717	type NoMethod CreateContactGroupRequest
718	raw := NoMethod(*s)
719	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
720}
721
722// Date: Represents a whole or partial calendar date, e.g. a birthday.
723// The time of day
724// and time zone are either specified elsewhere or are not significant.
725// The date
726// is relative to the Proleptic Gregorian Calendar. This can
727// represent:
728//
729// * A full date, with non-zero year, month and day values
730// * A month and day value, with a zero year, e.g. an anniversary
731// * A year on its own, with zero month and day values
732// * A year and month value, with a zero day, e.g. a credit card
733// expiration date
734//
735// Related types are google.type.TimeOfDay and
736// `google.protobuf.Timestamp`.
737type Date struct {
738	// Day: Day of month. Must be from 1 to 31 and valid for the year and
739	// month, or 0
740	// if specifying a year by itself or a year and month where the day is
741	// not
742	// significant.
743	Day int64 `json:"day,omitempty"`
744
745	// Month: Month of year. Must be from 1 to 12, or 0 if specifying a year
746	// without a
747	// month and day.
748	Month int64 `json:"month,omitempty"`
749
750	// Year: Year of date. Must be from 1 to 9999, or 0 if specifying a date
751	// without
752	// a year.
753	Year int64 `json:"year,omitempty"`
754
755	// ForceSendFields is a list of field names (e.g. "Day") to
756	// unconditionally include in API requests. By default, fields with
757	// empty values are omitted from API requests. However, any non-pointer,
758	// non-interface field appearing in ForceSendFields will be sent to the
759	// server regardless of whether the field is empty or not. This may be
760	// used to include empty fields in Patch requests.
761	ForceSendFields []string `json:"-"`
762
763	// NullFields is a list of field names (e.g. "Day") to include in API
764	// requests with the JSON null value. By default, fields with empty
765	// values are omitted from API requests. However, any field with an
766	// empty value appearing in NullFields will be sent to the server as
767	// null. It is an error if a field in this list has a non-empty value.
768	// This may be used to include null fields in Patch requests.
769	NullFields []string `json:"-"`
770}
771
772func (s *Date) MarshalJSON() ([]byte, error) {
773	type NoMethod Date
774	raw := NoMethod(*s)
775	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
776}
777
778// DeleteContactPhotoResponse: The response for deleteing a contact's
779// photo.
780type DeleteContactPhotoResponse struct {
781	// Person: The updated person, if person_fields is set in
782	// the
783	// DeleteContactPhotoRequest; otherwise this will be unset.
784	Person *Person `json:"person,omitempty"`
785
786	// ServerResponse contains the HTTP response code and headers from the
787	// server.
788	googleapi.ServerResponse `json:"-"`
789
790	// ForceSendFields is a list of field names (e.g. "Person") to
791	// unconditionally include in API requests. By default, fields with
792	// empty values are omitted from API requests. However, any non-pointer,
793	// non-interface field appearing in ForceSendFields will be sent to the
794	// server regardless of whether the field is empty or not. This may be
795	// used to include empty fields in Patch requests.
796	ForceSendFields []string `json:"-"`
797
798	// NullFields is a list of field names (e.g. "Person") to include in API
799	// requests with the JSON null value. By default, fields with empty
800	// values are omitted from API requests. However, any field with an
801	// empty value appearing in NullFields will be sent to the server as
802	// null. It is an error if a field in this list has a non-empty value.
803	// This may be used to include null fields in Patch requests.
804	NullFields []string `json:"-"`
805}
806
807func (s *DeleteContactPhotoResponse) MarshalJSON() ([]byte, error) {
808	type NoMethod DeleteContactPhotoResponse
809	raw := NoMethod(*s)
810	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
811}
812
813// DomainMembership: A G Suite Domain membership.
814type DomainMembership struct {
815	// InViewerDomain: True if the person is in the viewer's G Suite domain.
816	InViewerDomain bool `json:"inViewerDomain,omitempty"`
817
818	// ForceSendFields is a list of field names (e.g. "InViewerDomain") to
819	// unconditionally include in API requests. By default, fields with
820	// empty values are omitted from API requests. However, any non-pointer,
821	// non-interface field appearing in ForceSendFields will be sent to the
822	// server regardless of whether the field is empty or not. This may be
823	// used to include empty fields in Patch requests.
824	ForceSendFields []string `json:"-"`
825
826	// NullFields is a list of field names (e.g. "InViewerDomain") to
827	// include in API requests with the JSON null value. By default, fields
828	// with empty values are omitted from API requests. However, any field
829	// with an empty value appearing in NullFields will be sent to the
830	// server as null. It is an error if a field in this list has a
831	// non-empty value. This may be used to include null fields in Patch
832	// requests.
833	NullFields []string `json:"-"`
834}
835
836func (s *DomainMembership) MarshalJSON() ([]byte, error) {
837	type NoMethod DomainMembership
838	raw := NoMethod(*s)
839	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
840}
841
842// EmailAddress: A person's email address.
843type EmailAddress struct {
844	// DisplayName: The display name of the email.
845	DisplayName string `json:"displayName,omitempty"`
846
847	// FormattedType: Output only. The type of the email address translated
848	// and formatted in the
849	// viewer's account locale or the `Accept-Language` HTTP header locale.
850	FormattedType string `json:"formattedType,omitempty"`
851
852	// Metadata: Metadata about the email address.
853	Metadata *FieldMetadata `json:"metadata,omitempty"`
854
855	// Type: The type of the email address. The type can be custom or one of
856	// these
857	// predefined values:
858	//
859	// * `home`
860	// * `work`
861	// * `other`
862	Type string `json:"type,omitempty"`
863
864	// Value: The email address.
865	Value string `json:"value,omitempty"`
866
867	// ForceSendFields is a list of field names (e.g. "DisplayName") to
868	// unconditionally include in API requests. By default, fields with
869	// empty values are omitted from API requests. However, any non-pointer,
870	// non-interface field appearing in ForceSendFields will be sent to the
871	// server regardless of whether the field is empty or not. This may be
872	// used to include empty fields in Patch requests.
873	ForceSendFields []string `json:"-"`
874
875	// NullFields is a list of field names (e.g. "DisplayName") to include
876	// in API requests with the JSON null value. By default, fields with
877	// empty values are omitted from API requests. However, any field with
878	// an empty value appearing in NullFields will be sent to the server as
879	// null. It is an error if a field in this list has a non-empty value.
880	// This may be used to include null fields in Patch requests.
881	NullFields []string `json:"-"`
882}
883
884func (s *EmailAddress) MarshalJSON() ([]byte, error) {
885	type NoMethod EmailAddress
886	raw := NoMethod(*s)
887	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
888}
889
890// Empty: A generic empty message that you can re-use to avoid defining
891// duplicated
892// empty messages in your APIs. A typical example is to use it as the
893// request
894// or the response type of an API method. For instance:
895//
896//     service Foo {
897//       rpc Bar(google.protobuf.Empty) returns
898// (google.protobuf.Empty);
899//     }
900//
901// The JSON representation for `Empty` is empty JSON object `{}`.
902type Empty struct {
903	// ServerResponse contains the HTTP response code and headers from the
904	// server.
905	googleapi.ServerResponse `json:"-"`
906}
907
908// Event: An event related to the person.
909type Event struct {
910	// Date: The date of the event.
911	Date *Date `json:"date,omitempty"`
912
913	// FormattedType: Output only. The type of the event translated and
914	// formatted in the
915	// viewer's account locale or the `Accept-Language` HTTP header locale.
916	FormattedType string `json:"formattedType,omitempty"`
917
918	// Metadata: Metadata about the event.
919	Metadata *FieldMetadata `json:"metadata,omitempty"`
920
921	// Type: The type of the event. The type can be custom or one of these
922	// predefined
923	// values:
924	//
925	// * `anniversary`
926	// * `other`
927	Type string `json:"type,omitempty"`
928
929	// ForceSendFields is a list of field names (e.g. "Date") to
930	// unconditionally include in API requests. By default, fields with
931	// empty values are omitted from API requests. However, any non-pointer,
932	// non-interface field appearing in ForceSendFields will be sent to the
933	// server regardless of whether the field is empty or not. This may be
934	// used to include empty fields in Patch requests.
935	ForceSendFields []string `json:"-"`
936
937	// NullFields is a list of field names (e.g. "Date") to include in API
938	// requests with the JSON null value. By default, fields with empty
939	// values are omitted from API requests. However, any field with an
940	// empty value appearing in NullFields will be sent to the server as
941	// null. It is an error if a field in this list has a non-empty value.
942	// This may be used to include null fields in Patch requests.
943	NullFields []string `json:"-"`
944}
945
946func (s *Event) MarshalJSON() ([]byte, error) {
947	type NoMethod Event
948	raw := NoMethod(*s)
949	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
950}
951
952// FieldMetadata: Metadata about a field.
953type FieldMetadata struct {
954	// Primary: True if the field is the primary field; false if the field
955	// is a secondary
956	// field.
957	Primary bool `json:"primary,omitempty"`
958
959	// Source: The source of the field.
960	Source *Source `json:"source,omitempty"`
961
962	// Verified: Output only. True if the field is verified; false if the
963	// field is unverified. A
964	// verified field is typically a name, email address, phone number,
965	// or
966	// website that has been confirmed to be owned by the person.
967	Verified bool `json:"verified,omitempty"`
968
969	// ForceSendFields is a list of field names (e.g. "Primary") to
970	// unconditionally include in API requests. By default, fields with
971	// empty values are omitted from API requests. However, any non-pointer,
972	// non-interface field appearing in ForceSendFields will be sent to the
973	// server regardless of whether the field is empty or not. This may be
974	// used to include empty fields in Patch requests.
975	ForceSendFields []string `json:"-"`
976
977	// NullFields is a list of field names (e.g. "Primary") to include in
978	// API requests with the JSON null value. By default, fields with empty
979	// values are omitted from API requests. However, any field with an
980	// empty value appearing in NullFields will be sent to the server as
981	// null. It is an error if a field in this list has a non-empty value.
982	// This may be used to include null fields in Patch requests.
983	NullFields []string `json:"-"`
984}
985
986func (s *FieldMetadata) MarshalJSON() ([]byte, error) {
987	type NoMethod FieldMetadata
988	raw := NoMethod(*s)
989	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
990}
991
992// Gender: A person's gender.
993type Gender struct {
994	// FormattedValue: Output only. The value of the gender translated and
995	// formatted in the viewer's
996	// account locale or the `Accept-Language` HTTP header locale.
997	FormattedValue string `json:"formattedValue,omitempty"`
998
999	// Metadata: Metadata about the gender.
1000	Metadata *FieldMetadata `json:"metadata,omitempty"`
1001
1002	// Value: The gender for the person. The gender can be custom or one of
1003	// these
1004	// predefined values:
1005	//
1006	// * `male`
1007	// * `female`
1008	// * `other`
1009	// * `unknown`
1010	Value string `json:"value,omitempty"`
1011
1012	// ForceSendFields is a list of field names (e.g. "FormattedValue") to
1013	// unconditionally include in API requests. By default, fields with
1014	// empty values are omitted from API requests. However, any non-pointer,
1015	// non-interface field appearing in ForceSendFields will be sent to the
1016	// server regardless of whether the field is empty or not. This may be
1017	// used to include empty fields in Patch requests.
1018	ForceSendFields []string `json:"-"`
1019
1020	// NullFields is a list of field names (e.g. "FormattedValue") to
1021	// include in API requests with the JSON null value. By default, fields
1022	// with empty values are omitted from API requests. However, any field
1023	// with an empty value appearing in NullFields will be sent to the
1024	// server as null. It is an error if a field in this list has a
1025	// non-empty value. This may be used to include null fields in Patch
1026	// requests.
1027	NullFields []string `json:"-"`
1028}
1029
1030func (s *Gender) MarshalJSON() ([]byte, error) {
1031	type NoMethod Gender
1032	raw := NoMethod(*s)
1033	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1034}
1035
1036type GetPeopleResponse struct {
1037	// Responses: The response for each requested resource name.
1038	Responses []*PersonResponse `json:"responses,omitempty"`
1039
1040	// ServerResponse contains the HTTP response code and headers from the
1041	// server.
1042	googleapi.ServerResponse `json:"-"`
1043
1044	// ForceSendFields is a list of field names (e.g. "Responses") to
1045	// unconditionally include in API requests. By default, fields with
1046	// empty values are omitted from API requests. However, any non-pointer,
1047	// non-interface field appearing in ForceSendFields will be sent to the
1048	// server regardless of whether the field is empty or not. This may be
1049	// used to include empty fields in Patch requests.
1050	ForceSendFields []string `json:"-"`
1051
1052	// NullFields is a list of field names (e.g. "Responses") to include in
1053	// API requests with the JSON null value. By default, fields with empty
1054	// values are omitted from API requests. However, any field with an
1055	// empty value appearing in NullFields will be sent to the server as
1056	// null. It is an error if a field in this list has a non-empty value.
1057	// This may be used to include null fields in Patch requests.
1058	NullFields []string `json:"-"`
1059}
1060
1061func (s *GetPeopleResponse) MarshalJSON() ([]byte, error) {
1062	type NoMethod GetPeopleResponse
1063	raw := NoMethod(*s)
1064	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1065}
1066
1067// ImClient: A person's instant messaging client.
1068type ImClient struct {
1069	// FormattedProtocol: Output only. The protocol of the IM client
1070	// formatted in the viewer's account
1071	// locale or the `Accept-Language` HTTP header locale.
1072	FormattedProtocol string `json:"formattedProtocol,omitempty"`
1073
1074	// FormattedType: Output only. The type of the IM client translated and
1075	// formatted in the
1076	// viewer's account locale or the `Accept-Language` HTTP header locale.
1077	FormattedType string `json:"formattedType,omitempty"`
1078
1079	// Metadata: Metadata about the IM client.
1080	Metadata *FieldMetadata `json:"metadata,omitempty"`
1081
1082	// Protocol: The protocol of the IM client. The protocol can be custom
1083	// or one of these
1084	// predefined values:
1085	//
1086	// * `aim`
1087	// * `msn`
1088	// * `yahoo`
1089	// * `skype`
1090	// * `qq`
1091	// * `googleTalk`
1092	// * `icq`
1093	// * `jabber`
1094	// * `netMeeting`
1095	Protocol string `json:"protocol,omitempty"`
1096
1097	// Type: The type of the IM client. The type can be custom or one of
1098	// these
1099	// predefined values:
1100	//
1101	// * `home`
1102	// * `work`
1103	// * `other`
1104	Type string `json:"type,omitempty"`
1105
1106	// Username: The user name used in the IM client.
1107	Username string `json:"username,omitempty"`
1108
1109	// ForceSendFields is a list of field names (e.g. "FormattedProtocol")
1110	// to unconditionally include in API requests. By default, fields with
1111	// empty values are omitted from API requests. However, any non-pointer,
1112	// non-interface field appearing in ForceSendFields will be sent to the
1113	// server regardless of whether the field is empty or not. This may be
1114	// used to include empty fields in Patch requests.
1115	ForceSendFields []string `json:"-"`
1116
1117	// NullFields is a list of field names (e.g. "FormattedProtocol") to
1118	// include in API requests with the JSON null value. By default, fields
1119	// with empty values are omitted from API requests. However, any field
1120	// with an empty value appearing in NullFields will be sent to the
1121	// server as null. It is an error if a field in this list has a
1122	// non-empty value. This may be used to include null fields in Patch
1123	// requests.
1124	NullFields []string `json:"-"`
1125}
1126
1127func (s *ImClient) MarshalJSON() ([]byte, error) {
1128	type NoMethod ImClient
1129	raw := NoMethod(*s)
1130	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1131}
1132
1133// Interest: One of the person's interests.
1134type Interest struct {
1135	// Metadata: Metadata about the interest.
1136	Metadata *FieldMetadata `json:"metadata,omitempty"`
1137
1138	// Value: The interest; for example, `stargazing`.
1139	Value string `json:"value,omitempty"`
1140
1141	// ForceSendFields is a list of field names (e.g. "Metadata") to
1142	// unconditionally include in API requests. By default, fields with
1143	// empty values are omitted from API requests. However, any non-pointer,
1144	// non-interface field appearing in ForceSendFields will be sent to the
1145	// server regardless of whether the field is empty or not. This may be
1146	// used to include empty fields in Patch requests.
1147	ForceSendFields []string `json:"-"`
1148
1149	// NullFields is a list of field names (e.g. "Metadata") to include in
1150	// API requests with the JSON null value. By default, fields with empty
1151	// values are omitted from API requests. However, any field with an
1152	// empty value appearing in NullFields will be sent to the server as
1153	// null. It is an error if a field in this list has a non-empty value.
1154	// This may be used to include null fields in Patch requests.
1155	NullFields []string `json:"-"`
1156}
1157
1158func (s *Interest) MarshalJSON() ([]byte, error) {
1159	type NoMethod Interest
1160	raw := NoMethod(*s)
1161	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1162}
1163
1164type ListConnectionsResponse struct {
1165	// Connections: The list of people that the requestor is connected to.
1166	Connections []*Person `json:"connections,omitempty"`
1167
1168	// NextPageToken: The token that can be used to retrieve the next page
1169	// of results.
1170	NextPageToken string `json:"nextPageToken,omitempty"`
1171
1172	// NextSyncToken: The token that can be used to retrieve changes since
1173	// the last request.
1174	NextSyncToken string `json:"nextSyncToken,omitempty"`
1175
1176	// TotalItems: The total number of items in the list without pagination.
1177	TotalItems int64 `json:"totalItems,omitempty"`
1178
1179	// TotalPeople: **DEPRECATED** (Please use totalItems)
1180	// The total number of people in the list without pagination.
1181	TotalPeople int64 `json:"totalPeople,omitempty"`
1182
1183	// ServerResponse contains the HTTP response code and headers from the
1184	// server.
1185	googleapi.ServerResponse `json:"-"`
1186
1187	// ForceSendFields is a list of field names (e.g. "Connections") to
1188	// unconditionally include in API requests. By default, fields with
1189	// empty values are omitted from API requests. However, any non-pointer,
1190	// non-interface field appearing in ForceSendFields will be sent to the
1191	// server regardless of whether the field is empty or not. This may be
1192	// used to include empty fields in Patch requests.
1193	ForceSendFields []string `json:"-"`
1194
1195	// NullFields is a list of field names (e.g. "Connections") to include
1196	// in API requests with the JSON null value. By default, fields with
1197	// empty values are omitted from API requests. However, any field with
1198	// an empty value appearing in NullFields will be sent to the server as
1199	// null. It is an error if a field in this list has a non-empty value.
1200	// This may be used to include null fields in Patch requests.
1201	NullFields []string `json:"-"`
1202}
1203
1204func (s *ListConnectionsResponse) MarshalJSON() ([]byte, error) {
1205	type NoMethod ListConnectionsResponse
1206	raw := NoMethod(*s)
1207	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1208}
1209
1210// ListContactGroupsResponse: The response to a list contact groups
1211// request.
1212type ListContactGroupsResponse struct {
1213	// ContactGroups: The list of contact groups. Members of the contact
1214	// groups are not
1215	// populated.
1216	ContactGroups []*ContactGroup `json:"contactGroups,omitempty"`
1217
1218	// NextPageToken: The token that can be used to retrieve the next page
1219	// of results.
1220	NextPageToken string `json:"nextPageToken,omitempty"`
1221
1222	// NextSyncToken: The token that can be used to retrieve changes since
1223	// the last request.
1224	NextSyncToken string `json:"nextSyncToken,omitempty"`
1225
1226	// TotalItems: The total number of items in the list without pagination.
1227	TotalItems int64 `json:"totalItems,omitempty"`
1228
1229	// ServerResponse contains the HTTP response code and headers from the
1230	// server.
1231	googleapi.ServerResponse `json:"-"`
1232
1233	// ForceSendFields is a list of field names (e.g. "ContactGroups") to
1234	// unconditionally include in API requests. By default, fields with
1235	// empty values are omitted from API requests. However, any non-pointer,
1236	// non-interface field appearing in ForceSendFields will be sent to the
1237	// server regardless of whether the field is empty or not. This may be
1238	// used to include empty fields in Patch requests.
1239	ForceSendFields []string `json:"-"`
1240
1241	// NullFields is a list of field names (e.g. "ContactGroups") to include
1242	// in API requests with the JSON null value. By default, fields with
1243	// empty values are omitted from API requests. However, any field with
1244	// an empty value appearing in NullFields will be sent to the server as
1245	// null. It is an error if a field in this list has a non-empty value.
1246	// This may be used to include null fields in Patch requests.
1247	NullFields []string `json:"-"`
1248}
1249
1250func (s *ListContactGroupsResponse) MarshalJSON() ([]byte, error) {
1251	type NoMethod ListContactGroupsResponse
1252	raw := NoMethod(*s)
1253	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1254}
1255
1256// Locale: A person's locale preference.
1257type Locale struct {
1258	// Metadata: Metadata about the locale.
1259	Metadata *FieldMetadata `json:"metadata,omitempty"`
1260
1261	// Value: The well-formed [IETF BCP
1262	// 47](https://tools.ietf.org/html/bcp47)
1263	// language tag representing the locale.
1264	Value string `json:"value,omitempty"`
1265
1266	// ForceSendFields is a list of field names (e.g. "Metadata") to
1267	// unconditionally include in API requests. By default, fields with
1268	// empty values are omitted from API requests. However, any non-pointer,
1269	// non-interface field appearing in ForceSendFields will be sent to the
1270	// server regardless of whether the field is empty or not. This may be
1271	// used to include empty fields in Patch requests.
1272	ForceSendFields []string `json:"-"`
1273
1274	// NullFields is a list of field names (e.g. "Metadata") to include in
1275	// API requests with the JSON null value. By default, fields with empty
1276	// values are omitted from API requests. However, any field with an
1277	// empty value appearing in NullFields will be sent to the server as
1278	// null. It is an error if a field in this list has a non-empty value.
1279	// This may be used to include null fields in Patch requests.
1280	NullFields []string `json:"-"`
1281}
1282
1283func (s *Locale) MarshalJSON() ([]byte, error) {
1284	type NoMethod Locale
1285	raw := NoMethod(*s)
1286	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1287}
1288
1289// Membership: A person's membership in a group. Only contact group
1290// memberships can be
1291// modified.
1292type Membership struct {
1293	// ContactGroupMembership: The contact group membership.
1294	ContactGroupMembership *ContactGroupMembership `json:"contactGroupMembership,omitempty"`
1295
1296	// DomainMembership: Output only. The domain membership.
1297	DomainMembership *DomainMembership `json:"domainMembership,omitempty"`
1298
1299	// Metadata: Metadata about the membership.
1300	Metadata *FieldMetadata `json:"metadata,omitempty"`
1301
1302	// ForceSendFields is a list of field names (e.g.
1303	// "ContactGroupMembership") to unconditionally include in API requests.
1304	// By default, fields with empty values are omitted from API requests.
1305	// However, any non-pointer, non-interface field appearing in
1306	// ForceSendFields will be sent to the server regardless of whether the
1307	// field is empty or not. This may be used to include empty fields in
1308	// Patch requests.
1309	ForceSendFields []string `json:"-"`
1310
1311	// NullFields is a list of field names (e.g. "ContactGroupMembership")
1312	// to include in API requests with the JSON null value. By default,
1313	// fields with empty values are omitted from API requests. However, any
1314	// field with an empty value appearing in NullFields will be sent to the
1315	// server as null. It is an error if a field in this list has a
1316	// non-empty value. This may be used to include null fields in Patch
1317	// requests.
1318	NullFields []string `json:"-"`
1319}
1320
1321func (s *Membership) MarshalJSON() ([]byte, error) {
1322	type NoMethod Membership
1323	raw := NoMethod(*s)
1324	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1325}
1326
1327// ModifyContactGroupMembersRequest: A request to modify an existing
1328// contact group's members. Contacts can be
1329// removed from any group but they can only be added to a user group
1330// or
1331// "myContacts" or "starred" system groups.
1332type ModifyContactGroupMembersRequest struct {
1333	// ResourceNamesToAdd: The resource names of the contact people to add
1334	// in the form of
1335	// `people/`<var>person_id</var>.
1336	ResourceNamesToAdd []string `json:"resourceNamesToAdd,omitempty"`
1337
1338	// ResourceNamesToRemove: The resource names of the contact people to
1339	// remove in the form of
1340	// `people/`<var>person_id</var>.
1341	ResourceNamesToRemove []string `json:"resourceNamesToRemove,omitempty"`
1342
1343	// ForceSendFields is a list of field names (e.g. "ResourceNamesToAdd")
1344	// to unconditionally include in API requests. By default, fields with
1345	// empty values are omitted from API requests. However, any non-pointer,
1346	// non-interface field appearing in ForceSendFields will be sent to the
1347	// server regardless of whether the field is empty or not. This may be
1348	// used to include empty fields in Patch requests.
1349	ForceSendFields []string `json:"-"`
1350
1351	// NullFields is a list of field names (e.g. "ResourceNamesToAdd") to
1352	// include in API requests with the JSON null value. By default, fields
1353	// with empty values are omitted from API requests. However, any field
1354	// with an empty value appearing in NullFields will be sent to the
1355	// server as null. It is an error if a field in this list has a
1356	// non-empty value. This may be used to include null fields in Patch
1357	// requests.
1358	NullFields []string `json:"-"`
1359}
1360
1361func (s *ModifyContactGroupMembersRequest) MarshalJSON() ([]byte, error) {
1362	type NoMethod ModifyContactGroupMembersRequest
1363	raw := NoMethod(*s)
1364	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1365}
1366
1367// ModifyContactGroupMembersResponse: The response to a modify contact
1368// group members request.
1369type ModifyContactGroupMembersResponse struct {
1370	// CanNotRemoveLastContactGroupResourceNames: The contact people
1371	// resource names that cannot be removed from their
1372	// last contact group.
1373	CanNotRemoveLastContactGroupResourceNames []string `json:"canNotRemoveLastContactGroupResourceNames,omitempty"`
1374
1375	// NotFoundResourceNames: The contact people resource names that were
1376	// not found.
1377	NotFoundResourceNames []string `json:"notFoundResourceNames,omitempty"`
1378
1379	// ServerResponse contains the HTTP response code and headers from the
1380	// server.
1381	googleapi.ServerResponse `json:"-"`
1382
1383	// ForceSendFields is a list of field names (e.g.
1384	// "CanNotRemoveLastContactGroupResourceNames") to unconditionally
1385	// include in API requests. By default, fields with empty values are
1386	// omitted from API requests. However, any non-pointer, non-interface
1387	// field appearing in ForceSendFields will be sent to the server
1388	// regardless of whether the field is empty or not. This may be used to
1389	// include empty fields in Patch requests.
1390	ForceSendFields []string `json:"-"`
1391
1392	// NullFields is a list of field names (e.g.
1393	// "CanNotRemoveLastContactGroupResourceNames") to include in API
1394	// requests with the JSON null value. By default, fields with empty
1395	// values are omitted from API requests. However, any field with an
1396	// empty value appearing in NullFields will be sent to the server as
1397	// null. It is an error if a field in this list has a non-empty value.
1398	// This may be used to include null fields in Patch requests.
1399	NullFields []string `json:"-"`
1400}
1401
1402func (s *ModifyContactGroupMembersResponse) MarshalJSON() ([]byte, error) {
1403	type NoMethod ModifyContactGroupMembersResponse
1404	raw := NoMethod(*s)
1405	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1406}
1407
1408// Name: A person's name. If the name is a mononym, the family name is
1409// empty.
1410type Name struct {
1411	// DisplayName: Output only. The display name formatted according to the
1412	// locale specified by
1413	// the viewer's account or the `Accept-Language` HTTP header.
1414	DisplayName string `json:"displayName,omitempty"`
1415
1416	// DisplayNameLastFirst: Output only. The display name with the last
1417	// name first formatted according to
1418	// the locale specified by the viewer's account or the
1419	// `Accept-Language` HTTP header.
1420	DisplayNameLastFirst string `json:"displayNameLastFirst,omitempty"`
1421
1422	// FamilyName: The family name.
1423	FamilyName string `json:"familyName,omitempty"`
1424
1425	// GivenName: The given name.
1426	GivenName string `json:"givenName,omitempty"`
1427
1428	// HonorificPrefix: The honorific prefixes, such as `Mrs.` or `Dr.`
1429	HonorificPrefix string `json:"honorificPrefix,omitempty"`
1430
1431	// HonorificSuffix: The honorific suffixes, such as `Jr.`
1432	HonorificSuffix string `json:"honorificSuffix,omitempty"`
1433
1434	// Metadata: Metadata about the name.
1435	Metadata *FieldMetadata `json:"metadata,omitempty"`
1436
1437	// MiddleName: The middle name(s).
1438	MiddleName string `json:"middleName,omitempty"`
1439
1440	// PhoneticFamilyName: The family name spelled as it sounds.
1441	PhoneticFamilyName string `json:"phoneticFamilyName,omitempty"`
1442
1443	// PhoneticFullName: The full name spelled as it sounds.
1444	PhoneticFullName string `json:"phoneticFullName,omitempty"`
1445
1446	// PhoneticGivenName: The given name spelled as it sounds.
1447	PhoneticGivenName string `json:"phoneticGivenName,omitempty"`
1448
1449	// PhoneticHonorificPrefix: The honorific prefixes spelled as they
1450	// sound.
1451	PhoneticHonorificPrefix string `json:"phoneticHonorificPrefix,omitempty"`
1452
1453	// PhoneticHonorificSuffix: The honorific suffixes spelled as they
1454	// sound.
1455	PhoneticHonorificSuffix string `json:"phoneticHonorificSuffix,omitempty"`
1456
1457	// PhoneticMiddleName: The middle name(s) spelled as they sound.
1458	PhoneticMiddleName string `json:"phoneticMiddleName,omitempty"`
1459
1460	// ForceSendFields is a list of field names (e.g. "DisplayName") to
1461	// unconditionally include in API requests. By default, fields with
1462	// empty values are omitted from API requests. However, any non-pointer,
1463	// non-interface field appearing in ForceSendFields will be sent to the
1464	// server regardless of whether the field is empty or not. This may be
1465	// used to include empty fields in Patch requests.
1466	ForceSendFields []string `json:"-"`
1467
1468	// NullFields is a list of field names (e.g. "DisplayName") to include
1469	// in API requests with the JSON null value. By default, fields with
1470	// empty values are omitted from API requests. However, any field with
1471	// an empty value appearing in NullFields will be sent to the server as
1472	// null. It is an error if a field in this list has a non-empty value.
1473	// This may be used to include null fields in Patch requests.
1474	NullFields []string `json:"-"`
1475}
1476
1477func (s *Name) MarshalJSON() ([]byte, error) {
1478	type NoMethod Name
1479	raw := NoMethod(*s)
1480	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1481}
1482
1483// Nickname: A person's nickname.
1484type Nickname struct {
1485	// Metadata: Metadata about the nickname.
1486	Metadata *FieldMetadata `json:"metadata,omitempty"`
1487
1488	// Type: The type of the nickname.
1489	//
1490	// Possible values:
1491	//   "DEFAULT" - Generic nickname.
1492	//   "MAIDEN_NAME" - Maiden name or birth family name. Used when the
1493	// person's family name has
1494	// changed as a result of marriage.
1495	//   "INITIALS" - Initials.
1496	//   "GPLUS" - Google+ profile nickname.
1497	//   "OTHER_NAME" - A professional affiliation or other name; for
1498	// example, `Dr. Smith.`
1499	Type string `json:"type,omitempty"`
1500
1501	// Value: The nickname.
1502	Value string `json:"value,omitempty"`
1503
1504	// ForceSendFields is a list of field names (e.g. "Metadata") to
1505	// unconditionally include in API requests. By default, fields with
1506	// empty values are omitted from API requests. However, any non-pointer,
1507	// non-interface field appearing in ForceSendFields will be sent to the
1508	// server regardless of whether the field is empty or not. This may be
1509	// used to include empty fields in Patch requests.
1510	ForceSendFields []string `json:"-"`
1511
1512	// NullFields is a list of field names (e.g. "Metadata") to include in
1513	// API requests with the JSON null value. By default, fields with empty
1514	// values are omitted from API requests. However, any field with an
1515	// empty value appearing in NullFields will be sent to the server as
1516	// null. It is an error if a field in this list has a non-empty value.
1517	// This may be used to include null fields in Patch requests.
1518	NullFields []string `json:"-"`
1519}
1520
1521func (s *Nickname) MarshalJSON() ([]byte, error) {
1522	type NoMethod Nickname
1523	raw := NoMethod(*s)
1524	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1525}
1526
1527// Occupation: A person's occupation.
1528type Occupation struct {
1529	// Metadata: Metadata about the occupation.
1530	Metadata *FieldMetadata `json:"metadata,omitempty"`
1531
1532	// Value: The occupation; for example, `carpenter`.
1533	Value string `json:"value,omitempty"`
1534
1535	// ForceSendFields is a list of field names (e.g. "Metadata") to
1536	// unconditionally include in API requests. By default, fields with
1537	// empty values are omitted from API requests. However, any non-pointer,
1538	// non-interface field appearing in ForceSendFields will be sent to the
1539	// server regardless of whether the field is empty or not. This may be
1540	// used to include empty fields in Patch requests.
1541	ForceSendFields []string `json:"-"`
1542
1543	// NullFields is a list of field names (e.g. "Metadata") to include in
1544	// API requests with the JSON null value. By default, fields with empty
1545	// values are omitted from API requests. However, any field with an
1546	// empty value appearing in NullFields will be sent to the server as
1547	// null. It is an error if a field in this list has a non-empty value.
1548	// This may be used to include null fields in Patch requests.
1549	NullFields []string `json:"-"`
1550}
1551
1552func (s *Occupation) MarshalJSON() ([]byte, error) {
1553	type NoMethod Occupation
1554	raw := NoMethod(*s)
1555	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1556}
1557
1558// Organization: A person's past or current organization. Overlapping
1559// date ranges are
1560// permitted.
1561type Organization struct {
1562	// Current: True if the organization is the person's current
1563	// organization;
1564	// false if the organization is a past organization.
1565	Current bool `json:"current,omitempty"`
1566
1567	// Department: The person's department at the organization.
1568	Department string `json:"department,omitempty"`
1569
1570	// Domain: The domain name associated with the organization; for
1571	// example,
1572	// `google.com`.
1573	Domain string `json:"domain,omitempty"`
1574
1575	// EndDate: The end date when the person left the organization.
1576	EndDate *Date `json:"endDate,omitempty"`
1577
1578	// FormattedType: Output only. The type of the organization translated
1579	// and formatted in the
1580	// viewer's account locale or the `Accept-Language` HTTP header locale.
1581	FormattedType string `json:"formattedType,omitempty"`
1582
1583	// JobDescription: The person's job description at the organization.
1584	JobDescription string `json:"jobDescription,omitempty"`
1585
1586	// Location: The location of the organization office the person works
1587	// at.
1588	Location string `json:"location,omitempty"`
1589
1590	// Metadata: Metadata about the organization.
1591	Metadata *FieldMetadata `json:"metadata,omitempty"`
1592
1593	// Name: The name of the organization.
1594	Name string `json:"name,omitempty"`
1595
1596	// PhoneticName: The phonetic name of the organization.
1597	PhoneticName string `json:"phoneticName,omitempty"`
1598
1599	// StartDate: The start date when the person joined the organization.
1600	StartDate *Date `json:"startDate,omitempty"`
1601
1602	// Symbol: The symbol associated with the organization; for example, a
1603	// stock ticker
1604	// symbol, abbreviation, or acronym.
1605	Symbol string `json:"symbol,omitempty"`
1606
1607	// Title: The person's job title at the organization.
1608	Title string `json:"title,omitempty"`
1609
1610	// Type: The type of the organization. The type can be custom or  one of
1611	// these
1612	// predefined values:
1613	//
1614	// * `work`
1615	// * `school`
1616	Type string `json:"type,omitempty"`
1617
1618	// ForceSendFields is a list of field names (e.g. "Current") to
1619	// unconditionally include in API requests. By default, fields with
1620	// empty values are omitted from API requests. However, any non-pointer,
1621	// non-interface field appearing in ForceSendFields will be sent to the
1622	// server regardless of whether the field is empty or not. This may be
1623	// used to include empty fields in Patch requests.
1624	ForceSendFields []string `json:"-"`
1625
1626	// NullFields is a list of field names (e.g. "Current") to include in
1627	// API requests with the JSON null value. By default, fields with empty
1628	// values are omitted from API requests. However, any field with an
1629	// empty value appearing in NullFields will be sent to the server as
1630	// null. It is an error if a field in this list has a non-empty value.
1631	// This may be used to include null fields in Patch requests.
1632	NullFields []string `json:"-"`
1633}
1634
1635func (s *Organization) MarshalJSON() ([]byte, error) {
1636	type NoMethod Organization
1637	raw := NoMethod(*s)
1638	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1639}
1640
1641// Person: Information about a person merged from various data sources
1642// such as the
1643// authenticated user's contacts and profile data.
1644//
1645// Most fields can have multiple items. The items in a field have no
1646// guaranteed
1647// order, but each non-empty field is guaranteed to have exactly one
1648// field with
1649// `metadata.primary` set to true.
1650type Person struct {
1651	// Addresses: The person's street addresses.
1652	Addresses []*Address `json:"addresses,omitempty"`
1653
1654	// AgeRange: Output only. **DEPRECATED** (Please use `person.ageRanges`
1655	// instead)**
1656	//
1657	// The person's age range.
1658	//
1659	// Possible values:
1660	//   "AGE_RANGE_UNSPECIFIED" - Unspecified.
1661	//   "LESS_THAN_EIGHTEEN" - Younger than eighteen.
1662	//   "EIGHTEEN_TO_TWENTY" - Between eighteen and twenty.
1663	//   "TWENTY_ONE_OR_OLDER" - Twenty-one and older.
1664	AgeRange string `json:"ageRange,omitempty"`
1665
1666	// AgeRanges: Output only. The person's age ranges.
1667	AgeRanges []*AgeRangeType `json:"ageRanges,omitempty"`
1668
1669	// Biographies: The person's biographies.
1670	Biographies []*Biography `json:"biographies,omitempty"`
1671
1672	// Birthdays: The person's birthdays.
1673	Birthdays []*Birthday `json:"birthdays,omitempty"`
1674
1675	// BraggingRights: The person's bragging rights.
1676	BraggingRights []*BraggingRights `json:"braggingRights,omitempty"`
1677
1678	// CoverPhotos: Output only. The person's cover photos.
1679	CoverPhotos []*CoverPhoto `json:"coverPhotos,omitempty"`
1680
1681	// EmailAddresses: The person's email addresses.
1682	EmailAddresses []*EmailAddress `json:"emailAddresses,omitempty"`
1683
1684	// Etag: The [HTTP entity tag](https://en.wikipedia.org/wiki/HTTP_ETag)
1685	// of the
1686	// resource. Used for web cache validation.
1687	Etag string `json:"etag,omitempty"`
1688
1689	// Events: The person's events.
1690	Events []*Event `json:"events,omitempty"`
1691
1692	// Genders: The person's genders.
1693	Genders []*Gender `json:"genders,omitempty"`
1694
1695	// ImClients: The person's instant messaging clients.
1696	ImClients []*ImClient `json:"imClients,omitempty"`
1697
1698	// Interests: The person's interests.
1699	Interests []*Interest `json:"interests,omitempty"`
1700
1701	// Locales: The person's locale preferences.
1702	Locales []*Locale `json:"locales,omitempty"`
1703
1704	// Memberships: The person's group memberships.
1705	Memberships []*Membership `json:"memberships,omitempty"`
1706
1707	// Metadata: Output only. Metadata about the person.
1708	Metadata *PersonMetadata `json:"metadata,omitempty"`
1709
1710	// Names: The person's names.
1711	Names []*Name `json:"names,omitempty"`
1712
1713	// Nicknames: The person's nicknames.
1714	Nicknames []*Nickname `json:"nicknames,omitempty"`
1715
1716	// Occupations: The person's occupations.
1717	Occupations []*Occupation `json:"occupations,omitempty"`
1718
1719	// Organizations: The person's past or current organizations.
1720	Organizations []*Organization `json:"organizations,omitempty"`
1721
1722	// PhoneNumbers: The person's phone numbers.
1723	PhoneNumbers []*PhoneNumber `json:"phoneNumbers,omitempty"`
1724
1725	// Photos: Output only. The person's photos.
1726	Photos []*Photo `json:"photos,omitempty"`
1727
1728	// Relations: The person's relations.
1729	Relations []*Relation `json:"relations,omitempty"`
1730
1731	// RelationshipInterests: Output only. The person's relationship
1732	// interests.
1733	RelationshipInterests []*RelationshipInterest `json:"relationshipInterests,omitempty"`
1734
1735	// RelationshipStatuses: Output only. The person's relationship
1736	// statuses.
1737	RelationshipStatuses []*RelationshipStatus `json:"relationshipStatuses,omitempty"`
1738
1739	// Residences: The person's residences.
1740	Residences []*Residence `json:"residences,omitempty"`
1741
1742	// ResourceName: The resource name for the person, assigned by the
1743	// server. An ASCII string
1744	// with a max length of 27 characters, in the form
1745	// of
1746	// `people/`<var>person_id</var>.
1747	ResourceName string `json:"resourceName,omitempty"`
1748
1749	// SipAddresses: The person's SIP addresses.
1750	SipAddresses []*SipAddress `json:"sipAddresses,omitempty"`
1751
1752	// Skills: The person's skills.
1753	Skills []*Skill `json:"skills,omitempty"`
1754
1755	// Taglines: Output only. The person's taglines.
1756	Taglines []*Tagline `json:"taglines,omitempty"`
1757
1758	// Urls: The person's associated URLs.
1759	Urls []*Url `json:"urls,omitempty"`
1760
1761	// UserDefined: The person's user defined data.
1762	UserDefined []*UserDefined `json:"userDefined,omitempty"`
1763
1764	// ServerResponse contains the HTTP response code and headers from the
1765	// server.
1766	googleapi.ServerResponse `json:"-"`
1767
1768	// ForceSendFields is a list of field names (e.g. "Addresses") to
1769	// unconditionally include in API requests. By default, fields with
1770	// empty values are omitted from API requests. However, any non-pointer,
1771	// non-interface field appearing in ForceSendFields will be sent to the
1772	// server regardless of whether the field is empty or not. This may be
1773	// used to include empty fields in Patch requests.
1774	ForceSendFields []string `json:"-"`
1775
1776	// NullFields is a list of field names (e.g. "Addresses") to include in
1777	// API requests with the JSON null value. By default, fields with empty
1778	// values are omitted from API requests. However, any field with an
1779	// empty value appearing in NullFields will be sent to the server as
1780	// null. It is an error if a field in this list has a non-empty value.
1781	// This may be used to include null fields in Patch requests.
1782	NullFields []string `json:"-"`
1783}
1784
1785func (s *Person) MarshalJSON() ([]byte, error) {
1786	type NoMethod Person
1787	raw := NoMethod(*s)
1788	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1789}
1790
1791// PersonMetadata: The metadata about a person.
1792type PersonMetadata struct {
1793	// Deleted: Output only. True if the person resource has been deleted.
1794	// Populated only
1795	// for
1796	// [`connections.list`](/people/api/rest/v1/people.connections/list)
1797	// requests
1798	// that include a sync token.
1799	Deleted bool `json:"deleted,omitempty"`
1800
1801	// LinkedPeopleResourceNames: Output only. Resource names of people
1802	// linked to this resource.
1803	LinkedPeopleResourceNames []string `json:"linkedPeopleResourceNames,omitempty"`
1804
1805	// ObjectType: Output only. **DEPRECATED** (Please
1806	// use
1807	// `person.metadata.sources.profileMetadata.objectType` instead)
1808	//
1809	// The type of the person object.
1810	//
1811	// Possible values:
1812	//   "OBJECT_TYPE_UNSPECIFIED" - Unspecified.
1813	//   "PERSON" - Person.
1814	//   "PAGE" - [Google+ Page.](http://www.google.com/+/brands/)
1815	ObjectType string `json:"objectType,omitempty"`
1816
1817	// PreviousResourceNames: Output only. Any former resource names this
1818	// person has had. Populated only
1819	// for
1820	// [`connections.list`](/people/api/rest/v1/people.connections/list)
1821	// requests
1822	// that include a sync token.
1823	//
1824	// The resource name may change when adding or removing fields that link
1825	// a
1826	// contact and profile such as a verified email, verified phone number,
1827	// or
1828	// profile URL.
1829	PreviousResourceNames []string `json:"previousResourceNames,omitempty"`
1830
1831	// Sources: The sources of data for the person.
1832	Sources []*Source `json:"sources,omitempty"`
1833
1834	// ForceSendFields is a list of field names (e.g. "Deleted") to
1835	// unconditionally include in API requests. By default, fields with
1836	// empty values are omitted from API requests. However, any non-pointer,
1837	// non-interface field appearing in ForceSendFields will be sent to the
1838	// server regardless of whether the field is empty or not. This may be
1839	// used to include empty fields in Patch requests.
1840	ForceSendFields []string `json:"-"`
1841
1842	// NullFields is a list of field names (e.g. "Deleted") to include in
1843	// API requests with the JSON null value. By default, fields with empty
1844	// values are omitted from API requests. However, any field with an
1845	// empty value appearing in NullFields will be sent to the server as
1846	// null. It is an error if a field in this list has a non-empty value.
1847	// This may be used to include null fields in Patch requests.
1848	NullFields []string `json:"-"`
1849}
1850
1851func (s *PersonMetadata) MarshalJSON() ([]byte, error) {
1852	type NoMethod PersonMetadata
1853	raw := NoMethod(*s)
1854	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1855}
1856
1857// PersonResponse: The response for a single person
1858type PersonResponse struct {
1859	// HttpStatusCode: **DEPRECATED** (Please use status instead)
1860	//
1861	// [HTTP 1.1 status
1862	// code]
1863	// (http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html).
1864	HttpStatusCode int64 `json:"httpStatusCode,omitempty"`
1865
1866	// Person: The person.
1867	Person *Person `json:"person,omitempty"`
1868
1869	// RequestedResourceName: The original requested resource name. May be
1870	// different than the resource
1871	// name on the returned person.
1872	//
1873	// The resource name can change when adding or removing fields that link
1874	// a
1875	// contact and profile such as a verified email, verified phone number,
1876	// or a
1877	// profile URL.
1878	RequestedResourceName string `json:"requestedResourceName,omitempty"`
1879
1880	// Status: The status of the response.
1881	Status *Status `json:"status,omitempty"`
1882
1883	// ForceSendFields is a list of field names (e.g. "HttpStatusCode") to
1884	// unconditionally include in API requests. By default, fields with
1885	// empty values are omitted from API requests. However, any non-pointer,
1886	// non-interface field appearing in ForceSendFields will be sent to the
1887	// server regardless of whether the field is empty or not. This may be
1888	// used to include empty fields in Patch requests.
1889	ForceSendFields []string `json:"-"`
1890
1891	// NullFields is a list of field names (e.g. "HttpStatusCode") to
1892	// include in API requests with the JSON null value. By default, fields
1893	// with empty values are omitted from API requests. However, any field
1894	// with an empty value appearing in NullFields will be sent to the
1895	// server as null. It is an error if a field in this list has a
1896	// non-empty value. This may be used to include null fields in Patch
1897	// requests.
1898	NullFields []string `json:"-"`
1899}
1900
1901func (s *PersonResponse) MarshalJSON() ([]byte, error) {
1902	type NoMethod PersonResponse
1903	raw := NoMethod(*s)
1904	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1905}
1906
1907// PhoneNumber: A person's phone number.
1908type PhoneNumber struct {
1909	// CanonicalForm: Output only. The canonicalized
1910	// [ITU-T
1911	// E.164](https://law.resource.org/pub/us/cfr/ibr/004/itu-t.E.164.
1912	// 1.2008.pdf)
1913	// form of the phone number.
1914	CanonicalForm string `json:"canonicalForm,omitempty"`
1915
1916	// FormattedType: Output only. The type of the phone number translated
1917	// and formatted in the
1918	// viewer's account locale or the `Accept-Language` HTTP header locale.
1919	FormattedType string `json:"formattedType,omitempty"`
1920
1921	// Metadata: Metadata about the phone number.
1922	Metadata *FieldMetadata `json:"metadata,omitempty"`
1923
1924	// Type: The type of the phone number. The type can be custom or one of
1925	// these
1926	// predefined values:
1927	//
1928	// * `home`
1929	// * `work`
1930	// * `mobile`
1931	// * `homeFax`
1932	// * `workFax`
1933	// * `otherFax`
1934	// * `pager`
1935	// * `workMobile`
1936	// * `workPager`
1937	// * `main`
1938	// * `googleVoice`
1939	// * `other`
1940	Type string `json:"type,omitempty"`
1941
1942	// Value: The phone number.
1943	Value string `json:"value,omitempty"`
1944
1945	// ForceSendFields is a list of field names (e.g. "CanonicalForm") to
1946	// unconditionally include in API requests. By default, fields with
1947	// empty values are omitted from API requests. However, any non-pointer,
1948	// non-interface field appearing in ForceSendFields will be sent to the
1949	// server regardless of whether the field is empty or not. This may be
1950	// used to include empty fields in Patch requests.
1951	ForceSendFields []string `json:"-"`
1952
1953	// NullFields is a list of field names (e.g. "CanonicalForm") to include
1954	// in API requests with the JSON null value. By default, fields with
1955	// empty values are omitted from API requests. However, any field with
1956	// an empty value appearing in NullFields will be sent to the server as
1957	// null. It is an error if a field in this list has a non-empty value.
1958	// This may be used to include null fields in Patch requests.
1959	NullFields []string `json:"-"`
1960}
1961
1962func (s *PhoneNumber) MarshalJSON() ([]byte, error) {
1963	type NoMethod PhoneNumber
1964	raw := NoMethod(*s)
1965	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1966}
1967
1968// Photo: A person's photo. A picture shown next to the person's name
1969// to
1970// help others recognize the person.
1971type Photo struct {
1972	// Default: True if the photo is a default photo;
1973	// false if the photo is a user-provided photo.
1974	Default bool `json:"default,omitempty"`
1975
1976	// Metadata: Metadata about the photo.
1977	Metadata *FieldMetadata `json:"metadata,omitempty"`
1978
1979	// Url: The URL of the photo. You can change the desired size by
1980	// appending a query
1981	// parameter `sz=`<var>size</var> at the end of the url.
1982	// Example:
1983	// `https://lh3.googleusercontent.com/-T_wVWLlmg7w/AAAAAAAAAAI/A
1984	// AAAAAAABa8/00gzXvDBYqw/s100/photo.jpg?sz=50`
1985	Url string `json:"url,omitempty"`
1986
1987	// ForceSendFields is a list of field names (e.g. "Default") to
1988	// unconditionally include in API requests. By default, fields with
1989	// empty values are omitted from API requests. However, any non-pointer,
1990	// non-interface field appearing in ForceSendFields will be sent to the
1991	// server regardless of whether the field is empty or not. This may be
1992	// used to include empty fields in Patch requests.
1993	ForceSendFields []string `json:"-"`
1994
1995	// NullFields is a list of field names (e.g. "Default") to include in
1996	// API requests with the JSON null value. By default, fields with empty
1997	// values are omitted from API requests. However, any field with an
1998	// empty value appearing in NullFields will be sent to the server as
1999	// null. It is an error if a field in this list has a non-empty value.
2000	// This may be used to include null fields in Patch requests.
2001	NullFields []string `json:"-"`
2002}
2003
2004func (s *Photo) MarshalJSON() ([]byte, error) {
2005	type NoMethod Photo
2006	raw := NoMethod(*s)
2007	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
2008}
2009
2010// ProfileMetadata: The metadata about a profile.
2011type ProfileMetadata struct {
2012	// ObjectType: Output only. The profile object type.
2013	//
2014	// Possible values:
2015	//   "OBJECT_TYPE_UNSPECIFIED" - Unspecified.
2016	//   "PERSON" - Person.
2017	//   "PAGE" - [Google+ Page.](http://www.google.com/+/brands/)
2018	ObjectType string `json:"objectType,omitempty"`
2019
2020	// UserTypes: Output only. The user types.
2021	//
2022	// Possible values:
2023	//   "USER_TYPE_UNKNOWN" - The user type is not known.
2024	//   "GOOGLE_USER" - The user is a Google user.
2025	//   "GPLUS_USER" - The user is a Google+ user.
2026	//   "GOOGLE_APPS_USER" - The user is a G Suite user.
2027	UserTypes []string `json:"userTypes,omitempty"`
2028
2029	// ForceSendFields is a list of field names (e.g. "ObjectType") to
2030	// unconditionally include in API requests. By default, fields with
2031	// empty values are omitted from API requests. However, any non-pointer,
2032	// non-interface field appearing in ForceSendFields will be sent to the
2033	// server regardless of whether the field is empty or not. This may be
2034	// used to include empty fields in Patch requests.
2035	ForceSendFields []string `json:"-"`
2036
2037	// NullFields is a list of field names (e.g. "ObjectType") to include in
2038	// API requests with the JSON null value. By default, fields with empty
2039	// values are omitted from API requests. However, any field with an
2040	// empty value appearing in NullFields will be sent to the server as
2041	// null. It is an error if a field in this list has a non-empty value.
2042	// This may be used to include null fields in Patch requests.
2043	NullFields []string `json:"-"`
2044}
2045
2046func (s *ProfileMetadata) MarshalJSON() ([]byte, error) {
2047	type NoMethod ProfileMetadata
2048	raw := NoMethod(*s)
2049	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
2050}
2051
2052// Relation: A person's relation to another person.
2053type Relation struct {
2054	// FormattedType: Output only. The type of the relation translated and
2055	// formatted in the viewer's
2056	// account locale or the locale specified in the Accept-Language HTTP
2057	// header.
2058	FormattedType string `json:"formattedType,omitempty"`
2059
2060	// Metadata: Metadata about the relation.
2061	Metadata *FieldMetadata `json:"metadata,omitempty"`
2062
2063	// Person: The name of the other person this relation refers to.
2064	Person string `json:"person,omitempty"`
2065
2066	// Type: The person's relation to the other person. The type can be
2067	// custom or one of
2068	// these predefined values:
2069	//
2070	// * `spouse`
2071	// * `child`
2072	// * `mother`
2073	// * `father`
2074	// * `parent`
2075	// * `brother`
2076	// * `sister`
2077	// * `friend`
2078	// * `relative`
2079	// * `domesticPartner`
2080	// * `manager`
2081	// * `assistant`
2082	// * `referredBy`
2083	// * `partner`
2084	Type string `json:"type,omitempty"`
2085
2086	// ForceSendFields is a list of field names (e.g. "FormattedType") to
2087	// unconditionally include in API requests. By default, fields with
2088	// empty values are omitted from API requests. However, any non-pointer,
2089	// non-interface field appearing in ForceSendFields will be sent to the
2090	// server regardless of whether the field is empty or not. This may be
2091	// used to include empty fields in Patch requests.
2092	ForceSendFields []string `json:"-"`
2093
2094	// NullFields is a list of field names (e.g. "FormattedType") to include
2095	// in API requests with the JSON null value. By default, fields with
2096	// empty values are omitted from API requests. However, any field with
2097	// an empty value appearing in NullFields will be sent to the server as
2098	// null. It is an error if a field in this list has a non-empty value.
2099	// This may be used to include null fields in Patch requests.
2100	NullFields []string `json:"-"`
2101}
2102
2103func (s *Relation) MarshalJSON() ([]byte, error) {
2104	type NoMethod Relation
2105	raw := NoMethod(*s)
2106	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
2107}
2108
2109// RelationshipInterest: A person's relationship interest .
2110type RelationshipInterest struct {
2111	// FormattedValue: Output only. The value of the relationship interest
2112	// translated and formatted
2113	// in the viewer's account locale or the locale specified in
2114	// the
2115	// Accept-Language HTTP header.
2116	FormattedValue string `json:"formattedValue,omitempty"`
2117
2118	// Metadata: Metadata about the relationship interest.
2119	Metadata *FieldMetadata `json:"metadata,omitempty"`
2120
2121	// Value: The kind of relationship the person is looking for. The value
2122	// can be custom
2123	// or one of these predefined values:
2124	//
2125	// * `friend`
2126	// * `date`
2127	// * `relationship`
2128	// * `networking`
2129	Value string `json:"value,omitempty"`
2130
2131	// ForceSendFields is a list of field names (e.g. "FormattedValue") to
2132	// unconditionally include in API requests. By default, fields with
2133	// empty values are omitted from API requests. However, any non-pointer,
2134	// non-interface field appearing in ForceSendFields will be sent to the
2135	// server regardless of whether the field is empty or not. This may be
2136	// used to include empty fields in Patch requests.
2137	ForceSendFields []string `json:"-"`
2138
2139	// NullFields is a list of field names (e.g. "FormattedValue") to
2140	// include in API requests with the JSON null value. By default, fields
2141	// with empty values are omitted from API requests. However, any field
2142	// with an empty value appearing in NullFields will be sent to the
2143	// server as null. It is an error if a field in this list has a
2144	// non-empty value. This may be used to include null fields in Patch
2145	// requests.
2146	NullFields []string `json:"-"`
2147}
2148
2149func (s *RelationshipInterest) MarshalJSON() ([]byte, error) {
2150	type NoMethod RelationshipInterest
2151	raw := NoMethod(*s)
2152	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
2153}
2154
2155// RelationshipStatus: A person's relationship status.
2156type RelationshipStatus struct {
2157	// FormattedValue: Output only. The value of the relationship status
2158	// translated and formatted in
2159	// the viewer's account locale or the `Accept-Language` HTTP header
2160	// locale.
2161	FormattedValue string `json:"formattedValue,omitempty"`
2162
2163	// Metadata: Metadata about the relationship status.
2164	Metadata *FieldMetadata `json:"metadata,omitempty"`
2165
2166	// Value: The relationship status. The value can be custom or one of
2167	// these
2168	// predefined values:
2169	//
2170	// * `single`
2171	// * `inARelationship`
2172	// * `engaged`
2173	// * `married`
2174	// * `itsComplicated`
2175	// * `openRelationship`
2176	// * `widowed`
2177	// * `inDomesticPartnership`
2178	// * `inCivilUnion`
2179	Value string `json:"value,omitempty"`
2180
2181	// ForceSendFields is a list of field names (e.g. "FormattedValue") to
2182	// unconditionally include in API requests. By default, fields with
2183	// empty values are omitted from API requests. However, any non-pointer,
2184	// non-interface field appearing in ForceSendFields will be sent to the
2185	// server regardless of whether the field is empty or not. This may be
2186	// used to include empty fields in Patch requests.
2187	ForceSendFields []string `json:"-"`
2188
2189	// NullFields is a list of field names (e.g. "FormattedValue") to
2190	// include in API requests with the JSON null value. By default, fields
2191	// with empty values are omitted from API requests. However, any field
2192	// with an empty value appearing in NullFields will be sent to the
2193	// server as null. It is an error if a field in this list has a
2194	// non-empty value. This may be used to include null fields in Patch
2195	// requests.
2196	NullFields []string `json:"-"`
2197}
2198
2199func (s *RelationshipStatus) MarshalJSON() ([]byte, error) {
2200	type NoMethod RelationshipStatus
2201	raw := NoMethod(*s)
2202	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
2203}
2204
2205// Residence: A person's past or current residence.
2206type Residence struct {
2207	// Current: True if the residence is the person's current
2208	// residence;
2209	// false if the residence is a past residence.
2210	Current bool `json:"current,omitempty"`
2211
2212	// Metadata: Metadata about the residence.
2213	Metadata *FieldMetadata `json:"metadata,omitempty"`
2214
2215	// Value: The address of the residence.
2216	Value string `json:"value,omitempty"`
2217
2218	// ForceSendFields is a list of field names (e.g. "Current") to
2219	// unconditionally include in API requests. By default, fields with
2220	// empty values are omitted from API requests. However, any non-pointer,
2221	// non-interface field appearing in ForceSendFields will be sent to the
2222	// server regardless of whether the field is empty or not. This may be
2223	// used to include empty fields in Patch requests.
2224	ForceSendFields []string `json:"-"`
2225
2226	// NullFields is a list of field names (e.g. "Current") to include in
2227	// API requests with the JSON null value. By default, fields with empty
2228	// values are omitted from API requests. However, any field with an
2229	// empty value appearing in NullFields will be sent to the server as
2230	// null. It is an error if a field in this list has a non-empty value.
2231	// This may be used to include null fields in Patch requests.
2232	NullFields []string `json:"-"`
2233}
2234
2235func (s *Residence) MarshalJSON() ([]byte, error) {
2236	type NoMethod Residence
2237	raw := NoMethod(*s)
2238	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
2239}
2240
2241// SipAddress: A person's SIP address. Session Initial Protocol
2242// addresses are used for VoIP
2243// communications to make voice or video calls over the internet.
2244type SipAddress struct {
2245	// FormattedType: Output only. The type of the SIP address translated
2246	// and formatted in the
2247	// viewer's account locale or the `Accept-Language` HTTP header locale.
2248	FormattedType string `json:"formattedType,omitempty"`
2249
2250	// Metadata: Metadata about the SIP address.
2251	Metadata *FieldMetadata `json:"metadata,omitempty"`
2252
2253	// Type: The type of the SIP address. The type can be custom or or one
2254	// of these
2255	// predefined values:
2256	//
2257	// * `home`
2258	// * `work`
2259	// * `mobile`
2260	// * `other`
2261	Type string `json:"type,omitempty"`
2262
2263	// Value: The SIP address in the
2264	// [RFC 3261 19.1](https://tools.ietf.org/html/rfc3261#section-19.1) SIP
2265	// URI
2266	// format.
2267	Value string `json:"value,omitempty"`
2268
2269	// ForceSendFields is a list of field names (e.g. "FormattedType") to
2270	// unconditionally include in API requests. By default, fields with
2271	// empty values are omitted from API requests. However, any non-pointer,
2272	// non-interface field appearing in ForceSendFields will be sent to the
2273	// server regardless of whether the field is empty or not. This may be
2274	// used to include empty fields in Patch requests.
2275	ForceSendFields []string `json:"-"`
2276
2277	// NullFields is a list of field names (e.g. "FormattedType") to include
2278	// in API requests with the JSON null value. By default, fields with
2279	// empty values are omitted from API requests. However, any field with
2280	// an empty value appearing in NullFields will be sent to the server as
2281	// null. It is an error if a field in this list has a non-empty value.
2282	// This may be used to include null fields in Patch requests.
2283	NullFields []string `json:"-"`
2284}
2285
2286func (s *SipAddress) MarshalJSON() ([]byte, error) {
2287	type NoMethod SipAddress
2288	raw := NoMethod(*s)
2289	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
2290}
2291
2292// Skill: A skill that the person has.
2293type Skill struct {
2294	// Metadata: Metadata about the skill.
2295	Metadata *FieldMetadata `json:"metadata,omitempty"`
2296
2297	// Value: The skill; for example, `underwater basket weaving`.
2298	Value string `json:"value,omitempty"`
2299
2300	// ForceSendFields is a list of field names (e.g. "Metadata") to
2301	// unconditionally include in API requests. By default, fields with
2302	// empty values are omitted from API requests. However, any non-pointer,
2303	// non-interface field appearing in ForceSendFields will be sent to the
2304	// server regardless of whether the field is empty or not. This may be
2305	// used to include empty fields in Patch requests.
2306	ForceSendFields []string `json:"-"`
2307
2308	// NullFields is a list of field names (e.g. "Metadata") to include in
2309	// API requests with the JSON null value. By default, fields with empty
2310	// values are omitted from API requests. However, any field with an
2311	// empty value appearing in NullFields will be sent to the server as
2312	// null. It is an error if a field in this list has a non-empty value.
2313	// This may be used to include null fields in Patch requests.
2314	NullFields []string `json:"-"`
2315}
2316
2317func (s *Skill) MarshalJSON() ([]byte, error) {
2318	type NoMethod Skill
2319	raw := NoMethod(*s)
2320	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
2321}
2322
2323// Source: The source of a field.
2324type Source struct {
2325	// Etag: **Only populated in `person.metadata.sources`.**
2326	//
2327	// The [HTTP entity tag](https://en.wikipedia.org/wiki/HTTP_ETag) of
2328	// the
2329	// source. Used for web cache validation.
2330	Etag string `json:"etag,omitempty"`
2331
2332	// Id: The unique identifier within the source type generated by the
2333	// server.
2334	Id string `json:"id,omitempty"`
2335
2336	// ProfileMetadata: Output only. **Only populated in
2337	// `person.metadata.sources`.**
2338	//
2339	// Metadata about a source of type PROFILE.
2340	ProfileMetadata *ProfileMetadata `json:"profileMetadata,omitempty"`
2341
2342	// Type: The source type.
2343	//
2344	// Possible values:
2345	//   "SOURCE_TYPE_UNSPECIFIED" - Unspecified.
2346	//   "ACCOUNT" - [Google Account](https://accounts.google.com).
2347	//   "PROFILE" - [Google profile](https://profiles.google.com). You can
2348	// view the
2349	// profile at https://profiles.google.com/<var>id</var>
2350	// where
2351	// <var>id</var> is the source id.
2352	//   "DOMAIN_PROFILE" - [G Suite domain
2353	// profile](https://support.google.com/a/answer/1628008).
2354	//   "CONTACT" - [Google contact](https://contacts.google.com). You can
2355	// view the
2356	// contact at https://contact.google.com/<var>id</var> where
2357	// <var>id</var>
2358	// is the source id.
2359	Type string `json:"type,omitempty"`
2360
2361	// UpdateTime: Output only. **Only populated in
2362	// `person.metadata.sources`.**
2363	//
2364	// Last update timestamp of this source.
2365	UpdateTime string `json:"updateTime,omitempty"`
2366
2367	// ForceSendFields is a list of field names (e.g. "Etag") to
2368	// unconditionally include in API requests. By default, fields with
2369	// empty values are omitted from API requests. However, any non-pointer,
2370	// non-interface field appearing in ForceSendFields will be sent to the
2371	// server regardless of whether the field is empty or not. This may be
2372	// used to include empty fields in Patch requests.
2373	ForceSendFields []string `json:"-"`
2374
2375	// NullFields is a list of field names (e.g. "Etag") to include in API
2376	// requests with the JSON null value. By default, fields with empty
2377	// values are omitted from API requests. However, any field with an
2378	// empty value appearing in NullFields will be sent to the server as
2379	// null. It is an error if a field in this list has a non-empty value.
2380	// This may be used to include null fields in Patch requests.
2381	NullFields []string `json:"-"`
2382}
2383
2384func (s *Source) MarshalJSON() ([]byte, error) {
2385	type NoMethod Source
2386	raw := NoMethod(*s)
2387	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
2388}
2389
2390// Status: The `Status` type defines a logical error model that is
2391// suitable for
2392// different programming environments, including REST APIs and RPC APIs.
2393// It is
2394// used by [gRPC](https://github.com/grpc). Each `Status` message
2395// contains
2396// three pieces of data: error code, error message, and error
2397// details.
2398//
2399// You can find out more about this error model and how to work with it
2400// in the
2401// [API Design Guide](https://cloud.google.com/apis/design/errors).
2402type Status struct {
2403	// Code: The status code, which should be an enum value of
2404	// google.rpc.Code.
2405	Code int64 `json:"code,omitempty"`
2406
2407	// Details: A list of messages that carry the error details.  There is a
2408	// common set of
2409	// message types for APIs to use.
2410	Details []googleapi.RawMessage `json:"details,omitempty"`
2411
2412	// Message: A developer-facing error message, which should be in
2413	// English. Any
2414	// user-facing error message should be localized and sent in
2415	// the
2416	// google.rpc.Status.details field, or localized by the client.
2417	Message string `json:"message,omitempty"`
2418
2419	// ForceSendFields is a list of field names (e.g. "Code") to
2420	// unconditionally include in API requests. By default, fields with
2421	// empty values are omitted from API requests. However, any non-pointer,
2422	// non-interface field appearing in ForceSendFields will be sent to the
2423	// server regardless of whether the field is empty or not. This may be
2424	// used to include empty fields in Patch requests.
2425	ForceSendFields []string `json:"-"`
2426
2427	// NullFields is a list of field names (e.g. "Code") to include in API
2428	// requests with the JSON null value. By default, fields with empty
2429	// values are omitted from API requests. However, any field with an
2430	// empty value appearing in NullFields will be sent to the server as
2431	// null. It is an error if a field in this list has a non-empty value.
2432	// This may be used to include null fields in Patch requests.
2433	NullFields []string `json:"-"`
2434}
2435
2436func (s *Status) MarshalJSON() ([]byte, error) {
2437	type NoMethod Status
2438	raw := NoMethod(*s)
2439	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
2440}
2441
2442// Tagline: A brief one-line description of the person.
2443type Tagline struct {
2444	// Metadata: Metadata about the tagline.
2445	Metadata *FieldMetadata `json:"metadata,omitempty"`
2446
2447	// Value: The tagline.
2448	Value string `json:"value,omitempty"`
2449
2450	// ForceSendFields is a list of field names (e.g. "Metadata") to
2451	// unconditionally include in API requests. By default, fields with
2452	// empty values are omitted from API requests. However, any non-pointer,
2453	// non-interface field appearing in ForceSendFields will be sent to the
2454	// server regardless of whether the field is empty or not. This may be
2455	// used to include empty fields in Patch requests.
2456	ForceSendFields []string `json:"-"`
2457
2458	// NullFields is a list of field names (e.g. "Metadata") to include in
2459	// API requests with the JSON null value. By default, fields with empty
2460	// values are omitted from API requests. However, any field with an
2461	// empty value appearing in NullFields will be sent to the server as
2462	// null. It is an error if a field in this list has a non-empty value.
2463	// This may be used to include null fields in Patch requests.
2464	NullFields []string `json:"-"`
2465}
2466
2467func (s *Tagline) MarshalJSON() ([]byte, error) {
2468	type NoMethod Tagline
2469	raw := NoMethod(*s)
2470	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
2471}
2472
2473// UpdateContactGroupRequest: A request to update an existing user
2474// contact group. All updated fields will
2475// be replaced.
2476type UpdateContactGroupRequest struct {
2477	// ContactGroup: Required. The contact group to update.
2478	ContactGroup *ContactGroup `json:"contactGroup,omitempty"`
2479
2480	// ForceSendFields is a list of field names (e.g. "ContactGroup") to
2481	// unconditionally include in API requests. By default, fields with
2482	// empty values are omitted from API requests. However, any non-pointer,
2483	// non-interface field appearing in ForceSendFields will be sent to the
2484	// server regardless of whether the field is empty or not. This may be
2485	// used to include empty fields in Patch requests.
2486	ForceSendFields []string `json:"-"`
2487
2488	// NullFields is a list of field names (e.g. "ContactGroup") to include
2489	// in API requests with the JSON null value. By default, fields with
2490	// empty values are omitted from API requests. However, any field with
2491	// an empty value appearing in NullFields will be sent to the server as
2492	// null. It is an error if a field in this list has a non-empty value.
2493	// This may be used to include null fields in Patch requests.
2494	NullFields []string `json:"-"`
2495}
2496
2497func (s *UpdateContactGroupRequest) MarshalJSON() ([]byte, error) {
2498	type NoMethod UpdateContactGroupRequest
2499	raw := NoMethod(*s)
2500	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
2501}
2502
2503// UpdateContactPhotoRequest: A request to update an existing contact's
2504// photo.
2505// All requests must have a valid photo format: JPEG or PNG.
2506type UpdateContactPhotoRequest struct {
2507	// PersonFields: Optional. A field mask to restrict which fields on the
2508	// person are returned. Multiple
2509	// fields can be specified by separating them with commas. Defaults to
2510	// empty
2511	// if not set, which will skip the post mutate get. Valid values are:
2512	//
2513	// * addresses
2514	// * ageRanges
2515	// * biographies
2516	// * birthdays
2517	// * braggingRights
2518	// * coverPhotos
2519	// * emailAddresses
2520	// * events
2521	// * genders
2522	// * imClients
2523	// * interests
2524	// * locales
2525	// * memberships
2526	// * metadata
2527	// * names
2528	// * nicknames
2529	// * occupations
2530	// * organizations
2531	// * phoneNumbers
2532	// * photos
2533	// * relations
2534	// * relationshipInterests
2535	// * relationshipStatuses
2536	// * residences
2537	// * sipAddresses
2538	// * skills
2539	// * taglines
2540	// * urls
2541	// * userDefined
2542	PersonFields string `json:"personFields,omitempty"`
2543
2544	// PhotoBytes: Required. Raw photo bytes
2545	PhotoBytes string `json:"photoBytes,omitempty"`
2546
2547	// ForceSendFields is a list of field names (e.g. "PersonFields") to
2548	// unconditionally include in API requests. By default, fields with
2549	// empty values are omitted from API requests. However, any non-pointer,
2550	// non-interface field appearing in ForceSendFields will be sent to the
2551	// server regardless of whether the field is empty or not. This may be
2552	// used to include empty fields in Patch requests.
2553	ForceSendFields []string `json:"-"`
2554
2555	// NullFields is a list of field names (e.g. "PersonFields") to include
2556	// in API requests with the JSON null value. By default, fields with
2557	// empty values are omitted from API requests. However, any field with
2558	// an empty value appearing in NullFields will be sent to the server as
2559	// null. It is an error if a field in this list has a non-empty value.
2560	// This may be used to include null fields in Patch requests.
2561	NullFields []string `json:"-"`
2562}
2563
2564func (s *UpdateContactPhotoRequest) MarshalJSON() ([]byte, error) {
2565	type NoMethod UpdateContactPhotoRequest
2566	raw := NoMethod(*s)
2567	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
2568}
2569
2570// UpdateContactPhotoResponse: The response for updating a contact's
2571// photo.
2572type UpdateContactPhotoResponse struct {
2573	// Person: The updated person, if person_fields is set in
2574	// the
2575	// UpdateContactPhotoRequest; otherwise this will be unset.
2576	Person *Person `json:"person,omitempty"`
2577
2578	// ServerResponse contains the HTTP response code and headers from the
2579	// server.
2580	googleapi.ServerResponse `json:"-"`
2581
2582	// ForceSendFields is a list of field names (e.g. "Person") to
2583	// unconditionally include in API requests. By default, fields with
2584	// empty values are omitted from API requests. However, any non-pointer,
2585	// non-interface field appearing in ForceSendFields will be sent to the
2586	// server regardless of whether the field is empty or not. This may be
2587	// used to include empty fields in Patch requests.
2588	ForceSendFields []string `json:"-"`
2589
2590	// NullFields is a list of field names (e.g. "Person") to include in API
2591	// requests with the JSON null value. By default, fields with empty
2592	// values are omitted from API requests. However, any field with an
2593	// empty value appearing in NullFields will be sent to the server as
2594	// null. It is an error if a field in this list has a non-empty value.
2595	// This may be used to include null fields in Patch requests.
2596	NullFields []string `json:"-"`
2597}
2598
2599func (s *UpdateContactPhotoResponse) MarshalJSON() ([]byte, error) {
2600	type NoMethod UpdateContactPhotoResponse
2601	raw := NoMethod(*s)
2602	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
2603}
2604
2605// Url: A person's associated URLs.
2606type Url struct {
2607	// FormattedType: Output only. The type of the URL translated and
2608	// formatted in the viewer's
2609	// account locale or the `Accept-Language` HTTP header locale.
2610	FormattedType string `json:"formattedType,omitempty"`
2611
2612	// Metadata: Metadata about the URL.
2613	Metadata *FieldMetadata `json:"metadata,omitempty"`
2614
2615	// Type: The type of the URL. The type can be custom or one of these
2616	// predefined
2617	// values:
2618	//
2619	// * `home`
2620	// * `work`
2621	// * `blog`
2622	// * `profile`
2623	// * `homePage`
2624	// * `ftp`
2625	// * `reservations`
2626	// * `appInstallPage`: website for a Google+ application.
2627	// * `other`
2628	Type string `json:"type,omitempty"`
2629
2630	// Value: The URL.
2631	Value string `json:"value,omitempty"`
2632
2633	// ForceSendFields is a list of field names (e.g. "FormattedType") to
2634	// unconditionally include in API requests. By default, fields with
2635	// empty values are omitted from API requests. However, any non-pointer,
2636	// non-interface field appearing in ForceSendFields will be sent to the
2637	// server regardless of whether the field is empty or not. This may be
2638	// used to include empty fields in Patch requests.
2639	ForceSendFields []string `json:"-"`
2640
2641	// NullFields is a list of field names (e.g. "FormattedType") to include
2642	// in API requests with the JSON null value. By default, fields with
2643	// empty values are omitted from API requests. However, any field with
2644	// an empty value appearing in NullFields will be sent to the server as
2645	// null. It is an error if a field in this list has a non-empty value.
2646	// This may be used to include null fields in Patch requests.
2647	NullFields []string `json:"-"`
2648}
2649
2650func (s *Url) MarshalJSON() ([]byte, error) {
2651	type NoMethod Url
2652	raw := NoMethod(*s)
2653	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
2654}
2655
2656// UserDefined: Arbitrary user data that is populated by the end users.
2657type UserDefined struct {
2658	// Key: The end user specified key of the user defined data.
2659	Key string `json:"key,omitempty"`
2660
2661	// Metadata: Metadata about the user defined data.
2662	Metadata *FieldMetadata `json:"metadata,omitempty"`
2663
2664	// Value: The end user specified value of the user defined data.
2665	Value string `json:"value,omitempty"`
2666
2667	// ForceSendFields is a list of field names (e.g. "Key") to
2668	// unconditionally include in API requests. By default, fields with
2669	// empty values are omitted from API requests. However, any non-pointer,
2670	// non-interface field appearing in ForceSendFields will be sent to the
2671	// server regardless of whether the field is empty or not. This may be
2672	// used to include empty fields in Patch requests.
2673	ForceSendFields []string `json:"-"`
2674
2675	// NullFields is a list of field names (e.g. "Key") to include in API
2676	// requests with the JSON null value. By default, fields with empty
2677	// values are omitted from API requests. However, any field with an
2678	// empty value appearing in NullFields will be sent to the server as
2679	// null. It is an error if a field in this list has a non-empty value.
2680	// This may be used to include null fields in Patch requests.
2681	NullFields []string `json:"-"`
2682}
2683
2684func (s *UserDefined) MarshalJSON() ([]byte, error) {
2685	type NoMethod UserDefined
2686	raw := NoMethod(*s)
2687	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
2688}
2689
2690// method id "people.contactGroups.batchGet":
2691
2692type ContactGroupsBatchGetCall struct {
2693	s            *Service
2694	urlParams_   gensupport.URLParams
2695	ifNoneMatch_ string
2696	ctx_         context.Context
2697	header_      http.Header
2698}
2699
2700// BatchGet: Get a list of contact groups owned by the authenticated
2701// user by specifying
2702// a list of contact group resource names.
2703func (r *ContactGroupsService) BatchGet() *ContactGroupsBatchGetCall {
2704	c := &ContactGroupsBatchGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
2705	return c
2706}
2707
2708// MaxMembers sets the optional parameter "maxMembers": Specifies the
2709// maximum number of members to return for each group. Defaults
2710// to 0 if not set, which will return zero members.
2711func (c *ContactGroupsBatchGetCall) MaxMembers(maxMembers int64) *ContactGroupsBatchGetCall {
2712	c.urlParams_.Set("maxMembers", fmt.Sprint(maxMembers))
2713	return c
2714}
2715
2716// ResourceNames sets the optional parameter "resourceNames": Required.
2717// The resource names of the contact groups to get.
2718func (c *ContactGroupsBatchGetCall) ResourceNames(resourceNames ...string) *ContactGroupsBatchGetCall {
2719	c.urlParams_.SetMulti("resourceNames", append([]string{}, resourceNames...))
2720	return c
2721}
2722
2723// Fields allows partial responses to be retrieved. See
2724// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
2725// for more information.
2726func (c *ContactGroupsBatchGetCall) Fields(s ...googleapi.Field) *ContactGroupsBatchGetCall {
2727	c.urlParams_.Set("fields", googleapi.CombineFields(s))
2728	return c
2729}
2730
2731// IfNoneMatch sets the optional parameter which makes the operation
2732// fail if the object's ETag matches the given value. This is useful for
2733// getting updates only after the object has changed since the last
2734// request. Use googleapi.IsNotModified to check whether the response
2735// error from Do is the result of In-None-Match.
2736func (c *ContactGroupsBatchGetCall) IfNoneMatch(entityTag string) *ContactGroupsBatchGetCall {
2737	c.ifNoneMatch_ = entityTag
2738	return c
2739}
2740
2741// Context sets the context to be used in this call's Do method. Any
2742// pending HTTP request will be aborted if the provided context is
2743// canceled.
2744func (c *ContactGroupsBatchGetCall) Context(ctx context.Context) *ContactGroupsBatchGetCall {
2745	c.ctx_ = ctx
2746	return c
2747}
2748
2749// Header returns an http.Header that can be modified by the caller to
2750// add HTTP headers to the request.
2751func (c *ContactGroupsBatchGetCall) Header() http.Header {
2752	if c.header_ == nil {
2753		c.header_ = make(http.Header)
2754	}
2755	return c.header_
2756}
2757
2758func (c *ContactGroupsBatchGetCall) doRequest(alt string) (*http.Response, error) {
2759	reqHeaders := make(http.Header)
2760	reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216")
2761	for k, v := range c.header_ {
2762		reqHeaders[k] = v
2763	}
2764	reqHeaders.Set("User-Agent", c.s.userAgent())
2765	if c.ifNoneMatch_ != "" {
2766		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
2767	}
2768	var body io.Reader = nil
2769	c.urlParams_.Set("alt", alt)
2770	c.urlParams_.Set("prettyPrint", "false")
2771	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/contactGroups:batchGet")
2772	urls += "?" + c.urlParams_.Encode()
2773	req, err := http.NewRequest("GET", urls, body)
2774	if err != nil {
2775		return nil, err
2776	}
2777	req.Header = reqHeaders
2778	return gensupport.SendRequest(c.ctx_, c.s.client, req)
2779}
2780
2781// Do executes the "people.contactGroups.batchGet" call.
2782// Exactly one of *BatchGetContactGroupsResponse or error will be
2783// non-nil. Any non-2xx status code is an error. Response headers are in
2784// either *BatchGetContactGroupsResponse.ServerResponse.Header or (if a
2785// response was returned at all) in error.(*googleapi.Error).Header. Use
2786// googleapi.IsNotModified to check whether the returned error was
2787// because http.StatusNotModified was returned.
2788func (c *ContactGroupsBatchGetCall) Do(opts ...googleapi.CallOption) (*BatchGetContactGroupsResponse, error) {
2789	gensupport.SetOptions(c.urlParams_, opts...)
2790	res, err := c.doRequest("json")
2791	if res != nil && res.StatusCode == http.StatusNotModified {
2792		if res.Body != nil {
2793			res.Body.Close()
2794		}
2795		return nil, &googleapi.Error{
2796			Code:   res.StatusCode,
2797			Header: res.Header,
2798		}
2799	}
2800	if err != nil {
2801		return nil, err
2802	}
2803	defer googleapi.CloseBody(res)
2804	if err := googleapi.CheckResponse(res); err != nil {
2805		return nil, err
2806	}
2807	ret := &BatchGetContactGroupsResponse{
2808		ServerResponse: googleapi.ServerResponse{
2809			Header:         res.Header,
2810			HTTPStatusCode: res.StatusCode,
2811		},
2812	}
2813	target := &ret
2814	if err := gensupport.DecodeResponse(target, res); err != nil {
2815		return nil, err
2816	}
2817	return ret, nil
2818	// {
2819	//   "description": "Get a list of contact groups owned by the authenticated user by specifying\na list of contact group resource names.",
2820	//   "flatPath": "v1/contactGroups:batchGet",
2821	//   "httpMethod": "GET",
2822	//   "id": "people.contactGroups.batchGet",
2823	//   "parameterOrder": [],
2824	//   "parameters": {
2825	//     "maxMembers": {
2826	//       "description": "Optional. Specifies the maximum number of members to return for each group. Defaults\nto 0 if not set, which will return zero members.",
2827	//       "format": "int32",
2828	//       "location": "query",
2829	//       "type": "integer"
2830	//     },
2831	//     "resourceNames": {
2832	//       "description": "Required. The resource names of the contact groups to get.",
2833	//       "location": "query",
2834	//       "repeated": true,
2835	//       "type": "string"
2836	//     }
2837	//   },
2838	//   "path": "v1/contactGroups:batchGet",
2839	//   "response": {
2840	//     "$ref": "BatchGetContactGroupsResponse"
2841	//   },
2842	//   "scopes": [
2843	//     "https://www.googleapis.com/auth/contacts",
2844	//     "https://www.googleapis.com/auth/contacts.readonly"
2845	//   ]
2846	// }
2847
2848}
2849
2850// method id "people.contactGroups.create":
2851
2852type ContactGroupsCreateCall struct {
2853	s                         *Service
2854	createcontactgrouprequest *CreateContactGroupRequest
2855	urlParams_                gensupport.URLParams
2856	ctx_                      context.Context
2857	header_                   http.Header
2858}
2859
2860// Create: Create a new contact group owned by the authenticated user.
2861func (r *ContactGroupsService) Create(createcontactgrouprequest *CreateContactGroupRequest) *ContactGroupsCreateCall {
2862	c := &ContactGroupsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
2863	c.createcontactgrouprequest = createcontactgrouprequest
2864	return c
2865}
2866
2867// Fields allows partial responses to be retrieved. See
2868// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
2869// for more information.
2870func (c *ContactGroupsCreateCall) Fields(s ...googleapi.Field) *ContactGroupsCreateCall {
2871	c.urlParams_.Set("fields", googleapi.CombineFields(s))
2872	return c
2873}
2874
2875// Context sets the context to be used in this call's Do method. Any
2876// pending HTTP request will be aborted if the provided context is
2877// canceled.
2878func (c *ContactGroupsCreateCall) Context(ctx context.Context) *ContactGroupsCreateCall {
2879	c.ctx_ = ctx
2880	return c
2881}
2882
2883// Header returns an http.Header that can be modified by the caller to
2884// add HTTP headers to the request.
2885func (c *ContactGroupsCreateCall) Header() http.Header {
2886	if c.header_ == nil {
2887		c.header_ = make(http.Header)
2888	}
2889	return c.header_
2890}
2891
2892func (c *ContactGroupsCreateCall) doRequest(alt string) (*http.Response, error) {
2893	reqHeaders := make(http.Header)
2894	reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216")
2895	for k, v := range c.header_ {
2896		reqHeaders[k] = v
2897	}
2898	reqHeaders.Set("User-Agent", c.s.userAgent())
2899	var body io.Reader = nil
2900	body, err := googleapi.WithoutDataWrapper.JSONReader(c.createcontactgrouprequest)
2901	if err != nil {
2902		return nil, err
2903	}
2904	reqHeaders.Set("Content-Type", "application/json")
2905	c.urlParams_.Set("alt", alt)
2906	c.urlParams_.Set("prettyPrint", "false")
2907	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/contactGroups")
2908	urls += "?" + c.urlParams_.Encode()
2909	req, err := http.NewRequest("POST", urls, body)
2910	if err != nil {
2911		return nil, err
2912	}
2913	req.Header = reqHeaders
2914	return gensupport.SendRequest(c.ctx_, c.s.client, req)
2915}
2916
2917// Do executes the "people.contactGroups.create" call.
2918// Exactly one of *ContactGroup or error will be non-nil. Any non-2xx
2919// status code is an error. Response headers are in either
2920// *ContactGroup.ServerResponse.Header or (if a response was returned at
2921// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
2922// to check whether the returned error was because
2923// http.StatusNotModified was returned.
2924func (c *ContactGroupsCreateCall) Do(opts ...googleapi.CallOption) (*ContactGroup, error) {
2925	gensupport.SetOptions(c.urlParams_, opts...)
2926	res, err := c.doRequest("json")
2927	if res != nil && res.StatusCode == http.StatusNotModified {
2928		if res.Body != nil {
2929			res.Body.Close()
2930		}
2931		return nil, &googleapi.Error{
2932			Code:   res.StatusCode,
2933			Header: res.Header,
2934		}
2935	}
2936	if err != nil {
2937		return nil, err
2938	}
2939	defer googleapi.CloseBody(res)
2940	if err := googleapi.CheckResponse(res); err != nil {
2941		return nil, err
2942	}
2943	ret := &ContactGroup{
2944		ServerResponse: googleapi.ServerResponse{
2945			Header:         res.Header,
2946			HTTPStatusCode: res.StatusCode,
2947		},
2948	}
2949	target := &ret
2950	if err := gensupport.DecodeResponse(target, res); err != nil {
2951		return nil, err
2952	}
2953	return ret, nil
2954	// {
2955	//   "description": "Create a new contact group owned by the authenticated user.",
2956	//   "flatPath": "v1/contactGroups",
2957	//   "httpMethod": "POST",
2958	//   "id": "people.contactGroups.create",
2959	//   "parameterOrder": [],
2960	//   "parameters": {},
2961	//   "path": "v1/contactGroups",
2962	//   "request": {
2963	//     "$ref": "CreateContactGroupRequest"
2964	//   },
2965	//   "response": {
2966	//     "$ref": "ContactGroup"
2967	//   },
2968	//   "scopes": [
2969	//     "https://www.googleapis.com/auth/contacts"
2970	//   ]
2971	// }
2972
2973}
2974
2975// method id "people.contactGroups.delete":
2976
2977type ContactGroupsDeleteCall struct {
2978	s            *Service
2979	resourceName string
2980	urlParams_   gensupport.URLParams
2981	ctx_         context.Context
2982	header_      http.Header
2983}
2984
2985// Delete: Delete an existing contact group owned by the authenticated
2986// user by
2987// specifying a contact group resource name.
2988func (r *ContactGroupsService) Delete(resourceName string) *ContactGroupsDeleteCall {
2989	c := &ContactGroupsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
2990	c.resourceName = resourceName
2991	return c
2992}
2993
2994// DeleteContacts sets the optional parameter "deleteContacts": Set to
2995// true to also delete the contacts in the specified group.
2996func (c *ContactGroupsDeleteCall) DeleteContacts(deleteContacts bool) *ContactGroupsDeleteCall {
2997	c.urlParams_.Set("deleteContacts", fmt.Sprint(deleteContacts))
2998	return c
2999}
3000
3001// Fields allows partial responses to be retrieved. See
3002// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
3003// for more information.
3004func (c *ContactGroupsDeleteCall) Fields(s ...googleapi.Field) *ContactGroupsDeleteCall {
3005	c.urlParams_.Set("fields", googleapi.CombineFields(s))
3006	return c
3007}
3008
3009// Context sets the context to be used in this call's Do method. Any
3010// pending HTTP request will be aborted if the provided context is
3011// canceled.
3012func (c *ContactGroupsDeleteCall) Context(ctx context.Context) *ContactGroupsDeleteCall {
3013	c.ctx_ = ctx
3014	return c
3015}
3016
3017// Header returns an http.Header that can be modified by the caller to
3018// add HTTP headers to the request.
3019func (c *ContactGroupsDeleteCall) Header() http.Header {
3020	if c.header_ == nil {
3021		c.header_ = make(http.Header)
3022	}
3023	return c.header_
3024}
3025
3026func (c *ContactGroupsDeleteCall) doRequest(alt string) (*http.Response, error) {
3027	reqHeaders := make(http.Header)
3028	reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216")
3029	for k, v := range c.header_ {
3030		reqHeaders[k] = v
3031	}
3032	reqHeaders.Set("User-Agent", c.s.userAgent())
3033	var body io.Reader = nil
3034	c.urlParams_.Set("alt", alt)
3035	c.urlParams_.Set("prettyPrint", "false")
3036	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+resourceName}")
3037	urls += "?" + c.urlParams_.Encode()
3038	req, err := http.NewRequest("DELETE", urls, body)
3039	if err != nil {
3040		return nil, err
3041	}
3042	req.Header = reqHeaders
3043	googleapi.Expand(req.URL, map[string]string{
3044		"resourceName": c.resourceName,
3045	})
3046	return gensupport.SendRequest(c.ctx_, c.s.client, req)
3047}
3048
3049// Do executes the "people.contactGroups.delete" call.
3050// Exactly one of *Empty or error will be non-nil. Any non-2xx status
3051// code is an error. Response headers are in either
3052// *Empty.ServerResponse.Header or (if a response was returned at all)
3053// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
3054// check whether the returned error was because http.StatusNotModified
3055// was returned.
3056func (c *ContactGroupsDeleteCall) Do(opts ...googleapi.CallOption) (*Empty, error) {
3057	gensupport.SetOptions(c.urlParams_, opts...)
3058	res, err := c.doRequest("json")
3059	if res != nil && res.StatusCode == http.StatusNotModified {
3060		if res.Body != nil {
3061			res.Body.Close()
3062		}
3063		return nil, &googleapi.Error{
3064			Code:   res.StatusCode,
3065			Header: res.Header,
3066		}
3067	}
3068	if err != nil {
3069		return nil, err
3070	}
3071	defer googleapi.CloseBody(res)
3072	if err := googleapi.CheckResponse(res); err != nil {
3073		return nil, err
3074	}
3075	ret := &Empty{
3076		ServerResponse: googleapi.ServerResponse{
3077			Header:         res.Header,
3078			HTTPStatusCode: res.StatusCode,
3079		},
3080	}
3081	target := &ret
3082	if err := gensupport.DecodeResponse(target, res); err != nil {
3083		return nil, err
3084	}
3085	return ret, nil
3086	// {
3087	//   "description": "Delete an existing contact group owned by the authenticated user by\nspecifying a contact group resource name.",
3088	//   "flatPath": "v1/contactGroups/{contactGroupsId}",
3089	//   "httpMethod": "DELETE",
3090	//   "id": "people.contactGroups.delete",
3091	//   "parameterOrder": [
3092	//     "resourceName"
3093	//   ],
3094	//   "parameters": {
3095	//     "deleteContacts": {
3096	//       "description": "Optional. Set to true to also delete the contacts in the specified group.",
3097	//       "location": "query",
3098	//       "type": "boolean"
3099	//     },
3100	//     "resourceName": {
3101	//       "description": "Required. The resource name of the contact group to delete.",
3102	//       "location": "path",
3103	//       "pattern": "^contactGroups/[^/]+$",
3104	//       "required": true,
3105	//       "type": "string"
3106	//     }
3107	//   },
3108	//   "path": "v1/{+resourceName}",
3109	//   "response": {
3110	//     "$ref": "Empty"
3111	//   },
3112	//   "scopes": [
3113	//     "https://www.googleapis.com/auth/contacts"
3114	//   ]
3115	// }
3116
3117}
3118
3119// method id "people.contactGroups.get":
3120
3121type ContactGroupsGetCall struct {
3122	s            *Service
3123	resourceName string
3124	urlParams_   gensupport.URLParams
3125	ifNoneMatch_ string
3126	ctx_         context.Context
3127	header_      http.Header
3128}
3129
3130// Get: Get a specific contact group owned by the authenticated user by
3131// specifying
3132// a contact group resource name.
3133func (r *ContactGroupsService) Get(resourceName string) *ContactGroupsGetCall {
3134	c := &ContactGroupsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
3135	c.resourceName = resourceName
3136	return c
3137}
3138
3139// MaxMembers sets the optional parameter "maxMembers": Specifies the
3140// maximum number of members to return. Defaults to 0 if not
3141// set, which will return zero members.
3142func (c *ContactGroupsGetCall) MaxMembers(maxMembers int64) *ContactGroupsGetCall {
3143	c.urlParams_.Set("maxMembers", fmt.Sprint(maxMembers))
3144	return c
3145}
3146
3147// Fields allows partial responses to be retrieved. See
3148// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
3149// for more information.
3150func (c *ContactGroupsGetCall) Fields(s ...googleapi.Field) *ContactGroupsGetCall {
3151	c.urlParams_.Set("fields", googleapi.CombineFields(s))
3152	return c
3153}
3154
3155// IfNoneMatch sets the optional parameter which makes the operation
3156// fail if the object's ETag matches the given value. This is useful for
3157// getting updates only after the object has changed since the last
3158// request. Use googleapi.IsNotModified to check whether the response
3159// error from Do is the result of In-None-Match.
3160func (c *ContactGroupsGetCall) IfNoneMatch(entityTag string) *ContactGroupsGetCall {
3161	c.ifNoneMatch_ = entityTag
3162	return c
3163}
3164
3165// Context sets the context to be used in this call's Do method. Any
3166// pending HTTP request will be aborted if the provided context is
3167// canceled.
3168func (c *ContactGroupsGetCall) Context(ctx context.Context) *ContactGroupsGetCall {
3169	c.ctx_ = ctx
3170	return c
3171}
3172
3173// Header returns an http.Header that can be modified by the caller to
3174// add HTTP headers to the request.
3175func (c *ContactGroupsGetCall) Header() http.Header {
3176	if c.header_ == nil {
3177		c.header_ = make(http.Header)
3178	}
3179	return c.header_
3180}
3181
3182func (c *ContactGroupsGetCall) doRequest(alt string) (*http.Response, error) {
3183	reqHeaders := make(http.Header)
3184	reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216")
3185	for k, v := range c.header_ {
3186		reqHeaders[k] = v
3187	}
3188	reqHeaders.Set("User-Agent", c.s.userAgent())
3189	if c.ifNoneMatch_ != "" {
3190		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
3191	}
3192	var body io.Reader = nil
3193	c.urlParams_.Set("alt", alt)
3194	c.urlParams_.Set("prettyPrint", "false")
3195	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+resourceName}")
3196	urls += "?" + c.urlParams_.Encode()
3197	req, err := http.NewRequest("GET", urls, body)
3198	if err != nil {
3199		return nil, err
3200	}
3201	req.Header = reqHeaders
3202	googleapi.Expand(req.URL, map[string]string{
3203		"resourceName": c.resourceName,
3204	})
3205	return gensupport.SendRequest(c.ctx_, c.s.client, req)
3206}
3207
3208// Do executes the "people.contactGroups.get" call.
3209// Exactly one of *ContactGroup or error will be non-nil. Any non-2xx
3210// status code is an error. Response headers are in either
3211// *ContactGroup.ServerResponse.Header or (if a response was returned at
3212// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
3213// to check whether the returned error was because
3214// http.StatusNotModified was returned.
3215func (c *ContactGroupsGetCall) Do(opts ...googleapi.CallOption) (*ContactGroup, error) {
3216	gensupport.SetOptions(c.urlParams_, opts...)
3217	res, err := c.doRequest("json")
3218	if res != nil && res.StatusCode == http.StatusNotModified {
3219		if res.Body != nil {
3220			res.Body.Close()
3221		}
3222		return nil, &googleapi.Error{
3223			Code:   res.StatusCode,
3224			Header: res.Header,
3225		}
3226	}
3227	if err != nil {
3228		return nil, err
3229	}
3230	defer googleapi.CloseBody(res)
3231	if err := googleapi.CheckResponse(res); err != nil {
3232		return nil, err
3233	}
3234	ret := &ContactGroup{
3235		ServerResponse: googleapi.ServerResponse{
3236			Header:         res.Header,
3237			HTTPStatusCode: res.StatusCode,
3238		},
3239	}
3240	target := &ret
3241	if err := gensupport.DecodeResponse(target, res); err != nil {
3242		return nil, err
3243	}
3244	return ret, nil
3245	// {
3246	//   "description": "Get a specific contact group owned by the authenticated user by specifying\na contact group resource name.",
3247	//   "flatPath": "v1/contactGroups/{contactGroupsId}",
3248	//   "httpMethod": "GET",
3249	//   "id": "people.contactGroups.get",
3250	//   "parameterOrder": [
3251	//     "resourceName"
3252	//   ],
3253	//   "parameters": {
3254	//     "maxMembers": {
3255	//       "description": "Optional. Specifies the maximum number of members to return. Defaults to 0 if not\nset, which will return zero members.",
3256	//       "format": "int32",
3257	//       "location": "query",
3258	//       "type": "integer"
3259	//     },
3260	//     "resourceName": {
3261	//       "description": "Required. The resource name of the contact group to get.",
3262	//       "location": "path",
3263	//       "pattern": "^contactGroups/[^/]+$",
3264	//       "required": true,
3265	//       "type": "string"
3266	//     }
3267	//   },
3268	//   "path": "v1/{+resourceName}",
3269	//   "response": {
3270	//     "$ref": "ContactGroup"
3271	//   },
3272	//   "scopes": [
3273	//     "https://www.googleapis.com/auth/contacts",
3274	//     "https://www.googleapis.com/auth/contacts.readonly"
3275	//   ]
3276	// }
3277
3278}
3279
3280// method id "people.contactGroups.list":
3281
3282type ContactGroupsListCall struct {
3283	s            *Service
3284	urlParams_   gensupport.URLParams
3285	ifNoneMatch_ string
3286	ctx_         context.Context
3287	header_      http.Header
3288}
3289
3290// List: List all contact groups owned by the authenticated user.
3291// Members of the
3292// contact groups are not populated.
3293func (r *ContactGroupsService) List() *ContactGroupsListCall {
3294	c := &ContactGroupsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
3295	return c
3296}
3297
3298// PageSize sets the optional parameter "pageSize": The maximum number
3299// of resources to return. Valid values are between 1 and
3300// 1000, inclusive. Defaults to 30 if not set or set to 0.
3301func (c *ContactGroupsListCall) PageSize(pageSize int64) *ContactGroupsListCall {
3302	c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
3303	return c
3304}
3305
3306// PageToken sets the optional parameter "pageToken": The
3307// next_page_token value returned from a previous call
3308// to
3309// [ListContactGroups](/people/api/rest/v1/contactgroups/list).
3310// Reques
3311// ts the next page of resources.
3312func (c *ContactGroupsListCall) PageToken(pageToken string) *ContactGroupsListCall {
3313	c.urlParams_.Set("pageToken", pageToken)
3314	return c
3315}
3316
3317// SyncToken sets the optional parameter "syncToken": A sync token,
3318// returned by a previous call to `contactgroups.list`.
3319// Only resources changed since the sync token was created will be
3320// returned.
3321func (c *ContactGroupsListCall) SyncToken(syncToken string) *ContactGroupsListCall {
3322	c.urlParams_.Set("syncToken", syncToken)
3323	return c
3324}
3325
3326// Fields allows partial responses to be retrieved. See
3327// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
3328// for more information.
3329func (c *ContactGroupsListCall) Fields(s ...googleapi.Field) *ContactGroupsListCall {
3330	c.urlParams_.Set("fields", googleapi.CombineFields(s))
3331	return c
3332}
3333
3334// IfNoneMatch sets the optional parameter which makes the operation
3335// fail if the object's ETag matches the given value. This is useful for
3336// getting updates only after the object has changed since the last
3337// request. Use googleapi.IsNotModified to check whether the response
3338// error from Do is the result of In-None-Match.
3339func (c *ContactGroupsListCall) IfNoneMatch(entityTag string) *ContactGroupsListCall {
3340	c.ifNoneMatch_ = entityTag
3341	return c
3342}
3343
3344// Context sets the context to be used in this call's Do method. Any
3345// pending HTTP request will be aborted if the provided context is
3346// canceled.
3347func (c *ContactGroupsListCall) Context(ctx context.Context) *ContactGroupsListCall {
3348	c.ctx_ = ctx
3349	return c
3350}
3351
3352// Header returns an http.Header that can be modified by the caller to
3353// add HTTP headers to the request.
3354func (c *ContactGroupsListCall) Header() http.Header {
3355	if c.header_ == nil {
3356		c.header_ = make(http.Header)
3357	}
3358	return c.header_
3359}
3360
3361func (c *ContactGroupsListCall) doRequest(alt string) (*http.Response, error) {
3362	reqHeaders := make(http.Header)
3363	reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216")
3364	for k, v := range c.header_ {
3365		reqHeaders[k] = v
3366	}
3367	reqHeaders.Set("User-Agent", c.s.userAgent())
3368	if c.ifNoneMatch_ != "" {
3369		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
3370	}
3371	var body io.Reader = nil
3372	c.urlParams_.Set("alt", alt)
3373	c.urlParams_.Set("prettyPrint", "false")
3374	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/contactGroups")
3375	urls += "?" + c.urlParams_.Encode()
3376	req, err := http.NewRequest("GET", urls, body)
3377	if err != nil {
3378		return nil, err
3379	}
3380	req.Header = reqHeaders
3381	return gensupport.SendRequest(c.ctx_, c.s.client, req)
3382}
3383
3384// Do executes the "people.contactGroups.list" call.
3385// Exactly one of *ListContactGroupsResponse or error will be non-nil.
3386// Any non-2xx status code is an error. Response headers are in either
3387// *ListContactGroupsResponse.ServerResponse.Header or (if a response
3388// was returned at all) in error.(*googleapi.Error).Header. Use
3389// googleapi.IsNotModified to check whether the returned error was
3390// because http.StatusNotModified was returned.
3391func (c *ContactGroupsListCall) Do(opts ...googleapi.CallOption) (*ListContactGroupsResponse, error) {
3392	gensupport.SetOptions(c.urlParams_, opts...)
3393	res, err := c.doRequest("json")
3394	if res != nil && res.StatusCode == http.StatusNotModified {
3395		if res.Body != nil {
3396			res.Body.Close()
3397		}
3398		return nil, &googleapi.Error{
3399			Code:   res.StatusCode,
3400			Header: res.Header,
3401		}
3402	}
3403	if err != nil {
3404		return nil, err
3405	}
3406	defer googleapi.CloseBody(res)
3407	if err := googleapi.CheckResponse(res); err != nil {
3408		return nil, err
3409	}
3410	ret := &ListContactGroupsResponse{
3411		ServerResponse: googleapi.ServerResponse{
3412			Header:         res.Header,
3413			HTTPStatusCode: res.StatusCode,
3414		},
3415	}
3416	target := &ret
3417	if err := gensupport.DecodeResponse(target, res); err != nil {
3418		return nil, err
3419	}
3420	return ret, nil
3421	// {
3422	//   "description": "List all contact groups owned by the authenticated user. Members of the\ncontact groups are not populated.",
3423	//   "flatPath": "v1/contactGroups",
3424	//   "httpMethod": "GET",
3425	//   "id": "people.contactGroups.list",
3426	//   "parameterOrder": [],
3427	//   "parameters": {
3428	//     "pageSize": {
3429	//       "description": "Optional. The maximum number of resources to return. Valid values are between 1 and\n1000, inclusive. Defaults to 30 if not set or set to 0.",
3430	//       "format": "int32",
3431	//       "location": "query",
3432	//       "type": "integer"
3433	//     },
3434	//     "pageToken": {
3435	//       "description": "The next_page_token value returned from a previous call to\n[ListContactGroups](/people/api/rest/v1/contactgroups/list).\nRequests the next page of resources.",
3436	//       "location": "query",
3437	//       "type": "string"
3438	//     },
3439	//     "syncToken": {
3440	//       "description": "A sync token, returned by a previous call to `contactgroups.list`.\nOnly resources changed since the sync token was created will be returned.",
3441	//       "location": "query",
3442	//       "type": "string"
3443	//     }
3444	//   },
3445	//   "path": "v1/contactGroups",
3446	//   "response": {
3447	//     "$ref": "ListContactGroupsResponse"
3448	//   },
3449	//   "scopes": [
3450	//     "https://www.googleapis.com/auth/contacts",
3451	//     "https://www.googleapis.com/auth/contacts.readonly"
3452	//   ]
3453	// }
3454
3455}
3456
3457// Pages invokes f for each page of results.
3458// A non-nil error returned from f will halt the iteration.
3459// The provided context supersedes any context provided to the Context method.
3460func (c *ContactGroupsListCall) Pages(ctx context.Context, f func(*ListContactGroupsResponse) error) error {
3461	c.ctx_ = ctx
3462	defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
3463	for {
3464		x, err := c.Do()
3465		if err != nil {
3466			return err
3467		}
3468		if err := f(x); err != nil {
3469			return err
3470		}
3471		if x.NextPageToken == "" {
3472			return nil
3473		}
3474		c.PageToken(x.NextPageToken)
3475	}
3476}
3477
3478// method id "people.contactGroups.update":
3479
3480type ContactGroupsUpdateCall struct {
3481	s                         *Service
3482	resourceName              string
3483	updatecontactgrouprequest *UpdateContactGroupRequest
3484	urlParams_                gensupport.URLParams
3485	ctx_                      context.Context
3486	header_                   http.Header
3487}
3488
3489// Update: Update the name of an existing contact group owned by the
3490// authenticated
3491// user.
3492func (r *ContactGroupsService) Update(resourceName string, updatecontactgrouprequest *UpdateContactGroupRequest) *ContactGroupsUpdateCall {
3493	c := &ContactGroupsUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
3494	c.resourceName = resourceName
3495	c.updatecontactgrouprequest = updatecontactgrouprequest
3496	return c
3497}
3498
3499// Fields allows partial responses to be retrieved. See
3500// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
3501// for more information.
3502func (c *ContactGroupsUpdateCall) Fields(s ...googleapi.Field) *ContactGroupsUpdateCall {
3503	c.urlParams_.Set("fields", googleapi.CombineFields(s))
3504	return c
3505}
3506
3507// Context sets the context to be used in this call's Do method. Any
3508// pending HTTP request will be aborted if the provided context is
3509// canceled.
3510func (c *ContactGroupsUpdateCall) Context(ctx context.Context) *ContactGroupsUpdateCall {
3511	c.ctx_ = ctx
3512	return c
3513}
3514
3515// Header returns an http.Header that can be modified by the caller to
3516// add HTTP headers to the request.
3517func (c *ContactGroupsUpdateCall) Header() http.Header {
3518	if c.header_ == nil {
3519		c.header_ = make(http.Header)
3520	}
3521	return c.header_
3522}
3523
3524func (c *ContactGroupsUpdateCall) doRequest(alt string) (*http.Response, error) {
3525	reqHeaders := make(http.Header)
3526	reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216")
3527	for k, v := range c.header_ {
3528		reqHeaders[k] = v
3529	}
3530	reqHeaders.Set("User-Agent", c.s.userAgent())
3531	var body io.Reader = nil
3532	body, err := googleapi.WithoutDataWrapper.JSONReader(c.updatecontactgrouprequest)
3533	if err != nil {
3534		return nil, err
3535	}
3536	reqHeaders.Set("Content-Type", "application/json")
3537	c.urlParams_.Set("alt", alt)
3538	c.urlParams_.Set("prettyPrint", "false")
3539	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+resourceName}")
3540	urls += "?" + c.urlParams_.Encode()
3541	req, err := http.NewRequest("PUT", urls, body)
3542	if err != nil {
3543		return nil, err
3544	}
3545	req.Header = reqHeaders
3546	googleapi.Expand(req.URL, map[string]string{
3547		"resourceName": c.resourceName,
3548	})
3549	return gensupport.SendRequest(c.ctx_, c.s.client, req)
3550}
3551
3552// Do executes the "people.contactGroups.update" call.
3553// Exactly one of *ContactGroup or error will be non-nil. Any non-2xx
3554// status code is an error. Response headers are in either
3555// *ContactGroup.ServerResponse.Header or (if a response was returned at
3556// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
3557// to check whether the returned error was because
3558// http.StatusNotModified was returned.
3559func (c *ContactGroupsUpdateCall) Do(opts ...googleapi.CallOption) (*ContactGroup, error) {
3560	gensupport.SetOptions(c.urlParams_, opts...)
3561	res, err := c.doRequest("json")
3562	if res != nil && res.StatusCode == http.StatusNotModified {
3563		if res.Body != nil {
3564			res.Body.Close()
3565		}
3566		return nil, &googleapi.Error{
3567			Code:   res.StatusCode,
3568			Header: res.Header,
3569		}
3570	}
3571	if err != nil {
3572		return nil, err
3573	}
3574	defer googleapi.CloseBody(res)
3575	if err := googleapi.CheckResponse(res); err != nil {
3576		return nil, err
3577	}
3578	ret := &ContactGroup{
3579		ServerResponse: googleapi.ServerResponse{
3580			Header:         res.Header,
3581			HTTPStatusCode: res.StatusCode,
3582		},
3583	}
3584	target := &ret
3585	if err := gensupport.DecodeResponse(target, res); err != nil {
3586		return nil, err
3587	}
3588	return ret, nil
3589	// {
3590	//   "description": "Update the name of an existing contact group owned by the authenticated\nuser.",
3591	//   "flatPath": "v1/contactGroups/{contactGroupsId}",
3592	//   "httpMethod": "PUT",
3593	//   "id": "people.contactGroups.update",
3594	//   "parameterOrder": [
3595	//     "resourceName"
3596	//   ],
3597	//   "parameters": {
3598	//     "resourceName": {
3599	//       "description": "The resource name for the contact group, assigned by the server. An ASCII\nstring, in the form of `contactGroups/`\u003cvar\u003econtact_group_id\u003c/var\u003e.",
3600	//       "location": "path",
3601	//       "pattern": "^contactGroups/[^/]+$",
3602	//       "required": true,
3603	//       "type": "string"
3604	//     }
3605	//   },
3606	//   "path": "v1/{+resourceName}",
3607	//   "request": {
3608	//     "$ref": "UpdateContactGroupRequest"
3609	//   },
3610	//   "response": {
3611	//     "$ref": "ContactGroup"
3612	//   },
3613	//   "scopes": [
3614	//     "https://www.googleapis.com/auth/contacts"
3615	//   ]
3616	// }
3617
3618}
3619
3620// method id "people.contactGroups.members.modify":
3621
3622type ContactGroupsMembersModifyCall struct {
3623	s                                *Service
3624	resourceName                     string
3625	modifycontactgroupmembersrequest *ModifyContactGroupMembersRequest
3626	urlParams_                       gensupport.URLParams
3627	ctx_                             context.Context
3628	header_                          http.Header
3629}
3630
3631// Modify: Modify the members of a contact group owned by the
3632// authenticated user.
3633// <br>
3634// The only system contact groups that can have members added
3635// are
3636// `contactGroups/myContacts` and `contactGroups/starred`. Other
3637// system
3638// contact groups are deprecated and can only have contacts removed.
3639func (r *ContactGroupsMembersService) Modify(resourceName string, modifycontactgroupmembersrequest *ModifyContactGroupMembersRequest) *ContactGroupsMembersModifyCall {
3640	c := &ContactGroupsMembersModifyCall{s: r.s, urlParams_: make(gensupport.URLParams)}
3641	c.resourceName = resourceName
3642	c.modifycontactgroupmembersrequest = modifycontactgroupmembersrequest
3643	return c
3644}
3645
3646// Fields allows partial responses to be retrieved. See
3647// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
3648// for more information.
3649func (c *ContactGroupsMembersModifyCall) Fields(s ...googleapi.Field) *ContactGroupsMembersModifyCall {
3650	c.urlParams_.Set("fields", googleapi.CombineFields(s))
3651	return c
3652}
3653
3654// Context sets the context to be used in this call's Do method. Any
3655// pending HTTP request will be aborted if the provided context is
3656// canceled.
3657func (c *ContactGroupsMembersModifyCall) Context(ctx context.Context) *ContactGroupsMembersModifyCall {
3658	c.ctx_ = ctx
3659	return c
3660}
3661
3662// Header returns an http.Header that can be modified by the caller to
3663// add HTTP headers to the request.
3664func (c *ContactGroupsMembersModifyCall) Header() http.Header {
3665	if c.header_ == nil {
3666		c.header_ = make(http.Header)
3667	}
3668	return c.header_
3669}
3670
3671func (c *ContactGroupsMembersModifyCall) doRequest(alt string) (*http.Response, error) {
3672	reqHeaders := make(http.Header)
3673	reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216")
3674	for k, v := range c.header_ {
3675		reqHeaders[k] = v
3676	}
3677	reqHeaders.Set("User-Agent", c.s.userAgent())
3678	var body io.Reader = nil
3679	body, err := googleapi.WithoutDataWrapper.JSONReader(c.modifycontactgroupmembersrequest)
3680	if err != nil {
3681		return nil, err
3682	}
3683	reqHeaders.Set("Content-Type", "application/json")
3684	c.urlParams_.Set("alt", alt)
3685	c.urlParams_.Set("prettyPrint", "false")
3686	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+resourceName}/members:modify")
3687	urls += "?" + c.urlParams_.Encode()
3688	req, err := http.NewRequest("POST", urls, body)
3689	if err != nil {
3690		return nil, err
3691	}
3692	req.Header = reqHeaders
3693	googleapi.Expand(req.URL, map[string]string{
3694		"resourceName": c.resourceName,
3695	})
3696	return gensupport.SendRequest(c.ctx_, c.s.client, req)
3697}
3698
3699// Do executes the "people.contactGroups.members.modify" call.
3700// Exactly one of *ModifyContactGroupMembersResponse or error will be
3701// non-nil. Any non-2xx status code is an error. Response headers are in
3702// either *ModifyContactGroupMembersResponse.ServerResponse.Header or
3703// (if a response was returned at all) in
3704// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
3705// whether the returned error was because http.StatusNotModified was
3706// returned.
3707func (c *ContactGroupsMembersModifyCall) Do(opts ...googleapi.CallOption) (*ModifyContactGroupMembersResponse, error) {
3708	gensupport.SetOptions(c.urlParams_, opts...)
3709	res, err := c.doRequest("json")
3710	if res != nil && res.StatusCode == http.StatusNotModified {
3711		if res.Body != nil {
3712			res.Body.Close()
3713		}
3714		return nil, &googleapi.Error{
3715			Code:   res.StatusCode,
3716			Header: res.Header,
3717		}
3718	}
3719	if err != nil {
3720		return nil, err
3721	}
3722	defer googleapi.CloseBody(res)
3723	if err := googleapi.CheckResponse(res); err != nil {
3724		return nil, err
3725	}
3726	ret := &ModifyContactGroupMembersResponse{
3727		ServerResponse: googleapi.ServerResponse{
3728			Header:         res.Header,
3729			HTTPStatusCode: res.StatusCode,
3730		},
3731	}
3732	target := &ret
3733	if err := gensupport.DecodeResponse(target, res); err != nil {
3734		return nil, err
3735	}
3736	return ret, nil
3737	// {
3738	//   "description": "Modify the members of a contact group owned by the authenticated user.\n\u003cbr\u003e\nThe only system contact groups that can have members added are\n`contactGroups/myContacts` and `contactGroups/starred`. Other system\ncontact groups are deprecated and can only have contacts removed.",
3739	//   "flatPath": "v1/contactGroups/{contactGroupsId}/members:modify",
3740	//   "httpMethod": "POST",
3741	//   "id": "people.contactGroups.members.modify",
3742	//   "parameterOrder": [
3743	//     "resourceName"
3744	//   ],
3745	//   "parameters": {
3746	//     "resourceName": {
3747	//       "description": "Required. The resource name of the contact group to modify.",
3748	//       "location": "path",
3749	//       "pattern": "^contactGroups/[^/]+$",
3750	//       "required": true,
3751	//       "type": "string"
3752	//     }
3753	//   },
3754	//   "path": "v1/{+resourceName}/members:modify",
3755	//   "request": {
3756	//     "$ref": "ModifyContactGroupMembersRequest"
3757	//   },
3758	//   "response": {
3759	//     "$ref": "ModifyContactGroupMembersResponse"
3760	//   },
3761	//   "scopes": [
3762	//     "https://www.googleapis.com/auth/contacts"
3763	//   ]
3764	// }
3765
3766}
3767
3768// method id "people.people.createContact":
3769
3770type PeopleCreateContactCall struct {
3771	s          *Service
3772	person     *Person
3773	urlParams_ gensupport.URLParams
3774	ctx_       context.Context
3775	header_    http.Header
3776}
3777
3778// CreateContact: Create a new contact and return the person resource
3779// for that contact.
3780func (r *PeopleService) CreateContact(person *Person) *PeopleCreateContactCall {
3781	c := &PeopleCreateContactCall{s: r.s, urlParams_: make(gensupport.URLParams)}
3782	c.person = person
3783	return c
3784}
3785
3786// Fields allows partial responses to be retrieved. See
3787// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
3788// for more information.
3789func (c *PeopleCreateContactCall) Fields(s ...googleapi.Field) *PeopleCreateContactCall {
3790	c.urlParams_.Set("fields", googleapi.CombineFields(s))
3791	return c
3792}
3793
3794// Context sets the context to be used in this call's Do method. Any
3795// pending HTTP request will be aborted if the provided context is
3796// canceled.
3797func (c *PeopleCreateContactCall) Context(ctx context.Context) *PeopleCreateContactCall {
3798	c.ctx_ = ctx
3799	return c
3800}
3801
3802// Header returns an http.Header that can be modified by the caller to
3803// add HTTP headers to the request.
3804func (c *PeopleCreateContactCall) Header() http.Header {
3805	if c.header_ == nil {
3806		c.header_ = make(http.Header)
3807	}
3808	return c.header_
3809}
3810
3811func (c *PeopleCreateContactCall) doRequest(alt string) (*http.Response, error) {
3812	reqHeaders := make(http.Header)
3813	reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216")
3814	for k, v := range c.header_ {
3815		reqHeaders[k] = v
3816	}
3817	reqHeaders.Set("User-Agent", c.s.userAgent())
3818	var body io.Reader = nil
3819	body, err := googleapi.WithoutDataWrapper.JSONReader(c.person)
3820	if err != nil {
3821		return nil, err
3822	}
3823	reqHeaders.Set("Content-Type", "application/json")
3824	c.urlParams_.Set("alt", alt)
3825	c.urlParams_.Set("prettyPrint", "false")
3826	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/people:createContact")
3827	urls += "?" + c.urlParams_.Encode()
3828	req, err := http.NewRequest("POST", urls, body)
3829	if err != nil {
3830		return nil, err
3831	}
3832	req.Header = reqHeaders
3833	return gensupport.SendRequest(c.ctx_, c.s.client, req)
3834}
3835
3836// Do executes the "people.people.createContact" call.
3837// Exactly one of *Person or error will be non-nil. Any non-2xx status
3838// code is an error. Response headers are in either
3839// *Person.ServerResponse.Header or (if a response was returned at all)
3840// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
3841// check whether the returned error was because http.StatusNotModified
3842// was returned.
3843func (c *PeopleCreateContactCall) Do(opts ...googleapi.CallOption) (*Person, error) {
3844	gensupport.SetOptions(c.urlParams_, opts...)
3845	res, err := c.doRequest("json")
3846	if res != nil && res.StatusCode == http.StatusNotModified {
3847		if res.Body != nil {
3848			res.Body.Close()
3849		}
3850		return nil, &googleapi.Error{
3851			Code:   res.StatusCode,
3852			Header: res.Header,
3853		}
3854	}
3855	if err != nil {
3856		return nil, err
3857	}
3858	defer googleapi.CloseBody(res)
3859	if err := googleapi.CheckResponse(res); err != nil {
3860		return nil, err
3861	}
3862	ret := &Person{
3863		ServerResponse: googleapi.ServerResponse{
3864			Header:         res.Header,
3865			HTTPStatusCode: res.StatusCode,
3866		},
3867	}
3868	target := &ret
3869	if err := gensupport.DecodeResponse(target, res); err != nil {
3870		return nil, err
3871	}
3872	return ret, nil
3873	// {
3874	//   "description": "Create a new contact and return the person resource for that contact.",
3875	//   "flatPath": "v1/people:createContact",
3876	//   "httpMethod": "POST",
3877	//   "id": "people.people.createContact",
3878	//   "parameterOrder": [],
3879	//   "parameters": {},
3880	//   "path": "v1/people:createContact",
3881	//   "request": {
3882	//     "$ref": "Person"
3883	//   },
3884	//   "response": {
3885	//     "$ref": "Person"
3886	//   },
3887	//   "scopes": [
3888	//     "https://www.googleapis.com/auth/contacts"
3889	//   ]
3890	// }
3891
3892}
3893
3894// method id "people.people.deleteContact":
3895
3896type PeopleDeleteContactCall struct {
3897	s            *Service
3898	resourceName string
3899	urlParams_   gensupport.URLParams
3900	ctx_         context.Context
3901	header_      http.Header
3902}
3903
3904// DeleteContact: Delete a contact person. Any non-contact data will not
3905// be deleted.
3906func (r *PeopleService) DeleteContact(resourceName string) *PeopleDeleteContactCall {
3907	c := &PeopleDeleteContactCall{s: r.s, urlParams_: make(gensupport.URLParams)}
3908	c.resourceName = resourceName
3909	return c
3910}
3911
3912// Fields allows partial responses to be retrieved. See
3913// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
3914// for more information.
3915func (c *PeopleDeleteContactCall) Fields(s ...googleapi.Field) *PeopleDeleteContactCall {
3916	c.urlParams_.Set("fields", googleapi.CombineFields(s))
3917	return c
3918}
3919
3920// Context sets the context to be used in this call's Do method. Any
3921// pending HTTP request will be aborted if the provided context is
3922// canceled.
3923func (c *PeopleDeleteContactCall) Context(ctx context.Context) *PeopleDeleteContactCall {
3924	c.ctx_ = ctx
3925	return c
3926}
3927
3928// Header returns an http.Header that can be modified by the caller to
3929// add HTTP headers to the request.
3930func (c *PeopleDeleteContactCall) Header() http.Header {
3931	if c.header_ == nil {
3932		c.header_ = make(http.Header)
3933	}
3934	return c.header_
3935}
3936
3937func (c *PeopleDeleteContactCall) doRequest(alt string) (*http.Response, error) {
3938	reqHeaders := make(http.Header)
3939	reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216")
3940	for k, v := range c.header_ {
3941		reqHeaders[k] = v
3942	}
3943	reqHeaders.Set("User-Agent", c.s.userAgent())
3944	var body io.Reader = nil
3945	c.urlParams_.Set("alt", alt)
3946	c.urlParams_.Set("prettyPrint", "false")
3947	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+resourceName}:deleteContact")
3948	urls += "?" + c.urlParams_.Encode()
3949	req, err := http.NewRequest("DELETE", urls, body)
3950	if err != nil {
3951		return nil, err
3952	}
3953	req.Header = reqHeaders
3954	googleapi.Expand(req.URL, map[string]string{
3955		"resourceName": c.resourceName,
3956	})
3957	return gensupport.SendRequest(c.ctx_, c.s.client, req)
3958}
3959
3960// Do executes the "people.people.deleteContact" call.
3961// Exactly one of *Empty or error will be non-nil. Any non-2xx status
3962// code is an error. Response headers are in either
3963// *Empty.ServerResponse.Header or (if a response was returned at all)
3964// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
3965// check whether the returned error was because http.StatusNotModified
3966// was returned.
3967func (c *PeopleDeleteContactCall) Do(opts ...googleapi.CallOption) (*Empty, error) {
3968	gensupport.SetOptions(c.urlParams_, opts...)
3969	res, err := c.doRequest("json")
3970	if res != nil && res.StatusCode == http.StatusNotModified {
3971		if res.Body != nil {
3972			res.Body.Close()
3973		}
3974		return nil, &googleapi.Error{
3975			Code:   res.StatusCode,
3976			Header: res.Header,
3977		}
3978	}
3979	if err != nil {
3980		return nil, err
3981	}
3982	defer googleapi.CloseBody(res)
3983	if err := googleapi.CheckResponse(res); err != nil {
3984		return nil, err
3985	}
3986	ret := &Empty{
3987		ServerResponse: googleapi.ServerResponse{
3988			Header:         res.Header,
3989			HTTPStatusCode: res.StatusCode,
3990		},
3991	}
3992	target := &ret
3993	if err := gensupport.DecodeResponse(target, res); err != nil {
3994		return nil, err
3995	}
3996	return ret, nil
3997	// {
3998	//   "description": "Delete a contact person. Any non-contact data will not be deleted.",
3999	//   "flatPath": "v1/people/{peopleId}:deleteContact",
4000	//   "httpMethod": "DELETE",
4001	//   "id": "people.people.deleteContact",
4002	//   "parameterOrder": [
4003	//     "resourceName"
4004	//   ],
4005	//   "parameters": {
4006	//     "resourceName": {
4007	//       "description": "Required. The resource name of the contact to delete.",
4008	//       "location": "path",
4009	//       "pattern": "^people/[^/]+$",
4010	//       "required": true,
4011	//       "type": "string"
4012	//     }
4013	//   },
4014	//   "path": "v1/{+resourceName}:deleteContact",
4015	//   "response": {
4016	//     "$ref": "Empty"
4017	//   },
4018	//   "scopes": [
4019	//     "https://www.googleapis.com/auth/contacts"
4020	//   ]
4021	// }
4022
4023}
4024
4025// method id "people.people.deleteContactPhoto":
4026
4027type PeopleDeleteContactPhotoCall struct {
4028	s            *Service
4029	resourceName string
4030	urlParams_   gensupport.URLParams
4031	ctx_         context.Context
4032	header_      http.Header
4033}
4034
4035// DeleteContactPhoto: Delete a contact's photo.
4036func (r *PeopleService) DeleteContactPhoto(resourceName string) *PeopleDeleteContactPhotoCall {
4037	c := &PeopleDeleteContactPhotoCall{s: r.s, urlParams_: make(gensupport.URLParams)}
4038	c.resourceName = resourceName
4039	return c
4040}
4041
4042// PersonFields sets the optional parameter "personFields": A field mask
4043// to restrict which fields on the person are returned. Multiple
4044// fields can be specified by separating them with commas. Defaults to
4045// empty
4046// if not set, which will skip the post mutate get. Valid values are:
4047//
4048// * addresses
4049// * ageRanges
4050// * biographies
4051// * birthdays
4052// * braggingRights
4053// * coverPhotos
4054// * emailAddresses
4055// * events
4056// * genders
4057// * imClients
4058// * interests
4059// * locales
4060// * memberships
4061// * metadata
4062// * names
4063// * nicknames
4064// * occupations
4065// * organizations
4066// * phoneNumbers
4067// * photos
4068// * relations
4069// * relationshipInterests
4070// * relationshipStatuses
4071// * residences
4072// * sipAddresses
4073// * skills
4074// * taglines
4075// * urls
4076// * userDefined
4077func (c *PeopleDeleteContactPhotoCall) PersonFields(personFields string) *PeopleDeleteContactPhotoCall {
4078	c.urlParams_.Set("personFields", personFields)
4079	return c
4080}
4081
4082// Fields allows partial responses to be retrieved. See
4083// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
4084// for more information.
4085func (c *PeopleDeleteContactPhotoCall) Fields(s ...googleapi.Field) *PeopleDeleteContactPhotoCall {
4086	c.urlParams_.Set("fields", googleapi.CombineFields(s))
4087	return c
4088}
4089
4090// Context sets the context to be used in this call's Do method. Any
4091// pending HTTP request will be aborted if the provided context is
4092// canceled.
4093func (c *PeopleDeleteContactPhotoCall) Context(ctx context.Context) *PeopleDeleteContactPhotoCall {
4094	c.ctx_ = ctx
4095	return c
4096}
4097
4098// Header returns an http.Header that can be modified by the caller to
4099// add HTTP headers to the request.
4100func (c *PeopleDeleteContactPhotoCall) Header() http.Header {
4101	if c.header_ == nil {
4102		c.header_ = make(http.Header)
4103	}
4104	return c.header_
4105}
4106
4107func (c *PeopleDeleteContactPhotoCall) doRequest(alt string) (*http.Response, error) {
4108	reqHeaders := make(http.Header)
4109	reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216")
4110	for k, v := range c.header_ {
4111		reqHeaders[k] = v
4112	}
4113	reqHeaders.Set("User-Agent", c.s.userAgent())
4114	var body io.Reader = nil
4115	c.urlParams_.Set("alt", alt)
4116	c.urlParams_.Set("prettyPrint", "false")
4117	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+resourceName}:deleteContactPhoto")
4118	urls += "?" + c.urlParams_.Encode()
4119	req, err := http.NewRequest("DELETE", urls, body)
4120	if err != nil {
4121		return nil, err
4122	}
4123	req.Header = reqHeaders
4124	googleapi.Expand(req.URL, map[string]string{
4125		"resourceName": c.resourceName,
4126	})
4127	return gensupport.SendRequest(c.ctx_, c.s.client, req)
4128}
4129
4130// Do executes the "people.people.deleteContactPhoto" call.
4131// Exactly one of *DeleteContactPhotoResponse or error will be non-nil.
4132// Any non-2xx status code is an error. Response headers are in either
4133// *DeleteContactPhotoResponse.ServerResponse.Header or (if a response
4134// was returned at all) in error.(*googleapi.Error).Header. Use
4135// googleapi.IsNotModified to check whether the returned error was
4136// because http.StatusNotModified was returned.
4137func (c *PeopleDeleteContactPhotoCall) Do(opts ...googleapi.CallOption) (*DeleteContactPhotoResponse, error) {
4138	gensupport.SetOptions(c.urlParams_, opts...)
4139	res, err := c.doRequest("json")
4140	if res != nil && res.StatusCode == http.StatusNotModified {
4141		if res.Body != nil {
4142			res.Body.Close()
4143		}
4144		return nil, &googleapi.Error{
4145			Code:   res.StatusCode,
4146			Header: res.Header,
4147		}
4148	}
4149	if err != nil {
4150		return nil, err
4151	}
4152	defer googleapi.CloseBody(res)
4153	if err := googleapi.CheckResponse(res); err != nil {
4154		return nil, err
4155	}
4156	ret := &DeleteContactPhotoResponse{
4157		ServerResponse: googleapi.ServerResponse{
4158			Header:         res.Header,
4159			HTTPStatusCode: res.StatusCode,
4160		},
4161	}
4162	target := &ret
4163	if err := gensupport.DecodeResponse(target, res); err != nil {
4164		return nil, err
4165	}
4166	return ret, nil
4167	// {
4168	//   "description": "Delete a contact's photo.",
4169	//   "flatPath": "v1/people/{peopleId}:deleteContactPhoto",
4170	//   "httpMethod": "DELETE",
4171	//   "id": "people.people.deleteContactPhoto",
4172	//   "parameterOrder": [
4173	//     "resourceName"
4174	//   ],
4175	//   "parameters": {
4176	//     "personFields": {
4177	//       "description": "Optional. A field mask to restrict which fields on the person are returned. Multiple\nfields can be specified by separating them with commas. Defaults to empty\nif not set, which will skip the post mutate get. Valid values are:\n\n* addresses\n* ageRanges\n* biographies\n* birthdays\n* braggingRights\n* coverPhotos\n* emailAddresses\n* events\n* genders\n* imClients\n* interests\n* locales\n* memberships\n* metadata\n* names\n* nicknames\n* occupations\n* organizations\n* phoneNumbers\n* photos\n* relations\n* relationshipInterests\n* relationshipStatuses\n* residences\n* sipAddresses\n* skills\n* taglines\n* urls\n* userDefined",
4178	//       "format": "google-fieldmask",
4179	//       "location": "query",
4180	//       "type": "string"
4181	//     },
4182	//     "resourceName": {
4183	//       "description": "Required. The resource name of the contact whose photo will be deleted.",
4184	//       "location": "path",
4185	//       "pattern": "^people/[^/]+$",
4186	//       "required": true,
4187	//       "type": "string"
4188	//     }
4189	//   },
4190	//   "path": "v1/{+resourceName}:deleteContactPhoto",
4191	//   "response": {
4192	//     "$ref": "DeleteContactPhotoResponse"
4193	//   },
4194	//   "scopes": [
4195	//     "https://www.googleapis.com/auth/contacts"
4196	//   ]
4197	// }
4198
4199}
4200
4201// method id "people.people.get":
4202
4203type PeopleGetCall struct {
4204	s            *Service
4205	resourceName string
4206	urlParams_   gensupport.URLParams
4207	ifNoneMatch_ string
4208	ctx_         context.Context
4209	header_      http.Header
4210}
4211
4212// Get: Provides information about a person by specifying a resource
4213// name. Use
4214// `people/me` to indicate the authenticated user.
4215// <br>
4216// The request throws a 400 error if 'personFields' is not specified.
4217func (r *PeopleService) Get(resourceName string) *PeopleGetCall {
4218	c := &PeopleGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
4219	c.resourceName = resourceName
4220	return c
4221}
4222
4223// PersonFields sets the optional parameter "personFields": Required. A
4224// field mask to restrict which fields on the person are returned.
4225// Multiple
4226// fields can be specified by separating them with commas. Valid values
4227// are:
4228//
4229// * addresses
4230// * ageRanges
4231// * biographies
4232// * birthdays
4233// * braggingRights
4234// * coverPhotos
4235// * emailAddresses
4236// * events
4237// * genders
4238// * imClients
4239// * interests
4240// * locales
4241// * memberships
4242// * metadata
4243// * names
4244// * nicknames
4245// * occupations
4246// * organizations
4247// * phoneNumbers
4248// * photos
4249// * relations
4250// * relationshipInterests
4251// * relationshipStatuses
4252// * residences
4253// * sipAddresses
4254// * skills
4255// * taglines
4256// * urls
4257// * userDefined
4258func (c *PeopleGetCall) PersonFields(personFields string) *PeopleGetCall {
4259	c.urlParams_.Set("personFields", personFields)
4260	return c
4261}
4262
4263// RequestMaskIncludeField sets the optional parameter
4264// "requestMask.includeField": Required. Comma-separated list of person
4265// fields to be included in the response. Each
4266// path should start with `person.`: for example, `person.names`
4267// or
4268// `person.photos`.
4269func (c *PeopleGetCall) RequestMaskIncludeField(requestMaskIncludeField string) *PeopleGetCall {
4270	c.urlParams_.Set("requestMask.includeField", requestMaskIncludeField)
4271	return c
4272}
4273
4274// Fields allows partial responses to be retrieved. See
4275// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
4276// for more information.
4277func (c *PeopleGetCall) Fields(s ...googleapi.Field) *PeopleGetCall {
4278	c.urlParams_.Set("fields", googleapi.CombineFields(s))
4279	return c
4280}
4281
4282// IfNoneMatch sets the optional parameter which makes the operation
4283// fail if the object's ETag matches the given value. This is useful for
4284// getting updates only after the object has changed since the last
4285// request. Use googleapi.IsNotModified to check whether the response
4286// error from Do is the result of In-None-Match.
4287func (c *PeopleGetCall) IfNoneMatch(entityTag string) *PeopleGetCall {
4288	c.ifNoneMatch_ = entityTag
4289	return c
4290}
4291
4292// Context sets the context to be used in this call's Do method. Any
4293// pending HTTP request will be aborted if the provided context is
4294// canceled.
4295func (c *PeopleGetCall) Context(ctx context.Context) *PeopleGetCall {
4296	c.ctx_ = ctx
4297	return c
4298}
4299
4300// Header returns an http.Header that can be modified by the caller to
4301// add HTTP headers to the request.
4302func (c *PeopleGetCall) Header() http.Header {
4303	if c.header_ == nil {
4304		c.header_ = make(http.Header)
4305	}
4306	return c.header_
4307}
4308
4309func (c *PeopleGetCall) doRequest(alt string) (*http.Response, error) {
4310	reqHeaders := make(http.Header)
4311	reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216")
4312	for k, v := range c.header_ {
4313		reqHeaders[k] = v
4314	}
4315	reqHeaders.Set("User-Agent", c.s.userAgent())
4316	if c.ifNoneMatch_ != "" {
4317		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
4318	}
4319	var body io.Reader = nil
4320	c.urlParams_.Set("alt", alt)
4321	c.urlParams_.Set("prettyPrint", "false")
4322	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+resourceName}")
4323	urls += "?" + c.urlParams_.Encode()
4324	req, err := http.NewRequest("GET", urls, body)
4325	if err != nil {
4326		return nil, err
4327	}
4328	req.Header = reqHeaders
4329	googleapi.Expand(req.URL, map[string]string{
4330		"resourceName": c.resourceName,
4331	})
4332	return gensupport.SendRequest(c.ctx_, c.s.client, req)
4333}
4334
4335// Do executes the "people.people.get" call.
4336// Exactly one of *Person or error will be non-nil. Any non-2xx status
4337// code is an error. Response headers are in either
4338// *Person.ServerResponse.Header or (if a response was returned at all)
4339// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
4340// check whether the returned error was because http.StatusNotModified
4341// was returned.
4342func (c *PeopleGetCall) Do(opts ...googleapi.CallOption) (*Person, error) {
4343	gensupport.SetOptions(c.urlParams_, opts...)
4344	res, err := c.doRequest("json")
4345	if res != nil && res.StatusCode == http.StatusNotModified {
4346		if res.Body != nil {
4347			res.Body.Close()
4348		}
4349		return nil, &googleapi.Error{
4350			Code:   res.StatusCode,
4351			Header: res.Header,
4352		}
4353	}
4354	if err != nil {
4355		return nil, err
4356	}
4357	defer googleapi.CloseBody(res)
4358	if err := googleapi.CheckResponse(res); err != nil {
4359		return nil, err
4360	}
4361	ret := &Person{
4362		ServerResponse: googleapi.ServerResponse{
4363			Header:         res.Header,
4364			HTTPStatusCode: res.StatusCode,
4365		},
4366	}
4367	target := &ret
4368	if err := gensupport.DecodeResponse(target, res); err != nil {
4369		return nil, err
4370	}
4371	return ret, nil
4372	// {
4373	//   "description": "Provides information about a person by specifying a resource name. Use\n`people/me` to indicate the authenticated user.\n\u003cbr\u003e\nThe request throws a 400 error if 'personFields' is not specified.",
4374	//   "flatPath": "v1/people/{peopleId}",
4375	//   "httpMethod": "GET",
4376	//   "id": "people.people.get",
4377	//   "parameterOrder": [
4378	//     "resourceName"
4379	//   ],
4380	//   "parameters": {
4381	//     "personFields": {
4382	//       "description": "Required. A field mask to restrict which fields on the person are returned. Multiple\nfields can be specified by separating them with commas. Valid values are:\n\n* addresses\n* ageRanges\n* biographies\n* birthdays\n* braggingRights\n* coverPhotos\n* emailAddresses\n* events\n* genders\n* imClients\n* interests\n* locales\n* memberships\n* metadata\n* names\n* nicknames\n* occupations\n* organizations\n* phoneNumbers\n* photos\n* relations\n* relationshipInterests\n* relationshipStatuses\n* residences\n* sipAddresses\n* skills\n* taglines\n* urls\n* userDefined",
4383	//       "format": "google-fieldmask",
4384	//       "location": "query",
4385	//       "type": "string"
4386	//     },
4387	//     "requestMask.includeField": {
4388	//       "description": "Required. Comma-separated list of person fields to be included in the response. Each\npath should start with `person.`: for example, `person.names` or\n`person.photos`.",
4389	//       "format": "google-fieldmask",
4390	//       "location": "query",
4391	//       "type": "string"
4392	//     },
4393	//     "resourceName": {
4394	//       "description": "Required. The resource name of the person to provide information about.\n\n- To get information about the authenticated user, specify `people/me`.\n- To get information about a google account, specify\n `people/`\u003cvar\u003eaccount_id\u003c/var\u003e.\n- To get information about a contact, specify the resource name that\n  identifies the contact as returned by\n[`people.connections.list`](/people/api/rest/v1/people.connections/list).",
4395	//       "location": "path",
4396	//       "pattern": "^people/[^/]+$",
4397	//       "required": true,
4398	//       "type": "string"
4399	//     }
4400	//   },
4401	//   "path": "v1/{+resourceName}",
4402	//   "response": {
4403	//     "$ref": "Person"
4404	//   },
4405	//   "scopes": [
4406	//     "https://www.googleapis.com/auth/contacts",
4407	//     "https://www.googleapis.com/auth/contacts.readonly",
4408	//     "https://www.googleapis.com/auth/user.addresses.read",
4409	//     "https://www.googleapis.com/auth/user.birthday.read",
4410	//     "https://www.googleapis.com/auth/user.emails.read",
4411	//     "https://www.googleapis.com/auth/user.phonenumbers.read",
4412	//     "https://www.googleapis.com/auth/userinfo.email",
4413	//     "https://www.googleapis.com/auth/userinfo.profile"
4414	//   ]
4415	// }
4416
4417}
4418
4419// method id "people.people.getBatchGet":
4420
4421type PeopleGetBatchGetCall struct {
4422	s            *Service
4423	urlParams_   gensupport.URLParams
4424	ifNoneMatch_ string
4425	ctx_         context.Context
4426	header_      http.Header
4427}
4428
4429// GetBatchGet: Provides information about a list of specific people by
4430// specifying a list
4431// of requested resource names. Use `people/me` to indicate the
4432// authenticated
4433// user.
4434// <br>
4435// The request throws a 400 error if 'personFields' is not specified.
4436func (r *PeopleService) GetBatchGet() *PeopleGetBatchGetCall {
4437	c := &PeopleGetBatchGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
4438	return c
4439}
4440
4441// PersonFields sets the optional parameter "personFields": Required. A
4442// field mask to restrict which fields on each person are returned.
4443// Multiple
4444// fields can be specified by separating them with commas. Valid values
4445// are:
4446//
4447// * addresses
4448// * ageRanges
4449// * biographies
4450// * birthdays
4451// * braggingRights
4452// * coverPhotos
4453// * emailAddresses
4454// * events
4455// * genders
4456// * imClients
4457// * interests
4458// * locales
4459// * memberships
4460// * metadata
4461// * names
4462// * nicknames
4463// * occupations
4464// * organizations
4465// * phoneNumbers
4466// * photos
4467// * relations
4468// * relationshipInterests
4469// * relationshipStatuses
4470// * residences
4471// * sipAddresses
4472// * skills
4473// * taglines
4474// * urls
4475// * userDefined
4476func (c *PeopleGetBatchGetCall) PersonFields(personFields string) *PeopleGetBatchGetCall {
4477	c.urlParams_.Set("personFields", personFields)
4478	return c
4479}
4480
4481// RequestMaskIncludeField sets the optional parameter
4482// "requestMask.includeField": Required. Comma-separated list of person
4483// fields to be included in the response. Each
4484// path should start with `person.`: for example, `person.names`
4485// or
4486// `person.photos`.
4487func (c *PeopleGetBatchGetCall) RequestMaskIncludeField(requestMaskIncludeField string) *PeopleGetBatchGetCall {
4488	c.urlParams_.Set("requestMask.includeField", requestMaskIncludeField)
4489	return c
4490}
4491
4492// ResourceNames sets the optional parameter "resourceNames": Required.
4493// The resource names of the people to provide information about.
4494//
4495// - To get information about the authenticated user, specify
4496// `people/me`.
4497// - To get information about a google account, specify
4498//   `people/`<var>account_id</var>.
4499// - To get information about a contact, specify the resource name that
4500//   identifies the contact as returned
4501// by
4502// [`people.connections.list`](/people/api/rest/v1/people.connections/
4503// list).
4504//
4505// You can include up to 50 resource names in one request.
4506func (c *PeopleGetBatchGetCall) ResourceNames(resourceNames ...string) *PeopleGetBatchGetCall {
4507	c.urlParams_.SetMulti("resourceNames", append([]string{}, resourceNames...))
4508	return c
4509}
4510
4511// Fields allows partial responses to be retrieved. See
4512// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
4513// for more information.
4514func (c *PeopleGetBatchGetCall) Fields(s ...googleapi.Field) *PeopleGetBatchGetCall {
4515	c.urlParams_.Set("fields", googleapi.CombineFields(s))
4516	return c
4517}
4518
4519// IfNoneMatch sets the optional parameter which makes the operation
4520// fail if the object's ETag matches the given value. This is useful for
4521// getting updates only after the object has changed since the last
4522// request. Use googleapi.IsNotModified to check whether the response
4523// error from Do is the result of In-None-Match.
4524func (c *PeopleGetBatchGetCall) IfNoneMatch(entityTag string) *PeopleGetBatchGetCall {
4525	c.ifNoneMatch_ = entityTag
4526	return c
4527}
4528
4529// Context sets the context to be used in this call's Do method. Any
4530// pending HTTP request will be aborted if the provided context is
4531// canceled.
4532func (c *PeopleGetBatchGetCall) Context(ctx context.Context) *PeopleGetBatchGetCall {
4533	c.ctx_ = ctx
4534	return c
4535}
4536
4537// Header returns an http.Header that can be modified by the caller to
4538// add HTTP headers to the request.
4539func (c *PeopleGetBatchGetCall) Header() http.Header {
4540	if c.header_ == nil {
4541		c.header_ = make(http.Header)
4542	}
4543	return c.header_
4544}
4545
4546func (c *PeopleGetBatchGetCall) doRequest(alt string) (*http.Response, error) {
4547	reqHeaders := make(http.Header)
4548	reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216")
4549	for k, v := range c.header_ {
4550		reqHeaders[k] = v
4551	}
4552	reqHeaders.Set("User-Agent", c.s.userAgent())
4553	if c.ifNoneMatch_ != "" {
4554		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
4555	}
4556	var body io.Reader = nil
4557	c.urlParams_.Set("alt", alt)
4558	c.urlParams_.Set("prettyPrint", "false")
4559	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/people:batchGet")
4560	urls += "?" + c.urlParams_.Encode()
4561	req, err := http.NewRequest("GET", urls, body)
4562	if err != nil {
4563		return nil, err
4564	}
4565	req.Header = reqHeaders
4566	return gensupport.SendRequest(c.ctx_, c.s.client, req)
4567}
4568
4569// Do executes the "people.people.getBatchGet" call.
4570// Exactly one of *GetPeopleResponse or error will be non-nil. Any
4571// non-2xx status code is an error. Response headers are in either
4572// *GetPeopleResponse.ServerResponse.Header or (if a response was
4573// returned at all) in error.(*googleapi.Error).Header. Use
4574// googleapi.IsNotModified to check whether the returned error was
4575// because http.StatusNotModified was returned.
4576func (c *PeopleGetBatchGetCall) Do(opts ...googleapi.CallOption) (*GetPeopleResponse, error) {
4577	gensupport.SetOptions(c.urlParams_, opts...)
4578	res, err := c.doRequest("json")
4579	if res != nil && res.StatusCode == http.StatusNotModified {
4580		if res.Body != nil {
4581			res.Body.Close()
4582		}
4583		return nil, &googleapi.Error{
4584			Code:   res.StatusCode,
4585			Header: res.Header,
4586		}
4587	}
4588	if err != nil {
4589		return nil, err
4590	}
4591	defer googleapi.CloseBody(res)
4592	if err := googleapi.CheckResponse(res); err != nil {
4593		return nil, err
4594	}
4595	ret := &GetPeopleResponse{
4596		ServerResponse: googleapi.ServerResponse{
4597			Header:         res.Header,
4598			HTTPStatusCode: res.StatusCode,
4599		},
4600	}
4601	target := &ret
4602	if err := gensupport.DecodeResponse(target, res); err != nil {
4603		return nil, err
4604	}
4605	return ret, nil
4606	// {
4607	//   "description": "Provides information about a list of specific people by specifying a list\nof requested resource names. Use `people/me` to indicate the authenticated\nuser.\n\u003cbr\u003e\nThe request throws a 400 error if 'personFields' is not specified.",
4608	//   "flatPath": "v1/people:batchGet",
4609	//   "httpMethod": "GET",
4610	//   "id": "people.people.getBatchGet",
4611	//   "parameterOrder": [],
4612	//   "parameters": {
4613	//     "personFields": {
4614	//       "description": "Required. A field mask to restrict which fields on each person are returned. Multiple\nfields can be specified by separating them with commas. Valid values are:\n\n* addresses\n* ageRanges\n* biographies\n* birthdays\n* braggingRights\n* coverPhotos\n* emailAddresses\n* events\n* genders\n* imClients\n* interests\n* locales\n* memberships\n* metadata\n* names\n* nicknames\n* occupations\n* organizations\n* phoneNumbers\n* photos\n* relations\n* relationshipInterests\n* relationshipStatuses\n* residences\n* sipAddresses\n* skills\n* taglines\n* urls\n* userDefined",
4615	//       "format": "google-fieldmask",
4616	//       "location": "query",
4617	//       "type": "string"
4618	//     },
4619	//     "requestMask.includeField": {
4620	//       "description": "Required. Comma-separated list of person fields to be included in the response. Each\npath should start with `person.`: for example, `person.names` or\n`person.photos`.",
4621	//       "format": "google-fieldmask",
4622	//       "location": "query",
4623	//       "type": "string"
4624	//     },
4625	//     "resourceNames": {
4626	//       "description": "Required. The resource names of the people to provide information about.\n\n- To get information about the authenticated user, specify `people/me`.\n- To get information about a google account, specify\n  `people/`\u003cvar\u003eaccount_id\u003c/var\u003e.\n- To get information about a contact, specify the resource name that\n  identifies the contact as returned by\n[`people.connections.list`](/people/api/rest/v1/people.connections/list).\n\nYou can include up to 50 resource names in one request.",
4627	//       "location": "query",
4628	//       "repeated": true,
4629	//       "type": "string"
4630	//     }
4631	//   },
4632	//   "path": "v1/people:batchGet",
4633	//   "response": {
4634	//     "$ref": "GetPeopleResponse"
4635	//   },
4636	//   "scopes": [
4637	//     "https://www.googleapis.com/auth/contacts",
4638	//     "https://www.googleapis.com/auth/contacts.readonly",
4639	//     "https://www.googleapis.com/auth/user.addresses.read",
4640	//     "https://www.googleapis.com/auth/user.birthday.read",
4641	//     "https://www.googleapis.com/auth/user.emails.read",
4642	//     "https://www.googleapis.com/auth/user.phonenumbers.read",
4643	//     "https://www.googleapis.com/auth/userinfo.email",
4644	//     "https://www.googleapis.com/auth/userinfo.profile"
4645	//   ]
4646	// }
4647
4648}
4649
4650// method id "people.people.updateContact":
4651
4652type PeopleUpdateContactCall struct {
4653	s            *Service
4654	resourceName string
4655	person       *Person
4656	urlParams_   gensupport.URLParams
4657	ctx_         context.Context
4658	header_      http.Header
4659}
4660
4661// UpdateContact: Update contact data for an existing contact person.
4662// Any non-contact data
4663// will not be modified.
4664//
4665// The request throws a 400 error if `updatePersonFields` is not
4666// specified.
4667// <br>
4668// The request throws a 400 error if `person.metadata.sources` is
4669// not
4670// specified for the contact to be updated.
4671// <br>
4672// The request throws a 400 error with an error with
4673// reason
4674// "failedPrecondition" if `person.metadata.sources.etag` is different
4675// than
4676// the contact's etag, which indicates the contact has changed since its
4677// data
4678// was read. Clients should get the latest person and re-apply their
4679// updates
4680// to the latest person.
4681func (r *PeopleService) UpdateContact(resourceName string, person *Person) *PeopleUpdateContactCall {
4682	c := &PeopleUpdateContactCall{s: r.s, urlParams_: make(gensupport.URLParams)}
4683	c.resourceName = resourceName
4684	c.person = person
4685	return c
4686}
4687
4688// UpdatePersonFields sets the optional parameter "updatePersonFields":
4689// Required. A field mask to restrict which fields on the person are
4690// updated. Multiple
4691// fields can be specified by separating them with commas.
4692// All updated fields will be replaced. Valid values are:
4693//
4694// * addresses
4695// * biographies
4696// * birthdays
4697// * emailAddresses
4698// * events
4699// * genders
4700// * imClients
4701// * interests
4702// * locales
4703// * memberships
4704// * names
4705// * nicknames
4706// * occupations
4707// * organizations
4708// * phoneNumbers
4709// * relations
4710// * residences
4711// * sipAddresses
4712// * urls
4713// * userDefined
4714func (c *PeopleUpdateContactCall) UpdatePersonFields(updatePersonFields string) *PeopleUpdateContactCall {
4715	c.urlParams_.Set("updatePersonFields", updatePersonFields)
4716	return c
4717}
4718
4719// Fields allows partial responses to be retrieved. See
4720// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
4721// for more information.
4722func (c *PeopleUpdateContactCall) Fields(s ...googleapi.Field) *PeopleUpdateContactCall {
4723	c.urlParams_.Set("fields", googleapi.CombineFields(s))
4724	return c
4725}
4726
4727// Context sets the context to be used in this call's Do method. Any
4728// pending HTTP request will be aborted if the provided context is
4729// canceled.
4730func (c *PeopleUpdateContactCall) Context(ctx context.Context) *PeopleUpdateContactCall {
4731	c.ctx_ = ctx
4732	return c
4733}
4734
4735// Header returns an http.Header that can be modified by the caller to
4736// add HTTP headers to the request.
4737func (c *PeopleUpdateContactCall) Header() http.Header {
4738	if c.header_ == nil {
4739		c.header_ = make(http.Header)
4740	}
4741	return c.header_
4742}
4743
4744func (c *PeopleUpdateContactCall) doRequest(alt string) (*http.Response, error) {
4745	reqHeaders := make(http.Header)
4746	reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216")
4747	for k, v := range c.header_ {
4748		reqHeaders[k] = v
4749	}
4750	reqHeaders.Set("User-Agent", c.s.userAgent())
4751	var body io.Reader = nil
4752	body, err := googleapi.WithoutDataWrapper.JSONReader(c.person)
4753	if err != nil {
4754		return nil, err
4755	}
4756	reqHeaders.Set("Content-Type", "application/json")
4757	c.urlParams_.Set("alt", alt)
4758	c.urlParams_.Set("prettyPrint", "false")
4759	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+resourceName}:updateContact")
4760	urls += "?" + c.urlParams_.Encode()
4761	req, err := http.NewRequest("PATCH", urls, body)
4762	if err != nil {
4763		return nil, err
4764	}
4765	req.Header = reqHeaders
4766	googleapi.Expand(req.URL, map[string]string{
4767		"resourceName": c.resourceName,
4768	})
4769	return gensupport.SendRequest(c.ctx_, c.s.client, req)
4770}
4771
4772// Do executes the "people.people.updateContact" call.
4773// Exactly one of *Person or error will be non-nil. Any non-2xx status
4774// code is an error. Response headers are in either
4775// *Person.ServerResponse.Header or (if a response was returned at all)
4776// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
4777// check whether the returned error was because http.StatusNotModified
4778// was returned.
4779func (c *PeopleUpdateContactCall) Do(opts ...googleapi.CallOption) (*Person, error) {
4780	gensupport.SetOptions(c.urlParams_, opts...)
4781	res, err := c.doRequest("json")
4782	if res != nil && res.StatusCode == http.StatusNotModified {
4783		if res.Body != nil {
4784			res.Body.Close()
4785		}
4786		return nil, &googleapi.Error{
4787			Code:   res.StatusCode,
4788			Header: res.Header,
4789		}
4790	}
4791	if err != nil {
4792		return nil, err
4793	}
4794	defer googleapi.CloseBody(res)
4795	if err := googleapi.CheckResponse(res); err != nil {
4796		return nil, err
4797	}
4798	ret := &Person{
4799		ServerResponse: googleapi.ServerResponse{
4800			Header:         res.Header,
4801			HTTPStatusCode: res.StatusCode,
4802		},
4803	}
4804	target := &ret
4805	if err := gensupport.DecodeResponse(target, res); err != nil {
4806		return nil, err
4807	}
4808	return ret, nil
4809	// {
4810	//   "description": "Update contact data for an existing contact person. Any non-contact data\nwill not be modified.\n\nThe request throws a 400 error if `updatePersonFields` is not specified.\n\u003cbr\u003e\nThe request throws a 400 error if `person.metadata.sources` is not\nspecified for the contact to be updated.\n\u003cbr\u003e\nThe request throws a 400 error with an error with reason\n`\"failedPrecondition\"` if `person.metadata.sources.etag` is different than\nthe contact's etag, which indicates the contact has changed since its data\nwas read. Clients should get the latest person and re-apply their updates\nto the latest person.",
4811	//   "flatPath": "v1/people/{peopleId}:updateContact",
4812	//   "httpMethod": "PATCH",
4813	//   "id": "people.people.updateContact",
4814	//   "parameterOrder": [
4815	//     "resourceName"
4816	//   ],
4817	//   "parameters": {
4818	//     "resourceName": {
4819	//       "description": "The resource name for the person, assigned by the server. An ASCII string\nwith a max length of 27 characters, in the form of\n`people/`\u003cvar\u003eperson_id\u003c/var\u003e.",
4820	//       "location": "path",
4821	//       "pattern": "^people/[^/]+$",
4822	//       "required": true,
4823	//       "type": "string"
4824	//     },
4825	//     "updatePersonFields": {
4826	//       "description": "Required. A field mask to restrict which fields on the person are updated. Multiple\nfields can be specified by separating them with commas.\nAll updated fields will be replaced. Valid values are:\n\n* addresses\n* biographies\n* birthdays\n* emailAddresses\n* events\n* genders\n* imClients\n* interests\n* locales\n* memberships\n* names\n* nicknames\n* occupations\n* organizations\n* phoneNumbers\n* relations\n* residences\n* sipAddresses\n* urls\n* userDefined",
4827	//       "format": "google-fieldmask",
4828	//       "location": "query",
4829	//       "type": "string"
4830	//     }
4831	//   },
4832	//   "path": "v1/{+resourceName}:updateContact",
4833	//   "request": {
4834	//     "$ref": "Person"
4835	//   },
4836	//   "response": {
4837	//     "$ref": "Person"
4838	//   },
4839	//   "scopes": [
4840	//     "https://www.googleapis.com/auth/contacts"
4841	//   ]
4842	// }
4843
4844}
4845
4846// method id "people.people.updateContactPhoto":
4847
4848type PeopleUpdateContactPhotoCall struct {
4849	s                         *Service
4850	resourceName              string
4851	updatecontactphotorequest *UpdateContactPhotoRequest
4852	urlParams_                gensupport.URLParams
4853	ctx_                      context.Context
4854	header_                   http.Header
4855}
4856
4857// UpdateContactPhoto: Update a contact's photo.
4858func (r *PeopleService) UpdateContactPhoto(resourceName string, updatecontactphotorequest *UpdateContactPhotoRequest) *PeopleUpdateContactPhotoCall {
4859	c := &PeopleUpdateContactPhotoCall{s: r.s, urlParams_: make(gensupport.URLParams)}
4860	c.resourceName = resourceName
4861	c.updatecontactphotorequest = updatecontactphotorequest
4862	return c
4863}
4864
4865// Fields allows partial responses to be retrieved. See
4866// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
4867// for more information.
4868func (c *PeopleUpdateContactPhotoCall) Fields(s ...googleapi.Field) *PeopleUpdateContactPhotoCall {
4869	c.urlParams_.Set("fields", googleapi.CombineFields(s))
4870	return c
4871}
4872
4873// Context sets the context to be used in this call's Do method. Any
4874// pending HTTP request will be aborted if the provided context is
4875// canceled.
4876func (c *PeopleUpdateContactPhotoCall) Context(ctx context.Context) *PeopleUpdateContactPhotoCall {
4877	c.ctx_ = ctx
4878	return c
4879}
4880
4881// Header returns an http.Header that can be modified by the caller to
4882// add HTTP headers to the request.
4883func (c *PeopleUpdateContactPhotoCall) Header() http.Header {
4884	if c.header_ == nil {
4885		c.header_ = make(http.Header)
4886	}
4887	return c.header_
4888}
4889
4890func (c *PeopleUpdateContactPhotoCall) doRequest(alt string) (*http.Response, error) {
4891	reqHeaders := make(http.Header)
4892	reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216")
4893	for k, v := range c.header_ {
4894		reqHeaders[k] = v
4895	}
4896	reqHeaders.Set("User-Agent", c.s.userAgent())
4897	var body io.Reader = nil
4898	body, err := googleapi.WithoutDataWrapper.JSONReader(c.updatecontactphotorequest)
4899	if err != nil {
4900		return nil, err
4901	}
4902	reqHeaders.Set("Content-Type", "application/json")
4903	c.urlParams_.Set("alt", alt)
4904	c.urlParams_.Set("prettyPrint", "false")
4905	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+resourceName}:updateContactPhoto")
4906	urls += "?" + c.urlParams_.Encode()
4907	req, err := http.NewRequest("PATCH", urls, body)
4908	if err != nil {
4909		return nil, err
4910	}
4911	req.Header = reqHeaders
4912	googleapi.Expand(req.URL, map[string]string{
4913		"resourceName": c.resourceName,
4914	})
4915	return gensupport.SendRequest(c.ctx_, c.s.client, req)
4916}
4917
4918// Do executes the "people.people.updateContactPhoto" call.
4919// Exactly one of *UpdateContactPhotoResponse or error will be non-nil.
4920// Any non-2xx status code is an error. Response headers are in either
4921// *UpdateContactPhotoResponse.ServerResponse.Header or (if a response
4922// was returned at all) in error.(*googleapi.Error).Header. Use
4923// googleapi.IsNotModified to check whether the returned error was
4924// because http.StatusNotModified was returned.
4925func (c *PeopleUpdateContactPhotoCall) Do(opts ...googleapi.CallOption) (*UpdateContactPhotoResponse, error) {
4926	gensupport.SetOptions(c.urlParams_, opts...)
4927	res, err := c.doRequest("json")
4928	if res != nil && res.StatusCode == http.StatusNotModified {
4929		if res.Body != nil {
4930			res.Body.Close()
4931		}
4932		return nil, &googleapi.Error{
4933			Code:   res.StatusCode,
4934			Header: res.Header,
4935		}
4936	}
4937	if err != nil {
4938		return nil, err
4939	}
4940	defer googleapi.CloseBody(res)
4941	if err := googleapi.CheckResponse(res); err != nil {
4942		return nil, err
4943	}
4944	ret := &UpdateContactPhotoResponse{
4945		ServerResponse: googleapi.ServerResponse{
4946			Header:         res.Header,
4947			HTTPStatusCode: res.StatusCode,
4948		},
4949	}
4950	target := &ret
4951	if err := gensupport.DecodeResponse(target, res); err != nil {
4952		return nil, err
4953	}
4954	return ret, nil
4955	// {
4956	//   "description": "Update a contact's photo.",
4957	//   "flatPath": "v1/people/{peopleId}:updateContactPhoto",
4958	//   "httpMethod": "PATCH",
4959	//   "id": "people.people.updateContactPhoto",
4960	//   "parameterOrder": [
4961	//     "resourceName"
4962	//   ],
4963	//   "parameters": {
4964	//     "resourceName": {
4965	//       "description": "Required. Person resource name",
4966	//       "location": "path",
4967	//       "pattern": "^people/[^/]+$",
4968	//       "required": true,
4969	//       "type": "string"
4970	//     }
4971	//   },
4972	//   "path": "v1/{+resourceName}:updateContactPhoto",
4973	//   "request": {
4974	//     "$ref": "UpdateContactPhotoRequest"
4975	//   },
4976	//   "response": {
4977	//     "$ref": "UpdateContactPhotoResponse"
4978	//   },
4979	//   "scopes": [
4980	//     "https://www.googleapis.com/auth/contacts"
4981	//   ]
4982	// }
4983
4984}
4985
4986// method id "people.people.connections.list":
4987
4988type PeopleConnectionsListCall struct {
4989	s            *Service
4990	resourceName string
4991	urlParams_   gensupport.URLParams
4992	ifNoneMatch_ string
4993	ctx_         context.Context
4994	header_      http.Header
4995}
4996
4997// List: Provides a list of the authenticated user's contacts merged
4998// with any
4999// connected profiles.
5000// <br>
5001// The request throws a 400 error if 'personFields' is not specified.
5002func (r *PeopleConnectionsService) List(resourceName string) *PeopleConnectionsListCall {
5003	c := &PeopleConnectionsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
5004	c.resourceName = resourceName
5005	return c
5006}
5007
5008// PageSize sets the optional parameter "pageSize": The number of
5009// connections to include in the response. Valid values are
5010// between 1 and 2000, inclusive. Defaults to 100 if not set or set to
5011// 0.
5012func (c *PeopleConnectionsListCall) PageSize(pageSize int64) *PeopleConnectionsListCall {
5013	c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
5014	return c
5015}
5016
5017// PageToken sets the optional parameter "pageToken": The token of the
5018// page to be returned.
5019func (c *PeopleConnectionsListCall) PageToken(pageToken string) *PeopleConnectionsListCall {
5020	c.urlParams_.Set("pageToken", pageToken)
5021	return c
5022}
5023
5024// PersonFields sets the optional parameter "personFields": Required. A
5025// field mask to restrict which fields on each person are returned.
5026// Multiple
5027// fields can be specified by separating them with commas. Valid values
5028// are:
5029//
5030// * addresses
5031// * ageRanges
5032// * biographies
5033// * birthdays
5034// * braggingRights
5035// * coverPhotos
5036// * emailAddresses
5037// * events
5038// * genders
5039// * imClients
5040// * interests
5041// * locales
5042// * memberships
5043// * metadata
5044// * names
5045// * nicknames
5046// * occupations
5047// * organizations
5048// * phoneNumbers
5049// * photos
5050// * relations
5051// * relationshipInterests
5052// * relationshipStatuses
5053// * residences
5054// * sipAddresses
5055// * skills
5056// * taglines
5057// * urls
5058// * userDefined
5059func (c *PeopleConnectionsListCall) PersonFields(personFields string) *PeopleConnectionsListCall {
5060	c.urlParams_.Set("personFields", personFields)
5061	return c
5062}
5063
5064// RequestMaskIncludeField sets the optional parameter
5065// "requestMask.includeField": Required. Comma-separated list of person
5066// fields to be included in the response. Each
5067// path should start with `person.`: for example, `person.names`
5068// or
5069// `person.photos`.
5070func (c *PeopleConnectionsListCall) RequestMaskIncludeField(requestMaskIncludeField string) *PeopleConnectionsListCall {
5071	c.urlParams_.Set("requestMask.includeField", requestMaskIncludeField)
5072	return c
5073}
5074
5075// RequestSyncToken sets the optional parameter "requestSyncToken":
5076// Whether the response should include a sync token, which can be used
5077// to get
5078// all changes since the last request. For subsequent sync requests use
5079// the
5080// `sync_token` param instead. Initial sync requests that
5081// specify
5082// `request_sync_token` have an additional rate limit.
5083func (c *PeopleConnectionsListCall) RequestSyncToken(requestSyncToken bool) *PeopleConnectionsListCall {
5084	c.urlParams_.Set("requestSyncToken", fmt.Sprint(requestSyncToken))
5085	return c
5086}
5087
5088// SortOrder sets the optional parameter "sortOrder": The order in which
5089// the connections should be sorted. Defaults
5090// to
5091// `LAST_MODIFIED_ASCENDING`.
5092//
5093// Possible values:
5094//   "LAST_MODIFIED_ASCENDING"
5095//   "LAST_MODIFIED_DESCENDING"
5096//   "FIRST_NAME_ASCENDING"
5097//   "LAST_NAME_ASCENDING"
5098func (c *PeopleConnectionsListCall) SortOrder(sortOrder string) *PeopleConnectionsListCall {
5099	c.urlParams_.Set("sortOrder", sortOrder)
5100	return c
5101}
5102
5103// SyncToken sets the optional parameter "syncToken": A sync token
5104// returned by a previous call to `people.connections.list`.
5105// Only resources changed since the sync token was created will be
5106// returned.
5107// Sync requests that specify `sync_token` have an additional rate
5108// limit.
5109func (c *PeopleConnectionsListCall) SyncToken(syncToken string) *PeopleConnectionsListCall {
5110	c.urlParams_.Set("syncToken", syncToken)
5111	return c
5112}
5113
5114// Fields allows partial responses to be retrieved. See
5115// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
5116// for more information.
5117func (c *PeopleConnectionsListCall) Fields(s ...googleapi.Field) *PeopleConnectionsListCall {
5118	c.urlParams_.Set("fields", googleapi.CombineFields(s))
5119	return c
5120}
5121
5122// IfNoneMatch sets the optional parameter which makes the operation
5123// fail if the object's ETag matches the given value. This is useful for
5124// getting updates only after the object has changed since the last
5125// request. Use googleapi.IsNotModified to check whether the response
5126// error from Do is the result of In-None-Match.
5127func (c *PeopleConnectionsListCall) IfNoneMatch(entityTag string) *PeopleConnectionsListCall {
5128	c.ifNoneMatch_ = entityTag
5129	return c
5130}
5131
5132// Context sets the context to be used in this call's Do method. Any
5133// pending HTTP request will be aborted if the provided context is
5134// canceled.
5135func (c *PeopleConnectionsListCall) Context(ctx context.Context) *PeopleConnectionsListCall {
5136	c.ctx_ = ctx
5137	return c
5138}
5139
5140// Header returns an http.Header that can be modified by the caller to
5141// add HTTP headers to the request.
5142func (c *PeopleConnectionsListCall) Header() http.Header {
5143	if c.header_ == nil {
5144		c.header_ = make(http.Header)
5145	}
5146	return c.header_
5147}
5148
5149func (c *PeopleConnectionsListCall) doRequest(alt string) (*http.Response, error) {
5150	reqHeaders := make(http.Header)
5151	reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216")
5152	for k, v := range c.header_ {
5153		reqHeaders[k] = v
5154	}
5155	reqHeaders.Set("User-Agent", c.s.userAgent())
5156	if c.ifNoneMatch_ != "" {
5157		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
5158	}
5159	var body io.Reader = nil
5160	c.urlParams_.Set("alt", alt)
5161	c.urlParams_.Set("prettyPrint", "false")
5162	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+resourceName}/connections")
5163	urls += "?" + c.urlParams_.Encode()
5164	req, err := http.NewRequest("GET", urls, body)
5165	if err != nil {
5166		return nil, err
5167	}
5168	req.Header = reqHeaders
5169	googleapi.Expand(req.URL, map[string]string{
5170		"resourceName": c.resourceName,
5171	})
5172	return gensupport.SendRequest(c.ctx_, c.s.client, req)
5173}
5174
5175// Do executes the "people.people.connections.list" call.
5176// Exactly one of *ListConnectionsResponse or error will be non-nil. Any
5177// non-2xx status code is an error. Response headers are in either
5178// *ListConnectionsResponse.ServerResponse.Header or (if a response was
5179// returned at all) in error.(*googleapi.Error).Header. Use
5180// googleapi.IsNotModified to check whether the returned error was
5181// because http.StatusNotModified was returned.
5182func (c *PeopleConnectionsListCall) Do(opts ...googleapi.CallOption) (*ListConnectionsResponse, error) {
5183	gensupport.SetOptions(c.urlParams_, opts...)
5184	res, err := c.doRequest("json")
5185	if res != nil && res.StatusCode == http.StatusNotModified {
5186		if res.Body != nil {
5187			res.Body.Close()
5188		}
5189		return nil, &googleapi.Error{
5190			Code:   res.StatusCode,
5191			Header: res.Header,
5192		}
5193	}
5194	if err != nil {
5195		return nil, err
5196	}
5197	defer googleapi.CloseBody(res)
5198	if err := googleapi.CheckResponse(res); err != nil {
5199		return nil, err
5200	}
5201	ret := &ListConnectionsResponse{
5202		ServerResponse: googleapi.ServerResponse{
5203			Header:         res.Header,
5204			HTTPStatusCode: res.StatusCode,
5205		},
5206	}
5207	target := &ret
5208	if err := gensupport.DecodeResponse(target, res); err != nil {
5209		return nil, err
5210	}
5211	return ret, nil
5212	// {
5213	//   "description": "Provides a list of the authenticated user's contacts merged with any\nconnected profiles.\n\u003cbr\u003e\nThe request throws a 400 error if 'personFields' is not specified.",
5214	//   "flatPath": "v1/people/{peopleId}/connections",
5215	//   "httpMethod": "GET",
5216	//   "id": "people.people.connections.list",
5217	//   "parameterOrder": [
5218	//     "resourceName"
5219	//   ],
5220	//   "parameters": {
5221	//     "pageSize": {
5222	//       "description": "Optional. The number of connections to include in the response. Valid values are\nbetween 1 and 2000, inclusive. Defaults to 100 if not set or set to 0.",
5223	//       "format": "int32",
5224	//       "location": "query",
5225	//       "type": "integer"
5226	//     },
5227	//     "pageToken": {
5228	//       "description": "The token of the page to be returned.",
5229	//       "location": "query",
5230	//       "type": "string"
5231	//     },
5232	//     "personFields": {
5233	//       "description": "Required. A field mask to restrict which fields on each person are returned. Multiple\nfields can be specified by separating them with commas. Valid values are:\n\n* addresses\n* ageRanges\n* biographies\n* birthdays\n* braggingRights\n* coverPhotos\n* emailAddresses\n* events\n* genders\n* imClients\n* interests\n* locales\n* memberships\n* metadata\n* names\n* nicknames\n* occupations\n* organizations\n* phoneNumbers\n* photos\n* relations\n* relationshipInterests\n* relationshipStatuses\n* residences\n* sipAddresses\n* skills\n* taglines\n* urls\n* userDefined",
5234	//       "format": "google-fieldmask",
5235	//       "location": "query",
5236	//       "type": "string"
5237	//     },
5238	//     "requestMask.includeField": {
5239	//       "description": "Required. Comma-separated list of person fields to be included in the response. Each\npath should start with `person.`: for example, `person.names` or\n`person.photos`.",
5240	//       "format": "google-fieldmask",
5241	//       "location": "query",
5242	//       "type": "string"
5243	//     },
5244	//     "requestSyncToken": {
5245	//       "description": "Whether the response should include a sync token, which can be used to get\nall changes since the last request. For subsequent sync requests use the\n`sync_token` param instead. Initial sync requests that specify\n`request_sync_token` have an additional rate limit.",
5246	//       "location": "query",
5247	//       "type": "boolean"
5248	//     },
5249	//     "resourceName": {
5250	//       "description": "Required. The resource name to return connections for. Only `people/me` is valid.",
5251	//       "location": "path",
5252	//       "pattern": "^people/[^/]+$",
5253	//       "required": true,
5254	//       "type": "string"
5255	//     },
5256	//     "sortOrder": {
5257	//       "description": "The order in which the connections should be sorted. Defaults to\n`LAST_MODIFIED_ASCENDING`.",
5258	//       "enum": [
5259	//         "LAST_MODIFIED_ASCENDING",
5260	//         "LAST_MODIFIED_DESCENDING",
5261	//         "FIRST_NAME_ASCENDING",
5262	//         "LAST_NAME_ASCENDING"
5263	//       ],
5264	//       "location": "query",
5265	//       "type": "string"
5266	//     },
5267	//     "syncToken": {
5268	//       "description": "A sync token returned by a previous call to `people.connections.list`.\nOnly resources changed since the sync token was created will be returned.\nSync requests that specify `sync_token` have an additional rate limit.",
5269	//       "location": "query",
5270	//       "type": "string"
5271	//     }
5272	//   },
5273	//   "path": "v1/{+resourceName}/connections",
5274	//   "response": {
5275	//     "$ref": "ListConnectionsResponse"
5276	//   },
5277	//   "scopes": [
5278	//     "https://www.googleapis.com/auth/contacts",
5279	//     "https://www.googleapis.com/auth/contacts.readonly"
5280	//   ]
5281	// }
5282
5283}
5284
5285// Pages invokes f for each page of results.
5286// A non-nil error returned from f will halt the iteration.
5287// The provided context supersedes any context provided to the Context method.
5288func (c *PeopleConnectionsListCall) Pages(ctx context.Context, f func(*ListConnectionsResponse) error) error {
5289	c.ctx_ = ctx
5290	defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
5291	for {
5292		x, err := c.Do()
5293		if err != nil {
5294			return err
5295		}
5296		if err := f(x); err != nil {
5297			return err
5298		}
5299		if x.NextPageToken == "" {
5300			return nil
5301		}
5302		c.PageToken(x.NextPageToken)
5303	}
5304}
5305