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	gensupport "google.golang.org/api/gensupport"
57	googleapi "google.golang.org/api/googleapi"
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: The read-only 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: The read-only 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: The read-only 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: The total number of contacts in the group irrespective
490	// of max members in
491	// specified in the request.
492	MemberCount int64 `json:"memberCount,omitempty"`
493
494	// MemberResourceNames: The list of contact person resource names that
495	// 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: 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: The read-only contact group ID for the contact group
547	// 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 read-only metadata about a contact group.
588type ContactGroupMetadata struct {
589	// Deleted: True if the contact group resource has been deleted.
590	// 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: 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 read-only cover photo. A large image shown on
658// the 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: 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 calendar date, for example a date of birth.
723// The time
724// of day and time zone are either specified elsewhere or are
725// not
726// significant. The date is relative to the
727// [Proleptic Gregorian
728// Calendar](https://en.wikipedia.org/wiki/Proleptic_Gregorian_calendar).
729//
730// The day may be 0 to represent a year and month where the day is
731// not
732// significant. The year may be 0 to represent a month and day
733// independent
734// of year; for example, anniversary date.
735type Date struct {
736	// Day: Day of month. Must be from 1 to 31 and valid for the year and
737	// month, or 0
738	// if specifying a year by itself or a year and month where the day is
739	// not
740	// significant.
741	Day int64 `json:"day,omitempty"`
742
743	// Month: Month of year. Must be from 1 to 12, or 0 if specifying a year
744	// without a
745	// month and day.
746	Month int64 `json:"month,omitempty"`
747
748	// Year: Year of date. Must be from 1 to 9999, or 0 if specifying a date
749	// without
750	// a year.
751	Year int64 `json:"year,omitempty"`
752
753	// ForceSendFields is a list of field names (e.g. "Day") to
754	// unconditionally include in API requests. By default, fields with
755	// empty values are omitted from API requests. However, any non-pointer,
756	// non-interface field appearing in ForceSendFields will be sent to the
757	// server regardless of whether the field is empty or not. This may be
758	// used to include empty fields in Patch requests.
759	ForceSendFields []string `json:"-"`
760
761	// NullFields is a list of field names (e.g. "Day") to include in API
762	// requests with the JSON null value. By default, fields with empty
763	// values are omitted from API requests. However, any field with an
764	// empty value appearing in NullFields will be sent to the server as
765	// null. It is an error if a field in this list has a non-empty value.
766	// This may be used to include null fields in Patch requests.
767	NullFields []string `json:"-"`
768}
769
770func (s *Date) MarshalJSON() ([]byte, error) {
771	type NoMethod Date
772	raw := NoMethod(*s)
773	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
774}
775
776// DomainMembership: A read-only G Suite Domain membership.
777type DomainMembership struct {
778	// InViewerDomain: True if the person is in the viewer's G Suite domain.
779	InViewerDomain bool `json:"inViewerDomain,omitempty"`
780
781	// ForceSendFields is a list of field names (e.g. "InViewerDomain") to
782	// unconditionally include in API requests. By default, fields with
783	// empty values are omitted from API requests. However, any non-pointer,
784	// non-interface field appearing in ForceSendFields will be sent to the
785	// server regardless of whether the field is empty or not. This may be
786	// used to include empty fields in Patch requests.
787	ForceSendFields []string `json:"-"`
788
789	// NullFields is a list of field names (e.g. "InViewerDomain") to
790	// include in API requests with the JSON null value. By default, fields
791	// with empty values are omitted from API requests. However, any field
792	// with an empty value appearing in NullFields will be sent to the
793	// server as null. It is an error if a field in this list has a
794	// non-empty value. This may be used to include null fields in Patch
795	// requests.
796	NullFields []string `json:"-"`
797}
798
799func (s *DomainMembership) MarshalJSON() ([]byte, error) {
800	type NoMethod DomainMembership
801	raw := NoMethod(*s)
802	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
803}
804
805// EmailAddress: A person's email address.
806type EmailAddress struct {
807	// DisplayName: The display name of the email.
808	DisplayName string `json:"displayName,omitempty"`
809
810	// FormattedType: The read-only type of the email address translated and
811	// formatted in the
812	// viewer's account locale or the `Accept-Language` HTTP header locale.
813	FormattedType string `json:"formattedType,omitempty"`
814
815	// Metadata: Metadata about the email address.
816	Metadata *FieldMetadata `json:"metadata,omitempty"`
817
818	// Type: The type of the email address. The type can be custom or one of
819	// these
820	// predefined values:
821	//
822	// * `home`
823	// * `work`
824	// * `other`
825	Type string `json:"type,omitempty"`
826
827	// Value: The email address.
828	Value string `json:"value,omitempty"`
829
830	// ForceSendFields is a list of field names (e.g. "DisplayName") to
831	// unconditionally include in API requests. By default, fields with
832	// empty values are omitted from API requests. However, any non-pointer,
833	// non-interface field appearing in ForceSendFields will be sent to the
834	// server regardless of whether the field is empty or not. This may be
835	// used to include empty fields in Patch requests.
836	ForceSendFields []string `json:"-"`
837
838	// NullFields is a list of field names (e.g. "DisplayName") to include
839	// in API requests with the JSON null value. By default, fields with
840	// empty values are omitted from API requests. However, any field with
841	// an empty value appearing in NullFields will be sent to the server as
842	// null. It is an error if a field in this list has a non-empty value.
843	// This may be used to include null fields in Patch requests.
844	NullFields []string `json:"-"`
845}
846
847func (s *EmailAddress) MarshalJSON() ([]byte, error) {
848	type NoMethod EmailAddress
849	raw := NoMethod(*s)
850	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
851}
852
853// Empty: A generic empty message that you can re-use to avoid defining
854// duplicated
855// empty messages in your APIs. A typical example is to use it as the
856// request
857// or the response type of an API method. For instance:
858//
859//     service Foo {
860//       rpc Bar(google.protobuf.Empty) returns
861// (google.protobuf.Empty);
862//     }
863//
864// The JSON representation for `Empty` is empty JSON object `{}`.
865type Empty struct {
866	// ServerResponse contains the HTTP response code and headers from the
867	// server.
868	googleapi.ServerResponse `json:"-"`
869}
870
871// Event: An event related to the person.
872type Event struct {
873	// Date: The date of the event.
874	Date *Date `json:"date,omitempty"`
875
876	// FormattedType: The read-only type of the event translated and
877	// formatted in the
878	// viewer's account locale or the `Accept-Language` HTTP header locale.
879	FormattedType string `json:"formattedType,omitempty"`
880
881	// Metadata: Metadata about the event.
882	Metadata *FieldMetadata `json:"metadata,omitempty"`
883
884	// Type: The type of the event. The type can be custom or one of these
885	// predefined
886	// values:
887	//
888	// * `anniversary`
889	// * `other`
890	Type string `json:"type,omitempty"`
891
892	// ForceSendFields is a list of field names (e.g. "Date") to
893	// unconditionally include in API requests. By default, fields with
894	// empty values are omitted from API requests. However, any non-pointer,
895	// non-interface field appearing in ForceSendFields will be sent to the
896	// server regardless of whether the field is empty or not. This may be
897	// used to include empty fields in Patch requests.
898	ForceSendFields []string `json:"-"`
899
900	// NullFields is a list of field names (e.g. "Date") to include in API
901	// requests with the JSON null value. By default, fields with empty
902	// values are omitted from API requests. However, any field with an
903	// empty value appearing in NullFields will be sent to the server as
904	// null. It is an error if a field in this list has a non-empty value.
905	// This may be used to include null fields in Patch requests.
906	NullFields []string `json:"-"`
907}
908
909func (s *Event) MarshalJSON() ([]byte, error) {
910	type NoMethod Event
911	raw := NoMethod(*s)
912	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
913}
914
915// FieldMetadata: Metadata about a field.
916type FieldMetadata struct {
917	// Primary: True if the field is the primary field; false if the field
918	// is a secondary
919	// field.
920	Primary bool `json:"primary,omitempty"`
921
922	// Source: The source of the field.
923	Source *Source `json:"source,omitempty"`
924
925	// Verified: True if the field is verified; false if the field is
926	// unverified. A
927	// verified field is typically a name, email address, phone number,
928	// or
929	// website that has been confirmed to be owned by the person.
930	Verified bool `json:"verified,omitempty"`
931
932	// ForceSendFields is a list of field names (e.g. "Primary") to
933	// unconditionally include in API requests. By default, fields with
934	// empty values are omitted from API requests. However, any non-pointer,
935	// non-interface field appearing in ForceSendFields will be sent to the
936	// server regardless of whether the field is empty or not. This may be
937	// used to include empty fields in Patch requests.
938	ForceSendFields []string `json:"-"`
939
940	// NullFields is a list of field names (e.g. "Primary") to include in
941	// API requests with the JSON null value. By default, fields with empty
942	// values are omitted from API requests. However, any field with an
943	// empty value appearing in NullFields will be sent to the server as
944	// null. It is an error if a field in this list has a non-empty value.
945	// This may be used to include null fields in Patch requests.
946	NullFields []string `json:"-"`
947}
948
949func (s *FieldMetadata) MarshalJSON() ([]byte, error) {
950	type NoMethod FieldMetadata
951	raw := NoMethod(*s)
952	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
953}
954
955// Gender: A person's gender.
956type Gender struct {
957	// FormattedValue: The read-only value of the gender translated and
958	// formatted in the viewer's
959	// account locale or the `Accept-Language` HTTP header locale.
960	FormattedValue string `json:"formattedValue,omitempty"`
961
962	// Metadata: Metadata about the gender.
963	Metadata *FieldMetadata `json:"metadata,omitempty"`
964
965	// Value: The gender for the person. The gender can be custom or one of
966	// these
967	// predefined values:
968	//
969	// * `male`
970	// * `female`
971	// * `other`
972	// * `unknown`
973	Value string `json:"value,omitempty"`
974
975	// ForceSendFields is a list of field names (e.g. "FormattedValue") to
976	// unconditionally include in API requests. By default, fields with
977	// empty values are omitted from API requests. However, any non-pointer,
978	// non-interface field appearing in ForceSendFields will be sent to the
979	// server regardless of whether the field is empty or not. This may be
980	// used to include empty fields in Patch requests.
981	ForceSendFields []string `json:"-"`
982
983	// NullFields is a list of field names (e.g. "FormattedValue") to
984	// include in API requests with the JSON null value. By default, fields
985	// with empty values are omitted from API requests. However, any field
986	// with an empty value appearing in NullFields will be sent to the
987	// server as null. It is an error if a field in this list has a
988	// non-empty value. This may be used to include null fields in Patch
989	// requests.
990	NullFields []string `json:"-"`
991}
992
993func (s *Gender) MarshalJSON() ([]byte, error) {
994	type NoMethod Gender
995	raw := NoMethod(*s)
996	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
997}
998
999type GetPeopleResponse struct {
1000	// Responses: The response for each requested resource name.
1001	Responses []*PersonResponse `json:"responses,omitempty"`
1002
1003	// ServerResponse contains the HTTP response code and headers from the
1004	// server.
1005	googleapi.ServerResponse `json:"-"`
1006
1007	// ForceSendFields is a list of field names (e.g. "Responses") to
1008	// unconditionally include in API requests. By default, fields with
1009	// empty values are omitted from API requests. However, any non-pointer,
1010	// non-interface field appearing in ForceSendFields will be sent to the
1011	// server regardless of whether the field is empty or not. This may be
1012	// used to include empty fields in Patch requests.
1013	ForceSendFields []string `json:"-"`
1014
1015	// NullFields is a list of field names (e.g. "Responses") to include in
1016	// API requests with the JSON null value. By default, fields with empty
1017	// values are omitted from API requests. However, any field with an
1018	// empty value appearing in NullFields will be sent to the server as
1019	// null. It is an error if a field in this list has a non-empty value.
1020	// This may be used to include null fields in Patch requests.
1021	NullFields []string `json:"-"`
1022}
1023
1024func (s *GetPeopleResponse) MarshalJSON() ([]byte, error) {
1025	type NoMethod GetPeopleResponse
1026	raw := NoMethod(*s)
1027	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1028}
1029
1030// ImClient: A person's instant messaging client.
1031type ImClient struct {
1032	// FormattedProtocol: The read-only protocol of the IM client formatted
1033	// in the viewer's account
1034	// locale or the `Accept-Language` HTTP header locale.
1035	FormattedProtocol string `json:"formattedProtocol,omitempty"`
1036
1037	// FormattedType: The read-only type of the IM client translated and
1038	// formatted in the
1039	// viewer's account locale or the `Accept-Language` HTTP header locale.
1040	FormattedType string `json:"formattedType,omitempty"`
1041
1042	// Metadata: Metadata about the IM client.
1043	Metadata *FieldMetadata `json:"metadata,omitempty"`
1044
1045	// Protocol: The protocol of the IM client. The protocol can be custom
1046	// or one of these
1047	// predefined values:
1048	//
1049	// * `aim`
1050	// * `msn`
1051	// * `yahoo`
1052	// * `skype`
1053	// * `qq`
1054	// * `googleTalk`
1055	// * `icq`
1056	// * `jabber`
1057	// * `netMeeting`
1058	Protocol string `json:"protocol,omitempty"`
1059
1060	// Type: The type of the IM client. The type can be custom or one of
1061	// these
1062	// predefined values:
1063	//
1064	// * `home`
1065	// * `work`
1066	// * `other`
1067	Type string `json:"type,omitempty"`
1068
1069	// Username: The user name used in the IM client.
1070	Username string `json:"username,omitempty"`
1071
1072	// ForceSendFields is a list of field names (e.g. "FormattedProtocol")
1073	// to unconditionally include in API requests. By default, fields with
1074	// empty values are omitted from API requests. However, any non-pointer,
1075	// non-interface field appearing in ForceSendFields will be sent to the
1076	// server regardless of whether the field is empty or not. This may be
1077	// used to include empty fields in Patch requests.
1078	ForceSendFields []string `json:"-"`
1079
1080	// NullFields is a list of field names (e.g. "FormattedProtocol") to
1081	// include in API requests with the JSON null value. By default, fields
1082	// with empty values are omitted from API requests. However, any field
1083	// with an empty value appearing in NullFields will be sent to the
1084	// server as null. It is an error if a field in this list has a
1085	// non-empty value. This may be used to include null fields in Patch
1086	// requests.
1087	NullFields []string `json:"-"`
1088}
1089
1090func (s *ImClient) MarshalJSON() ([]byte, error) {
1091	type NoMethod ImClient
1092	raw := NoMethod(*s)
1093	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1094}
1095
1096// Interest: One of the person's interests.
1097type Interest struct {
1098	// Metadata: Metadata about the interest.
1099	Metadata *FieldMetadata `json:"metadata,omitempty"`
1100
1101	// Value: The interest; for example, `stargazing`.
1102	Value string `json:"value,omitempty"`
1103
1104	// ForceSendFields is a list of field names (e.g. "Metadata") to
1105	// unconditionally include in API requests. By default, fields with
1106	// empty values are omitted from API requests. However, any non-pointer,
1107	// non-interface field appearing in ForceSendFields will be sent to the
1108	// server regardless of whether the field is empty or not. This may be
1109	// used to include empty fields in Patch requests.
1110	ForceSendFields []string `json:"-"`
1111
1112	// NullFields is a list of field names (e.g. "Metadata") to include in
1113	// API requests with the JSON null value. By default, fields with empty
1114	// values are omitted from API requests. However, any field with an
1115	// empty value appearing in NullFields will be sent to the server as
1116	// null. It is an error if a field in this list has a non-empty value.
1117	// This may be used to include null fields in Patch requests.
1118	NullFields []string `json:"-"`
1119}
1120
1121func (s *Interest) MarshalJSON() ([]byte, error) {
1122	type NoMethod Interest
1123	raw := NoMethod(*s)
1124	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1125}
1126
1127type ListConnectionsResponse struct {
1128	// Connections: The list of people that the requestor is connected to.
1129	Connections []*Person `json:"connections,omitempty"`
1130
1131	// NextPageToken: The token that can be used to retrieve the next page
1132	// of results.
1133	NextPageToken string `json:"nextPageToken,omitempty"`
1134
1135	// NextSyncToken: The token that can be used to retrieve changes since
1136	// the last request.
1137	NextSyncToken string `json:"nextSyncToken,omitempty"`
1138
1139	// TotalItems: The total number of items in the list without pagination.
1140	TotalItems int64 `json:"totalItems,omitempty"`
1141
1142	// TotalPeople: **DEPRECATED** (Please use totalItems)
1143	// The total number of people in the list without pagination.
1144	TotalPeople int64 `json:"totalPeople,omitempty"`
1145
1146	// ServerResponse contains the HTTP response code and headers from the
1147	// server.
1148	googleapi.ServerResponse `json:"-"`
1149
1150	// ForceSendFields is a list of field names (e.g. "Connections") to
1151	// unconditionally include in API requests. By default, fields with
1152	// empty values are omitted from API requests. However, any non-pointer,
1153	// non-interface field appearing in ForceSendFields will be sent to the
1154	// server regardless of whether the field is empty or not. This may be
1155	// used to include empty fields in Patch requests.
1156	ForceSendFields []string `json:"-"`
1157
1158	// NullFields is a list of field names (e.g. "Connections") to include
1159	// in API requests with the JSON null value. By default, fields with
1160	// empty values are omitted from API requests. However, any field with
1161	// an empty value appearing in NullFields will be sent to the server as
1162	// null. It is an error if a field in this list has a non-empty value.
1163	// This may be used to include null fields in Patch requests.
1164	NullFields []string `json:"-"`
1165}
1166
1167func (s *ListConnectionsResponse) MarshalJSON() ([]byte, error) {
1168	type NoMethod ListConnectionsResponse
1169	raw := NoMethod(*s)
1170	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1171}
1172
1173// ListContactGroupsResponse: The response to a list contact groups
1174// request.
1175type ListContactGroupsResponse struct {
1176	// ContactGroups: The list of contact groups. Members of the contact
1177	// groups are not
1178	// populated.
1179	ContactGroups []*ContactGroup `json:"contactGroups,omitempty"`
1180
1181	// NextPageToken: The token that can be used to retrieve the next page
1182	// of results.
1183	NextPageToken string `json:"nextPageToken,omitempty"`
1184
1185	// NextSyncToken: The token that can be used to retrieve changes since
1186	// the last request.
1187	NextSyncToken string `json:"nextSyncToken,omitempty"`
1188
1189	// TotalItems: The total number of items in the list without pagination.
1190	TotalItems int64 `json:"totalItems,omitempty"`
1191
1192	// ServerResponse contains the HTTP response code and headers from the
1193	// server.
1194	googleapi.ServerResponse `json:"-"`
1195
1196	// ForceSendFields is a list of field names (e.g. "ContactGroups") to
1197	// unconditionally include in API requests. By default, fields with
1198	// empty values are omitted from API requests. However, any non-pointer,
1199	// non-interface field appearing in ForceSendFields will be sent to the
1200	// server regardless of whether the field is empty or not. This may be
1201	// used to include empty fields in Patch requests.
1202	ForceSendFields []string `json:"-"`
1203
1204	// NullFields is a list of field names (e.g. "ContactGroups") to include
1205	// in API requests with the JSON null value. By default, fields with
1206	// empty values are omitted from API requests. However, any field with
1207	// an empty value appearing in NullFields will be sent to the server as
1208	// null. It is an error if a field in this list has a non-empty value.
1209	// This may be used to include null fields in Patch requests.
1210	NullFields []string `json:"-"`
1211}
1212
1213func (s *ListContactGroupsResponse) MarshalJSON() ([]byte, error) {
1214	type NoMethod ListContactGroupsResponse
1215	raw := NoMethod(*s)
1216	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1217}
1218
1219// Locale: A person's locale preference.
1220type Locale struct {
1221	// Metadata: Metadata about the locale.
1222	Metadata *FieldMetadata `json:"metadata,omitempty"`
1223
1224	// Value: The well-formed [IETF BCP
1225	// 47](https://tools.ietf.org/html/bcp47)
1226	// language tag representing the locale.
1227	Value string `json:"value,omitempty"`
1228
1229	// ForceSendFields is a list of field names (e.g. "Metadata") to
1230	// unconditionally include in API requests. By default, fields with
1231	// empty values are omitted from API requests. However, any non-pointer,
1232	// non-interface field appearing in ForceSendFields will be sent to the
1233	// server regardless of whether the field is empty or not. This may be
1234	// used to include empty fields in Patch requests.
1235	ForceSendFields []string `json:"-"`
1236
1237	// NullFields is a list of field names (e.g. "Metadata") to include in
1238	// API requests with the JSON null value. By default, fields with empty
1239	// values are omitted from API requests. However, any field with an
1240	// empty value appearing in NullFields will be sent to the server as
1241	// null. It is an error if a field in this list has a non-empty value.
1242	// This may be used to include null fields in Patch requests.
1243	NullFields []string `json:"-"`
1244}
1245
1246func (s *Locale) MarshalJSON() ([]byte, error) {
1247	type NoMethod Locale
1248	raw := NoMethod(*s)
1249	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1250}
1251
1252// Membership: A person's membership in a group. Only contact group
1253// memberships can be
1254// modified.
1255type Membership struct {
1256	// ContactGroupMembership: The contact group membership.
1257	ContactGroupMembership *ContactGroupMembership `json:"contactGroupMembership,omitempty"`
1258
1259	// DomainMembership: The read-only domain membership.
1260	DomainMembership *DomainMembership `json:"domainMembership,omitempty"`
1261
1262	// Metadata: Metadata about the membership.
1263	Metadata *FieldMetadata `json:"metadata,omitempty"`
1264
1265	// ForceSendFields is a list of field names (e.g.
1266	// "ContactGroupMembership") to unconditionally include in API requests.
1267	// By default, fields with empty values are omitted from API requests.
1268	// However, any non-pointer, non-interface field appearing in
1269	// ForceSendFields will be sent to the server regardless of whether the
1270	// field is empty or not. This may be used to include empty fields in
1271	// Patch requests.
1272	ForceSendFields []string `json:"-"`
1273
1274	// NullFields is a list of field names (e.g. "ContactGroupMembership")
1275	// to include in API requests with the JSON null value. By default,
1276	// fields with empty values are omitted from API requests. However, any
1277	// field with an empty value appearing in NullFields will be sent to the
1278	// server as null. It is an error if a field in this list has a
1279	// non-empty value. This may be used to include null fields in Patch
1280	// requests.
1281	NullFields []string `json:"-"`
1282}
1283
1284func (s *Membership) MarshalJSON() ([]byte, error) {
1285	type NoMethod Membership
1286	raw := NoMethod(*s)
1287	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1288}
1289
1290// ModifyContactGroupMembersRequest: A request to modify an existing
1291// contact group's members. Contacts can be
1292// removed from any group but they can only be added to a user group
1293// or
1294// "myContacts" or "starred" system groups.
1295type ModifyContactGroupMembersRequest struct {
1296	// ResourceNamesToAdd: The resource names of the contact people to add
1297	// in the form of in the form
1298	// `people/`<var>person_id</var>.
1299	ResourceNamesToAdd []string `json:"resourceNamesToAdd,omitempty"`
1300
1301	// ResourceNamesToRemove: The resource names of the contact people to
1302	// remove in the form of in the
1303	// form of `people/`<var>person_id</var>.
1304	ResourceNamesToRemove []string `json:"resourceNamesToRemove,omitempty"`
1305
1306	// ForceSendFields is a list of field names (e.g. "ResourceNamesToAdd")
1307	// to unconditionally include in API requests. By default, fields with
1308	// empty values are omitted from API requests. However, any non-pointer,
1309	// non-interface field appearing in ForceSendFields will be sent to the
1310	// server regardless of whether the field is empty or not. This may be
1311	// used to include empty fields in Patch requests.
1312	ForceSendFields []string `json:"-"`
1313
1314	// NullFields is a list of field names (e.g. "ResourceNamesToAdd") to
1315	// include in API requests with the JSON null value. By default, fields
1316	// with empty values are omitted from API requests. However, any field
1317	// with an empty value appearing in NullFields will be sent to the
1318	// server as null. It is an error if a field in this list has a
1319	// non-empty value. This may be used to include null fields in Patch
1320	// requests.
1321	NullFields []string `json:"-"`
1322}
1323
1324func (s *ModifyContactGroupMembersRequest) MarshalJSON() ([]byte, error) {
1325	type NoMethod ModifyContactGroupMembersRequest
1326	raw := NoMethod(*s)
1327	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1328}
1329
1330// ModifyContactGroupMembersResponse: The response to a modify contact
1331// group members request.
1332type ModifyContactGroupMembersResponse struct {
1333	// NotFoundResourceNames: The contact people resource names that were
1334	// not found.
1335	NotFoundResourceNames []string `json:"notFoundResourceNames,omitempty"`
1336
1337	// ServerResponse contains the HTTP response code and headers from the
1338	// server.
1339	googleapi.ServerResponse `json:"-"`
1340
1341	// ForceSendFields is a list of field names (e.g.
1342	// "NotFoundResourceNames") to unconditionally include in API requests.
1343	// By default, fields with empty values are omitted from API requests.
1344	// However, any non-pointer, non-interface field appearing in
1345	// ForceSendFields will be sent to the server regardless of whether the
1346	// field is empty or not. This may be used to include empty fields in
1347	// Patch requests.
1348	ForceSendFields []string `json:"-"`
1349
1350	// NullFields is a list of field names (e.g. "NotFoundResourceNames") to
1351	// include in API requests with the JSON null value. By default, fields
1352	// with empty values are omitted from API requests. However, any field
1353	// with an empty value appearing in NullFields will be sent to the
1354	// server as null. It is an error if a field in this list has a
1355	// non-empty value. This may be used to include null fields in Patch
1356	// requests.
1357	NullFields []string `json:"-"`
1358}
1359
1360func (s *ModifyContactGroupMembersResponse) MarshalJSON() ([]byte, error) {
1361	type NoMethod ModifyContactGroupMembersResponse
1362	raw := NoMethod(*s)
1363	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1364}
1365
1366// Name: A person's name. If the name is a mononym, the family name is
1367// empty.
1368type Name struct {
1369	// DisplayName: The read-only display name formatted according to the
1370	// locale specified by
1371	// the viewer's account or the `Accept-Language` HTTP header.
1372	DisplayName string `json:"displayName,omitempty"`
1373
1374	// DisplayNameLastFirst: The read-only display name with the last name
1375	// first formatted according to
1376	// the locale specified by the viewer's account or the
1377	// `Accept-Language` HTTP header.
1378	DisplayNameLastFirst string `json:"displayNameLastFirst,omitempty"`
1379
1380	// FamilyName: The family name.
1381	FamilyName string `json:"familyName,omitempty"`
1382
1383	// GivenName: The given name.
1384	GivenName string `json:"givenName,omitempty"`
1385
1386	// HonorificPrefix: The honorific prefixes, such as `Mrs.` or `Dr.`
1387	HonorificPrefix string `json:"honorificPrefix,omitempty"`
1388
1389	// HonorificSuffix: The honorific suffixes, such as `Jr.`
1390	HonorificSuffix string `json:"honorificSuffix,omitempty"`
1391
1392	// Metadata: Metadata about the name.
1393	Metadata *FieldMetadata `json:"metadata,omitempty"`
1394
1395	// MiddleName: The middle name(s).
1396	MiddleName string `json:"middleName,omitempty"`
1397
1398	// PhoneticFamilyName: The family name spelled as it sounds.
1399	PhoneticFamilyName string `json:"phoneticFamilyName,omitempty"`
1400
1401	// PhoneticFullName: The full name spelled as it sounds.
1402	PhoneticFullName string `json:"phoneticFullName,omitempty"`
1403
1404	// PhoneticGivenName: The given name spelled as it sounds.
1405	PhoneticGivenName string `json:"phoneticGivenName,omitempty"`
1406
1407	// PhoneticHonorificPrefix: The honorific prefixes spelled as they
1408	// sound.
1409	PhoneticHonorificPrefix string `json:"phoneticHonorificPrefix,omitempty"`
1410
1411	// PhoneticHonorificSuffix: The honorific suffixes spelled as they
1412	// sound.
1413	PhoneticHonorificSuffix string `json:"phoneticHonorificSuffix,omitempty"`
1414
1415	// PhoneticMiddleName: The middle name(s) spelled as they sound.
1416	PhoneticMiddleName string `json:"phoneticMiddleName,omitempty"`
1417
1418	// ForceSendFields is a list of field names (e.g. "DisplayName") to
1419	// unconditionally include in API requests. By default, fields with
1420	// empty values are omitted from API requests. However, any non-pointer,
1421	// non-interface field appearing in ForceSendFields will be sent to the
1422	// server regardless of whether the field is empty or not. This may be
1423	// used to include empty fields in Patch requests.
1424	ForceSendFields []string `json:"-"`
1425
1426	// NullFields is a list of field names (e.g. "DisplayName") to include
1427	// in API requests with the JSON null value. By default, fields with
1428	// empty values are omitted from API requests. However, any field with
1429	// an empty value appearing in NullFields will be sent to the server as
1430	// null. It is an error if a field in this list has a non-empty value.
1431	// This may be used to include null fields in Patch requests.
1432	NullFields []string `json:"-"`
1433}
1434
1435func (s *Name) MarshalJSON() ([]byte, error) {
1436	type NoMethod Name
1437	raw := NoMethod(*s)
1438	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1439}
1440
1441// Nickname: A person's nickname.
1442type Nickname struct {
1443	// Metadata: Metadata about the nickname.
1444	Metadata *FieldMetadata `json:"metadata,omitempty"`
1445
1446	// Type: The type of the nickname.
1447	//
1448	// Possible values:
1449	//   "DEFAULT" - Generic nickname.
1450	//   "MAIDEN_NAME" - Maiden name or birth family name. Used when the
1451	// person's family name has
1452	// changed as a result of marriage.
1453	//   "INITIALS" - Initials.
1454	//   "GPLUS" - Google+ profile nickname.
1455	//   "OTHER_NAME" - A professional affiliation or other name; for
1456	// example, `Dr. Smith.`
1457	Type string `json:"type,omitempty"`
1458
1459	// Value: The nickname.
1460	Value string `json:"value,omitempty"`
1461
1462	// ForceSendFields is a list of field names (e.g. "Metadata") to
1463	// unconditionally include in API requests. By default, fields with
1464	// empty values are omitted from API requests. However, any non-pointer,
1465	// non-interface field appearing in ForceSendFields will be sent to the
1466	// server regardless of whether the field is empty or not. This may be
1467	// used to include empty fields in Patch requests.
1468	ForceSendFields []string `json:"-"`
1469
1470	// NullFields is a list of field names (e.g. "Metadata") to include in
1471	// API requests with the JSON null value. By default, fields with empty
1472	// values are omitted from API requests. However, any field with an
1473	// empty value appearing in NullFields will be sent to the server as
1474	// null. It is an error if a field in this list has a non-empty value.
1475	// This may be used to include null fields in Patch requests.
1476	NullFields []string `json:"-"`
1477}
1478
1479func (s *Nickname) MarshalJSON() ([]byte, error) {
1480	type NoMethod Nickname
1481	raw := NoMethod(*s)
1482	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1483}
1484
1485// Occupation: A person's occupation.
1486type Occupation struct {
1487	// Metadata: Metadata about the occupation.
1488	Metadata *FieldMetadata `json:"metadata,omitempty"`
1489
1490	// Value: The occupation; for example, `carpenter`.
1491	Value string `json:"value,omitempty"`
1492
1493	// ForceSendFields is a list of field names (e.g. "Metadata") to
1494	// unconditionally include in API requests. By default, fields with
1495	// empty values are omitted from API requests. However, any non-pointer,
1496	// non-interface field appearing in ForceSendFields will be sent to the
1497	// server regardless of whether the field is empty or not. This may be
1498	// used to include empty fields in Patch requests.
1499	ForceSendFields []string `json:"-"`
1500
1501	// NullFields is a list of field names (e.g. "Metadata") to include in
1502	// API requests with the JSON null value. By default, fields with empty
1503	// values are omitted from API requests. However, any field with an
1504	// empty value appearing in NullFields will be sent to the server as
1505	// null. It is an error if a field in this list has a non-empty value.
1506	// This may be used to include null fields in Patch requests.
1507	NullFields []string `json:"-"`
1508}
1509
1510func (s *Occupation) MarshalJSON() ([]byte, error) {
1511	type NoMethod Occupation
1512	raw := NoMethod(*s)
1513	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1514}
1515
1516// Organization: A person's past or current organization. Overlapping
1517// date ranges are
1518// permitted.
1519type Organization struct {
1520	// Current: True if the organization is the person's current
1521	// organization;
1522	// false if the organization is a past organization.
1523	Current bool `json:"current,omitempty"`
1524
1525	// Department: The person's department at the organization.
1526	Department string `json:"department,omitempty"`
1527
1528	// Domain: The domain name associated with the organization; for
1529	// example,
1530	// `google.com`.
1531	Domain string `json:"domain,omitempty"`
1532
1533	// EndDate: The end date when the person left the organization.
1534	EndDate *Date `json:"endDate,omitempty"`
1535
1536	// FormattedType: The read-only type of the organization translated and
1537	// formatted in the
1538	// viewer's account locale or the `Accept-Language` HTTP header locale.
1539	FormattedType string `json:"formattedType,omitempty"`
1540
1541	// JobDescription: The person's job description at the organization.
1542	JobDescription string `json:"jobDescription,omitempty"`
1543
1544	// Location: The location of the organization office the person works
1545	// at.
1546	Location string `json:"location,omitempty"`
1547
1548	// Metadata: Metadata about the organization.
1549	Metadata *FieldMetadata `json:"metadata,omitempty"`
1550
1551	// Name: The name of the organization.
1552	Name string `json:"name,omitempty"`
1553
1554	// PhoneticName: The phonetic name of the organization.
1555	PhoneticName string `json:"phoneticName,omitempty"`
1556
1557	// StartDate: The start date when the person joined the organization.
1558	StartDate *Date `json:"startDate,omitempty"`
1559
1560	// Symbol: The symbol associated with the organization; for example, a
1561	// stock ticker
1562	// symbol, abbreviation, or acronym.
1563	Symbol string `json:"symbol,omitempty"`
1564
1565	// Title: The person's job title at the organization.
1566	Title string `json:"title,omitempty"`
1567
1568	// Type: The type of the organization. The type can be custom or  one of
1569	// these
1570	// predefined values:
1571	//
1572	// * `work`
1573	// * `school`
1574	Type string `json:"type,omitempty"`
1575
1576	// ForceSendFields is a list of field names (e.g. "Current") to
1577	// unconditionally include in API requests. By default, fields with
1578	// empty values are omitted from API requests. However, any non-pointer,
1579	// non-interface field appearing in ForceSendFields will be sent to the
1580	// server regardless of whether the field is empty or not. This may be
1581	// used to include empty fields in Patch requests.
1582	ForceSendFields []string `json:"-"`
1583
1584	// NullFields is a list of field names (e.g. "Current") to include in
1585	// API requests with the JSON null value. By default, fields with empty
1586	// values are omitted from API requests. However, any field with an
1587	// empty value appearing in NullFields will be sent to the server as
1588	// null. It is an error if a field in this list has a non-empty value.
1589	// This may be used to include null fields in Patch requests.
1590	NullFields []string `json:"-"`
1591}
1592
1593func (s *Organization) MarshalJSON() ([]byte, error) {
1594	type NoMethod Organization
1595	raw := NoMethod(*s)
1596	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1597}
1598
1599// Person: Information about a person merged from various data sources
1600// such as the
1601// authenticated user's contacts and profile data.
1602//
1603// Most fields can have multiple items. The items in a field have no
1604// guaranteed
1605// order, but each non-empty field is guaranteed to have exactly one
1606// field with
1607// `metadata.primary` set to true.
1608type Person struct {
1609	// Addresses: The person's street addresses.
1610	Addresses []*Address `json:"addresses,omitempty"`
1611
1612	// AgeRange: **DEPRECATED** (Please use `person.ageRanges`
1613	// instead)**
1614	//
1615	// The person's read-only age range.
1616	//
1617	// Possible values:
1618	//   "AGE_RANGE_UNSPECIFIED" - Unspecified.
1619	//   "LESS_THAN_EIGHTEEN" - Younger than eighteen.
1620	//   "EIGHTEEN_TO_TWENTY" - Between eighteen and twenty.
1621	//   "TWENTY_ONE_OR_OLDER" - Twenty-one and older.
1622	AgeRange string `json:"ageRange,omitempty"`
1623
1624	// AgeRanges: The person's read-only age ranges.
1625	AgeRanges []*AgeRangeType `json:"ageRanges,omitempty"`
1626
1627	// Biographies: The person's biographies.
1628	Biographies []*Biography `json:"biographies,omitempty"`
1629
1630	// Birthdays: The person's birthdays.
1631	Birthdays []*Birthday `json:"birthdays,omitempty"`
1632
1633	// BraggingRights: The person's bragging rights.
1634	BraggingRights []*BraggingRights `json:"braggingRights,omitempty"`
1635
1636	// CoverPhotos: The person's read-only cover photos.
1637	CoverPhotos []*CoverPhoto `json:"coverPhotos,omitempty"`
1638
1639	// EmailAddresses: The person's email addresses.
1640	EmailAddresses []*EmailAddress `json:"emailAddresses,omitempty"`
1641
1642	// Etag: The [HTTP entity tag](https://en.wikipedia.org/wiki/HTTP_ETag)
1643	// of the
1644	// resource. Used for web cache validation.
1645	Etag string `json:"etag,omitempty"`
1646
1647	// Events: The person's events.
1648	Events []*Event `json:"events,omitempty"`
1649
1650	// Genders: The person's genders.
1651	Genders []*Gender `json:"genders,omitempty"`
1652
1653	// ImClients: The person's instant messaging clients.
1654	ImClients []*ImClient `json:"imClients,omitempty"`
1655
1656	// Interests: The person's interests.
1657	Interests []*Interest `json:"interests,omitempty"`
1658
1659	// Locales: The person's locale preferences.
1660	Locales []*Locale `json:"locales,omitempty"`
1661
1662	// Memberships: The person's group memberships.
1663	Memberships []*Membership `json:"memberships,omitempty"`
1664
1665	// Metadata: Read-only metadata about the person.
1666	Metadata *PersonMetadata `json:"metadata,omitempty"`
1667
1668	// Names: The person's names.
1669	Names []*Name `json:"names,omitempty"`
1670
1671	// Nicknames: The person's nicknames.
1672	Nicknames []*Nickname `json:"nicknames,omitempty"`
1673
1674	// Occupations: The person's occupations.
1675	Occupations []*Occupation `json:"occupations,omitempty"`
1676
1677	// Organizations: The person's past or current organizations.
1678	Organizations []*Organization `json:"organizations,omitempty"`
1679
1680	// PhoneNumbers: The person's phone numbers.
1681	PhoneNumbers []*PhoneNumber `json:"phoneNumbers,omitempty"`
1682
1683	// Photos: The person's read-only photos.
1684	Photos []*Photo `json:"photos,omitempty"`
1685
1686	// Relations: The person's relations.
1687	Relations []*Relation `json:"relations,omitempty"`
1688
1689	// RelationshipInterests: The person's read-only relationship interests.
1690	RelationshipInterests []*RelationshipInterest `json:"relationshipInterests,omitempty"`
1691
1692	// RelationshipStatuses: The person's read-only relationship statuses.
1693	RelationshipStatuses []*RelationshipStatus `json:"relationshipStatuses,omitempty"`
1694
1695	// Residences: The person's residences.
1696	Residences []*Residence `json:"residences,omitempty"`
1697
1698	// ResourceName: The resource name for the person, assigned by the
1699	// server. An ASCII string
1700	// with a max length of 27 characters, in the form
1701	// of
1702	// `people/`<var>person_id</var>.
1703	ResourceName string `json:"resourceName,omitempty"`
1704
1705	// SipAddresses: The person's SIP addresses.
1706	SipAddresses []*SipAddress `json:"sipAddresses,omitempty"`
1707
1708	// Skills: The person's skills.
1709	Skills []*Skill `json:"skills,omitempty"`
1710
1711	// Taglines: The person's read-only taglines.
1712	Taglines []*Tagline `json:"taglines,omitempty"`
1713
1714	// Urls: The person's associated URLs.
1715	Urls []*Url `json:"urls,omitempty"`
1716
1717	// UserDefined: The person's user defined data.
1718	UserDefined []*UserDefined `json:"userDefined,omitempty"`
1719
1720	// ServerResponse contains the HTTP response code and headers from the
1721	// server.
1722	googleapi.ServerResponse `json:"-"`
1723
1724	// ForceSendFields is a list of field names (e.g. "Addresses") to
1725	// unconditionally include in API requests. By default, fields with
1726	// empty values are omitted from API requests. However, any non-pointer,
1727	// non-interface field appearing in ForceSendFields will be sent to the
1728	// server regardless of whether the field is empty or not. This may be
1729	// used to include empty fields in Patch requests.
1730	ForceSendFields []string `json:"-"`
1731
1732	// NullFields is a list of field names (e.g. "Addresses") to include in
1733	// API requests with the JSON null value. By default, fields with empty
1734	// values are omitted from API requests. However, any field with an
1735	// empty value appearing in NullFields will be sent to the server as
1736	// null. It is an error if a field in this list has a non-empty value.
1737	// This may be used to include null fields in Patch requests.
1738	NullFields []string `json:"-"`
1739}
1740
1741func (s *Person) MarshalJSON() ([]byte, error) {
1742	type NoMethod Person
1743	raw := NoMethod(*s)
1744	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1745}
1746
1747// PersonMetadata: The read-only metadata about a person.
1748type PersonMetadata struct {
1749	// Deleted: True if the person resource has been deleted. Populated only
1750	// for
1751	// [`connections.list`](/people/api/rest/v1/people.connections/list)
1752	// requests
1753	// that include a sync token.
1754	Deleted bool `json:"deleted,omitempty"`
1755
1756	// LinkedPeopleResourceNames: Resource names of people linked to this
1757	// resource.
1758	LinkedPeopleResourceNames []string `json:"linkedPeopleResourceNames,omitempty"`
1759
1760	// ObjectType: **DEPRECATED** (Please
1761	// use
1762	// `person.metadata.sources.profileMetadata.objectType` instead)
1763	//
1764	// The type of the person object.
1765	//
1766	// Possible values:
1767	//   "OBJECT_TYPE_UNSPECIFIED" - Unspecified.
1768	//   "PERSON" - Person.
1769	//   "PAGE" - [Google+ Page.](http://www.google.com/+/brands/)
1770	ObjectType string `json:"objectType,omitempty"`
1771
1772	// PreviousResourceNames: Any former resource names this person has had.
1773	// Populated only
1774	// for
1775	// [`connections.list`](/people/api/rest/v1/people.connections/list)
1776	// requests
1777	// that include a sync token.
1778	//
1779	// The resource name may change when adding or removing fields that link
1780	// a
1781	// contact and profile such as a verified email, verified phone number,
1782	// or
1783	// profile URL.
1784	PreviousResourceNames []string `json:"previousResourceNames,omitempty"`
1785
1786	// Sources: The sources of data for the person.
1787	Sources []*Source `json:"sources,omitempty"`
1788
1789	// ForceSendFields is a list of field names (e.g. "Deleted") to
1790	// unconditionally include in API requests. By default, fields with
1791	// empty values are omitted from API requests. However, any non-pointer,
1792	// non-interface field appearing in ForceSendFields will be sent to the
1793	// server regardless of whether the field is empty or not. This may be
1794	// used to include empty fields in Patch requests.
1795	ForceSendFields []string `json:"-"`
1796
1797	// NullFields is a list of field names (e.g. "Deleted") to include in
1798	// API requests with the JSON null value. By default, fields with empty
1799	// values are omitted from API requests. However, any field with an
1800	// empty value appearing in NullFields will be sent to the server as
1801	// null. It is an error if a field in this list has a non-empty value.
1802	// This may be used to include null fields in Patch requests.
1803	NullFields []string `json:"-"`
1804}
1805
1806func (s *PersonMetadata) MarshalJSON() ([]byte, error) {
1807	type NoMethod PersonMetadata
1808	raw := NoMethod(*s)
1809	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1810}
1811
1812// PersonResponse: The response for a single person
1813type PersonResponse struct {
1814	// HttpStatusCode: **DEPRECATED** (Please use status instead)
1815	//
1816	// [HTTP 1.1 status
1817	// code]
1818	// (http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html).
1819	HttpStatusCode int64 `json:"httpStatusCode,omitempty"`
1820
1821	// Person: The person.
1822	Person *Person `json:"person,omitempty"`
1823
1824	// RequestedResourceName: The original requested resource name. May be
1825	// different than the resource
1826	// name on the returned person.
1827	//
1828	// The resource name can change when adding or removing fields that link
1829	// a
1830	// contact and profile such as a verified email, verified phone number,
1831	// or a
1832	// profile URL.
1833	RequestedResourceName string `json:"requestedResourceName,omitempty"`
1834
1835	// Status: The status of the response.
1836	Status *Status `json:"status,omitempty"`
1837
1838	// ForceSendFields is a list of field names (e.g. "HttpStatusCode") to
1839	// unconditionally include in API requests. By default, fields with
1840	// empty values are omitted from API requests. However, any non-pointer,
1841	// non-interface field appearing in ForceSendFields will be sent to the
1842	// server regardless of whether the field is empty or not. This may be
1843	// used to include empty fields in Patch requests.
1844	ForceSendFields []string `json:"-"`
1845
1846	// NullFields is a list of field names (e.g. "HttpStatusCode") to
1847	// include in API requests with the JSON null value. By default, fields
1848	// with empty values are omitted from API requests. However, any field
1849	// with an empty value appearing in NullFields will be sent to the
1850	// server as null. It is an error if a field in this list has a
1851	// non-empty value. This may be used to include null fields in Patch
1852	// requests.
1853	NullFields []string `json:"-"`
1854}
1855
1856func (s *PersonResponse) MarshalJSON() ([]byte, error) {
1857	type NoMethod PersonResponse
1858	raw := NoMethod(*s)
1859	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1860}
1861
1862// PhoneNumber: A person's phone number.
1863type PhoneNumber struct {
1864	// CanonicalForm: The read-only canonicalized
1865	// [ITU-T
1866	// E.164](https://law.resource.org/pub/us/cfr/ibr/004/itu-t.E.164.
1867	// 1.2008.pdf)
1868	// form of the phone number.
1869	CanonicalForm string `json:"canonicalForm,omitempty"`
1870
1871	// FormattedType: The read-only type of the phone number translated and
1872	// formatted in the
1873	// viewer's account locale or the `Accept-Language` HTTP header locale.
1874	FormattedType string `json:"formattedType,omitempty"`
1875
1876	// Metadata: Metadata about the phone number.
1877	Metadata *FieldMetadata `json:"metadata,omitempty"`
1878
1879	// Type: The type of the phone number. The type can be custom or one of
1880	// these
1881	// predefined values:
1882	//
1883	// * `home`
1884	// * `work`
1885	// * `mobile`
1886	// * `homeFax`
1887	// * `workFax`
1888	// * `otherFax`
1889	// * `pager`
1890	// * `workMobile`
1891	// * `workPager`
1892	// * `main`
1893	// * `googleVoice`
1894	// * `other`
1895	Type string `json:"type,omitempty"`
1896
1897	// Value: The phone number.
1898	Value string `json:"value,omitempty"`
1899
1900	// ForceSendFields is a list of field names (e.g. "CanonicalForm") to
1901	// unconditionally include in API requests. By default, fields with
1902	// empty values are omitted from API requests. However, any non-pointer,
1903	// non-interface field appearing in ForceSendFields will be sent to the
1904	// server regardless of whether the field is empty or not. This may be
1905	// used to include empty fields in Patch requests.
1906	ForceSendFields []string `json:"-"`
1907
1908	// NullFields is a list of field names (e.g. "CanonicalForm") to include
1909	// in API requests with the JSON null value. By default, fields with
1910	// empty values are omitted from API requests. However, any field with
1911	// an empty value appearing in NullFields will be sent to the server as
1912	// null. It is an error if a field in this list has a non-empty value.
1913	// This may be used to include null fields in Patch requests.
1914	NullFields []string `json:"-"`
1915}
1916
1917func (s *PhoneNumber) MarshalJSON() ([]byte, error) {
1918	type NoMethod PhoneNumber
1919	raw := NoMethod(*s)
1920	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1921}
1922
1923// Photo: A person's read-only photo. A picture shown next to the
1924// person's name to
1925// help others recognize the person.
1926type Photo struct {
1927	// Default: True if the photo is a default photo;
1928	// false if the photo is a user-provided photo.
1929	Default bool `json:"default,omitempty"`
1930
1931	// Metadata: Metadata about the photo.
1932	Metadata *FieldMetadata `json:"metadata,omitempty"`
1933
1934	// Url: The URL of the photo. You can change the desired size by
1935	// appending a query
1936	// parameter `sz=`<var>size</var> at the end of the url.
1937	// Example:
1938	// `https://lh3.googleusercontent.com/-T_wVWLlmg7w/AAAAAAAAAAI/A
1939	// AAAAAAABa8/00gzXvDBYqw/s100/photo.jpg?sz=50`
1940	Url string `json:"url,omitempty"`
1941
1942	// ForceSendFields is a list of field names (e.g. "Default") to
1943	// unconditionally include in API requests. By default, fields with
1944	// empty values are omitted from API requests. However, any non-pointer,
1945	// non-interface field appearing in ForceSendFields will be sent to the
1946	// server regardless of whether the field is empty or not. This may be
1947	// used to include empty fields in Patch requests.
1948	ForceSendFields []string `json:"-"`
1949
1950	// NullFields is a list of field names (e.g. "Default") to include in
1951	// API requests with the JSON null value. By default, fields with empty
1952	// values are omitted from API requests. However, any field with an
1953	// empty value appearing in NullFields will be sent to the server as
1954	// null. It is an error if a field in this list has a non-empty value.
1955	// This may be used to include null fields in Patch requests.
1956	NullFields []string `json:"-"`
1957}
1958
1959func (s *Photo) MarshalJSON() ([]byte, error) {
1960	type NoMethod Photo
1961	raw := NoMethod(*s)
1962	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1963}
1964
1965// ProfileMetadata: The read-only metadata about a profile.
1966type ProfileMetadata struct {
1967	// ObjectType: The profile object type.
1968	//
1969	// Possible values:
1970	//   "OBJECT_TYPE_UNSPECIFIED" - Unspecified.
1971	//   "PERSON" - Person.
1972	//   "PAGE" - [Google+ Page.](http://www.google.com/+/brands/)
1973	ObjectType string `json:"objectType,omitempty"`
1974
1975	// UserTypes: The user types.
1976	//
1977	// Possible values:
1978	//   "USER_TYPE_UNKNOWN" - The user type is not known.
1979	//   "GOOGLE_USER" - The user is a Google user.
1980	//   "GPLUS_USER" - The user is a Google+ user.
1981	//   "GOOGLE_APPS_USER" - The user is a G Suite user.
1982	UserTypes []string `json:"userTypes,omitempty"`
1983
1984	// ForceSendFields is a list of field names (e.g. "ObjectType") to
1985	// unconditionally include in API requests. By default, fields with
1986	// empty values are omitted from API requests. However, any non-pointer,
1987	// non-interface field appearing in ForceSendFields will be sent to the
1988	// server regardless of whether the field is empty or not. This may be
1989	// used to include empty fields in Patch requests.
1990	ForceSendFields []string `json:"-"`
1991
1992	// NullFields is a list of field names (e.g. "ObjectType") to include in
1993	// API requests with the JSON null value. By default, fields with empty
1994	// values are omitted from API requests. However, any field with an
1995	// empty value appearing in NullFields will be sent to the server as
1996	// null. It is an error if a field in this list has a non-empty value.
1997	// This may be used to include null fields in Patch requests.
1998	NullFields []string `json:"-"`
1999}
2000
2001func (s *ProfileMetadata) MarshalJSON() ([]byte, error) {
2002	type NoMethod ProfileMetadata
2003	raw := NoMethod(*s)
2004	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
2005}
2006
2007// Relation: A person's relation to another person.
2008type Relation struct {
2009	// FormattedType: The type of the relation translated and formatted in
2010	// the viewer's account
2011	// locale or the locale specified in the Accept-Language HTTP header.
2012	FormattedType string `json:"formattedType,omitempty"`
2013
2014	// Metadata: Metadata about the relation.
2015	Metadata *FieldMetadata `json:"metadata,omitempty"`
2016
2017	// Person: The name of the other person this relation refers to.
2018	Person string `json:"person,omitempty"`
2019
2020	// Type: The person's relation to the other person. The type can be
2021	// custom or one of
2022	// these predefined values:
2023	//
2024	// * `spouse`
2025	// * `child`
2026	// * `mother`
2027	// * `father`
2028	// * `parent`
2029	// * `brother`
2030	// * `sister`
2031	// * `friend`
2032	// * `relative`
2033	// * `domesticPartner`
2034	// * `manager`
2035	// * `assistant`
2036	// * `referredBy`
2037	// * `partner`
2038	Type string `json:"type,omitempty"`
2039
2040	// ForceSendFields is a list of field names (e.g. "FormattedType") to
2041	// unconditionally include in API requests. By default, fields with
2042	// empty values are omitted from API requests. However, any non-pointer,
2043	// non-interface field appearing in ForceSendFields will be sent to the
2044	// server regardless of whether the field is empty or not. This may be
2045	// used to include empty fields in Patch requests.
2046	ForceSendFields []string `json:"-"`
2047
2048	// NullFields is a list of field names (e.g. "FormattedType") to include
2049	// in API requests with the JSON null value. By default, fields with
2050	// empty values are omitted from API requests. However, any field with
2051	// an empty value appearing in NullFields will be sent to the server as
2052	// null. It is an error if a field in this list has a non-empty value.
2053	// This may be used to include null fields in Patch requests.
2054	NullFields []string `json:"-"`
2055}
2056
2057func (s *Relation) MarshalJSON() ([]byte, error) {
2058	type NoMethod Relation
2059	raw := NoMethod(*s)
2060	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
2061}
2062
2063// RelationshipInterest: A person's read-only relationship interest .
2064type RelationshipInterest struct {
2065	// FormattedValue: The value of the relationship interest translated and
2066	// formatted in the
2067	// viewer's account locale or the locale specified in the
2068	// Accept-Language
2069	// HTTP header.
2070	FormattedValue string `json:"formattedValue,omitempty"`
2071
2072	// Metadata: Metadata about the relationship interest.
2073	Metadata *FieldMetadata `json:"metadata,omitempty"`
2074
2075	// Value: The kind of relationship the person is looking for. The value
2076	// can be custom
2077	// or one of these predefined values:
2078	//
2079	// * `friend`
2080	// * `date`
2081	// * `relationship`
2082	// * `networking`
2083	Value string `json:"value,omitempty"`
2084
2085	// ForceSendFields is a list of field names (e.g. "FormattedValue") to
2086	// unconditionally include in API requests. By default, fields with
2087	// empty values are omitted from API requests. However, any non-pointer,
2088	// non-interface field appearing in ForceSendFields will be sent to the
2089	// server regardless of whether the field is empty or not. This may be
2090	// used to include empty fields in Patch requests.
2091	ForceSendFields []string `json:"-"`
2092
2093	// NullFields is a list of field names (e.g. "FormattedValue") to
2094	// include in API requests with the JSON null value. By default, fields
2095	// with empty values are omitted from API requests. However, any field
2096	// with an empty value appearing in NullFields will be sent to the
2097	// server as null. It is an error if a field in this list has a
2098	// non-empty value. This may be used to include null fields in Patch
2099	// requests.
2100	NullFields []string `json:"-"`
2101}
2102
2103func (s *RelationshipInterest) MarshalJSON() ([]byte, error) {
2104	type NoMethod RelationshipInterest
2105	raw := NoMethod(*s)
2106	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
2107}
2108
2109// RelationshipStatus: A person's read-only relationship status.
2110type RelationshipStatus struct {
2111	// FormattedValue: The read-only value of the relationship status
2112	// translated and formatted in
2113	// the viewer's account locale or the `Accept-Language` HTTP header
2114	// locale.
2115	FormattedValue string `json:"formattedValue,omitempty"`
2116
2117	// Metadata: Metadata about the relationship status.
2118	Metadata *FieldMetadata `json:"metadata,omitempty"`
2119
2120	// Value: The relationship status. The value can be custom or one of
2121	// these
2122	// predefined values:
2123	//
2124	// * `single`
2125	// * `inARelationship`
2126	// * `engaged`
2127	// * `married`
2128	// * `itsComplicated`
2129	// * `openRelationship`
2130	// * `widowed`
2131	// * `inDomesticPartnership`
2132	// * `inCivilUnion`
2133	Value string `json:"value,omitempty"`
2134
2135	// ForceSendFields is a list of field names (e.g. "FormattedValue") to
2136	// unconditionally include in API requests. By default, fields with
2137	// empty values are omitted from API requests. However, any non-pointer,
2138	// non-interface field appearing in ForceSendFields will be sent to the
2139	// server regardless of whether the field is empty or not. This may be
2140	// used to include empty fields in Patch requests.
2141	ForceSendFields []string `json:"-"`
2142
2143	// NullFields is a list of field names (e.g. "FormattedValue") to
2144	// include in API requests with the JSON null value. By default, fields
2145	// with empty values are omitted from API requests. However, any field
2146	// with an empty value appearing in NullFields will be sent to the
2147	// server as null. It is an error if a field in this list has a
2148	// non-empty value. This may be used to include null fields in Patch
2149	// requests.
2150	NullFields []string `json:"-"`
2151}
2152
2153func (s *RelationshipStatus) MarshalJSON() ([]byte, error) {
2154	type NoMethod RelationshipStatus
2155	raw := NoMethod(*s)
2156	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
2157}
2158
2159// Residence: A person's past or current residence.
2160type Residence struct {
2161	// Current: True if the residence is the person's current
2162	// residence;
2163	// false if the residence is a past residence.
2164	Current bool `json:"current,omitempty"`
2165
2166	// Metadata: Metadata about the residence.
2167	Metadata *FieldMetadata `json:"metadata,omitempty"`
2168
2169	// Value: The address of the residence.
2170	Value string `json:"value,omitempty"`
2171
2172	// ForceSendFields is a list of field names (e.g. "Current") to
2173	// unconditionally include in API requests. By default, fields with
2174	// empty values are omitted from API requests. However, any non-pointer,
2175	// non-interface field appearing in ForceSendFields will be sent to the
2176	// server regardless of whether the field is empty or not. This may be
2177	// used to include empty fields in Patch requests.
2178	ForceSendFields []string `json:"-"`
2179
2180	// NullFields is a list of field names (e.g. "Current") to include in
2181	// API requests with the JSON null value. By default, fields with empty
2182	// values are omitted from API requests. However, any field with an
2183	// empty value appearing in NullFields will be sent to the server as
2184	// null. It is an error if a field in this list has a non-empty value.
2185	// This may be used to include null fields in Patch requests.
2186	NullFields []string `json:"-"`
2187}
2188
2189func (s *Residence) MarshalJSON() ([]byte, error) {
2190	type NoMethod Residence
2191	raw := NoMethod(*s)
2192	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
2193}
2194
2195// SipAddress: A person's SIP address. Session Initial Protocol
2196// addresses are used for VoIP
2197// communications to make voice or video calls over the internet.
2198type SipAddress struct {
2199	// FormattedType: The read-only type of the SIP address translated and
2200	// formatted in the
2201	// viewer's account locale or the `Accept-Language` HTTP header locale.
2202	FormattedType string `json:"formattedType,omitempty"`
2203
2204	// Metadata: Metadata about the SIP address.
2205	Metadata *FieldMetadata `json:"metadata,omitempty"`
2206
2207	// Type: The type of the SIP address. The type can be custom or or one
2208	// of these
2209	// predefined values:
2210	//
2211	// * `home`
2212	// * `work`
2213	// * `mobile`
2214	// * `other`
2215	Type string `json:"type,omitempty"`
2216
2217	// Value: The SIP address in the
2218	// [RFC 3261 19.1](https://tools.ietf.org/html/rfc3261#section-19.1) SIP
2219	// URI
2220	// format.
2221	Value string `json:"value,omitempty"`
2222
2223	// ForceSendFields is a list of field names (e.g. "FormattedType") to
2224	// unconditionally include in API requests. By default, fields with
2225	// empty values are omitted from API requests. However, any non-pointer,
2226	// non-interface field appearing in ForceSendFields will be sent to the
2227	// server regardless of whether the field is empty or not. This may be
2228	// used to include empty fields in Patch requests.
2229	ForceSendFields []string `json:"-"`
2230
2231	// NullFields is a list of field names (e.g. "FormattedType") to include
2232	// in API requests with the JSON null value. By default, fields with
2233	// empty values are omitted from API requests. However, any field with
2234	// an empty value appearing in NullFields will be sent to the server as
2235	// null. It is an error if a field in this list has a non-empty value.
2236	// This may be used to include null fields in Patch requests.
2237	NullFields []string `json:"-"`
2238}
2239
2240func (s *SipAddress) MarshalJSON() ([]byte, error) {
2241	type NoMethod SipAddress
2242	raw := NoMethod(*s)
2243	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
2244}
2245
2246// Skill: A skill that the person has.
2247type Skill struct {
2248	// Metadata: Metadata about the skill.
2249	Metadata *FieldMetadata `json:"metadata,omitempty"`
2250
2251	// Value: The skill; for example, `underwater basket weaving`.
2252	Value string `json:"value,omitempty"`
2253
2254	// ForceSendFields is a list of field names (e.g. "Metadata") to
2255	// unconditionally include in API requests. By default, fields with
2256	// empty values are omitted from API requests. However, any non-pointer,
2257	// non-interface field appearing in ForceSendFields will be sent to the
2258	// server regardless of whether the field is empty or not. This may be
2259	// used to include empty fields in Patch requests.
2260	ForceSendFields []string `json:"-"`
2261
2262	// NullFields is a list of field names (e.g. "Metadata") to include in
2263	// API requests with the JSON null value. By default, fields with empty
2264	// values are omitted from API requests. However, any field with an
2265	// empty value appearing in NullFields will be sent to the server as
2266	// null. It is an error if a field in this list has a non-empty value.
2267	// This may be used to include null fields in Patch requests.
2268	NullFields []string `json:"-"`
2269}
2270
2271func (s *Skill) MarshalJSON() ([]byte, error) {
2272	type NoMethod Skill
2273	raw := NoMethod(*s)
2274	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
2275}
2276
2277// Source: The source of a field.
2278type Source struct {
2279	// Etag: **Only populated in `person.metadata.sources`.**
2280	//
2281	// The [HTTP entity tag](https://en.wikipedia.org/wiki/HTTP_ETag) of
2282	// the
2283	// source. Used for web cache validation.
2284	Etag string `json:"etag,omitempty"`
2285
2286	// Id: The unique identifier within the source type generated by the
2287	// server.
2288	Id string `json:"id,omitempty"`
2289
2290	// ProfileMetadata: **Only populated in
2291	// `person.metadata.sources`.**
2292	//
2293	// Metadata about a source of type PROFILE.
2294	ProfileMetadata *ProfileMetadata `json:"profileMetadata,omitempty"`
2295
2296	// Type: The source type.
2297	//
2298	// Possible values:
2299	//   "SOURCE_TYPE_UNSPECIFIED" - Unspecified.
2300	//   "ACCOUNT" - [Google Account](https://accounts.google.com).
2301	//   "PROFILE" - [Google profile](https://profiles.google.com). You can
2302	// view the
2303	// profile at https://profiles.google.com/<var>id</var>
2304	// where
2305	// <var>id</var> is the source id.
2306	//   "DOMAIN_PROFILE" - [G Suite domain
2307	// profile](https://support.google.com/a/answer/1628008).
2308	//   "CONTACT" - [Google contact](https://contacts.google.com). You can
2309	// view the
2310	// contact at https://contact.google.com/<var>id</var> where
2311	// <var>id</var>
2312	// is the source id.
2313	Type string `json:"type,omitempty"`
2314
2315	// UpdateTime: **Only populated in `person.metadata.sources`.**
2316	//
2317	// Last update timestamp of this source.
2318	UpdateTime string `json:"updateTime,omitempty"`
2319
2320	// ForceSendFields is a list of field names (e.g. "Etag") to
2321	// unconditionally include in API requests. By default, fields with
2322	// empty values are omitted from API requests. However, any non-pointer,
2323	// non-interface field appearing in ForceSendFields will be sent to the
2324	// server regardless of whether the field is empty or not. This may be
2325	// used to include empty fields in Patch requests.
2326	ForceSendFields []string `json:"-"`
2327
2328	// NullFields is a list of field names (e.g. "Etag") to include in API
2329	// requests with the JSON null value. By default, fields with empty
2330	// values are omitted from API requests. However, any field with an
2331	// empty value appearing in NullFields will be sent to the server as
2332	// null. It is an error if a field in this list has a non-empty value.
2333	// This may be used to include null fields in Patch requests.
2334	NullFields []string `json:"-"`
2335}
2336
2337func (s *Source) MarshalJSON() ([]byte, error) {
2338	type NoMethod Source
2339	raw := NoMethod(*s)
2340	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
2341}
2342
2343// Status: The `Status` type defines a logical error model that is
2344// suitable for
2345// different programming environments, including REST APIs and RPC APIs.
2346// It is
2347// used by [gRPC](https://github.com/grpc). Each `Status` message
2348// contains
2349// three pieces of data: error code, error message, and error
2350// details.
2351//
2352// You can find out more about this error model and how to work with it
2353// in the
2354// [API Design Guide](https://cloud.google.com/apis/design/errors).
2355type Status struct {
2356	// Code: The status code, which should be an enum value of
2357	// google.rpc.Code.
2358	Code int64 `json:"code,omitempty"`
2359
2360	// Details: A list of messages that carry the error details.  There is a
2361	// common set of
2362	// message types for APIs to use.
2363	Details []googleapi.RawMessage `json:"details,omitempty"`
2364
2365	// Message: A developer-facing error message, which should be in
2366	// English. Any
2367	// user-facing error message should be localized and sent in
2368	// the
2369	// google.rpc.Status.details field, or localized by the client.
2370	Message string `json:"message,omitempty"`
2371
2372	// ForceSendFields is a list of field names (e.g. "Code") to
2373	// unconditionally include in API requests. By default, fields with
2374	// empty values are omitted from API requests. However, any non-pointer,
2375	// non-interface field appearing in ForceSendFields will be sent to the
2376	// server regardless of whether the field is empty or not. This may be
2377	// used to include empty fields in Patch requests.
2378	ForceSendFields []string `json:"-"`
2379
2380	// NullFields is a list of field names (e.g. "Code") to include in API
2381	// requests with the JSON null value. By default, fields with empty
2382	// values are omitted from API requests. However, any field with an
2383	// empty value appearing in NullFields will be sent to the server as
2384	// null. It is an error if a field in this list has a non-empty value.
2385	// This may be used to include null fields in Patch requests.
2386	NullFields []string `json:"-"`
2387}
2388
2389func (s *Status) MarshalJSON() ([]byte, error) {
2390	type NoMethod Status
2391	raw := NoMethod(*s)
2392	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
2393}
2394
2395// Tagline: A read-only brief one-line description of the person.
2396type Tagline struct {
2397	// Metadata: Metadata about the tagline.
2398	Metadata *FieldMetadata `json:"metadata,omitempty"`
2399
2400	// Value: The tagline.
2401	Value string `json:"value,omitempty"`
2402
2403	// ForceSendFields is a list of field names (e.g. "Metadata") to
2404	// unconditionally include in API requests. By default, fields with
2405	// empty values are omitted from API requests. However, any non-pointer,
2406	// non-interface field appearing in ForceSendFields will be sent to the
2407	// server regardless of whether the field is empty or not. This may be
2408	// used to include empty fields in Patch requests.
2409	ForceSendFields []string `json:"-"`
2410
2411	// NullFields is a list of field names (e.g. "Metadata") to include in
2412	// API requests with the JSON null value. By default, fields with empty
2413	// values are omitted from API requests. However, any field with an
2414	// empty value appearing in NullFields will be sent to the server as
2415	// null. It is an error if a field in this list has a non-empty value.
2416	// This may be used to include null fields in Patch requests.
2417	NullFields []string `json:"-"`
2418}
2419
2420func (s *Tagline) MarshalJSON() ([]byte, error) {
2421	type NoMethod Tagline
2422	raw := NoMethod(*s)
2423	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
2424}
2425
2426// UpdateContactGroupRequest: A request to update an existing user
2427// contact group. All updated fields will
2428// be replaced.
2429type UpdateContactGroupRequest struct {
2430	// ContactGroup: The contact group to update.
2431	ContactGroup *ContactGroup `json:"contactGroup,omitempty"`
2432
2433	// ForceSendFields is a list of field names (e.g. "ContactGroup") to
2434	// unconditionally include in API requests. By default, fields with
2435	// empty values are omitted from API requests. However, any non-pointer,
2436	// non-interface field appearing in ForceSendFields will be sent to the
2437	// server regardless of whether the field is empty or not. This may be
2438	// used to include empty fields in Patch requests.
2439	ForceSendFields []string `json:"-"`
2440
2441	// NullFields is a list of field names (e.g. "ContactGroup") to include
2442	// in API requests with the JSON null value. By default, fields with
2443	// empty values are omitted from API requests. However, any field with
2444	// an empty value appearing in NullFields will be sent to the server as
2445	// null. It is an error if a field in this list has a non-empty value.
2446	// This may be used to include null fields in Patch requests.
2447	NullFields []string `json:"-"`
2448}
2449
2450func (s *UpdateContactGroupRequest) MarshalJSON() ([]byte, error) {
2451	type NoMethod UpdateContactGroupRequest
2452	raw := NoMethod(*s)
2453	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
2454}
2455
2456// Url: A person's associated URLs.
2457type Url struct {
2458	// FormattedType: The read-only type of the URL translated and formatted
2459	// in the viewer's
2460	// account locale or the `Accept-Language` HTTP header locale.
2461	FormattedType string `json:"formattedType,omitempty"`
2462
2463	// Metadata: Metadata about the URL.
2464	Metadata *FieldMetadata `json:"metadata,omitempty"`
2465
2466	// Type: The type of the URL. The type can be custom or one of these
2467	// predefined
2468	// values:
2469	//
2470	// * `home`
2471	// * `work`
2472	// * `blog`
2473	// * `profile`
2474	// * `homePage`
2475	// * `ftp`
2476	// * `reservations`
2477	// * `appInstallPage`: website for a Google+ application.
2478	// * `other`
2479	Type string `json:"type,omitempty"`
2480
2481	// Value: The URL.
2482	Value string `json:"value,omitempty"`
2483
2484	// ForceSendFields is a list of field names (e.g. "FormattedType") to
2485	// unconditionally include in API requests. By default, fields with
2486	// empty values are omitted from API requests. However, any non-pointer,
2487	// non-interface field appearing in ForceSendFields will be sent to the
2488	// server regardless of whether the field is empty or not. This may be
2489	// used to include empty fields in Patch requests.
2490	ForceSendFields []string `json:"-"`
2491
2492	// NullFields is a list of field names (e.g. "FormattedType") to include
2493	// in API requests with the JSON null value. By default, fields with
2494	// empty values are omitted from API requests. However, any field with
2495	// an empty value appearing in NullFields will be sent to the server as
2496	// null. It is an error if a field in this list has a non-empty value.
2497	// This may be used to include null fields in Patch requests.
2498	NullFields []string `json:"-"`
2499}
2500
2501func (s *Url) MarshalJSON() ([]byte, error) {
2502	type NoMethod Url
2503	raw := NoMethod(*s)
2504	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
2505}
2506
2507// UserDefined: Arbitrary user data that is populated by the end users.
2508type UserDefined struct {
2509	// Key: The end user specified key of the user defined data.
2510	Key string `json:"key,omitempty"`
2511
2512	// Metadata: Metadata about the user defined data.
2513	Metadata *FieldMetadata `json:"metadata,omitempty"`
2514
2515	// Value: The end user specified value of the user defined data.
2516	Value string `json:"value,omitempty"`
2517
2518	// ForceSendFields is a list of field names (e.g. "Key") to
2519	// unconditionally include in API requests. By default, fields with
2520	// empty values are omitted from API requests. However, any non-pointer,
2521	// non-interface field appearing in ForceSendFields will be sent to the
2522	// server regardless of whether the field is empty or not. This may be
2523	// used to include empty fields in Patch requests.
2524	ForceSendFields []string `json:"-"`
2525
2526	// NullFields is a list of field names (e.g. "Key") to include in API
2527	// requests with the JSON null value. By default, fields with empty
2528	// values are omitted from API requests. However, any field with an
2529	// empty value appearing in NullFields will be sent to the server as
2530	// null. It is an error if a field in this list has a non-empty value.
2531	// This may be used to include null fields in Patch requests.
2532	NullFields []string `json:"-"`
2533}
2534
2535func (s *UserDefined) MarshalJSON() ([]byte, error) {
2536	type NoMethod UserDefined
2537	raw := NoMethod(*s)
2538	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
2539}
2540
2541// method id "people.contactGroups.batchGet":
2542
2543type ContactGroupsBatchGetCall struct {
2544	s            *Service
2545	urlParams_   gensupport.URLParams
2546	ifNoneMatch_ string
2547	ctx_         context.Context
2548	header_      http.Header
2549}
2550
2551// BatchGet: Get a list of contact groups owned by the authenticated
2552// user by specifying
2553// a list of contact group resource names.
2554func (r *ContactGroupsService) BatchGet() *ContactGroupsBatchGetCall {
2555	c := &ContactGroupsBatchGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
2556	return c
2557}
2558
2559// MaxMembers sets the optional parameter "maxMembers": Specifies the
2560// maximum number of members to return for each group.
2561func (c *ContactGroupsBatchGetCall) MaxMembers(maxMembers int64) *ContactGroupsBatchGetCall {
2562	c.urlParams_.Set("maxMembers", fmt.Sprint(maxMembers))
2563	return c
2564}
2565
2566// ResourceNames sets the optional parameter "resourceNames": The
2567// resource names of the contact groups to get.
2568func (c *ContactGroupsBatchGetCall) ResourceNames(resourceNames ...string) *ContactGroupsBatchGetCall {
2569	c.urlParams_.SetMulti("resourceNames", append([]string{}, resourceNames...))
2570	return c
2571}
2572
2573// Fields allows partial responses to be retrieved. See
2574// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
2575// for more information.
2576func (c *ContactGroupsBatchGetCall) Fields(s ...googleapi.Field) *ContactGroupsBatchGetCall {
2577	c.urlParams_.Set("fields", googleapi.CombineFields(s))
2578	return c
2579}
2580
2581// IfNoneMatch sets the optional parameter which makes the operation
2582// fail if the object's ETag matches the given value. This is useful for
2583// getting updates only after the object has changed since the last
2584// request. Use googleapi.IsNotModified to check whether the response
2585// error from Do is the result of In-None-Match.
2586func (c *ContactGroupsBatchGetCall) IfNoneMatch(entityTag string) *ContactGroupsBatchGetCall {
2587	c.ifNoneMatch_ = entityTag
2588	return c
2589}
2590
2591// Context sets the context to be used in this call's Do method. Any
2592// pending HTTP request will be aborted if the provided context is
2593// canceled.
2594func (c *ContactGroupsBatchGetCall) Context(ctx context.Context) *ContactGroupsBatchGetCall {
2595	c.ctx_ = ctx
2596	return c
2597}
2598
2599// Header returns an http.Header that can be modified by the caller to
2600// add HTTP headers to the request.
2601func (c *ContactGroupsBatchGetCall) Header() http.Header {
2602	if c.header_ == nil {
2603		c.header_ = make(http.Header)
2604	}
2605	return c.header_
2606}
2607
2608func (c *ContactGroupsBatchGetCall) doRequest(alt string) (*http.Response, error) {
2609	reqHeaders := make(http.Header)
2610	for k, v := range c.header_ {
2611		reqHeaders[k] = v
2612	}
2613	reqHeaders.Set("User-Agent", c.s.userAgent())
2614	if c.ifNoneMatch_ != "" {
2615		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
2616	}
2617	var body io.Reader = nil
2618	c.urlParams_.Set("alt", alt)
2619	c.urlParams_.Set("prettyPrint", "false")
2620	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/contactGroups:batchGet")
2621	urls += "?" + c.urlParams_.Encode()
2622	req, err := http.NewRequest("GET", urls, body)
2623	if err != nil {
2624		return nil, err
2625	}
2626	req.Header = reqHeaders
2627	return gensupport.SendRequest(c.ctx_, c.s.client, req)
2628}
2629
2630// Do executes the "people.contactGroups.batchGet" call.
2631// Exactly one of *BatchGetContactGroupsResponse or error will be
2632// non-nil. Any non-2xx status code is an error. Response headers are in
2633// either *BatchGetContactGroupsResponse.ServerResponse.Header or (if a
2634// response was returned at all) in error.(*googleapi.Error).Header. Use
2635// googleapi.IsNotModified to check whether the returned error was
2636// because http.StatusNotModified was returned.
2637func (c *ContactGroupsBatchGetCall) Do(opts ...googleapi.CallOption) (*BatchGetContactGroupsResponse, error) {
2638	gensupport.SetOptions(c.urlParams_, opts...)
2639	res, err := c.doRequest("json")
2640	if res != nil && res.StatusCode == http.StatusNotModified {
2641		if res.Body != nil {
2642			res.Body.Close()
2643		}
2644		return nil, &googleapi.Error{
2645			Code:   res.StatusCode,
2646			Header: res.Header,
2647		}
2648	}
2649	if err != nil {
2650		return nil, err
2651	}
2652	defer googleapi.CloseBody(res)
2653	if err := googleapi.CheckResponse(res); err != nil {
2654		return nil, err
2655	}
2656	ret := &BatchGetContactGroupsResponse{
2657		ServerResponse: googleapi.ServerResponse{
2658			Header:         res.Header,
2659			HTTPStatusCode: res.StatusCode,
2660		},
2661	}
2662	target := &ret
2663	if err := gensupport.DecodeResponse(target, res); err != nil {
2664		return nil, err
2665	}
2666	return ret, nil
2667	// {
2668	//   "description": "Get a list of contact groups owned by the authenticated user by specifying\na list of contact group resource names.",
2669	//   "flatPath": "v1/contactGroups:batchGet",
2670	//   "httpMethod": "GET",
2671	//   "id": "people.contactGroups.batchGet",
2672	//   "parameterOrder": [],
2673	//   "parameters": {
2674	//     "maxMembers": {
2675	//       "description": "Specifies the maximum number of members to return for each group.",
2676	//       "format": "int32",
2677	//       "location": "query",
2678	//       "type": "integer"
2679	//     },
2680	//     "resourceNames": {
2681	//       "description": "The resource names of the contact groups to get.",
2682	//       "location": "query",
2683	//       "repeated": true,
2684	//       "type": "string"
2685	//     }
2686	//   },
2687	//   "path": "v1/contactGroups:batchGet",
2688	//   "response": {
2689	//     "$ref": "BatchGetContactGroupsResponse"
2690	//   },
2691	//   "scopes": [
2692	//     "https://www.googleapis.com/auth/contacts",
2693	//     "https://www.googleapis.com/auth/contacts.readonly"
2694	//   ]
2695	// }
2696
2697}
2698
2699// method id "people.contactGroups.create":
2700
2701type ContactGroupsCreateCall struct {
2702	s                         *Service
2703	createcontactgrouprequest *CreateContactGroupRequest
2704	urlParams_                gensupport.URLParams
2705	ctx_                      context.Context
2706	header_                   http.Header
2707}
2708
2709// Create: Create a new contact group owned by the authenticated user.
2710func (r *ContactGroupsService) Create(createcontactgrouprequest *CreateContactGroupRequest) *ContactGroupsCreateCall {
2711	c := &ContactGroupsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
2712	c.createcontactgrouprequest = createcontactgrouprequest
2713	return c
2714}
2715
2716// Fields allows partial responses to be retrieved. See
2717// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
2718// for more information.
2719func (c *ContactGroupsCreateCall) Fields(s ...googleapi.Field) *ContactGroupsCreateCall {
2720	c.urlParams_.Set("fields", googleapi.CombineFields(s))
2721	return c
2722}
2723
2724// Context sets the context to be used in this call's Do method. Any
2725// pending HTTP request will be aborted if the provided context is
2726// canceled.
2727func (c *ContactGroupsCreateCall) Context(ctx context.Context) *ContactGroupsCreateCall {
2728	c.ctx_ = ctx
2729	return c
2730}
2731
2732// Header returns an http.Header that can be modified by the caller to
2733// add HTTP headers to the request.
2734func (c *ContactGroupsCreateCall) Header() http.Header {
2735	if c.header_ == nil {
2736		c.header_ = make(http.Header)
2737	}
2738	return c.header_
2739}
2740
2741func (c *ContactGroupsCreateCall) doRequest(alt string) (*http.Response, error) {
2742	reqHeaders := make(http.Header)
2743	for k, v := range c.header_ {
2744		reqHeaders[k] = v
2745	}
2746	reqHeaders.Set("User-Agent", c.s.userAgent())
2747	var body io.Reader = nil
2748	body, err := googleapi.WithoutDataWrapper.JSONReader(c.createcontactgrouprequest)
2749	if err != nil {
2750		return nil, err
2751	}
2752	reqHeaders.Set("Content-Type", "application/json")
2753	c.urlParams_.Set("alt", alt)
2754	c.urlParams_.Set("prettyPrint", "false")
2755	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/contactGroups")
2756	urls += "?" + c.urlParams_.Encode()
2757	req, err := http.NewRequest("POST", urls, body)
2758	if err != nil {
2759		return nil, err
2760	}
2761	req.Header = reqHeaders
2762	return gensupport.SendRequest(c.ctx_, c.s.client, req)
2763}
2764
2765// Do executes the "people.contactGroups.create" call.
2766// Exactly one of *ContactGroup or error will be non-nil. Any non-2xx
2767// status code is an error. Response headers are in either
2768// *ContactGroup.ServerResponse.Header or (if a response was returned at
2769// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
2770// to check whether the returned error was because
2771// http.StatusNotModified was returned.
2772func (c *ContactGroupsCreateCall) Do(opts ...googleapi.CallOption) (*ContactGroup, error) {
2773	gensupport.SetOptions(c.urlParams_, opts...)
2774	res, err := c.doRequest("json")
2775	if res != nil && res.StatusCode == http.StatusNotModified {
2776		if res.Body != nil {
2777			res.Body.Close()
2778		}
2779		return nil, &googleapi.Error{
2780			Code:   res.StatusCode,
2781			Header: res.Header,
2782		}
2783	}
2784	if err != nil {
2785		return nil, err
2786	}
2787	defer googleapi.CloseBody(res)
2788	if err := googleapi.CheckResponse(res); err != nil {
2789		return nil, err
2790	}
2791	ret := &ContactGroup{
2792		ServerResponse: googleapi.ServerResponse{
2793			Header:         res.Header,
2794			HTTPStatusCode: res.StatusCode,
2795		},
2796	}
2797	target := &ret
2798	if err := gensupport.DecodeResponse(target, res); err != nil {
2799		return nil, err
2800	}
2801	return ret, nil
2802	// {
2803	//   "description": "Create a new contact group owned by the authenticated user.",
2804	//   "flatPath": "v1/contactGroups",
2805	//   "httpMethod": "POST",
2806	//   "id": "people.contactGroups.create",
2807	//   "parameterOrder": [],
2808	//   "parameters": {},
2809	//   "path": "v1/contactGroups",
2810	//   "request": {
2811	//     "$ref": "CreateContactGroupRequest"
2812	//   },
2813	//   "response": {
2814	//     "$ref": "ContactGroup"
2815	//   },
2816	//   "scopes": [
2817	//     "https://www.googleapis.com/auth/contacts"
2818	//   ]
2819	// }
2820
2821}
2822
2823// method id "people.contactGroups.delete":
2824
2825type ContactGroupsDeleteCall struct {
2826	s            *Service
2827	resourceName string
2828	urlParams_   gensupport.URLParams
2829	ctx_         context.Context
2830	header_      http.Header
2831}
2832
2833// Delete: Delete an existing contact group owned by the authenticated
2834// user by
2835// specifying a contact group resource name.
2836func (r *ContactGroupsService) Delete(resourceName string) *ContactGroupsDeleteCall {
2837	c := &ContactGroupsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
2838	c.resourceName = resourceName
2839	return c
2840}
2841
2842// DeleteContacts sets the optional parameter "deleteContacts": Set to
2843// true to also delete the contacts in the specified group.
2844func (c *ContactGroupsDeleteCall) DeleteContacts(deleteContacts bool) *ContactGroupsDeleteCall {
2845	c.urlParams_.Set("deleteContacts", fmt.Sprint(deleteContacts))
2846	return c
2847}
2848
2849// Fields allows partial responses to be retrieved. See
2850// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
2851// for more information.
2852func (c *ContactGroupsDeleteCall) Fields(s ...googleapi.Field) *ContactGroupsDeleteCall {
2853	c.urlParams_.Set("fields", googleapi.CombineFields(s))
2854	return c
2855}
2856
2857// Context sets the context to be used in this call's Do method. Any
2858// pending HTTP request will be aborted if the provided context is
2859// canceled.
2860func (c *ContactGroupsDeleteCall) Context(ctx context.Context) *ContactGroupsDeleteCall {
2861	c.ctx_ = ctx
2862	return c
2863}
2864
2865// Header returns an http.Header that can be modified by the caller to
2866// add HTTP headers to the request.
2867func (c *ContactGroupsDeleteCall) Header() http.Header {
2868	if c.header_ == nil {
2869		c.header_ = make(http.Header)
2870	}
2871	return c.header_
2872}
2873
2874func (c *ContactGroupsDeleteCall) doRequest(alt string) (*http.Response, error) {
2875	reqHeaders := make(http.Header)
2876	for k, v := range c.header_ {
2877		reqHeaders[k] = v
2878	}
2879	reqHeaders.Set("User-Agent", c.s.userAgent())
2880	var body io.Reader = nil
2881	c.urlParams_.Set("alt", alt)
2882	c.urlParams_.Set("prettyPrint", "false")
2883	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+resourceName}")
2884	urls += "?" + c.urlParams_.Encode()
2885	req, err := http.NewRequest("DELETE", urls, body)
2886	if err != nil {
2887		return nil, err
2888	}
2889	req.Header = reqHeaders
2890	googleapi.Expand(req.URL, map[string]string{
2891		"resourceName": c.resourceName,
2892	})
2893	return gensupport.SendRequest(c.ctx_, c.s.client, req)
2894}
2895
2896// Do executes the "people.contactGroups.delete" call.
2897// Exactly one of *Empty or error will be non-nil. Any non-2xx status
2898// code is an error. Response headers are in either
2899// *Empty.ServerResponse.Header or (if a response was returned at all)
2900// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
2901// check whether the returned error was because http.StatusNotModified
2902// was returned.
2903func (c *ContactGroupsDeleteCall) Do(opts ...googleapi.CallOption) (*Empty, error) {
2904	gensupport.SetOptions(c.urlParams_, opts...)
2905	res, err := c.doRequest("json")
2906	if res != nil && res.StatusCode == http.StatusNotModified {
2907		if res.Body != nil {
2908			res.Body.Close()
2909		}
2910		return nil, &googleapi.Error{
2911			Code:   res.StatusCode,
2912			Header: res.Header,
2913		}
2914	}
2915	if err != nil {
2916		return nil, err
2917	}
2918	defer googleapi.CloseBody(res)
2919	if err := googleapi.CheckResponse(res); err != nil {
2920		return nil, err
2921	}
2922	ret := &Empty{
2923		ServerResponse: googleapi.ServerResponse{
2924			Header:         res.Header,
2925			HTTPStatusCode: res.StatusCode,
2926		},
2927	}
2928	target := &ret
2929	if err := gensupport.DecodeResponse(target, res); err != nil {
2930		return nil, err
2931	}
2932	return ret, nil
2933	// {
2934	//   "description": "Delete an existing contact group owned by the authenticated user by\nspecifying a contact group resource name.",
2935	//   "flatPath": "v1/contactGroups/{contactGroupsId}",
2936	//   "httpMethod": "DELETE",
2937	//   "id": "people.contactGroups.delete",
2938	//   "parameterOrder": [
2939	//     "resourceName"
2940	//   ],
2941	//   "parameters": {
2942	//     "deleteContacts": {
2943	//       "description": "Set to true to also delete the contacts in the specified group.",
2944	//       "location": "query",
2945	//       "type": "boolean"
2946	//     },
2947	//     "resourceName": {
2948	//       "description": "The resource name of the contact group to delete.",
2949	//       "location": "path",
2950	//       "pattern": "^contactGroups/[^/]+$",
2951	//       "required": true,
2952	//       "type": "string"
2953	//     }
2954	//   },
2955	//   "path": "v1/{+resourceName}",
2956	//   "response": {
2957	//     "$ref": "Empty"
2958	//   },
2959	//   "scopes": [
2960	//     "https://www.googleapis.com/auth/contacts"
2961	//   ]
2962	// }
2963
2964}
2965
2966// method id "people.contactGroups.get":
2967
2968type ContactGroupsGetCall struct {
2969	s            *Service
2970	resourceName string
2971	urlParams_   gensupport.URLParams
2972	ifNoneMatch_ string
2973	ctx_         context.Context
2974	header_      http.Header
2975}
2976
2977// Get: Get a specific contact group owned by the authenticated user by
2978// specifying
2979// a contact group resource name.
2980func (r *ContactGroupsService) Get(resourceName string) *ContactGroupsGetCall {
2981	c := &ContactGroupsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
2982	c.resourceName = resourceName
2983	return c
2984}
2985
2986// MaxMembers sets the optional parameter "maxMembers": Specifies the
2987// maximum number of members to return.
2988func (c *ContactGroupsGetCall) MaxMembers(maxMembers int64) *ContactGroupsGetCall {
2989	c.urlParams_.Set("maxMembers", fmt.Sprint(maxMembers))
2990	return c
2991}
2992
2993// Fields allows partial responses to be retrieved. See
2994// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
2995// for more information.
2996func (c *ContactGroupsGetCall) Fields(s ...googleapi.Field) *ContactGroupsGetCall {
2997	c.urlParams_.Set("fields", googleapi.CombineFields(s))
2998	return c
2999}
3000
3001// IfNoneMatch sets the optional parameter which makes the operation
3002// fail if the object's ETag matches the given value. This is useful for
3003// getting updates only after the object has changed since the last
3004// request. Use googleapi.IsNotModified to check whether the response
3005// error from Do is the result of In-None-Match.
3006func (c *ContactGroupsGetCall) IfNoneMatch(entityTag string) *ContactGroupsGetCall {
3007	c.ifNoneMatch_ = entityTag
3008	return c
3009}
3010
3011// Context sets the context to be used in this call's Do method. Any
3012// pending HTTP request will be aborted if the provided context is
3013// canceled.
3014func (c *ContactGroupsGetCall) Context(ctx context.Context) *ContactGroupsGetCall {
3015	c.ctx_ = ctx
3016	return c
3017}
3018
3019// Header returns an http.Header that can be modified by the caller to
3020// add HTTP headers to the request.
3021func (c *ContactGroupsGetCall) Header() http.Header {
3022	if c.header_ == nil {
3023		c.header_ = make(http.Header)
3024	}
3025	return c.header_
3026}
3027
3028func (c *ContactGroupsGetCall) doRequest(alt string) (*http.Response, error) {
3029	reqHeaders := make(http.Header)
3030	for k, v := range c.header_ {
3031		reqHeaders[k] = v
3032	}
3033	reqHeaders.Set("User-Agent", c.s.userAgent())
3034	if c.ifNoneMatch_ != "" {
3035		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
3036	}
3037	var body io.Reader = nil
3038	c.urlParams_.Set("alt", alt)
3039	c.urlParams_.Set("prettyPrint", "false")
3040	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+resourceName}")
3041	urls += "?" + c.urlParams_.Encode()
3042	req, err := http.NewRequest("GET", urls, body)
3043	if err != nil {
3044		return nil, err
3045	}
3046	req.Header = reqHeaders
3047	googleapi.Expand(req.URL, map[string]string{
3048		"resourceName": c.resourceName,
3049	})
3050	return gensupport.SendRequest(c.ctx_, c.s.client, req)
3051}
3052
3053// Do executes the "people.contactGroups.get" call.
3054// Exactly one of *ContactGroup or error will be non-nil. Any non-2xx
3055// status code is an error. Response headers are in either
3056// *ContactGroup.ServerResponse.Header or (if a response was returned at
3057// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
3058// to check whether the returned error was because
3059// http.StatusNotModified was returned.
3060func (c *ContactGroupsGetCall) Do(opts ...googleapi.CallOption) (*ContactGroup, error) {
3061	gensupport.SetOptions(c.urlParams_, opts...)
3062	res, err := c.doRequest("json")
3063	if res != nil && res.StatusCode == http.StatusNotModified {
3064		if res.Body != nil {
3065			res.Body.Close()
3066		}
3067		return nil, &googleapi.Error{
3068			Code:   res.StatusCode,
3069			Header: res.Header,
3070		}
3071	}
3072	if err != nil {
3073		return nil, err
3074	}
3075	defer googleapi.CloseBody(res)
3076	if err := googleapi.CheckResponse(res); err != nil {
3077		return nil, err
3078	}
3079	ret := &ContactGroup{
3080		ServerResponse: googleapi.ServerResponse{
3081			Header:         res.Header,
3082			HTTPStatusCode: res.StatusCode,
3083		},
3084	}
3085	target := &ret
3086	if err := gensupport.DecodeResponse(target, res); err != nil {
3087		return nil, err
3088	}
3089	return ret, nil
3090	// {
3091	//   "description": "Get a specific contact group owned by the authenticated user by specifying\na contact group resource name.",
3092	//   "flatPath": "v1/contactGroups/{contactGroupsId}",
3093	//   "httpMethod": "GET",
3094	//   "id": "people.contactGroups.get",
3095	//   "parameterOrder": [
3096	//     "resourceName"
3097	//   ],
3098	//   "parameters": {
3099	//     "maxMembers": {
3100	//       "description": "Specifies the maximum number of members to return.",
3101	//       "format": "int32",
3102	//       "location": "query",
3103	//       "type": "integer"
3104	//     },
3105	//     "resourceName": {
3106	//       "description": "The resource name of the contact group to get.",
3107	//       "location": "path",
3108	//       "pattern": "^contactGroups/[^/]+$",
3109	//       "required": true,
3110	//       "type": "string"
3111	//     }
3112	//   },
3113	//   "path": "v1/{+resourceName}",
3114	//   "response": {
3115	//     "$ref": "ContactGroup"
3116	//   },
3117	//   "scopes": [
3118	//     "https://www.googleapis.com/auth/contacts",
3119	//     "https://www.googleapis.com/auth/contacts.readonly"
3120	//   ]
3121	// }
3122
3123}
3124
3125// method id "people.contactGroups.list":
3126
3127type ContactGroupsListCall struct {
3128	s            *Service
3129	urlParams_   gensupport.URLParams
3130	ifNoneMatch_ string
3131	ctx_         context.Context
3132	header_      http.Header
3133}
3134
3135// List: List all contact groups owned by the authenticated user.
3136// Members of the
3137// contact groups are not populated.
3138func (r *ContactGroupsService) List() *ContactGroupsListCall {
3139	c := &ContactGroupsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
3140	return c
3141}
3142
3143// PageSize sets the optional parameter "pageSize": The maximum number
3144// of resources to return.
3145func (c *ContactGroupsListCall) PageSize(pageSize int64) *ContactGroupsListCall {
3146	c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
3147	return c
3148}
3149
3150// PageToken sets the optional parameter "pageToken": The
3151// next_page_token value returned from a previous call
3152// to
3153// [ListContactGroups](/people/api/rest/v1/contactgroups/list).
3154// Reques
3155// ts the next page of resources.
3156func (c *ContactGroupsListCall) PageToken(pageToken string) *ContactGroupsListCall {
3157	c.urlParams_.Set("pageToken", pageToken)
3158	return c
3159}
3160
3161// SyncToken sets the optional parameter "syncToken": A sync token,
3162// returned by a previous call to `contactgroups.list`.
3163// Only resources changed since the sync token was created will be
3164// returned.
3165func (c *ContactGroupsListCall) SyncToken(syncToken string) *ContactGroupsListCall {
3166	c.urlParams_.Set("syncToken", syncToken)
3167	return c
3168}
3169
3170// Fields allows partial responses to be retrieved. See
3171// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
3172// for more information.
3173func (c *ContactGroupsListCall) Fields(s ...googleapi.Field) *ContactGroupsListCall {
3174	c.urlParams_.Set("fields", googleapi.CombineFields(s))
3175	return c
3176}
3177
3178// IfNoneMatch sets the optional parameter which makes the operation
3179// fail if the object's ETag matches the given value. This is useful for
3180// getting updates only after the object has changed since the last
3181// request. Use googleapi.IsNotModified to check whether the response
3182// error from Do is the result of In-None-Match.
3183func (c *ContactGroupsListCall) IfNoneMatch(entityTag string) *ContactGroupsListCall {
3184	c.ifNoneMatch_ = entityTag
3185	return c
3186}
3187
3188// Context sets the context to be used in this call's Do method. Any
3189// pending HTTP request will be aborted if the provided context is
3190// canceled.
3191func (c *ContactGroupsListCall) Context(ctx context.Context) *ContactGroupsListCall {
3192	c.ctx_ = ctx
3193	return c
3194}
3195
3196// Header returns an http.Header that can be modified by the caller to
3197// add HTTP headers to the request.
3198func (c *ContactGroupsListCall) Header() http.Header {
3199	if c.header_ == nil {
3200		c.header_ = make(http.Header)
3201	}
3202	return c.header_
3203}
3204
3205func (c *ContactGroupsListCall) doRequest(alt string) (*http.Response, error) {
3206	reqHeaders := make(http.Header)
3207	for k, v := range c.header_ {
3208		reqHeaders[k] = v
3209	}
3210	reqHeaders.Set("User-Agent", c.s.userAgent())
3211	if c.ifNoneMatch_ != "" {
3212		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
3213	}
3214	var body io.Reader = nil
3215	c.urlParams_.Set("alt", alt)
3216	c.urlParams_.Set("prettyPrint", "false")
3217	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/contactGroups")
3218	urls += "?" + c.urlParams_.Encode()
3219	req, err := http.NewRequest("GET", urls, body)
3220	if err != nil {
3221		return nil, err
3222	}
3223	req.Header = reqHeaders
3224	return gensupport.SendRequest(c.ctx_, c.s.client, req)
3225}
3226
3227// Do executes the "people.contactGroups.list" call.
3228// Exactly one of *ListContactGroupsResponse or error will be non-nil.
3229// Any non-2xx status code is an error. Response headers are in either
3230// *ListContactGroupsResponse.ServerResponse.Header or (if a response
3231// was returned at all) in error.(*googleapi.Error).Header. Use
3232// googleapi.IsNotModified to check whether the returned error was
3233// because http.StatusNotModified was returned.
3234func (c *ContactGroupsListCall) Do(opts ...googleapi.CallOption) (*ListContactGroupsResponse, error) {
3235	gensupport.SetOptions(c.urlParams_, opts...)
3236	res, err := c.doRequest("json")
3237	if res != nil && res.StatusCode == http.StatusNotModified {
3238		if res.Body != nil {
3239			res.Body.Close()
3240		}
3241		return nil, &googleapi.Error{
3242			Code:   res.StatusCode,
3243			Header: res.Header,
3244		}
3245	}
3246	if err != nil {
3247		return nil, err
3248	}
3249	defer googleapi.CloseBody(res)
3250	if err := googleapi.CheckResponse(res); err != nil {
3251		return nil, err
3252	}
3253	ret := &ListContactGroupsResponse{
3254		ServerResponse: googleapi.ServerResponse{
3255			Header:         res.Header,
3256			HTTPStatusCode: res.StatusCode,
3257		},
3258	}
3259	target := &ret
3260	if err := gensupport.DecodeResponse(target, res); err != nil {
3261		return nil, err
3262	}
3263	return ret, nil
3264	// {
3265	//   "description": "List all contact groups owned by the authenticated user. Members of the\ncontact groups are not populated.",
3266	//   "flatPath": "v1/contactGroups",
3267	//   "httpMethod": "GET",
3268	//   "id": "people.contactGroups.list",
3269	//   "parameterOrder": [],
3270	//   "parameters": {
3271	//     "pageSize": {
3272	//       "description": "The maximum number of resources to return.",
3273	//       "format": "int32",
3274	//       "location": "query",
3275	//       "type": "integer"
3276	//     },
3277	//     "pageToken": {
3278	//       "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.",
3279	//       "location": "query",
3280	//       "type": "string"
3281	//     },
3282	//     "syncToken": {
3283	//       "description": "A sync token, returned by a previous call to `contactgroups.list`.\nOnly resources changed since the sync token was created will be returned.",
3284	//       "location": "query",
3285	//       "type": "string"
3286	//     }
3287	//   },
3288	//   "path": "v1/contactGroups",
3289	//   "response": {
3290	//     "$ref": "ListContactGroupsResponse"
3291	//   },
3292	//   "scopes": [
3293	//     "https://www.googleapis.com/auth/contacts",
3294	//     "https://www.googleapis.com/auth/contacts.readonly"
3295	//   ]
3296	// }
3297
3298}
3299
3300// Pages invokes f for each page of results.
3301// A non-nil error returned from f will halt the iteration.
3302// The provided context supersedes any context provided to the Context method.
3303func (c *ContactGroupsListCall) Pages(ctx context.Context, f func(*ListContactGroupsResponse) error) error {
3304	c.ctx_ = ctx
3305	defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
3306	for {
3307		x, err := c.Do()
3308		if err != nil {
3309			return err
3310		}
3311		if err := f(x); err != nil {
3312			return err
3313		}
3314		if x.NextPageToken == "" {
3315			return nil
3316		}
3317		c.PageToken(x.NextPageToken)
3318	}
3319}
3320
3321// method id "people.contactGroups.update":
3322
3323type ContactGroupsUpdateCall struct {
3324	s                         *Service
3325	resourceName              string
3326	updatecontactgrouprequest *UpdateContactGroupRequest
3327	urlParams_                gensupport.URLParams
3328	ctx_                      context.Context
3329	header_                   http.Header
3330}
3331
3332// Update: Update the name of an existing contact group owned by the
3333// authenticated
3334// user.
3335func (r *ContactGroupsService) Update(resourceName string, updatecontactgrouprequest *UpdateContactGroupRequest) *ContactGroupsUpdateCall {
3336	c := &ContactGroupsUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
3337	c.resourceName = resourceName
3338	c.updatecontactgrouprequest = updatecontactgrouprequest
3339	return c
3340}
3341
3342// Fields allows partial responses to be retrieved. See
3343// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
3344// for more information.
3345func (c *ContactGroupsUpdateCall) Fields(s ...googleapi.Field) *ContactGroupsUpdateCall {
3346	c.urlParams_.Set("fields", googleapi.CombineFields(s))
3347	return c
3348}
3349
3350// Context sets the context to be used in this call's Do method. Any
3351// pending HTTP request will be aborted if the provided context is
3352// canceled.
3353func (c *ContactGroupsUpdateCall) Context(ctx context.Context) *ContactGroupsUpdateCall {
3354	c.ctx_ = ctx
3355	return c
3356}
3357
3358// Header returns an http.Header that can be modified by the caller to
3359// add HTTP headers to the request.
3360func (c *ContactGroupsUpdateCall) Header() http.Header {
3361	if c.header_ == nil {
3362		c.header_ = make(http.Header)
3363	}
3364	return c.header_
3365}
3366
3367func (c *ContactGroupsUpdateCall) doRequest(alt string) (*http.Response, error) {
3368	reqHeaders := make(http.Header)
3369	for k, v := range c.header_ {
3370		reqHeaders[k] = v
3371	}
3372	reqHeaders.Set("User-Agent", c.s.userAgent())
3373	var body io.Reader = nil
3374	body, err := googleapi.WithoutDataWrapper.JSONReader(c.updatecontactgrouprequest)
3375	if err != nil {
3376		return nil, err
3377	}
3378	reqHeaders.Set("Content-Type", "application/json")
3379	c.urlParams_.Set("alt", alt)
3380	c.urlParams_.Set("prettyPrint", "false")
3381	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+resourceName}")
3382	urls += "?" + c.urlParams_.Encode()
3383	req, err := http.NewRequest("PUT", urls, body)
3384	if err != nil {
3385		return nil, err
3386	}
3387	req.Header = reqHeaders
3388	googleapi.Expand(req.URL, map[string]string{
3389		"resourceName": c.resourceName,
3390	})
3391	return gensupport.SendRequest(c.ctx_, c.s.client, req)
3392}
3393
3394// Do executes the "people.contactGroups.update" call.
3395// Exactly one of *ContactGroup or error will be non-nil. Any non-2xx
3396// status code is an error. Response headers are in either
3397// *ContactGroup.ServerResponse.Header or (if a response was returned at
3398// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
3399// to check whether the returned error was because
3400// http.StatusNotModified was returned.
3401func (c *ContactGroupsUpdateCall) Do(opts ...googleapi.CallOption) (*ContactGroup, error) {
3402	gensupport.SetOptions(c.urlParams_, opts...)
3403	res, err := c.doRequest("json")
3404	if res != nil && res.StatusCode == http.StatusNotModified {
3405		if res.Body != nil {
3406			res.Body.Close()
3407		}
3408		return nil, &googleapi.Error{
3409			Code:   res.StatusCode,
3410			Header: res.Header,
3411		}
3412	}
3413	if err != nil {
3414		return nil, err
3415	}
3416	defer googleapi.CloseBody(res)
3417	if err := googleapi.CheckResponse(res); err != nil {
3418		return nil, err
3419	}
3420	ret := &ContactGroup{
3421		ServerResponse: googleapi.ServerResponse{
3422			Header:         res.Header,
3423			HTTPStatusCode: res.StatusCode,
3424		},
3425	}
3426	target := &ret
3427	if err := gensupport.DecodeResponse(target, res); err != nil {
3428		return nil, err
3429	}
3430	return ret, nil
3431	// {
3432	//   "description": "Update the name of an existing contact group owned by the authenticated\nuser.",
3433	//   "flatPath": "v1/contactGroups/{contactGroupsId}",
3434	//   "httpMethod": "PUT",
3435	//   "id": "people.contactGroups.update",
3436	//   "parameterOrder": [
3437	//     "resourceName"
3438	//   ],
3439	//   "parameters": {
3440	//     "resourceName": {
3441	//       "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.",
3442	//       "location": "path",
3443	//       "pattern": "^contactGroups/[^/]+$",
3444	//       "required": true,
3445	//       "type": "string"
3446	//     }
3447	//   },
3448	//   "path": "v1/{+resourceName}",
3449	//   "request": {
3450	//     "$ref": "UpdateContactGroupRequest"
3451	//   },
3452	//   "response": {
3453	//     "$ref": "ContactGroup"
3454	//   },
3455	//   "scopes": [
3456	//     "https://www.googleapis.com/auth/contacts"
3457	//   ]
3458	// }
3459
3460}
3461
3462// method id "people.contactGroups.members.modify":
3463
3464type ContactGroupsMembersModifyCall struct {
3465	s                                *Service
3466	resourceName                     string
3467	modifycontactgroupmembersrequest *ModifyContactGroupMembersRequest
3468	urlParams_                       gensupport.URLParams
3469	ctx_                             context.Context
3470	header_                          http.Header
3471}
3472
3473// Modify: Modify the members of a contact group owned by the
3474// authenticated user.
3475// <br>
3476// The only system contact groups that can have members added
3477// are
3478// `contactGroups/myContacts` and `contactGroups/starred`. Other
3479// system
3480// contact groups are deprecated and can only have contacts removed.
3481func (r *ContactGroupsMembersService) Modify(resourceName string, modifycontactgroupmembersrequest *ModifyContactGroupMembersRequest) *ContactGroupsMembersModifyCall {
3482	c := &ContactGroupsMembersModifyCall{s: r.s, urlParams_: make(gensupport.URLParams)}
3483	c.resourceName = resourceName
3484	c.modifycontactgroupmembersrequest = modifycontactgroupmembersrequest
3485	return c
3486}
3487
3488// Fields allows partial responses to be retrieved. See
3489// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
3490// for more information.
3491func (c *ContactGroupsMembersModifyCall) Fields(s ...googleapi.Field) *ContactGroupsMembersModifyCall {
3492	c.urlParams_.Set("fields", googleapi.CombineFields(s))
3493	return c
3494}
3495
3496// Context sets the context to be used in this call's Do method. Any
3497// pending HTTP request will be aborted if the provided context is
3498// canceled.
3499func (c *ContactGroupsMembersModifyCall) Context(ctx context.Context) *ContactGroupsMembersModifyCall {
3500	c.ctx_ = ctx
3501	return c
3502}
3503
3504// Header returns an http.Header that can be modified by the caller to
3505// add HTTP headers to the request.
3506func (c *ContactGroupsMembersModifyCall) Header() http.Header {
3507	if c.header_ == nil {
3508		c.header_ = make(http.Header)
3509	}
3510	return c.header_
3511}
3512
3513func (c *ContactGroupsMembersModifyCall) doRequest(alt string) (*http.Response, error) {
3514	reqHeaders := make(http.Header)
3515	for k, v := range c.header_ {
3516		reqHeaders[k] = v
3517	}
3518	reqHeaders.Set("User-Agent", c.s.userAgent())
3519	var body io.Reader = nil
3520	body, err := googleapi.WithoutDataWrapper.JSONReader(c.modifycontactgroupmembersrequest)
3521	if err != nil {
3522		return nil, err
3523	}
3524	reqHeaders.Set("Content-Type", "application/json")
3525	c.urlParams_.Set("alt", alt)
3526	c.urlParams_.Set("prettyPrint", "false")
3527	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+resourceName}/members:modify")
3528	urls += "?" + c.urlParams_.Encode()
3529	req, err := http.NewRequest("POST", urls, body)
3530	if err != nil {
3531		return nil, err
3532	}
3533	req.Header = reqHeaders
3534	googleapi.Expand(req.URL, map[string]string{
3535		"resourceName": c.resourceName,
3536	})
3537	return gensupport.SendRequest(c.ctx_, c.s.client, req)
3538}
3539
3540// Do executes the "people.contactGroups.members.modify" call.
3541// Exactly one of *ModifyContactGroupMembersResponse or error will be
3542// non-nil. Any non-2xx status code is an error. Response headers are in
3543// either *ModifyContactGroupMembersResponse.ServerResponse.Header or
3544// (if a response was returned at all) in
3545// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
3546// whether the returned error was because http.StatusNotModified was
3547// returned.
3548func (c *ContactGroupsMembersModifyCall) Do(opts ...googleapi.CallOption) (*ModifyContactGroupMembersResponse, error) {
3549	gensupport.SetOptions(c.urlParams_, opts...)
3550	res, err := c.doRequest("json")
3551	if res != nil && res.StatusCode == http.StatusNotModified {
3552		if res.Body != nil {
3553			res.Body.Close()
3554		}
3555		return nil, &googleapi.Error{
3556			Code:   res.StatusCode,
3557			Header: res.Header,
3558		}
3559	}
3560	if err != nil {
3561		return nil, err
3562	}
3563	defer googleapi.CloseBody(res)
3564	if err := googleapi.CheckResponse(res); err != nil {
3565		return nil, err
3566	}
3567	ret := &ModifyContactGroupMembersResponse{
3568		ServerResponse: googleapi.ServerResponse{
3569			Header:         res.Header,
3570			HTTPStatusCode: res.StatusCode,
3571		},
3572	}
3573	target := &ret
3574	if err := gensupport.DecodeResponse(target, res); err != nil {
3575		return nil, err
3576	}
3577	return ret, nil
3578	// {
3579	//   "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.",
3580	//   "flatPath": "v1/contactGroups/{contactGroupsId}/members:modify",
3581	//   "httpMethod": "POST",
3582	//   "id": "people.contactGroups.members.modify",
3583	//   "parameterOrder": [
3584	//     "resourceName"
3585	//   ],
3586	//   "parameters": {
3587	//     "resourceName": {
3588	//       "description": "The resource name of the contact group to modify.",
3589	//       "location": "path",
3590	//       "pattern": "^contactGroups/[^/]+$",
3591	//       "required": true,
3592	//       "type": "string"
3593	//     }
3594	//   },
3595	//   "path": "v1/{+resourceName}/members:modify",
3596	//   "request": {
3597	//     "$ref": "ModifyContactGroupMembersRequest"
3598	//   },
3599	//   "response": {
3600	//     "$ref": "ModifyContactGroupMembersResponse"
3601	//   },
3602	//   "scopes": [
3603	//     "https://www.googleapis.com/auth/contacts"
3604	//   ]
3605	// }
3606
3607}
3608
3609// method id "people.people.createContact":
3610
3611type PeopleCreateContactCall struct {
3612	s          *Service
3613	person     *Person
3614	urlParams_ gensupport.URLParams
3615	ctx_       context.Context
3616	header_    http.Header
3617}
3618
3619// CreateContact: Create a new contact and return the person resource
3620// for that contact.
3621func (r *PeopleService) CreateContact(person *Person) *PeopleCreateContactCall {
3622	c := &PeopleCreateContactCall{s: r.s, urlParams_: make(gensupport.URLParams)}
3623	c.person = person
3624	return c
3625}
3626
3627// Parent sets the optional parameter "parent": The resource name of the
3628// owning person resource.
3629func (c *PeopleCreateContactCall) Parent(parent string) *PeopleCreateContactCall {
3630	c.urlParams_.Set("parent", parent)
3631	return c
3632}
3633
3634// Fields allows partial responses to be retrieved. See
3635// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
3636// for more information.
3637func (c *PeopleCreateContactCall) Fields(s ...googleapi.Field) *PeopleCreateContactCall {
3638	c.urlParams_.Set("fields", googleapi.CombineFields(s))
3639	return c
3640}
3641
3642// Context sets the context to be used in this call's Do method. Any
3643// pending HTTP request will be aborted if the provided context is
3644// canceled.
3645func (c *PeopleCreateContactCall) Context(ctx context.Context) *PeopleCreateContactCall {
3646	c.ctx_ = ctx
3647	return c
3648}
3649
3650// Header returns an http.Header that can be modified by the caller to
3651// add HTTP headers to the request.
3652func (c *PeopleCreateContactCall) Header() http.Header {
3653	if c.header_ == nil {
3654		c.header_ = make(http.Header)
3655	}
3656	return c.header_
3657}
3658
3659func (c *PeopleCreateContactCall) doRequest(alt string) (*http.Response, error) {
3660	reqHeaders := make(http.Header)
3661	for k, v := range c.header_ {
3662		reqHeaders[k] = v
3663	}
3664	reqHeaders.Set("User-Agent", c.s.userAgent())
3665	var body io.Reader = nil
3666	body, err := googleapi.WithoutDataWrapper.JSONReader(c.person)
3667	if err != nil {
3668		return nil, err
3669	}
3670	reqHeaders.Set("Content-Type", "application/json")
3671	c.urlParams_.Set("alt", alt)
3672	c.urlParams_.Set("prettyPrint", "false")
3673	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/people:createContact")
3674	urls += "?" + c.urlParams_.Encode()
3675	req, err := http.NewRequest("POST", urls, body)
3676	if err != nil {
3677		return nil, err
3678	}
3679	req.Header = reqHeaders
3680	return gensupport.SendRequest(c.ctx_, c.s.client, req)
3681}
3682
3683// Do executes the "people.people.createContact" call.
3684// Exactly one of *Person or error will be non-nil. Any non-2xx status
3685// code is an error. Response headers are in either
3686// *Person.ServerResponse.Header or (if a response was returned at all)
3687// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
3688// check whether the returned error was because http.StatusNotModified
3689// was returned.
3690func (c *PeopleCreateContactCall) Do(opts ...googleapi.CallOption) (*Person, error) {
3691	gensupport.SetOptions(c.urlParams_, opts...)
3692	res, err := c.doRequest("json")
3693	if res != nil && res.StatusCode == http.StatusNotModified {
3694		if res.Body != nil {
3695			res.Body.Close()
3696		}
3697		return nil, &googleapi.Error{
3698			Code:   res.StatusCode,
3699			Header: res.Header,
3700		}
3701	}
3702	if err != nil {
3703		return nil, err
3704	}
3705	defer googleapi.CloseBody(res)
3706	if err := googleapi.CheckResponse(res); err != nil {
3707		return nil, err
3708	}
3709	ret := &Person{
3710		ServerResponse: googleapi.ServerResponse{
3711			Header:         res.Header,
3712			HTTPStatusCode: res.StatusCode,
3713		},
3714	}
3715	target := &ret
3716	if err := gensupport.DecodeResponse(target, res); err != nil {
3717		return nil, err
3718	}
3719	return ret, nil
3720	// {
3721	//   "description": "Create a new contact and return the person resource for that contact.",
3722	//   "flatPath": "v1/people:createContact",
3723	//   "httpMethod": "POST",
3724	//   "id": "people.people.createContact",
3725	//   "parameterOrder": [],
3726	//   "parameters": {
3727	//     "parent": {
3728	//       "description": "The resource name of the owning person resource.",
3729	//       "location": "query",
3730	//       "type": "string"
3731	//     }
3732	//   },
3733	//   "path": "v1/people:createContact",
3734	//   "request": {
3735	//     "$ref": "Person"
3736	//   },
3737	//   "response": {
3738	//     "$ref": "Person"
3739	//   },
3740	//   "scopes": [
3741	//     "https://www.googleapis.com/auth/contacts"
3742	//   ]
3743	// }
3744
3745}
3746
3747// method id "people.people.deleteContact":
3748
3749type PeopleDeleteContactCall struct {
3750	s            *Service
3751	resourceName string
3752	urlParams_   gensupport.URLParams
3753	ctx_         context.Context
3754	header_      http.Header
3755}
3756
3757// DeleteContact: Delete a contact person. Any non-contact data will not
3758// be deleted.
3759func (r *PeopleService) DeleteContact(resourceName string) *PeopleDeleteContactCall {
3760	c := &PeopleDeleteContactCall{s: r.s, urlParams_: make(gensupport.URLParams)}
3761	c.resourceName = resourceName
3762	return c
3763}
3764
3765// Fields allows partial responses to be retrieved. See
3766// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
3767// for more information.
3768func (c *PeopleDeleteContactCall) Fields(s ...googleapi.Field) *PeopleDeleteContactCall {
3769	c.urlParams_.Set("fields", googleapi.CombineFields(s))
3770	return c
3771}
3772
3773// Context sets the context to be used in this call's Do method. Any
3774// pending HTTP request will be aborted if the provided context is
3775// canceled.
3776func (c *PeopleDeleteContactCall) Context(ctx context.Context) *PeopleDeleteContactCall {
3777	c.ctx_ = ctx
3778	return c
3779}
3780
3781// Header returns an http.Header that can be modified by the caller to
3782// add HTTP headers to the request.
3783func (c *PeopleDeleteContactCall) Header() http.Header {
3784	if c.header_ == nil {
3785		c.header_ = make(http.Header)
3786	}
3787	return c.header_
3788}
3789
3790func (c *PeopleDeleteContactCall) doRequest(alt string) (*http.Response, error) {
3791	reqHeaders := make(http.Header)
3792	for k, v := range c.header_ {
3793		reqHeaders[k] = v
3794	}
3795	reqHeaders.Set("User-Agent", c.s.userAgent())
3796	var body io.Reader = nil
3797	c.urlParams_.Set("alt", alt)
3798	c.urlParams_.Set("prettyPrint", "false")
3799	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+resourceName}:deleteContact")
3800	urls += "?" + c.urlParams_.Encode()
3801	req, err := http.NewRequest("DELETE", urls, body)
3802	if err != nil {
3803		return nil, err
3804	}
3805	req.Header = reqHeaders
3806	googleapi.Expand(req.URL, map[string]string{
3807		"resourceName": c.resourceName,
3808	})
3809	return gensupport.SendRequest(c.ctx_, c.s.client, req)
3810}
3811
3812// Do executes the "people.people.deleteContact" call.
3813// Exactly one of *Empty or error will be non-nil. Any non-2xx status
3814// code is an error. Response headers are in either
3815// *Empty.ServerResponse.Header or (if a response was returned at all)
3816// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
3817// check whether the returned error was because http.StatusNotModified
3818// was returned.
3819func (c *PeopleDeleteContactCall) Do(opts ...googleapi.CallOption) (*Empty, error) {
3820	gensupport.SetOptions(c.urlParams_, opts...)
3821	res, err := c.doRequest("json")
3822	if res != nil && res.StatusCode == http.StatusNotModified {
3823		if res.Body != nil {
3824			res.Body.Close()
3825		}
3826		return nil, &googleapi.Error{
3827			Code:   res.StatusCode,
3828			Header: res.Header,
3829		}
3830	}
3831	if err != nil {
3832		return nil, err
3833	}
3834	defer googleapi.CloseBody(res)
3835	if err := googleapi.CheckResponse(res); err != nil {
3836		return nil, err
3837	}
3838	ret := &Empty{
3839		ServerResponse: googleapi.ServerResponse{
3840			Header:         res.Header,
3841			HTTPStatusCode: res.StatusCode,
3842		},
3843	}
3844	target := &ret
3845	if err := gensupport.DecodeResponse(target, res); err != nil {
3846		return nil, err
3847	}
3848	return ret, nil
3849	// {
3850	//   "description": "Delete a contact person. Any non-contact data will not be deleted.",
3851	//   "flatPath": "v1/people/{peopleId}:deleteContact",
3852	//   "httpMethod": "DELETE",
3853	//   "id": "people.people.deleteContact",
3854	//   "parameterOrder": [
3855	//     "resourceName"
3856	//   ],
3857	//   "parameters": {
3858	//     "resourceName": {
3859	//       "description": "The resource name of the contact to delete.",
3860	//       "location": "path",
3861	//       "pattern": "^people/[^/]+$",
3862	//       "required": true,
3863	//       "type": "string"
3864	//     }
3865	//   },
3866	//   "path": "v1/{+resourceName}:deleteContact",
3867	//   "response": {
3868	//     "$ref": "Empty"
3869	//   },
3870	//   "scopes": [
3871	//     "https://www.googleapis.com/auth/contacts"
3872	//   ]
3873	// }
3874
3875}
3876
3877// method id "people.people.get":
3878
3879type PeopleGetCall struct {
3880	s            *Service
3881	resourceName string
3882	urlParams_   gensupport.URLParams
3883	ifNoneMatch_ string
3884	ctx_         context.Context
3885	header_      http.Header
3886}
3887
3888// Get: Provides information about a person by specifying a resource
3889// name. Use
3890// `people/me` to indicate the authenticated user.
3891// <br>
3892// The request throws a 400 error if 'personFields' is not specified.
3893func (r *PeopleService) Get(resourceName string) *PeopleGetCall {
3894	c := &PeopleGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
3895	c.resourceName = resourceName
3896	return c
3897}
3898
3899// PersonFields sets the optional parameter "personFields":
3900// **Required.** A field mask to restrict which fields on the person
3901// are
3902// returned. Multiple fields can be specified by separating them with
3903// commas.
3904// Valid values are:
3905//
3906// * addresses
3907// * ageRanges
3908// * biographies
3909// * birthdays
3910// * braggingRights
3911// * coverPhotos
3912// * emailAddresses
3913// * events
3914// * genders
3915// * imClients
3916// * interests
3917// * locales
3918// * memberships
3919// * metadata
3920// * names
3921// * nicknames
3922// * occupations
3923// * organizations
3924// * phoneNumbers
3925// * photos
3926// * relations
3927// * relationshipInterests
3928// * relationshipStatuses
3929// * residences
3930// * sipAddresses
3931// * skills
3932// * taglines
3933// * urls
3934// * userDefined
3935func (c *PeopleGetCall) PersonFields(personFields string) *PeopleGetCall {
3936	c.urlParams_.Set("personFields", personFields)
3937	return c
3938}
3939
3940// RequestMaskIncludeField sets the optional parameter
3941// "requestMask.includeField": **Required.** Comma-separated list of
3942// person fields to be included in the
3943// response. Each path should start with `person.`: for
3944// example,
3945// `person.names` or `person.photos`.
3946func (c *PeopleGetCall) RequestMaskIncludeField(requestMaskIncludeField string) *PeopleGetCall {
3947	c.urlParams_.Set("requestMask.includeField", requestMaskIncludeField)
3948	return c
3949}
3950
3951// Fields allows partial responses to be retrieved. See
3952// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
3953// for more information.
3954func (c *PeopleGetCall) Fields(s ...googleapi.Field) *PeopleGetCall {
3955	c.urlParams_.Set("fields", googleapi.CombineFields(s))
3956	return c
3957}
3958
3959// IfNoneMatch sets the optional parameter which makes the operation
3960// fail if the object's ETag matches the given value. This is useful for
3961// getting updates only after the object has changed since the last
3962// request. Use googleapi.IsNotModified to check whether the response
3963// error from Do is the result of In-None-Match.
3964func (c *PeopleGetCall) IfNoneMatch(entityTag string) *PeopleGetCall {
3965	c.ifNoneMatch_ = entityTag
3966	return c
3967}
3968
3969// Context sets the context to be used in this call's Do method. Any
3970// pending HTTP request will be aborted if the provided context is
3971// canceled.
3972func (c *PeopleGetCall) Context(ctx context.Context) *PeopleGetCall {
3973	c.ctx_ = ctx
3974	return c
3975}
3976
3977// Header returns an http.Header that can be modified by the caller to
3978// add HTTP headers to the request.
3979func (c *PeopleGetCall) Header() http.Header {
3980	if c.header_ == nil {
3981		c.header_ = make(http.Header)
3982	}
3983	return c.header_
3984}
3985
3986func (c *PeopleGetCall) doRequest(alt string) (*http.Response, error) {
3987	reqHeaders := make(http.Header)
3988	for k, v := range c.header_ {
3989		reqHeaders[k] = v
3990	}
3991	reqHeaders.Set("User-Agent", c.s.userAgent())
3992	if c.ifNoneMatch_ != "" {
3993		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
3994	}
3995	var body io.Reader = nil
3996	c.urlParams_.Set("alt", alt)
3997	c.urlParams_.Set("prettyPrint", "false")
3998	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+resourceName}")
3999	urls += "?" + c.urlParams_.Encode()
4000	req, err := http.NewRequest("GET", urls, body)
4001	if err != nil {
4002		return nil, err
4003	}
4004	req.Header = reqHeaders
4005	googleapi.Expand(req.URL, map[string]string{
4006		"resourceName": c.resourceName,
4007	})
4008	return gensupport.SendRequest(c.ctx_, c.s.client, req)
4009}
4010
4011// Do executes the "people.people.get" call.
4012// Exactly one of *Person or error will be non-nil. Any non-2xx status
4013// code is an error. Response headers are in either
4014// *Person.ServerResponse.Header or (if a response was returned at all)
4015// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
4016// check whether the returned error was because http.StatusNotModified
4017// was returned.
4018func (c *PeopleGetCall) Do(opts ...googleapi.CallOption) (*Person, error) {
4019	gensupport.SetOptions(c.urlParams_, opts...)
4020	res, err := c.doRequest("json")
4021	if res != nil && res.StatusCode == http.StatusNotModified {
4022		if res.Body != nil {
4023			res.Body.Close()
4024		}
4025		return nil, &googleapi.Error{
4026			Code:   res.StatusCode,
4027			Header: res.Header,
4028		}
4029	}
4030	if err != nil {
4031		return nil, err
4032	}
4033	defer googleapi.CloseBody(res)
4034	if err := googleapi.CheckResponse(res); err != nil {
4035		return nil, err
4036	}
4037	ret := &Person{
4038		ServerResponse: googleapi.ServerResponse{
4039			Header:         res.Header,
4040			HTTPStatusCode: res.StatusCode,
4041		},
4042	}
4043	target := &ret
4044	if err := gensupport.DecodeResponse(target, res); err != nil {
4045		return nil, err
4046	}
4047	return ret, nil
4048	// {
4049	//   "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.",
4050	//   "flatPath": "v1/people/{peopleId}",
4051	//   "httpMethod": "GET",
4052	//   "id": "people.people.get",
4053	//   "parameterOrder": [
4054	//     "resourceName"
4055	//   ],
4056	//   "parameters": {
4057	//     "personFields": {
4058	//       "description": "**Required.** A field mask to restrict which fields on the person are\nreturned. Multiple fields can be specified by separating them with commas.\nValid 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",
4059	//       "format": "google-fieldmask",
4060	//       "location": "query",
4061	//       "type": "string"
4062	//     },
4063	//     "requestMask.includeField": {
4064	//       "description": "**Required.** Comma-separated list of person fields to be included in the\nresponse. Each path should start with `person.`: for example,\n`person.names` or `person.photos`.",
4065	//       "format": "google-fieldmask",
4066	//       "location": "query",
4067	//       "type": "string"
4068	//     },
4069	//     "resourceName": {
4070	//       "description": "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).",
4071	//       "location": "path",
4072	//       "pattern": "^people/[^/]+$",
4073	//       "required": true,
4074	//       "type": "string"
4075	//     }
4076	//   },
4077	//   "path": "v1/{+resourceName}",
4078	//   "response": {
4079	//     "$ref": "Person"
4080	//   },
4081	//   "scopes": [
4082	//     "https://www.googleapis.com/auth/contacts",
4083	//     "https://www.googleapis.com/auth/contacts.readonly",
4084	//     "https://www.googleapis.com/auth/user.addresses.read",
4085	//     "https://www.googleapis.com/auth/user.birthday.read",
4086	//     "https://www.googleapis.com/auth/user.emails.read",
4087	//     "https://www.googleapis.com/auth/user.phonenumbers.read",
4088	//     "https://www.googleapis.com/auth/userinfo.email",
4089	//     "https://www.googleapis.com/auth/userinfo.profile"
4090	//   ]
4091	// }
4092
4093}
4094
4095// method id "people.people.getBatchGet":
4096
4097type PeopleGetBatchGetCall struct {
4098	s            *Service
4099	urlParams_   gensupport.URLParams
4100	ifNoneMatch_ string
4101	ctx_         context.Context
4102	header_      http.Header
4103}
4104
4105// GetBatchGet: Provides information about a list of specific people by
4106// specifying a list
4107// of requested resource names. Use `people/me` to indicate the
4108// authenticated
4109// user.
4110// <br>
4111// The request throws a 400 error if 'personFields' is not specified.
4112func (r *PeopleService) GetBatchGet() *PeopleGetBatchGetCall {
4113	c := &PeopleGetBatchGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
4114	return c
4115}
4116
4117// PersonFields sets the optional parameter "personFields":
4118// **Required.** A field mask to restrict which fields on each person
4119// are
4120// returned. Multiple fields can be specified by separating them with
4121// commas.
4122// Valid values are:
4123//
4124// * addresses
4125// * ageRanges
4126// * biographies
4127// * birthdays
4128// * braggingRights
4129// * coverPhotos
4130// * emailAddresses
4131// * events
4132// * genders
4133// * imClients
4134// * interests
4135// * locales
4136// * memberships
4137// * metadata
4138// * names
4139// * nicknames
4140// * occupations
4141// * organizations
4142// * phoneNumbers
4143// * photos
4144// * relations
4145// * relationshipInterests
4146// * relationshipStatuses
4147// * residences
4148// * sipAddresses
4149// * skills
4150// * taglines
4151// * urls
4152// * userDefined
4153func (c *PeopleGetBatchGetCall) PersonFields(personFields string) *PeopleGetBatchGetCall {
4154	c.urlParams_.Set("personFields", personFields)
4155	return c
4156}
4157
4158// RequestMaskIncludeField sets the optional parameter
4159// "requestMask.includeField": **Required.** Comma-separated list of
4160// person fields to be included in the
4161// response. Each path should start with `person.`: for
4162// example,
4163// `person.names` or `person.photos`.
4164func (c *PeopleGetBatchGetCall) RequestMaskIncludeField(requestMaskIncludeField string) *PeopleGetBatchGetCall {
4165	c.urlParams_.Set("requestMask.includeField", requestMaskIncludeField)
4166	return c
4167}
4168
4169// ResourceNames sets the optional parameter "resourceNames": The
4170// resource names of the people to provide information about.
4171//
4172// - To get information about the authenticated user, specify
4173// `people/me`.
4174// - To get information about a google account, specify
4175//   `people/`<var>account_id</var>.
4176// - To get information about a contact, specify the resource name that
4177//   identifies the contact as returned
4178// by
4179// [`people.connections.list`](/people/api/rest/v1/people.connections/
4180// list).
4181//
4182// You can include up to 50 resource names in one request.
4183func (c *PeopleGetBatchGetCall) ResourceNames(resourceNames ...string) *PeopleGetBatchGetCall {
4184	c.urlParams_.SetMulti("resourceNames", append([]string{}, resourceNames...))
4185	return c
4186}
4187
4188// Fields allows partial responses to be retrieved. See
4189// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
4190// for more information.
4191func (c *PeopleGetBatchGetCall) Fields(s ...googleapi.Field) *PeopleGetBatchGetCall {
4192	c.urlParams_.Set("fields", googleapi.CombineFields(s))
4193	return c
4194}
4195
4196// IfNoneMatch sets the optional parameter which makes the operation
4197// fail if the object's ETag matches the given value. This is useful for
4198// getting updates only after the object has changed since the last
4199// request. Use googleapi.IsNotModified to check whether the response
4200// error from Do is the result of In-None-Match.
4201func (c *PeopleGetBatchGetCall) IfNoneMatch(entityTag string) *PeopleGetBatchGetCall {
4202	c.ifNoneMatch_ = entityTag
4203	return c
4204}
4205
4206// Context sets the context to be used in this call's Do method. Any
4207// pending HTTP request will be aborted if the provided context is
4208// canceled.
4209func (c *PeopleGetBatchGetCall) Context(ctx context.Context) *PeopleGetBatchGetCall {
4210	c.ctx_ = ctx
4211	return c
4212}
4213
4214// Header returns an http.Header that can be modified by the caller to
4215// add HTTP headers to the request.
4216func (c *PeopleGetBatchGetCall) Header() http.Header {
4217	if c.header_ == nil {
4218		c.header_ = make(http.Header)
4219	}
4220	return c.header_
4221}
4222
4223func (c *PeopleGetBatchGetCall) doRequest(alt string) (*http.Response, error) {
4224	reqHeaders := make(http.Header)
4225	for k, v := range c.header_ {
4226		reqHeaders[k] = v
4227	}
4228	reqHeaders.Set("User-Agent", c.s.userAgent())
4229	if c.ifNoneMatch_ != "" {
4230		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
4231	}
4232	var body io.Reader = nil
4233	c.urlParams_.Set("alt", alt)
4234	c.urlParams_.Set("prettyPrint", "false")
4235	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/people:batchGet")
4236	urls += "?" + c.urlParams_.Encode()
4237	req, err := http.NewRequest("GET", urls, body)
4238	if err != nil {
4239		return nil, err
4240	}
4241	req.Header = reqHeaders
4242	return gensupport.SendRequest(c.ctx_, c.s.client, req)
4243}
4244
4245// Do executes the "people.people.getBatchGet" call.
4246// Exactly one of *GetPeopleResponse or error will be non-nil. Any
4247// non-2xx status code is an error. Response headers are in either
4248// *GetPeopleResponse.ServerResponse.Header or (if a response was
4249// returned at all) in error.(*googleapi.Error).Header. Use
4250// googleapi.IsNotModified to check whether the returned error was
4251// because http.StatusNotModified was returned.
4252func (c *PeopleGetBatchGetCall) Do(opts ...googleapi.CallOption) (*GetPeopleResponse, error) {
4253	gensupport.SetOptions(c.urlParams_, opts...)
4254	res, err := c.doRequest("json")
4255	if res != nil && res.StatusCode == http.StatusNotModified {
4256		if res.Body != nil {
4257			res.Body.Close()
4258		}
4259		return nil, &googleapi.Error{
4260			Code:   res.StatusCode,
4261			Header: res.Header,
4262		}
4263	}
4264	if err != nil {
4265		return nil, err
4266	}
4267	defer googleapi.CloseBody(res)
4268	if err := googleapi.CheckResponse(res); err != nil {
4269		return nil, err
4270	}
4271	ret := &GetPeopleResponse{
4272		ServerResponse: googleapi.ServerResponse{
4273			Header:         res.Header,
4274			HTTPStatusCode: res.StatusCode,
4275		},
4276	}
4277	target := &ret
4278	if err := gensupport.DecodeResponse(target, res); err != nil {
4279		return nil, err
4280	}
4281	return ret, nil
4282	// {
4283	//   "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.",
4284	//   "flatPath": "v1/people:batchGet",
4285	//   "httpMethod": "GET",
4286	//   "id": "people.people.getBatchGet",
4287	//   "parameterOrder": [],
4288	//   "parameters": {
4289	//     "personFields": {
4290	//       "description": "**Required.** A field mask to restrict which fields on each person are\nreturned. Multiple fields can be specified by separating them with commas.\nValid 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",
4291	//       "format": "google-fieldmask",
4292	//       "location": "query",
4293	//       "type": "string"
4294	//     },
4295	//     "requestMask.includeField": {
4296	//       "description": "**Required.** Comma-separated list of person fields to be included in the\nresponse. Each path should start with `person.`: for example,\n`person.names` or `person.photos`.",
4297	//       "format": "google-fieldmask",
4298	//       "location": "query",
4299	//       "type": "string"
4300	//     },
4301	//     "resourceNames": {
4302	//       "description": "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.",
4303	//       "location": "query",
4304	//       "repeated": true,
4305	//       "type": "string"
4306	//     }
4307	//   },
4308	//   "path": "v1/people:batchGet",
4309	//   "response": {
4310	//     "$ref": "GetPeopleResponse"
4311	//   },
4312	//   "scopes": [
4313	//     "https://www.googleapis.com/auth/contacts",
4314	//     "https://www.googleapis.com/auth/contacts.readonly",
4315	//     "https://www.googleapis.com/auth/user.addresses.read",
4316	//     "https://www.googleapis.com/auth/user.birthday.read",
4317	//     "https://www.googleapis.com/auth/user.emails.read",
4318	//     "https://www.googleapis.com/auth/user.phonenumbers.read",
4319	//     "https://www.googleapis.com/auth/userinfo.email",
4320	//     "https://www.googleapis.com/auth/userinfo.profile"
4321	//   ]
4322	// }
4323
4324}
4325
4326// method id "people.people.updateContact":
4327
4328type PeopleUpdateContactCall struct {
4329	s            *Service
4330	resourceName string
4331	person       *Person
4332	urlParams_   gensupport.URLParams
4333	ctx_         context.Context
4334	header_      http.Header
4335}
4336
4337// UpdateContact: Update contact data for an existing contact person.
4338// Any non-contact data
4339// will not be modified.
4340//
4341// The request throws a 400 error if `updatePersonFields` is not
4342// specified.
4343// <br>
4344// The request throws a 400 error if `person.metadata.sources` is
4345// not
4346// specified for the contact to be updated.
4347// <br>
4348// The request throws a 412 error if `person.metadata.sources.etag`
4349// is
4350// different than the contact's etag, which indicates the contact has
4351// changed
4352// since its data was read. Clients should get the latest person and
4353// re-apply
4354// their updates to the latest person.
4355func (r *PeopleService) UpdateContact(resourceName string, person *Person) *PeopleUpdateContactCall {
4356	c := &PeopleUpdateContactCall{s: r.s, urlParams_: make(gensupport.URLParams)}
4357	c.resourceName = resourceName
4358	c.person = person
4359	return c
4360}
4361
4362// UpdatePersonFields sets the optional parameter "updatePersonFields":
4363// **Required.** A field mask to restrict which fields on the person
4364// are
4365// updated. Multiple fields can be specified by separating them with
4366// commas.
4367// All updated fields will be replaced. Valid values are:
4368//
4369// * addresses
4370// * biographies
4371// * birthdays
4372// * emailAddresses
4373// * events
4374// * genders
4375// * imClients
4376// * interests
4377// * locales
4378// * memberships
4379// * names
4380// * nicknames
4381// * occupations
4382// * organizations
4383// * phoneNumbers
4384// * relations
4385// * residences
4386// * sipAddresses
4387// * urls
4388// * userDefined
4389func (c *PeopleUpdateContactCall) UpdatePersonFields(updatePersonFields string) *PeopleUpdateContactCall {
4390	c.urlParams_.Set("updatePersonFields", updatePersonFields)
4391	return c
4392}
4393
4394// Fields allows partial responses to be retrieved. See
4395// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
4396// for more information.
4397func (c *PeopleUpdateContactCall) Fields(s ...googleapi.Field) *PeopleUpdateContactCall {
4398	c.urlParams_.Set("fields", googleapi.CombineFields(s))
4399	return c
4400}
4401
4402// Context sets the context to be used in this call's Do method. Any
4403// pending HTTP request will be aborted if the provided context is
4404// canceled.
4405func (c *PeopleUpdateContactCall) Context(ctx context.Context) *PeopleUpdateContactCall {
4406	c.ctx_ = ctx
4407	return c
4408}
4409
4410// Header returns an http.Header that can be modified by the caller to
4411// add HTTP headers to the request.
4412func (c *PeopleUpdateContactCall) Header() http.Header {
4413	if c.header_ == nil {
4414		c.header_ = make(http.Header)
4415	}
4416	return c.header_
4417}
4418
4419func (c *PeopleUpdateContactCall) doRequest(alt string) (*http.Response, error) {
4420	reqHeaders := make(http.Header)
4421	for k, v := range c.header_ {
4422		reqHeaders[k] = v
4423	}
4424	reqHeaders.Set("User-Agent", c.s.userAgent())
4425	var body io.Reader = nil
4426	body, err := googleapi.WithoutDataWrapper.JSONReader(c.person)
4427	if err != nil {
4428		return nil, err
4429	}
4430	reqHeaders.Set("Content-Type", "application/json")
4431	c.urlParams_.Set("alt", alt)
4432	c.urlParams_.Set("prettyPrint", "false")
4433	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+resourceName}:updateContact")
4434	urls += "?" + c.urlParams_.Encode()
4435	req, err := http.NewRequest("PATCH", urls, body)
4436	if err != nil {
4437		return nil, err
4438	}
4439	req.Header = reqHeaders
4440	googleapi.Expand(req.URL, map[string]string{
4441		"resourceName": c.resourceName,
4442	})
4443	return gensupport.SendRequest(c.ctx_, c.s.client, req)
4444}
4445
4446// Do executes the "people.people.updateContact" call.
4447// Exactly one of *Person or error will be non-nil. Any non-2xx status
4448// code is an error. Response headers are in either
4449// *Person.ServerResponse.Header or (if a response was returned at all)
4450// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
4451// check whether the returned error was because http.StatusNotModified
4452// was returned.
4453func (c *PeopleUpdateContactCall) Do(opts ...googleapi.CallOption) (*Person, error) {
4454	gensupport.SetOptions(c.urlParams_, opts...)
4455	res, err := c.doRequest("json")
4456	if res != nil && res.StatusCode == http.StatusNotModified {
4457		if res.Body != nil {
4458			res.Body.Close()
4459		}
4460		return nil, &googleapi.Error{
4461			Code:   res.StatusCode,
4462			Header: res.Header,
4463		}
4464	}
4465	if err != nil {
4466		return nil, err
4467	}
4468	defer googleapi.CloseBody(res)
4469	if err := googleapi.CheckResponse(res); err != nil {
4470		return nil, err
4471	}
4472	ret := &Person{
4473		ServerResponse: googleapi.ServerResponse{
4474			Header:         res.Header,
4475			HTTPStatusCode: res.StatusCode,
4476		},
4477	}
4478	target := &ret
4479	if err := gensupport.DecodeResponse(target, res); err != nil {
4480		return nil, err
4481	}
4482	return ret, nil
4483	// {
4484	//   "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 412 error if `person.metadata.sources.etag` is\ndifferent than the contact's etag, which indicates the contact has changed\nsince its data was read. Clients should get the latest person and re-apply\ntheir updates to the latest person.",
4485	//   "flatPath": "v1/people/{peopleId}:updateContact",
4486	//   "httpMethod": "PATCH",
4487	//   "id": "people.people.updateContact",
4488	//   "parameterOrder": [
4489	//     "resourceName"
4490	//   ],
4491	//   "parameters": {
4492	//     "resourceName": {
4493	//       "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.",
4494	//       "location": "path",
4495	//       "pattern": "^people/[^/]+$",
4496	//       "required": true,
4497	//       "type": "string"
4498	//     },
4499	//     "updatePersonFields": {
4500	//       "description": "**Required.** A field mask to restrict which fields on the person are\nupdated. Multiple fields 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",
4501	//       "format": "google-fieldmask",
4502	//       "location": "query",
4503	//       "type": "string"
4504	//     }
4505	//   },
4506	//   "path": "v1/{+resourceName}:updateContact",
4507	//   "request": {
4508	//     "$ref": "Person"
4509	//   },
4510	//   "response": {
4511	//     "$ref": "Person"
4512	//   },
4513	//   "scopes": [
4514	//     "https://www.googleapis.com/auth/contacts"
4515	//   ]
4516	// }
4517
4518}
4519
4520// method id "people.people.connections.list":
4521
4522type PeopleConnectionsListCall struct {
4523	s            *Service
4524	resourceName string
4525	urlParams_   gensupport.URLParams
4526	ifNoneMatch_ string
4527	ctx_         context.Context
4528	header_      http.Header
4529}
4530
4531// List: Provides a list of the authenticated user's contacts merged
4532// with any
4533// connected profiles.
4534// <br>
4535// The request throws a 400 error if 'personFields' is not specified.
4536func (r *PeopleConnectionsService) List(resourceName string) *PeopleConnectionsListCall {
4537	c := &PeopleConnectionsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
4538	c.resourceName = resourceName
4539	return c
4540}
4541
4542// PageSize sets the optional parameter "pageSize": The number of
4543// connections to include in the response. Valid values are
4544// between 1 and 2000, inclusive. Defaults to 100.
4545func (c *PeopleConnectionsListCall) PageSize(pageSize int64) *PeopleConnectionsListCall {
4546	c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
4547	return c
4548}
4549
4550// PageToken sets the optional parameter "pageToken": The token of the
4551// page to be returned.
4552func (c *PeopleConnectionsListCall) PageToken(pageToken string) *PeopleConnectionsListCall {
4553	c.urlParams_.Set("pageToken", pageToken)
4554	return c
4555}
4556
4557// PersonFields sets the optional parameter "personFields":
4558// **Required.** A field mask to restrict which fields on each person
4559// are
4560// returned. Multiple fields can be specified by separating them with
4561// commas.
4562// Valid values are:
4563//
4564// * addresses
4565// * ageRanges
4566// * biographies
4567// * birthdays
4568// * braggingRights
4569// * coverPhotos
4570// * emailAddresses
4571// * events
4572// * genders
4573// * imClients
4574// * interests
4575// * locales
4576// * memberships
4577// * metadata
4578// * names
4579// * nicknames
4580// * occupations
4581// * organizations
4582// * phoneNumbers
4583// * photos
4584// * relations
4585// * relationshipInterests
4586// * relationshipStatuses
4587// * residences
4588// * sipAddresses
4589// * skills
4590// * taglines
4591// * urls
4592// * userDefined
4593func (c *PeopleConnectionsListCall) PersonFields(personFields string) *PeopleConnectionsListCall {
4594	c.urlParams_.Set("personFields", personFields)
4595	return c
4596}
4597
4598// RequestMaskIncludeField sets the optional parameter
4599// "requestMask.includeField": **Required.** Comma-separated list of
4600// person fields to be included in the
4601// response. Each path should start with `person.`: for
4602// example,
4603// `person.names` or `person.photos`.
4604func (c *PeopleConnectionsListCall) RequestMaskIncludeField(requestMaskIncludeField string) *PeopleConnectionsListCall {
4605	c.urlParams_.Set("requestMask.includeField", requestMaskIncludeField)
4606	return c
4607}
4608
4609// RequestSyncToken sets the optional parameter "requestSyncToken":
4610// Whether the response should include a sync token, which can be used
4611// to get
4612// all changes since the last request. For subsequent sync requests use
4613// the
4614// `sync_token` param instead. Initial sync requests that
4615// specify
4616// `request_sync_token` have an additional rate limit.
4617func (c *PeopleConnectionsListCall) RequestSyncToken(requestSyncToken bool) *PeopleConnectionsListCall {
4618	c.urlParams_.Set("requestSyncToken", fmt.Sprint(requestSyncToken))
4619	return c
4620}
4621
4622// SortOrder sets the optional parameter "sortOrder": The order in which
4623// the connections should be sorted. Defaults
4624// to
4625// `LAST_MODIFIED_ASCENDING`.
4626//
4627// Possible values:
4628//   "LAST_MODIFIED_ASCENDING"
4629//   "LAST_MODIFIED_DESCENDING"
4630//   "FIRST_NAME_ASCENDING"
4631//   "LAST_NAME_ASCENDING"
4632func (c *PeopleConnectionsListCall) SortOrder(sortOrder string) *PeopleConnectionsListCall {
4633	c.urlParams_.Set("sortOrder", sortOrder)
4634	return c
4635}
4636
4637// SyncToken sets the optional parameter "syncToken": A sync token
4638// returned by a previous call to `people.connections.list`.
4639// Only resources changed since the sync token was created will be
4640// returned.
4641// Sync requests that specify `sync_token` have an additional rate
4642// limit.
4643func (c *PeopleConnectionsListCall) SyncToken(syncToken string) *PeopleConnectionsListCall {
4644	c.urlParams_.Set("syncToken", syncToken)
4645	return c
4646}
4647
4648// Fields allows partial responses to be retrieved. See
4649// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
4650// for more information.
4651func (c *PeopleConnectionsListCall) Fields(s ...googleapi.Field) *PeopleConnectionsListCall {
4652	c.urlParams_.Set("fields", googleapi.CombineFields(s))
4653	return c
4654}
4655
4656// IfNoneMatch sets the optional parameter which makes the operation
4657// fail if the object's ETag matches the given value. This is useful for
4658// getting updates only after the object has changed since the last
4659// request. Use googleapi.IsNotModified to check whether the response
4660// error from Do is the result of In-None-Match.
4661func (c *PeopleConnectionsListCall) IfNoneMatch(entityTag string) *PeopleConnectionsListCall {
4662	c.ifNoneMatch_ = entityTag
4663	return c
4664}
4665
4666// Context sets the context to be used in this call's Do method. Any
4667// pending HTTP request will be aborted if the provided context is
4668// canceled.
4669func (c *PeopleConnectionsListCall) Context(ctx context.Context) *PeopleConnectionsListCall {
4670	c.ctx_ = ctx
4671	return c
4672}
4673
4674// Header returns an http.Header that can be modified by the caller to
4675// add HTTP headers to the request.
4676func (c *PeopleConnectionsListCall) Header() http.Header {
4677	if c.header_ == nil {
4678		c.header_ = make(http.Header)
4679	}
4680	return c.header_
4681}
4682
4683func (c *PeopleConnectionsListCall) doRequest(alt string) (*http.Response, error) {
4684	reqHeaders := make(http.Header)
4685	for k, v := range c.header_ {
4686		reqHeaders[k] = v
4687	}
4688	reqHeaders.Set("User-Agent", c.s.userAgent())
4689	if c.ifNoneMatch_ != "" {
4690		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
4691	}
4692	var body io.Reader = nil
4693	c.urlParams_.Set("alt", alt)
4694	c.urlParams_.Set("prettyPrint", "false")
4695	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+resourceName}/connections")
4696	urls += "?" + c.urlParams_.Encode()
4697	req, err := http.NewRequest("GET", urls, body)
4698	if err != nil {
4699		return nil, err
4700	}
4701	req.Header = reqHeaders
4702	googleapi.Expand(req.URL, map[string]string{
4703		"resourceName": c.resourceName,
4704	})
4705	return gensupport.SendRequest(c.ctx_, c.s.client, req)
4706}
4707
4708// Do executes the "people.people.connections.list" call.
4709// Exactly one of *ListConnectionsResponse or error will be non-nil. Any
4710// non-2xx status code is an error. Response headers are in either
4711// *ListConnectionsResponse.ServerResponse.Header or (if a response was
4712// returned at all) in error.(*googleapi.Error).Header. Use
4713// googleapi.IsNotModified to check whether the returned error was
4714// because http.StatusNotModified was returned.
4715func (c *PeopleConnectionsListCall) Do(opts ...googleapi.CallOption) (*ListConnectionsResponse, error) {
4716	gensupport.SetOptions(c.urlParams_, opts...)
4717	res, err := c.doRequest("json")
4718	if res != nil && res.StatusCode == http.StatusNotModified {
4719		if res.Body != nil {
4720			res.Body.Close()
4721		}
4722		return nil, &googleapi.Error{
4723			Code:   res.StatusCode,
4724			Header: res.Header,
4725		}
4726	}
4727	if err != nil {
4728		return nil, err
4729	}
4730	defer googleapi.CloseBody(res)
4731	if err := googleapi.CheckResponse(res); err != nil {
4732		return nil, err
4733	}
4734	ret := &ListConnectionsResponse{
4735		ServerResponse: googleapi.ServerResponse{
4736			Header:         res.Header,
4737			HTTPStatusCode: res.StatusCode,
4738		},
4739	}
4740	target := &ret
4741	if err := gensupport.DecodeResponse(target, res); err != nil {
4742		return nil, err
4743	}
4744	return ret, nil
4745	// {
4746	//   "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.",
4747	//   "flatPath": "v1/people/{peopleId}/connections",
4748	//   "httpMethod": "GET",
4749	//   "id": "people.people.connections.list",
4750	//   "parameterOrder": [
4751	//     "resourceName"
4752	//   ],
4753	//   "parameters": {
4754	//     "pageSize": {
4755	//       "description": "The number of connections to include in the response. Valid values are\nbetween 1 and 2000, inclusive. Defaults to 100.",
4756	//       "format": "int32",
4757	//       "location": "query",
4758	//       "type": "integer"
4759	//     },
4760	//     "pageToken": {
4761	//       "description": "The token of the page to be returned.",
4762	//       "location": "query",
4763	//       "type": "string"
4764	//     },
4765	//     "personFields": {
4766	//       "description": "**Required.** A field mask to restrict which fields on each person are\nreturned. Multiple fields can be specified by separating them with commas.\nValid 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",
4767	//       "format": "google-fieldmask",
4768	//       "location": "query",
4769	//       "type": "string"
4770	//     },
4771	//     "requestMask.includeField": {
4772	//       "description": "**Required.** Comma-separated list of person fields to be included in the\nresponse. Each path should start with `person.`: for example,\n`person.names` or `person.photos`.",
4773	//       "format": "google-fieldmask",
4774	//       "location": "query",
4775	//       "type": "string"
4776	//     },
4777	//     "requestSyncToken": {
4778	//       "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.",
4779	//       "location": "query",
4780	//       "type": "boolean"
4781	//     },
4782	//     "resourceName": {
4783	//       "description": "The resource name to return connections for. Only `people/me` is valid.",
4784	//       "location": "path",
4785	//       "pattern": "^people/[^/]+$",
4786	//       "required": true,
4787	//       "type": "string"
4788	//     },
4789	//     "sortOrder": {
4790	//       "description": "The order in which the connections should be sorted. Defaults to\n`LAST_MODIFIED_ASCENDING`.",
4791	//       "enum": [
4792	//         "LAST_MODIFIED_ASCENDING",
4793	//         "LAST_MODIFIED_DESCENDING",
4794	//         "FIRST_NAME_ASCENDING",
4795	//         "LAST_NAME_ASCENDING"
4796	//       ],
4797	//       "location": "query",
4798	//       "type": "string"
4799	//     },
4800	//     "syncToken": {
4801	//       "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.",
4802	//       "location": "query",
4803	//       "type": "string"
4804	//     }
4805	//   },
4806	//   "path": "v1/{+resourceName}/connections",
4807	//   "response": {
4808	//     "$ref": "ListConnectionsResponse"
4809	//   },
4810	//   "scopes": [
4811	//     "https://www.googleapis.com/auth/contacts",
4812	//     "https://www.googleapis.com/auth/contacts.readonly"
4813	//   ]
4814	// }
4815
4816}
4817
4818// Pages invokes f for each page of results.
4819// A non-nil error returned from f will halt the iteration.
4820// The provided context supersedes any context provided to the Context method.
4821func (c *PeopleConnectionsListCall) Pages(ctx context.Context, f func(*ListConnectionsResponse) error) error {
4822	c.ctx_ = ctx
4823	defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
4824	for {
4825		x, err := c.Do()
4826		if err != nil {
4827			return err
4828		}
4829		if err := f(x); err != nil {
4830			return err
4831		}
4832		if x.NextPageToken == "" {
4833			return nil
4834		}
4835		c.PageToken(x.NextPageToken)
4836	}
4837}
4838