1// Copyright 2021 Google LLC.
2// Use of this source code is governed by a BSD-style
3// license that can be found in the LICENSE file.
4
5// Code generated file. DO NOT EDIT.
6
7// Package drive provides access to the Drive API.
8//
9// For product documentation, see: https://developers.google.com/drive/
10//
11// Creating a client
12//
13// Usage example:
14//
15//   import "google.golang.org/api/drive/v2"
16//   ...
17//   ctx := context.Background()
18//   driveService, err := drive.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//   driveService, err := drive.NewService(ctx, option.WithScopes(drive.DriveScriptsScope))
29//
30// To use an API key for authentication (note: some APIs do not support API keys), use option.WithAPIKey:
31//
32//   driveService, err := drive.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//   driveService, err := drive.NewService(ctx, option.WithTokenSource(config.TokenSource(ctx, token)))
40//
41// See https://godoc.org/google.golang.org/api/option/ for details on options.
42package drive // import "google.golang.org/api/drive/v2"
43
44import (
45	"bytes"
46	"context"
47	"encoding/json"
48	"errors"
49	"fmt"
50	"io"
51	"net/http"
52	"net/url"
53	"strconv"
54	"strings"
55
56	googleapi "google.golang.org/api/googleapi"
57	gensupport "google.golang.org/api/internal/gensupport"
58	option "google.golang.org/api/option"
59	internaloption "google.golang.org/api/option/internaloption"
60	htransport "google.golang.org/api/transport/http"
61)
62
63// Always reference these packages, just in case the auto-generated code
64// below doesn't.
65var _ = bytes.NewBuffer
66var _ = strconv.Itoa
67var _ = fmt.Sprintf
68var _ = json.NewDecoder
69var _ = io.Copy
70var _ = url.Parse
71var _ = gensupport.MarshalJSON
72var _ = googleapi.Version
73var _ = errors.New
74var _ = strings.Replace
75var _ = context.Canceled
76var _ = internaloption.WithDefaultEndpoint
77
78const apiId = "drive:v2"
79const apiName = "drive"
80const apiVersion = "v2"
81const basePath = "https://www.googleapis.com/drive/v2/"
82
83// OAuth2 scopes used by this API.
84const (
85	// See, edit, create, and delete all of your Google Drive files
86	DriveScope = "https://www.googleapis.com/auth/drive"
87
88	// See, create, and delete its own configuration data in your Google
89	// Drive
90	DriveAppdataScope = "https://www.googleapis.com/auth/drive.appdata"
91
92	// View your Google Drive apps
93	DriveAppsReadonlyScope = "https://www.googleapis.com/auth/drive.apps.readonly"
94
95	// See, edit, create, and delete only the specific Google Drive files
96	// you use with this app
97	DriveFileScope = "https://www.googleapis.com/auth/drive.file"
98
99	// View and manage metadata of files in your Google Drive
100	DriveMetadataScope = "https://www.googleapis.com/auth/drive.metadata"
101
102	// See information about your Google Drive files
103	DriveMetadataReadonlyScope = "https://www.googleapis.com/auth/drive.metadata.readonly"
104
105	// View the photos, videos and albums in your Google Photos
106	DrivePhotosReadonlyScope = "https://www.googleapis.com/auth/drive.photos.readonly"
107
108	// See and download all your Google Drive files
109	DriveReadonlyScope = "https://www.googleapis.com/auth/drive.readonly"
110
111	// Modify your Google Apps Script scripts' behavior
112	DriveScriptsScope = "https://www.googleapis.com/auth/drive.scripts"
113)
114
115// NewService creates a new Service.
116func NewService(ctx context.Context, opts ...option.ClientOption) (*Service, error) {
117	scopesOption := option.WithScopes(
118		"https://www.googleapis.com/auth/drive",
119		"https://www.googleapis.com/auth/drive.appdata",
120		"https://www.googleapis.com/auth/drive.apps.readonly",
121		"https://www.googleapis.com/auth/drive.file",
122		"https://www.googleapis.com/auth/drive.metadata",
123		"https://www.googleapis.com/auth/drive.metadata.readonly",
124		"https://www.googleapis.com/auth/drive.photos.readonly",
125		"https://www.googleapis.com/auth/drive.readonly",
126		"https://www.googleapis.com/auth/drive.scripts",
127	)
128	// NOTE: prepend, so we don't override user-specified scopes.
129	opts = append([]option.ClientOption{scopesOption}, opts...)
130	opts = append(opts, internaloption.WithDefaultEndpoint(basePath))
131	client, endpoint, err := htransport.NewClient(ctx, opts...)
132	if err != nil {
133		return nil, err
134	}
135	s, err := New(client)
136	if err != nil {
137		return nil, err
138	}
139	if endpoint != "" {
140		s.BasePath = endpoint
141	}
142	return s, nil
143}
144
145// New creates a new Service. It uses the provided http.Client for requests.
146//
147// Deprecated: please use NewService instead.
148// To provide a custom HTTP client, use option.WithHTTPClient.
149// If you are using google.golang.org/api/googleapis/transport.APIKey, use option.WithAPIKey with NewService instead.
150func New(client *http.Client) (*Service, error) {
151	if client == nil {
152		return nil, errors.New("client is nil")
153	}
154	s := &Service{client: client, BasePath: basePath}
155	s.About = NewAboutService(s)
156	s.Apps = NewAppsService(s)
157	s.Changes = NewChangesService(s)
158	s.Channels = NewChannelsService(s)
159	s.Children = NewChildrenService(s)
160	s.Comments = NewCommentsService(s)
161	s.Drives = NewDrivesService(s)
162	s.Files = NewFilesService(s)
163	s.Parents = NewParentsService(s)
164	s.Permissions = NewPermissionsService(s)
165	s.Properties = NewPropertiesService(s)
166	s.Replies = NewRepliesService(s)
167	s.Revisions = NewRevisionsService(s)
168	s.Teamdrives = NewTeamdrivesService(s)
169	return s, nil
170}
171
172type Service struct {
173	client    *http.Client
174	BasePath  string // API endpoint base URL
175	UserAgent string // optional additional User-Agent fragment
176
177	About *AboutService
178
179	Apps *AppsService
180
181	Changes *ChangesService
182
183	Channels *ChannelsService
184
185	Children *ChildrenService
186
187	Comments *CommentsService
188
189	Drives *DrivesService
190
191	Files *FilesService
192
193	Parents *ParentsService
194
195	Permissions *PermissionsService
196
197	Properties *PropertiesService
198
199	Replies *RepliesService
200
201	Revisions *RevisionsService
202
203	Teamdrives *TeamdrivesService
204}
205
206func (s *Service) userAgent() string {
207	if s.UserAgent == "" {
208		return googleapi.UserAgent
209	}
210	return googleapi.UserAgent + " " + s.UserAgent
211}
212
213func NewAboutService(s *Service) *AboutService {
214	rs := &AboutService{s: s}
215	return rs
216}
217
218type AboutService struct {
219	s *Service
220}
221
222func NewAppsService(s *Service) *AppsService {
223	rs := &AppsService{s: s}
224	return rs
225}
226
227type AppsService struct {
228	s *Service
229}
230
231func NewChangesService(s *Service) *ChangesService {
232	rs := &ChangesService{s: s}
233	return rs
234}
235
236type ChangesService struct {
237	s *Service
238}
239
240func NewChannelsService(s *Service) *ChannelsService {
241	rs := &ChannelsService{s: s}
242	return rs
243}
244
245type ChannelsService struct {
246	s *Service
247}
248
249func NewChildrenService(s *Service) *ChildrenService {
250	rs := &ChildrenService{s: s}
251	return rs
252}
253
254type ChildrenService struct {
255	s *Service
256}
257
258func NewCommentsService(s *Service) *CommentsService {
259	rs := &CommentsService{s: s}
260	return rs
261}
262
263type CommentsService struct {
264	s *Service
265}
266
267func NewDrivesService(s *Service) *DrivesService {
268	rs := &DrivesService{s: s}
269	return rs
270}
271
272type DrivesService struct {
273	s *Service
274}
275
276func NewFilesService(s *Service) *FilesService {
277	rs := &FilesService{s: s}
278	return rs
279}
280
281type FilesService struct {
282	s *Service
283}
284
285func NewParentsService(s *Service) *ParentsService {
286	rs := &ParentsService{s: s}
287	return rs
288}
289
290type ParentsService struct {
291	s *Service
292}
293
294func NewPermissionsService(s *Service) *PermissionsService {
295	rs := &PermissionsService{s: s}
296	return rs
297}
298
299type PermissionsService struct {
300	s *Service
301}
302
303func NewPropertiesService(s *Service) *PropertiesService {
304	rs := &PropertiesService{s: s}
305	return rs
306}
307
308type PropertiesService struct {
309	s *Service
310}
311
312func NewRepliesService(s *Service) *RepliesService {
313	rs := &RepliesService{s: s}
314	return rs
315}
316
317type RepliesService struct {
318	s *Service
319}
320
321func NewRevisionsService(s *Service) *RevisionsService {
322	rs := &RevisionsService{s: s}
323	return rs
324}
325
326type RevisionsService struct {
327	s *Service
328}
329
330func NewTeamdrivesService(s *Service) *TeamdrivesService {
331	rs := &TeamdrivesService{s: s}
332	return rs
333}
334
335type TeamdrivesService struct {
336	s *Service
337}
338
339// About: An item with user information and settings.
340type About struct {
341	// AdditionalRoleInfo: Information about supported additional roles per
342	// file type. The most specific type takes precedence.
343	AdditionalRoleInfo []*AboutAdditionalRoleInfo `json:"additionalRoleInfo,omitempty"`
344
345	// CanCreateDrives: Whether the user can create shared drives.
346	CanCreateDrives bool `json:"canCreateDrives,omitempty"`
347
348	// CanCreateTeamDrives: Deprecated - use canCreateDrives instead.
349	CanCreateTeamDrives bool `json:"canCreateTeamDrives,omitempty"`
350
351	// DomainSharingPolicy: The domain sharing policy for the current user.
352	// Possible values are:
353	// - allowed
354	// - allowedWithWarning
355	// - incomingOnly
356	// - disallowed
357	DomainSharingPolicy string `json:"domainSharingPolicy,omitempty"`
358
359	// DriveThemes: A list of themes that are supported for shared drives.
360	DriveThemes []*AboutDriveThemes `json:"driveThemes,omitempty"`
361
362	// Etag: The ETag of the item.
363	Etag string `json:"etag,omitempty"`
364
365	// ExportFormats: The allowable export formats.
366	ExportFormats []*AboutExportFormats `json:"exportFormats,omitempty"`
367
368	// Features: List of additional features enabled on this account.
369	Features []*AboutFeatures `json:"features,omitempty"`
370
371	// FolderColorPalette: The palette of allowable folder colors as RGB hex
372	// strings.
373	FolderColorPalette []string `json:"folderColorPalette,omitempty"`
374
375	// ImportFormats: The allowable import formats.
376	ImportFormats []*AboutImportFormats `json:"importFormats,omitempty"`
377
378	// IsCurrentAppInstalled: A boolean indicating whether the authenticated
379	// app is installed by the authenticated user.
380	IsCurrentAppInstalled bool `json:"isCurrentAppInstalled,omitempty"`
381
382	// Kind: This is always drive#about.
383	Kind string `json:"kind,omitempty"`
384
385	// LanguageCode: The user's language or locale code, as defined by BCP
386	// 47, with some extensions from Unicode's LDML format
387	// (http://www.unicode.org/reports/tr35/).
388	LanguageCode string `json:"languageCode,omitempty"`
389
390	// LargestChangeId: The largest change id.
391	LargestChangeId int64 `json:"largestChangeId,omitempty,string"`
392
393	// MaxUploadSizes: List of max upload sizes for each file type. The most
394	// specific type takes precedence.
395	MaxUploadSizes []*AboutMaxUploadSizes `json:"maxUploadSizes,omitempty"`
396
397	// Name: The name of the current user.
398	Name string `json:"name,omitempty"`
399
400	// PermissionId: The current user's ID as visible in the permissions
401	// collection.
402	PermissionId string `json:"permissionId,omitempty"`
403
404	// QuotaBytesByService: The amount of storage quota used by different
405	// Google services.
406	QuotaBytesByService []*AboutQuotaBytesByService `json:"quotaBytesByService,omitempty"`
407
408	// QuotaBytesTotal: The total number of quota bytes. This is only
409	// relevant when quotaType is LIMITED.
410	QuotaBytesTotal int64 `json:"quotaBytesTotal,omitempty,string"`
411
412	// QuotaBytesUsed: The number of quota bytes used by Google Drive.
413	QuotaBytesUsed int64 `json:"quotaBytesUsed,omitempty,string"`
414
415	// QuotaBytesUsedAggregate: The number of quota bytes used by all Google
416	// apps (Drive, Picasa, etc.).
417	QuotaBytesUsedAggregate int64 `json:"quotaBytesUsedAggregate,omitempty,string"`
418
419	// QuotaBytesUsedInTrash: The number of quota bytes used by trashed
420	// items.
421	QuotaBytesUsedInTrash int64 `json:"quotaBytesUsedInTrash,omitempty,string"`
422
423	// QuotaType: The type of the user's storage quota. Possible values are:
424	//
425	// - LIMITED
426	// - UNLIMITED
427	QuotaType string `json:"quotaType,omitempty"`
428
429	// RemainingChangeIds: The number of remaining change ids, limited to no
430	// more than 2500.
431	RemainingChangeIds int64 `json:"remainingChangeIds,omitempty,string"`
432
433	// RootFolderId: The id of the root folder.
434	RootFolderId string `json:"rootFolderId,omitempty"`
435
436	// SelfLink: A link back to this item.
437	SelfLink string `json:"selfLink,omitempty"`
438
439	// TeamDriveThemes: Deprecated - use driveThemes instead.
440	TeamDriveThemes []*AboutTeamDriveThemes `json:"teamDriveThemes,omitempty"`
441
442	// User: The authenticated user.
443	User *User `json:"user,omitempty"`
444
445	// ServerResponse contains the HTTP response code and headers from the
446	// server.
447	googleapi.ServerResponse `json:"-"`
448
449	// ForceSendFields is a list of field names (e.g. "AdditionalRoleInfo")
450	// to unconditionally include in API requests. By default, fields with
451	// empty or default values are omitted from API requests. However, any
452	// non-pointer, non-interface field appearing in ForceSendFields will be
453	// sent to the server regardless of whether the field is empty or not.
454	// This may be used to include empty fields in Patch requests.
455	ForceSendFields []string `json:"-"`
456
457	// NullFields is a list of field names (e.g. "AdditionalRoleInfo") to
458	// include in API requests with the JSON null value. By default, fields
459	// with empty values are omitted from API requests. However, any field
460	// with an empty value appearing in NullFields will be sent to the
461	// server as null. It is an error if a field in this list has a
462	// non-empty value. This may be used to include null fields in Patch
463	// requests.
464	NullFields []string `json:"-"`
465}
466
467func (s *About) MarshalJSON() ([]byte, error) {
468	type NoMethod About
469	raw := NoMethod(*s)
470	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
471}
472
473type AboutAdditionalRoleInfo struct {
474	// RoleSets: The supported additional roles per primary role.
475	RoleSets []*AboutAdditionalRoleInfoRoleSets `json:"roleSets,omitempty"`
476
477	// Type: The content type that this additional role info applies to.
478	Type string `json:"type,omitempty"`
479
480	// ForceSendFields is a list of field names (e.g. "RoleSets") to
481	// unconditionally include in API requests. By default, fields with
482	// empty or default values are omitted from API requests. However, any
483	// non-pointer, non-interface field appearing in ForceSendFields will be
484	// sent to the server regardless of whether the field is empty or not.
485	// This may be used to include empty fields in Patch requests.
486	ForceSendFields []string `json:"-"`
487
488	// NullFields is a list of field names (e.g. "RoleSets") to include in
489	// API requests with the JSON null value. By default, fields with empty
490	// values are omitted from API requests. However, any field with an
491	// empty value appearing in NullFields will be sent to the server as
492	// null. It is an error if a field in this list has a non-empty value.
493	// This may be used to include null fields in Patch requests.
494	NullFields []string `json:"-"`
495}
496
497func (s *AboutAdditionalRoleInfo) MarshalJSON() ([]byte, error) {
498	type NoMethod AboutAdditionalRoleInfo
499	raw := NoMethod(*s)
500	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
501}
502
503type AboutAdditionalRoleInfoRoleSets struct {
504	// AdditionalRoles: The supported additional roles with the primary
505	// role.
506	AdditionalRoles []string `json:"additionalRoles,omitempty"`
507
508	// PrimaryRole: A primary permission role.
509	PrimaryRole string `json:"primaryRole,omitempty"`
510
511	// ForceSendFields is a list of field names (e.g. "AdditionalRoles") to
512	// unconditionally include in API requests. By default, fields with
513	// empty or default values are omitted from API requests. However, any
514	// non-pointer, non-interface field appearing in ForceSendFields will be
515	// sent to the server regardless of whether the field is empty or not.
516	// This may be used to include empty fields in Patch requests.
517	ForceSendFields []string `json:"-"`
518
519	// NullFields is a list of field names (e.g. "AdditionalRoles") to
520	// include in API requests with the JSON null value. By default, fields
521	// with empty values are omitted from API requests. However, any field
522	// with an empty value appearing in NullFields will be sent to the
523	// server as null. It is an error if a field in this list has a
524	// non-empty value. This may be used to include null fields in Patch
525	// requests.
526	NullFields []string `json:"-"`
527}
528
529func (s *AboutAdditionalRoleInfoRoleSets) MarshalJSON() ([]byte, error) {
530	type NoMethod AboutAdditionalRoleInfoRoleSets
531	raw := NoMethod(*s)
532	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
533}
534
535type AboutDriveThemes struct {
536	// BackgroundImageLink: A link to this theme's background image.
537	BackgroundImageLink string `json:"backgroundImageLink,omitempty"`
538
539	// ColorRgb: The color of this theme as an RGB hex string.
540	ColorRgb string `json:"colorRgb,omitempty"`
541
542	// Id: The ID of the theme.
543	Id string `json:"id,omitempty"`
544
545	// ForceSendFields is a list of field names (e.g. "BackgroundImageLink")
546	// to unconditionally include in API requests. By default, fields with
547	// empty or default values are omitted from API requests. However, any
548	// non-pointer, non-interface field appearing in ForceSendFields will be
549	// sent to the server regardless of whether the field is empty or not.
550	// This may be used to include empty fields in Patch requests.
551	ForceSendFields []string `json:"-"`
552
553	// NullFields is a list of field names (e.g. "BackgroundImageLink") to
554	// include in API requests with the JSON null value. By default, fields
555	// with empty values are omitted from API requests. However, any field
556	// with an empty value appearing in NullFields will be sent to the
557	// server as null. It is an error if a field in this list has a
558	// non-empty value. This may be used to include null fields in Patch
559	// requests.
560	NullFields []string `json:"-"`
561}
562
563func (s *AboutDriveThemes) MarshalJSON() ([]byte, error) {
564	type NoMethod AboutDriveThemes
565	raw := NoMethod(*s)
566	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
567}
568
569type AboutExportFormats struct {
570	// Source: The content type to convert from.
571	Source string `json:"source,omitempty"`
572
573	// Targets: The possible content types to convert to.
574	Targets []string `json:"targets,omitempty"`
575
576	// ForceSendFields is a list of field names (e.g. "Source") to
577	// unconditionally include in API requests. By default, fields with
578	// empty or default values are omitted from API requests. However, any
579	// non-pointer, non-interface field appearing in ForceSendFields will be
580	// sent to the server regardless of whether the field is empty or not.
581	// This may be used to include empty fields in Patch requests.
582	ForceSendFields []string `json:"-"`
583
584	// NullFields is a list of field names (e.g. "Source") to include in API
585	// requests with the JSON null value. By default, fields with empty
586	// values are omitted from API requests. However, any field with an
587	// empty value appearing in NullFields will be sent to the server as
588	// null. It is an error if a field in this list has a non-empty value.
589	// This may be used to include null fields in Patch requests.
590	NullFields []string `json:"-"`
591}
592
593func (s *AboutExportFormats) MarshalJSON() ([]byte, error) {
594	type NoMethod AboutExportFormats
595	raw := NoMethod(*s)
596	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
597}
598
599type AboutFeatures struct {
600	// FeatureName: The name of the feature.
601	FeatureName string `json:"featureName,omitempty"`
602
603	// FeatureRate: The request limit rate for this feature, in queries per
604	// second.
605	FeatureRate float64 `json:"featureRate,omitempty"`
606
607	// ForceSendFields is a list of field names (e.g. "FeatureName") to
608	// unconditionally include in API requests. By default, fields with
609	// empty or default values are omitted from API requests. However, any
610	// non-pointer, non-interface field appearing in ForceSendFields will be
611	// sent to the server regardless of whether the field is empty or not.
612	// This may be used to include empty fields in Patch requests.
613	ForceSendFields []string `json:"-"`
614
615	// NullFields is a list of field names (e.g. "FeatureName") to include
616	// in API requests with the JSON null value. By default, fields with
617	// empty values are omitted from API requests. However, any field with
618	// an empty value appearing in NullFields will be sent to the server as
619	// null. It is an error if a field in this list has a non-empty value.
620	// This may be used to include null fields in Patch requests.
621	NullFields []string `json:"-"`
622}
623
624func (s *AboutFeatures) MarshalJSON() ([]byte, error) {
625	type NoMethod AboutFeatures
626	raw := NoMethod(*s)
627	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
628}
629
630func (s *AboutFeatures) UnmarshalJSON(data []byte) error {
631	type NoMethod AboutFeatures
632	var s1 struct {
633		FeatureRate gensupport.JSONFloat64 `json:"featureRate"`
634		*NoMethod
635	}
636	s1.NoMethod = (*NoMethod)(s)
637	if err := json.Unmarshal(data, &s1); err != nil {
638		return err
639	}
640	s.FeatureRate = float64(s1.FeatureRate)
641	return nil
642}
643
644type AboutImportFormats struct {
645	// Source: The imported file's content type to convert from.
646	Source string `json:"source,omitempty"`
647
648	// Targets: The possible content types to convert to.
649	Targets []string `json:"targets,omitempty"`
650
651	// ForceSendFields is a list of field names (e.g. "Source") to
652	// unconditionally include in API requests. By default, fields with
653	// empty or default values are omitted from API requests. However, any
654	// non-pointer, non-interface field appearing in ForceSendFields will be
655	// sent to the server regardless of whether the field is empty or not.
656	// This may be used to include empty fields in Patch requests.
657	ForceSendFields []string `json:"-"`
658
659	// NullFields is a list of field names (e.g. "Source") to include in API
660	// requests with the JSON null value. By default, fields with empty
661	// values are omitted from API requests. However, any field with an
662	// empty value appearing in NullFields will be sent to the server as
663	// null. It is an error if a field in this list has a non-empty value.
664	// This may be used to include null fields in Patch requests.
665	NullFields []string `json:"-"`
666}
667
668func (s *AboutImportFormats) MarshalJSON() ([]byte, error) {
669	type NoMethod AboutImportFormats
670	raw := NoMethod(*s)
671	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
672}
673
674type AboutMaxUploadSizes struct {
675	// Size: The max upload size for this type.
676	Size int64 `json:"size,omitempty,string"`
677
678	// Type: The file type.
679	Type string `json:"type,omitempty"`
680
681	// ForceSendFields is a list of field names (e.g. "Size") to
682	// unconditionally include in API requests. By default, fields with
683	// empty or default values are omitted from API requests. However, any
684	// non-pointer, non-interface field appearing in ForceSendFields will be
685	// sent to the server regardless of whether the field is empty or not.
686	// This may be used to include empty fields in Patch requests.
687	ForceSendFields []string `json:"-"`
688
689	// NullFields is a list of field names (e.g. "Size") to include in API
690	// requests with the JSON null value. By default, fields with empty
691	// values are omitted from API requests. However, any field with an
692	// empty value appearing in NullFields will be sent to the server as
693	// null. It is an error if a field in this list has a non-empty value.
694	// This may be used to include null fields in Patch requests.
695	NullFields []string `json:"-"`
696}
697
698func (s *AboutMaxUploadSizes) MarshalJSON() ([]byte, error) {
699	type NoMethod AboutMaxUploadSizes
700	raw := NoMethod(*s)
701	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
702}
703
704type AboutQuotaBytesByService struct {
705	// BytesUsed: The storage quota bytes used by the service.
706	BytesUsed int64 `json:"bytesUsed,omitempty,string"`
707
708	// ServiceName: The service's name, e.g. DRIVE, GMAIL, or PHOTOS.
709	ServiceName string `json:"serviceName,omitempty"`
710
711	// ForceSendFields is a list of field names (e.g. "BytesUsed") to
712	// unconditionally include in API requests. By default, fields with
713	// empty or default values are omitted from API requests. However, any
714	// non-pointer, non-interface field appearing in ForceSendFields will be
715	// sent to the server regardless of whether the field is empty or not.
716	// This may be used to include empty fields in Patch requests.
717	ForceSendFields []string `json:"-"`
718
719	// NullFields is a list of field names (e.g. "BytesUsed") to include in
720	// API requests with the JSON null value. By default, fields with empty
721	// values are omitted from API requests. However, any field with an
722	// empty value appearing in NullFields will be sent to the server as
723	// null. It is an error if a field in this list has a non-empty value.
724	// This may be used to include null fields in Patch requests.
725	NullFields []string `json:"-"`
726}
727
728func (s *AboutQuotaBytesByService) MarshalJSON() ([]byte, error) {
729	type NoMethod AboutQuotaBytesByService
730	raw := NoMethod(*s)
731	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
732}
733
734type AboutTeamDriveThemes struct {
735	// BackgroundImageLink: Deprecated - use driveThemes/backgroundImageLink
736	// instead.
737	BackgroundImageLink string `json:"backgroundImageLink,omitempty"`
738
739	// ColorRgb: Deprecated - use driveThemes/colorRgb instead.
740	ColorRgb string `json:"colorRgb,omitempty"`
741
742	// Id: Deprecated - use driveThemes/id instead.
743	Id string `json:"id,omitempty"`
744
745	// ForceSendFields is a list of field names (e.g. "BackgroundImageLink")
746	// to unconditionally include in API requests. By default, fields with
747	// empty or default values are omitted from API requests. However, any
748	// non-pointer, non-interface field appearing in ForceSendFields will be
749	// sent to the server regardless of whether the field is empty or not.
750	// This may be used to include empty fields in Patch requests.
751	ForceSendFields []string `json:"-"`
752
753	// NullFields is a list of field names (e.g. "BackgroundImageLink") to
754	// include in API requests with the JSON null value. By default, fields
755	// with empty values are omitted from API requests. However, any field
756	// with an empty value appearing in NullFields will be sent to the
757	// server as null. It is an error if a field in this list has a
758	// non-empty value. This may be used to include null fields in Patch
759	// requests.
760	NullFields []string `json:"-"`
761}
762
763func (s *AboutTeamDriveThemes) MarshalJSON() ([]byte, error) {
764	type NoMethod AboutTeamDriveThemes
765	raw := NoMethod(*s)
766	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
767}
768
769// App: The apps resource provides a list of the apps that a user has
770// installed, with information about each app's supported MIME types,
771// file extensions, and other details.
772type App struct {
773	// Authorized: Whether the app is authorized to access data on the
774	// user's Drive.
775	Authorized bool `json:"authorized,omitempty"`
776
777	// CreateInFolderTemplate: The template url to create a new file with
778	// this app in a given folder. The template will contain {folderId} to
779	// be replaced by the folder to create the new file in.
780	CreateInFolderTemplate string `json:"createInFolderTemplate,omitempty"`
781
782	// CreateUrl: The url to create a new file with this app.
783	CreateUrl string `json:"createUrl,omitempty"`
784
785	// HasDriveWideScope: Whether the app has drive-wide scope. An app with
786	// drive-wide scope can access all files in the user's drive.
787	HasDriveWideScope bool `json:"hasDriveWideScope,omitempty"`
788
789	// Icons: The various icons for the app.
790	Icons []*AppIcons `json:"icons,omitempty"`
791
792	// Id: The ID of the app.
793	Id string `json:"id,omitempty"`
794
795	// Installed: Whether the app is installed.
796	Installed bool `json:"installed,omitempty"`
797
798	// Kind: This is always drive#app.
799	Kind string `json:"kind,omitempty"`
800
801	// LongDescription: A long description of the app.
802	LongDescription string `json:"longDescription,omitempty"`
803
804	// Name: The name of the app.
805	Name string `json:"name,omitempty"`
806
807	// ObjectType: The type of object this app creates (e.g. Chart). If
808	// empty, the app name should be used instead.
809	ObjectType string `json:"objectType,omitempty"`
810
811	// OpenUrlTemplate: The template url for opening files with this app.
812	// The template will contain {ids} and/or {exportIds} to be replaced by
813	// the actual file ids. See  Open Files  for the full documentation.
814	OpenUrlTemplate string `json:"openUrlTemplate,omitempty"`
815
816	// PrimaryFileExtensions: The list of primary file extensions.
817	PrimaryFileExtensions []string `json:"primaryFileExtensions,omitempty"`
818
819	// PrimaryMimeTypes: The list of primary mime types.
820	PrimaryMimeTypes []string `json:"primaryMimeTypes,omitempty"`
821
822	// ProductId: The ID of the product listing for this app.
823	ProductId string `json:"productId,omitempty"`
824
825	// ProductUrl: A link to the product listing for this app.
826	ProductUrl string `json:"productUrl,omitempty"`
827
828	// SecondaryFileExtensions: The list of secondary file extensions.
829	SecondaryFileExtensions []string `json:"secondaryFileExtensions,omitempty"`
830
831	// SecondaryMimeTypes: The list of secondary mime types.
832	SecondaryMimeTypes []string `json:"secondaryMimeTypes,omitempty"`
833
834	// ShortDescription: A short description of the app.
835	ShortDescription string `json:"shortDescription,omitempty"`
836
837	// SupportsCreate: Whether this app supports creating new objects.
838	SupportsCreate bool `json:"supportsCreate,omitempty"`
839
840	// SupportsImport: Whether this app supports importing from Docs
841	// Editors.
842	SupportsImport bool `json:"supportsImport,omitempty"`
843
844	// SupportsMultiOpen: Whether this app supports opening more than one
845	// file.
846	SupportsMultiOpen bool `json:"supportsMultiOpen,omitempty"`
847
848	// SupportsOfflineCreate: Whether this app supports creating new files
849	// when offline.
850	SupportsOfflineCreate bool `json:"supportsOfflineCreate,omitempty"`
851
852	// UseByDefault: Whether the app is selected as the default handler for
853	// the types it supports.
854	UseByDefault bool `json:"useByDefault,omitempty"`
855
856	// ServerResponse contains the HTTP response code and headers from the
857	// server.
858	googleapi.ServerResponse `json:"-"`
859
860	// ForceSendFields is a list of field names (e.g. "Authorized") to
861	// unconditionally include in API requests. By default, fields with
862	// empty or default values are omitted from API requests. However, any
863	// non-pointer, non-interface field appearing in ForceSendFields will be
864	// sent to the server regardless of whether the field is empty or not.
865	// This may be used to include empty fields in Patch requests.
866	ForceSendFields []string `json:"-"`
867
868	// NullFields is a list of field names (e.g. "Authorized") to include in
869	// API requests with the JSON null value. By default, fields with empty
870	// values are omitted from API requests. However, any field with an
871	// empty value appearing in NullFields will be sent to the server as
872	// null. It is an error if a field in this list has a non-empty value.
873	// This may be used to include null fields in Patch requests.
874	NullFields []string `json:"-"`
875}
876
877func (s *App) MarshalJSON() ([]byte, error) {
878	type NoMethod App
879	raw := NoMethod(*s)
880	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
881}
882
883type AppIcons struct {
884	// Category: Category of the icon. Allowed values are:
885	// - application - icon for the application
886	// - document - icon for a file associated with the app
887	// - documentShared - icon for a shared file associated with the app
888	Category string `json:"category,omitempty"`
889
890	// IconUrl: URL for the icon.
891	IconUrl string `json:"iconUrl,omitempty"`
892
893	// Size: Size of the icon. Represented as the maximum of the width and
894	// height.
895	Size int64 `json:"size,omitempty"`
896
897	// ForceSendFields is a list of field names (e.g. "Category") to
898	// unconditionally include in API requests. By default, fields with
899	// empty or default values are omitted from API requests. However, any
900	// non-pointer, non-interface field appearing in ForceSendFields will be
901	// sent to the server regardless of whether the field is empty or not.
902	// This may be used to include empty fields in Patch requests.
903	ForceSendFields []string `json:"-"`
904
905	// NullFields is a list of field names (e.g. "Category") to include in
906	// API requests with the JSON null value. By default, fields with empty
907	// values are omitted from API requests. However, any field with an
908	// empty value appearing in NullFields will be sent to the server as
909	// null. It is an error if a field in this list has a non-empty value.
910	// This may be used to include null fields in Patch requests.
911	NullFields []string `json:"-"`
912}
913
914func (s *AppIcons) MarshalJSON() ([]byte, error) {
915	type NoMethod AppIcons
916	raw := NoMethod(*s)
917	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
918}
919
920// AppList: A list of third-party applications which the user has
921// installed or given access to Google Drive.
922type AppList struct {
923	// DefaultAppIds: List of app IDs that the user has specified to use by
924	// default. The list is in reverse-priority order (lowest to highest).
925	DefaultAppIds []string `json:"defaultAppIds,omitempty"`
926
927	// Etag: The ETag of the list.
928	Etag string `json:"etag,omitempty"`
929
930	// Items: The list of apps.
931	Items []*App `json:"items,omitempty"`
932
933	// Kind: This is always drive#appList.
934	Kind string `json:"kind,omitempty"`
935
936	// SelfLink: A link back to this list.
937	SelfLink string `json:"selfLink,omitempty"`
938
939	// ServerResponse contains the HTTP response code and headers from the
940	// server.
941	googleapi.ServerResponse `json:"-"`
942
943	// ForceSendFields is a list of field names (e.g. "DefaultAppIds") to
944	// unconditionally include in API requests. By default, fields with
945	// empty or default values are omitted from API requests. However, any
946	// non-pointer, non-interface field appearing in ForceSendFields will be
947	// sent to the server regardless of whether the field is empty or not.
948	// This may be used to include empty fields in Patch requests.
949	ForceSendFields []string `json:"-"`
950
951	// NullFields is a list of field names (e.g. "DefaultAppIds") to include
952	// in API requests with the JSON null value. By default, fields with
953	// empty values are omitted from API requests. However, any field with
954	// an empty value appearing in NullFields will be sent to the server as
955	// null. It is an error if a field in this list has a non-empty value.
956	// This may be used to include null fields in Patch requests.
957	NullFields []string `json:"-"`
958}
959
960func (s *AppList) MarshalJSON() ([]byte, error) {
961	type NoMethod AppList
962	raw := NoMethod(*s)
963	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
964}
965
966// Change: Representation of a change to a file or shared drive.
967type Change struct {
968	// ChangeType: The type of the change. Possible values are file and
969	// drive.
970	ChangeType string `json:"changeType,omitempty"`
971
972	// Deleted: Whether the file or shared drive has been removed from this
973	// list of changes, for example by deletion or loss of access.
974	Deleted bool `json:"deleted,omitempty"`
975
976	// Drive: The updated state of the shared drive. Present if the
977	// changeType is drive, the user is still a member of the shared drive,
978	// and the shared drive has not been deleted.
979	Drive *Drive `json:"drive,omitempty"`
980
981	// DriveId: The ID of the shared drive associated with this change.
982	DriveId string `json:"driveId,omitempty"`
983
984	// File: The updated state of the file. Present if the type is file and
985	// the file has not been removed from this list of changes.
986	File *File `json:"file,omitempty"`
987
988	// FileId: The ID of the file associated with this change.
989	FileId string `json:"fileId,omitempty"`
990
991	// Id: The ID of the change.
992	Id int64 `json:"id,omitempty,string"`
993
994	// Kind: This is always drive#change.
995	Kind string `json:"kind,omitempty"`
996
997	// ModificationDate: The time of this modification.
998	ModificationDate string `json:"modificationDate,omitempty"`
999
1000	// SelfLink: A link back to this change.
1001	SelfLink string `json:"selfLink,omitempty"`
1002
1003	// TeamDrive: Deprecated - use drive instead.
1004	TeamDrive *TeamDrive `json:"teamDrive,omitempty"`
1005
1006	// TeamDriveId: Deprecated - use driveId instead.
1007	TeamDriveId string `json:"teamDriveId,omitempty"`
1008
1009	// Type: Deprecated - use changeType instead.
1010	Type string `json:"type,omitempty"`
1011
1012	// ServerResponse contains the HTTP response code and headers from the
1013	// server.
1014	googleapi.ServerResponse `json:"-"`
1015
1016	// ForceSendFields is a list of field names (e.g. "ChangeType") to
1017	// unconditionally include in API requests. By default, fields with
1018	// empty or default values are omitted from API requests. However, any
1019	// non-pointer, non-interface field appearing in ForceSendFields will be
1020	// sent to the server regardless of whether the field is empty or not.
1021	// This may be used to include empty fields in Patch requests.
1022	ForceSendFields []string `json:"-"`
1023
1024	// NullFields is a list of field names (e.g. "ChangeType") to include in
1025	// API requests with the JSON null value. By default, fields with empty
1026	// values are omitted from API requests. However, any field with an
1027	// empty value appearing in NullFields will be sent to the server as
1028	// null. It is an error if a field in this list has a non-empty value.
1029	// This may be used to include null fields in Patch requests.
1030	NullFields []string `json:"-"`
1031}
1032
1033func (s *Change) MarshalJSON() ([]byte, error) {
1034	type NoMethod Change
1035	raw := NoMethod(*s)
1036	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1037}
1038
1039// ChangeList: A list of changes for a user.
1040type ChangeList struct {
1041	// Etag: The ETag of the list.
1042	Etag string `json:"etag,omitempty"`
1043
1044	// Items: The list of changes. If nextPageToken is populated, then this
1045	// list may be incomplete and an additional page of results should be
1046	// fetched.
1047	Items []*Change `json:"items,omitempty"`
1048
1049	// Kind: This is always drive#changeList.
1050	Kind string `json:"kind,omitempty"`
1051
1052	// LargestChangeId: The current largest change ID.
1053	LargestChangeId int64 `json:"largestChangeId,omitempty,string"`
1054
1055	// NewStartPageToken: The starting page token for future changes. This
1056	// will be present only if the end of the current changes list has been
1057	// reached.
1058	NewStartPageToken string `json:"newStartPageToken,omitempty"`
1059
1060	// NextLink: A link to the next page of changes.
1061	NextLink string `json:"nextLink,omitempty"`
1062
1063	// NextPageToken: The page token for the next page of changes. This will
1064	// be absent if the end of the changes list has been reached. If the
1065	// token is rejected for any reason, it should be discarded, and
1066	// pagination should be restarted from the first page of results.
1067	NextPageToken string `json:"nextPageToken,omitempty"`
1068
1069	// SelfLink: A link back to this list.
1070	SelfLink string `json:"selfLink,omitempty"`
1071
1072	// ServerResponse contains the HTTP response code and headers from the
1073	// server.
1074	googleapi.ServerResponse `json:"-"`
1075
1076	// ForceSendFields is a list of field names (e.g. "Etag") to
1077	// unconditionally include in API requests. By default, fields with
1078	// empty or default values are omitted from API requests. However, any
1079	// non-pointer, non-interface field appearing in ForceSendFields will be
1080	// sent to the server regardless of whether the field is empty or not.
1081	// This may be used to include empty fields in Patch requests.
1082	ForceSendFields []string `json:"-"`
1083
1084	// NullFields is a list of field names (e.g. "Etag") to include in API
1085	// requests with the JSON null value. By default, fields with empty
1086	// values are omitted from API requests. However, any field with an
1087	// empty value appearing in NullFields will be sent to the server as
1088	// null. It is an error if a field in this list has a non-empty value.
1089	// This may be used to include null fields in Patch requests.
1090	NullFields []string `json:"-"`
1091}
1092
1093func (s *ChangeList) MarshalJSON() ([]byte, error) {
1094	type NoMethod ChangeList
1095	raw := NoMethod(*s)
1096	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1097}
1098
1099// Channel: An notification channel used to watch for resource changes.
1100type Channel struct {
1101	// Address: The address where notifications are delivered for this
1102	// channel.
1103	Address string `json:"address,omitempty"`
1104
1105	// Expiration: Date and time of notification channel expiration,
1106	// expressed as a Unix timestamp, in milliseconds. Optional.
1107	Expiration int64 `json:"expiration,omitempty,string"`
1108
1109	// Id: A UUID or similar unique string that identifies this channel.
1110	Id string `json:"id,omitempty"`
1111
1112	// Kind: Identifies this as a notification channel used to watch for
1113	// changes to a resource, which is "api#channel".
1114	Kind string `json:"kind,omitempty"`
1115
1116	// Params: Additional parameters controlling delivery channel behavior.
1117	// Optional.
1118	Params map[string]string `json:"params,omitempty"`
1119
1120	// Payload: A Boolean value to indicate whether payload is wanted.
1121	// Optional.
1122	Payload bool `json:"payload,omitempty"`
1123
1124	// ResourceId: An opaque ID that identifies the resource being watched
1125	// on this channel. Stable across different API versions.
1126	ResourceId string `json:"resourceId,omitempty"`
1127
1128	// ResourceUri: A version-specific identifier for the watched resource.
1129	ResourceUri string `json:"resourceUri,omitempty"`
1130
1131	// Token: An arbitrary string delivered to the target address with each
1132	// notification delivered over this channel. Optional.
1133	Token string `json:"token,omitempty"`
1134
1135	// Type: The type of delivery mechanism used for this channel. Valid
1136	// values are "web_hook" (or "webhook"). Both values refer to a channel
1137	// where Http requests are used to deliver messages.
1138	Type string `json:"type,omitempty"`
1139
1140	// ServerResponse contains the HTTP response code and headers from the
1141	// server.
1142	googleapi.ServerResponse `json:"-"`
1143
1144	// ForceSendFields is a list of field names (e.g. "Address") to
1145	// unconditionally include in API requests. By default, fields with
1146	// empty or default values are omitted from API requests. However, any
1147	// non-pointer, non-interface field appearing in ForceSendFields will be
1148	// sent to the server regardless of whether the field is empty or not.
1149	// This may be used to include empty fields in Patch requests.
1150	ForceSendFields []string `json:"-"`
1151
1152	// NullFields is a list of field names (e.g. "Address") to include in
1153	// API requests with the JSON null value. By default, fields with empty
1154	// values are omitted from API requests. However, any field with an
1155	// empty value appearing in NullFields will be sent to the server as
1156	// null. It is an error if a field in this list has a non-empty value.
1157	// This may be used to include null fields in Patch requests.
1158	NullFields []string `json:"-"`
1159}
1160
1161func (s *Channel) MarshalJSON() ([]byte, error) {
1162	type NoMethod Channel
1163	raw := NoMethod(*s)
1164	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1165}
1166
1167// ChildList: A list of children of a file.
1168type ChildList struct {
1169	// Etag: The ETag of the list.
1170	Etag string `json:"etag,omitempty"`
1171
1172	// Items: The list of children. If nextPageToken is populated, then this
1173	// list may be incomplete and an additional page of results should be
1174	// fetched.
1175	Items []*ChildReference `json:"items,omitempty"`
1176
1177	// Kind: This is always drive#childList.
1178	Kind string `json:"kind,omitempty"`
1179
1180	// NextLink: A link to the next page of children.
1181	NextLink string `json:"nextLink,omitempty"`
1182
1183	// NextPageToken: The page token for the next page of children. This
1184	// will be absent if the end of the children list has been reached. If
1185	// the token is rejected for any reason, it should be discarded, and
1186	// pagination should be restarted from the first page of results.
1187	NextPageToken string `json:"nextPageToken,omitempty"`
1188
1189	// SelfLink: A link back to this list.
1190	SelfLink string `json:"selfLink,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. "Etag") to
1197	// unconditionally include in API requests. By default, fields with
1198	// empty or default values are omitted from API requests. However, any
1199	// non-pointer, non-interface field appearing in ForceSendFields will be
1200	// sent to the server regardless of whether the field is empty or not.
1201	// This may be used to include empty fields in Patch requests.
1202	ForceSendFields []string `json:"-"`
1203
1204	// NullFields is a list of field names (e.g. "Etag") to include in API
1205	// requests with the JSON null value. By default, fields with empty
1206	// values are omitted from API requests. However, any field with an
1207	// 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 *ChildList) MarshalJSON() ([]byte, error) {
1214	type NoMethod ChildList
1215	raw := NoMethod(*s)
1216	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1217}
1218
1219// ChildReference: A reference to a folder's child.
1220type ChildReference struct {
1221	// ChildLink: A link to the child.
1222	ChildLink string `json:"childLink,omitempty"`
1223
1224	// Id: The ID of the child.
1225	Id string `json:"id,omitempty"`
1226
1227	// Kind: This is always drive#childReference.
1228	Kind string `json:"kind,omitempty"`
1229
1230	// SelfLink: A link back to this reference.
1231	SelfLink string `json:"selfLink,omitempty"`
1232
1233	// ServerResponse contains the HTTP response code and headers from the
1234	// server.
1235	googleapi.ServerResponse `json:"-"`
1236
1237	// ForceSendFields is a list of field names (e.g. "ChildLink") to
1238	// unconditionally include in API requests. By default, fields with
1239	// empty or default values are omitted from API requests. However, any
1240	// non-pointer, non-interface field appearing in ForceSendFields will be
1241	// sent to the server regardless of whether the field is empty or not.
1242	// This may be used to include empty fields in Patch requests.
1243	ForceSendFields []string `json:"-"`
1244
1245	// NullFields is a list of field names (e.g. "ChildLink") to include in
1246	// API requests with the JSON null value. By default, fields with empty
1247	// values are omitted from API requests. However, any field with an
1248	// empty value appearing in NullFields will be sent to the server as
1249	// null. It is an error if a field in this list has a non-empty value.
1250	// This may be used to include null fields in Patch requests.
1251	NullFields []string `json:"-"`
1252}
1253
1254func (s *ChildReference) MarshalJSON() ([]byte, error) {
1255	type NoMethod ChildReference
1256	raw := NoMethod(*s)
1257	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1258}
1259
1260// Comment: A comment on a file in Google Drive.
1261type Comment struct {
1262	// Anchor: A region of the document represented as a JSON string. For
1263	// details on defining anchor properties, refer to  Add comments and
1264	// replies.
1265	Anchor string `json:"anchor,omitempty"`
1266
1267	// Author: The author of the comment. The author's email address and
1268	// permission ID will not be populated.
1269	Author *User `json:"author,omitempty"`
1270
1271	// CommentId: The ID of the comment.
1272	CommentId string `json:"commentId,omitempty"`
1273
1274	// Content: The plain text content used to create this comment. This is
1275	// not HTML safe and should only be used as a starting point to make
1276	// edits to a comment's content.
1277	Content string `json:"content,omitempty"`
1278
1279	// Context: The context of the file which is being commented on.
1280	Context *CommentContext `json:"context,omitempty"`
1281
1282	// CreatedDate: The date when this comment was first created.
1283	CreatedDate string `json:"createdDate,omitempty"`
1284
1285	// Deleted: Whether this comment has been deleted. If a comment has been
1286	// deleted the content will be cleared and this will only represent a
1287	// comment that once existed.
1288	Deleted bool `json:"deleted,omitempty"`
1289
1290	// FileId: The file which this comment is addressing.
1291	FileId string `json:"fileId,omitempty"`
1292
1293	// FileTitle: The title of the file which this comment is addressing.
1294	FileTitle string `json:"fileTitle,omitempty"`
1295
1296	// HtmlContent: HTML formatted content for this comment.
1297	HtmlContent string `json:"htmlContent,omitempty"`
1298
1299	// Kind: This is always drive#comment.
1300	Kind string `json:"kind,omitempty"`
1301
1302	// ModifiedDate: The date when this comment or any of its replies were
1303	// last modified.
1304	ModifiedDate string `json:"modifiedDate,omitempty"`
1305
1306	// Replies: Replies to this post.
1307	Replies []*CommentReply `json:"replies,omitempty"`
1308
1309	// SelfLink: A link back to this comment.
1310	SelfLink string `json:"selfLink,omitempty"`
1311
1312	// Status: The status of this comment. Status can be changed by posting
1313	// a reply to a comment with the desired status.
1314	// - "open" - The comment is still open.
1315	// - "resolved" - The comment has been resolved by one of its replies.
1316	Status string `json:"status,omitempty"`
1317
1318	// ServerResponse contains the HTTP response code and headers from the
1319	// server.
1320	googleapi.ServerResponse `json:"-"`
1321
1322	// ForceSendFields is a list of field names (e.g. "Anchor") to
1323	// unconditionally include in API requests. By default, fields with
1324	// empty or default values are omitted from API requests. However, any
1325	// non-pointer, non-interface field appearing in ForceSendFields will be
1326	// sent to the server regardless of whether the field is empty or not.
1327	// This may be used to include empty fields in Patch requests.
1328	ForceSendFields []string `json:"-"`
1329
1330	// NullFields is a list of field names (e.g. "Anchor") to include in API
1331	// requests with the JSON null value. By default, fields with empty
1332	// values are omitted from API requests. However, any field with an
1333	// empty value appearing in NullFields will be sent to the server as
1334	// null. It is an error if a field in this list has a non-empty value.
1335	// This may be used to include null fields in Patch requests.
1336	NullFields []string `json:"-"`
1337}
1338
1339func (s *Comment) MarshalJSON() ([]byte, error) {
1340	type NoMethod Comment
1341	raw := NoMethod(*s)
1342	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1343}
1344
1345// CommentContext: The context of the file which is being commented on.
1346type CommentContext struct {
1347	// Type: The MIME type of the context snippet.
1348	Type string `json:"type,omitempty"`
1349
1350	// Value: Data representation of the segment of the file being commented
1351	// on. In the case of a text file for example, this would be the actual
1352	// text that the comment is about.
1353	Value string `json:"value,omitempty"`
1354
1355	// ForceSendFields is a list of field names (e.g. "Type") to
1356	// unconditionally include in API requests. By default, fields with
1357	// empty or default values are omitted from API requests. However, any
1358	// non-pointer, non-interface field appearing in ForceSendFields will be
1359	// sent to the server regardless of whether the field is empty or not.
1360	// This may be used to include empty fields in Patch requests.
1361	ForceSendFields []string `json:"-"`
1362
1363	// NullFields is a list of field names (e.g. "Type") to include in API
1364	// requests with the JSON null value. By default, fields with empty
1365	// values are omitted from API requests. However, any field with an
1366	// empty value appearing in NullFields will be sent to the server as
1367	// null. It is an error if a field in this list has a non-empty value.
1368	// This may be used to include null fields in Patch requests.
1369	NullFields []string `json:"-"`
1370}
1371
1372func (s *CommentContext) MarshalJSON() ([]byte, error) {
1373	type NoMethod CommentContext
1374	raw := NoMethod(*s)
1375	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1376}
1377
1378// CommentList: A list of comments on a file in Google Drive.
1379type CommentList struct {
1380	// Items: The list of comments. If nextPageToken is populated, then this
1381	// list may be incomplete and an additional page of results should be
1382	// fetched.
1383	Items []*Comment `json:"items,omitempty"`
1384
1385	// Kind: This is always drive#commentList.
1386	Kind string `json:"kind,omitempty"`
1387
1388	// NextLink: A link to the next page of comments.
1389	NextLink string `json:"nextLink,omitempty"`
1390
1391	// NextPageToken: The page token for the next page of comments. This
1392	// will be absent if the end of the comments list has been reached. If
1393	// the token is rejected for any reason, it should be discarded, and
1394	// pagination should be restarted from the first page of results.
1395	NextPageToken string `json:"nextPageToken,omitempty"`
1396
1397	// SelfLink: A link back to this list.
1398	SelfLink string `json:"selfLink,omitempty"`
1399
1400	// ServerResponse contains the HTTP response code and headers from the
1401	// server.
1402	googleapi.ServerResponse `json:"-"`
1403
1404	// ForceSendFields is a list of field names (e.g. "Items") to
1405	// unconditionally include in API requests. By default, fields with
1406	// empty or default values are omitted from API requests. However, any
1407	// non-pointer, non-interface field appearing in ForceSendFields will be
1408	// sent to the server regardless of whether the field is empty or not.
1409	// This may be used to include empty fields in Patch requests.
1410	ForceSendFields []string `json:"-"`
1411
1412	// NullFields is a list of field names (e.g. "Items") to include in API
1413	// requests with the JSON null value. By default, fields with empty
1414	// values are omitted from API requests. However, any field with an
1415	// empty value appearing in NullFields will be sent to the server as
1416	// null. It is an error if a field in this list has a non-empty value.
1417	// This may be used to include null fields in Patch requests.
1418	NullFields []string `json:"-"`
1419}
1420
1421func (s *CommentList) MarshalJSON() ([]byte, error) {
1422	type NoMethod CommentList
1423	raw := NoMethod(*s)
1424	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1425}
1426
1427// CommentReply: A comment on a file in Google Drive.
1428type CommentReply struct {
1429	// Author: The author of the reply. The author's email address and
1430	// permission ID will not be populated.
1431	Author *User `json:"author,omitempty"`
1432
1433	// Content: The plain text content used to create this reply. This is
1434	// not HTML safe and should only be used as a starting point to make
1435	// edits to a reply's content. This field is required on inserts if no
1436	// verb is specified (resolve/reopen).
1437	Content string `json:"content,omitempty"`
1438
1439	// CreatedDate: The date when this reply was first created.
1440	CreatedDate string `json:"createdDate,omitempty"`
1441
1442	// Deleted: Whether this reply has been deleted. If a reply has been
1443	// deleted the content will be cleared and this will only represent a
1444	// reply that once existed.
1445	Deleted bool `json:"deleted,omitempty"`
1446
1447	// HtmlContent: HTML formatted content for this reply.
1448	HtmlContent string `json:"htmlContent,omitempty"`
1449
1450	// Kind: This is always drive#commentReply.
1451	Kind string `json:"kind,omitempty"`
1452
1453	// ModifiedDate: The date when this reply was last modified.
1454	ModifiedDate string `json:"modifiedDate,omitempty"`
1455
1456	// ReplyId: The ID of the reply.
1457	ReplyId string `json:"replyId,omitempty"`
1458
1459	// Verb: The action this reply performed to the parent comment. When
1460	// creating a new reply this is the action to be perform to the parent
1461	// comment. Possible values are:
1462	// - "resolve" - To resolve a comment.
1463	// - "reopen" - To reopen (un-resolve) a comment.
1464	Verb string `json:"verb,omitempty"`
1465
1466	// ServerResponse contains the HTTP response code and headers from the
1467	// server.
1468	googleapi.ServerResponse `json:"-"`
1469
1470	// ForceSendFields is a list of field names (e.g. "Author") to
1471	// unconditionally include in API requests. By default, fields with
1472	// empty or default values are omitted from API requests. However, any
1473	// non-pointer, non-interface field appearing in ForceSendFields will be
1474	// sent to the server regardless of whether the field is empty or not.
1475	// This may be used to include empty fields in Patch requests.
1476	ForceSendFields []string `json:"-"`
1477
1478	// NullFields is a list of field names (e.g. "Author") to include in API
1479	// requests with the JSON null value. By default, fields with empty
1480	// values are omitted from API requests. However, any field with an
1481	// empty value appearing in NullFields will be sent to the server as
1482	// null. It is an error if a field in this list has a non-empty value.
1483	// This may be used to include null fields in Patch requests.
1484	NullFields []string `json:"-"`
1485}
1486
1487func (s *CommentReply) MarshalJSON() ([]byte, error) {
1488	type NoMethod CommentReply
1489	raw := NoMethod(*s)
1490	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1491}
1492
1493// CommentReplyList: A list of replies to a comment on a file in Google
1494// Drive.
1495type CommentReplyList struct {
1496	// Items: The list of replies. If nextPageToken is populated, then this
1497	// list may be incomplete and an additional page of results should be
1498	// fetched.
1499	Items []*CommentReply `json:"items,omitempty"`
1500
1501	// Kind: This is always drive#commentReplyList.
1502	Kind string `json:"kind,omitempty"`
1503
1504	// NextLink: A link to the next page of replies.
1505	NextLink string `json:"nextLink,omitempty"`
1506
1507	// NextPageToken: The page token for the next page of replies. This will
1508	// be absent if the end of the replies list has been reached. If the
1509	// token is rejected for any reason, it should be discarded, and
1510	// pagination should be restarted from the first page of results.
1511	NextPageToken string `json:"nextPageToken,omitempty"`
1512
1513	// SelfLink: A link back to this list.
1514	SelfLink string `json:"selfLink,omitempty"`
1515
1516	// ServerResponse contains the HTTP response code and headers from the
1517	// server.
1518	googleapi.ServerResponse `json:"-"`
1519
1520	// ForceSendFields is a list of field names (e.g. "Items") to
1521	// unconditionally include in API requests. By default, fields with
1522	// empty or default values are omitted from API requests. However, any
1523	// non-pointer, non-interface field appearing in ForceSendFields will be
1524	// sent to the server regardless of whether the field is empty or not.
1525	// This may be used to include empty fields in Patch requests.
1526	ForceSendFields []string `json:"-"`
1527
1528	// NullFields is a list of field names (e.g. "Items") to include in API
1529	// requests with the JSON null value. By default, fields with empty
1530	// values are omitted from API requests. However, any field with an
1531	// empty value appearing in NullFields will be sent to the server as
1532	// null. It is an error if a field in this list has a non-empty value.
1533	// This may be used to include null fields in Patch requests.
1534	NullFields []string `json:"-"`
1535}
1536
1537func (s *CommentReplyList) MarshalJSON() ([]byte, error) {
1538	type NoMethod CommentReplyList
1539	raw := NoMethod(*s)
1540	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1541}
1542
1543// ContentRestriction: A restriction for accessing the content of the
1544// file.
1545type ContentRestriction struct {
1546	// ReadOnly: Whether the content of the file is read-only. If a file is
1547	// read-only, a new revision of the file may not be added, comments may
1548	// not be added or modified, and the title of the file may not be
1549	// modified.
1550	ReadOnly bool `json:"readOnly,omitempty"`
1551
1552	// Reason: Reason for why the content of the file is restricted. This is
1553	// only mutable on requests that also set readOnly=true.
1554	Reason string `json:"reason,omitempty"`
1555
1556	// RestrictingUser: The user who set the content restriction. Only
1557	// populated if readOnly is true.
1558	RestrictingUser *User `json:"restrictingUser,omitempty"`
1559
1560	// RestrictionDate: The time at which the content restriction was set
1561	// (formatted RFC 3339 timestamp). Only populated if readOnly is true.
1562	RestrictionDate string `json:"restrictionDate,omitempty"`
1563
1564	// Type: The type of the content restriction. Currently the only
1565	// possible value is globalContentRestriction.
1566	Type string `json:"type,omitempty"`
1567
1568	// ForceSendFields is a list of field names (e.g. "ReadOnly") to
1569	// unconditionally include in API requests. By default, fields with
1570	// empty or default values are omitted from API requests. However, any
1571	// non-pointer, non-interface field appearing in ForceSendFields will be
1572	// sent to the server regardless of whether the field is empty or not.
1573	// This may be used to include empty fields in Patch requests.
1574	ForceSendFields []string `json:"-"`
1575
1576	// NullFields is a list of field names (e.g. "ReadOnly") to include in
1577	// API requests with the JSON null value. By default, fields with empty
1578	// values are omitted from API requests. However, any field with an
1579	// empty value appearing in NullFields will be sent to the server as
1580	// null. It is an error if a field in this list has a non-empty value.
1581	// This may be used to include null fields in Patch requests.
1582	NullFields []string `json:"-"`
1583}
1584
1585func (s *ContentRestriction) MarshalJSON() ([]byte, error) {
1586	type NoMethod ContentRestriction
1587	raw := NoMethod(*s)
1588	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1589}
1590
1591// Drive: Representation of a shared drive.
1592type Drive struct {
1593	// BackgroundImageFile: An image file and cropping parameters from which
1594	// a background image for this shared drive is set. This is a write only
1595	// field; it can only be set on drive.drives.update requests that don't
1596	// set themeId. When specified, all fields of the backgroundImageFile
1597	// must be set.
1598	BackgroundImageFile *DriveBackgroundImageFile `json:"backgroundImageFile,omitempty"`
1599
1600	// BackgroundImageLink: A short-lived link to this shared drive's
1601	// background image.
1602	BackgroundImageLink string `json:"backgroundImageLink,omitempty"`
1603
1604	// Capabilities: Capabilities the current user has on this shared drive.
1605	Capabilities *DriveCapabilities `json:"capabilities,omitempty"`
1606
1607	// ColorRgb: The color of this shared drive as an RGB hex string. It can
1608	// only be set on a drive.drives.update request that does not set
1609	// themeId.
1610	ColorRgb string `json:"colorRgb,omitempty"`
1611
1612	// CreatedDate: The time at which the shared drive was created (RFC 3339
1613	// date-time).
1614	CreatedDate string `json:"createdDate,omitempty"`
1615
1616	// Hidden: Whether the shared drive is hidden from default view.
1617	Hidden bool `json:"hidden,omitempty"`
1618
1619	// Id: The ID of this shared drive which is also the ID of the top level
1620	// folder of this shared drive.
1621	Id string `json:"id,omitempty"`
1622
1623	// Kind: This is always drive#drive
1624	Kind string `json:"kind,omitempty"`
1625
1626	// Name: The name of this shared drive.
1627	Name string `json:"name,omitempty"`
1628
1629	// Restrictions: A set of restrictions that apply to this shared drive
1630	// or items inside this shared drive.
1631	Restrictions *DriveRestrictions `json:"restrictions,omitempty"`
1632
1633	// ThemeId: The ID of the theme from which the background image and
1634	// color will be set. The set of possible driveThemes can be retrieved
1635	// from a drive.about.get response. When not specified on a
1636	// drive.drives.insert request, a random theme is chosen from which the
1637	// background image and color are set. This is a write-only field; it
1638	// can only be set on requests that don't set colorRgb or
1639	// backgroundImageFile.
1640	ThemeId string `json:"themeId,omitempty"`
1641
1642	// ServerResponse contains the HTTP response code and headers from the
1643	// server.
1644	googleapi.ServerResponse `json:"-"`
1645
1646	// ForceSendFields is a list of field names (e.g. "BackgroundImageFile")
1647	// to unconditionally include in API requests. By default, fields with
1648	// empty or default values are omitted from API requests. However, any
1649	// non-pointer, non-interface field appearing in ForceSendFields will be
1650	// sent to the server regardless of whether the field is empty or not.
1651	// This may be used to include empty fields in Patch requests.
1652	ForceSendFields []string `json:"-"`
1653
1654	// NullFields is a list of field names (e.g. "BackgroundImageFile") to
1655	// include in API requests with the JSON null value. By default, fields
1656	// with empty values are omitted from API requests. However, any field
1657	// with an empty value appearing in NullFields will be sent to the
1658	// server as null. It is an error if a field in this list has a
1659	// non-empty value. This may be used to include null fields in Patch
1660	// requests.
1661	NullFields []string `json:"-"`
1662}
1663
1664func (s *Drive) MarshalJSON() ([]byte, error) {
1665	type NoMethod Drive
1666	raw := NoMethod(*s)
1667	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1668}
1669
1670// DriveBackgroundImageFile: An image file and cropping parameters from
1671// which a background image for this shared drive is set. This is a
1672// write only field; it can only be set on drive.drives.update requests
1673// that don't set themeId. When specified, all fields of the
1674// backgroundImageFile must be set.
1675type DriveBackgroundImageFile struct {
1676	// Id: The ID of an image file in Google Drive to use for the background
1677	// image.
1678	Id string `json:"id,omitempty"`
1679
1680	// Width: The width of the cropped image in the closed range of 0 to 1.
1681	// This value represents the width of the cropped image divided by the
1682	// width of the entire image. The height is computed by applying a width
1683	// to height aspect ratio of 80 to 9. The resulting image must be at
1684	// least 1280 pixels wide and 144 pixels high.
1685	Width float64 `json:"width,omitempty"`
1686
1687	// XCoordinate: The X coordinate of the upper left corner of the
1688	// cropping area in the background image. This is a value in the closed
1689	// range of 0 to 1. This value represents the horizontal distance from
1690	// the left side of the entire image to the left side of the cropping
1691	// area divided by the width of the entire image.
1692	XCoordinate float64 `json:"xCoordinate,omitempty"`
1693
1694	// YCoordinate: The Y coordinate of the upper left corner of the
1695	// cropping area in the background image. This is a value in the closed
1696	// range of 0 to 1. This value represents the vertical distance from the
1697	// top side of the entire image to the top side of the cropping area
1698	// divided by the height of the entire image.
1699	YCoordinate float64 `json:"yCoordinate,omitempty"`
1700
1701	// ForceSendFields is a list of field names (e.g. "Id") to
1702	// unconditionally include in API requests. By default, fields with
1703	// empty or default values are omitted from API requests. However, any
1704	// non-pointer, non-interface field appearing in ForceSendFields will be
1705	// sent to the server regardless of whether the field is empty or not.
1706	// This may be used to include empty fields in Patch requests.
1707	ForceSendFields []string `json:"-"`
1708
1709	// NullFields is a list of field names (e.g. "Id") to include in API
1710	// requests with the JSON null value. By default, fields with empty
1711	// values are omitted from API requests. However, any field with an
1712	// empty value appearing in NullFields will be sent to the server as
1713	// null. It is an error if a field in this list has a non-empty value.
1714	// This may be used to include null fields in Patch requests.
1715	NullFields []string `json:"-"`
1716}
1717
1718func (s *DriveBackgroundImageFile) MarshalJSON() ([]byte, error) {
1719	type NoMethod DriveBackgroundImageFile
1720	raw := NoMethod(*s)
1721	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1722}
1723
1724func (s *DriveBackgroundImageFile) UnmarshalJSON(data []byte) error {
1725	type NoMethod DriveBackgroundImageFile
1726	var s1 struct {
1727		Width       gensupport.JSONFloat64 `json:"width"`
1728		XCoordinate gensupport.JSONFloat64 `json:"xCoordinate"`
1729		YCoordinate gensupport.JSONFloat64 `json:"yCoordinate"`
1730		*NoMethod
1731	}
1732	s1.NoMethod = (*NoMethod)(s)
1733	if err := json.Unmarshal(data, &s1); err != nil {
1734		return err
1735	}
1736	s.Width = float64(s1.Width)
1737	s.XCoordinate = float64(s1.XCoordinate)
1738	s.YCoordinate = float64(s1.YCoordinate)
1739	return nil
1740}
1741
1742// DriveCapabilities: Capabilities the current user has on this shared
1743// drive.
1744type DriveCapabilities struct {
1745	// CanAddChildren: Whether the current user can add children to folders
1746	// in this shared drive.
1747	CanAddChildren bool `json:"canAddChildren,omitempty"`
1748
1749	// CanChangeCopyRequiresWriterPermissionRestriction: Whether the current
1750	// user can change the copyRequiresWriterPermission restriction of this
1751	// shared drive.
1752	CanChangeCopyRequiresWriterPermissionRestriction bool `json:"canChangeCopyRequiresWriterPermissionRestriction,omitempty"`
1753
1754	// CanChangeDomainUsersOnlyRestriction: Whether the current user can
1755	// change the domainUsersOnly restriction of this shared drive.
1756	CanChangeDomainUsersOnlyRestriction bool `json:"canChangeDomainUsersOnlyRestriction,omitempty"`
1757
1758	// CanChangeDriveBackground: Whether the current user can change the
1759	// background of this shared drive.
1760	CanChangeDriveBackground bool `json:"canChangeDriveBackground,omitempty"`
1761
1762	// CanChangeDriveMembersOnlyRestriction: Whether the current user can
1763	// change the driveMembersOnly restriction of this shared drive.
1764	CanChangeDriveMembersOnlyRestriction bool `json:"canChangeDriveMembersOnlyRestriction,omitempty"`
1765
1766	// CanComment: Whether the current user can comment on files in this
1767	// shared drive.
1768	CanComment bool `json:"canComment,omitempty"`
1769
1770	// CanCopy: Whether the current user can copy files in this shared
1771	// drive.
1772	CanCopy bool `json:"canCopy,omitempty"`
1773
1774	// CanDeleteChildren: Whether the current user can delete children from
1775	// folders in this shared drive.
1776	CanDeleteChildren bool `json:"canDeleteChildren,omitempty"`
1777
1778	// CanDeleteDrive: Whether the current user can delete this shared
1779	// drive. Attempting to delete the shared drive may still fail if there
1780	// are untrashed items inside the shared drive.
1781	CanDeleteDrive bool `json:"canDeleteDrive,omitempty"`
1782
1783	// CanDownload: Whether the current user can download files in this
1784	// shared drive.
1785	CanDownload bool `json:"canDownload,omitempty"`
1786
1787	// CanEdit: Whether the current user can edit files in this shared drive
1788	CanEdit bool `json:"canEdit,omitempty"`
1789
1790	// CanListChildren: Whether the current user can list the children of
1791	// folders in this shared drive.
1792	CanListChildren bool `json:"canListChildren,omitempty"`
1793
1794	// CanManageMembers: Whether the current user can add members to this
1795	// shared drive or remove them or change their role.
1796	CanManageMembers bool `json:"canManageMembers,omitempty"`
1797
1798	// CanReadRevisions: Whether the current user can read the revisions
1799	// resource of files in this shared drive.
1800	CanReadRevisions bool `json:"canReadRevisions,omitempty"`
1801
1802	// CanRename: Whether the current user can rename files or folders in
1803	// this shared drive.
1804	CanRename bool `json:"canRename,omitempty"`
1805
1806	// CanRenameDrive: Whether the current user can rename this shared
1807	// drive.
1808	CanRenameDrive bool `json:"canRenameDrive,omitempty"`
1809
1810	// CanShare: Whether the current user can share files or folders in this
1811	// shared drive.
1812	CanShare bool `json:"canShare,omitempty"`
1813
1814	// CanTrashChildren: Whether the current user can trash children from
1815	// folders in this shared drive.
1816	CanTrashChildren bool `json:"canTrashChildren,omitempty"`
1817
1818	// ForceSendFields is a list of field names (e.g. "CanAddChildren") to
1819	// unconditionally include in API requests. By default, fields with
1820	// empty or default values are omitted from API requests. However, any
1821	// non-pointer, non-interface field appearing in ForceSendFields will be
1822	// sent to the server regardless of whether the field is empty or not.
1823	// This may be used to include empty fields in Patch requests.
1824	ForceSendFields []string `json:"-"`
1825
1826	// NullFields is a list of field names (e.g. "CanAddChildren") to
1827	// include in API requests with the JSON null value. By default, fields
1828	// with empty values are omitted from API requests. However, any field
1829	// with an empty value appearing in NullFields will be sent to the
1830	// server as null. It is an error if a field in this list has a
1831	// non-empty value. This may be used to include null fields in Patch
1832	// requests.
1833	NullFields []string `json:"-"`
1834}
1835
1836func (s *DriveCapabilities) MarshalJSON() ([]byte, error) {
1837	type NoMethod DriveCapabilities
1838	raw := NoMethod(*s)
1839	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1840}
1841
1842// DriveRestrictions: A set of restrictions that apply to this shared
1843// drive or items inside this shared drive.
1844type DriveRestrictions struct {
1845	// AdminManagedRestrictions: Whether administrative privileges on this
1846	// shared drive are required to modify restrictions.
1847	AdminManagedRestrictions bool `json:"adminManagedRestrictions,omitempty"`
1848
1849	// CopyRequiresWriterPermission: Whether the options to copy, print, or
1850	// download files inside this shared drive, should be disabled for
1851	// readers and commenters. When this restriction is set to true, it will
1852	// override the similarly named field to true for any file inside this
1853	// shared drive.
1854	CopyRequiresWriterPermission bool `json:"copyRequiresWriterPermission,omitempty"`
1855
1856	// DomainUsersOnly: Whether access to this shared drive and items inside
1857	// this shared drive is restricted to users of the domain to which this
1858	// shared drive belongs. This restriction may be overridden by other
1859	// sharing policies controlled outside of this shared drive.
1860	DomainUsersOnly bool `json:"domainUsersOnly,omitempty"`
1861
1862	// DriveMembersOnly: Whether access to items inside this shared drive is
1863	// restricted to its members.
1864	DriveMembersOnly bool `json:"driveMembersOnly,omitempty"`
1865
1866	// ForceSendFields is a list of field names (e.g.
1867	// "AdminManagedRestrictions") to unconditionally include in API
1868	// requests. By default, fields with empty or default values are omitted
1869	// from API requests. However, any non-pointer, non-interface field
1870	// appearing in ForceSendFields will be sent to the server regardless of
1871	// whether the field is empty or not. This may be used to include empty
1872	// fields in Patch requests.
1873	ForceSendFields []string `json:"-"`
1874
1875	// NullFields is a list of field names (e.g. "AdminManagedRestrictions")
1876	// to include in API requests with the JSON null value. By default,
1877	// fields with empty values are omitted from API requests. However, any
1878	// field with an empty value appearing in NullFields will be sent to the
1879	// server as null. It is an error if a field in this list has a
1880	// non-empty value. This may be used to include null fields in Patch
1881	// requests.
1882	NullFields []string `json:"-"`
1883}
1884
1885func (s *DriveRestrictions) MarshalJSON() ([]byte, error) {
1886	type NoMethod DriveRestrictions
1887	raw := NoMethod(*s)
1888	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1889}
1890
1891// DriveList: A list of shared drives.
1892type DriveList struct {
1893	// Items: The list of shared drives. If nextPageToken is populated, then
1894	// this list may be incomplete and an additional page of results should
1895	// be fetched.
1896	Items []*Drive `json:"items,omitempty"`
1897
1898	// Kind: This is always drive#driveList
1899	Kind string `json:"kind,omitempty"`
1900
1901	// NextPageToken: The page token for the next page of shared drives.
1902	// This will be absent if the end of the list has been reached. If the
1903	// token is rejected for any reason, it should be discarded, and
1904	// pagination should be restarted from the first page of results.
1905	NextPageToken string `json:"nextPageToken,omitempty"`
1906
1907	// ServerResponse contains the HTTP response code and headers from the
1908	// server.
1909	googleapi.ServerResponse `json:"-"`
1910
1911	// ForceSendFields is a list of field names (e.g. "Items") to
1912	// unconditionally include in API requests. By default, fields with
1913	// empty or default values are omitted from API requests. However, any
1914	// non-pointer, non-interface field appearing in ForceSendFields will be
1915	// sent to the server regardless of whether the field is empty or not.
1916	// This may be used to include empty fields in Patch requests.
1917	ForceSendFields []string `json:"-"`
1918
1919	// NullFields is a list of field names (e.g. "Items") to include in API
1920	// requests with the JSON null value. By default, fields with empty
1921	// values are omitted from API requests. However, any field with an
1922	// empty value appearing in NullFields will be sent to the server as
1923	// null. It is an error if a field in this list has a non-empty value.
1924	// This may be used to include null fields in Patch requests.
1925	NullFields []string `json:"-"`
1926}
1927
1928func (s *DriveList) MarshalJSON() ([]byte, error) {
1929	type NoMethod DriveList
1930	raw := NoMethod(*s)
1931	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1932}
1933
1934// File: The metadata for a file.
1935type File struct {
1936	// AlternateLink: A link for opening the file in a relevant Google
1937	// editor or viewer.
1938	AlternateLink string `json:"alternateLink,omitempty"`
1939
1940	// AppDataContents: Whether this file is in the Application Data folder.
1941	AppDataContents bool `json:"appDataContents,omitempty"`
1942
1943	// CanComment: Deprecated: use capabilities/canComment.
1944	CanComment bool `json:"canComment,omitempty"`
1945
1946	// CanReadRevisions: Deprecated: use capabilities/canReadRevisions.
1947	CanReadRevisions bool `json:"canReadRevisions,omitempty"`
1948
1949	// Capabilities: Capabilities the current user has on this file. Each
1950	// capability corresponds to a fine-grained action that a user may take.
1951	Capabilities *FileCapabilities `json:"capabilities,omitempty"`
1952
1953	// ContentRestrictions: Restrictions for accessing the content of the
1954	// file. Only populated if such a restriction exists.
1955	ContentRestrictions []*ContentRestriction `json:"contentRestrictions,omitempty"`
1956
1957	// CopyRequiresWriterPermission: Whether the options to copy, print, or
1958	// download this file, should be disabled for readers and commenters.
1959	CopyRequiresWriterPermission bool `json:"copyRequiresWriterPermission,omitempty"`
1960
1961	// Copyable: Deprecated: use capabilities/canCopy.
1962	Copyable bool `json:"copyable,omitempty"`
1963
1964	// CreatedDate: Create time for this file (formatted RFC 3339
1965	// timestamp).
1966	CreatedDate string `json:"createdDate,omitempty"`
1967
1968	// DefaultOpenWithLink: A link to open this file with the user's default
1969	// app for this file. Only populated when the drive.apps.readonly scope
1970	// is used.
1971	DefaultOpenWithLink string `json:"defaultOpenWithLink,omitempty"`
1972
1973	// Description: A short description of the file.
1974	Description string `json:"description,omitempty"`
1975
1976	// DownloadUrl: Short lived download URL for the file. This field is
1977	// only populated for files with content stored in Google Drive; it is
1978	// not populated for Docs Editors or shortcut files.
1979	DownloadUrl string `json:"downloadUrl,omitempty"`
1980
1981	// DriveId: ID of the shared drive the file resides in. Only populated
1982	// for items in shared drives.
1983	DriveId string `json:"driveId,omitempty"`
1984
1985	// Editable: Deprecated: use capabilities/canEdit.
1986	Editable bool `json:"editable,omitempty"`
1987
1988	// EmbedLink: A link for embedding the file.
1989	EmbedLink string `json:"embedLink,omitempty"`
1990
1991	// Etag: ETag of the file.
1992	Etag string `json:"etag,omitempty"`
1993
1994	// ExplicitlyTrashed: Whether this file has been explicitly trashed, as
1995	// opposed to recursively trashed.
1996	ExplicitlyTrashed bool `json:"explicitlyTrashed,omitempty"`
1997
1998	// ExportLinks: Links for exporting Docs Editors files to specific
1999	// formats.
2000	ExportLinks map[string]string `json:"exportLinks,omitempty"`
2001
2002	// FileExtension: The final component of fullFileExtension with trailing
2003	// text that does not appear to be part of the extension removed. This
2004	// field is only populated for files with content stored in Google
2005	// Drive; it is not populated for Docs Editors or shortcut files.
2006	FileExtension string `json:"fileExtension,omitempty"`
2007
2008	// FileSize: The size of the file in bytes. This field is populated for
2009	// files with content stored in Google Drive and for files in Docs
2010	// Editors; it is not populated for shortcut files.
2011	FileSize int64 `json:"fileSize,omitempty,string"`
2012
2013	// FolderColorRgb: Folder color as an RGB hex string if the file is a
2014	// folder or a shortcut to a folder. The list of supported colors is
2015	// available in the folderColorPalette field of the About resource. If
2016	// an unsupported color is specified, it will be changed to the closest
2017	// color in the palette.
2018	FolderColorRgb string `json:"folderColorRgb,omitempty"`
2019
2020	// FullFileExtension: The full file extension; extracted from the title.
2021	// May contain multiple concatenated extensions, such as "tar.gz".
2022	// Removing an extension from the title does not clear this field;
2023	// however, changing the extension on the title does update this field.
2024	// This field is only populated for files with content stored in Google
2025	// Drive; it is not populated for Docs Editors or shortcut files.
2026	FullFileExtension string `json:"fullFileExtension,omitempty"`
2027
2028	// HasAugmentedPermissions: Whether there are permissions directly on
2029	// this file. This field is only populated for items in shared drives.
2030	HasAugmentedPermissions bool `json:"hasAugmentedPermissions,omitempty"`
2031
2032	// HasThumbnail: Whether this file has a thumbnail. This does not
2033	// indicate whether the requesting app has access to the thumbnail. To
2034	// check access, look for the presence of the thumbnailLink field.
2035	HasThumbnail bool `json:"hasThumbnail,omitempty"`
2036
2037	// HeadRevisionId: The ID of the file's head revision. This field is
2038	// only populated for files with content stored in Google Drive; it is
2039	// not populated for Docs Editors or shortcut files.
2040	HeadRevisionId string `json:"headRevisionId,omitempty"`
2041
2042	// IconLink: A link to the file's icon.
2043	IconLink string `json:"iconLink,omitempty"`
2044
2045	// Id: The ID of the file.
2046	Id string `json:"id,omitempty"`
2047
2048	// ImageMediaMetadata: Metadata about image media. This will only be
2049	// present for image types, and its contents will depend on what can be
2050	// parsed from the image content.
2051	ImageMediaMetadata *FileImageMediaMetadata `json:"imageMediaMetadata,omitempty"`
2052
2053	// IndexableText: Indexable text attributes for the file (can only be
2054	// written)
2055	IndexableText *FileIndexableText `json:"indexableText,omitempty"`
2056
2057	// IsAppAuthorized: Whether the file was created or opened by the
2058	// requesting app.
2059	IsAppAuthorized bool `json:"isAppAuthorized,omitempty"`
2060
2061	// Kind: The type of file. This is always drive#file.
2062	Kind string `json:"kind,omitempty"`
2063
2064	// Labels: A group of labels for the file.
2065	Labels *FileLabels `json:"labels,omitempty"`
2066
2067	// LastModifyingUser: The last user to modify this file.
2068	LastModifyingUser *User `json:"lastModifyingUser,omitempty"`
2069
2070	// LastModifyingUserName: Name of the last user to modify this file.
2071	LastModifyingUserName string `json:"lastModifyingUserName,omitempty"`
2072
2073	// LastViewedByMeDate: Last time this file was viewed by the user
2074	// (formatted RFC 3339 timestamp).
2075	LastViewedByMeDate string `json:"lastViewedByMeDate,omitempty"`
2076
2077	// LinkShareMetadata: Contains details about the link URLs that clients
2078	// are using to refer to this item.
2079	LinkShareMetadata *FileLinkShareMetadata `json:"linkShareMetadata,omitempty"`
2080
2081	// MarkedViewedByMeDate: Deprecated.
2082	MarkedViewedByMeDate string `json:"markedViewedByMeDate,omitempty"`
2083
2084	// Md5Checksum: An MD5 checksum for the content of this file. This field
2085	// is only populated for files with content stored in Google Drive; it
2086	// is not populated for Docs Editors or shortcut files.
2087	Md5Checksum string `json:"md5Checksum,omitempty"`
2088
2089	// MimeType: The MIME type of the file. This is only mutable on update
2090	// when uploading new content. This field can be left blank, and the
2091	// mimetype will be determined from the uploaded content's MIME type.
2092	MimeType string `json:"mimeType,omitempty"`
2093
2094	// ModifiedByMeDate: Last time this file was modified by the user
2095	// (formatted RFC 3339 timestamp). Note that setting modifiedDate will
2096	// also update the modifiedByMe date for the user which set the date.
2097	ModifiedByMeDate string `json:"modifiedByMeDate,omitempty"`
2098
2099	// ModifiedDate: Last time this file was modified by anyone (formatted
2100	// RFC 3339 timestamp). This is only mutable on update when the
2101	// setModifiedDate parameter is set.
2102	ModifiedDate string `json:"modifiedDate,omitempty"`
2103
2104	// OpenWithLinks: A map of the id of each of the user's apps to a link
2105	// to open this file with that app. Only populated when the
2106	// drive.apps.readonly scope is used.
2107	OpenWithLinks map[string]string `json:"openWithLinks,omitempty"`
2108
2109	// OriginalFilename: The original filename of the uploaded content if
2110	// available, or else the original value of the title field. This is
2111	// only available for files with binary content in Google Drive.
2112	OriginalFilename string `json:"originalFilename,omitempty"`
2113
2114	// OwnedByMe: Whether the file is owned by the current user. Not
2115	// populated for items in shared drives.
2116	OwnedByMe bool `json:"ownedByMe,omitempty"`
2117
2118	// OwnerNames: Name(s) of the owner(s) of this file. Not populated for
2119	// items in shared drives.
2120	OwnerNames []string `json:"ownerNames,omitempty"`
2121
2122	// Owners: The owner of this file. Only certain legacy files may have
2123	// more than one owner. This field isn't populated for items in shared
2124	// drives.
2125	Owners []*User `json:"owners,omitempty"`
2126
2127	// Parents: Collection of parent folders which contain this file.
2128	// If not specified as part of an insert request, the file will be
2129	// placed directly in the user's My Drive folder. If not specified as
2130	// part of a copy request, the file will inherit any discoverable
2131	// parents of the source file. Update requests can also use the
2132	// addParents and removeParents parameters to modify the parents list.
2133	Parents []*ParentReference `json:"parents,omitempty"`
2134
2135	// PermissionIds: List of permission IDs for users with access to this
2136	// file.
2137	PermissionIds []string `json:"permissionIds,omitempty"`
2138
2139	// Permissions: The list of permissions for users with access to this
2140	// file. Not populated for items in shared drives.
2141	Permissions []*Permission `json:"permissions,omitempty"`
2142
2143	// Properties: The list of properties.
2144	Properties []*Property `json:"properties,omitempty"`
2145
2146	// QuotaBytesUsed: The number of quota bytes used by this file.
2147	QuotaBytesUsed int64 `json:"quotaBytesUsed,omitempty,string"`
2148
2149	// ResourceKey: A key needed to access the item via a shared link.
2150	ResourceKey string `json:"resourceKey,omitempty"`
2151
2152	// SelfLink: A link back to this file.
2153	SelfLink string `json:"selfLink,omitempty"`
2154
2155	// Shareable: Deprecated: use capabilities/canShare.
2156	Shareable bool `json:"shareable,omitempty"`
2157
2158	// Shared: Whether the file has been shared. Not populated for items in
2159	// shared drives.
2160	Shared bool `json:"shared,omitempty"`
2161
2162	// SharedWithMeDate: Time at which this file was shared with the user
2163	// (formatted RFC 3339 timestamp).
2164	SharedWithMeDate string `json:"sharedWithMeDate,omitempty"`
2165
2166	// SharingUser: User that shared the item with the current user, if
2167	// available.
2168	SharingUser *User `json:"sharingUser,omitempty"`
2169
2170	// ShortcutDetails: Shortcut file details. Only populated for shortcut
2171	// files, which have the mimeType field set to
2172	// application/vnd.google-apps.shortcut.
2173	ShortcutDetails *FileShortcutDetails `json:"shortcutDetails,omitempty"`
2174
2175	// Spaces: The list of spaces which contain the file. Supported values
2176	// are 'drive', 'appDataFolder' and 'photos'.
2177	Spaces []string `json:"spaces,omitempty"`
2178
2179	// TeamDriveId: Deprecated - use driveId instead.
2180	TeamDriveId string `json:"teamDriveId,omitempty"`
2181
2182	// Thumbnail: A thumbnail for the file. This will only be used if a
2183	// standard thumbnail cannot be generated.
2184	Thumbnail *FileThumbnail `json:"thumbnail,omitempty"`
2185
2186	// ThumbnailLink: A short-lived link to the file's thumbnail. Typically
2187	// lasts on the order of hours. Only populated when the requesting app
2188	// can access the file's content. If the file isn't shared publicly, the
2189	// URL returned in Files.thumbnailLink must be fetched using a
2190	// credentialed request.
2191	ThumbnailLink string `json:"thumbnailLink,omitempty"`
2192
2193	// ThumbnailVersion: The thumbnail version for use in thumbnail cache
2194	// invalidation.
2195	ThumbnailVersion int64 `json:"thumbnailVersion,omitempty,string"`
2196
2197	// Title: The title of this file. Note that for immutable items such as
2198	// the top level folders of shared drives, My Drive root folder, and
2199	// Application Data folder the title is constant.
2200	Title string `json:"title,omitempty"`
2201
2202	// TrashedDate: The time that the item was trashed (formatted RFC 3339
2203	// timestamp). Only populated for items in shared drives.
2204	TrashedDate string `json:"trashedDate,omitempty"`
2205
2206	// TrashingUser: If the file has been explicitly trashed, the user who
2207	// trashed it. Only populated for items in shared drives.
2208	TrashingUser *User `json:"trashingUser,omitempty"`
2209
2210	// UserPermission: The permissions for the authenticated user on this
2211	// file.
2212	UserPermission *Permission `json:"userPermission,omitempty"`
2213
2214	// Version: A monotonically increasing version number for the file. This
2215	// reflects every change made to the file on the server, even those not
2216	// visible to the requesting user.
2217	Version int64 `json:"version,omitempty,string"`
2218
2219	// VideoMediaMetadata: Metadata about video media. This will only be
2220	// present for video types.
2221	VideoMediaMetadata *FileVideoMediaMetadata `json:"videoMediaMetadata,omitempty"`
2222
2223	// WebContentLink: A link for downloading the content of the file in a
2224	// browser using cookie based authentication. In cases where the content
2225	// is shared publicly, the content can be downloaded without any
2226	// credentials.
2227	WebContentLink string `json:"webContentLink,omitempty"`
2228
2229	// WebViewLink: A link only available on public folders for viewing
2230	// their static web assets (HTML, CSS, JS, etc) via Google Drive's
2231	// Website Hosting.
2232	WebViewLink string `json:"webViewLink,omitempty"`
2233
2234	// WritersCanShare: Whether writers can share the document with other
2235	// users. Not populated for items in shared drives.
2236	WritersCanShare bool `json:"writersCanShare,omitempty"`
2237
2238	// ServerResponse contains the HTTP response code and headers from the
2239	// server.
2240	googleapi.ServerResponse `json:"-"`
2241
2242	// ForceSendFields is a list of field names (e.g. "AlternateLink") to
2243	// unconditionally include in API requests. By default, fields with
2244	// empty or default values are omitted from API requests. However, any
2245	// non-pointer, non-interface field appearing in ForceSendFields will be
2246	// sent to the server regardless of whether the field is empty or not.
2247	// This may be used to include empty fields in Patch requests.
2248	ForceSendFields []string `json:"-"`
2249
2250	// NullFields is a list of field names (e.g. "AlternateLink") to include
2251	// in API requests with the JSON null value. By default, fields with
2252	// empty values are omitted from API requests. However, any field with
2253	// an empty value appearing in NullFields will be sent to the server as
2254	// null. It is an error if a field in this list has a non-empty value.
2255	// This may be used to include null fields in Patch requests.
2256	NullFields []string `json:"-"`
2257}
2258
2259func (s *File) MarshalJSON() ([]byte, error) {
2260	type NoMethod File
2261	raw := NoMethod(*s)
2262	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
2263}
2264
2265// FileCapabilities: Capabilities the current user has on this file.
2266// Each capability corresponds to a fine-grained action that a user may
2267// take.
2268type FileCapabilities struct {
2269	// CanAddChildren: Whether the current user can add children to this
2270	// folder. This is always false when the item is not a folder.
2271	CanAddChildren bool `json:"canAddChildren,omitempty"`
2272
2273	// CanAddFolderFromAnotherDrive: Whether the current user can add a
2274	// folder from another drive (different shared drive or My Drive) to
2275	// this folder. This is false when the item is not a folder. Only
2276	// populated for items in shared drives.
2277	CanAddFolderFromAnotherDrive bool `json:"canAddFolderFromAnotherDrive,omitempty"`
2278
2279	// CanAddMyDriveParent: Whether the current user can add a parent for
2280	// the item without removing an existing parent in the same request. Not
2281	// populated for shared drive files.
2282	CanAddMyDriveParent bool `json:"canAddMyDriveParent,omitempty"`
2283
2284	// CanChangeCopyRequiresWriterPermission: Whether the current user can
2285	// change the copyRequiresWriterPermission restriction of this file.
2286	CanChangeCopyRequiresWriterPermission bool `json:"canChangeCopyRequiresWriterPermission,omitempty"`
2287
2288	// CanChangeRestrictedDownload: Deprecated
2289	CanChangeRestrictedDownload bool `json:"canChangeRestrictedDownload,omitempty"`
2290
2291	// CanChangeSecurityUpdateEnabled: Whether the current user can change
2292	// the securityUpdateEnabled field on link share metadata.
2293	CanChangeSecurityUpdateEnabled bool `json:"canChangeSecurityUpdateEnabled,omitempty"`
2294
2295	// CanComment: Whether the current user can comment on this file.
2296	CanComment bool `json:"canComment,omitempty"`
2297
2298	// CanCopy: Whether the current user can copy this file. For an item in
2299	// a shared drive, whether the current user can copy non-folder
2300	// descendants of this item, or this item itself if it is not a folder.
2301	CanCopy bool `json:"canCopy,omitempty"`
2302
2303	// CanDelete: Whether the current user can delete this file.
2304	CanDelete bool `json:"canDelete,omitempty"`
2305
2306	// CanDeleteChildren: Whether the current user can delete children of
2307	// this folder. This is false when the item is not a folder. Only
2308	// populated for items in shared drives.
2309	CanDeleteChildren bool `json:"canDeleteChildren,omitempty"`
2310
2311	// CanDownload: Whether the current user can download this file.
2312	CanDownload bool `json:"canDownload,omitempty"`
2313
2314	// CanEdit: Whether the current user can edit this file. Other factors
2315	// may limit the type of changes a user can make to a file. For example,
2316	// see canChangeCopyRequiresWriterPermission or canModifyContent.
2317	CanEdit bool `json:"canEdit,omitempty"`
2318
2319	// CanListChildren: Whether the current user can list the children of
2320	// this folder. This is always false when the item is not a folder.
2321	CanListChildren bool `json:"canListChildren,omitempty"`
2322
2323	// CanModifyContent: Whether the current user can modify the content of
2324	// this file.
2325	CanModifyContent bool `json:"canModifyContent,omitempty"`
2326
2327	// CanModifyContentRestriction: Whether the current user can modify
2328	// restrictions on content of this file.
2329	CanModifyContentRestriction bool `json:"canModifyContentRestriction,omitempty"`
2330
2331	// CanMoveChildrenOutOfDrive: Whether the current user can move children
2332	// of this folder outside of the shared drive. This is false when the
2333	// item is not a folder. Only populated for items in shared drives.
2334	CanMoveChildrenOutOfDrive bool `json:"canMoveChildrenOutOfDrive,omitempty"`
2335
2336	// CanMoveChildrenOutOfTeamDrive: Deprecated - use
2337	// canMoveChildrenOutOfDrive instead.
2338	CanMoveChildrenOutOfTeamDrive bool `json:"canMoveChildrenOutOfTeamDrive,omitempty"`
2339
2340	// CanMoveChildrenWithinDrive: Whether the current user can move
2341	// children of this folder within this drive. This is false when the
2342	// item is not a folder. Note that a request to move the child may still
2343	// fail depending on the current user's access to the child and to the
2344	// destination folder.
2345	CanMoveChildrenWithinDrive bool `json:"canMoveChildrenWithinDrive,omitempty"`
2346
2347	// CanMoveChildrenWithinTeamDrive: Deprecated - use
2348	// canMoveChildrenWithinDrive instead.
2349	CanMoveChildrenWithinTeamDrive bool `json:"canMoveChildrenWithinTeamDrive,omitempty"`
2350
2351	// CanMoveItemIntoTeamDrive: Deprecated - use canMoveItemOutOfDrive
2352	// instead.
2353	CanMoveItemIntoTeamDrive bool `json:"canMoveItemIntoTeamDrive,omitempty"`
2354
2355	// CanMoveItemOutOfDrive: Whether the current user can move this item
2356	// outside of this drive by changing its parent. Note that a request to
2357	// change the parent of the item may still fail depending on the new
2358	// parent that is being added.
2359	CanMoveItemOutOfDrive bool `json:"canMoveItemOutOfDrive,omitempty"`
2360
2361	// CanMoveItemOutOfTeamDrive: Deprecated - use canMoveItemOutOfDrive
2362	// instead.
2363	CanMoveItemOutOfTeamDrive bool `json:"canMoveItemOutOfTeamDrive,omitempty"`
2364
2365	// CanMoveItemWithinDrive: Whether the current user can move this item
2366	// within this drive. Note that a request to change the parent of the
2367	// item may still fail depending on the new parent that is being added
2368	// and the parent that is being removed.
2369	CanMoveItemWithinDrive bool `json:"canMoveItemWithinDrive,omitempty"`
2370
2371	// CanMoveItemWithinTeamDrive: Deprecated - use canMoveItemWithinDrive
2372	// instead.
2373	CanMoveItemWithinTeamDrive bool `json:"canMoveItemWithinTeamDrive,omitempty"`
2374
2375	// CanMoveTeamDriveItem: Deprecated - use canMoveItemWithinDrive or
2376	// canMoveItemOutOfDrive instead.
2377	CanMoveTeamDriveItem bool `json:"canMoveTeamDriveItem,omitempty"`
2378
2379	// CanReadDrive: Whether the current user can read the shared drive to
2380	// which this file belongs. Only populated for items in shared drives.
2381	CanReadDrive bool `json:"canReadDrive,omitempty"`
2382
2383	// CanReadRevisions: Whether the current user can read the revisions
2384	// resource of this file. For a shared drive item, whether revisions of
2385	// non-folder descendants of this item, or this item itself if it is not
2386	// a folder, can be read.
2387	CanReadRevisions bool `json:"canReadRevisions,omitempty"`
2388
2389	// CanReadTeamDrive: Deprecated - use canReadDrive instead.
2390	CanReadTeamDrive bool `json:"canReadTeamDrive,omitempty"`
2391
2392	// CanRemoveChildren: Whether the current user can remove children from
2393	// this folder. This is always false when the item is not a folder. For
2394	// a folder in a shared drive, use canDeleteChildren or canTrashChildren
2395	// instead.
2396	CanRemoveChildren bool `json:"canRemoveChildren,omitempty"`
2397
2398	// CanRemoveMyDriveParent: Whether the current user can remove a parent
2399	// from the item without adding another parent in the same request. Not
2400	// populated for shared drive files.
2401	CanRemoveMyDriveParent bool `json:"canRemoveMyDriveParent,omitempty"`
2402
2403	// CanRename: Whether the current user can rename this file.
2404	CanRename bool `json:"canRename,omitempty"`
2405
2406	// CanShare: Whether the current user can modify the sharing settings
2407	// for this file.
2408	CanShare bool `json:"canShare,omitempty"`
2409
2410	// CanTrash: Whether the current user can move this file to trash.
2411	CanTrash bool `json:"canTrash,omitempty"`
2412
2413	// CanTrashChildren: Whether the current user can trash children of this
2414	// folder. This is false when the item is not a folder. Only populated
2415	// for items in shared drives.
2416	CanTrashChildren bool `json:"canTrashChildren,omitempty"`
2417
2418	// CanUntrash: Whether the current user can restore this file from
2419	// trash.
2420	CanUntrash bool `json:"canUntrash,omitempty"`
2421
2422	// ForceSendFields is a list of field names (e.g. "CanAddChildren") to
2423	// unconditionally include in API requests. By default, fields with
2424	// empty or default values are omitted from API requests. However, any
2425	// non-pointer, non-interface field appearing in ForceSendFields will be
2426	// sent to the server regardless of whether the field is empty or not.
2427	// This may be used to include empty fields in Patch requests.
2428	ForceSendFields []string `json:"-"`
2429
2430	// NullFields is a list of field names (e.g. "CanAddChildren") to
2431	// include in API requests with the JSON null value. By default, fields
2432	// with empty values are omitted from API requests. However, any field
2433	// with an empty value appearing in NullFields will be sent to the
2434	// server as null. It is an error if a field in this list has a
2435	// non-empty value. This may be used to include null fields in Patch
2436	// requests.
2437	NullFields []string `json:"-"`
2438}
2439
2440func (s *FileCapabilities) MarshalJSON() ([]byte, error) {
2441	type NoMethod FileCapabilities
2442	raw := NoMethod(*s)
2443	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
2444}
2445
2446// FileImageMediaMetadata: Metadata about image media. This will only be
2447// present for image types, and its contents will depend on what can be
2448// parsed from the image content.
2449type FileImageMediaMetadata struct {
2450	// Aperture: The aperture used to create the photo (f-number).
2451	Aperture float64 `json:"aperture,omitempty"`
2452
2453	// CameraMake: The make of the camera used to create the photo.
2454	CameraMake string `json:"cameraMake,omitempty"`
2455
2456	// CameraModel: The model of the camera used to create the photo.
2457	CameraModel string `json:"cameraModel,omitempty"`
2458
2459	// ColorSpace: The color space of the photo.
2460	ColorSpace string `json:"colorSpace,omitempty"`
2461
2462	// Date: The date and time the photo was taken (EXIF format timestamp).
2463	Date string `json:"date,omitempty"`
2464
2465	// ExposureBias: The exposure bias of the photo (APEX value).
2466	ExposureBias float64 `json:"exposureBias,omitempty"`
2467
2468	// ExposureMode: The exposure mode used to create the photo.
2469	ExposureMode string `json:"exposureMode,omitempty"`
2470
2471	// ExposureTime: The length of the exposure, in seconds.
2472	ExposureTime float64 `json:"exposureTime,omitempty"`
2473
2474	// FlashUsed: Whether a flash was used to create the photo.
2475	FlashUsed bool `json:"flashUsed,omitempty"`
2476
2477	// FocalLength: The focal length used to create the photo, in
2478	// millimeters.
2479	FocalLength float64 `json:"focalLength,omitempty"`
2480
2481	// Height: The height of the image in pixels.
2482	Height int64 `json:"height,omitempty"`
2483
2484	// IsoSpeed: The ISO speed used to create the photo.
2485	IsoSpeed int64 `json:"isoSpeed,omitempty"`
2486
2487	// Lens: The lens used to create the photo.
2488	Lens string `json:"lens,omitempty"`
2489
2490	// Location: Geographic location information stored in the image.
2491	Location *FileImageMediaMetadataLocation `json:"location,omitempty"`
2492
2493	// MaxApertureValue: The smallest f-number of the lens at the focal
2494	// length used to create the photo (APEX value).
2495	MaxApertureValue float64 `json:"maxApertureValue,omitempty"`
2496
2497	// MeteringMode: The metering mode used to create the photo.
2498	MeteringMode string `json:"meteringMode,omitempty"`
2499
2500	// Rotation: The number of clockwise 90 degree rotations applied from
2501	// the image's original orientation.
2502	Rotation int64 `json:"rotation,omitempty"`
2503
2504	// Sensor: The type of sensor used to create the photo.
2505	Sensor string `json:"sensor,omitempty"`
2506
2507	// SubjectDistance: The distance to the subject of the photo, in meters.
2508	SubjectDistance int64 `json:"subjectDistance,omitempty"`
2509
2510	// WhiteBalance: The white balance mode used to create the photo.
2511	WhiteBalance string `json:"whiteBalance,omitempty"`
2512
2513	// Width: The width of the image in pixels.
2514	Width int64 `json:"width,omitempty"`
2515
2516	// ForceSendFields is a list of field names (e.g. "Aperture") to
2517	// unconditionally include in API requests. By default, fields with
2518	// empty or default values are omitted from API requests. However, any
2519	// non-pointer, non-interface field appearing in ForceSendFields will be
2520	// sent to the server regardless of whether the field is empty or not.
2521	// This may be used to include empty fields in Patch requests.
2522	ForceSendFields []string `json:"-"`
2523
2524	// NullFields is a list of field names (e.g. "Aperture") to include in
2525	// API requests with the JSON null value. By default, fields with empty
2526	// values are omitted from API requests. However, any field with an
2527	// empty value appearing in NullFields will be sent to the server as
2528	// null. It is an error if a field in this list has a non-empty value.
2529	// This may be used to include null fields in Patch requests.
2530	NullFields []string `json:"-"`
2531}
2532
2533func (s *FileImageMediaMetadata) MarshalJSON() ([]byte, error) {
2534	type NoMethod FileImageMediaMetadata
2535	raw := NoMethod(*s)
2536	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
2537}
2538
2539func (s *FileImageMediaMetadata) UnmarshalJSON(data []byte) error {
2540	type NoMethod FileImageMediaMetadata
2541	var s1 struct {
2542		Aperture         gensupport.JSONFloat64 `json:"aperture"`
2543		ExposureBias     gensupport.JSONFloat64 `json:"exposureBias"`
2544		ExposureTime     gensupport.JSONFloat64 `json:"exposureTime"`
2545		FocalLength      gensupport.JSONFloat64 `json:"focalLength"`
2546		MaxApertureValue gensupport.JSONFloat64 `json:"maxApertureValue"`
2547		*NoMethod
2548	}
2549	s1.NoMethod = (*NoMethod)(s)
2550	if err := json.Unmarshal(data, &s1); err != nil {
2551		return err
2552	}
2553	s.Aperture = float64(s1.Aperture)
2554	s.ExposureBias = float64(s1.ExposureBias)
2555	s.ExposureTime = float64(s1.ExposureTime)
2556	s.FocalLength = float64(s1.FocalLength)
2557	s.MaxApertureValue = float64(s1.MaxApertureValue)
2558	return nil
2559}
2560
2561// FileImageMediaMetadataLocation: Geographic location information
2562// stored in the image.
2563type FileImageMediaMetadataLocation struct {
2564	// Altitude: The altitude stored in the image.
2565	Altitude float64 `json:"altitude,omitempty"`
2566
2567	// Latitude: The latitude stored in the image.
2568	Latitude float64 `json:"latitude,omitempty"`
2569
2570	// Longitude: The longitude stored in the image.
2571	Longitude float64 `json:"longitude,omitempty"`
2572
2573	// ForceSendFields is a list of field names (e.g. "Altitude") to
2574	// unconditionally include in API requests. By default, fields with
2575	// empty or default values are omitted from API requests. However, any
2576	// non-pointer, non-interface field appearing in ForceSendFields will be
2577	// sent to the server regardless of whether the field is empty or not.
2578	// This may be used to include empty fields in Patch requests.
2579	ForceSendFields []string `json:"-"`
2580
2581	// NullFields is a list of field names (e.g. "Altitude") to include in
2582	// API requests with the JSON null value. By default, fields with empty
2583	// values are omitted from API requests. However, any field with an
2584	// empty value appearing in NullFields will be sent to the server as
2585	// null. It is an error if a field in this list has a non-empty value.
2586	// This may be used to include null fields in Patch requests.
2587	NullFields []string `json:"-"`
2588}
2589
2590func (s *FileImageMediaMetadataLocation) MarshalJSON() ([]byte, error) {
2591	type NoMethod FileImageMediaMetadataLocation
2592	raw := NoMethod(*s)
2593	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
2594}
2595
2596func (s *FileImageMediaMetadataLocation) UnmarshalJSON(data []byte) error {
2597	type NoMethod FileImageMediaMetadataLocation
2598	var s1 struct {
2599		Altitude  gensupport.JSONFloat64 `json:"altitude"`
2600		Latitude  gensupport.JSONFloat64 `json:"latitude"`
2601		Longitude gensupport.JSONFloat64 `json:"longitude"`
2602		*NoMethod
2603	}
2604	s1.NoMethod = (*NoMethod)(s)
2605	if err := json.Unmarshal(data, &s1); err != nil {
2606		return err
2607	}
2608	s.Altitude = float64(s1.Altitude)
2609	s.Latitude = float64(s1.Latitude)
2610	s.Longitude = float64(s1.Longitude)
2611	return nil
2612}
2613
2614// FileIndexableText: Indexable text attributes for the file (can only
2615// be written)
2616type FileIndexableText struct {
2617	// Text: The text to be indexed for this file.
2618	Text string `json:"text,omitempty"`
2619
2620	// ForceSendFields is a list of field names (e.g. "Text") to
2621	// unconditionally include in API requests. By default, fields with
2622	// empty or default values are omitted from API requests. However, any
2623	// non-pointer, non-interface field appearing in ForceSendFields will be
2624	// sent to the server regardless of whether the field is empty or not.
2625	// This may be used to include empty fields in Patch requests.
2626	ForceSendFields []string `json:"-"`
2627
2628	// NullFields is a list of field names (e.g. "Text") to include in API
2629	// requests with the JSON null value. By default, fields with empty
2630	// values are omitted from API requests. However, any field with an
2631	// empty value appearing in NullFields will be sent to the server as
2632	// null. It is an error if a field in this list has a non-empty value.
2633	// This may be used to include null fields in Patch requests.
2634	NullFields []string `json:"-"`
2635}
2636
2637func (s *FileIndexableText) MarshalJSON() ([]byte, error) {
2638	type NoMethod FileIndexableText
2639	raw := NoMethod(*s)
2640	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
2641}
2642
2643// FileLabels: A group of labels for the file.
2644type FileLabels struct {
2645	// Hidden: Deprecated.
2646	Hidden bool `json:"hidden,omitempty"`
2647
2648	// Modified: Whether the file has been modified by this user.
2649	Modified bool `json:"modified,omitempty"`
2650
2651	// Restricted: Deprecated - use copyRequiresWriterPermission instead.
2652	Restricted bool `json:"restricted,omitempty"`
2653
2654	// Starred: Whether this file is starred by the user.
2655	Starred bool `json:"starred,omitempty"`
2656
2657	// Trashed: Whether the file has been trashed, either explicitly or from
2658	// a trashed parent folder. Only the owner may trash a file. The trashed
2659	// item is excluded from all files.list responses returned for any user
2660	// who does not own the file. However, all users with access to the file
2661	// can see the trashed item metadata in an API response. All users with
2662	// access can copy, download, export, and share the file.
2663	Trashed bool `json:"trashed,omitempty"`
2664
2665	// Viewed: Whether this file has been viewed by this user.
2666	Viewed bool `json:"viewed,omitempty"`
2667
2668	// ForceSendFields is a list of field names (e.g. "Hidden") to
2669	// unconditionally include in API requests. By default, fields with
2670	// empty or default values are omitted from API requests. However, any
2671	// non-pointer, non-interface field appearing in ForceSendFields will be
2672	// sent to the server regardless of whether the field is empty or not.
2673	// This may be used to include empty fields in Patch requests.
2674	ForceSendFields []string `json:"-"`
2675
2676	// NullFields is a list of field names (e.g. "Hidden") to include in API
2677	// requests with the JSON null value. By default, fields with empty
2678	// values are omitted from API requests. However, any field with an
2679	// empty value appearing in NullFields will be sent to the server as
2680	// null. It is an error if a field in this list has a non-empty value.
2681	// This may be used to include null fields in Patch requests.
2682	NullFields []string `json:"-"`
2683}
2684
2685func (s *FileLabels) MarshalJSON() ([]byte, error) {
2686	type NoMethod FileLabels
2687	raw := NoMethod(*s)
2688	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
2689}
2690
2691// FileLinkShareMetadata: Contains details about the link URLs that
2692// clients are using to refer to this item.
2693type FileLinkShareMetadata struct {
2694	// SecurityUpdateEligible: Whether the file is eligible for security
2695	// update.
2696	SecurityUpdateEligible bool `json:"securityUpdateEligible,omitempty"`
2697
2698	// SecurityUpdateEnabled: Whether the security update is enabled for
2699	// this file.
2700	SecurityUpdateEnabled bool `json:"securityUpdateEnabled,omitempty"`
2701
2702	// ForceSendFields is a list of field names (e.g.
2703	// "SecurityUpdateEligible") to unconditionally include in API requests.
2704	// By default, fields with empty or default values are omitted from API
2705	// requests. However, any non-pointer, non-interface field appearing in
2706	// ForceSendFields will be sent to the server regardless of whether the
2707	// field is empty or not. This may be used to include empty fields in
2708	// Patch requests.
2709	ForceSendFields []string `json:"-"`
2710
2711	// NullFields is a list of field names (e.g. "SecurityUpdateEligible")
2712	// to include in API requests with the JSON null value. By default,
2713	// fields with empty values are omitted from API requests. However, any
2714	// field with an empty value appearing in NullFields will be sent to the
2715	// server as null. It is an error if a field in this list has a
2716	// non-empty value. This may be used to include null fields in Patch
2717	// requests.
2718	NullFields []string `json:"-"`
2719}
2720
2721func (s *FileLinkShareMetadata) MarshalJSON() ([]byte, error) {
2722	type NoMethod FileLinkShareMetadata
2723	raw := NoMethod(*s)
2724	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
2725}
2726
2727// FileShortcutDetails: Shortcut file details. Only populated for
2728// shortcut files, which have the mimeType field set to
2729// application/vnd.google-apps.shortcut.
2730type FileShortcutDetails struct {
2731	// TargetId: The ID of the file that this shortcut points to.
2732	TargetId string `json:"targetId,omitempty"`
2733
2734	// TargetMimeType: The MIME type of the file that this shortcut points
2735	// to. The value of this field is a snapshot of the target's MIME type,
2736	// captured when the shortcut is created.
2737	TargetMimeType string `json:"targetMimeType,omitempty"`
2738
2739	// TargetResourceKey: The ResourceKey for the target file.
2740	TargetResourceKey string `json:"targetResourceKey,omitempty"`
2741
2742	// ForceSendFields is a list of field names (e.g. "TargetId") to
2743	// unconditionally include in API requests. By default, fields with
2744	// empty or default values are omitted from API requests. However, any
2745	// non-pointer, non-interface field appearing in ForceSendFields will be
2746	// sent to the server regardless of whether the field is empty or not.
2747	// This may be used to include empty fields in Patch requests.
2748	ForceSendFields []string `json:"-"`
2749
2750	// NullFields is a list of field names (e.g. "TargetId") to include in
2751	// API requests with the JSON null value. By default, fields with empty
2752	// values are omitted from API requests. However, any field with an
2753	// empty value appearing in NullFields will be sent to the server as
2754	// null. It is an error if a field in this list has a non-empty value.
2755	// This may be used to include null fields in Patch requests.
2756	NullFields []string `json:"-"`
2757}
2758
2759func (s *FileShortcutDetails) MarshalJSON() ([]byte, error) {
2760	type NoMethod FileShortcutDetails
2761	raw := NoMethod(*s)
2762	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
2763}
2764
2765// FileThumbnail: A thumbnail for the file. This will only be used if a
2766// standard thumbnail cannot be generated.
2767type FileThumbnail struct {
2768	// Image: The URL-safe Base64 encoded bytes of the thumbnail image. It
2769	// should conform to RFC 4648 section 5.
2770	Image string `json:"image,omitempty"`
2771
2772	// MimeType: The MIME type of the thumbnail.
2773	MimeType string `json:"mimeType,omitempty"`
2774
2775	// ForceSendFields is a list of field names (e.g. "Image") to
2776	// unconditionally include in API requests. By default, fields with
2777	// empty or default values are omitted from API requests. However, any
2778	// non-pointer, non-interface field appearing in ForceSendFields will be
2779	// sent to the server regardless of whether the field is empty or not.
2780	// This may be used to include empty fields in Patch requests.
2781	ForceSendFields []string `json:"-"`
2782
2783	// NullFields is a list of field names (e.g. "Image") to include in API
2784	// requests with the JSON null value. By default, fields with empty
2785	// values are omitted from API requests. However, any field with an
2786	// empty value appearing in NullFields will be sent to the server as
2787	// null. It is an error if a field in this list has a non-empty value.
2788	// This may be used to include null fields in Patch requests.
2789	NullFields []string `json:"-"`
2790}
2791
2792func (s *FileThumbnail) MarshalJSON() ([]byte, error) {
2793	type NoMethod FileThumbnail
2794	raw := NoMethod(*s)
2795	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
2796}
2797
2798// FileVideoMediaMetadata: Metadata about video media. This will only be
2799// present for video types.
2800type FileVideoMediaMetadata struct {
2801	// DurationMillis: The duration of the video in milliseconds.
2802	DurationMillis int64 `json:"durationMillis,omitempty,string"`
2803
2804	// Height: The height of the video in pixels.
2805	Height int64 `json:"height,omitempty"`
2806
2807	// Width: The width of the video in pixels.
2808	Width int64 `json:"width,omitempty"`
2809
2810	// ForceSendFields is a list of field names (e.g. "DurationMillis") to
2811	// unconditionally include in API requests. By default, fields with
2812	// empty or default values are omitted from API requests. However, any
2813	// non-pointer, non-interface field appearing in ForceSendFields will be
2814	// sent to the server regardless of whether the field is empty or not.
2815	// This may be used to include empty fields in Patch requests.
2816	ForceSendFields []string `json:"-"`
2817
2818	// NullFields is a list of field names (e.g. "DurationMillis") to
2819	// include in API requests with the JSON null value. By default, fields
2820	// with empty values are omitted from API requests. However, any field
2821	// with an empty value appearing in NullFields will be sent to the
2822	// server as null. It is an error if a field in this list has a
2823	// non-empty value. This may be used to include null fields in Patch
2824	// requests.
2825	NullFields []string `json:"-"`
2826}
2827
2828func (s *FileVideoMediaMetadata) MarshalJSON() ([]byte, error) {
2829	type NoMethod FileVideoMediaMetadata
2830	raw := NoMethod(*s)
2831	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
2832}
2833
2834// FileList: A list of files.
2835type FileList struct {
2836	// Etag: The ETag of the list.
2837	Etag string `json:"etag,omitempty"`
2838
2839	// IncompleteSearch: Whether the search process was incomplete. If true,
2840	// then some search results may be missing, since all documents were not
2841	// searched. This may occur when searching multiple drives with the
2842	// "allDrives" corpora, but all corpora could not be searched. When this
2843	// happens, it is suggested that clients narrow their query by choosing
2844	// a different corpus such as "default" or "drive".
2845	IncompleteSearch bool `json:"incompleteSearch,omitempty"`
2846
2847	// Items: The list of files. If nextPageToken is populated, then this
2848	// list may be incomplete and an additional page of results should be
2849	// fetched.
2850	Items []*File `json:"items,omitempty"`
2851
2852	// Kind: This is always drive#fileList.
2853	Kind string `json:"kind,omitempty"`
2854
2855	// NextLink: A link to the next page of files.
2856	NextLink string `json:"nextLink,omitempty"`
2857
2858	// NextPageToken: The page token for the next page of files. This will
2859	// be absent if the end of the files list has been reached. If the token
2860	// is rejected for any reason, it should be discarded, and pagination
2861	// should be restarted from the first page of results.
2862	NextPageToken string `json:"nextPageToken,omitempty"`
2863
2864	// SelfLink: A link back to this list.
2865	SelfLink string `json:"selfLink,omitempty"`
2866
2867	// ServerResponse contains the HTTP response code and headers from the
2868	// server.
2869	googleapi.ServerResponse `json:"-"`
2870
2871	// ForceSendFields is a list of field names (e.g. "Etag") to
2872	// unconditionally include in API requests. By default, fields with
2873	// empty or default values are omitted from API requests. However, any
2874	// non-pointer, non-interface field appearing in ForceSendFields will be
2875	// sent to the server regardless of whether the field is empty or not.
2876	// This may be used to include empty fields in Patch requests.
2877	ForceSendFields []string `json:"-"`
2878
2879	// NullFields is a list of field names (e.g. "Etag") to include in API
2880	// requests with the JSON null value. By default, fields with empty
2881	// values are omitted from API requests. However, any field with an
2882	// empty value appearing in NullFields will be sent to the server as
2883	// null. It is an error if a field in this list has a non-empty value.
2884	// This may be used to include null fields in Patch requests.
2885	NullFields []string `json:"-"`
2886}
2887
2888func (s *FileList) MarshalJSON() ([]byte, error) {
2889	type NoMethod FileList
2890	raw := NoMethod(*s)
2891	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
2892}
2893
2894// GeneratedIds: A list of generated IDs which can be provided in insert
2895// requests
2896type GeneratedIds struct {
2897	// Ids: The IDs generated for the requesting user in the specified
2898	// space.
2899	Ids []string `json:"ids,omitempty"`
2900
2901	// Kind: This is always drive#generatedIds
2902	Kind string `json:"kind,omitempty"`
2903
2904	// Space: The type of file that can be created with these IDs.
2905	Space string `json:"space,omitempty"`
2906
2907	// ServerResponse contains the HTTP response code and headers from the
2908	// server.
2909	googleapi.ServerResponse `json:"-"`
2910
2911	// ForceSendFields is a list of field names (e.g. "Ids") to
2912	// unconditionally include in API requests. By default, fields with
2913	// empty or default values are omitted from API requests. However, any
2914	// non-pointer, non-interface field appearing in ForceSendFields will be
2915	// sent to the server regardless of whether the field is empty or not.
2916	// This may be used to include empty fields in Patch requests.
2917	ForceSendFields []string `json:"-"`
2918
2919	// NullFields is a list of field names (e.g. "Ids") to include in API
2920	// requests with the JSON null value. By default, fields with empty
2921	// values are omitted from API requests. However, any field with an
2922	// empty value appearing in NullFields will be sent to the server as
2923	// null. It is an error if a field in this list has a non-empty value.
2924	// This may be used to include null fields in Patch requests.
2925	NullFields []string `json:"-"`
2926}
2927
2928func (s *GeneratedIds) MarshalJSON() ([]byte, error) {
2929	type NoMethod GeneratedIds
2930	raw := NoMethod(*s)
2931	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
2932}
2933
2934// ParentList: A list of a file's parents.
2935type ParentList struct {
2936	// Etag: The ETag of the list.
2937	Etag string `json:"etag,omitempty"`
2938
2939	// Items: The list of parents.
2940	Items []*ParentReference `json:"items,omitempty"`
2941
2942	// Kind: This is always drive#parentList.
2943	Kind string `json:"kind,omitempty"`
2944
2945	// SelfLink: A link back to this list.
2946	SelfLink string `json:"selfLink,omitempty"`
2947
2948	// ServerResponse contains the HTTP response code and headers from the
2949	// server.
2950	googleapi.ServerResponse `json:"-"`
2951
2952	// ForceSendFields is a list of field names (e.g. "Etag") to
2953	// unconditionally include in API requests. By default, fields with
2954	// empty or default values are omitted from API requests. However, any
2955	// non-pointer, non-interface field appearing in ForceSendFields will be
2956	// sent to the server regardless of whether the field is empty or not.
2957	// This may be used to include empty fields in Patch requests.
2958	ForceSendFields []string `json:"-"`
2959
2960	// NullFields is a list of field names (e.g. "Etag") to include in API
2961	// requests with the JSON null value. By default, fields with empty
2962	// values are omitted from API requests. However, any field with an
2963	// empty value appearing in NullFields will be sent to the server as
2964	// null. It is an error if a field in this list has a non-empty value.
2965	// This may be used to include null fields in Patch requests.
2966	NullFields []string `json:"-"`
2967}
2968
2969func (s *ParentList) MarshalJSON() ([]byte, error) {
2970	type NoMethod ParentList
2971	raw := NoMethod(*s)
2972	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
2973}
2974
2975// ParentReference: A reference to a file's parent.
2976type ParentReference struct {
2977	// Id: The ID of the parent.
2978	Id string `json:"id,omitempty"`
2979
2980	// IsRoot: Whether or not the parent is the root folder.
2981	IsRoot bool `json:"isRoot,omitempty"`
2982
2983	// Kind: This is always drive#parentReference.
2984	Kind string `json:"kind,omitempty"`
2985
2986	// ParentLink: A link to the parent.
2987	ParentLink string `json:"parentLink,omitempty"`
2988
2989	// SelfLink: A link back to this reference.
2990	SelfLink string `json:"selfLink,omitempty"`
2991
2992	// ServerResponse contains the HTTP response code and headers from the
2993	// server.
2994	googleapi.ServerResponse `json:"-"`
2995
2996	// ForceSendFields is a list of field names (e.g. "Id") to
2997	// unconditionally include in API requests. By default, fields with
2998	// empty or default values are omitted from API requests. However, any
2999	// non-pointer, non-interface field appearing in ForceSendFields will be
3000	// sent to the server regardless of whether the field is empty or not.
3001	// This may be used to include empty fields in Patch requests.
3002	ForceSendFields []string `json:"-"`
3003
3004	// NullFields is a list of field names (e.g. "Id") to include in API
3005	// requests with the JSON null value. By default, fields with empty
3006	// values are omitted from API requests. However, any field with an
3007	// empty value appearing in NullFields will be sent to the server as
3008	// null. It is an error if a field in this list has a non-empty value.
3009	// This may be used to include null fields in Patch requests.
3010	NullFields []string `json:"-"`
3011}
3012
3013func (s *ParentReference) MarshalJSON() ([]byte, error) {
3014	type NoMethod ParentReference
3015	raw := NoMethod(*s)
3016	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
3017}
3018
3019// Permission: A permission for a file.
3020type Permission struct {
3021	// AdditionalRoles: Additional roles for this user. Only commenter is
3022	// currently allowed, though more may be supported in the future.
3023	AdditionalRoles []string `json:"additionalRoles,omitempty"`
3024
3025	// AuthKey: Deprecated.
3026	AuthKey string `json:"authKey,omitempty"`
3027
3028	// Deleted: Whether the account associated with this permission has been
3029	// deleted. This field only pertains to user and group permissions.
3030	Deleted bool `json:"deleted,omitempty"`
3031
3032	// Domain: The domain name of the entity this permission refers to. This
3033	// is an output-only field which is present when the permission type is
3034	// user, group or domain.
3035	Domain string `json:"domain,omitempty"`
3036
3037	// EmailAddress: The email address of the user or group this permission
3038	// refers to. This is an output-only field which is present when the
3039	// permission type is user or group.
3040	EmailAddress string `json:"emailAddress,omitempty"`
3041
3042	// Etag: The ETag of the permission.
3043	Etag string `json:"etag,omitempty"`
3044
3045	// ExpirationDate: The time at which this permission will expire (RFC
3046	// 3339 date-time). Expiration dates have the following restrictions:
3047	//
3048	// - They cannot be set on shared drive items
3049	// - They can only be set on user and group permissions
3050	// - The date must be in the future
3051	// - The date cannot be more than a year in the future
3052	// - The date can only be set on drive.permissions.update or
3053	// drive.permissions.patch requests
3054	ExpirationDate string `json:"expirationDate,omitempty"`
3055
3056	// Id: The ID of the user this permission refers to, and identical to
3057	// the permissionId in the About and Files resources. When making a
3058	// drive.permissions.insert request, exactly one of the id or value
3059	// fields must be specified unless the permission type is anyone, in
3060	// which case both id and value are ignored.
3061	Id string `json:"id,omitempty"`
3062
3063	// Kind: This is always drive#permission.
3064	Kind string `json:"kind,omitempty"`
3065
3066	// Name: The name for this permission.
3067	Name string `json:"name,omitempty"`
3068
3069	// PermissionDetails: Details of whether the permissions on this shared
3070	// drive item are inherited or directly on this item. This is an
3071	// output-only field which is present only for shared drive items.
3072	PermissionDetails []*PermissionPermissionDetails `json:"permissionDetails,omitempty"`
3073
3074	// PhotoLink: A link to the profile photo, if available.
3075	PhotoLink string `json:"photoLink,omitempty"`
3076
3077	// Role: The primary role for this user. While new values may be
3078	// supported in the future, the following are currently allowed:
3079	// - owner
3080	// - organizer
3081	// - fileOrganizer
3082	// - writer
3083	// - reader
3084	Role string `json:"role,omitempty"`
3085
3086	// SelfLink: A link back to this permission.
3087	SelfLink string `json:"selfLink,omitempty"`
3088
3089	// TeamDrivePermissionDetails: Deprecated - use permissionDetails
3090	// instead.
3091	TeamDrivePermissionDetails []*PermissionTeamDrivePermissionDetails `json:"teamDrivePermissionDetails,omitempty"`
3092
3093	// Type: The account type. Allowed values are:
3094	// - user
3095	// - group
3096	// - domain
3097	// - anyone
3098	Type string `json:"type,omitempty"`
3099
3100	// Value: The email address or domain name for the entity. This is used
3101	// during inserts and is not populated in responses. When making a
3102	// drive.permissions.insert request, exactly one of the id or value
3103	// fields must be specified unless the permission type is anyone, in
3104	// which case both id and value are ignored.
3105	Value string `json:"value,omitempty"`
3106
3107	// View: Indicates the view for this permission. Only populated for
3108	// permissions that belong to a view. published is the only supported
3109	// value.
3110	View string `json:"view,omitempty"`
3111
3112	// WithLink: Whether the link is required for this permission.
3113	WithLink bool `json:"withLink,omitempty"`
3114
3115	// ServerResponse contains the HTTP response code and headers from the
3116	// server.
3117	googleapi.ServerResponse `json:"-"`
3118
3119	// ForceSendFields is a list of field names (e.g. "AdditionalRoles") to
3120	// unconditionally include in API requests. By default, fields with
3121	// empty or default values are omitted from API requests. However, any
3122	// non-pointer, non-interface field appearing in ForceSendFields will be
3123	// sent to the server regardless of whether the field is empty or not.
3124	// This may be used to include empty fields in Patch requests.
3125	ForceSendFields []string `json:"-"`
3126
3127	// NullFields is a list of field names (e.g. "AdditionalRoles") to
3128	// include in API requests with the JSON null value. By default, fields
3129	// with empty values are omitted from API requests. However, any field
3130	// with an empty value appearing in NullFields will be sent to the
3131	// server as null. It is an error if a field in this list has a
3132	// non-empty value. This may be used to include null fields in Patch
3133	// requests.
3134	NullFields []string `json:"-"`
3135}
3136
3137func (s *Permission) MarshalJSON() ([]byte, error) {
3138	type NoMethod Permission
3139	raw := NoMethod(*s)
3140	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
3141}
3142
3143type PermissionPermissionDetails struct {
3144	// AdditionalRoles: Additional roles for this user. Only commenter is
3145	// currently possible, though more may be supported in the future.
3146	AdditionalRoles []string `json:"additionalRoles,omitempty"`
3147
3148	// Inherited: Whether this permission is inherited. This field is always
3149	// populated. This is an output-only field.
3150	Inherited bool `json:"inherited,omitempty"`
3151
3152	// InheritedFrom: The ID of the item from which this permission is
3153	// inherited. This is an output-only field.
3154	InheritedFrom string `json:"inheritedFrom,omitempty"`
3155
3156	// PermissionType: The permission type for this user. While new values
3157	// may be added in future, the following are currently possible:
3158	// - file
3159	// - member
3160	PermissionType string `json:"permissionType,omitempty"`
3161
3162	// Role: The primary role for this user. While new values may be added
3163	// in the future, the following are currently possible:
3164	// - organizer
3165	// - fileOrganizer
3166	// - writer
3167	// - reader
3168	Role string `json:"role,omitempty"`
3169
3170	// ForceSendFields is a list of field names (e.g. "AdditionalRoles") to
3171	// unconditionally include in API requests. By default, fields with
3172	// empty or default values are omitted from API requests. However, any
3173	// non-pointer, non-interface field appearing in ForceSendFields will be
3174	// sent to the server regardless of whether the field is empty or not.
3175	// This may be used to include empty fields in Patch requests.
3176	ForceSendFields []string `json:"-"`
3177
3178	// NullFields is a list of field names (e.g. "AdditionalRoles") to
3179	// include in API requests with the JSON null value. By default, fields
3180	// with empty values are omitted from API requests. However, any field
3181	// with an empty value appearing in NullFields will be sent to the
3182	// server as null. It is an error if a field in this list has a
3183	// non-empty value. This may be used to include null fields in Patch
3184	// requests.
3185	NullFields []string `json:"-"`
3186}
3187
3188func (s *PermissionPermissionDetails) MarshalJSON() ([]byte, error) {
3189	type NoMethod PermissionPermissionDetails
3190	raw := NoMethod(*s)
3191	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
3192}
3193
3194type PermissionTeamDrivePermissionDetails struct {
3195	// AdditionalRoles: Deprecated - use permissionDetails/additionalRoles
3196	// instead.
3197	AdditionalRoles []string `json:"additionalRoles,omitempty"`
3198
3199	// Inherited: Deprecated - use permissionDetails/inherited instead.
3200	Inherited bool `json:"inherited,omitempty"`
3201
3202	// InheritedFrom: Deprecated - use permissionDetails/inheritedFrom
3203	// instead.
3204	InheritedFrom string `json:"inheritedFrom,omitempty"`
3205
3206	// Role: Deprecated - use permissionDetails/role instead.
3207	Role string `json:"role,omitempty"`
3208
3209	// TeamDrivePermissionType: Deprecated - use
3210	// permissionDetails/permissionType instead.
3211	TeamDrivePermissionType string `json:"teamDrivePermissionType,omitempty"`
3212
3213	// ForceSendFields is a list of field names (e.g. "AdditionalRoles") to
3214	// unconditionally include in API requests. By default, fields with
3215	// empty or default values are omitted from API requests. However, any
3216	// non-pointer, non-interface field appearing in ForceSendFields will be
3217	// sent to the server regardless of whether the field is empty or not.
3218	// This may be used to include empty fields in Patch requests.
3219	ForceSendFields []string `json:"-"`
3220
3221	// NullFields is a list of field names (e.g. "AdditionalRoles") to
3222	// include in API requests with the JSON null value. By default, fields
3223	// with empty values are omitted from API requests. However, any field
3224	// with an empty value appearing in NullFields will be sent to the
3225	// server as null. It is an error if a field in this list has a
3226	// non-empty value. This may be used to include null fields in Patch
3227	// requests.
3228	NullFields []string `json:"-"`
3229}
3230
3231func (s *PermissionTeamDrivePermissionDetails) MarshalJSON() ([]byte, error) {
3232	type NoMethod PermissionTeamDrivePermissionDetails
3233	raw := NoMethod(*s)
3234	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
3235}
3236
3237// PermissionId: An ID for a user or group as seen in Permission items.
3238type PermissionId struct {
3239	// Id: The permission ID.
3240	Id string `json:"id,omitempty"`
3241
3242	// Kind: This is always drive#permissionId.
3243	Kind string `json:"kind,omitempty"`
3244
3245	// ServerResponse contains the HTTP response code and headers from the
3246	// server.
3247	googleapi.ServerResponse `json:"-"`
3248
3249	// ForceSendFields is a list of field names (e.g. "Id") to
3250	// unconditionally include in API requests. By default, fields with
3251	// empty or default values are omitted from API requests. However, any
3252	// non-pointer, non-interface field appearing in ForceSendFields will be
3253	// sent to the server regardless of whether the field is empty or not.
3254	// This may be used to include empty fields in Patch requests.
3255	ForceSendFields []string `json:"-"`
3256
3257	// NullFields is a list of field names (e.g. "Id") to include in API
3258	// requests with the JSON null value. By default, fields with empty
3259	// values are omitted from API requests. However, any field with an
3260	// empty value appearing in NullFields will be sent to the server as
3261	// null. It is an error if a field in this list has a non-empty value.
3262	// This may be used to include null fields in Patch requests.
3263	NullFields []string `json:"-"`
3264}
3265
3266func (s *PermissionId) MarshalJSON() ([]byte, error) {
3267	type NoMethod PermissionId
3268	raw := NoMethod(*s)
3269	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
3270}
3271
3272// PermissionList: A list of permissions associated with a file.
3273type PermissionList struct {
3274	// Etag: The ETag of the list.
3275	Etag string `json:"etag,omitempty"`
3276
3277	// Items: The list of permissions.
3278	Items []*Permission `json:"items,omitempty"`
3279
3280	// Kind: This is always drive#permissionList.
3281	Kind string `json:"kind,omitempty"`
3282
3283	// NextPageToken: The page token for the next page of permissions. This
3284	// field will be absent if the end of the permissions list has been
3285	// reached. If the token is rejected for any reason, it should be
3286	// discarded, and pagination should be restarted from the first page of
3287	// results.
3288	NextPageToken string `json:"nextPageToken,omitempty"`
3289
3290	// SelfLink: A link back to this list.
3291	SelfLink string `json:"selfLink,omitempty"`
3292
3293	// ServerResponse contains the HTTP response code and headers from the
3294	// server.
3295	googleapi.ServerResponse `json:"-"`
3296
3297	// ForceSendFields is a list of field names (e.g. "Etag") to
3298	// unconditionally include in API requests. By default, fields with
3299	// empty or default values are omitted from API requests. However, any
3300	// non-pointer, non-interface field appearing in ForceSendFields will be
3301	// sent to the server regardless of whether the field is empty or not.
3302	// This may be used to include empty fields in Patch requests.
3303	ForceSendFields []string `json:"-"`
3304
3305	// NullFields is a list of field names (e.g. "Etag") to include in API
3306	// requests with the JSON null value. By default, fields with empty
3307	// values are omitted from API requests. However, any field with an
3308	// empty value appearing in NullFields will be sent to the server as
3309	// null. It is an error if a field in this list has a non-empty value.
3310	// This may be used to include null fields in Patch requests.
3311	NullFields []string `json:"-"`
3312}
3313
3314func (s *PermissionList) MarshalJSON() ([]byte, error) {
3315	type NoMethod PermissionList
3316	raw := NoMethod(*s)
3317	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
3318}
3319
3320// Property: A key-value pair attached to a file that is either public
3321// or private to an application.
3322// The following limits apply to file properties:
3323// - Maximum of 100 properties total per file
3324// - Maximum of 30 private properties per app
3325// - Maximum of 30 public properties
3326// - Maximum of 124 bytes size limit on (key + value) string in UTF-8
3327// encoding for a single property.
3328type Property struct {
3329	// Etag: ETag of the property.
3330	Etag string `json:"etag,omitempty"`
3331
3332	// Key: The key of this property.
3333	Key string `json:"key,omitempty"`
3334
3335	// Kind: This is always drive#property.
3336	Kind string `json:"kind,omitempty"`
3337
3338	// SelfLink: The link back to this property.
3339	SelfLink string `json:"selfLink,omitempty"`
3340
3341	// Value: The value of this property.
3342	Value string `json:"value,omitempty"`
3343
3344	// Visibility: The visibility of this property. Allowed values are
3345	// PRIVATE and PUBLIC. (Default: PRIVATE). Private properties can only
3346	// be retrieved using an authenticated request. An authenticated request
3347	// uses an access token obtained with a OAuth 2 client ID. You cannot
3348	// use an API key to retrieve private properties.
3349	Visibility string `json:"visibility,omitempty"`
3350
3351	// ServerResponse contains the HTTP response code and headers from the
3352	// server.
3353	googleapi.ServerResponse `json:"-"`
3354
3355	// ForceSendFields is a list of field names (e.g. "Etag") to
3356	// unconditionally include in API requests. By default, fields with
3357	// empty or default values are omitted from API requests. However, any
3358	// non-pointer, non-interface field appearing in ForceSendFields will be
3359	// sent to the server regardless of whether the field is empty or not.
3360	// This may be used to include empty fields in Patch requests.
3361	ForceSendFields []string `json:"-"`
3362
3363	// NullFields is a list of field names (e.g. "Etag") to include in API
3364	// requests with the JSON null value. By default, fields with empty
3365	// values are omitted from API requests. However, any field with an
3366	// empty value appearing in NullFields will be sent to the server as
3367	// null. It is an error if a field in this list has a non-empty value.
3368	// This may be used to include null fields in Patch requests.
3369	NullFields []string `json:"-"`
3370}
3371
3372func (s *Property) MarshalJSON() ([]byte, error) {
3373	type NoMethod Property
3374	raw := NoMethod(*s)
3375	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
3376}
3377
3378// PropertyList: A collection of properties, key-value pairs that are
3379// either public or private to an application.
3380type PropertyList struct {
3381	// Etag: The ETag of the list.
3382	Etag string `json:"etag,omitempty"`
3383
3384	// Items: The list of properties.
3385	Items []*Property `json:"items,omitempty"`
3386
3387	// Kind: This is always drive#propertyList.
3388	Kind string `json:"kind,omitempty"`
3389
3390	// SelfLink: The link back to this list.
3391	SelfLink string `json:"selfLink,omitempty"`
3392
3393	// ServerResponse contains the HTTP response code and headers from the
3394	// server.
3395	googleapi.ServerResponse `json:"-"`
3396
3397	// ForceSendFields is a list of field names (e.g. "Etag") to
3398	// unconditionally include in API requests. By default, fields with
3399	// empty or default values are omitted from API requests. However, any
3400	// non-pointer, non-interface field appearing in ForceSendFields will be
3401	// sent to the server regardless of whether the field is empty or not.
3402	// This may be used to include empty fields in Patch requests.
3403	ForceSendFields []string `json:"-"`
3404
3405	// NullFields is a list of field names (e.g. "Etag") to include in API
3406	// requests with the JSON null value. By default, fields with empty
3407	// values are omitted from API requests. However, any field with an
3408	// empty value appearing in NullFields will be sent to the server as
3409	// null. It is an error if a field in this list has a non-empty value.
3410	// This may be used to include null fields in Patch requests.
3411	NullFields []string `json:"-"`
3412}
3413
3414func (s *PropertyList) MarshalJSON() ([]byte, error) {
3415	type NoMethod PropertyList
3416	raw := NoMethod(*s)
3417	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
3418}
3419
3420// Revision: A revision of a file.
3421type Revision struct {
3422	DownloadUrl string `json:"downloadUrl,omitempty"`
3423
3424	// Etag: The ETag of the revision.
3425	Etag string `json:"etag,omitempty"`
3426
3427	// ExportLinks: Links for exporting Docs Editors files to specific
3428	// formats.
3429	ExportLinks map[string]string `json:"exportLinks,omitempty"`
3430
3431	// FileSize: The size of the revision in bytes. This will only be
3432	// populated on files with content stored in Drive.
3433	FileSize int64 `json:"fileSize,omitempty,string"`
3434
3435	// Id: The ID of the revision.
3436	Id string `json:"id,omitempty"`
3437
3438	// Kind: This is always drive#revision.
3439	Kind string `json:"kind,omitempty"`
3440
3441	// LastModifyingUser: The last user to modify this revision.
3442	LastModifyingUser *User `json:"lastModifyingUser,omitempty"`
3443
3444	// LastModifyingUserName: Name of the last user to modify this revision.
3445	LastModifyingUserName string `json:"lastModifyingUserName,omitempty"`
3446
3447	// Md5Checksum: An MD5 checksum for the content of this revision. This
3448	// will only be populated on files with content stored in Drive.
3449	Md5Checksum string `json:"md5Checksum,omitempty"`
3450
3451	// MimeType: The MIME type of the revision.
3452	MimeType string `json:"mimeType,omitempty"`
3453
3454	// ModifiedDate: Last time this revision was modified (formatted RFC
3455	// 3339 timestamp).
3456	ModifiedDate string `json:"modifiedDate,omitempty"`
3457
3458	// OriginalFilename: The original filename when this revision was
3459	// created. This will only be populated on files with content stored in
3460	// Drive.
3461	OriginalFilename string `json:"originalFilename,omitempty"`
3462
3463	// Pinned: Whether this revision is pinned to prevent automatic purging.
3464	// If not set, the revision is automatically purged 30 days after newer
3465	// content is uploaded. This field can only be modified on files with
3466	// content stored in Drive, excluding Docs Editors files. Revisions can
3467	// also be pinned when they are created through the
3468	// drive.files.insert/update/copy by using the pinned query parameter.
3469	// Pinned revisions are stored indefinitely using additional storage
3470	// quota, up to a maximum of 200 revisions.
3471	Pinned bool `json:"pinned,omitempty"`
3472
3473	// PublishAuto: Whether subsequent revisions will be automatically
3474	// republished. This is only populated and can only be modified for Docs
3475	// Editors files.
3476	PublishAuto bool `json:"publishAuto,omitempty"`
3477
3478	// Published: Whether this revision is published. This is only populated
3479	// and can only be modified for Docs Editors files.
3480	Published bool `json:"published,omitempty"`
3481
3482	// PublishedLink: A link to the published revision. This is only
3483	// populated for Google Sites files.
3484	PublishedLink string `json:"publishedLink,omitempty"`
3485
3486	// PublishedOutsideDomain: Whether this revision is published outside
3487	// the domain. This is only populated and can only be modified for Docs
3488	// Editors files.
3489	PublishedOutsideDomain bool `json:"publishedOutsideDomain,omitempty"`
3490
3491	// SelfLink: A link back to this revision.
3492	SelfLink string `json:"selfLink,omitempty"`
3493
3494	// ServerResponse contains the HTTP response code and headers from the
3495	// server.
3496	googleapi.ServerResponse `json:"-"`
3497
3498	// ForceSendFields is a list of field names (e.g. "DownloadUrl") to
3499	// unconditionally include in API requests. By default, fields with
3500	// empty or default values are omitted from API requests. However, any
3501	// non-pointer, non-interface field appearing in ForceSendFields will be
3502	// sent to the server regardless of whether the field is empty or not.
3503	// This may be used to include empty fields in Patch requests.
3504	ForceSendFields []string `json:"-"`
3505
3506	// NullFields is a list of field names (e.g. "DownloadUrl") to include
3507	// in API requests with the JSON null value. By default, fields with
3508	// empty values are omitted from API requests. However, any field with
3509	// an empty value appearing in NullFields will be sent to the server as
3510	// null. It is an error if a field in this list has a non-empty value.
3511	// This may be used to include null fields in Patch requests.
3512	NullFields []string `json:"-"`
3513}
3514
3515func (s *Revision) MarshalJSON() ([]byte, error) {
3516	type NoMethod Revision
3517	raw := NoMethod(*s)
3518	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
3519}
3520
3521// RevisionList: A list of revisions of a file.
3522type RevisionList struct {
3523	// Etag: The ETag of the list.
3524	Etag string `json:"etag,omitempty"`
3525
3526	// Items: The list of revisions. If nextPageToken is populated, then
3527	// this list may be incomplete and an additional page of results should
3528	// be fetched.
3529	Items []*Revision `json:"items,omitempty"`
3530
3531	// Kind: This is always drive#revisionList.
3532	Kind string `json:"kind,omitempty"`
3533
3534	// NextPageToken: The page token for the next page of revisions. This
3535	// field will be absent if the end of the revisions list has been
3536	// reached. If the token is rejected for any reason, it should be
3537	// discarded and pagination should be restarted from the first page of
3538	// results.
3539	NextPageToken string `json:"nextPageToken,omitempty"`
3540
3541	// SelfLink: A link back to this list.
3542	SelfLink string `json:"selfLink,omitempty"`
3543
3544	// ServerResponse contains the HTTP response code and headers from the
3545	// server.
3546	googleapi.ServerResponse `json:"-"`
3547
3548	// ForceSendFields is a list of field names (e.g. "Etag") to
3549	// unconditionally include in API requests. By default, fields with
3550	// empty or default values are omitted from API requests. However, any
3551	// non-pointer, non-interface field appearing in ForceSendFields will be
3552	// sent to the server regardless of whether the field is empty or not.
3553	// This may be used to include empty fields in Patch requests.
3554	ForceSendFields []string `json:"-"`
3555
3556	// NullFields is a list of field names (e.g. "Etag") to include in API
3557	// requests with the JSON null value. By default, fields with empty
3558	// values are omitted from API requests. However, any field with an
3559	// empty value appearing in NullFields will be sent to the server as
3560	// null. It is an error if a field in this list has a non-empty value.
3561	// This may be used to include null fields in Patch requests.
3562	NullFields []string `json:"-"`
3563}
3564
3565func (s *RevisionList) MarshalJSON() ([]byte, error) {
3566	type NoMethod RevisionList
3567	raw := NoMethod(*s)
3568	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
3569}
3570
3571type StartPageToken struct {
3572	// Kind: Identifies what kind of resource this is. Value: the fixed
3573	// string "drive#startPageToken".
3574	Kind string `json:"kind,omitempty"`
3575
3576	// StartPageToken: The starting page token for listing changes.
3577	StartPageToken string `json:"startPageToken,omitempty"`
3578
3579	// ServerResponse contains the HTTP response code and headers from the
3580	// server.
3581	googleapi.ServerResponse `json:"-"`
3582
3583	// ForceSendFields is a list of field names (e.g. "Kind") to
3584	// unconditionally include in API requests. By default, fields with
3585	// empty or default values are omitted from API requests. However, any
3586	// non-pointer, non-interface field appearing in ForceSendFields will be
3587	// sent to the server regardless of whether the field is empty or not.
3588	// This may be used to include empty fields in Patch requests.
3589	ForceSendFields []string `json:"-"`
3590
3591	// NullFields is a list of field names (e.g. "Kind") to include in API
3592	// requests with the JSON null value. By default, fields with empty
3593	// values are omitted from API requests. However, any field with an
3594	// empty value appearing in NullFields will be sent to the server as
3595	// null. It is an error if a field in this list has a non-empty value.
3596	// This may be used to include null fields in Patch requests.
3597	NullFields []string `json:"-"`
3598}
3599
3600func (s *StartPageToken) MarshalJSON() ([]byte, error) {
3601	type NoMethod StartPageToken
3602	raw := NoMethod(*s)
3603	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
3604}
3605
3606// TeamDrive: Deprecated: use the drive collection instead.
3607type TeamDrive struct {
3608	// BackgroundImageFile: An image file and cropping parameters from which
3609	// a background image for this Team Drive is set. This is a write only
3610	// field; it can only be set on drive.teamdrives.update requests that
3611	// don't set themeId. When specified, all fields of the
3612	// backgroundImageFile must be set.
3613	BackgroundImageFile *TeamDriveBackgroundImageFile `json:"backgroundImageFile,omitempty"`
3614
3615	// BackgroundImageLink: A short-lived link to this Team Drive's
3616	// background image.
3617	BackgroundImageLink string `json:"backgroundImageLink,omitempty"`
3618
3619	// Capabilities: Capabilities the current user has on this Team Drive.
3620	Capabilities *TeamDriveCapabilities `json:"capabilities,omitempty"`
3621
3622	// ColorRgb: The color of this Team Drive as an RGB hex string. It can
3623	// only be set on a drive.teamdrives.update request that does not set
3624	// themeId.
3625	ColorRgb string `json:"colorRgb,omitempty"`
3626
3627	// CreatedDate: The time at which the Team Drive was created (RFC 3339
3628	// date-time).
3629	CreatedDate string `json:"createdDate,omitempty"`
3630
3631	// Id: The ID of this Team Drive which is also the ID of the top level
3632	// folder of this Team Drive.
3633	Id string `json:"id,omitempty"`
3634
3635	// Kind: This is always drive#teamDrive
3636	Kind string `json:"kind,omitempty"`
3637
3638	// Name: The name of this Team Drive.
3639	Name string `json:"name,omitempty"`
3640
3641	// Restrictions: A set of restrictions that apply to this Team Drive or
3642	// items inside this Team Drive.
3643	Restrictions *TeamDriveRestrictions `json:"restrictions,omitempty"`
3644
3645	// ThemeId: The ID of the theme from which the background image and
3646	// color will be set. The set of possible teamDriveThemes can be
3647	// retrieved from a drive.about.get response. When not specified on a
3648	// drive.teamdrives.insert request, a random theme is chosen from which
3649	// the background image and color are set. This is a write-only field;
3650	// it can only be set on requests that don't set colorRgb or
3651	// backgroundImageFile.
3652	ThemeId string `json:"themeId,omitempty"`
3653
3654	// ServerResponse contains the HTTP response code and headers from the
3655	// server.
3656	googleapi.ServerResponse `json:"-"`
3657
3658	// ForceSendFields is a list of field names (e.g. "BackgroundImageFile")
3659	// to unconditionally include in API requests. By default, fields with
3660	// empty or default values are omitted from API requests. However, any
3661	// non-pointer, non-interface field appearing in ForceSendFields will be
3662	// sent to the server regardless of whether the field is empty or not.
3663	// This may be used to include empty fields in Patch requests.
3664	ForceSendFields []string `json:"-"`
3665
3666	// NullFields is a list of field names (e.g. "BackgroundImageFile") to
3667	// include in API requests with the JSON null value. By default, fields
3668	// with empty values are omitted from API requests. However, any field
3669	// with an empty value appearing in NullFields will be sent to the
3670	// server as null. It is an error if a field in this list has a
3671	// non-empty value. This may be used to include null fields in Patch
3672	// requests.
3673	NullFields []string `json:"-"`
3674}
3675
3676func (s *TeamDrive) MarshalJSON() ([]byte, error) {
3677	type NoMethod TeamDrive
3678	raw := NoMethod(*s)
3679	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
3680}
3681
3682// TeamDriveBackgroundImageFile: An image file and cropping parameters
3683// from which a background image for this Team Drive is set. This is a
3684// write only field; it can only be set on drive.teamdrives.update
3685// requests that don't set themeId. When specified, all fields of the
3686// backgroundImageFile must be set.
3687type TeamDriveBackgroundImageFile struct {
3688	// Id: The ID of an image file in Drive to use for the background image.
3689	Id string `json:"id,omitempty"`
3690
3691	// Width: The width of the cropped image in the closed range of 0 to 1.
3692	// This value represents the width of the cropped image divided by the
3693	// width of the entire image. The height is computed by applying a width
3694	// to height aspect ratio of 80 to 9. The resulting image must be at
3695	// least 1280 pixels wide and 144 pixels high.
3696	Width float64 `json:"width,omitempty"`
3697
3698	// XCoordinate: The X coordinate of the upper left corner of the
3699	// cropping area in the background image. This is a value in the closed
3700	// range of 0 to 1. This value represents the horizontal distance from
3701	// the left side of the entire image to the left side of the cropping
3702	// area divided by the width of the entire image.
3703	XCoordinate float64 `json:"xCoordinate,omitempty"`
3704
3705	// YCoordinate: The Y coordinate of the upper left corner of the
3706	// cropping area in the background image. This is a value in the closed
3707	// range of 0 to 1. This value represents the vertical distance from the
3708	// top side of the entire image to the top side of the cropping area
3709	// divided by the height of the entire image.
3710	YCoordinate float64 `json:"yCoordinate,omitempty"`
3711
3712	// ForceSendFields is a list of field names (e.g. "Id") to
3713	// unconditionally include in API requests. By default, fields with
3714	// empty or default values are omitted from API requests. However, any
3715	// non-pointer, non-interface field appearing in ForceSendFields will be
3716	// sent to the server regardless of whether the field is empty or not.
3717	// This may be used to include empty fields in Patch requests.
3718	ForceSendFields []string `json:"-"`
3719
3720	// NullFields is a list of field names (e.g. "Id") to include in API
3721	// requests with the JSON null value. By default, fields with empty
3722	// values are omitted from API requests. However, any field with an
3723	// empty value appearing in NullFields will be sent to the server as
3724	// null. It is an error if a field in this list has a non-empty value.
3725	// This may be used to include null fields in Patch requests.
3726	NullFields []string `json:"-"`
3727}
3728
3729func (s *TeamDriveBackgroundImageFile) MarshalJSON() ([]byte, error) {
3730	type NoMethod TeamDriveBackgroundImageFile
3731	raw := NoMethod(*s)
3732	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
3733}
3734
3735func (s *TeamDriveBackgroundImageFile) UnmarshalJSON(data []byte) error {
3736	type NoMethod TeamDriveBackgroundImageFile
3737	var s1 struct {
3738		Width       gensupport.JSONFloat64 `json:"width"`
3739		XCoordinate gensupport.JSONFloat64 `json:"xCoordinate"`
3740		YCoordinate gensupport.JSONFloat64 `json:"yCoordinate"`
3741		*NoMethod
3742	}
3743	s1.NoMethod = (*NoMethod)(s)
3744	if err := json.Unmarshal(data, &s1); err != nil {
3745		return err
3746	}
3747	s.Width = float64(s1.Width)
3748	s.XCoordinate = float64(s1.XCoordinate)
3749	s.YCoordinate = float64(s1.YCoordinate)
3750	return nil
3751}
3752
3753// TeamDriveCapabilities: Capabilities the current user has on this Team
3754// Drive.
3755type TeamDriveCapabilities struct {
3756	// CanAddChildren: Whether the current user can add children to folders
3757	// in this Team Drive.
3758	CanAddChildren bool `json:"canAddChildren,omitempty"`
3759
3760	// CanChangeCopyRequiresWriterPermissionRestriction: Whether the current
3761	// user can change the copyRequiresWriterPermission restriction of this
3762	// Team Drive.
3763	CanChangeCopyRequiresWriterPermissionRestriction bool `json:"canChangeCopyRequiresWriterPermissionRestriction,omitempty"`
3764
3765	// CanChangeDomainUsersOnlyRestriction: Whether the current user can
3766	// change the domainUsersOnly restriction of this Team Drive.
3767	CanChangeDomainUsersOnlyRestriction bool `json:"canChangeDomainUsersOnlyRestriction,omitempty"`
3768
3769	// CanChangeTeamDriveBackground: Whether the current user can change the
3770	// background of this Team Drive.
3771	CanChangeTeamDriveBackground bool `json:"canChangeTeamDriveBackground,omitempty"`
3772
3773	// CanChangeTeamMembersOnlyRestriction: Whether the current user can
3774	// change the teamMembersOnly restriction of this Team Drive.
3775	CanChangeTeamMembersOnlyRestriction bool `json:"canChangeTeamMembersOnlyRestriction,omitempty"`
3776
3777	// CanComment: Whether the current user can comment on files in this
3778	// Team Drive.
3779	CanComment bool `json:"canComment,omitempty"`
3780
3781	// CanCopy: Whether the current user can copy files in this Team Drive.
3782	CanCopy bool `json:"canCopy,omitempty"`
3783
3784	// CanDeleteChildren: Whether the current user can delete children from
3785	// folders in this Team Drive.
3786	CanDeleteChildren bool `json:"canDeleteChildren,omitempty"`
3787
3788	// CanDeleteTeamDrive: Whether the current user can delete this Team
3789	// Drive. Attempting to delete the Team Drive may still fail if there
3790	// are untrashed items inside the Team Drive.
3791	CanDeleteTeamDrive bool `json:"canDeleteTeamDrive,omitempty"`
3792
3793	// CanDownload: Whether the current user can download files in this Team
3794	// Drive.
3795	CanDownload bool `json:"canDownload,omitempty"`
3796
3797	// CanEdit: Whether the current user can edit files in this Team Drive
3798	CanEdit bool `json:"canEdit,omitempty"`
3799
3800	// CanListChildren: Whether the current user can list the children of
3801	// folders in this Team Drive.
3802	CanListChildren bool `json:"canListChildren,omitempty"`
3803
3804	// CanManageMembers: Whether the current user can add members to this
3805	// Team Drive or remove them or change their role.
3806	CanManageMembers bool `json:"canManageMembers,omitempty"`
3807
3808	// CanReadRevisions: Whether the current user can read the revisions
3809	// resource of files in this Team Drive.
3810	CanReadRevisions bool `json:"canReadRevisions,omitempty"`
3811
3812	// CanRemoveChildren: Deprecated - use canDeleteChildren or
3813	// canTrashChildren instead.
3814	CanRemoveChildren bool `json:"canRemoveChildren,omitempty"`
3815
3816	// CanRename: Whether the current user can rename files or folders in
3817	// this Team Drive.
3818	CanRename bool `json:"canRename,omitempty"`
3819
3820	// CanRenameTeamDrive: Whether the current user can rename this Team
3821	// Drive.
3822	CanRenameTeamDrive bool `json:"canRenameTeamDrive,omitempty"`
3823
3824	// CanShare: Whether the current user can share files or folders in this
3825	// Team Drive.
3826	CanShare bool `json:"canShare,omitempty"`
3827
3828	// CanTrashChildren: Whether the current user can trash children from
3829	// folders in this Team Drive.
3830	CanTrashChildren bool `json:"canTrashChildren,omitempty"`
3831
3832	// ForceSendFields is a list of field names (e.g. "CanAddChildren") to
3833	// unconditionally include in API requests. By default, fields with
3834	// empty or default values are omitted from API requests. However, any
3835	// non-pointer, non-interface field appearing in ForceSendFields will be
3836	// sent to the server regardless of whether the field is empty or not.
3837	// This may be used to include empty fields in Patch requests.
3838	ForceSendFields []string `json:"-"`
3839
3840	// NullFields is a list of field names (e.g. "CanAddChildren") to
3841	// include in API requests with the JSON null value. By default, fields
3842	// with empty values are omitted from API requests. However, any field
3843	// with an empty value appearing in NullFields will be sent to the
3844	// server as null. It is an error if a field in this list has a
3845	// non-empty value. This may be used to include null fields in Patch
3846	// requests.
3847	NullFields []string `json:"-"`
3848}
3849
3850func (s *TeamDriveCapabilities) MarshalJSON() ([]byte, error) {
3851	type NoMethod TeamDriveCapabilities
3852	raw := NoMethod(*s)
3853	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
3854}
3855
3856// TeamDriveRestrictions: A set of restrictions that apply to this Team
3857// Drive or items inside this Team Drive.
3858type TeamDriveRestrictions struct {
3859	// AdminManagedRestrictions: Whether administrative privileges on this
3860	// Team Drive are required to modify restrictions.
3861	AdminManagedRestrictions bool `json:"adminManagedRestrictions,omitempty"`
3862
3863	// CopyRequiresWriterPermission: Whether the options to copy, print, or
3864	// download files inside this Team Drive, should be disabled for readers
3865	// and commenters. When this restriction is set to true, it will
3866	// override the similarly named field to true for any file inside this
3867	// Team Drive.
3868	CopyRequiresWriterPermission bool `json:"copyRequiresWriterPermission,omitempty"`
3869
3870	// DomainUsersOnly: Whether access to this Team Drive and items inside
3871	// this Team Drive is restricted to users of the domain to which this
3872	// Team Drive belongs. This restriction may be overridden by other
3873	// sharing policies controlled outside of this Team Drive.
3874	DomainUsersOnly bool `json:"domainUsersOnly,omitempty"`
3875
3876	// TeamMembersOnly: Whether access to items inside this Team Drive is
3877	// restricted to members of this Team Drive.
3878	TeamMembersOnly bool `json:"teamMembersOnly,omitempty"`
3879
3880	// ForceSendFields is a list of field names (e.g.
3881	// "AdminManagedRestrictions") to unconditionally include in API
3882	// requests. By default, fields with empty or default values are omitted
3883	// from API requests. However, any non-pointer, non-interface field
3884	// appearing in ForceSendFields will be sent to the server regardless of
3885	// whether the field is empty or not. This may be used to include empty
3886	// fields in Patch requests.
3887	ForceSendFields []string `json:"-"`
3888
3889	// NullFields is a list of field names (e.g. "AdminManagedRestrictions")
3890	// to include in API requests with the JSON null value. By default,
3891	// fields with empty values are omitted from API requests. However, any
3892	// field with an empty value appearing in NullFields will be sent to the
3893	// server as null. It is an error if a field in this list has a
3894	// non-empty value. This may be used to include null fields in Patch
3895	// requests.
3896	NullFields []string `json:"-"`
3897}
3898
3899func (s *TeamDriveRestrictions) MarshalJSON() ([]byte, error) {
3900	type NoMethod TeamDriveRestrictions
3901	raw := NoMethod(*s)
3902	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
3903}
3904
3905// TeamDriveList: A list of Team Drives.
3906type TeamDriveList struct {
3907	// Items: The list of Team Drives.
3908	Items []*TeamDrive `json:"items,omitempty"`
3909
3910	// Kind: This is always drive#teamDriveList
3911	Kind string `json:"kind,omitempty"`
3912
3913	// NextPageToken: The page token for the next page of Team Drives.
3914	NextPageToken string `json:"nextPageToken,omitempty"`
3915
3916	// ServerResponse contains the HTTP response code and headers from the
3917	// server.
3918	googleapi.ServerResponse `json:"-"`
3919
3920	// ForceSendFields is a list of field names (e.g. "Items") to
3921	// unconditionally include in API requests. By default, fields with
3922	// empty or default values are omitted from API requests. However, any
3923	// non-pointer, non-interface field appearing in ForceSendFields will be
3924	// sent to the server regardless of whether the field is empty or not.
3925	// This may be used to include empty fields in Patch requests.
3926	ForceSendFields []string `json:"-"`
3927
3928	// NullFields is a list of field names (e.g. "Items") to include in API
3929	// requests with the JSON null value. By default, fields with empty
3930	// values are omitted from API requests. However, any field with an
3931	// empty value appearing in NullFields will be sent to the server as
3932	// null. It is an error if a field in this list has a non-empty value.
3933	// This may be used to include null fields in Patch requests.
3934	NullFields []string `json:"-"`
3935}
3936
3937func (s *TeamDriveList) MarshalJSON() ([]byte, error) {
3938	type NoMethod TeamDriveList
3939	raw := NoMethod(*s)
3940	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
3941}
3942
3943// User: Information about a Drive user.
3944type User struct {
3945	// DisplayName: A plain text displayable name for this user.
3946	DisplayName string `json:"displayName,omitempty"`
3947
3948	// EmailAddress: The email address of the user.
3949	EmailAddress string `json:"emailAddress,omitempty"`
3950
3951	// IsAuthenticatedUser: Whether this user is the same as the
3952	// authenticated user for whom the request was made.
3953	IsAuthenticatedUser bool `json:"isAuthenticatedUser,omitempty"`
3954
3955	// Kind: This is always drive#user.
3956	Kind string `json:"kind,omitempty"`
3957
3958	// PermissionId: The user's ID as visible in the permissions collection.
3959	PermissionId string `json:"permissionId,omitempty"`
3960
3961	// Picture: The user's profile picture.
3962	Picture *UserPicture `json:"picture,omitempty"`
3963
3964	// ForceSendFields is a list of field names (e.g. "DisplayName") to
3965	// unconditionally include in API requests. By default, fields with
3966	// empty or default values are omitted from API requests. However, any
3967	// non-pointer, non-interface field appearing in ForceSendFields will be
3968	// sent to the server regardless of whether the field is empty or not.
3969	// This may be used to include empty fields in Patch requests.
3970	ForceSendFields []string `json:"-"`
3971
3972	// NullFields is a list of field names (e.g. "DisplayName") to include
3973	// in API requests with the JSON null value. By default, fields with
3974	// empty values are omitted from API requests. However, any field with
3975	// an empty value appearing in NullFields will be sent to the server as
3976	// null. It is an error if a field in this list has a non-empty value.
3977	// This may be used to include null fields in Patch requests.
3978	NullFields []string `json:"-"`
3979}
3980
3981func (s *User) MarshalJSON() ([]byte, error) {
3982	type NoMethod User
3983	raw := NoMethod(*s)
3984	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
3985}
3986
3987// UserPicture: The user's profile picture.
3988type UserPicture struct {
3989	// Url: A URL that points to a profile picture of this user.
3990	Url string `json:"url,omitempty"`
3991
3992	// ForceSendFields is a list of field names (e.g. "Url") to
3993	// unconditionally include in API requests. By default, fields with
3994	// empty or default values are omitted from API requests. However, any
3995	// non-pointer, non-interface field appearing in ForceSendFields will be
3996	// sent to the server regardless of whether the field is empty or not.
3997	// This may be used to include empty fields in Patch requests.
3998	ForceSendFields []string `json:"-"`
3999
4000	// NullFields is a list of field names (e.g. "Url") to include in API
4001	// requests with the JSON null value. By default, fields with empty
4002	// values are omitted from API requests. However, any field with an
4003	// empty value appearing in NullFields will be sent to the server as
4004	// null. It is an error if a field in this list has a non-empty value.
4005	// This may be used to include null fields in Patch requests.
4006	NullFields []string `json:"-"`
4007}
4008
4009func (s *UserPicture) MarshalJSON() ([]byte, error) {
4010	type NoMethod UserPicture
4011	raw := NoMethod(*s)
4012	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
4013}
4014
4015// method id "drive.about.get":
4016
4017type AboutGetCall struct {
4018	s            *Service
4019	urlParams_   gensupport.URLParams
4020	ifNoneMatch_ string
4021	ctx_         context.Context
4022	header_      http.Header
4023}
4024
4025// Get: Gets the information about the current user along with Drive API
4026// settings
4027func (r *AboutService) Get() *AboutGetCall {
4028	c := &AboutGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
4029	return c
4030}
4031
4032// IncludeSubscribed sets the optional parameter "includeSubscribed":
4033// Whether to count changes outside the My Drive hierarchy. When set to
4034// false, changes to files such as those in the Application Data folder
4035// or shared files which have not been added to My Drive will be omitted
4036// from the maxChangeIdCount.
4037func (c *AboutGetCall) IncludeSubscribed(includeSubscribed bool) *AboutGetCall {
4038	c.urlParams_.Set("includeSubscribed", fmt.Sprint(includeSubscribed))
4039	return c
4040}
4041
4042// MaxChangeIdCount sets the optional parameter "maxChangeIdCount":
4043// Maximum number of remaining change IDs to count
4044func (c *AboutGetCall) MaxChangeIdCount(maxChangeIdCount int64) *AboutGetCall {
4045	c.urlParams_.Set("maxChangeIdCount", fmt.Sprint(maxChangeIdCount))
4046	return c
4047}
4048
4049// StartChangeId sets the optional parameter "startChangeId": Change ID
4050// to start counting from when calculating number of remaining change
4051// IDs
4052func (c *AboutGetCall) StartChangeId(startChangeId int64) *AboutGetCall {
4053	c.urlParams_.Set("startChangeId", fmt.Sprint(startChangeId))
4054	return c
4055}
4056
4057// Fields allows partial responses to be retrieved. See
4058// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
4059// for more information.
4060func (c *AboutGetCall) Fields(s ...googleapi.Field) *AboutGetCall {
4061	c.urlParams_.Set("fields", googleapi.CombineFields(s))
4062	return c
4063}
4064
4065// IfNoneMatch sets the optional parameter which makes the operation
4066// fail if the object's ETag matches the given value. This is useful for
4067// getting updates only after the object has changed since the last
4068// request. Use googleapi.IsNotModified to check whether the response
4069// error from Do is the result of In-None-Match.
4070func (c *AboutGetCall) IfNoneMatch(entityTag string) *AboutGetCall {
4071	c.ifNoneMatch_ = entityTag
4072	return c
4073}
4074
4075// Context sets the context to be used in this call's Do method. Any
4076// pending HTTP request will be aborted if the provided context is
4077// canceled.
4078func (c *AboutGetCall) Context(ctx context.Context) *AboutGetCall {
4079	c.ctx_ = ctx
4080	return c
4081}
4082
4083// Header returns an http.Header that can be modified by the caller to
4084// add HTTP headers to the request.
4085func (c *AboutGetCall) Header() http.Header {
4086	if c.header_ == nil {
4087		c.header_ = make(http.Header)
4088	}
4089	return c.header_
4090}
4091
4092func (c *AboutGetCall) doRequest(alt string) (*http.Response, error) {
4093	reqHeaders := make(http.Header)
4094	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210830")
4095	for k, v := range c.header_ {
4096		reqHeaders[k] = v
4097	}
4098	reqHeaders.Set("User-Agent", c.s.userAgent())
4099	if c.ifNoneMatch_ != "" {
4100		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
4101	}
4102	var body io.Reader = nil
4103	c.urlParams_.Set("alt", alt)
4104	c.urlParams_.Set("prettyPrint", "false")
4105	urls := googleapi.ResolveRelative(c.s.BasePath, "about")
4106	urls += "?" + c.urlParams_.Encode()
4107	req, err := http.NewRequest("GET", urls, body)
4108	if err != nil {
4109		return nil, err
4110	}
4111	req.Header = reqHeaders
4112	return gensupport.SendRequest(c.ctx_, c.s.client, req)
4113}
4114
4115// Do executes the "drive.about.get" call.
4116// Exactly one of *About or error will be non-nil. Any non-2xx status
4117// code is an error. Response headers are in either
4118// *About.ServerResponse.Header or (if a response was returned at all)
4119// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
4120// check whether the returned error was because http.StatusNotModified
4121// was returned.
4122func (c *AboutGetCall) Do(opts ...googleapi.CallOption) (*About, error) {
4123	gensupport.SetOptions(c.urlParams_, opts...)
4124	res, err := c.doRequest("json")
4125	if res != nil && res.StatusCode == http.StatusNotModified {
4126		if res.Body != nil {
4127			res.Body.Close()
4128		}
4129		return nil, &googleapi.Error{
4130			Code:   res.StatusCode,
4131			Header: res.Header,
4132		}
4133	}
4134	if err != nil {
4135		return nil, err
4136	}
4137	defer googleapi.CloseBody(res)
4138	if err := googleapi.CheckResponse(res); err != nil {
4139		return nil, err
4140	}
4141	ret := &About{
4142		ServerResponse: googleapi.ServerResponse{
4143			Header:         res.Header,
4144			HTTPStatusCode: res.StatusCode,
4145		},
4146	}
4147	target := &ret
4148	if err := gensupport.DecodeResponse(target, res); err != nil {
4149		return nil, err
4150	}
4151	return ret, nil
4152	// {
4153	//   "description": "Gets the information about the current user along with Drive API settings",
4154	//   "httpMethod": "GET",
4155	//   "id": "drive.about.get",
4156	//   "parameters": {
4157	//     "includeSubscribed": {
4158	//       "default": "true",
4159	//       "description": "Whether to count changes outside the My Drive hierarchy. When set to false, changes to files such as those in the Application Data folder or shared files which have not been added to My Drive will be omitted from the maxChangeIdCount.",
4160	//       "location": "query",
4161	//       "type": "boolean"
4162	//     },
4163	//     "maxChangeIdCount": {
4164	//       "default": "1",
4165	//       "description": "Maximum number of remaining change IDs to count",
4166	//       "format": "int64",
4167	//       "location": "query",
4168	//       "type": "string"
4169	//     },
4170	//     "startChangeId": {
4171	//       "description": "Change ID to start counting from when calculating number of remaining change IDs",
4172	//       "format": "int64",
4173	//       "location": "query",
4174	//       "type": "string"
4175	//     }
4176	//   },
4177	//   "path": "about",
4178	//   "response": {
4179	//     "$ref": "About"
4180	//   },
4181	//   "scopes": [
4182	//     "https://www.googleapis.com/auth/drive",
4183	//     "https://www.googleapis.com/auth/drive.appdata",
4184	//     "https://www.googleapis.com/auth/drive.file",
4185	//     "https://www.googleapis.com/auth/drive.metadata",
4186	//     "https://www.googleapis.com/auth/drive.metadata.readonly",
4187	//     "https://www.googleapis.com/auth/drive.photos.readonly",
4188	//     "https://www.googleapis.com/auth/drive.readonly"
4189	//   ]
4190	// }
4191
4192}
4193
4194// method id "drive.apps.get":
4195
4196type AppsGetCall struct {
4197	s            *Service
4198	appId        string
4199	urlParams_   gensupport.URLParams
4200	ifNoneMatch_ string
4201	ctx_         context.Context
4202	header_      http.Header
4203}
4204
4205// Get: Gets a specific app.
4206//
4207// - appId: The ID of the app.
4208func (r *AppsService) Get(appId string) *AppsGetCall {
4209	c := &AppsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
4210	c.appId = appId
4211	return c
4212}
4213
4214// Fields allows partial responses to be retrieved. See
4215// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
4216// for more information.
4217func (c *AppsGetCall) Fields(s ...googleapi.Field) *AppsGetCall {
4218	c.urlParams_.Set("fields", googleapi.CombineFields(s))
4219	return c
4220}
4221
4222// IfNoneMatch sets the optional parameter which makes the operation
4223// fail if the object's ETag matches the given value. This is useful for
4224// getting updates only after the object has changed since the last
4225// request. Use googleapi.IsNotModified to check whether the response
4226// error from Do is the result of In-None-Match.
4227func (c *AppsGetCall) IfNoneMatch(entityTag string) *AppsGetCall {
4228	c.ifNoneMatch_ = entityTag
4229	return c
4230}
4231
4232// Context sets the context to be used in this call's Do method. Any
4233// pending HTTP request will be aborted if the provided context is
4234// canceled.
4235func (c *AppsGetCall) Context(ctx context.Context) *AppsGetCall {
4236	c.ctx_ = ctx
4237	return c
4238}
4239
4240// Header returns an http.Header that can be modified by the caller to
4241// add HTTP headers to the request.
4242func (c *AppsGetCall) Header() http.Header {
4243	if c.header_ == nil {
4244		c.header_ = make(http.Header)
4245	}
4246	return c.header_
4247}
4248
4249func (c *AppsGetCall) doRequest(alt string) (*http.Response, error) {
4250	reqHeaders := make(http.Header)
4251	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210830")
4252	for k, v := range c.header_ {
4253		reqHeaders[k] = v
4254	}
4255	reqHeaders.Set("User-Agent", c.s.userAgent())
4256	if c.ifNoneMatch_ != "" {
4257		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
4258	}
4259	var body io.Reader = nil
4260	c.urlParams_.Set("alt", alt)
4261	c.urlParams_.Set("prettyPrint", "false")
4262	urls := googleapi.ResolveRelative(c.s.BasePath, "apps/{appId}")
4263	urls += "?" + c.urlParams_.Encode()
4264	req, err := http.NewRequest("GET", urls, body)
4265	if err != nil {
4266		return nil, err
4267	}
4268	req.Header = reqHeaders
4269	googleapi.Expand(req.URL, map[string]string{
4270		"appId": c.appId,
4271	})
4272	return gensupport.SendRequest(c.ctx_, c.s.client, req)
4273}
4274
4275// Do executes the "drive.apps.get" call.
4276// Exactly one of *App or error will be non-nil. Any non-2xx status code
4277// is an error. Response headers are in either
4278// *App.ServerResponse.Header or (if a response was returned at all) in
4279// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
4280// whether the returned error was because http.StatusNotModified was
4281// returned.
4282func (c *AppsGetCall) Do(opts ...googleapi.CallOption) (*App, error) {
4283	gensupport.SetOptions(c.urlParams_, opts...)
4284	res, err := c.doRequest("json")
4285	if res != nil && res.StatusCode == http.StatusNotModified {
4286		if res.Body != nil {
4287			res.Body.Close()
4288		}
4289		return nil, &googleapi.Error{
4290			Code:   res.StatusCode,
4291			Header: res.Header,
4292		}
4293	}
4294	if err != nil {
4295		return nil, err
4296	}
4297	defer googleapi.CloseBody(res)
4298	if err := googleapi.CheckResponse(res); err != nil {
4299		return nil, err
4300	}
4301	ret := &App{
4302		ServerResponse: googleapi.ServerResponse{
4303			Header:         res.Header,
4304			HTTPStatusCode: res.StatusCode,
4305		},
4306	}
4307	target := &ret
4308	if err := gensupport.DecodeResponse(target, res); err != nil {
4309		return nil, err
4310	}
4311	return ret, nil
4312	// {
4313	//   "description": "Gets a specific app.",
4314	//   "httpMethod": "GET",
4315	//   "id": "drive.apps.get",
4316	//   "parameterOrder": [
4317	//     "appId"
4318	//   ],
4319	//   "parameters": {
4320	//     "appId": {
4321	//       "description": "The ID of the app.",
4322	//       "location": "path",
4323	//       "required": true,
4324	//       "type": "string"
4325	//     }
4326	//   },
4327	//   "path": "apps/{appId}",
4328	//   "response": {
4329	//     "$ref": "App"
4330	//   },
4331	//   "scopes": [
4332	//     "https://www.googleapis.com/auth/drive",
4333	//     "https://www.googleapis.com/auth/drive.appdata",
4334	//     "https://www.googleapis.com/auth/drive.apps.readonly",
4335	//     "https://www.googleapis.com/auth/drive.file",
4336	//     "https://www.googleapis.com/auth/drive.metadata",
4337	//     "https://www.googleapis.com/auth/drive.metadata.readonly",
4338	//     "https://www.googleapis.com/auth/drive.readonly"
4339	//   ]
4340	// }
4341
4342}
4343
4344// method id "drive.apps.list":
4345
4346type AppsListCall struct {
4347	s            *Service
4348	urlParams_   gensupport.URLParams
4349	ifNoneMatch_ string
4350	ctx_         context.Context
4351	header_      http.Header
4352}
4353
4354// List: Lists a user's installed apps.
4355func (r *AppsService) List() *AppsListCall {
4356	c := &AppsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
4357	return c
4358}
4359
4360// AppFilterExtensions sets the optional parameter
4361// "appFilterExtensions": A comma-separated list of file extensions for
4362// open with filtering. All apps within the given app query scope which
4363// can open any of the given file extensions will be included in the
4364// response. If appFilterMimeTypes are provided as well, the result is a
4365// union of the two resulting app lists.
4366func (c *AppsListCall) AppFilterExtensions(appFilterExtensions string) *AppsListCall {
4367	c.urlParams_.Set("appFilterExtensions", appFilterExtensions)
4368	return c
4369}
4370
4371// AppFilterMimeTypes sets the optional parameter "appFilterMimeTypes":
4372// A comma-separated list of MIME types for open with filtering. All
4373// apps within the given app query scope which can open any of the given
4374// MIME types will be included in the response. If appFilterExtensions
4375// are provided as well, the result is a union of the two resulting app
4376// lists.
4377func (c *AppsListCall) AppFilterMimeTypes(appFilterMimeTypes string) *AppsListCall {
4378	c.urlParams_.Set("appFilterMimeTypes", appFilterMimeTypes)
4379	return c
4380}
4381
4382// LanguageCode sets the optional parameter "languageCode": A language
4383// or locale code, as defined by BCP 47, with some extensions from
4384// Unicode's LDML format (http://www.unicode.org/reports/tr35/).
4385func (c *AppsListCall) LanguageCode(languageCode string) *AppsListCall {
4386	c.urlParams_.Set("languageCode", languageCode)
4387	return c
4388}
4389
4390// Fields allows partial responses to be retrieved. See
4391// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
4392// for more information.
4393func (c *AppsListCall) Fields(s ...googleapi.Field) *AppsListCall {
4394	c.urlParams_.Set("fields", googleapi.CombineFields(s))
4395	return c
4396}
4397
4398// IfNoneMatch sets the optional parameter which makes the operation
4399// fail if the object's ETag matches the given value. This is useful for
4400// getting updates only after the object has changed since the last
4401// request. Use googleapi.IsNotModified to check whether the response
4402// error from Do is the result of In-None-Match.
4403func (c *AppsListCall) IfNoneMatch(entityTag string) *AppsListCall {
4404	c.ifNoneMatch_ = entityTag
4405	return c
4406}
4407
4408// Context sets the context to be used in this call's Do method. Any
4409// pending HTTP request will be aborted if the provided context is
4410// canceled.
4411func (c *AppsListCall) Context(ctx context.Context) *AppsListCall {
4412	c.ctx_ = ctx
4413	return c
4414}
4415
4416// Header returns an http.Header that can be modified by the caller to
4417// add HTTP headers to the request.
4418func (c *AppsListCall) Header() http.Header {
4419	if c.header_ == nil {
4420		c.header_ = make(http.Header)
4421	}
4422	return c.header_
4423}
4424
4425func (c *AppsListCall) doRequest(alt string) (*http.Response, error) {
4426	reqHeaders := make(http.Header)
4427	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210830")
4428	for k, v := range c.header_ {
4429		reqHeaders[k] = v
4430	}
4431	reqHeaders.Set("User-Agent", c.s.userAgent())
4432	if c.ifNoneMatch_ != "" {
4433		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
4434	}
4435	var body io.Reader = nil
4436	c.urlParams_.Set("alt", alt)
4437	c.urlParams_.Set("prettyPrint", "false")
4438	urls := googleapi.ResolveRelative(c.s.BasePath, "apps")
4439	urls += "?" + c.urlParams_.Encode()
4440	req, err := http.NewRequest("GET", urls, body)
4441	if err != nil {
4442		return nil, err
4443	}
4444	req.Header = reqHeaders
4445	return gensupport.SendRequest(c.ctx_, c.s.client, req)
4446}
4447
4448// Do executes the "drive.apps.list" call.
4449// Exactly one of *AppList or error will be non-nil. Any non-2xx status
4450// code is an error. Response headers are in either
4451// *AppList.ServerResponse.Header or (if a response was returned at all)
4452// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
4453// check whether the returned error was because http.StatusNotModified
4454// was returned.
4455func (c *AppsListCall) Do(opts ...googleapi.CallOption) (*AppList, error) {
4456	gensupport.SetOptions(c.urlParams_, opts...)
4457	res, err := c.doRequest("json")
4458	if res != nil && res.StatusCode == http.StatusNotModified {
4459		if res.Body != nil {
4460			res.Body.Close()
4461		}
4462		return nil, &googleapi.Error{
4463			Code:   res.StatusCode,
4464			Header: res.Header,
4465		}
4466	}
4467	if err != nil {
4468		return nil, err
4469	}
4470	defer googleapi.CloseBody(res)
4471	if err := googleapi.CheckResponse(res); err != nil {
4472		return nil, err
4473	}
4474	ret := &AppList{
4475		ServerResponse: googleapi.ServerResponse{
4476			Header:         res.Header,
4477			HTTPStatusCode: res.StatusCode,
4478		},
4479	}
4480	target := &ret
4481	if err := gensupport.DecodeResponse(target, res); err != nil {
4482		return nil, err
4483	}
4484	return ret, nil
4485	// {
4486	//   "description": "Lists a user's installed apps.",
4487	//   "httpMethod": "GET",
4488	//   "id": "drive.apps.list",
4489	//   "parameters": {
4490	//     "appFilterExtensions": {
4491	//       "default": "",
4492	//       "description": "A comma-separated list of file extensions for open with filtering. All apps within the given app query scope which can open any of the given file extensions will be included in the response. If appFilterMimeTypes are provided as well, the result is a union of the two resulting app lists.",
4493	//       "location": "query",
4494	//       "type": "string"
4495	//     },
4496	//     "appFilterMimeTypes": {
4497	//       "default": "",
4498	//       "description": "A comma-separated list of MIME types for open with filtering. All apps within the given app query scope which can open any of the given MIME types will be included in the response. If appFilterExtensions are provided as well, the result is a union of the two resulting app lists.",
4499	//       "location": "query",
4500	//       "type": "string"
4501	//     },
4502	//     "languageCode": {
4503	//       "description": "A language or locale code, as defined by BCP 47, with some extensions from Unicode's LDML format (http://www.unicode.org/reports/tr35/).",
4504	//       "location": "query",
4505	//       "type": "string"
4506	//     }
4507	//   },
4508	//   "path": "apps",
4509	//   "response": {
4510	//     "$ref": "AppList"
4511	//   },
4512	//   "scopes": [
4513	//     "https://www.googleapis.com/auth/drive.apps.readonly"
4514	//   ]
4515	// }
4516
4517}
4518
4519// method id "drive.changes.get":
4520
4521type ChangesGetCall struct {
4522	s            *Service
4523	changeId     string
4524	urlParams_   gensupport.URLParams
4525	ifNoneMatch_ string
4526	ctx_         context.Context
4527	header_      http.Header
4528}
4529
4530// Get: Deprecated - Use changes.getStartPageToken and changes.list to
4531// retrieve recent changes.
4532//
4533// - changeId: The ID of the change.
4534func (r *ChangesService) Get(changeId string) *ChangesGetCall {
4535	c := &ChangesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
4536	c.changeId = changeId
4537	return c
4538}
4539
4540// DriveId sets the optional parameter "driveId": The shared drive from
4541// which the change is returned.
4542func (c *ChangesGetCall) DriveId(driveId string) *ChangesGetCall {
4543	c.urlParams_.Set("driveId", driveId)
4544	return c
4545}
4546
4547// SupportsAllDrives sets the optional parameter "supportsAllDrives":
4548// Whether the requesting application supports both My Drives and shared
4549// drives.
4550func (c *ChangesGetCall) SupportsAllDrives(supportsAllDrives bool) *ChangesGetCall {
4551	c.urlParams_.Set("supportsAllDrives", fmt.Sprint(supportsAllDrives))
4552	return c
4553}
4554
4555// SupportsTeamDrives sets the optional parameter "supportsTeamDrives":
4556// Deprecated use supportsAllDrives instead.
4557func (c *ChangesGetCall) SupportsTeamDrives(supportsTeamDrives bool) *ChangesGetCall {
4558	c.urlParams_.Set("supportsTeamDrives", fmt.Sprint(supportsTeamDrives))
4559	return c
4560}
4561
4562// TeamDriveId sets the optional parameter "teamDriveId": Deprecated use
4563// driveId instead.
4564func (c *ChangesGetCall) TeamDriveId(teamDriveId string) *ChangesGetCall {
4565	c.urlParams_.Set("teamDriveId", teamDriveId)
4566	return c
4567}
4568
4569// Fields allows partial responses to be retrieved. See
4570// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
4571// for more information.
4572func (c *ChangesGetCall) Fields(s ...googleapi.Field) *ChangesGetCall {
4573	c.urlParams_.Set("fields", googleapi.CombineFields(s))
4574	return c
4575}
4576
4577// IfNoneMatch sets the optional parameter which makes the operation
4578// fail if the object's ETag matches the given value. This is useful for
4579// getting updates only after the object has changed since the last
4580// request. Use googleapi.IsNotModified to check whether the response
4581// error from Do is the result of In-None-Match.
4582func (c *ChangesGetCall) IfNoneMatch(entityTag string) *ChangesGetCall {
4583	c.ifNoneMatch_ = entityTag
4584	return c
4585}
4586
4587// Context sets the context to be used in this call's Do method. Any
4588// pending HTTP request will be aborted if the provided context is
4589// canceled.
4590func (c *ChangesGetCall) Context(ctx context.Context) *ChangesGetCall {
4591	c.ctx_ = ctx
4592	return c
4593}
4594
4595// Header returns an http.Header that can be modified by the caller to
4596// add HTTP headers to the request.
4597func (c *ChangesGetCall) Header() http.Header {
4598	if c.header_ == nil {
4599		c.header_ = make(http.Header)
4600	}
4601	return c.header_
4602}
4603
4604func (c *ChangesGetCall) doRequest(alt string) (*http.Response, error) {
4605	reqHeaders := make(http.Header)
4606	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210830")
4607	for k, v := range c.header_ {
4608		reqHeaders[k] = v
4609	}
4610	reqHeaders.Set("User-Agent", c.s.userAgent())
4611	if c.ifNoneMatch_ != "" {
4612		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
4613	}
4614	var body io.Reader = nil
4615	c.urlParams_.Set("alt", alt)
4616	c.urlParams_.Set("prettyPrint", "false")
4617	urls := googleapi.ResolveRelative(c.s.BasePath, "changes/{changeId}")
4618	urls += "?" + c.urlParams_.Encode()
4619	req, err := http.NewRequest("GET", urls, body)
4620	if err != nil {
4621		return nil, err
4622	}
4623	req.Header = reqHeaders
4624	googleapi.Expand(req.URL, map[string]string{
4625		"changeId": c.changeId,
4626	})
4627	return gensupport.SendRequest(c.ctx_, c.s.client, req)
4628}
4629
4630// Do executes the "drive.changes.get" call.
4631// Exactly one of *Change or error will be non-nil. Any non-2xx status
4632// code is an error. Response headers are in either
4633// *Change.ServerResponse.Header or (if a response was returned at all)
4634// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
4635// check whether the returned error was because http.StatusNotModified
4636// was returned.
4637func (c *ChangesGetCall) Do(opts ...googleapi.CallOption) (*Change, error) {
4638	gensupport.SetOptions(c.urlParams_, opts...)
4639	res, err := c.doRequest("json")
4640	if res != nil && res.StatusCode == http.StatusNotModified {
4641		if res.Body != nil {
4642			res.Body.Close()
4643		}
4644		return nil, &googleapi.Error{
4645			Code:   res.StatusCode,
4646			Header: res.Header,
4647		}
4648	}
4649	if err != nil {
4650		return nil, err
4651	}
4652	defer googleapi.CloseBody(res)
4653	if err := googleapi.CheckResponse(res); err != nil {
4654		return nil, err
4655	}
4656	ret := &Change{
4657		ServerResponse: googleapi.ServerResponse{
4658			Header:         res.Header,
4659			HTTPStatusCode: res.StatusCode,
4660		},
4661	}
4662	target := &ret
4663	if err := gensupport.DecodeResponse(target, res); err != nil {
4664		return nil, err
4665	}
4666	return ret, nil
4667	// {
4668	//   "description": "Deprecated - Use changes.getStartPageToken and changes.list to retrieve recent changes.",
4669	//   "httpMethod": "GET",
4670	//   "id": "drive.changes.get",
4671	//   "parameterOrder": [
4672	//     "changeId"
4673	//   ],
4674	//   "parameters": {
4675	//     "changeId": {
4676	//       "description": "The ID of the change.",
4677	//       "location": "path",
4678	//       "required": true,
4679	//       "type": "string"
4680	//     },
4681	//     "driveId": {
4682	//       "description": "The shared drive from which the change is returned.",
4683	//       "location": "query",
4684	//       "type": "string"
4685	//     },
4686	//     "supportsAllDrives": {
4687	//       "default": "false",
4688	//       "description": "Whether the requesting application supports both My Drives and shared drives.",
4689	//       "location": "query",
4690	//       "type": "boolean"
4691	//     },
4692	//     "supportsTeamDrives": {
4693	//       "default": "false",
4694	//       "description": "Deprecated use supportsAllDrives instead.",
4695	//       "location": "query",
4696	//       "type": "boolean"
4697	//     },
4698	//     "teamDriveId": {
4699	//       "description": "Deprecated use driveId instead.",
4700	//       "location": "query",
4701	//       "type": "string"
4702	//     }
4703	//   },
4704	//   "path": "changes/{changeId}",
4705	//   "response": {
4706	//     "$ref": "Change"
4707	//   },
4708	//   "scopes": [
4709	//     "https://www.googleapis.com/auth/drive",
4710	//     "https://www.googleapis.com/auth/drive.appdata",
4711	//     "https://www.googleapis.com/auth/drive.apps.readonly",
4712	//     "https://www.googleapis.com/auth/drive.file",
4713	//     "https://www.googleapis.com/auth/drive.metadata",
4714	//     "https://www.googleapis.com/auth/drive.metadata.readonly",
4715	//     "https://www.googleapis.com/auth/drive.photos.readonly",
4716	//     "https://www.googleapis.com/auth/drive.readonly"
4717	//   ]
4718	// }
4719
4720}
4721
4722// method id "drive.changes.getStartPageToken":
4723
4724type ChangesGetStartPageTokenCall struct {
4725	s            *Service
4726	urlParams_   gensupport.URLParams
4727	ifNoneMatch_ string
4728	ctx_         context.Context
4729	header_      http.Header
4730}
4731
4732// GetStartPageToken: Gets the starting pageToken for listing future
4733// changes.
4734func (r *ChangesService) GetStartPageToken() *ChangesGetStartPageTokenCall {
4735	c := &ChangesGetStartPageTokenCall{s: r.s, urlParams_: make(gensupport.URLParams)}
4736	return c
4737}
4738
4739// DriveId sets the optional parameter "driveId": The ID of the shared
4740// drive for which the starting pageToken for listing future changes
4741// from that shared drive is returned.
4742func (c *ChangesGetStartPageTokenCall) DriveId(driveId string) *ChangesGetStartPageTokenCall {
4743	c.urlParams_.Set("driveId", driveId)
4744	return c
4745}
4746
4747// SupportsAllDrives sets the optional parameter "supportsAllDrives":
4748// Whether the requesting application supports both My Drives and shared
4749// drives.
4750func (c *ChangesGetStartPageTokenCall) SupportsAllDrives(supportsAllDrives bool) *ChangesGetStartPageTokenCall {
4751	c.urlParams_.Set("supportsAllDrives", fmt.Sprint(supportsAllDrives))
4752	return c
4753}
4754
4755// SupportsTeamDrives sets the optional parameter "supportsTeamDrives":
4756// Deprecated use supportsAllDrives instead.
4757func (c *ChangesGetStartPageTokenCall) SupportsTeamDrives(supportsTeamDrives bool) *ChangesGetStartPageTokenCall {
4758	c.urlParams_.Set("supportsTeamDrives", fmt.Sprint(supportsTeamDrives))
4759	return c
4760}
4761
4762// TeamDriveId sets the optional parameter "teamDriveId": Deprecated use
4763// driveId instead.
4764func (c *ChangesGetStartPageTokenCall) TeamDriveId(teamDriveId string) *ChangesGetStartPageTokenCall {
4765	c.urlParams_.Set("teamDriveId", teamDriveId)
4766	return c
4767}
4768
4769// Fields allows partial responses to be retrieved. See
4770// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
4771// for more information.
4772func (c *ChangesGetStartPageTokenCall) Fields(s ...googleapi.Field) *ChangesGetStartPageTokenCall {
4773	c.urlParams_.Set("fields", googleapi.CombineFields(s))
4774	return c
4775}
4776
4777// IfNoneMatch sets the optional parameter which makes the operation
4778// fail if the object's ETag matches the given value. This is useful for
4779// getting updates only after the object has changed since the last
4780// request. Use googleapi.IsNotModified to check whether the response
4781// error from Do is the result of In-None-Match.
4782func (c *ChangesGetStartPageTokenCall) IfNoneMatch(entityTag string) *ChangesGetStartPageTokenCall {
4783	c.ifNoneMatch_ = entityTag
4784	return c
4785}
4786
4787// Context sets the context to be used in this call's Do method. Any
4788// pending HTTP request will be aborted if the provided context is
4789// canceled.
4790func (c *ChangesGetStartPageTokenCall) Context(ctx context.Context) *ChangesGetStartPageTokenCall {
4791	c.ctx_ = ctx
4792	return c
4793}
4794
4795// Header returns an http.Header that can be modified by the caller to
4796// add HTTP headers to the request.
4797func (c *ChangesGetStartPageTokenCall) Header() http.Header {
4798	if c.header_ == nil {
4799		c.header_ = make(http.Header)
4800	}
4801	return c.header_
4802}
4803
4804func (c *ChangesGetStartPageTokenCall) doRequest(alt string) (*http.Response, error) {
4805	reqHeaders := make(http.Header)
4806	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210830")
4807	for k, v := range c.header_ {
4808		reqHeaders[k] = v
4809	}
4810	reqHeaders.Set("User-Agent", c.s.userAgent())
4811	if c.ifNoneMatch_ != "" {
4812		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
4813	}
4814	var body io.Reader = nil
4815	c.urlParams_.Set("alt", alt)
4816	c.urlParams_.Set("prettyPrint", "false")
4817	urls := googleapi.ResolveRelative(c.s.BasePath, "changes/startPageToken")
4818	urls += "?" + c.urlParams_.Encode()
4819	req, err := http.NewRequest("GET", urls, body)
4820	if err != nil {
4821		return nil, err
4822	}
4823	req.Header = reqHeaders
4824	return gensupport.SendRequest(c.ctx_, c.s.client, req)
4825}
4826
4827// Do executes the "drive.changes.getStartPageToken" call.
4828// Exactly one of *StartPageToken or error will be non-nil. Any non-2xx
4829// status code is an error. Response headers are in either
4830// *StartPageToken.ServerResponse.Header or (if a response was returned
4831// at all) in error.(*googleapi.Error).Header. Use
4832// googleapi.IsNotModified to check whether the returned error was
4833// because http.StatusNotModified was returned.
4834func (c *ChangesGetStartPageTokenCall) Do(opts ...googleapi.CallOption) (*StartPageToken, error) {
4835	gensupport.SetOptions(c.urlParams_, opts...)
4836	res, err := c.doRequest("json")
4837	if res != nil && res.StatusCode == http.StatusNotModified {
4838		if res.Body != nil {
4839			res.Body.Close()
4840		}
4841		return nil, &googleapi.Error{
4842			Code:   res.StatusCode,
4843			Header: res.Header,
4844		}
4845	}
4846	if err != nil {
4847		return nil, err
4848	}
4849	defer googleapi.CloseBody(res)
4850	if err := googleapi.CheckResponse(res); err != nil {
4851		return nil, err
4852	}
4853	ret := &StartPageToken{
4854		ServerResponse: googleapi.ServerResponse{
4855			Header:         res.Header,
4856			HTTPStatusCode: res.StatusCode,
4857		},
4858	}
4859	target := &ret
4860	if err := gensupport.DecodeResponse(target, res); err != nil {
4861		return nil, err
4862	}
4863	return ret, nil
4864	// {
4865	//   "description": "Gets the starting pageToken for listing future changes.",
4866	//   "httpMethod": "GET",
4867	//   "id": "drive.changes.getStartPageToken",
4868	//   "parameters": {
4869	//     "driveId": {
4870	//       "description": "The ID of the shared drive for which the starting pageToken for listing future changes from that shared drive is returned.",
4871	//       "location": "query",
4872	//       "type": "string"
4873	//     },
4874	//     "supportsAllDrives": {
4875	//       "default": "false",
4876	//       "description": "Whether the requesting application supports both My Drives and shared drives.",
4877	//       "location": "query",
4878	//       "type": "boolean"
4879	//     },
4880	//     "supportsTeamDrives": {
4881	//       "default": "false",
4882	//       "description": "Deprecated use supportsAllDrives instead.",
4883	//       "location": "query",
4884	//       "type": "boolean"
4885	//     },
4886	//     "teamDriveId": {
4887	//       "description": "Deprecated use driveId instead.",
4888	//       "location": "query",
4889	//       "type": "string"
4890	//     }
4891	//   },
4892	//   "path": "changes/startPageToken",
4893	//   "response": {
4894	//     "$ref": "StartPageToken"
4895	//   },
4896	//   "scopes": [
4897	//     "https://www.googleapis.com/auth/drive",
4898	//     "https://www.googleapis.com/auth/drive.appdata",
4899	//     "https://www.googleapis.com/auth/drive.apps.readonly",
4900	//     "https://www.googleapis.com/auth/drive.file",
4901	//     "https://www.googleapis.com/auth/drive.metadata",
4902	//     "https://www.googleapis.com/auth/drive.metadata.readonly",
4903	//     "https://www.googleapis.com/auth/drive.photos.readonly",
4904	//     "https://www.googleapis.com/auth/drive.readonly"
4905	//   ]
4906	// }
4907
4908}
4909
4910// method id "drive.changes.list":
4911
4912type ChangesListCall struct {
4913	s            *Service
4914	urlParams_   gensupport.URLParams
4915	ifNoneMatch_ string
4916	ctx_         context.Context
4917	header_      http.Header
4918}
4919
4920// List: Lists the changes for a user or shared drive.
4921func (r *ChangesService) List() *ChangesListCall {
4922	c := &ChangesListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
4923	return c
4924}
4925
4926// DriveId sets the optional parameter "driveId": The shared drive from
4927// which changes are returned. If specified the change IDs will be
4928// reflective of the shared drive; use the combined drive ID and change
4929// ID as an identifier.
4930func (c *ChangesListCall) DriveId(driveId string) *ChangesListCall {
4931	c.urlParams_.Set("driveId", driveId)
4932	return c
4933}
4934
4935// IncludeCorpusRemovals sets the optional parameter
4936// "includeCorpusRemovals": Whether changes should include the file
4937// resource if the file is still accessible by the user at the time of
4938// the request, even when a file was removed from the list of changes
4939// and there will be no further change entries for this file.
4940func (c *ChangesListCall) IncludeCorpusRemovals(includeCorpusRemovals bool) *ChangesListCall {
4941	c.urlParams_.Set("includeCorpusRemovals", fmt.Sprint(includeCorpusRemovals))
4942	return c
4943}
4944
4945// IncludeDeleted sets the optional parameter "includeDeleted": Whether
4946// to include changes indicating that items have been removed from the
4947// list of changes, for example by deletion or loss of access.
4948func (c *ChangesListCall) IncludeDeleted(includeDeleted bool) *ChangesListCall {
4949	c.urlParams_.Set("includeDeleted", fmt.Sprint(includeDeleted))
4950	return c
4951}
4952
4953// IncludeItemsFromAllDrives sets the optional parameter
4954// "includeItemsFromAllDrives": Whether both My Drive and shared drive
4955// items should be included in results.
4956func (c *ChangesListCall) IncludeItemsFromAllDrives(includeItemsFromAllDrives bool) *ChangesListCall {
4957	c.urlParams_.Set("includeItemsFromAllDrives", fmt.Sprint(includeItemsFromAllDrives))
4958	return c
4959}
4960
4961// IncludePermissionsForView sets the optional parameter
4962// "includePermissionsForView": Specifies which additional view's
4963// permissions to include in the response. Only 'published' is
4964// supported.
4965func (c *ChangesListCall) IncludePermissionsForView(includePermissionsForView string) *ChangesListCall {
4966	c.urlParams_.Set("includePermissionsForView", includePermissionsForView)
4967	return c
4968}
4969
4970// IncludeSubscribed sets the optional parameter "includeSubscribed":
4971// Whether to include changes outside the My Drive hierarchy in the
4972// result. When set to false, changes to files such as those in the
4973// Application Data folder or shared files which have not been added to
4974// My Drive are omitted from the result.
4975func (c *ChangesListCall) IncludeSubscribed(includeSubscribed bool) *ChangesListCall {
4976	c.urlParams_.Set("includeSubscribed", fmt.Sprint(includeSubscribed))
4977	return c
4978}
4979
4980// IncludeTeamDriveItems sets the optional parameter
4981// "includeTeamDriveItems": Deprecated use includeItemsFromAllDrives
4982// instead.
4983func (c *ChangesListCall) IncludeTeamDriveItems(includeTeamDriveItems bool) *ChangesListCall {
4984	c.urlParams_.Set("includeTeamDriveItems", fmt.Sprint(includeTeamDriveItems))
4985	return c
4986}
4987
4988// MaxResults sets the optional parameter "maxResults": Maximum number
4989// of changes to return.
4990func (c *ChangesListCall) MaxResults(maxResults int64) *ChangesListCall {
4991	c.urlParams_.Set("maxResults", fmt.Sprint(maxResults))
4992	return c
4993}
4994
4995// PageToken sets the optional parameter "pageToken": The token for
4996// continuing a previous list request on the next page. This should be
4997// set to the value of 'nextPageToken' from the previous response or to
4998// the response from the getStartPageToken method.
4999func (c *ChangesListCall) PageToken(pageToken string) *ChangesListCall {
5000	c.urlParams_.Set("pageToken", pageToken)
5001	return c
5002}
5003
5004// Spaces sets the optional parameter "spaces": A comma-separated list
5005// of spaces to query. Supported values are 'drive', 'appDataFolder' and
5006// 'photos'.
5007func (c *ChangesListCall) Spaces(spaces string) *ChangesListCall {
5008	c.urlParams_.Set("spaces", spaces)
5009	return c
5010}
5011
5012// StartChangeId sets the optional parameter "startChangeId": Deprecated
5013// - use pageToken instead.
5014func (c *ChangesListCall) StartChangeId(startChangeId int64) *ChangesListCall {
5015	c.urlParams_.Set("startChangeId", fmt.Sprint(startChangeId))
5016	return c
5017}
5018
5019// SupportsAllDrives sets the optional parameter "supportsAllDrives":
5020// Whether the requesting application supports both My Drives and shared
5021// drives.
5022func (c *ChangesListCall) SupportsAllDrives(supportsAllDrives bool) *ChangesListCall {
5023	c.urlParams_.Set("supportsAllDrives", fmt.Sprint(supportsAllDrives))
5024	return c
5025}
5026
5027// SupportsTeamDrives sets the optional parameter "supportsTeamDrives":
5028// Deprecated use supportsAllDrives instead.
5029func (c *ChangesListCall) SupportsTeamDrives(supportsTeamDrives bool) *ChangesListCall {
5030	c.urlParams_.Set("supportsTeamDrives", fmt.Sprint(supportsTeamDrives))
5031	return c
5032}
5033
5034// TeamDriveId sets the optional parameter "teamDriveId": Deprecated use
5035// driveId instead.
5036func (c *ChangesListCall) TeamDriveId(teamDriveId string) *ChangesListCall {
5037	c.urlParams_.Set("teamDriveId", teamDriveId)
5038	return c
5039}
5040
5041// Fields allows partial responses to be retrieved. See
5042// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
5043// for more information.
5044func (c *ChangesListCall) Fields(s ...googleapi.Field) *ChangesListCall {
5045	c.urlParams_.Set("fields", googleapi.CombineFields(s))
5046	return c
5047}
5048
5049// IfNoneMatch sets the optional parameter which makes the operation
5050// fail if the object's ETag matches the given value. This is useful for
5051// getting updates only after the object has changed since the last
5052// request. Use googleapi.IsNotModified to check whether the response
5053// error from Do is the result of In-None-Match.
5054func (c *ChangesListCall) IfNoneMatch(entityTag string) *ChangesListCall {
5055	c.ifNoneMatch_ = entityTag
5056	return c
5057}
5058
5059// Context sets the context to be used in this call's Do method. Any
5060// pending HTTP request will be aborted if the provided context is
5061// canceled.
5062func (c *ChangesListCall) Context(ctx context.Context) *ChangesListCall {
5063	c.ctx_ = ctx
5064	return c
5065}
5066
5067// Header returns an http.Header that can be modified by the caller to
5068// add HTTP headers to the request.
5069func (c *ChangesListCall) Header() http.Header {
5070	if c.header_ == nil {
5071		c.header_ = make(http.Header)
5072	}
5073	return c.header_
5074}
5075
5076func (c *ChangesListCall) doRequest(alt string) (*http.Response, error) {
5077	reqHeaders := make(http.Header)
5078	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210830")
5079	for k, v := range c.header_ {
5080		reqHeaders[k] = v
5081	}
5082	reqHeaders.Set("User-Agent", c.s.userAgent())
5083	if c.ifNoneMatch_ != "" {
5084		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
5085	}
5086	var body io.Reader = nil
5087	c.urlParams_.Set("alt", alt)
5088	c.urlParams_.Set("prettyPrint", "false")
5089	urls := googleapi.ResolveRelative(c.s.BasePath, "changes")
5090	urls += "?" + c.urlParams_.Encode()
5091	req, err := http.NewRequest("GET", urls, body)
5092	if err != nil {
5093		return nil, err
5094	}
5095	req.Header = reqHeaders
5096	return gensupport.SendRequest(c.ctx_, c.s.client, req)
5097}
5098
5099// Do executes the "drive.changes.list" call.
5100// Exactly one of *ChangeList or error will be non-nil. Any non-2xx
5101// status code is an error. Response headers are in either
5102// *ChangeList.ServerResponse.Header or (if a response was returned at
5103// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
5104// to check whether the returned error was because
5105// http.StatusNotModified was returned.
5106func (c *ChangesListCall) Do(opts ...googleapi.CallOption) (*ChangeList, error) {
5107	gensupport.SetOptions(c.urlParams_, opts...)
5108	res, err := c.doRequest("json")
5109	if res != nil && res.StatusCode == http.StatusNotModified {
5110		if res.Body != nil {
5111			res.Body.Close()
5112		}
5113		return nil, &googleapi.Error{
5114			Code:   res.StatusCode,
5115			Header: res.Header,
5116		}
5117	}
5118	if err != nil {
5119		return nil, err
5120	}
5121	defer googleapi.CloseBody(res)
5122	if err := googleapi.CheckResponse(res); err != nil {
5123		return nil, err
5124	}
5125	ret := &ChangeList{
5126		ServerResponse: googleapi.ServerResponse{
5127			Header:         res.Header,
5128			HTTPStatusCode: res.StatusCode,
5129		},
5130	}
5131	target := &ret
5132	if err := gensupport.DecodeResponse(target, res); err != nil {
5133		return nil, err
5134	}
5135	return ret, nil
5136	// {
5137	//   "description": "Lists the changes for a user or shared drive.",
5138	//   "httpMethod": "GET",
5139	//   "id": "drive.changes.list",
5140	//   "parameters": {
5141	//     "driveId": {
5142	//       "description": "The shared drive from which changes are returned. If specified the change IDs will be reflective of the shared drive; use the combined drive ID and change ID as an identifier.",
5143	//       "location": "query",
5144	//       "type": "string"
5145	//     },
5146	//     "includeCorpusRemovals": {
5147	//       "default": "false",
5148	//       "description": "Whether changes should include the file resource if the file is still accessible by the user at the time of the request, even when a file was removed from the list of changes and there will be no further change entries for this file.",
5149	//       "location": "query",
5150	//       "type": "boolean"
5151	//     },
5152	//     "includeDeleted": {
5153	//       "default": "true",
5154	//       "description": "Whether to include changes indicating that items have been removed from the list of changes, for example by deletion or loss of access.",
5155	//       "location": "query",
5156	//       "type": "boolean"
5157	//     },
5158	//     "includeItemsFromAllDrives": {
5159	//       "default": "false",
5160	//       "description": "Whether both My Drive and shared drive items should be included in results.",
5161	//       "location": "query",
5162	//       "type": "boolean"
5163	//     },
5164	//     "includePermissionsForView": {
5165	//       "description": "Specifies which additional view's permissions to include in the response. Only 'published' is supported.",
5166	//       "location": "query",
5167	//       "type": "string"
5168	//     },
5169	//     "includeSubscribed": {
5170	//       "default": "true",
5171	//       "description": "Whether to include changes outside the My Drive hierarchy in the result. When set to false, changes to files such as those in the Application Data folder or shared files which have not been added to My Drive are omitted from the result.",
5172	//       "location": "query",
5173	//       "type": "boolean"
5174	//     },
5175	//     "includeTeamDriveItems": {
5176	//       "default": "false",
5177	//       "description": "Deprecated use includeItemsFromAllDrives instead.",
5178	//       "location": "query",
5179	//       "type": "boolean"
5180	//     },
5181	//     "maxResults": {
5182	//       "default": "100",
5183	//       "description": "Maximum number of changes to return.",
5184	//       "format": "int32",
5185	//       "location": "query",
5186	//       "minimum": "1",
5187	//       "type": "integer"
5188	//     },
5189	//     "pageToken": {
5190	//       "description": "The token for continuing a previous list request on the next page. This should be set to the value of 'nextPageToken' from the previous response or to the response from the getStartPageToken method.",
5191	//       "location": "query",
5192	//       "type": "string"
5193	//     },
5194	//     "spaces": {
5195	//       "description": "A comma-separated list of spaces to query. Supported values are 'drive', 'appDataFolder' and 'photos'.",
5196	//       "location": "query",
5197	//       "type": "string"
5198	//     },
5199	//     "startChangeId": {
5200	//       "description": "Deprecated - use pageToken instead.",
5201	//       "format": "int64",
5202	//       "location": "query",
5203	//       "type": "string"
5204	//     },
5205	//     "supportsAllDrives": {
5206	//       "default": "false",
5207	//       "description": "Whether the requesting application supports both My Drives and shared drives.",
5208	//       "location": "query",
5209	//       "type": "boolean"
5210	//     },
5211	//     "supportsTeamDrives": {
5212	//       "default": "false",
5213	//       "description": "Deprecated use supportsAllDrives instead.",
5214	//       "location": "query",
5215	//       "type": "boolean"
5216	//     },
5217	//     "teamDriveId": {
5218	//       "description": "Deprecated use driveId instead.",
5219	//       "location": "query",
5220	//       "type": "string"
5221	//     }
5222	//   },
5223	//   "path": "changes",
5224	//   "response": {
5225	//     "$ref": "ChangeList"
5226	//   },
5227	//   "scopes": [
5228	//     "https://www.googleapis.com/auth/drive",
5229	//     "https://www.googleapis.com/auth/drive.appdata",
5230	//     "https://www.googleapis.com/auth/drive.apps.readonly",
5231	//     "https://www.googleapis.com/auth/drive.file",
5232	//     "https://www.googleapis.com/auth/drive.metadata",
5233	//     "https://www.googleapis.com/auth/drive.metadata.readonly",
5234	//     "https://www.googleapis.com/auth/drive.photos.readonly",
5235	//     "https://www.googleapis.com/auth/drive.readonly"
5236	//   ],
5237	//   "supportsSubscription": true
5238	// }
5239
5240}
5241
5242// Pages invokes f for each page of results.
5243// A non-nil error returned from f will halt the iteration.
5244// The provided context supersedes any context provided to the Context method.
5245func (c *ChangesListCall) Pages(ctx context.Context, f func(*ChangeList) error) error {
5246	c.ctx_ = ctx
5247	defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
5248	for {
5249		x, err := c.Do()
5250		if err != nil {
5251			return err
5252		}
5253		if err := f(x); err != nil {
5254			return err
5255		}
5256		if x.NextPageToken == "" {
5257			return nil
5258		}
5259		c.PageToken(x.NextPageToken)
5260	}
5261}
5262
5263// method id "drive.changes.watch":
5264
5265type ChangesWatchCall struct {
5266	s          *Service
5267	channel    *Channel
5268	urlParams_ gensupport.URLParams
5269	ctx_       context.Context
5270	header_    http.Header
5271}
5272
5273// Watch: Subscribe to changes for a user.
5274func (r *ChangesService) Watch(channel *Channel) *ChangesWatchCall {
5275	c := &ChangesWatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
5276	c.channel = channel
5277	return c
5278}
5279
5280// DriveId sets the optional parameter "driveId": The shared drive from
5281// which changes are returned. If specified the change IDs will be
5282// reflective of the shared drive; use the combined drive ID and change
5283// ID as an identifier.
5284func (c *ChangesWatchCall) DriveId(driveId string) *ChangesWatchCall {
5285	c.urlParams_.Set("driveId", driveId)
5286	return c
5287}
5288
5289// IncludeCorpusRemovals sets the optional parameter
5290// "includeCorpusRemovals": Whether changes should include the file
5291// resource if the file is still accessible by the user at the time of
5292// the request, even when a file was removed from the list of changes
5293// and there will be no further change entries for this file.
5294func (c *ChangesWatchCall) IncludeCorpusRemovals(includeCorpusRemovals bool) *ChangesWatchCall {
5295	c.urlParams_.Set("includeCorpusRemovals", fmt.Sprint(includeCorpusRemovals))
5296	return c
5297}
5298
5299// IncludeDeleted sets the optional parameter "includeDeleted": Whether
5300// to include changes indicating that items have been removed from the
5301// list of changes, for example by deletion or loss of access.
5302func (c *ChangesWatchCall) IncludeDeleted(includeDeleted bool) *ChangesWatchCall {
5303	c.urlParams_.Set("includeDeleted", fmt.Sprint(includeDeleted))
5304	return c
5305}
5306
5307// IncludeItemsFromAllDrives sets the optional parameter
5308// "includeItemsFromAllDrives": Whether both My Drive and shared drive
5309// items should be included in results.
5310func (c *ChangesWatchCall) IncludeItemsFromAllDrives(includeItemsFromAllDrives bool) *ChangesWatchCall {
5311	c.urlParams_.Set("includeItemsFromAllDrives", fmt.Sprint(includeItemsFromAllDrives))
5312	return c
5313}
5314
5315// IncludePermissionsForView sets the optional parameter
5316// "includePermissionsForView": Specifies which additional view's
5317// permissions to include in the response. Only 'published' is
5318// supported.
5319func (c *ChangesWatchCall) IncludePermissionsForView(includePermissionsForView string) *ChangesWatchCall {
5320	c.urlParams_.Set("includePermissionsForView", includePermissionsForView)
5321	return c
5322}
5323
5324// IncludeSubscribed sets the optional parameter "includeSubscribed":
5325// Whether to include changes outside the My Drive hierarchy in the
5326// result. When set to false, changes to files such as those in the
5327// Application Data folder or shared files which have not been added to
5328// My Drive are omitted from the result.
5329func (c *ChangesWatchCall) IncludeSubscribed(includeSubscribed bool) *ChangesWatchCall {
5330	c.urlParams_.Set("includeSubscribed", fmt.Sprint(includeSubscribed))
5331	return c
5332}
5333
5334// IncludeTeamDriveItems sets the optional parameter
5335// "includeTeamDriveItems": Deprecated use includeItemsFromAllDrives
5336// instead.
5337func (c *ChangesWatchCall) IncludeTeamDriveItems(includeTeamDriveItems bool) *ChangesWatchCall {
5338	c.urlParams_.Set("includeTeamDriveItems", fmt.Sprint(includeTeamDriveItems))
5339	return c
5340}
5341
5342// MaxResults sets the optional parameter "maxResults": Maximum number
5343// of changes to return.
5344func (c *ChangesWatchCall) MaxResults(maxResults int64) *ChangesWatchCall {
5345	c.urlParams_.Set("maxResults", fmt.Sprint(maxResults))
5346	return c
5347}
5348
5349// PageToken sets the optional parameter "pageToken": The token for
5350// continuing a previous list request on the next page. This should be
5351// set to the value of 'nextPageToken' from the previous response or to
5352// the response from the getStartPageToken method.
5353func (c *ChangesWatchCall) PageToken(pageToken string) *ChangesWatchCall {
5354	c.urlParams_.Set("pageToken", pageToken)
5355	return c
5356}
5357
5358// Spaces sets the optional parameter "spaces": A comma-separated list
5359// of spaces to query. Supported values are 'drive', 'appDataFolder' and
5360// 'photos'.
5361func (c *ChangesWatchCall) Spaces(spaces string) *ChangesWatchCall {
5362	c.urlParams_.Set("spaces", spaces)
5363	return c
5364}
5365
5366// StartChangeId sets the optional parameter "startChangeId": Deprecated
5367// - use pageToken instead.
5368func (c *ChangesWatchCall) StartChangeId(startChangeId int64) *ChangesWatchCall {
5369	c.urlParams_.Set("startChangeId", fmt.Sprint(startChangeId))
5370	return c
5371}
5372
5373// SupportsAllDrives sets the optional parameter "supportsAllDrives":
5374// Whether the requesting application supports both My Drives and shared
5375// drives.
5376func (c *ChangesWatchCall) SupportsAllDrives(supportsAllDrives bool) *ChangesWatchCall {
5377	c.urlParams_.Set("supportsAllDrives", fmt.Sprint(supportsAllDrives))
5378	return c
5379}
5380
5381// SupportsTeamDrives sets the optional parameter "supportsTeamDrives":
5382// Deprecated use supportsAllDrives instead.
5383func (c *ChangesWatchCall) SupportsTeamDrives(supportsTeamDrives bool) *ChangesWatchCall {
5384	c.urlParams_.Set("supportsTeamDrives", fmt.Sprint(supportsTeamDrives))
5385	return c
5386}
5387
5388// TeamDriveId sets the optional parameter "teamDriveId": Deprecated use
5389// driveId instead.
5390func (c *ChangesWatchCall) TeamDriveId(teamDriveId string) *ChangesWatchCall {
5391	c.urlParams_.Set("teamDriveId", teamDriveId)
5392	return c
5393}
5394
5395// Fields allows partial responses to be retrieved. See
5396// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
5397// for more information.
5398func (c *ChangesWatchCall) Fields(s ...googleapi.Field) *ChangesWatchCall {
5399	c.urlParams_.Set("fields", googleapi.CombineFields(s))
5400	return c
5401}
5402
5403// Context sets the context to be used in this call's Do method. Any
5404// pending HTTP request will be aborted if the provided context is
5405// canceled.
5406func (c *ChangesWatchCall) Context(ctx context.Context) *ChangesWatchCall {
5407	c.ctx_ = ctx
5408	return c
5409}
5410
5411// Header returns an http.Header that can be modified by the caller to
5412// add HTTP headers to the request.
5413func (c *ChangesWatchCall) Header() http.Header {
5414	if c.header_ == nil {
5415		c.header_ = make(http.Header)
5416	}
5417	return c.header_
5418}
5419
5420func (c *ChangesWatchCall) doRequest(alt string) (*http.Response, error) {
5421	reqHeaders := make(http.Header)
5422	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210830")
5423	for k, v := range c.header_ {
5424		reqHeaders[k] = v
5425	}
5426	reqHeaders.Set("User-Agent", c.s.userAgent())
5427	var body io.Reader = nil
5428	body, err := googleapi.WithoutDataWrapper.JSONReader(c.channel)
5429	if err != nil {
5430		return nil, err
5431	}
5432	reqHeaders.Set("Content-Type", "application/json")
5433	c.urlParams_.Set("alt", alt)
5434	c.urlParams_.Set("prettyPrint", "false")
5435	urls := googleapi.ResolveRelative(c.s.BasePath, "changes/watch")
5436	urls += "?" + c.urlParams_.Encode()
5437	req, err := http.NewRequest("POST", urls, body)
5438	if err != nil {
5439		return nil, err
5440	}
5441	req.Header = reqHeaders
5442	return gensupport.SendRequest(c.ctx_, c.s.client, req)
5443}
5444
5445// Do executes the "drive.changes.watch" call.
5446// Exactly one of *Channel or error will be non-nil. Any non-2xx status
5447// code is an error. Response headers are in either
5448// *Channel.ServerResponse.Header or (if a response was returned at all)
5449// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
5450// check whether the returned error was because http.StatusNotModified
5451// was returned.
5452func (c *ChangesWatchCall) Do(opts ...googleapi.CallOption) (*Channel, error) {
5453	gensupport.SetOptions(c.urlParams_, opts...)
5454	res, err := c.doRequest("json")
5455	if res != nil && res.StatusCode == http.StatusNotModified {
5456		if res.Body != nil {
5457			res.Body.Close()
5458		}
5459		return nil, &googleapi.Error{
5460			Code:   res.StatusCode,
5461			Header: res.Header,
5462		}
5463	}
5464	if err != nil {
5465		return nil, err
5466	}
5467	defer googleapi.CloseBody(res)
5468	if err := googleapi.CheckResponse(res); err != nil {
5469		return nil, err
5470	}
5471	ret := &Channel{
5472		ServerResponse: googleapi.ServerResponse{
5473			Header:         res.Header,
5474			HTTPStatusCode: res.StatusCode,
5475		},
5476	}
5477	target := &ret
5478	if err := gensupport.DecodeResponse(target, res); err != nil {
5479		return nil, err
5480	}
5481	return ret, nil
5482	// {
5483	//   "description": "Subscribe to changes for a user.",
5484	//   "httpMethod": "POST",
5485	//   "id": "drive.changes.watch",
5486	//   "parameters": {
5487	//     "driveId": {
5488	//       "description": "The shared drive from which changes are returned. If specified the change IDs will be reflective of the shared drive; use the combined drive ID and change ID as an identifier.",
5489	//       "location": "query",
5490	//       "type": "string"
5491	//     },
5492	//     "includeCorpusRemovals": {
5493	//       "default": "false",
5494	//       "description": "Whether changes should include the file resource if the file is still accessible by the user at the time of the request, even when a file was removed from the list of changes and there will be no further change entries for this file.",
5495	//       "location": "query",
5496	//       "type": "boolean"
5497	//     },
5498	//     "includeDeleted": {
5499	//       "default": "true",
5500	//       "description": "Whether to include changes indicating that items have been removed from the list of changes, for example by deletion or loss of access.",
5501	//       "location": "query",
5502	//       "type": "boolean"
5503	//     },
5504	//     "includeItemsFromAllDrives": {
5505	//       "default": "false",
5506	//       "description": "Whether both My Drive and shared drive items should be included in results.",
5507	//       "location": "query",
5508	//       "type": "boolean"
5509	//     },
5510	//     "includePermissionsForView": {
5511	//       "description": "Specifies which additional view's permissions to include in the response. Only 'published' is supported.",
5512	//       "location": "query",
5513	//       "type": "string"
5514	//     },
5515	//     "includeSubscribed": {
5516	//       "default": "true",
5517	//       "description": "Whether to include changes outside the My Drive hierarchy in the result. When set to false, changes to files such as those in the Application Data folder or shared files which have not been added to My Drive are omitted from the result.",
5518	//       "location": "query",
5519	//       "type": "boolean"
5520	//     },
5521	//     "includeTeamDriveItems": {
5522	//       "default": "false",
5523	//       "description": "Deprecated use includeItemsFromAllDrives instead.",
5524	//       "location": "query",
5525	//       "type": "boolean"
5526	//     },
5527	//     "maxResults": {
5528	//       "default": "100",
5529	//       "description": "Maximum number of changes to return.",
5530	//       "format": "int32",
5531	//       "location": "query",
5532	//       "minimum": "1",
5533	//       "type": "integer"
5534	//     },
5535	//     "pageToken": {
5536	//       "description": "The token for continuing a previous list request on the next page. This should be set to the value of 'nextPageToken' from the previous response or to the response from the getStartPageToken method.",
5537	//       "location": "query",
5538	//       "type": "string"
5539	//     },
5540	//     "spaces": {
5541	//       "description": "A comma-separated list of spaces to query. Supported values are 'drive', 'appDataFolder' and 'photos'.",
5542	//       "location": "query",
5543	//       "type": "string"
5544	//     },
5545	//     "startChangeId": {
5546	//       "description": "Deprecated - use pageToken instead.",
5547	//       "format": "int64",
5548	//       "location": "query",
5549	//       "type": "string"
5550	//     },
5551	//     "supportsAllDrives": {
5552	//       "default": "false",
5553	//       "description": "Whether the requesting application supports both My Drives and shared drives.",
5554	//       "location": "query",
5555	//       "type": "boolean"
5556	//     },
5557	//     "supportsTeamDrives": {
5558	//       "default": "false",
5559	//       "description": "Deprecated use supportsAllDrives instead.",
5560	//       "location": "query",
5561	//       "type": "boolean"
5562	//     },
5563	//     "teamDriveId": {
5564	//       "description": "Deprecated use driveId instead.",
5565	//       "location": "query",
5566	//       "type": "string"
5567	//     }
5568	//   },
5569	//   "path": "changes/watch",
5570	//   "request": {
5571	//     "$ref": "Channel",
5572	//     "parameterName": "resource"
5573	//   },
5574	//   "response": {
5575	//     "$ref": "Channel"
5576	//   },
5577	//   "scopes": [
5578	//     "https://www.googleapis.com/auth/drive",
5579	//     "https://www.googleapis.com/auth/drive.appdata",
5580	//     "https://www.googleapis.com/auth/drive.apps.readonly",
5581	//     "https://www.googleapis.com/auth/drive.file",
5582	//     "https://www.googleapis.com/auth/drive.metadata",
5583	//     "https://www.googleapis.com/auth/drive.metadata.readonly",
5584	//     "https://www.googleapis.com/auth/drive.photos.readonly",
5585	//     "https://www.googleapis.com/auth/drive.readonly"
5586	//   ],
5587	//   "supportsSubscription": true
5588	// }
5589
5590}
5591
5592// method id "drive.channels.stop":
5593
5594type ChannelsStopCall struct {
5595	s          *Service
5596	channel    *Channel
5597	urlParams_ gensupport.URLParams
5598	ctx_       context.Context
5599	header_    http.Header
5600}
5601
5602// Stop: Stop watching resources through this channel
5603func (r *ChannelsService) Stop(channel *Channel) *ChannelsStopCall {
5604	c := &ChannelsStopCall{s: r.s, urlParams_: make(gensupport.URLParams)}
5605	c.channel = channel
5606	return c
5607}
5608
5609// Fields allows partial responses to be retrieved. See
5610// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
5611// for more information.
5612func (c *ChannelsStopCall) Fields(s ...googleapi.Field) *ChannelsStopCall {
5613	c.urlParams_.Set("fields", googleapi.CombineFields(s))
5614	return c
5615}
5616
5617// Context sets the context to be used in this call's Do method. Any
5618// pending HTTP request will be aborted if the provided context is
5619// canceled.
5620func (c *ChannelsStopCall) Context(ctx context.Context) *ChannelsStopCall {
5621	c.ctx_ = ctx
5622	return c
5623}
5624
5625// Header returns an http.Header that can be modified by the caller to
5626// add HTTP headers to the request.
5627func (c *ChannelsStopCall) Header() http.Header {
5628	if c.header_ == nil {
5629		c.header_ = make(http.Header)
5630	}
5631	return c.header_
5632}
5633
5634func (c *ChannelsStopCall) doRequest(alt string) (*http.Response, error) {
5635	reqHeaders := make(http.Header)
5636	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210830")
5637	for k, v := range c.header_ {
5638		reqHeaders[k] = v
5639	}
5640	reqHeaders.Set("User-Agent", c.s.userAgent())
5641	var body io.Reader = nil
5642	body, err := googleapi.WithoutDataWrapper.JSONReader(c.channel)
5643	if err != nil {
5644		return nil, err
5645	}
5646	reqHeaders.Set("Content-Type", "application/json")
5647	c.urlParams_.Set("alt", alt)
5648	c.urlParams_.Set("prettyPrint", "false")
5649	urls := googleapi.ResolveRelative(c.s.BasePath, "channels/stop")
5650	urls += "?" + c.urlParams_.Encode()
5651	req, err := http.NewRequest("POST", urls, body)
5652	if err != nil {
5653		return nil, err
5654	}
5655	req.Header = reqHeaders
5656	return gensupport.SendRequest(c.ctx_, c.s.client, req)
5657}
5658
5659// Do executes the "drive.channels.stop" call.
5660func (c *ChannelsStopCall) Do(opts ...googleapi.CallOption) error {
5661	gensupport.SetOptions(c.urlParams_, opts...)
5662	res, err := c.doRequest("json")
5663	if err != nil {
5664		return err
5665	}
5666	defer googleapi.CloseBody(res)
5667	if err := googleapi.CheckResponse(res); err != nil {
5668		return err
5669	}
5670	return nil
5671	// {
5672	//   "description": "Stop watching resources through this channel",
5673	//   "httpMethod": "POST",
5674	//   "id": "drive.channels.stop",
5675	//   "path": "channels/stop",
5676	//   "request": {
5677	//     "$ref": "Channel",
5678	//     "parameterName": "resource"
5679	//   },
5680	//   "scopes": [
5681	//     "https://www.googleapis.com/auth/drive",
5682	//     "https://www.googleapis.com/auth/drive.appdata",
5683	//     "https://www.googleapis.com/auth/drive.apps.readonly",
5684	//     "https://www.googleapis.com/auth/drive.file",
5685	//     "https://www.googleapis.com/auth/drive.metadata",
5686	//     "https://www.googleapis.com/auth/drive.metadata.readonly",
5687	//     "https://www.googleapis.com/auth/drive.photos.readonly",
5688	//     "https://www.googleapis.com/auth/drive.readonly"
5689	//   ]
5690	// }
5691
5692}
5693
5694// method id "drive.children.delete":
5695
5696type ChildrenDeleteCall struct {
5697	s          *Service
5698	folderId   string
5699	childId    string
5700	urlParams_ gensupport.URLParams
5701	ctx_       context.Context
5702	header_    http.Header
5703}
5704
5705// Delete: Removes a child from a folder.
5706//
5707// - childId: The ID of the child.
5708// - folderId: The ID of the folder.
5709func (r *ChildrenService) Delete(folderId string, childId string) *ChildrenDeleteCall {
5710	c := &ChildrenDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
5711	c.folderId = folderId
5712	c.childId = childId
5713	return c
5714}
5715
5716// EnforceSingleParent sets the optional parameter
5717// "enforceSingleParent": Deprecated. If an item is not in a shared
5718// drive and its last parent is deleted but the item itself is not, the
5719// item will be placed under its owner's root.
5720func (c *ChildrenDeleteCall) EnforceSingleParent(enforceSingleParent bool) *ChildrenDeleteCall {
5721	c.urlParams_.Set("enforceSingleParent", fmt.Sprint(enforceSingleParent))
5722	return c
5723}
5724
5725// Fields allows partial responses to be retrieved. See
5726// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
5727// for more information.
5728func (c *ChildrenDeleteCall) Fields(s ...googleapi.Field) *ChildrenDeleteCall {
5729	c.urlParams_.Set("fields", googleapi.CombineFields(s))
5730	return c
5731}
5732
5733// Context sets the context to be used in this call's Do method. Any
5734// pending HTTP request will be aborted if the provided context is
5735// canceled.
5736func (c *ChildrenDeleteCall) Context(ctx context.Context) *ChildrenDeleteCall {
5737	c.ctx_ = ctx
5738	return c
5739}
5740
5741// Header returns an http.Header that can be modified by the caller to
5742// add HTTP headers to the request.
5743func (c *ChildrenDeleteCall) Header() http.Header {
5744	if c.header_ == nil {
5745		c.header_ = make(http.Header)
5746	}
5747	return c.header_
5748}
5749
5750func (c *ChildrenDeleteCall) doRequest(alt string) (*http.Response, error) {
5751	reqHeaders := make(http.Header)
5752	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210830")
5753	for k, v := range c.header_ {
5754		reqHeaders[k] = v
5755	}
5756	reqHeaders.Set("User-Agent", c.s.userAgent())
5757	var body io.Reader = nil
5758	c.urlParams_.Set("alt", alt)
5759	c.urlParams_.Set("prettyPrint", "false")
5760	urls := googleapi.ResolveRelative(c.s.BasePath, "files/{folderId}/children/{childId}")
5761	urls += "?" + c.urlParams_.Encode()
5762	req, err := http.NewRequest("DELETE", urls, body)
5763	if err != nil {
5764		return nil, err
5765	}
5766	req.Header = reqHeaders
5767	googleapi.Expand(req.URL, map[string]string{
5768		"folderId": c.folderId,
5769		"childId":  c.childId,
5770	})
5771	return gensupport.SendRequest(c.ctx_, c.s.client, req)
5772}
5773
5774// Do executes the "drive.children.delete" call.
5775func (c *ChildrenDeleteCall) Do(opts ...googleapi.CallOption) error {
5776	gensupport.SetOptions(c.urlParams_, opts...)
5777	res, err := c.doRequest("json")
5778	if err != nil {
5779		return err
5780	}
5781	defer googleapi.CloseBody(res)
5782	if err := googleapi.CheckResponse(res); err != nil {
5783		return err
5784	}
5785	return nil
5786	// {
5787	//   "description": "Removes a child from a folder.",
5788	//   "httpMethod": "DELETE",
5789	//   "id": "drive.children.delete",
5790	//   "parameterOrder": [
5791	//     "folderId",
5792	//     "childId"
5793	//   ],
5794	//   "parameters": {
5795	//     "childId": {
5796	//       "description": "The ID of the child.",
5797	//       "location": "path",
5798	//       "required": true,
5799	//       "type": "string"
5800	//     },
5801	//     "enforceSingleParent": {
5802	//       "default": "false",
5803	//       "description": "Deprecated. If an item is not in a shared drive and its last parent is deleted but the item itself is not, the item will be placed under its owner's root.",
5804	//       "location": "query",
5805	//       "type": "boolean"
5806	//     },
5807	//     "folderId": {
5808	//       "description": "The ID of the folder.",
5809	//       "location": "path",
5810	//       "required": true,
5811	//       "type": "string"
5812	//     }
5813	//   },
5814	//   "path": "files/{folderId}/children/{childId}",
5815	//   "scopes": [
5816	//     "https://www.googleapis.com/auth/drive",
5817	//     "https://www.googleapis.com/auth/drive.file"
5818	//   ]
5819	// }
5820
5821}
5822
5823// method id "drive.children.get":
5824
5825type ChildrenGetCall struct {
5826	s            *Service
5827	folderId     string
5828	childId      string
5829	urlParams_   gensupport.URLParams
5830	ifNoneMatch_ string
5831	ctx_         context.Context
5832	header_      http.Header
5833}
5834
5835// Get: Gets a specific child reference.
5836//
5837// - childId: The ID of the child.
5838// - folderId: The ID of the folder.
5839func (r *ChildrenService) Get(folderId string, childId string) *ChildrenGetCall {
5840	c := &ChildrenGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
5841	c.folderId = folderId
5842	c.childId = childId
5843	return c
5844}
5845
5846// Fields allows partial responses to be retrieved. See
5847// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
5848// for more information.
5849func (c *ChildrenGetCall) Fields(s ...googleapi.Field) *ChildrenGetCall {
5850	c.urlParams_.Set("fields", googleapi.CombineFields(s))
5851	return c
5852}
5853
5854// IfNoneMatch sets the optional parameter which makes the operation
5855// fail if the object's ETag matches the given value. This is useful for
5856// getting updates only after the object has changed since the last
5857// request. Use googleapi.IsNotModified to check whether the response
5858// error from Do is the result of In-None-Match.
5859func (c *ChildrenGetCall) IfNoneMatch(entityTag string) *ChildrenGetCall {
5860	c.ifNoneMatch_ = entityTag
5861	return c
5862}
5863
5864// Context sets the context to be used in this call's Do method. Any
5865// pending HTTP request will be aborted if the provided context is
5866// canceled.
5867func (c *ChildrenGetCall) Context(ctx context.Context) *ChildrenGetCall {
5868	c.ctx_ = ctx
5869	return c
5870}
5871
5872// Header returns an http.Header that can be modified by the caller to
5873// add HTTP headers to the request.
5874func (c *ChildrenGetCall) Header() http.Header {
5875	if c.header_ == nil {
5876		c.header_ = make(http.Header)
5877	}
5878	return c.header_
5879}
5880
5881func (c *ChildrenGetCall) doRequest(alt string) (*http.Response, error) {
5882	reqHeaders := make(http.Header)
5883	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210830")
5884	for k, v := range c.header_ {
5885		reqHeaders[k] = v
5886	}
5887	reqHeaders.Set("User-Agent", c.s.userAgent())
5888	if c.ifNoneMatch_ != "" {
5889		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
5890	}
5891	var body io.Reader = nil
5892	c.urlParams_.Set("alt", alt)
5893	c.urlParams_.Set("prettyPrint", "false")
5894	urls := googleapi.ResolveRelative(c.s.BasePath, "files/{folderId}/children/{childId}")
5895	urls += "?" + c.urlParams_.Encode()
5896	req, err := http.NewRequest("GET", urls, body)
5897	if err != nil {
5898		return nil, err
5899	}
5900	req.Header = reqHeaders
5901	googleapi.Expand(req.URL, map[string]string{
5902		"folderId": c.folderId,
5903		"childId":  c.childId,
5904	})
5905	return gensupport.SendRequest(c.ctx_, c.s.client, req)
5906}
5907
5908// Do executes the "drive.children.get" call.
5909// Exactly one of *ChildReference or error will be non-nil. Any non-2xx
5910// status code is an error. Response headers are in either
5911// *ChildReference.ServerResponse.Header or (if a response was returned
5912// at all) in error.(*googleapi.Error).Header. Use
5913// googleapi.IsNotModified to check whether the returned error was
5914// because http.StatusNotModified was returned.
5915func (c *ChildrenGetCall) Do(opts ...googleapi.CallOption) (*ChildReference, error) {
5916	gensupport.SetOptions(c.urlParams_, opts...)
5917	res, err := c.doRequest("json")
5918	if res != nil && res.StatusCode == http.StatusNotModified {
5919		if res.Body != nil {
5920			res.Body.Close()
5921		}
5922		return nil, &googleapi.Error{
5923			Code:   res.StatusCode,
5924			Header: res.Header,
5925		}
5926	}
5927	if err != nil {
5928		return nil, err
5929	}
5930	defer googleapi.CloseBody(res)
5931	if err := googleapi.CheckResponse(res); err != nil {
5932		return nil, err
5933	}
5934	ret := &ChildReference{
5935		ServerResponse: googleapi.ServerResponse{
5936			Header:         res.Header,
5937			HTTPStatusCode: res.StatusCode,
5938		},
5939	}
5940	target := &ret
5941	if err := gensupport.DecodeResponse(target, res); err != nil {
5942		return nil, err
5943	}
5944	return ret, nil
5945	// {
5946	//   "description": "Gets a specific child reference.",
5947	//   "httpMethod": "GET",
5948	//   "id": "drive.children.get",
5949	//   "parameterOrder": [
5950	//     "folderId",
5951	//     "childId"
5952	//   ],
5953	//   "parameters": {
5954	//     "childId": {
5955	//       "description": "The ID of the child.",
5956	//       "location": "path",
5957	//       "required": true,
5958	//       "type": "string"
5959	//     },
5960	//     "folderId": {
5961	//       "description": "The ID of the folder.",
5962	//       "location": "path",
5963	//       "required": true,
5964	//       "type": "string"
5965	//     }
5966	//   },
5967	//   "path": "files/{folderId}/children/{childId}",
5968	//   "response": {
5969	//     "$ref": "ChildReference"
5970	//   },
5971	//   "scopes": [
5972	//     "https://www.googleapis.com/auth/drive",
5973	//     "https://www.googleapis.com/auth/drive.appdata",
5974	//     "https://www.googleapis.com/auth/drive.file",
5975	//     "https://www.googleapis.com/auth/drive.metadata",
5976	//     "https://www.googleapis.com/auth/drive.metadata.readonly",
5977	//     "https://www.googleapis.com/auth/drive.photos.readonly",
5978	//     "https://www.googleapis.com/auth/drive.readonly"
5979	//   ]
5980	// }
5981
5982}
5983
5984// method id "drive.children.insert":
5985
5986type ChildrenInsertCall struct {
5987	s              *Service
5988	folderId       string
5989	childreference *ChildReference
5990	urlParams_     gensupport.URLParams
5991	ctx_           context.Context
5992	header_        http.Header
5993}
5994
5995// Insert: Inserts a file into a folder.
5996//
5997// - folderId: The ID of the folder.
5998func (r *ChildrenService) Insert(folderId string, childreference *ChildReference) *ChildrenInsertCall {
5999	c := &ChildrenInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)}
6000	c.folderId = folderId
6001	c.childreference = childreference
6002	return c
6003}
6004
6005// EnforceSingleParent sets the optional parameter
6006// "enforceSingleParent": Deprecated. Adding files to multiple folders
6007// is no longer supported. Use shortcuts instead.
6008func (c *ChildrenInsertCall) EnforceSingleParent(enforceSingleParent bool) *ChildrenInsertCall {
6009	c.urlParams_.Set("enforceSingleParent", fmt.Sprint(enforceSingleParent))
6010	return c
6011}
6012
6013// SupportsAllDrives sets the optional parameter "supportsAllDrives":
6014// Whether the requesting application supports both My Drives and shared
6015// drives.
6016func (c *ChildrenInsertCall) SupportsAllDrives(supportsAllDrives bool) *ChildrenInsertCall {
6017	c.urlParams_.Set("supportsAllDrives", fmt.Sprint(supportsAllDrives))
6018	return c
6019}
6020
6021// SupportsTeamDrives sets the optional parameter "supportsTeamDrives":
6022// Deprecated use supportsAllDrives instead.
6023func (c *ChildrenInsertCall) SupportsTeamDrives(supportsTeamDrives bool) *ChildrenInsertCall {
6024	c.urlParams_.Set("supportsTeamDrives", fmt.Sprint(supportsTeamDrives))
6025	return c
6026}
6027
6028// Fields allows partial responses to be retrieved. See
6029// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
6030// for more information.
6031func (c *ChildrenInsertCall) Fields(s ...googleapi.Field) *ChildrenInsertCall {
6032	c.urlParams_.Set("fields", googleapi.CombineFields(s))
6033	return c
6034}
6035
6036// Context sets the context to be used in this call's Do method. Any
6037// pending HTTP request will be aborted if the provided context is
6038// canceled.
6039func (c *ChildrenInsertCall) Context(ctx context.Context) *ChildrenInsertCall {
6040	c.ctx_ = ctx
6041	return c
6042}
6043
6044// Header returns an http.Header that can be modified by the caller to
6045// add HTTP headers to the request.
6046func (c *ChildrenInsertCall) Header() http.Header {
6047	if c.header_ == nil {
6048		c.header_ = make(http.Header)
6049	}
6050	return c.header_
6051}
6052
6053func (c *ChildrenInsertCall) doRequest(alt string) (*http.Response, error) {
6054	reqHeaders := make(http.Header)
6055	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210830")
6056	for k, v := range c.header_ {
6057		reqHeaders[k] = v
6058	}
6059	reqHeaders.Set("User-Agent", c.s.userAgent())
6060	var body io.Reader = nil
6061	body, err := googleapi.WithoutDataWrapper.JSONReader(c.childreference)
6062	if err != nil {
6063		return nil, err
6064	}
6065	reqHeaders.Set("Content-Type", "application/json")
6066	c.urlParams_.Set("alt", alt)
6067	c.urlParams_.Set("prettyPrint", "false")
6068	urls := googleapi.ResolveRelative(c.s.BasePath, "files/{folderId}/children")
6069	urls += "?" + c.urlParams_.Encode()
6070	req, err := http.NewRequest("POST", urls, body)
6071	if err != nil {
6072		return nil, err
6073	}
6074	req.Header = reqHeaders
6075	googleapi.Expand(req.URL, map[string]string{
6076		"folderId": c.folderId,
6077	})
6078	return gensupport.SendRequest(c.ctx_, c.s.client, req)
6079}
6080
6081// Do executes the "drive.children.insert" call.
6082// Exactly one of *ChildReference or error will be non-nil. Any non-2xx
6083// status code is an error. Response headers are in either
6084// *ChildReference.ServerResponse.Header or (if a response was returned
6085// at all) in error.(*googleapi.Error).Header. Use
6086// googleapi.IsNotModified to check whether the returned error was
6087// because http.StatusNotModified was returned.
6088func (c *ChildrenInsertCall) Do(opts ...googleapi.CallOption) (*ChildReference, error) {
6089	gensupport.SetOptions(c.urlParams_, opts...)
6090	res, err := c.doRequest("json")
6091	if res != nil && res.StatusCode == http.StatusNotModified {
6092		if res.Body != nil {
6093			res.Body.Close()
6094		}
6095		return nil, &googleapi.Error{
6096			Code:   res.StatusCode,
6097			Header: res.Header,
6098		}
6099	}
6100	if err != nil {
6101		return nil, err
6102	}
6103	defer googleapi.CloseBody(res)
6104	if err := googleapi.CheckResponse(res); err != nil {
6105		return nil, err
6106	}
6107	ret := &ChildReference{
6108		ServerResponse: googleapi.ServerResponse{
6109			Header:         res.Header,
6110			HTTPStatusCode: res.StatusCode,
6111		},
6112	}
6113	target := &ret
6114	if err := gensupport.DecodeResponse(target, res); err != nil {
6115		return nil, err
6116	}
6117	return ret, nil
6118	// {
6119	//   "description": "Inserts a file into a folder.",
6120	//   "httpMethod": "POST",
6121	//   "id": "drive.children.insert",
6122	//   "parameterOrder": [
6123	//     "folderId"
6124	//   ],
6125	//   "parameters": {
6126	//     "enforceSingleParent": {
6127	//       "default": "false",
6128	//       "description": "Deprecated. Adding files to multiple folders is no longer supported. Use shortcuts instead.",
6129	//       "location": "query",
6130	//       "type": "boolean"
6131	//     },
6132	//     "folderId": {
6133	//       "description": "The ID of the folder.",
6134	//       "location": "path",
6135	//       "required": true,
6136	//       "type": "string"
6137	//     },
6138	//     "supportsAllDrives": {
6139	//       "default": "false",
6140	//       "description": "Whether the requesting application supports both My Drives and shared drives.",
6141	//       "location": "query",
6142	//       "type": "boolean"
6143	//     },
6144	//     "supportsTeamDrives": {
6145	//       "default": "false",
6146	//       "description": "Deprecated use supportsAllDrives instead.",
6147	//       "location": "query",
6148	//       "type": "boolean"
6149	//     }
6150	//   },
6151	//   "path": "files/{folderId}/children",
6152	//   "request": {
6153	//     "$ref": "ChildReference"
6154	//   },
6155	//   "response": {
6156	//     "$ref": "ChildReference"
6157	//   },
6158	//   "scopes": [
6159	//     "https://www.googleapis.com/auth/drive",
6160	//     "https://www.googleapis.com/auth/drive.appdata",
6161	//     "https://www.googleapis.com/auth/drive.file"
6162	//   ]
6163	// }
6164
6165}
6166
6167// method id "drive.children.list":
6168
6169type ChildrenListCall struct {
6170	s            *Service
6171	folderId     string
6172	urlParams_   gensupport.URLParams
6173	ifNoneMatch_ string
6174	ctx_         context.Context
6175	header_      http.Header
6176}
6177
6178// List: Lists a folder's children.
6179//
6180// - folderId: The ID of the folder.
6181func (r *ChildrenService) List(folderId string) *ChildrenListCall {
6182	c := &ChildrenListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
6183	c.folderId = folderId
6184	return c
6185}
6186
6187// MaxResults sets the optional parameter "maxResults": Maximum number
6188// of children to return.
6189func (c *ChildrenListCall) MaxResults(maxResults int64) *ChildrenListCall {
6190	c.urlParams_.Set("maxResults", fmt.Sprint(maxResults))
6191	return c
6192}
6193
6194// OrderBy sets the optional parameter "orderBy": A comma-separated list
6195// of sort keys. Valid keys are 'createdDate', 'folder',
6196// 'lastViewedByMeDate', 'modifiedByMeDate', 'modifiedDate',
6197// 'quotaBytesUsed', 'recency', 'sharedWithMeDate', 'starred', and
6198// 'title'. Each key sorts ascending by default, but may be reversed
6199// with the 'desc' modifier. Example usage: ?orderBy=folder,modifiedDate
6200// desc,title. Please note that there is a current limitation for users
6201// with approximately one million files in which the requested sort
6202// order is ignored.
6203func (c *ChildrenListCall) OrderBy(orderBy string) *ChildrenListCall {
6204	c.urlParams_.Set("orderBy", orderBy)
6205	return c
6206}
6207
6208// PageToken sets the optional parameter "pageToken": Page token for
6209// children.
6210func (c *ChildrenListCall) PageToken(pageToken string) *ChildrenListCall {
6211	c.urlParams_.Set("pageToken", pageToken)
6212	return c
6213}
6214
6215// Q sets the optional parameter "q": Query string for searching
6216// children.
6217func (c *ChildrenListCall) Q(q string) *ChildrenListCall {
6218	c.urlParams_.Set("q", q)
6219	return c
6220}
6221
6222// Fields allows partial responses to be retrieved. See
6223// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
6224// for more information.
6225func (c *ChildrenListCall) Fields(s ...googleapi.Field) *ChildrenListCall {
6226	c.urlParams_.Set("fields", googleapi.CombineFields(s))
6227	return c
6228}
6229
6230// IfNoneMatch sets the optional parameter which makes the operation
6231// fail if the object's ETag matches the given value. This is useful for
6232// getting updates only after the object has changed since the last
6233// request. Use googleapi.IsNotModified to check whether the response
6234// error from Do is the result of In-None-Match.
6235func (c *ChildrenListCall) IfNoneMatch(entityTag string) *ChildrenListCall {
6236	c.ifNoneMatch_ = entityTag
6237	return c
6238}
6239
6240// Context sets the context to be used in this call's Do method. Any
6241// pending HTTP request will be aborted if the provided context is
6242// canceled.
6243func (c *ChildrenListCall) Context(ctx context.Context) *ChildrenListCall {
6244	c.ctx_ = ctx
6245	return c
6246}
6247
6248// Header returns an http.Header that can be modified by the caller to
6249// add HTTP headers to the request.
6250func (c *ChildrenListCall) Header() http.Header {
6251	if c.header_ == nil {
6252		c.header_ = make(http.Header)
6253	}
6254	return c.header_
6255}
6256
6257func (c *ChildrenListCall) doRequest(alt string) (*http.Response, error) {
6258	reqHeaders := make(http.Header)
6259	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210830")
6260	for k, v := range c.header_ {
6261		reqHeaders[k] = v
6262	}
6263	reqHeaders.Set("User-Agent", c.s.userAgent())
6264	if c.ifNoneMatch_ != "" {
6265		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
6266	}
6267	var body io.Reader = nil
6268	c.urlParams_.Set("alt", alt)
6269	c.urlParams_.Set("prettyPrint", "false")
6270	urls := googleapi.ResolveRelative(c.s.BasePath, "files/{folderId}/children")
6271	urls += "?" + c.urlParams_.Encode()
6272	req, err := http.NewRequest("GET", urls, body)
6273	if err != nil {
6274		return nil, err
6275	}
6276	req.Header = reqHeaders
6277	googleapi.Expand(req.URL, map[string]string{
6278		"folderId": c.folderId,
6279	})
6280	return gensupport.SendRequest(c.ctx_, c.s.client, req)
6281}
6282
6283// Do executes the "drive.children.list" call.
6284// Exactly one of *ChildList or error will be non-nil. Any non-2xx
6285// status code is an error. Response headers are in either
6286// *ChildList.ServerResponse.Header or (if a response was returned at
6287// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
6288// to check whether the returned error was because
6289// http.StatusNotModified was returned.
6290func (c *ChildrenListCall) Do(opts ...googleapi.CallOption) (*ChildList, error) {
6291	gensupport.SetOptions(c.urlParams_, opts...)
6292	res, err := c.doRequest("json")
6293	if res != nil && res.StatusCode == http.StatusNotModified {
6294		if res.Body != nil {
6295			res.Body.Close()
6296		}
6297		return nil, &googleapi.Error{
6298			Code:   res.StatusCode,
6299			Header: res.Header,
6300		}
6301	}
6302	if err != nil {
6303		return nil, err
6304	}
6305	defer googleapi.CloseBody(res)
6306	if err := googleapi.CheckResponse(res); err != nil {
6307		return nil, err
6308	}
6309	ret := &ChildList{
6310		ServerResponse: googleapi.ServerResponse{
6311			Header:         res.Header,
6312			HTTPStatusCode: res.StatusCode,
6313		},
6314	}
6315	target := &ret
6316	if err := gensupport.DecodeResponse(target, res); err != nil {
6317		return nil, err
6318	}
6319	return ret, nil
6320	// {
6321	//   "description": "Lists a folder's children.",
6322	//   "httpMethod": "GET",
6323	//   "id": "drive.children.list",
6324	//   "parameterOrder": [
6325	//     "folderId"
6326	//   ],
6327	//   "parameters": {
6328	//     "folderId": {
6329	//       "description": "The ID of the folder.",
6330	//       "location": "path",
6331	//       "required": true,
6332	//       "type": "string"
6333	//     },
6334	//     "maxResults": {
6335	//       "default": "100",
6336	//       "description": "Maximum number of children to return.",
6337	//       "format": "int32",
6338	//       "location": "query",
6339	//       "minimum": "0",
6340	//       "type": "integer"
6341	//     },
6342	//     "orderBy": {
6343	//       "description": "A comma-separated list of sort keys. Valid keys are 'createdDate', 'folder', 'lastViewedByMeDate', 'modifiedByMeDate', 'modifiedDate', 'quotaBytesUsed', 'recency', 'sharedWithMeDate', 'starred', and 'title'. Each key sorts ascending by default, but may be reversed with the 'desc' modifier. Example usage: ?orderBy=folder,modifiedDate desc,title. Please note that there is a current limitation for users with approximately one million files in which the requested sort order is ignored.",
6344	//       "location": "query",
6345	//       "type": "string"
6346	//     },
6347	//     "pageToken": {
6348	//       "description": "Page token for children.",
6349	//       "location": "query",
6350	//       "type": "string"
6351	//     },
6352	//     "q": {
6353	//       "description": "Query string for searching children.",
6354	//       "location": "query",
6355	//       "type": "string"
6356	//     }
6357	//   },
6358	//   "path": "files/{folderId}/children",
6359	//   "response": {
6360	//     "$ref": "ChildList"
6361	//   },
6362	//   "scopes": [
6363	//     "https://www.googleapis.com/auth/drive",
6364	//     "https://www.googleapis.com/auth/drive.appdata",
6365	//     "https://www.googleapis.com/auth/drive.file",
6366	//     "https://www.googleapis.com/auth/drive.metadata",
6367	//     "https://www.googleapis.com/auth/drive.metadata.readonly",
6368	//     "https://www.googleapis.com/auth/drive.photos.readonly",
6369	//     "https://www.googleapis.com/auth/drive.readonly"
6370	//   ]
6371	// }
6372
6373}
6374
6375// Pages invokes f for each page of results.
6376// A non-nil error returned from f will halt the iteration.
6377// The provided context supersedes any context provided to the Context method.
6378func (c *ChildrenListCall) Pages(ctx context.Context, f func(*ChildList) error) error {
6379	c.ctx_ = ctx
6380	defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
6381	for {
6382		x, err := c.Do()
6383		if err != nil {
6384			return err
6385		}
6386		if err := f(x); err != nil {
6387			return err
6388		}
6389		if x.NextPageToken == "" {
6390			return nil
6391		}
6392		c.PageToken(x.NextPageToken)
6393	}
6394}
6395
6396// method id "drive.comments.delete":
6397
6398type CommentsDeleteCall struct {
6399	s          *Service
6400	fileId     string
6401	commentId  string
6402	urlParams_ gensupport.URLParams
6403	ctx_       context.Context
6404	header_    http.Header
6405}
6406
6407// Delete: Deletes a comment.
6408//
6409// - commentId: The ID of the comment.
6410// - fileId: The ID of the file.
6411func (r *CommentsService) Delete(fileId string, commentId string) *CommentsDeleteCall {
6412	c := &CommentsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
6413	c.fileId = fileId
6414	c.commentId = commentId
6415	return c
6416}
6417
6418// Fields allows partial responses to be retrieved. See
6419// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
6420// for more information.
6421func (c *CommentsDeleteCall) Fields(s ...googleapi.Field) *CommentsDeleteCall {
6422	c.urlParams_.Set("fields", googleapi.CombineFields(s))
6423	return c
6424}
6425
6426// Context sets the context to be used in this call's Do method. Any
6427// pending HTTP request will be aborted if the provided context is
6428// canceled.
6429func (c *CommentsDeleteCall) Context(ctx context.Context) *CommentsDeleteCall {
6430	c.ctx_ = ctx
6431	return c
6432}
6433
6434// Header returns an http.Header that can be modified by the caller to
6435// add HTTP headers to the request.
6436func (c *CommentsDeleteCall) Header() http.Header {
6437	if c.header_ == nil {
6438		c.header_ = make(http.Header)
6439	}
6440	return c.header_
6441}
6442
6443func (c *CommentsDeleteCall) doRequest(alt string) (*http.Response, error) {
6444	reqHeaders := make(http.Header)
6445	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210830")
6446	for k, v := range c.header_ {
6447		reqHeaders[k] = v
6448	}
6449	reqHeaders.Set("User-Agent", c.s.userAgent())
6450	var body io.Reader = nil
6451	c.urlParams_.Set("alt", alt)
6452	c.urlParams_.Set("prettyPrint", "false")
6453	urls := googleapi.ResolveRelative(c.s.BasePath, "files/{fileId}/comments/{commentId}")
6454	urls += "?" + c.urlParams_.Encode()
6455	req, err := http.NewRequest("DELETE", urls, body)
6456	if err != nil {
6457		return nil, err
6458	}
6459	req.Header = reqHeaders
6460	googleapi.Expand(req.URL, map[string]string{
6461		"fileId":    c.fileId,
6462		"commentId": c.commentId,
6463	})
6464	return gensupport.SendRequest(c.ctx_, c.s.client, req)
6465}
6466
6467// Do executes the "drive.comments.delete" call.
6468func (c *CommentsDeleteCall) Do(opts ...googleapi.CallOption) error {
6469	gensupport.SetOptions(c.urlParams_, opts...)
6470	res, err := c.doRequest("json")
6471	if err != nil {
6472		return err
6473	}
6474	defer googleapi.CloseBody(res)
6475	if err := googleapi.CheckResponse(res); err != nil {
6476		return err
6477	}
6478	return nil
6479	// {
6480	//   "description": "Deletes a comment.",
6481	//   "httpMethod": "DELETE",
6482	//   "id": "drive.comments.delete",
6483	//   "parameterOrder": [
6484	//     "fileId",
6485	//     "commentId"
6486	//   ],
6487	//   "parameters": {
6488	//     "commentId": {
6489	//       "description": "The ID of the comment.",
6490	//       "location": "path",
6491	//       "required": true,
6492	//       "type": "string"
6493	//     },
6494	//     "fileId": {
6495	//       "description": "The ID of the file.",
6496	//       "location": "path",
6497	//       "required": true,
6498	//       "type": "string"
6499	//     }
6500	//   },
6501	//   "path": "files/{fileId}/comments/{commentId}",
6502	//   "scopes": [
6503	//     "https://www.googleapis.com/auth/drive",
6504	//     "https://www.googleapis.com/auth/drive.file"
6505	//   ]
6506	// }
6507
6508}
6509
6510// method id "drive.comments.get":
6511
6512type CommentsGetCall struct {
6513	s            *Service
6514	fileId       string
6515	commentId    string
6516	urlParams_   gensupport.URLParams
6517	ifNoneMatch_ string
6518	ctx_         context.Context
6519	header_      http.Header
6520}
6521
6522// Get: Gets a comment by ID.
6523//
6524// - commentId: The ID of the comment.
6525// - fileId: The ID of the file.
6526func (r *CommentsService) Get(fileId string, commentId string) *CommentsGetCall {
6527	c := &CommentsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
6528	c.fileId = fileId
6529	c.commentId = commentId
6530	return c
6531}
6532
6533// IncludeDeleted sets the optional parameter "includeDeleted": If set,
6534// this will succeed when retrieving a deleted comment, and will include
6535// any deleted replies.
6536func (c *CommentsGetCall) IncludeDeleted(includeDeleted bool) *CommentsGetCall {
6537	c.urlParams_.Set("includeDeleted", fmt.Sprint(includeDeleted))
6538	return c
6539}
6540
6541// Fields allows partial responses to be retrieved. See
6542// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
6543// for more information.
6544func (c *CommentsGetCall) Fields(s ...googleapi.Field) *CommentsGetCall {
6545	c.urlParams_.Set("fields", googleapi.CombineFields(s))
6546	return c
6547}
6548
6549// IfNoneMatch sets the optional parameter which makes the operation
6550// fail if the object's ETag matches the given value. This is useful for
6551// getting updates only after the object has changed since the last
6552// request. Use googleapi.IsNotModified to check whether the response
6553// error from Do is the result of In-None-Match.
6554func (c *CommentsGetCall) IfNoneMatch(entityTag string) *CommentsGetCall {
6555	c.ifNoneMatch_ = entityTag
6556	return c
6557}
6558
6559// Context sets the context to be used in this call's Do method. Any
6560// pending HTTP request will be aborted if the provided context is
6561// canceled.
6562func (c *CommentsGetCall) Context(ctx context.Context) *CommentsGetCall {
6563	c.ctx_ = ctx
6564	return c
6565}
6566
6567// Header returns an http.Header that can be modified by the caller to
6568// add HTTP headers to the request.
6569func (c *CommentsGetCall) Header() http.Header {
6570	if c.header_ == nil {
6571		c.header_ = make(http.Header)
6572	}
6573	return c.header_
6574}
6575
6576func (c *CommentsGetCall) doRequest(alt string) (*http.Response, error) {
6577	reqHeaders := make(http.Header)
6578	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210830")
6579	for k, v := range c.header_ {
6580		reqHeaders[k] = v
6581	}
6582	reqHeaders.Set("User-Agent", c.s.userAgent())
6583	if c.ifNoneMatch_ != "" {
6584		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
6585	}
6586	var body io.Reader = nil
6587	c.urlParams_.Set("alt", alt)
6588	c.urlParams_.Set("prettyPrint", "false")
6589	urls := googleapi.ResolveRelative(c.s.BasePath, "files/{fileId}/comments/{commentId}")
6590	urls += "?" + c.urlParams_.Encode()
6591	req, err := http.NewRequest("GET", urls, body)
6592	if err != nil {
6593		return nil, err
6594	}
6595	req.Header = reqHeaders
6596	googleapi.Expand(req.URL, map[string]string{
6597		"fileId":    c.fileId,
6598		"commentId": c.commentId,
6599	})
6600	return gensupport.SendRequest(c.ctx_, c.s.client, req)
6601}
6602
6603// Do executes the "drive.comments.get" call.
6604// Exactly one of *Comment or error will be non-nil. Any non-2xx status
6605// code is an error. Response headers are in either
6606// *Comment.ServerResponse.Header or (if a response was returned at all)
6607// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
6608// check whether the returned error was because http.StatusNotModified
6609// was returned.
6610func (c *CommentsGetCall) Do(opts ...googleapi.CallOption) (*Comment, error) {
6611	gensupport.SetOptions(c.urlParams_, opts...)
6612	res, err := c.doRequest("json")
6613	if res != nil && res.StatusCode == http.StatusNotModified {
6614		if res.Body != nil {
6615			res.Body.Close()
6616		}
6617		return nil, &googleapi.Error{
6618			Code:   res.StatusCode,
6619			Header: res.Header,
6620		}
6621	}
6622	if err != nil {
6623		return nil, err
6624	}
6625	defer googleapi.CloseBody(res)
6626	if err := googleapi.CheckResponse(res); err != nil {
6627		return nil, err
6628	}
6629	ret := &Comment{
6630		ServerResponse: googleapi.ServerResponse{
6631			Header:         res.Header,
6632			HTTPStatusCode: res.StatusCode,
6633		},
6634	}
6635	target := &ret
6636	if err := gensupport.DecodeResponse(target, res); err != nil {
6637		return nil, err
6638	}
6639	return ret, nil
6640	// {
6641	//   "description": "Gets a comment by ID.",
6642	//   "httpMethod": "GET",
6643	//   "id": "drive.comments.get",
6644	//   "parameterOrder": [
6645	//     "fileId",
6646	//     "commentId"
6647	//   ],
6648	//   "parameters": {
6649	//     "commentId": {
6650	//       "description": "The ID of the comment.",
6651	//       "location": "path",
6652	//       "required": true,
6653	//       "type": "string"
6654	//     },
6655	//     "fileId": {
6656	//       "description": "The ID of the file.",
6657	//       "location": "path",
6658	//       "required": true,
6659	//       "type": "string"
6660	//     },
6661	//     "includeDeleted": {
6662	//       "default": "false",
6663	//       "description": "If set, this will succeed when retrieving a deleted comment, and will include any deleted replies.",
6664	//       "location": "query",
6665	//       "type": "boolean"
6666	//     }
6667	//   },
6668	//   "path": "files/{fileId}/comments/{commentId}",
6669	//   "response": {
6670	//     "$ref": "Comment"
6671	//   },
6672	//   "scopes": [
6673	//     "https://www.googleapis.com/auth/drive",
6674	//     "https://www.googleapis.com/auth/drive.file",
6675	//     "https://www.googleapis.com/auth/drive.readonly"
6676	//   ]
6677	// }
6678
6679}
6680
6681// method id "drive.comments.insert":
6682
6683type CommentsInsertCall struct {
6684	s          *Service
6685	fileId     string
6686	comment    *Comment
6687	urlParams_ gensupport.URLParams
6688	ctx_       context.Context
6689	header_    http.Header
6690}
6691
6692// Insert: Creates a new comment on the given file.
6693//
6694// - fileId: The ID of the file.
6695func (r *CommentsService) Insert(fileId string, comment *Comment) *CommentsInsertCall {
6696	c := &CommentsInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)}
6697	c.fileId = fileId
6698	c.comment = comment
6699	return c
6700}
6701
6702// Fields allows partial responses to be retrieved. See
6703// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
6704// for more information.
6705func (c *CommentsInsertCall) Fields(s ...googleapi.Field) *CommentsInsertCall {
6706	c.urlParams_.Set("fields", googleapi.CombineFields(s))
6707	return c
6708}
6709
6710// Context sets the context to be used in this call's Do method. Any
6711// pending HTTP request will be aborted if the provided context is
6712// canceled.
6713func (c *CommentsInsertCall) Context(ctx context.Context) *CommentsInsertCall {
6714	c.ctx_ = ctx
6715	return c
6716}
6717
6718// Header returns an http.Header that can be modified by the caller to
6719// add HTTP headers to the request.
6720func (c *CommentsInsertCall) Header() http.Header {
6721	if c.header_ == nil {
6722		c.header_ = make(http.Header)
6723	}
6724	return c.header_
6725}
6726
6727func (c *CommentsInsertCall) doRequest(alt string) (*http.Response, error) {
6728	reqHeaders := make(http.Header)
6729	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210830")
6730	for k, v := range c.header_ {
6731		reqHeaders[k] = v
6732	}
6733	reqHeaders.Set("User-Agent", c.s.userAgent())
6734	var body io.Reader = nil
6735	body, err := googleapi.WithoutDataWrapper.JSONReader(c.comment)
6736	if err != nil {
6737		return nil, err
6738	}
6739	reqHeaders.Set("Content-Type", "application/json")
6740	c.urlParams_.Set("alt", alt)
6741	c.urlParams_.Set("prettyPrint", "false")
6742	urls := googleapi.ResolveRelative(c.s.BasePath, "files/{fileId}/comments")
6743	urls += "?" + c.urlParams_.Encode()
6744	req, err := http.NewRequest("POST", urls, body)
6745	if err != nil {
6746		return nil, err
6747	}
6748	req.Header = reqHeaders
6749	googleapi.Expand(req.URL, map[string]string{
6750		"fileId": c.fileId,
6751	})
6752	return gensupport.SendRequest(c.ctx_, c.s.client, req)
6753}
6754
6755// Do executes the "drive.comments.insert" call.
6756// Exactly one of *Comment or error will be non-nil. Any non-2xx status
6757// code is an error. Response headers are in either
6758// *Comment.ServerResponse.Header or (if a response was returned at all)
6759// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
6760// check whether the returned error was because http.StatusNotModified
6761// was returned.
6762func (c *CommentsInsertCall) Do(opts ...googleapi.CallOption) (*Comment, error) {
6763	gensupport.SetOptions(c.urlParams_, opts...)
6764	res, err := c.doRequest("json")
6765	if res != nil && res.StatusCode == http.StatusNotModified {
6766		if res.Body != nil {
6767			res.Body.Close()
6768		}
6769		return nil, &googleapi.Error{
6770			Code:   res.StatusCode,
6771			Header: res.Header,
6772		}
6773	}
6774	if err != nil {
6775		return nil, err
6776	}
6777	defer googleapi.CloseBody(res)
6778	if err := googleapi.CheckResponse(res); err != nil {
6779		return nil, err
6780	}
6781	ret := &Comment{
6782		ServerResponse: googleapi.ServerResponse{
6783			Header:         res.Header,
6784			HTTPStatusCode: res.StatusCode,
6785		},
6786	}
6787	target := &ret
6788	if err := gensupport.DecodeResponse(target, res); err != nil {
6789		return nil, err
6790	}
6791	return ret, nil
6792	// {
6793	//   "description": "Creates a new comment on the given file.",
6794	//   "httpMethod": "POST",
6795	//   "id": "drive.comments.insert",
6796	//   "parameterOrder": [
6797	//     "fileId"
6798	//   ],
6799	//   "parameters": {
6800	//     "fileId": {
6801	//       "description": "The ID of the file.",
6802	//       "location": "path",
6803	//       "required": true,
6804	//       "type": "string"
6805	//     }
6806	//   },
6807	//   "path": "files/{fileId}/comments",
6808	//   "request": {
6809	//     "$ref": "Comment"
6810	//   },
6811	//   "response": {
6812	//     "$ref": "Comment"
6813	//   },
6814	//   "scopes": [
6815	//     "https://www.googleapis.com/auth/drive",
6816	//     "https://www.googleapis.com/auth/drive.file"
6817	//   ]
6818	// }
6819
6820}
6821
6822// method id "drive.comments.list":
6823
6824type CommentsListCall struct {
6825	s            *Service
6826	fileId       string
6827	urlParams_   gensupport.URLParams
6828	ifNoneMatch_ string
6829	ctx_         context.Context
6830	header_      http.Header
6831}
6832
6833// List: Lists a file's comments.
6834//
6835// - fileId: The ID of the file.
6836func (r *CommentsService) List(fileId string) *CommentsListCall {
6837	c := &CommentsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
6838	c.fileId = fileId
6839	return c
6840}
6841
6842// IncludeDeleted sets the optional parameter "includeDeleted": If set,
6843// all comments and replies, including deleted comments and replies
6844// (with content stripped) will be returned.
6845func (c *CommentsListCall) IncludeDeleted(includeDeleted bool) *CommentsListCall {
6846	c.urlParams_.Set("includeDeleted", fmt.Sprint(includeDeleted))
6847	return c
6848}
6849
6850// MaxResults sets the optional parameter "maxResults": The maximum
6851// number of discussions to include in the response, used for paging.
6852func (c *CommentsListCall) MaxResults(maxResults int64) *CommentsListCall {
6853	c.urlParams_.Set("maxResults", fmt.Sprint(maxResults))
6854	return c
6855}
6856
6857// PageToken sets the optional parameter "pageToken": The continuation
6858// token, used to page through large result sets. To get the next page
6859// of results, set this parameter to the value of "nextPageToken" from
6860// the previous response.
6861func (c *CommentsListCall) PageToken(pageToken string) *CommentsListCall {
6862	c.urlParams_.Set("pageToken", pageToken)
6863	return c
6864}
6865
6866// UpdatedMin sets the optional parameter "updatedMin": Only discussions
6867// that were updated after this timestamp will be returned. Formatted as
6868// an RFC 3339 timestamp.
6869func (c *CommentsListCall) UpdatedMin(updatedMin string) *CommentsListCall {
6870	c.urlParams_.Set("updatedMin", updatedMin)
6871	return c
6872}
6873
6874// Fields allows partial responses to be retrieved. See
6875// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
6876// for more information.
6877func (c *CommentsListCall) Fields(s ...googleapi.Field) *CommentsListCall {
6878	c.urlParams_.Set("fields", googleapi.CombineFields(s))
6879	return c
6880}
6881
6882// IfNoneMatch sets the optional parameter which makes the operation
6883// fail if the object's ETag matches the given value. This is useful for
6884// getting updates only after the object has changed since the last
6885// request. Use googleapi.IsNotModified to check whether the response
6886// error from Do is the result of In-None-Match.
6887func (c *CommentsListCall) IfNoneMatch(entityTag string) *CommentsListCall {
6888	c.ifNoneMatch_ = entityTag
6889	return c
6890}
6891
6892// Context sets the context to be used in this call's Do method. Any
6893// pending HTTP request will be aborted if the provided context is
6894// canceled.
6895func (c *CommentsListCall) Context(ctx context.Context) *CommentsListCall {
6896	c.ctx_ = ctx
6897	return c
6898}
6899
6900// Header returns an http.Header that can be modified by the caller to
6901// add HTTP headers to the request.
6902func (c *CommentsListCall) Header() http.Header {
6903	if c.header_ == nil {
6904		c.header_ = make(http.Header)
6905	}
6906	return c.header_
6907}
6908
6909func (c *CommentsListCall) doRequest(alt string) (*http.Response, error) {
6910	reqHeaders := make(http.Header)
6911	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210830")
6912	for k, v := range c.header_ {
6913		reqHeaders[k] = v
6914	}
6915	reqHeaders.Set("User-Agent", c.s.userAgent())
6916	if c.ifNoneMatch_ != "" {
6917		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
6918	}
6919	var body io.Reader = nil
6920	c.urlParams_.Set("alt", alt)
6921	c.urlParams_.Set("prettyPrint", "false")
6922	urls := googleapi.ResolveRelative(c.s.BasePath, "files/{fileId}/comments")
6923	urls += "?" + c.urlParams_.Encode()
6924	req, err := http.NewRequest("GET", urls, body)
6925	if err != nil {
6926		return nil, err
6927	}
6928	req.Header = reqHeaders
6929	googleapi.Expand(req.URL, map[string]string{
6930		"fileId": c.fileId,
6931	})
6932	return gensupport.SendRequest(c.ctx_, c.s.client, req)
6933}
6934
6935// Do executes the "drive.comments.list" call.
6936// Exactly one of *CommentList or error will be non-nil. Any non-2xx
6937// status code is an error. Response headers are in either
6938// *CommentList.ServerResponse.Header or (if a response was returned at
6939// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
6940// to check whether the returned error was because
6941// http.StatusNotModified was returned.
6942func (c *CommentsListCall) Do(opts ...googleapi.CallOption) (*CommentList, error) {
6943	gensupport.SetOptions(c.urlParams_, opts...)
6944	res, err := c.doRequest("json")
6945	if res != nil && res.StatusCode == http.StatusNotModified {
6946		if res.Body != nil {
6947			res.Body.Close()
6948		}
6949		return nil, &googleapi.Error{
6950			Code:   res.StatusCode,
6951			Header: res.Header,
6952		}
6953	}
6954	if err != nil {
6955		return nil, err
6956	}
6957	defer googleapi.CloseBody(res)
6958	if err := googleapi.CheckResponse(res); err != nil {
6959		return nil, err
6960	}
6961	ret := &CommentList{
6962		ServerResponse: googleapi.ServerResponse{
6963			Header:         res.Header,
6964			HTTPStatusCode: res.StatusCode,
6965		},
6966	}
6967	target := &ret
6968	if err := gensupport.DecodeResponse(target, res); err != nil {
6969		return nil, err
6970	}
6971	return ret, nil
6972	// {
6973	//   "description": "Lists a file's comments.",
6974	//   "httpMethod": "GET",
6975	//   "id": "drive.comments.list",
6976	//   "parameterOrder": [
6977	//     "fileId"
6978	//   ],
6979	//   "parameters": {
6980	//     "fileId": {
6981	//       "description": "The ID of the file.",
6982	//       "location": "path",
6983	//       "required": true,
6984	//       "type": "string"
6985	//     },
6986	//     "includeDeleted": {
6987	//       "default": "false",
6988	//       "description": "If set, all comments and replies, including deleted comments and replies (with content stripped) will be returned.",
6989	//       "location": "query",
6990	//       "type": "boolean"
6991	//     },
6992	//     "maxResults": {
6993	//       "default": "20",
6994	//       "description": "The maximum number of discussions to include in the response, used for paging.",
6995	//       "format": "int32",
6996	//       "location": "query",
6997	//       "maximum": "100",
6998	//       "minimum": "0",
6999	//       "type": "integer"
7000	//     },
7001	//     "pageToken": {
7002	//       "description": "The continuation token, used to page through large result sets. To get the next page of results, set this parameter to the value of \"nextPageToken\" from the previous response.",
7003	//       "location": "query",
7004	//       "type": "string"
7005	//     },
7006	//     "updatedMin": {
7007	//       "description": "Only discussions that were updated after this timestamp will be returned. Formatted as an RFC 3339 timestamp.",
7008	//       "location": "query",
7009	//       "type": "string"
7010	//     }
7011	//   },
7012	//   "path": "files/{fileId}/comments",
7013	//   "response": {
7014	//     "$ref": "CommentList"
7015	//   },
7016	//   "scopes": [
7017	//     "https://www.googleapis.com/auth/drive",
7018	//     "https://www.googleapis.com/auth/drive.file",
7019	//     "https://www.googleapis.com/auth/drive.readonly"
7020	//   ]
7021	// }
7022
7023}
7024
7025// Pages invokes f for each page of results.
7026// A non-nil error returned from f will halt the iteration.
7027// The provided context supersedes any context provided to the Context method.
7028func (c *CommentsListCall) Pages(ctx context.Context, f func(*CommentList) error) error {
7029	c.ctx_ = ctx
7030	defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
7031	for {
7032		x, err := c.Do()
7033		if err != nil {
7034			return err
7035		}
7036		if err := f(x); err != nil {
7037			return err
7038		}
7039		if x.NextPageToken == "" {
7040			return nil
7041		}
7042		c.PageToken(x.NextPageToken)
7043	}
7044}
7045
7046// method id "drive.comments.patch":
7047
7048type CommentsPatchCall struct {
7049	s          *Service
7050	fileId     string
7051	commentId  string
7052	comment    *Comment
7053	urlParams_ gensupport.URLParams
7054	ctx_       context.Context
7055	header_    http.Header
7056}
7057
7058// Patch: Updates an existing comment.
7059//
7060// - commentId: The ID of the comment.
7061// - fileId: The ID of the file.
7062func (r *CommentsService) Patch(fileId string, commentId string, comment *Comment) *CommentsPatchCall {
7063	c := &CommentsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
7064	c.fileId = fileId
7065	c.commentId = commentId
7066	c.comment = comment
7067	return c
7068}
7069
7070// Fields allows partial responses to be retrieved. See
7071// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
7072// for more information.
7073func (c *CommentsPatchCall) Fields(s ...googleapi.Field) *CommentsPatchCall {
7074	c.urlParams_.Set("fields", googleapi.CombineFields(s))
7075	return c
7076}
7077
7078// Context sets the context to be used in this call's Do method. Any
7079// pending HTTP request will be aborted if the provided context is
7080// canceled.
7081func (c *CommentsPatchCall) Context(ctx context.Context) *CommentsPatchCall {
7082	c.ctx_ = ctx
7083	return c
7084}
7085
7086// Header returns an http.Header that can be modified by the caller to
7087// add HTTP headers to the request.
7088func (c *CommentsPatchCall) Header() http.Header {
7089	if c.header_ == nil {
7090		c.header_ = make(http.Header)
7091	}
7092	return c.header_
7093}
7094
7095func (c *CommentsPatchCall) doRequest(alt string) (*http.Response, error) {
7096	reqHeaders := make(http.Header)
7097	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210830")
7098	for k, v := range c.header_ {
7099		reqHeaders[k] = v
7100	}
7101	reqHeaders.Set("User-Agent", c.s.userAgent())
7102	var body io.Reader = nil
7103	body, err := googleapi.WithoutDataWrapper.JSONReader(c.comment)
7104	if err != nil {
7105		return nil, err
7106	}
7107	reqHeaders.Set("Content-Type", "application/json")
7108	c.urlParams_.Set("alt", alt)
7109	c.urlParams_.Set("prettyPrint", "false")
7110	urls := googleapi.ResolveRelative(c.s.BasePath, "files/{fileId}/comments/{commentId}")
7111	urls += "?" + c.urlParams_.Encode()
7112	req, err := http.NewRequest("PATCH", urls, body)
7113	if err != nil {
7114		return nil, err
7115	}
7116	req.Header = reqHeaders
7117	googleapi.Expand(req.URL, map[string]string{
7118		"fileId":    c.fileId,
7119		"commentId": c.commentId,
7120	})
7121	return gensupport.SendRequest(c.ctx_, c.s.client, req)
7122}
7123
7124// Do executes the "drive.comments.patch" call.
7125// Exactly one of *Comment or error will be non-nil. Any non-2xx status
7126// code is an error. Response headers are in either
7127// *Comment.ServerResponse.Header or (if a response was returned at all)
7128// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
7129// check whether the returned error was because http.StatusNotModified
7130// was returned.
7131func (c *CommentsPatchCall) Do(opts ...googleapi.CallOption) (*Comment, error) {
7132	gensupport.SetOptions(c.urlParams_, opts...)
7133	res, err := c.doRequest("json")
7134	if res != nil && res.StatusCode == http.StatusNotModified {
7135		if res.Body != nil {
7136			res.Body.Close()
7137		}
7138		return nil, &googleapi.Error{
7139			Code:   res.StatusCode,
7140			Header: res.Header,
7141		}
7142	}
7143	if err != nil {
7144		return nil, err
7145	}
7146	defer googleapi.CloseBody(res)
7147	if err := googleapi.CheckResponse(res); err != nil {
7148		return nil, err
7149	}
7150	ret := &Comment{
7151		ServerResponse: googleapi.ServerResponse{
7152			Header:         res.Header,
7153			HTTPStatusCode: res.StatusCode,
7154		},
7155	}
7156	target := &ret
7157	if err := gensupport.DecodeResponse(target, res); err != nil {
7158		return nil, err
7159	}
7160	return ret, nil
7161	// {
7162	//   "description": "Updates an existing comment.",
7163	//   "httpMethod": "PATCH",
7164	//   "id": "drive.comments.patch",
7165	//   "parameterOrder": [
7166	//     "fileId",
7167	//     "commentId"
7168	//   ],
7169	//   "parameters": {
7170	//     "commentId": {
7171	//       "description": "The ID of the comment.",
7172	//       "location": "path",
7173	//       "required": true,
7174	//       "type": "string"
7175	//     },
7176	//     "fileId": {
7177	//       "description": "The ID of the file.",
7178	//       "location": "path",
7179	//       "required": true,
7180	//       "type": "string"
7181	//     }
7182	//   },
7183	//   "path": "files/{fileId}/comments/{commentId}",
7184	//   "request": {
7185	//     "$ref": "Comment"
7186	//   },
7187	//   "response": {
7188	//     "$ref": "Comment"
7189	//   },
7190	//   "scopes": [
7191	//     "https://www.googleapis.com/auth/drive",
7192	//     "https://www.googleapis.com/auth/drive.file"
7193	//   ]
7194	// }
7195
7196}
7197
7198// method id "drive.comments.update":
7199
7200type CommentsUpdateCall struct {
7201	s          *Service
7202	fileId     string
7203	commentId  string
7204	comment    *Comment
7205	urlParams_ gensupport.URLParams
7206	ctx_       context.Context
7207	header_    http.Header
7208}
7209
7210// Update: Updates an existing comment.
7211//
7212// - commentId: The ID of the comment.
7213// - fileId: The ID of the file.
7214func (r *CommentsService) Update(fileId string, commentId string, comment *Comment) *CommentsUpdateCall {
7215	c := &CommentsUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
7216	c.fileId = fileId
7217	c.commentId = commentId
7218	c.comment = comment
7219	return c
7220}
7221
7222// Fields allows partial responses to be retrieved. See
7223// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
7224// for more information.
7225func (c *CommentsUpdateCall) Fields(s ...googleapi.Field) *CommentsUpdateCall {
7226	c.urlParams_.Set("fields", googleapi.CombineFields(s))
7227	return c
7228}
7229
7230// Context sets the context to be used in this call's Do method. Any
7231// pending HTTP request will be aborted if the provided context is
7232// canceled.
7233func (c *CommentsUpdateCall) Context(ctx context.Context) *CommentsUpdateCall {
7234	c.ctx_ = ctx
7235	return c
7236}
7237
7238// Header returns an http.Header that can be modified by the caller to
7239// add HTTP headers to the request.
7240func (c *CommentsUpdateCall) Header() http.Header {
7241	if c.header_ == nil {
7242		c.header_ = make(http.Header)
7243	}
7244	return c.header_
7245}
7246
7247func (c *CommentsUpdateCall) doRequest(alt string) (*http.Response, error) {
7248	reqHeaders := make(http.Header)
7249	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210830")
7250	for k, v := range c.header_ {
7251		reqHeaders[k] = v
7252	}
7253	reqHeaders.Set("User-Agent", c.s.userAgent())
7254	var body io.Reader = nil
7255	body, err := googleapi.WithoutDataWrapper.JSONReader(c.comment)
7256	if err != nil {
7257		return nil, err
7258	}
7259	reqHeaders.Set("Content-Type", "application/json")
7260	c.urlParams_.Set("alt", alt)
7261	c.urlParams_.Set("prettyPrint", "false")
7262	urls := googleapi.ResolveRelative(c.s.BasePath, "files/{fileId}/comments/{commentId}")
7263	urls += "?" + c.urlParams_.Encode()
7264	req, err := http.NewRequest("PUT", urls, body)
7265	if err != nil {
7266		return nil, err
7267	}
7268	req.Header = reqHeaders
7269	googleapi.Expand(req.URL, map[string]string{
7270		"fileId":    c.fileId,
7271		"commentId": c.commentId,
7272	})
7273	return gensupport.SendRequest(c.ctx_, c.s.client, req)
7274}
7275
7276// Do executes the "drive.comments.update" call.
7277// Exactly one of *Comment or error will be non-nil. Any non-2xx status
7278// code is an error. Response headers are in either
7279// *Comment.ServerResponse.Header or (if a response was returned at all)
7280// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
7281// check whether the returned error was because http.StatusNotModified
7282// was returned.
7283func (c *CommentsUpdateCall) Do(opts ...googleapi.CallOption) (*Comment, error) {
7284	gensupport.SetOptions(c.urlParams_, opts...)
7285	res, err := c.doRequest("json")
7286	if res != nil && res.StatusCode == http.StatusNotModified {
7287		if res.Body != nil {
7288			res.Body.Close()
7289		}
7290		return nil, &googleapi.Error{
7291			Code:   res.StatusCode,
7292			Header: res.Header,
7293		}
7294	}
7295	if err != nil {
7296		return nil, err
7297	}
7298	defer googleapi.CloseBody(res)
7299	if err := googleapi.CheckResponse(res); err != nil {
7300		return nil, err
7301	}
7302	ret := &Comment{
7303		ServerResponse: googleapi.ServerResponse{
7304			Header:         res.Header,
7305			HTTPStatusCode: res.StatusCode,
7306		},
7307	}
7308	target := &ret
7309	if err := gensupport.DecodeResponse(target, res); err != nil {
7310		return nil, err
7311	}
7312	return ret, nil
7313	// {
7314	//   "description": "Updates an existing comment.",
7315	//   "httpMethod": "PUT",
7316	//   "id": "drive.comments.update",
7317	//   "parameterOrder": [
7318	//     "fileId",
7319	//     "commentId"
7320	//   ],
7321	//   "parameters": {
7322	//     "commentId": {
7323	//       "description": "The ID of the comment.",
7324	//       "location": "path",
7325	//       "required": true,
7326	//       "type": "string"
7327	//     },
7328	//     "fileId": {
7329	//       "description": "The ID of the file.",
7330	//       "location": "path",
7331	//       "required": true,
7332	//       "type": "string"
7333	//     }
7334	//   },
7335	//   "path": "files/{fileId}/comments/{commentId}",
7336	//   "request": {
7337	//     "$ref": "Comment"
7338	//   },
7339	//   "response": {
7340	//     "$ref": "Comment"
7341	//   },
7342	//   "scopes": [
7343	//     "https://www.googleapis.com/auth/drive",
7344	//     "https://www.googleapis.com/auth/drive.file"
7345	//   ]
7346	// }
7347
7348}
7349
7350// method id "drive.drives.delete":
7351
7352type DrivesDeleteCall struct {
7353	s          *Service
7354	driveId    string
7355	urlParams_ gensupport.URLParams
7356	ctx_       context.Context
7357	header_    http.Header
7358}
7359
7360// Delete: Permanently deletes a shared drive for which the user is an
7361// organizer. The shared drive cannot contain any untrashed items.
7362//
7363// - driveId: The ID of the shared drive.
7364func (r *DrivesService) Delete(driveId string) *DrivesDeleteCall {
7365	c := &DrivesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
7366	c.driveId = driveId
7367	return c
7368}
7369
7370// Fields allows partial responses to be retrieved. See
7371// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
7372// for more information.
7373func (c *DrivesDeleteCall) Fields(s ...googleapi.Field) *DrivesDeleteCall {
7374	c.urlParams_.Set("fields", googleapi.CombineFields(s))
7375	return c
7376}
7377
7378// Context sets the context to be used in this call's Do method. Any
7379// pending HTTP request will be aborted if the provided context is
7380// canceled.
7381func (c *DrivesDeleteCall) Context(ctx context.Context) *DrivesDeleteCall {
7382	c.ctx_ = ctx
7383	return c
7384}
7385
7386// Header returns an http.Header that can be modified by the caller to
7387// add HTTP headers to the request.
7388func (c *DrivesDeleteCall) Header() http.Header {
7389	if c.header_ == nil {
7390		c.header_ = make(http.Header)
7391	}
7392	return c.header_
7393}
7394
7395func (c *DrivesDeleteCall) doRequest(alt string) (*http.Response, error) {
7396	reqHeaders := make(http.Header)
7397	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210830")
7398	for k, v := range c.header_ {
7399		reqHeaders[k] = v
7400	}
7401	reqHeaders.Set("User-Agent", c.s.userAgent())
7402	var body io.Reader = nil
7403	c.urlParams_.Set("alt", alt)
7404	c.urlParams_.Set("prettyPrint", "false")
7405	urls := googleapi.ResolveRelative(c.s.BasePath, "drives/{driveId}")
7406	urls += "?" + c.urlParams_.Encode()
7407	req, err := http.NewRequest("DELETE", urls, body)
7408	if err != nil {
7409		return nil, err
7410	}
7411	req.Header = reqHeaders
7412	googleapi.Expand(req.URL, map[string]string{
7413		"driveId": c.driveId,
7414	})
7415	return gensupport.SendRequest(c.ctx_, c.s.client, req)
7416}
7417
7418// Do executes the "drive.drives.delete" call.
7419func (c *DrivesDeleteCall) Do(opts ...googleapi.CallOption) error {
7420	gensupport.SetOptions(c.urlParams_, opts...)
7421	res, err := c.doRequest("json")
7422	if err != nil {
7423		return err
7424	}
7425	defer googleapi.CloseBody(res)
7426	if err := googleapi.CheckResponse(res); err != nil {
7427		return err
7428	}
7429	return nil
7430	// {
7431	//   "description": "Permanently deletes a shared drive for which the user is an organizer. The shared drive cannot contain any untrashed items.",
7432	//   "httpMethod": "DELETE",
7433	//   "id": "drive.drives.delete",
7434	//   "parameterOrder": [
7435	//     "driveId"
7436	//   ],
7437	//   "parameters": {
7438	//     "driveId": {
7439	//       "description": "The ID of the shared drive.",
7440	//       "location": "path",
7441	//       "required": true,
7442	//       "type": "string"
7443	//     }
7444	//   },
7445	//   "path": "drives/{driveId}",
7446	//   "scopes": [
7447	//     "https://www.googleapis.com/auth/drive"
7448	//   ]
7449	// }
7450
7451}
7452
7453// method id "drive.drives.get":
7454
7455type DrivesGetCall struct {
7456	s            *Service
7457	driveId      string
7458	urlParams_   gensupport.URLParams
7459	ifNoneMatch_ string
7460	ctx_         context.Context
7461	header_      http.Header
7462}
7463
7464// Get: Gets a shared drive's metadata by ID.
7465//
7466// - driveId: The ID of the shared drive.
7467func (r *DrivesService) Get(driveId string) *DrivesGetCall {
7468	c := &DrivesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
7469	c.driveId = driveId
7470	return c
7471}
7472
7473// UseDomainAdminAccess sets the optional parameter
7474// "useDomainAdminAccess": Issue the request as a domain administrator;
7475// if set to true, then the requester will be granted access if they are
7476// an administrator of the domain to which the shared drive belongs.
7477func (c *DrivesGetCall) UseDomainAdminAccess(useDomainAdminAccess bool) *DrivesGetCall {
7478	c.urlParams_.Set("useDomainAdminAccess", fmt.Sprint(useDomainAdminAccess))
7479	return c
7480}
7481
7482// Fields allows partial responses to be retrieved. See
7483// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
7484// for more information.
7485func (c *DrivesGetCall) Fields(s ...googleapi.Field) *DrivesGetCall {
7486	c.urlParams_.Set("fields", googleapi.CombineFields(s))
7487	return c
7488}
7489
7490// IfNoneMatch sets the optional parameter which makes the operation
7491// fail if the object's ETag matches the given value. This is useful for
7492// getting updates only after the object has changed since the last
7493// request. Use googleapi.IsNotModified to check whether the response
7494// error from Do is the result of In-None-Match.
7495func (c *DrivesGetCall) IfNoneMatch(entityTag string) *DrivesGetCall {
7496	c.ifNoneMatch_ = entityTag
7497	return c
7498}
7499
7500// Context sets the context to be used in this call's Do method. Any
7501// pending HTTP request will be aborted if the provided context is
7502// canceled.
7503func (c *DrivesGetCall) Context(ctx context.Context) *DrivesGetCall {
7504	c.ctx_ = ctx
7505	return c
7506}
7507
7508// Header returns an http.Header that can be modified by the caller to
7509// add HTTP headers to the request.
7510func (c *DrivesGetCall) Header() http.Header {
7511	if c.header_ == nil {
7512		c.header_ = make(http.Header)
7513	}
7514	return c.header_
7515}
7516
7517func (c *DrivesGetCall) doRequest(alt string) (*http.Response, error) {
7518	reqHeaders := make(http.Header)
7519	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210830")
7520	for k, v := range c.header_ {
7521		reqHeaders[k] = v
7522	}
7523	reqHeaders.Set("User-Agent", c.s.userAgent())
7524	if c.ifNoneMatch_ != "" {
7525		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
7526	}
7527	var body io.Reader = nil
7528	c.urlParams_.Set("alt", alt)
7529	c.urlParams_.Set("prettyPrint", "false")
7530	urls := googleapi.ResolveRelative(c.s.BasePath, "drives/{driveId}")
7531	urls += "?" + c.urlParams_.Encode()
7532	req, err := http.NewRequest("GET", urls, body)
7533	if err != nil {
7534		return nil, err
7535	}
7536	req.Header = reqHeaders
7537	googleapi.Expand(req.URL, map[string]string{
7538		"driveId": c.driveId,
7539	})
7540	return gensupport.SendRequest(c.ctx_, c.s.client, req)
7541}
7542
7543// Do executes the "drive.drives.get" call.
7544// Exactly one of *Drive or error will be non-nil. Any non-2xx status
7545// code is an error. Response headers are in either
7546// *Drive.ServerResponse.Header or (if a response was returned at all)
7547// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
7548// check whether the returned error was because http.StatusNotModified
7549// was returned.
7550func (c *DrivesGetCall) Do(opts ...googleapi.CallOption) (*Drive, error) {
7551	gensupport.SetOptions(c.urlParams_, opts...)
7552	res, err := c.doRequest("json")
7553	if res != nil && res.StatusCode == http.StatusNotModified {
7554		if res.Body != nil {
7555			res.Body.Close()
7556		}
7557		return nil, &googleapi.Error{
7558			Code:   res.StatusCode,
7559			Header: res.Header,
7560		}
7561	}
7562	if err != nil {
7563		return nil, err
7564	}
7565	defer googleapi.CloseBody(res)
7566	if err := googleapi.CheckResponse(res); err != nil {
7567		return nil, err
7568	}
7569	ret := &Drive{
7570		ServerResponse: googleapi.ServerResponse{
7571			Header:         res.Header,
7572			HTTPStatusCode: res.StatusCode,
7573		},
7574	}
7575	target := &ret
7576	if err := gensupport.DecodeResponse(target, res); err != nil {
7577		return nil, err
7578	}
7579	return ret, nil
7580	// {
7581	//   "description": "Gets a shared drive's metadata by ID.",
7582	//   "httpMethod": "GET",
7583	//   "id": "drive.drives.get",
7584	//   "parameterOrder": [
7585	//     "driveId"
7586	//   ],
7587	//   "parameters": {
7588	//     "driveId": {
7589	//       "description": "The ID of the shared drive.",
7590	//       "location": "path",
7591	//       "required": true,
7592	//       "type": "string"
7593	//     },
7594	//     "useDomainAdminAccess": {
7595	//       "default": "false",
7596	//       "description": "Issue the request as a domain administrator; if set to true, then the requester will be granted access if they are an administrator of the domain to which the shared drive belongs.",
7597	//       "location": "query",
7598	//       "type": "boolean"
7599	//     }
7600	//   },
7601	//   "path": "drives/{driveId}",
7602	//   "response": {
7603	//     "$ref": "Drive"
7604	//   },
7605	//   "scopes": [
7606	//     "https://www.googleapis.com/auth/drive",
7607	//     "https://www.googleapis.com/auth/drive.readonly"
7608	//   ]
7609	// }
7610
7611}
7612
7613// method id "drive.drives.hide":
7614
7615type DrivesHideCall struct {
7616	s          *Service
7617	driveId    string
7618	urlParams_ gensupport.URLParams
7619	ctx_       context.Context
7620	header_    http.Header
7621}
7622
7623// Hide: Hides a shared drive from the default view.
7624//
7625// - driveId: The ID of the shared drive.
7626func (r *DrivesService) Hide(driveId string) *DrivesHideCall {
7627	c := &DrivesHideCall{s: r.s, urlParams_: make(gensupport.URLParams)}
7628	c.driveId = driveId
7629	return c
7630}
7631
7632// Fields allows partial responses to be retrieved. See
7633// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
7634// for more information.
7635func (c *DrivesHideCall) Fields(s ...googleapi.Field) *DrivesHideCall {
7636	c.urlParams_.Set("fields", googleapi.CombineFields(s))
7637	return c
7638}
7639
7640// Context sets the context to be used in this call's Do method. Any
7641// pending HTTP request will be aborted if the provided context is
7642// canceled.
7643func (c *DrivesHideCall) Context(ctx context.Context) *DrivesHideCall {
7644	c.ctx_ = ctx
7645	return c
7646}
7647
7648// Header returns an http.Header that can be modified by the caller to
7649// add HTTP headers to the request.
7650func (c *DrivesHideCall) Header() http.Header {
7651	if c.header_ == nil {
7652		c.header_ = make(http.Header)
7653	}
7654	return c.header_
7655}
7656
7657func (c *DrivesHideCall) doRequest(alt string) (*http.Response, error) {
7658	reqHeaders := make(http.Header)
7659	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210830")
7660	for k, v := range c.header_ {
7661		reqHeaders[k] = v
7662	}
7663	reqHeaders.Set("User-Agent", c.s.userAgent())
7664	var body io.Reader = nil
7665	c.urlParams_.Set("alt", alt)
7666	c.urlParams_.Set("prettyPrint", "false")
7667	urls := googleapi.ResolveRelative(c.s.BasePath, "drives/{driveId}/hide")
7668	urls += "?" + c.urlParams_.Encode()
7669	req, err := http.NewRequest("POST", urls, body)
7670	if err != nil {
7671		return nil, err
7672	}
7673	req.Header = reqHeaders
7674	googleapi.Expand(req.URL, map[string]string{
7675		"driveId": c.driveId,
7676	})
7677	return gensupport.SendRequest(c.ctx_, c.s.client, req)
7678}
7679
7680// Do executes the "drive.drives.hide" call.
7681// Exactly one of *Drive or error will be non-nil. Any non-2xx status
7682// code is an error. Response headers are in either
7683// *Drive.ServerResponse.Header or (if a response was returned at all)
7684// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
7685// check whether the returned error was because http.StatusNotModified
7686// was returned.
7687func (c *DrivesHideCall) Do(opts ...googleapi.CallOption) (*Drive, error) {
7688	gensupport.SetOptions(c.urlParams_, opts...)
7689	res, err := c.doRequest("json")
7690	if res != nil && res.StatusCode == http.StatusNotModified {
7691		if res.Body != nil {
7692			res.Body.Close()
7693		}
7694		return nil, &googleapi.Error{
7695			Code:   res.StatusCode,
7696			Header: res.Header,
7697		}
7698	}
7699	if err != nil {
7700		return nil, err
7701	}
7702	defer googleapi.CloseBody(res)
7703	if err := googleapi.CheckResponse(res); err != nil {
7704		return nil, err
7705	}
7706	ret := &Drive{
7707		ServerResponse: googleapi.ServerResponse{
7708			Header:         res.Header,
7709			HTTPStatusCode: res.StatusCode,
7710		},
7711	}
7712	target := &ret
7713	if err := gensupport.DecodeResponse(target, res); err != nil {
7714		return nil, err
7715	}
7716	return ret, nil
7717	// {
7718	//   "description": "Hides a shared drive from the default view.",
7719	//   "httpMethod": "POST",
7720	//   "id": "drive.drives.hide",
7721	//   "parameterOrder": [
7722	//     "driveId"
7723	//   ],
7724	//   "parameters": {
7725	//     "driveId": {
7726	//       "description": "The ID of the shared drive.",
7727	//       "location": "path",
7728	//       "required": true,
7729	//       "type": "string"
7730	//     }
7731	//   },
7732	//   "path": "drives/{driveId}/hide",
7733	//   "response": {
7734	//     "$ref": "Drive"
7735	//   },
7736	//   "scopes": [
7737	//     "https://www.googleapis.com/auth/drive"
7738	//   ]
7739	// }
7740
7741}
7742
7743// method id "drive.drives.insert":
7744
7745type DrivesInsertCall struct {
7746	s          *Service
7747	drive      *Drive
7748	urlParams_ gensupport.URLParams
7749	ctx_       context.Context
7750	header_    http.Header
7751}
7752
7753// Insert: Creates a new shared drive.
7754//
7755// - requestId: An ID, such as a random UUID, which uniquely identifies
7756//   this user's request for idempotent creation of a shared drive. A
7757//   repeated request by the same user and with the same request ID will
7758//   avoid creating duplicates by attempting to create the same shared
7759//   drive. If the shared drive already exists a 409 error will be
7760//   returned.
7761func (r *DrivesService) Insert(requestId string, drive *Drive) *DrivesInsertCall {
7762	c := &DrivesInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)}
7763	c.urlParams_.Set("requestId", requestId)
7764	c.drive = drive
7765	return c
7766}
7767
7768// Fields allows partial responses to be retrieved. See
7769// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
7770// for more information.
7771func (c *DrivesInsertCall) Fields(s ...googleapi.Field) *DrivesInsertCall {
7772	c.urlParams_.Set("fields", googleapi.CombineFields(s))
7773	return c
7774}
7775
7776// Context sets the context to be used in this call's Do method. Any
7777// pending HTTP request will be aborted if the provided context is
7778// canceled.
7779func (c *DrivesInsertCall) Context(ctx context.Context) *DrivesInsertCall {
7780	c.ctx_ = ctx
7781	return c
7782}
7783
7784// Header returns an http.Header that can be modified by the caller to
7785// add HTTP headers to the request.
7786func (c *DrivesInsertCall) Header() http.Header {
7787	if c.header_ == nil {
7788		c.header_ = make(http.Header)
7789	}
7790	return c.header_
7791}
7792
7793func (c *DrivesInsertCall) doRequest(alt string) (*http.Response, error) {
7794	reqHeaders := make(http.Header)
7795	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210830")
7796	for k, v := range c.header_ {
7797		reqHeaders[k] = v
7798	}
7799	reqHeaders.Set("User-Agent", c.s.userAgent())
7800	var body io.Reader = nil
7801	body, err := googleapi.WithoutDataWrapper.JSONReader(c.drive)
7802	if err != nil {
7803		return nil, err
7804	}
7805	reqHeaders.Set("Content-Type", "application/json")
7806	c.urlParams_.Set("alt", alt)
7807	c.urlParams_.Set("prettyPrint", "false")
7808	urls := googleapi.ResolveRelative(c.s.BasePath, "drives")
7809	urls += "?" + c.urlParams_.Encode()
7810	req, err := http.NewRequest("POST", urls, body)
7811	if err != nil {
7812		return nil, err
7813	}
7814	req.Header = reqHeaders
7815	return gensupport.SendRequest(c.ctx_, c.s.client, req)
7816}
7817
7818// Do executes the "drive.drives.insert" call.
7819// Exactly one of *Drive or error will be non-nil. Any non-2xx status
7820// code is an error. Response headers are in either
7821// *Drive.ServerResponse.Header or (if a response was returned at all)
7822// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
7823// check whether the returned error was because http.StatusNotModified
7824// was returned.
7825func (c *DrivesInsertCall) Do(opts ...googleapi.CallOption) (*Drive, error) {
7826	gensupport.SetOptions(c.urlParams_, opts...)
7827	res, err := c.doRequest("json")
7828	if res != nil && res.StatusCode == http.StatusNotModified {
7829		if res.Body != nil {
7830			res.Body.Close()
7831		}
7832		return nil, &googleapi.Error{
7833			Code:   res.StatusCode,
7834			Header: res.Header,
7835		}
7836	}
7837	if err != nil {
7838		return nil, err
7839	}
7840	defer googleapi.CloseBody(res)
7841	if err := googleapi.CheckResponse(res); err != nil {
7842		return nil, err
7843	}
7844	ret := &Drive{
7845		ServerResponse: googleapi.ServerResponse{
7846			Header:         res.Header,
7847			HTTPStatusCode: res.StatusCode,
7848		},
7849	}
7850	target := &ret
7851	if err := gensupport.DecodeResponse(target, res); err != nil {
7852		return nil, err
7853	}
7854	return ret, nil
7855	// {
7856	//   "description": "Creates a new shared drive.",
7857	//   "httpMethod": "POST",
7858	//   "id": "drive.drives.insert",
7859	//   "parameterOrder": [
7860	//     "requestId"
7861	//   ],
7862	//   "parameters": {
7863	//     "requestId": {
7864	//       "description": "An ID, such as a random UUID, which uniquely identifies this user's request for idempotent creation of a shared drive. A repeated request by the same user and with the same request ID will avoid creating duplicates by attempting to create the same shared drive. If the shared drive already exists a 409 error will be returned.",
7865	//       "location": "query",
7866	//       "required": true,
7867	//       "type": "string"
7868	//     }
7869	//   },
7870	//   "path": "drives",
7871	//   "request": {
7872	//     "$ref": "Drive"
7873	//   },
7874	//   "response": {
7875	//     "$ref": "Drive"
7876	//   },
7877	//   "scopes": [
7878	//     "https://www.googleapis.com/auth/drive"
7879	//   ]
7880	// }
7881
7882}
7883
7884// method id "drive.drives.list":
7885
7886type DrivesListCall struct {
7887	s            *Service
7888	urlParams_   gensupport.URLParams
7889	ifNoneMatch_ string
7890	ctx_         context.Context
7891	header_      http.Header
7892}
7893
7894// List: Lists the user's shared drives.
7895func (r *DrivesService) List() *DrivesListCall {
7896	c := &DrivesListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
7897	return c
7898}
7899
7900// MaxResults sets the optional parameter "maxResults": Maximum number
7901// of shared drives to return per page.
7902func (c *DrivesListCall) MaxResults(maxResults int64) *DrivesListCall {
7903	c.urlParams_.Set("maxResults", fmt.Sprint(maxResults))
7904	return c
7905}
7906
7907// PageToken sets the optional parameter "pageToken": Page token for
7908// shared drives.
7909func (c *DrivesListCall) PageToken(pageToken string) *DrivesListCall {
7910	c.urlParams_.Set("pageToken", pageToken)
7911	return c
7912}
7913
7914// Q sets the optional parameter "q": Query string for searching shared
7915// drives.
7916func (c *DrivesListCall) Q(q string) *DrivesListCall {
7917	c.urlParams_.Set("q", q)
7918	return c
7919}
7920
7921// UseDomainAdminAccess sets the optional parameter
7922// "useDomainAdminAccess": Issue the request as a domain administrator;
7923// if set to true, then all shared drives of the domain in which the
7924// requester is an administrator are returned.
7925func (c *DrivesListCall) UseDomainAdminAccess(useDomainAdminAccess bool) *DrivesListCall {
7926	c.urlParams_.Set("useDomainAdminAccess", fmt.Sprint(useDomainAdminAccess))
7927	return c
7928}
7929
7930// Fields allows partial responses to be retrieved. See
7931// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
7932// for more information.
7933func (c *DrivesListCall) Fields(s ...googleapi.Field) *DrivesListCall {
7934	c.urlParams_.Set("fields", googleapi.CombineFields(s))
7935	return c
7936}
7937
7938// IfNoneMatch sets the optional parameter which makes the operation
7939// fail if the object's ETag matches the given value. This is useful for
7940// getting updates only after the object has changed since the last
7941// request. Use googleapi.IsNotModified to check whether the response
7942// error from Do is the result of In-None-Match.
7943func (c *DrivesListCall) IfNoneMatch(entityTag string) *DrivesListCall {
7944	c.ifNoneMatch_ = entityTag
7945	return c
7946}
7947
7948// Context sets the context to be used in this call's Do method. Any
7949// pending HTTP request will be aborted if the provided context is
7950// canceled.
7951func (c *DrivesListCall) Context(ctx context.Context) *DrivesListCall {
7952	c.ctx_ = ctx
7953	return c
7954}
7955
7956// Header returns an http.Header that can be modified by the caller to
7957// add HTTP headers to the request.
7958func (c *DrivesListCall) Header() http.Header {
7959	if c.header_ == nil {
7960		c.header_ = make(http.Header)
7961	}
7962	return c.header_
7963}
7964
7965func (c *DrivesListCall) doRequest(alt string) (*http.Response, error) {
7966	reqHeaders := make(http.Header)
7967	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210830")
7968	for k, v := range c.header_ {
7969		reqHeaders[k] = v
7970	}
7971	reqHeaders.Set("User-Agent", c.s.userAgent())
7972	if c.ifNoneMatch_ != "" {
7973		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
7974	}
7975	var body io.Reader = nil
7976	c.urlParams_.Set("alt", alt)
7977	c.urlParams_.Set("prettyPrint", "false")
7978	urls := googleapi.ResolveRelative(c.s.BasePath, "drives")
7979	urls += "?" + c.urlParams_.Encode()
7980	req, err := http.NewRequest("GET", urls, body)
7981	if err != nil {
7982		return nil, err
7983	}
7984	req.Header = reqHeaders
7985	return gensupport.SendRequest(c.ctx_, c.s.client, req)
7986}
7987
7988// Do executes the "drive.drives.list" call.
7989// Exactly one of *DriveList or error will be non-nil. Any non-2xx
7990// status code is an error. Response headers are in either
7991// *DriveList.ServerResponse.Header or (if a response was returned at
7992// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
7993// to check whether the returned error was because
7994// http.StatusNotModified was returned.
7995func (c *DrivesListCall) Do(opts ...googleapi.CallOption) (*DriveList, error) {
7996	gensupport.SetOptions(c.urlParams_, opts...)
7997	res, err := c.doRequest("json")
7998	if res != nil && res.StatusCode == http.StatusNotModified {
7999		if res.Body != nil {
8000			res.Body.Close()
8001		}
8002		return nil, &googleapi.Error{
8003			Code:   res.StatusCode,
8004			Header: res.Header,
8005		}
8006	}
8007	if err != nil {
8008		return nil, err
8009	}
8010	defer googleapi.CloseBody(res)
8011	if err := googleapi.CheckResponse(res); err != nil {
8012		return nil, err
8013	}
8014	ret := &DriveList{
8015		ServerResponse: googleapi.ServerResponse{
8016			Header:         res.Header,
8017			HTTPStatusCode: res.StatusCode,
8018		},
8019	}
8020	target := &ret
8021	if err := gensupport.DecodeResponse(target, res); err != nil {
8022		return nil, err
8023	}
8024	return ret, nil
8025	// {
8026	//   "description": "Lists the user's shared drives.",
8027	//   "httpMethod": "GET",
8028	//   "id": "drive.drives.list",
8029	//   "parameters": {
8030	//     "maxResults": {
8031	//       "default": "10",
8032	//       "description": "Maximum number of shared drives to return per page.",
8033	//       "format": "int32",
8034	//       "location": "query",
8035	//       "maximum": "100",
8036	//       "minimum": "1",
8037	//       "type": "integer"
8038	//     },
8039	//     "pageToken": {
8040	//       "description": "Page token for shared drives.",
8041	//       "location": "query",
8042	//       "type": "string"
8043	//     },
8044	//     "q": {
8045	//       "description": "Query string for searching shared drives.",
8046	//       "location": "query",
8047	//       "type": "string"
8048	//     },
8049	//     "useDomainAdminAccess": {
8050	//       "default": "false",
8051	//       "description": "Issue the request as a domain administrator; if set to true, then all shared drives of the domain in which the requester is an administrator are returned.",
8052	//       "location": "query",
8053	//       "type": "boolean"
8054	//     }
8055	//   },
8056	//   "path": "drives",
8057	//   "response": {
8058	//     "$ref": "DriveList"
8059	//   },
8060	//   "scopes": [
8061	//     "https://www.googleapis.com/auth/drive",
8062	//     "https://www.googleapis.com/auth/drive.readonly"
8063	//   ]
8064	// }
8065
8066}
8067
8068// Pages invokes f for each page of results.
8069// A non-nil error returned from f will halt the iteration.
8070// The provided context supersedes any context provided to the Context method.
8071func (c *DrivesListCall) Pages(ctx context.Context, f func(*DriveList) error) error {
8072	c.ctx_ = ctx
8073	defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
8074	for {
8075		x, err := c.Do()
8076		if err != nil {
8077			return err
8078		}
8079		if err := f(x); err != nil {
8080			return err
8081		}
8082		if x.NextPageToken == "" {
8083			return nil
8084		}
8085		c.PageToken(x.NextPageToken)
8086	}
8087}
8088
8089// method id "drive.drives.unhide":
8090
8091type DrivesUnhideCall struct {
8092	s          *Service
8093	driveId    string
8094	urlParams_ gensupport.URLParams
8095	ctx_       context.Context
8096	header_    http.Header
8097}
8098
8099// Unhide: Restores a shared drive to the default view.
8100//
8101// - driveId: The ID of the shared drive.
8102func (r *DrivesService) Unhide(driveId string) *DrivesUnhideCall {
8103	c := &DrivesUnhideCall{s: r.s, urlParams_: make(gensupport.URLParams)}
8104	c.driveId = driveId
8105	return c
8106}
8107
8108// Fields allows partial responses to be retrieved. See
8109// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
8110// for more information.
8111func (c *DrivesUnhideCall) Fields(s ...googleapi.Field) *DrivesUnhideCall {
8112	c.urlParams_.Set("fields", googleapi.CombineFields(s))
8113	return c
8114}
8115
8116// Context sets the context to be used in this call's Do method. Any
8117// pending HTTP request will be aborted if the provided context is
8118// canceled.
8119func (c *DrivesUnhideCall) Context(ctx context.Context) *DrivesUnhideCall {
8120	c.ctx_ = ctx
8121	return c
8122}
8123
8124// Header returns an http.Header that can be modified by the caller to
8125// add HTTP headers to the request.
8126func (c *DrivesUnhideCall) Header() http.Header {
8127	if c.header_ == nil {
8128		c.header_ = make(http.Header)
8129	}
8130	return c.header_
8131}
8132
8133func (c *DrivesUnhideCall) doRequest(alt string) (*http.Response, error) {
8134	reqHeaders := make(http.Header)
8135	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210830")
8136	for k, v := range c.header_ {
8137		reqHeaders[k] = v
8138	}
8139	reqHeaders.Set("User-Agent", c.s.userAgent())
8140	var body io.Reader = nil
8141	c.urlParams_.Set("alt", alt)
8142	c.urlParams_.Set("prettyPrint", "false")
8143	urls := googleapi.ResolveRelative(c.s.BasePath, "drives/{driveId}/unhide")
8144	urls += "?" + c.urlParams_.Encode()
8145	req, err := http.NewRequest("POST", urls, body)
8146	if err != nil {
8147		return nil, err
8148	}
8149	req.Header = reqHeaders
8150	googleapi.Expand(req.URL, map[string]string{
8151		"driveId": c.driveId,
8152	})
8153	return gensupport.SendRequest(c.ctx_, c.s.client, req)
8154}
8155
8156// Do executes the "drive.drives.unhide" call.
8157// Exactly one of *Drive or error will be non-nil. Any non-2xx status
8158// code is an error. Response headers are in either
8159// *Drive.ServerResponse.Header or (if a response was returned at all)
8160// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
8161// check whether the returned error was because http.StatusNotModified
8162// was returned.
8163func (c *DrivesUnhideCall) Do(opts ...googleapi.CallOption) (*Drive, error) {
8164	gensupport.SetOptions(c.urlParams_, opts...)
8165	res, err := c.doRequest("json")
8166	if res != nil && res.StatusCode == http.StatusNotModified {
8167		if res.Body != nil {
8168			res.Body.Close()
8169		}
8170		return nil, &googleapi.Error{
8171			Code:   res.StatusCode,
8172			Header: res.Header,
8173		}
8174	}
8175	if err != nil {
8176		return nil, err
8177	}
8178	defer googleapi.CloseBody(res)
8179	if err := googleapi.CheckResponse(res); err != nil {
8180		return nil, err
8181	}
8182	ret := &Drive{
8183		ServerResponse: googleapi.ServerResponse{
8184			Header:         res.Header,
8185			HTTPStatusCode: res.StatusCode,
8186		},
8187	}
8188	target := &ret
8189	if err := gensupport.DecodeResponse(target, res); err != nil {
8190		return nil, err
8191	}
8192	return ret, nil
8193	// {
8194	//   "description": "Restores a shared drive to the default view.",
8195	//   "httpMethod": "POST",
8196	//   "id": "drive.drives.unhide",
8197	//   "parameterOrder": [
8198	//     "driveId"
8199	//   ],
8200	//   "parameters": {
8201	//     "driveId": {
8202	//       "description": "The ID of the shared drive.",
8203	//       "location": "path",
8204	//       "required": true,
8205	//       "type": "string"
8206	//     }
8207	//   },
8208	//   "path": "drives/{driveId}/unhide",
8209	//   "response": {
8210	//     "$ref": "Drive"
8211	//   },
8212	//   "scopes": [
8213	//     "https://www.googleapis.com/auth/drive"
8214	//   ]
8215	// }
8216
8217}
8218
8219// method id "drive.drives.update":
8220
8221type DrivesUpdateCall struct {
8222	s          *Service
8223	driveId    string
8224	drive      *Drive
8225	urlParams_ gensupport.URLParams
8226	ctx_       context.Context
8227	header_    http.Header
8228}
8229
8230// Update: Updates the metadata for a shared drive.
8231//
8232// - driveId: The ID of the shared drive.
8233func (r *DrivesService) Update(driveId string, drive *Drive) *DrivesUpdateCall {
8234	c := &DrivesUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
8235	c.driveId = driveId
8236	c.drive = drive
8237	return c
8238}
8239
8240// UseDomainAdminAccess sets the optional parameter
8241// "useDomainAdminAccess": Issue the request as a domain administrator;
8242// if set to true, then the requester will be granted access if they are
8243// an administrator of the domain to which the shared drive belongs.
8244func (c *DrivesUpdateCall) UseDomainAdminAccess(useDomainAdminAccess bool) *DrivesUpdateCall {
8245	c.urlParams_.Set("useDomainAdminAccess", fmt.Sprint(useDomainAdminAccess))
8246	return c
8247}
8248
8249// Fields allows partial responses to be retrieved. See
8250// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
8251// for more information.
8252func (c *DrivesUpdateCall) Fields(s ...googleapi.Field) *DrivesUpdateCall {
8253	c.urlParams_.Set("fields", googleapi.CombineFields(s))
8254	return c
8255}
8256
8257// Context sets the context to be used in this call's Do method. Any
8258// pending HTTP request will be aborted if the provided context is
8259// canceled.
8260func (c *DrivesUpdateCall) Context(ctx context.Context) *DrivesUpdateCall {
8261	c.ctx_ = ctx
8262	return c
8263}
8264
8265// Header returns an http.Header that can be modified by the caller to
8266// add HTTP headers to the request.
8267func (c *DrivesUpdateCall) Header() http.Header {
8268	if c.header_ == nil {
8269		c.header_ = make(http.Header)
8270	}
8271	return c.header_
8272}
8273
8274func (c *DrivesUpdateCall) doRequest(alt string) (*http.Response, error) {
8275	reqHeaders := make(http.Header)
8276	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210830")
8277	for k, v := range c.header_ {
8278		reqHeaders[k] = v
8279	}
8280	reqHeaders.Set("User-Agent", c.s.userAgent())
8281	var body io.Reader = nil
8282	body, err := googleapi.WithoutDataWrapper.JSONReader(c.drive)
8283	if err != nil {
8284		return nil, err
8285	}
8286	reqHeaders.Set("Content-Type", "application/json")
8287	c.urlParams_.Set("alt", alt)
8288	c.urlParams_.Set("prettyPrint", "false")
8289	urls := googleapi.ResolveRelative(c.s.BasePath, "drives/{driveId}")
8290	urls += "?" + c.urlParams_.Encode()
8291	req, err := http.NewRequest("PUT", urls, body)
8292	if err != nil {
8293		return nil, err
8294	}
8295	req.Header = reqHeaders
8296	googleapi.Expand(req.URL, map[string]string{
8297		"driveId": c.driveId,
8298	})
8299	return gensupport.SendRequest(c.ctx_, c.s.client, req)
8300}
8301
8302// Do executes the "drive.drives.update" call.
8303// Exactly one of *Drive or error will be non-nil. Any non-2xx status
8304// code is an error. Response headers are in either
8305// *Drive.ServerResponse.Header or (if a response was returned at all)
8306// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
8307// check whether the returned error was because http.StatusNotModified
8308// was returned.
8309func (c *DrivesUpdateCall) Do(opts ...googleapi.CallOption) (*Drive, error) {
8310	gensupport.SetOptions(c.urlParams_, opts...)
8311	res, err := c.doRequest("json")
8312	if res != nil && res.StatusCode == http.StatusNotModified {
8313		if res.Body != nil {
8314			res.Body.Close()
8315		}
8316		return nil, &googleapi.Error{
8317			Code:   res.StatusCode,
8318			Header: res.Header,
8319		}
8320	}
8321	if err != nil {
8322		return nil, err
8323	}
8324	defer googleapi.CloseBody(res)
8325	if err := googleapi.CheckResponse(res); err != nil {
8326		return nil, err
8327	}
8328	ret := &Drive{
8329		ServerResponse: googleapi.ServerResponse{
8330			Header:         res.Header,
8331			HTTPStatusCode: res.StatusCode,
8332		},
8333	}
8334	target := &ret
8335	if err := gensupport.DecodeResponse(target, res); err != nil {
8336		return nil, err
8337	}
8338	return ret, nil
8339	// {
8340	//   "description": "Updates the metadata for a shared drive.",
8341	//   "httpMethod": "PUT",
8342	//   "id": "drive.drives.update",
8343	//   "parameterOrder": [
8344	//     "driveId"
8345	//   ],
8346	//   "parameters": {
8347	//     "driveId": {
8348	//       "description": "The ID of the shared drive.",
8349	//       "location": "path",
8350	//       "required": true,
8351	//       "type": "string"
8352	//     },
8353	//     "useDomainAdminAccess": {
8354	//       "default": "false",
8355	//       "description": "Issue the request as a domain administrator; if set to true, then the requester will be granted access if they are an administrator of the domain to which the shared drive belongs.",
8356	//       "location": "query",
8357	//       "type": "boolean"
8358	//     }
8359	//   },
8360	//   "path": "drives/{driveId}",
8361	//   "request": {
8362	//     "$ref": "Drive"
8363	//   },
8364	//   "response": {
8365	//     "$ref": "Drive"
8366	//   },
8367	//   "scopes": [
8368	//     "https://www.googleapis.com/auth/drive"
8369	//   ]
8370	// }
8371
8372}
8373
8374// method id "drive.files.copy":
8375
8376type FilesCopyCall struct {
8377	s          *Service
8378	fileId     string
8379	file       *File
8380	urlParams_ gensupport.URLParams
8381	ctx_       context.Context
8382	header_    http.Header
8383}
8384
8385// Copy: Creates a copy of the specified file. Folders cannot be copied.
8386//
8387// - fileId: The ID of the file to copy.
8388func (r *FilesService) Copy(fileId string, file *File) *FilesCopyCall {
8389	c := &FilesCopyCall{s: r.s, urlParams_: make(gensupport.URLParams)}
8390	c.fileId = fileId
8391	c.file = file
8392	return c
8393}
8394
8395// Convert sets the optional parameter "convert": Whether to convert
8396// this file to the corresponding Docs Editors format.
8397func (c *FilesCopyCall) Convert(convert bool) *FilesCopyCall {
8398	c.urlParams_.Set("convert", fmt.Sprint(convert))
8399	return c
8400}
8401
8402// EnforceSingleParent sets the optional parameter
8403// "enforceSingleParent": Deprecated. Copying files into multiple
8404// folders is no longer supported. Use shortcuts instead.
8405func (c *FilesCopyCall) EnforceSingleParent(enforceSingleParent bool) *FilesCopyCall {
8406	c.urlParams_.Set("enforceSingleParent", fmt.Sprint(enforceSingleParent))
8407	return c
8408}
8409
8410// IncludePermissionsForView sets the optional parameter
8411// "includePermissionsForView": Specifies which additional view's
8412// permissions to include in the response. Only 'published' is
8413// supported.
8414func (c *FilesCopyCall) IncludePermissionsForView(includePermissionsForView string) *FilesCopyCall {
8415	c.urlParams_.Set("includePermissionsForView", includePermissionsForView)
8416	return c
8417}
8418
8419// Ocr sets the optional parameter "ocr": Whether to attempt OCR on
8420// .jpg, .png, .gif, or .pdf uploads.
8421func (c *FilesCopyCall) Ocr(ocr bool) *FilesCopyCall {
8422	c.urlParams_.Set("ocr", fmt.Sprint(ocr))
8423	return c
8424}
8425
8426// OcrLanguage sets the optional parameter "ocrLanguage": If ocr is
8427// true, hints at the language to use. Valid values are BCP 47 codes.
8428func (c *FilesCopyCall) OcrLanguage(ocrLanguage string) *FilesCopyCall {
8429	c.urlParams_.Set("ocrLanguage", ocrLanguage)
8430	return c
8431}
8432
8433// Pinned sets the optional parameter "pinned": Whether to pin the head
8434// revision of the new copy. A file can have a maximum of 200 pinned
8435// revisions.
8436func (c *FilesCopyCall) Pinned(pinned bool) *FilesCopyCall {
8437	c.urlParams_.Set("pinned", fmt.Sprint(pinned))
8438	return c
8439}
8440
8441// SupportsAllDrives sets the optional parameter "supportsAllDrives":
8442// Whether the requesting application supports both My Drives and shared
8443// drives.
8444func (c *FilesCopyCall) SupportsAllDrives(supportsAllDrives bool) *FilesCopyCall {
8445	c.urlParams_.Set("supportsAllDrives", fmt.Sprint(supportsAllDrives))
8446	return c
8447}
8448
8449// SupportsTeamDrives sets the optional parameter "supportsTeamDrives":
8450// Deprecated use supportsAllDrives instead.
8451func (c *FilesCopyCall) SupportsTeamDrives(supportsTeamDrives bool) *FilesCopyCall {
8452	c.urlParams_.Set("supportsTeamDrives", fmt.Sprint(supportsTeamDrives))
8453	return c
8454}
8455
8456// TimedTextLanguage sets the optional parameter "timedTextLanguage":
8457// The language of the timed text.
8458func (c *FilesCopyCall) TimedTextLanguage(timedTextLanguage string) *FilesCopyCall {
8459	c.urlParams_.Set("timedTextLanguage", timedTextLanguage)
8460	return c
8461}
8462
8463// TimedTextTrackName sets the optional parameter "timedTextTrackName":
8464// The timed text track name.
8465func (c *FilesCopyCall) TimedTextTrackName(timedTextTrackName string) *FilesCopyCall {
8466	c.urlParams_.Set("timedTextTrackName", timedTextTrackName)
8467	return c
8468}
8469
8470// Visibility sets the optional parameter "visibility": The visibility
8471// of the new file. This parameter is only relevant when the source is
8472// not a native Google Doc and convert=false.
8473//
8474// Possible values:
8475//   "DEFAULT" (default) - The visibility of the new file is determined
8476// by the user's default visibility/sharing policies.
8477//   "PRIVATE" - The new file will be visible to only the owner.
8478func (c *FilesCopyCall) Visibility(visibility string) *FilesCopyCall {
8479	c.urlParams_.Set("visibility", visibility)
8480	return c
8481}
8482
8483// Fields allows partial responses to be retrieved. See
8484// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
8485// for more information.
8486func (c *FilesCopyCall) Fields(s ...googleapi.Field) *FilesCopyCall {
8487	c.urlParams_.Set("fields", googleapi.CombineFields(s))
8488	return c
8489}
8490
8491// Context sets the context to be used in this call's Do method. Any
8492// pending HTTP request will be aborted if the provided context is
8493// canceled.
8494func (c *FilesCopyCall) Context(ctx context.Context) *FilesCopyCall {
8495	c.ctx_ = ctx
8496	return c
8497}
8498
8499// Header returns an http.Header that can be modified by the caller to
8500// add HTTP headers to the request.
8501func (c *FilesCopyCall) Header() http.Header {
8502	if c.header_ == nil {
8503		c.header_ = make(http.Header)
8504	}
8505	return c.header_
8506}
8507
8508func (c *FilesCopyCall) doRequest(alt string) (*http.Response, error) {
8509	reqHeaders := make(http.Header)
8510	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210830")
8511	for k, v := range c.header_ {
8512		reqHeaders[k] = v
8513	}
8514	reqHeaders.Set("User-Agent", c.s.userAgent())
8515	var body io.Reader = nil
8516	body, err := googleapi.WithoutDataWrapper.JSONReader(c.file)
8517	if err != nil {
8518		return nil, err
8519	}
8520	reqHeaders.Set("Content-Type", "application/json")
8521	c.urlParams_.Set("alt", alt)
8522	c.urlParams_.Set("prettyPrint", "false")
8523	urls := googleapi.ResolveRelative(c.s.BasePath, "files/{fileId}/copy")
8524	urls += "?" + c.urlParams_.Encode()
8525	req, err := http.NewRequest("POST", urls, body)
8526	if err != nil {
8527		return nil, err
8528	}
8529	req.Header = reqHeaders
8530	googleapi.Expand(req.URL, map[string]string{
8531		"fileId": c.fileId,
8532	})
8533	return gensupport.SendRequest(c.ctx_, c.s.client, req)
8534}
8535
8536// Do executes the "drive.files.copy" call.
8537// Exactly one of *File or error will be non-nil. Any non-2xx status
8538// code is an error. Response headers are in either
8539// *File.ServerResponse.Header or (if a response was returned at all) in
8540// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
8541// whether the returned error was because http.StatusNotModified was
8542// returned.
8543func (c *FilesCopyCall) Do(opts ...googleapi.CallOption) (*File, error) {
8544	gensupport.SetOptions(c.urlParams_, opts...)
8545	res, err := c.doRequest("json")
8546	if res != nil && res.StatusCode == http.StatusNotModified {
8547		if res.Body != nil {
8548			res.Body.Close()
8549		}
8550		return nil, &googleapi.Error{
8551			Code:   res.StatusCode,
8552			Header: res.Header,
8553		}
8554	}
8555	if err != nil {
8556		return nil, err
8557	}
8558	defer googleapi.CloseBody(res)
8559	if err := googleapi.CheckResponse(res); err != nil {
8560		return nil, err
8561	}
8562	ret := &File{
8563		ServerResponse: googleapi.ServerResponse{
8564			Header:         res.Header,
8565			HTTPStatusCode: res.StatusCode,
8566		},
8567	}
8568	target := &ret
8569	if err := gensupport.DecodeResponse(target, res); err != nil {
8570		return nil, err
8571	}
8572	return ret, nil
8573	// {
8574	//   "description": "Creates a copy of the specified file. Folders cannot be copied.",
8575	//   "httpMethod": "POST",
8576	//   "id": "drive.files.copy",
8577	//   "parameterOrder": [
8578	//     "fileId"
8579	//   ],
8580	//   "parameters": {
8581	//     "convert": {
8582	//       "default": "false",
8583	//       "description": "Whether to convert this file to the corresponding Docs Editors format.",
8584	//       "location": "query",
8585	//       "type": "boolean"
8586	//     },
8587	//     "enforceSingleParent": {
8588	//       "default": "false",
8589	//       "description": "Deprecated. Copying files into multiple folders is no longer supported. Use shortcuts instead.",
8590	//       "location": "query",
8591	//       "type": "boolean"
8592	//     },
8593	//     "fileId": {
8594	//       "description": "The ID of the file to copy.",
8595	//       "location": "path",
8596	//       "required": true,
8597	//       "type": "string"
8598	//     },
8599	//     "includePermissionsForView": {
8600	//       "description": "Specifies which additional view's permissions to include in the response. Only 'published' is supported.",
8601	//       "location": "query",
8602	//       "type": "string"
8603	//     },
8604	//     "ocr": {
8605	//       "default": "false",
8606	//       "description": "Whether to attempt OCR on .jpg, .png, .gif, or .pdf uploads.",
8607	//       "location": "query",
8608	//       "type": "boolean"
8609	//     },
8610	//     "ocrLanguage": {
8611	//       "description": "If ocr is true, hints at the language to use. Valid values are BCP 47 codes.",
8612	//       "location": "query",
8613	//       "type": "string"
8614	//     },
8615	//     "pinned": {
8616	//       "default": "false",
8617	//       "description": "Whether to pin the head revision of the new copy. A file can have a maximum of 200 pinned revisions.",
8618	//       "location": "query",
8619	//       "type": "boolean"
8620	//     },
8621	//     "supportsAllDrives": {
8622	//       "default": "false",
8623	//       "description": "Whether the requesting application supports both My Drives and shared drives.",
8624	//       "location": "query",
8625	//       "type": "boolean"
8626	//     },
8627	//     "supportsTeamDrives": {
8628	//       "default": "false",
8629	//       "description": "Deprecated use supportsAllDrives instead.",
8630	//       "location": "query",
8631	//       "type": "boolean"
8632	//     },
8633	//     "timedTextLanguage": {
8634	//       "description": "The language of the timed text.",
8635	//       "location": "query",
8636	//       "type": "string"
8637	//     },
8638	//     "timedTextTrackName": {
8639	//       "description": "The timed text track name.",
8640	//       "location": "query",
8641	//       "type": "string"
8642	//     },
8643	//     "visibility": {
8644	//       "default": "DEFAULT",
8645	//       "description": "The visibility of the new file. This parameter is only relevant when the source is not a native Google Doc and convert=false.",
8646	//       "enum": [
8647	//         "DEFAULT",
8648	//         "PRIVATE"
8649	//       ],
8650	//       "enumDescriptions": [
8651	//         "The visibility of the new file is determined by the user's default visibility/sharing policies.",
8652	//         "The new file will be visible to only the owner."
8653	//       ],
8654	//       "location": "query",
8655	//       "type": "string"
8656	//     }
8657	//   },
8658	//   "path": "files/{fileId}/copy",
8659	//   "request": {
8660	//     "$ref": "File"
8661	//   },
8662	//   "response": {
8663	//     "$ref": "File"
8664	//   },
8665	//   "scopes": [
8666	//     "https://www.googleapis.com/auth/drive",
8667	//     "https://www.googleapis.com/auth/drive.appdata",
8668	//     "https://www.googleapis.com/auth/drive.apps.readonly",
8669	//     "https://www.googleapis.com/auth/drive.file",
8670	//     "https://www.googleapis.com/auth/drive.photos.readonly"
8671	//   ]
8672	// }
8673
8674}
8675
8676// method id "drive.files.delete":
8677
8678type FilesDeleteCall struct {
8679	s          *Service
8680	fileId     string
8681	urlParams_ gensupport.URLParams
8682	ctx_       context.Context
8683	header_    http.Header
8684}
8685
8686// Delete: Permanently deletes a file by ID. Skips the trash. The
8687// currently authenticated user must own the file or be an organizer on
8688// the parent for shared drive files.
8689//
8690// - fileId: The ID of the file to delete.
8691func (r *FilesService) Delete(fileId string) *FilesDeleteCall {
8692	c := &FilesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
8693	c.fileId = fileId
8694	return c
8695}
8696
8697// EnforceSingleParent sets the optional parameter
8698// "enforceSingleParent": Deprecated. If an item is not in a shared
8699// drive and its last parent is deleted but the item itself is not, the
8700// item will be placed under its owner's root.
8701func (c *FilesDeleteCall) EnforceSingleParent(enforceSingleParent bool) *FilesDeleteCall {
8702	c.urlParams_.Set("enforceSingleParent", fmt.Sprint(enforceSingleParent))
8703	return c
8704}
8705
8706// SupportsAllDrives sets the optional parameter "supportsAllDrives":
8707// Whether the requesting application supports both My Drives and shared
8708// drives.
8709func (c *FilesDeleteCall) SupportsAllDrives(supportsAllDrives bool) *FilesDeleteCall {
8710	c.urlParams_.Set("supportsAllDrives", fmt.Sprint(supportsAllDrives))
8711	return c
8712}
8713
8714// SupportsTeamDrives sets the optional parameter "supportsTeamDrives":
8715// Deprecated use supportsAllDrives instead.
8716func (c *FilesDeleteCall) SupportsTeamDrives(supportsTeamDrives bool) *FilesDeleteCall {
8717	c.urlParams_.Set("supportsTeamDrives", fmt.Sprint(supportsTeamDrives))
8718	return c
8719}
8720
8721// Fields allows partial responses to be retrieved. See
8722// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
8723// for more information.
8724func (c *FilesDeleteCall) Fields(s ...googleapi.Field) *FilesDeleteCall {
8725	c.urlParams_.Set("fields", googleapi.CombineFields(s))
8726	return c
8727}
8728
8729// Context sets the context to be used in this call's Do method. Any
8730// pending HTTP request will be aborted if the provided context is
8731// canceled.
8732func (c *FilesDeleteCall) Context(ctx context.Context) *FilesDeleteCall {
8733	c.ctx_ = ctx
8734	return c
8735}
8736
8737// Header returns an http.Header that can be modified by the caller to
8738// add HTTP headers to the request.
8739func (c *FilesDeleteCall) Header() http.Header {
8740	if c.header_ == nil {
8741		c.header_ = make(http.Header)
8742	}
8743	return c.header_
8744}
8745
8746func (c *FilesDeleteCall) doRequest(alt string) (*http.Response, error) {
8747	reqHeaders := make(http.Header)
8748	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210830")
8749	for k, v := range c.header_ {
8750		reqHeaders[k] = v
8751	}
8752	reqHeaders.Set("User-Agent", c.s.userAgent())
8753	var body io.Reader = nil
8754	c.urlParams_.Set("alt", alt)
8755	c.urlParams_.Set("prettyPrint", "false")
8756	urls := googleapi.ResolveRelative(c.s.BasePath, "files/{fileId}")
8757	urls += "?" + c.urlParams_.Encode()
8758	req, err := http.NewRequest("DELETE", urls, body)
8759	if err != nil {
8760		return nil, err
8761	}
8762	req.Header = reqHeaders
8763	googleapi.Expand(req.URL, map[string]string{
8764		"fileId": c.fileId,
8765	})
8766	return gensupport.SendRequest(c.ctx_, c.s.client, req)
8767}
8768
8769// Do executes the "drive.files.delete" call.
8770func (c *FilesDeleteCall) Do(opts ...googleapi.CallOption) error {
8771	gensupport.SetOptions(c.urlParams_, opts...)
8772	res, err := c.doRequest("json")
8773	if err != nil {
8774		return err
8775	}
8776	defer googleapi.CloseBody(res)
8777	if err := googleapi.CheckResponse(res); err != nil {
8778		return err
8779	}
8780	return nil
8781	// {
8782	//   "description": "Permanently deletes a file by ID. Skips the trash. The currently authenticated user must own the file or be an organizer on the parent for shared drive files.",
8783	//   "httpMethod": "DELETE",
8784	//   "id": "drive.files.delete",
8785	//   "parameterOrder": [
8786	//     "fileId"
8787	//   ],
8788	//   "parameters": {
8789	//     "enforceSingleParent": {
8790	//       "default": "false",
8791	//       "description": "Deprecated. If an item is not in a shared drive and its last parent is deleted but the item itself is not, the item will be placed under its owner's root.",
8792	//       "location": "query",
8793	//       "type": "boolean"
8794	//     },
8795	//     "fileId": {
8796	//       "description": "The ID of the file to delete.",
8797	//       "location": "path",
8798	//       "required": true,
8799	//       "type": "string"
8800	//     },
8801	//     "supportsAllDrives": {
8802	//       "default": "false",
8803	//       "description": "Whether the requesting application supports both My Drives and shared drives.",
8804	//       "location": "query",
8805	//       "type": "boolean"
8806	//     },
8807	//     "supportsTeamDrives": {
8808	//       "default": "false",
8809	//       "description": "Deprecated use supportsAllDrives instead.",
8810	//       "location": "query",
8811	//       "type": "boolean"
8812	//     }
8813	//   },
8814	//   "path": "files/{fileId}",
8815	//   "scopes": [
8816	//     "https://www.googleapis.com/auth/drive",
8817	//     "https://www.googleapis.com/auth/drive.appdata",
8818	//     "https://www.googleapis.com/auth/drive.file"
8819	//   ]
8820	// }
8821
8822}
8823
8824// method id "drive.files.emptyTrash":
8825
8826type FilesEmptyTrashCall struct {
8827	s          *Service
8828	urlParams_ gensupport.URLParams
8829	ctx_       context.Context
8830	header_    http.Header
8831}
8832
8833// EmptyTrash: Permanently deletes all of the user's trashed files.
8834func (r *FilesService) EmptyTrash() *FilesEmptyTrashCall {
8835	c := &FilesEmptyTrashCall{s: r.s, urlParams_: make(gensupport.URLParams)}
8836	return c
8837}
8838
8839// EnforceSingleParent sets the optional parameter
8840// "enforceSingleParent": Deprecated. If an item is not in a shared
8841// drive and its last parent is deleted but the item itself is not, the
8842// item will be placed under its owner's root.
8843func (c *FilesEmptyTrashCall) EnforceSingleParent(enforceSingleParent bool) *FilesEmptyTrashCall {
8844	c.urlParams_.Set("enforceSingleParent", fmt.Sprint(enforceSingleParent))
8845	return c
8846}
8847
8848// Fields allows partial responses to be retrieved. See
8849// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
8850// for more information.
8851func (c *FilesEmptyTrashCall) Fields(s ...googleapi.Field) *FilesEmptyTrashCall {
8852	c.urlParams_.Set("fields", googleapi.CombineFields(s))
8853	return c
8854}
8855
8856// Context sets the context to be used in this call's Do method. Any
8857// pending HTTP request will be aborted if the provided context is
8858// canceled.
8859func (c *FilesEmptyTrashCall) Context(ctx context.Context) *FilesEmptyTrashCall {
8860	c.ctx_ = ctx
8861	return c
8862}
8863
8864// Header returns an http.Header that can be modified by the caller to
8865// add HTTP headers to the request.
8866func (c *FilesEmptyTrashCall) Header() http.Header {
8867	if c.header_ == nil {
8868		c.header_ = make(http.Header)
8869	}
8870	return c.header_
8871}
8872
8873func (c *FilesEmptyTrashCall) doRequest(alt string) (*http.Response, error) {
8874	reqHeaders := make(http.Header)
8875	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210830")
8876	for k, v := range c.header_ {
8877		reqHeaders[k] = v
8878	}
8879	reqHeaders.Set("User-Agent", c.s.userAgent())
8880	var body io.Reader = nil
8881	c.urlParams_.Set("alt", alt)
8882	c.urlParams_.Set("prettyPrint", "false")
8883	urls := googleapi.ResolveRelative(c.s.BasePath, "files/trash")
8884	urls += "?" + c.urlParams_.Encode()
8885	req, err := http.NewRequest("DELETE", urls, body)
8886	if err != nil {
8887		return nil, err
8888	}
8889	req.Header = reqHeaders
8890	return gensupport.SendRequest(c.ctx_, c.s.client, req)
8891}
8892
8893// Do executes the "drive.files.emptyTrash" call.
8894func (c *FilesEmptyTrashCall) Do(opts ...googleapi.CallOption) error {
8895	gensupport.SetOptions(c.urlParams_, opts...)
8896	res, err := c.doRequest("json")
8897	if err != nil {
8898		return err
8899	}
8900	defer googleapi.CloseBody(res)
8901	if err := googleapi.CheckResponse(res); err != nil {
8902		return err
8903	}
8904	return nil
8905	// {
8906	//   "description": "Permanently deletes all of the user's trashed files.",
8907	//   "httpMethod": "DELETE",
8908	//   "id": "drive.files.emptyTrash",
8909	//   "parameters": {
8910	//     "enforceSingleParent": {
8911	//       "default": "false",
8912	//       "description": "Deprecated. If an item is not in a shared drive and its last parent is deleted but the item itself is not, the item will be placed under its owner's root.",
8913	//       "location": "query",
8914	//       "type": "boolean"
8915	//     }
8916	//   },
8917	//   "path": "files/trash",
8918	//   "scopes": [
8919	//     "https://www.googleapis.com/auth/drive"
8920	//   ]
8921	// }
8922
8923}
8924
8925// method id "drive.files.export":
8926
8927type FilesExportCall struct {
8928	s            *Service
8929	fileId       string
8930	urlParams_   gensupport.URLParams
8931	ifNoneMatch_ string
8932	ctx_         context.Context
8933	header_      http.Header
8934}
8935
8936// Export: Exports a Google Doc to the requested MIME type and returns
8937// the exported content. Please note that the exported content is
8938// limited to 10MB.
8939//
8940// - fileId: The ID of the file.
8941// - mimeType: The MIME type of the format requested for this export.
8942func (r *FilesService) Export(fileId string, mimeType string) *FilesExportCall {
8943	c := &FilesExportCall{s: r.s, urlParams_: make(gensupport.URLParams)}
8944	c.fileId = fileId
8945	c.urlParams_.Set("mimeType", mimeType)
8946	return c
8947}
8948
8949// Fields allows partial responses to be retrieved. See
8950// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
8951// for more information.
8952func (c *FilesExportCall) Fields(s ...googleapi.Field) *FilesExportCall {
8953	c.urlParams_.Set("fields", googleapi.CombineFields(s))
8954	return c
8955}
8956
8957// IfNoneMatch sets the optional parameter which makes the operation
8958// fail if the object's ETag matches the given value. This is useful for
8959// getting updates only after the object has changed since the last
8960// request. Use googleapi.IsNotModified to check whether the response
8961// error from Do is the result of In-None-Match.
8962func (c *FilesExportCall) IfNoneMatch(entityTag string) *FilesExportCall {
8963	c.ifNoneMatch_ = entityTag
8964	return c
8965}
8966
8967// Context sets the context to be used in this call's Do and Download
8968// methods. Any pending HTTP request will be aborted if the provided
8969// context is canceled.
8970func (c *FilesExportCall) Context(ctx context.Context) *FilesExportCall {
8971	c.ctx_ = ctx
8972	return c
8973}
8974
8975// Header returns an http.Header that can be modified by the caller to
8976// add HTTP headers to the request.
8977func (c *FilesExportCall) Header() http.Header {
8978	if c.header_ == nil {
8979		c.header_ = make(http.Header)
8980	}
8981	return c.header_
8982}
8983
8984func (c *FilesExportCall) doRequest(alt string) (*http.Response, error) {
8985	reqHeaders := make(http.Header)
8986	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210830")
8987	for k, v := range c.header_ {
8988		reqHeaders[k] = v
8989	}
8990	reqHeaders.Set("User-Agent", c.s.userAgent())
8991	if c.ifNoneMatch_ != "" {
8992		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
8993	}
8994	var body io.Reader = nil
8995	c.urlParams_.Set("alt", alt)
8996	c.urlParams_.Set("prettyPrint", "false")
8997	urls := googleapi.ResolveRelative(c.s.BasePath, "files/{fileId}/export")
8998	urls += "?" + c.urlParams_.Encode()
8999	req, err := http.NewRequest("GET", urls, body)
9000	if err != nil {
9001		return nil, err
9002	}
9003	req.Header = reqHeaders
9004	googleapi.Expand(req.URL, map[string]string{
9005		"fileId": c.fileId,
9006	})
9007	return gensupport.SendRequest(c.ctx_, c.s.client, req)
9008}
9009
9010// Download fetches the API endpoint's "media" value, instead of the normal
9011// API response value. If the returned error is nil, the Response is guaranteed to
9012// have a 2xx status code. Callers must close the Response.Body as usual.
9013func (c *FilesExportCall) Download(opts ...googleapi.CallOption) (*http.Response, error) {
9014	gensupport.SetOptions(c.urlParams_, opts...)
9015	res, err := c.doRequest("media")
9016	if err != nil {
9017		return nil, err
9018	}
9019	if err := googleapi.CheckResponse(res); err != nil {
9020		res.Body.Close()
9021		return nil, err
9022	}
9023	return res, nil
9024}
9025
9026// Do executes the "drive.files.export" call.
9027func (c *FilesExportCall) Do(opts ...googleapi.CallOption) error {
9028	gensupport.SetOptions(c.urlParams_, opts...)
9029	res, err := c.doRequest("json")
9030	if err != nil {
9031		return err
9032	}
9033	defer googleapi.CloseBody(res)
9034	if err := googleapi.CheckResponse(res); err != nil {
9035		return err
9036	}
9037	return nil
9038	// {
9039	//   "description": "Exports a Google Doc to the requested MIME type and returns the exported content. Please note that the exported content is limited to 10MB.",
9040	//   "httpMethod": "GET",
9041	//   "id": "drive.files.export",
9042	//   "parameterOrder": [
9043	//     "fileId",
9044	//     "mimeType"
9045	//   ],
9046	//   "parameters": {
9047	//     "fileId": {
9048	//       "description": "The ID of the file.",
9049	//       "location": "path",
9050	//       "required": true,
9051	//       "type": "string"
9052	//     },
9053	//     "mimeType": {
9054	//       "description": "The MIME type of the format requested for this export.",
9055	//       "location": "query",
9056	//       "required": true,
9057	//       "type": "string"
9058	//     }
9059	//   },
9060	//   "path": "files/{fileId}/export",
9061	//   "scopes": [
9062	//     "https://www.googleapis.com/auth/drive",
9063	//     "https://www.googleapis.com/auth/drive.file",
9064	//     "https://www.googleapis.com/auth/drive.readonly"
9065	//   ],
9066	//   "supportsMediaDownload": true
9067	// }
9068
9069}
9070
9071// method id "drive.files.generateIds":
9072
9073type FilesGenerateIdsCall struct {
9074	s            *Service
9075	urlParams_   gensupport.URLParams
9076	ifNoneMatch_ string
9077	ctx_         context.Context
9078	header_      http.Header
9079}
9080
9081// GenerateIds: Generates a set of file IDs which can be provided in
9082// insert or copy requests.
9083func (r *FilesService) GenerateIds() *FilesGenerateIdsCall {
9084	c := &FilesGenerateIdsCall{s: r.s, urlParams_: make(gensupport.URLParams)}
9085	return c
9086}
9087
9088// MaxResults sets the optional parameter "maxResults": Maximum number
9089// of IDs to return.
9090func (c *FilesGenerateIdsCall) MaxResults(maxResults int64) *FilesGenerateIdsCall {
9091	c.urlParams_.Set("maxResults", fmt.Sprint(maxResults))
9092	return c
9093}
9094
9095// Space sets the optional parameter "space": The space in which the IDs
9096// can be used to create new files. Supported values are 'drive' and
9097// 'appDataFolder'. (Default: 'drive')
9098func (c *FilesGenerateIdsCall) Space(space string) *FilesGenerateIdsCall {
9099	c.urlParams_.Set("space", space)
9100	return c
9101}
9102
9103// Type sets the optional parameter "type": The type of items which the
9104// IDs can be used for. Supported values are 'files' and 'shortcuts'.
9105// Note that 'shortcuts' are only supported in the drive 'space'.
9106// (Default: 'files')
9107func (c *FilesGenerateIdsCall) Type(type_ string) *FilesGenerateIdsCall {
9108	c.urlParams_.Set("type", type_)
9109	return c
9110}
9111
9112// Fields allows partial responses to be retrieved. See
9113// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
9114// for more information.
9115func (c *FilesGenerateIdsCall) Fields(s ...googleapi.Field) *FilesGenerateIdsCall {
9116	c.urlParams_.Set("fields", googleapi.CombineFields(s))
9117	return c
9118}
9119
9120// IfNoneMatch sets the optional parameter which makes the operation
9121// fail if the object's ETag matches the given value. This is useful for
9122// getting updates only after the object has changed since the last
9123// request. Use googleapi.IsNotModified to check whether the response
9124// error from Do is the result of In-None-Match.
9125func (c *FilesGenerateIdsCall) IfNoneMatch(entityTag string) *FilesGenerateIdsCall {
9126	c.ifNoneMatch_ = entityTag
9127	return c
9128}
9129
9130// Context sets the context to be used in this call's Do method. Any
9131// pending HTTP request will be aborted if the provided context is
9132// canceled.
9133func (c *FilesGenerateIdsCall) Context(ctx context.Context) *FilesGenerateIdsCall {
9134	c.ctx_ = ctx
9135	return c
9136}
9137
9138// Header returns an http.Header that can be modified by the caller to
9139// add HTTP headers to the request.
9140func (c *FilesGenerateIdsCall) Header() http.Header {
9141	if c.header_ == nil {
9142		c.header_ = make(http.Header)
9143	}
9144	return c.header_
9145}
9146
9147func (c *FilesGenerateIdsCall) doRequest(alt string) (*http.Response, error) {
9148	reqHeaders := make(http.Header)
9149	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210830")
9150	for k, v := range c.header_ {
9151		reqHeaders[k] = v
9152	}
9153	reqHeaders.Set("User-Agent", c.s.userAgent())
9154	if c.ifNoneMatch_ != "" {
9155		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
9156	}
9157	var body io.Reader = nil
9158	c.urlParams_.Set("alt", alt)
9159	c.urlParams_.Set("prettyPrint", "false")
9160	urls := googleapi.ResolveRelative(c.s.BasePath, "files/generateIds")
9161	urls += "?" + c.urlParams_.Encode()
9162	req, err := http.NewRequest("GET", urls, body)
9163	if err != nil {
9164		return nil, err
9165	}
9166	req.Header = reqHeaders
9167	return gensupport.SendRequest(c.ctx_, c.s.client, req)
9168}
9169
9170// Do executes the "drive.files.generateIds" call.
9171// Exactly one of *GeneratedIds or error will be non-nil. Any non-2xx
9172// status code is an error. Response headers are in either
9173// *GeneratedIds.ServerResponse.Header or (if a response was returned at
9174// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
9175// to check whether the returned error was because
9176// http.StatusNotModified was returned.
9177func (c *FilesGenerateIdsCall) Do(opts ...googleapi.CallOption) (*GeneratedIds, error) {
9178	gensupport.SetOptions(c.urlParams_, opts...)
9179	res, err := c.doRequest("json")
9180	if res != nil && res.StatusCode == http.StatusNotModified {
9181		if res.Body != nil {
9182			res.Body.Close()
9183		}
9184		return nil, &googleapi.Error{
9185			Code:   res.StatusCode,
9186			Header: res.Header,
9187		}
9188	}
9189	if err != nil {
9190		return nil, err
9191	}
9192	defer googleapi.CloseBody(res)
9193	if err := googleapi.CheckResponse(res); err != nil {
9194		return nil, err
9195	}
9196	ret := &GeneratedIds{
9197		ServerResponse: googleapi.ServerResponse{
9198			Header:         res.Header,
9199			HTTPStatusCode: res.StatusCode,
9200		},
9201	}
9202	target := &ret
9203	if err := gensupport.DecodeResponse(target, res); err != nil {
9204		return nil, err
9205	}
9206	return ret, nil
9207	// {
9208	//   "description": "Generates a set of file IDs which can be provided in insert or copy requests.",
9209	//   "httpMethod": "GET",
9210	//   "id": "drive.files.generateIds",
9211	//   "parameters": {
9212	//     "maxResults": {
9213	//       "default": "10",
9214	//       "description": "Maximum number of IDs to return.",
9215	//       "format": "int32",
9216	//       "location": "query",
9217	//       "maximum": "1000",
9218	//       "minimum": "1",
9219	//       "type": "integer"
9220	//     },
9221	//     "space": {
9222	//       "default": "drive",
9223	//       "description": "The space in which the IDs can be used to create new files. Supported values are 'drive' and 'appDataFolder'. (Default: 'drive')",
9224	//       "location": "query",
9225	//       "type": "string"
9226	//     },
9227	//     "type": {
9228	//       "default": "files",
9229	//       "description": "The type of items which the IDs can be used for. Supported values are 'files' and 'shortcuts'. Note that 'shortcuts' are only supported in the drive 'space'. (Default: 'files')",
9230	//       "location": "query",
9231	//       "type": "string"
9232	//     }
9233	//   },
9234	//   "path": "files/generateIds",
9235	//   "response": {
9236	//     "$ref": "GeneratedIds"
9237	//   },
9238	//   "scopes": [
9239	//     "https://www.googleapis.com/auth/drive",
9240	//     "https://www.googleapis.com/auth/drive.appdata",
9241	//     "https://www.googleapis.com/auth/drive.file"
9242	//   ]
9243	// }
9244
9245}
9246
9247// method id "drive.files.get":
9248
9249type FilesGetCall struct {
9250	s            *Service
9251	fileId       string
9252	urlParams_   gensupport.URLParams
9253	ifNoneMatch_ string
9254	ctx_         context.Context
9255	header_      http.Header
9256}
9257
9258// Get: Gets a file's metadata or content by ID.
9259//
9260// - fileId: The ID for the file in question.
9261func (r *FilesService) Get(fileId string) *FilesGetCall {
9262	c := &FilesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
9263	c.fileId = fileId
9264	return c
9265}
9266
9267// AcknowledgeAbuse sets the optional parameter "acknowledgeAbuse":
9268// Whether the user is acknowledging the risk of downloading known
9269// malware or other abusive files.
9270func (c *FilesGetCall) AcknowledgeAbuse(acknowledgeAbuse bool) *FilesGetCall {
9271	c.urlParams_.Set("acknowledgeAbuse", fmt.Sprint(acknowledgeAbuse))
9272	return c
9273}
9274
9275// IncludePermissionsForView sets the optional parameter
9276// "includePermissionsForView": Specifies which additional view's
9277// permissions to include in the response. Only 'published' is
9278// supported.
9279func (c *FilesGetCall) IncludePermissionsForView(includePermissionsForView string) *FilesGetCall {
9280	c.urlParams_.Set("includePermissionsForView", includePermissionsForView)
9281	return c
9282}
9283
9284// Projection sets the optional parameter "projection": This parameter
9285// is deprecated and has no function.
9286//
9287// Possible values:
9288//   "BASIC" - Deprecated
9289//   "FULL" - Deprecated
9290func (c *FilesGetCall) Projection(projection string) *FilesGetCall {
9291	c.urlParams_.Set("projection", projection)
9292	return c
9293}
9294
9295// RevisionId sets the optional parameter "revisionId": Specifies the
9296// Revision ID that should be downloaded. Ignored unless alt=media is
9297// specified.
9298func (c *FilesGetCall) RevisionId(revisionId string) *FilesGetCall {
9299	c.urlParams_.Set("revisionId", revisionId)
9300	return c
9301}
9302
9303// SupportsAllDrives sets the optional parameter "supportsAllDrives":
9304// Whether the requesting application supports both My Drives and shared
9305// drives.
9306func (c *FilesGetCall) SupportsAllDrives(supportsAllDrives bool) *FilesGetCall {
9307	c.urlParams_.Set("supportsAllDrives", fmt.Sprint(supportsAllDrives))
9308	return c
9309}
9310
9311// SupportsTeamDrives sets the optional parameter "supportsTeamDrives":
9312// Deprecated use supportsAllDrives instead.
9313func (c *FilesGetCall) SupportsTeamDrives(supportsTeamDrives bool) *FilesGetCall {
9314	c.urlParams_.Set("supportsTeamDrives", fmt.Sprint(supportsTeamDrives))
9315	return c
9316}
9317
9318// UpdateViewedDate sets the optional parameter "updateViewedDate":
9319// Deprecated: Use files.update with modifiedDateBehavior=noChange,
9320// updateViewedDate=true and an empty request body.
9321func (c *FilesGetCall) UpdateViewedDate(updateViewedDate bool) *FilesGetCall {
9322	c.urlParams_.Set("updateViewedDate", fmt.Sprint(updateViewedDate))
9323	return c
9324}
9325
9326// Fields allows partial responses to be retrieved. See
9327// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
9328// for more information.
9329func (c *FilesGetCall) Fields(s ...googleapi.Field) *FilesGetCall {
9330	c.urlParams_.Set("fields", googleapi.CombineFields(s))
9331	return c
9332}
9333
9334// IfNoneMatch sets the optional parameter which makes the operation
9335// fail if the object's ETag matches the given value. This is useful for
9336// getting updates only after the object has changed since the last
9337// request. Use googleapi.IsNotModified to check whether the response
9338// error from Do is the result of In-None-Match.
9339func (c *FilesGetCall) IfNoneMatch(entityTag string) *FilesGetCall {
9340	c.ifNoneMatch_ = entityTag
9341	return c
9342}
9343
9344// Context sets the context to be used in this call's Do and Download
9345// methods. Any pending HTTP request will be aborted if the provided
9346// context is canceled.
9347func (c *FilesGetCall) Context(ctx context.Context) *FilesGetCall {
9348	c.ctx_ = ctx
9349	return c
9350}
9351
9352// Header returns an http.Header that can be modified by the caller to
9353// add HTTP headers to the request.
9354func (c *FilesGetCall) Header() http.Header {
9355	if c.header_ == nil {
9356		c.header_ = make(http.Header)
9357	}
9358	return c.header_
9359}
9360
9361func (c *FilesGetCall) doRequest(alt string) (*http.Response, error) {
9362	reqHeaders := make(http.Header)
9363	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210830")
9364	for k, v := range c.header_ {
9365		reqHeaders[k] = v
9366	}
9367	reqHeaders.Set("User-Agent", c.s.userAgent())
9368	if c.ifNoneMatch_ != "" {
9369		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
9370	}
9371	var body io.Reader = nil
9372	c.urlParams_.Set("alt", alt)
9373	c.urlParams_.Set("prettyPrint", "false")
9374	urls := googleapi.ResolveRelative(c.s.BasePath, "files/{fileId}")
9375	urls += "?" + c.urlParams_.Encode()
9376	req, err := http.NewRequest("GET", urls, body)
9377	if err != nil {
9378		return nil, err
9379	}
9380	req.Header = reqHeaders
9381	googleapi.Expand(req.URL, map[string]string{
9382		"fileId": c.fileId,
9383	})
9384	return gensupport.SendRequest(c.ctx_, c.s.client, req)
9385}
9386
9387// Download fetches the API endpoint's "media" value, instead of the normal
9388// API response value. If the returned error is nil, the Response is guaranteed to
9389// have a 2xx status code. Callers must close the Response.Body as usual.
9390func (c *FilesGetCall) Download(opts ...googleapi.CallOption) (*http.Response, error) {
9391	gensupport.SetOptions(c.urlParams_, opts...)
9392	res, err := c.doRequest("media")
9393	if err != nil {
9394		return nil, err
9395	}
9396	if err := googleapi.CheckResponse(res); err != nil {
9397		res.Body.Close()
9398		return nil, err
9399	}
9400	return res, nil
9401}
9402
9403// Do executes the "drive.files.get" call.
9404// Exactly one of *File or error will be non-nil. Any non-2xx status
9405// code is an error. Response headers are in either
9406// *File.ServerResponse.Header or (if a response was returned at all) in
9407// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
9408// whether the returned error was because http.StatusNotModified was
9409// returned.
9410func (c *FilesGetCall) Do(opts ...googleapi.CallOption) (*File, error) {
9411	gensupport.SetOptions(c.urlParams_, opts...)
9412	res, err := c.doRequest("json")
9413	if res != nil && res.StatusCode == http.StatusNotModified {
9414		if res.Body != nil {
9415			res.Body.Close()
9416		}
9417		return nil, &googleapi.Error{
9418			Code:   res.StatusCode,
9419			Header: res.Header,
9420		}
9421	}
9422	if err != nil {
9423		return nil, err
9424	}
9425	defer googleapi.CloseBody(res)
9426	if err := googleapi.CheckResponse(res); err != nil {
9427		return nil, err
9428	}
9429	ret := &File{
9430		ServerResponse: googleapi.ServerResponse{
9431			Header:         res.Header,
9432			HTTPStatusCode: res.StatusCode,
9433		},
9434	}
9435	target := &ret
9436	if err := gensupport.DecodeResponse(target, res); err != nil {
9437		return nil, err
9438	}
9439	return ret, nil
9440	// {
9441	//   "description": "Gets a file's metadata or content by ID.",
9442	//   "httpMethod": "GET",
9443	//   "id": "drive.files.get",
9444	//   "parameterOrder": [
9445	//     "fileId"
9446	//   ],
9447	//   "parameters": {
9448	//     "acknowledgeAbuse": {
9449	//       "default": "false",
9450	//       "description": "Whether the user is acknowledging the risk of downloading known malware or other abusive files.",
9451	//       "location": "query",
9452	//       "type": "boolean"
9453	//     },
9454	//     "fileId": {
9455	//       "description": "The ID for the file in question.",
9456	//       "location": "path",
9457	//       "required": true,
9458	//       "type": "string"
9459	//     },
9460	//     "includePermissionsForView": {
9461	//       "description": "Specifies which additional view's permissions to include in the response. Only 'published' is supported.",
9462	//       "location": "query",
9463	//       "type": "string"
9464	//     },
9465	//     "projection": {
9466	//       "description": "This parameter is deprecated and has no function.",
9467	//       "enum": [
9468	//         "BASIC",
9469	//         "FULL"
9470	//       ],
9471	//       "enumDescriptions": [
9472	//         "Deprecated",
9473	//         "Deprecated"
9474	//       ],
9475	//       "location": "query",
9476	//       "type": "string"
9477	//     },
9478	//     "revisionId": {
9479	//       "description": "Specifies the Revision ID that should be downloaded. Ignored unless alt=media is specified.",
9480	//       "location": "query",
9481	//       "type": "string"
9482	//     },
9483	//     "supportsAllDrives": {
9484	//       "default": "false",
9485	//       "description": "Whether the requesting application supports both My Drives and shared drives.",
9486	//       "location": "query",
9487	//       "type": "boolean"
9488	//     },
9489	//     "supportsTeamDrives": {
9490	//       "default": "false",
9491	//       "description": "Deprecated use supportsAllDrives instead.",
9492	//       "location": "query",
9493	//       "type": "boolean"
9494	//     },
9495	//     "updateViewedDate": {
9496	//       "default": "false",
9497	//       "description": "Deprecated: Use files.update with modifiedDateBehavior=noChange, updateViewedDate=true and an empty request body.",
9498	//       "location": "query",
9499	//       "type": "boolean"
9500	//     }
9501	//   },
9502	//   "path": "files/{fileId}",
9503	//   "response": {
9504	//     "$ref": "File"
9505	//   },
9506	//   "scopes": [
9507	//     "https://www.googleapis.com/auth/drive",
9508	//     "https://www.googleapis.com/auth/drive.appdata",
9509	//     "https://www.googleapis.com/auth/drive.file",
9510	//     "https://www.googleapis.com/auth/drive.metadata",
9511	//     "https://www.googleapis.com/auth/drive.metadata.readonly",
9512	//     "https://www.googleapis.com/auth/drive.photos.readonly",
9513	//     "https://www.googleapis.com/auth/drive.readonly"
9514	//   ],
9515	//   "supportsMediaDownload": true,
9516	//   "supportsSubscription": true,
9517	//   "useMediaDownloadService": true
9518	// }
9519
9520}
9521
9522// method id "drive.files.insert":
9523
9524type FilesInsertCall struct {
9525	s          *Service
9526	file       *File
9527	urlParams_ gensupport.URLParams
9528	mediaInfo_ *gensupport.MediaInfo
9529	ctx_       context.Context
9530	header_    http.Header
9531}
9532
9533// Insert: Insert a new file.
9534func (r *FilesService) Insert(file *File) *FilesInsertCall {
9535	c := &FilesInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)}
9536	c.file = file
9537	return c
9538}
9539
9540// Convert sets the optional parameter "convert": Whether to convert
9541// this file to the corresponding Docs Editors format.
9542func (c *FilesInsertCall) Convert(convert bool) *FilesInsertCall {
9543	c.urlParams_.Set("convert", fmt.Sprint(convert))
9544	return c
9545}
9546
9547// EnforceSingleParent sets the optional parameter
9548// "enforceSingleParent": Deprecated. Creating files in multiple folders
9549// is no longer supported.
9550func (c *FilesInsertCall) EnforceSingleParent(enforceSingleParent bool) *FilesInsertCall {
9551	c.urlParams_.Set("enforceSingleParent", fmt.Sprint(enforceSingleParent))
9552	return c
9553}
9554
9555// IncludePermissionsForView sets the optional parameter
9556// "includePermissionsForView": Specifies which additional view's
9557// permissions to include in the response. Only 'published' is
9558// supported.
9559func (c *FilesInsertCall) IncludePermissionsForView(includePermissionsForView string) *FilesInsertCall {
9560	c.urlParams_.Set("includePermissionsForView", includePermissionsForView)
9561	return c
9562}
9563
9564// Ocr sets the optional parameter "ocr": Whether to attempt OCR on
9565// .jpg, .png, .gif, or .pdf uploads.
9566func (c *FilesInsertCall) Ocr(ocr bool) *FilesInsertCall {
9567	c.urlParams_.Set("ocr", fmt.Sprint(ocr))
9568	return c
9569}
9570
9571// OcrLanguage sets the optional parameter "ocrLanguage": If ocr is
9572// true, hints at the language to use. Valid values are BCP 47 codes.
9573func (c *FilesInsertCall) OcrLanguage(ocrLanguage string) *FilesInsertCall {
9574	c.urlParams_.Set("ocrLanguage", ocrLanguage)
9575	return c
9576}
9577
9578// Pinned sets the optional parameter "pinned": Whether to pin the head
9579// revision of the uploaded file. A file can have a maximum of 200
9580// pinned revisions.
9581func (c *FilesInsertCall) Pinned(pinned bool) *FilesInsertCall {
9582	c.urlParams_.Set("pinned", fmt.Sprint(pinned))
9583	return c
9584}
9585
9586// SupportsAllDrives sets the optional parameter "supportsAllDrives":
9587// Whether the requesting application supports both My Drives and shared
9588// drives.
9589func (c *FilesInsertCall) SupportsAllDrives(supportsAllDrives bool) *FilesInsertCall {
9590	c.urlParams_.Set("supportsAllDrives", fmt.Sprint(supportsAllDrives))
9591	return c
9592}
9593
9594// SupportsTeamDrives sets the optional parameter "supportsTeamDrives":
9595// Deprecated use supportsAllDrives instead.
9596func (c *FilesInsertCall) SupportsTeamDrives(supportsTeamDrives bool) *FilesInsertCall {
9597	c.urlParams_.Set("supportsTeamDrives", fmt.Sprint(supportsTeamDrives))
9598	return c
9599}
9600
9601// TimedTextLanguage sets the optional parameter "timedTextLanguage":
9602// The language of the timed text.
9603func (c *FilesInsertCall) TimedTextLanguage(timedTextLanguage string) *FilesInsertCall {
9604	c.urlParams_.Set("timedTextLanguage", timedTextLanguage)
9605	return c
9606}
9607
9608// TimedTextTrackName sets the optional parameter "timedTextTrackName":
9609// The timed text track name.
9610func (c *FilesInsertCall) TimedTextTrackName(timedTextTrackName string) *FilesInsertCall {
9611	c.urlParams_.Set("timedTextTrackName", timedTextTrackName)
9612	return c
9613}
9614
9615// UseContentAsIndexableText sets the optional parameter
9616// "useContentAsIndexableText": Whether to use the content as indexable
9617// text.
9618func (c *FilesInsertCall) UseContentAsIndexableText(useContentAsIndexableText bool) *FilesInsertCall {
9619	c.urlParams_.Set("useContentAsIndexableText", fmt.Sprint(useContentAsIndexableText))
9620	return c
9621}
9622
9623// Visibility sets the optional parameter "visibility": The visibility
9624// of the new file. This parameter is only relevant when convert=false.
9625//
9626// Possible values:
9627//   "DEFAULT" (default) - The visibility of the new file is determined
9628// by the user's default visibility/sharing policies.
9629//   "PRIVATE" - The new file will be visible to only the owner.
9630func (c *FilesInsertCall) Visibility(visibility string) *FilesInsertCall {
9631	c.urlParams_.Set("visibility", visibility)
9632	return c
9633}
9634
9635// Media specifies the media to upload in one or more chunks. The chunk
9636// size may be controlled by supplying a MediaOption generated by
9637// googleapi.ChunkSize. The chunk size defaults to
9638// googleapi.DefaultUploadChunkSize.The Content-Type header used in the
9639// upload request will be determined by sniffing the contents of r,
9640// unless a MediaOption generated by googleapi.ContentType is
9641// supplied.
9642// At most one of Media and ResumableMedia may be set.
9643func (c *FilesInsertCall) Media(r io.Reader, options ...googleapi.MediaOption) *FilesInsertCall {
9644	c.mediaInfo_ = gensupport.NewInfoFromMedia(r, options)
9645	return c
9646}
9647
9648// ResumableMedia specifies the media to upload in chunks and can be
9649// canceled with ctx.
9650//
9651// Deprecated: use Media instead.
9652//
9653// At most one of Media and ResumableMedia may be set. mediaType
9654// identifies the MIME media type of the upload, such as "image/png". If
9655// mediaType is "", it will be auto-detected. The provided ctx will
9656// supersede any context previously provided to the Context method.
9657func (c *FilesInsertCall) ResumableMedia(ctx context.Context, r io.ReaderAt, size int64, mediaType string) *FilesInsertCall {
9658	c.ctx_ = ctx
9659	c.mediaInfo_ = gensupport.NewInfoFromResumableMedia(r, size, mediaType)
9660	return c
9661}
9662
9663// ProgressUpdater provides a callback function that will be called
9664// after every chunk. It should be a low-latency function in order to
9665// not slow down the upload operation. This should only be called when
9666// using ResumableMedia (as opposed to Media).
9667func (c *FilesInsertCall) ProgressUpdater(pu googleapi.ProgressUpdater) *FilesInsertCall {
9668	c.mediaInfo_.SetProgressUpdater(pu)
9669	return c
9670}
9671
9672// Fields allows partial responses to be retrieved. See
9673// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
9674// for more information.
9675func (c *FilesInsertCall) Fields(s ...googleapi.Field) *FilesInsertCall {
9676	c.urlParams_.Set("fields", googleapi.CombineFields(s))
9677	return c
9678}
9679
9680// Context sets the context to be used in this call's Do method. Any
9681// pending HTTP request will be aborted if the provided context is
9682// canceled.
9683// This context will supersede any context previously provided to the
9684// ResumableMedia method.
9685func (c *FilesInsertCall) Context(ctx context.Context) *FilesInsertCall {
9686	c.ctx_ = ctx
9687	return c
9688}
9689
9690// Header returns an http.Header that can be modified by the caller to
9691// add HTTP headers to the request.
9692func (c *FilesInsertCall) Header() http.Header {
9693	if c.header_ == nil {
9694		c.header_ = make(http.Header)
9695	}
9696	return c.header_
9697}
9698
9699func (c *FilesInsertCall) doRequest(alt string) (*http.Response, error) {
9700	reqHeaders := make(http.Header)
9701	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210830")
9702	for k, v := range c.header_ {
9703		reqHeaders[k] = v
9704	}
9705	reqHeaders.Set("User-Agent", c.s.userAgent())
9706	var body io.Reader = nil
9707	body, err := googleapi.WithoutDataWrapper.JSONReader(c.file)
9708	if err != nil {
9709		return nil, err
9710	}
9711	reqHeaders.Set("Content-Type", "application/json")
9712	c.urlParams_.Set("alt", alt)
9713	c.urlParams_.Set("prettyPrint", "false")
9714	urls := googleapi.ResolveRelative(c.s.BasePath, "files")
9715	if c.mediaInfo_ != nil {
9716		urls = googleapi.ResolveRelative(c.s.BasePath, "/upload/drive/v2/files")
9717		c.urlParams_.Set("uploadType", c.mediaInfo_.UploadType())
9718	}
9719	if body == nil {
9720		body = new(bytes.Buffer)
9721		reqHeaders.Set("Content-Type", "application/json")
9722	}
9723	body, getBody, cleanup := c.mediaInfo_.UploadRequest(reqHeaders, body)
9724	defer cleanup()
9725	urls += "?" + c.urlParams_.Encode()
9726	req, err := http.NewRequest("POST", urls, body)
9727	if err != nil {
9728		return nil, err
9729	}
9730	req.Header = reqHeaders
9731	req.GetBody = getBody
9732	return gensupport.SendRequest(c.ctx_, c.s.client, req)
9733}
9734
9735// Do executes the "drive.files.insert" call.
9736// Exactly one of *File or error will be non-nil. Any non-2xx status
9737// code is an error. Response headers are in either
9738// *File.ServerResponse.Header or (if a response was returned at all) in
9739// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
9740// whether the returned error was because http.StatusNotModified was
9741// returned.
9742func (c *FilesInsertCall) Do(opts ...googleapi.CallOption) (*File, error) {
9743	gensupport.SetOptions(c.urlParams_, opts...)
9744	res, err := c.doRequest("json")
9745	if res != nil && res.StatusCode == http.StatusNotModified {
9746		if res.Body != nil {
9747			res.Body.Close()
9748		}
9749		return nil, &googleapi.Error{
9750			Code:   res.StatusCode,
9751			Header: res.Header,
9752		}
9753	}
9754	if err != nil {
9755		return nil, err
9756	}
9757	defer googleapi.CloseBody(res)
9758	if err := googleapi.CheckResponse(res); err != nil {
9759		return nil, err
9760	}
9761	rx := c.mediaInfo_.ResumableUpload(res.Header.Get("Location"))
9762	if rx != nil {
9763		rx.Client = c.s.client
9764		rx.UserAgent = c.s.userAgent()
9765		ctx := c.ctx_
9766		if ctx == nil {
9767			ctx = context.TODO()
9768		}
9769		res, err = rx.Upload(ctx)
9770		if err != nil {
9771			return nil, err
9772		}
9773		defer res.Body.Close()
9774		if err := googleapi.CheckResponse(res); err != nil {
9775			return nil, err
9776		}
9777	}
9778	ret := &File{
9779		ServerResponse: googleapi.ServerResponse{
9780			Header:         res.Header,
9781			HTTPStatusCode: res.StatusCode,
9782		},
9783	}
9784	target := &ret
9785	if err := gensupport.DecodeResponse(target, res); err != nil {
9786		return nil, err
9787	}
9788	return ret, nil
9789	// {
9790	//   "description": "Insert a new file.",
9791	//   "httpMethod": "POST",
9792	//   "id": "drive.files.insert",
9793	//   "mediaUpload": {
9794	//     "accept": [
9795	//       "*/*"
9796	//     ],
9797	//     "maxSize": "5120GB",
9798	//     "protocols": {
9799	//       "resumable": {
9800	//         "multipart": true,
9801	//         "path": "/resumable/upload/drive/v2/files"
9802	//       },
9803	//       "simple": {
9804	//         "multipart": true,
9805	//         "path": "/upload/drive/v2/files"
9806	//       }
9807	//     }
9808	//   },
9809	//   "parameters": {
9810	//     "convert": {
9811	//       "default": "false",
9812	//       "description": "Whether to convert this file to the corresponding Docs Editors format.",
9813	//       "location": "query",
9814	//       "type": "boolean"
9815	//     },
9816	//     "enforceSingleParent": {
9817	//       "default": "false",
9818	//       "description": "Deprecated. Creating files in multiple folders is no longer supported.",
9819	//       "location": "query",
9820	//       "type": "boolean"
9821	//     },
9822	//     "includePermissionsForView": {
9823	//       "description": "Specifies which additional view's permissions to include in the response. Only 'published' is supported.",
9824	//       "location": "query",
9825	//       "type": "string"
9826	//     },
9827	//     "ocr": {
9828	//       "default": "false",
9829	//       "description": "Whether to attempt OCR on .jpg, .png, .gif, or .pdf uploads.",
9830	//       "location": "query",
9831	//       "type": "boolean"
9832	//     },
9833	//     "ocrLanguage": {
9834	//       "description": "If ocr is true, hints at the language to use. Valid values are BCP 47 codes.",
9835	//       "location": "query",
9836	//       "type": "string"
9837	//     },
9838	//     "pinned": {
9839	//       "default": "false",
9840	//       "description": "Whether to pin the head revision of the uploaded file. A file can have a maximum of 200 pinned revisions.",
9841	//       "location": "query",
9842	//       "type": "boolean"
9843	//     },
9844	//     "supportsAllDrives": {
9845	//       "default": "false",
9846	//       "description": "Whether the requesting application supports both My Drives and shared drives.",
9847	//       "location": "query",
9848	//       "type": "boolean"
9849	//     },
9850	//     "supportsTeamDrives": {
9851	//       "default": "false",
9852	//       "description": "Deprecated use supportsAllDrives instead.",
9853	//       "location": "query",
9854	//       "type": "boolean"
9855	//     },
9856	//     "timedTextLanguage": {
9857	//       "description": "The language of the timed text.",
9858	//       "location": "query",
9859	//       "type": "string"
9860	//     },
9861	//     "timedTextTrackName": {
9862	//       "description": "The timed text track name.",
9863	//       "location": "query",
9864	//       "type": "string"
9865	//     },
9866	//     "useContentAsIndexableText": {
9867	//       "default": "false",
9868	//       "description": "Whether to use the content as indexable text.",
9869	//       "location": "query",
9870	//       "type": "boolean"
9871	//     },
9872	//     "visibility": {
9873	//       "default": "DEFAULT",
9874	//       "description": "The visibility of the new file. This parameter is only relevant when convert=false.",
9875	//       "enum": [
9876	//         "DEFAULT",
9877	//         "PRIVATE"
9878	//       ],
9879	//       "enumDescriptions": [
9880	//         "The visibility of the new file is determined by the user's default visibility/sharing policies.",
9881	//         "The new file will be visible to only the owner."
9882	//       ],
9883	//       "location": "query",
9884	//       "type": "string"
9885	//     }
9886	//   },
9887	//   "path": "files",
9888	//   "request": {
9889	//     "$ref": "File"
9890	//   },
9891	//   "response": {
9892	//     "$ref": "File"
9893	//   },
9894	//   "scopes": [
9895	//     "https://www.googleapis.com/auth/drive",
9896	//     "https://www.googleapis.com/auth/drive.appdata",
9897	//     "https://www.googleapis.com/auth/drive.apps.readonly",
9898	//     "https://www.googleapis.com/auth/drive.file"
9899	//   ],
9900	//   "supportsMediaUpload": true,
9901	//   "supportsSubscription": true
9902	// }
9903
9904}
9905
9906// method id "drive.files.list":
9907
9908type FilesListCall struct {
9909	s            *Service
9910	urlParams_   gensupport.URLParams
9911	ifNoneMatch_ string
9912	ctx_         context.Context
9913	header_      http.Header
9914}
9915
9916// List: Lists the user's files.
9917func (r *FilesService) List() *FilesListCall {
9918	c := &FilesListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
9919	return c
9920}
9921
9922// Corpora sets the optional parameter "corpora": Groupings of files to
9923// which the query applies. Supported groupings are: 'user' (files
9924// created by, opened by, or shared directly with the user), 'drive'
9925// (files in the specified shared drive as indicated by the 'driveId'),
9926// 'domain' (files shared to the user's domain), and 'allDrives' (A
9927// combination of 'user' and 'drive' for all drives where the user is a
9928// member). When able, use 'user' or 'drive', instead of 'allDrives',
9929// for efficiency.
9930func (c *FilesListCall) Corpora(corpora string) *FilesListCall {
9931	c.urlParams_.Set("corpora", corpora)
9932	return c
9933}
9934
9935// Corpus sets the optional parameter "corpus": The body of items
9936// (files/documents) to which the query applies. Deprecated: use
9937// 'corpora' instead.
9938//
9939// Possible values:
9940//   "DEFAULT" - The items that the user has accessed.
9941//   "DOMAIN" - Items shared to the user's domain.
9942func (c *FilesListCall) Corpus(corpus string) *FilesListCall {
9943	c.urlParams_.Set("corpus", corpus)
9944	return c
9945}
9946
9947// DriveId sets the optional parameter "driveId": ID of the shared drive
9948// to search.
9949func (c *FilesListCall) DriveId(driveId string) *FilesListCall {
9950	c.urlParams_.Set("driveId", driveId)
9951	return c
9952}
9953
9954// IncludeItemsFromAllDrives sets the optional parameter
9955// "includeItemsFromAllDrives": Whether both My Drive and shared drive
9956// items should be included in results.
9957func (c *FilesListCall) IncludeItemsFromAllDrives(includeItemsFromAllDrives bool) *FilesListCall {
9958	c.urlParams_.Set("includeItemsFromAllDrives", fmt.Sprint(includeItemsFromAllDrives))
9959	return c
9960}
9961
9962// IncludePermissionsForView sets the optional parameter
9963// "includePermissionsForView": Specifies which additional view's
9964// permissions to include in the response. Only 'published' is
9965// supported.
9966func (c *FilesListCall) IncludePermissionsForView(includePermissionsForView string) *FilesListCall {
9967	c.urlParams_.Set("includePermissionsForView", includePermissionsForView)
9968	return c
9969}
9970
9971// IncludeTeamDriveItems sets the optional parameter
9972// "includeTeamDriveItems": Deprecated use includeItemsFromAllDrives
9973// instead.
9974func (c *FilesListCall) IncludeTeamDriveItems(includeTeamDriveItems bool) *FilesListCall {
9975	c.urlParams_.Set("includeTeamDriveItems", fmt.Sprint(includeTeamDriveItems))
9976	return c
9977}
9978
9979// MaxResults sets the optional parameter "maxResults": The maximum
9980// number of files to return per page. Partial or empty result pages are
9981// possible even before the end of the files list has been reached.
9982func (c *FilesListCall) MaxResults(maxResults int64) *FilesListCall {
9983	c.urlParams_.Set("maxResults", fmt.Sprint(maxResults))
9984	return c
9985}
9986
9987// OrderBy sets the optional parameter "orderBy": A comma-separated list
9988// of sort keys. Valid keys are 'createdDate', 'folder',
9989// 'lastViewedByMeDate', 'modifiedByMeDate', 'modifiedDate',
9990// 'quotaBytesUsed', 'recency', 'sharedWithMeDate', 'starred', 'title',
9991// and 'title_natural'. Each key sorts ascending by default, but may be
9992// reversed with the 'desc' modifier. Example usage:
9993// ?orderBy=folder,modifiedDate desc,title. Please note that there is a
9994// current limitation for users with approximately one million files in
9995// which the requested sort order is ignored.
9996func (c *FilesListCall) OrderBy(orderBy string) *FilesListCall {
9997	c.urlParams_.Set("orderBy", orderBy)
9998	return c
9999}
10000
10001// PageToken sets the optional parameter "pageToken": Page token for
10002// files.
10003func (c *FilesListCall) PageToken(pageToken string) *FilesListCall {
10004	c.urlParams_.Set("pageToken", pageToken)
10005	return c
10006}
10007
10008// Projection sets the optional parameter "projection": This parameter
10009// is deprecated and has no function.
10010//
10011// Possible values:
10012//   "BASIC" - Deprecated
10013//   "FULL" - Deprecated
10014func (c *FilesListCall) Projection(projection string) *FilesListCall {
10015	c.urlParams_.Set("projection", projection)
10016	return c
10017}
10018
10019// Q sets the optional parameter "q": Query string for searching files.
10020func (c *FilesListCall) Q(q string) *FilesListCall {
10021	c.urlParams_.Set("q", q)
10022	return c
10023}
10024
10025// Spaces sets the optional parameter "spaces": A comma-separated list
10026// of spaces to query. Supported values are 'drive' and 'appDataFolder'.
10027func (c *FilesListCall) Spaces(spaces string) *FilesListCall {
10028	c.urlParams_.Set("spaces", spaces)
10029	return c
10030}
10031
10032// SupportsAllDrives sets the optional parameter "supportsAllDrives":
10033// Whether the requesting application supports both My Drives and shared
10034// drives.
10035func (c *FilesListCall) SupportsAllDrives(supportsAllDrives bool) *FilesListCall {
10036	c.urlParams_.Set("supportsAllDrives", fmt.Sprint(supportsAllDrives))
10037	return c
10038}
10039
10040// SupportsTeamDrives sets the optional parameter "supportsTeamDrives":
10041// Deprecated use supportsAllDrives instead.
10042func (c *FilesListCall) SupportsTeamDrives(supportsTeamDrives bool) *FilesListCall {
10043	c.urlParams_.Set("supportsTeamDrives", fmt.Sprint(supportsTeamDrives))
10044	return c
10045}
10046
10047// TeamDriveId sets the optional parameter "teamDriveId": Deprecated use
10048// driveId instead.
10049func (c *FilesListCall) TeamDriveId(teamDriveId string) *FilesListCall {
10050	c.urlParams_.Set("teamDriveId", teamDriveId)
10051	return c
10052}
10053
10054// Fields allows partial responses to be retrieved. See
10055// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
10056// for more information.
10057func (c *FilesListCall) Fields(s ...googleapi.Field) *FilesListCall {
10058	c.urlParams_.Set("fields", googleapi.CombineFields(s))
10059	return c
10060}
10061
10062// IfNoneMatch sets the optional parameter which makes the operation
10063// fail if the object's ETag matches the given value. This is useful for
10064// getting updates only after the object has changed since the last
10065// request. Use googleapi.IsNotModified to check whether the response
10066// error from Do is the result of In-None-Match.
10067func (c *FilesListCall) IfNoneMatch(entityTag string) *FilesListCall {
10068	c.ifNoneMatch_ = entityTag
10069	return c
10070}
10071
10072// Context sets the context to be used in this call's Do method. Any
10073// pending HTTP request will be aborted if the provided context is
10074// canceled.
10075func (c *FilesListCall) Context(ctx context.Context) *FilesListCall {
10076	c.ctx_ = ctx
10077	return c
10078}
10079
10080// Header returns an http.Header that can be modified by the caller to
10081// add HTTP headers to the request.
10082func (c *FilesListCall) Header() http.Header {
10083	if c.header_ == nil {
10084		c.header_ = make(http.Header)
10085	}
10086	return c.header_
10087}
10088
10089func (c *FilesListCall) doRequest(alt string) (*http.Response, error) {
10090	reqHeaders := make(http.Header)
10091	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210830")
10092	for k, v := range c.header_ {
10093		reqHeaders[k] = v
10094	}
10095	reqHeaders.Set("User-Agent", c.s.userAgent())
10096	if c.ifNoneMatch_ != "" {
10097		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
10098	}
10099	var body io.Reader = nil
10100	c.urlParams_.Set("alt", alt)
10101	c.urlParams_.Set("prettyPrint", "false")
10102	urls := googleapi.ResolveRelative(c.s.BasePath, "files")
10103	urls += "?" + c.urlParams_.Encode()
10104	req, err := http.NewRequest("GET", urls, body)
10105	if err != nil {
10106		return nil, err
10107	}
10108	req.Header = reqHeaders
10109	return gensupport.SendRequest(c.ctx_, c.s.client, req)
10110}
10111
10112// Do executes the "drive.files.list" call.
10113// Exactly one of *FileList or error will be non-nil. Any non-2xx status
10114// code is an error. Response headers are in either
10115// *FileList.ServerResponse.Header or (if a response was returned at
10116// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
10117// to check whether the returned error was because
10118// http.StatusNotModified was returned.
10119func (c *FilesListCall) Do(opts ...googleapi.CallOption) (*FileList, error) {
10120	gensupport.SetOptions(c.urlParams_, opts...)
10121	res, err := c.doRequest("json")
10122	if res != nil && res.StatusCode == http.StatusNotModified {
10123		if res.Body != nil {
10124			res.Body.Close()
10125		}
10126		return nil, &googleapi.Error{
10127			Code:   res.StatusCode,
10128			Header: res.Header,
10129		}
10130	}
10131	if err != nil {
10132		return nil, err
10133	}
10134	defer googleapi.CloseBody(res)
10135	if err := googleapi.CheckResponse(res); err != nil {
10136		return nil, err
10137	}
10138	ret := &FileList{
10139		ServerResponse: googleapi.ServerResponse{
10140			Header:         res.Header,
10141			HTTPStatusCode: res.StatusCode,
10142		},
10143	}
10144	target := &ret
10145	if err := gensupport.DecodeResponse(target, res); err != nil {
10146		return nil, err
10147	}
10148	return ret, nil
10149	// {
10150	//   "description": "Lists the user's files.",
10151	//   "httpMethod": "GET",
10152	//   "id": "drive.files.list",
10153	//   "parameters": {
10154	//     "corpora": {
10155	//       "description": "Groupings of files to which the query applies. Supported groupings are: 'user' (files created by, opened by, or shared directly with the user), 'drive' (files in the specified shared drive as indicated by the 'driveId'), 'domain' (files shared to the user's domain), and 'allDrives' (A combination of 'user' and 'drive' for all drives where the user is a member). When able, use 'user' or 'drive', instead of 'allDrives', for efficiency.",
10156	//       "location": "query",
10157	//       "type": "string"
10158	//     },
10159	//     "corpus": {
10160	//       "description": "The body of items (files/documents) to which the query applies. Deprecated: use 'corpora' instead.",
10161	//       "enum": [
10162	//         "DEFAULT",
10163	//         "DOMAIN"
10164	//       ],
10165	//       "enumDescriptions": [
10166	//         "The items that the user has accessed.",
10167	//         "Items shared to the user's domain."
10168	//       ],
10169	//       "location": "query",
10170	//       "type": "string"
10171	//     },
10172	//     "driveId": {
10173	//       "description": "ID of the shared drive to search.",
10174	//       "location": "query",
10175	//       "type": "string"
10176	//     },
10177	//     "includeItemsFromAllDrives": {
10178	//       "default": "false",
10179	//       "description": "Whether both My Drive and shared drive items should be included in results.",
10180	//       "location": "query",
10181	//       "type": "boolean"
10182	//     },
10183	//     "includePermissionsForView": {
10184	//       "description": "Specifies which additional view's permissions to include in the response. Only 'published' is supported.",
10185	//       "location": "query",
10186	//       "type": "string"
10187	//     },
10188	//     "includeTeamDriveItems": {
10189	//       "default": "false",
10190	//       "description": "Deprecated use includeItemsFromAllDrives instead.",
10191	//       "location": "query",
10192	//       "type": "boolean"
10193	//     },
10194	//     "maxResults": {
10195	//       "default": "100",
10196	//       "description": "The maximum number of files to return per page. Partial or empty result pages are possible even before the end of the files list has been reached.",
10197	//       "format": "int32",
10198	//       "location": "query",
10199	//       "minimum": "0",
10200	//       "type": "integer"
10201	//     },
10202	//     "orderBy": {
10203	//       "description": "A comma-separated list of sort keys. Valid keys are 'createdDate', 'folder', 'lastViewedByMeDate', 'modifiedByMeDate', 'modifiedDate', 'quotaBytesUsed', 'recency', 'sharedWithMeDate', 'starred', 'title', and 'title_natural'. Each key sorts ascending by default, but may be reversed with the 'desc' modifier. Example usage: ?orderBy=folder,modifiedDate desc,title. Please note that there is a current limitation for users with approximately one million files in which the requested sort order is ignored.",
10204	//       "location": "query",
10205	//       "type": "string"
10206	//     },
10207	//     "pageToken": {
10208	//       "description": "Page token for files.",
10209	//       "location": "query",
10210	//       "type": "string"
10211	//     },
10212	//     "projection": {
10213	//       "description": "This parameter is deprecated and has no function.",
10214	//       "enum": [
10215	//         "BASIC",
10216	//         "FULL"
10217	//       ],
10218	//       "enumDescriptions": [
10219	//         "Deprecated",
10220	//         "Deprecated"
10221	//       ],
10222	//       "location": "query",
10223	//       "type": "string"
10224	//     },
10225	//     "q": {
10226	//       "description": "Query string for searching files.",
10227	//       "location": "query",
10228	//       "type": "string"
10229	//     },
10230	//     "spaces": {
10231	//       "description": "A comma-separated list of spaces to query. Supported values are 'drive' and 'appDataFolder'.",
10232	//       "location": "query",
10233	//       "type": "string"
10234	//     },
10235	//     "supportsAllDrives": {
10236	//       "default": "false",
10237	//       "description": "Whether the requesting application supports both My Drives and shared drives.",
10238	//       "location": "query",
10239	//       "type": "boolean"
10240	//     },
10241	//     "supportsTeamDrives": {
10242	//       "default": "false",
10243	//       "description": "Deprecated use supportsAllDrives instead.",
10244	//       "location": "query",
10245	//       "type": "boolean"
10246	//     },
10247	//     "teamDriveId": {
10248	//       "description": "Deprecated use driveId instead.",
10249	//       "location": "query",
10250	//       "type": "string"
10251	//     }
10252	//   },
10253	//   "path": "files",
10254	//   "response": {
10255	//     "$ref": "FileList"
10256	//   },
10257	//   "scopes": [
10258	//     "https://www.googleapis.com/auth/drive",
10259	//     "https://www.googleapis.com/auth/drive.appdata",
10260	//     "https://www.googleapis.com/auth/drive.apps.readonly",
10261	//     "https://www.googleapis.com/auth/drive.file",
10262	//     "https://www.googleapis.com/auth/drive.metadata",
10263	//     "https://www.googleapis.com/auth/drive.metadata.readonly",
10264	//     "https://www.googleapis.com/auth/drive.photos.readonly",
10265	//     "https://www.googleapis.com/auth/drive.readonly"
10266	//   ]
10267	// }
10268
10269}
10270
10271// Pages invokes f for each page of results.
10272// A non-nil error returned from f will halt the iteration.
10273// The provided context supersedes any context provided to the Context method.
10274func (c *FilesListCall) Pages(ctx context.Context, f func(*FileList) error) error {
10275	c.ctx_ = ctx
10276	defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
10277	for {
10278		x, err := c.Do()
10279		if err != nil {
10280			return err
10281		}
10282		if err := f(x); err != nil {
10283			return err
10284		}
10285		if x.NextPageToken == "" {
10286			return nil
10287		}
10288		c.PageToken(x.NextPageToken)
10289	}
10290}
10291
10292// method id "drive.files.patch":
10293
10294type FilesPatchCall struct {
10295	s          *Service
10296	fileId     string
10297	file       *File
10298	urlParams_ gensupport.URLParams
10299	ctx_       context.Context
10300	header_    http.Header
10301}
10302
10303// Patch: Updates file metadata and/or content. This method supports
10304// patch semantics.
10305//
10306// - fileId: The ID of the file to update.
10307func (r *FilesService) Patch(fileId string, file *File) *FilesPatchCall {
10308	c := &FilesPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
10309	c.fileId = fileId
10310	c.file = file
10311	return c
10312}
10313
10314// AddParents sets the optional parameter "addParents": Comma-separated
10315// list of parent IDs to add.
10316func (c *FilesPatchCall) AddParents(addParents string) *FilesPatchCall {
10317	c.urlParams_.Set("addParents", addParents)
10318	return c
10319}
10320
10321// Convert sets the optional parameter "convert": This parameter is
10322// deprecated and has no function.
10323func (c *FilesPatchCall) Convert(convert bool) *FilesPatchCall {
10324	c.urlParams_.Set("convert", fmt.Sprint(convert))
10325	return c
10326}
10327
10328// EnforceSingleParent sets the optional parameter
10329// "enforceSingleParent": Deprecated. Adding files to multiple folders
10330// is no longer supported. Use shortcuts instead.
10331func (c *FilesPatchCall) EnforceSingleParent(enforceSingleParent bool) *FilesPatchCall {
10332	c.urlParams_.Set("enforceSingleParent", fmt.Sprint(enforceSingleParent))
10333	return c
10334}
10335
10336// IncludePermissionsForView sets the optional parameter
10337// "includePermissionsForView": Specifies which additional view's
10338// permissions to include in the response. Only 'published' is
10339// supported.
10340func (c *FilesPatchCall) IncludePermissionsForView(includePermissionsForView string) *FilesPatchCall {
10341	c.urlParams_.Set("includePermissionsForView", includePermissionsForView)
10342	return c
10343}
10344
10345// ModifiedDateBehavior sets the optional parameter
10346// "modifiedDateBehavior": Determines the behavior in which modifiedDate
10347// is updated. This overrides setModifiedDate.
10348//
10349// Possible values:
10350//   "fromBody" - Set modifiedDate to the value provided in the body of
10351// the request. No change if no value was provided.
10352//   "fromBodyIfNeeded" - Set modifiedDate to the value provided in the
10353// body of the request depending on other contents of the update.
10354//   "fromBodyOrNow" - Set modifiedDate to the value provided in the
10355// body of the request, or to the current time if no value was provided.
10356//   "noChange" - Maintain the previous value of modifiedDate.
10357//   "now" - Set modifiedDate to the current time.
10358//   "nowIfNeeded" - Set modifiedDate to the current time depending on
10359// contents of the update.
10360func (c *FilesPatchCall) ModifiedDateBehavior(modifiedDateBehavior string) *FilesPatchCall {
10361	c.urlParams_.Set("modifiedDateBehavior", modifiedDateBehavior)
10362	return c
10363}
10364
10365// NewRevision sets the optional parameter "newRevision": Whether a blob
10366// upload should create a new revision. If false, the blob data in the
10367// current head revision is replaced. If true or not set, a new blob is
10368// created as head revision, and previous unpinned revisions are
10369// preserved for a short period of time. Pinned revisions are stored
10370// indefinitely, using additional storage quota, up to a maximum of 200
10371// revisions. For details on how revisions are retained, see the Drive
10372// Help Center. Note that this field is ignored if there is no payload
10373// in the request.
10374func (c *FilesPatchCall) NewRevision(newRevision bool) *FilesPatchCall {
10375	c.urlParams_.Set("newRevision", fmt.Sprint(newRevision))
10376	return c
10377}
10378
10379// Ocr sets the optional parameter "ocr": Whether to attempt OCR on
10380// .jpg, .png, .gif, or .pdf uploads.
10381func (c *FilesPatchCall) Ocr(ocr bool) *FilesPatchCall {
10382	c.urlParams_.Set("ocr", fmt.Sprint(ocr))
10383	return c
10384}
10385
10386// OcrLanguage sets the optional parameter "ocrLanguage": If ocr is
10387// true, hints at the language to use. Valid values are BCP 47 codes.
10388func (c *FilesPatchCall) OcrLanguage(ocrLanguage string) *FilesPatchCall {
10389	c.urlParams_.Set("ocrLanguage", ocrLanguage)
10390	return c
10391}
10392
10393// Pinned sets the optional parameter "pinned": Whether to pin the new
10394// revision. A file can have a maximum of 200 pinned revisions. Note
10395// that this field is ignored if there is no payload in the request.
10396func (c *FilesPatchCall) Pinned(pinned bool) *FilesPatchCall {
10397	c.urlParams_.Set("pinned", fmt.Sprint(pinned))
10398	return c
10399}
10400
10401// RemoveParents sets the optional parameter "removeParents":
10402// Comma-separated list of parent IDs to remove.
10403func (c *FilesPatchCall) RemoveParents(removeParents string) *FilesPatchCall {
10404	c.urlParams_.Set("removeParents", removeParents)
10405	return c
10406}
10407
10408// SetModifiedDate sets the optional parameter "setModifiedDate":
10409// Whether to set the modified date using the value supplied in the
10410// request body. Setting this field to true is equivalent to
10411// modifiedDateBehavior=fromBodyOrNow, and false is equivalent to
10412// modifiedDateBehavior=now. To prevent any changes to the modified date
10413// set modifiedDateBehavior=noChange.
10414func (c *FilesPatchCall) SetModifiedDate(setModifiedDate bool) *FilesPatchCall {
10415	c.urlParams_.Set("setModifiedDate", fmt.Sprint(setModifiedDate))
10416	return c
10417}
10418
10419// SupportsAllDrives sets the optional parameter "supportsAllDrives":
10420// Whether the requesting application supports both My Drives and shared
10421// drives.
10422func (c *FilesPatchCall) SupportsAllDrives(supportsAllDrives bool) *FilesPatchCall {
10423	c.urlParams_.Set("supportsAllDrives", fmt.Sprint(supportsAllDrives))
10424	return c
10425}
10426
10427// SupportsTeamDrives sets the optional parameter "supportsTeamDrives":
10428// Deprecated use supportsAllDrives instead.
10429func (c *FilesPatchCall) SupportsTeamDrives(supportsTeamDrives bool) *FilesPatchCall {
10430	c.urlParams_.Set("supportsTeamDrives", fmt.Sprint(supportsTeamDrives))
10431	return c
10432}
10433
10434// TimedTextLanguage sets the optional parameter "timedTextLanguage":
10435// The language of the timed text.
10436func (c *FilesPatchCall) TimedTextLanguage(timedTextLanguage string) *FilesPatchCall {
10437	c.urlParams_.Set("timedTextLanguage", timedTextLanguage)
10438	return c
10439}
10440
10441// TimedTextTrackName sets the optional parameter "timedTextTrackName":
10442// The timed text track name.
10443func (c *FilesPatchCall) TimedTextTrackName(timedTextTrackName string) *FilesPatchCall {
10444	c.urlParams_.Set("timedTextTrackName", timedTextTrackName)
10445	return c
10446}
10447
10448// UpdateViewedDate sets the optional parameter "updateViewedDate":
10449// Whether to update the view date after successfully updating the file.
10450func (c *FilesPatchCall) UpdateViewedDate(updateViewedDate bool) *FilesPatchCall {
10451	c.urlParams_.Set("updateViewedDate", fmt.Sprint(updateViewedDate))
10452	return c
10453}
10454
10455// UseContentAsIndexableText sets the optional parameter
10456// "useContentAsIndexableText": Whether to use the content as indexable
10457// text.
10458func (c *FilesPatchCall) UseContentAsIndexableText(useContentAsIndexableText bool) *FilesPatchCall {
10459	c.urlParams_.Set("useContentAsIndexableText", fmt.Sprint(useContentAsIndexableText))
10460	return c
10461}
10462
10463// Fields allows partial responses to be retrieved. See
10464// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
10465// for more information.
10466func (c *FilesPatchCall) Fields(s ...googleapi.Field) *FilesPatchCall {
10467	c.urlParams_.Set("fields", googleapi.CombineFields(s))
10468	return c
10469}
10470
10471// Context sets the context to be used in this call's Do method. Any
10472// pending HTTP request will be aborted if the provided context is
10473// canceled.
10474func (c *FilesPatchCall) Context(ctx context.Context) *FilesPatchCall {
10475	c.ctx_ = ctx
10476	return c
10477}
10478
10479// Header returns an http.Header that can be modified by the caller to
10480// add HTTP headers to the request.
10481func (c *FilesPatchCall) Header() http.Header {
10482	if c.header_ == nil {
10483		c.header_ = make(http.Header)
10484	}
10485	return c.header_
10486}
10487
10488func (c *FilesPatchCall) doRequest(alt string) (*http.Response, error) {
10489	reqHeaders := make(http.Header)
10490	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210830")
10491	for k, v := range c.header_ {
10492		reqHeaders[k] = v
10493	}
10494	reqHeaders.Set("User-Agent", c.s.userAgent())
10495	var body io.Reader = nil
10496	body, err := googleapi.WithoutDataWrapper.JSONReader(c.file)
10497	if err != nil {
10498		return nil, err
10499	}
10500	reqHeaders.Set("Content-Type", "application/json")
10501	c.urlParams_.Set("alt", alt)
10502	c.urlParams_.Set("prettyPrint", "false")
10503	urls := googleapi.ResolveRelative(c.s.BasePath, "files/{fileId}")
10504	urls += "?" + c.urlParams_.Encode()
10505	req, err := http.NewRequest("PATCH", urls, body)
10506	if err != nil {
10507		return nil, err
10508	}
10509	req.Header = reqHeaders
10510	googleapi.Expand(req.URL, map[string]string{
10511		"fileId": c.fileId,
10512	})
10513	return gensupport.SendRequest(c.ctx_, c.s.client, req)
10514}
10515
10516// Do executes the "drive.files.patch" call.
10517// Exactly one of *File or error will be non-nil. Any non-2xx status
10518// code is an error. Response headers are in either
10519// *File.ServerResponse.Header or (if a response was returned at all) in
10520// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
10521// whether the returned error was because http.StatusNotModified was
10522// returned.
10523func (c *FilesPatchCall) Do(opts ...googleapi.CallOption) (*File, error) {
10524	gensupport.SetOptions(c.urlParams_, opts...)
10525	res, err := c.doRequest("json")
10526	if res != nil && res.StatusCode == http.StatusNotModified {
10527		if res.Body != nil {
10528			res.Body.Close()
10529		}
10530		return nil, &googleapi.Error{
10531			Code:   res.StatusCode,
10532			Header: res.Header,
10533		}
10534	}
10535	if err != nil {
10536		return nil, err
10537	}
10538	defer googleapi.CloseBody(res)
10539	if err := googleapi.CheckResponse(res); err != nil {
10540		return nil, err
10541	}
10542	ret := &File{
10543		ServerResponse: googleapi.ServerResponse{
10544			Header:         res.Header,
10545			HTTPStatusCode: res.StatusCode,
10546		},
10547	}
10548	target := &ret
10549	if err := gensupport.DecodeResponse(target, res); err != nil {
10550		return nil, err
10551	}
10552	return ret, nil
10553	// {
10554	//   "description": "Updates file metadata and/or content. This method supports patch semantics.",
10555	//   "httpMethod": "PATCH",
10556	//   "id": "drive.files.patch",
10557	//   "parameterOrder": [
10558	//     "fileId"
10559	//   ],
10560	//   "parameters": {
10561	//     "addParents": {
10562	//       "description": "Comma-separated list of parent IDs to add.",
10563	//       "location": "query",
10564	//       "type": "string"
10565	//     },
10566	//     "convert": {
10567	//       "default": "false",
10568	//       "description": "This parameter is deprecated and has no function.",
10569	//       "location": "query",
10570	//       "type": "boolean"
10571	//     },
10572	//     "enforceSingleParent": {
10573	//       "default": "false",
10574	//       "description": "Deprecated. Adding files to multiple folders is no longer supported. Use shortcuts instead.",
10575	//       "location": "query",
10576	//       "type": "boolean"
10577	//     },
10578	//     "fileId": {
10579	//       "description": "The ID of the file to update.",
10580	//       "location": "path",
10581	//       "required": true,
10582	//       "type": "string"
10583	//     },
10584	//     "includePermissionsForView": {
10585	//       "description": "Specifies which additional view's permissions to include in the response. Only 'published' is supported.",
10586	//       "location": "query",
10587	//       "type": "string"
10588	//     },
10589	//     "modifiedDateBehavior": {
10590	//       "description": "Determines the behavior in which modifiedDate is updated. This overrides setModifiedDate.",
10591	//       "enum": [
10592	//         "fromBody",
10593	//         "fromBodyIfNeeded",
10594	//         "fromBodyOrNow",
10595	//         "noChange",
10596	//         "now",
10597	//         "nowIfNeeded"
10598	//       ],
10599	//       "enumDescriptions": [
10600	//         "Set modifiedDate to the value provided in the body of the request. No change if no value was provided.",
10601	//         "Set modifiedDate to the value provided in the body of the request depending on other contents of the update.",
10602	//         "Set modifiedDate to the value provided in the body of the request, or to the current time if no value was provided.",
10603	//         "Maintain the previous value of modifiedDate.",
10604	//         "Set modifiedDate to the current time.",
10605	//         "Set modifiedDate to the current time depending on contents of the update."
10606	//       ],
10607	//       "location": "query",
10608	//       "type": "string"
10609	//     },
10610	//     "newRevision": {
10611	//       "default": "true",
10612	//       "description": "Whether a blob upload should create a new revision. If false, the blob data in the current head revision is replaced. If true or not set, a new blob is created as head revision, and previous unpinned revisions are preserved for a short period of time. Pinned revisions are stored indefinitely, using additional storage quota, up to a maximum of 200 revisions. For details on how revisions are retained, see the Drive Help Center. Note that this field is ignored if there is no payload in the request.",
10613	//       "location": "query",
10614	//       "type": "boolean"
10615	//     },
10616	//     "ocr": {
10617	//       "default": "false",
10618	//       "description": "Whether to attempt OCR on .jpg, .png, .gif, or .pdf uploads.",
10619	//       "location": "query",
10620	//       "type": "boolean"
10621	//     },
10622	//     "ocrLanguage": {
10623	//       "description": "If ocr is true, hints at the language to use. Valid values are BCP 47 codes.",
10624	//       "location": "query",
10625	//       "type": "string"
10626	//     },
10627	//     "pinned": {
10628	//       "default": "false",
10629	//       "description": "Whether to pin the new revision. A file can have a maximum of 200 pinned revisions. Note that this field is ignored if there is no payload in the request.",
10630	//       "location": "query",
10631	//       "type": "boolean"
10632	//     },
10633	//     "removeParents": {
10634	//       "description": "Comma-separated list of parent IDs to remove.",
10635	//       "location": "query",
10636	//       "type": "string"
10637	//     },
10638	//     "setModifiedDate": {
10639	//       "default": "false",
10640	//       "description": "Whether to set the modified date using the value supplied in the request body. Setting this field to true is equivalent to modifiedDateBehavior=fromBodyOrNow, and false is equivalent to modifiedDateBehavior=now. To prevent any changes to the modified date set modifiedDateBehavior=noChange.",
10641	//       "location": "query",
10642	//       "type": "boolean"
10643	//     },
10644	//     "supportsAllDrives": {
10645	//       "default": "false",
10646	//       "description": "Whether the requesting application supports both My Drives and shared drives.",
10647	//       "location": "query",
10648	//       "type": "boolean"
10649	//     },
10650	//     "supportsTeamDrives": {
10651	//       "default": "false",
10652	//       "description": "Deprecated use supportsAllDrives instead.",
10653	//       "location": "query",
10654	//       "type": "boolean"
10655	//     },
10656	//     "timedTextLanguage": {
10657	//       "description": "The language of the timed text.",
10658	//       "location": "query",
10659	//       "type": "string"
10660	//     },
10661	//     "timedTextTrackName": {
10662	//       "description": "The timed text track name.",
10663	//       "location": "query",
10664	//       "type": "string"
10665	//     },
10666	//     "updateViewedDate": {
10667	//       "default": "true",
10668	//       "description": "Whether to update the view date after successfully updating the file.",
10669	//       "location": "query",
10670	//       "type": "boolean"
10671	//     },
10672	//     "useContentAsIndexableText": {
10673	//       "default": "false",
10674	//       "description": "Whether to use the content as indexable text.",
10675	//       "location": "query",
10676	//       "type": "boolean"
10677	//     }
10678	//   },
10679	//   "path": "files/{fileId}",
10680	//   "request": {
10681	//     "$ref": "File"
10682	//   },
10683	//   "response": {
10684	//     "$ref": "File"
10685	//   },
10686	//   "scopes": [
10687	//     "https://www.googleapis.com/auth/drive",
10688	//     "https://www.googleapis.com/auth/drive.appdata",
10689	//     "https://www.googleapis.com/auth/drive.apps.readonly",
10690	//     "https://www.googleapis.com/auth/drive.file",
10691	//     "https://www.googleapis.com/auth/drive.metadata",
10692	//     "https://www.googleapis.com/auth/drive.scripts"
10693	//   ]
10694	// }
10695
10696}
10697
10698// method id "drive.files.touch":
10699
10700type FilesTouchCall struct {
10701	s          *Service
10702	fileId     string
10703	urlParams_ gensupport.URLParams
10704	ctx_       context.Context
10705	header_    http.Header
10706}
10707
10708// Touch: Set the file's updated time to the current server time.
10709//
10710// - fileId: The ID of the file to update.
10711func (r *FilesService) Touch(fileId string) *FilesTouchCall {
10712	c := &FilesTouchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
10713	c.fileId = fileId
10714	return c
10715}
10716
10717// IncludePermissionsForView sets the optional parameter
10718// "includePermissionsForView": Specifies which additional view's
10719// permissions to include in the response. Only 'published' is
10720// supported.
10721func (c *FilesTouchCall) IncludePermissionsForView(includePermissionsForView string) *FilesTouchCall {
10722	c.urlParams_.Set("includePermissionsForView", includePermissionsForView)
10723	return c
10724}
10725
10726// SupportsAllDrives sets the optional parameter "supportsAllDrives":
10727// Whether the requesting application supports both My Drives and shared
10728// drives.
10729func (c *FilesTouchCall) SupportsAllDrives(supportsAllDrives bool) *FilesTouchCall {
10730	c.urlParams_.Set("supportsAllDrives", fmt.Sprint(supportsAllDrives))
10731	return c
10732}
10733
10734// SupportsTeamDrives sets the optional parameter "supportsTeamDrives":
10735// Deprecated use supportsAllDrives instead.
10736func (c *FilesTouchCall) SupportsTeamDrives(supportsTeamDrives bool) *FilesTouchCall {
10737	c.urlParams_.Set("supportsTeamDrives", fmt.Sprint(supportsTeamDrives))
10738	return c
10739}
10740
10741// Fields allows partial responses to be retrieved. See
10742// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
10743// for more information.
10744func (c *FilesTouchCall) Fields(s ...googleapi.Field) *FilesTouchCall {
10745	c.urlParams_.Set("fields", googleapi.CombineFields(s))
10746	return c
10747}
10748
10749// Context sets the context to be used in this call's Do method. Any
10750// pending HTTP request will be aborted if the provided context is
10751// canceled.
10752func (c *FilesTouchCall) Context(ctx context.Context) *FilesTouchCall {
10753	c.ctx_ = ctx
10754	return c
10755}
10756
10757// Header returns an http.Header that can be modified by the caller to
10758// add HTTP headers to the request.
10759func (c *FilesTouchCall) Header() http.Header {
10760	if c.header_ == nil {
10761		c.header_ = make(http.Header)
10762	}
10763	return c.header_
10764}
10765
10766func (c *FilesTouchCall) doRequest(alt string) (*http.Response, error) {
10767	reqHeaders := make(http.Header)
10768	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210830")
10769	for k, v := range c.header_ {
10770		reqHeaders[k] = v
10771	}
10772	reqHeaders.Set("User-Agent", c.s.userAgent())
10773	var body io.Reader = nil
10774	c.urlParams_.Set("alt", alt)
10775	c.urlParams_.Set("prettyPrint", "false")
10776	urls := googleapi.ResolveRelative(c.s.BasePath, "files/{fileId}/touch")
10777	urls += "?" + c.urlParams_.Encode()
10778	req, err := http.NewRequest("POST", urls, body)
10779	if err != nil {
10780		return nil, err
10781	}
10782	req.Header = reqHeaders
10783	googleapi.Expand(req.URL, map[string]string{
10784		"fileId": c.fileId,
10785	})
10786	return gensupport.SendRequest(c.ctx_, c.s.client, req)
10787}
10788
10789// Do executes the "drive.files.touch" call.
10790// Exactly one of *File or error will be non-nil. Any non-2xx status
10791// code is an error. Response headers are in either
10792// *File.ServerResponse.Header or (if a response was returned at all) in
10793// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
10794// whether the returned error was because http.StatusNotModified was
10795// returned.
10796func (c *FilesTouchCall) Do(opts ...googleapi.CallOption) (*File, error) {
10797	gensupport.SetOptions(c.urlParams_, opts...)
10798	res, err := c.doRequest("json")
10799	if res != nil && res.StatusCode == http.StatusNotModified {
10800		if res.Body != nil {
10801			res.Body.Close()
10802		}
10803		return nil, &googleapi.Error{
10804			Code:   res.StatusCode,
10805			Header: res.Header,
10806		}
10807	}
10808	if err != nil {
10809		return nil, err
10810	}
10811	defer googleapi.CloseBody(res)
10812	if err := googleapi.CheckResponse(res); err != nil {
10813		return nil, err
10814	}
10815	ret := &File{
10816		ServerResponse: googleapi.ServerResponse{
10817			Header:         res.Header,
10818			HTTPStatusCode: res.StatusCode,
10819		},
10820	}
10821	target := &ret
10822	if err := gensupport.DecodeResponse(target, res); err != nil {
10823		return nil, err
10824	}
10825	return ret, nil
10826	// {
10827	//   "description": "Set the file's updated time to the current server time.",
10828	//   "httpMethod": "POST",
10829	//   "id": "drive.files.touch",
10830	//   "parameterOrder": [
10831	//     "fileId"
10832	//   ],
10833	//   "parameters": {
10834	//     "fileId": {
10835	//       "description": "The ID of the file to update.",
10836	//       "location": "path",
10837	//       "required": true,
10838	//       "type": "string"
10839	//     },
10840	//     "includePermissionsForView": {
10841	//       "description": "Specifies which additional view's permissions to include in the response. Only 'published' is supported.",
10842	//       "location": "query",
10843	//       "type": "string"
10844	//     },
10845	//     "supportsAllDrives": {
10846	//       "default": "false",
10847	//       "description": "Whether the requesting application supports both My Drives and shared drives.",
10848	//       "location": "query",
10849	//       "type": "boolean"
10850	//     },
10851	//     "supportsTeamDrives": {
10852	//       "default": "false",
10853	//       "description": "Deprecated use supportsAllDrives instead.",
10854	//       "location": "query",
10855	//       "type": "boolean"
10856	//     }
10857	//   },
10858	//   "path": "files/{fileId}/touch",
10859	//   "response": {
10860	//     "$ref": "File"
10861	//   },
10862	//   "scopes": [
10863	//     "https://www.googleapis.com/auth/drive",
10864	//     "https://www.googleapis.com/auth/drive.appdata",
10865	//     "https://www.googleapis.com/auth/drive.apps.readonly",
10866	//     "https://www.googleapis.com/auth/drive.file",
10867	//     "https://www.googleapis.com/auth/drive.metadata"
10868	//   ]
10869	// }
10870
10871}
10872
10873// method id "drive.files.trash":
10874
10875type FilesTrashCall struct {
10876	s          *Service
10877	fileId     string
10878	urlParams_ gensupport.URLParams
10879	ctx_       context.Context
10880	header_    http.Header
10881}
10882
10883// Trash: Moves a file to the trash. The currently authenticated user
10884// must own the file or be at least a fileOrganizer on the parent for
10885// shared drive files. Only the owner may trash a file. The trashed item
10886// is excluded from all files.list responses returned for any user who
10887// does not own the file. However, all users with access to the file can
10888// see the trashed item metadata in an API response. All users with
10889// access can copy, download, export, and share the file.
10890//
10891// - fileId: The ID of the file to trash.
10892func (r *FilesService) Trash(fileId string) *FilesTrashCall {
10893	c := &FilesTrashCall{s: r.s, urlParams_: make(gensupport.URLParams)}
10894	c.fileId = fileId
10895	return c
10896}
10897
10898// IncludePermissionsForView sets the optional parameter
10899// "includePermissionsForView": Specifies which additional view's
10900// permissions to include in the response. Only 'published' is
10901// supported.
10902func (c *FilesTrashCall) IncludePermissionsForView(includePermissionsForView string) *FilesTrashCall {
10903	c.urlParams_.Set("includePermissionsForView", includePermissionsForView)
10904	return c
10905}
10906
10907// SupportsAllDrives sets the optional parameter "supportsAllDrives":
10908// Whether the requesting application supports both My Drives and shared
10909// drives.
10910func (c *FilesTrashCall) SupportsAllDrives(supportsAllDrives bool) *FilesTrashCall {
10911	c.urlParams_.Set("supportsAllDrives", fmt.Sprint(supportsAllDrives))
10912	return c
10913}
10914
10915// SupportsTeamDrives sets the optional parameter "supportsTeamDrives":
10916// Deprecated use supportsAllDrives instead.
10917func (c *FilesTrashCall) SupportsTeamDrives(supportsTeamDrives bool) *FilesTrashCall {
10918	c.urlParams_.Set("supportsTeamDrives", fmt.Sprint(supportsTeamDrives))
10919	return c
10920}
10921
10922// Fields allows partial responses to be retrieved. See
10923// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
10924// for more information.
10925func (c *FilesTrashCall) Fields(s ...googleapi.Field) *FilesTrashCall {
10926	c.urlParams_.Set("fields", googleapi.CombineFields(s))
10927	return c
10928}
10929
10930// Context sets the context to be used in this call's Do method. Any
10931// pending HTTP request will be aborted if the provided context is
10932// canceled.
10933func (c *FilesTrashCall) Context(ctx context.Context) *FilesTrashCall {
10934	c.ctx_ = ctx
10935	return c
10936}
10937
10938// Header returns an http.Header that can be modified by the caller to
10939// add HTTP headers to the request.
10940func (c *FilesTrashCall) Header() http.Header {
10941	if c.header_ == nil {
10942		c.header_ = make(http.Header)
10943	}
10944	return c.header_
10945}
10946
10947func (c *FilesTrashCall) doRequest(alt string) (*http.Response, error) {
10948	reqHeaders := make(http.Header)
10949	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210830")
10950	for k, v := range c.header_ {
10951		reqHeaders[k] = v
10952	}
10953	reqHeaders.Set("User-Agent", c.s.userAgent())
10954	var body io.Reader = nil
10955	c.urlParams_.Set("alt", alt)
10956	c.urlParams_.Set("prettyPrint", "false")
10957	urls := googleapi.ResolveRelative(c.s.BasePath, "files/{fileId}/trash")
10958	urls += "?" + c.urlParams_.Encode()
10959	req, err := http.NewRequest("POST", urls, body)
10960	if err != nil {
10961		return nil, err
10962	}
10963	req.Header = reqHeaders
10964	googleapi.Expand(req.URL, map[string]string{
10965		"fileId": c.fileId,
10966	})
10967	return gensupport.SendRequest(c.ctx_, c.s.client, req)
10968}
10969
10970// Do executes the "drive.files.trash" call.
10971// Exactly one of *File or error will be non-nil. Any non-2xx status
10972// code is an error. Response headers are in either
10973// *File.ServerResponse.Header or (if a response was returned at all) in
10974// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
10975// whether the returned error was because http.StatusNotModified was
10976// returned.
10977func (c *FilesTrashCall) Do(opts ...googleapi.CallOption) (*File, error) {
10978	gensupport.SetOptions(c.urlParams_, opts...)
10979	res, err := c.doRequest("json")
10980	if res != nil && res.StatusCode == http.StatusNotModified {
10981		if res.Body != nil {
10982			res.Body.Close()
10983		}
10984		return nil, &googleapi.Error{
10985			Code:   res.StatusCode,
10986			Header: res.Header,
10987		}
10988	}
10989	if err != nil {
10990		return nil, err
10991	}
10992	defer googleapi.CloseBody(res)
10993	if err := googleapi.CheckResponse(res); err != nil {
10994		return nil, err
10995	}
10996	ret := &File{
10997		ServerResponse: googleapi.ServerResponse{
10998			Header:         res.Header,
10999			HTTPStatusCode: res.StatusCode,
11000		},
11001	}
11002	target := &ret
11003	if err := gensupport.DecodeResponse(target, res); err != nil {
11004		return nil, err
11005	}
11006	return ret, nil
11007	// {
11008	//   "description": "Moves a file to the trash. The currently authenticated user must own the file or be at least a fileOrganizer on the parent for shared drive files. Only the owner may trash a file. The trashed item is excluded from all files.list responses returned for any user who does not own the file. However, all users with access to the file can see the trashed item metadata in an API response. All users with access can copy, download, export, and share the file.",
11009	//   "httpMethod": "POST",
11010	//   "id": "drive.files.trash",
11011	//   "parameterOrder": [
11012	//     "fileId"
11013	//   ],
11014	//   "parameters": {
11015	//     "fileId": {
11016	//       "description": "The ID of the file to trash.",
11017	//       "location": "path",
11018	//       "required": true,
11019	//       "type": "string"
11020	//     },
11021	//     "includePermissionsForView": {
11022	//       "description": "Specifies which additional view's permissions to include in the response. Only 'published' is supported.",
11023	//       "location": "query",
11024	//       "type": "string"
11025	//     },
11026	//     "supportsAllDrives": {
11027	//       "default": "false",
11028	//       "description": "Whether the requesting application supports both My Drives and shared drives.",
11029	//       "location": "query",
11030	//       "type": "boolean"
11031	//     },
11032	//     "supportsTeamDrives": {
11033	//       "default": "false",
11034	//       "description": "Deprecated use supportsAllDrives instead.",
11035	//       "location": "query",
11036	//       "type": "boolean"
11037	//     }
11038	//   },
11039	//   "path": "files/{fileId}/trash",
11040	//   "response": {
11041	//     "$ref": "File"
11042	//   },
11043	//   "scopes": [
11044	//     "https://www.googleapis.com/auth/drive",
11045	//     "https://www.googleapis.com/auth/drive.appdata",
11046	//     "https://www.googleapis.com/auth/drive.apps.readonly",
11047	//     "https://www.googleapis.com/auth/drive.file"
11048	//   ]
11049	// }
11050
11051}
11052
11053// method id "drive.files.untrash":
11054
11055type FilesUntrashCall struct {
11056	s          *Service
11057	fileId     string
11058	urlParams_ gensupport.URLParams
11059	ctx_       context.Context
11060	header_    http.Header
11061}
11062
11063// Untrash: Restores a file from the trash. The currently authenticated
11064// user must own the file or be at least a fileOrganizer on the parent
11065// for shared drive files. Only the owner may untrash a file.
11066//
11067// - fileId: The ID of the file to untrash.
11068func (r *FilesService) Untrash(fileId string) *FilesUntrashCall {
11069	c := &FilesUntrashCall{s: r.s, urlParams_: make(gensupport.URLParams)}
11070	c.fileId = fileId
11071	return c
11072}
11073
11074// IncludePermissionsForView sets the optional parameter
11075// "includePermissionsForView": Specifies which additional view's
11076// permissions to include in the response. Only 'published' is
11077// supported.
11078func (c *FilesUntrashCall) IncludePermissionsForView(includePermissionsForView string) *FilesUntrashCall {
11079	c.urlParams_.Set("includePermissionsForView", includePermissionsForView)
11080	return c
11081}
11082
11083// SupportsAllDrives sets the optional parameter "supportsAllDrives":
11084// Whether the requesting application supports both My Drives and shared
11085// drives.
11086func (c *FilesUntrashCall) SupportsAllDrives(supportsAllDrives bool) *FilesUntrashCall {
11087	c.urlParams_.Set("supportsAllDrives", fmt.Sprint(supportsAllDrives))
11088	return c
11089}
11090
11091// SupportsTeamDrives sets the optional parameter "supportsTeamDrives":
11092// Deprecated use supportsAllDrives instead.
11093func (c *FilesUntrashCall) SupportsTeamDrives(supportsTeamDrives bool) *FilesUntrashCall {
11094	c.urlParams_.Set("supportsTeamDrives", fmt.Sprint(supportsTeamDrives))
11095	return c
11096}
11097
11098// Fields allows partial responses to be retrieved. See
11099// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
11100// for more information.
11101func (c *FilesUntrashCall) Fields(s ...googleapi.Field) *FilesUntrashCall {
11102	c.urlParams_.Set("fields", googleapi.CombineFields(s))
11103	return c
11104}
11105
11106// Context sets the context to be used in this call's Do method. Any
11107// pending HTTP request will be aborted if the provided context is
11108// canceled.
11109func (c *FilesUntrashCall) Context(ctx context.Context) *FilesUntrashCall {
11110	c.ctx_ = ctx
11111	return c
11112}
11113
11114// Header returns an http.Header that can be modified by the caller to
11115// add HTTP headers to the request.
11116func (c *FilesUntrashCall) Header() http.Header {
11117	if c.header_ == nil {
11118		c.header_ = make(http.Header)
11119	}
11120	return c.header_
11121}
11122
11123func (c *FilesUntrashCall) doRequest(alt string) (*http.Response, error) {
11124	reqHeaders := make(http.Header)
11125	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210830")
11126	for k, v := range c.header_ {
11127		reqHeaders[k] = v
11128	}
11129	reqHeaders.Set("User-Agent", c.s.userAgent())
11130	var body io.Reader = nil
11131	c.urlParams_.Set("alt", alt)
11132	c.urlParams_.Set("prettyPrint", "false")
11133	urls := googleapi.ResolveRelative(c.s.BasePath, "files/{fileId}/untrash")
11134	urls += "?" + c.urlParams_.Encode()
11135	req, err := http.NewRequest("POST", urls, body)
11136	if err != nil {
11137		return nil, err
11138	}
11139	req.Header = reqHeaders
11140	googleapi.Expand(req.URL, map[string]string{
11141		"fileId": c.fileId,
11142	})
11143	return gensupport.SendRequest(c.ctx_, c.s.client, req)
11144}
11145
11146// Do executes the "drive.files.untrash" call.
11147// Exactly one of *File or error will be non-nil. Any non-2xx status
11148// code is an error. Response headers are in either
11149// *File.ServerResponse.Header or (if a response was returned at all) in
11150// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
11151// whether the returned error was because http.StatusNotModified was
11152// returned.
11153func (c *FilesUntrashCall) Do(opts ...googleapi.CallOption) (*File, error) {
11154	gensupport.SetOptions(c.urlParams_, opts...)
11155	res, err := c.doRequest("json")
11156	if res != nil && res.StatusCode == http.StatusNotModified {
11157		if res.Body != nil {
11158			res.Body.Close()
11159		}
11160		return nil, &googleapi.Error{
11161			Code:   res.StatusCode,
11162			Header: res.Header,
11163		}
11164	}
11165	if err != nil {
11166		return nil, err
11167	}
11168	defer googleapi.CloseBody(res)
11169	if err := googleapi.CheckResponse(res); err != nil {
11170		return nil, err
11171	}
11172	ret := &File{
11173		ServerResponse: googleapi.ServerResponse{
11174			Header:         res.Header,
11175			HTTPStatusCode: res.StatusCode,
11176		},
11177	}
11178	target := &ret
11179	if err := gensupport.DecodeResponse(target, res); err != nil {
11180		return nil, err
11181	}
11182	return ret, nil
11183	// {
11184	//   "description": "Restores a file from the trash. The currently authenticated user must own the file or be at least a fileOrganizer on the parent for shared drive files. Only the owner may untrash a file.",
11185	//   "httpMethod": "POST",
11186	//   "id": "drive.files.untrash",
11187	//   "parameterOrder": [
11188	//     "fileId"
11189	//   ],
11190	//   "parameters": {
11191	//     "fileId": {
11192	//       "description": "The ID of the file to untrash.",
11193	//       "location": "path",
11194	//       "required": true,
11195	//       "type": "string"
11196	//     },
11197	//     "includePermissionsForView": {
11198	//       "description": "Specifies which additional view's permissions to include in the response. Only 'published' is supported.",
11199	//       "location": "query",
11200	//       "type": "string"
11201	//     },
11202	//     "supportsAllDrives": {
11203	//       "default": "false",
11204	//       "description": "Whether the requesting application supports both My Drives and shared drives.",
11205	//       "location": "query",
11206	//       "type": "boolean"
11207	//     },
11208	//     "supportsTeamDrives": {
11209	//       "default": "false",
11210	//       "description": "Deprecated use supportsAllDrives instead.",
11211	//       "location": "query",
11212	//       "type": "boolean"
11213	//     }
11214	//   },
11215	//   "path": "files/{fileId}/untrash",
11216	//   "response": {
11217	//     "$ref": "File"
11218	//   },
11219	//   "scopes": [
11220	//     "https://www.googleapis.com/auth/drive",
11221	//     "https://www.googleapis.com/auth/drive.appdata",
11222	//     "https://www.googleapis.com/auth/drive.apps.readonly",
11223	//     "https://www.googleapis.com/auth/drive.file"
11224	//   ]
11225	// }
11226
11227}
11228
11229// method id "drive.files.update":
11230
11231type FilesUpdateCall struct {
11232	s          *Service
11233	fileId     string
11234	file       *File
11235	urlParams_ gensupport.URLParams
11236	mediaInfo_ *gensupport.MediaInfo
11237	ctx_       context.Context
11238	header_    http.Header
11239}
11240
11241// Update: Updates file metadata and/or content.
11242//
11243// - fileId: The ID of the file to update.
11244func (r *FilesService) Update(fileId string, file *File) *FilesUpdateCall {
11245	c := &FilesUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
11246	c.fileId = fileId
11247	c.file = file
11248	return c
11249}
11250
11251// AddParents sets the optional parameter "addParents": Comma-separated
11252// list of parent IDs to add.
11253func (c *FilesUpdateCall) AddParents(addParents string) *FilesUpdateCall {
11254	c.urlParams_.Set("addParents", addParents)
11255	return c
11256}
11257
11258// Convert sets the optional parameter "convert": This parameter is
11259// deprecated and has no function.
11260func (c *FilesUpdateCall) Convert(convert bool) *FilesUpdateCall {
11261	c.urlParams_.Set("convert", fmt.Sprint(convert))
11262	return c
11263}
11264
11265// EnforceSingleParent sets the optional parameter
11266// "enforceSingleParent": Deprecated. Adding files to multiple folders
11267// is no longer supported. Use shortcuts instead.
11268func (c *FilesUpdateCall) EnforceSingleParent(enforceSingleParent bool) *FilesUpdateCall {
11269	c.urlParams_.Set("enforceSingleParent", fmt.Sprint(enforceSingleParent))
11270	return c
11271}
11272
11273// IncludePermissionsForView sets the optional parameter
11274// "includePermissionsForView": Specifies which additional view's
11275// permissions to include in the response. Only 'published' is
11276// supported.
11277func (c *FilesUpdateCall) IncludePermissionsForView(includePermissionsForView string) *FilesUpdateCall {
11278	c.urlParams_.Set("includePermissionsForView", includePermissionsForView)
11279	return c
11280}
11281
11282// ModifiedDateBehavior sets the optional parameter
11283// "modifiedDateBehavior": Determines the behavior in which modifiedDate
11284// is updated. This overrides setModifiedDate.
11285//
11286// Possible values:
11287//   "fromBody" - Set modifiedDate to the value provided in the body of
11288// the request. No change if no value was provided.
11289//   "fromBodyIfNeeded" - Set modifiedDate to the value provided in the
11290// body of the request depending on other contents of the update.
11291//   "fromBodyOrNow" - Set modifiedDate to the value provided in the
11292// body of the request, or to the current time if no value was provided.
11293//   "noChange" - Maintain the previous value of modifiedDate.
11294//   "now" - Set modifiedDate to the current time.
11295//   "nowIfNeeded" - Set modifiedDate to the current time depending on
11296// contents of the update.
11297func (c *FilesUpdateCall) ModifiedDateBehavior(modifiedDateBehavior string) *FilesUpdateCall {
11298	c.urlParams_.Set("modifiedDateBehavior", modifiedDateBehavior)
11299	return c
11300}
11301
11302// NewRevision sets the optional parameter "newRevision": Whether a blob
11303// upload should create a new revision. If false, the blob data in the
11304// current head revision is replaced. If true or not set, a new blob is
11305// created as head revision, and previous unpinned revisions are
11306// preserved for a short period of time. Pinned revisions are stored
11307// indefinitely, using additional storage quota, up to a maximum of 200
11308// revisions. For details on how revisions are retained, see the Drive
11309// Help Center. Note that this field is ignored if there is no payload
11310// in the request.
11311func (c *FilesUpdateCall) NewRevision(newRevision bool) *FilesUpdateCall {
11312	c.urlParams_.Set("newRevision", fmt.Sprint(newRevision))
11313	return c
11314}
11315
11316// Ocr sets the optional parameter "ocr": Whether to attempt OCR on
11317// .jpg, .png, .gif, or .pdf uploads.
11318func (c *FilesUpdateCall) Ocr(ocr bool) *FilesUpdateCall {
11319	c.urlParams_.Set("ocr", fmt.Sprint(ocr))
11320	return c
11321}
11322
11323// OcrLanguage sets the optional parameter "ocrLanguage": If ocr is
11324// true, hints at the language to use. Valid values are BCP 47 codes.
11325func (c *FilesUpdateCall) OcrLanguage(ocrLanguage string) *FilesUpdateCall {
11326	c.urlParams_.Set("ocrLanguage", ocrLanguage)
11327	return c
11328}
11329
11330// Pinned sets the optional parameter "pinned": Whether to pin the new
11331// revision. A file can have a maximum of 200 pinned revisions. Note
11332// that this field is ignored if there is no payload in the request.
11333func (c *FilesUpdateCall) Pinned(pinned bool) *FilesUpdateCall {
11334	c.urlParams_.Set("pinned", fmt.Sprint(pinned))
11335	return c
11336}
11337
11338// RemoveParents sets the optional parameter "removeParents":
11339// Comma-separated list of parent IDs to remove.
11340func (c *FilesUpdateCall) RemoveParents(removeParents string) *FilesUpdateCall {
11341	c.urlParams_.Set("removeParents", removeParents)
11342	return c
11343}
11344
11345// SetModifiedDate sets the optional parameter "setModifiedDate":
11346// Whether to set the modified date using the value supplied in the
11347// request body. Setting this field to true is equivalent to
11348// modifiedDateBehavior=fromBodyOrNow, and false is equivalent to
11349// modifiedDateBehavior=now. To prevent any changes to the modified date
11350// set modifiedDateBehavior=noChange.
11351func (c *FilesUpdateCall) SetModifiedDate(setModifiedDate bool) *FilesUpdateCall {
11352	c.urlParams_.Set("setModifiedDate", fmt.Sprint(setModifiedDate))
11353	return c
11354}
11355
11356// SupportsAllDrives sets the optional parameter "supportsAllDrives":
11357// Whether the requesting application supports both My Drives and shared
11358// drives.
11359func (c *FilesUpdateCall) SupportsAllDrives(supportsAllDrives bool) *FilesUpdateCall {
11360	c.urlParams_.Set("supportsAllDrives", fmt.Sprint(supportsAllDrives))
11361	return c
11362}
11363
11364// SupportsTeamDrives sets the optional parameter "supportsTeamDrives":
11365// Deprecated use supportsAllDrives instead.
11366func (c *FilesUpdateCall) SupportsTeamDrives(supportsTeamDrives bool) *FilesUpdateCall {
11367	c.urlParams_.Set("supportsTeamDrives", fmt.Sprint(supportsTeamDrives))
11368	return c
11369}
11370
11371// TimedTextLanguage sets the optional parameter "timedTextLanguage":
11372// The language of the timed text.
11373func (c *FilesUpdateCall) TimedTextLanguage(timedTextLanguage string) *FilesUpdateCall {
11374	c.urlParams_.Set("timedTextLanguage", timedTextLanguage)
11375	return c
11376}
11377
11378// TimedTextTrackName sets the optional parameter "timedTextTrackName":
11379// The timed text track name.
11380func (c *FilesUpdateCall) TimedTextTrackName(timedTextTrackName string) *FilesUpdateCall {
11381	c.urlParams_.Set("timedTextTrackName", timedTextTrackName)
11382	return c
11383}
11384
11385// UpdateViewedDate sets the optional parameter "updateViewedDate":
11386// Whether to update the view date after successfully updating the file.
11387func (c *FilesUpdateCall) UpdateViewedDate(updateViewedDate bool) *FilesUpdateCall {
11388	c.urlParams_.Set("updateViewedDate", fmt.Sprint(updateViewedDate))
11389	return c
11390}
11391
11392// UseContentAsIndexableText sets the optional parameter
11393// "useContentAsIndexableText": Whether to use the content as indexable
11394// text.
11395func (c *FilesUpdateCall) UseContentAsIndexableText(useContentAsIndexableText bool) *FilesUpdateCall {
11396	c.urlParams_.Set("useContentAsIndexableText", fmt.Sprint(useContentAsIndexableText))
11397	return c
11398}
11399
11400// Media specifies the media to upload in one or more chunks. The chunk
11401// size may be controlled by supplying a MediaOption generated by
11402// googleapi.ChunkSize. The chunk size defaults to
11403// googleapi.DefaultUploadChunkSize.The Content-Type header used in the
11404// upload request will be determined by sniffing the contents of r,
11405// unless a MediaOption generated by googleapi.ContentType is
11406// supplied.
11407// At most one of Media and ResumableMedia may be set.
11408func (c *FilesUpdateCall) Media(r io.Reader, options ...googleapi.MediaOption) *FilesUpdateCall {
11409	c.mediaInfo_ = gensupport.NewInfoFromMedia(r, options)
11410	return c
11411}
11412
11413// ResumableMedia specifies the media to upload in chunks and can be
11414// canceled with ctx.
11415//
11416// Deprecated: use Media instead.
11417//
11418// At most one of Media and ResumableMedia may be set. mediaType
11419// identifies the MIME media type of the upload, such as "image/png". If
11420// mediaType is "", it will be auto-detected. The provided ctx will
11421// supersede any context previously provided to the Context method.
11422func (c *FilesUpdateCall) ResumableMedia(ctx context.Context, r io.ReaderAt, size int64, mediaType string) *FilesUpdateCall {
11423	c.ctx_ = ctx
11424	c.mediaInfo_ = gensupport.NewInfoFromResumableMedia(r, size, mediaType)
11425	return c
11426}
11427
11428// ProgressUpdater provides a callback function that will be called
11429// after every chunk. It should be a low-latency function in order to
11430// not slow down the upload operation. This should only be called when
11431// using ResumableMedia (as opposed to Media).
11432func (c *FilesUpdateCall) ProgressUpdater(pu googleapi.ProgressUpdater) *FilesUpdateCall {
11433	c.mediaInfo_.SetProgressUpdater(pu)
11434	return c
11435}
11436
11437// Fields allows partial responses to be retrieved. See
11438// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
11439// for more information.
11440func (c *FilesUpdateCall) Fields(s ...googleapi.Field) *FilesUpdateCall {
11441	c.urlParams_.Set("fields", googleapi.CombineFields(s))
11442	return c
11443}
11444
11445// Context sets the context to be used in this call's Do method. Any
11446// pending HTTP request will be aborted if the provided context is
11447// canceled.
11448// This context will supersede any context previously provided to the
11449// ResumableMedia method.
11450func (c *FilesUpdateCall) Context(ctx context.Context) *FilesUpdateCall {
11451	c.ctx_ = ctx
11452	return c
11453}
11454
11455// Header returns an http.Header that can be modified by the caller to
11456// add HTTP headers to the request.
11457func (c *FilesUpdateCall) Header() http.Header {
11458	if c.header_ == nil {
11459		c.header_ = make(http.Header)
11460	}
11461	return c.header_
11462}
11463
11464func (c *FilesUpdateCall) doRequest(alt string) (*http.Response, error) {
11465	reqHeaders := make(http.Header)
11466	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210830")
11467	for k, v := range c.header_ {
11468		reqHeaders[k] = v
11469	}
11470	reqHeaders.Set("User-Agent", c.s.userAgent())
11471	var body io.Reader = nil
11472	body, err := googleapi.WithoutDataWrapper.JSONReader(c.file)
11473	if err != nil {
11474		return nil, err
11475	}
11476	reqHeaders.Set("Content-Type", "application/json")
11477	c.urlParams_.Set("alt", alt)
11478	c.urlParams_.Set("prettyPrint", "false")
11479	urls := googleapi.ResolveRelative(c.s.BasePath, "files/{fileId}")
11480	if c.mediaInfo_ != nil {
11481		urls = googleapi.ResolveRelative(c.s.BasePath, "/upload/drive/v2/files/{fileId}")
11482		c.urlParams_.Set("uploadType", c.mediaInfo_.UploadType())
11483	}
11484	if body == nil {
11485		body = new(bytes.Buffer)
11486		reqHeaders.Set("Content-Type", "application/json")
11487	}
11488	body, getBody, cleanup := c.mediaInfo_.UploadRequest(reqHeaders, body)
11489	defer cleanup()
11490	urls += "?" + c.urlParams_.Encode()
11491	req, err := http.NewRequest("PUT", urls, body)
11492	if err != nil {
11493		return nil, err
11494	}
11495	req.Header = reqHeaders
11496	req.GetBody = getBody
11497	googleapi.Expand(req.URL, map[string]string{
11498		"fileId": c.fileId,
11499	})
11500	return gensupport.SendRequest(c.ctx_, c.s.client, req)
11501}
11502
11503// Do executes the "drive.files.update" call.
11504// Exactly one of *File or error will be non-nil. Any non-2xx status
11505// code is an error. Response headers are in either
11506// *File.ServerResponse.Header or (if a response was returned at all) in
11507// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
11508// whether the returned error was because http.StatusNotModified was
11509// returned.
11510func (c *FilesUpdateCall) Do(opts ...googleapi.CallOption) (*File, error) {
11511	gensupport.SetOptions(c.urlParams_, opts...)
11512	res, err := c.doRequest("json")
11513	if res != nil && res.StatusCode == http.StatusNotModified {
11514		if res.Body != nil {
11515			res.Body.Close()
11516		}
11517		return nil, &googleapi.Error{
11518			Code:   res.StatusCode,
11519			Header: res.Header,
11520		}
11521	}
11522	if err != nil {
11523		return nil, err
11524	}
11525	defer googleapi.CloseBody(res)
11526	if err := googleapi.CheckResponse(res); err != nil {
11527		return nil, err
11528	}
11529	rx := c.mediaInfo_.ResumableUpload(res.Header.Get("Location"))
11530	if rx != nil {
11531		rx.Client = c.s.client
11532		rx.UserAgent = c.s.userAgent()
11533		ctx := c.ctx_
11534		if ctx == nil {
11535			ctx = context.TODO()
11536		}
11537		res, err = rx.Upload(ctx)
11538		if err != nil {
11539			return nil, err
11540		}
11541		defer res.Body.Close()
11542		if err := googleapi.CheckResponse(res); err != nil {
11543			return nil, err
11544		}
11545	}
11546	ret := &File{
11547		ServerResponse: googleapi.ServerResponse{
11548			Header:         res.Header,
11549			HTTPStatusCode: res.StatusCode,
11550		},
11551	}
11552	target := &ret
11553	if err := gensupport.DecodeResponse(target, res); err != nil {
11554		return nil, err
11555	}
11556	return ret, nil
11557	// {
11558	//   "description": "Updates file metadata and/or content.",
11559	//   "httpMethod": "PUT",
11560	//   "id": "drive.files.update",
11561	//   "mediaUpload": {
11562	//     "accept": [
11563	//       "*/*"
11564	//     ],
11565	//     "maxSize": "5120GB",
11566	//     "protocols": {
11567	//       "resumable": {
11568	//         "multipart": true,
11569	//         "path": "/resumable/upload/drive/v2/files/{fileId}"
11570	//       },
11571	//       "simple": {
11572	//         "multipart": true,
11573	//         "path": "/upload/drive/v2/files/{fileId}"
11574	//       }
11575	//     }
11576	//   },
11577	//   "parameterOrder": [
11578	//     "fileId"
11579	//   ],
11580	//   "parameters": {
11581	//     "addParents": {
11582	//       "description": "Comma-separated list of parent IDs to add.",
11583	//       "location": "query",
11584	//       "type": "string"
11585	//     },
11586	//     "convert": {
11587	//       "default": "false",
11588	//       "description": "This parameter is deprecated and has no function.",
11589	//       "location": "query",
11590	//       "type": "boolean"
11591	//     },
11592	//     "enforceSingleParent": {
11593	//       "default": "false",
11594	//       "description": "Deprecated. Adding files to multiple folders is no longer supported. Use shortcuts instead.",
11595	//       "location": "query",
11596	//       "type": "boolean"
11597	//     },
11598	//     "fileId": {
11599	//       "description": "The ID of the file to update.",
11600	//       "location": "path",
11601	//       "required": true,
11602	//       "type": "string"
11603	//     },
11604	//     "includePermissionsForView": {
11605	//       "description": "Specifies which additional view's permissions to include in the response. Only 'published' is supported.",
11606	//       "location": "query",
11607	//       "type": "string"
11608	//     },
11609	//     "modifiedDateBehavior": {
11610	//       "description": "Determines the behavior in which modifiedDate is updated. This overrides setModifiedDate.",
11611	//       "enum": [
11612	//         "fromBody",
11613	//         "fromBodyIfNeeded",
11614	//         "fromBodyOrNow",
11615	//         "noChange",
11616	//         "now",
11617	//         "nowIfNeeded"
11618	//       ],
11619	//       "enumDescriptions": [
11620	//         "Set modifiedDate to the value provided in the body of the request. No change if no value was provided.",
11621	//         "Set modifiedDate to the value provided in the body of the request depending on other contents of the update.",
11622	//         "Set modifiedDate to the value provided in the body of the request, or to the current time if no value was provided.",
11623	//         "Maintain the previous value of modifiedDate.",
11624	//         "Set modifiedDate to the current time.",
11625	//         "Set modifiedDate to the current time depending on contents of the update."
11626	//       ],
11627	//       "location": "query",
11628	//       "type": "string"
11629	//     },
11630	//     "newRevision": {
11631	//       "default": "true",
11632	//       "description": "Whether a blob upload should create a new revision. If false, the blob data in the current head revision is replaced. If true or not set, a new blob is created as head revision, and previous unpinned revisions are preserved for a short period of time. Pinned revisions are stored indefinitely, using additional storage quota, up to a maximum of 200 revisions. For details on how revisions are retained, see the Drive Help Center. Note that this field is ignored if there is no payload in the request.",
11633	//       "location": "query",
11634	//       "type": "boolean"
11635	//     },
11636	//     "ocr": {
11637	//       "default": "false",
11638	//       "description": "Whether to attempt OCR on .jpg, .png, .gif, or .pdf uploads.",
11639	//       "location": "query",
11640	//       "type": "boolean"
11641	//     },
11642	//     "ocrLanguage": {
11643	//       "description": "If ocr is true, hints at the language to use. Valid values are BCP 47 codes.",
11644	//       "location": "query",
11645	//       "type": "string"
11646	//     },
11647	//     "pinned": {
11648	//       "default": "false",
11649	//       "description": "Whether to pin the new revision. A file can have a maximum of 200 pinned revisions. Note that this field is ignored if there is no payload in the request.",
11650	//       "location": "query",
11651	//       "type": "boolean"
11652	//     },
11653	//     "removeParents": {
11654	//       "description": "Comma-separated list of parent IDs to remove.",
11655	//       "location": "query",
11656	//       "type": "string"
11657	//     },
11658	//     "setModifiedDate": {
11659	//       "default": "false",
11660	//       "description": "Whether to set the modified date using the value supplied in the request body. Setting this field to true is equivalent to modifiedDateBehavior=fromBodyOrNow, and false is equivalent to modifiedDateBehavior=now. To prevent any changes to the modified date set modifiedDateBehavior=noChange.",
11661	//       "location": "query",
11662	//       "type": "boolean"
11663	//     },
11664	//     "supportsAllDrives": {
11665	//       "default": "false",
11666	//       "description": "Whether the requesting application supports both My Drives and shared drives.",
11667	//       "location": "query",
11668	//       "type": "boolean"
11669	//     },
11670	//     "supportsTeamDrives": {
11671	//       "default": "false",
11672	//       "description": "Deprecated use supportsAllDrives instead.",
11673	//       "location": "query",
11674	//       "type": "boolean"
11675	//     },
11676	//     "timedTextLanguage": {
11677	//       "description": "The language of the timed text.",
11678	//       "location": "query",
11679	//       "type": "string"
11680	//     },
11681	//     "timedTextTrackName": {
11682	//       "description": "The timed text track name.",
11683	//       "location": "query",
11684	//       "type": "string"
11685	//     },
11686	//     "updateViewedDate": {
11687	//       "default": "true",
11688	//       "description": "Whether to update the view date after successfully updating the file.",
11689	//       "location": "query",
11690	//       "type": "boolean"
11691	//     },
11692	//     "useContentAsIndexableText": {
11693	//       "default": "false",
11694	//       "description": "Whether to use the content as indexable text.",
11695	//       "location": "query",
11696	//       "type": "boolean"
11697	//     }
11698	//   },
11699	//   "path": "files/{fileId}",
11700	//   "request": {
11701	//     "$ref": "File"
11702	//   },
11703	//   "response": {
11704	//     "$ref": "File"
11705	//   },
11706	//   "scopes": [
11707	//     "https://www.googleapis.com/auth/drive",
11708	//     "https://www.googleapis.com/auth/drive.appdata",
11709	//     "https://www.googleapis.com/auth/drive.apps.readonly",
11710	//     "https://www.googleapis.com/auth/drive.file",
11711	//     "https://www.googleapis.com/auth/drive.metadata",
11712	//     "https://www.googleapis.com/auth/drive.scripts"
11713	//   ],
11714	//   "supportsMediaUpload": true
11715	// }
11716
11717}
11718
11719// method id "drive.files.watch":
11720
11721type FilesWatchCall struct {
11722	s          *Service
11723	fileId     string
11724	channel    *Channel
11725	urlParams_ gensupport.URLParams
11726	ctx_       context.Context
11727	header_    http.Header
11728}
11729
11730// Watch: Subscribe to changes on a file
11731//
11732// - fileId: The ID for the file in question.
11733func (r *FilesService) Watch(fileId string, channel *Channel) *FilesWatchCall {
11734	c := &FilesWatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
11735	c.fileId = fileId
11736	c.channel = channel
11737	return c
11738}
11739
11740// AcknowledgeAbuse sets the optional parameter "acknowledgeAbuse":
11741// Whether the user is acknowledging the risk of downloading known
11742// malware or other abusive files.
11743func (c *FilesWatchCall) AcknowledgeAbuse(acknowledgeAbuse bool) *FilesWatchCall {
11744	c.urlParams_.Set("acknowledgeAbuse", fmt.Sprint(acknowledgeAbuse))
11745	return c
11746}
11747
11748// IncludePermissionsForView sets the optional parameter
11749// "includePermissionsForView": Specifies which additional view's
11750// permissions to include in the response. Only 'published' is
11751// supported.
11752func (c *FilesWatchCall) IncludePermissionsForView(includePermissionsForView string) *FilesWatchCall {
11753	c.urlParams_.Set("includePermissionsForView", includePermissionsForView)
11754	return c
11755}
11756
11757// Projection sets the optional parameter "projection": This parameter
11758// is deprecated and has no function.
11759//
11760// Possible values:
11761//   "BASIC" - Deprecated
11762//   "FULL" - Deprecated
11763func (c *FilesWatchCall) Projection(projection string) *FilesWatchCall {
11764	c.urlParams_.Set("projection", projection)
11765	return c
11766}
11767
11768// RevisionId sets the optional parameter "revisionId": Specifies the
11769// Revision ID that should be downloaded. Ignored unless alt=media is
11770// specified.
11771func (c *FilesWatchCall) RevisionId(revisionId string) *FilesWatchCall {
11772	c.urlParams_.Set("revisionId", revisionId)
11773	return c
11774}
11775
11776// SupportsAllDrives sets the optional parameter "supportsAllDrives":
11777// Whether the requesting application supports both My Drives and shared
11778// drives.
11779func (c *FilesWatchCall) SupportsAllDrives(supportsAllDrives bool) *FilesWatchCall {
11780	c.urlParams_.Set("supportsAllDrives", fmt.Sprint(supportsAllDrives))
11781	return c
11782}
11783
11784// SupportsTeamDrives sets the optional parameter "supportsTeamDrives":
11785// Deprecated use supportsAllDrives instead.
11786func (c *FilesWatchCall) SupportsTeamDrives(supportsTeamDrives bool) *FilesWatchCall {
11787	c.urlParams_.Set("supportsTeamDrives", fmt.Sprint(supportsTeamDrives))
11788	return c
11789}
11790
11791// UpdateViewedDate sets the optional parameter "updateViewedDate":
11792// Deprecated: Use files.update with modifiedDateBehavior=noChange,
11793// updateViewedDate=true and an empty request body.
11794func (c *FilesWatchCall) UpdateViewedDate(updateViewedDate bool) *FilesWatchCall {
11795	c.urlParams_.Set("updateViewedDate", fmt.Sprint(updateViewedDate))
11796	return c
11797}
11798
11799// Fields allows partial responses to be retrieved. See
11800// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
11801// for more information.
11802func (c *FilesWatchCall) Fields(s ...googleapi.Field) *FilesWatchCall {
11803	c.urlParams_.Set("fields", googleapi.CombineFields(s))
11804	return c
11805}
11806
11807// Context sets the context to be used in this call's Do and Download
11808// methods. Any pending HTTP request will be aborted if the provided
11809// context is canceled.
11810func (c *FilesWatchCall) Context(ctx context.Context) *FilesWatchCall {
11811	c.ctx_ = ctx
11812	return c
11813}
11814
11815// Header returns an http.Header that can be modified by the caller to
11816// add HTTP headers to the request.
11817func (c *FilesWatchCall) Header() http.Header {
11818	if c.header_ == nil {
11819		c.header_ = make(http.Header)
11820	}
11821	return c.header_
11822}
11823
11824func (c *FilesWatchCall) doRequest(alt string) (*http.Response, error) {
11825	reqHeaders := make(http.Header)
11826	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210830")
11827	for k, v := range c.header_ {
11828		reqHeaders[k] = v
11829	}
11830	reqHeaders.Set("User-Agent", c.s.userAgent())
11831	var body io.Reader = nil
11832	body, err := googleapi.WithoutDataWrapper.JSONReader(c.channel)
11833	if err != nil {
11834		return nil, err
11835	}
11836	reqHeaders.Set("Content-Type", "application/json")
11837	c.urlParams_.Set("alt", alt)
11838	c.urlParams_.Set("prettyPrint", "false")
11839	urls := googleapi.ResolveRelative(c.s.BasePath, "files/{fileId}/watch")
11840	urls += "?" + c.urlParams_.Encode()
11841	req, err := http.NewRequest("POST", urls, body)
11842	if err != nil {
11843		return nil, err
11844	}
11845	req.Header = reqHeaders
11846	googleapi.Expand(req.URL, map[string]string{
11847		"fileId": c.fileId,
11848	})
11849	return gensupport.SendRequest(c.ctx_, c.s.client, req)
11850}
11851
11852// Download fetches the API endpoint's "media" value, instead of the normal
11853// API response value. If the returned error is nil, the Response is guaranteed to
11854// have a 2xx status code. Callers must close the Response.Body as usual.
11855func (c *FilesWatchCall) Download(opts ...googleapi.CallOption) (*http.Response, error) {
11856	gensupport.SetOptions(c.urlParams_, opts...)
11857	res, err := c.doRequest("media")
11858	if err != nil {
11859		return nil, err
11860	}
11861	if err := googleapi.CheckResponse(res); err != nil {
11862		res.Body.Close()
11863		return nil, err
11864	}
11865	return res, nil
11866}
11867
11868// Do executes the "drive.files.watch" call.
11869// Exactly one of *Channel or error will be non-nil. Any non-2xx status
11870// code is an error. Response headers are in either
11871// *Channel.ServerResponse.Header or (if a response was returned at all)
11872// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
11873// check whether the returned error was because http.StatusNotModified
11874// was returned.
11875func (c *FilesWatchCall) Do(opts ...googleapi.CallOption) (*Channel, error) {
11876	gensupport.SetOptions(c.urlParams_, opts...)
11877	res, err := c.doRequest("json")
11878	if res != nil && res.StatusCode == http.StatusNotModified {
11879		if res.Body != nil {
11880			res.Body.Close()
11881		}
11882		return nil, &googleapi.Error{
11883			Code:   res.StatusCode,
11884			Header: res.Header,
11885		}
11886	}
11887	if err != nil {
11888		return nil, err
11889	}
11890	defer googleapi.CloseBody(res)
11891	if err := googleapi.CheckResponse(res); err != nil {
11892		return nil, err
11893	}
11894	ret := &Channel{
11895		ServerResponse: googleapi.ServerResponse{
11896			Header:         res.Header,
11897			HTTPStatusCode: res.StatusCode,
11898		},
11899	}
11900	target := &ret
11901	if err := gensupport.DecodeResponse(target, res); err != nil {
11902		return nil, err
11903	}
11904	return ret, nil
11905	// {
11906	//   "description": "Subscribe to changes on a file",
11907	//   "httpMethod": "POST",
11908	//   "id": "drive.files.watch",
11909	//   "parameterOrder": [
11910	//     "fileId"
11911	//   ],
11912	//   "parameters": {
11913	//     "acknowledgeAbuse": {
11914	//       "default": "false",
11915	//       "description": "Whether the user is acknowledging the risk of downloading known malware or other abusive files.",
11916	//       "location": "query",
11917	//       "type": "boolean"
11918	//     },
11919	//     "fileId": {
11920	//       "description": "The ID for the file in question.",
11921	//       "location": "path",
11922	//       "required": true,
11923	//       "type": "string"
11924	//     },
11925	//     "includePermissionsForView": {
11926	//       "description": "Specifies which additional view's permissions to include in the response. Only 'published' is supported.",
11927	//       "location": "query",
11928	//       "type": "string"
11929	//     },
11930	//     "projection": {
11931	//       "description": "This parameter is deprecated and has no function.",
11932	//       "enum": [
11933	//         "BASIC",
11934	//         "FULL"
11935	//       ],
11936	//       "enumDescriptions": [
11937	//         "Deprecated",
11938	//         "Deprecated"
11939	//       ],
11940	//       "location": "query",
11941	//       "type": "string"
11942	//     },
11943	//     "revisionId": {
11944	//       "description": "Specifies the Revision ID that should be downloaded. Ignored unless alt=media is specified.",
11945	//       "location": "query",
11946	//       "type": "string"
11947	//     },
11948	//     "supportsAllDrives": {
11949	//       "default": "false",
11950	//       "description": "Whether the requesting application supports both My Drives and shared drives.",
11951	//       "location": "query",
11952	//       "type": "boolean"
11953	//     },
11954	//     "supportsTeamDrives": {
11955	//       "default": "false",
11956	//       "description": "Deprecated use supportsAllDrives instead.",
11957	//       "location": "query",
11958	//       "type": "boolean"
11959	//     },
11960	//     "updateViewedDate": {
11961	//       "default": "false",
11962	//       "description": "Deprecated: Use files.update with modifiedDateBehavior=noChange, updateViewedDate=true and an empty request body.",
11963	//       "location": "query",
11964	//       "type": "boolean"
11965	//     }
11966	//   },
11967	//   "path": "files/{fileId}/watch",
11968	//   "request": {
11969	//     "$ref": "Channel",
11970	//     "parameterName": "resource"
11971	//   },
11972	//   "response": {
11973	//     "$ref": "Channel"
11974	//   },
11975	//   "scopes": [
11976	//     "https://www.googleapis.com/auth/drive",
11977	//     "https://www.googleapis.com/auth/drive.appdata",
11978	//     "https://www.googleapis.com/auth/drive.file",
11979	//     "https://www.googleapis.com/auth/drive.metadata",
11980	//     "https://www.googleapis.com/auth/drive.metadata.readonly",
11981	//     "https://www.googleapis.com/auth/drive.photos.readonly",
11982	//     "https://www.googleapis.com/auth/drive.readonly"
11983	//   ],
11984	//   "supportsMediaDownload": true,
11985	//   "supportsSubscription": true,
11986	//   "useMediaDownloadService": true
11987	// }
11988
11989}
11990
11991// method id "drive.parents.delete":
11992
11993type ParentsDeleteCall struct {
11994	s          *Service
11995	fileId     string
11996	parentId   string
11997	urlParams_ gensupport.URLParams
11998	ctx_       context.Context
11999	header_    http.Header
12000}
12001
12002// Delete: Removes a parent from a file.
12003//
12004// - fileId: The ID of the file.
12005// - parentId: The ID of the parent.
12006func (r *ParentsService) Delete(fileId string, parentId string) *ParentsDeleteCall {
12007	c := &ParentsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
12008	c.fileId = fileId
12009	c.parentId = parentId
12010	return c
12011}
12012
12013// EnforceSingleParent sets the optional parameter
12014// "enforceSingleParent": Deprecated. If an item is not in a shared
12015// drive and its last parent is deleted but the item itself is not, the
12016// item will be placed under its owner's root.
12017func (c *ParentsDeleteCall) EnforceSingleParent(enforceSingleParent bool) *ParentsDeleteCall {
12018	c.urlParams_.Set("enforceSingleParent", fmt.Sprint(enforceSingleParent))
12019	return c
12020}
12021
12022// Fields allows partial responses to be retrieved. See
12023// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
12024// for more information.
12025func (c *ParentsDeleteCall) Fields(s ...googleapi.Field) *ParentsDeleteCall {
12026	c.urlParams_.Set("fields", googleapi.CombineFields(s))
12027	return c
12028}
12029
12030// Context sets the context to be used in this call's Do method. Any
12031// pending HTTP request will be aborted if the provided context is
12032// canceled.
12033func (c *ParentsDeleteCall) Context(ctx context.Context) *ParentsDeleteCall {
12034	c.ctx_ = ctx
12035	return c
12036}
12037
12038// Header returns an http.Header that can be modified by the caller to
12039// add HTTP headers to the request.
12040func (c *ParentsDeleteCall) Header() http.Header {
12041	if c.header_ == nil {
12042		c.header_ = make(http.Header)
12043	}
12044	return c.header_
12045}
12046
12047func (c *ParentsDeleteCall) doRequest(alt string) (*http.Response, error) {
12048	reqHeaders := make(http.Header)
12049	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210830")
12050	for k, v := range c.header_ {
12051		reqHeaders[k] = v
12052	}
12053	reqHeaders.Set("User-Agent", c.s.userAgent())
12054	var body io.Reader = nil
12055	c.urlParams_.Set("alt", alt)
12056	c.urlParams_.Set("prettyPrint", "false")
12057	urls := googleapi.ResolveRelative(c.s.BasePath, "files/{fileId}/parents/{parentId}")
12058	urls += "?" + c.urlParams_.Encode()
12059	req, err := http.NewRequest("DELETE", urls, body)
12060	if err != nil {
12061		return nil, err
12062	}
12063	req.Header = reqHeaders
12064	googleapi.Expand(req.URL, map[string]string{
12065		"fileId":   c.fileId,
12066		"parentId": c.parentId,
12067	})
12068	return gensupport.SendRequest(c.ctx_, c.s.client, req)
12069}
12070
12071// Do executes the "drive.parents.delete" call.
12072func (c *ParentsDeleteCall) Do(opts ...googleapi.CallOption) error {
12073	gensupport.SetOptions(c.urlParams_, opts...)
12074	res, err := c.doRequest("json")
12075	if err != nil {
12076		return err
12077	}
12078	defer googleapi.CloseBody(res)
12079	if err := googleapi.CheckResponse(res); err != nil {
12080		return err
12081	}
12082	return nil
12083	// {
12084	//   "description": "Removes a parent from a file.",
12085	//   "httpMethod": "DELETE",
12086	//   "id": "drive.parents.delete",
12087	//   "parameterOrder": [
12088	//     "fileId",
12089	//     "parentId"
12090	//   ],
12091	//   "parameters": {
12092	//     "enforceSingleParent": {
12093	//       "default": "false",
12094	//       "description": "Deprecated. If an item is not in a shared drive and its last parent is deleted but the item itself is not, the item will be placed under its owner's root.",
12095	//       "location": "query",
12096	//       "type": "boolean"
12097	//     },
12098	//     "fileId": {
12099	//       "description": "The ID of the file.",
12100	//       "location": "path",
12101	//       "required": true,
12102	//       "type": "string"
12103	//     },
12104	//     "parentId": {
12105	//       "description": "The ID of the parent.",
12106	//       "location": "path",
12107	//       "required": true,
12108	//       "type": "string"
12109	//     }
12110	//   },
12111	//   "path": "files/{fileId}/parents/{parentId}",
12112	//   "scopes": [
12113	//     "https://www.googleapis.com/auth/drive",
12114	//     "https://www.googleapis.com/auth/drive.file"
12115	//   ]
12116	// }
12117
12118}
12119
12120// method id "drive.parents.get":
12121
12122type ParentsGetCall struct {
12123	s            *Service
12124	fileId       string
12125	parentId     string
12126	urlParams_   gensupport.URLParams
12127	ifNoneMatch_ string
12128	ctx_         context.Context
12129	header_      http.Header
12130}
12131
12132// Get: Gets a specific parent reference.
12133//
12134// - fileId: The ID of the file.
12135// - parentId: The ID of the parent.
12136func (r *ParentsService) Get(fileId string, parentId string) *ParentsGetCall {
12137	c := &ParentsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
12138	c.fileId = fileId
12139	c.parentId = parentId
12140	return c
12141}
12142
12143// Fields allows partial responses to be retrieved. See
12144// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
12145// for more information.
12146func (c *ParentsGetCall) Fields(s ...googleapi.Field) *ParentsGetCall {
12147	c.urlParams_.Set("fields", googleapi.CombineFields(s))
12148	return c
12149}
12150
12151// IfNoneMatch sets the optional parameter which makes the operation
12152// fail if the object's ETag matches the given value. This is useful for
12153// getting updates only after the object has changed since the last
12154// request. Use googleapi.IsNotModified to check whether the response
12155// error from Do is the result of In-None-Match.
12156func (c *ParentsGetCall) IfNoneMatch(entityTag string) *ParentsGetCall {
12157	c.ifNoneMatch_ = entityTag
12158	return c
12159}
12160
12161// Context sets the context to be used in this call's Do method. Any
12162// pending HTTP request will be aborted if the provided context is
12163// canceled.
12164func (c *ParentsGetCall) Context(ctx context.Context) *ParentsGetCall {
12165	c.ctx_ = ctx
12166	return c
12167}
12168
12169// Header returns an http.Header that can be modified by the caller to
12170// add HTTP headers to the request.
12171func (c *ParentsGetCall) Header() http.Header {
12172	if c.header_ == nil {
12173		c.header_ = make(http.Header)
12174	}
12175	return c.header_
12176}
12177
12178func (c *ParentsGetCall) doRequest(alt string) (*http.Response, error) {
12179	reqHeaders := make(http.Header)
12180	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210830")
12181	for k, v := range c.header_ {
12182		reqHeaders[k] = v
12183	}
12184	reqHeaders.Set("User-Agent", c.s.userAgent())
12185	if c.ifNoneMatch_ != "" {
12186		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
12187	}
12188	var body io.Reader = nil
12189	c.urlParams_.Set("alt", alt)
12190	c.urlParams_.Set("prettyPrint", "false")
12191	urls := googleapi.ResolveRelative(c.s.BasePath, "files/{fileId}/parents/{parentId}")
12192	urls += "?" + c.urlParams_.Encode()
12193	req, err := http.NewRequest("GET", urls, body)
12194	if err != nil {
12195		return nil, err
12196	}
12197	req.Header = reqHeaders
12198	googleapi.Expand(req.URL, map[string]string{
12199		"fileId":   c.fileId,
12200		"parentId": c.parentId,
12201	})
12202	return gensupport.SendRequest(c.ctx_, c.s.client, req)
12203}
12204
12205// Do executes the "drive.parents.get" call.
12206// Exactly one of *ParentReference or error will be non-nil. Any non-2xx
12207// status code is an error. Response headers are in either
12208// *ParentReference.ServerResponse.Header or (if a response was returned
12209// at all) in error.(*googleapi.Error).Header. Use
12210// googleapi.IsNotModified to check whether the returned error was
12211// because http.StatusNotModified was returned.
12212func (c *ParentsGetCall) Do(opts ...googleapi.CallOption) (*ParentReference, error) {
12213	gensupport.SetOptions(c.urlParams_, opts...)
12214	res, err := c.doRequest("json")
12215	if res != nil && res.StatusCode == http.StatusNotModified {
12216		if res.Body != nil {
12217			res.Body.Close()
12218		}
12219		return nil, &googleapi.Error{
12220			Code:   res.StatusCode,
12221			Header: res.Header,
12222		}
12223	}
12224	if err != nil {
12225		return nil, err
12226	}
12227	defer googleapi.CloseBody(res)
12228	if err := googleapi.CheckResponse(res); err != nil {
12229		return nil, err
12230	}
12231	ret := &ParentReference{
12232		ServerResponse: googleapi.ServerResponse{
12233			Header:         res.Header,
12234			HTTPStatusCode: res.StatusCode,
12235		},
12236	}
12237	target := &ret
12238	if err := gensupport.DecodeResponse(target, res); err != nil {
12239		return nil, err
12240	}
12241	return ret, nil
12242	// {
12243	//   "description": "Gets a specific parent reference.",
12244	//   "httpMethod": "GET",
12245	//   "id": "drive.parents.get",
12246	//   "parameterOrder": [
12247	//     "fileId",
12248	//     "parentId"
12249	//   ],
12250	//   "parameters": {
12251	//     "fileId": {
12252	//       "description": "The ID of the file.",
12253	//       "location": "path",
12254	//       "required": true,
12255	//       "type": "string"
12256	//     },
12257	//     "parentId": {
12258	//       "description": "The ID of the parent.",
12259	//       "location": "path",
12260	//       "required": true,
12261	//       "type": "string"
12262	//     }
12263	//   },
12264	//   "path": "files/{fileId}/parents/{parentId}",
12265	//   "response": {
12266	//     "$ref": "ParentReference"
12267	//   },
12268	//   "scopes": [
12269	//     "https://www.googleapis.com/auth/drive",
12270	//     "https://www.googleapis.com/auth/drive.appdata",
12271	//     "https://www.googleapis.com/auth/drive.file",
12272	//     "https://www.googleapis.com/auth/drive.metadata",
12273	//     "https://www.googleapis.com/auth/drive.metadata.readonly",
12274	//     "https://www.googleapis.com/auth/drive.photos.readonly",
12275	//     "https://www.googleapis.com/auth/drive.readonly"
12276	//   ]
12277	// }
12278
12279}
12280
12281// method id "drive.parents.insert":
12282
12283type ParentsInsertCall struct {
12284	s               *Service
12285	fileId          string
12286	parentreference *ParentReference
12287	urlParams_      gensupport.URLParams
12288	ctx_            context.Context
12289	header_         http.Header
12290}
12291
12292// Insert: Adds a parent folder for a file.
12293//
12294// - fileId: The ID of the file.
12295func (r *ParentsService) Insert(fileId string, parentreference *ParentReference) *ParentsInsertCall {
12296	c := &ParentsInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)}
12297	c.fileId = fileId
12298	c.parentreference = parentreference
12299	return c
12300}
12301
12302// EnforceSingleParent sets the optional parameter
12303// "enforceSingleParent": Deprecated. Adding files to multiple folders
12304// is no longer supported. Use shortcuts instead.
12305func (c *ParentsInsertCall) EnforceSingleParent(enforceSingleParent bool) *ParentsInsertCall {
12306	c.urlParams_.Set("enforceSingleParent", fmt.Sprint(enforceSingleParent))
12307	return c
12308}
12309
12310// SupportsAllDrives sets the optional parameter "supportsAllDrives":
12311// Whether the requesting application supports both My Drives and shared
12312// drives.
12313func (c *ParentsInsertCall) SupportsAllDrives(supportsAllDrives bool) *ParentsInsertCall {
12314	c.urlParams_.Set("supportsAllDrives", fmt.Sprint(supportsAllDrives))
12315	return c
12316}
12317
12318// SupportsTeamDrives sets the optional parameter "supportsTeamDrives":
12319// Deprecated use supportsAllDrives instead.
12320func (c *ParentsInsertCall) SupportsTeamDrives(supportsTeamDrives bool) *ParentsInsertCall {
12321	c.urlParams_.Set("supportsTeamDrives", fmt.Sprint(supportsTeamDrives))
12322	return c
12323}
12324
12325// Fields allows partial responses to be retrieved. See
12326// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
12327// for more information.
12328func (c *ParentsInsertCall) Fields(s ...googleapi.Field) *ParentsInsertCall {
12329	c.urlParams_.Set("fields", googleapi.CombineFields(s))
12330	return c
12331}
12332
12333// Context sets the context to be used in this call's Do method. Any
12334// pending HTTP request will be aborted if the provided context is
12335// canceled.
12336func (c *ParentsInsertCall) Context(ctx context.Context) *ParentsInsertCall {
12337	c.ctx_ = ctx
12338	return c
12339}
12340
12341// Header returns an http.Header that can be modified by the caller to
12342// add HTTP headers to the request.
12343func (c *ParentsInsertCall) Header() http.Header {
12344	if c.header_ == nil {
12345		c.header_ = make(http.Header)
12346	}
12347	return c.header_
12348}
12349
12350func (c *ParentsInsertCall) doRequest(alt string) (*http.Response, error) {
12351	reqHeaders := make(http.Header)
12352	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210830")
12353	for k, v := range c.header_ {
12354		reqHeaders[k] = v
12355	}
12356	reqHeaders.Set("User-Agent", c.s.userAgent())
12357	var body io.Reader = nil
12358	body, err := googleapi.WithoutDataWrapper.JSONReader(c.parentreference)
12359	if err != nil {
12360		return nil, err
12361	}
12362	reqHeaders.Set("Content-Type", "application/json")
12363	c.urlParams_.Set("alt", alt)
12364	c.urlParams_.Set("prettyPrint", "false")
12365	urls := googleapi.ResolveRelative(c.s.BasePath, "files/{fileId}/parents")
12366	urls += "?" + c.urlParams_.Encode()
12367	req, err := http.NewRequest("POST", urls, body)
12368	if err != nil {
12369		return nil, err
12370	}
12371	req.Header = reqHeaders
12372	googleapi.Expand(req.URL, map[string]string{
12373		"fileId": c.fileId,
12374	})
12375	return gensupport.SendRequest(c.ctx_, c.s.client, req)
12376}
12377
12378// Do executes the "drive.parents.insert" call.
12379// Exactly one of *ParentReference or error will be non-nil. Any non-2xx
12380// status code is an error. Response headers are in either
12381// *ParentReference.ServerResponse.Header or (if a response was returned
12382// at all) in error.(*googleapi.Error).Header. Use
12383// googleapi.IsNotModified to check whether the returned error was
12384// because http.StatusNotModified was returned.
12385func (c *ParentsInsertCall) Do(opts ...googleapi.CallOption) (*ParentReference, error) {
12386	gensupport.SetOptions(c.urlParams_, opts...)
12387	res, err := c.doRequest("json")
12388	if res != nil && res.StatusCode == http.StatusNotModified {
12389		if res.Body != nil {
12390			res.Body.Close()
12391		}
12392		return nil, &googleapi.Error{
12393			Code:   res.StatusCode,
12394			Header: res.Header,
12395		}
12396	}
12397	if err != nil {
12398		return nil, err
12399	}
12400	defer googleapi.CloseBody(res)
12401	if err := googleapi.CheckResponse(res); err != nil {
12402		return nil, err
12403	}
12404	ret := &ParentReference{
12405		ServerResponse: googleapi.ServerResponse{
12406			Header:         res.Header,
12407			HTTPStatusCode: res.StatusCode,
12408		},
12409	}
12410	target := &ret
12411	if err := gensupport.DecodeResponse(target, res); err != nil {
12412		return nil, err
12413	}
12414	return ret, nil
12415	// {
12416	//   "description": "Adds a parent folder for a file.",
12417	//   "httpMethod": "POST",
12418	//   "id": "drive.parents.insert",
12419	//   "parameterOrder": [
12420	//     "fileId"
12421	//   ],
12422	//   "parameters": {
12423	//     "enforceSingleParent": {
12424	//       "default": "false",
12425	//       "description": "Deprecated. Adding files to multiple folders is no longer supported. Use shortcuts instead.",
12426	//       "location": "query",
12427	//       "type": "boolean"
12428	//     },
12429	//     "fileId": {
12430	//       "description": "The ID of the file.",
12431	//       "location": "path",
12432	//       "required": true,
12433	//       "type": "string"
12434	//     },
12435	//     "supportsAllDrives": {
12436	//       "default": "false",
12437	//       "description": "Whether the requesting application supports both My Drives and shared drives.",
12438	//       "location": "query",
12439	//       "type": "boolean"
12440	//     },
12441	//     "supportsTeamDrives": {
12442	//       "default": "false",
12443	//       "description": "Deprecated use supportsAllDrives instead.",
12444	//       "location": "query",
12445	//       "type": "boolean"
12446	//     }
12447	//   },
12448	//   "path": "files/{fileId}/parents",
12449	//   "request": {
12450	//     "$ref": "ParentReference"
12451	//   },
12452	//   "response": {
12453	//     "$ref": "ParentReference"
12454	//   },
12455	//   "scopes": [
12456	//     "https://www.googleapis.com/auth/drive",
12457	//     "https://www.googleapis.com/auth/drive.appdata",
12458	//     "https://www.googleapis.com/auth/drive.file"
12459	//   ]
12460	// }
12461
12462}
12463
12464// method id "drive.parents.list":
12465
12466type ParentsListCall struct {
12467	s            *Service
12468	fileId       string
12469	urlParams_   gensupport.URLParams
12470	ifNoneMatch_ string
12471	ctx_         context.Context
12472	header_      http.Header
12473}
12474
12475// List: Lists a file's parents.
12476//
12477// - fileId: The ID of the file.
12478func (r *ParentsService) List(fileId string) *ParentsListCall {
12479	c := &ParentsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
12480	c.fileId = fileId
12481	return c
12482}
12483
12484// Fields allows partial responses to be retrieved. See
12485// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
12486// for more information.
12487func (c *ParentsListCall) Fields(s ...googleapi.Field) *ParentsListCall {
12488	c.urlParams_.Set("fields", googleapi.CombineFields(s))
12489	return c
12490}
12491
12492// IfNoneMatch sets the optional parameter which makes the operation
12493// fail if the object's ETag matches the given value. This is useful for
12494// getting updates only after the object has changed since the last
12495// request. Use googleapi.IsNotModified to check whether the response
12496// error from Do is the result of In-None-Match.
12497func (c *ParentsListCall) IfNoneMatch(entityTag string) *ParentsListCall {
12498	c.ifNoneMatch_ = entityTag
12499	return c
12500}
12501
12502// Context sets the context to be used in this call's Do method. Any
12503// pending HTTP request will be aborted if the provided context is
12504// canceled.
12505func (c *ParentsListCall) Context(ctx context.Context) *ParentsListCall {
12506	c.ctx_ = ctx
12507	return c
12508}
12509
12510// Header returns an http.Header that can be modified by the caller to
12511// add HTTP headers to the request.
12512func (c *ParentsListCall) Header() http.Header {
12513	if c.header_ == nil {
12514		c.header_ = make(http.Header)
12515	}
12516	return c.header_
12517}
12518
12519func (c *ParentsListCall) doRequest(alt string) (*http.Response, error) {
12520	reqHeaders := make(http.Header)
12521	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210830")
12522	for k, v := range c.header_ {
12523		reqHeaders[k] = v
12524	}
12525	reqHeaders.Set("User-Agent", c.s.userAgent())
12526	if c.ifNoneMatch_ != "" {
12527		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
12528	}
12529	var body io.Reader = nil
12530	c.urlParams_.Set("alt", alt)
12531	c.urlParams_.Set("prettyPrint", "false")
12532	urls := googleapi.ResolveRelative(c.s.BasePath, "files/{fileId}/parents")
12533	urls += "?" + c.urlParams_.Encode()
12534	req, err := http.NewRequest("GET", urls, body)
12535	if err != nil {
12536		return nil, err
12537	}
12538	req.Header = reqHeaders
12539	googleapi.Expand(req.URL, map[string]string{
12540		"fileId": c.fileId,
12541	})
12542	return gensupport.SendRequest(c.ctx_, c.s.client, req)
12543}
12544
12545// Do executes the "drive.parents.list" call.
12546// Exactly one of *ParentList or error will be non-nil. Any non-2xx
12547// status code is an error. Response headers are in either
12548// *ParentList.ServerResponse.Header or (if a response was returned at
12549// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
12550// to check whether the returned error was because
12551// http.StatusNotModified was returned.
12552func (c *ParentsListCall) Do(opts ...googleapi.CallOption) (*ParentList, error) {
12553	gensupport.SetOptions(c.urlParams_, opts...)
12554	res, err := c.doRequest("json")
12555	if res != nil && res.StatusCode == http.StatusNotModified {
12556		if res.Body != nil {
12557			res.Body.Close()
12558		}
12559		return nil, &googleapi.Error{
12560			Code:   res.StatusCode,
12561			Header: res.Header,
12562		}
12563	}
12564	if err != nil {
12565		return nil, err
12566	}
12567	defer googleapi.CloseBody(res)
12568	if err := googleapi.CheckResponse(res); err != nil {
12569		return nil, err
12570	}
12571	ret := &ParentList{
12572		ServerResponse: googleapi.ServerResponse{
12573			Header:         res.Header,
12574			HTTPStatusCode: res.StatusCode,
12575		},
12576	}
12577	target := &ret
12578	if err := gensupport.DecodeResponse(target, res); err != nil {
12579		return nil, err
12580	}
12581	return ret, nil
12582	// {
12583	//   "description": "Lists a file's parents.",
12584	//   "httpMethod": "GET",
12585	//   "id": "drive.parents.list",
12586	//   "parameterOrder": [
12587	//     "fileId"
12588	//   ],
12589	//   "parameters": {
12590	//     "fileId": {
12591	//       "description": "The ID of the file.",
12592	//       "location": "path",
12593	//       "required": true,
12594	//       "type": "string"
12595	//     }
12596	//   },
12597	//   "path": "files/{fileId}/parents",
12598	//   "response": {
12599	//     "$ref": "ParentList"
12600	//   },
12601	//   "scopes": [
12602	//     "https://www.googleapis.com/auth/drive",
12603	//     "https://www.googleapis.com/auth/drive.appdata",
12604	//     "https://www.googleapis.com/auth/drive.file",
12605	//     "https://www.googleapis.com/auth/drive.metadata",
12606	//     "https://www.googleapis.com/auth/drive.metadata.readonly",
12607	//     "https://www.googleapis.com/auth/drive.photos.readonly",
12608	//     "https://www.googleapis.com/auth/drive.readonly"
12609	//   ]
12610	// }
12611
12612}
12613
12614// method id "drive.permissions.delete":
12615
12616type PermissionsDeleteCall struct {
12617	s            *Service
12618	fileId       string
12619	permissionId string
12620	urlParams_   gensupport.URLParams
12621	ctx_         context.Context
12622	header_      http.Header
12623}
12624
12625// Delete: Deletes a permission from a file or shared drive.
12626//
12627// - fileId: The ID for the file or shared drive.
12628// - permissionId: The ID for the permission.
12629func (r *PermissionsService) Delete(fileId string, permissionId string) *PermissionsDeleteCall {
12630	c := &PermissionsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
12631	c.fileId = fileId
12632	c.permissionId = permissionId
12633	return c
12634}
12635
12636// SupportsAllDrives sets the optional parameter "supportsAllDrives":
12637// Whether the requesting application supports both My Drives and shared
12638// drives.
12639func (c *PermissionsDeleteCall) SupportsAllDrives(supportsAllDrives bool) *PermissionsDeleteCall {
12640	c.urlParams_.Set("supportsAllDrives", fmt.Sprint(supportsAllDrives))
12641	return c
12642}
12643
12644// SupportsTeamDrives sets the optional parameter "supportsTeamDrives":
12645// Deprecated use supportsAllDrives instead.
12646func (c *PermissionsDeleteCall) SupportsTeamDrives(supportsTeamDrives bool) *PermissionsDeleteCall {
12647	c.urlParams_.Set("supportsTeamDrives", fmt.Sprint(supportsTeamDrives))
12648	return c
12649}
12650
12651// UseDomainAdminAccess sets the optional parameter
12652// "useDomainAdminAccess": Issue the request as a domain administrator;
12653// if set to true, then the requester will be granted access if the file
12654// ID parameter refers to a shared drive and the requester is an
12655// administrator of the domain to which the shared drive belongs.
12656func (c *PermissionsDeleteCall) UseDomainAdminAccess(useDomainAdminAccess bool) *PermissionsDeleteCall {
12657	c.urlParams_.Set("useDomainAdminAccess", fmt.Sprint(useDomainAdminAccess))
12658	return c
12659}
12660
12661// Fields allows partial responses to be retrieved. See
12662// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
12663// for more information.
12664func (c *PermissionsDeleteCall) Fields(s ...googleapi.Field) *PermissionsDeleteCall {
12665	c.urlParams_.Set("fields", googleapi.CombineFields(s))
12666	return c
12667}
12668
12669// Context sets the context to be used in this call's Do method. Any
12670// pending HTTP request will be aborted if the provided context is
12671// canceled.
12672func (c *PermissionsDeleteCall) Context(ctx context.Context) *PermissionsDeleteCall {
12673	c.ctx_ = ctx
12674	return c
12675}
12676
12677// Header returns an http.Header that can be modified by the caller to
12678// add HTTP headers to the request.
12679func (c *PermissionsDeleteCall) Header() http.Header {
12680	if c.header_ == nil {
12681		c.header_ = make(http.Header)
12682	}
12683	return c.header_
12684}
12685
12686func (c *PermissionsDeleteCall) doRequest(alt string) (*http.Response, error) {
12687	reqHeaders := make(http.Header)
12688	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210830")
12689	for k, v := range c.header_ {
12690		reqHeaders[k] = v
12691	}
12692	reqHeaders.Set("User-Agent", c.s.userAgent())
12693	var body io.Reader = nil
12694	c.urlParams_.Set("alt", alt)
12695	c.urlParams_.Set("prettyPrint", "false")
12696	urls := googleapi.ResolveRelative(c.s.BasePath, "files/{fileId}/permissions/{permissionId}")
12697	urls += "?" + c.urlParams_.Encode()
12698	req, err := http.NewRequest("DELETE", urls, body)
12699	if err != nil {
12700		return nil, err
12701	}
12702	req.Header = reqHeaders
12703	googleapi.Expand(req.URL, map[string]string{
12704		"fileId":       c.fileId,
12705		"permissionId": c.permissionId,
12706	})
12707	return gensupport.SendRequest(c.ctx_, c.s.client, req)
12708}
12709
12710// Do executes the "drive.permissions.delete" call.
12711func (c *PermissionsDeleteCall) Do(opts ...googleapi.CallOption) error {
12712	gensupport.SetOptions(c.urlParams_, opts...)
12713	res, err := c.doRequest("json")
12714	if err != nil {
12715		return err
12716	}
12717	defer googleapi.CloseBody(res)
12718	if err := googleapi.CheckResponse(res); err != nil {
12719		return err
12720	}
12721	return nil
12722	// {
12723	//   "description": "Deletes a permission from a file or shared drive.",
12724	//   "httpMethod": "DELETE",
12725	//   "id": "drive.permissions.delete",
12726	//   "parameterOrder": [
12727	//     "fileId",
12728	//     "permissionId"
12729	//   ],
12730	//   "parameters": {
12731	//     "fileId": {
12732	//       "description": "The ID for the file or shared drive.",
12733	//       "location": "path",
12734	//       "required": true,
12735	//       "type": "string"
12736	//     },
12737	//     "permissionId": {
12738	//       "description": "The ID for the permission.",
12739	//       "location": "path",
12740	//       "required": true,
12741	//       "type": "string"
12742	//     },
12743	//     "supportsAllDrives": {
12744	//       "default": "false",
12745	//       "description": "Whether the requesting application supports both My Drives and shared drives.",
12746	//       "location": "query",
12747	//       "type": "boolean"
12748	//     },
12749	//     "supportsTeamDrives": {
12750	//       "default": "false",
12751	//       "description": "Deprecated use supportsAllDrives instead.",
12752	//       "location": "query",
12753	//       "type": "boolean"
12754	//     },
12755	//     "useDomainAdminAccess": {
12756	//       "default": "false",
12757	//       "description": "Issue the request as a domain administrator; if set to true, then the requester will be granted access if the file ID parameter refers to a shared drive and the requester is an administrator of the domain to which the shared drive belongs.",
12758	//       "location": "query",
12759	//       "type": "boolean"
12760	//     }
12761	//   },
12762	//   "path": "files/{fileId}/permissions/{permissionId}",
12763	//   "scopes": [
12764	//     "https://www.googleapis.com/auth/drive",
12765	//     "https://www.googleapis.com/auth/drive.file"
12766	//   ]
12767	// }
12768
12769}
12770
12771// method id "drive.permissions.get":
12772
12773type PermissionsGetCall struct {
12774	s            *Service
12775	fileId       string
12776	permissionId string
12777	urlParams_   gensupport.URLParams
12778	ifNoneMatch_ string
12779	ctx_         context.Context
12780	header_      http.Header
12781}
12782
12783// Get: Gets a permission by ID.
12784//
12785// - fileId: The ID for the file or shared drive.
12786// - permissionId: The ID for the permission.
12787func (r *PermissionsService) Get(fileId string, permissionId string) *PermissionsGetCall {
12788	c := &PermissionsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
12789	c.fileId = fileId
12790	c.permissionId = permissionId
12791	return c
12792}
12793
12794// SupportsAllDrives sets the optional parameter "supportsAllDrives":
12795// Whether the requesting application supports both My Drives and shared
12796// drives.
12797func (c *PermissionsGetCall) SupportsAllDrives(supportsAllDrives bool) *PermissionsGetCall {
12798	c.urlParams_.Set("supportsAllDrives", fmt.Sprint(supportsAllDrives))
12799	return c
12800}
12801
12802// SupportsTeamDrives sets the optional parameter "supportsTeamDrives":
12803// Deprecated use supportsAllDrives instead.
12804func (c *PermissionsGetCall) SupportsTeamDrives(supportsTeamDrives bool) *PermissionsGetCall {
12805	c.urlParams_.Set("supportsTeamDrives", fmt.Sprint(supportsTeamDrives))
12806	return c
12807}
12808
12809// UseDomainAdminAccess sets the optional parameter
12810// "useDomainAdminAccess": Issue the request as a domain administrator;
12811// if set to true, then the requester will be granted access if the file
12812// ID parameter refers to a shared drive and the requester is an
12813// administrator of the domain to which the shared drive belongs.
12814func (c *PermissionsGetCall) UseDomainAdminAccess(useDomainAdminAccess bool) *PermissionsGetCall {
12815	c.urlParams_.Set("useDomainAdminAccess", fmt.Sprint(useDomainAdminAccess))
12816	return c
12817}
12818
12819// Fields allows partial responses to be retrieved. See
12820// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
12821// for more information.
12822func (c *PermissionsGetCall) Fields(s ...googleapi.Field) *PermissionsGetCall {
12823	c.urlParams_.Set("fields", googleapi.CombineFields(s))
12824	return c
12825}
12826
12827// IfNoneMatch sets the optional parameter which makes the operation
12828// fail if the object's ETag matches the given value. This is useful for
12829// getting updates only after the object has changed since the last
12830// request. Use googleapi.IsNotModified to check whether the response
12831// error from Do is the result of In-None-Match.
12832func (c *PermissionsGetCall) IfNoneMatch(entityTag string) *PermissionsGetCall {
12833	c.ifNoneMatch_ = entityTag
12834	return c
12835}
12836
12837// Context sets the context to be used in this call's Do method. Any
12838// pending HTTP request will be aborted if the provided context is
12839// canceled.
12840func (c *PermissionsGetCall) Context(ctx context.Context) *PermissionsGetCall {
12841	c.ctx_ = ctx
12842	return c
12843}
12844
12845// Header returns an http.Header that can be modified by the caller to
12846// add HTTP headers to the request.
12847func (c *PermissionsGetCall) Header() http.Header {
12848	if c.header_ == nil {
12849		c.header_ = make(http.Header)
12850	}
12851	return c.header_
12852}
12853
12854func (c *PermissionsGetCall) doRequest(alt string) (*http.Response, error) {
12855	reqHeaders := make(http.Header)
12856	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210830")
12857	for k, v := range c.header_ {
12858		reqHeaders[k] = v
12859	}
12860	reqHeaders.Set("User-Agent", c.s.userAgent())
12861	if c.ifNoneMatch_ != "" {
12862		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
12863	}
12864	var body io.Reader = nil
12865	c.urlParams_.Set("alt", alt)
12866	c.urlParams_.Set("prettyPrint", "false")
12867	urls := googleapi.ResolveRelative(c.s.BasePath, "files/{fileId}/permissions/{permissionId}")
12868	urls += "?" + c.urlParams_.Encode()
12869	req, err := http.NewRequest("GET", urls, body)
12870	if err != nil {
12871		return nil, err
12872	}
12873	req.Header = reqHeaders
12874	googleapi.Expand(req.URL, map[string]string{
12875		"fileId":       c.fileId,
12876		"permissionId": c.permissionId,
12877	})
12878	return gensupport.SendRequest(c.ctx_, c.s.client, req)
12879}
12880
12881// Do executes the "drive.permissions.get" call.
12882// Exactly one of *Permission or error will be non-nil. Any non-2xx
12883// status code is an error. Response headers are in either
12884// *Permission.ServerResponse.Header or (if a response was returned at
12885// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
12886// to check whether the returned error was because
12887// http.StatusNotModified was returned.
12888func (c *PermissionsGetCall) Do(opts ...googleapi.CallOption) (*Permission, error) {
12889	gensupport.SetOptions(c.urlParams_, opts...)
12890	res, err := c.doRequest("json")
12891	if res != nil && res.StatusCode == http.StatusNotModified {
12892		if res.Body != nil {
12893			res.Body.Close()
12894		}
12895		return nil, &googleapi.Error{
12896			Code:   res.StatusCode,
12897			Header: res.Header,
12898		}
12899	}
12900	if err != nil {
12901		return nil, err
12902	}
12903	defer googleapi.CloseBody(res)
12904	if err := googleapi.CheckResponse(res); err != nil {
12905		return nil, err
12906	}
12907	ret := &Permission{
12908		ServerResponse: googleapi.ServerResponse{
12909			Header:         res.Header,
12910			HTTPStatusCode: res.StatusCode,
12911		},
12912	}
12913	target := &ret
12914	if err := gensupport.DecodeResponse(target, res); err != nil {
12915		return nil, err
12916	}
12917	return ret, nil
12918	// {
12919	//   "description": "Gets a permission by ID.",
12920	//   "httpMethod": "GET",
12921	//   "id": "drive.permissions.get",
12922	//   "parameterOrder": [
12923	//     "fileId",
12924	//     "permissionId"
12925	//   ],
12926	//   "parameters": {
12927	//     "fileId": {
12928	//       "description": "The ID for the file or shared drive.",
12929	//       "location": "path",
12930	//       "required": true,
12931	//       "type": "string"
12932	//     },
12933	//     "permissionId": {
12934	//       "description": "The ID for the permission.",
12935	//       "location": "path",
12936	//       "required": true,
12937	//       "type": "string"
12938	//     },
12939	//     "supportsAllDrives": {
12940	//       "default": "false",
12941	//       "description": "Whether the requesting application supports both My Drives and shared drives.",
12942	//       "location": "query",
12943	//       "type": "boolean"
12944	//     },
12945	//     "supportsTeamDrives": {
12946	//       "default": "false",
12947	//       "description": "Deprecated use supportsAllDrives instead.",
12948	//       "location": "query",
12949	//       "type": "boolean"
12950	//     },
12951	//     "useDomainAdminAccess": {
12952	//       "default": "false",
12953	//       "description": "Issue the request as a domain administrator; if set to true, then the requester will be granted access if the file ID parameter refers to a shared drive and the requester is an administrator of the domain to which the shared drive belongs.",
12954	//       "location": "query",
12955	//       "type": "boolean"
12956	//     }
12957	//   },
12958	//   "path": "files/{fileId}/permissions/{permissionId}",
12959	//   "response": {
12960	//     "$ref": "Permission"
12961	//   },
12962	//   "scopes": [
12963	//     "https://www.googleapis.com/auth/drive",
12964	//     "https://www.googleapis.com/auth/drive.file",
12965	//     "https://www.googleapis.com/auth/drive.metadata",
12966	//     "https://www.googleapis.com/auth/drive.metadata.readonly",
12967	//     "https://www.googleapis.com/auth/drive.photos.readonly",
12968	//     "https://www.googleapis.com/auth/drive.readonly"
12969	//   ]
12970	// }
12971
12972}
12973
12974// method id "drive.permissions.getIdForEmail":
12975
12976type PermissionsGetIdForEmailCall struct {
12977	s            *Service
12978	email        string
12979	urlParams_   gensupport.URLParams
12980	ifNoneMatch_ string
12981	ctx_         context.Context
12982	header_      http.Header
12983}
12984
12985// GetIdForEmail: Returns the permission ID for an email address.
12986//
12987// - email: The email address for which to return a permission ID.
12988func (r *PermissionsService) GetIdForEmail(email string) *PermissionsGetIdForEmailCall {
12989	c := &PermissionsGetIdForEmailCall{s: r.s, urlParams_: make(gensupport.URLParams)}
12990	c.email = email
12991	return c
12992}
12993
12994// Fields allows partial responses to be retrieved. See
12995// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
12996// for more information.
12997func (c *PermissionsGetIdForEmailCall) Fields(s ...googleapi.Field) *PermissionsGetIdForEmailCall {
12998	c.urlParams_.Set("fields", googleapi.CombineFields(s))
12999	return c
13000}
13001
13002// IfNoneMatch sets the optional parameter which makes the operation
13003// fail if the object's ETag matches the given value. This is useful for
13004// getting updates only after the object has changed since the last
13005// request. Use googleapi.IsNotModified to check whether the response
13006// error from Do is the result of In-None-Match.
13007func (c *PermissionsGetIdForEmailCall) IfNoneMatch(entityTag string) *PermissionsGetIdForEmailCall {
13008	c.ifNoneMatch_ = entityTag
13009	return c
13010}
13011
13012// Context sets the context to be used in this call's Do method. Any
13013// pending HTTP request will be aborted if the provided context is
13014// canceled.
13015func (c *PermissionsGetIdForEmailCall) Context(ctx context.Context) *PermissionsGetIdForEmailCall {
13016	c.ctx_ = ctx
13017	return c
13018}
13019
13020// Header returns an http.Header that can be modified by the caller to
13021// add HTTP headers to the request.
13022func (c *PermissionsGetIdForEmailCall) Header() http.Header {
13023	if c.header_ == nil {
13024		c.header_ = make(http.Header)
13025	}
13026	return c.header_
13027}
13028
13029func (c *PermissionsGetIdForEmailCall) doRequest(alt string) (*http.Response, error) {
13030	reqHeaders := make(http.Header)
13031	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210830")
13032	for k, v := range c.header_ {
13033		reqHeaders[k] = v
13034	}
13035	reqHeaders.Set("User-Agent", c.s.userAgent())
13036	if c.ifNoneMatch_ != "" {
13037		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
13038	}
13039	var body io.Reader = nil
13040	c.urlParams_.Set("alt", alt)
13041	c.urlParams_.Set("prettyPrint", "false")
13042	urls := googleapi.ResolveRelative(c.s.BasePath, "permissionIds/{email}")
13043	urls += "?" + c.urlParams_.Encode()
13044	req, err := http.NewRequest("GET", urls, body)
13045	if err != nil {
13046		return nil, err
13047	}
13048	req.Header = reqHeaders
13049	googleapi.Expand(req.URL, map[string]string{
13050		"email": c.email,
13051	})
13052	return gensupport.SendRequest(c.ctx_, c.s.client, req)
13053}
13054
13055// Do executes the "drive.permissions.getIdForEmail" call.
13056// Exactly one of *PermissionId or error will be non-nil. Any non-2xx
13057// status code is an error. Response headers are in either
13058// *PermissionId.ServerResponse.Header or (if a response was returned at
13059// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
13060// to check whether the returned error was because
13061// http.StatusNotModified was returned.
13062func (c *PermissionsGetIdForEmailCall) Do(opts ...googleapi.CallOption) (*PermissionId, error) {
13063	gensupport.SetOptions(c.urlParams_, opts...)
13064	res, err := c.doRequest("json")
13065	if res != nil && res.StatusCode == http.StatusNotModified {
13066		if res.Body != nil {
13067			res.Body.Close()
13068		}
13069		return nil, &googleapi.Error{
13070			Code:   res.StatusCode,
13071			Header: res.Header,
13072		}
13073	}
13074	if err != nil {
13075		return nil, err
13076	}
13077	defer googleapi.CloseBody(res)
13078	if err := googleapi.CheckResponse(res); err != nil {
13079		return nil, err
13080	}
13081	ret := &PermissionId{
13082		ServerResponse: googleapi.ServerResponse{
13083			Header:         res.Header,
13084			HTTPStatusCode: res.StatusCode,
13085		},
13086	}
13087	target := &ret
13088	if err := gensupport.DecodeResponse(target, res); err != nil {
13089		return nil, err
13090	}
13091	return ret, nil
13092	// {
13093	//   "description": "Returns the permission ID for an email address.",
13094	//   "httpMethod": "GET",
13095	//   "id": "drive.permissions.getIdForEmail",
13096	//   "parameterOrder": [
13097	//     "email"
13098	//   ],
13099	//   "parameters": {
13100	//     "email": {
13101	//       "description": "The email address for which to return a permission ID",
13102	//       "location": "path",
13103	//       "required": true,
13104	//       "type": "string"
13105	//     }
13106	//   },
13107	//   "path": "permissionIds/{email}",
13108	//   "response": {
13109	//     "$ref": "PermissionId"
13110	//   },
13111	//   "scopes": [
13112	//     "https://www.googleapis.com/auth/drive",
13113	//     "https://www.googleapis.com/auth/drive.appdata",
13114	//     "https://www.googleapis.com/auth/drive.apps.readonly",
13115	//     "https://www.googleapis.com/auth/drive.file",
13116	//     "https://www.googleapis.com/auth/drive.metadata",
13117	//     "https://www.googleapis.com/auth/drive.metadata.readonly",
13118	//     "https://www.googleapis.com/auth/drive.photos.readonly",
13119	//     "https://www.googleapis.com/auth/drive.readonly"
13120	//   ]
13121	// }
13122
13123}
13124
13125// method id "drive.permissions.insert":
13126
13127type PermissionsInsertCall struct {
13128	s          *Service
13129	fileId     string
13130	permission *Permission
13131	urlParams_ gensupport.URLParams
13132	ctx_       context.Context
13133	header_    http.Header
13134}
13135
13136// Insert: Inserts a permission for a file or shared drive.
13137//
13138// - fileId: The ID for the file or shared drive.
13139func (r *PermissionsService) Insert(fileId string, permission *Permission) *PermissionsInsertCall {
13140	c := &PermissionsInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)}
13141	c.fileId = fileId
13142	c.permission = permission
13143	return c
13144}
13145
13146// EmailMessage sets the optional parameter "emailMessage": A plain text
13147// custom message to include in notification emails.
13148func (c *PermissionsInsertCall) EmailMessage(emailMessage string) *PermissionsInsertCall {
13149	c.urlParams_.Set("emailMessage", emailMessage)
13150	return c
13151}
13152
13153// EnforceSingleParent sets the optional parameter
13154// "enforceSingleParent": Deprecated. See moveToNewOwnersRoot for
13155// details.
13156func (c *PermissionsInsertCall) EnforceSingleParent(enforceSingleParent bool) *PermissionsInsertCall {
13157	c.urlParams_.Set("enforceSingleParent", fmt.Sprint(enforceSingleParent))
13158	return c
13159}
13160
13161// MoveToNewOwnersRoot sets the optional parameter
13162// "moveToNewOwnersRoot": This parameter will only take effect if the
13163// item is not in a shared drive and the request is attempting to
13164// transfer the ownership of the item. If set to true, the item will be
13165// moved to the new owner's My Drive root folder and all prior parents
13166// removed. If set to false, parents are not changed.
13167func (c *PermissionsInsertCall) MoveToNewOwnersRoot(moveToNewOwnersRoot bool) *PermissionsInsertCall {
13168	c.urlParams_.Set("moveToNewOwnersRoot", fmt.Sprint(moveToNewOwnersRoot))
13169	return c
13170}
13171
13172// SendNotificationEmails sets the optional parameter
13173// "sendNotificationEmails": Whether to send notification emails when
13174// sharing to users or groups. This parameter is ignored and an email is
13175// sent if the role is owner.
13176func (c *PermissionsInsertCall) SendNotificationEmails(sendNotificationEmails bool) *PermissionsInsertCall {
13177	c.urlParams_.Set("sendNotificationEmails", fmt.Sprint(sendNotificationEmails))
13178	return c
13179}
13180
13181// SupportsAllDrives sets the optional parameter "supportsAllDrives":
13182// Whether the requesting application supports both My Drives and shared
13183// drives.
13184func (c *PermissionsInsertCall) SupportsAllDrives(supportsAllDrives bool) *PermissionsInsertCall {
13185	c.urlParams_.Set("supportsAllDrives", fmt.Sprint(supportsAllDrives))
13186	return c
13187}
13188
13189// SupportsTeamDrives sets the optional parameter "supportsTeamDrives":
13190// Deprecated use supportsAllDrives instead.
13191func (c *PermissionsInsertCall) SupportsTeamDrives(supportsTeamDrives bool) *PermissionsInsertCall {
13192	c.urlParams_.Set("supportsTeamDrives", fmt.Sprint(supportsTeamDrives))
13193	return c
13194}
13195
13196// UseDomainAdminAccess sets the optional parameter
13197// "useDomainAdminAccess": Issue the request as a domain administrator;
13198// if set to true, then the requester will be granted access if the file
13199// ID parameter refers to a shared drive and the requester is an
13200// administrator of the domain to which the shared drive belongs.
13201func (c *PermissionsInsertCall) UseDomainAdminAccess(useDomainAdminAccess bool) *PermissionsInsertCall {
13202	c.urlParams_.Set("useDomainAdminAccess", fmt.Sprint(useDomainAdminAccess))
13203	return c
13204}
13205
13206// Fields allows partial responses to be retrieved. See
13207// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
13208// for more information.
13209func (c *PermissionsInsertCall) Fields(s ...googleapi.Field) *PermissionsInsertCall {
13210	c.urlParams_.Set("fields", googleapi.CombineFields(s))
13211	return c
13212}
13213
13214// Context sets the context to be used in this call's Do method. Any
13215// pending HTTP request will be aborted if the provided context is
13216// canceled.
13217func (c *PermissionsInsertCall) Context(ctx context.Context) *PermissionsInsertCall {
13218	c.ctx_ = ctx
13219	return c
13220}
13221
13222// Header returns an http.Header that can be modified by the caller to
13223// add HTTP headers to the request.
13224func (c *PermissionsInsertCall) Header() http.Header {
13225	if c.header_ == nil {
13226		c.header_ = make(http.Header)
13227	}
13228	return c.header_
13229}
13230
13231func (c *PermissionsInsertCall) doRequest(alt string) (*http.Response, error) {
13232	reqHeaders := make(http.Header)
13233	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210830")
13234	for k, v := range c.header_ {
13235		reqHeaders[k] = v
13236	}
13237	reqHeaders.Set("User-Agent", c.s.userAgent())
13238	var body io.Reader = nil
13239	body, err := googleapi.WithoutDataWrapper.JSONReader(c.permission)
13240	if err != nil {
13241		return nil, err
13242	}
13243	reqHeaders.Set("Content-Type", "application/json")
13244	c.urlParams_.Set("alt", alt)
13245	c.urlParams_.Set("prettyPrint", "false")
13246	urls := googleapi.ResolveRelative(c.s.BasePath, "files/{fileId}/permissions")
13247	urls += "?" + c.urlParams_.Encode()
13248	req, err := http.NewRequest("POST", urls, body)
13249	if err != nil {
13250		return nil, err
13251	}
13252	req.Header = reqHeaders
13253	googleapi.Expand(req.URL, map[string]string{
13254		"fileId": c.fileId,
13255	})
13256	return gensupport.SendRequest(c.ctx_, c.s.client, req)
13257}
13258
13259// Do executes the "drive.permissions.insert" call.
13260// Exactly one of *Permission or error will be non-nil. Any non-2xx
13261// status code is an error. Response headers are in either
13262// *Permission.ServerResponse.Header or (if a response was returned at
13263// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
13264// to check whether the returned error was because
13265// http.StatusNotModified was returned.
13266func (c *PermissionsInsertCall) Do(opts ...googleapi.CallOption) (*Permission, error) {
13267	gensupport.SetOptions(c.urlParams_, opts...)
13268	res, err := c.doRequest("json")
13269	if res != nil && res.StatusCode == http.StatusNotModified {
13270		if res.Body != nil {
13271			res.Body.Close()
13272		}
13273		return nil, &googleapi.Error{
13274			Code:   res.StatusCode,
13275			Header: res.Header,
13276		}
13277	}
13278	if err != nil {
13279		return nil, err
13280	}
13281	defer googleapi.CloseBody(res)
13282	if err := googleapi.CheckResponse(res); err != nil {
13283		return nil, err
13284	}
13285	ret := &Permission{
13286		ServerResponse: googleapi.ServerResponse{
13287			Header:         res.Header,
13288			HTTPStatusCode: res.StatusCode,
13289		},
13290	}
13291	target := &ret
13292	if err := gensupport.DecodeResponse(target, res); err != nil {
13293		return nil, err
13294	}
13295	return ret, nil
13296	// {
13297	//   "description": "Inserts a permission for a file or shared drive.",
13298	//   "httpMethod": "POST",
13299	//   "id": "drive.permissions.insert",
13300	//   "parameterOrder": [
13301	//     "fileId"
13302	//   ],
13303	//   "parameters": {
13304	//     "emailMessage": {
13305	//       "description": "A plain text custom message to include in notification emails.",
13306	//       "location": "query",
13307	//       "type": "string"
13308	//     },
13309	//     "enforceSingleParent": {
13310	//       "default": "false",
13311	//       "description": "Deprecated. See moveToNewOwnersRoot for details.",
13312	//       "location": "query",
13313	//       "type": "boolean"
13314	//     },
13315	//     "fileId": {
13316	//       "description": "The ID for the file or shared drive.",
13317	//       "location": "path",
13318	//       "required": true,
13319	//       "type": "string"
13320	//     },
13321	//     "moveToNewOwnersRoot": {
13322	//       "default": "false",
13323	//       "description": "This parameter will only take effect if the item is not in a shared drive and the request is attempting to transfer the ownership of the item. If set to true, the item will be moved to the new owner's My Drive root folder and all prior parents removed. If set to false, parents are not changed.",
13324	//       "location": "query",
13325	//       "type": "boolean"
13326	//     },
13327	//     "sendNotificationEmails": {
13328	//       "default": "true",
13329	//       "description": "Whether to send notification emails when sharing to users or groups. This parameter is ignored and an email is sent if the role is owner.",
13330	//       "location": "query",
13331	//       "type": "boolean"
13332	//     },
13333	//     "supportsAllDrives": {
13334	//       "default": "false",
13335	//       "description": "Whether the requesting application supports both My Drives and shared drives.",
13336	//       "location": "query",
13337	//       "type": "boolean"
13338	//     },
13339	//     "supportsTeamDrives": {
13340	//       "default": "false",
13341	//       "description": "Deprecated use supportsAllDrives instead.",
13342	//       "location": "query",
13343	//       "type": "boolean"
13344	//     },
13345	//     "useDomainAdminAccess": {
13346	//       "default": "false",
13347	//       "description": "Issue the request as a domain administrator; if set to true, then the requester will be granted access if the file ID parameter refers to a shared drive and the requester is an administrator of the domain to which the shared drive belongs.",
13348	//       "location": "query",
13349	//       "type": "boolean"
13350	//     }
13351	//   },
13352	//   "path": "files/{fileId}/permissions",
13353	//   "request": {
13354	//     "$ref": "Permission"
13355	//   },
13356	//   "response": {
13357	//     "$ref": "Permission"
13358	//   },
13359	//   "scopes": [
13360	//     "https://www.googleapis.com/auth/drive",
13361	//     "https://www.googleapis.com/auth/drive.file"
13362	//   ]
13363	// }
13364
13365}
13366
13367// method id "drive.permissions.list":
13368
13369type PermissionsListCall struct {
13370	s            *Service
13371	fileId       string
13372	urlParams_   gensupport.URLParams
13373	ifNoneMatch_ string
13374	ctx_         context.Context
13375	header_      http.Header
13376}
13377
13378// List: Lists a file's or shared drive's permissions.
13379//
13380// - fileId: The ID for the file or shared drive.
13381func (r *PermissionsService) List(fileId string) *PermissionsListCall {
13382	c := &PermissionsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
13383	c.fileId = fileId
13384	return c
13385}
13386
13387// IncludePermissionsForView sets the optional parameter
13388// "includePermissionsForView": Specifies which additional view's
13389// permissions to include in the response. Only 'published' is
13390// supported.
13391func (c *PermissionsListCall) IncludePermissionsForView(includePermissionsForView string) *PermissionsListCall {
13392	c.urlParams_.Set("includePermissionsForView", includePermissionsForView)
13393	return c
13394}
13395
13396// MaxResults sets the optional parameter "maxResults": The maximum
13397// number of permissions to return per page. When not set for files in a
13398// shared drive, at most 100 results will be returned. When not set for
13399// files that are not in a shared drive, the entire list will be
13400// returned.
13401func (c *PermissionsListCall) MaxResults(maxResults int64) *PermissionsListCall {
13402	c.urlParams_.Set("maxResults", fmt.Sprint(maxResults))
13403	return c
13404}
13405
13406// PageToken sets the optional parameter "pageToken": The token for
13407// continuing a previous list request on the next page. This should be
13408// set to the value of 'nextPageToken' from the previous response.
13409func (c *PermissionsListCall) PageToken(pageToken string) *PermissionsListCall {
13410	c.urlParams_.Set("pageToken", pageToken)
13411	return c
13412}
13413
13414// SupportsAllDrives sets the optional parameter "supportsAllDrives":
13415// Whether the requesting application supports both My Drives and shared
13416// drives.
13417func (c *PermissionsListCall) SupportsAllDrives(supportsAllDrives bool) *PermissionsListCall {
13418	c.urlParams_.Set("supportsAllDrives", fmt.Sprint(supportsAllDrives))
13419	return c
13420}
13421
13422// SupportsTeamDrives sets the optional parameter "supportsTeamDrives":
13423// Deprecated use supportsAllDrives instead.
13424func (c *PermissionsListCall) SupportsTeamDrives(supportsTeamDrives bool) *PermissionsListCall {
13425	c.urlParams_.Set("supportsTeamDrives", fmt.Sprint(supportsTeamDrives))
13426	return c
13427}
13428
13429// UseDomainAdminAccess sets the optional parameter
13430// "useDomainAdminAccess": Issue the request as a domain administrator;
13431// if set to true, then the requester will be granted access if the file
13432// ID parameter refers to a shared drive and the requester is an
13433// administrator of the domain to which the shared drive belongs.
13434func (c *PermissionsListCall) UseDomainAdminAccess(useDomainAdminAccess bool) *PermissionsListCall {
13435	c.urlParams_.Set("useDomainAdminAccess", fmt.Sprint(useDomainAdminAccess))
13436	return c
13437}
13438
13439// Fields allows partial responses to be retrieved. See
13440// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
13441// for more information.
13442func (c *PermissionsListCall) Fields(s ...googleapi.Field) *PermissionsListCall {
13443	c.urlParams_.Set("fields", googleapi.CombineFields(s))
13444	return c
13445}
13446
13447// IfNoneMatch sets the optional parameter which makes the operation
13448// fail if the object's ETag matches the given value. This is useful for
13449// getting updates only after the object has changed since the last
13450// request. Use googleapi.IsNotModified to check whether the response
13451// error from Do is the result of In-None-Match.
13452func (c *PermissionsListCall) IfNoneMatch(entityTag string) *PermissionsListCall {
13453	c.ifNoneMatch_ = entityTag
13454	return c
13455}
13456
13457// Context sets the context to be used in this call's Do method. Any
13458// pending HTTP request will be aborted if the provided context is
13459// canceled.
13460func (c *PermissionsListCall) Context(ctx context.Context) *PermissionsListCall {
13461	c.ctx_ = ctx
13462	return c
13463}
13464
13465// Header returns an http.Header that can be modified by the caller to
13466// add HTTP headers to the request.
13467func (c *PermissionsListCall) Header() http.Header {
13468	if c.header_ == nil {
13469		c.header_ = make(http.Header)
13470	}
13471	return c.header_
13472}
13473
13474func (c *PermissionsListCall) doRequest(alt string) (*http.Response, error) {
13475	reqHeaders := make(http.Header)
13476	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210830")
13477	for k, v := range c.header_ {
13478		reqHeaders[k] = v
13479	}
13480	reqHeaders.Set("User-Agent", c.s.userAgent())
13481	if c.ifNoneMatch_ != "" {
13482		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
13483	}
13484	var body io.Reader = nil
13485	c.urlParams_.Set("alt", alt)
13486	c.urlParams_.Set("prettyPrint", "false")
13487	urls := googleapi.ResolveRelative(c.s.BasePath, "files/{fileId}/permissions")
13488	urls += "?" + c.urlParams_.Encode()
13489	req, err := http.NewRequest("GET", urls, body)
13490	if err != nil {
13491		return nil, err
13492	}
13493	req.Header = reqHeaders
13494	googleapi.Expand(req.URL, map[string]string{
13495		"fileId": c.fileId,
13496	})
13497	return gensupport.SendRequest(c.ctx_, c.s.client, req)
13498}
13499
13500// Do executes the "drive.permissions.list" call.
13501// Exactly one of *PermissionList or error will be non-nil. Any non-2xx
13502// status code is an error. Response headers are in either
13503// *PermissionList.ServerResponse.Header or (if a response was returned
13504// at all) in error.(*googleapi.Error).Header. Use
13505// googleapi.IsNotModified to check whether the returned error was
13506// because http.StatusNotModified was returned.
13507func (c *PermissionsListCall) Do(opts ...googleapi.CallOption) (*PermissionList, error) {
13508	gensupport.SetOptions(c.urlParams_, opts...)
13509	res, err := c.doRequest("json")
13510	if res != nil && res.StatusCode == http.StatusNotModified {
13511		if res.Body != nil {
13512			res.Body.Close()
13513		}
13514		return nil, &googleapi.Error{
13515			Code:   res.StatusCode,
13516			Header: res.Header,
13517		}
13518	}
13519	if err != nil {
13520		return nil, err
13521	}
13522	defer googleapi.CloseBody(res)
13523	if err := googleapi.CheckResponse(res); err != nil {
13524		return nil, err
13525	}
13526	ret := &PermissionList{
13527		ServerResponse: googleapi.ServerResponse{
13528			Header:         res.Header,
13529			HTTPStatusCode: res.StatusCode,
13530		},
13531	}
13532	target := &ret
13533	if err := gensupport.DecodeResponse(target, res); err != nil {
13534		return nil, err
13535	}
13536	return ret, nil
13537	// {
13538	//   "description": "Lists a file's or shared drive's permissions.",
13539	//   "httpMethod": "GET",
13540	//   "id": "drive.permissions.list",
13541	//   "parameterOrder": [
13542	//     "fileId"
13543	//   ],
13544	//   "parameters": {
13545	//     "fileId": {
13546	//       "description": "The ID for the file or shared drive.",
13547	//       "location": "path",
13548	//       "required": true,
13549	//       "type": "string"
13550	//     },
13551	//     "includePermissionsForView": {
13552	//       "description": "Specifies which additional view's permissions to include in the response. Only 'published' is supported.",
13553	//       "location": "query",
13554	//       "type": "string"
13555	//     },
13556	//     "maxResults": {
13557	//       "description": "The maximum number of permissions to return per page. When not set for files in a shared drive, at most 100 results will be returned. When not set for files that are not in a shared drive, the entire list will be returned.",
13558	//       "format": "int32",
13559	//       "location": "query",
13560	//       "maximum": "100",
13561	//       "minimum": "1",
13562	//       "type": "integer"
13563	//     },
13564	//     "pageToken": {
13565	//       "description": "The token for continuing a previous list request on the next page. This should be set to the value of 'nextPageToken' from the previous response.",
13566	//       "location": "query",
13567	//       "type": "string"
13568	//     },
13569	//     "supportsAllDrives": {
13570	//       "default": "false",
13571	//       "description": "Whether the requesting application supports both My Drives and shared drives.",
13572	//       "location": "query",
13573	//       "type": "boolean"
13574	//     },
13575	//     "supportsTeamDrives": {
13576	//       "default": "false",
13577	//       "description": "Deprecated use supportsAllDrives instead.",
13578	//       "location": "query",
13579	//       "type": "boolean"
13580	//     },
13581	//     "useDomainAdminAccess": {
13582	//       "default": "false",
13583	//       "description": "Issue the request as a domain administrator; if set to true, then the requester will be granted access if the file ID parameter refers to a shared drive and the requester is an administrator of the domain to which the shared drive belongs.",
13584	//       "location": "query",
13585	//       "type": "boolean"
13586	//     }
13587	//   },
13588	//   "path": "files/{fileId}/permissions",
13589	//   "response": {
13590	//     "$ref": "PermissionList"
13591	//   },
13592	//   "scopes": [
13593	//     "https://www.googleapis.com/auth/drive",
13594	//     "https://www.googleapis.com/auth/drive.file",
13595	//     "https://www.googleapis.com/auth/drive.metadata",
13596	//     "https://www.googleapis.com/auth/drive.metadata.readonly",
13597	//     "https://www.googleapis.com/auth/drive.photos.readonly",
13598	//     "https://www.googleapis.com/auth/drive.readonly"
13599	//   ]
13600	// }
13601
13602}
13603
13604// Pages invokes f for each page of results.
13605// A non-nil error returned from f will halt the iteration.
13606// The provided context supersedes any context provided to the Context method.
13607func (c *PermissionsListCall) Pages(ctx context.Context, f func(*PermissionList) error) error {
13608	c.ctx_ = ctx
13609	defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
13610	for {
13611		x, err := c.Do()
13612		if err != nil {
13613			return err
13614		}
13615		if err := f(x); err != nil {
13616			return err
13617		}
13618		if x.NextPageToken == "" {
13619			return nil
13620		}
13621		c.PageToken(x.NextPageToken)
13622	}
13623}
13624
13625// method id "drive.permissions.patch":
13626
13627type PermissionsPatchCall struct {
13628	s            *Service
13629	fileId       string
13630	permissionId string
13631	permission   *Permission
13632	urlParams_   gensupport.URLParams
13633	ctx_         context.Context
13634	header_      http.Header
13635}
13636
13637// Patch: Updates a permission using patch semantics.
13638//
13639// - fileId: The ID for the file or shared drive.
13640// - permissionId: The ID for the permission.
13641func (r *PermissionsService) Patch(fileId string, permissionId string, permission *Permission) *PermissionsPatchCall {
13642	c := &PermissionsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
13643	c.fileId = fileId
13644	c.permissionId = permissionId
13645	c.permission = permission
13646	return c
13647}
13648
13649// RemoveExpiration sets the optional parameter "removeExpiration":
13650// Whether to remove the expiration date.
13651func (c *PermissionsPatchCall) RemoveExpiration(removeExpiration bool) *PermissionsPatchCall {
13652	c.urlParams_.Set("removeExpiration", fmt.Sprint(removeExpiration))
13653	return c
13654}
13655
13656// SupportsAllDrives sets the optional parameter "supportsAllDrives":
13657// Whether the requesting application supports both My Drives and shared
13658// drives.
13659func (c *PermissionsPatchCall) SupportsAllDrives(supportsAllDrives bool) *PermissionsPatchCall {
13660	c.urlParams_.Set("supportsAllDrives", fmt.Sprint(supportsAllDrives))
13661	return c
13662}
13663
13664// SupportsTeamDrives sets the optional parameter "supportsTeamDrives":
13665// Deprecated use supportsAllDrives instead.
13666func (c *PermissionsPatchCall) SupportsTeamDrives(supportsTeamDrives bool) *PermissionsPatchCall {
13667	c.urlParams_.Set("supportsTeamDrives", fmt.Sprint(supportsTeamDrives))
13668	return c
13669}
13670
13671// TransferOwnership sets the optional parameter "transferOwnership":
13672// Whether changing a role to 'owner' downgrades the current owners to
13673// writers. Does nothing if the specified role is not 'owner'.
13674func (c *PermissionsPatchCall) TransferOwnership(transferOwnership bool) *PermissionsPatchCall {
13675	c.urlParams_.Set("transferOwnership", fmt.Sprint(transferOwnership))
13676	return c
13677}
13678
13679// UseDomainAdminAccess sets the optional parameter
13680// "useDomainAdminAccess": Issue the request as a domain administrator;
13681// if set to true, then the requester will be granted access if the file
13682// ID parameter refers to a shared drive and the requester is an
13683// administrator of the domain to which the shared drive belongs.
13684func (c *PermissionsPatchCall) UseDomainAdminAccess(useDomainAdminAccess bool) *PermissionsPatchCall {
13685	c.urlParams_.Set("useDomainAdminAccess", fmt.Sprint(useDomainAdminAccess))
13686	return c
13687}
13688
13689// Fields allows partial responses to be retrieved. See
13690// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
13691// for more information.
13692func (c *PermissionsPatchCall) Fields(s ...googleapi.Field) *PermissionsPatchCall {
13693	c.urlParams_.Set("fields", googleapi.CombineFields(s))
13694	return c
13695}
13696
13697// Context sets the context to be used in this call's Do method. Any
13698// pending HTTP request will be aborted if the provided context is
13699// canceled.
13700func (c *PermissionsPatchCall) Context(ctx context.Context) *PermissionsPatchCall {
13701	c.ctx_ = ctx
13702	return c
13703}
13704
13705// Header returns an http.Header that can be modified by the caller to
13706// add HTTP headers to the request.
13707func (c *PermissionsPatchCall) Header() http.Header {
13708	if c.header_ == nil {
13709		c.header_ = make(http.Header)
13710	}
13711	return c.header_
13712}
13713
13714func (c *PermissionsPatchCall) doRequest(alt string) (*http.Response, error) {
13715	reqHeaders := make(http.Header)
13716	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210830")
13717	for k, v := range c.header_ {
13718		reqHeaders[k] = v
13719	}
13720	reqHeaders.Set("User-Agent", c.s.userAgent())
13721	var body io.Reader = nil
13722	body, err := googleapi.WithoutDataWrapper.JSONReader(c.permission)
13723	if err != nil {
13724		return nil, err
13725	}
13726	reqHeaders.Set("Content-Type", "application/json")
13727	c.urlParams_.Set("alt", alt)
13728	c.urlParams_.Set("prettyPrint", "false")
13729	urls := googleapi.ResolveRelative(c.s.BasePath, "files/{fileId}/permissions/{permissionId}")
13730	urls += "?" + c.urlParams_.Encode()
13731	req, err := http.NewRequest("PATCH", urls, body)
13732	if err != nil {
13733		return nil, err
13734	}
13735	req.Header = reqHeaders
13736	googleapi.Expand(req.URL, map[string]string{
13737		"fileId":       c.fileId,
13738		"permissionId": c.permissionId,
13739	})
13740	return gensupport.SendRequest(c.ctx_, c.s.client, req)
13741}
13742
13743// Do executes the "drive.permissions.patch" call.
13744// Exactly one of *Permission or error will be non-nil. Any non-2xx
13745// status code is an error. Response headers are in either
13746// *Permission.ServerResponse.Header or (if a response was returned at
13747// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
13748// to check whether the returned error was because
13749// http.StatusNotModified was returned.
13750func (c *PermissionsPatchCall) Do(opts ...googleapi.CallOption) (*Permission, error) {
13751	gensupport.SetOptions(c.urlParams_, opts...)
13752	res, err := c.doRequest("json")
13753	if res != nil && res.StatusCode == http.StatusNotModified {
13754		if res.Body != nil {
13755			res.Body.Close()
13756		}
13757		return nil, &googleapi.Error{
13758			Code:   res.StatusCode,
13759			Header: res.Header,
13760		}
13761	}
13762	if err != nil {
13763		return nil, err
13764	}
13765	defer googleapi.CloseBody(res)
13766	if err := googleapi.CheckResponse(res); err != nil {
13767		return nil, err
13768	}
13769	ret := &Permission{
13770		ServerResponse: googleapi.ServerResponse{
13771			Header:         res.Header,
13772			HTTPStatusCode: res.StatusCode,
13773		},
13774	}
13775	target := &ret
13776	if err := gensupport.DecodeResponse(target, res); err != nil {
13777		return nil, err
13778	}
13779	return ret, nil
13780	// {
13781	//   "description": "Updates a permission using patch semantics.",
13782	//   "httpMethod": "PATCH",
13783	//   "id": "drive.permissions.patch",
13784	//   "parameterOrder": [
13785	//     "fileId",
13786	//     "permissionId"
13787	//   ],
13788	//   "parameters": {
13789	//     "fileId": {
13790	//       "description": "The ID for the file or shared drive.",
13791	//       "location": "path",
13792	//       "required": true,
13793	//       "type": "string"
13794	//     },
13795	//     "permissionId": {
13796	//       "description": "The ID for the permission.",
13797	//       "location": "path",
13798	//       "required": true,
13799	//       "type": "string"
13800	//     },
13801	//     "removeExpiration": {
13802	//       "default": "false",
13803	//       "description": "Whether to remove the expiration date.",
13804	//       "location": "query",
13805	//       "type": "boolean"
13806	//     },
13807	//     "supportsAllDrives": {
13808	//       "default": "false",
13809	//       "description": "Whether the requesting application supports both My Drives and shared drives.",
13810	//       "location": "query",
13811	//       "type": "boolean"
13812	//     },
13813	//     "supportsTeamDrives": {
13814	//       "default": "false",
13815	//       "description": "Deprecated use supportsAllDrives instead.",
13816	//       "location": "query",
13817	//       "type": "boolean"
13818	//     },
13819	//     "transferOwnership": {
13820	//       "default": "false",
13821	//       "description": "Whether changing a role to 'owner' downgrades the current owners to writers. Does nothing if the specified role is not 'owner'.",
13822	//       "location": "query",
13823	//       "type": "boolean"
13824	//     },
13825	//     "useDomainAdminAccess": {
13826	//       "default": "false",
13827	//       "description": "Issue the request as a domain administrator; if set to true, then the requester will be granted access if the file ID parameter refers to a shared drive and the requester is an administrator of the domain to which the shared drive belongs.",
13828	//       "location": "query",
13829	//       "type": "boolean"
13830	//     }
13831	//   },
13832	//   "path": "files/{fileId}/permissions/{permissionId}",
13833	//   "request": {
13834	//     "$ref": "Permission"
13835	//   },
13836	//   "response": {
13837	//     "$ref": "Permission"
13838	//   },
13839	//   "scopes": [
13840	//     "https://www.googleapis.com/auth/drive",
13841	//     "https://www.googleapis.com/auth/drive.file"
13842	//   ]
13843	// }
13844
13845}
13846
13847// method id "drive.permissions.update":
13848
13849type PermissionsUpdateCall struct {
13850	s            *Service
13851	fileId       string
13852	permissionId string
13853	permission   *Permission
13854	urlParams_   gensupport.URLParams
13855	ctx_         context.Context
13856	header_      http.Header
13857}
13858
13859// Update: Updates a permission.
13860//
13861// - fileId: The ID for the file or shared drive.
13862// - permissionId: The ID for the permission.
13863func (r *PermissionsService) Update(fileId string, permissionId string, permission *Permission) *PermissionsUpdateCall {
13864	c := &PermissionsUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
13865	c.fileId = fileId
13866	c.permissionId = permissionId
13867	c.permission = permission
13868	return c
13869}
13870
13871// RemoveExpiration sets the optional parameter "removeExpiration":
13872// Whether to remove the expiration date.
13873func (c *PermissionsUpdateCall) RemoveExpiration(removeExpiration bool) *PermissionsUpdateCall {
13874	c.urlParams_.Set("removeExpiration", fmt.Sprint(removeExpiration))
13875	return c
13876}
13877
13878// SupportsAllDrives sets the optional parameter "supportsAllDrives":
13879// Whether the requesting application supports both My Drives and shared
13880// drives.
13881func (c *PermissionsUpdateCall) SupportsAllDrives(supportsAllDrives bool) *PermissionsUpdateCall {
13882	c.urlParams_.Set("supportsAllDrives", fmt.Sprint(supportsAllDrives))
13883	return c
13884}
13885
13886// SupportsTeamDrives sets the optional parameter "supportsTeamDrives":
13887// Deprecated use supportsAllDrives instead.
13888func (c *PermissionsUpdateCall) SupportsTeamDrives(supportsTeamDrives bool) *PermissionsUpdateCall {
13889	c.urlParams_.Set("supportsTeamDrives", fmt.Sprint(supportsTeamDrives))
13890	return c
13891}
13892
13893// TransferOwnership sets the optional parameter "transferOwnership":
13894// Whether to transfer ownership to the specified user and downgrade the
13895// current owner to a writer. This parameter is required as an
13896// acknowledgement of the side effect. File owners can only transfer
13897// ownership of files existing on My Drive. Files existing in a shared
13898// drive are owned by the organization that owns that shared drive.
13899// Ownership transfers are not supported for files and folders in shared
13900// drives. Organizers of a shared drive can move items from that shared
13901// drive into their My Drive which transfers the ownership to them.
13902func (c *PermissionsUpdateCall) TransferOwnership(transferOwnership bool) *PermissionsUpdateCall {
13903	c.urlParams_.Set("transferOwnership", fmt.Sprint(transferOwnership))
13904	return c
13905}
13906
13907// UseDomainAdminAccess sets the optional parameter
13908// "useDomainAdminAccess": Issue the request as a domain administrator;
13909// if set to true, then the requester will be granted access if the file
13910// ID parameter refers to a shared drive and the requester is an
13911// administrator of the domain to which the shared drive belongs.
13912func (c *PermissionsUpdateCall) UseDomainAdminAccess(useDomainAdminAccess bool) *PermissionsUpdateCall {
13913	c.urlParams_.Set("useDomainAdminAccess", fmt.Sprint(useDomainAdminAccess))
13914	return c
13915}
13916
13917// Fields allows partial responses to be retrieved. See
13918// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
13919// for more information.
13920func (c *PermissionsUpdateCall) Fields(s ...googleapi.Field) *PermissionsUpdateCall {
13921	c.urlParams_.Set("fields", googleapi.CombineFields(s))
13922	return c
13923}
13924
13925// Context sets the context to be used in this call's Do method. Any
13926// pending HTTP request will be aborted if the provided context is
13927// canceled.
13928func (c *PermissionsUpdateCall) Context(ctx context.Context) *PermissionsUpdateCall {
13929	c.ctx_ = ctx
13930	return c
13931}
13932
13933// Header returns an http.Header that can be modified by the caller to
13934// add HTTP headers to the request.
13935func (c *PermissionsUpdateCall) Header() http.Header {
13936	if c.header_ == nil {
13937		c.header_ = make(http.Header)
13938	}
13939	return c.header_
13940}
13941
13942func (c *PermissionsUpdateCall) doRequest(alt string) (*http.Response, error) {
13943	reqHeaders := make(http.Header)
13944	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210830")
13945	for k, v := range c.header_ {
13946		reqHeaders[k] = v
13947	}
13948	reqHeaders.Set("User-Agent", c.s.userAgent())
13949	var body io.Reader = nil
13950	body, err := googleapi.WithoutDataWrapper.JSONReader(c.permission)
13951	if err != nil {
13952		return nil, err
13953	}
13954	reqHeaders.Set("Content-Type", "application/json")
13955	c.urlParams_.Set("alt", alt)
13956	c.urlParams_.Set("prettyPrint", "false")
13957	urls := googleapi.ResolveRelative(c.s.BasePath, "files/{fileId}/permissions/{permissionId}")
13958	urls += "?" + c.urlParams_.Encode()
13959	req, err := http.NewRequest("PUT", urls, body)
13960	if err != nil {
13961		return nil, err
13962	}
13963	req.Header = reqHeaders
13964	googleapi.Expand(req.URL, map[string]string{
13965		"fileId":       c.fileId,
13966		"permissionId": c.permissionId,
13967	})
13968	return gensupport.SendRequest(c.ctx_, c.s.client, req)
13969}
13970
13971// Do executes the "drive.permissions.update" call.
13972// Exactly one of *Permission or error will be non-nil. Any non-2xx
13973// status code is an error. Response headers are in either
13974// *Permission.ServerResponse.Header or (if a response was returned at
13975// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
13976// to check whether the returned error was because
13977// http.StatusNotModified was returned.
13978func (c *PermissionsUpdateCall) Do(opts ...googleapi.CallOption) (*Permission, error) {
13979	gensupport.SetOptions(c.urlParams_, opts...)
13980	res, err := c.doRequest("json")
13981	if res != nil && res.StatusCode == http.StatusNotModified {
13982		if res.Body != nil {
13983			res.Body.Close()
13984		}
13985		return nil, &googleapi.Error{
13986			Code:   res.StatusCode,
13987			Header: res.Header,
13988		}
13989	}
13990	if err != nil {
13991		return nil, err
13992	}
13993	defer googleapi.CloseBody(res)
13994	if err := googleapi.CheckResponse(res); err != nil {
13995		return nil, err
13996	}
13997	ret := &Permission{
13998		ServerResponse: googleapi.ServerResponse{
13999			Header:         res.Header,
14000			HTTPStatusCode: res.StatusCode,
14001		},
14002	}
14003	target := &ret
14004	if err := gensupport.DecodeResponse(target, res); err != nil {
14005		return nil, err
14006	}
14007	return ret, nil
14008	// {
14009	//   "description": "Updates a permission.",
14010	//   "httpMethod": "PUT",
14011	//   "id": "drive.permissions.update",
14012	//   "parameterOrder": [
14013	//     "fileId",
14014	//     "permissionId"
14015	//   ],
14016	//   "parameters": {
14017	//     "fileId": {
14018	//       "description": "The ID for the file or shared drive.",
14019	//       "location": "path",
14020	//       "required": true,
14021	//       "type": "string"
14022	//     },
14023	//     "permissionId": {
14024	//       "description": "The ID for the permission.",
14025	//       "location": "path",
14026	//       "required": true,
14027	//       "type": "string"
14028	//     },
14029	//     "removeExpiration": {
14030	//       "default": "false",
14031	//       "description": "Whether to remove the expiration date.",
14032	//       "location": "query",
14033	//       "type": "boolean"
14034	//     },
14035	//     "supportsAllDrives": {
14036	//       "default": "false",
14037	//       "description": "Whether the requesting application supports both My Drives and shared drives.",
14038	//       "location": "query",
14039	//       "type": "boolean"
14040	//     },
14041	//     "supportsTeamDrives": {
14042	//       "default": "false",
14043	//       "description": "Deprecated use supportsAllDrives instead.",
14044	//       "location": "query",
14045	//       "type": "boolean"
14046	//     },
14047	//     "transferOwnership": {
14048	//       "default": "false",
14049	//       "description": "Whether to transfer ownership to the specified user and downgrade the current owner to a writer. This parameter is required as an acknowledgement of the side effect. File owners can only transfer ownership of files existing on My Drive. Files existing in a shared drive are owned by the organization that owns that shared drive. Ownership transfers are not supported for files and folders in shared drives. Organizers of a shared drive can move items from that shared drive into their My Drive which transfers the ownership to them.",
14050	//       "location": "query",
14051	//       "type": "boolean"
14052	//     },
14053	//     "useDomainAdminAccess": {
14054	//       "default": "false",
14055	//       "description": "Issue the request as a domain administrator; if set to true, then the requester will be granted access if the file ID parameter refers to a shared drive and the requester is an administrator of the domain to which the shared drive belongs.",
14056	//       "location": "query",
14057	//       "type": "boolean"
14058	//     }
14059	//   },
14060	//   "path": "files/{fileId}/permissions/{permissionId}",
14061	//   "request": {
14062	//     "$ref": "Permission"
14063	//   },
14064	//   "response": {
14065	//     "$ref": "Permission"
14066	//   },
14067	//   "scopes": [
14068	//     "https://www.googleapis.com/auth/drive",
14069	//     "https://www.googleapis.com/auth/drive.file"
14070	//   ]
14071	// }
14072
14073}
14074
14075// method id "drive.properties.delete":
14076
14077type PropertiesDeleteCall struct {
14078	s           *Service
14079	fileId      string
14080	propertyKey string
14081	urlParams_  gensupport.URLParams
14082	ctx_        context.Context
14083	header_     http.Header
14084}
14085
14086// Delete: Deletes a property.
14087//
14088// - fileId: The ID of the file.
14089// - propertyKey: The key of the property.
14090func (r *PropertiesService) Delete(fileId string, propertyKey string) *PropertiesDeleteCall {
14091	c := &PropertiesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
14092	c.fileId = fileId
14093	c.propertyKey = propertyKey
14094	return c
14095}
14096
14097// Visibility sets the optional parameter "visibility": The visibility
14098// of the property.
14099func (c *PropertiesDeleteCall) Visibility(visibility string) *PropertiesDeleteCall {
14100	c.urlParams_.Set("visibility", visibility)
14101	return c
14102}
14103
14104// Fields allows partial responses to be retrieved. See
14105// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
14106// for more information.
14107func (c *PropertiesDeleteCall) Fields(s ...googleapi.Field) *PropertiesDeleteCall {
14108	c.urlParams_.Set("fields", googleapi.CombineFields(s))
14109	return c
14110}
14111
14112// Context sets the context to be used in this call's Do method. Any
14113// pending HTTP request will be aborted if the provided context is
14114// canceled.
14115func (c *PropertiesDeleteCall) Context(ctx context.Context) *PropertiesDeleteCall {
14116	c.ctx_ = ctx
14117	return c
14118}
14119
14120// Header returns an http.Header that can be modified by the caller to
14121// add HTTP headers to the request.
14122func (c *PropertiesDeleteCall) Header() http.Header {
14123	if c.header_ == nil {
14124		c.header_ = make(http.Header)
14125	}
14126	return c.header_
14127}
14128
14129func (c *PropertiesDeleteCall) doRequest(alt string) (*http.Response, error) {
14130	reqHeaders := make(http.Header)
14131	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210830")
14132	for k, v := range c.header_ {
14133		reqHeaders[k] = v
14134	}
14135	reqHeaders.Set("User-Agent", c.s.userAgent())
14136	var body io.Reader = nil
14137	c.urlParams_.Set("alt", alt)
14138	c.urlParams_.Set("prettyPrint", "false")
14139	urls := googleapi.ResolveRelative(c.s.BasePath, "files/{fileId}/properties/{propertyKey}")
14140	urls += "?" + c.urlParams_.Encode()
14141	req, err := http.NewRequest("DELETE", urls, body)
14142	if err != nil {
14143		return nil, err
14144	}
14145	req.Header = reqHeaders
14146	googleapi.Expand(req.URL, map[string]string{
14147		"fileId":      c.fileId,
14148		"propertyKey": c.propertyKey,
14149	})
14150	return gensupport.SendRequest(c.ctx_, c.s.client, req)
14151}
14152
14153// Do executes the "drive.properties.delete" call.
14154func (c *PropertiesDeleteCall) Do(opts ...googleapi.CallOption) error {
14155	gensupport.SetOptions(c.urlParams_, opts...)
14156	res, err := c.doRequest("json")
14157	if err != nil {
14158		return err
14159	}
14160	defer googleapi.CloseBody(res)
14161	if err := googleapi.CheckResponse(res); err != nil {
14162		return err
14163	}
14164	return nil
14165	// {
14166	//   "description": "Deletes a property.",
14167	//   "httpMethod": "DELETE",
14168	//   "id": "drive.properties.delete",
14169	//   "parameterOrder": [
14170	//     "fileId",
14171	//     "propertyKey"
14172	//   ],
14173	//   "parameters": {
14174	//     "fileId": {
14175	//       "description": "The ID of the file.",
14176	//       "location": "path",
14177	//       "required": true,
14178	//       "type": "string"
14179	//     },
14180	//     "propertyKey": {
14181	//       "description": "The key of the property.",
14182	//       "location": "path",
14183	//       "required": true,
14184	//       "type": "string"
14185	//     },
14186	//     "visibility": {
14187	//       "default": "private",
14188	//       "description": "The visibility of the property.",
14189	//       "location": "query",
14190	//       "type": "string"
14191	//     }
14192	//   },
14193	//   "path": "files/{fileId}/properties/{propertyKey}",
14194	//   "scopes": [
14195	//     "https://www.googleapis.com/auth/drive",
14196	//     "https://www.googleapis.com/auth/drive.appdata",
14197	//     "https://www.googleapis.com/auth/drive.file",
14198	//     "https://www.googleapis.com/auth/drive.metadata"
14199	//   ]
14200	// }
14201
14202}
14203
14204// method id "drive.properties.get":
14205
14206type PropertiesGetCall struct {
14207	s            *Service
14208	fileId       string
14209	propertyKey  string
14210	urlParams_   gensupport.URLParams
14211	ifNoneMatch_ string
14212	ctx_         context.Context
14213	header_      http.Header
14214}
14215
14216// Get: Gets a property by its key.
14217//
14218// - fileId: The ID of the file.
14219// - propertyKey: The key of the property.
14220func (r *PropertiesService) Get(fileId string, propertyKey string) *PropertiesGetCall {
14221	c := &PropertiesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
14222	c.fileId = fileId
14223	c.propertyKey = propertyKey
14224	return c
14225}
14226
14227// Visibility sets the optional parameter "visibility": The visibility
14228// of the property.
14229func (c *PropertiesGetCall) Visibility(visibility string) *PropertiesGetCall {
14230	c.urlParams_.Set("visibility", visibility)
14231	return c
14232}
14233
14234// Fields allows partial responses to be retrieved. See
14235// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
14236// for more information.
14237func (c *PropertiesGetCall) Fields(s ...googleapi.Field) *PropertiesGetCall {
14238	c.urlParams_.Set("fields", googleapi.CombineFields(s))
14239	return c
14240}
14241
14242// IfNoneMatch sets the optional parameter which makes the operation
14243// fail if the object's ETag matches the given value. This is useful for
14244// getting updates only after the object has changed since the last
14245// request. Use googleapi.IsNotModified to check whether the response
14246// error from Do is the result of In-None-Match.
14247func (c *PropertiesGetCall) IfNoneMatch(entityTag string) *PropertiesGetCall {
14248	c.ifNoneMatch_ = entityTag
14249	return c
14250}
14251
14252// Context sets the context to be used in this call's Do method. Any
14253// pending HTTP request will be aborted if the provided context is
14254// canceled.
14255func (c *PropertiesGetCall) Context(ctx context.Context) *PropertiesGetCall {
14256	c.ctx_ = ctx
14257	return c
14258}
14259
14260// Header returns an http.Header that can be modified by the caller to
14261// add HTTP headers to the request.
14262func (c *PropertiesGetCall) Header() http.Header {
14263	if c.header_ == nil {
14264		c.header_ = make(http.Header)
14265	}
14266	return c.header_
14267}
14268
14269func (c *PropertiesGetCall) doRequest(alt string) (*http.Response, error) {
14270	reqHeaders := make(http.Header)
14271	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210830")
14272	for k, v := range c.header_ {
14273		reqHeaders[k] = v
14274	}
14275	reqHeaders.Set("User-Agent", c.s.userAgent())
14276	if c.ifNoneMatch_ != "" {
14277		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
14278	}
14279	var body io.Reader = nil
14280	c.urlParams_.Set("alt", alt)
14281	c.urlParams_.Set("prettyPrint", "false")
14282	urls := googleapi.ResolveRelative(c.s.BasePath, "files/{fileId}/properties/{propertyKey}")
14283	urls += "?" + c.urlParams_.Encode()
14284	req, err := http.NewRequest("GET", urls, body)
14285	if err != nil {
14286		return nil, err
14287	}
14288	req.Header = reqHeaders
14289	googleapi.Expand(req.URL, map[string]string{
14290		"fileId":      c.fileId,
14291		"propertyKey": c.propertyKey,
14292	})
14293	return gensupport.SendRequest(c.ctx_, c.s.client, req)
14294}
14295
14296// Do executes the "drive.properties.get" call.
14297// Exactly one of *Property or error will be non-nil. Any non-2xx status
14298// code is an error. Response headers are in either
14299// *Property.ServerResponse.Header or (if a response was returned at
14300// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
14301// to check whether the returned error was because
14302// http.StatusNotModified was returned.
14303func (c *PropertiesGetCall) Do(opts ...googleapi.CallOption) (*Property, error) {
14304	gensupport.SetOptions(c.urlParams_, opts...)
14305	res, err := c.doRequest("json")
14306	if res != nil && res.StatusCode == http.StatusNotModified {
14307		if res.Body != nil {
14308			res.Body.Close()
14309		}
14310		return nil, &googleapi.Error{
14311			Code:   res.StatusCode,
14312			Header: res.Header,
14313		}
14314	}
14315	if err != nil {
14316		return nil, err
14317	}
14318	defer googleapi.CloseBody(res)
14319	if err := googleapi.CheckResponse(res); err != nil {
14320		return nil, err
14321	}
14322	ret := &Property{
14323		ServerResponse: googleapi.ServerResponse{
14324			Header:         res.Header,
14325			HTTPStatusCode: res.StatusCode,
14326		},
14327	}
14328	target := &ret
14329	if err := gensupport.DecodeResponse(target, res); err != nil {
14330		return nil, err
14331	}
14332	return ret, nil
14333	// {
14334	//   "description": "Gets a property by its key.",
14335	//   "httpMethod": "GET",
14336	//   "id": "drive.properties.get",
14337	//   "parameterOrder": [
14338	//     "fileId",
14339	//     "propertyKey"
14340	//   ],
14341	//   "parameters": {
14342	//     "fileId": {
14343	//       "description": "The ID of the file.",
14344	//       "location": "path",
14345	//       "required": true,
14346	//       "type": "string"
14347	//     },
14348	//     "propertyKey": {
14349	//       "description": "The key of the property.",
14350	//       "location": "path",
14351	//       "required": true,
14352	//       "type": "string"
14353	//     },
14354	//     "visibility": {
14355	//       "default": "private",
14356	//       "description": "The visibility of the property.",
14357	//       "location": "query",
14358	//       "type": "string"
14359	//     }
14360	//   },
14361	//   "path": "files/{fileId}/properties/{propertyKey}",
14362	//   "response": {
14363	//     "$ref": "Property"
14364	//   },
14365	//   "scopes": [
14366	//     "https://www.googleapis.com/auth/drive",
14367	//     "https://www.googleapis.com/auth/drive.appdata",
14368	//     "https://www.googleapis.com/auth/drive.file",
14369	//     "https://www.googleapis.com/auth/drive.metadata",
14370	//     "https://www.googleapis.com/auth/drive.metadata.readonly",
14371	//     "https://www.googleapis.com/auth/drive.photos.readonly",
14372	//     "https://www.googleapis.com/auth/drive.readonly"
14373	//   ]
14374	// }
14375
14376}
14377
14378// method id "drive.properties.insert":
14379
14380type PropertiesInsertCall struct {
14381	s          *Service
14382	fileId     string
14383	property   *Property
14384	urlParams_ gensupport.URLParams
14385	ctx_       context.Context
14386	header_    http.Header
14387}
14388
14389// Insert: Adds a property to a file, or updates it if it already
14390// exists.
14391//
14392// - fileId: The ID of the file.
14393func (r *PropertiesService) Insert(fileId string, property *Property) *PropertiesInsertCall {
14394	c := &PropertiesInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)}
14395	c.fileId = fileId
14396	c.property = property
14397	return c
14398}
14399
14400// Fields allows partial responses to be retrieved. See
14401// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
14402// for more information.
14403func (c *PropertiesInsertCall) Fields(s ...googleapi.Field) *PropertiesInsertCall {
14404	c.urlParams_.Set("fields", googleapi.CombineFields(s))
14405	return c
14406}
14407
14408// Context sets the context to be used in this call's Do method. Any
14409// pending HTTP request will be aborted if the provided context is
14410// canceled.
14411func (c *PropertiesInsertCall) Context(ctx context.Context) *PropertiesInsertCall {
14412	c.ctx_ = ctx
14413	return c
14414}
14415
14416// Header returns an http.Header that can be modified by the caller to
14417// add HTTP headers to the request.
14418func (c *PropertiesInsertCall) Header() http.Header {
14419	if c.header_ == nil {
14420		c.header_ = make(http.Header)
14421	}
14422	return c.header_
14423}
14424
14425func (c *PropertiesInsertCall) doRequest(alt string) (*http.Response, error) {
14426	reqHeaders := make(http.Header)
14427	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210830")
14428	for k, v := range c.header_ {
14429		reqHeaders[k] = v
14430	}
14431	reqHeaders.Set("User-Agent", c.s.userAgent())
14432	var body io.Reader = nil
14433	body, err := googleapi.WithoutDataWrapper.JSONReader(c.property)
14434	if err != nil {
14435		return nil, err
14436	}
14437	reqHeaders.Set("Content-Type", "application/json")
14438	c.urlParams_.Set("alt", alt)
14439	c.urlParams_.Set("prettyPrint", "false")
14440	urls := googleapi.ResolveRelative(c.s.BasePath, "files/{fileId}/properties")
14441	urls += "?" + c.urlParams_.Encode()
14442	req, err := http.NewRequest("POST", urls, body)
14443	if err != nil {
14444		return nil, err
14445	}
14446	req.Header = reqHeaders
14447	googleapi.Expand(req.URL, map[string]string{
14448		"fileId": c.fileId,
14449	})
14450	return gensupport.SendRequest(c.ctx_, c.s.client, req)
14451}
14452
14453// Do executes the "drive.properties.insert" call.
14454// Exactly one of *Property or error will be non-nil. Any non-2xx status
14455// code is an error. Response headers are in either
14456// *Property.ServerResponse.Header or (if a response was returned at
14457// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
14458// to check whether the returned error was because
14459// http.StatusNotModified was returned.
14460func (c *PropertiesInsertCall) Do(opts ...googleapi.CallOption) (*Property, error) {
14461	gensupport.SetOptions(c.urlParams_, opts...)
14462	res, err := c.doRequest("json")
14463	if res != nil && res.StatusCode == http.StatusNotModified {
14464		if res.Body != nil {
14465			res.Body.Close()
14466		}
14467		return nil, &googleapi.Error{
14468			Code:   res.StatusCode,
14469			Header: res.Header,
14470		}
14471	}
14472	if err != nil {
14473		return nil, err
14474	}
14475	defer googleapi.CloseBody(res)
14476	if err := googleapi.CheckResponse(res); err != nil {
14477		return nil, err
14478	}
14479	ret := &Property{
14480		ServerResponse: googleapi.ServerResponse{
14481			Header:         res.Header,
14482			HTTPStatusCode: res.StatusCode,
14483		},
14484	}
14485	target := &ret
14486	if err := gensupport.DecodeResponse(target, res); err != nil {
14487		return nil, err
14488	}
14489	return ret, nil
14490	// {
14491	//   "description": "Adds a property to a file, or updates it if it already exists.",
14492	//   "httpMethod": "POST",
14493	//   "id": "drive.properties.insert",
14494	//   "parameterOrder": [
14495	//     "fileId"
14496	//   ],
14497	//   "parameters": {
14498	//     "fileId": {
14499	//       "description": "The ID of the file.",
14500	//       "location": "path",
14501	//       "required": true,
14502	//       "type": "string"
14503	//     }
14504	//   },
14505	//   "path": "files/{fileId}/properties",
14506	//   "request": {
14507	//     "$ref": "Property"
14508	//   },
14509	//   "response": {
14510	//     "$ref": "Property"
14511	//   },
14512	//   "scopes": [
14513	//     "https://www.googleapis.com/auth/drive",
14514	//     "https://www.googleapis.com/auth/drive.appdata",
14515	//     "https://www.googleapis.com/auth/drive.file",
14516	//     "https://www.googleapis.com/auth/drive.metadata"
14517	//   ]
14518	// }
14519
14520}
14521
14522// method id "drive.properties.list":
14523
14524type PropertiesListCall struct {
14525	s            *Service
14526	fileId       string
14527	urlParams_   gensupport.URLParams
14528	ifNoneMatch_ string
14529	ctx_         context.Context
14530	header_      http.Header
14531}
14532
14533// List: Lists a file's properties.
14534//
14535// - fileId: The ID of the file.
14536func (r *PropertiesService) List(fileId string) *PropertiesListCall {
14537	c := &PropertiesListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
14538	c.fileId = fileId
14539	return c
14540}
14541
14542// Fields allows partial responses to be retrieved. See
14543// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
14544// for more information.
14545func (c *PropertiesListCall) Fields(s ...googleapi.Field) *PropertiesListCall {
14546	c.urlParams_.Set("fields", googleapi.CombineFields(s))
14547	return c
14548}
14549
14550// IfNoneMatch sets the optional parameter which makes the operation
14551// fail if the object's ETag matches the given value. This is useful for
14552// getting updates only after the object has changed since the last
14553// request. Use googleapi.IsNotModified to check whether the response
14554// error from Do is the result of In-None-Match.
14555func (c *PropertiesListCall) IfNoneMatch(entityTag string) *PropertiesListCall {
14556	c.ifNoneMatch_ = entityTag
14557	return c
14558}
14559
14560// Context sets the context to be used in this call's Do method. Any
14561// pending HTTP request will be aborted if the provided context is
14562// canceled.
14563func (c *PropertiesListCall) Context(ctx context.Context) *PropertiesListCall {
14564	c.ctx_ = ctx
14565	return c
14566}
14567
14568// Header returns an http.Header that can be modified by the caller to
14569// add HTTP headers to the request.
14570func (c *PropertiesListCall) Header() http.Header {
14571	if c.header_ == nil {
14572		c.header_ = make(http.Header)
14573	}
14574	return c.header_
14575}
14576
14577func (c *PropertiesListCall) doRequest(alt string) (*http.Response, error) {
14578	reqHeaders := make(http.Header)
14579	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210830")
14580	for k, v := range c.header_ {
14581		reqHeaders[k] = v
14582	}
14583	reqHeaders.Set("User-Agent", c.s.userAgent())
14584	if c.ifNoneMatch_ != "" {
14585		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
14586	}
14587	var body io.Reader = nil
14588	c.urlParams_.Set("alt", alt)
14589	c.urlParams_.Set("prettyPrint", "false")
14590	urls := googleapi.ResolveRelative(c.s.BasePath, "files/{fileId}/properties")
14591	urls += "?" + c.urlParams_.Encode()
14592	req, err := http.NewRequest("GET", urls, body)
14593	if err != nil {
14594		return nil, err
14595	}
14596	req.Header = reqHeaders
14597	googleapi.Expand(req.URL, map[string]string{
14598		"fileId": c.fileId,
14599	})
14600	return gensupport.SendRequest(c.ctx_, c.s.client, req)
14601}
14602
14603// Do executes the "drive.properties.list" call.
14604// Exactly one of *PropertyList or error will be non-nil. Any non-2xx
14605// status code is an error. Response headers are in either
14606// *PropertyList.ServerResponse.Header or (if a response was returned at
14607// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
14608// to check whether the returned error was because
14609// http.StatusNotModified was returned.
14610func (c *PropertiesListCall) Do(opts ...googleapi.CallOption) (*PropertyList, error) {
14611	gensupport.SetOptions(c.urlParams_, opts...)
14612	res, err := c.doRequest("json")
14613	if res != nil && res.StatusCode == http.StatusNotModified {
14614		if res.Body != nil {
14615			res.Body.Close()
14616		}
14617		return nil, &googleapi.Error{
14618			Code:   res.StatusCode,
14619			Header: res.Header,
14620		}
14621	}
14622	if err != nil {
14623		return nil, err
14624	}
14625	defer googleapi.CloseBody(res)
14626	if err := googleapi.CheckResponse(res); err != nil {
14627		return nil, err
14628	}
14629	ret := &PropertyList{
14630		ServerResponse: googleapi.ServerResponse{
14631			Header:         res.Header,
14632			HTTPStatusCode: res.StatusCode,
14633		},
14634	}
14635	target := &ret
14636	if err := gensupport.DecodeResponse(target, res); err != nil {
14637		return nil, err
14638	}
14639	return ret, nil
14640	// {
14641	//   "description": "Lists a file's properties.",
14642	//   "httpMethod": "GET",
14643	//   "id": "drive.properties.list",
14644	//   "parameterOrder": [
14645	//     "fileId"
14646	//   ],
14647	//   "parameters": {
14648	//     "fileId": {
14649	//       "description": "The ID of the file.",
14650	//       "location": "path",
14651	//       "required": true,
14652	//       "type": "string"
14653	//     }
14654	//   },
14655	//   "path": "files/{fileId}/properties",
14656	//   "response": {
14657	//     "$ref": "PropertyList"
14658	//   },
14659	//   "scopes": [
14660	//     "https://www.googleapis.com/auth/drive",
14661	//     "https://www.googleapis.com/auth/drive.appdata",
14662	//     "https://www.googleapis.com/auth/drive.file",
14663	//     "https://www.googleapis.com/auth/drive.metadata",
14664	//     "https://www.googleapis.com/auth/drive.metadata.readonly",
14665	//     "https://www.googleapis.com/auth/drive.photos.readonly",
14666	//     "https://www.googleapis.com/auth/drive.readonly"
14667	//   ]
14668	// }
14669
14670}
14671
14672// method id "drive.properties.patch":
14673
14674type PropertiesPatchCall struct {
14675	s           *Service
14676	fileId      string
14677	propertyKey string
14678	property    *Property
14679	urlParams_  gensupport.URLParams
14680	ctx_        context.Context
14681	header_     http.Header
14682}
14683
14684// Patch: Updates a property.
14685//
14686// - fileId: The ID of the file.
14687// - propertyKey: The key of the property.
14688func (r *PropertiesService) Patch(fileId string, propertyKey string, property *Property) *PropertiesPatchCall {
14689	c := &PropertiesPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
14690	c.fileId = fileId
14691	c.propertyKey = propertyKey
14692	c.property = property
14693	return c
14694}
14695
14696// Visibility sets the optional parameter "visibility": The visibility
14697// of the property. Allowed values are PRIVATE and PUBLIC. (Default:
14698// PRIVATE)
14699func (c *PropertiesPatchCall) Visibility(visibility string) *PropertiesPatchCall {
14700	c.urlParams_.Set("visibility", visibility)
14701	return c
14702}
14703
14704// Fields allows partial responses to be retrieved. See
14705// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
14706// for more information.
14707func (c *PropertiesPatchCall) Fields(s ...googleapi.Field) *PropertiesPatchCall {
14708	c.urlParams_.Set("fields", googleapi.CombineFields(s))
14709	return c
14710}
14711
14712// Context sets the context to be used in this call's Do method. Any
14713// pending HTTP request will be aborted if the provided context is
14714// canceled.
14715func (c *PropertiesPatchCall) Context(ctx context.Context) *PropertiesPatchCall {
14716	c.ctx_ = ctx
14717	return c
14718}
14719
14720// Header returns an http.Header that can be modified by the caller to
14721// add HTTP headers to the request.
14722func (c *PropertiesPatchCall) Header() http.Header {
14723	if c.header_ == nil {
14724		c.header_ = make(http.Header)
14725	}
14726	return c.header_
14727}
14728
14729func (c *PropertiesPatchCall) doRequest(alt string) (*http.Response, error) {
14730	reqHeaders := make(http.Header)
14731	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210830")
14732	for k, v := range c.header_ {
14733		reqHeaders[k] = v
14734	}
14735	reqHeaders.Set("User-Agent", c.s.userAgent())
14736	var body io.Reader = nil
14737	body, err := googleapi.WithoutDataWrapper.JSONReader(c.property)
14738	if err != nil {
14739		return nil, err
14740	}
14741	reqHeaders.Set("Content-Type", "application/json")
14742	c.urlParams_.Set("alt", alt)
14743	c.urlParams_.Set("prettyPrint", "false")
14744	urls := googleapi.ResolveRelative(c.s.BasePath, "files/{fileId}/properties/{propertyKey}")
14745	urls += "?" + c.urlParams_.Encode()
14746	req, err := http.NewRequest("PATCH", urls, body)
14747	if err != nil {
14748		return nil, err
14749	}
14750	req.Header = reqHeaders
14751	googleapi.Expand(req.URL, map[string]string{
14752		"fileId":      c.fileId,
14753		"propertyKey": c.propertyKey,
14754	})
14755	return gensupport.SendRequest(c.ctx_, c.s.client, req)
14756}
14757
14758// Do executes the "drive.properties.patch" call.
14759// Exactly one of *Property or error will be non-nil. Any non-2xx status
14760// code is an error. Response headers are in either
14761// *Property.ServerResponse.Header or (if a response was returned at
14762// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
14763// to check whether the returned error was because
14764// http.StatusNotModified was returned.
14765func (c *PropertiesPatchCall) Do(opts ...googleapi.CallOption) (*Property, error) {
14766	gensupport.SetOptions(c.urlParams_, opts...)
14767	res, err := c.doRequest("json")
14768	if res != nil && res.StatusCode == http.StatusNotModified {
14769		if res.Body != nil {
14770			res.Body.Close()
14771		}
14772		return nil, &googleapi.Error{
14773			Code:   res.StatusCode,
14774			Header: res.Header,
14775		}
14776	}
14777	if err != nil {
14778		return nil, err
14779	}
14780	defer googleapi.CloseBody(res)
14781	if err := googleapi.CheckResponse(res); err != nil {
14782		return nil, err
14783	}
14784	ret := &Property{
14785		ServerResponse: googleapi.ServerResponse{
14786			Header:         res.Header,
14787			HTTPStatusCode: res.StatusCode,
14788		},
14789	}
14790	target := &ret
14791	if err := gensupport.DecodeResponse(target, res); err != nil {
14792		return nil, err
14793	}
14794	return ret, nil
14795	// {
14796	//   "description": "Updates a property.",
14797	//   "httpMethod": "PATCH",
14798	//   "id": "drive.properties.patch",
14799	//   "parameterOrder": [
14800	//     "fileId",
14801	//     "propertyKey"
14802	//   ],
14803	//   "parameters": {
14804	//     "fileId": {
14805	//       "description": "The ID of the file.",
14806	//       "location": "path",
14807	//       "required": true,
14808	//       "type": "string"
14809	//     },
14810	//     "propertyKey": {
14811	//       "description": "The key of the property.",
14812	//       "location": "path",
14813	//       "required": true,
14814	//       "type": "string"
14815	//     },
14816	//     "visibility": {
14817	//       "default": "private",
14818	//       "description": "The visibility of the property. Allowed values are PRIVATE and PUBLIC. (Default: PRIVATE)",
14819	//       "location": "query",
14820	//       "type": "string"
14821	//     }
14822	//   },
14823	//   "path": "files/{fileId}/properties/{propertyKey}",
14824	//   "request": {
14825	//     "$ref": "Property"
14826	//   },
14827	//   "response": {
14828	//     "$ref": "Property"
14829	//   },
14830	//   "scopes": [
14831	//     "https://www.googleapis.com/auth/drive",
14832	//     "https://www.googleapis.com/auth/drive.appdata",
14833	//     "https://www.googleapis.com/auth/drive.file",
14834	//     "https://www.googleapis.com/auth/drive.metadata"
14835	//   ]
14836	// }
14837
14838}
14839
14840// method id "drive.properties.update":
14841
14842type PropertiesUpdateCall struct {
14843	s           *Service
14844	fileId      string
14845	propertyKey string
14846	property    *Property
14847	urlParams_  gensupport.URLParams
14848	ctx_        context.Context
14849	header_     http.Header
14850}
14851
14852// Update: Updates a property.
14853//
14854// - fileId: The ID of the file.
14855// - propertyKey: The key of the property.
14856func (r *PropertiesService) Update(fileId string, propertyKey string, property *Property) *PropertiesUpdateCall {
14857	c := &PropertiesUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
14858	c.fileId = fileId
14859	c.propertyKey = propertyKey
14860	c.property = property
14861	return c
14862}
14863
14864// Visibility sets the optional parameter "visibility": The visibility
14865// of the property. Allowed values are PRIVATE and PUBLIC. (Default:
14866// PRIVATE)
14867func (c *PropertiesUpdateCall) Visibility(visibility string) *PropertiesUpdateCall {
14868	c.urlParams_.Set("visibility", visibility)
14869	return c
14870}
14871
14872// Fields allows partial responses to be retrieved. See
14873// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
14874// for more information.
14875func (c *PropertiesUpdateCall) Fields(s ...googleapi.Field) *PropertiesUpdateCall {
14876	c.urlParams_.Set("fields", googleapi.CombineFields(s))
14877	return c
14878}
14879
14880// Context sets the context to be used in this call's Do method. Any
14881// pending HTTP request will be aborted if the provided context is
14882// canceled.
14883func (c *PropertiesUpdateCall) Context(ctx context.Context) *PropertiesUpdateCall {
14884	c.ctx_ = ctx
14885	return c
14886}
14887
14888// Header returns an http.Header that can be modified by the caller to
14889// add HTTP headers to the request.
14890func (c *PropertiesUpdateCall) Header() http.Header {
14891	if c.header_ == nil {
14892		c.header_ = make(http.Header)
14893	}
14894	return c.header_
14895}
14896
14897func (c *PropertiesUpdateCall) doRequest(alt string) (*http.Response, error) {
14898	reqHeaders := make(http.Header)
14899	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210830")
14900	for k, v := range c.header_ {
14901		reqHeaders[k] = v
14902	}
14903	reqHeaders.Set("User-Agent", c.s.userAgent())
14904	var body io.Reader = nil
14905	body, err := googleapi.WithoutDataWrapper.JSONReader(c.property)
14906	if err != nil {
14907		return nil, err
14908	}
14909	reqHeaders.Set("Content-Type", "application/json")
14910	c.urlParams_.Set("alt", alt)
14911	c.urlParams_.Set("prettyPrint", "false")
14912	urls := googleapi.ResolveRelative(c.s.BasePath, "files/{fileId}/properties/{propertyKey}")
14913	urls += "?" + c.urlParams_.Encode()
14914	req, err := http.NewRequest("PUT", urls, body)
14915	if err != nil {
14916		return nil, err
14917	}
14918	req.Header = reqHeaders
14919	googleapi.Expand(req.URL, map[string]string{
14920		"fileId":      c.fileId,
14921		"propertyKey": c.propertyKey,
14922	})
14923	return gensupport.SendRequest(c.ctx_, c.s.client, req)
14924}
14925
14926// Do executes the "drive.properties.update" call.
14927// Exactly one of *Property or error will be non-nil. Any non-2xx status
14928// code is an error. Response headers are in either
14929// *Property.ServerResponse.Header or (if a response was returned at
14930// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
14931// to check whether the returned error was because
14932// http.StatusNotModified was returned.
14933func (c *PropertiesUpdateCall) Do(opts ...googleapi.CallOption) (*Property, error) {
14934	gensupport.SetOptions(c.urlParams_, opts...)
14935	res, err := c.doRequest("json")
14936	if res != nil && res.StatusCode == http.StatusNotModified {
14937		if res.Body != nil {
14938			res.Body.Close()
14939		}
14940		return nil, &googleapi.Error{
14941			Code:   res.StatusCode,
14942			Header: res.Header,
14943		}
14944	}
14945	if err != nil {
14946		return nil, err
14947	}
14948	defer googleapi.CloseBody(res)
14949	if err := googleapi.CheckResponse(res); err != nil {
14950		return nil, err
14951	}
14952	ret := &Property{
14953		ServerResponse: googleapi.ServerResponse{
14954			Header:         res.Header,
14955			HTTPStatusCode: res.StatusCode,
14956		},
14957	}
14958	target := &ret
14959	if err := gensupport.DecodeResponse(target, res); err != nil {
14960		return nil, err
14961	}
14962	return ret, nil
14963	// {
14964	//   "description": "Updates a property.",
14965	//   "httpMethod": "PUT",
14966	//   "id": "drive.properties.update",
14967	//   "parameterOrder": [
14968	//     "fileId",
14969	//     "propertyKey"
14970	//   ],
14971	//   "parameters": {
14972	//     "fileId": {
14973	//       "description": "The ID of the file.",
14974	//       "location": "path",
14975	//       "required": true,
14976	//       "type": "string"
14977	//     },
14978	//     "propertyKey": {
14979	//       "description": "The key of the property.",
14980	//       "location": "path",
14981	//       "required": true,
14982	//       "type": "string"
14983	//     },
14984	//     "visibility": {
14985	//       "default": "private",
14986	//       "description": "The visibility of the property. Allowed values are PRIVATE and PUBLIC. (Default: PRIVATE)",
14987	//       "location": "query",
14988	//       "type": "string"
14989	//     }
14990	//   },
14991	//   "path": "files/{fileId}/properties/{propertyKey}",
14992	//   "request": {
14993	//     "$ref": "Property"
14994	//   },
14995	//   "response": {
14996	//     "$ref": "Property"
14997	//   },
14998	//   "scopes": [
14999	//     "https://www.googleapis.com/auth/drive",
15000	//     "https://www.googleapis.com/auth/drive.appdata",
15001	//     "https://www.googleapis.com/auth/drive.file",
15002	//     "https://www.googleapis.com/auth/drive.metadata"
15003	//   ]
15004	// }
15005
15006}
15007
15008// method id "drive.replies.delete":
15009
15010type RepliesDeleteCall struct {
15011	s          *Service
15012	fileId     string
15013	commentId  string
15014	replyId    string
15015	urlParams_ gensupport.URLParams
15016	ctx_       context.Context
15017	header_    http.Header
15018}
15019
15020// Delete: Deletes a reply.
15021//
15022// - commentId: The ID of the comment.
15023// - fileId: The ID of the file.
15024// - replyId: The ID of the reply.
15025func (r *RepliesService) Delete(fileId string, commentId string, replyId string) *RepliesDeleteCall {
15026	c := &RepliesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
15027	c.fileId = fileId
15028	c.commentId = commentId
15029	c.replyId = replyId
15030	return c
15031}
15032
15033// Fields allows partial responses to be retrieved. See
15034// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
15035// for more information.
15036func (c *RepliesDeleteCall) Fields(s ...googleapi.Field) *RepliesDeleteCall {
15037	c.urlParams_.Set("fields", googleapi.CombineFields(s))
15038	return c
15039}
15040
15041// Context sets the context to be used in this call's Do method. Any
15042// pending HTTP request will be aborted if the provided context is
15043// canceled.
15044func (c *RepliesDeleteCall) Context(ctx context.Context) *RepliesDeleteCall {
15045	c.ctx_ = ctx
15046	return c
15047}
15048
15049// Header returns an http.Header that can be modified by the caller to
15050// add HTTP headers to the request.
15051func (c *RepliesDeleteCall) Header() http.Header {
15052	if c.header_ == nil {
15053		c.header_ = make(http.Header)
15054	}
15055	return c.header_
15056}
15057
15058func (c *RepliesDeleteCall) doRequest(alt string) (*http.Response, error) {
15059	reqHeaders := make(http.Header)
15060	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210830")
15061	for k, v := range c.header_ {
15062		reqHeaders[k] = v
15063	}
15064	reqHeaders.Set("User-Agent", c.s.userAgent())
15065	var body io.Reader = nil
15066	c.urlParams_.Set("alt", alt)
15067	c.urlParams_.Set("prettyPrint", "false")
15068	urls := googleapi.ResolveRelative(c.s.BasePath, "files/{fileId}/comments/{commentId}/replies/{replyId}")
15069	urls += "?" + c.urlParams_.Encode()
15070	req, err := http.NewRequest("DELETE", urls, body)
15071	if err != nil {
15072		return nil, err
15073	}
15074	req.Header = reqHeaders
15075	googleapi.Expand(req.URL, map[string]string{
15076		"fileId":    c.fileId,
15077		"commentId": c.commentId,
15078		"replyId":   c.replyId,
15079	})
15080	return gensupport.SendRequest(c.ctx_, c.s.client, req)
15081}
15082
15083// Do executes the "drive.replies.delete" call.
15084func (c *RepliesDeleteCall) Do(opts ...googleapi.CallOption) error {
15085	gensupport.SetOptions(c.urlParams_, opts...)
15086	res, err := c.doRequest("json")
15087	if err != nil {
15088		return err
15089	}
15090	defer googleapi.CloseBody(res)
15091	if err := googleapi.CheckResponse(res); err != nil {
15092		return err
15093	}
15094	return nil
15095	// {
15096	//   "description": "Deletes a reply.",
15097	//   "httpMethod": "DELETE",
15098	//   "id": "drive.replies.delete",
15099	//   "parameterOrder": [
15100	//     "fileId",
15101	//     "commentId",
15102	//     "replyId"
15103	//   ],
15104	//   "parameters": {
15105	//     "commentId": {
15106	//       "description": "The ID of the comment.",
15107	//       "location": "path",
15108	//       "required": true,
15109	//       "type": "string"
15110	//     },
15111	//     "fileId": {
15112	//       "description": "The ID of the file.",
15113	//       "location": "path",
15114	//       "required": true,
15115	//       "type": "string"
15116	//     },
15117	//     "replyId": {
15118	//       "description": "The ID of the reply.",
15119	//       "location": "path",
15120	//       "required": true,
15121	//       "type": "string"
15122	//     }
15123	//   },
15124	//   "path": "files/{fileId}/comments/{commentId}/replies/{replyId}",
15125	//   "scopes": [
15126	//     "https://www.googleapis.com/auth/drive",
15127	//     "https://www.googleapis.com/auth/drive.file"
15128	//   ]
15129	// }
15130
15131}
15132
15133// method id "drive.replies.get":
15134
15135type RepliesGetCall struct {
15136	s            *Service
15137	fileId       string
15138	commentId    string
15139	replyId      string
15140	urlParams_   gensupport.URLParams
15141	ifNoneMatch_ string
15142	ctx_         context.Context
15143	header_      http.Header
15144}
15145
15146// Get: Gets a reply.
15147//
15148// - commentId: The ID of the comment.
15149// - fileId: The ID of the file.
15150// - replyId: The ID of the reply.
15151func (r *RepliesService) Get(fileId string, commentId string, replyId string) *RepliesGetCall {
15152	c := &RepliesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
15153	c.fileId = fileId
15154	c.commentId = commentId
15155	c.replyId = replyId
15156	return c
15157}
15158
15159// IncludeDeleted sets the optional parameter "includeDeleted": If set,
15160// this will succeed when retrieving a deleted reply.
15161func (c *RepliesGetCall) IncludeDeleted(includeDeleted bool) *RepliesGetCall {
15162	c.urlParams_.Set("includeDeleted", fmt.Sprint(includeDeleted))
15163	return c
15164}
15165
15166// Fields allows partial responses to be retrieved. See
15167// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
15168// for more information.
15169func (c *RepliesGetCall) Fields(s ...googleapi.Field) *RepliesGetCall {
15170	c.urlParams_.Set("fields", googleapi.CombineFields(s))
15171	return c
15172}
15173
15174// IfNoneMatch sets the optional parameter which makes the operation
15175// fail if the object's ETag matches the given value. This is useful for
15176// getting updates only after the object has changed since the last
15177// request. Use googleapi.IsNotModified to check whether the response
15178// error from Do is the result of In-None-Match.
15179func (c *RepliesGetCall) IfNoneMatch(entityTag string) *RepliesGetCall {
15180	c.ifNoneMatch_ = entityTag
15181	return c
15182}
15183
15184// Context sets the context to be used in this call's Do method. Any
15185// pending HTTP request will be aborted if the provided context is
15186// canceled.
15187func (c *RepliesGetCall) Context(ctx context.Context) *RepliesGetCall {
15188	c.ctx_ = ctx
15189	return c
15190}
15191
15192// Header returns an http.Header that can be modified by the caller to
15193// add HTTP headers to the request.
15194func (c *RepliesGetCall) Header() http.Header {
15195	if c.header_ == nil {
15196		c.header_ = make(http.Header)
15197	}
15198	return c.header_
15199}
15200
15201func (c *RepliesGetCall) doRequest(alt string) (*http.Response, error) {
15202	reqHeaders := make(http.Header)
15203	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210830")
15204	for k, v := range c.header_ {
15205		reqHeaders[k] = v
15206	}
15207	reqHeaders.Set("User-Agent", c.s.userAgent())
15208	if c.ifNoneMatch_ != "" {
15209		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
15210	}
15211	var body io.Reader = nil
15212	c.urlParams_.Set("alt", alt)
15213	c.urlParams_.Set("prettyPrint", "false")
15214	urls := googleapi.ResolveRelative(c.s.BasePath, "files/{fileId}/comments/{commentId}/replies/{replyId}")
15215	urls += "?" + c.urlParams_.Encode()
15216	req, err := http.NewRequest("GET", urls, body)
15217	if err != nil {
15218		return nil, err
15219	}
15220	req.Header = reqHeaders
15221	googleapi.Expand(req.URL, map[string]string{
15222		"fileId":    c.fileId,
15223		"commentId": c.commentId,
15224		"replyId":   c.replyId,
15225	})
15226	return gensupport.SendRequest(c.ctx_, c.s.client, req)
15227}
15228
15229// Do executes the "drive.replies.get" call.
15230// Exactly one of *CommentReply or error will be non-nil. Any non-2xx
15231// status code is an error. Response headers are in either
15232// *CommentReply.ServerResponse.Header or (if a response was returned at
15233// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
15234// to check whether the returned error was because
15235// http.StatusNotModified was returned.
15236func (c *RepliesGetCall) Do(opts ...googleapi.CallOption) (*CommentReply, error) {
15237	gensupport.SetOptions(c.urlParams_, opts...)
15238	res, err := c.doRequest("json")
15239	if res != nil && res.StatusCode == http.StatusNotModified {
15240		if res.Body != nil {
15241			res.Body.Close()
15242		}
15243		return nil, &googleapi.Error{
15244			Code:   res.StatusCode,
15245			Header: res.Header,
15246		}
15247	}
15248	if err != nil {
15249		return nil, err
15250	}
15251	defer googleapi.CloseBody(res)
15252	if err := googleapi.CheckResponse(res); err != nil {
15253		return nil, err
15254	}
15255	ret := &CommentReply{
15256		ServerResponse: googleapi.ServerResponse{
15257			Header:         res.Header,
15258			HTTPStatusCode: res.StatusCode,
15259		},
15260	}
15261	target := &ret
15262	if err := gensupport.DecodeResponse(target, res); err != nil {
15263		return nil, err
15264	}
15265	return ret, nil
15266	// {
15267	//   "description": "Gets a reply.",
15268	//   "httpMethod": "GET",
15269	//   "id": "drive.replies.get",
15270	//   "parameterOrder": [
15271	//     "fileId",
15272	//     "commentId",
15273	//     "replyId"
15274	//   ],
15275	//   "parameters": {
15276	//     "commentId": {
15277	//       "description": "The ID of the comment.",
15278	//       "location": "path",
15279	//       "required": true,
15280	//       "type": "string"
15281	//     },
15282	//     "fileId": {
15283	//       "description": "The ID of the file.",
15284	//       "location": "path",
15285	//       "required": true,
15286	//       "type": "string"
15287	//     },
15288	//     "includeDeleted": {
15289	//       "default": "false",
15290	//       "description": "If set, this will succeed when retrieving a deleted reply.",
15291	//       "location": "query",
15292	//       "type": "boolean"
15293	//     },
15294	//     "replyId": {
15295	//       "description": "The ID of the reply.",
15296	//       "location": "path",
15297	//       "required": true,
15298	//       "type": "string"
15299	//     }
15300	//   },
15301	//   "path": "files/{fileId}/comments/{commentId}/replies/{replyId}",
15302	//   "response": {
15303	//     "$ref": "CommentReply"
15304	//   },
15305	//   "scopes": [
15306	//     "https://www.googleapis.com/auth/drive",
15307	//     "https://www.googleapis.com/auth/drive.file",
15308	//     "https://www.googleapis.com/auth/drive.readonly"
15309	//   ]
15310	// }
15311
15312}
15313
15314// method id "drive.replies.insert":
15315
15316type RepliesInsertCall struct {
15317	s            *Service
15318	fileId       string
15319	commentId    string
15320	commentreply *CommentReply
15321	urlParams_   gensupport.URLParams
15322	ctx_         context.Context
15323	header_      http.Header
15324}
15325
15326// Insert: Creates a new reply to the given comment.
15327//
15328// - commentId: The ID of the comment.
15329// - fileId: The ID of the file.
15330func (r *RepliesService) Insert(fileId string, commentId string, commentreply *CommentReply) *RepliesInsertCall {
15331	c := &RepliesInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)}
15332	c.fileId = fileId
15333	c.commentId = commentId
15334	c.commentreply = commentreply
15335	return c
15336}
15337
15338// Fields allows partial responses to be retrieved. See
15339// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
15340// for more information.
15341func (c *RepliesInsertCall) Fields(s ...googleapi.Field) *RepliesInsertCall {
15342	c.urlParams_.Set("fields", googleapi.CombineFields(s))
15343	return c
15344}
15345
15346// Context sets the context to be used in this call's Do method. Any
15347// pending HTTP request will be aborted if the provided context is
15348// canceled.
15349func (c *RepliesInsertCall) Context(ctx context.Context) *RepliesInsertCall {
15350	c.ctx_ = ctx
15351	return c
15352}
15353
15354// Header returns an http.Header that can be modified by the caller to
15355// add HTTP headers to the request.
15356func (c *RepliesInsertCall) Header() http.Header {
15357	if c.header_ == nil {
15358		c.header_ = make(http.Header)
15359	}
15360	return c.header_
15361}
15362
15363func (c *RepliesInsertCall) doRequest(alt string) (*http.Response, error) {
15364	reqHeaders := make(http.Header)
15365	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210830")
15366	for k, v := range c.header_ {
15367		reqHeaders[k] = v
15368	}
15369	reqHeaders.Set("User-Agent", c.s.userAgent())
15370	var body io.Reader = nil
15371	body, err := googleapi.WithoutDataWrapper.JSONReader(c.commentreply)
15372	if err != nil {
15373		return nil, err
15374	}
15375	reqHeaders.Set("Content-Type", "application/json")
15376	c.urlParams_.Set("alt", alt)
15377	c.urlParams_.Set("prettyPrint", "false")
15378	urls := googleapi.ResolveRelative(c.s.BasePath, "files/{fileId}/comments/{commentId}/replies")
15379	urls += "?" + c.urlParams_.Encode()
15380	req, err := http.NewRequest("POST", urls, body)
15381	if err != nil {
15382		return nil, err
15383	}
15384	req.Header = reqHeaders
15385	googleapi.Expand(req.URL, map[string]string{
15386		"fileId":    c.fileId,
15387		"commentId": c.commentId,
15388	})
15389	return gensupport.SendRequest(c.ctx_, c.s.client, req)
15390}
15391
15392// Do executes the "drive.replies.insert" call.
15393// Exactly one of *CommentReply or error will be non-nil. Any non-2xx
15394// status code is an error. Response headers are in either
15395// *CommentReply.ServerResponse.Header or (if a response was returned at
15396// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
15397// to check whether the returned error was because
15398// http.StatusNotModified was returned.
15399func (c *RepliesInsertCall) Do(opts ...googleapi.CallOption) (*CommentReply, error) {
15400	gensupport.SetOptions(c.urlParams_, opts...)
15401	res, err := c.doRequest("json")
15402	if res != nil && res.StatusCode == http.StatusNotModified {
15403		if res.Body != nil {
15404			res.Body.Close()
15405		}
15406		return nil, &googleapi.Error{
15407			Code:   res.StatusCode,
15408			Header: res.Header,
15409		}
15410	}
15411	if err != nil {
15412		return nil, err
15413	}
15414	defer googleapi.CloseBody(res)
15415	if err := googleapi.CheckResponse(res); err != nil {
15416		return nil, err
15417	}
15418	ret := &CommentReply{
15419		ServerResponse: googleapi.ServerResponse{
15420			Header:         res.Header,
15421			HTTPStatusCode: res.StatusCode,
15422		},
15423	}
15424	target := &ret
15425	if err := gensupport.DecodeResponse(target, res); err != nil {
15426		return nil, err
15427	}
15428	return ret, nil
15429	// {
15430	//   "description": "Creates a new reply to the given comment.",
15431	//   "httpMethod": "POST",
15432	//   "id": "drive.replies.insert",
15433	//   "parameterOrder": [
15434	//     "fileId",
15435	//     "commentId"
15436	//   ],
15437	//   "parameters": {
15438	//     "commentId": {
15439	//       "description": "The ID of the comment.",
15440	//       "location": "path",
15441	//       "required": true,
15442	//       "type": "string"
15443	//     },
15444	//     "fileId": {
15445	//       "description": "The ID of the file.",
15446	//       "location": "path",
15447	//       "required": true,
15448	//       "type": "string"
15449	//     }
15450	//   },
15451	//   "path": "files/{fileId}/comments/{commentId}/replies",
15452	//   "request": {
15453	//     "$ref": "CommentReply"
15454	//   },
15455	//   "response": {
15456	//     "$ref": "CommentReply"
15457	//   },
15458	//   "scopes": [
15459	//     "https://www.googleapis.com/auth/drive",
15460	//     "https://www.googleapis.com/auth/drive.file"
15461	//   ]
15462	// }
15463
15464}
15465
15466// method id "drive.replies.list":
15467
15468type RepliesListCall struct {
15469	s            *Service
15470	fileId       string
15471	commentId    string
15472	urlParams_   gensupport.URLParams
15473	ifNoneMatch_ string
15474	ctx_         context.Context
15475	header_      http.Header
15476}
15477
15478// List: Lists all of the replies to a comment.
15479//
15480// - commentId: The ID of the comment.
15481// - fileId: The ID of the file.
15482func (r *RepliesService) List(fileId string, commentId string) *RepliesListCall {
15483	c := &RepliesListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
15484	c.fileId = fileId
15485	c.commentId = commentId
15486	return c
15487}
15488
15489// IncludeDeleted sets the optional parameter "includeDeleted": If set,
15490// all replies, including deleted replies (with content stripped) will
15491// be returned.
15492func (c *RepliesListCall) IncludeDeleted(includeDeleted bool) *RepliesListCall {
15493	c.urlParams_.Set("includeDeleted", fmt.Sprint(includeDeleted))
15494	return c
15495}
15496
15497// MaxResults sets the optional parameter "maxResults": The maximum
15498// number of replies to include in the response, used for paging.
15499func (c *RepliesListCall) MaxResults(maxResults int64) *RepliesListCall {
15500	c.urlParams_.Set("maxResults", fmt.Sprint(maxResults))
15501	return c
15502}
15503
15504// PageToken sets the optional parameter "pageToken": The continuation
15505// token, used to page through large result sets. To get the next page
15506// of results, set this parameter to the value of "nextPageToken" from
15507// the previous response.
15508func (c *RepliesListCall) PageToken(pageToken string) *RepliesListCall {
15509	c.urlParams_.Set("pageToken", pageToken)
15510	return c
15511}
15512
15513// Fields allows partial responses to be retrieved. See
15514// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
15515// for more information.
15516func (c *RepliesListCall) Fields(s ...googleapi.Field) *RepliesListCall {
15517	c.urlParams_.Set("fields", googleapi.CombineFields(s))
15518	return c
15519}
15520
15521// IfNoneMatch sets the optional parameter which makes the operation
15522// fail if the object's ETag matches the given value. This is useful for
15523// getting updates only after the object has changed since the last
15524// request. Use googleapi.IsNotModified to check whether the response
15525// error from Do is the result of In-None-Match.
15526func (c *RepliesListCall) IfNoneMatch(entityTag string) *RepliesListCall {
15527	c.ifNoneMatch_ = entityTag
15528	return c
15529}
15530
15531// Context sets the context to be used in this call's Do method. Any
15532// pending HTTP request will be aborted if the provided context is
15533// canceled.
15534func (c *RepliesListCall) Context(ctx context.Context) *RepliesListCall {
15535	c.ctx_ = ctx
15536	return c
15537}
15538
15539// Header returns an http.Header that can be modified by the caller to
15540// add HTTP headers to the request.
15541func (c *RepliesListCall) Header() http.Header {
15542	if c.header_ == nil {
15543		c.header_ = make(http.Header)
15544	}
15545	return c.header_
15546}
15547
15548func (c *RepliesListCall) doRequest(alt string) (*http.Response, error) {
15549	reqHeaders := make(http.Header)
15550	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210830")
15551	for k, v := range c.header_ {
15552		reqHeaders[k] = v
15553	}
15554	reqHeaders.Set("User-Agent", c.s.userAgent())
15555	if c.ifNoneMatch_ != "" {
15556		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
15557	}
15558	var body io.Reader = nil
15559	c.urlParams_.Set("alt", alt)
15560	c.urlParams_.Set("prettyPrint", "false")
15561	urls := googleapi.ResolveRelative(c.s.BasePath, "files/{fileId}/comments/{commentId}/replies")
15562	urls += "?" + c.urlParams_.Encode()
15563	req, err := http.NewRequest("GET", urls, body)
15564	if err != nil {
15565		return nil, err
15566	}
15567	req.Header = reqHeaders
15568	googleapi.Expand(req.URL, map[string]string{
15569		"fileId":    c.fileId,
15570		"commentId": c.commentId,
15571	})
15572	return gensupport.SendRequest(c.ctx_, c.s.client, req)
15573}
15574
15575// Do executes the "drive.replies.list" call.
15576// Exactly one of *CommentReplyList or error will be non-nil. Any
15577// non-2xx status code is an error. Response headers are in either
15578// *CommentReplyList.ServerResponse.Header or (if a response was
15579// returned at all) in error.(*googleapi.Error).Header. Use
15580// googleapi.IsNotModified to check whether the returned error was
15581// because http.StatusNotModified was returned.
15582func (c *RepliesListCall) Do(opts ...googleapi.CallOption) (*CommentReplyList, error) {
15583	gensupport.SetOptions(c.urlParams_, opts...)
15584	res, err := c.doRequest("json")
15585	if res != nil && res.StatusCode == http.StatusNotModified {
15586		if res.Body != nil {
15587			res.Body.Close()
15588		}
15589		return nil, &googleapi.Error{
15590			Code:   res.StatusCode,
15591			Header: res.Header,
15592		}
15593	}
15594	if err != nil {
15595		return nil, err
15596	}
15597	defer googleapi.CloseBody(res)
15598	if err := googleapi.CheckResponse(res); err != nil {
15599		return nil, err
15600	}
15601	ret := &CommentReplyList{
15602		ServerResponse: googleapi.ServerResponse{
15603			Header:         res.Header,
15604			HTTPStatusCode: res.StatusCode,
15605		},
15606	}
15607	target := &ret
15608	if err := gensupport.DecodeResponse(target, res); err != nil {
15609		return nil, err
15610	}
15611	return ret, nil
15612	// {
15613	//   "description": "Lists all of the replies to a comment.",
15614	//   "httpMethod": "GET",
15615	//   "id": "drive.replies.list",
15616	//   "parameterOrder": [
15617	//     "fileId",
15618	//     "commentId"
15619	//   ],
15620	//   "parameters": {
15621	//     "commentId": {
15622	//       "description": "The ID of the comment.",
15623	//       "location": "path",
15624	//       "required": true,
15625	//       "type": "string"
15626	//     },
15627	//     "fileId": {
15628	//       "description": "The ID of the file.",
15629	//       "location": "path",
15630	//       "required": true,
15631	//       "type": "string"
15632	//     },
15633	//     "includeDeleted": {
15634	//       "default": "false",
15635	//       "description": "If set, all replies, including deleted replies (with content stripped) will be returned.",
15636	//       "location": "query",
15637	//       "type": "boolean"
15638	//     },
15639	//     "maxResults": {
15640	//       "default": "20",
15641	//       "description": "The maximum number of replies to include in the response, used for paging.",
15642	//       "format": "int32",
15643	//       "location": "query",
15644	//       "maximum": "100",
15645	//       "minimum": "0",
15646	//       "type": "integer"
15647	//     },
15648	//     "pageToken": {
15649	//       "description": "The continuation token, used to page through large result sets. To get the next page of results, set this parameter to the value of \"nextPageToken\" from the previous response.",
15650	//       "location": "query",
15651	//       "type": "string"
15652	//     }
15653	//   },
15654	//   "path": "files/{fileId}/comments/{commentId}/replies",
15655	//   "response": {
15656	//     "$ref": "CommentReplyList"
15657	//   },
15658	//   "scopes": [
15659	//     "https://www.googleapis.com/auth/drive",
15660	//     "https://www.googleapis.com/auth/drive.file",
15661	//     "https://www.googleapis.com/auth/drive.readonly"
15662	//   ]
15663	// }
15664
15665}
15666
15667// Pages invokes f for each page of results.
15668// A non-nil error returned from f will halt the iteration.
15669// The provided context supersedes any context provided to the Context method.
15670func (c *RepliesListCall) Pages(ctx context.Context, f func(*CommentReplyList) error) error {
15671	c.ctx_ = ctx
15672	defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
15673	for {
15674		x, err := c.Do()
15675		if err != nil {
15676			return err
15677		}
15678		if err := f(x); err != nil {
15679			return err
15680		}
15681		if x.NextPageToken == "" {
15682			return nil
15683		}
15684		c.PageToken(x.NextPageToken)
15685	}
15686}
15687
15688// method id "drive.replies.patch":
15689
15690type RepliesPatchCall struct {
15691	s            *Service
15692	fileId       string
15693	commentId    string
15694	replyId      string
15695	commentreply *CommentReply
15696	urlParams_   gensupport.URLParams
15697	ctx_         context.Context
15698	header_      http.Header
15699}
15700
15701// Patch: Updates an existing reply.
15702//
15703// - commentId: The ID of the comment.
15704// - fileId: The ID of the file.
15705// - replyId: The ID of the reply.
15706func (r *RepliesService) Patch(fileId string, commentId string, replyId string, commentreply *CommentReply) *RepliesPatchCall {
15707	c := &RepliesPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
15708	c.fileId = fileId
15709	c.commentId = commentId
15710	c.replyId = replyId
15711	c.commentreply = commentreply
15712	return c
15713}
15714
15715// Fields allows partial responses to be retrieved. See
15716// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
15717// for more information.
15718func (c *RepliesPatchCall) Fields(s ...googleapi.Field) *RepliesPatchCall {
15719	c.urlParams_.Set("fields", googleapi.CombineFields(s))
15720	return c
15721}
15722
15723// Context sets the context to be used in this call's Do method. Any
15724// pending HTTP request will be aborted if the provided context is
15725// canceled.
15726func (c *RepliesPatchCall) Context(ctx context.Context) *RepliesPatchCall {
15727	c.ctx_ = ctx
15728	return c
15729}
15730
15731// Header returns an http.Header that can be modified by the caller to
15732// add HTTP headers to the request.
15733func (c *RepliesPatchCall) Header() http.Header {
15734	if c.header_ == nil {
15735		c.header_ = make(http.Header)
15736	}
15737	return c.header_
15738}
15739
15740func (c *RepliesPatchCall) doRequest(alt string) (*http.Response, error) {
15741	reqHeaders := make(http.Header)
15742	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210830")
15743	for k, v := range c.header_ {
15744		reqHeaders[k] = v
15745	}
15746	reqHeaders.Set("User-Agent", c.s.userAgent())
15747	var body io.Reader = nil
15748	body, err := googleapi.WithoutDataWrapper.JSONReader(c.commentreply)
15749	if err != nil {
15750		return nil, err
15751	}
15752	reqHeaders.Set("Content-Type", "application/json")
15753	c.urlParams_.Set("alt", alt)
15754	c.urlParams_.Set("prettyPrint", "false")
15755	urls := googleapi.ResolveRelative(c.s.BasePath, "files/{fileId}/comments/{commentId}/replies/{replyId}")
15756	urls += "?" + c.urlParams_.Encode()
15757	req, err := http.NewRequest("PATCH", urls, body)
15758	if err != nil {
15759		return nil, err
15760	}
15761	req.Header = reqHeaders
15762	googleapi.Expand(req.URL, map[string]string{
15763		"fileId":    c.fileId,
15764		"commentId": c.commentId,
15765		"replyId":   c.replyId,
15766	})
15767	return gensupport.SendRequest(c.ctx_, c.s.client, req)
15768}
15769
15770// Do executes the "drive.replies.patch" call.
15771// Exactly one of *CommentReply or error will be non-nil. Any non-2xx
15772// status code is an error. Response headers are in either
15773// *CommentReply.ServerResponse.Header or (if a response was returned at
15774// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
15775// to check whether the returned error was because
15776// http.StatusNotModified was returned.
15777func (c *RepliesPatchCall) Do(opts ...googleapi.CallOption) (*CommentReply, error) {
15778	gensupport.SetOptions(c.urlParams_, opts...)
15779	res, err := c.doRequest("json")
15780	if res != nil && res.StatusCode == http.StatusNotModified {
15781		if res.Body != nil {
15782			res.Body.Close()
15783		}
15784		return nil, &googleapi.Error{
15785			Code:   res.StatusCode,
15786			Header: res.Header,
15787		}
15788	}
15789	if err != nil {
15790		return nil, err
15791	}
15792	defer googleapi.CloseBody(res)
15793	if err := googleapi.CheckResponse(res); err != nil {
15794		return nil, err
15795	}
15796	ret := &CommentReply{
15797		ServerResponse: googleapi.ServerResponse{
15798			Header:         res.Header,
15799			HTTPStatusCode: res.StatusCode,
15800		},
15801	}
15802	target := &ret
15803	if err := gensupport.DecodeResponse(target, res); err != nil {
15804		return nil, err
15805	}
15806	return ret, nil
15807	// {
15808	//   "description": "Updates an existing reply.",
15809	//   "httpMethod": "PATCH",
15810	//   "id": "drive.replies.patch",
15811	//   "parameterOrder": [
15812	//     "fileId",
15813	//     "commentId",
15814	//     "replyId"
15815	//   ],
15816	//   "parameters": {
15817	//     "commentId": {
15818	//       "description": "The ID of the comment.",
15819	//       "location": "path",
15820	//       "required": true,
15821	//       "type": "string"
15822	//     },
15823	//     "fileId": {
15824	//       "description": "The ID of the file.",
15825	//       "location": "path",
15826	//       "required": true,
15827	//       "type": "string"
15828	//     },
15829	//     "replyId": {
15830	//       "description": "The ID of the reply.",
15831	//       "location": "path",
15832	//       "required": true,
15833	//       "type": "string"
15834	//     }
15835	//   },
15836	//   "path": "files/{fileId}/comments/{commentId}/replies/{replyId}",
15837	//   "request": {
15838	//     "$ref": "CommentReply"
15839	//   },
15840	//   "response": {
15841	//     "$ref": "CommentReply"
15842	//   },
15843	//   "scopes": [
15844	//     "https://www.googleapis.com/auth/drive",
15845	//     "https://www.googleapis.com/auth/drive.file"
15846	//   ]
15847	// }
15848
15849}
15850
15851// method id "drive.replies.update":
15852
15853type RepliesUpdateCall struct {
15854	s            *Service
15855	fileId       string
15856	commentId    string
15857	replyId      string
15858	commentreply *CommentReply
15859	urlParams_   gensupport.URLParams
15860	ctx_         context.Context
15861	header_      http.Header
15862}
15863
15864// Update: Updates an existing reply.
15865//
15866// - commentId: The ID of the comment.
15867// - fileId: The ID of the file.
15868// - replyId: The ID of the reply.
15869func (r *RepliesService) Update(fileId string, commentId string, replyId string, commentreply *CommentReply) *RepliesUpdateCall {
15870	c := &RepliesUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
15871	c.fileId = fileId
15872	c.commentId = commentId
15873	c.replyId = replyId
15874	c.commentreply = commentreply
15875	return c
15876}
15877
15878// Fields allows partial responses to be retrieved. See
15879// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
15880// for more information.
15881func (c *RepliesUpdateCall) Fields(s ...googleapi.Field) *RepliesUpdateCall {
15882	c.urlParams_.Set("fields", googleapi.CombineFields(s))
15883	return c
15884}
15885
15886// Context sets the context to be used in this call's Do method. Any
15887// pending HTTP request will be aborted if the provided context is
15888// canceled.
15889func (c *RepliesUpdateCall) Context(ctx context.Context) *RepliesUpdateCall {
15890	c.ctx_ = ctx
15891	return c
15892}
15893
15894// Header returns an http.Header that can be modified by the caller to
15895// add HTTP headers to the request.
15896func (c *RepliesUpdateCall) Header() http.Header {
15897	if c.header_ == nil {
15898		c.header_ = make(http.Header)
15899	}
15900	return c.header_
15901}
15902
15903func (c *RepliesUpdateCall) doRequest(alt string) (*http.Response, error) {
15904	reqHeaders := make(http.Header)
15905	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210830")
15906	for k, v := range c.header_ {
15907		reqHeaders[k] = v
15908	}
15909	reqHeaders.Set("User-Agent", c.s.userAgent())
15910	var body io.Reader = nil
15911	body, err := googleapi.WithoutDataWrapper.JSONReader(c.commentreply)
15912	if err != nil {
15913		return nil, err
15914	}
15915	reqHeaders.Set("Content-Type", "application/json")
15916	c.urlParams_.Set("alt", alt)
15917	c.urlParams_.Set("prettyPrint", "false")
15918	urls := googleapi.ResolveRelative(c.s.BasePath, "files/{fileId}/comments/{commentId}/replies/{replyId}")
15919	urls += "?" + c.urlParams_.Encode()
15920	req, err := http.NewRequest("PUT", urls, body)
15921	if err != nil {
15922		return nil, err
15923	}
15924	req.Header = reqHeaders
15925	googleapi.Expand(req.URL, map[string]string{
15926		"fileId":    c.fileId,
15927		"commentId": c.commentId,
15928		"replyId":   c.replyId,
15929	})
15930	return gensupport.SendRequest(c.ctx_, c.s.client, req)
15931}
15932
15933// Do executes the "drive.replies.update" call.
15934// Exactly one of *CommentReply or error will be non-nil. Any non-2xx
15935// status code is an error. Response headers are in either
15936// *CommentReply.ServerResponse.Header or (if a response was returned at
15937// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
15938// to check whether the returned error was because
15939// http.StatusNotModified was returned.
15940func (c *RepliesUpdateCall) Do(opts ...googleapi.CallOption) (*CommentReply, error) {
15941	gensupport.SetOptions(c.urlParams_, opts...)
15942	res, err := c.doRequest("json")
15943	if res != nil && res.StatusCode == http.StatusNotModified {
15944		if res.Body != nil {
15945			res.Body.Close()
15946		}
15947		return nil, &googleapi.Error{
15948			Code:   res.StatusCode,
15949			Header: res.Header,
15950		}
15951	}
15952	if err != nil {
15953		return nil, err
15954	}
15955	defer googleapi.CloseBody(res)
15956	if err := googleapi.CheckResponse(res); err != nil {
15957		return nil, err
15958	}
15959	ret := &CommentReply{
15960		ServerResponse: googleapi.ServerResponse{
15961			Header:         res.Header,
15962			HTTPStatusCode: res.StatusCode,
15963		},
15964	}
15965	target := &ret
15966	if err := gensupport.DecodeResponse(target, res); err != nil {
15967		return nil, err
15968	}
15969	return ret, nil
15970	// {
15971	//   "description": "Updates an existing reply.",
15972	//   "httpMethod": "PUT",
15973	//   "id": "drive.replies.update",
15974	//   "parameterOrder": [
15975	//     "fileId",
15976	//     "commentId",
15977	//     "replyId"
15978	//   ],
15979	//   "parameters": {
15980	//     "commentId": {
15981	//       "description": "The ID of the comment.",
15982	//       "location": "path",
15983	//       "required": true,
15984	//       "type": "string"
15985	//     },
15986	//     "fileId": {
15987	//       "description": "The ID of the file.",
15988	//       "location": "path",
15989	//       "required": true,
15990	//       "type": "string"
15991	//     },
15992	//     "replyId": {
15993	//       "description": "The ID of the reply.",
15994	//       "location": "path",
15995	//       "required": true,
15996	//       "type": "string"
15997	//     }
15998	//   },
15999	//   "path": "files/{fileId}/comments/{commentId}/replies/{replyId}",
16000	//   "request": {
16001	//     "$ref": "CommentReply"
16002	//   },
16003	//   "response": {
16004	//     "$ref": "CommentReply"
16005	//   },
16006	//   "scopes": [
16007	//     "https://www.googleapis.com/auth/drive",
16008	//     "https://www.googleapis.com/auth/drive.file"
16009	//   ]
16010	// }
16011
16012}
16013
16014// method id "drive.revisions.delete":
16015
16016type RevisionsDeleteCall struct {
16017	s          *Service
16018	fileId     string
16019	revisionId string
16020	urlParams_ gensupport.URLParams
16021	ctx_       context.Context
16022	header_    http.Header
16023}
16024
16025// Delete: Permanently deletes a file version. You can only delete
16026// revisions for files with binary content, like images or videos.
16027// Revisions for other files, like Google Docs or Sheets, and the last
16028// remaining file version can't be deleted.
16029//
16030// - fileId: The ID of the file.
16031// - revisionId: The ID of the revision.
16032func (r *RevisionsService) Delete(fileId string, revisionId string) *RevisionsDeleteCall {
16033	c := &RevisionsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
16034	c.fileId = fileId
16035	c.revisionId = revisionId
16036	return c
16037}
16038
16039// Fields allows partial responses to be retrieved. See
16040// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
16041// for more information.
16042func (c *RevisionsDeleteCall) Fields(s ...googleapi.Field) *RevisionsDeleteCall {
16043	c.urlParams_.Set("fields", googleapi.CombineFields(s))
16044	return c
16045}
16046
16047// Context sets the context to be used in this call's Do method. Any
16048// pending HTTP request will be aborted if the provided context is
16049// canceled.
16050func (c *RevisionsDeleteCall) Context(ctx context.Context) *RevisionsDeleteCall {
16051	c.ctx_ = ctx
16052	return c
16053}
16054
16055// Header returns an http.Header that can be modified by the caller to
16056// add HTTP headers to the request.
16057func (c *RevisionsDeleteCall) Header() http.Header {
16058	if c.header_ == nil {
16059		c.header_ = make(http.Header)
16060	}
16061	return c.header_
16062}
16063
16064func (c *RevisionsDeleteCall) doRequest(alt string) (*http.Response, error) {
16065	reqHeaders := make(http.Header)
16066	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210830")
16067	for k, v := range c.header_ {
16068		reqHeaders[k] = v
16069	}
16070	reqHeaders.Set("User-Agent", c.s.userAgent())
16071	var body io.Reader = nil
16072	c.urlParams_.Set("alt", alt)
16073	c.urlParams_.Set("prettyPrint", "false")
16074	urls := googleapi.ResolveRelative(c.s.BasePath, "files/{fileId}/revisions/{revisionId}")
16075	urls += "?" + c.urlParams_.Encode()
16076	req, err := http.NewRequest("DELETE", urls, body)
16077	if err != nil {
16078		return nil, err
16079	}
16080	req.Header = reqHeaders
16081	googleapi.Expand(req.URL, map[string]string{
16082		"fileId":     c.fileId,
16083		"revisionId": c.revisionId,
16084	})
16085	return gensupport.SendRequest(c.ctx_, c.s.client, req)
16086}
16087
16088// Do executes the "drive.revisions.delete" call.
16089func (c *RevisionsDeleteCall) Do(opts ...googleapi.CallOption) error {
16090	gensupport.SetOptions(c.urlParams_, opts...)
16091	res, err := c.doRequest("json")
16092	if err != nil {
16093		return err
16094	}
16095	defer googleapi.CloseBody(res)
16096	if err := googleapi.CheckResponse(res); err != nil {
16097		return err
16098	}
16099	return nil
16100	// {
16101	//   "description": "Permanently deletes a file version. You can only delete revisions for files with binary content, like images or videos. Revisions for other files, like Google Docs or Sheets, and the last remaining file version can't be deleted.",
16102	//   "httpMethod": "DELETE",
16103	//   "id": "drive.revisions.delete",
16104	//   "parameterOrder": [
16105	//     "fileId",
16106	//     "revisionId"
16107	//   ],
16108	//   "parameters": {
16109	//     "fileId": {
16110	//       "description": "The ID of the file.",
16111	//       "location": "path",
16112	//       "required": true,
16113	//       "type": "string"
16114	//     },
16115	//     "revisionId": {
16116	//       "description": "The ID of the revision.",
16117	//       "location": "path",
16118	//       "required": true,
16119	//       "type": "string"
16120	//     }
16121	//   },
16122	//   "path": "files/{fileId}/revisions/{revisionId}",
16123	//   "scopes": [
16124	//     "https://www.googleapis.com/auth/drive",
16125	//     "https://www.googleapis.com/auth/drive.appdata",
16126	//     "https://www.googleapis.com/auth/drive.file"
16127	//   ]
16128	// }
16129
16130}
16131
16132// method id "drive.revisions.get":
16133
16134type RevisionsGetCall struct {
16135	s            *Service
16136	fileId       string
16137	revisionId   string
16138	urlParams_   gensupport.URLParams
16139	ifNoneMatch_ string
16140	ctx_         context.Context
16141	header_      http.Header
16142}
16143
16144// Get: Gets a specific revision.
16145//
16146// - fileId: The ID of the file.
16147// - revisionId: The ID of the revision.
16148func (r *RevisionsService) Get(fileId string, revisionId string) *RevisionsGetCall {
16149	c := &RevisionsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
16150	c.fileId = fileId
16151	c.revisionId = revisionId
16152	return c
16153}
16154
16155// Fields allows partial responses to be retrieved. See
16156// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
16157// for more information.
16158func (c *RevisionsGetCall) Fields(s ...googleapi.Field) *RevisionsGetCall {
16159	c.urlParams_.Set("fields", googleapi.CombineFields(s))
16160	return c
16161}
16162
16163// IfNoneMatch sets the optional parameter which makes the operation
16164// fail if the object's ETag matches the given value. This is useful for
16165// getting updates only after the object has changed since the last
16166// request. Use googleapi.IsNotModified to check whether the response
16167// error from Do is the result of In-None-Match.
16168func (c *RevisionsGetCall) IfNoneMatch(entityTag string) *RevisionsGetCall {
16169	c.ifNoneMatch_ = entityTag
16170	return c
16171}
16172
16173// Context sets the context to be used in this call's Do method. Any
16174// pending HTTP request will be aborted if the provided context is
16175// canceled.
16176func (c *RevisionsGetCall) Context(ctx context.Context) *RevisionsGetCall {
16177	c.ctx_ = ctx
16178	return c
16179}
16180
16181// Header returns an http.Header that can be modified by the caller to
16182// add HTTP headers to the request.
16183func (c *RevisionsGetCall) Header() http.Header {
16184	if c.header_ == nil {
16185		c.header_ = make(http.Header)
16186	}
16187	return c.header_
16188}
16189
16190func (c *RevisionsGetCall) doRequest(alt string) (*http.Response, error) {
16191	reqHeaders := make(http.Header)
16192	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210830")
16193	for k, v := range c.header_ {
16194		reqHeaders[k] = v
16195	}
16196	reqHeaders.Set("User-Agent", c.s.userAgent())
16197	if c.ifNoneMatch_ != "" {
16198		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
16199	}
16200	var body io.Reader = nil
16201	c.urlParams_.Set("alt", alt)
16202	c.urlParams_.Set("prettyPrint", "false")
16203	urls := googleapi.ResolveRelative(c.s.BasePath, "files/{fileId}/revisions/{revisionId}")
16204	urls += "?" + c.urlParams_.Encode()
16205	req, err := http.NewRequest("GET", urls, body)
16206	if err != nil {
16207		return nil, err
16208	}
16209	req.Header = reqHeaders
16210	googleapi.Expand(req.URL, map[string]string{
16211		"fileId":     c.fileId,
16212		"revisionId": c.revisionId,
16213	})
16214	return gensupport.SendRequest(c.ctx_, c.s.client, req)
16215}
16216
16217// Do executes the "drive.revisions.get" call.
16218// Exactly one of *Revision or error will be non-nil. Any non-2xx status
16219// code is an error. Response headers are in either
16220// *Revision.ServerResponse.Header or (if a response was returned at
16221// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
16222// to check whether the returned error was because
16223// http.StatusNotModified was returned.
16224func (c *RevisionsGetCall) Do(opts ...googleapi.CallOption) (*Revision, error) {
16225	gensupport.SetOptions(c.urlParams_, opts...)
16226	res, err := c.doRequest("json")
16227	if res != nil && res.StatusCode == http.StatusNotModified {
16228		if res.Body != nil {
16229			res.Body.Close()
16230		}
16231		return nil, &googleapi.Error{
16232			Code:   res.StatusCode,
16233			Header: res.Header,
16234		}
16235	}
16236	if err != nil {
16237		return nil, err
16238	}
16239	defer googleapi.CloseBody(res)
16240	if err := googleapi.CheckResponse(res); err != nil {
16241		return nil, err
16242	}
16243	ret := &Revision{
16244		ServerResponse: googleapi.ServerResponse{
16245			Header:         res.Header,
16246			HTTPStatusCode: res.StatusCode,
16247		},
16248	}
16249	target := &ret
16250	if err := gensupport.DecodeResponse(target, res); err != nil {
16251		return nil, err
16252	}
16253	return ret, nil
16254	// {
16255	//   "description": "Gets a specific revision.",
16256	//   "httpMethod": "GET",
16257	//   "id": "drive.revisions.get",
16258	//   "parameterOrder": [
16259	//     "fileId",
16260	//     "revisionId"
16261	//   ],
16262	//   "parameters": {
16263	//     "fileId": {
16264	//       "description": "The ID of the file.",
16265	//       "location": "path",
16266	//       "required": true,
16267	//       "type": "string"
16268	//     },
16269	//     "revisionId": {
16270	//       "description": "The ID of the revision.",
16271	//       "location": "path",
16272	//       "required": true,
16273	//       "type": "string"
16274	//     }
16275	//   },
16276	//   "path": "files/{fileId}/revisions/{revisionId}",
16277	//   "response": {
16278	//     "$ref": "Revision"
16279	//   },
16280	//   "scopes": [
16281	//     "https://www.googleapis.com/auth/drive",
16282	//     "https://www.googleapis.com/auth/drive.appdata",
16283	//     "https://www.googleapis.com/auth/drive.file",
16284	//     "https://www.googleapis.com/auth/drive.metadata",
16285	//     "https://www.googleapis.com/auth/drive.metadata.readonly",
16286	//     "https://www.googleapis.com/auth/drive.photos.readonly",
16287	//     "https://www.googleapis.com/auth/drive.readonly"
16288	//   ]
16289	// }
16290
16291}
16292
16293// method id "drive.revisions.list":
16294
16295type RevisionsListCall struct {
16296	s            *Service
16297	fileId       string
16298	urlParams_   gensupport.URLParams
16299	ifNoneMatch_ string
16300	ctx_         context.Context
16301	header_      http.Header
16302}
16303
16304// List: Lists a file's revisions.
16305//
16306// - fileId: The ID of the file.
16307func (r *RevisionsService) List(fileId string) *RevisionsListCall {
16308	c := &RevisionsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
16309	c.fileId = fileId
16310	return c
16311}
16312
16313// MaxResults sets the optional parameter "maxResults": Maximum number
16314// of revisions to return.
16315func (c *RevisionsListCall) MaxResults(maxResults int64) *RevisionsListCall {
16316	c.urlParams_.Set("maxResults", fmt.Sprint(maxResults))
16317	return c
16318}
16319
16320// PageToken sets the optional parameter "pageToken": Page token for
16321// revisions. To get the next page of results, set this parameter to the
16322// value of "nextPageToken" from the previous response.
16323func (c *RevisionsListCall) PageToken(pageToken string) *RevisionsListCall {
16324	c.urlParams_.Set("pageToken", pageToken)
16325	return c
16326}
16327
16328// Fields allows partial responses to be retrieved. See
16329// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
16330// for more information.
16331func (c *RevisionsListCall) Fields(s ...googleapi.Field) *RevisionsListCall {
16332	c.urlParams_.Set("fields", googleapi.CombineFields(s))
16333	return c
16334}
16335
16336// IfNoneMatch sets the optional parameter which makes the operation
16337// fail if the object's ETag matches the given value. This is useful for
16338// getting updates only after the object has changed since the last
16339// request. Use googleapi.IsNotModified to check whether the response
16340// error from Do is the result of In-None-Match.
16341func (c *RevisionsListCall) IfNoneMatch(entityTag string) *RevisionsListCall {
16342	c.ifNoneMatch_ = entityTag
16343	return c
16344}
16345
16346// Context sets the context to be used in this call's Do method. Any
16347// pending HTTP request will be aborted if the provided context is
16348// canceled.
16349func (c *RevisionsListCall) Context(ctx context.Context) *RevisionsListCall {
16350	c.ctx_ = ctx
16351	return c
16352}
16353
16354// Header returns an http.Header that can be modified by the caller to
16355// add HTTP headers to the request.
16356func (c *RevisionsListCall) Header() http.Header {
16357	if c.header_ == nil {
16358		c.header_ = make(http.Header)
16359	}
16360	return c.header_
16361}
16362
16363func (c *RevisionsListCall) doRequest(alt string) (*http.Response, error) {
16364	reqHeaders := make(http.Header)
16365	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210830")
16366	for k, v := range c.header_ {
16367		reqHeaders[k] = v
16368	}
16369	reqHeaders.Set("User-Agent", c.s.userAgent())
16370	if c.ifNoneMatch_ != "" {
16371		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
16372	}
16373	var body io.Reader = nil
16374	c.urlParams_.Set("alt", alt)
16375	c.urlParams_.Set("prettyPrint", "false")
16376	urls := googleapi.ResolveRelative(c.s.BasePath, "files/{fileId}/revisions")
16377	urls += "?" + c.urlParams_.Encode()
16378	req, err := http.NewRequest("GET", urls, body)
16379	if err != nil {
16380		return nil, err
16381	}
16382	req.Header = reqHeaders
16383	googleapi.Expand(req.URL, map[string]string{
16384		"fileId": c.fileId,
16385	})
16386	return gensupport.SendRequest(c.ctx_, c.s.client, req)
16387}
16388
16389// Do executes the "drive.revisions.list" call.
16390// Exactly one of *RevisionList or error will be non-nil. Any non-2xx
16391// status code is an error. Response headers are in either
16392// *RevisionList.ServerResponse.Header or (if a response was returned at
16393// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
16394// to check whether the returned error was because
16395// http.StatusNotModified was returned.
16396func (c *RevisionsListCall) Do(opts ...googleapi.CallOption) (*RevisionList, error) {
16397	gensupport.SetOptions(c.urlParams_, opts...)
16398	res, err := c.doRequest("json")
16399	if res != nil && res.StatusCode == http.StatusNotModified {
16400		if res.Body != nil {
16401			res.Body.Close()
16402		}
16403		return nil, &googleapi.Error{
16404			Code:   res.StatusCode,
16405			Header: res.Header,
16406		}
16407	}
16408	if err != nil {
16409		return nil, err
16410	}
16411	defer googleapi.CloseBody(res)
16412	if err := googleapi.CheckResponse(res); err != nil {
16413		return nil, err
16414	}
16415	ret := &RevisionList{
16416		ServerResponse: googleapi.ServerResponse{
16417			Header:         res.Header,
16418			HTTPStatusCode: res.StatusCode,
16419		},
16420	}
16421	target := &ret
16422	if err := gensupport.DecodeResponse(target, res); err != nil {
16423		return nil, err
16424	}
16425	return ret, nil
16426	// {
16427	//   "description": "Lists a file's revisions.",
16428	//   "httpMethod": "GET",
16429	//   "id": "drive.revisions.list",
16430	//   "parameterOrder": [
16431	//     "fileId"
16432	//   ],
16433	//   "parameters": {
16434	//     "fileId": {
16435	//       "description": "The ID of the file.",
16436	//       "location": "path",
16437	//       "required": true,
16438	//       "type": "string"
16439	//     },
16440	//     "maxResults": {
16441	//       "default": "200",
16442	//       "description": "Maximum number of revisions to return.",
16443	//       "format": "int32",
16444	//       "location": "query",
16445	//       "maximum": "1000",
16446	//       "minimum": "1",
16447	//       "type": "integer"
16448	//     },
16449	//     "pageToken": {
16450	//       "description": "Page token for revisions. To get the next page of results, set this parameter to the value of \"nextPageToken\" from the previous response.",
16451	//       "location": "query",
16452	//       "type": "string"
16453	//     }
16454	//   },
16455	//   "path": "files/{fileId}/revisions",
16456	//   "response": {
16457	//     "$ref": "RevisionList"
16458	//   },
16459	//   "scopes": [
16460	//     "https://www.googleapis.com/auth/drive",
16461	//     "https://www.googleapis.com/auth/drive.appdata",
16462	//     "https://www.googleapis.com/auth/drive.file",
16463	//     "https://www.googleapis.com/auth/drive.metadata",
16464	//     "https://www.googleapis.com/auth/drive.metadata.readonly",
16465	//     "https://www.googleapis.com/auth/drive.photos.readonly",
16466	//     "https://www.googleapis.com/auth/drive.readonly"
16467	//   ]
16468	// }
16469
16470}
16471
16472// Pages invokes f for each page of results.
16473// A non-nil error returned from f will halt the iteration.
16474// The provided context supersedes any context provided to the Context method.
16475func (c *RevisionsListCall) Pages(ctx context.Context, f func(*RevisionList) error) error {
16476	c.ctx_ = ctx
16477	defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
16478	for {
16479		x, err := c.Do()
16480		if err != nil {
16481			return err
16482		}
16483		if err := f(x); err != nil {
16484			return err
16485		}
16486		if x.NextPageToken == "" {
16487			return nil
16488		}
16489		c.PageToken(x.NextPageToken)
16490	}
16491}
16492
16493// method id "drive.revisions.patch":
16494
16495type RevisionsPatchCall struct {
16496	s          *Service
16497	fileId     string
16498	revisionId string
16499	revision   *Revision
16500	urlParams_ gensupport.URLParams
16501	ctx_       context.Context
16502	header_    http.Header
16503}
16504
16505// Patch: Updates a revision.
16506//
16507// - fileId: The ID for the file.
16508// - revisionId: The ID for the revision.
16509func (r *RevisionsService) Patch(fileId string, revisionId string, revision *Revision) *RevisionsPatchCall {
16510	c := &RevisionsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
16511	c.fileId = fileId
16512	c.revisionId = revisionId
16513	c.revision = revision
16514	return c
16515}
16516
16517// Fields allows partial responses to be retrieved. See
16518// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
16519// for more information.
16520func (c *RevisionsPatchCall) Fields(s ...googleapi.Field) *RevisionsPatchCall {
16521	c.urlParams_.Set("fields", googleapi.CombineFields(s))
16522	return c
16523}
16524
16525// Context sets the context to be used in this call's Do method. Any
16526// pending HTTP request will be aborted if the provided context is
16527// canceled.
16528func (c *RevisionsPatchCall) Context(ctx context.Context) *RevisionsPatchCall {
16529	c.ctx_ = ctx
16530	return c
16531}
16532
16533// Header returns an http.Header that can be modified by the caller to
16534// add HTTP headers to the request.
16535func (c *RevisionsPatchCall) Header() http.Header {
16536	if c.header_ == nil {
16537		c.header_ = make(http.Header)
16538	}
16539	return c.header_
16540}
16541
16542func (c *RevisionsPatchCall) doRequest(alt string) (*http.Response, error) {
16543	reqHeaders := make(http.Header)
16544	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210830")
16545	for k, v := range c.header_ {
16546		reqHeaders[k] = v
16547	}
16548	reqHeaders.Set("User-Agent", c.s.userAgent())
16549	var body io.Reader = nil
16550	body, err := googleapi.WithoutDataWrapper.JSONReader(c.revision)
16551	if err != nil {
16552		return nil, err
16553	}
16554	reqHeaders.Set("Content-Type", "application/json")
16555	c.urlParams_.Set("alt", alt)
16556	c.urlParams_.Set("prettyPrint", "false")
16557	urls := googleapi.ResolveRelative(c.s.BasePath, "files/{fileId}/revisions/{revisionId}")
16558	urls += "?" + c.urlParams_.Encode()
16559	req, err := http.NewRequest("PATCH", urls, body)
16560	if err != nil {
16561		return nil, err
16562	}
16563	req.Header = reqHeaders
16564	googleapi.Expand(req.URL, map[string]string{
16565		"fileId":     c.fileId,
16566		"revisionId": c.revisionId,
16567	})
16568	return gensupport.SendRequest(c.ctx_, c.s.client, req)
16569}
16570
16571// Do executes the "drive.revisions.patch" call.
16572// Exactly one of *Revision or error will be non-nil. Any non-2xx status
16573// code is an error. Response headers are in either
16574// *Revision.ServerResponse.Header or (if a response was returned at
16575// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
16576// to check whether the returned error was because
16577// http.StatusNotModified was returned.
16578func (c *RevisionsPatchCall) Do(opts ...googleapi.CallOption) (*Revision, error) {
16579	gensupport.SetOptions(c.urlParams_, opts...)
16580	res, err := c.doRequest("json")
16581	if res != nil && res.StatusCode == http.StatusNotModified {
16582		if res.Body != nil {
16583			res.Body.Close()
16584		}
16585		return nil, &googleapi.Error{
16586			Code:   res.StatusCode,
16587			Header: res.Header,
16588		}
16589	}
16590	if err != nil {
16591		return nil, err
16592	}
16593	defer googleapi.CloseBody(res)
16594	if err := googleapi.CheckResponse(res); err != nil {
16595		return nil, err
16596	}
16597	ret := &Revision{
16598		ServerResponse: googleapi.ServerResponse{
16599			Header:         res.Header,
16600			HTTPStatusCode: res.StatusCode,
16601		},
16602	}
16603	target := &ret
16604	if err := gensupport.DecodeResponse(target, res); err != nil {
16605		return nil, err
16606	}
16607	return ret, nil
16608	// {
16609	//   "description": "Updates a revision.",
16610	//   "httpMethod": "PATCH",
16611	//   "id": "drive.revisions.patch",
16612	//   "parameterOrder": [
16613	//     "fileId",
16614	//     "revisionId"
16615	//   ],
16616	//   "parameters": {
16617	//     "fileId": {
16618	//       "description": "The ID for the file.",
16619	//       "location": "path",
16620	//       "required": true,
16621	//       "type": "string"
16622	//     },
16623	//     "revisionId": {
16624	//       "description": "The ID for the revision.",
16625	//       "location": "path",
16626	//       "required": true,
16627	//       "type": "string"
16628	//     }
16629	//   },
16630	//   "path": "files/{fileId}/revisions/{revisionId}",
16631	//   "request": {
16632	//     "$ref": "Revision"
16633	//   },
16634	//   "response": {
16635	//     "$ref": "Revision"
16636	//   },
16637	//   "scopes": [
16638	//     "https://www.googleapis.com/auth/drive",
16639	//     "https://www.googleapis.com/auth/drive.appdata",
16640	//     "https://www.googleapis.com/auth/drive.file"
16641	//   ]
16642	// }
16643
16644}
16645
16646// method id "drive.revisions.update":
16647
16648type RevisionsUpdateCall struct {
16649	s          *Service
16650	fileId     string
16651	revisionId string
16652	revision   *Revision
16653	urlParams_ gensupport.URLParams
16654	ctx_       context.Context
16655	header_    http.Header
16656}
16657
16658// Update: Updates a revision.
16659//
16660// - fileId: The ID for the file.
16661// - revisionId: The ID for the revision.
16662func (r *RevisionsService) Update(fileId string, revisionId string, revision *Revision) *RevisionsUpdateCall {
16663	c := &RevisionsUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
16664	c.fileId = fileId
16665	c.revisionId = revisionId
16666	c.revision = revision
16667	return c
16668}
16669
16670// Fields allows partial responses to be retrieved. See
16671// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
16672// for more information.
16673func (c *RevisionsUpdateCall) Fields(s ...googleapi.Field) *RevisionsUpdateCall {
16674	c.urlParams_.Set("fields", googleapi.CombineFields(s))
16675	return c
16676}
16677
16678// Context sets the context to be used in this call's Do method. Any
16679// pending HTTP request will be aborted if the provided context is
16680// canceled.
16681func (c *RevisionsUpdateCall) Context(ctx context.Context) *RevisionsUpdateCall {
16682	c.ctx_ = ctx
16683	return c
16684}
16685
16686// Header returns an http.Header that can be modified by the caller to
16687// add HTTP headers to the request.
16688func (c *RevisionsUpdateCall) Header() http.Header {
16689	if c.header_ == nil {
16690		c.header_ = make(http.Header)
16691	}
16692	return c.header_
16693}
16694
16695func (c *RevisionsUpdateCall) doRequest(alt string) (*http.Response, error) {
16696	reqHeaders := make(http.Header)
16697	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210830")
16698	for k, v := range c.header_ {
16699		reqHeaders[k] = v
16700	}
16701	reqHeaders.Set("User-Agent", c.s.userAgent())
16702	var body io.Reader = nil
16703	body, err := googleapi.WithoutDataWrapper.JSONReader(c.revision)
16704	if err != nil {
16705		return nil, err
16706	}
16707	reqHeaders.Set("Content-Type", "application/json")
16708	c.urlParams_.Set("alt", alt)
16709	c.urlParams_.Set("prettyPrint", "false")
16710	urls := googleapi.ResolveRelative(c.s.BasePath, "files/{fileId}/revisions/{revisionId}")
16711	urls += "?" + c.urlParams_.Encode()
16712	req, err := http.NewRequest("PUT", urls, body)
16713	if err != nil {
16714		return nil, err
16715	}
16716	req.Header = reqHeaders
16717	googleapi.Expand(req.URL, map[string]string{
16718		"fileId":     c.fileId,
16719		"revisionId": c.revisionId,
16720	})
16721	return gensupport.SendRequest(c.ctx_, c.s.client, req)
16722}
16723
16724// Do executes the "drive.revisions.update" call.
16725// Exactly one of *Revision or error will be non-nil. Any non-2xx status
16726// code is an error. Response headers are in either
16727// *Revision.ServerResponse.Header or (if a response was returned at
16728// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
16729// to check whether the returned error was because
16730// http.StatusNotModified was returned.
16731func (c *RevisionsUpdateCall) Do(opts ...googleapi.CallOption) (*Revision, error) {
16732	gensupport.SetOptions(c.urlParams_, opts...)
16733	res, err := c.doRequest("json")
16734	if res != nil && res.StatusCode == http.StatusNotModified {
16735		if res.Body != nil {
16736			res.Body.Close()
16737		}
16738		return nil, &googleapi.Error{
16739			Code:   res.StatusCode,
16740			Header: res.Header,
16741		}
16742	}
16743	if err != nil {
16744		return nil, err
16745	}
16746	defer googleapi.CloseBody(res)
16747	if err := googleapi.CheckResponse(res); err != nil {
16748		return nil, err
16749	}
16750	ret := &Revision{
16751		ServerResponse: googleapi.ServerResponse{
16752			Header:         res.Header,
16753			HTTPStatusCode: res.StatusCode,
16754		},
16755	}
16756	target := &ret
16757	if err := gensupport.DecodeResponse(target, res); err != nil {
16758		return nil, err
16759	}
16760	return ret, nil
16761	// {
16762	//   "description": "Updates a revision.",
16763	//   "httpMethod": "PUT",
16764	//   "id": "drive.revisions.update",
16765	//   "parameterOrder": [
16766	//     "fileId",
16767	//     "revisionId"
16768	//   ],
16769	//   "parameters": {
16770	//     "fileId": {
16771	//       "description": "The ID for the file.",
16772	//       "location": "path",
16773	//       "required": true,
16774	//       "type": "string"
16775	//     },
16776	//     "revisionId": {
16777	//       "description": "The ID for the revision.",
16778	//       "location": "path",
16779	//       "required": true,
16780	//       "type": "string"
16781	//     }
16782	//   },
16783	//   "path": "files/{fileId}/revisions/{revisionId}",
16784	//   "request": {
16785	//     "$ref": "Revision"
16786	//   },
16787	//   "response": {
16788	//     "$ref": "Revision"
16789	//   },
16790	//   "scopes": [
16791	//     "https://www.googleapis.com/auth/drive",
16792	//     "https://www.googleapis.com/auth/drive.appdata",
16793	//     "https://www.googleapis.com/auth/drive.file"
16794	//   ]
16795	// }
16796
16797}
16798
16799// method id "drive.teamdrives.delete":
16800
16801type TeamdrivesDeleteCall struct {
16802	s           *Service
16803	teamDriveId string
16804	urlParams_  gensupport.URLParams
16805	ctx_        context.Context
16806	header_     http.Header
16807}
16808
16809// Delete: Deprecated use drives.delete instead.
16810//
16811// - teamDriveId: The ID of the Team Drive.
16812func (r *TeamdrivesService) Delete(teamDriveId string) *TeamdrivesDeleteCall {
16813	c := &TeamdrivesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
16814	c.teamDriveId = teamDriveId
16815	return c
16816}
16817
16818// Fields allows partial responses to be retrieved. See
16819// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
16820// for more information.
16821func (c *TeamdrivesDeleteCall) Fields(s ...googleapi.Field) *TeamdrivesDeleteCall {
16822	c.urlParams_.Set("fields", googleapi.CombineFields(s))
16823	return c
16824}
16825
16826// Context sets the context to be used in this call's Do method. Any
16827// pending HTTP request will be aborted if the provided context is
16828// canceled.
16829func (c *TeamdrivesDeleteCall) Context(ctx context.Context) *TeamdrivesDeleteCall {
16830	c.ctx_ = ctx
16831	return c
16832}
16833
16834// Header returns an http.Header that can be modified by the caller to
16835// add HTTP headers to the request.
16836func (c *TeamdrivesDeleteCall) Header() http.Header {
16837	if c.header_ == nil {
16838		c.header_ = make(http.Header)
16839	}
16840	return c.header_
16841}
16842
16843func (c *TeamdrivesDeleteCall) doRequest(alt string) (*http.Response, error) {
16844	reqHeaders := make(http.Header)
16845	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210830")
16846	for k, v := range c.header_ {
16847		reqHeaders[k] = v
16848	}
16849	reqHeaders.Set("User-Agent", c.s.userAgent())
16850	var body io.Reader = nil
16851	c.urlParams_.Set("alt", alt)
16852	c.urlParams_.Set("prettyPrint", "false")
16853	urls := googleapi.ResolveRelative(c.s.BasePath, "teamdrives/{teamDriveId}")
16854	urls += "?" + c.urlParams_.Encode()
16855	req, err := http.NewRequest("DELETE", urls, body)
16856	if err != nil {
16857		return nil, err
16858	}
16859	req.Header = reqHeaders
16860	googleapi.Expand(req.URL, map[string]string{
16861		"teamDriveId": c.teamDriveId,
16862	})
16863	return gensupport.SendRequest(c.ctx_, c.s.client, req)
16864}
16865
16866// Do executes the "drive.teamdrives.delete" call.
16867func (c *TeamdrivesDeleteCall) Do(opts ...googleapi.CallOption) error {
16868	gensupport.SetOptions(c.urlParams_, opts...)
16869	res, err := c.doRequest("json")
16870	if err != nil {
16871		return err
16872	}
16873	defer googleapi.CloseBody(res)
16874	if err := googleapi.CheckResponse(res); err != nil {
16875		return err
16876	}
16877	return nil
16878	// {
16879	//   "description": "Deprecated use drives.delete instead.",
16880	//   "httpMethod": "DELETE",
16881	//   "id": "drive.teamdrives.delete",
16882	//   "parameterOrder": [
16883	//     "teamDriveId"
16884	//   ],
16885	//   "parameters": {
16886	//     "teamDriveId": {
16887	//       "description": "The ID of the Team Drive",
16888	//       "location": "path",
16889	//       "required": true,
16890	//       "type": "string"
16891	//     }
16892	//   },
16893	//   "path": "teamdrives/{teamDriveId}",
16894	//   "scopes": [
16895	//     "https://www.googleapis.com/auth/drive"
16896	//   ]
16897	// }
16898
16899}
16900
16901// method id "drive.teamdrives.get":
16902
16903type TeamdrivesGetCall struct {
16904	s            *Service
16905	teamDriveId  string
16906	urlParams_   gensupport.URLParams
16907	ifNoneMatch_ string
16908	ctx_         context.Context
16909	header_      http.Header
16910}
16911
16912// Get: Deprecated use drives.get instead.
16913//
16914// - teamDriveId: The ID of the Team Drive.
16915func (r *TeamdrivesService) Get(teamDriveId string) *TeamdrivesGetCall {
16916	c := &TeamdrivesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
16917	c.teamDriveId = teamDriveId
16918	return c
16919}
16920
16921// UseDomainAdminAccess sets the optional parameter
16922// "useDomainAdminAccess": Issue the request as a domain administrator;
16923// if set to true, then the requester will be granted access if they are
16924// an administrator of the domain to which the Team Drive belongs.
16925func (c *TeamdrivesGetCall) UseDomainAdminAccess(useDomainAdminAccess bool) *TeamdrivesGetCall {
16926	c.urlParams_.Set("useDomainAdminAccess", fmt.Sprint(useDomainAdminAccess))
16927	return c
16928}
16929
16930// Fields allows partial responses to be retrieved. See
16931// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
16932// for more information.
16933func (c *TeamdrivesGetCall) Fields(s ...googleapi.Field) *TeamdrivesGetCall {
16934	c.urlParams_.Set("fields", googleapi.CombineFields(s))
16935	return c
16936}
16937
16938// IfNoneMatch sets the optional parameter which makes the operation
16939// fail if the object's ETag matches the given value. This is useful for
16940// getting updates only after the object has changed since the last
16941// request. Use googleapi.IsNotModified to check whether the response
16942// error from Do is the result of In-None-Match.
16943func (c *TeamdrivesGetCall) IfNoneMatch(entityTag string) *TeamdrivesGetCall {
16944	c.ifNoneMatch_ = entityTag
16945	return c
16946}
16947
16948// Context sets the context to be used in this call's Do method. Any
16949// pending HTTP request will be aborted if the provided context is
16950// canceled.
16951func (c *TeamdrivesGetCall) Context(ctx context.Context) *TeamdrivesGetCall {
16952	c.ctx_ = ctx
16953	return c
16954}
16955
16956// Header returns an http.Header that can be modified by the caller to
16957// add HTTP headers to the request.
16958func (c *TeamdrivesGetCall) Header() http.Header {
16959	if c.header_ == nil {
16960		c.header_ = make(http.Header)
16961	}
16962	return c.header_
16963}
16964
16965func (c *TeamdrivesGetCall) doRequest(alt string) (*http.Response, error) {
16966	reqHeaders := make(http.Header)
16967	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210830")
16968	for k, v := range c.header_ {
16969		reqHeaders[k] = v
16970	}
16971	reqHeaders.Set("User-Agent", c.s.userAgent())
16972	if c.ifNoneMatch_ != "" {
16973		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
16974	}
16975	var body io.Reader = nil
16976	c.urlParams_.Set("alt", alt)
16977	c.urlParams_.Set("prettyPrint", "false")
16978	urls := googleapi.ResolveRelative(c.s.BasePath, "teamdrives/{teamDriveId}")
16979	urls += "?" + c.urlParams_.Encode()
16980	req, err := http.NewRequest("GET", urls, body)
16981	if err != nil {
16982		return nil, err
16983	}
16984	req.Header = reqHeaders
16985	googleapi.Expand(req.URL, map[string]string{
16986		"teamDriveId": c.teamDriveId,
16987	})
16988	return gensupport.SendRequest(c.ctx_, c.s.client, req)
16989}
16990
16991// Do executes the "drive.teamdrives.get" call.
16992// Exactly one of *TeamDrive or error will be non-nil. Any non-2xx
16993// status code is an error. Response headers are in either
16994// *TeamDrive.ServerResponse.Header or (if a response was returned at
16995// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
16996// to check whether the returned error was because
16997// http.StatusNotModified was returned.
16998func (c *TeamdrivesGetCall) Do(opts ...googleapi.CallOption) (*TeamDrive, error) {
16999	gensupport.SetOptions(c.urlParams_, opts...)
17000	res, err := c.doRequest("json")
17001	if res != nil && res.StatusCode == http.StatusNotModified {
17002		if res.Body != nil {
17003			res.Body.Close()
17004		}
17005		return nil, &googleapi.Error{
17006			Code:   res.StatusCode,
17007			Header: res.Header,
17008		}
17009	}
17010	if err != nil {
17011		return nil, err
17012	}
17013	defer googleapi.CloseBody(res)
17014	if err := googleapi.CheckResponse(res); err != nil {
17015		return nil, err
17016	}
17017	ret := &TeamDrive{
17018		ServerResponse: googleapi.ServerResponse{
17019			Header:         res.Header,
17020			HTTPStatusCode: res.StatusCode,
17021		},
17022	}
17023	target := &ret
17024	if err := gensupport.DecodeResponse(target, res); err != nil {
17025		return nil, err
17026	}
17027	return ret, nil
17028	// {
17029	//   "description": "Deprecated use drives.get instead.",
17030	//   "httpMethod": "GET",
17031	//   "id": "drive.teamdrives.get",
17032	//   "parameterOrder": [
17033	//     "teamDriveId"
17034	//   ],
17035	//   "parameters": {
17036	//     "teamDriveId": {
17037	//       "description": "The ID of the Team Drive",
17038	//       "location": "path",
17039	//       "required": true,
17040	//       "type": "string"
17041	//     },
17042	//     "useDomainAdminAccess": {
17043	//       "default": "false",
17044	//       "description": "Issue the request as a domain administrator; if set to true, then the requester will be granted access if they are an administrator of the domain to which the Team Drive belongs.",
17045	//       "location": "query",
17046	//       "type": "boolean"
17047	//     }
17048	//   },
17049	//   "path": "teamdrives/{teamDriveId}",
17050	//   "response": {
17051	//     "$ref": "TeamDrive"
17052	//   },
17053	//   "scopes": [
17054	//     "https://www.googleapis.com/auth/drive",
17055	//     "https://www.googleapis.com/auth/drive.readonly"
17056	//   ]
17057	// }
17058
17059}
17060
17061// method id "drive.teamdrives.insert":
17062
17063type TeamdrivesInsertCall struct {
17064	s          *Service
17065	teamdrive  *TeamDrive
17066	urlParams_ gensupport.URLParams
17067	ctx_       context.Context
17068	header_    http.Header
17069}
17070
17071// Insert: Deprecated use drives.insert instead.
17072//
17073// - requestId: An ID, such as a random UUID, which uniquely identifies
17074//   this user's request for idempotent creation of a Team Drive. A
17075//   repeated request by the same user and with the same request ID will
17076//   avoid creating duplicates by attempting to create the same Team
17077//   Drive. If the Team Drive already exists a 409 error will be
17078//   returned.
17079func (r *TeamdrivesService) Insert(requestId string, teamdrive *TeamDrive) *TeamdrivesInsertCall {
17080	c := &TeamdrivesInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)}
17081	c.urlParams_.Set("requestId", requestId)
17082	c.teamdrive = teamdrive
17083	return c
17084}
17085
17086// Fields allows partial responses to be retrieved. See
17087// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
17088// for more information.
17089func (c *TeamdrivesInsertCall) Fields(s ...googleapi.Field) *TeamdrivesInsertCall {
17090	c.urlParams_.Set("fields", googleapi.CombineFields(s))
17091	return c
17092}
17093
17094// Context sets the context to be used in this call's Do method. Any
17095// pending HTTP request will be aborted if the provided context is
17096// canceled.
17097func (c *TeamdrivesInsertCall) Context(ctx context.Context) *TeamdrivesInsertCall {
17098	c.ctx_ = ctx
17099	return c
17100}
17101
17102// Header returns an http.Header that can be modified by the caller to
17103// add HTTP headers to the request.
17104func (c *TeamdrivesInsertCall) Header() http.Header {
17105	if c.header_ == nil {
17106		c.header_ = make(http.Header)
17107	}
17108	return c.header_
17109}
17110
17111func (c *TeamdrivesInsertCall) doRequest(alt string) (*http.Response, error) {
17112	reqHeaders := make(http.Header)
17113	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210830")
17114	for k, v := range c.header_ {
17115		reqHeaders[k] = v
17116	}
17117	reqHeaders.Set("User-Agent", c.s.userAgent())
17118	var body io.Reader = nil
17119	body, err := googleapi.WithoutDataWrapper.JSONReader(c.teamdrive)
17120	if err != nil {
17121		return nil, err
17122	}
17123	reqHeaders.Set("Content-Type", "application/json")
17124	c.urlParams_.Set("alt", alt)
17125	c.urlParams_.Set("prettyPrint", "false")
17126	urls := googleapi.ResolveRelative(c.s.BasePath, "teamdrives")
17127	urls += "?" + c.urlParams_.Encode()
17128	req, err := http.NewRequest("POST", urls, body)
17129	if err != nil {
17130		return nil, err
17131	}
17132	req.Header = reqHeaders
17133	return gensupport.SendRequest(c.ctx_, c.s.client, req)
17134}
17135
17136// Do executes the "drive.teamdrives.insert" call.
17137// Exactly one of *TeamDrive or error will be non-nil. Any non-2xx
17138// status code is an error. Response headers are in either
17139// *TeamDrive.ServerResponse.Header or (if a response was returned at
17140// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
17141// to check whether the returned error was because
17142// http.StatusNotModified was returned.
17143func (c *TeamdrivesInsertCall) Do(opts ...googleapi.CallOption) (*TeamDrive, error) {
17144	gensupport.SetOptions(c.urlParams_, opts...)
17145	res, err := c.doRequest("json")
17146	if res != nil && res.StatusCode == http.StatusNotModified {
17147		if res.Body != nil {
17148			res.Body.Close()
17149		}
17150		return nil, &googleapi.Error{
17151			Code:   res.StatusCode,
17152			Header: res.Header,
17153		}
17154	}
17155	if err != nil {
17156		return nil, err
17157	}
17158	defer googleapi.CloseBody(res)
17159	if err := googleapi.CheckResponse(res); err != nil {
17160		return nil, err
17161	}
17162	ret := &TeamDrive{
17163		ServerResponse: googleapi.ServerResponse{
17164			Header:         res.Header,
17165			HTTPStatusCode: res.StatusCode,
17166		},
17167	}
17168	target := &ret
17169	if err := gensupport.DecodeResponse(target, res); err != nil {
17170		return nil, err
17171	}
17172	return ret, nil
17173	// {
17174	//   "description": "Deprecated use drives.insert instead.",
17175	//   "httpMethod": "POST",
17176	//   "id": "drive.teamdrives.insert",
17177	//   "parameterOrder": [
17178	//     "requestId"
17179	//   ],
17180	//   "parameters": {
17181	//     "requestId": {
17182	//       "description": "An ID, such as a random UUID, which uniquely identifies this user's request for idempotent creation of a Team Drive. A repeated request by the same user and with the same request ID will avoid creating duplicates by attempting to create the same Team Drive. If the Team Drive already exists a 409 error will be returned.",
17183	//       "location": "query",
17184	//       "required": true,
17185	//       "type": "string"
17186	//     }
17187	//   },
17188	//   "path": "teamdrives",
17189	//   "request": {
17190	//     "$ref": "TeamDrive"
17191	//   },
17192	//   "response": {
17193	//     "$ref": "TeamDrive"
17194	//   },
17195	//   "scopes": [
17196	//     "https://www.googleapis.com/auth/drive"
17197	//   ]
17198	// }
17199
17200}
17201
17202// method id "drive.teamdrives.list":
17203
17204type TeamdrivesListCall struct {
17205	s            *Service
17206	urlParams_   gensupport.URLParams
17207	ifNoneMatch_ string
17208	ctx_         context.Context
17209	header_      http.Header
17210}
17211
17212// List: Deprecated use drives.list instead.
17213func (r *TeamdrivesService) List() *TeamdrivesListCall {
17214	c := &TeamdrivesListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
17215	return c
17216}
17217
17218// MaxResults sets the optional parameter "maxResults": Maximum number
17219// of Team Drives to return.
17220func (c *TeamdrivesListCall) MaxResults(maxResults int64) *TeamdrivesListCall {
17221	c.urlParams_.Set("maxResults", fmt.Sprint(maxResults))
17222	return c
17223}
17224
17225// PageToken sets the optional parameter "pageToken": Page token for
17226// Team Drives.
17227func (c *TeamdrivesListCall) PageToken(pageToken string) *TeamdrivesListCall {
17228	c.urlParams_.Set("pageToken", pageToken)
17229	return c
17230}
17231
17232// Q sets the optional parameter "q": Query string for searching Team
17233// Drives.
17234func (c *TeamdrivesListCall) Q(q string) *TeamdrivesListCall {
17235	c.urlParams_.Set("q", q)
17236	return c
17237}
17238
17239// UseDomainAdminAccess sets the optional parameter
17240// "useDomainAdminAccess": Issue the request as a domain administrator;
17241// if set to true, then all Team Drives of the domain in which the
17242// requester is an administrator are returned.
17243func (c *TeamdrivesListCall) UseDomainAdminAccess(useDomainAdminAccess bool) *TeamdrivesListCall {
17244	c.urlParams_.Set("useDomainAdminAccess", fmt.Sprint(useDomainAdminAccess))
17245	return c
17246}
17247
17248// Fields allows partial responses to be retrieved. See
17249// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
17250// for more information.
17251func (c *TeamdrivesListCall) Fields(s ...googleapi.Field) *TeamdrivesListCall {
17252	c.urlParams_.Set("fields", googleapi.CombineFields(s))
17253	return c
17254}
17255
17256// IfNoneMatch sets the optional parameter which makes the operation
17257// fail if the object's ETag matches the given value. This is useful for
17258// getting updates only after the object has changed since the last
17259// request. Use googleapi.IsNotModified to check whether the response
17260// error from Do is the result of In-None-Match.
17261func (c *TeamdrivesListCall) IfNoneMatch(entityTag string) *TeamdrivesListCall {
17262	c.ifNoneMatch_ = entityTag
17263	return c
17264}
17265
17266// Context sets the context to be used in this call's Do method. Any
17267// pending HTTP request will be aborted if the provided context is
17268// canceled.
17269func (c *TeamdrivesListCall) Context(ctx context.Context) *TeamdrivesListCall {
17270	c.ctx_ = ctx
17271	return c
17272}
17273
17274// Header returns an http.Header that can be modified by the caller to
17275// add HTTP headers to the request.
17276func (c *TeamdrivesListCall) Header() http.Header {
17277	if c.header_ == nil {
17278		c.header_ = make(http.Header)
17279	}
17280	return c.header_
17281}
17282
17283func (c *TeamdrivesListCall) doRequest(alt string) (*http.Response, error) {
17284	reqHeaders := make(http.Header)
17285	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210830")
17286	for k, v := range c.header_ {
17287		reqHeaders[k] = v
17288	}
17289	reqHeaders.Set("User-Agent", c.s.userAgent())
17290	if c.ifNoneMatch_ != "" {
17291		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
17292	}
17293	var body io.Reader = nil
17294	c.urlParams_.Set("alt", alt)
17295	c.urlParams_.Set("prettyPrint", "false")
17296	urls := googleapi.ResolveRelative(c.s.BasePath, "teamdrives")
17297	urls += "?" + c.urlParams_.Encode()
17298	req, err := http.NewRequest("GET", urls, body)
17299	if err != nil {
17300		return nil, err
17301	}
17302	req.Header = reqHeaders
17303	return gensupport.SendRequest(c.ctx_, c.s.client, req)
17304}
17305
17306// Do executes the "drive.teamdrives.list" call.
17307// Exactly one of *TeamDriveList or error will be non-nil. Any non-2xx
17308// status code is an error. Response headers are in either
17309// *TeamDriveList.ServerResponse.Header or (if a response was returned
17310// at all) in error.(*googleapi.Error).Header. Use
17311// googleapi.IsNotModified to check whether the returned error was
17312// because http.StatusNotModified was returned.
17313func (c *TeamdrivesListCall) Do(opts ...googleapi.CallOption) (*TeamDriveList, error) {
17314	gensupport.SetOptions(c.urlParams_, opts...)
17315	res, err := c.doRequest("json")
17316	if res != nil && res.StatusCode == http.StatusNotModified {
17317		if res.Body != nil {
17318			res.Body.Close()
17319		}
17320		return nil, &googleapi.Error{
17321			Code:   res.StatusCode,
17322			Header: res.Header,
17323		}
17324	}
17325	if err != nil {
17326		return nil, err
17327	}
17328	defer googleapi.CloseBody(res)
17329	if err := googleapi.CheckResponse(res); err != nil {
17330		return nil, err
17331	}
17332	ret := &TeamDriveList{
17333		ServerResponse: googleapi.ServerResponse{
17334			Header:         res.Header,
17335			HTTPStatusCode: res.StatusCode,
17336		},
17337	}
17338	target := &ret
17339	if err := gensupport.DecodeResponse(target, res); err != nil {
17340		return nil, err
17341	}
17342	return ret, nil
17343	// {
17344	//   "description": "Deprecated use drives.list instead.",
17345	//   "httpMethod": "GET",
17346	//   "id": "drive.teamdrives.list",
17347	//   "parameters": {
17348	//     "maxResults": {
17349	//       "default": "10",
17350	//       "description": "Maximum number of Team Drives to return.",
17351	//       "format": "int32",
17352	//       "location": "query",
17353	//       "maximum": "100",
17354	//       "minimum": "1",
17355	//       "type": "integer"
17356	//     },
17357	//     "pageToken": {
17358	//       "description": "Page token for Team Drives.",
17359	//       "location": "query",
17360	//       "type": "string"
17361	//     },
17362	//     "q": {
17363	//       "description": "Query string for searching Team Drives.",
17364	//       "location": "query",
17365	//       "type": "string"
17366	//     },
17367	//     "useDomainAdminAccess": {
17368	//       "default": "false",
17369	//       "description": "Issue the request as a domain administrator; if set to true, then all Team Drives of the domain in which the requester is an administrator are returned.",
17370	//       "location": "query",
17371	//       "type": "boolean"
17372	//     }
17373	//   },
17374	//   "path": "teamdrives",
17375	//   "response": {
17376	//     "$ref": "TeamDriveList"
17377	//   },
17378	//   "scopes": [
17379	//     "https://www.googleapis.com/auth/drive",
17380	//     "https://www.googleapis.com/auth/drive.readonly"
17381	//   ]
17382	// }
17383
17384}
17385
17386// Pages invokes f for each page of results.
17387// A non-nil error returned from f will halt the iteration.
17388// The provided context supersedes any context provided to the Context method.
17389func (c *TeamdrivesListCall) Pages(ctx context.Context, f func(*TeamDriveList) error) error {
17390	c.ctx_ = ctx
17391	defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
17392	for {
17393		x, err := c.Do()
17394		if err != nil {
17395			return err
17396		}
17397		if err := f(x); err != nil {
17398			return err
17399		}
17400		if x.NextPageToken == "" {
17401			return nil
17402		}
17403		c.PageToken(x.NextPageToken)
17404	}
17405}
17406
17407// method id "drive.teamdrives.update":
17408
17409type TeamdrivesUpdateCall struct {
17410	s           *Service
17411	teamDriveId string
17412	teamdrive   *TeamDrive
17413	urlParams_  gensupport.URLParams
17414	ctx_        context.Context
17415	header_     http.Header
17416}
17417
17418// Update: Deprecated use drives.update instead.
17419//
17420// - teamDriveId: The ID of the Team Drive.
17421func (r *TeamdrivesService) Update(teamDriveId string, teamdrive *TeamDrive) *TeamdrivesUpdateCall {
17422	c := &TeamdrivesUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
17423	c.teamDriveId = teamDriveId
17424	c.teamdrive = teamdrive
17425	return c
17426}
17427
17428// UseDomainAdminAccess sets the optional parameter
17429// "useDomainAdminAccess": Issue the request as a domain administrator;
17430// if set to true, then the requester will be granted access if they are
17431// an administrator of the domain to which the Team Drive belongs.
17432func (c *TeamdrivesUpdateCall) UseDomainAdminAccess(useDomainAdminAccess bool) *TeamdrivesUpdateCall {
17433	c.urlParams_.Set("useDomainAdminAccess", fmt.Sprint(useDomainAdminAccess))
17434	return c
17435}
17436
17437// Fields allows partial responses to be retrieved. See
17438// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
17439// for more information.
17440func (c *TeamdrivesUpdateCall) Fields(s ...googleapi.Field) *TeamdrivesUpdateCall {
17441	c.urlParams_.Set("fields", googleapi.CombineFields(s))
17442	return c
17443}
17444
17445// Context sets the context to be used in this call's Do method. Any
17446// pending HTTP request will be aborted if the provided context is
17447// canceled.
17448func (c *TeamdrivesUpdateCall) Context(ctx context.Context) *TeamdrivesUpdateCall {
17449	c.ctx_ = ctx
17450	return c
17451}
17452
17453// Header returns an http.Header that can be modified by the caller to
17454// add HTTP headers to the request.
17455func (c *TeamdrivesUpdateCall) Header() http.Header {
17456	if c.header_ == nil {
17457		c.header_ = make(http.Header)
17458	}
17459	return c.header_
17460}
17461
17462func (c *TeamdrivesUpdateCall) doRequest(alt string) (*http.Response, error) {
17463	reqHeaders := make(http.Header)
17464	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210830")
17465	for k, v := range c.header_ {
17466		reqHeaders[k] = v
17467	}
17468	reqHeaders.Set("User-Agent", c.s.userAgent())
17469	var body io.Reader = nil
17470	body, err := googleapi.WithoutDataWrapper.JSONReader(c.teamdrive)
17471	if err != nil {
17472		return nil, err
17473	}
17474	reqHeaders.Set("Content-Type", "application/json")
17475	c.urlParams_.Set("alt", alt)
17476	c.urlParams_.Set("prettyPrint", "false")
17477	urls := googleapi.ResolveRelative(c.s.BasePath, "teamdrives/{teamDriveId}")
17478	urls += "?" + c.urlParams_.Encode()
17479	req, err := http.NewRequest("PUT", urls, body)
17480	if err != nil {
17481		return nil, err
17482	}
17483	req.Header = reqHeaders
17484	googleapi.Expand(req.URL, map[string]string{
17485		"teamDriveId": c.teamDriveId,
17486	})
17487	return gensupport.SendRequest(c.ctx_, c.s.client, req)
17488}
17489
17490// Do executes the "drive.teamdrives.update" call.
17491// Exactly one of *TeamDrive or error will be non-nil. Any non-2xx
17492// status code is an error. Response headers are in either
17493// *TeamDrive.ServerResponse.Header or (if a response was returned at
17494// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
17495// to check whether the returned error was because
17496// http.StatusNotModified was returned.
17497func (c *TeamdrivesUpdateCall) Do(opts ...googleapi.CallOption) (*TeamDrive, error) {
17498	gensupport.SetOptions(c.urlParams_, opts...)
17499	res, err := c.doRequest("json")
17500	if res != nil && res.StatusCode == http.StatusNotModified {
17501		if res.Body != nil {
17502			res.Body.Close()
17503		}
17504		return nil, &googleapi.Error{
17505			Code:   res.StatusCode,
17506			Header: res.Header,
17507		}
17508	}
17509	if err != nil {
17510		return nil, err
17511	}
17512	defer googleapi.CloseBody(res)
17513	if err := googleapi.CheckResponse(res); err != nil {
17514		return nil, err
17515	}
17516	ret := &TeamDrive{
17517		ServerResponse: googleapi.ServerResponse{
17518			Header:         res.Header,
17519			HTTPStatusCode: res.StatusCode,
17520		},
17521	}
17522	target := &ret
17523	if err := gensupport.DecodeResponse(target, res); err != nil {
17524		return nil, err
17525	}
17526	return ret, nil
17527	// {
17528	//   "description": "Deprecated use drives.update instead.",
17529	//   "httpMethod": "PUT",
17530	//   "id": "drive.teamdrives.update",
17531	//   "parameterOrder": [
17532	//     "teamDriveId"
17533	//   ],
17534	//   "parameters": {
17535	//     "teamDriveId": {
17536	//       "description": "The ID of the Team Drive",
17537	//       "location": "path",
17538	//       "required": true,
17539	//       "type": "string"
17540	//     },
17541	//     "useDomainAdminAccess": {
17542	//       "default": "false",
17543	//       "description": "Issue the request as a domain administrator; if set to true, then the requester will be granted access if they are an administrator of the domain to which the Team Drive belongs.",
17544	//       "location": "query",
17545	//       "type": "boolean"
17546	//     }
17547	//   },
17548	//   "path": "teamdrives/{teamDriveId}",
17549	//   "request": {
17550	//     "$ref": "TeamDrive"
17551	//   },
17552	//   "response": {
17553	//     "$ref": "TeamDrive"
17554	//   },
17555	//   "scopes": [
17556	//     "https://www.googleapis.com/auth/drive"
17557	//   ]
17558	// }
17559
17560}
17561