...

Source file src/google.golang.org/api/drive/v2/drive-gen.go

Documentation: google.golang.org/api/drive/v2

     1  // Copyright 2024 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 Google Drive API.
     8  //
     9  // For product documentation, see: https://developers.google.com/drive/
    10  //
    11  // # Library status
    12  //
    13  // These client libraries are officially supported by Google. However, this
    14  // library is considered complete and is in maintenance mode. This means
    15  // that we will address critical bugs and security issues but will not add
    16  // any new features.
    17  //
    18  // When possible, we recommend using our newer
    19  // [Cloud Client Libraries for Go](https://pkg.go.dev/cloud.google.com/go)
    20  // that are still actively being worked and iterated on.
    21  //
    22  // # Creating a client
    23  //
    24  // Usage example:
    25  //
    26  //	import "google.golang.org/api/drive/v2"
    27  //	...
    28  //	ctx := context.Background()
    29  //	driveService, err := drive.NewService(ctx)
    30  //
    31  // In this example, Google Application Default Credentials are used for
    32  // authentication. For information on how to create and obtain Application
    33  // Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials.
    34  //
    35  // # Other authentication options
    36  //
    37  // By default, all available scopes (see "Constants") are used to authenticate.
    38  // To restrict scopes, use [google.golang.org/api/option.WithScopes]:
    39  //
    40  //	driveService, err := drive.NewService(ctx, option.WithScopes(drive.DriveScriptsScope))
    41  //
    42  // To use an API key for authentication (note: some APIs do not support API
    43  // keys), use [google.golang.org/api/option.WithAPIKey]:
    44  //
    45  //	driveService, err := drive.NewService(ctx, option.WithAPIKey("AIza..."))
    46  //
    47  // To use an OAuth token (e.g., a user token obtained via a three-legged OAuth
    48  // flow, use [google.golang.org/api/option.WithTokenSource]:
    49  //
    50  //	config := &oauth2.Config{...}
    51  //	// ...
    52  //	token, err := config.Exchange(ctx, ...)
    53  //	driveService, err := drive.NewService(ctx, option.WithTokenSource(config.TokenSource(ctx, token)))
    54  //
    55  // See [google.golang.org/api/option.ClientOption] for details on options.
    56  package drive // import "google.golang.org/api/drive/v2"
    57  
    58  import (
    59  	"bytes"
    60  	"context"
    61  	"encoding/json"
    62  	"errors"
    63  	"fmt"
    64  	"io"
    65  	"net/http"
    66  	"net/url"
    67  	"strconv"
    68  	"strings"
    69  
    70  	googleapi "google.golang.org/api/googleapi"
    71  	internal "google.golang.org/api/internal"
    72  	gensupport "google.golang.org/api/internal/gensupport"
    73  	option "google.golang.org/api/option"
    74  	internaloption "google.golang.org/api/option/internaloption"
    75  	htransport "google.golang.org/api/transport/http"
    76  )
    77  
    78  // Always reference these packages, just in case the auto-generated code
    79  // below doesn't.
    80  var _ = bytes.NewBuffer
    81  var _ = strconv.Itoa
    82  var _ = fmt.Sprintf
    83  var _ = json.NewDecoder
    84  var _ = io.Copy
    85  var _ = url.Parse
    86  var _ = gensupport.MarshalJSON
    87  var _ = googleapi.Version
    88  var _ = errors.New
    89  var _ = strings.Replace
    90  var _ = context.Canceled
    91  var _ = internaloption.WithDefaultEndpoint
    92  var _ = internal.Version
    93  
    94  const apiId = "drive:v2"
    95  const apiName = "drive"
    96  const apiVersion = "v2"
    97  const basePath = "https://www.googleapis.com/drive/v2/"
    98  const basePathTemplate = "https://www.UNIVERSE_DOMAIN/drive/v2/"
    99  const mtlsBasePath = "https://www.mtls.googleapis.com/drive/v2/"
   100  
   101  // OAuth2 scopes used by this API.
   102  const (
   103  	// See, edit, create, and delete all of your Google Drive files
   104  	DriveScope = "https://www.googleapis.com/auth/drive"
   105  
   106  	// See, create, and delete its own configuration data in your Google Drive
   107  	DriveAppdataScope = "https://www.googleapis.com/auth/drive.appdata"
   108  
   109  	// View your Google Drive apps
   110  	DriveAppsReadonlyScope = "https://www.googleapis.com/auth/drive.apps.readonly"
   111  
   112  	// See, edit, create, and delete only the specific Google Drive files you use
   113  	// with this app
   114  	DriveFileScope = "https://www.googleapis.com/auth/drive.file"
   115  
   116  	// View and manage metadata of files in your Google Drive
   117  	DriveMetadataScope = "https://www.googleapis.com/auth/drive.metadata"
   118  
   119  	// See information about your Google Drive files
   120  	DriveMetadataReadonlyScope = "https://www.googleapis.com/auth/drive.metadata.readonly"
   121  
   122  	// View the photos, videos and albums in your Google Photos
   123  	DrivePhotosReadonlyScope = "https://www.googleapis.com/auth/drive.photos.readonly"
   124  
   125  	// See and download all your Google Drive files
   126  	DriveReadonlyScope = "https://www.googleapis.com/auth/drive.readonly"
   127  
   128  	// Modify your Google Apps Script scripts' behavior
   129  	DriveScriptsScope = "https://www.googleapis.com/auth/drive.scripts"
   130  )
   131  
   132  // NewService creates a new Service.
   133  func NewService(ctx context.Context, opts ...option.ClientOption) (*Service, error) {
   134  	scopesOption := internaloption.WithDefaultScopes(
   135  		"https://www.googleapis.com/auth/drive",
   136  		"https://www.googleapis.com/auth/drive.appdata",
   137  		"https://www.googleapis.com/auth/drive.apps.readonly",
   138  		"https://www.googleapis.com/auth/drive.file",
   139  		"https://www.googleapis.com/auth/drive.metadata",
   140  		"https://www.googleapis.com/auth/drive.metadata.readonly",
   141  		"https://www.googleapis.com/auth/drive.photos.readonly",
   142  		"https://www.googleapis.com/auth/drive.readonly",
   143  		"https://www.googleapis.com/auth/drive.scripts",
   144  	)
   145  	// NOTE: prepend, so we don't override user-specified scopes.
   146  	opts = append([]option.ClientOption{scopesOption}, opts...)
   147  	opts = append(opts, internaloption.WithDefaultEndpoint(basePath))
   148  	opts = append(opts, internaloption.WithDefaultEndpointTemplate(basePathTemplate))
   149  	opts = append(opts, internaloption.WithDefaultMTLSEndpoint(mtlsBasePath))
   150  	opts = append(opts, internaloption.EnableNewAuthLibrary())
   151  	client, endpoint, err := htransport.NewClient(ctx, opts...)
   152  	if err != nil {
   153  		return nil, err
   154  	}
   155  	s, err := New(client)
   156  	if err != nil {
   157  		return nil, err
   158  	}
   159  	if endpoint != "" {
   160  		s.BasePath = endpoint
   161  	}
   162  	return s, nil
   163  }
   164  
   165  // New creates a new Service. It uses the provided http.Client for requests.
   166  //
   167  // Deprecated: please use NewService instead.
   168  // To provide a custom HTTP client, use option.WithHTTPClient.
   169  // If you are using google.golang.org/api/googleapis/transport.APIKey, use option.WithAPIKey with NewService instead.
   170  func New(client *http.Client) (*Service, error) {
   171  	if client == nil {
   172  		return nil, errors.New("client is nil")
   173  	}
   174  	s := &Service{client: client, BasePath: basePath}
   175  	s.About = NewAboutService(s)
   176  	s.Apps = NewAppsService(s)
   177  	s.Changes = NewChangesService(s)
   178  	s.Channels = NewChannelsService(s)
   179  	s.Children = NewChildrenService(s)
   180  	s.Comments = NewCommentsService(s)
   181  	s.Drives = NewDrivesService(s)
   182  	s.Files = NewFilesService(s)
   183  	s.Parents = NewParentsService(s)
   184  	s.Permissions = NewPermissionsService(s)
   185  	s.Properties = NewPropertiesService(s)
   186  	s.Replies = NewRepliesService(s)
   187  	s.Revisions = NewRevisionsService(s)
   188  	s.Teamdrives = NewTeamdrivesService(s)
   189  	return s, nil
   190  }
   191  
   192  type Service struct {
   193  	client    *http.Client
   194  	BasePath  string // API endpoint base URL
   195  	UserAgent string // optional additional User-Agent fragment
   196  
   197  	About *AboutService
   198  
   199  	Apps *AppsService
   200  
   201  	Changes *ChangesService
   202  
   203  	Channels *ChannelsService
   204  
   205  	Children *ChildrenService
   206  
   207  	Comments *CommentsService
   208  
   209  	Drives *DrivesService
   210  
   211  	Files *FilesService
   212  
   213  	Parents *ParentsService
   214  
   215  	Permissions *PermissionsService
   216  
   217  	Properties *PropertiesService
   218  
   219  	Replies *RepliesService
   220  
   221  	Revisions *RevisionsService
   222  
   223  	Teamdrives *TeamdrivesService
   224  }
   225  
   226  func (s *Service) userAgent() string {
   227  	if s.UserAgent == "" {
   228  		return googleapi.UserAgent
   229  	}
   230  	return googleapi.UserAgent + " " + s.UserAgent
   231  }
   232  
   233  func NewAboutService(s *Service) *AboutService {
   234  	rs := &AboutService{s: s}
   235  	return rs
   236  }
   237  
   238  type AboutService struct {
   239  	s *Service
   240  }
   241  
   242  func NewAppsService(s *Service) *AppsService {
   243  	rs := &AppsService{s: s}
   244  	return rs
   245  }
   246  
   247  type AppsService struct {
   248  	s *Service
   249  }
   250  
   251  func NewChangesService(s *Service) *ChangesService {
   252  	rs := &ChangesService{s: s}
   253  	return rs
   254  }
   255  
   256  type ChangesService struct {
   257  	s *Service
   258  }
   259  
   260  func NewChannelsService(s *Service) *ChannelsService {
   261  	rs := &ChannelsService{s: s}
   262  	return rs
   263  }
   264  
   265  type ChannelsService struct {
   266  	s *Service
   267  }
   268  
   269  func NewChildrenService(s *Service) *ChildrenService {
   270  	rs := &ChildrenService{s: s}
   271  	return rs
   272  }
   273  
   274  type ChildrenService struct {
   275  	s *Service
   276  }
   277  
   278  func NewCommentsService(s *Service) *CommentsService {
   279  	rs := &CommentsService{s: s}
   280  	return rs
   281  }
   282  
   283  type CommentsService struct {
   284  	s *Service
   285  }
   286  
   287  func NewDrivesService(s *Service) *DrivesService {
   288  	rs := &DrivesService{s: s}
   289  	return rs
   290  }
   291  
   292  type DrivesService struct {
   293  	s *Service
   294  }
   295  
   296  func NewFilesService(s *Service) *FilesService {
   297  	rs := &FilesService{s: s}
   298  	return rs
   299  }
   300  
   301  type FilesService struct {
   302  	s *Service
   303  }
   304  
   305  func NewParentsService(s *Service) *ParentsService {
   306  	rs := &ParentsService{s: s}
   307  	return rs
   308  }
   309  
   310  type ParentsService struct {
   311  	s *Service
   312  }
   313  
   314  func NewPermissionsService(s *Service) *PermissionsService {
   315  	rs := &PermissionsService{s: s}
   316  	return rs
   317  }
   318  
   319  type PermissionsService struct {
   320  	s *Service
   321  }
   322  
   323  func NewPropertiesService(s *Service) *PropertiesService {
   324  	rs := &PropertiesService{s: s}
   325  	return rs
   326  }
   327  
   328  type PropertiesService struct {
   329  	s *Service
   330  }
   331  
   332  func NewRepliesService(s *Service) *RepliesService {
   333  	rs := &RepliesService{s: s}
   334  	return rs
   335  }
   336  
   337  type RepliesService struct {
   338  	s *Service
   339  }
   340  
   341  func NewRevisionsService(s *Service) *RevisionsService {
   342  	rs := &RevisionsService{s: s}
   343  	return rs
   344  }
   345  
   346  type RevisionsService struct {
   347  	s *Service
   348  }
   349  
   350  func NewTeamdrivesService(s *Service) *TeamdrivesService {
   351  	rs := &TeamdrivesService{s: s}
   352  	return rs
   353  }
   354  
   355  type TeamdrivesService struct {
   356  	s *Service
   357  }
   358  
   359  // About: An item with user information and settings.
   360  type About struct {
   361  	// AdditionalRoleInfo: Information about supported additional roles per file
   362  	// type. The most specific type takes precedence.
   363  	AdditionalRoleInfo []*AboutAdditionalRoleInfo `json:"additionalRoleInfo,omitempty"`
   364  	// CanCreateDrives: Whether the user can create shared drives.
   365  	CanCreateDrives bool `json:"canCreateDrives,omitempty"`
   366  	// CanCreateTeamDrives: Deprecated: Use `canCreateDrives` instead.
   367  	CanCreateTeamDrives bool `json:"canCreateTeamDrives,omitempty"`
   368  	// DomainSharingPolicy: The domain sharing policy for the current user.
   369  	// Possible values are: * `allowed` * `allowedWithWarning` * `incomingOnly` *
   370  	// `disallowed`
   371  	DomainSharingPolicy string `json:"domainSharingPolicy,omitempty"`
   372  	// DriveThemes: A list of themes that are supported for shared drives.
   373  	DriveThemes []*AboutDriveThemes `json:"driveThemes,omitempty"`
   374  	// Etag: The ETag of the item.
   375  	Etag string `json:"etag,omitempty"`
   376  	// ExportFormats: The allowable export formats.
   377  	ExportFormats []*AboutExportFormats `json:"exportFormats,omitempty"`
   378  	// Features: List of additional features enabled on this account.
   379  	Features []*AboutFeatures `json:"features,omitempty"`
   380  	// FolderColorPalette: The palette of allowable folder colors as RGB hex
   381  	// strings.
   382  	FolderColorPalette []string `json:"folderColorPalette,omitempty"`
   383  	// ImportFormats: The allowable import formats.
   384  	ImportFormats []*AboutImportFormats `json:"importFormats,omitempty"`
   385  	// IsCurrentAppInstalled: A boolean indicating whether the authenticated app is
   386  	// installed by the authenticated user.
   387  	IsCurrentAppInstalled bool `json:"isCurrentAppInstalled,omitempty"`
   388  	// Kind: This is always `drive#about`.
   389  	Kind string `json:"kind,omitempty"`
   390  	// LanguageCode: The user's language or locale code, as defined by BCP 47, with
   391  	// some extensions from Unicode's LDML format
   392  	// (http://www.unicode.org/reports/tr35/).
   393  	LanguageCode string `json:"languageCode,omitempty"`
   394  	// LargestChangeId: The largest change id.
   395  	LargestChangeId int64 `json:"largestChangeId,omitempty,string"`
   396  	// MaxUploadSizes: List of max upload sizes for each file type. The most
   397  	// specific type takes precedence.
   398  	MaxUploadSizes []*AboutMaxUploadSizes `json:"maxUploadSizes,omitempty"`
   399  	// Name: The name of the current user.
   400  	Name string `json:"name,omitempty"`
   401  	// PermissionId: The current user's ID as visible in the permissions
   402  	// collection.
   403  	PermissionId string `json:"permissionId,omitempty"`
   404  	// QuotaBytesByService: The amount of storage quota used by different Google
   405  	// services.
   406  	QuotaBytesByService []*AboutQuotaBytesByService `json:"quotaBytesByService,omitempty"`
   407  	// QuotaBytesTotal: The total number of quota bytes. This is only relevant when
   408  	// quotaType is LIMITED.
   409  	QuotaBytesTotal int64 `json:"quotaBytesTotal,omitempty,string"`
   410  	// QuotaBytesUsed: The number of quota bytes used by Google Drive.
   411  	QuotaBytesUsed int64 `json:"quotaBytesUsed,omitempty,string"`
   412  	// QuotaBytesUsedAggregate: The number of quota bytes used by all Google apps
   413  	// (Drive, Picasa, etc.).
   414  	QuotaBytesUsedAggregate int64 `json:"quotaBytesUsedAggregate,omitempty,string"`
   415  	// QuotaBytesUsedInTrash: The number of quota bytes used by trashed items.
   416  	QuotaBytesUsedInTrash int64 `json:"quotaBytesUsedInTrash,omitempty,string"`
   417  	// QuotaType: The type of the user's storage quota. Possible values are: *
   418  	// `LIMITED` * `UNLIMITED`
   419  	QuotaType string `json:"quotaType,omitempty"`
   420  	// RemainingChangeIds: The number of remaining change ids, limited to no more
   421  	// than 2500.
   422  	RemainingChangeIds int64 `json:"remainingChangeIds,omitempty,string"`
   423  	// RootFolderId: The id of the root folder.
   424  	RootFolderId string `json:"rootFolderId,omitempty"`
   425  	// SelfLink: A link back to this item.
   426  	SelfLink string `json:"selfLink,omitempty"`
   427  	// TeamDriveThemes: Deprecated: Use `driveThemes` instead.
   428  	TeamDriveThemes []*AboutTeamDriveThemes `json:"teamDriveThemes,omitempty"`
   429  	// User: The authenticated user.
   430  	User *User `json:"user,omitempty"`
   431  
   432  	// ServerResponse contains the HTTP response code and headers from the server.
   433  	googleapi.ServerResponse `json:"-"`
   434  	// ForceSendFields is a list of field names (e.g. "AdditionalRoleInfo") to
   435  	// unconditionally include in API requests. By default, fields with empty or
   436  	// default values are omitted from API requests. See
   437  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   438  	// details.
   439  	ForceSendFields []string `json:"-"`
   440  	// NullFields is a list of field names (e.g. "AdditionalRoleInfo") to include
   441  	// in API requests with the JSON null value. By default, fields with empty
   442  	// values are omitted from API requests. See
   443  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   444  	NullFields []string `json:"-"`
   445  }
   446  
   447  func (s *About) MarshalJSON() ([]byte, error) {
   448  	type NoMethod About
   449  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   450  }
   451  
   452  type AboutAdditionalRoleInfo struct {
   453  	// RoleSets: The supported additional roles per primary role.
   454  	RoleSets []*AboutAdditionalRoleInfoRoleSets `json:"roleSets,omitempty"`
   455  	// Type: The content type that this additional role info applies to.
   456  	Type string `json:"type,omitempty"`
   457  	// ForceSendFields is a list of field names (e.g. "RoleSets") to
   458  	// unconditionally include in API requests. By default, fields with empty or
   459  	// default values are omitted from API requests. See
   460  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   461  	// details.
   462  	ForceSendFields []string `json:"-"`
   463  	// NullFields is a list of field names (e.g. "RoleSets") to include in API
   464  	// requests with the JSON null value. By default, fields with empty values are
   465  	// omitted from API requests. See
   466  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   467  	NullFields []string `json:"-"`
   468  }
   469  
   470  func (s *AboutAdditionalRoleInfo) MarshalJSON() ([]byte, error) {
   471  	type NoMethod AboutAdditionalRoleInfo
   472  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   473  }
   474  
   475  type AboutAdditionalRoleInfoRoleSets struct {
   476  	// AdditionalRoles: The supported additional roles with the primary role.
   477  	AdditionalRoles []string `json:"additionalRoles,omitempty"`
   478  	// PrimaryRole: A primary permission role.
   479  	PrimaryRole string `json:"primaryRole,omitempty"`
   480  	// ForceSendFields is a list of field names (e.g. "AdditionalRoles") to
   481  	// unconditionally include in API requests. By default, fields with empty or
   482  	// default values are omitted from API requests. See
   483  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   484  	// details.
   485  	ForceSendFields []string `json:"-"`
   486  	// NullFields is a list of field names (e.g. "AdditionalRoles") to include in
   487  	// API requests with the JSON null value. By default, fields with empty values
   488  	// are omitted from API requests. See
   489  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   490  	NullFields []string `json:"-"`
   491  }
   492  
   493  func (s *AboutAdditionalRoleInfoRoleSets) MarshalJSON() ([]byte, error) {
   494  	type NoMethod AboutAdditionalRoleInfoRoleSets
   495  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   496  }
   497  
   498  type AboutDriveThemes struct {
   499  	// BackgroundImageLink: A link to this theme's background image.
   500  	BackgroundImageLink string `json:"backgroundImageLink,omitempty"`
   501  	// ColorRgb: The color of this theme as an RGB hex string.
   502  	ColorRgb string `json:"colorRgb,omitempty"`
   503  	// Id: The ID of the theme.
   504  	Id string `json:"id,omitempty"`
   505  	// ForceSendFields is a list of field names (e.g. "BackgroundImageLink") to
   506  	// unconditionally include in API requests. By default, fields with empty or
   507  	// default values are omitted from API requests. See
   508  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   509  	// details.
   510  	ForceSendFields []string `json:"-"`
   511  	// NullFields is a list of field names (e.g. "BackgroundImageLink") to include
   512  	// in API requests with the JSON null value. By default, fields with empty
   513  	// values are omitted from API requests. See
   514  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   515  	NullFields []string `json:"-"`
   516  }
   517  
   518  func (s *AboutDriveThemes) MarshalJSON() ([]byte, error) {
   519  	type NoMethod AboutDriveThemes
   520  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   521  }
   522  
   523  type AboutExportFormats struct {
   524  	// Source: The content type to convert from.
   525  	Source string `json:"source,omitempty"`
   526  	// Targets: The possible content types to convert to.
   527  	Targets []string `json:"targets,omitempty"`
   528  	// ForceSendFields is a list of field names (e.g. "Source") to unconditionally
   529  	// include in API requests. By default, fields with empty or default values are
   530  	// omitted from API requests. See
   531  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   532  	// details.
   533  	ForceSendFields []string `json:"-"`
   534  	// NullFields is a list of field names (e.g. "Source") to include in API
   535  	// requests with the JSON null value. By default, fields with empty values are
   536  	// omitted from API requests. See
   537  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   538  	NullFields []string `json:"-"`
   539  }
   540  
   541  func (s *AboutExportFormats) MarshalJSON() ([]byte, error) {
   542  	type NoMethod AboutExportFormats
   543  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   544  }
   545  
   546  type AboutFeatures struct {
   547  	// FeatureName: The name of the feature.
   548  	FeatureName string `json:"featureName,omitempty"`
   549  	// FeatureRate: The request limit rate for this feature, in queries per second.
   550  	FeatureRate float64 `json:"featureRate,omitempty"`
   551  	// ForceSendFields is a list of field names (e.g. "FeatureName") to
   552  	// unconditionally include in API requests. By default, fields with empty or
   553  	// default values are omitted from API requests. See
   554  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   555  	// details.
   556  	ForceSendFields []string `json:"-"`
   557  	// NullFields is a list of field names (e.g. "FeatureName") to include in API
   558  	// requests with the JSON null value. By default, fields with empty values are
   559  	// omitted from API requests. See
   560  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   561  	NullFields []string `json:"-"`
   562  }
   563  
   564  func (s *AboutFeatures) MarshalJSON() ([]byte, error) {
   565  	type NoMethod AboutFeatures
   566  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   567  }
   568  
   569  func (s *AboutFeatures) UnmarshalJSON(data []byte) error {
   570  	type NoMethod AboutFeatures
   571  	var s1 struct {
   572  		FeatureRate gensupport.JSONFloat64 `json:"featureRate"`
   573  		*NoMethod
   574  	}
   575  	s1.NoMethod = (*NoMethod)(s)
   576  	if err := json.Unmarshal(data, &s1); err != nil {
   577  		return err
   578  	}
   579  	s.FeatureRate = float64(s1.FeatureRate)
   580  	return nil
   581  }
   582  
   583  type AboutImportFormats struct {
   584  	// Source: The imported file's content type to convert from.
   585  	Source string `json:"source,omitempty"`
   586  	// Targets: The possible content types to convert to.
   587  	Targets []string `json:"targets,omitempty"`
   588  	// ForceSendFields is a list of field names (e.g. "Source") to unconditionally
   589  	// include in API requests. By default, fields with empty or default values are
   590  	// omitted from API requests. See
   591  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   592  	// details.
   593  	ForceSendFields []string `json:"-"`
   594  	// NullFields is a list of field names (e.g. "Source") to include in API
   595  	// requests with the JSON null value. By default, fields with empty values are
   596  	// omitted from API requests. See
   597  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   598  	NullFields []string `json:"-"`
   599  }
   600  
   601  func (s *AboutImportFormats) MarshalJSON() ([]byte, error) {
   602  	type NoMethod AboutImportFormats
   603  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   604  }
   605  
   606  type AboutMaxUploadSizes struct {
   607  	// Size: The max upload size for this type.
   608  	Size int64 `json:"size,omitempty,string"`
   609  	// Type: The file type.
   610  	Type string `json:"type,omitempty"`
   611  	// ForceSendFields is a list of field names (e.g. "Size") to unconditionally
   612  	// include in API requests. By default, fields with empty or default values are
   613  	// omitted from API requests. See
   614  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   615  	// details.
   616  	ForceSendFields []string `json:"-"`
   617  	// NullFields is a list of field names (e.g. "Size") to include in API requests
   618  	// with the JSON null value. By default, fields with empty values are omitted
   619  	// from API requests. See
   620  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   621  	NullFields []string `json:"-"`
   622  }
   623  
   624  func (s *AboutMaxUploadSizes) MarshalJSON() ([]byte, error) {
   625  	type NoMethod AboutMaxUploadSizes
   626  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   627  }
   628  
   629  type AboutQuotaBytesByService struct {
   630  	// BytesUsed: The storage quota bytes used by the service.
   631  	BytesUsed int64 `json:"bytesUsed,omitempty,string"`
   632  	// ServiceName: The service's name, e.g. DRIVE, GMAIL, or PHOTOS.
   633  	ServiceName string `json:"serviceName,omitempty"`
   634  	// ForceSendFields is a list of field names (e.g. "BytesUsed") to
   635  	// unconditionally include in API requests. By default, fields with empty or
   636  	// default values are omitted from API requests. See
   637  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   638  	// details.
   639  	ForceSendFields []string `json:"-"`
   640  	// NullFields is a list of field names (e.g. "BytesUsed") to include in API
   641  	// requests with the JSON null value. By default, fields with empty values are
   642  	// omitted from API requests. See
   643  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   644  	NullFields []string `json:"-"`
   645  }
   646  
   647  func (s *AboutQuotaBytesByService) MarshalJSON() ([]byte, error) {
   648  	type NoMethod AboutQuotaBytesByService
   649  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   650  }
   651  
   652  type AboutTeamDriveThemes struct {
   653  	// BackgroundImageLink: Deprecated: Use `driveThemes/backgroundImageLink`
   654  	// instead.
   655  	BackgroundImageLink string `json:"backgroundImageLink,omitempty"`
   656  	// ColorRgb: Deprecated: Use `driveThemes/colorRgb` instead.
   657  	ColorRgb string `json:"colorRgb,omitempty"`
   658  	// Id: Deprecated: Use `driveThemes/id` instead.
   659  	Id string `json:"id,omitempty"`
   660  	// ForceSendFields is a list of field names (e.g. "BackgroundImageLink") to
   661  	// unconditionally include in API requests. By default, fields with empty or
   662  	// default values are omitted from API requests. See
   663  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   664  	// details.
   665  	ForceSendFields []string `json:"-"`
   666  	// NullFields is a list of field names (e.g. "BackgroundImageLink") to include
   667  	// in API requests with the JSON null value. By default, fields with empty
   668  	// values are omitted from API requests. See
   669  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   670  	NullFields []string `json:"-"`
   671  }
   672  
   673  func (s *AboutTeamDriveThemes) MarshalJSON() ([]byte, error) {
   674  	type NoMethod AboutTeamDriveThemes
   675  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   676  }
   677  
   678  // App: The apps resource provides a list of the apps that a user has
   679  // installed, with information about each app's supported MIME types, file
   680  // extensions, and other details. Some resource methods (such as `apps.get`)
   681  // require an `appId`. Use the `apps.list` method to retrieve the ID for an
   682  // installed application.
   683  type App struct {
   684  	// Authorized: Whether the app is authorized to access data on the user's
   685  	// Drive.
   686  	Authorized bool `json:"authorized,omitempty"`
   687  	// CreateInFolderTemplate: The template url to create a new file with this app
   688  	// in a given folder. The template will contain {folderId} to be replaced by
   689  	// the folder to create the new file in.
   690  	CreateInFolderTemplate string `json:"createInFolderTemplate,omitempty"`
   691  	// CreateUrl: The url to create a new file with this app.
   692  	CreateUrl string `json:"createUrl,omitempty"`
   693  	// HasDriveWideScope: Whether the app has drive-wide scope. An app with
   694  	// drive-wide scope can access all files in the user's drive.
   695  	HasDriveWideScope bool `json:"hasDriveWideScope,omitempty"`
   696  	// Icons: The various icons for the app.
   697  	Icons []*AppIcons `json:"icons,omitempty"`
   698  	// Id: The ID of the app.
   699  	Id string `json:"id,omitempty"`
   700  	// Installed: Whether the app is installed.
   701  	Installed bool `json:"installed,omitempty"`
   702  	// Kind: This is always `drive#app`.
   703  	Kind string `json:"kind,omitempty"`
   704  	// LongDescription: A long description of the app.
   705  	LongDescription string `json:"longDescription,omitempty"`
   706  	// Name: The name of the app.
   707  	Name string `json:"name,omitempty"`
   708  	// ObjectType: The type of object this app creates (e.g. Chart). If empty, the
   709  	// app name should be used instead.
   710  	ObjectType string `json:"objectType,omitempty"`
   711  	// OpenUrlTemplate: The template url for opening files with this app. The
   712  	// template will contain `{ids}` and/or `{exportIds}` to be replaced by the
   713  	// actual file ids. See Open Files for the full documentation.
   714  	OpenUrlTemplate string `json:"openUrlTemplate,omitempty"`
   715  	// PrimaryFileExtensions: The list of primary file extensions.
   716  	PrimaryFileExtensions []string `json:"primaryFileExtensions,omitempty"`
   717  	// PrimaryMimeTypes: The list of primary mime types.
   718  	PrimaryMimeTypes []string `json:"primaryMimeTypes,omitempty"`
   719  	// ProductId: The ID of the product listing for this app.
   720  	ProductId string `json:"productId,omitempty"`
   721  	// ProductUrl: A link to the product listing for this app.
   722  	ProductUrl string `json:"productUrl,omitempty"`
   723  	// SecondaryFileExtensions: The list of secondary file extensions.
   724  	SecondaryFileExtensions []string `json:"secondaryFileExtensions,omitempty"`
   725  	// SecondaryMimeTypes: The list of secondary mime types.
   726  	SecondaryMimeTypes []string `json:"secondaryMimeTypes,omitempty"`
   727  	// ShortDescription: A short description of the app.
   728  	ShortDescription string `json:"shortDescription,omitempty"`
   729  	// SupportsCreate: Whether this app supports creating new objects.
   730  	SupportsCreate bool `json:"supportsCreate,omitempty"`
   731  	// SupportsImport: Whether this app supports importing from Docs Editors.
   732  	SupportsImport bool `json:"supportsImport,omitempty"`
   733  	// SupportsMultiOpen: Whether this app supports opening more than one file.
   734  	SupportsMultiOpen bool `json:"supportsMultiOpen,omitempty"`
   735  	// SupportsOfflineCreate: Whether this app supports creating new files when
   736  	// offline.
   737  	SupportsOfflineCreate bool `json:"supportsOfflineCreate,omitempty"`
   738  	// UseByDefault: Whether the app is selected as the default handler for the
   739  	// types it supports.
   740  	UseByDefault bool `json:"useByDefault,omitempty"`
   741  
   742  	// ServerResponse contains the HTTP response code and headers from the server.
   743  	googleapi.ServerResponse `json:"-"`
   744  	// ForceSendFields is a list of field names (e.g. "Authorized") to
   745  	// unconditionally include in API requests. By default, fields with empty or
   746  	// default values are omitted from API requests. See
   747  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   748  	// details.
   749  	ForceSendFields []string `json:"-"`
   750  	// NullFields is a list of field names (e.g. "Authorized") to include in API
   751  	// requests with the JSON null value. By default, fields with empty values are
   752  	// omitted from API requests. See
   753  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   754  	NullFields []string `json:"-"`
   755  }
   756  
   757  func (s *App) MarshalJSON() ([]byte, error) {
   758  	type NoMethod App
   759  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   760  }
   761  
   762  type AppIcons struct {
   763  	// Category: Category of the icon. Allowed values are: * `application` - icon
   764  	// for the application * `document` - icon for a file associated with the app *
   765  	// `documentShared` - icon for a shared file associated with the app
   766  	Category string `json:"category,omitempty"`
   767  	// IconUrl: URL for the icon.
   768  	IconUrl string `json:"iconUrl,omitempty"`
   769  	// Size: Size of the icon. Represented as the maximum of the width and height.
   770  	Size int64 `json:"size,omitempty"`
   771  	// ForceSendFields is a list of field names (e.g. "Category") to
   772  	// unconditionally include in API requests. By default, fields with empty or
   773  	// default values are omitted from API requests. See
   774  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   775  	// details.
   776  	ForceSendFields []string `json:"-"`
   777  	// NullFields is a list of field names (e.g. "Category") to include in API
   778  	// requests with the JSON null value. By default, fields with empty values are
   779  	// omitted from API requests. See
   780  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   781  	NullFields []string `json:"-"`
   782  }
   783  
   784  func (s *AppIcons) MarshalJSON() ([]byte, error) {
   785  	type NoMethod AppIcons
   786  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   787  }
   788  
   789  // AppList: A list of third-party applications which the user has installed or
   790  // given access to Google Drive.
   791  type AppList struct {
   792  	// DefaultAppIds: List of app IDs that the user has specified to use by
   793  	// default. The list is in reverse-priority order (lowest to highest).
   794  	DefaultAppIds []string `json:"defaultAppIds,omitempty"`
   795  	// Etag: The ETag of the list.
   796  	Etag string `json:"etag,omitempty"`
   797  	// Items: The list of apps.
   798  	Items []*App `json:"items,omitempty"`
   799  	// Kind: This is always `drive#appList`.
   800  	Kind string `json:"kind,omitempty"`
   801  	// SelfLink: A link back to this list.
   802  	SelfLink string `json:"selfLink,omitempty"`
   803  
   804  	// ServerResponse contains the HTTP response code and headers from the server.
   805  	googleapi.ServerResponse `json:"-"`
   806  	// ForceSendFields is a list of field names (e.g. "DefaultAppIds") to
   807  	// unconditionally include in API requests. By default, fields with empty or
   808  	// default values are omitted from API requests. See
   809  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   810  	// details.
   811  	ForceSendFields []string `json:"-"`
   812  	// NullFields is a list of field names (e.g. "DefaultAppIds") to include in API
   813  	// requests with the JSON null value. By default, fields with empty values are
   814  	// omitted from API requests. See
   815  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   816  	NullFields []string `json:"-"`
   817  }
   818  
   819  func (s *AppList) MarshalJSON() ([]byte, error) {
   820  	type NoMethod AppList
   821  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   822  }
   823  
   824  // Change: Representation of a change to a file or shared drive.
   825  type Change struct {
   826  	// ChangeType: The type of the change. Possible values are `file` and `drive`.
   827  	ChangeType string `json:"changeType,omitempty"`
   828  	// Deleted: Whether the file or shared drive has been removed from this list of
   829  	// changes, for example by deletion or loss of access.
   830  	Deleted bool `json:"deleted,omitempty"`
   831  	// Drive: The updated state of the shared drive. Present if the changeType is
   832  	// drive, the user is still a member of the shared drive, and the shared drive
   833  	// has not been deleted.
   834  	Drive *Drive `json:"drive,omitempty"`
   835  	// DriveId: The ID of the shared drive associated with this change.
   836  	DriveId string `json:"driveId,omitempty"`
   837  	// File: The updated state of the file. Present if the type is file and the
   838  	// file has not been removed from this list of changes.
   839  	File *File `json:"file,omitempty"`
   840  	// FileId: The ID of the file associated with this change.
   841  	FileId string `json:"fileId,omitempty"`
   842  	// Id: The ID of the change.
   843  	Id int64 `json:"id,omitempty,string"`
   844  	// Kind: This is always `drive#change`.
   845  	Kind string `json:"kind,omitempty"`
   846  	// ModificationDate: The time of this modification.
   847  	ModificationDate string `json:"modificationDate,omitempty"`
   848  	// SelfLink: A link back to this change.
   849  	SelfLink string `json:"selfLink,omitempty"`
   850  	// TeamDrive: Deprecated: Use `drive` instead.
   851  	TeamDrive *TeamDrive `json:"teamDrive,omitempty"`
   852  	// TeamDriveId: Deprecated: Use `driveId` instead.
   853  	TeamDriveId string `json:"teamDriveId,omitempty"`
   854  	// Type: Deprecated: Use `changeType` instead.
   855  	Type string `json:"type,omitempty"`
   856  
   857  	// ServerResponse contains the HTTP response code and headers from the server.
   858  	googleapi.ServerResponse `json:"-"`
   859  	// ForceSendFields is a list of field names (e.g. "ChangeType") to
   860  	// unconditionally include in API requests. By default, fields with empty or
   861  	// default values are omitted from API requests. See
   862  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   863  	// details.
   864  	ForceSendFields []string `json:"-"`
   865  	// NullFields is a list of field names (e.g. "ChangeType") to include in API
   866  	// requests with the JSON null value. By default, fields with empty values are
   867  	// omitted from API requests. See
   868  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   869  	NullFields []string `json:"-"`
   870  }
   871  
   872  func (s *Change) MarshalJSON() ([]byte, error) {
   873  	type NoMethod Change
   874  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   875  }
   876  
   877  // ChangeList: A list of changes for a user.
   878  type ChangeList struct {
   879  	// Etag: The ETag of the list.
   880  	Etag string `json:"etag,omitempty"`
   881  	// Items: The list of changes. If nextPageToken is populated, then this list
   882  	// may be incomplete and an additional page of results should be fetched.
   883  	Items []*Change `json:"items,omitempty"`
   884  	// Kind: This is always `drive#changeList`.
   885  	Kind string `json:"kind,omitempty"`
   886  	// LargestChangeId: The current largest change ID.
   887  	LargestChangeId int64 `json:"largestChangeId,omitempty,string"`
   888  	// NewStartPageToken: The starting page token for future changes. This will be
   889  	// present only if the end of the current changes list has been reached.
   890  	NewStartPageToken string `json:"newStartPageToken,omitempty"`
   891  	// NextLink: A link to the next page of changes.
   892  	NextLink string `json:"nextLink,omitempty"`
   893  	// NextPageToken: The page token for the next page of changes. This will be
   894  	// absent if the end of the changes list has been reached. If the token is
   895  	// rejected for any reason, it should be discarded, and pagination should be
   896  	// restarted from the first page of results.
   897  	NextPageToken string `json:"nextPageToken,omitempty"`
   898  	// SelfLink: A link back to this list.
   899  	SelfLink string `json:"selfLink,omitempty"`
   900  
   901  	// ServerResponse contains the HTTP response code and headers from the server.
   902  	googleapi.ServerResponse `json:"-"`
   903  	// ForceSendFields is a list of field names (e.g. "Etag") to unconditionally
   904  	// include in API requests. By default, fields with empty or default values are
   905  	// omitted from API requests. See
   906  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   907  	// details.
   908  	ForceSendFields []string `json:"-"`
   909  	// NullFields is a list of field names (e.g. "Etag") to include in API requests
   910  	// with the JSON null value. By default, fields with empty values are omitted
   911  	// from API requests. See
   912  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   913  	NullFields []string `json:"-"`
   914  }
   915  
   916  func (s *ChangeList) MarshalJSON() ([]byte, error) {
   917  	type NoMethod ChangeList
   918  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   919  }
   920  
   921  // Channel: A notification channel used to watch for resource changes.
   922  type Channel struct {
   923  	// Address: The address where notifications are delivered for this channel.
   924  	Address string `json:"address,omitempty"`
   925  	// Expiration: Date and time of notification channel expiration, expressed as a
   926  	// Unix timestamp, in milliseconds. Optional.
   927  	Expiration int64 `json:"expiration,omitempty,string"`
   928  	// Id: A UUID or similar unique string that identifies this channel.
   929  	Id string `json:"id,omitempty"`
   930  	// Kind: Identifies this as a notification channel used to watch for changes to
   931  	// a resource, which is `api#channel`.
   932  	Kind string `json:"kind,omitempty"`
   933  	// Params: Additional parameters controlling delivery channel behavior.
   934  	// Optional.
   935  	Params map[string]string `json:"params,omitempty"`
   936  	// Payload: A Boolean value to indicate whether payload is wanted. Optional.
   937  	Payload bool `json:"payload,omitempty"`
   938  	// ResourceId: An opaque ID that identifies the resource being watched on this
   939  	// channel. Stable across different API versions.
   940  	ResourceId string `json:"resourceId,omitempty"`
   941  	// ResourceUri: A version-specific identifier for the watched resource.
   942  	ResourceUri string `json:"resourceUri,omitempty"`
   943  	// Token: An arbitrary string delivered to the target address with each
   944  	// notification delivered over this channel. Optional.
   945  	Token string `json:"token,omitempty"`
   946  	// Type: The type of delivery mechanism used for this channel. Valid values are
   947  	// "web_hook" or "webhook".
   948  	Type string `json:"type,omitempty"`
   949  
   950  	// ServerResponse contains the HTTP response code and headers from the server.
   951  	googleapi.ServerResponse `json:"-"`
   952  	// ForceSendFields is a list of field names (e.g. "Address") to unconditionally
   953  	// include in API requests. By default, fields with empty or default values are
   954  	// omitted from API requests. See
   955  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   956  	// details.
   957  	ForceSendFields []string `json:"-"`
   958  	// NullFields is a list of field names (e.g. "Address") to include in API
   959  	// requests with the JSON null value. By default, fields with empty values are
   960  	// omitted from API requests. See
   961  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   962  	NullFields []string `json:"-"`
   963  }
   964  
   965  func (s *Channel) MarshalJSON() ([]byte, error) {
   966  	type NoMethod Channel
   967  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   968  }
   969  
   970  // ChildList: A list of children of a file.
   971  type ChildList struct {
   972  	// Etag: The ETag of the list.
   973  	Etag string `json:"etag,omitempty"`
   974  	// Items: The list of children. If nextPageToken is populated, then this list
   975  	// may be incomplete and an additional page of results should be fetched.
   976  	Items []*ChildReference `json:"items,omitempty"`
   977  	// Kind: This is always `drive#childList`.
   978  	Kind string `json:"kind,omitempty"`
   979  	// NextLink: A link to the next page of children.
   980  	NextLink string `json:"nextLink,omitempty"`
   981  	// NextPageToken: The page token for the next page of children. This will be
   982  	// absent if the end of the children list has been reached. If the token is
   983  	// rejected for any reason, it should be discarded, and pagination should be
   984  	// restarted from the first page of results.
   985  	NextPageToken string `json:"nextPageToken,omitempty"`
   986  	// SelfLink: A link back to this list.
   987  	SelfLink string `json:"selfLink,omitempty"`
   988  
   989  	// ServerResponse contains the HTTP response code and headers from the server.
   990  	googleapi.ServerResponse `json:"-"`
   991  	// ForceSendFields is a list of field names (e.g. "Etag") to unconditionally
   992  	// include in API requests. By default, fields with empty or default values are
   993  	// omitted from API requests. See
   994  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   995  	// details.
   996  	ForceSendFields []string `json:"-"`
   997  	// NullFields is a list of field names (e.g. "Etag") to include in API requests
   998  	// with the JSON null value. By default, fields with empty values are omitted
   999  	// from API requests. See
  1000  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1001  	NullFields []string `json:"-"`
  1002  }
  1003  
  1004  func (s *ChildList) MarshalJSON() ([]byte, error) {
  1005  	type NoMethod ChildList
  1006  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1007  }
  1008  
  1009  // ChildReference: A reference to a folder's child. Some resource methods (such
  1010  // as `children.get`) require a `childId`. Use the `children.list` method to
  1011  // retrieve the ID of the child.
  1012  type ChildReference struct {
  1013  	// ChildLink: Output only. A link to the child.
  1014  	ChildLink string `json:"childLink,omitempty"`
  1015  	// Id: The ID of the child.
  1016  	Id string `json:"id,omitempty"`
  1017  	// Kind: Output only. This is always `drive#childReference`.
  1018  	Kind string `json:"kind,omitempty"`
  1019  	// SelfLink: Output only. A link back to this reference.
  1020  	SelfLink string `json:"selfLink,omitempty"`
  1021  
  1022  	// ServerResponse contains the HTTP response code and headers from the server.
  1023  	googleapi.ServerResponse `json:"-"`
  1024  	// ForceSendFields is a list of field names (e.g. "ChildLink") to
  1025  	// unconditionally include in API requests. By default, fields with empty or
  1026  	// default values are omitted from API requests. See
  1027  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1028  	// details.
  1029  	ForceSendFields []string `json:"-"`
  1030  	// NullFields is a list of field names (e.g. "ChildLink") to include in API
  1031  	// requests with the JSON null value. By default, fields with empty values are
  1032  	// omitted from API requests. See
  1033  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1034  	NullFields []string `json:"-"`
  1035  }
  1036  
  1037  func (s *ChildReference) MarshalJSON() ([]byte, error) {
  1038  	type NoMethod ChildReference
  1039  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1040  }
  1041  
  1042  // Comment: A comment on a file in Google Drive. Some resource methods (such as
  1043  // `comments.update`) require a `commentId`. Use the `comments.list` method to
  1044  // retrieve the ID for a comment in a file.
  1045  type Comment struct {
  1046  	// Anchor: A region of the document represented as a JSON string. For details
  1047  	// on defining anchor properties, refer to Add comments and replies
  1048  	// (https://developers.google.com/drive/api/v2/manage-comments).
  1049  	Anchor string `json:"anchor,omitempty"`
  1050  	// Author: Output only. The author of the comment. The author's email address
  1051  	// and permission ID will not be populated.
  1052  	Author *User `json:"author,omitempty"`
  1053  	// CommentId: Output only. The ID of the comment.
  1054  	CommentId string `json:"commentId,omitempty"`
  1055  	// Content: The plain text content used to create this comment. This is not
  1056  	// HTML safe and should only be used as a starting point to make edits to a
  1057  	// comment's content.
  1058  	Content string `json:"content,omitempty"`
  1059  	// Context: The context of the file which is being commented on.
  1060  	Context *CommentContext `json:"context,omitempty"`
  1061  	// CreatedDate: The date when this comment was first created.
  1062  	CreatedDate string `json:"createdDate,omitempty"`
  1063  	// Deleted: Output only. Whether this comment has been deleted. If a comment
  1064  	// has been deleted the content will be cleared and this will only represent a
  1065  	// comment that once existed.
  1066  	Deleted bool `json:"deleted,omitempty"`
  1067  	// FileId: Output only. The file which this comment is addressing.
  1068  	FileId string `json:"fileId,omitempty"`
  1069  	// FileTitle: Output only. The title of the file which this comment is
  1070  	// addressing.
  1071  	FileTitle string `json:"fileTitle,omitempty"`
  1072  	// HtmlContent: Output only. HTML formatted content for this comment.
  1073  	HtmlContent string `json:"htmlContent,omitempty"`
  1074  	// Kind: Output only. This is always `drive#comment`.
  1075  	Kind string `json:"kind,omitempty"`
  1076  	// ModifiedDate: The date when this comment or any of its replies were last
  1077  	// modified.
  1078  	ModifiedDate string `json:"modifiedDate,omitempty"`
  1079  	// Replies: Output only. Replies to this post.
  1080  	Replies []*CommentReply `json:"replies,omitempty"`
  1081  	// SelfLink: Output only. A link back to this comment.
  1082  	SelfLink string `json:"selfLink,omitempty"`
  1083  	// Status: Output only. The status of this comment. Status can be changed by
  1084  	// posting a reply to a comment with the desired status. * `open` - The comment
  1085  	// is still open. * `resolved` - The comment has been resolved by one of its
  1086  	// replies.
  1087  	Status string `json:"status,omitempty"`
  1088  
  1089  	// ServerResponse contains the HTTP response code and headers from the server.
  1090  	googleapi.ServerResponse `json:"-"`
  1091  	// ForceSendFields is a list of field names (e.g. "Anchor") to unconditionally
  1092  	// include in API requests. By default, fields with empty or default values are
  1093  	// omitted from API requests. See
  1094  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1095  	// details.
  1096  	ForceSendFields []string `json:"-"`
  1097  	// NullFields is a list of field names (e.g. "Anchor") to include in API
  1098  	// requests with the JSON null value. By default, fields with empty values are
  1099  	// omitted from API requests. See
  1100  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1101  	NullFields []string `json:"-"`
  1102  }
  1103  
  1104  func (s *Comment) MarshalJSON() ([]byte, error) {
  1105  	type NoMethod Comment
  1106  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1107  }
  1108  
  1109  // CommentContext: The context of the file which is being commented on.
  1110  type CommentContext struct {
  1111  	// Type: The MIME type of the context snippet.
  1112  	Type string `json:"type,omitempty"`
  1113  	// Value: Data representation of the segment of the file being commented on. In
  1114  	// the case of a text file for example, this would be the actual text that the
  1115  	// comment is about.
  1116  	Value string `json:"value,omitempty"`
  1117  	// ForceSendFields is a list of field names (e.g. "Type") to unconditionally
  1118  	// include in API requests. By default, fields with empty or default values are
  1119  	// omitted from API requests. See
  1120  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1121  	// details.
  1122  	ForceSendFields []string `json:"-"`
  1123  	// NullFields is a list of field names (e.g. "Type") to include in API requests
  1124  	// with the JSON null value. By default, fields with empty values are omitted
  1125  	// from API requests. See
  1126  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1127  	NullFields []string `json:"-"`
  1128  }
  1129  
  1130  func (s *CommentContext) MarshalJSON() ([]byte, error) {
  1131  	type NoMethod CommentContext
  1132  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1133  }
  1134  
  1135  // CommentList: A list of comments on a file in Google Drive.
  1136  type CommentList struct {
  1137  	// Items: The list of comments. If nextPageToken is populated, then this list
  1138  	// may be incomplete and an additional page of results should be fetched.
  1139  	Items []*Comment `json:"items,omitempty"`
  1140  	// Kind: This is always `drive#commentList`.
  1141  	Kind string `json:"kind,omitempty"`
  1142  	// NextLink: A link to the next page of comments.
  1143  	NextLink string `json:"nextLink,omitempty"`
  1144  	// NextPageToken: The page token for the next page of comments. This will be
  1145  	// absent if the end of the comments list has been reached. If the token is
  1146  	// rejected for any reason, it should be discarded, and pagination should be
  1147  	// restarted from the first page of results.
  1148  	NextPageToken string `json:"nextPageToken,omitempty"`
  1149  	// SelfLink: A link back to this list.
  1150  	SelfLink string `json:"selfLink,omitempty"`
  1151  
  1152  	// ServerResponse contains the HTTP response code and headers from the server.
  1153  	googleapi.ServerResponse `json:"-"`
  1154  	// ForceSendFields is a list of field names (e.g. "Items") to unconditionally
  1155  	// include in API requests. By default, fields with empty or default values are
  1156  	// omitted from API requests. See
  1157  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1158  	// details.
  1159  	ForceSendFields []string `json:"-"`
  1160  	// NullFields is a list of field names (e.g. "Items") to include in API
  1161  	// requests with the JSON null value. By default, fields with empty values are
  1162  	// omitted from API requests. See
  1163  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1164  	NullFields []string `json:"-"`
  1165  }
  1166  
  1167  func (s *CommentList) MarshalJSON() ([]byte, error) {
  1168  	type NoMethod CommentList
  1169  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1170  }
  1171  
  1172  // CommentReply: A comment on a file in Google Drive. Some resource methods
  1173  // (such as `replies.update`) require a `replyId`. Use the `replies.list`
  1174  // method to retrieve the ID for a reply.
  1175  type CommentReply struct {
  1176  	// Author: Output only. The author of the reply. The author's email address and
  1177  	// permission ID will not be populated.
  1178  	Author *User `json:"author,omitempty"`
  1179  	// Content: The plain text content used to create this reply. This is not HTML
  1180  	// safe and should only be used as a starting point to make edits to a reply's
  1181  	// content. This field is required on inserts if no verb is specified
  1182  	// (resolve/reopen).
  1183  	Content string `json:"content,omitempty"`
  1184  	// CreatedDate: The date when this reply was first created.
  1185  	CreatedDate string `json:"createdDate,omitempty"`
  1186  	// Deleted: Output only. Whether this reply has been deleted. If a reply has
  1187  	// been deleted the content will be cleared and this will only represent a
  1188  	// reply that once existed.
  1189  	Deleted bool `json:"deleted,omitempty"`
  1190  	// HtmlContent: Output only. HTML formatted content for this reply.
  1191  	HtmlContent string `json:"htmlContent,omitempty"`
  1192  	// Kind: Output only. This is always `drive#commentReply`.
  1193  	Kind string `json:"kind,omitempty"`
  1194  	// ModifiedDate: The date when this reply was last modified.
  1195  	ModifiedDate string `json:"modifiedDate,omitempty"`
  1196  	// ReplyId: Output only. The ID of the reply.
  1197  	ReplyId string `json:"replyId,omitempty"`
  1198  	// Verb: The action this reply performed to the parent comment. When creating a
  1199  	// new reply this is the action to be perform to the parent comment. Possible
  1200  	// values are: * `resolve` - To resolve a comment. * `reopen` - To reopen
  1201  	// (un-resolve) a comment.
  1202  	Verb string `json:"verb,omitempty"`
  1203  
  1204  	// ServerResponse contains the HTTP response code and headers from the server.
  1205  	googleapi.ServerResponse `json:"-"`
  1206  	// ForceSendFields is a list of field names (e.g. "Author") to unconditionally
  1207  	// include in API requests. By default, fields with empty or default values are
  1208  	// omitted from API requests. See
  1209  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1210  	// details.
  1211  	ForceSendFields []string `json:"-"`
  1212  	// NullFields is a list of field names (e.g. "Author") to include in API
  1213  	// requests with the JSON null value. By default, fields with empty values are
  1214  	// omitted from API requests. See
  1215  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1216  	NullFields []string `json:"-"`
  1217  }
  1218  
  1219  func (s *CommentReply) MarshalJSON() ([]byte, error) {
  1220  	type NoMethod CommentReply
  1221  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1222  }
  1223  
  1224  // CommentReplyList: A list of replies to a comment on a file in Google Drive.
  1225  type CommentReplyList struct {
  1226  	// Items: The list of replies. If nextPageToken is populated, then this list
  1227  	// may be incomplete and an additional page of results should be fetched.
  1228  	Items []*CommentReply `json:"items,omitempty"`
  1229  	// Kind: This is always `drive#commentReplyList`.
  1230  	Kind string `json:"kind,omitempty"`
  1231  	// NextLink: A link to the next page of replies.
  1232  	NextLink string `json:"nextLink,omitempty"`
  1233  	// NextPageToken: The page token for the next page of replies. This will be
  1234  	// absent if the end of the replies list has been reached. If the token is
  1235  	// rejected for any reason, it should be discarded, and pagination should be
  1236  	// restarted from the first page of results.
  1237  	NextPageToken string `json:"nextPageToken,omitempty"`
  1238  	// SelfLink: A link back to this list.
  1239  	SelfLink string `json:"selfLink,omitempty"`
  1240  
  1241  	// ServerResponse contains the HTTP response code and headers from the server.
  1242  	googleapi.ServerResponse `json:"-"`
  1243  	// ForceSendFields is a list of field names (e.g. "Items") to unconditionally
  1244  	// include in API requests. By default, fields with empty or default values are
  1245  	// omitted from API requests. See
  1246  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1247  	// details.
  1248  	ForceSendFields []string `json:"-"`
  1249  	// NullFields is a list of field names (e.g. "Items") to include in API
  1250  	// requests with the JSON null value. By default, fields with empty values are
  1251  	// omitted from API requests. See
  1252  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1253  	NullFields []string `json:"-"`
  1254  }
  1255  
  1256  func (s *CommentReplyList) MarshalJSON() ([]byte, error) {
  1257  	type NoMethod CommentReplyList
  1258  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1259  }
  1260  
  1261  // ContentRestriction: A restriction for accessing the content of the file.
  1262  type ContentRestriction struct {
  1263  	// OwnerRestricted: Whether the content restriction can only be modified or
  1264  	// removed by a user who owns the file. For files in shared drives, any user
  1265  	// with `organizer` capabilities can modify or remove this content restriction.
  1266  	OwnerRestricted bool `json:"ownerRestricted,omitempty"`
  1267  	// ReadOnly: Whether the content of the file is read-only. If a file is
  1268  	// read-only, a new revision of the file may not be added, comments may not be
  1269  	// added or modified, and the title of the file may not be modified.
  1270  	ReadOnly bool `json:"readOnly,omitempty"`
  1271  	// Reason: Reason for why the content of the file is restricted. This is only
  1272  	// mutable on requests that also set `readOnly=true`.
  1273  	Reason string `json:"reason,omitempty"`
  1274  	// RestrictingUser: Output only. The user who set the content restriction. Only
  1275  	// populated if `readOnly` is true.
  1276  	RestrictingUser *User `json:"restrictingUser,omitempty"`
  1277  	// RestrictionDate: The time at which the content restriction was set
  1278  	// (formatted RFC 3339 timestamp). Only populated if readOnly is true.
  1279  	RestrictionDate string `json:"restrictionDate,omitempty"`
  1280  	// SystemRestricted: Output only. Whether the content restriction was applied
  1281  	// by the system, for example due to an esignature. Users cannot modify or
  1282  	// remove system restricted content restrictions.
  1283  	SystemRestricted bool `json:"systemRestricted,omitempty"`
  1284  	// Type: Output only. The type of the content restriction. Currently the only
  1285  	// possible value is `globalContentRestriction`.
  1286  	Type string `json:"type,omitempty"`
  1287  	// ForceSendFields is a list of field names (e.g. "OwnerRestricted") to
  1288  	// unconditionally include in API requests. By default, fields with empty or
  1289  	// default values are omitted from API requests. See
  1290  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1291  	// details.
  1292  	ForceSendFields []string `json:"-"`
  1293  	// NullFields is a list of field names (e.g. "OwnerRestricted") to include in
  1294  	// API requests with the JSON null value. By default, fields with empty values
  1295  	// are omitted from API requests. See
  1296  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1297  	NullFields []string `json:"-"`
  1298  }
  1299  
  1300  func (s *ContentRestriction) MarshalJSON() ([]byte, error) {
  1301  	type NoMethod ContentRestriction
  1302  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1303  }
  1304  
  1305  // Drive: Representation of a shared drive. Some resource methods (such as
  1306  // `drives.update`) require a `driveId`. Use the `drives.list` method to
  1307  // retrieve the ID for a shared drive.
  1308  type Drive struct {
  1309  	// BackgroundImageFile: An image file and cropping parameters from which a
  1310  	// background image for this shared drive is set. This is a write only field;
  1311  	// it can only be set on `drive.drives.update` requests that don't set
  1312  	// `themeId`. When specified, all fields of the `backgroundImageFile` must be
  1313  	// set.
  1314  	BackgroundImageFile *DriveBackgroundImageFile `json:"backgroundImageFile,omitempty"`
  1315  	// BackgroundImageLink: Output only. A short-lived link to this shared drive's
  1316  	// background image.
  1317  	BackgroundImageLink string `json:"backgroundImageLink,omitempty"`
  1318  	// Capabilities: Output only. Capabilities the current user has on this shared
  1319  	// drive.
  1320  	Capabilities *DriveCapabilities `json:"capabilities,omitempty"`
  1321  	// ColorRgb: The color of this shared drive as an RGB hex string. It can only
  1322  	// be set on a `drive.drives.update` request that does not set `themeId`.
  1323  	ColorRgb string `json:"colorRgb,omitempty"`
  1324  	// CreatedDate: The time at which the shared drive was created (RFC 3339
  1325  	// date-time).
  1326  	CreatedDate string `json:"createdDate,omitempty"`
  1327  	// Hidden: Whether the shared drive is hidden from default view.
  1328  	Hidden bool `json:"hidden,omitempty"`
  1329  	// Id: Output only. The ID of this shared drive which is also the ID of the top
  1330  	// level folder of this shared drive.
  1331  	Id string `json:"id,omitempty"`
  1332  	// Kind: Output only. This is always `drive#drive`
  1333  	Kind string `json:"kind,omitempty"`
  1334  	// Name: The name of this shared drive.
  1335  	Name string `json:"name,omitempty"`
  1336  	// OrgUnitId: Output only. The organizational unit of this shared drive. This
  1337  	// field is only populated on `drives.list` responses when the
  1338  	// `useDomainAdminAccess` parameter is set to `true`.
  1339  	OrgUnitId string `json:"orgUnitId,omitempty"`
  1340  	// Restrictions: A set of restrictions that apply to this shared drive or items
  1341  	// inside this shared drive.
  1342  	Restrictions *DriveRestrictions `json:"restrictions,omitempty"`
  1343  	// ThemeId: The ID of the theme from which the background image and color will
  1344  	// be set. The set of possible `driveThemes` can be retrieved from a
  1345  	// `drive.about.get` response. When not specified on a `drive.drives.insert`
  1346  	// request, a random theme is chosen from which the background image and color
  1347  	// are set. This is a write-only field; it can only be set on requests that
  1348  	// don't set `colorRgb` or `backgroundImageFile`.
  1349  	ThemeId string `json:"themeId,omitempty"`
  1350  
  1351  	// ServerResponse contains the HTTP response code and headers from the server.
  1352  	googleapi.ServerResponse `json:"-"`
  1353  	// ForceSendFields is a list of field names (e.g. "BackgroundImageFile") to
  1354  	// unconditionally include in API requests. By default, fields with empty or
  1355  	// default values are omitted from API requests. See
  1356  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1357  	// details.
  1358  	ForceSendFields []string `json:"-"`
  1359  	// NullFields is a list of field names (e.g. "BackgroundImageFile") to include
  1360  	// in API requests with the JSON null value. By default, fields with empty
  1361  	// values are omitted from API requests. See
  1362  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1363  	NullFields []string `json:"-"`
  1364  }
  1365  
  1366  func (s *Drive) MarshalJSON() ([]byte, error) {
  1367  	type NoMethod Drive
  1368  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1369  }
  1370  
  1371  // DriveBackgroundImageFile: An image file and cropping parameters from which a
  1372  // background image for this shared drive is set. This is a write only field;
  1373  // it can only be set on `drive.drives.update` requests that don't set
  1374  // `themeId`. When specified, all fields of the `backgroundImageFile` must be
  1375  // set.
  1376  type DriveBackgroundImageFile struct {
  1377  	// Id: The ID of an image file in Google Drive to use for the background image.
  1378  	Id string `json:"id,omitempty"`
  1379  	// Width: The width of the cropped image in the closed range of 0 to 1. This
  1380  	// value represents the width of the cropped image divided by the width of the
  1381  	// entire image. The height is computed by applying a width to height aspect
  1382  	// ratio of 80 to 9. The resulting image must be at least 1280 pixels wide and
  1383  	// 144 pixels high.
  1384  	Width float64 `json:"width,omitempty"`
  1385  	// XCoordinate: The X coordinate of the upper left corner of the cropping area
  1386  	// in the background image. This is a value in the closed range of 0 to 1. This
  1387  	// value represents the horizontal distance from the left side of the entire
  1388  	// image to the left side of the cropping area divided by the width of the
  1389  	// entire image.
  1390  	XCoordinate float64 `json:"xCoordinate,omitempty"`
  1391  	// YCoordinate: The Y coordinate of the upper left corner of the cropping area
  1392  	// in the background image. This is a value in the closed range of 0 to 1. This
  1393  	// value represents the vertical distance from the top side of the entire image
  1394  	// to the top side of the cropping area divided by the height of the entire
  1395  	// image.
  1396  	YCoordinate float64 `json:"yCoordinate,omitempty"`
  1397  	// ForceSendFields is a list of field names (e.g. "Id") to unconditionally
  1398  	// include in API requests. By default, fields with empty or default values are
  1399  	// omitted from API requests. See
  1400  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1401  	// details.
  1402  	ForceSendFields []string `json:"-"`
  1403  	// NullFields is a list of field names (e.g. "Id") to include in API requests
  1404  	// with the JSON null value. By default, fields with empty values are omitted
  1405  	// from API requests. See
  1406  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1407  	NullFields []string `json:"-"`
  1408  }
  1409  
  1410  func (s *DriveBackgroundImageFile) MarshalJSON() ([]byte, error) {
  1411  	type NoMethod DriveBackgroundImageFile
  1412  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1413  }
  1414  
  1415  func (s *DriveBackgroundImageFile) UnmarshalJSON(data []byte) error {
  1416  	type NoMethod DriveBackgroundImageFile
  1417  	var s1 struct {
  1418  		Width       gensupport.JSONFloat64 `json:"width"`
  1419  		XCoordinate gensupport.JSONFloat64 `json:"xCoordinate"`
  1420  		YCoordinate gensupport.JSONFloat64 `json:"yCoordinate"`
  1421  		*NoMethod
  1422  	}
  1423  	s1.NoMethod = (*NoMethod)(s)
  1424  	if err := json.Unmarshal(data, &s1); err != nil {
  1425  		return err
  1426  	}
  1427  	s.Width = float64(s1.Width)
  1428  	s.XCoordinate = float64(s1.XCoordinate)
  1429  	s.YCoordinate = float64(s1.YCoordinate)
  1430  	return nil
  1431  }
  1432  
  1433  // DriveCapabilities: Output only. Capabilities the current user has on this
  1434  // shared drive.
  1435  type DriveCapabilities struct {
  1436  	// CanAddChildren: Output only. Whether the current user can add children to
  1437  	// folders in this shared drive.
  1438  	CanAddChildren bool `json:"canAddChildren,omitempty"`
  1439  	// CanChangeCopyRequiresWriterPermissionRestriction: Output only. Whether the
  1440  	// current user can change the `copyRequiresWriterPermission` restriction of
  1441  	// this shared drive.
  1442  	CanChangeCopyRequiresWriterPermissionRestriction bool `json:"canChangeCopyRequiresWriterPermissionRestriction,omitempty"`
  1443  	// CanChangeDomainUsersOnlyRestriction: Output only. Whether the current user
  1444  	// can change the `domainUsersOnly` restriction of this shared drive.
  1445  	CanChangeDomainUsersOnlyRestriction bool `json:"canChangeDomainUsersOnlyRestriction,omitempty"`
  1446  	// CanChangeDriveBackground: Output only. Whether the current user can change
  1447  	// the background of this shared drive.
  1448  	CanChangeDriveBackground bool `json:"canChangeDriveBackground,omitempty"`
  1449  	// CanChangeDriveMembersOnlyRestriction: Output only. Whether the current user
  1450  	// can change the `driveMembersOnly` restriction of this shared drive.
  1451  	CanChangeDriveMembersOnlyRestriction bool `json:"canChangeDriveMembersOnlyRestriction,omitempty"`
  1452  	// CanChangeSharingFoldersRequiresOrganizerPermissionRestriction: Output only.
  1453  	// Whether the current user can change the
  1454  	// `sharingFoldersRequiresOrganizerPermission` restriction of this shared
  1455  	// drive.
  1456  	CanChangeSharingFoldersRequiresOrganizerPermissionRestriction bool `json:"canChangeSharingFoldersRequiresOrganizerPermissionRestriction,omitempty"`
  1457  	// CanComment: Output only. Whether the current user can comment on files in
  1458  	// this shared drive.
  1459  	CanComment bool `json:"canComment,omitempty"`
  1460  	// CanCopy: Output only. Whether the current user can copy files in this shared
  1461  	// drive.
  1462  	CanCopy bool `json:"canCopy,omitempty"`
  1463  	// CanDeleteChildren: Output only. Whether the current user can delete children
  1464  	// from folders in this shared drive.
  1465  	CanDeleteChildren bool `json:"canDeleteChildren,omitempty"`
  1466  	// CanDeleteDrive: Output only. Whether the current user can delete this shared
  1467  	// drive. Attempting to delete the shared drive may still fail if there are
  1468  	// untrashed items inside the shared drive.
  1469  	CanDeleteDrive bool `json:"canDeleteDrive,omitempty"`
  1470  	// CanDownload: Output only. Whether the current user can download files in
  1471  	// this shared drive.
  1472  	CanDownload bool `json:"canDownload,omitempty"`
  1473  	// CanEdit: Output only. Whether the current user can edit files in this shared
  1474  	// drive
  1475  	CanEdit bool `json:"canEdit,omitempty"`
  1476  	// CanListChildren: Output only. Whether the current user can list the children
  1477  	// of folders in this shared drive.
  1478  	CanListChildren bool `json:"canListChildren,omitempty"`
  1479  	// CanManageMembers: Output only. Whether the current user can add members to
  1480  	// this shared drive or remove them or change their role.
  1481  	CanManageMembers bool `json:"canManageMembers,omitempty"`
  1482  	// CanReadRevisions: Output only. Whether the current user can read the
  1483  	// revisions resource of files in this shared drive.
  1484  	CanReadRevisions bool `json:"canReadRevisions,omitempty"`
  1485  	// CanRename: Output only. Whether the current user can rename files or folders
  1486  	// in this shared drive.
  1487  	CanRename bool `json:"canRename,omitempty"`
  1488  	// CanRenameDrive: Output only. Whether the current user can rename this shared
  1489  	// drive.
  1490  	CanRenameDrive bool `json:"canRenameDrive,omitempty"`
  1491  	// CanResetDriveRestrictions: Output only. Whether the current user can reset
  1492  	// the shared drive restrictions to defaults.
  1493  	CanResetDriveRestrictions bool `json:"canResetDriveRestrictions,omitempty"`
  1494  	// CanShare: Output only. Whether the current user can share files or folders
  1495  	// in this shared drive.
  1496  	CanShare bool `json:"canShare,omitempty"`
  1497  	// CanTrashChildren: Output only. Whether the current user can trash children
  1498  	// from folders in this shared drive.
  1499  	CanTrashChildren bool `json:"canTrashChildren,omitempty"`
  1500  	// ForceSendFields is a list of field names (e.g. "CanAddChildren") to
  1501  	// unconditionally include in API requests. By default, fields with empty or
  1502  	// default values are omitted from API requests. See
  1503  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1504  	// details.
  1505  	ForceSendFields []string `json:"-"`
  1506  	// NullFields is a list of field names (e.g. "CanAddChildren") to include in
  1507  	// API requests with the JSON null value. By default, fields with empty values
  1508  	// are omitted from API requests. See
  1509  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1510  	NullFields []string `json:"-"`
  1511  }
  1512  
  1513  func (s *DriveCapabilities) MarshalJSON() ([]byte, error) {
  1514  	type NoMethod DriveCapabilities
  1515  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1516  }
  1517  
  1518  // DriveRestrictions: A set of restrictions that apply to this shared drive or
  1519  // items inside this shared drive.
  1520  type DriveRestrictions struct {
  1521  	// AdminManagedRestrictions: Whether administrative privileges on this shared
  1522  	// drive are required to modify restrictions.
  1523  	AdminManagedRestrictions bool `json:"adminManagedRestrictions,omitempty"`
  1524  	// CopyRequiresWriterPermission: Whether the options to copy, print, or
  1525  	// download files inside this shared drive, should be disabled for readers and
  1526  	// commenters. When this restriction is set to `true`, it will override the
  1527  	// similarly named field to `true` for any file inside this shared drive.
  1528  	CopyRequiresWriterPermission bool `json:"copyRequiresWriterPermission,omitempty"`
  1529  	// DomainUsersOnly: Whether access to this shared drive and items inside this
  1530  	// shared drive is restricted to users of the domain to which this shared drive
  1531  	// belongs. This restriction may be overridden by other sharing policies
  1532  	// controlled outside of this shared drive.
  1533  	DomainUsersOnly bool `json:"domainUsersOnly,omitempty"`
  1534  	// DriveMembersOnly: Whether access to items inside this shared drive is
  1535  	// restricted to its members.
  1536  	DriveMembersOnly bool `json:"driveMembersOnly,omitempty"`
  1537  	// SharingFoldersRequiresOrganizerPermission: If true, only users with the
  1538  	// organizer role can share folders. If false, users with either the organizer
  1539  	// role or the file organizer role can share folders.
  1540  	SharingFoldersRequiresOrganizerPermission bool `json:"sharingFoldersRequiresOrganizerPermission,omitempty"`
  1541  	// ForceSendFields is a list of field names (e.g. "AdminManagedRestrictions")
  1542  	// to unconditionally include in API requests. By default, fields with empty or
  1543  	// default values are omitted from API requests. See
  1544  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1545  	// details.
  1546  	ForceSendFields []string `json:"-"`
  1547  	// NullFields is a list of field names (e.g. "AdminManagedRestrictions") to
  1548  	// include in API requests with the JSON null value. By default, fields with
  1549  	// empty values are omitted from API requests. See
  1550  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1551  	NullFields []string `json:"-"`
  1552  }
  1553  
  1554  func (s *DriveRestrictions) MarshalJSON() ([]byte, error) {
  1555  	type NoMethod DriveRestrictions
  1556  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1557  }
  1558  
  1559  // DriveList: A list of shared drives.
  1560  type DriveList struct {
  1561  	// Items: The list of shared drives. If nextPageToken is populated, then this
  1562  	// list may be incomplete and an additional page of results should be fetched.
  1563  	Items []*Drive `json:"items,omitempty"`
  1564  	// Kind: This is always `drive#driveList`
  1565  	Kind string `json:"kind,omitempty"`
  1566  	// NextPageToken: The page token for the next page of shared drives. This will
  1567  	// be absent if the end of the list has been reached. If the token is rejected
  1568  	// for any reason, it should be discarded, and pagination should be restarted
  1569  	// from the first page of results.
  1570  	NextPageToken string `json:"nextPageToken,omitempty"`
  1571  
  1572  	// ServerResponse contains the HTTP response code and headers from the server.
  1573  	googleapi.ServerResponse `json:"-"`
  1574  	// ForceSendFields is a list of field names (e.g. "Items") to unconditionally
  1575  	// include in API requests. By default, fields with empty or default values are
  1576  	// omitted from API requests. See
  1577  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1578  	// details.
  1579  	ForceSendFields []string `json:"-"`
  1580  	// NullFields is a list of field names (e.g. "Items") to include in API
  1581  	// requests with the JSON null value. By default, fields with empty values are
  1582  	// omitted from API requests. See
  1583  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1584  	NullFields []string `json:"-"`
  1585  }
  1586  
  1587  func (s *DriveList) MarshalJSON() ([]byte, error) {
  1588  	type NoMethod DriveList
  1589  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1590  }
  1591  
  1592  // File: The metadata for a file. Some resource methods (such as
  1593  // `files.update`) require a `fileId`. Use the `files.list` method to retrieve
  1594  // the ID for a file.
  1595  type File struct {
  1596  	// AlternateLink: Output only. A link for opening the file in a relevant Google
  1597  	// editor or viewer.
  1598  	AlternateLink string `json:"alternateLink,omitempty"`
  1599  	// AppDataContents: Output only. Whether this file is in the Application Data
  1600  	// folder.
  1601  	AppDataContents bool `json:"appDataContents,omitempty"`
  1602  	// CanComment: Output only. Deprecated: Use `capabilities/canComment` instead.
  1603  	CanComment bool `json:"canComment,omitempty"`
  1604  	// CanReadRevisions: Output only. Deprecated: Use
  1605  	// `capabilities/canReadRevisions` instead.
  1606  	CanReadRevisions bool `json:"canReadRevisions,omitempty"`
  1607  	// Capabilities: Output only. Capabilities the current user has on this file.
  1608  	// Each capability corresponds to a fine-grained action that a user may take.
  1609  	Capabilities *FileCapabilities `json:"capabilities,omitempty"`
  1610  	// ContentRestrictions: Restrictions for accessing the content of the file.
  1611  	// Only populated if such a restriction exists.
  1612  	ContentRestrictions []*ContentRestriction `json:"contentRestrictions,omitempty"`
  1613  	// CopyRequiresWriterPermission: Whether the options to copy, print, or
  1614  	// download this file, should be disabled for readers and commenters.
  1615  	CopyRequiresWriterPermission bool `json:"copyRequiresWriterPermission,omitempty"`
  1616  	// Copyable: Output only. Deprecated: Use `capabilities/canCopy` instead.
  1617  	Copyable bool `json:"copyable,omitempty"`
  1618  	// CreatedDate: Create time for this file (formatted RFC 3339 timestamp).
  1619  	CreatedDate string `json:"createdDate,omitempty"`
  1620  	// DefaultOpenWithLink: Output only. A link to open this file with the user's
  1621  	// default app for this file. Only populated when the drive.apps.readonly scope
  1622  	// is used.
  1623  	DefaultOpenWithLink string `json:"defaultOpenWithLink,omitempty"`
  1624  	// Description: A short description of the file.
  1625  	Description string `json:"description,omitempty"`
  1626  	// DownloadUrl: Output only. Short lived download URL for the file. This field
  1627  	// is only populated for files with content stored in Google Drive; it is not
  1628  	// populated for Google Docs or shortcut files.
  1629  	DownloadUrl string `json:"downloadUrl,omitempty"`
  1630  	// DriveId: Output only. ID of the shared drive the file resides in. Only
  1631  	// populated for items in shared drives.
  1632  	DriveId string `json:"driveId,omitempty"`
  1633  	// Editable: Output only. Deprecated: Use `capabilities/canEdit` instead.
  1634  	Editable bool `json:"editable,omitempty"`
  1635  	// EmbedLink: Output only. A link for embedding the file.
  1636  	EmbedLink string `json:"embedLink,omitempty"`
  1637  	// Etag: Output only. ETag of the file.
  1638  	Etag string `json:"etag,omitempty"`
  1639  	// ExplicitlyTrashed: Output only. Whether this file has been explicitly
  1640  	// trashed, as opposed to recursively trashed.
  1641  	ExplicitlyTrashed bool `json:"explicitlyTrashed,omitempty"`
  1642  	// ExportLinks: Output only. Links for exporting Docs Editors files to specific
  1643  	// formats.
  1644  	ExportLinks map[string]string `json:"exportLinks,omitempty"`
  1645  	// FileExtension: Output only. The final component of `fullFileExtension` with
  1646  	// trailing text that does not appear to be part of the extension removed. This
  1647  	// field is only populated for files with content stored in Google Drive; it is
  1648  	// not populated for Docs Editors or shortcut files.
  1649  	FileExtension string `json:"fileExtension,omitempty"`
  1650  	// FileSize: Output only. Size in bytes of blobs and first party editor files.
  1651  	// Won't be populated for files that have no size, like shortcuts and folders.
  1652  	FileSize int64 `json:"fileSize,omitempty,string"`
  1653  	// FolderColorRgb: Folder color as an RGB hex string if the file is a folder or
  1654  	// a shortcut to a folder. The list of supported colors is available in the
  1655  	// folderColorPalette field of the About resource. If an unsupported color is
  1656  	// specified, it will be changed to the closest color in the palette.
  1657  	FolderColorRgb string `json:"folderColorRgb,omitempty"`
  1658  	// FullFileExtension: Output only. The full file extension; extracted from the
  1659  	// title. May contain multiple concatenated extensions, such as "tar.gz".
  1660  	// Removing an extension from the title does not clear this field; however,
  1661  	// changing the extension on the title does update this field. This field is
  1662  	// only populated for files with content stored in Google Drive; it is not
  1663  	// populated for Docs Editors or shortcut files.
  1664  	FullFileExtension string `json:"fullFileExtension,omitempty"`
  1665  	// HasAugmentedPermissions: Output only. Whether there are permissions directly
  1666  	// on this file. This field is only populated for items in shared drives.
  1667  	HasAugmentedPermissions bool `json:"hasAugmentedPermissions,omitempty"`
  1668  	// HasThumbnail: Output only. Whether this file has a thumbnail. This does not
  1669  	// indicate whether the requesting app has access to the thumbnail. To check
  1670  	// access, look for the presence of the thumbnailLink field.
  1671  	HasThumbnail bool `json:"hasThumbnail,omitempty"`
  1672  	// HeadRevisionId: Output only. The ID of the file's head revision. This field
  1673  	// is only populated for files with content stored in Google Drive; it is not
  1674  	// populated for Docs Editors or shortcut files.
  1675  	HeadRevisionId string `json:"headRevisionId,omitempty"`
  1676  	// IconLink: Output only. A link to the file's icon.
  1677  	IconLink string `json:"iconLink,omitempty"`
  1678  	// Id: The ID of the file.
  1679  	Id string `json:"id,omitempty"`
  1680  	// ImageMediaMetadata: Output only. Metadata about image media. This will only
  1681  	// be present for image types, and its contents will depend on what can be
  1682  	// parsed from the image content.
  1683  	ImageMediaMetadata *FileImageMediaMetadata `json:"imageMediaMetadata,omitempty"`
  1684  	// IndexableText: Indexable text attributes for the file (can only be written)
  1685  	IndexableText *FileIndexableText `json:"indexableText,omitempty"`
  1686  	// IsAppAuthorized: Output only. Whether the file was created or opened by the
  1687  	// requesting app.
  1688  	IsAppAuthorized bool `json:"isAppAuthorized,omitempty"`
  1689  	// Kind: Output only. The type of file. This is always `drive#file`.
  1690  	Kind string `json:"kind,omitempty"`
  1691  	// LabelInfo: Output only. An overview of the labels on the file.
  1692  	LabelInfo *FileLabelInfo `json:"labelInfo,omitempty"`
  1693  	// Labels: A group of labels for the file.
  1694  	Labels *FileLabels `json:"labels,omitempty"`
  1695  	// LastModifyingUser: Output only. The last user to modify this file.
  1696  	LastModifyingUser *User `json:"lastModifyingUser,omitempty"`
  1697  	// LastModifyingUserName: Output only. Name of the last user to modify this
  1698  	// file.
  1699  	LastModifyingUserName string `json:"lastModifyingUserName,omitempty"`
  1700  	// LastViewedByMeDate: Last time this file was viewed by the user (formatted
  1701  	// RFC 3339 timestamp).
  1702  	LastViewedByMeDate string `json:"lastViewedByMeDate,omitempty"`
  1703  	// LinkShareMetadata: Contains details about the link URLs that clients are
  1704  	// using to refer to this item.
  1705  	LinkShareMetadata *FileLinkShareMetadata `json:"linkShareMetadata,omitempty"`
  1706  	// MarkedViewedByMeDate: Deprecated.
  1707  	MarkedViewedByMeDate string `json:"markedViewedByMeDate,omitempty"`
  1708  	// Md5Checksum: Output only. An MD5 checksum for the content of this file. This
  1709  	// field is only populated for files with content stored in Google Drive; it is
  1710  	// not populated for Docs Editors or shortcut files.
  1711  	Md5Checksum string `json:"md5Checksum,omitempty"`
  1712  	// MimeType: The MIME type of the file. This is only mutable on update when
  1713  	// uploading new content. This field can be left blank, and the mimetype will
  1714  	// be determined from the uploaded content's MIME type.
  1715  	MimeType string `json:"mimeType,omitempty"`
  1716  	// ModifiedByMeDate: Last time this file was modified by the user (formatted
  1717  	// RFC 3339 timestamp). Note that setting modifiedDate will also update the
  1718  	// modifiedByMe date for the user which set the date.
  1719  	ModifiedByMeDate string `json:"modifiedByMeDate,omitempty"`
  1720  	// ModifiedDate: Last time this file was modified by anyone (formatted RFC 3339
  1721  	// timestamp). This is only mutable on update when the setModifiedDate
  1722  	// parameter is set.
  1723  	ModifiedDate string `json:"modifiedDate,omitempty"`
  1724  	// OpenWithLinks: Output only. A map of the id of each of the user's apps to a
  1725  	// link to open this file with that app. Only populated when the
  1726  	// drive.apps.readonly scope is used.
  1727  	OpenWithLinks map[string]string `json:"openWithLinks,omitempty"`
  1728  	// OriginalFilename: The original filename of the uploaded content if
  1729  	// available, or else the original value of the `title` field. This is only
  1730  	// available for files with binary content in Google Drive.
  1731  	OriginalFilename string `json:"originalFilename,omitempty"`
  1732  	// OwnedByMe: Output only. Whether the file is owned by the current user. Not
  1733  	// populated for items in shared drives.
  1734  	OwnedByMe bool `json:"ownedByMe,omitempty"`
  1735  	// OwnerNames: Output only. Name(s) of the owner(s) of this file. Not populated
  1736  	// for items in shared drives.
  1737  	OwnerNames []string `json:"ownerNames,omitempty"`
  1738  	// Owners: Output only. The owner of this file. Only certain legacy files may
  1739  	// have more than one owner. This field isn't populated for items in shared
  1740  	// drives.
  1741  	Owners []*User `json:"owners,omitempty"`
  1742  	// Parents: Collection of parent folders which contain this file. If not
  1743  	// specified as part of an insert request, the file will be placed directly in
  1744  	// the user's My Drive folder. If not specified as part of a copy request, the
  1745  	// file will inherit any discoverable parents of the source file. Update
  1746  	// requests can also use the `addParents` and `removeParents` parameters to
  1747  	// modify the parents list.
  1748  	Parents []*ParentReference `json:"parents,omitempty"`
  1749  	// PermissionIds: Output only. List of permission IDs for users with access to
  1750  	// this file.
  1751  	PermissionIds []string `json:"permissionIds,omitempty"`
  1752  	// Permissions: Output only. The list of permissions for users with access to
  1753  	// this file. Not populated for items in shared drives.
  1754  	Permissions []*Permission `json:"permissions,omitempty"`
  1755  	// Properties: The list of properties.
  1756  	Properties []*Property `json:"properties,omitempty"`
  1757  	// QuotaBytesUsed: Output only. The number of quota bytes used by this file.
  1758  	QuotaBytesUsed int64 `json:"quotaBytesUsed,omitempty,string"`
  1759  	// ResourceKey: Output only. A key needed to access the item via a shared link.
  1760  	ResourceKey string `json:"resourceKey,omitempty"`
  1761  	// SelfLink: Output only. A link back to this file.
  1762  	SelfLink string `json:"selfLink,omitempty"`
  1763  	// Sha1Checksum: Output only. The SHA1 checksum associated with this file, if
  1764  	// available. This field is only populated for files with content stored in
  1765  	// Google Drive; it is not populated for Docs Editors or shortcut files.
  1766  	Sha1Checksum string `json:"sha1Checksum,omitempty"`
  1767  	// Sha256Checksum: Output only. The SHA256 checksum associated with this file,
  1768  	// if available. This field is only populated for files with content stored in
  1769  	// Google Drive; it is not populated for Docs Editors or shortcut files.
  1770  	Sha256Checksum string `json:"sha256Checksum,omitempty"`
  1771  	// Shareable: Output only. Deprecated: Use `capabilities/canShare` instead.
  1772  	Shareable bool `json:"shareable,omitempty"`
  1773  	// Shared: Output only. Whether the file has been shared. Not populated for
  1774  	// items in shared drives.
  1775  	Shared bool `json:"shared,omitempty"`
  1776  	// SharedWithMeDate: Time at which this file was shared with the user
  1777  	// (formatted RFC 3339 timestamp).
  1778  	SharedWithMeDate string `json:"sharedWithMeDate,omitempty"`
  1779  	// SharingUser: Output only. User that shared the item with the current user,
  1780  	// if available.
  1781  	SharingUser *User `json:"sharingUser,omitempty"`
  1782  	// ShortcutDetails: Shortcut file details. Only populated for shortcut files,
  1783  	// which have the mimeType field set to `application/vnd.google-apps.shortcut`.
  1784  	ShortcutDetails *FileShortcutDetails `json:"shortcutDetails,omitempty"`
  1785  	// Spaces: Output only. The list of spaces which contain the file. Supported
  1786  	// values are `drive`, `appDataFolder` and `photos`.
  1787  	Spaces []string `json:"spaces,omitempty"`
  1788  	// TeamDriveId: Output only. Deprecated: Use `driveId` instead.
  1789  	TeamDriveId string `json:"teamDriveId,omitempty"`
  1790  	// Thumbnail: A thumbnail for the file. This will only be used if a standard
  1791  	// thumbnail cannot be generated.
  1792  	Thumbnail *FileThumbnail `json:"thumbnail,omitempty"`
  1793  	// ThumbnailLink: Output only. A short-lived link to the file's thumbnail, if
  1794  	// available. Typically lasts on the order of hours. Only populated when the
  1795  	// requesting app can access the file's content. If the file isn't shared
  1796  	// publicly, the URL returned in `Files.thumbnailLink` must be fetched using a
  1797  	// credentialed request.
  1798  	ThumbnailLink string `json:"thumbnailLink,omitempty"`
  1799  	// ThumbnailVersion: Output only. The thumbnail version for use in thumbnail
  1800  	// cache invalidation.
  1801  	ThumbnailVersion int64 `json:"thumbnailVersion,omitempty,string"`
  1802  	// Title: The title of this file. Note that for immutable items such as the top
  1803  	// level folders of shared drives, My Drive root folder, and Application Data
  1804  	// folder the title is constant.
  1805  	Title string `json:"title,omitempty"`
  1806  	// TrashedDate: The time that the item was trashed (formatted RFC 3339
  1807  	// timestamp). Only populated for items in shared drives.
  1808  	TrashedDate string `json:"trashedDate,omitempty"`
  1809  	// TrashingUser: Output only. If the file has been explicitly trashed, the user
  1810  	// who trashed it. Only populated for items in shared drives.
  1811  	TrashingUser *User `json:"trashingUser,omitempty"`
  1812  	// UserPermission: Output only. The permissions for the authenticated user on
  1813  	// this file.
  1814  	UserPermission *Permission `json:"userPermission,omitempty"`
  1815  	// Version: Output only. A monotonically increasing version number for the
  1816  	// file. This reflects every change made to the file on the server, even those
  1817  	// not visible to the requesting user.
  1818  	Version int64 `json:"version,omitempty,string"`
  1819  	// VideoMediaMetadata: Output only. Metadata about video media. This will only
  1820  	// be present for video types.
  1821  	VideoMediaMetadata *FileVideoMediaMetadata `json:"videoMediaMetadata,omitempty"`
  1822  	// WebContentLink: Output only. A link for downloading the content of the file
  1823  	// in a browser using cookie based authentication. In cases where the content
  1824  	// is shared publicly, the content can be downloaded without any credentials.
  1825  	WebContentLink string `json:"webContentLink,omitempty"`
  1826  	// WebViewLink: Output only. A link only available on public folders for
  1827  	// viewing their static web assets (HTML, CSS, JS, etc) via Google Drive's
  1828  	// Website Hosting.
  1829  	WebViewLink string `json:"webViewLink,omitempty"`
  1830  	// WritersCanShare: Whether writers can share the document with other users.
  1831  	// Not populated for items in shared drives.
  1832  	WritersCanShare bool `json:"writersCanShare,omitempty"`
  1833  
  1834  	// ServerResponse contains the HTTP response code and headers from the server.
  1835  	googleapi.ServerResponse `json:"-"`
  1836  	// ForceSendFields is a list of field names (e.g. "AlternateLink") to
  1837  	// unconditionally include in API requests. By default, fields with empty or
  1838  	// default values are omitted from API requests. See
  1839  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1840  	// details.
  1841  	ForceSendFields []string `json:"-"`
  1842  	// NullFields is a list of field names (e.g. "AlternateLink") to include in API
  1843  	// requests with the JSON null value. By default, fields with empty values are
  1844  	// omitted from API requests. See
  1845  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1846  	NullFields []string `json:"-"`
  1847  }
  1848  
  1849  func (s *File) MarshalJSON() ([]byte, error) {
  1850  	type NoMethod File
  1851  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1852  }
  1853  
  1854  // FileCapabilities: Output only. Capabilities the current user has on this
  1855  // file. Each capability corresponds to a fine-grained action that a user may
  1856  // take.
  1857  type FileCapabilities struct {
  1858  	// CanAcceptOwnership: Output only. Whether the current user is the pending
  1859  	// owner of the file. Not populated for shared drive files.
  1860  	CanAcceptOwnership bool `json:"canAcceptOwnership,omitempty"`
  1861  	// CanAddChildren: Output only. Whether the current user can add children to
  1862  	// this folder. This is always false when the item is not a folder.
  1863  	CanAddChildren bool `json:"canAddChildren,omitempty"`
  1864  	// CanAddFolderFromAnotherDrive: Output only. Whether the current user can add
  1865  	// a folder from another drive (different shared drive or My Drive) to this
  1866  	// folder. This is false when the item is not a folder. Only populated for
  1867  	// items in shared drives.
  1868  	CanAddFolderFromAnotherDrive bool `json:"canAddFolderFromAnotherDrive,omitempty"`
  1869  	// CanAddMyDriveParent: Output only. Whether the current user can add a parent
  1870  	// for the item without removing an existing parent in the same request. Not
  1871  	// populated for shared drive files.
  1872  	CanAddMyDriveParent bool `json:"canAddMyDriveParent,omitempty"`
  1873  	// CanChangeCopyRequiresWriterPermission: Output only. Whether the current user
  1874  	// can change the `copyRequiresWriterPermission` restriction of this file.
  1875  	CanChangeCopyRequiresWriterPermission bool `json:"canChangeCopyRequiresWriterPermission,omitempty"`
  1876  	// CanChangeRestrictedDownload: Output only. Deprecated.
  1877  	CanChangeRestrictedDownload bool `json:"canChangeRestrictedDownload,omitempty"`
  1878  	// CanChangeSecurityUpdateEnabled: Output only. Whether the current user can
  1879  	// change the securityUpdateEnabled field on link share metadata.
  1880  	CanChangeSecurityUpdateEnabled bool `json:"canChangeSecurityUpdateEnabled,omitempty"`
  1881  	// CanComment: Output only. Whether the current user can comment on this file.
  1882  	CanComment bool `json:"canComment,omitempty"`
  1883  	// CanCopy: Output only. Whether the current user can copy this file. For an
  1884  	// item in a shared drive, whether the current user can copy non-folder
  1885  	// descendants of this item, or this item itself if it is not a folder.
  1886  	CanCopy bool `json:"canCopy,omitempty"`
  1887  	// CanDelete: Output only. Whether the current user can delete this file.
  1888  	CanDelete bool `json:"canDelete,omitempty"`
  1889  	// CanDeleteChildren: Output only. Whether the current user can delete children
  1890  	// of this folder. This is false when the item is not a folder. Only populated
  1891  	// for items in shared drives.
  1892  	CanDeleteChildren bool `json:"canDeleteChildren,omitempty"`
  1893  	// CanDownload: Output only. Whether the current user can download this file.
  1894  	CanDownload bool `json:"canDownload,omitempty"`
  1895  	// CanEdit: Output only. Whether the current user can edit this file. Other
  1896  	// factors may limit the type of changes a user can make to a file. For
  1897  	// example, see `canChangeCopyRequiresWriterPermission` or `canModifyContent`.
  1898  	CanEdit bool `json:"canEdit,omitempty"`
  1899  	// CanListChildren: Output only. Whether the current user can list the children
  1900  	// of this folder. This is always false when the item is not a folder.
  1901  	CanListChildren bool `json:"canListChildren,omitempty"`
  1902  	// CanModifyContent: Output only. Whether the current user can modify the
  1903  	// content of this file.
  1904  	CanModifyContent bool `json:"canModifyContent,omitempty"`
  1905  	// CanModifyContentRestriction: Deprecated: Output only. Use one of
  1906  	// `canModifyEditorContentRestriction`, `canModifyOwnerContentRestriction` or
  1907  	// `canRemoveContentRestriction`.
  1908  	CanModifyContentRestriction bool `json:"canModifyContentRestriction,omitempty"`
  1909  	// CanModifyEditorContentRestriction: Output only. Whether the current user can
  1910  	// add or modify content restrictions on the file which are editor restricted.
  1911  	CanModifyEditorContentRestriction bool `json:"canModifyEditorContentRestriction,omitempty"`
  1912  	// CanModifyLabels: Output only. Whether the current user can modify the labels
  1913  	// on the file.
  1914  	CanModifyLabels bool `json:"canModifyLabels,omitempty"`
  1915  	// CanModifyOwnerContentRestriction: Output only. Whether the current user can
  1916  	// add or modify content restrictions which are owner restricted.
  1917  	CanModifyOwnerContentRestriction bool `json:"canModifyOwnerContentRestriction,omitempty"`
  1918  	// CanMoveChildrenOutOfDrive: Output only. Whether the current user can move
  1919  	// children of this folder outside of the shared drive. This is false when the
  1920  	// item is not a folder. Only populated for items in shared drives.
  1921  	CanMoveChildrenOutOfDrive bool `json:"canMoveChildrenOutOfDrive,omitempty"`
  1922  	// CanMoveChildrenOutOfTeamDrive: Output only. Deprecated: Use
  1923  	// `canMoveChildrenOutOfDrive` instead.
  1924  	CanMoveChildrenOutOfTeamDrive bool `json:"canMoveChildrenOutOfTeamDrive,omitempty"`
  1925  	// CanMoveChildrenWithinDrive: Output only. Whether the current user can move
  1926  	// children of this folder within this drive. This is false when the item is
  1927  	// not a folder. Note that a request to move the child may still fail depending
  1928  	// on the current user's access to the child and to the destination folder.
  1929  	CanMoveChildrenWithinDrive bool `json:"canMoveChildrenWithinDrive,omitempty"`
  1930  	// CanMoveChildrenWithinTeamDrive: Output only. Deprecated: Use
  1931  	// `canMoveChildrenWithinDrive` instead.
  1932  	CanMoveChildrenWithinTeamDrive bool `json:"canMoveChildrenWithinTeamDrive,omitempty"`
  1933  	// CanMoveItemIntoTeamDrive: Output only. Deprecated: Use
  1934  	// `canMoveItemOutOfDrive` instead.
  1935  	CanMoveItemIntoTeamDrive bool `json:"canMoveItemIntoTeamDrive,omitempty"`
  1936  	// CanMoveItemOutOfDrive: Output only. Whether the current user can move this
  1937  	// item outside of this drive by changing its parent. Note that a request to
  1938  	// change the parent of the item may still fail depending on the new parent
  1939  	// that is being added.
  1940  	CanMoveItemOutOfDrive bool `json:"canMoveItemOutOfDrive,omitempty"`
  1941  	// CanMoveItemOutOfTeamDrive: Output only. Deprecated: Use
  1942  	// `canMoveItemOutOfDrive` instead.
  1943  	CanMoveItemOutOfTeamDrive bool `json:"canMoveItemOutOfTeamDrive,omitempty"`
  1944  	// CanMoveItemWithinDrive: Output only. Whether the current user can move this
  1945  	// item within this drive. Note that a request to change the parent of the item
  1946  	// may still fail depending on the new parent that is being added and the
  1947  	// parent that is being removed.
  1948  	CanMoveItemWithinDrive bool `json:"canMoveItemWithinDrive,omitempty"`
  1949  	// CanMoveItemWithinTeamDrive: Output only. Deprecated: Use
  1950  	// `canMoveItemWithinDrive` instead.
  1951  	CanMoveItemWithinTeamDrive bool `json:"canMoveItemWithinTeamDrive,omitempty"`
  1952  	// CanMoveTeamDriveItem: Output only. Deprecated: Use `canMoveItemWithinDrive`
  1953  	// or `canMoveItemOutOfDrive` instead.
  1954  	CanMoveTeamDriveItem bool `json:"canMoveTeamDriveItem,omitempty"`
  1955  	// CanReadDrive: Output only. Whether the current user can read the shared
  1956  	// drive to which this file belongs. Only populated for items in shared drives.
  1957  	CanReadDrive bool `json:"canReadDrive,omitempty"`
  1958  	// CanReadLabels: Output only. Whether the current user can read the labels on
  1959  	// the file.
  1960  	CanReadLabels bool `json:"canReadLabels,omitempty"`
  1961  	// CanReadRevisions: Output only. Whether the current user can read the
  1962  	// revisions resource of this file. For a shared drive item, whether revisions
  1963  	// of non-folder descendants of this item, or this item itself if it is not a
  1964  	// folder, can be read.
  1965  	CanReadRevisions bool `json:"canReadRevisions,omitempty"`
  1966  	// CanReadTeamDrive: Output only. Deprecated: Use `canReadDrive` instead.
  1967  	CanReadTeamDrive bool `json:"canReadTeamDrive,omitempty"`
  1968  	// CanRemoveChildren: Output only. Whether the current user can remove children
  1969  	// from this folder. This is always false when the item is not a folder. For a
  1970  	// folder in a shared drive, use `canDeleteChildren` or `canTrashChildren`
  1971  	// instead.
  1972  	CanRemoveChildren bool `json:"canRemoveChildren,omitempty"`
  1973  	// CanRemoveContentRestriction: Output only. Whether there is a content
  1974  	// restriction on the file that can be removed by the current user.
  1975  	CanRemoveContentRestriction bool `json:"canRemoveContentRestriction,omitempty"`
  1976  	// CanRemoveMyDriveParent: Output only. Whether the current user can remove a
  1977  	// parent from the item without adding another parent in the same request. Not
  1978  	// populated for shared drive files.
  1979  	CanRemoveMyDriveParent bool `json:"canRemoveMyDriveParent,omitempty"`
  1980  	// CanRename: Output only. Whether the current user can rename this file.
  1981  	CanRename bool `json:"canRename,omitempty"`
  1982  	// CanShare: Output only. Whether the current user can modify the sharing
  1983  	// settings for this file.
  1984  	CanShare bool `json:"canShare,omitempty"`
  1985  	// CanTrash: Output only. Whether the current user can move this file to trash.
  1986  	CanTrash bool `json:"canTrash,omitempty"`
  1987  	// CanTrashChildren: Output only. Whether the current user can trash children
  1988  	// of this folder. This is false when the item is not a folder. Only populated
  1989  	// for items in shared drives.
  1990  	CanTrashChildren bool `json:"canTrashChildren,omitempty"`
  1991  	// CanUntrash: Output only. Whether the current user can restore this file from
  1992  	// trash.
  1993  	CanUntrash bool `json:"canUntrash,omitempty"`
  1994  	// ForceSendFields is a list of field names (e.g. "CanAcceptOwnership") to
  1995  	// unconditionally include in API requests. By default, fields with empty or
  1996  	// default values are omitted from API requests. See
  1997  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1998  	// details.
  1999  	ForceSendFields []string `json:"-"`
  2000  	// NullFields is a list of field names (e.g. "CanAcceptOwnership") to include
  2001  	// in API requests with the JSON null value. By default, fields with empty
  2002  	// values are omitted from API requests. See
  2003  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  2004  	NullFields []string `json:"-"`
  2005  }
  2006  
  2007  func (s *FileCapabilities) MarshalJSON() ([]byte, error) {
  2008  	type NoMethod FileCapabilities
  2009  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  2010  }
  2011  
  2012  // FileImageMediaMetadata: Output only. Metadata about image media. This will
  2013  // only be present for image types, and its contents will depend on what can be
  2014  // parsed from the image content.
  2015  type FileImageMediaMetadata struct {
  2016  	// Aperture: Output only. The aperture used to create the photo (f-number).
  2017  	Aperture float64 `json:"aperture,omitempty"`
  2018  	// CameraMake: Output only. The make of the camera used to create the photo.
  2019  	CameraMake string `json:"cameraMake,omitempty"`
  2020  	// CameraModel: Output only. The model of the camera used to create the photo.
  2021  	CameraModel string `json:"cameraModel,omitempty"`
  2022  	// ColorSpace: Output only. The color space of the photo.
  2023  	ColorSpace string `json:"colorSpace,omitempty"`
  2024  	// Date: Output only. The date and time the photo was taken (EXIF format
  2025  	// timestamp).
  2026  	Date string `json:"date,omitempty"`
  2027  	// ExposureBias: Output only. The exposure bias of the photo (APEX value).
  2028  	ExposureBias float64 `json:"exposureBias,omitempty"`
  2029  	// ExposureMode: Output only. The exposure mode used to create the photo.
  2030  	ExposureMode string `json:"exposureMode,omitempty"`
  2031  	// ExposureTime: Output only. The length of the exposure, in seconds.
  2032  	ExposureTime float64 `json:"exposureTime,omitempty"`
  2033  	// FlashUsed: Output only. Whether a flash was used to create the photo.
  2034  	FlashUsed bool `json:"flashUsed,omitempty"`
  2035  	// FocalLength: Output only. The focal length used to create the photo, in
  2036  	// millimeters.
  2037  	FocalLength float64 `json:"focalLength,omitempty"`
  2038  	// Height: Output only. The height of the image in pixels.
  2039  	Height int64 `json:"height,omitempty"`
  2040  	// IsoSpeed: Output only. The ISO speed used to create the photo.
  2041  	IsoSpeed int64 `json:"isoSpeed,omitempty"`
  2042  	// Lens: Output only. The lens used to create the photo.
  2043  	Lens string `json:"lens,omitempty"`
  2044  	// Location: Output only. Geographic location information stored in the image.
  2045  	Location *FileImageMediaMetadataLocation `json:"location,omitempty"`
  2046  	// MaxApertureValue: Output only. The smallest f-number of the lens at the
  2047  	// focal length used to create the photo (APEX value).
  2048  	MaxApertureValue float64 `json:"maxApertureValue,omitempty"`
  2049  	// MeteringMode: Output only. The metering mode used to create the photo.
  2050  	MeteringMode string `json:"meteringMode,omitempty"`
  2051  	// Rotation: Output only. The number of clockwise 90 degree rotations applied
  2052  	// from the image's original orientation.
  2053  	Rotation int64 `json:"rotation,omitempty"`
  2054  	// Sensor: Output only. The type of sensor used to create the photo.
  2055  	Sensor string `json:"sensor,omitempty"`
  2056  	// SubjectDistance: Output only. The distance to the subject of the photo, in
  2057  	// meters.
  2058  	SubjectDistance int64 `json:"subjectDistance,omitempty"`
  2059  	// WhiteBalance: Output only. The white balance mode used to create the photo.
  2060  	WhiteBalance string `json:"whiteBalance,omitempty"`
  2061  	// Width: Output only. The width of the image in pixels.
  2062  	Width int64 `json:"width,omitempty"`
  2063  	// ForceSendFields is a list of field names (e.g. "Aperture") to
  2064  	// unconditionally include in API requests. By default, fields with empty or
  2065  	// default values are omitted from API requests. See
  2066  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  2067  	// details.
  2068  	ForceSendFields []string `json:"-"`
  2069  	// NullFields is a list of field names (e.g. "Aperture") to include in API
  2070  	// requests with the JSON null value. By default, fields with empty values are
  2071  	// omitted from API requests. See
  2072  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  2073  	NullFields []string `json:"-"`
  2074  }
  2075  
  2076  func (s *FileImageMediaMetadata) MarshalJSON() ([]byte, error) {
  2077  	type NoMethod FileImageMediaMetadata
  2078  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  2079  }
  2080  
  2081  func (s *FileImageMediaMetadata) UnmarshalJSON(data []byte) error {
  2082  	type NoMethod FileImageMediaMetadata
  2083  	var s1 struct {
  2084  		Aperture         gensupport.JSONFloat64 `json:"aperture"`
  2085  		ExposureBias     gensupport.JSONFloat64 `json:"exposureBias"`
  2086  		ExposureTime     gensupport.JSONFloat64 `json:"exposureTime"`
  2087  		FocalLength      gensupport.JSONFloat64 `json:"focalLength"`
  2088  		MaxApertureValue gensupport.JSONFloat64 `json:"maxApertureValue"`
  2089  		*NoMethod
  2090  	}
  2091  	s1.NoMethod = (*NoMethod)(s)
  2092  	if err := json.Unmarshal(data, &s1); err != nil {
  2093  		return err
  2094  	}
  2095  	s.Aperture = float64(s1.Aperture)
  2096  	s.ExposureBias = float64(s1.ExposureBias)
  2097  	s.ExposureTime = float64(s1.ExposureTime)
  2098  	s.FocalLength = float64(s1.FocalLength)
  2099  	s.MaxApertureValue = float64(s1.MaxApertureValue)
  2100  	return nil
  2101  }
  2102  
  2103  // FileImageMediaMetadataLocation: Output only. Geographic location information
  2104  // stored in the image.
  2105  type FileImageMediaMetadataLocation struct {
  2106  	// Altitude: Output only. The altitude stored in the image.
  2107  	Altitude float64 `json:"altitude,omitempty"`
  2108  	// Latitude: Output only. The latitude stored in the image.
  2109  	Latitude float64 `json:"latitude,omitempty"`
  2110  	// Longitude: Output only. The longitude stored in the image.
  2111  	Longitude float64 `json:"longitude,omitempty"`
  2112  	// ForceSendFields is a list of field names (e.g. "Altitude") to
  2113  	// unconditionally include in API requests. By default, fields with empty or
  2114  	// default values are omitted from API requests. See
  2115  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  2116  	// details.
  2117  	ForceSendFields []string `json:"-"`
  2118  	// NullFields is a list of field names (e.g. "Altitude") to include in API
  2119  	// requests with the JSON null value. By default, fields with empty values are
  2120  	// omitted from API requests. See
  2121  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  2122  	NullFields []string `json:"-"`
  2123  }
  2124  
  2125  func (s *FileImageMediaMetadataLocation) MarshalJSON() ([]byte, error) {
  2126  	type NoMethod FileImageMediaMetadataLocation
  2127  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  2128  }
  2129  
  2130  func (s *FileImageMediaMetadataLocation) UnmarshalJSON(data []byte) error {
  2131  	type NoMethod FileImageMediaMetadataLocation
  2132  	var s1 struct {
  2133  		Altitude  gensupport.JSONFloat64 `json:"altitude"`
  2134  		Latitude  gensupport.JSONFloat64 `json:"latitude"`
  2135  		Longitude gensupport.JSONFloat64 `json:"longitude"`
  2136  		*NoMethod
  2137  	}
  2138  	s1.NoMethod = (*NoMethod)(s)
  2139  	if err := json.Unmarshal(data, &s1); err != nil {
  2140  		return err
  2141  	}
  2142  	s.Altitude = float64(s1.Altitude)
  2143  	s.Latitude = float64(s1.Latitude)
  2144  	s.Longitude = float64(s1.Longitude)
  2145  	return nil
  2146  }
  2147  
  2148  // FileIndexableText: Indexable text attributes for the file (can only be
  2149  // written)
  2150  type FileIndexableText struct {
  2151  	// Text: The text to be indexed for this file.
  2152  	Text string `json:"text,omitempty"`
  2153  	// ForceSendFields is a list of field names (e.g. "Text") to unconditionally
  2154  	// include in API requests. By default, fields with empty or default values are
  2155  	// omitted from API requests. See
  2156  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  2157  	// details.
  2158  	ForceSendFields []string `json:"-"`
  2159  	// NullFields is a list of field names (e.g. "Text") to include in API requests
  2160  	// with the JSON null value. By default, fields with empty values are omitted
  2161  	// from API requests. See
  2162  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  2163  	NullFields []string `json:"-"`
  2164  }
  2165  
  2166  func (s *FileIndexableText) MarshalJSON() ([]byte, error) {
  2167  	type NoMethod FileIndexableText
  2168  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  2169  }
  2170  
  2171  // FileLabelInfo: Output only. An overview of the labels on the file.
  2172  type FileLabelInfo struct {
  2173  	// Labels: Output only. The set of labels on the file as requested by the label
  2174  	// IDs in the `includeLabels` parameter. By default, no labels are returned.
  2175  	Labels []*Label `json:"labels,omitempty"`
  2176  	// ForceSendFields is a list of field names (e.g. "Labels") to unconditionally
  2177  	// include in API requests. By default, fields with empty or default values are
  2178  	// omitted from API requests. See
  2179  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  2180  	// details.
  2181  	ForceSendFields []string `json:"-"`
  2182  	// NullFields is a list of field names (e.g. "Labels") to include in API
  2183  	// requests with the JSON null value. By default, fields with empty values are
  2184  	// omitted from API requests. See
  2185  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  2186  	NullFields []string `json:"-"`
  2187  }
  2188  
  2189  func (s *FileLabelInfo) MarshalJSON() ([]byte, error) {
  2190  	type NoMethod FileLabelInfo
  2191  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  2192  }
  2193  
  2194  // FileLabels: A group of labels for the file.
  2195  type FileLabels struct {
  2196  	// Hidden: Output only. Deprecated.
  2197  	Hidden bool `json:"hidden,omitempty"`
  2198  	// Modified: Output only. Whether the file has been modified by this user.
  2199  	Modified bool `json:"modified,omitempty"`
  2200  	// Restricted: Output only. Deprecated: Use `copyRequiresWriterPermission`
  2201  	// instead.
  2202  	Restricted bool `json:"restricted,omitempty"`
  2203  	// Starred: Whether this file is starred by the user.
  2204  	Starred bool `json:"starred,omitempty"`
  2205  	// Trashed: Whether this file has been trashed. This label applies to all users
  2206  	// accessing the file; however, only owners are allowed to see and untrash
  2207  	// files.
  2208  	Trashed bool `json:"trashed,omitempty"`
  2209  	// Viewed: Whether this file has been viewed by this user.
  2210  	Viewed bool `json:"viewed,omitempty"`
  2211  	// ForceSendFields is a list of field names (e.g. "Hidden") to unconditionally
  2212  	// include in API requests. By default, fields with empty or default values are
  2213  	// omitted from API requests. See
  2214  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  2215  	// details.
  2216  	ForceSendFields []string `json:"-"`
  2217  	// NullFields is a list of field names (e.g. "Hidden") to include in API
  2218  	// requests with the JSON null value. By default, fields with empty values are
  2219  	// omitted from API requests. See
  2220  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  2221  	NullFields []string `json:"-"`
  2222  }
  2223  
  2224  func (s *FileLabels) MarshalJSON() ([]byte, error) {
  2225  	type NoMethod FileLabels
  2226  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  2227  }
  2228  
  2229  // FileLinkShareMetadata: Contains details about the link URLs that clients are
  2230  // using to refer to this item.
  2231  type FileLinkShareMetadata struct {
  2232  	// SecurityUpdateEligible: Output only. Whether the file is eligible for
  2233  	// security update.
  2234  	SecurityUpdateEligible bool `json:"securityUpdateEligible,omitempty"`
  2235  	// SecurityUpdateEnabled: Output only. Whether the security update is enabled
  2236  	// for this file.
  2237  	SecurityUpdateEnabled bool `json:"securityUpdateEnabled,omitempty"`
  2238  	// ForceSendFields is a list of field names (e.g. "SecurityUpdateEligible") to
  2239  	// unconditionally include in API requests. By default, fields with empty or
  2240  	// default values are omitted from API requests. See
  2241  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  2242  	// details.
  2243  	ForceSendFields []string `json:"-"`
  2244  	// NullFields is a list of field names (e.g. "SecurityUpdateEligible") to
  2245  	// include in API requests with the JSON null value. By default, fields with
  2246  	// empty values are omitted from API requests. See
  2247  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  2248  	NullFields []string `json:"-"`
  2249  }
  2250  
  2251  func (s *FileLinkShareMetadata) MarshalJSON() ([]byte, error) {
  2252  	type NoMethod FileLinkShareMetadata
  2253  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  2254  }
  2255  
  2256  // FileShortcutDetails: Shortcut file details. Only populated for shortcut
  2257  // files, which have the mimeType field set to
  2258  // `application/vnd.google-apps.shortcut`.
  2259  type FileShortcutDetails struct {
  2260  	// TargetId: The ID of the file that this shortcut points to.
  2261  	TargetId string `json:"targetId,omitempty"`
  2262  	// TargetMimeType: Output only. The MIME type of the file that this shortcut
  2263  	// points to. The value of this field is a snapshot of the target's MIME type,
  2264  	// captured when the shortcut is created.
  2265  	TargetMimeType string `json:"targetMimeType,omitempty"`
  2266  	// TargetResourceKey: Output only. The ResourceKey for the target file.
  2267  	TargetResourceKey string `json:"targetResourceKey,omitempty"`
  2268  	// ForceSendFields is a list of field names (e.g. "TargetId") to
  2269  	// unconditionally include in API requests. By default, fields with empty or
  2270  	// default values are omitted from API requests. See
  2271  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  2272  	// details.
  2273  	ForceSendFields []string `json:"-"`
  2274  	// NullFields is a list of field names (e.g. "TargetId") to include in API
  2275  	// requests with the JSON null value. By default, fields with empty values are
  2276  	// omitted from API requests. See
  2277  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  2278  	NullFields []string `json:"-"`
  2279  }
  2280  
  2281  func (s *FileShortcutDetails) MarshalJSON() ([]byte, error) {
  2282  	type NoMethod FileShortcutDetails
  2283  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  2284  }
  2285  
  2286  // FileThumbnail: A thumbnail for the file. This will only be used if a
  2287  // standard thumbnail cannot be generated.
  2288  type FileThumbnail struct {
  2289  	// Image: The URL-safe Base64 encoded bytes of the thumbnail image. It should
  2290  	// conform to RFC 4648 section 5.
  2291  	Image string `json:"image,omitempty"`
  2292  	// MimeType: The MIME type of the thumbnail.
  2293  	MimeType string `json:"mimeType,omitempty"`
  2294  	// ForceSendFields is a list of field names (e.g. "Image") to unconditionally
  2295  	// include in API requests. By default, fields with empty or default values are
  2296  	// omitted from API requests. See
  2297  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  2298  	// details.
  2299  	ForceSendFields []string `json:"-"`
  2300  	// NullFields is a list of field names (e.g. "Image") to include in API
  2301  	// requests with the JSON null value. By default, fields with empty values are
  2302  	// omitted from API requests. See
  2303  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  2304  	NullFields []string `json:"-"`
  2305  }
  2306  
  2307  func (s *FileThumbnail) MarshalJSON() ([]byte, error) {
  2308  	type NoMethod FileThumbnail
  2309  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  2310  }
  2311  
  2312  // FileVideoMediaMetadata: Output only. Metadata about video media. This will
  2313  // only be present for video types.
  2314  type FileVideoMediaMetadata struct {
  2315  	// DurationMillis: Output only. The duration of the video in milliseconds.
  2316  	DurationMillis int64 `json:"durationMillis,omitempty,string"`
  2317  	// Height: Output only. The height of the video in pixels.
  2318  	Height int64 `json:"height,omitempty"`
  2319  	// Width: Output only. The width of the video in pixels.
  2320  	Width int64 `json:"width,omitempty"`
  2321  	// ForceSendFields is a list of field names (e.g. "DurationMillis") to
  2322  	// unconditionally include in API requests. By default, fields with empty or
  2323  	// default values are omitted from API requests. See
  2324  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  2325  	// details.
  2326  	ForceSendFields []string `json:"-"`
  2327  	// NullFields is a list of field names (e.g. "DurationMillis") to include in
  2328  	// API requests with the JSON null value. By default, fields with empty values
  2329  	// are omitted from API requests. See
  2330  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  2331  	NullFields []string `json:"-"`
  2332  }
  2333  
  2334  func (s *FileVideoMediaMetadata) MarshalJSON() ([]byte, error) {
  2335  	type NoMethod FileVideoMediaMetadata
  2336  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  2337  }
  2338  
  2339  // FileList: A list of files.
  2340  type FileList struct {
  2341  	// Etag: The ETag of the list.
  2342  	Etag string `json:"etag,omitempty"`
  2343  	// IncompleteSearch: Whether the search process was incomplete. If true, then
  2344  	// some search results may be missing, since all documents were not searched.
  2345  	// This may occur when searching multiple drives with the "allDrives" corpora,
  2346  	// but all corpora could not be searched. When this happens, it is suggested
  2347  	// that clients narrow their query by choosing a different corpus such as
  2348  	// "default" or "drive".
  2349  	IncompleteSearch bool `json:"incompleteSearch,omitempty"`
  2350  	// Items: The list of files. If nextPageToken is populated, then this list may
  2351  	// be incomplete and an additional page of results should be fetched.
  2352  	Items []*File `json:"items,omitempty"`
  2353  	// Kind: This is always `drive#fileList`.
  2354  	Kind string `json:"kind,omitempty"`
  2355  	// NextLink: A link to the next page of files.
  2356  	NextLink string `json:"nextLink,omitempty"`
  2357  	// NextPageToken: The page token for the next page of files. This will be
  2358  	// absent if the end of the files list has been reached. If the token is
  2359  	// rejected for any reason, it should be discarded, and pagination should be
  2360  	// restarted from the first page of results.
  2361  	NextPageToken string `json:"nextPageToken,omitempty"`
  2362  	// SelfLink: A link back to this list.
  2363  	SelfLink string `json:"selfLink,omitempty"`
  2364  
  2365  	// ServerResponse contains the HTTP response code and headers from the server.
  2366  	googleapi.ServerResponse `json:"-"`
  2367  	// ForceSendFields is a list of field names (e.g. "Etag") to unconditionally
  2368  	// include in API requests. By default, fields with empty or default values are
  2369  	// omitted from API requests. See
  2370  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  2371  	// details.
  2372  	ForceSendFields []string `json:"-"`
  2373  	// NullFields is a list of field names (e.g. "Etag") to include in API requests
  2374  	// with the JSON null value. By default, fields with empty values are omitted
  2375  	// from API requests. See
  2376  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  2377  	NullFields []string `json:"-"`
  2378  }
  2379  
  2380  func (s *FileList) MarshalJSON() ([]byte, error) {
  2381  	type NoMethod FileList
  2382  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  2383  }
  2384  
  2385  // GeneratedIds: A list of generated IDs which can be provided in insert
  2386  // requests
  2387  type GeneratedIds struct {
  2388  	// Ids: The IDs generated for the requesting user in the specified space.
  2389  	Ids []string `json:"ids,omitempty"`
  2390  	// Kind: This is always `drive#generatedIds`
  2391  	Kind string `json:"kind,omitempty"`
  2392  	// Space: The type of file that can be created with these IDs.
  2393  	Space string `json:"space,omitempty"`
  2394  
  2395  	// ServerResponse contains the HTTP response code and headers from the server.
  2396  	googleapi.ServerResponse `json:"-"`
  2397  	// ForceSendFields is a list of field names (e.g. "Ids") to unconditionally
  2398  	// include in API requests. By default, fields with empty or default values are
  2399  	// omitted from API requests. See
  2400  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  2401  	// details.
  2402  	ForceSendFields []string `json:"-"`
  2403  	// NullFields is a list of field names (e.g. "Ids") to include in API requests
  2404  	// with the JSON null value. By default, fields with empty values are omitted
  2405  	// from API requests. See
  2406  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  2407  	NullFields []string `json:"-"`
  2408  }
  2409  
  2410  func (s *GeneratedIds) MarshalJSON() ([]byte, error) {
  2411  	type NoMethod GeneratedIds
  2412  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  2413  }
  2414  
  2415  // Label: Representation of a label and label fields.
  2416  type Label struct {
  2417  	// Fields: A map of the fields on the label, keyed by the field's ID.
  2418  	Fields map[string]LabelField `json:"fields,omitempty"`
  2419  	// Id: The ID of the label.
  2420  	Id string `json:"id,omitempty"`
  2421  	// Kind: This is always `drive#label`
  2422  	Kind string `json:"kind,omitempty"`
  2423  	// RevisionId: The revision ID of the label.
  2424  	RevisionId string `json:"revisionId,omitempty"`
  2425  	// ForceSendFields is a list of field names (e.g. "Fields") to unconditionally
  2426  	// include in API requests. By default, fields with empty or default values are
  2427  	// omitted from API requests. See
  2428  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  2429  	// details.
  2430  	ForceSendFields []string `json:"-"`
  2431  	// NullFields is a list of field names (e.g. "Fields") to include in API
  2432  	// requests with the JSON null value. By default, fields with empty values are
  2433  	// omitted from API requests. See
  2434  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  2435  	NullFields []string `json:"-"`
  2436  }
  2437  
  2438  func (s *Label) MarshalJSON() ([]byte, error) {
  2439  	type NoMethod Label
  2440  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  2441  }
  2442  
  2443  // LabelField: Representation of field, which is a typed key-value pair.
  2444  type LabelField struct {
  2445  	// DateString: Only present if valueType is dateString. RFC 3339 formatted
  2446  	// date: YYYY-MM-DD.
  2447  	DateString []string `json:"dateString,omitempty"`
  2448  	// Id: The identifier of this label field.
  2449  	Id string `json:"id,omitempty"`
  2450  	// Integer: Only present if `valueType` is `integer`.
  2451  	Integer googleapi.Int64s `json:"integer,omitempty"`
  2452  	// Kind: This is always `drive#labelField`.
  2453  	Kind string `json:"kind,omitempty"`
  2454  	// Selection: Only present if `valueType` is `selection`
  2455  	Selection []string `json:"selection,omitempty"`
  2456  	// Text: Only present if `valueType` is `text`.
  2457  	Text []string `json:"text,omitempty"`
  2458  	// User: Only present if `valueType` is `user`.
  2459  	User []*User `json:"user,omitempty"`
  2460  	// ValueType: The field type. While new values may be supported in the future,
  2461  	// the following are currently allowed: * `dateString` * `integer` *
  2462  	// `selection` * `text` * `user`
  2463  	ValueType string `json:"valueType,omitempty"`
  2464  	// ForceSendFields is a list of field names (e.g. "DateString") to
  2465  	// unconditionally include in API requests. By default, fields with empty or
  2466  	// default values are omitted from API requests. See
  2467  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  2468  	// details.
  2469  	ForceSendFields []string `json:"-"`
  2470  	// NullFields is a list of field names (e.g. "DateString") to include in API
  2471  	// requests with the JSON null value. By default, fields with empty values are
  2472  	// omitted from API requests. See
  2473  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  2474  	NullFields []string `json:"-"`
  2475  }
  2476  
  2477  func (s *LabelField) MarshalJSON() ([]byte, error) {
  2478  	type NoMethod LabelField
  2479  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  2480  }
  2481  
  2482  // LabelFieldModification: A modification to a label's field.
  2483  type LabelFieldModification struct {
  2484  	// FieldId: The ID of the field to be modified.
  2485  	FieldId string `json:"fieldId,omitempty"`
  2486  	// Kind: This is always `drive#labelFieldModification`.
  2487  	Kind string `json:"kind,omitempty"`
  2488  	// SetDateValues: Replaces the value of a dateString Field with these new
  2489  	// values. The string must be in the RFC 3339 full-date format: YYYY-MM-DD.
  2490  	SetDateValues []string `json:"setDateValues,omitempty"`
  2491  	// SetIntegerValues: Replaces the value of an `integer` field with these new
  2492  	// values.
  2493  	SetIntegerValues googleapi.Int64s `json:"setIntegerValues,omitempty"`
  2494  	// SetSelectionValues: Replaces a `selection` field with these new values.
  2495  	SetSelectionValues []string `json:"setSelectionValues,omitempty"`
  2496  	// SetTextValues: Sets the value of a `text` field.
  2497  	SetTextValues []string `json:"setTextValues,omitempty"`
  2498  	// SetUserValues: Replaces a `user` field with these new values. The values
  2499  	// must be valid email addresses.
  2500  	SetUserValues []string `json:"setUserValues,omitempty"`
  2501  	// UnsetValues: Unsets the values for this field.
  2502  	UnsetValues bool `json:"unsetValues,omitempty"`
  2503  	// ForceSendFields is a list of field names (e.g. "FieldId") to unconditionally
  2504  	// include in API requests. By default, fields with empty or default values are
  2505  	// omitted from API requests. See
  2506  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  2507  	// details.
  2508  	ForceSendFields []string `json:"-"`
  2509  	// NullFields is a list of field names (e.g. "FieldId") to include in API
  2510  	// requests with the JSON null value. By default, fields with empty values are
  2511  	// omitted from API requests. See
  2512  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  2513  	NullFields []string `json:"-"`
  2514  }
  2515  
  2516  func (s *LabelFieldModification) MarshalJSON() ([]byte, error) {
  2517  	type NoMethod LabelFieldModification
  2518  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  2519  }
  2520  
  2521  // LabelList: A list of labels applied to a file.
  2522  type LabelList struct {
  2523  	// Items: The list of labels.
  2524  	Items []*Label `json:"items,omitempty"`
  2525  	// Kind: This is always `drive#labelList`
  2526  	Kind string `json:"kind,omitempty"`
  2527  	// NextPageToken: The page token for the next page of labels. This field will
  2528  	// be absent if the end of the list has been reached. If the token is rejected
  2529  	// for any reason, it should be discarded, and pagination should be restarted
  2530  	// from the first page of results.
  2531  	NextPageToken string `json:"nextPageToken,omitempty"`
  2532  
  2533  	// ServerResponse contains the HTTP response code and headers from the server.
  2534  	googleapi.ServerResponse `json:"-"`
  2535  	// ForceSendFields is a list of field names (e.g. "Items") to unconditionally
  2536  	// include in API requests. By default, fields with empty or default values are
  2537  	// omitted from API requests. See
  2538  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  2539  	// details.
  2540  	ForceSendFields []string `json:"-"`
  2541  	// NullFields is a list of field names (e.g. "Items") to include in API
  2542  	// requests with the JSON null value. By default, fields with empty values are
  2543  	// omitted from API requests. See
  2544  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  2545  	NullFields []string `json:"-"`
  2546  }
  2547  
  2548  func (s *LabelList) MarshalJSON() ([]byte, error) {
  2549  	type NoMethod LabelList
  2550  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  2551  }
  2552  
  2553  // LabelModification: A modification to a label on a file. A LabelModification
  2554  // can be used to apply a label to a file, update an existing label on a file,
  2555  // or remove a label from a file.
  2556  type LabelModification struct {
  2557  	// FieldModifications: The list of modifications to this label's fields.
  2558  	FieldModifications []*LabelFieldModification `json:"fieldModifications,omitempty"`
  2559  	// Kind: This is always `drive#labelModification`.
  2560  	Kind string `json:"kind,omitempty"`
  2561  	// LabelId: The ID of the label to modify.
  2562  	LabelId string `json:"labelId,omitempty"`
  2563  	// RemoveLabel: If true, the label will be removed from the file.
  2564  	RemoveLabel bool `json:"removeLabel,omitempty"`
  2565  	// ForceSendFields is a list of field names (e.g. "FieldModifications") to
  2566  	// unconditionally include in API requests. By default, fields with empty or
  2567  	// default values are omitted from API requests. See
  2568  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  2569  	// details.
  2570  	ForceSendFields []string `json:"-"`
  2571  	// NullFields is a list of field names (e.g. "FieldModifications") to include
  2572  	// in API requests with the JSON null value. By default, fields with empty
  2573  	// values are omitted from API requests. See
  2574  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  2575  	NullFields []string `json:"-"`
  2576  }
  2577  
  2578  func (s *LabelModification) MarshalJSON() ([]byte, error) {
  2579  	type NoMethod LabelModification
  2580  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  2581  }
  2582  
  2583  // ModifyLabelsRequest: A request to modify the set of labels on a file. This
  2584  // request may contain many modifications that will either all succeed or all
  2585  // fail atomically.
  2586  type ModifyLabelsRequest struct {
  2587  	// Kind: This is always `drive#modifyLabelsRequest`.
  2588  	Kind string `json:"kind,omitempty"`
  2589  	// LabelModifications: The list of modifications to apply to the labels on the
  2590  	// file.
  2591  	LabelModifications []*LabelModification `json:"labelModifications,omitempty"`
  2592  	// ForceSendFields is a list of field names (e.g. "Kind") to unconditionally
  2593  	// include in API requests. By default, fields with empty or default values are
  2594  	// omitted from API requests. See
  2595  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  2596  	// details.
  2597  	ForceSendFields []string `json:"-"`
  2598  	// NullFields is a list of field names (e.g. "Kind") to include in API requests
  2599  	// with the JSON null value. By default, fields with empty values are omitted
  2600  	// from API requests. See
  2601  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  2602  	NullFields []string `json:"-"`
  2603  }
  2604  
  2605  func (s *ModifyLabelsRequest) MarshalJSON() ([]byte, error) {
  2606  	type NoMethod ModifyLabelsRequest
  2607  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  2608  }
  2609  
  2610  // ModifyLabelsResponse: Response to a ModifyLabels request. This contains only
  2611  // those labels which were added or updated by the request.
  2612  type ModifyLabelsResponse struct {
  2613  	// Kind: This is always `drive#modifyLabelsResponse`
  2614  	Kind string `json:"kind,omitempty"`
  2615  	// ModifiedLabels: The list of labels which were added or updated by the
  2616  	// request.
  2617  	ModifiedLabels []*Label `json:"modifiedLabels,omitempty"`
  2618  
  2619  	// ServerResponse contains the HTTP response code and headers from the server.
  2620  	googleapi.ServerResponse `json:"-"`
  2621  	// ForceSendFields is a list of field names (e.g. "Kind") to unconditionally
  2622  	// include in API requests. By default, fields with empty or default values are
  2623  	// omitted from API requests. See
  2624  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  2625  	// details.
  2626  	ForceSendFields []string `json:"-"`
  2627  	// NullFields is a list of field names (e.g. "Kind") to include in API requests
  2628  	// with the JSON null value. By default, fields with empty values are omitted
  2629  	// from API requests. See
  2630  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  2631  	NullFields []string `json:"-"`
  2632  }
  2633  
  2634  func (s *ModifyLabelsResponse) MarshalJSON() ([]byte, error) {
  2635  	type NoMethod ModifyLabelsResponse
  2636  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  2637  }
  2638  
  2639  // ParentList: A list of a file's parents.
  2640  type ParentList struct {
  2641  	// Etag: The ETag of the list.
  2642  	Etag string `json:"etag,omitempty"`
  2643  	// Items: The list of parents.
  2644  	Items []*ParentReference `json:"items,omitempty"`
  2645  	// Kind: This is always `drive#parentList`.
  2646  	Kind string `json:"kind,omitempty"`
  2647  	// SelfLink: A link back to this list.
  2648  	SelfLink string `json:"selfLink,omitempty"`
  2649  
  2650  	// ServerResponse contains the HTTP response code and headers from the server.
  2651  	googleapi.ServerResponse `json:"-"`
  2652  	// ForceSendFields is a list of field names (e.g. "Etag") to unconditionally
  2653  	// include in API requests. By default, fields with empty or default values are
  2654  	// omitted from API requests. See
  2655  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  2656  	// details.
  2657  	ForceSendFields []string `json:"-"`
  2658  	// NullFields is a list of field names (e.g. "Etag") to include in API requests
  2659  	// with the JSON null value. By default, fields with empty values are omitted
  2660  	// from API requests. See
  2661  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  2662  	NullFields []string `json:"-"`
  2663  }
  2664  
  2665  func (s *ParentList) MarshalJSON() ([]byte, error) {
  2666  	type NoMethod ParentList
  2667  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  2668  }
  2669  
  2670  // ParentReference: A reference to a file's parent. Some resource methods (such
  2671  // as `parents.get`) require a `parentId`. Use the `parents.list` method to
  2672  // retrieve the ID for a parent.
  2673  type ParentReference struct {
  2674  	// Id: The ID of the parent.
  2675  	Id string `json:"id,omitempty"`
  2676  	// IsRoot: Output only. Whether or not the parent is the root folder.
  2677  	IsRoot bool `json:"isRoot,omitempty"`
  2678  	// Kind: Output only. This is always `drive#parentReference`.
  2679  	Kind string `json:"kind,omitempty"`
  2680  	// ParentLink: Output only. A link to the parent.
  2681  	ParentLink string `json:"parentLink,omitempty"`
  2682  	// SelfLink: Output only. A link back to this reference.
  2683  	SelfLink string `json:"selfLink,omitempty"`
  2684  
  2685  	// ServerResponse contains the HTTP response code and headers from the server.
  2686  	googleapi.ServerResponse `json:"-"`
  2687  	// ForceSendFields is a list of field names (e.g. "Id") to unconditionally
  2688  	// include in API requests. By default, fields with empty or default values are
  2689  	// omitted from API requests. See
  2690  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  2691  	// details.
  2692  	ForceSendFields []string `json:"-"`
  2693  	// NullFields is a list of field names (e.g. "Id") to include in API requests
  2694  	// with the JSON null value. By default, fields with empty values are omitted
  2695  	// from API requests. See
  2696  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  2697  	NullFields []string `json:"-"`
  2698  }
  2699  
  2700  func (s *ParentReference) MarshalJSON() ([]byte, error) {
  2701  	type NoMethod ParentReference
  2702  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  2703  }
  2704  
  2705  // Permission: A permission for a file. A permission grants a user, group,
  2706  // domain, or the world access to a file or a folder hierarchy. Some resource
  2707  // methods (such as `permissions.update`) require a `permissionId`. Use the
  2708  // `permissions.list` method to retrieve the ID for a file, folder, or shared
  2709  // drive.
  2710  type Permission struct {
  2711  	// AdditionalRoles: Additional roles for this user. Only `commenter` is
  2712  	// currently allowed, though more may be supported in the future.
  2713  	AdditionalRoles []string `json:"additionalRoles,omitempty"`
  2714  	// AuthKey: Output only. Deprecated.
  2715  	AuthKey string `json:"authKey,omitempty"`
  2716  	// Deleted: Output only. Whether the account associated with this permission
  2717  	// has been deleted. This field only pertains to user and group permissions.
  2718  	Deleted bool `json:"deleted,omitempty"`
  2719  	// Domain: Output only. The domain name of the entity this permission refers
  2720  	// to. This is an output-only field which is present when the permission type
  2721  	// is `user`, `group` or `domain`.
  2722  	Domain string `json:"domain,omitempty"`
  2723  	// EmailAddress: Output only. The email address of the user or group this
  2724  	// permission refers to. This is an output-only field which is present when the
  2725  	// permission type is `user` or `group`.
  2726  	EmailAddress string `json:"emailAddress,omitempty"`
  2727  	// Etag: Output only. The ETag of the permission.
  2728  	Etag string `json:"etag,omitempty"`
  2729  	// ExpirationDate: The time at which this permission will expire (RFC 3339
  2730  	// date-time). Expiration dates have the following restrictions: - They can
  2731  	// only be set on user and group permissions - The date must be in the future -
  2732  	// The date cannot be more than a year in the future - The date can only be set
  2733  	// on drive.permissions.update or drive.permissions.patch requests
  2734  	ExpirationDate string `json:"expirationDate,omitempty"`
  2735  	// Id: The ID of the user this permission refers to, and identical to the
  2736  	// `permissionId` in the About and Files resources. When making a
  2737  	// `drive.permissions.insert` request, exactly one of the `id` or `value`
  2738  	// fields must be specified unless the permission type is `anyone`, in which
  2739  	// case both `id` and `value` are ignored.
  2740  	Id string `json:"id,omitempty"`
  2741  	// Kind: Output only. This is always `drive#permission`.
  2742  	Kind string `json:"kind,omitempty"`
  2743  	// Name: Output only. The name for this permission.
  2744  	Name string `json:"name,omitempty"`
  2745  	// PendingOwner: Whether the account associated with this permission is a
  2746  	// pending owner. Only populated for `user` type permissions for files that are
  2747  	// not in a shared drive.
  2748  	PendingOwner bool `json:"pendingOwner,omitempty"`
  2749  	// PermissionDetails: Output only. Details of whether the permissions on this
  2750  	// shared drive item are inherited or directly on this item. This is an
  2751  	// output-only field which is present only for shared drive items.
  2752  	PermissionDetails []*PermissionPermissionDetails `json:"permissionDetails,omitempty"`
  2753  	// PhotoLink: Output only. A link to the profile photo, if available.
  2754  	PhotoLink string `json:"photoLink,omitempty"`
  2755  	// Role: The primary role for this user. While new values may be supported in
  2756  	// the future, the following are currently allowed: * `owner` * `organizer` *
  2757  	// `fileOrganizer` * `writer` * `reader`
  2758  	Role string `json:"role,omitempty"`
  2759  	// SelfLink: Output only. A link back to this permission.
  2760  	SelfLink string `json:"selfLink,omitempty"`
  2761  	// TeamDrivePermissionDetails: Output only. Deprecated: Use `permissionDetails`
  2762  	// instead.
  2763  	TeamDrivePermissionDetails []*PermissionTeamDrivePermissionDetails `json:"teamDrivePermissionDetails,omitempty"`
  2764  	// Type: The account type. Allowed values are: * `user` * `group` * `domain` *
  2765  	// `anyone`
  2766  	Type string `json:"type,omitempty"`
  2767  	// Value: The email address or domain name for the entity. This is used during
  2768  	// inserts and is not populated in responses. When making a
  2769  	// `drive.permissions.insert` request, exactly one of the `id` or `value`
  2770  	// fields must be specified unless the permission type is `anyone`, in which
  2771  	// case both `id` and `value` are ignored.
  2772  	Value string `json:"value,omitempty"`
  2773  	// View: Indicates the view for this permission. Only populated for permissions
  2774  	// that belong to a view. `published` is the only supported value.
  2775  	View string `json:"view,omitempty"`
  2776  	// WithLink: Whether the link is required for this permission.
  2777  	WithLink bool `json:"withLink,omitempty"`
  2778  
  2779  	// ServerResponse contains the HTTP response code and headers from the server.
  2780  	googleapi.ServerResponse `json:"-"`
  2781  	// ForceSendFields is a list of field names (e.g. "AdditionalRoles") to
  2782  	// unconditionally include in API requests. By default, fields with empty or
  2783  	// default values are omitted from API requests. See
  2784  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  2785  	// details.
  2786  	ForceSendFields []string `json:"-"`
  2787  	// NullFields is a list of field names (e.g. "AdditionalRoles") to include in
  2788  	// API requests with the JSON null value. By default, fields with empty values
  2789  	// are omitted from API requests. See
  2790  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  2791  	NullFields []string `json:"-"`
  2792  }
  2793  
  2794  func (s *Permission) MarshalJSON() ([]byte, error) {
  2795  	type NoMethod Permission
  2796  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  2797  }
  2798  
  2799  type PermissionPermissionDetails struct {
  2800  	// AdditionalRoles: Output only. Additional roles for this user. Only
  2801  	// `commenter` is currently possible, though more may be supported in the
  2802  	// future.
  2803  	AdditionalRoles []string `json:"additionalRoles,omitempty"`
  2804  	// Inherited: Output only. Whether this permission is inherited. This field is
  2805  	// always populated. This is an output-only field.
  2806  	Inherited bool `json:"inherited,omitempty"`
  2807  	// InheritedFrom: Output only. The ID of the item from which this permission is
  2808  	// inherited. This is an output-only field.
  2809  	InheritedFrom string `json:"inheritedFrom,omitempty"`
  2810  	// PermissionType: Output only. The permission type for this user. While new
  2811  	// values may be added in future, the following are currently possible: *
  2812  	// `file` * `member`
  2813  	PermissionType string `json:"permissionType,omitempty"`
  2814  	// Role: Output only. The primary role for this user. While new values may be
  2815  	// added in the future, the following are currently possible: * `organizer` *
  2816  	// `fileOrganizer` * `writer` * `reader`
  2817  	Role string `json:"role,omitempty"`
  2818  	// ForceSendFields is a list of field names (e.g. "AdditionalRoles") to
  2819  	// unconditionally include in API requests. By default, fields with empty or
  2820  	// default values are omitted from API requests. See
  2821  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  2822  	// details.
  2823  	ForceSendFields []string `json:"-"`
  2824  	// NullFields is a list of field names (e.g. "AdditionalRoles") to include in
  2825  	// API requests with the JSON null value. By default, fields with empty values
  2826  	// are omitted from API requests. See
  2827  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  2828  	NullFields []string `json:"-"`
  2829  }
  2830  
  2831  func (s *PermissionPermissionDetails) MarshalJSON() ([]byte, error) {
  2832  	type NoMethod PermissionPermissionDetails
  2833  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  2834  }
  2835  
  2836  type PermissionTeamDrivePermissionDetails struct {
  2837  	// AdditionalRoles: Output only. Deprecated: Use
  2838  	// `permissionDetails/additionalRoles` instead.
  2839  	AdditionalRoles []string `json:"additionalRoles,omitempty"`
  2840  	// Inherited: Output only. Deprecated: Use `permissionDetails/inherited`
  2841  	// instead.
  2842  	Inherited bool `json:"inherited,omitempty"`
  2843  	// InheritedFrom: Output only. Deprecated: Use
  2844  	// `permissionDetails/inheritedFrom` instead.
  2845  	InheritedFrom string `json:"inheritedFrom,omitempty"`
  2846  	// Role: Output only. Deprecated: Use `permissionDetails/role` instead.
  2847  	Role string `json:"role,omitempty"`
  2848  	// TeamDrivePermissionType: Output only. Deprecated: Use
  2849  	// `permissionDetails/permissionType` instead.
  2850  	TeamDrivePermissionType string `json:"teamDrivePermissionType,omitempty"`
  2851  	// ForceSendFields is a list of field names (e.g. "AdditionalRoles") to
  2852  	// unconditionally include in API requests. By default, fields with empty or
  2853  	// default values are omitted from API requests. See
  2854  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  2855  	// details.
  2856  	ForceSendFields []string `json:"-"`
  2857  	// NullFields is a list of field names (e.g. "AdditionalRoles") to include in
  2858  	// API requests with the JSON null value. By default, fields with empty values
  2859  	// are omitted from API requests. See
  2860  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  2861  	NullFields []string `json:"-"`
  2862  }
  2863  
  2864  func (s *PermissionTeamDrivePermissionDetails) MarshalJSON() ([]byte, error) {
  2865  	type NoMethod PermissionTeamDrivePermissionDetails
  2866  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  2867  }
  2868  
  2869  // PermissionId: An ID for a user or group as seen in Permission items.
  2870  type PermissionId struct {
  2871  	// Id: The permission ID.
  2872  	Id string `json:"id,omitempty"`
  2873  	// Kind: This is always `drive#permissionId`.
  2874  	Kind string `json:"kind,omitempty"`
  2875  
  2876  	// ServerResponse contains the HTTP response code and headers from the server.
  2877  	googleapi.ServerResponse `json:"-"`
  2878  	// ForceSendFields is a list of field names (e.g. "Id") to unconditionally
  2879  	// include in API requests. By default, fields with empty or default values are
  2880  	// omitted from API requests. See
  2881  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  2882  	// details.
  2883  	ForceSendFields []string `json:"-"`
  2884  	// NullFields is a list of field names (e.g. "Id") to include in API requests
  2885  	// with the JSON null value. By default, fields with empty values are omitted
  2886  	// from API requests. See
  2887  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  2888  	NullFields []string `json:"-"`
  2889  }
  2890  
  2891  func (s *PermissionId) MarshalJSON() ([]byte, error) {
  2892  	type NoMethod PermissionId
  2893  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  2894  }
  2895  
  2896  // PermissionList: A list of permissions associated with a file.
  2897  type PermissionList struct {
  2898  	// Etag: The ETag of the list.
  2899  	Etag string `json:"etag,omitempty"`
  2900  	// Items: The list of permissions.
  2901  	Items []*Permission `json:"items,omitempty"`
  2902  	// Kind: This is always `drive#permissionList`.
  2903  	Kind string `json:"kind,omitempty"`
  2904  	// NextPageToken: The page token for the next page of permissions. This field
  2905  	// will be absent if the end of the permissions list has been reached. If the
  2906  	// token is rejected for any reason, it should be discarded, and pagination
  2907  	// should be restarted from the first page of results.
  2908  	NextPageToken string `json:"nextPageToken,omitempty"`
  2909  	// SelfLink: A link back to this list.
  2910  	SelfLink string `json:"selfLink,omitempty"`
  2911  
  2912  	// ServerResponse contains the HTTP response code and headers from the server.
  2913  	googleapi.ServerResponse `json:"-"`
  2914  	// ForceSendFields is a list of field names (e.g. "Etag") to unconditionally
  2915  	// include in API requests. By default, fields with empty or default values are
  2916  	// omitted from API requests. See
  2917  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  2918  	// details.
  2919  	ForceSendFields []string `json:"-"`
  2920  	// NullFields is a list of field names (e.g. "Etag") to include in API requests
  2921  	// with the JSON null value. By default, fields with empty values are omitted
  2922  	// from API requests. See
  2923  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  2924  	NullFields []string `json:"-"`
  2925  }
  2926  
  2927  func (s *PermissionList) MarshalJSON() ([]byte, error) {
  2928  	type NoMethod PermissionList
  2929  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  2930  }
  2931  
  2932  // Property: A key-value pair attached to a file that is either public or
  2933  // private to an application. The following limits apply to file properties: *
  2934  // Maximum of 100 properties total per file * Maximum of 30 private properties
  2935  // per app * Maximum of 30 public properties * Maximum of 124 bytes size limit
  2936  // on (key + value) string in UTF-8 encoding for a single property Some
  2937  // resource methods (such as `properties.update`) require a `propertyKey`. Use
  2938  // the `properties.list` method to retrieve the key for a property.
  2939  type Property struct {
  2940  	// Etag: Output only. ETag of the property.
  2941  	Etag string `json:"etag,omitempty"`
  2942  	// Key: The key of this property.
  2943  	Key string `json:"key,omitempty"`
  2944  	// Kind: Output only. This is always `drive#property`.
  2945  	Kind string `json:"kind,omitempty"`
  2946  	// SelfLink: Output only. The link back to this property.
  2947  	SelfLink string `json:"selfLink,omitempty"`
  2948  	// Value: The value of this property.
  2949  	Value string `json:"value,omitempty"`
  2950  	// Visibility: The visibility of this property. Allowed values are PRIVATE
  2951  	// (default) and PUBLIC. Private properties can only be retrieved using an
  2952  	// authenticated request. An authenticated request uses an access token
  2953  	// obtained with a OAuth 2 client ID. You cannot use an API key to retrieve
  2954  	// private properties.
  2955  	Visibility string `json:"visibility,omitempty"`
  2956  
  2957  	// ServerResponse contains the HTTP response code and headers from the server.
  2958  	googleapi.ServerResponse `json:"-"`
  2959  	// ForceSendFields is a list of field names (e.g. "Etag") to unconditionally
  2960  	// include in API requests. By default, fields with empty or default values are
  2961  	// omitted from API requests. See
  2962  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  2963  	// details.
  2964  	ForceSendFields []string `json:"-"`
  2965  	// NullFields is a list of field names (e.g. "Etag") to include in API requests
  2966  	// with the JSON null value. By default, fields with empty values are omitted
  2967  	// from API requests. See
  2968  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  2969  	NullFields []string `json:"-"`
  2970  }
  2971  
  2972  func (s *Property) MarshalJSON() ([]byte, error) {
  2973  	type NoMethod Property
  2974  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  2975  }
  2976  
  2977  // PropertyList: A collection of properties, key-value pairs that are either
  2978  // public or private to an application.
  2979  type PropertyList struct {
  2980  	// Etag: The ETag of the list.
  2981  	Etag string `json:"etag,omitempty"`
  2982  	// Items: The list of properties.
  2983  	Items []*Property `json:"items,omitempty"`
  2984  	// Kind: This is always `drive#propertyList`.
  2985  	Kind string `json:"kind,omitempty"`
  2986  	// SelfLink: The link back to this list.
  2987  	SelfLink string `json:"selfLink,omitempty"`
  2988  
  2989  	// ServerResponse contains the HTTP response code and headers from the server.
  2990  	googleapi.ServerResponse `json:"-"`
  2991  	// ForceSendFields is a list of field names (e.g. "Etag") to unconditionally
  2992  	// include in API requests. By default, fields with empty or default values are
  2993  	// omitted from API requests. See
  2994  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  2995  	// details.
  2996  	ForceSendFields []string `json:"-"`
  2997  	// NullFields is a list of field names (e.g. "Etag") to include in API requests
  2998  	// with the JSON null value. By default, fields with empty values are omitted
  2999  	// from API requests. See
  3000  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  3001  	NullFields []string `json:"-"`
  3002  }
  3003  
  3004  func (s *PropertyList) MarshalJSON() ([]byte, error) {
  3005  	type NoMethod PropertyList
  3006  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  3007  }
  3008  
  3009  // Revision: A revision of a file. Some resource methods (such as
  3010  // `revisions.update`) require a `revisionId`. Use the `revisions.list` method
  3011  // to retrieve the ID for a revision.
  3012  type Revision struct {
  3013  	// DownloadUrl: Output only. Short term download URL for the file. This will
  3014  	// only be populated on files with content stored in Drive.
  3015  	DownloadUrl string `json:"downloadUrl,omitempty"`
  3016  	// Etag: Output only. The ETag of the revision.
  3017  	Etag string `json:"etag,omitempty"`
  3018  	// ExportLinks: Output only. Links for exporting Docs Editors files to specific
  3019  	// formats.
  3020  	ExportLinks map[string]string `json:"exportLinks,omitempty"`
  3021  	// FileSize: Output only. The size of the revision in bytes. This will only be
  3022  	// populated on files with content stored in Drive.
  3023  	FileSize int64 `json:"fileSize,omitempty,string"`
  3024  	// Id: Output only. The ID of the revision.
  3025  	Id string `json:"id,omitempty"`
  3026  	// Kind: Output only. This is always `drive#revision`.
  3027  	Kind string `json:"kind,omitempty"`
  3028  	// LastModifyingUser: Output only. The last user to modify this revision.
  3029  	LastModifyingUser *User `json:"lastModifyingUser,omitempty"`
  3030  	// LastModifyingUserName: Output only. Name of the last user to modify this
  3031  	// revision.
  3032  	LastModifyingUserName string `json:"lastModifyingUserName,omitempty"`
  3033  	// Md5Checksum: Output only. An MD5 checksum for the content of this revision.
  3034  	// This will only be populated on files with content stored in Drive.
  3035  	Md5Checksum string `json:"md5Checksum,omitempty"`
  3036  	// MimeType: Output only. The MIME type of the revision.
  3037  	MimeType string `json:"mimeType,omitempty"`
  3038  	// ModifiedDate: Last time this revision was modified (formatted RFC 3339
  3039  	// timestamp).
  3040  	ModifiedDate string `json:"modifiedDate,omitempty"`
  3041  	// OriginalFilename: Output only. The original filename when this revision was
  3042  	// created. This will only be populated on files with content stored in Drive.
  3043  	OriginalFilename string `json:"originalFilename,omitempty"`
  3044  	// Pinned: Whether this revision is pinned to prevent automatic purging. If not
  3045  	// set, the revision is automatically purged 30 days after newer content is
  3046  	// uploaded. This field can only be modified on files with content stored in
  3047  	// Drive, excluding Docs Editors files. Revisions can also be pinned when they
  3048  	// are created through the drive.files.insert/update/copy by using the pinned
  3049  	// query parameter. Pinned revisions are stored indefinitely using additional
  3050  	// storage quota, up to a maximum of 200 revisions.
  3051  	Pinned bool `json:"pinned,omitempty"`
  3052  	// PublishAuto: Whether subsequent revisions will be automatically republished.
  3053  	// This is only populated and can only be modified for Docs Editors files.
  3054  	PublishAuto bool `json:"publishAuto,omitempty"`
  3055  	// Published: Whether this revision is published. This is only populated and
  3056  	// can only be modified for Docs Editors files.
  3057  	Published bool `json:"published,omitempty"`
  3058  	// PublishedLink: Output only. A link to the published revision. This is only
  3059  	// populated for Google Sites files.
  3060  	PublishedLink string `json:"publishedLink,omitempty"`
  3061  	// PublishedOutsideDomain: Whether this revision is published outside the
  3062  	// domain. This is only populated and can only be modified for Docs Editors
  3063  	// files.
  3064  	PublishedOutsideDomain bool `json:"publishedOutsideDomain,omitempty"`
  3065  	// SelfLink: Output only. A link back to this revision.
  3066  	SelfLink string `json:"selfLink,omitempty"`
  3067  
  3068  	// ServerResponse contains the HTTP response code and headers from the server.
  3069  	googleapi.ServerResponse `json:"-"`
  3070  	// ForceSendFields is a list of field names (e.g. "DownloadUrl") to
  3071  	// unconditionally include in API requests. By default, fields with empty or
  3072  	// default values are omitted from API requests. See
  3073  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  3074  	// details.
  3075  	ForceSendFields []string `json:"-"`
  3076  	// NullFields is a list of field names (e.g. "DownloadUrl") to include in API
  3077  	// requests with the JSON null value. By default, fields with empty values are
  3078  	// omitted from API requests. See
  3079  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  3080  	NullFields []string `json:"-"`
  3081  }
  3082  
  3083  func (s *Revision) MarshalJSON() ([]byte, error) {
  3084  	type NoMethod Revision
  3085  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  3086  }
  3087  
  3088  // RevisionList: A list of revisions of a file.
  3089  type RevisionList struct {
  3090  	// Etag: The ETag of the list.
  3091  	Etag string `json:"etag,omitempty"`
  3092  	// Items: The list of revisions. If nextPageToken is populated, then this list
  3093  	// may be incomplete and an additional page of results should be fetched.
  3094  	Items []*Revision `json:"items,omitempty"`
  3095  	// Kind: This is always `drive#revisionList`.
  3096  	Kind string `json:"kind,omitempty"`
  3097  	// NextPageToken: The page token for the next page of revisions. This field
  3098  	// will be absent if the end of the revisions list has been reached. If the
  3099  	// token is rejected for any reason, it should be discarded and pagination
  3100  	// should be restarted from the first page of results.
  3101  	NextPageToken string `json:"nextPageToken,omitempty"`
  3102  	// SelfLink: A link back to this list.
  3103  	SelfLink string `json:"selfLink,omitempty"`
  3104  
  3105  	// ServerResponse contains the HTTP response code and headers from the server.
  3106  	googleapi.ServerResponse `json:"-"`
  3107  	// ForceSendFields is a list of field names (e.g. "Etag") to unconditionally
  3108  	// include in API requests. By default, fields with empty or default values are
  3109  	// omitted from API requests. See
  3110  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  3111  	// details.
  3112  	ForceSendFields []string `json:"-"`
  3113  	// NullFields is a list of field names (e.g. "Etag") to include in API requests
  3114  	// with the JSON null value. By default, fields with empty values are omitted
  3115  	// from API requests. See
  3116  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  3117  	NullFields []string `json:"-"`
  3118  }
  3119  
  3120  func (s *RevisionList) MarshalJSON() ([]byte, error) {
  3121  	type NoMethod RevisionList
  3122  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  3123  }
  3124  
  3125  type StartPageToken struct {
  3126  	// Kind: Identifies what kind of resource this is. Value: the fixed string
  3127  	// "drive#startPageToken".
  3128  	Kind string `json:"kind,omitempty"`
  3129  	// StartPageToken: The starting page token for listing changes.
  3130  	StartPageToken string `json:"startPageToken,omitempty"`
  3131  
  3132  	// ServerResponse contains the HTTP response code and headers from the server.
  3133  	googleapi.ServerResponse `json:"-"`
  3134  	// ForceSendFields is a list of field names (e.g. "Kind") to unconditionally
  3135  	// include in API requests. By default, fields with empty or default values are
  3136  	// omitted from API requests. See
  3137  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  3138  	// details.
  3139  	ForceSendFields []string `json:"-"`
  3140  	// NullFields is a list of field names (e.g. "Kind") to include in API requests
  3141  	// with the JSON null value. By default, fields with empty values are omitted
  3142  	// from API requests. See
  3143  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  3144  	NullFields []string `json:"-"`
  3145  }
  3146  
  3147  func (s *StartPageToken) MarshalJSON() ([]byte, error) {
  3148  	type NoMethod StartPageToken
  3149  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  3150  }
  3151  
  3152  // TeamDrive: Deprecated: Use the `drive` collection instead.
  3153  type TeamDrive struct {
  3154  	// BackgroundImageFile: An image file and cropping parameters from which a
  3155  	// background image for this Team Drive is set. This is a write only field; it
  3156  	// can only be set on `drive.teamdrives.update` requests that don't set
  3157  	// `themeId`. When specified, all fields of the `backgroundImageFile` must be
  3158  	// set.
  3159  	BackgroundImageFile *TeamDriveBackgroundImageFile `json:"backgroundImageFile,omitempty"`
  3160  	// BackgroundImageLink: A short-lived link to this Team Drive's background
  3161  	// image.
  3162  	BackgroundImageLink string `json:"backgroundImageLink,omitempty"`
  3163  	// Capabilities: Capabilities the current user has on this Team Drive.
  3164  	Capabilities *TeamDriveCapabilities `json:"capabilities,omitempty"`
  3165  	// ColorRgb: The color of this Team Drive as an RGB hex string. It can only be
  3166  	// set on a `drive.teamdrives.update` request that does not set `themeId`.
  3167  	ColorRgb string `json:"colorRgb,omitempty"`
  3168  	// CreatedDate: The time at which the Team Drive was created (RFC 3339
  3169  	// date-time).
  3170  	CreatedDate string `json:"createdDate,omitempty"`
  3171  	// Id: The ID of this Team Drive which is also the ID of the top level folder
  3172  	// of this Team Drive.
  3173  	Id string `json:"id,omitempty"`
  3174  	// Kind: This is always `drive#teamDrive`
  3175  	Kind string `json:"kind,omitempty"`
  3176  	// Name: The name of this Team Drive.
  3177  	Name string `json:"name,omitempty"`
  3178  	// OrgUnitId: The organizational unit of this shared drive. This field is only
  3179  	// populated on `drives.list` responses when the `useDomainAdminAccess`
  3180  	// parameter is set to `true`.
  3181  	OrgUnitId string `json:"orgUnitId,omitempty"`
  3182  	// Restrictions: A set of restrictions that apply to this Team Drive or items
  3183  	// inside this Team Drive.
  3184  	Restrictions *TeamDriveRestrictions `json:"restrictions,omitempty"`
  3185  	// ThemeId: The ID of the theme from which the background image and color will
  3186  	// be set. The set of possible `teamDriveThemes` can be retrieved from a
  3187  	// `drive.about.get` response. When not specified on a
  3188  	// `drive.teamdrives.insert` request, a random theme is chosen from which the
  3189  	// background image and color are set. This is a write-only field; it can only
  3190  	// be set on requests that don't set `colorRgb` or `backgroundImageFile`.
  3191  	ThemeId string `json:"themeId,omitempty"`
  3192  
  3193  	// ServerResponse contains the HTTP response code and headers from the server.
  3194  	googleapi.ServerResponse `json:"-"`
  3195  	// ForceSendFields is a list of field names (e.g. "BackgroundImageFile") to
  3196  	// unconditionally include in API requests. By default, fields with empty or
  3197  	// default values are omitted from API requests. See
  3198  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  3199  	// details.
  3200  	ForceSendFields []string `json:"-"`
  3201  	// NullFields is a list of field names (e.g. "BackgroundImageFile") to include
  3202  	// in API requests with the JSON null value. By default, fields with empty
  3203  	// values are omitted from API requests. See
  3204  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  3205  	NullFields []string `json:"-"`
  3206  }
  3207  
  3208  func (s *TeamDrive) MarshalJSON() ([]byte, error) {
  3209  	type NoMethod TeamDrive
  3210  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  3211  }
  3212  
  3213  // TeamDriveBackgroundImageFile: An image file and cropping parameters from
  3214  // which a background image for this Team Drive is set. This is a write only
  3215  // field; it can only be set on `drive.teamdrives.update` requests that don't
  3216  // set `themeId`. When specified, all fields of the `backgroundImageFile` must
  3217  // be set.
  3218  type TeamDriveBackgroundImageFile struct {
  3219  	// Id: The ID of an image file in Drive to use for the background image.
  3220  	Id string `json:"id,omitempty"`
  3221  	// Width: The width of the cropped image in the closed range of 0 to 1. This
  3222  	// value represents the width of the cropped image divided by the width of the
  3223  	// entire image. The height is computed by applying a width to height aspect
  3224  	// ratio of 80 to 9. The resulting image must be at least 1280 pixels wide and
  3225  	// 144 pixels high.
  3226  	Width float64 `json:"width,omitempty"`
  3227  	// XCoordinate: The X coordinate of the upper left corner of the cropping area
  3228  	// in the background image. This is a value in the closed range of 0 to 1. This
  3229  	// value represents the horizontal distance from the left side of the entire
  3230  	// image to the left side of the cropping area divided by the width of the
  3231  	// entire image.
  3232  	XCoordinate float64 `json:"xCoordinate,omitempty"`
  3233  	// YCoordinate: The Y coordinate of the upper left corner of the cropping area
  3234  	// in the background image. This is a value in the closed range of 0 to 1. This
  3235  	// value represents the vertical distance from the top side of the entire image
  3236  	// to the top side of the cropping area divided by the height of the entire
  3237  	// image.
  3238  	YCoordinate float64 `json:"yCoordinate,omitempty"`
  3239  	// ForceSendFields is a list of field names (e.g. "Id") to unconditionally
  3240  	// include in API requests. By default, fields with empty or default values are
  3241  	// omitted from API requests. See
  3242  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  3243  	// details.
  3244  	ForceSendFields []string `json:"-"`
  3245  	// NullFields is a list of field names (e.g. "Id") to include in API requests
  3246  	// with the JSON null value. By default, fields with empty values are omitted
  3247  	// from API requests. See
  3248  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  3249  	NullFields []string `json:"-"`
  3250  }
  3251  
  3252  func (s *TeamDriveBackgroundImageFile) MarshalJSON() ([]byte, error) {
  3253  	type NoMethod TeamDriveBackgroundImageFile
  3254  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  3255  }
  3256  
  3257  func (s *TeamDriveBackgroundImageFile) UnmarshalJSON(data []byte) error {
  3258  	type NoMethod TeamDriveBackgroundImageFile
  3259  	var s1 struct {
  3260  		Width       gensupport.JSONFloat64 `json:"width"`
  3261  		XCoordinate gensupport.JSONFloat64 `json:"xCoordinate"`
  3262  		YCoordinate gensupport.JSONFloat64 `json:"yCoordinate"`
  3263  		*NoMethod
  3264  	}
  3265  	s1.NoMethod = (*NoMethod)(s)
  3266  	if err := json.Unmarshal(data, &s1); err != nil {
  3267  		return err
  3268  	}
  3269  	s.Width = float64(s1.Width)
  3270  	s.XCoordinate = float64(s1.XCoordinate)
  3271  	s.YCoordinate = float64(s1.YCoordinate)
  3272  	return nil
  3273  }
  3274  
  3275  // TeamDriveCapabilities: Capabilities the current user has on this Team Drive.
  3276  type TeamDriveCapabilities struct {
  3277  	// CanAddChildren: Whether the current user can add children to folders in this
  3278  	// Team Drive.
  3279  	CanAddChildren bool `json:"canAddChildren,omitempty"`
  3280  	// CanChangeCopyRequiresWriterPermissionRestriction: Whether the current user
  3281  	// can change the `copyRequiresWriterPermission` restriction of this Team
  3282  	// Drive.
  3283  	CanChangeCopyRequiresWriterPermissionRestriction bool `json:"canChangeCopyRequiresWriterPermissionRestriction,omitempty"`
  3284  	// CanChangeDomainUsersOnlyRestriction: Whether the current user can change the
  3285  	// `domainUsersOnly` restriction of this Team Drive.
  3286  	CanChangeDomainUsersOnlyRestriction bool `json:"canChangeDomainUsersOnlyRestriction,omitempty"`
  3287  	// CanChangeSharingFoldersRequiresOrganizerPermissionRestriction: Whether the
  3288  	// current user can change the `sharingFoldersRequiresOrganizerPermission`
  3289  	// restriction of this Team Drive.
  3290  	CanChangeSharingFoldersRequiresOrganizerPermissionRestriction bool `json:"canChangeSharingFoldersRequiresOrganizerPermissionRestriction,omitempty"`
  3291  	// CanChangeTeamDriveBackground: Whether the current user can change the
  3292  	// background of this Team Drive.
  3293  	CanChangeTeamDriveBackground bool `json:"canChangeTeamDriveBackground,omitempty"`
  3294  	// CanChangeTeamMembersOnlyRestriction: Whether the current user can change the
  3295  	// `teamMembersOnly` restriction of this Team Drive.
  3296  	CanChangeTeamMembersOnlyRestriction bool `json:"canChangeTeamMembersOnlyRestriction,omitempty"`
  3297  	// CanComment: Whether the current user can comment on files in this Team
  3298  	// Drive.
  3299  	CanComment bool `json:"canComment,omitempty"`
  3300  	// CanCopy: Whether the current user can copy files in this Team Drive.
  3301  	CanCopy bool `json:"canCopy,omitempty"`
  3302  	// CanDeleteChildren: Whether the current user can delete children from folders
  3303  	// in this Team Drive.
  3304  	CanDeleteChildren bool `json:"canDeleteChildren,omitempty"`
  3305  	// CanDeleteTeamDrive: Whether the current user can delete this Team Drive.
  3306  	// Attempting to delete the Team Drive may still fail if there are untrashed
  3307  	// items inside the Team Drive.
  3308  	CanDeleteTeamDrive bool `json:"canDeleteTeamDrive,omitempty"`
  3309  	// CanDownload: Whether the current user can download files in this Team Drive.
  3310  	CanDownload bool `json:"canDownload,omitempty"`
  3311  	// CanEdit: Whether the current user can edit files in this Team Drive
  3312  	CanEdit bool `json:"canEdit,omitempty"`
  3313  	// CanListChildren: Whether the current user can list the children of folders
  3314  	// in this Team Drive.
  3315  	CanListChildren bool `json:"canListChildren,omitempty"`
  3316  	// CanManageMembers: Whether the current user can add members to this Team
  3317  	// Drive or remove them or change their role.
  3318  	CanManageMembers bool `json:"canManageMembers,omitempty"`
  3319  	// CanReadRevisions: Whether the current user can read the revisions resource
  3320  	// of files in this Team Drive.
  3321  	CanReadRevisions bool `json:"canReadRevisions,omitempty"`
  3322  	// CanRemoveChildren: Deprecated: Use `canDeleteChildren` or `canTrashChildren`
  3323  	// instead.
  3324  	CanRemoveChildren bool `json:"canRemoveChildren,omitempty"`
  3325  	// CanRename: Whether the current user can rename files or folders in this Team
  3326  	// Drive.
  3327  	CanRename bool `json:"canRename,omitempty"`
  3328  	// CanRenameTeamDrive: Whether the current user can rename this Team Drive.
  3329  	CanRenameTeamDrive bool `json:"canRenameTeamDrive,omitempty"`
  3330  	// CanResetTeamDriveRestrictions: Whether the current user can reset the Team
  3331  	// Drive restrictions to defaults.
  3332  	CanResetTeamDriveRestrictions bool `json:"canResetTeamDriveRestrictions,omitempty"`
  3333  	// CanShare: Whether the current user can share files or folders in this Team
  3334  	// Drive.
  3335  	CanShare bool `json:"canShare,omitempty"`
  3336  	// CanTrashChildren: Whether the current user can trash children from folders
  3337  	// in this Team Drive.
  3338  	CanTrashChildren bool `json:"canTrashChildren,omitempty"`
  3339  	// ForceSendFields is a list of field names (e.g. "CanAddChildren") to
  3340  	// unconditionally include in API requests. By default, fields with empty or
  3341  	// default values are omitted from API requests. See
  3342  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  3343  	// details.
  3344  	ForceSendFields []string `json:"-"`
  3345  	// NullFields is a list of field names (e.g. "CanAddChildren") to include in
  3346  	// API requests with the JSON null value. By default, fields with empty values
  3347  	// are omitted from API requests. See
  3348  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  3349  	NullFields []string `json:"-"`
  3350  }
  3351  
  3352  func (s *TeamDriveCapabilities) MarshalJSON() ([]byte, error) {
  3353  	type NoMethod TeamDriveCapabilities
  3354  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  3355  }
  3356  
  3357  // TeamDriveRestrictions: A set of restrictions that apply to this Team Drive
  3358  // or items inside this Team Drive.
  3359  type TeamDriveRestrictions struct {
  3360  	// AdminManagedRestrictions: Whether administrative privileges on this Team
  3361  	// Drive are required to modify restrictions.
  3362  	AdminManagedRestrictions bool `json:"adminManagedRestrictions,omitempty"`
  3363  	// CopyRequiresWriterPermission: Whether the options to copy, print, or
  3364  	// download files inside this Team Drive, should be disabled for readers and
  3365  	// commenters. When this restriction is set to `true`, it will override the
  3366  	// similarly named field to `true` for any file inside this Team Drive.
  3367  	CopyRequiresWriterPermission bool `json:"copyRequiresWriterPermission,omitempty"`
  3368  	// DomainUsersOnly: Whether access to this Team Drive and items inside this
  3369  	// Team Drive is restricted to users of the domain to which this Team Drive
  3370  	// belongs. This restriction may be overridden by other sharing policies
  3371  	// controlled outside of this Team Drive.
  3372  	DomainUsersOnly bool `json:"domainUsersOnly,omitempty"`
  3373  	// SharingFoldersRequiresOrganizerPermission: If true, only users with the
  3374  	// organizer role can share folders. If false, users with either the organizer
  3375  	// role or the file organizer role can share folders.
  3376  	SharingFoldersRequiresOrganizerPermission bool `json:"sharingFoldersRequiresOrganizerPermission,omitempty"`
  3377  	// TeamMembersOnly: Whether access to items inside this Team Drive is
  3378  	// restricted to members of this Team Drive.
  3379  	TeamMembersOnly bool `json:"teamMembersOnly,omitempty"`
  3380  	// ForceSendFields is a list of field names (e.g. "AdminManagedRestrictions")
  3381  	// to unconditionally include in API requests. By default, fields with empty or
  3382  	// default values are omitted from API requests. See
  3383  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  3384  	// details.
  3385  	ForceSendFields []string `json:"-"`
  3386  	// NullFields is a list of field names (e.g. "AdminManagedRestrictions") to
  3387  	// include in API requests with the JSON null value. By default, fields with
  3388  	// empty values are omitted from API requests. See
  3389  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  3390  	NullFields []string `json:"-"`
  3391  }
  3392  
  3393  func (s *TeamDriveRestrictions) MarshalJSON() ([]byte, error) {
  3394  	type NoMethod TeamDriveRestrictions
  3395  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  3396  }
  3397  
  3398  // TeamDriveList: A list of Team Drives.
  3399  type TeamDriveList struct {
  3400  	// Items: The list of Team Drives.
  3401  	Items []*TeamDrive `json:"items,omitempty"`
  3402  	// Kind: This is always `drive#teamDriveList`
  3403  	Kind string `json:"kind,omitempty"`
  3404  	// NextPageToken: The page token for the next page of Team Drives.
  3405  	NextPageToken string `json:"nextPageToken,omitempty"`
  3406  
  3407  	// ServerResponse contains the HTTP response code and headers from the server.
  3408  	googleapi.ServerResponse `json:"-"`
  3409  	// ForceSendFields is a list of field names (e.g. "Items") to unconditionally
  3410  	// include in API requests. By default, fields with empty or default values are
  3411  	// omitted from API requests. See
  3412  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  3413  	// details.
  3414  	ForceSendFields []string `json:"-"`
  3415  	// NullFields is a list of field names (e.g. "Items") to include in API
  3416  	// requests with the JSON null value. By default, fields with empty values are
  3417  	// omitted from API requests. See
  3418  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  3419  	NullFields []string `json:"-"`
  3420  }
  3421  
  3422  func (s *TeamDriveList) MarshalJSON() ([]byte, error) {
  3423  	type NoMethod TeamDriveList
  3424  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  3425  }
  3426  
  3427  // User: Information about a Drive user.
  3428  type User struct {
  3429  	// DisplayName: Output only. A plain text displayable name for this user.
  3430  	DisplayName string `json:"displayName,omitempty"`
  3431  	// EmailAddress: Output only. The email address of the user.
  3432  	EmailAddress string `json:"emailAddress,omitempty"`
  3433  	// IsAuthenticatedUser: Output only. Whether this user is the same as the
  3434  	// authenticated user for whom the request was made.
  3435  	IsAuthenticatedUser bool `json:"isAuthenticatedUser,omitempty"`
  3436  	// Kind: Output only. This is always `drive#user`.
  3437  	Kind string `json:"kind,omitempty"`
  3438  	// PermissionId: Output only. The user's ID as visible in the permissions
  3439  	// collection.
  3440  	PermissionId string `json:"permissionId,omitempty"`
  3441  	// Picture: Output only. The user's profile picture.
  3442  	Picture *UserPicture `json:"picture,omitempty"`
  3443  	// ForceSendFields is a list of field names (e.g. "DisplayName") to
  3444  	// unconditionally include in API requests. By default, fields with empty or
  3445  	// default values are omitted from API requests. See
  3446  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  3447  	// details.
  3448  	ForceSendFields []string `json:"-"`
  3449  	// NullFields is a list of field names (e.g. "DisplayName") to include in API
  3450  	// requests with the JSON null value. By default, fields with empty values are
  3451  	// omitted from API requests. See
  3452  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  3453  	NullFields []string `json:"-"`
  3454  }
  3455  
  3456  func (s *User) MarshalJSON() ([]byte, error) {
  3457  	type NoMethod User
  3458  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  3459  }
  3460  
  3461  // UserPicture: Output only. The user's profile picture.
  3462  type UserPicture struct {
  3463  	// Url: Output Only. A URL that points to a profile picture of this user.
  3464  	Url string `json:"url,omitempty"`
  3465  	// ForceSendFields is a list of field names (e.g. "Url") to unconditionally
  3466  	// include in API requests. By default, fields with empty or default values are
  3467  	// omitted from API requests. See
  3468  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  3469  	// details.
  3470  	ForceSendFields []string `json:"-"`
  3471  	// NullFields is a list of field names (e.g. "Url") to include in API requests
  3472  	// with the JSON null value. By default, fields with empty values are omitted
  3473  	// from API requests. See
  3474  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  3475  	NullFields []string `json:"-"`
  3476  }
  3477  
  3478  func (s *UserPicture) MarshalJSON() ([]byte, error) {
  3479  	type NoMethod UserPicture
  3480  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  3481  }
  3482  
  3483  type AboutGetCall struct {
  3484  	s            *Service
  3485  	urlParams_   gensupport.URLParams
  3486  	ifNoneMatch_ string
  3487  	ctx_         context.Context
  3488  	header_      http.Header
  3489  }
  3490  
  3491  // Get: Gets the information about the current user along with Drive API
  3492  // settings
  3493  func (r *AboutService) Get() *AboutGetCall {
  3494  	c := &AboutGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  3495  	return c
  3496  }
  3497  
  3498  // IncludeSubscribed sets the optional parameter "includeSubscribed": Whether
  3499  // to count changes outside the My Drive hierarchy. When set to false, changes
  3500  // to files such as those in the Application Data folder or shared files which
  3501  // have not been added to My Drive will be omitted from the `maxChangeIdCount`.
  3502  func (c *AboutGetCall) IncludeSubscribed(includeSubscribed bool) *AboutGetCall {
  3503  	c.urlParams_.Set("includeSubscribed", fmt.Sprint(includeSubscribed))
  3504  	return c
  3505  }
  3506  
  3507  // MaxChangeIdCount sets the optional parameter "maxChangeIdCount": Maximum
  3508  // number of remaining change IDs to count
  3509  func (c *AboutGetCall) MaxChangeIdCount(maxChangeIdCount int64) *AboutGetCall {
  3510  	c.urlParams_.Set("maxChangeIdCount", fmt.Sprint(maxChangeIdCount))
  3511  	return c
  3512  }
  3513  
  3514  // StartChangeId sets the optional parameter "startChangeId": Change ID to
  3515  // start counting from when calculating number of remaining change IDs
  3516  func (c *AboutGetCall) StartChangeId(startChangeId int64) *AboutGetCall {
  3517  	c.urlParams_.Set("startChangeId", fmt.Sprint(startChangeId))
  3518  	return c
  3519  }
  3520  
  3521  // Fields allows partial responses to be retrieved. See
  3522  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  3523  // details.
  3524  func (c *AboutGetCall) Fields(s ...googleapi.Field) *AboutGetCall {
  3525  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  3526  	return c
  3527  }
  3528  
  3529  // IfNoneMatch sets an optional parameter which makes the operation fail if the
  3530  // object's ETag matches the given value. This is useful for getting updates
  3531  // only after the object has changed since the last request.
  3532  func (c *AboutGetCall) IfNoneMatch(entityTag string) *AboutGetCall {
  3533  	c.ifNoneMatch_ = entityTag
  3534  	return c
  3535  }
  3536  
  3537  // Context sets the context to be used in this call's Do method.
  3538  func (c *AboutGetCall) Context(ctx context.Context) *AboutGetCall {
  3539  	c.ctx_ = ctx
  3540  	return c
  3541  }
  3542  
  3543  // Header returns a http.Header that can be modified by the caller to add
  3544  // headers to the request.
  3545  func (c *AboutGetCall) Header() http.Header {
  3546  	if c.header_ == nil {
  3547  		c.header_ = make(http.Header)
  3548  	}
  3549  	return c.header_
  3550  }
  3551  
  3552  func (c *AboutGetCall) doRequest(alt string) (*http.Response, error) {
  3553  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  3554  	if c.ifNoneMatch_ != "" {
  3555  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  3556  	}
  3557  	var body io.Reader = nil
  3558  	c.urlParams_.Set("alt", alt)
  3559  	c.urlParams_.Set("prettyPrint", "false")
  3560  	urls := googleapi.ResolveRelative(c.s.BasePath, "about")
  3561  	urls += "?" + c.urlParams_.Encode()
  3562  	req, err := http.NewRequest("GET", urls, body)
  3563  	if err != nil {
  3564  		return nil, err
  3565  	}
  3566  	req.Header = reqHeaders
  3567  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  3568  }
  3569  
  3570  // Do executes the "drive.about.get" call.
  3571  // Any non-2xx status code is an error. Response headers are in either
  3572  // *About.ServerResponse.Header or (if a response was returned at all) in
  3573  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  3574  // whether the returned error was because http.StatusNotModified was returned.
  3575  func (c *AboutGetCall) Do(opts ...googleapi.CallOption) (*About, error) {
  3576  	gensupport.SetOptions(c.urlParams_, opts...)
  3577  	res, err := c.doRequest("json")
  3578  	if res != nil && res.StatusCode == http.StatusNotModified {
  3579  		if res.Body != nil {
  3580  			res.Body.Close()
  3581  		}
  3582  		return nil, gensupport.WrapError(&googleapi.Error{
  3583  			Code:   res.StatusCode,
  3584  			Header: res.Header,
  3585  		})
  3586  	}
  3587  	if err != nil {
  3588  		return nil, err
  3589  	}
  3590  	defer googleapi.CloseBody(res)
  3591  	if err := googleapi.CheckResponse(res); err != nil {
  3592  		return nil, gensupport.WrapError(err)
  3593  	}
  3594  	ret := &About{
  3595  		ServerResponse: googleapi.ServerResponse{
  3596  			Header:         res.Header,
  3597  			HTTPStatusCode: res.StatusCode,
  3598  		},
  3599  	}
  3600  	target := &ret
  3601  	if err := gensupport.DecodeResponse(target, res); err != nil {
  3602  		return nil, err
  3603  	}
  3604  	return ret, nil
  3605  }
  3606  
  3607  type AppsGetCall struct {
  3608  	s            *Service
  3609  	appId        string
  3610  	urlParams_   gensupport.URLParams
  3611  	ifNoneMatch_ string
  3612  	ctx_         context.Context
  3613  	header_      http.Header
  3614  }
  3615  
  3616  // Get: Gets a specific app.
  3617  //
  3618  // - appId: The ID of the app.
  3619  func (r *AppsService) Get(appId string) *AppsGetCall {
  3620  	c := &AppsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  3621  	c.appId = appId
  3622  	return c
  3623  }
  3624  
  3625  // Fields allows partial responses to be retrieved. See
  3626  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  3627  // details.
  3628  func (c *AppsGetCall) Fields(s ...googleapi.Field) *AppsGetCall {
  3629  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  3630  	return c
  3631  }
  3632  
  3633  // IfNoneMatch sets an optional parameter which makes the operation fail if the
  3634  // object's ETag matches the given value. This is useful for getting updates
  3635  // only after the object has changed since the last request.
  3636  func (c *AppsGetCall) IfNoneMatch(entityTag string) *AppsGetCall {
  3637  	c.ifNoneMatch_ = entityTag
  3638  	return c
  3639  }
  3640  
  3641  // Context sets the context to be used in this call's Do method.
  3642  func (c *AppsGetCall) Context(ctx context.Context) *AppsGetCall {
  3643  	c.ctx_ = ctx
  3644  	return c
  3645  }
  3646  
  3647  // Header returns a http.Header that can be modified by the caller to add
  3648  // headers to the request.
  3649  func (c *AppsGetCall) Header() http.Header {
  3650  	if c.header_ == nil {
  3651  		c.header_ = make(http.Header)
  3652  	}
  3653  	return c.header_
  3654  }
  3655  
  3656  func (c *AppsGetCall) doRequest(alt string) (*http.Response, error) {
  3657  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  3658  	if c.ifNoneMatch_ != "" {
  3659  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  3660  	}
  3661  	var body io.Reader = nil
  3662  	c.urlParams_.Set("alt", alt)
  3663  	c.urlParams_.Set("prettyPrint", "false")
  3664  	urls := googleapi.ResolveRelative(c.s.BasePath, "apps/{appId}")
  3665  	urls += "?" + c.urlParams_.Encode()
  3666  	req, err := http.NewRequest("GET", urls, body)
  3667  	if err != nil {
  3668  		return nil, err
  3669  	}
  3670  	req.Header = reqHeaders
  3671  	googleapi.Expand(req.URL, map[string]string{
  3672  		"appId": c.appId,
  3673  	})
  3674  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  3675  }
  3676  
  3677  // Do executes the "drive.apps.get" call.
  3678  // Any non-2xx status code is an error. Response headers are in either
  3679  // *App.ServerResponse.Header or (if a response was returned at all) in
  3680  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  3681  // whether the returned error was because http.StatusNotModified was returned.
  3682  func (c *AppsGetCall) Do(opts ...googleapi.CallOption) (*App, error) {
  3683  	gensupport.SetOptions(c.urlParams_, opts...)
  3684  	res, err := c.doRequest("json")
  3685  	if res != nil && res.StatusCode == http.StatusNotModified {
  3686  		if res.Body != nil {
  3687  			res.Body.Close()
  3688  		}
  3689  		return nil, gensupport.WrapError(&googleapi.Error{
  3690  			Code:   res.StatusCode,
  3691  			Header: res.Header,
  3692  		})
  3693  	}
  3694  	if err != nil {
  3695  		return nil, err
  3696  	}
  3697  	defer googleapi.CloseBody(res)
  3698  	if err := googleapi.CheckResponse(res); err != nil {
  3699  		return nil, gensupport.WrapError(err)
  3700  	}
  3701  	ret := &App{
  3702  		ServerResponse: googleapi.ServerResponse{
  3703  			Header:         res.Header,
  3704  			HTTPStatusCode: res.StatusCode,
  3705  		},
  3706  	}
  3707  	target := &ret
  3708  	if err := gensupport.DecodeResponse(target, res); err != nil {
  3709  		return nil, err
  3710  	}
  3711  	return ret, nil
  3712  }
  3713  
  3714  type AppsListCall struct {
  3715  	s            *Service
  3716  	urlParams_   gensupport.URLParams
  3717  	ifNoneMatch_ string
  3718  	ctx_         context.Context
  3719  	header_      http.Header
  3720  }
  3721  
  3722  // List: Lists a user's installed apps.
  3723  func (r *AppsService) List() *AppsListCall {
  3724  	c := &AppsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  3725  	return c
  3726  }
  3727  
  3728  // AppFilterExtensions sets the optional parameter "appFilterExtensions": A
  3729  // comma-separated list of file extensions for open with filtering. All apps
  3730  // within the given app query scope which can open any of the given file
  3731  // extensions will be included in the response. If `appFilterMimeTypes` are
  3732  // provided as well, the result is a union of the two resulting app lists.
  3733  func (c *AppsListCall) AppFilterExtensions(appFilterExtensions string) *AppsListCall {
  3734  	c.urlParams_.Set("appFilterExtensions", appFilterExtensions)
  3735  	return c
  3736  }
  3737  
  3738  // AppFilterMimeTypes sets the optional parameter "appFilterMimeTypes": A
  3739  // comma-separated list of MIME types for open with filtering. All apps within
  3740  // the given app query scope which can open any of the given MIME types will be
  3741  // included in the response. If `appFilterExtensions` are provided as well, the
  3742  // result is a union of the two resulting app lists.
  3743  func (c *AppsListCall) AppFilterMimeTypes(appFilterMimeTypes string) *AppsListCall {
  3744  	c.urlParams_.Set("appFilterMimeTypes", appFilterMimeTypes)
  3745  	return c
  3746  }
  3747  
  3748  // LanguageCode sets the optional parameter "languageCode": A language or
  3749  // locale code, as defined by BCP 47, with some extensions from Unicode's LDML
  3750  // format (http://www.unicode.org/reports/tr35/).
  3751  func (c *AppsListCall) LanguageCode(languageCode string) *AppsListCall {
  3752  	c.urlParams_.Set("languageCode", languageCode)
  3753  	return c
  3754  }
  3755  
  3756  // Fields allows partial responses to be retrieved. See
  3757  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  3758  // details.
  3759  func (c *AppsListCall) Fields(s ...googleapi.Field) *AppsListCall {
  3760  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  3761  	return c
  3762  }
  3763  
  3764  // IfNoneMatch sets an optional parameter which makes the operation fail if the
  3765  // object's ETag matches the given value. This is useful for getting updates
  3766  // only after the object has changed since the last request.
  3767  func (c *AppsListCall) IfNoneMatch(entityTag string) *AppsListCall {
  3768  	c.ifNoneMatch_ = entityTag
  3769  	return c
  3770  }
  3771  
  3772  // Context sets the context to be used in this call's Do method.
  3773  func (c *AppsListCall) Context(ctx context.Context) *AppsListCall {
  3774  	c.ctx_ = ctx
  3775  	return c
  3776  }
  3777  
  3778  // Header returns a http.Header that can be modified by the caller to add
  3779  // headers to the request.
  3780  func (c *AppsListCall) Header() http.Header {
  3781  	if c.header_ == nil {
  3782  		c.header_ = make(http.Header)
  3783  	}
  3784  	return c.header_
  3785  }
  3786  
  3787  func (c *AppsListCall) doRequest(alt string) (*http.Response, error) {
  3788  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  3789  	if c.ifNoneMatch_ != "" {
  3790  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  3791  	}
  3792  	var body io.Reader = nil
  3793  	c.urlParams_.Set("alt", alt)
  3794  	c.urlParams_.Set("prettyPrint", "false")
  3795  	urls := googleapi.ResolveRelative(c.s.BasePath, "apps")
  3796  	urls += "?" + c.urlParams_.Encode()
  3797  	req, err := http.NewRequest("GET", urls, body)
  3798  	if err != nil {
  3799  		return nil, err
  3800  	}
  3801  	req.Header = reqHeaders
  3802  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  3803  }
  3804  
  3805  // Do executes the "drive.apps.list" call.
  3806  // Any non-2xx status code is an error. Response headers are in either
  3807  // *AppList.ServerResponse.Header or (if a response was returned at all) in
  3808  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  3809  // whether the returned error was because http.StatusNotModified was returned.
  3810  func (c *AppsListCall) Do(opts ...googleapi.CallOption) (*AppList, error) {
  3811  	gensupport.SetOptions(c.urlParams_, opts...)
  3812  	res, err := c.doRequest("json")
  3813  	if res != nil && res.StatusCode == http.StatusNotModified {
  3814  		if res.Body != nil {
  3815  			res.Body.Close()
  3816  		}
  3817  		return nil, gensupport.WrapError(&googleapi.Error{
  3818  			Code:   res.StatusCode,
  3819  			Header: res.Header,
  3820  		})
  3821  	}
  3822  	if err != nil {
  3823  		return nil, err
  3824  	}
  3825  	defer googleapi.CloseBody(res)
  3826  	if err := googleapi.CheckResponse(res); err != nil {
  3827  		return nil, gensupport.WrapError(err)
  3828  	}
  3829  	ret := &AppList{
  3830  		ServerResponse: googleapi.ServerResponse{
  3831  			Header:         res.Header,
  3832  			HTTPStatusCode: res.StatusCode,
  3833  		},
  3834  	}
  3835  	target := &ret
  3836  	if err := gensupport.DecodeResponse(target, res); err != nil {
  3837  		return nil, err
  3838  	}
  3839  	return ret, nil
  3840  }
  3841  
  3842  type ChangesGetCall struct {
  3843  	s            *Service
  3844  	changeId     string
  3845  	urlParams_   gensupport.URLParams
  3846  	ifNoneMatch_ string
  3847  	ctx_         context.Context
  3848  	header_      http.Header
  3849  }
  3850  
  3851  // Get: Deprecated: Use `changes.getStartPageToken` and `changes.list` to
  3852  // retrieve recent changes.
  3853  //
  3854  // - changeId: The ID of the change.
  3855  func (r *ChangesService) Get(changeId string) *ChangesGetCall {
  3856  	c := &ChangesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  3857  	c.changeId = changeId
  3858  	return c
  3859  }
  3860  
  3861  // DriveId sets the optional parameter "driveId": The shared drive from which
  3862  // the change will be returned.
  3863  func (c *ChangesGetCall) DriveId(driveId string) *ChangesGetCall {
  3864  	c.urlParams_.Set("driveId", driveId)
  3865  	return c
  3866  }
  3867  
  3868  // SupportsAllDrives sets the optional parameter "supportsAllDrives": Whether
  3869  // the requesting application supports both My Drives and shared drives.
  3870  func (c *ChangesGetCall) SupportsAllDrives(supportsAllDrives bool) *ChangesGetCall {
  3871  	c.urlParams_.Set("supportsAllDrives", fmt.Sprint(supportsAllDrives))
  3872  	return c
  3873  }
  3874  
  3875  // SupportsTeamDrives sets the optional parameter "supportsTeamDrives":
  3876  // Deprecated: Use `supportsAllDrives` instead.
  3877  func (c *ChangesGetCall) SupportsTeamDrives(supportsTeamDrives bool) *ChangesGetCall {
  3878  	c.urlParams_.Set("supportsTeamDrives", fmt.Sprint(supportsTeamDrives))
  3879  	return c
  3880  }
  3881  
  3882  // TeamDriveId sets the optional parameter "teamDriveId": Deprecated: Use
  3883  // `driveId` instead.
  3884  func (c *ChangesGetCall) TeamDriveId(teamDriveId string) *ChangesGetCall {
  3885  	c.urlParams_.Set("teamDriveId", teamDriveId)
  3886  	return c
  3887  }
  3888  
  3889  // Fields allows partial responses to be retrieved. See
  3890  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  3891  // details.
  3892  func (c *ChangesGetCall) Fields(s ...googleapi.Field) *ChangesGetCall {
  3893  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  3894  	return c
  3895  }
  3896  
  3897  // IfNoneMatch sets an optional parameter which makes the operation fail if the
  3898  // object's ETag matches the given value. This is useful for getting updates
  3899  // only after the object has changed since the last request.
  3900  func (c *ChangesGetCall) IfNoneMatch(entityTag string) *ChangesGetCall {
  3901  	c.ifNoneMatch_ = entityTag
  3902  	return c
  3903  }
  3904  
  3905  // Context sets the context to be used in this call's Do method.
  3906  func (c *ChangesGetCall) Context(ctx context.Context) *ChangesGetCall {
  3907  	c.ctx_ = ctx
  3908  	return c
  3909  }
  3910  
  3911  // Header returns a http.Header that can be modified by the caller to add
  3912  // headers to the request.
  3913  func (c *ChangesGetCall) Header() http.Header {
  3914  	if c.header_ == nil {
  3915  		c.header_ = make(http.Header)
  3916  	}
  3917  	return c.header_
  3918  }
  3919  
  3920  func (c *ChangesGetCall) doRequest(alt string) (*http.Response, error) {
  3921  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  3922  	if c.ifNoneMatch_ != "" {
  3923  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  3924  	}
  3925  	var body io.Reader = nil
  3926  	c.urlParams_.Set("alt", alt)
  3927  	c.urlParams_.Set("prettyPrint", "false")
  3928  	urls := googleapi.ResolveRelative(c.s.BasePath, "changes/{changeId}")
  3929  	urls += "?" + c.urlParams_.Encode()
  3930  	req, err := http.NewRequest("GET", urls, body)
  3931  	if err != nil {
  3932  		return nil, err
  3933  	}
  3934  	req.Header = reqHeaders
  3935  	googleapi.Expand(req.URL, map[string]string{
  3936  		"changeId": c.changeId,
  3937  	})
  3938  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  3939  }
  3940  
  3941  // Do executes the "drive.changes.get" call.
  3942  // Any non-2xx status code is an error. Response headers are in either
  3943  // *Change.ServerResponse.Header or (if a response was returned at all) in
  3944  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  3945  // whether the returned error was because http.StatusNotModified was returned.
  3946  func (c *ChangesGetCall) Do(opts ...googleapi.CallOption) (*Change, error) {
  3947  	gensupport.SetOptions(c.urlParams_, opts...)
  3948  	res, err := c.doRequest("json")
  3949  	if res != nil && res.StatusCode == http.StatusNotModified {
  3950  		if res.Body != nil {
  3951  			res.Body.Close()
  3952  		}
  3953  		return nil, gensupport.WrapError(&googleapi.Error{
  3954  			Code:   res.StatusCode,
  3955  			Header: res.Header,
  3956  		})
  3957  	}
  3958  	if err != nil {
  3959  		return nil, err
  3960  	}
  3961  	defer googleapi.CloseBody(res)
  3962  	if err := googleapi.CheckResponse(res); err != nil {
  3963  		return nil, gensupport.WrapError(err)
  3964  	}
  3965  	ret := &Change{
  3966  		ServerResponse: googleapi.ServerResponse{
  3967  			Header:         res.Header,
  3968  			HTTPStatusCode: res.StatusCode,
  3969  		},
  3970  	}
  3971  	target := &ret
  3972  	if err := gensupport.DecodeResponse(target, res); err != nil {
  3973  		return nil, err
  3974  	}
  3975  	return ret, nil
  3976  }
  3977  
  3978  type ChangesGetStartPageTokenCall struct {
  3979  	s            *Service
  3980  	urlParams_   gensupport.URLParams
  3981  	ifNoneMatch_ string
  3982  	ctx_         context.Context
  3983  	header_      http.Header
  3984  }
  3985  
  3986  // GetStartPageToken: Gets the starting pageToken for listing future changes.
  3987  func (r *ChangesService) GetStartPageToken() *ChangesGetStartPageTokenCall {
  3988  	c := &ChangesGetStartPageTokenCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  3989  	return c
  3990  }
  3991  
  3992  // DriveId sets the optional parameter "driveId": The ID of the shared drive
  3993  // for which the starting pageToken for listing future changes from that shared
  3994  // drive will be returned.
  3995  func (c *ChangesGetStartPageTokenCall) DriveId(driveId string) *ChangesGetStartPageTokenCall {
  3996  	c.urlParams_.Set("driveId", driveId)
  3997  	return c
  3998  }
  3999  
  4000  // SupportsAllDrives sets the optional parameter "supportsAllDrives": Whether
  4001  // the requesting application supports both My Drives and shared drives.
  4002  func (c *ChangesGetStartPageTokenCall) SupportsAllDrives(supportsAllDrives bool) *ChangesGetStartPageTokenCall {
  4003  	c.urlParams_.Set("supportsAllDrives", fmt.Sprint(supportsAllDrives))
  4004  	return c
  4005  }
  4006  
  4007  // SupportsTeamDrives sets the optional parameter "supportsTeamDrives":
  4008  // Deprecated: Use `supportsAllDrives` instead.
  4009  func (c *ChangesGetStartPageTokenCall) SupportsTeamDrives(supportsTeamDrives bool) *ChangesGetStartPageTokenCall {
  4010  	c.urlParams_.Set("supportsTeamDrives", fmt.Sprint(supportsTeamDrives))
  4011  	return c
  4012  }
  4013  
  4014  // TeamDriveId sets the optional parameter "teamDriveId": Deprecated: Use
  4015  // `driveId` instead.
  4016  func (c *ChangesGetStartPageTokenCall) TeamDriveId(teamDriveId string) *ChangesGetStartPageTokenCall {
  4017  	c.urlParams_.Set("teamDriveId", teamDriveId)
  4018  	return c
  4019  }
  4020  
  4021  // Fields allows partial responses to be retrieved. See
  4022  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  4023  // details.
  4024  func (c *ChangesGetStartPageTokenCall) Fields(s ...googleapi.Field) *ChangesGetStartPageTokenCall {
  4025  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  4026  	return c
  4027  }
  4028  
  4029  // IfNoneMatch sets an optional parameter which makes the operation fail if the
  4030  // object's ETag matches the given value. This is useful for getting updates
  4031  // only after the object has changed since the last request.
  4032  func (c *ChangesGetStartPageTokenCall) IfNoneMatch(entityTag string) *ChangesGetStartPageTokenCall {
  4033  	c.ifNoneMatch_ = entityTag
  4034  	return c
  4035  }
  4036  
  4037  // Context sets the context to be used in this call's Do method.
  4038  func (c *ChangesGetStartPageTokenCall) Context(ctx context.Context) *ChangesGetStartPageTokenCall {
  4039  	c.ctx_ = ctx
  4040  	return c
  4041  }
  4042  
  4043  // Header returns a http.Header that can be modified by the caller to add
  4044  // headers to the request.
  4045  func (c *ChangesGetStartPageTokenCall) Header() http.Header {
  4046  	if c.header_ == nil {
  4047  		c.header_ = make(http.Header)
  4048  	}
  4049  	return c.header_
  4050  }
  4051  
  4052  func (c *ChangesGetStartPageTokenCall) doRequest(alt string) (*http.Response, error) {
  4053  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  4054  	if c.ifNoneMatch_ != "" {
  4055  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  4056  	}
  4057  	var body io.Reader = nil
  4058  	c.urlParams_.Set("alt", alt)
  4059  	c.urlParams_.Set("prettyPrint", "false")
  4060  	urls := googleapi.ResolveRelative(c.s.BasePath, "changes/startPageToken")
  4061  	urls += "?" + c.urlParams_.Encode()
  4062  	req, err := http.NewRequest("GET", urls, body)
  4063  	if err != nil {
  4064  		return nil, err
  4065  	}
  4066  	req.Header = reqHeaders
  4067  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  4068  }
  4069  
  4070  // Do executes the "drive.changes.getStartPageToken" call.
  4071  // Any non-2xx status code is an error. Response headers are in either
  4072  // *StartPageToken.ServerResponse.Header or (if a response was returned at all)
  4073  // in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  4074  // whether the returned error was because http.StatusNotModified was returned.
  4075  func (c *ChangesGetStartPageTokenCall) Do(opts ...googleapi.CallOption) (*StartPageToken, error) {
  4076  	gensupport.SetOptions(c.urlParams_, opts...)
  4077  	res, err := c.doRequest("json")
  4078  	if res != nil && res.StatusCode == http.StatusNotModified {
  4079  		if res.Body != nil {
  4080  			res.Body.Close()
  4081  		}
  4082  		return nil, gensupport.WrapError(&googleapi.Error{
  4083  			Code:   res.StatusCode,
  4084  			Header: res.Header,
  4085  		})
  4086  	}
  4087  	if err != nil {
  4088  		return nil, err
  4089  	}
  4090  	defer googleapi.CloseBody(res)
  4091  	if err := googleapi.CheckResponse(res); err != nil {
  4092  		return nil, gensupport.WrapError(err)
  4093  	}
  4094  	ret := &StartPageToken{
  4095  		ServerResponse: googleapi.ServerResponse{
  4096  			Header:         res.Header,
  4097  			HTTPStatusCode: res.StatusCode,
  4098  		},
  4099  	}
  4100  	target := &ret
  4101  	if err := gensupport.DecodeResponse(target, res); err != nil {
  4102  		return nil, err
  4103  	}
  4104  	return ret, nil
  4105  }
  4106  
  4107  type ChangesListCall struct {
  4108  	s            *Service
  4109  	urlParams_   gensupport.URLParams
  4110  	ifNoneMatch_ string
  4111  	ctx_         context.Context
  4112  	header_      http.Header
  4113  }
  4114  
  4115  // List: Lists the changes for a user or shared drive.
  4116  func (r *ChangesService) List() *ChangesListCall {
  4117  	c := &ChangesListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  4118  	return c
  4119  }
  4120  
  4121  // DriveId sets the optional parameter "driveId": The shared drive from which
  4122  // changes will be returned. If specified the change IDs will be reflective of
  4123  // the shared drive; use the combined drive ID and change ID as an identifier.
  4124  func (c *ChangesListCall) DriveId(driveId string) *ChangesListCall {
  4125  	c.urlParams_.Set("driveId", driveId)
  4126  	return c
  4127  }
  4128  
  4129  // IncludeCorpusRemovals sets the optional parameter "includeCorpusRemovals":
  4130  // Whether changes should include the file resource if the file is still
  4131  // accessible by the user at the time of the request, even when a file was
  4132  // removed from the list of changes and there will be no further change entries
  4133  // for this file.
  4134  func (c *ChangesListCall) IncludeCorpusRemovals(includeCorpusRemovals bool) *ChangesListCall {
  4135  	c.urlParams_.Set("includeCorpusRemovals", fmt.Sprint(includeCorpusRemovals))
  4136  	return c
  4137  }
  4138  
  4139  // IncludeDeleted sets the optional parameter "includeDeleted": Whether to
  4140  // include changes indicating that items have been removed from the list of
  4141  // changes, for example by deletion or loss of access.
  4142  func (c *ChangesListCall) IncludeDeleted(includeDeleted bool) *ChangesListCall {
  4143  	c.urlParams_.Set("includeDeleted", fmt.Sprint(includeDeleted))
  4144  	return c
  4145  }
  4146  
  4147  // IncludeItemsFromAllDrives sets the optional parameter
  4148  // "includeItemsFromAllDrives": Whether both My Drive and shared drive items
  4149  // should be included in results.
  4150  func (c *ChangesListCall) IncludeItemsFromAllDrives(includeItemsFromAllDrives bool) *ChangesListCall {
  4151  	c.urlParams_.Set("includeItemsFromAllDrives", fmt.Sprint(includeItemsFromAllDrives))
  4152  	return c
  4153  }
  4154  
  4155  // IncludeLabels sets the optional parameter "includeLabels": A comma-separated
  4156  // list of IDs of labels to include in the `labelInfo` part of the response.
  4157  func (c *ChangesListCall) IncludeLabels(includeLabels string) *ChangesListCall {
  4158  	c.urlParams_.Set("includeLabels", includeLabels)
  4159  	return c
  4160  }
  4161  
  4162  // IncludePermissionsForView sets the optional parameter
  4163  // "includePermissionsForView": Specifies which additional view's permissions
  4164  // to include in the response. Only `published` is supported.
  4165  func (c *ChangesListCall) IncludePermissionsForView(includePermissionsForView string) *ChangesListCall {
  4166  	c.urlParams_.Set("includePermissionsForView", includePermissionsForView)
  4167  	return c
  4168  }
  4169  
  4170  // IncludeSubscribed sets the optional parameter "includeSubscribed": Whether
  4171  // to include changes outside the My Drive hierarchy in the result. When set to
  4172  // false, changes to files such as those in the Application Data folder or
  4173  // shared files which have not been added to My Drive will be omitted from the
  4174  // result.
  4175  func (c *ChangesListCall) IncludeSubscribed(includeSubscribed bool) *ChangesListCall {
  4176  	c.urlParams_.Set("includeSubscribed", fmt.Sprint(includeSubscribed))
  4177  	return c
  4178  }
  4179  
  4180  // IncludeTeamDriveItems sets the optional parameter "includeTeamDriveItems":
  4181  // Deprecated: Use `includeItemsFromAllDrives` instead.
  4182  func (c *ChangesListCall) IncludeTeamDriveItems(includeTeamDriveItems bool) *ChangesListCall {
  4183  	c.urlParams_.Set("includeTeamDriveItems", fmt.Sprint(includeTeamDriveItems))
  4184  	return c
  4185  }
  4186  
  4187  // MaxResults sets the optional parameter "maxResults": Maximum number of
  4188  // changes to return.
  4189  func (c *ChangesListCall) MaxResults(maxResults int64) *ChangesListCall {
  4190  	c.urlParams_.Set("maxResults", fmt.Sprint(maxResults))
  4191  	return c
  4192  }
  4193  
  4194  // PageToken sets the optional parameter "pageToken": The token for continuing
  4195  // a previous list request on the next page. This should be set to the value of
  4196  // `nextPageToken` from the previous response or to the response from the
  4197  // getStartPageToken method.
  4198  func (c *ChangesListCall) PageToken(pageToken string) *ChangesListCall {
  4199  	c.urlParams_.Set("pageToken", pageToken)
  4200  	return c
  4201  }
  4202  
  4203  // Spaces sets the optional parameter "spaces": A comma-separated list of
  4204  // spaces to query. Supported values are `drive`, `appDataFolder` and `photos`.
  4205  func (c *ChangesListCall) Spaces(spaces string) *ChangesListCall {
  4206  	c.urlParams_.Set("spaces", spaces)
  4207  	return c
  4208  }
  4209  
  4210  // StartChangeId sets the optional parameter "startChangeId": Deprecated: Use
  4211  // `pageToken` instead.
  4212  func (c *ChangesListCall) StartChangeId(startChangeId int64) *ChangesListCall {
  4213  	c.urlParams_.Set("startChangeId", fmt.Sprint(startChangeId))
  4214  	return c
  4215  }
  4216  
  4217  // SupportsAllDrives sets the optional parameter "supportsAllDrives": Whether
  4218  // the requesting application supports both My Drives and shared drives.
  4219  func (c *ChangesListCall) SupportsAllDrives(supportsAllDrives bool) *ChangesListCall {
  4220  	c.urlParams_.Set("supportsAllDrives", fmt.Sprint(supportsAllDrives))
  4221  	return c
  4222  }
  4223  
  4224  // SupportsTeamDrives sets the optional parameter "supportsTeamDrives":
  4225  // Deprecated: Use `supportsAllDrives` instead.
  4226  func (c *ChangesListCall) SupportsTeamDrives(supportsTeamDrives bool) *ChangesListCall {
  4227  	c.urlParams_.Set("supportsTeamDrives", fmt.Sprint(supportsTeamDrives))
  4228  	return c
  4229  }
  4230  
  4231  // TeamDriveId sets the optional parameter "teamDriveId": Deprecated: Use
  4232  // `driveId` instead.
  4233  func (c *ChangesListCall) TeamDriveId(teamDriveId string) *ChangesListCall {
  4234  	c.urlParams_.Set("teamDriveId", teamDriveId)
  4235  	return c
  4236  }
  4237  
  4238  // Fields allows partial responses to be retrieved. See
  4239  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  4240  // details.
  4241  func (c *ChangesListCall) Fields(s ...googleapi.Field) *ChangesListCall {
  4242  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  4243  	return c
  4244  }
  4245  
  4246  // IfNoneMatch sets an optional parameter which makes the operation fail if the
  4247  // object's ETag matches the given value. This is useful for getting updates
  4248  // only after the object has changed since the last request.
  4249  func (c *ChangesListCall) IfNoneMatch(entityTag string) *ChangesListCall {
  4250  	c.ifNoneMatch_ = entityTag
  4251  	return c
  4252  }
  4253  
  4254  // Context sets the context to be used in this call's Do method.
  4255  func (c *ChangesListCall) Context(ctx context.Context) *ChangesListCall {
  4256  	c.ctx_ = ctx
  4257  	return c
  4258  }
  4259  
  4260  // Header returns a http.Header that can be modified by the caller to add
  4261  // headers to the request.
  4262  func (c *ChangesListCall) Header() http.Header {
  4263  	if c.header_ == nil {
  4264  		c.header_ = make(http.Header)
  4265  	}
  4266  	return c.header_
  4267  }
  4268  
  4269  func (c *ChangesListCall) doRequest(alt string) (*http.Response, error) {
  4270  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  4271  	if c.ifNoneMatch_ != "" {
  4272  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  4273  	}
  4274  	var body io.Reader = nil
  4275  	c.urlParams_.Set("alt", alt)
  4276  	c.urlParams_.Set("prettyPrint", "false")
  4277  	urls := googleapi.ResolveRelative(c.s.BasePath, "changes")
  4278  	urls += "?" + c.urlParams_.Encode()
  4279  	req, err := http.NewRequest("GET", urls, body)
  4280  	if err != nil {
  4281  		return nil, err
  4282  	}
  4283  	req.Header = reqHeaders
  4284  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  4285  }
  4286  
  4287  // Do executes the "drive.changes.list" call.
  4288  // Any non-2xx status code is an error. Response headers are in either
  4289  // *ChangeList.ServerResponse.Header or (if a response was returned at all) in
  4290  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  4291  // whether the returned error was because http.StatusNotModified was returned.
  4292  func (c *ChangesListCall) Do(opts ...googleapi.CallOption) (*ChangeList, error) {
  4293  	gensupport.SetOptions(c.urlParams_, opts...)
  4294  	res, err := c.doRequest("json")
  4295  	if res != nil && res.StatusCode == http.StatusNotModified {
  4296  		if res.Body != nil {
  4297  			res.Body.Close()
  4298  		}
  4299  		return nil, gensupport.WrapError(&googleapi.Error{
  4300  			Code:   res.StatusCode,
  4301  			Header: res.Header,
  4302  		})
  4303  	}
  4304  	if err != nil {
  4305  		return nil, err
  4306  	}
  4307  	defer googleapi.CloseBody(res)
  4308  	if err := googleapi.CheckResponse(res); err != nil {
  4309  		return nil, gensupport.WrapError(err)
  4310  	}
  4311  	ret := &ChangeList{
  4312  		ServerResponse: googleapi.ServerResponse{
  4313  			Header:         res.Header,
  4314  			HTTPStatusCode: res.StatusCode,
  4315  		},
  4316  	}
  4317  	target := &ret
  4318  	if err := gensupport.DecodeResponse(target, res); err != nil {
  4319  		return nil, err
  4320  	}
  4321  	return ret, nil
  4322  }
  4323  
  4324  // Pages invokes f for each page of results.
  4325  // A non-nil error returned from f will halt the iteration.
  4326  // The provided context supersedes any context provided to the Context method.
  4327  func (c *ChangesListCall) Pages(ctx context.Context, f func(*ChangeList) error) error {
  4328  	c.ctx_ = ctx
  4329  	defer c.PageToken(c.urlParams_.Get("pageToken"))
  4330  	for {
  4331  		x, err := c.Do()
  4332  		if err != nil {
  4333  			return err
  4334  		}
  4335  		if err := f(x); err != nil {
  4336  			return err
  4337  		}
  4338  		if x.NextPageToken == "" {
  4339  			return nil
  4340  		}
  4341  		c.PageToken(x.NextPageToken)
  4342  	}
  4343  }
  4344  
  4345  type ChangesWatchCall struct {
  4346  	s          *Service
  4347  	channel    *Channel
  4348  	urlParams_ gensupport.URLParams
  4349  	ctx_       context.Context
  4350  	header_    http.Header
  4351  }
  4352  
  4353  // Watch: Subscribe to changes for a user.
  4354  func (r *ChangesService) Watch(channel *Channel) *ChangesWatchCall {
  4355  	c := &ChangesWatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  4356  	c.channel = channel
  4357  	return c
  4358  }
  4359  
  4360  // DriveId sets the optional parameter "driveId": The shared drive from which
  4361  // changes will be returned. If specified the change IDs will be reflective of
  4362  // the shared drive; use the combined drive ID and change ID as an identifier.
  4363  func (c *ChangesWatchCall) DriveId(driveId string) *ChangesWatchCall {
  4364  	c.urlParams_.Set("driveId", driveId)
  4365  	return c
  4366  }
  4367  
  4368  // IncludeCorpusRemovals sets the optional parameter "includeCorpusRemovals":
  4369  // Whether changes should include the file resource if the file is still
  4370  // accessible by the user at the time of the request, even when a file was
  4371  // removed from the list of changes and there will be no further change entries
  4372  // for this file.
  4373  func (c *ChangesWatchCall) IncludeCorpusRemovals(includeCorpusRemovals bool) *ChangesWatchCall {
  4374  	c.urlParams_.Set("includeCorpusRemovals", fmt.Sprint(includeCorpusRemovals))
  4375  	return c
  4376  }
  4377  
  4378  // IncludeDeleted sets the optional parameter "includeDeleted": Whether to
  4379  // include changes indicating that items have been removed from the list of
  4380  // changes, for example by deletion or loss of access.
  4381  func (c *ChangesWatchCall) IncludeDeleted(includeDeleted bool) *ChangesWatchCall {
  4382  	c.urlParams_.Set("includeDeleted", fmt.Sprint(includeDeleted))
  4383  	return c
  4384  }
  4385  
  4386  // IncludeItemsFromAllDrives sets the optional parameter
  4387  // "includeItemsFromAllDrives": Whether both My Drive and shared drive items
  4388  // should be included in results.
  4389  func (c *ChangesWatchCall) IncludeItemsFromAllDrives(includeItemsFromAllDrives bool) *ChangesWatchCall {
  4390  	c.urlParams_.Set("includeItemsFromAllDrives", fmt.Sprint(includeItemsFromAllDrives))
  4391  	return c
  4392  }
  4393  
  4394  // IncludeLabels sets the optional parameter "includeLabels": A comma-separated
  4395  // list of IDs of labels to include in the `labelInfo` part of the response.
  4396  func (c *ChangesWatchCall) IncludeLabels(includeLabels string) *ChangesWatchCall {
  4397  	c.urlParams_.Set("includeLabels", includeLabels)
  4398  	return c
  4399  }
  4400  
  4401  // IncludePermissionsForView sets the optional parameter
  4402  // "includePermissionsForView": Specifies which additional view's permissions
  4403  // to include in the response. Only `published` is supported.
  4404  func (c *ChangesWatchCall) IncludePermissionsForView(includePermissionsForView string) *ChangesWatchCall {
  4405  	c.urlParams_.Set("includePermissionsForView", includePermissionsForView)
  4406  	return c
  4407  }
  4408  
  4409  // IncludeSubscribed sets the optional parameter "includeSubscribed": Whether
  4410  // to include changes outside the My Drive hierarchy in the result. When set to
  4411  // false, changes to files such as those in the Application Data folder or
  4412  // shared files which have not been added to My Drive will be omitted from the
  4413  // result.
  4414  func (c *ChangesWatchCall) IncludeSubscribed(includeSubscribed bool) *ChangesWatchCall {
  4415  	c.urlParams_.Set("includeSubscribed", fmt.Sprint(includeSubscribed))
  4416  	return c
  4417  }
  4418  
  4419  // IncludeTeamDriveItems sets the optional parameter "includeTeamDriveItems":
  4420  // Deprecated: Use `includeItemsFromAllDrives` instead.
  4421  func (c *ChangesWatchCall) IncludeTeamDriveItems(includeTeamDriveItems bool) *ChangesWatchCall {
  4422  	c.urlParams_.Set("includeTeamDriveItems", fmt.Sprint(includeTeamDriveItems))
  4423  	return c
  4424  }
  4425  
  4426  // MaxResults sets the optional parameter "maxResults": Maximum number of
  4427  // changes to return.
  4428  func (c *ChangesWatchCall) MaxResults(maxResults int64) *ChangesWatchCall {
  4429  	c.urlParams_.Set("maxResults", fmt.Sprint(maxResults))
  4430  	return c
  4431  }
  4432  
  4433  // PageToken sets the optional parameter "pageToken": The token for continuing
  4434  // a previous list request on the next page. This should be set to the value of
  4435  // `nextPageToken` from the previous response or to the response from the
  4436  // getStartPageToken method.
  4437  func (c *ChangesWatchCall) PageToken(pageToken string) *ChangesWatchCall {
  4438  	c.urlParams_.Set("pageToken", pageToken)
  4439  	return c
  4440  }
  4441  
  4442  // Spaces sets the optional parameter "spaces": A comma-separated list of
  4443  // spaces to query. Supported values are `drive`, `appDataFolder` and `photos`.
  4444  func (c *ChangesWatchCall) Spaces(spaces string) *ChangesWatchCall {
  4445  	c.urlParams_.Set("spaces", spaces)
  4446  	return c
  4447  }
  4448  
  4449  // StartChangeId sets the optional parameter "startChangeId": Deprecated: Use
  4450  // `pageToken` instead.
  4451  func (c *ChangesWatchCall) StartChangeId(startChangeId int64) *ChangesWatchCall {
  4452  	c.urlParams_.Set("startChangeId", fmt.Sprint(startChangeId))
  4453  	return c
  4454  }
  4455  
  4456  // SupportsAllDrives sets the optional parameter "supportsAllDrives": Whether
  4457  // the requesting application supports both My Drives and shared drives.
  4458  func (c *ChangesWatchCall) SupportsAllDrives(supportsAllDrives bool) *ChangesWatchCall {
  4459  	c.urlParams_.Set("supportsAllDrives", fmt.Sprint(supportsAllDrives))
  4460  	return c
  4461  }
  4462  
  4463  // SupportsTeamDrives sets the optional parameter "supportsTeamDrives":
  4464  // Deprecated: Use `supportsAllDrives` instead.
  4465  func (c *ChangesWatchCall) SupportsTeamDrives(supportsTeamDrives bool) *ChangesWatchCall {
  4466  	c.urlParams_.Set("supportsTeamDrives", fmt.Sprint(supportsTeamDrives))
  4467  	return c
  4468  }
  4469  
  4470  // TeamDriveId sets the optional parameter "teamDriveId": Deprecated: Use
  4471  // `driveId` instead.
  4472  func (c *ChangesWatchCall) TeamDriveId(teamDriveId string) *ChangesWatchCall {
  4473  	c.urlParams_.Set("teamDriveId", teamDriveId)
  4474  	return c
  4475  }
  4476  
  4477  // Fields allows partial responses to be retrieved. See
  4478  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  4479  // details.
  4480  func (c *ChangesWatchCall) Fields(s ...googleapi.Field) *ChangesWatchCall {
  4481  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  4482  	return c
  4483  }
  4484  
  4485  // Context sets the context to be used in this call's Do method.
  4486  func (c *ChangesWatchCall) Context(ctx context.Context) *ChangesWatchCall {
  4487  	c.ctx_ = ctx
  4488  	return c
  4489  }
  4490  
  4491  // Header returns a http.Header that can be modified by the caller to add
  4492  // headers to the request.
  4493  func (c *ChangesWatchCall) Header() http.Header {
  4494  	if c.header_ == nil {
  4495  		c.header_ = make(http.Header)
  4496  	}
  4497  	return c.header_
  4498  }
  4499  
  4500  func (c *ChangesWatchCall) doRequest(alt string) (*http.Response, error) {
  4501  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
  4502  	var body io.Reader = nil
  4503  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.channel)
  4504  	if err != nil {
  4505  		return nil, err
  4506  	}
  4507  	c.urlParams_.Set("alt", alt)
  4508  	c.urlParams_.Set("prettyPrint", "false")
  4509  	urls := googleapi.ResolveRelative(c.s.BasePath, "changes/watch")
  4510  	urls += "?" + c.urlParams_.Encode()
  4511  	req, err := http.NewRequest("POST", urls, body)
  4512  	if err != nil {
  4513  		return nil, err
  4514  	}
  4515  	req.Header = reqHeaders
  4516  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  4517  }
  4518  
  4519  // Do executes the "drive.changes.watch" call.
  4520  // Any non-2xx status code is an error. Response headers are in either
  4521  // *Channel.ServerResponse.Header or (if a response was returned at all) in
  4522  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  4523  // whether the returned error was because http.StatusNotModified was returned.
  4524  func (c *ChangesWatchCall) Do(opts ...googleapi.CallOption) (*Channel, error) {
  4525  	gensupport.SetOptions(c.urlParams_, opts...)
  4526  	res, err := c.doRequest("json")
  4527  	if res != nil && res.StatusCode == http.StatusNotModified {
  4528  		if res.Body != nil {
  4529  			res.Body.Close()
  4530  		}
  4531  		return nil, gensupport.WrapError(&googleapi.Error{
  4532  			Code:   res.StatusCode,
  4533  			Header: res.Header,
  4534  		})
  4535  	}
  4536  	if err != nil {
  4537  		return nil, err
  4538  	}
  4539  	defer googleapi.CloseBody(res)
  4540  	if err := googleapi.CheckResponse(res); err != nil {
  4541  		return nil, gensupport.WrapError(err)
  4542  	}
  4543  	ret := &Channel{
  4544  		ServerResponse: googleapi.ServerResponse{
  4545  			Header:         res.Header,
  4546  			HTTPStatusCode: res.StatusCode,
  4547  		},
  4548  	}
  4549  	target := &ret
  4550  	if err := gensupport.DecodeResponse(target, res); err != nil {
  4551  		return nil, err
  4552  	}
  4553  	return ret, nil
  4554  }
  4555  
  4556  type ChannelsStopCall struct {
  4557  	s          *Service
  4558  	channel    *Channel
  4559  	urlParams_ gensupport.URLParams
  4560  	ctx_       context.Context
  4561  	header_    http.Header
  4562  }
  4563  
  4564  // Stop: Stops watching resources through this channel.
  4565  func (r *ChannelsService) Stop(channel *Channel) *ChannelsStopCall {
  4566  	c := &ChannelsStopCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  4567  	c.channel = channel
  4568  	return c
  4569  }
  4570  
  4571  // Fields allows partial responses to be retrieved. See
  4572  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  4573  // details.
  4574  func (c *ChannelsStopCall) Fields(s ...googleapi.Field) *ChannelsStopCall {
  4575  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  4576  	return c
  4577  }
  4578  
  4579  // Context sets the context to be used in this call's Do method.
  4580  func (c *ChannelsStopCall) Context(ctx context.Context) *ChannelsStopCall {
  4581  	c.ctx_ = ctx
  4582  	return c
  4583  }
  4584  
  4585  // Header returns a http.Header that can be modified by the caller to add
  4586  // headers to the request.
  4587  func (c *ChannelsStopCall) Header() http.Header {
  4588  	if c.header_ == nil {
  4589  		c.header_ = make(http.Header)
  4590  	}
  4591  	return c.header_
  4592  }
  4593  
  4594  func (c *ChannelsStopCall) doRequest(alt string) (*http.Response, error) {
  4595  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
  4596  	var body io.Reader = nil
  4597  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.channel)
  4598  	if err != nil {
  4599  		return nil, err
  4600  	}
  4601  	c.urlParams_.Set("alt", alt)
  4602  	c.urlParams_.Set("prettyPrint", "false")
  4603  	urls := googleapi.ResolveRelative(c.s.BasePath, "channels/stop")
  4604  	urls += "?" + c.urlParams_.Encode()
  4605  	req, err := http.NewRequest("POST", urls, body)
  4606  	if err != nil {
  4607  		return nil, err
  4608  	}
  4609  	req.Header = reqHeaders
  4610  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  4611  }
  4612  
  4613  // Do executes the "drive.channels.stop" call.
  4614  func (c *ChannelsStopCall) Do(opts ...googleapi.CallOption) error {
  4615  	gensupport.SetOptions(c.urlParams_, opts...)
  4616  	res, err := c.doRequest("json")
  4617  	if err != nil {
  4618  		return err
  4619  	}
  4620  	defer googleapi.CloseBody(res)
  4621  	if err := googleapi.CheckResponse(res); err != nil {
  4622  		return gensupport.WrapError(err)
  4623  	}
  4624  	return nil
  4625  }
  4626  
  4627  type ChildrenDeleteCall struct {
  4628  	s          *Service
  4629  	folderId   string
  4630  	childId    string
  4631  	urlParams_ gensupport.URLParams
  4632  	ctx_       context.Context
  4633  	header_    http.Header
  4634  }
  4635  
  4636  // Delete: Removes a child from a folder.
  4637  //
  4638  // - childId: The ID of the child.
  4639  // - folderId: The ID of the folder.
  4640  func (r *ChildrenService) Delete(folderId string, childId string) *ChildrenDeleteCall {
  4641  	c := &ChildrenDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  4642  	c.folderId = folderId
  4643  	c.childId = childId
  4644  	return c
  4645  }
  4646  
  4647  // EnforceSingleParent sets the optional parameter "enforceSingleParent":
  4648  // Deprecated: If an item is not in a shared drive and its last parent is
  4649  // removed, the item is placed under its owner's root.
  4650  func (c *ChildrenDeleteCall) EnforceSingleParent(enforceSingleParent bool) *ChildrenDeleteCall {
  4651  	c.urlParams_.Set("enforceSingleParent", fmt.Sprint(enforceSingleParent))
  4652  	return c
  4653  }
  4654  
  4655  // Fields allows partial responses to be retrieved. See
  4656  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  4657  // details.
  4658  func (c *ChildrenDeleteCall) Fields(s ...googleapi.Field) *ChildrenDeleteCall {
  4659  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  4660  	return c
  4661  }
  4662  
  4663  // Context sets the context to be used in this call's Do method.
  4664  func (c *ChildrenDeleteCall) Context(ctx context.Context) *ChildrenDeleteCall {
  4665  	c.ctx_ = ctx
  4666  	return c
  4667  }
  4668  
  4669  // Header returns a http.Header that can be modified by the caller to add
  4670  // headers to the request.
  4671  func (c *ChildrenDeleteCall) Header() http.Header {
  4672  	if c.header_ == nil {
  4673  		c.header_ = make(http.Header)
  4674  	}
  4675  	return c.header_
  4676  }
  4677  
  4678  func (c *ChildrenDeleteCall) doRequest(alt string) (*http.Response, error) {
  4679  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  4680  	var body io.Reader = nil
  4681  	c.urlParams_.Set("alt", alt)
  4682  	c.urlParams_.Set("prettyPrint", "false")
  4683  	urls := googleapi.ResolveRelative(c.s.BasePath, "files/{folderId}/children/{childId}")
  4684  	urls += "?" + c.urlParams_.Encode()
  4685  	req, err := http.NewRequest("DELETE", urls, body)
  4686  	if err != nil {
  4687  		return nil, err
  4688  	}
  4689  	req.Header = reqHeaders
  4690  	googleapi.Expand(req.URL, map[string]string{
  4691  		"folderId": c.folderId,
  4692  		"childId":  c.childId,
  4693  	})
  4694  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  4695  }
  4696  
  4697  // Do executes the "drive.children.delete" call.
  4698  func (c *ChildrenDeleteCall) Do(opts ...googleapi.CallOption) error {
  4699  	gensupport.SetOptions(c.urlParams_, opts...)
  4700  	res, err := c.doRequest("json")
  4701  	if err != nil {
  4702  		return err
  4703  	}
  4704  	defer googleapi.CloseBody(res)
  4705  	if err := googleapi.CheckResponse(res); err != nil {
  4706  		return gensupport.WrapError(err)
  4707  	}
  4708  	return nil
  4709  }
  4710  
  4711  type ChildrenGetCall struct {
  4712  	s            *Service
  4713  	folderId     string
  4714  	childId      string
  4715  	urlParams_   gensupport.URLParams
  4716  	ifNoneMatch_ string
  4717  	ctx_         context.Context
  4718  	header_      http.Header
  4719  }
  4720  
  4721  // Get: Gets a specific child reference.
  4722  //
  4723  // - childId: The ID of the child.
  4724  // - folderId: The ID of the folder.
  4725  func (r *ChildrenService) Get(folderId string, childId string) *ChildrenGetCall {
  4726  	c := &ChildrenGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  4727  	c.folderId = folderId
  4728  	c.childId = childId
  4729  	return c
  4730  }
  4731  
  4732  // Fields allows partial responses to be retrieved. See
  4733  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  4734  // details.
  4735  func (c *ChildrenGetCall) Fields(s ...googleapi.Field) *ChildrenGetCall {
  4736  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  4737  	return c
  4738  }
  4739  
  4740  // IfNoneMatch sets an optional parameter which makes the operation fail if the
  4741  // object's ETag matches the given value. This is useful for getting updates
  4742  // only after the object has changed since the last request.
  4743  func (c *ChildrenGetCall) IfNoneMatch(entityTag string) *ChildrenGetCall {
  4744  	c.ifNoneMatch_ = entityTag
  4745  	return c
  4746  }
  4747  
  4748  // Context sets the context to be used in this call's Do method.
  4749  func (c *ChildrenGetCall) Context(ctx context.Context) *ChildrenGetCall {
  4750  	c.ctx_ = ctx
  4751  	return c
  4752  }
  4753  
  4754  // Header returns a http.Header that can be modified by the caller to add
  4755  // headers to the request.
  4756  func (c *ChildrenGetCall) Header() http.Header {
  4757  	if c.header_ == nil {
  4758  		c.header_ = make(http.Header)
  4759  	}
  4760  	return c.header_
  4761  }
  4762  
  4763  func (c *ChildrenGetCall) doRequest(alt string) (*http.Response, error) {
  4764  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  4765  	if c.ifNoneMatch_ != "" {
  4766  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  4767  	}
  4768  	var body io.Reader = nil
  4769  	c.urlParams_.Set("alt", alt)
  4770  	c.urlParams_.Set("prettyPrint", "false")
  4771  	urls := googleapi.ResolveRelative(c.s.BasePath, "files/{folderId}/children/{childId}")
  4772  	urls += "?" + c.urlParams_.Encode()
  4773  	req, err := http.NewRequest("GET", urls, body)
  4774  	if err != nil {
  4775  		return nil, err
  4776  	}
  4777  	req.Header = reqHeaders
  4778  	googleapi.Expand(req.URL, map[string]string{
  4779  		"folderId": c.folderId,
  4780  		"childId":  c.childId,
  4781  	})
  4782  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  4783  }
  4784  
  4785  // Do executes the "drive.children.get" call.
  4786  // Any non-2xx status code is an error. Response headers are in either
  4787  // *ChildReference.ServerResponse.Header or (if a response was returned at all)
  4788  // in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  4789  // whether the returned error was because http.StatusNotModified was returned.
  4790  func (c *ChildrenGetCall) Do(opts ...googleapi.CallOption) (*ChildReference, error) {
  4791  	gensupport.SetOptions(c.urlParams_, opts...)
  4792  	res, err := c.doRequest("json")
  4793  	if res != nil && res.StatusCode == http.StatusNotModified {
  4794  		if res.Body != nil {
  4795  			res.Body.Close()
  4796  		}
  4797  		return nil, gensupport.WrapError(&googleapi.Error{
  4798  			Code:   res.StatusCode,
  4799  			Header: res.Header,
  4800  		})
  4801  	}
  4802  	if err != nil {
  4803  		return nil, err
  4804  	}
  4805  	defer googleapi.CloseBody(res)
  4806  	if err := googleapi.CheckResponse(res); err != nil {
  4807  		return nil, gensupport.WrapError(err)
  4808  	}
  4809  	ret := &ChildReference{
  4810  		ServerResponse: googleapi.ServerResponse{
  4811  			Header:         res.Header,
  4812  			HTTPStatusCode: res.StatusCode,
  4813  		},
  4814  	}
  4815  	target := &ret
  4816  	if err := gensupport.DecodeResponse(target, res); err != nil {
  4817  		return nil, err
  4818  	}
  4819  	return ret, nil
  4820  }
  4821  
  4822  type ChildrenInsertCall struct {
  4823  	s              *Service
  4824  	folderId       string
  4825  	childreference *ChildReference
  4826  	urlParams_     gensupport.URLParams
  4827  	ctx_           context.Context
  4828  	header_        http.Header
  4829  }
  4830  
  4831  // Insert: Inserts a file into a folder.
  4832  //
  4833  // - folderId: The ID of the folder.
  4834  func (r *ChildrenService) Insert(folderId string, childreference *ChildReference) *ChildrenInsertCall {
  4835  	c := &ChildrenInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  4836  	c.folderId = folderId
  4837  	c.childreference = childreference
  4838  	return c
  4839  }
  4840  
  4841  // EnforceSingleParent sets the optional parameter "enforceSingleParent":
  4842  // Deprecated: Adding files to multiple folders is no longer supported. Use
  4843  // `shortcuts` instead.
  4844  func (c *ChildrenInsertCall) EnforceSingleParent(enforceSingleParent bool) *ChildrenInsertCall {
  4845  	c.urlParams_.Set("enforceSingleParent", fmt.Sprint(enforceSingleParent))
  4846  	return c
  4847  }
  4848  
  4849  // SupportsAllDrives sets the optional parameter "supportsAllDrives": Whether
  4850  // the requesting application supports both My Drives and shared drives.
  4851  func (c *ChildrenInsertCall) SupportsAllDrives(supportsAllDrives bool) *ChildrenInsertCall {
  4852  	c.urlParams_.Set("supportsAllDrives", fmt.Sprint(supportsAllDrives))
  4853  	return c
  4854  }
  4855  
  4856  // SupportsTeamDrives sets the optional parameter "supportsTeamDrives":
  4857  // Deprecated: Use `supportsAllDrives` instead.
  4858  func (c *ChildrenInsertCall) SupportsTeamDrives(supportsTeamDrives bool) *ChildrenInsertCall {
  4859  	c.urlParams_.Set("supportsTeamDrives", fmt.Sprint(supportsTeamDrives))
  4860  	return c
  4861  }
  4862  
  4863  // Fields allows partial responses to be retrieved. See
  4864  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  4865  // details.
  4866  func (c *ChildrenInsertCall) Fields(s ...googleapi.Field) *ChildrenInsertCall {
  4867  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  4868  	return c
  4869  }
  4870  
  4871  // Context sets the context to be used in this call's Do method.
  4872  func (c *ChildrenInsertCall) Context(ctx context.Context) *ChildrenInsertCall {
  4873  	c.ctx_ = ctx
  4874  	return c
  4875  }
  4876  
  4877  // Header returns a http.Header that can be modified by the caller to add
  4878  // headers to the request.
  4879  func (c *ChildrenInsertCall) Header() http.Header {
  4880  	if c.header_ == nil {
  4881  		c.header_ = make(http.Header)
  4882  	}
  4883  	return c.header_
  4884  }
  4885  
  4886  func (c *ChildrenInsertCall) doRequest(alt string) (*http.Response, error) {
  4887  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
  4888  	var body io.Reader = nil
  4889  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.childreference)
  4890  	if err != nil {
  4891  		return nil, err
  4892  	}
  4893  	c.urlParams_.Set("alt", alt)
  4894  	c.urlParams_.Set("prettyPrint", "false")
  4895  	urls := googleapi.ResolveRelative(c.s.BasePath, "files/{folderId}/children")
  4896  	urls += "?" + c.urlParams_.Encode()
  4897  	req, err := http.NewRequest("POST", urls, body)
  4898  	if err != nil {
  4899  		return nil, err
  4900  	}
  4901  	req.Header = reqHeaders
  4902  	googleapi.Expand(req.URL, map[string]string{
  4903  		"folderId": c.folderId,
  4904  	})
  4905  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  4906  }
  4907  
  4908  // Do executes the "drive.children.insert" call.
  4909  // Any non-2xx status code is an error. Response headers are in either
  4910  // *ChildReference.ServerResponse.Header or (if a response was returned at all)
  4911  // in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  4912  // whether the returned error was because http.StatusNotModified was returned.
  4913  func (c *ChildrenInsertCall) Do(opts ...googleapi.CallOption) (*ChildReference, error) {
  4914  	gensupport.SetOptions(c.urlParams_, opts...)
  4915  	res, err := c.doRequest("json")
  4916  	if res != nil && res.StatusCode == http.StatusNotModified {
  4917  		if res.Body != nil {
  4918  			res.Body.Close()
  4919  		}
  4920  		return nil, gensupport.WrapError(&googleapi.Error{
  4921  			Code:   res.StatusCode,
  4922  			Header: res.Header,
  4923  		})
  4924  	}
  4925  	if err != nil {
  4926  		return nil, err
  4927  	}
  4928  	defer googleapi.CloseBody(res)
  4929  	if err := googleapi.CheckResponse(res); err != nil {
  4930  		return nil, gensupport.WrapError(err)
  4931  	}
  4932  	ret := &ChildReference{
  4933  		ServerResponse: googleapi.ServerResponse{
  4934  			Header:         res.Header,
  4935  			HTTPStatusCode: res.StatusCode,
  4936  		},
  4937  	}
  4938  	target := &ret
  4939  	if err := gensupport.DecodeResponse(target, res); err != nil {
  4940  		return nil, err
  4941  	}
  4942  	return ret, nil
  4943  }
  4944  
  4945  type ChildrenListCall struct {
  4946  	s            *Service
  4947  	folderId     string
  4948  	urlParams_   gensupport.URLParams
  4949  	ifNoneMatch_ string
  4950  	ctx_         context.Context
  4951  	header_      http.Header
  4952  }
  4953  
  4954  // List: Lists a folder's children.
  4955  //
  4956  // - folderId: The ID of the folder.
  4957  func (r *ChildrenService) List(folderId string) *ChildrenListCall {
  4958  	c := &ChildrenListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  4959  	c.folderId = folderId
  4960  	return c
  4961  }
  4962  
  4963  // MaxResults sets the optional parameter "maxResults": Maximum number of
  4964  // children to return.
  4965  func (c *ChildrenListCall) MaxResults(maxResults int64) *ChildrenListCall {
  4966  	c.urlParams_.Set("maxResults", fmt.Sprint(maxResults))
  4967  	return c
  4968  }
  4969  
  4970  // OrderBy sets the optional parameter "orderBy": A comma-separated list of
  4971  // sort keys. Valid keys are `createdDate`, `folder`, `lastViewedByMeDate`,
  4972  // `modifiedByMeDate`, `modifiedDate`, `quotaBytesUsed`, `recency`,
  4973  // `sharedWithMeDate`, `starred`, and `title`. Each key sorts ascending by
  4974  // default, but may be reversed with the `desc` modifier. Example usage:
  4975  // ?orderBy=folder,modifiedDate desc,title. Please note that there is a current
  4976  // limitation for users with approximately one million files in which the
  4977  // requested sort order is ignored.
  4978  func (c *ChildrenListCall) OrderBy(orderBy string) *ChildrenListCall {
  4979  	c.urlParams_.Set("orderBy", orderBy)
  4980  	return c
  4981  }
  4982  
  4983  // PageToken sets the optional parameter "pageToken": Page token for children.
  4984  func (c *ChildrenListCall) PageToken(pageToken string) *ChildrenListCall {
  4985  	c.urlParams_.Set("pageToken", pageToken)
  4986  	return c
  4987  }
  4988  
  4989  // Q sets the optional parameter "q": Query string for searching children.
  4990  func (c *ChildrenListCall) Q(q string) *ChildrenListCall {
  4991  	c.urlParams_.Set("q", q)
  4992  	return c
  4993  }
  4994  
  4995  // Fields allows partial responses to be retrieved. See
  4996  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  4997  // details.
  4998  func (c *ChildrenListCall) Fields(s ...googleapi.Field) *ChildrenListCall {
  4999  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  5000  	return c
  5001  }
  5002  
  5003  // IfNoneMatch sets an optional parameter which makes the operation fail if the
  5004  // object's ETag matches the given value. This is useful for getting updates
  5005  // only after the object has changed since the last request.
  5006  func (c *ChildrenListCall) IfNoneMatch(entityTag string) *ChildrenListCall {
  5007  	c.ifNoneMatch_ = entityTag
  5008  	return c
  5009  }
  5010  
  5011  // Context sets the context to be used in this call's Do method.
  5012  func (c *ChildrenListCall) Context(ctx context.Context) *ChildrenListCall {
  5013  	c.ctx_ = ctx
  5014  	return c
  5015  }
  5016  
  5017  // Header returns a http.Header that can be modified by the caller to add
  5018  // headers to the request.
  5019  func (c *ChildrenListCall) Header() http.Header {
  5020  	if c.header_ == nil {
  5021  		c.header_ = make(http.Header)
  5022  	}
  5023  	return c.header_
  5024  }
  5025  
  5026  func (c *ChildrenListCall) doRequest(alt string) (*http.Response, error) {
  5027  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  5028  	if c.ifNoneMatch_ != "" {
  5029  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  5030  	}
  5031  	var body io.Reader = nil
  5032  	c.urlParams_.Set("alt", alt)
  5033  	c.urlParams_.Set("prettyPrint", "false")
  5034  	urls := googleapi.ResolveRelative(c.s.BasePath, "files/{folderId}/children")
  5035  	urls += "?" + c.urlParams_.Encode()
  5036  	req, err := http.NewRequest("GET", urls, body)
  5037  	if err != nil {
  5038  		return nil, err
  5039  	}
  5040  	req.Header = reqHeaders
  5041  	googleapi.Expand(req.URL, map[string]string{
  5042  		"folderId": c.folderId,
  5043  	})
  5044  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  5045  }
  5046  
  5047  // Do executes the "drive.children.list" call.
  5048  // Any non-2xx status code is an error. Response headers are in either
  5049  // *ChildList.ServerResponse.Header or (if a response was returned at all) in
  5050  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  5051  // whether the returned error was because http.StatusNotModified was returned.
  5052  func (c *ChildrenListCall) Do(opts ...googleapi.CallOption) (*ChildList, error) {
  5053  	gensupport.SetOptions(c.urlParams_, opts...)
  5054  	res, err := c.doRequest("json")
  5055  	if res != nil && res.StatusCode == http.StatusNotModified {
  5056  		if res.Body != nil {
  5057  			res.Body.Close()
  5058  		}
  5059  		return nil, gensupport.WrapError(&googleapi.Error{
  5060  			Code:   res.StatusCode,
  5061  			Header: res.Header,
  5062  		})
  5063  	}
  5064  	if err != nil {
  5065  		return nil, err
  5066  	}
  5067  	defer googleapi.CloseBody(res)
  5068  	if err := googleapi.CheckResponse(res); err != nil {
  5069  		return nil, gensupport.WrapError(err)
  5070  	}
  5071  	ret := &ChildList{
  5072  		ServerResponse: googleapi.ServerResponse{
  5073  			Header:         res.Header,
  5074  			HTTPStatusCode: res.StatusCode,
  5075  		},
  5076  	}
  5077  	target := &ret
  5078  	if err := gensupport.DecodeResponse(target, res); err != nil {
  5079  		return nil, err
  5080  	}
  5081  	return ret, nil
  5082  }
  5083  
  5084  // Pages invokes f for each page of results.
  5085  // A non-nil error returned from f will halt the iteration.
  5086  // The provided context supersedes any context provided to the Context method.
  5087  func (c *ChildrenListCall) Pages(ctx context.Context, f func(*ChildList) error) error {
  5088  	c.ctx_ = ctx
  5089  	defer c.PageToken(c.urlParams_.Get("pageToken"))
  5090  	for {
  5091  		x, err := c.Do()
  5092  		if err != nil {
  5093  			return err
  5094  		}
  5095  		if err := f(x); err != nil {
  5096  			return err
  5097  		}
  5098  		if x.NextPageToken == "" {
  5099  			return nil
  5100  		}
  5101  		c.PageToken(x.NextPageToken)
  5102  	}
  5103  }
  5104  
  5105  type CommentsDeleteCall struct {
  5106  	s          *Service
  5107  	fileId     string
  5108  	commentId  string
  5109  	urlParams_ gensupport.URLParams
  5110  	ctx_       context.Context
  5111  	header_    http.Header
  5112  }
  5113  
  5114  // Delete: Deletes a comment.
  5115  //
  5116  // - commentId: The ID of the comment.
  5117  // - fileId: The ID of the file.
  5118  func (r *CommentsService) Delete(fileId string, commentId string) *CommentsDeleteCall {
  5119  	c := &CommentsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  5120  	c.fileId = fileId
  5121  	c.commentId = commentId
  5122  	return c
  5123  }
  5124  
  5125  // Fields allows partial responses to be retrieved. See
  5126  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  5127  // details.
  5128  func (c *CommentsDeleteCall) Fields(s ...googleapi.Field) *CommentsDeleteCall {
  5129  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  5130  	return c
  5131  }
  5132  
  5133  // Context sets the context to be used in this call's Do method.
  5134  func (c *CommentsDeleteCall) Context(ctx context.Context) *CommentsDeleteCall {
  5135  	c.ctx_ = ctx
  5136  	return c
  5137  }
  5138  
  5139  // Header returns a http.Header that can be modified by the caller to add
  5140  // headers to the request.
  5141  func (c *CommentsDeleteCall) Header() http.Header {
  5142  	if c.header_ == nil {
  5143  		c.header_ = make(http.Header)
  5144  	}
  5145  	return c.header_
  5146  }
  5147  
  5148  func (c *CommentsDeleteCall) doRequest(alt string) (*http.Response, error) {
  5149  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  5150  	var body io.Reader = nil
  5151  	c.urlParams_.Set("alt", alt)
  5152  	c.urlParams_.Set("prettyPrint", "false")
  5153  	urls := googleapi.ResolveRelative(c.s.BasePath, "files/{fileId}/comments/{commentId}")
  5154  	urls += "?" + c.urlParams_.Encode()
  5155  	req, err := http.NewRequest("DELETE", urls, body)
  5156  	if err != nil {
  5157  		return nil, err
  5158  	}
  5159  	req.Header = reqHeaders
  5160  	googleapi.Expand(req.URL, map[string]string{
  5161  		"fileId":    c.fileId,
  5162  		"commentId": c.commentId,
  5163  	})
  5164  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  5165  }
  5166  
  5167  // Do executes the "drive.comments.delete" call.
  5168  func (c *CommentsDeleteCall) Do(opts ...googleapi.CallOption) error {
  5169  	gensupport.SetOptions(c.urlParams_, opts...)
  5170  	res, err := c.doRequest("json")
  5171  	if err != nil {
  5172  		return err
  5173  	}
  5174  	defer googleapi.CloseBody(res)
  5175  	if err := googleapi.CheckResponse(res); err != nil {
  5176  		return gensupport.WrapError(err)
  5177  	}
  5178  	return nil
  5179  }
  5180  
  5181  type CommentsGetCall struct {
  5182  	s            *Service
  5183  	fileId       string
  5184  	commentId    string
  5185  	urlParams_   gensupport.URLParams
  5186  	ifNoneMatch_ string
  5187  	ctx_         context.Context
  5188  	header_      http.Header
  5189  }
  5190  
  5191  // Get: Gets a comment by ID.
  5192  //
  5193  // - commentId: The ID of the comment.
  5194  // - fileId: The ID of the file.
  5195  func (r *CommentsService) Get(fileId string, commentId string) *CommentsGetCall {
  5196  	c := &CommentsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  5197  	c.fileId = fileId
  5198  	c.commentId = commentId
  5199  	return c
  5200  }
  5201  
  5202  // IncludeDeleted sets the optional parameter "includeDeleted": If set, this
  5203  // will succeed when retrieving a deleted comment, and will include any deleted
  5204  // replies.
  5205  func (c *CommentsGetCall) IncludeDeleted(includeDeleted bool) *CommentsGetCall {
  5206  	c.urlParams_.Set("includeDeleted", fmt.Sprint(includeDeleted))
  5207  	return c
  5208  }
  5209  
  5210  // Fields allows partial responses to be retrieved. See
  5211  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  5212  // details.
  5213  func (c *CommentsGetCall) Fields(s ...googleapi.Field) *CommentsGetCall {
  5214  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  5215  	return c
  5216  }
  5217  
  5218  // IfNoneMatch sets an optional parameter which makes the operation fail if the
  5219  // object's ETag matches the given value. This is useful for getting updates
  5220  // only after the object has changed since the last request.
  5221  func (c *CommentsGetCall) IfNoneMatch(entityTag string) *CommentsGetCall {
  5222  	c.ifNoneMatch_ = entityTag
  5223  	return c
  5224  }
  5225  
  5226  // Context sets the context to be used in this call's Do method.
  5227  func (c *CommentsGetCall) Context(ctx context.Context) *CommentsGetCall {
  5228  	c.ctx_ = ctx
  5229  	return c
  5230  }
  5231  
  5232  // Header returns a http.Header that can be modified by the caller to add
  5233  // headers to the request.
  5234  func (c *CommentsGetCall) Header() http.Header {
  5235  	if c.header_ == nil {
  5236  		c.header_ = make(http.Header)
  5237  	}
  5238  	return c.header_
  5239  }
  5240  
  5241  func (c *CommentsGetCall) doRequest(alt string) (*http.Response, error) {
  5242  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  5243  	if c.ifNoneMatch_ != "" {
  5244  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  5245  	}
  5246  	var body io.Reader = nil
  5247  	c.urlParams_.Set("alt", alt)
  5248  	c.urlParams_.Set("prettyPrint", "false")
  5249  	urls := googleapi.ResolveRelative(c.s.BasePath, "files/{fileId}/comments/{commentId}")
  5250  	urls += "?" + c.urlParams_.Encode()
  5251  	req, err := http.NewRequest("GET", urls, body)
  5252  	if err != nil {
  5253  		return nil, err
  5254  	}
  5255  	req.Header = reqHeaders
  5256  	googleapi.Expand(req.URL, map[string]string{
  5257  		"fileId":    c.fileId,
  5258  		"commentId": c.commentId,
  5259  	})
  5260  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  5261  }
  5262  
  5263  // Do executes the "drive.comments.get" call.
  5264  // Any non-2xx status code is an error. Response headers are in either
  5265  // *Comment.ServerResponse.Header or (if a response was returned at all) in
  5266  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  5267  // whether the returned error was because http.StatusNotModified was returned.
  5268  func (c *CommentsGetCall) Do(opts ...googleapi.CallOption) (*Comment, error) {
  5269  	gensupport.SetOptions(c.urlParams_, opts...)
  5270  	res, err := c.doRequest("json")
  5271  	if res != nil && res.StatusCode == http.StatusNotModified {
  5272  		if res.Body != nil {
  5273  			res.Body.Close()
  5274  		}
  5275  		return nil, gensupport.WrapError(&googleapi.Error{
  5276  			Code:   res.StatusCode,
  5277  			Header: res.Header,
  5278  		})
  5279  	}
  5280  	if err != nil {
  5281  		return nil, err
  5282  	}
  5283  	defer googleapi.CloseBody(res)
  5284  	if err := googleapi.CheckResponse(res); err != nil {
  5285  		return nil, gensupport.WrapError(err)
  5286  	}
  5287  	ret := &Comment{
  5288  		ServerResponse: googleapi.ServerResponse{
  5289  			Header:         res.Header,
  5290  			HTTPStatusCode: res.StatusCode,
  5291  		},
  5292  	}
  5293  	target := &ret
  5294  	if err := gensupport.DecodeResponse(target, res); err != nil {
  5295  		return nil, err
  5296  	}
  5297  	return ret, nil
  5298  }
  5299  
  5300  type CommentsInsertCall struct {
  5301  	s          *Service
  5302  	fileId     string
  5303  	comment    *Comment
  5304  	urlParams_ gensupport.URLParams
  5305  	ctx_       context.Context
  5306  	header_    http.Header
  5307  }
  5308  
  5309  // Insert: Creates a new comment on the given file.
  5310  //
  5311  // - fileId: The ID of the file.
  5312  func (r *CommentsService) Insert(fileId string, comment *Comment) *CommentsInsertCall {
  5313  	c := &CommentsInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  5314  	c.fileId = fileId
  5315  	c.comment = comment
  5316  	return c
  5317  }
  5318  
  5319  // Fields allows partial responses to be retrieved. See
  5320  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  5321  // details.
  5322  func (c *CommentsInsertCall) Fields(s ...googleapi.Field) *CommentsInsertCall {
  5323  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  5324  	return c
  5325  }
  5326  
  5327  // Context sets the context to be used in this call's Do method.
  5328  func (c *CommentsInsertCall) Context(ctx context.Context) *CommentsInsertCall {
  5329  	c.ctx_ = ctx
  5330  	return c
  5331  }
  5332  
  5333  // Header returns a http.Header that can be modified by the caller to add
  5334  // headers to the request.
  5335  func (c *CommentsInsertCall) Header() http.Header {
  5336  	if c.header_ == nil {
  5337  		c.header_ = make(http.Header)
  5338  	}
  5339  	return c.header_
  5340  }
  5341  
  5342  func (c *CommentsInsertCall) doRequest(alt string) (*http.Response, error) {
  5343  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
  5344  	var body io.Reader = nil
  5345  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.comment)
  5346  	if err != nil {
  5347  		return nil, err
  5348  	}
  5349  	c.urlParams_.Set("alt", alt)
  5350  	c.urlParams_.Set("prettyPrint", "false")
  5351  	urls := googleapi.ResolveRelative(c.s.BasePath, "files/{fileId}/comments")
  5352  	urls += "?" + c.urlParams_.Encode()
  5353  	req, err := http.NewRequest("POST", urls, body)
  5354  	if err != nil {
  5355  		return nil, err
  5356  	}
  5357  	req.Header = reqHeaders
  5358  	googleapi.Expand(req.URL, map[string]string{
  5359  		"fileId": c.fileId,
  5360  	})
  5361  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  5362  }
  5363  
  5364  // Do executes the "drive.comments.insert" call.
  5365  // Any non-2xx status code is an error. Response headers are in either
  5366  // *Comment.ServerResponse.Header or (if a response was returned at all) in
  5367  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  5368  // whether the returned error was because http.StatusNotModified was returned.
  5369  func (c *CommentsInsertCall) Do(opts ...googleapi.CallOption) (*Comment, error) {
  5370  	gensupport.SetOptions(c.urlParams_, opts...)
  5371  	res, err := c.doRequest("json")
  5372  	if res != nil && res.StatusCode == http.StatusNotModified {
  5373  		if res.Body != nil {
  5374  			res.Body.Close()
  5375  		}
  5376  		return nil, gensupport.WrapError(&googleapi.Error{
  5377  			Code:   res.StatusCode,
  5378  			Header: res.Header,
  5379  		})
  5380  	}
  5381  	if err != nil {
  5382  		return nil, err
  5383  	}
  5384  	defer googleapi.CloseBody(res)
  5385  	if err := googleapi.CheckResponse(res); err != nil {
  5386  		return nil, gensupport.WrapError(err)
  5387  	}
  5388  	ret := &Comment{
  5389  		ServerResponse: googleapi.ServerResponse{
  5390  			Header:         res.Header,
  5391  			HTTPStatusCode: res.StatusCode,
  5392  		},
  5393  	}
  5394  	target := &ret
  5395  	if err := gensupport.DecodeResponse(target, res); err != nil {
  5396  		return nil, err
  5397  	}
  5398  	return ret, nil
  5399  }
  5400  
  5401  type CommentsListCall struct {
  5402  	s            *Service
  5403  	fileId       string
  5404  	urlParams_   gensupport.URLParams
  5405  	ifNoneMatch_ string
  5406  	ctx_         context.Context
  5407  	header_      http.Header
  5408  }
  5409  
  5410  // List: Lists a file's comments.
  5411  //
  5412  // - fileId: The ID of the file.
  5413  func (r *CommentsService) List(fileId string) *CommentsListCall {
  5414  	c := &CommentsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  5415  	c.fileId = fileId
  5416  	return c
  5417  }
  5418  
  5419  // IncludeDeleted sets the optional parameter "includeDeleted": If set, all
  5420  // comments and replies, including deleted comments and replies (with content
  5421  // stripped) will be returned.
  5422  func (c *CommentsListCall) IncludeDeleted(includeDeleted bool) *CommentsListCall {
  5423  	c.urlParams_.Set("includeDeleted", fmt.Sprint(includeDeleted))
  5424  	return c
  5425  }
  5426  
  5427  // MaxResults sets the optional parameter "maxResults": The maximum number of
  5428  // discussions to include in the response, used for paging.
  5429  func (c *CommentsListCall) MaxResults(maxResults int64) *CommentsListCall {
  5430  	c.urlParams_.Set("maxResults", fmt.Sprint(maxResults))
  5431  	return c
  5432  }
  5433  
  5434  // PageToken sets the optional parameter "pageToken": The continuation token,
  5435  // used to page through large result sets. To get the next page of results, set
  5436  // this parameter to the value of "nextPageToken" from the previous response.
  5437  func (c *CommentsListCall) PageToken(pageToken string) *CommentsListCall {
  5438  	c.urlParams_.Set("pageToken", pageToken)
  5439  	return c
  5440  }
  5441  
  5442  // UpdatedMin sets the optional parameter "updatedMin": Only discussions that
  5443  // were updated after this timestamp will be returned. Formatted as an RFC 3339
  5444  // timestamp.
  5445  func (c *CommentsListCall) UpdatedMin(updatedMin string) *CommentsListCall {
  5446  	c.urlParams_.Set("updatedMin", updatedMin)
  5447  	return c
  5448  }
  5449  
  5450  // Fields allows partial responses to be retrieved. See
  5451  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  5452  // details.
  5453  func (c *CommentsListCall) Fields(s ...googleapi.Field) *CommentsListCall {
  5454  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  5455  	return c
  5456  }
  5457  
  5458  // IfNoneMatch sets an optional parameter which makes the operation fail if the
  5459  // object's ETag matches the given value. This is useful for getting updates
  5460  // only after the object has changed since the last request.
  5461  func (c *CommentsListCall) IfNoneMatch(entityTag string) *CommentsListCall {
  5462  	c.ifNoneMatch_ = entityTag
  5463  	return c
  5464  }
  5465  
  5466  // Context sets the context to be used in this call's Do method.
  5467  func (c *CommentsListCall) Context(ctx context.Context) *CommentsListCall {
  5468  	c.ctx_ = ctx
  5469  	return c
  5470  }
  5471  
  5472  // Header returns a http.Header that can be modified by the caller to add
  5473  // headers to the request.
  5474  func (c *CommentsListCall) Header() http.Header {
  5475  	if c.header_ == nil {
  5476  		c.header_ = make(http.Header)
  5477  	}
  5478  	return c.header_
  5479  }
  5480  
  5481  func (c *CommentsListCall) doRequest(alt string) (*http.Response, error) {
  5482  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  5483  	if c.ifNoneMatch_ != "" {
  5484  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  5485  	}
  5486  	var body io.Reader = nil
  5487  	c.urlParams_.Set("alt", alt)
  5488  	c.urlParams_.Set("prettyPrint", "false")
  5489  	urls := googleapi.ResolveRelative(c.s.BasePath, "files/{fileId}/comments")
  5490  	urls += "?" + c.urlParams_.Encode()
  5491  	req, err := http.NewRequest("GET", urls, body)
  5492  	if err != nil {
  5493  		return nil, err
  5494  	}
  5495  	req.Header = reqHeaders
  5496  	googleapi.Expand(req.URL, map[string]string{
  5497  		"fileId": c.fileId,
  5498  	})
  5499  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  5500  }
  5501  
  5502  // Do executes the "drive.comments.list" call.
  5503  // Any non-2xx status code is an error. Response headers are in either
  5504  // *CommentList.ServerResponse.Header or (if a response was returned at all) in
  5505  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  5506  // whether the returned error was because http.StatusNotModified was returned.
  5507  func (c *CommentsListCall) Do(opts ...googleapi.CallOption) (*CommentList, error) {
  5508  	gensupport.SetOptions(c.urlParams_, opts...)
  5509  	res, err := c.doRequest("json")
  5510  	if res != nil && res.StatusCode == http.StatusNotModified {
  5511  		if res.Body != nil {
  5512  			res.Body.Close()
  5513  		}
  5514  		return nil, gensupport.WrapError(&googleapi.Error{
  5515  			Code:   res.StatusCode,
  5516  			Header: res.Header,
  5517  		})
  5518  	}
  5519  	if err != nil {
  5520  		return nil, err
  5521  	}
  5522  	defer googleapi.CloseBody(res)
  5523  	if err := googleapi.CheckResponse(res); err != nil {
  5524  		return nil, gensupport.WrapError(err)
  5525  	}
  5526  	ret := &CommentList{
  5527  		ServerResponse: googleapi.ServerResponse{
  5528  			Header:         res.Header,
  5529  			HTTPStatusCode: res.StatusCode,
  5530  		},
  5531  	}
  5532  	target := &ret
  5533  	if err := gensupport.DecodeResponse(target, res); err != nil {
  5534  		return nil, err
  5535  	}
  5536  	return ret, nil
  5537  }
  5538  
  5539  // Pages invokes f for each page of results.
  5540  // A non-nil error returned from f will halt the iteration.
  5541  // The provided context supersedes any context provided to the Context method.
  5542  func (c *CommentsListCall) Pages(ctx context.Context, f func(*CommentList) error) error {
  5543  	c.ctx_ = ctx
  5544  	defer c.PageToken(c.urlParams_.Get("pageToken"))
  5545  	for {
  5546  		x, err := c.Do()
  5547  		if err != nil {
  5548  			return err
  5549  		}
  5550  		if err := f(x); err != nil {
  5551  			return err
  5552  		}
  5553  		if x.NextPageToken == "" {
  5554  			return nil
  5555  		}
  5556  		c.PageToken(x.NextPageToken)
  5557  	}
  5558  }
  5559  
  5560  type CommentsPatchCall struct {
  5561  	s          *Service
  5562  	fileId     string
  5563  	commentId  string
  5564  	comment    *Comment
  5565  	urlParams_ gensupport.URLParams
  5566  	ctx_       context.Context
  5567  	header_    http.Header
  5568  }
  5569  
  5570  // Patch: Updates an existing comment.
  5571  //
  5572  // - commentId: The ID of the comment.
  5573  // - fileId: The ID of the file.
  5574  func (r *CommentsService) Patch(fileId string, commentId string, comment *Comment) *CommentsPatchCall {
  5575  	c := &CommentsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  5576  	c.fileId = fileId
  5577  	c.commentId = commentId
  5578  	c.comment = comment
  5579  	return c
  5580  }
  5581  
  5582  // Fields allows partial responses to be retrieved. See
  5583  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  5584  // details.
  5585  func (c *CommentsPatchCall) Fields(s ...googleapi.Field) *CommentsPatchCall {
  5586  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  5587  	return c
  5588  }
  5589  
  5590  // Context sets the context to be used in this call's Do method.
  5591  func (c *CommentsPatchCall) Context(ctx context.Context) *CommentsPatchCall {
  5592  	c.ctx_ = ctx
  5593  	return c
  5594  }
  5595  
  5596  // Header returns a http.Header that can be modified by the caller to add
  5597  // headers to the request.
  5598  func (c *CommentsPatchCall) Header() http.Header {
  5599  	if c.header_ == nil {
  5600  		c.header_ = make(http.Header)
  5601  	}
  5602  	return c.header_
  5603  }
  5604  
  5605  func (c *CommentsPatchCall) doRequest(alt string) (*http.Response, error) {
  5606  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
  5607  	var body io.Reader = nil
  5608  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.comment)
  5609  	if err != nil {
  5610  		return nil, err
  5611  	}
  5612  	c.urlParams_.Set("alt", alt)
  5613  	c.urlParams_.Set("prettyPrint", "false")
  5614  	urls := googleapi.ResolveRelative(c.s.BasePath, "files/{fileId}/comments/{commentId}")
  5615  	urls += "?" + c.urlParams_.Encode()
  5616  	req, err := http.NewRequest("PATCH", urls, body)
  5617  	if err != nil {
  5618  		return nil, err
  5619  	}
  5620  	req.Header = reqHeaders
  5621  	googleapi.Expand(req.URL, map[string]string{
  5622  		"fileId":    c.fileId,
  5623  		"commentId": c.commentId,
  5624  	})
  5625  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  5626  }
  5627  
  5628  // Do executes the "drive.comments.patch" call.
  5629  // Any non-2xx status code is an error. Response headers are in either
  5630  // *Comment.ServerResponse.Header or (if a response was returned at all) in
  5631  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  5632  // whether the returned error was because http.StatusNotModified was returned.
  5633  func (c *CommentsPatchCall) Do(opts ...googleapi.CallOption) (*Comment, error) {
  5634  	gensupport.SetOptions(c.urlParams_, opts...)
  5635  	res, err := c.doRequest("json")
  5636  	if res != nil && res.StatusCode == http.StatusNotModified {
  5637  		if res.Body != nil {
  5638  			res.Body.Close()
  5639  		}
  5640  		return nil, gensupport.WrapError(&googleapi.Error{
  5641  			Code:   res.StatusCode,
  5642  			Header: res.Header,
  5643  		})
  5644  	}
  5645  	if err != nil {
  5646  		return nil, err
  5647  	}
  5648  	defer googleapi.CloseBody(res)
  5649  	if err := googleapi.CheckResponse(res); err != nil {
  5650  		return nil, gensupport.WrapError(err)
  5651  	}
  5652  	ret := &Comment{
  5653  		ServerResponse: googleapi.ServerResponse{
  5654  			Header:         res.Header,
  5655  			HTTPStatusCode: res.StatusCode,
  5656  		},
  5657  	}
  5658  	target := &ret
  5659  	if err := gensupport.DecodeResponse(target, res); err != nil {
  5660  		return nil, err
  5661  	}
  5662  	return ret, nil
  5663  }
  5664  
  5665  type CommentsUpdateCall struct {
  5666  	s          *Service
  5667  	fileId     string
  5668  	commentId  string
  5669  	comment    *Comment
  5670  	urlParams_ gensupport.URLParams
  5671  	ctx_       context.Context
  5672  	header_    http.Header
  5673  }
  5674  
  5675  // Update: Updates an existing comment.
  5676  //
  5677  // - commentId: The ID of the comment.
  5678  // - fileId: The ID of the file.
  5679  func (r *CommentsService) Update(fileId string, commentId string, comment *Comment) *CommentsUpdateCall {
  5680  	c := &CommentsUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  5681  	c.fileId = fileId
  5682  	c.commentId = commentId
  5683  	c.comment = comment
  5684  	return c
  5685  }
  5686  
  5687  // Fields allows partial responses to be retrieved. See
  5688  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  5689  // details.
  5690  func (c *CommentsUpdateCall) Fields(s ...googleapi.Field) *CommentsUpdateCall {
  5691  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  5692  	return c
  5693  }
  5694  
  5695  // Context sets the context to be used in this call's Do method.
  5696  func (c *CommentsUpdateCall) Context(ctx context.Context) *CommentsUpdateCall {
  5697  	c.ctx_ = ctx
  5698  	return c
  5699  }
  5700  
  5701  // Header returns a http.Header that can be modified by the caller to add
  5702  // headers to the request.
  5703  func (c *CommentsUpdateCall) Header() http.Header {
  5704  	if c.header_ == nil {
  5705  		c.header_ = make(http.Header)
  5706  	}
  5707  	return c.header_
  5708  }
  5709  
  5710  func (c *CommentsUpdateCall) doRequest(alt string) (*http.Response, error) {
  5711  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
  5712  	var body io.Reader = nil
  5713  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.comment)
  5714  	if err != nil {
  5715  		return nil, err
  5716  	}
  5717  	c.urlParams_.Set("alt", alt)
  5718  	c.urlParams_.Set("prettyPrint", "false")
  5719  	urls := googleapi.ResolveRelative(c.s.BasePath, "files/{fileId}/comments/{commentId}")
  5720  	urls += "?" + c.urlParams_.Encode()
  5721  	req, err := http.NewRequest("PUT", urls, body)
  5722  	if err != nil {
  5723  		return nil, err
  5724  	}
  5725  	req.Header = reqHeaders
  5726  	googleapi.Expand(req.URL, map[string]string{
  5727  		"fileId":    c.fileId,
  5728  		"commentId": c.commentId,
  5729  	})
  5730  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  5731  }
  5732  
  5733  // Do executes the "drive.comments.update" call.
  5734  // Any non-2xx status code is an error. Response headers are in either
  5735  // *Comment.ServerResponse.Header or (if a response was returned at all) in
  5736  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  5737  // whether the returned error was because http.StatusNotModified was returned.
  5738  func (c *CommentsUpdateCall) Do(opts ...googleapi.CallOption) (*Comment, error) {
  5739  	gensupport.SetOptions(c.urlParams_, opts...)
  5740  	res, err := c.doRequest("json")
  5741  	if res != nil && res.StatusCode == http.StatusNotModified {
  5742  		if res.Body != nil {
  5743  			res.Body.Close()
  5744  		}
  5745  		return nil, gensupport.WrapError(&googleapi.Error{
  5746  			Code:   res.StatusCode,
  5747  			Header: res.Header,
  5748  		})
  5749  	}
  5750  	if err != nil {
  5751  		return nil, err
  5752  	}
  5753  	defer googleapi.CloseBody(res)
  5754  	if err := googleapi.CheckResponse(res); err != nil {
  5755  		return nil, gensupport.WrapError(err)
  5756  	}
  5757  	ret := &Comment{
  5758  		ServerResponse: googleapi.ServerResponse{
  5759  			Header:         res.Header,
  5760  			HTTPStatusCode: res.StatusCode,
  5761  		},
  5762  	}
  5763  	target := &ret
  5764  	if err := gensupport.DecodeResponse(target, res); err != nil {
  5765  		return nil, err
  5766  	}
  5767  	return ret, nil
  5768  }
  5769  
  5770  type DrivesDeleteCall struct {
  5771  	s          *Service
  5772  	driveId    string
  5773  	urlParams_ gensupport.URLParams
  5774  	ctx_       context.Context
  5775  	header_    http.Header
  5776  }
  5777  
  5778  // Delete: Permanently deletes a shared drive for which the user is an
  5779  // `organizer`. The shared drive cannot contain any untrashed items.
  5780  //
  5781  // - driveId: The ID of the shared drive.
  5782  func (r *DrivesService) Delete(driveId string) *DrivesDeleteCall {
  5783  	c := &DrivesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  5784  	c.driveId = driveId
  5785  	return c
  5786  }
  5787  
  5788  // AllowItemDeletion sets the optional parameter "allowItemDeletion": Whether
  5789  // any items inside the shared drive should also be deleted. This option is
  5790  // only supported when `useDomainAdminAccess` is also set to `true`.
  5791  func (c *DrivesDeleteCall) AllowItemDeletion(allowItemDeletion bool) *DrivesDeleteCall {
  5792  	c.urlParams_.Set("allowItemDeletion", fmt.Sprint(allowItemDeletion))
  5793  	return c
  5794  }
  5795  
  5796  // UseDomainAdminAccess sets the optional parameter "useDomainAdminAccess":
  5797  // Issue the request as a domain administrator; if set to true, then the
  5798  // requester will be granted access if they are an administrator of the domain
  5799  // to which the shared drive belongs.
  5800  func (c *DrivesDeleteCall) UseDomainAdminAccess(useDomainAdminAccess bool) *DrivesDeleteCall {
  5801  	c.urlParams_.Set("useDomainAdminAccess", fmt.Sprint(useDomainAdminAccess))
  5802  	return c
  5803  }
  5804  
  5805  // Fields allows partial responses to be retrieved. See
  5806  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  5807  // details.
  5808  func (c *DrivesDeleteCall) Fields(s ...googleapi.Field) *DrivesDeleteCall {
  5809  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  5810  	return c
  5811  }
  5812  
  5813  // Context sets the context to be used in this call's Do method.
  5814  func (c *DrivesDeleteCall) Context(ctx context.Context) *DrivesDeleteCall {
  5815  	c.ctx_ = ctx
  5816  	return c
  5817  }
  5818  
  5819  // Header returns a http.Header that can be modified by the caller to add
  5820  // headers to the request.
  5821  func (c *DrivesDeleteCall) Header() http.Header {
  5822  	if c.header_ == nil {
  5823  		c.header_ = make(http.Header)
  5824  	}
  5825  	return c.header_
  5826  }
  5827  
  5828  func (c *DrivesDeleteCall) doRequest(alt string) (*http.Response, error) {
  5829  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  5830  	var body io.Reader = nil
  5831  	c.urlParams_.Set("alt", alt)
  5832  	c.urlParams_.Set("prettyPrint", "false")
  5833  	urls := googleapi.ResolveRelative(c.s.BasePath, "drives/{driveId}")
  5834  	urls += "?" + c.urlParams_.Encode()
  5835  	req, err := http.NewRequest("DELETE", urls, body)
  5836  	if err != nil {
  5837  		return nil, err
  5838  	}
  5839  	req.Header = reqHeaders
  5840  	googleapi.Expand(req.URL, map[string]string{
  5841  		"driveId": c.driveId,
  5842  	})
  5843  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  5844  }
  5845  
  5846  // Do executes the "drive.drives.delete" call.
  5847  func (c *DrivesDeleteCall) Do(opts ...googleapi.CallOption) error {
  5848  	gensupport.SetOptions(c.urlParams_, opts...)
  5849  	res, err := c.doRequest("json")
  5850  	if err != nil {
  5851  		return err
  5852  	}
  5853  	defer googleapi.CloseBody(res)
  5854  	if err := googleapi.CheckResponse(res); err != nil {
  5855  		return gensupport.WrapError(err)
  5856  	}
  5857  	return nil
  5858  }
  5859  
  5860  type DrivesGetCall struct {
  5861  	s            *Service
  5862  	driveId      string
  5863  	urlParams_   gensupport.URLParams
  5864  	ifNoneMatch_ string
  5865  	ctx_         context.Context
  5866  	header_      http.Header
  5867  }
  5868  
  5869  // Get: Gets a shared drive's metadata by ID.
  5870  //
  5871  // - driveId: The ID of the shared drive.
  5872  func (r *DrivesService) Get(driveId string) *DrivesGetCall {
  5873  	c := &DrivesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  5874  	c.driveId = driveId
  5875  	return c
  5876  }
  5877  
  5878  // UseDomainAdminAccess sets the optional parameter "useDomainAdminAccess":
  5879  // Issue the request as a domain administrator; if set to true, then the
  5880  // requester will be granted access if they are an administrator of the domain
  5881  // to which the shared drive belongs.
  5882  func (c *DrivesGetCall) UseDomainAdminAccess(useDomainAdminAccess bool) *DrivesGetCall {
  5883  	c.urlParams_.Set("useDomainAdminAccess", fmt.Sprint(useDomainAdminAccess))
  5884  	return c
  5885  }
  5886  
  5887  // Fields allows partial responses to be retrieved. See
  5888  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  5889  // details.
  5890  func (c *DrivesGetCall) Fields(s ...googleapi.Field) *DrivesGetCall {
  5891  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  5892  	return c
  5893  }
  5894  
  5895  // IfNoneMatch sets an optional parameter which makes the operation fail if the
  5896  // object's ETag matches the given value. This is useful for getting updates
  5897  // only after the object has changed since the last request.
  5898  func (c *DrivesGetCall) IfNoneMatch(entityTag string) *DrivesGetCall {
  5899  	c.ifNoneMatch_ = entityTag
  5900  	return c
  5901  }
  5902  
  5903  // Context sets the context to be used in this call's Do method.
  5904  func (c *DrivesGetCall) Context(ctx context.Context) *DrivesGetCall {
  5905  	c.ctx_ = ctx
  5906  	return c
  5907  }
  5908  
  5909  // Header returns a http.Header that can be modified by the caller to add
  5910  // headers to the request.
  5911  func (c *DrivesGetCall) Header() http.Header {
  5912  	if c.header_ == nil {
  5913  		c.header_ = make(http.Header)
  5914  	}
  5915  	return c.header_
  5916  }
  5917  
  5918  func (c *DrivesGetCall) doRequest(alt string) (*http.Response, error) {
  5919  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  5920  	if c.ifNoneMatch_ != "" {
  5921  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  5922  	}
  5923  	var body io.Reader = nil
  5924  	c.urlParams_.Set("alt", alt)
  5925  	c.urlParams_.Set("prettyPrint", "false")
  5926  	urls := googleapi.ResolveRelative(c.s.BasePath, "drives/{driveId}")
  5927  	urls += "?" + c.urlParams_.Encode()
  5928  	req, err := http.NewRequest("GET", urls, body)
  5929  	if err != nil {
  5930  		return nil, err
  5931  	}
  5932  	req.Header = reqHeaders
  5933  	googleapi.Expand(req.URL, map[string]string{
  5934  		"driveId": c.driveId,
  5935  	})
  5936  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  5937  }
  5938  
  5939  // Do executes the "drive.drives.get" call.
  5940  // Any non-2xx status code is an error. Response headers are in either
  5941  // *Drive.ServerResponse.Header or (if a response was returned at all) in
  5942  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  5943  // whether the returned error was because http.StatusNotModified was returned.
  5944  func (c *DrivesGetCall) Do(opts ...googleapi.CallOption) (*Drive, error) {
  5945  	gensupport.SetOptions(c.urlParams_, opts...)
  5946  	res, err := c.doRequest("json")
  5947  	if res != nil && res.StatusCode == http.StatusNotModified {
  5948  		if res.Body != nil {
  5949  			res.Body.Close()
  5950  		}
  5951  		return nil, gensupport.WrapError(&googleapi.Error{
  5952  			Code:   res.StatusCode,
  5953  			Header: res.Header,
  5954  		})
  5955  	}
  5956  	if err != nil {
  5957  		return nil, err
  5958  	}
  5959  	defer googleapi.CloseBody(res)
  5960  	if err := googleapi.CheckResponse(res); err != nil {
  5961  		return nil, gensupport.WrapError(err)
  5962  	}
  5963  	ret := &Drive{
  5964  		ServerResponse: googleapi.ServerResponse{
  5965  			Header:         res.Header,
  5966  			HTTPStatusCode: res.StatusCode,
  5967  		},
  5968  	}
  5969  	target := &ret
  5970  	if err := gensupport.DecodeResponse(target, res); err != nil {
  5971  		return nil, err
  5972  	}
  5973  	return ret, nil
  5974  }
  5975  
  5976  type DrivesHideCall struct {
  5977  	s          *Service
  5978  	driveId    string
  5979  	urlParams_ gensupport.URLParams
  5980  	ctx_       context.Context
  5981  	header_    http.Header
  5982  }
  5983  
  5984  // Hide: Hides a shared drive from the default view.
  5985  //
  5986  // - driveId: The ID of the shared drive.
  5987  func (r *DrivesService) Hide(driveId string) *DrivesHideCall {
  5988  	c := &DrivesHideCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  5989  	c.driveId = driveId
  5990  	return c
  5991  }
  5992  
  5993  // Fields allows partial responses to be retrieved. See
  5994  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  5995  // details.
  5996  func (c *DrivesHideCall) Fields(s ...googleapi.Field) *DrivesHideCall {
  5997  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  5998  	return c
  5999  }
  6000  
  6001  // Context sets the context to be used in this call's Do method.
  6002  func (c *DrivesHideCall) Context(ctx context.Context) *DrivesHideCall {
  6003  	c.ctx_ = ctx
  6004  	return c
  6005  }
  6006  
  6007  // Header returns a http.Header that can be modified by the caller to add
  6008  // headers to the request.
  6009  func (c *DrivesHideCall) Header() http.Header {
  6010  	if c.header_ == nil {
  6011  		c.header_ = make(http.Header)
  6012  	}
  6013  	return c.header_
  6014  }
  6015  
  6016  func (c *DrivesHideCall) doRequest(alt string) (*http.Response, error) {
  6017  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  6018  	var body io.Reader = nil
  6019  	c.urlParams_.Set("alt", alt)
  6020  	c.urlParams_.Set("prettyPrint", "false")
  6021  	urls := googleapi.ResolveRelative(c.s.BasePath, "drives/{driveId}/hide")
  6022  	urls += "?" + c.urlParams_.Encode()
  6023  	req, err := http.NewRequest("POST", urls, body)
  6024  	if err != nil {
  6025  		return nil, err
  6026  	}
  6027  	req.Header = reqHeaders
  6028  	googleapi.Expand(req.URL, map[string]string{
  6029  		"driveId": c.driveId,
  6030  	})
  6031  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  6032  }
  6033  
  6034  // Do executes the "drive.drives.hide" call.
  6035  // Any non-2xx status code is an error. Response headers are in either
  6036  // *Drive.ServerResponse.Header or (if a response was returned at all) in
  6037  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  6038  // whether the returned error was because http.StatusNotModified was returned.
  6039  func (c *DrivesHideCall) Do(opts ...googleapi.CallOption) (*Drive, error) {
  6040  	gensupport.SetOptions(c.urlParams_, opts...)
  6041  	res, err := c.doRequest("json")
  6042  	if res != nil && res.StatusCode == http.StatusNotModified {
  6043  		if res.Body != nil {
  6044  			res.Body.Close()
  6045  		}
  6046  		return nil, gensupport.WrapError(&googleapi.Error{
  6047  			Code:   res.StatusCode,
  6048  			Header: res.Header,
  6049  		})
  6050  	}
  6051  	if err != nil {
  6052  		return nil, err
  6053  	}
  6054  	defer googleapi.CloseBody(res)
  6055  	if err := googleapi.CheckResponse(res); err != nil {
  6056  		return nil, gensupport.WrapError(err)
  6057  	}
  6058  	ret := &Drive{
  6059  		ServerResponse: googleapi.ServerResponse{
  6060  			Header:         res.Header,
  6061  			HTTPStatusCode: res.StatusCode,
  6062  		},
  6063  	}
  6064  	target := &ret
  6065  	if err := gensupport.DecodeResponse(target, res); err != nil {
  6066  		return nil, err
  6067  	}
  6068  	return ret, nil
  6069  }
  6070  
  6071  type DrivesInsertCall struct {
  6072  	s          *Service
  6073  	drive      *Drive
  6074  	urlParams_ gensupport.URLParams
  6075  	ctx_       context.Context
  6076  	header_    http.Header
  6077  }
  6078  
  6079  // Insert: Creates a new shared drive.
  6080  //
  6081  //   - requestId: An ID, such as a random UUID, which uniquely identifies this
  6082  //     user's request for idempotent creation of a shared drive. A repeated
  6083  //     request by the same user and with the same request ID will avoid creating
  6084  //     duplicates by attempting to create the same shared drive. If the shared
  6085  //     drive already exists a 409 error will be returned.
  6086  func (r *DrivesService) Insert(requestId string, drive *Drive) *DrivesInsertCall {
  6087  	c := &DrivesInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  6088  	c.urlParams_.Set("requestId", requestId)
  6089  	c.drive = drive
  6090  	return c
  6091  }
  6092  
  6093  // Fields allows partial responses to be retrieved. See
  6094  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  6095  // details.
  6096  func (c *DrivesInsertCall) Fields(s ...googleapi.Field) *DrivesInsertCall {
  6097  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  6098  	return c
  6099  }
  6100  
  6101  // Context sets the context to be used in this call's Do method.
  6102  func (c *DrivesInsertCall) Context(ctx context.Context) *DrivesInsertCall {
  6103  	c.ctx_ = ctx
  6104  	return c
  6105  }
  6106  
  6107  // Header returns a http.Header that can be modified by the caller to add
  6108  // headers to the request.
  6109  func (c *DrivesInsertCall) Header() http.Header {
  6110  	if c.header_ == nil {
  6111  		c.header_ = make(http.Header)
  6112  	}
  6113  	return c.header_
  6114  }
  6115  
  6116  func (c *DrivesInsertCall) doRequest(alt string) (*http.Response, error) {
  6117  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
  6118  	var body io.Reader = nil
  6119  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.drive)
  6120  	if err != nil {
  6121  		return nil, err
  6122  	}
  6123  	c.urlParams_.Set("alt", alt)
  6124  	c.urlParams_.Set("prettyPrint", "false")
  6125  	urls := googleapi.ResolveRelative(c.s.BasePath, "drives")
  6126  	urls += "?" + c.urlParams_.Encode()
  6127  	req, err := http.NewRequest("POST", urls, body)
  6128  	if err != nil {
  6129  		return nil, err
  6130  	}
  6131  	req.Header = reqHeaders
  6132  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  6133  }
  6134  
  6135  // Do executes the "drive.drives.insert" call.
  6136  // Any non-2xx status code is an error. Response headers are in either
  6137  // *Drive.ServerResponse.Header or (if a response was returned at all) in
  6138  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  6139  // whether the returned error was because http.StatusNotModified was returned.
  6140  func (c *DrivesInsertCall) Do(opts ...googleapi.CallOption) (*Drive, error) {
  6141  	gensupport.SetOptions(c.urlParams_, opts...)
  6142  	res, err := c.doRequest("json")
  6143  	if res != nil && res.StatusCode == http.StatusNotModified {
  6144  		if res.Body != nil {
  6145  			res.Body.Close()
  6146  		}
  6147  		return nil, gensupport.WrapError(&googleapi.Error{
  6148  			Code:   res.StatusCode,
  6149  			Header: res.Header,
  6150  		})
  6151  	}
  6152  	if err != nil {
  6153  		return nil, err
  6154  	}
  6155  	defer googleapi.CloseBody(res)
  6156  	if err := googleapi.CheckResponse(res); err != nil {
  6157  		return nil, gensupport.WrapError(err)
  6158  	}
  6159  	ret := &Drive{
  6160  		ServerResponse: googleapi.ServerResponse{
  6161  			Header:         res.Header,
  6162  			HTTPStatusCode: res.StatusCode,
  6163  		},
  6164  	}
  6165  	target := &ret
  6166  	if err := gensupport.DecodeResponse(target, res); err != nil {
  6167  		return nil, err
  6168  	}
  6169  	return ret, nil
  6170  }
  6171  
  6172  type DrivesListCall struct {
  6173  	s            *Service
  6174  	urlParams_   gensupport.URLParams
  6175  	ifNoneMatch_ string
  6176  	ctx_         context.Context
  6177  	header_      http.Header
  6178  }
  6179  
  6180  // List:  Lists the user's shared drives. This method accepts the `q`
  6181  // parameter, which is a search query combining one or more search terms. For
  6182  // more information, see the Search for shared drives
  6183  // (/drive/api/guides/search-shareddrives) guide.
  6184  func (r *DrivesService) List() *DrivesListCall {
  6185  	c := &DrivesListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  6186  	return c
  6187  }
  6188  
  6189  // MaxResults sets the optional parameter "maxResults": Maximum number of
  6190  // shared drives to return per page.
  6191  func (c *DrivesListCall) MaxResults(maxResults int64) *DrivesListCall {
  6192  	c.urlParams_.Set("maxResults", fmt.Sprint(maxResults))
  6193  	return c
  6194  }
  6195  
  6196  // PageToken sets the optional parameter "pageToken": Page token for shared
  6197  // drives.
  6198  func (c *DrivesListCall) PageToken(pageToken string) *DrivesListCall {
  6199  	c.urlParams_.Set("pageToken", pageToken)
  6200  	return c
  6201  }
  6202  
  6203  // Q sets the optional parameter "q": Query string for searching shared drives.
  6204  func (c *DrivesListCall) Q(q string) *DrivesListCall {
  6205  	c.urlParams_.Set("q", q)
  6206  	return c
  6207  }
  6208  
  6209  // UseDomainAdminAccess sets the optional parameter "useDomainAdminAccess":
  6210  // Issue the request as a domain administrator; if set to true, then all shared
  6211  // drives of the domain in which the requester is an administrator are
  6212  // returned.
  6213  func (c *DrivesListCall) UseDomainAdminAccess(useDomainAdminAccess bool) *DrivesListCall {
  6214  	c.urlParams_.Set("useDomainAdminAccess", fmt.Sprint(useDomainAdminAccess))
  6215  	return c
  6216  }
  6217  
  6218  // Fields allows partial responses to be retrieved. See
  6219  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  6220  // details.
  6221  func (c *DrivesListCall) Fields(s ...googleapi.Field) *DrivesListCall {
  6222  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  6223  	return c
  6224  }
  6225  
  6226  // IfNoneMatch sets an optional parameter which makes the operation fail if the
  6227  // object's ETag matches the given value. This is useful for getting updates
  6228  // only after the object has changed since the last request.
  6229  func (c *DrivesListCall) IfNoneMatch(entityTag string) *DrivesListCall {
  6230  	c.ifNoneMatch_ = entityTag
  6231  	return c
  6232  }
  6233  
  6234  // Context sets the context to be used in this call's Do method.
  6235  func (c *DrivesListCall) Context(ctx context.Context) *DrivesListCall {
  6236  	c.ctx_ = ctx
  6237  	return c
  6238  }
  6239  
  6240  // Header returns a http.Header that can be modified by the caller to add
  6241  // headers to the request.
  6242  func (c *DrivesListCall) Header() http.Header {
  6243  	if c.header_ == nil {
  6244  		c.header_ = make(http.Header)
  6245  	}
  6246  	return c.header_
  6247  }
  6248  
  6249  func (c *DrivesListCall) doRequest(alt string) (*http.Response, error) {
  6250  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  6251  	if c.ifNoneMatch_ != "" {
  6252  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  6253  	}
  6254  	var body io.Reader = nil
  6255  	c.urlParams_.Set("alt", alt)
  6256  	c.urlParams_.Set("prettyPrint", "false")
  6257  	urls := googleapi.ResolveRelative(c.s.BasePath, "drives")
  6258  	urls += "?" + c.urlParams_.Encode()
  6259  	req, err := http.NewRequest("GET", urls, body)
  6260  	if err != nil {
  6261  		return nil, err
  6262  	}
  6263  	req.Header = reqHeaders
  6264  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  6265  }
  6266  
  6267  // Do executes the "drive.drives.list" call.
  6268  // Any non-2xx status code is an error. Response headers are in either
  6269  // *DriveList.ServerResponse.Header or (if a response was returned at all) in
  6270  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  6271  // whether the returned error was because http.StatusNotModified was returned.
  6272  func (c *DrivesListCall) Do(opts ...googleapi.CallOption) (*DriveList, error) {
  6273  	gensupport.SetOptions(c.urlParams_, opts...)
  6274  	res, err := c.doRequest("json")
  6275  	if res != nil && res.StatusCode == http.StatusNotModified {
  6276  		if res.Body != nil {
  6277  			res.Body.Close()
  6278  		}
  6279  		return nil, gensupport.WrapError(&googleapi.Error{
  6280  			Code:   res.StatusCode,
  6281  			Header: res.Header,
  6282  		})
  6283  	}
  6284  	if err != nil {
  6285  		return nil, err
  6286  	}
  6287  	defer googleapi.CloseBody(res)
  6288  	if err := googleapi.CheckResponse(res); err != nil {
  6289  		return nil, gensupport.WrapError(err)
  6290  	}
  6291  	ret := &DriveList{
  6292  		ServerResponse: googleapi.ServerResponse{
  6293  			Header:         res.Header,
  6294  			HTTPStatusCode: res.StatusCode,
  6295  		},
  6296  	}
  6297  	target := &ret
  6298  	if err := gensupport.DecodeResponse(target, res); err != nil {
  6299  		return nil, err
  6300  	}
  6301  	return ret, nil
  6302  }
  6303  
  6304  // Pages invokes f for each page of results.
  6305  // A non-nil error returned from f will halt the iteration.
  6306  // The provided context supersedes any context provided to the Context method.
  6307  func (c *DrivesListCall) Pages(ctx context.Context, f func(*DriveList) error) error {
  6308  	c.ctx_ = ctx
  6309  	defer c.PageToken(c.urlParams_.Get("pageToken"))
  6310  	for {
  6311  		x, err := c.Do()
  6312  		if err != nil {
  6313  			return err
  6314  		}
  6315  		if err := f(x); err != nil {
  6316  			return err
  6317  		}
  6318  		if x.NextPageToken == "" {
  6319  			return nil
  6320  		}
  6321  		c.PageToken(x.NextPageToken)
  6322  	}
  6323  }
  6324  
  6325  type DrivesUnhideCall struct {
  6326  	s          *Service
  6327  	driveId    string
  6328  	urlParams_ gensupport.URLParams
  6329  	ctx_       context.Context
  6330  	header_    http.Header
  6331  }
  6332  
  6333  // Unhide: Restores a shared drive to the default view.
  6334  //
  6335  // - driveId: The ID of the shared drive.
  6336  func (r *DrivesService) Unhide(driveId string) *DrivesUnhideCall {
  6337  	c := &DrivesUnhideCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  6338  	c.driveId = driveId
  6339  	return c
  6340  }
  6341  
  6342  // Fields allows partial responses to be retrieved. See
  6343  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  6344  // details.
  6345  func (c *DrivesUnhideCall) Fields(s ...googleapi.Field) *DrivesUnhideCall {
  6346  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  6347  	return c
  6348  }
  6349  
  6350  // Context sets the context to be used in this call's Do method.
  6351  func (c *DrivesUnhideCall) Context(ctx context.Context) *DrivesUnhideCall {
  6352  	c.ctx_ = ctx
  6353  	return c
  6354  }
  6355  
  6356  // Header returns a http.Header that can be modified by the caller to add
  6357  // headers to the request.
  6358  func (c *DrivesUnhideCall) Header() http.Header {
  6359  	if c.header_ == nil {
  6360  		c.header_ = make(http.Header)
  6361  	}
  6362  	return c.header_
  6363  }
  6364  
  6365  func (c *DrivesUnhideCall) doRequest(alt string) (*http.Response, error) {
  6366  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  6367  	var body io.Reader = nil
  6368  	c.urlParams_.Set("alt", alt)
  6369  	c.urlParams_.Set("prettyPrint", "false")
  6370  	urls := googleapi.ResolveRelative(c.s.BasePath, "drives/{driveId}/unhide")
  6371  	urls += "?" + c.urlParams_.Encode()
  6372  	req, err := http.NewRequest("POST", urls, body)
  6373  	if err != nil {
  6374  		return nil, err
  6375  	}
  6376  	req.Header = reqHeaders
  6377  	googleapi.Expand(req.URL, map[string]string{
  6378  		"driveId": c.driveId,
  6379  	})
  6380  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  6381  }
  6382  
  6383  // Do executes the "drive.drives.unhide" call.
  6384  // Any non-2xx status code is an error. Response headers are in either
  6385  // *Drive.ServerResponse.Header or (if a response was returned at all) in
  6386  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  6387  // whether the returned error was because http.StatusNotModified was returned.
  6388  func (c *DrivesUnhideCall) Do(opts ...googleapi.CallOption) (*Drive, error) {
  6389  	gensupport.SetOptions(c.urlParams_, opts...)
  6390  	res, err := c.doRequest("json")
  6391  	if res != nil && res.StatusCode == http.StatusNotModified {
  6392  		if res.Body != nil {
  6393  			res.Body.Close()
  6394  		}
  6395  		return nil, gensupport.WrapError(&googleapi.Error{
  6396  			Code:   res.StatusCode,
  6397  			Header: res.Header,
  6398  		})
  6399  	}
  6400  	if err != nil {
  6401  		return nil, err
  6402  	}
  6403  	defer googleapi.CloseBody(res)
  6404  	if err := googleapi.CheckResponse(res); err != nil {
  6405  		return nil, gensupport.WrapError(err)
  6406  	}
  6407  	ret := &Drive{
  6408  		ServerResponse: googleapi.ServerResponse{
  6409  			Header:         res.Header,
  6410  			HTTPStatusCode: res.StatusCode,
  6411  		},
  6412  	}
  6413  	target := &ret
  6414  	if err := gensupport.DecodeResponse(target, res); err != nil {
  6415  		return nil, err
  6416  	}
  6417  	return ret, nil
  6418  }
  6419  
  6420  type DrivesUpdateCall struct {
  6421  	s          *Service
  6422  	driveId    string
  6423  	drive      *Drive
  6424  	urlParams_ gensupport.URLParams
  6425  	ctx_       context.Context
  6426  	header_    http.Header
  6427  }
  6428  
  6429  // Update: Updates the metadata for a shared drive.
  6430  //
  6431  // - driveId: The ID of the shared drive.
  6432  func (r *DrivesService) Update(driveId string, drive *Drive) *DrivesUpdateCall {
  6433  	c := &DrivesUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  6434  	c.driveId = driveId
  6435  	c.drive = drive
  6436  	return c
  6437  }
  6438  
  6439  // UseDomainAdminAccess sets the optional parameter "useDomainAdminAccess":
  6440  // Issue the request as a domain administrator; if set to true, then the
  6441  // requester will be granted access if they are an administrator of the domain
  6442  // to which the shared drive belongs.
  6443  func (c *DrivesUpdateCall) UseDomainAdminAccess(useDomainAdminAccess bool) *DrivesUpdateCall {
  6444  	c.urlParams_.Set("useDomainAdminAccess", fmt.Sprint(useDomainAdminAccess))
  6445  	return c
  6446  }
  6447  
  6448  // Fields allows partial responses to be retrieved. See
  6449  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  6450  // details.
  6451  func (c *DrivesUpdateCall) Fields(s ...googleapi.Field) *DrivesUpdateCall {
  6452  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  6453  	return c
  6454  }
  6455  
  6456  // Context sets the context to be used in this call's Do method.
  6457  func (c *DrivesUpdateCall) Context(ctx context.Context) *DrivesUpdateCall {
  6458  	c.ctx_ = ctx
  6459  	return c
  6460  }
  6461  
  6462  // Header returns a http.Header that can be modified by the caller to add
  6463  // headers to the request.
  6464  func (c *DrivesUpdateCall) Header() http.Header {
  6465  	if c.header_ == nil {
  6466  		c.header_ = make(http.Header)
  6467  	}
  6468  	return c.header_
  6469  }
  6470  
  6471  func (c *DrivesUpdateCall) doRequest(alt string) (*http.Response, error) {
  6472  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
  6473  	var body io.Reader = nil
  6474  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.drive)
  6475  	if err != nil {
  6476  		return nil, err
  6477  	}
  6478  	c.urlParams_.Set("alt", alt)
  6479  	c.urlParams_.Set("prettyPrint", "false")
  6480  	urls := googleapi.ResolveRelative(c.s.BasePath, "drives/{driveId}")
  6481  	urls += "?" + c.urlParams_.Encode()
  6482  	req, err := http.NewRequest("PUT", urls, body)
  6483  	if err != nil {
  6484  		return nil, err
  6485  	}
  6486  	req.Header = reqHeaders
  6487  	googleapi.Expand(req.URL, map[string]string{
  6488  		"driveId": c.driveId,
  6489  	})
  6490  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  6491  }
  6492  
  6493  // Do executes the "drive.drives.update" call.
  6494  // Any non-2xx status code is an error. Response headers are in either
  6495  // *Drive.ServerResponse.Header or (if a response was returned at all) in
  6496  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  6497  // whether the returned error was because http.StatusNotModified was returned.
  6498  func (c *DrivesUpdateCall) Do(opts ...googleapi.CallOption) (*Drive, error) {
  6499  	gensupport.SetOptions(c.urlParams_, opts...)
  6500  	res, err := c.doRequest("json")
  6501  	if res != nil && res.StatusCode == http.StatusNotModified {
  6502  		if res.Body != nil {
  6503  			res.Body.Close()
  6504  		}
  6505  		return nil, gensupport.WrapError(&googleapi.Error{
  6506  			Code:   res.StatusCode,
  6507  			Header: res.Header,
  6508  		})
  6509  	}
  6510  	if err != nil {
  6511  		return nil, err
  6512  	}
  6513  	defer googleapi.CloseBody(res)
  6514  	if err := googleapi.CheckResponse(res); err != nil {
  6515  		return nil, gensupport.WrapError(err)
  6516  	}
  6517  	ret := &Drive{
  6518  		ServerResponse: googleapi.ServerResponse{
  6519  			Header:         res.Header,
  6520  			HTTPStatusCode: res.StatusCode,
  6521  		},
  6522  	}
  6523  	target := &ret
  6524  	if err := gensupport.DecodeResponse(target, res); err != nil {
  6525  		return nil, err
  6526  	}
  6527  	return ret, nil
  6528  }
  6529  
  6530  type FilesCopyCall struct {
  6531  	s          *Service
  6532  	fileId     string
  6533  	file       *File
  6534  	urlParams_ gensupport.URLParams
  6535  	ctx_       context.Context
  6536  	header_    http.Header
  6537  }
  6538  
  6539  // Copy: Creates a copy of the specified file.
  6540  //
  6541  // - fileId: The ID of the file to copy.
  6542  func (r *FilesService) Copy(fileId string, file *File) *FilesCopyCall {
  6543  	c := &FilesCopyCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  6544  	c.fileId = fileId
  6545  	c.file = file
  6546  	return c
  6547  }
  6548  
  6549  // Convert sets the optional parameter "convert": Whether to convert this file
  6550  // to the corresponding Docs Editors format.
  6551  func (c *FilesCopyCall) Convert(convert bool) *FilesCopyCall {
  6552  	c.urlParams_.Set("convert", fmt.Sprint(convert))
  6553  	return c
  6554  }
  6555  
  6556  // EnforceSingleParent sets the optional parameter "enforceSingleParent":
  6557  // Deprecated: Copying files into multiple folders is no longer supported. Use
  6558  // shortcuts instead.
  6559  func (c *FilesCopyCall) EnforceSingleParent(enforceSingleParent bool) *FilesCopyCall {
  6560  	c.urlParams_.Set("enforceSingleParent", fmt.Sprint(enforceSingleParent))
  6561  	return c
  6562  }
  6563  
  6564  // IncludeLabels sets the optional parameter "includeLabels": A comma-separated
  6565  // list of IDs of labels to include in the `labelInfo` part of the response.
  6566  func (c *FilesCopyCall) IncludeLabels(includeLabels string) *FilesCopyCall {
  6567  	c.urlParams_.Set("includeLabels", includeLabels)
  6568  	return c
  6569  }
  6570  
  6571  // IncludePermissionsForView sets the optional parameter
  6572  // "includePermissionsForView": Specifies which additional view's permissions
  6573  // to include in the response. Only `published` is supported.
  6574  func (c *FilesCopyCall) IncludePermissionsForView(includePermissionsForView string) *FilesCopyCall {
  6575  	c.urlParams_.Set("includePermissionsForView", includePermissionsForView)
  6576  	return c
  6577  }
  6578  
  6579  // Ocr sets the optional parameter "ocr": Whether to attempt OCR on .jpg, .png,
  6580  // .gif, or .pdf uploads.
  6581  func (c *FilesCopyCall) Ocr(ocr bool) *FilesCopyCall {
  6582  	c.urlParams_.Set("ocr", fmt.Sprint(ocr))
  6583  	return c
  6584  }
  6585  
  6586  // OcrLanguage sets the optional parameter "ocrLanguage": If `ocr` is true,
  6587  // hints at the language to use. Valid values are BCP 47 codes.
  6588  func (c *FilesCopyCall) OcrLanguage(ocrLanguage string) *FilesCopyCall {
  6589  	c.urlParams_.Set("ocrLanguage", ocrLanguage)
  6590  	return c
  6591  }
  6592  
  6593  // Pinned sets the optional parameter "pinned": Whether to pin the head
  6594  // revision of the new copy. A file can have a maximum of 200 pinned revisions.
  6595  func (c *FilesCopyCall) Pinned(pinned bool) *FilesCopyCall {
  6596  	c.urlParams_.Set("pinned", fmt.Sprint(pinned))
  6597  	return c
  6598  }
  6599  
  6600  // SupportsAllDrives sets the optional parameter "supportsAllDrives": Whether
  6601  // the requesting application supports both My Drives and shared drives.
  6602  func (c *FilesCopyCall) SupportsAllDrives(supportsAllDrives bool) *FilesCopyCall {
  6603  	c.urlParams_.Set("supportsAllDrives", fmt.Sprint(supportsAllDrives))
  6604  	return c
  6605  }
  6606  
  6607  // SupportsTeamDrives sets the optional parameter "supportsTeamDrives":
  6608  // Deprecated: Use `supportsAllDrives` instead.
  6609  func (c *FilesCopyCall) SupportsTeamDrives(supportsTeamDrives bool) *FilesCopyCall {
  6610  	c.urlParams_.Set("supportsTeamDrives", fmt.Sprint(supportsTeamDrives))
  6611  	return c
  6612  }
  6613  
  6614  // TimedTextLanguage sets the optional parameter "timedTextLanguage": The
  6615  // language of the timed text.
  6616  func (c *FilesCopyCall) TimedTextLanguage(timedTextLanguage string) *FilesCopyCall {
  6617  	c.urlParams_.Set("timedTextLanguage", timedTextLanguage)
  6618  	return c
  6619  }
  6620  
  6621  // TimedTextTrackName sets the optional parameter "timedTextTrackName": The
  6622  // timed text track name.
  6623  func (c *FilesCopyCall) TimedTextTrackName(timedTextTrackName string) *FilesCopyCall {
  6624  	c.urlParams_.Set("timedTextTrackName", timedTextTrackName)
  6625  	return c
  6626  }
  6627  
  6628  // Visibility sets the optional parameter "visibility": The visibility of the
  6629  // new file. This parameter is only relevant when the source is not a native
  6630  // Google Doc and convert=false.
  6631  //
  6632  // Possible values:
  6633  //
  6634  //	"DEFAULT" (default) - The visibility of the new file is determined by the
  6635  //
  6636  // user's default visibility/sharing policies.
  6637  //
  6638  //	"PRIVATE" - The new file will be visible to only the owner.
  6639  func (c *FilesCopyCall) Visibility(visibility string) *FilesCopyCall {
  6640  	c.urlParams_.Set("visibility", visibility)
  6641  	return c
  6642  }
  6643  
  6644  // Fields allows partial responses to be retrieved. See
  6645  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  6646  // details.
  6647  func (c *FilesCopyCall) Fields(s ...googleapi.Field) *FilesCopyCall {
  6648  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  6649  	return c
  6650  }
  6651  
  6652  // Context sets the context to be used in this call's Do method.
  6653  func (c *FilesCopyCall) Context(ctx context.Context) *FilesCopyCall {
  6654  	c.ctx_ = ctx
  6655  	return c
  6656  }
  6657  
  6658  // Header returns a http.Header that can be modified by the caller to add
  6659  // headers to the request.
  6660  func (c *FilesCopyCall) Header() http.Header {
  6661  	if c.header_ == nil {
  6662  		c.header_ = make(http.Header)
  6663  	}
  6664  	return c.header_
  6665  }
  6666  
  6667  func (c *FilesCopyCall) doRequest(alt string) (*http.Response, error) {
  6668  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
  6669  	var body io.Reader = nil
  6670  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.file)
  6671  	if err != nil {
  6672  		return nil, err
  6673  	}
  6674  	c.urlParams_.Set("alt", alt)
  6675  	c.urlParams_.Set("prettyPrint", "false")
  6676  	urls := googleapi.ResolveRelative(c.s.BasePath, "files/{fileId}/copy")
  6677  	urls += "?" + c.urlParams_.Encode()
  6678  	req, err := http.NewRequest("POST", urls, body)
  6679  	if err != nil {
  6680  		return nil, err
  6681  	}
  6682  	req.Header = reqHeaders
  6683  	googleapi.Expand(req.URL, map[string]string{
  6684  		"fileId": c.fileId,
  6685  	})
  6686  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  6687  }
  6688  
  6689  // Do executes the "drive.files.copy" call.
  6690  // Any non-2xx status code is an error. Response headers are in either
  6691  // *File.ServerResponse.Header or (if a response was returned at all) in
  6692  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  6693  // whether the returned error was because http.StatusNotModified was returned.
  6694  func (c *FilesCopyCall) Do(opts ...googleapi.CallOption) (*File, error) {
  6695  	gensupport.SetOptions(c.urlParams_, opts...)
  6696  	res, err := c.doRequest("json")
  6697  	if res != nil && res.StatusCode == http.StatusNotModified {
  6698  		if res.Body != nil {
  6699  			res.Body.Close()
  6700  		}
  6701  		return nil, gensupport.WrapError(&googleapi.Error{
  6702  			Code:   res.StatusCode,
  6703  			Header: res.Header,
  6704  		})
  6705  	}
  6706  	if err != nil {
  6707  		return nil, err
  6708  	}
  6709  	defer googleapi.CloseBody(res)
  6710  	if err := googleapi.CheckResponse(res); err != nil {
  6711  		return nil, gensupport.WrapError(err)
  6712  	}
  6713  	ret := &File{
  6714  		ServerResponse: googleapi.ServerResponse{
  6715  			Header:         res.Header,
  6716  			HTTPStatusCode: res.StatusCode,
  6717  		},
  6718  	}
  6719  	target := &ret
  6720  	if err := gensupport.DecodeResponse(target, res); err != nil {
  6721  		return nil, err
  6722  	}
  6723  	return ret, nil
  6724  }
  6725  
  6726  type FilesDeleteCall struct {
  6727  	s          *Service
  6728  	fileId     string
  6729  	urlParams_ gensupport.URLParams
  6730  	ctx_       context.Context
  6731  	header_    http.Header
  6732  }
  6733  
  6734  // Delete: Permanently deletes a file owned by the user without moving it to
  6735  // the trash. If the file belongs to a shared drive, the user must be an
  6736  // `organizer` on the parent folder. If the target is a folder, all descendants
  6737  // owned by the user are also deleted.
  6738  //
  6739  // - fileId: The ID of the file to delete.
  6740  func (r *FilesService) Delete(fileId string) *FilesDeleteCall {
  6741  	c := &FilesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  6742  	c.fileId = fileId
  6743  	return c
  6744  }
  6745  
  6746  // EnforceSingleParent sets the optional parameter "enforceSingleParent":
  6747  // Deprecated: If an item is not in a shared drive and its last parent is
  6748  // deleted but the item itself is not, the item is placed under its owner's
  6749  // root.
  6750  func (c *FilesDeleteCall) EnforceSingleParent(enforceSingleParent bool) *FilesDeleteCall {
  6751  	c.urlParams_.Set("enforceSingleParent", fmt.Sprint(enforceSingleParent))
  6752  	return c
  6753  }
  6754  
  6755  // SupportsAllDrives sets the optional parameter "supportsAllDrives": Whether
  6756  // the requesting application supports both My Drives and shared drives.
  6757  func (c *FilesDeleteCall) SupportsAllDrives(supportsAllDrives bool) *FilesDeleteCall {
  6758  	c.urlParams_.Set("supportsAllDrives", fmt.Sprint(supportsAllDrives))
  6759  	return c
  6760  }
  6761  
  6762  // SupportsTeamDrives sets the optional parameter "supportsTeamDrives":
  6763  // Deprecated: Use `supportsAllDrives` instead.
  6764  func (c *FilesDeleteCall) SupportsTeamDrives(supportsTeamDrives bool) *FilesDeleteCall {
  6765  	c.urlParams_.Set("supportsTeamDrives", fmt.Sprint(supportsTeamDrives))
  6766  	return c
  6767  }
  6768  
  6769  // Fields allows partial responses to be retrieved. See
  6770  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  6771  // details.
  6772  func (c *FilesDeleteCall) Fields(s ...googleapi.Field) *FilesDeleteCall {
  6773  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  6774  	return c
  6775  }
  6776  
  6777  // Context sets the context to be used in this call's Do method.
  6778  func (c *FilesDeleteCall) Context(ctx context.Context) *FilesDeleteCall {
  6779  	c.ctx_ = ctx
  6780  	return c
  6781  }
  6782  
  6783  // Header returns a http.Header that can be modified by the caller to add
  6784  // headers to the request.
  6785  func (c *FilesDeleteCall) Header() http.Header {
  6786  	if c.header_ == nil {
  6787  		c.header_ = make(http.Header)
  6788  	}
  6789  	return c.header_
  6790  }
  6791  
  6792  func (c *FilesDeleteCall) doRequest(alt string) (*http.Response, error) {
  6793  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  6794  	var body io.Reader = nil
  6795  	c.urlParams_.Set("alt", alt)
  6796  	c.urlParams_.Set("prettyPrint", "false")
  6797  	urls := googleapi.ResolveRelative(c.s.BasePath, "files/{fileId}")
  6798  	urls += "?" + c.urlParams_.Encode()
  6799  	req, err := http.NewRequest("DELETE", urls, body)
  6800  	if err != nil {
  6801  		return nil, err
  6802  	}
  6803  	req.Header = reqHeaders
  6804  	googleapi.Expand(req.URL, map[string]string{
  6805  		"fileId": c.fileId,
  6806  	})
  6807  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  6808  }
  6809  
  6810  // Do executes the "drive.files.delete" call.
  6811  func (c *FilesDeleteCall) Do(opts ...googleapi.CallOption) error {
  6812  	gensupport.SetOptions(c.urlParams_, opts...)
  6813  	res, err := c.doRequest("json")
  6814  	if err != nil {
  6815  		return err
  6816  	}
  6817  	defer googleapi.CloseBody(res)
  6818  	if err := googleapi.CheckResponse(res); err != nil {
  6819  		return gensupport.WrapError(err)
  6820  	}
  6821  	return nil
  6822  }
  6823  
  6824  type FilesEmptyTrashCall struct {
  6825  	s          *Service
  6826  	urlParams_ gensupport.URLParams
  6827  	ctx_       context.Context
  6828  	header_    http.Header
  6829  }
  6830  
  6831  // EmptyTrash: Permanently deletes all of the user's trashed files.
  6832  func (r *FilesService) EmptyTrash() *FilesEmptyTrashCall {
  6833  	c := &FilesEmptyTrashCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  6834  	return c
  6835  }
  6836  
  6837  // DriveId sets the optional parameter "driveId": If set, empties the trash of
  6838  // the provided shared drive.
  6839  func (c *FilesEmptyTrashCall) DriveId(driveId string) *FilesEmptyTrashCall {
  6840  	c.urlParams_.Set("driveId", driveId)
  6841  	return c
  6842  }
  6843  
  6844  // EnforceSingleParent sets the optional parameter "enforceSingleParent":
  6845  // Deprecated: If an item is not in a shared drive and its last parent is
  6846  // deleted but the item itself is not, the item is placed under its owner's
  6847  // root.
  6848  func (c *FilesEmptyTrashCall) EnforceSingleParent(enforceSingleParent bool) *FilesEmptyTrashCall {
  6849  	c.urlParams_.Set("enforceSingleParent", fmt.Sprint(enforceSingleParent))
  6850  	return c
  6851  }
  6852  
  6853  // Fields allows partial responses to be retrieved. See
  6854  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  6855  // details.
  6856  func (c *FilesEmptyTrashCall) Fields(s ...googleapi.Field) *FilesEmptyTrashCall {
  6857  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  6858  	return c
  6859  }
  6860  
  6861  // Context sets the context to be used in this call's Do method.
  6862  func (c *FilesEmptyTrashCall) Context(ctx context.Context) *FilesEmptyTrashCall {
  6863  	c.ctx_ = ctx
  6864  	return c
  6865  }
  6866  
  6867  // Header returns a http.Header that can be modified by the caller to add
  6868  // headers to the request.
  6869  func (c *FilesEmptyTrashCall) Header() http.Header {
  6870  	if c.header_ == nil {
  6871  		c.header_ = make(http.Header)
  6872  	}
  6873  	return c.header_
  6874  }
  6875  
  6876  func (c *FilesEmptyTrashCall) doRequest(alt string) (*http.Response, error) {
  6877  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  6878  	var body io.Reader = nil
  6879  	c.urlParams_.Set("alt", alt)
  6880  	c.urlParams_.Set("prettyPrint", "false")
  6881  	urls := googleapi.ResolveRelative(c.s.BasePath, "files/trash")
  6882  	urls += "?" + c.urlParams_.Encode()
  6883  	req, err := http.NewRequest("DELETE", urls, body)
  6884  	if err != nil {
  6885  		return nil, err
  6886  	}
  6887  	req.Header = reqHeaders
  6888  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  6889  }
  6890  
  6891  // Do executes the "drive.files.emptyTrash" call.
  6892  func (c *FilesEmptyTrashCall) Do(opts ...googleapi.CallOption) error {
  6893  	gensupport.SetOptions(c.urlParams_, opts...)
  6894  	res, err := c.doRequest("json")
  6895  	if err != nil {
  6896  		return err
  6897  	}
  6898  	defer googleapi.CloseBody(res)
  6899  	if err := googleapi.CheckResponse(res); err != nil {
  6900  		return gensupport.WrapError(err)
  6901  	}
  6902  	return nil
  6903  }
  6904  
  6905  type FilesExportCall struct {
  6906  	s            *Service
  6907  	fileId       string
  6908  	urlParams_   gensupport.URLParams
  6909  	ifNoneMatch_ string
  6910  	ctx_         context.Context
  6911  	header_      http.Header
  6912  }
  6913  
  6914  // Export: Exports a Google Workspace document to the requested MIME type and
  6915  // returns exported byte content. Note that the exported content is limited to
  6916  // 10MB.
  6917  //
  6918  // - fileId: The ID of the file.
  6919  // - mimeType: The MIME type of the format requested for this export.
  6920  func (r *FilesService) Export(fileId string, mimeType string) *FilesExportCall {
  6921  	c := &FilesExportCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  6922  	c.fileId = fileId
  6923  	c.urlParams_.Set("mimeType", mimeType)
  6924  	return c
  6925  }
  6926  
  6927  // Fields allows partial responses to be retrieved. See
  6928  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  6929  // details.
  6930  func (c *FilesExportCall) Fields(s ...googleapi.Field) *FilesExportCall {
  6931  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  6932  	return c
  6933  }
  6934  
  6935  // IfNoneMatch sets an optional parameter which makes the operation fail if the
  6936  // object's ETag matches the given value. This is useful for getting updates
  6937  // only after the object has changed since the last request.
  6938  func (c *FilesExportCall) IfNoneMatch(entityTag string) *FilesExportCall {
  6939  	c.ifNoneMatch_ = entityTag
  6940  	return c
  6941  }
  6942  
  6943  // Context sets the context to be used in this call's Do and Download methods.
  6944  func (c *FilesExportCall) Context(ctx context.Context) *FilesExportCall {
  6945  	c.ctx_ = ctx
  6946  	return c
  6947  }
  6948  
  6949  // Header returns a http.Header that can be modified by the caller to add
  6950  // headers to the request.
  6951  func (c *FilesExportCall) Header() http.Header {
  6952  	if c.header_ == nil {
  6953  		c.header_ = make(http.Header)
  6954  	}
  6955  	return c.header_
  6956  }
  6957  
  6958  func (c *FilesExportCall) doRequest(alt string) (*http.Response, error) {
  6959  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  6960  	if c.ifNoneMatch_ != "" {
  6961  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  6962  	}
  6963  	var body io.Reader = nil
  6964  	c.urlParams_.Set("alt", alt)
  6965  	c.urlParams_.Set("prettyPrint", "false")
  6966  	urls := googleapi.ResolveRelative(c.s.BasePath, "files/{fileId}/export")
  6967  	urls += "?" + c.urlParams_.Encode()
  6968  	req, err := http.NewRequest("GET", urls, body)
  6969  	if err != nil {
  6970  		return nil, err
  6971  	}
  6972  	req.Header = reqHeaders
  6973  	googleapi.Expand(req.URL, map[string]string{
  6974  		"fileId": c.fileId,
  6975  	})
  6976  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  6977  }
  6978  
  6979  // Download fetches the API endpoint's "media" value, instead of the normal
  6980  // API response value. If the returned error is nil, the Response is guaranteed to
  6981  // have a 2xx status code. Callers must close the Response.Body as usual.
  6982  func (c *FilesExportCall) Download(opts ...googleapi.CallOption) (*http.Response, error) {
  6983  	gensupport.SetOptions(c.urlParams_, opts...)
  6984  	res, err := c.doRequest("media")
  6985  	if err != nil {
  6986  		return nil, err
  6987  	}
  6988  	if err := googleapi.CheckResponse(res); err != nil {
  6989  		res.Body.Close()
  6990  		return nil, gensupport.WrapError(err)
  6991  	}
  6992  	return res, nil
  6993  }
  6994  
  6995  // Do executes the "drive.files.export" call.
  6996  func (c *FilesExportCall) Do(opts ...googleapi.CallOption) error {
  6997  	gensupport.SetOptions(c.urlParams_, opts...)
  6998  	res, err := c.doRequest("json")
  6999  	if err != nil {
  7000  		return err
  7001  	}
  7002  	defer googleapi.CloseBody(res)
  7003  	if err := googleapi.CheckResponse(res); err != nil {
  7004  		return gensupport.WrapError(err)
  7005  	}
  7006  	return nil
  7007  }
  7008  
  7009  type FilesGenerateIdsCall struct {
  7010  	s            *Service
  7011  	urlParams_   gensupport.URLParams
  7012  	ifNoneMatch_ string
  7013  	ctx_         context.Context
  7014  	header_      http.Header
  7015  }
  7016  
  7017  // GenerateIds: Generates a set of file IDs which can be provided in insert or
  7018  // copy requests.
  7019  func (r *FilesService) GenerateIds() *FilesGenerateIdsCall {
  7020  	c := &FilesGenerateIdsCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  7021  	return c
  7022  }
  7023  
  7024  // MaxResults sets the optional parameter "maxResults": Maximum number of IDs
  7025  // to return.
  7026  func (c *FilesGenerateIdsCall) MaxResults(maxResults int64) *FilesGenerateIdsCall {
  7027  	c.urlParams_.Set("maxResults", fmt.Sprint(maxResults))
  7028  	return c
  7029  }
  7030  
  7031  // Space sets the optional parameter "space": The space in which the IDs can be
  7032  // used to create new files. Supported values are `drive` and `appDataFolder`.
  7033  // (Default: `drive`)
  7034  func (c *FilesGenerateIdsCall) Space(space string) *FilesGenerateIdsCall {
  7035  	c.urlParams_.Set("space", space)
  7036  	return c
  7037  }
  7038  
  7039  // Type sets the optional parameter "type": The type of items which the IDs can
  7040  // be used for. Supported values are `files` and `shortcuts`. Note that
  7041  // `shortcuts` are only supported in the `drive` `space`. (Default: `files`)
  7042  func (c *FilesGenerateIdsCall) Type(type_ string) *FilesGenerateIdsCall {
  7043  	c.urlParams_.Set("type", type_)
  7044  	return c
  7045  }
  7046  
  7047  // Fields allows partial responses to be retrieved. See
  7048  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  7049  // details.
  7050  func (c *FilesGenerateIdsCall) Fields(s ...googleapi.Field) *FilesGenerateIdsCall {
  7051  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  7052  	return c
  7053  }
  7054  
  7055  // IfNoneMatch sets an optional parameter which makes the operation fail if the
  7056  // object's ETag matches the given value. This is useful for getting updates
  7057  // only after the object has changed since the last request.
  7058  func (c *FilesGenerateIdsCall) IfNoneMatch(entityTag string) *FilesGenerateIdsCall {
  7059  	c.ifNoneMatch_ = entityTag
  7060  	return c
  7061  }
  7062  
  7063  // Context sets the context to be used in this call's Do method.
  7064  func (c *FilesGenerateIdsCall) Context(ctx context.Context) *FilesGenerateIdsCall {
  7065  	c.ctx_ = ctx
  7066  	return c
  7067  }
  7068  
  7069  // Header returns a http.Header that can be modified by the caller to add
  7070  // headers to the request.
  7071  func (c *FilesGenerateIdsCall) Header() http.Header {
  7072  	if c.header_ == nil {
  7073  		c.header_ = make(http.Header)
  7074  	}
  7075  	return c.header_
  7076  }
  7077  
  7078  func (c *FilesGenerateIdsCall) doRequest(alt string) (*http.Response, error) {
  7079  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  7080  	if c.ifNoneMatch_ != "" {
  7081  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  7082  	}
  7083  	var body io.Reader = nil
  7084  	c.urlParams_.Set("alt", alt)
  7085  	c.urlParams_.Set("prettyPrint", "false")
  7086  	urls := googleapi.ResolveRelative(c.s.BasePath, "files/generateIds")
  7087  	urls += "?" + c.urlParams_.Encode()
  7088  	req, err := http.NewRequest("GET", urls, body)
  7089  	if err != nil {
  7090  		return nil, err
  7091  	}
  7092  	req.Header = reqHeaders
  7093  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  7094  }
  7095  
  7096  // Do executes the "drive.files.generateIds" call.
  7097  // Any non-2xx status code is an error. Response headers are in either
  7098  // *GeneratedIds.ServerResponse.Header or (if a response was returned at all)
  7099  // in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  7100  // whether the returned error was because http.StatusNotModified was returned.
  7101  func (c *FilesGenerateIdsCall) Do(opts ...googleapi.CallOption) (*GeneratedIds, error) {
  7102  	gensupport.SetOptions(c.urlParams_, opts...)
  7103  	res, err := c.doRequest("json")
  7104  	if res != nil && res.StatusCode == http.StatusNotModified {
  7105  		if res.Body != nil {
  7106  			res.Body.Close()
  7107  		}
  7108  		return nil, gensupport.WrapError(&googleapi.Error{
  7109  			Code:   res.StatusCode,
  7110  			Header: res.Header,
  7111  		})
  7112  	}
  7113  	if err != nil {
  7114  		return nil, err
  7115  	}
  7116  	defer googleapi.CloseBody(res)
  7117  	if err := googleapi.CheckResponse(res); err != nil {
  7118  		return nil, gensupport.WrapError(err)
  7119  	}
  7120  	ret := &GeneratedIds{
  7121  		ServerResponse: googleapi.ServerResponse{
  7122  			Header:         res.Header,
  7123  			HTTPStatusCode: res.StatusCode,
  7124  		},
  7125  	}
  7126  	target := &ret
  7127  	if err := gensupport.DecodeResponse(target, res); err != nil {
  7128  		return nil, err
  7129  	}
  7130  	return ret, nil
  7131  }
  7132  
  7133  type FilesGetCall struct {
  7134  	s            *Service
  7135  	fileId       string
  7136  	urlParams_   gensupport.URLParams
  7137  	ifNoneMatch_ string
  7138  	ctx_         context.Context
  7139  	header_      http.Header
  7140  }
  7141  
  7142  // Get:  Gets a file's metadata or content by ID. If you provide the URL
  7143  // parameter `alt=media`, then the response includes the file contents in the
  7144  // response body. Downloading content with `alt=media` only works if the file
  7145  // is stored in Drive. To download Google Docs, Sheets, and Slides use
  7146  // `files.export` (/drive/api/reference/rest/v2/files/export) instead. For more
  7147  // information, see Download & export files
  7148  // (/drive/api/guides/manage-downloads).
  7149  //
  7150  // - fileId: The ID for the file in question.
  7151  func (r *FilesService) Get(fileId string) *FilesGetCall {
  7152  	c := &FilesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  7153  	c.fileId = fileId
  7154  	return c
  7155  }
  7156  
  7157  // AcknowledgeAbuse sets the optional parameter "acknowledgeAbuse": Whether the
  7158  // user is acknowledging the risk of downloading known malware or other abusive
  7159  // files.
  7160  func (c *FilesGetCall) AcknowledgeAbuse(acknowledgeAbuse bool) *FilesGetCall {
  7161  	c.urlParams_.Set("acknowledgeAbuse", fmt.Sprint(acknowledgeAbuse))
  7162  	return c
  7163  }
  7164  
  7165  // IncludeLabels sets the optional parameter "includeLabels": A comma-separated
  7166  // list of IDs of labels to include in the `labelInfo` part of the response.
  7167  func (c *FilesGetCall) IncludeLabels(includeLabels string) *FilesGetCall {
  7168  	c.urlParams_.Set("includeLabels", includeLabels)
  7169  	return c
  7170  }
  7171  
  7172  // IncludePermissionsForView sets the optional parameter
  7173  // "includePermissionsForView": Specifies which additional view's permissions
  7174  // to include in the response. Only `published` is supported.
  7175  func (c *FilesGetCall) IncludePermissionsForView(includePermissionsForView string) *FilesGetCall {
  7176  	c.urlParams_.Set("includePermissionsForView", includePermissionsForView)
  7177  	return c
  7178  }
  7179  
  7180  // Projection sets the optional parameter "projection": Deprecated: This
  7181  // parameter has no function.
  7182  //
  7183  // Possible values:
  7184  //
  7185  //	"BASIC" - Deprecated.
  7186  //	"FULL" - Deprecated.
  7187  func (c *FilesGetCall) Projection(projection string) *FilesGetCall {
  7188  	c.urlParams_.Set("projection", projection)
  7189  	return c
  7190  }
  7191  
  7192  // RevisionId sets the optional parameter "revisionId": Specifies the Revision
  7193  // ID that should be downloaded. Ignored unless alt=media is specified.
  7194  func (c *FilesGetCall) RevisionId(revisionId string) *FilesGetCall {
  7195  	c.urlParams_.Set("revisionId", revisionId)
  7196  	return c
  7197  }
  7198  
  7199  // SupportsAllDrives sets the optional parameter "supportsAllDrives": Whether
  7200  // the requesting application supports both My Drives and shared drives.
  7201  func (c *FilesGetCall) SupportsAllDrives(supportsAllDrives bool) *FilesGetCall {
  7202  	c.urlParams_.Set("supportsAllDrives", fmt.Sprint(supportsAllDrives))
  7203  	return c
  7204  }
  7205  
  7206  // SupportsTeamDrives sets the optional parameter "supportsTeamDrives":
  7207  // Deprecated: Use `supportsAllDrives` instead.
  7208  func (c *FilesGetCall) SupportsTeamDrives(supportsTeamDrives bool) *FilesGetCall {
  7209  	c.urlParams_.Set("supportsTeamDrives", fmt.Sprint(supportsTeamDrives))
  7210  	return c
  7211  }
  7212  
  7213  // UpdateViewedDate sets the optional parameter "updateViewedDate": Deprecated:
  7214  // Use `files.update` with `modifiedDateBehavior=noChange,
  7215  // updateViewedDate=true` and an empty request body.
  7216  func (c *FilesGetCall) UpdateViewedDate(updateViewedDate bool) *FilesGetCall {
  7217  	c.urlParams_.Set("updateViewedDate", fmt.Sprint(updateViewedDate))
  7218  	return c
  7219  }
  7220  
  7221  // Fields allows partial responses to be retrieved. See
  7222  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  7223  // details.
  7224  func (c *FilesGetCall) Fields(s ...googleapi.Field) *FilesGetCall {
  7225  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  7226  	return c
  7227  }
  7228  
  7229  // IfNoneMatch sets an optional parameter which makes the operation fail if the
  7230  // object's ETag matches the given value. This is useful for getting updates
  7231  // only after the object has changed since the last request.
  7232  func (c *FilesGetCall) IfNoneMatch(entityTag string) *FilesGetCall {
  7233  	c.ifNoneMatch_ = entityTag
  7234  	return c
  7235  }
  7236  
  7237  // Context sets the context to be used in this call's Do and Download methods.
  7238  func (c *FilesGetCall) Context(ctx context.Context) *FilesGetCall {
  7239  	c.ctx_ = ctx
  7240  	return c
  7241  }
  7242  
  7243  // Header returns a http.Header that can be modified by the caller to add
  7244  // headers to the request.
  7245  func (c *FilesGetCall) Header() http.Header {
  7246  	if c.header_ == nil {
  7247  		c.header_ = make(http.Header)
  7248  	}
  7249  	return c.header_
  7250  }
  7251  
  7252  func (c *FilesGetCall) doRequest(alt string) (*http.Response, error) {
  7253  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  7254  	if c.ifNoneMatch_ != "" {
  7255  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  7256  	}
  7257  	var body io.Reader = nil
  7258  	c.urlParams_.Set("alt", alt)
  7259  	c.urlParams_.Set("prettyPrint", "false")
  7260  	urls := googleapi.ResolveRelative(c.s.BasePath, "files/{fileId}")
  7261  	urls += "?" + c.urlParams_.Encode()
  7262  	req, err := http.NewRequest("GET", urls, body)
  7263  	if err != nil {
  7264  		return nil, err
  7265  	}
  7266  	req.Header = reqHeaders
  7267  	googleapi.Expand(req.URL, map[string]string{
  7268  		"fileId": c.fileId,
  7269  	})
  7270  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  7271  }
  7272  
  7273  // Download fetches the API endpoint's "media" value, instead of the normal
  7274  // API response value. If the returned error is nil, the Response is guaranteed to
  7275  // have a 2xx status code. Callers must close the Response.Body as usual.
  7276  func (c *FilesGetCall) Download(opts ...googleapi.CallOption) (*http.Response, error) {
  7277  	gensupport.SetOptions(c.urlParams_, opts...)
  7278  	res, err := c.doRequest("media")
  7279  	if err != nil {
  7280  		return nil, err
  7281  	}
  7282  	if err := googleapi.CheckResponse(res); err != nil {
  7283  		res.Body.Close()
  7284  		return nil, gensupport.WrapError(err)
  7285  	}
  7286  	return res, nil
  7287  }
  7288  
  7289  // Do executes the "drive.files.get" call.
  7290  // Any non-2xx status code is an error. Response headers are in either
  7291  // *File.ServerResponse.Header or (if a response was returned at all) in
  7292  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  7293  // whether the returned error was because http.StatusNotModified was returned.
  7294  func (c *FilesGetCall) Do(opts ...googleapi.CallOption) (*File, error) {
  7295  	gensupport.SetOptions(c.urlParams_, opts...)
  7296  	res, err := c.doRequest("json")
  7297  	if res != nil && res.StatusCode == http.StatusNotModified {
  7298  		if res.Body != nil {
  7299  			res.Body.Close()
  7300  		}
  7301  		return nil, gensupport.WrapError(&googleapi.Error{
  7302  			Code:   res.StatusCode,
  7303  			Header: res.Header,
  7304  		})
  7305  	}
  7306  	if err != nil {
  7307  		return nil, err
  7308  	}
  7309  	defer googleapi.CloseBody(res)
  7310  	if err := googleapi.CheckResponse(res); err != nil {
  7311  		return nil, gensupport.WrapError(err)
  7312  	}
  7313  	ret := &File{
  7314  		ServerResponse: googleapi.ServerResponse{
  7315  			Header:         res.Header,
  7316  			HTTPStatusCode: res.StatusCode,
  7317  		},
  7318  	}
  7319  	target := &ret
  7320  	if err := gensupport.DecodeResponse(target, res); err != nil {
  7321  		return nil, err
  7322  	}
  7323  	return ret, nil
  7324  }
  7325  
  7326  type FilesInsertCall struct {
  7327  	s          *Service
  7328  	file       *File
  7329  	urlParams_ gensupport.URLParams
  7330  	mediaInfo_ *gensupport.MediaInfo
  7331  	ctx_       context.Context
  7332  	header_    http.Header
  7333  }
  7334  
  7335  // Insert:  Inserts a new file. This method supports an */upload* URI and
  7336  // accepts uploaded media with the following characteristics: - *Maximum file
  7337  // size:* 5,120 GB - *Accepted Media MIME types:*`*/*` Note: Specify a valid
  7338  // MIME type, rather than the literal `*/*` value. The literal `*/*` is only
  7339  // used to indicate that any valid MIME type can be uploaded. For more
  7340  // information on uploading files, see Upload file data
  7341  // (/drive/api/guides/manage-uploads). Apps creating shortcuts with
  7342  // `files.insert` must specify the MIME type
  7343  // `application/vnd.google-apps.shortcut`. Apps should specify a file extension
  7344  // in the `title` property when inserting files with the API. For example, an
  7345  // operation to insert a JPEG file should specify something like "title":
  7346  // "cat.jpg" in the metadata. Subsequent `GET` requests include the read-only
  7347  // `fileExtension` property populated with the extension originally specified
  7348  // in the `title` property. When a Google Drive user requests to download a
  7349  // file, or when the file is downloaded through the sync client, Drive builds a
  7350  // full filename (with extension) based on the title. In cases where the
  7351  // extension is missing, Drive attempts to determine the extension based on the
  7352  // file's MIME type.
  7353  func (r *FilesService) Insert(file *File) *FilesInsertCall {
  7354  	c := &FilesInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  7355  	c.file = file
  7356  	return c
  7357  }
  7358  
  7359  // Convert sets the optional parameter "convert": Whether to convert this file
  7360  // to the corresponding Docs Editors format.
  7361  func (c *FilesInsertCall) Convert(convert bool) *FilesInsertCall {
  7362  	c.urlParams_.Set("convert", fmt.Sprint(convert))
  7363  	return c
  7364  }
  7365  
  7366  // EnforceSingleParent sets the optional parameter "enforceSingleParent":
  7367  // Deprecated: Creating files in multiple folders is no longer supported.
  7368  func (c *FilesInsertCall) EnforceSingleParent(enforceSingleParent bool) *FilesInsertCall {
  7369  	c.urlParams_.Set("enforceSingleParent", fmt.Sprint(enforceSingleParent))
  7370  	return c
  7371  }
  7372  
  7373  // IncludeLabels sets the optional parameter "includeLabels": A comma-separated
  7374  // list of IDs of labels to include in the `labelInfo` part of the response.
  7375  func (c *FilesInsertCall) IncludeLabels(includeLabels string) *FilesInsertCall {
  7376  	c.urlParams_.Set("includeLabels", includeLabels)
  7377  	return c
  7378  }
  7379  
  7380  // IncludePermissionsForView sets the optional parameter
  7381  // "includePermissionsForView": Specifies which additional view's permissions
  7382  // to include in the response. Only `published` is supported.
  7383  func (c *FilesInsertCall) IncludePermissionsForView(includePermissionsForView string) *FilesInsertCall {
  7384  	c.urlParams_.Set("includePermissionsForView", includePermissionsForView)
  7385  	return c
  7386  }
  7387  
  7388  // Ocr sets the optional parameter "ocr": Whether to attempt OCR on .jpg, .png,
  7389  // .gif, or .pdf uploads.
  7390  func (c *FilesInsertCall) Ocr(ocr bool) *FilesInsertCall {
  7391  	c.urlParams_.Set("ocr", fmt.Sprint(ocr))
  7392  	return c
  7393  }
  7394  
  7395  // OcrLanguage sets the optional parameter "ocrLanguage": If ocr is true, hints
  7396  // at the language to use. Valid values are BCP 47 codes.
  7397  func (c *FilesInsertCall) OcrLanguage(ocrLanguage string) *FilesInsertCall {
  7398  	c.urlParams_.Set("ocrLanguage", ocrLanguage)
  7399  	return c
  7400  }
  7401  
  7402  // Pinned sets the optional parameter "pinned": Whether to pin the head
  7403  // revision of the uploaded file. A file can have a maximum of 200 pinned
  7404  // revisions.
  7405  func (c *FilesInsertCall) Pinned(pinned bool) *FilesInsertCall {
  7406  	c.urlParams_.Set("pinned", fmt.Sprint(pinned))
  7407  	return c
  7408  }
  7409  
  7410  // SupportsAllDrives sets the optional parameter "supportsAllDrives": Whether
  7411  // the requesting application supports both My Drives and shared drives.
  7412  func (c *FilesInsertCall) SupportsAllDrives(supportsAllDrives bool) *FilesInsertCall {
  7413  	c.urlParams_.Set("supportsAllDrives", fmt.Sprint(supportsAllDrives))
  7414  	return c
  7415  }
  7416  
  7417  // SupportsTeamDrives sets the optional parameter "supportsTeamDrives":
  7418  // Deprecated: Use `supportsAllDrives` instead.
  7419  func (c *FilesInsertCall) SupportsTeamDrives(supportsTeamDrives bool) *FilesInsertCall {
  7420  	c.urlParams_.Set("supportsTeamDrives", fmt.Sprint(supportsTeamDrives))
  7421  	return c
  7422  }
  7423  
  7424  // TimedTextLanguage sets the optional parameter "timedTextLanguage": The
  7425  // language of the timed text.
  7426  func (c *FilesInsertCall) TimedTextLanguage(timedTextLanguage string) *FilesInsertCall {
  7427  	c.urlParams_.Set("timedTextLanguage", timedTextLanguage)
  7428  	return c
  7429  }
  7430  
  7431  // TimedTextTrackName sets the optional parameter "timedTextTrackName": The
  7432  // timed text track name.
  7433  func (c *FilesInsertCall) TimedTextTrackName(timedTextTrackName string) *FilesInsertCall {
  7434  	c.urlParams_.Set("timedTextTrackName", timedTextTrackName)
  7435  	return c
  7436  }
  7437  
  7438  // UseContentAsIndexableText sets the optional parameter
  7439  // "useContentAsIndexableText": Whether to use the content as indexable text.
  7440  func (c *FilesInsertCall) UseContentAsIndexableText(useContentAsIndexableText bool) *FilesInsertCall {
  7441  	c.urlParams_.Set("useContentAsIndexableText", fmt.Sprint(useContentAsIndexableText))
  7442  	return c
  7443  }
  7444  
  7445  // Visibility sets the optional parameter "visibility": The visibility of the
  7446  // new file. This parameter is only relevant when convert=false.
  7447  //
  7448  // Possible values:
  7449  //
  7450  //	"DEFAULT" (default) - The visibility of the new file is determined by the
  7451  //
  7452  // user's default visibility/sharing policies.
  7453  //
  7454  //	"PRIVATE" - The new file will be visible to only the owner.
  7455  func (c *FilesInsertCall) Visibility(visibility string) *FilesInsertCall {
  7456  	c.urlParams_.Set("visibility", visibility)
  7457  	return c
  7458  }
  7459  
  7460  // Media specifies the media to upload in one or more chunks. The chunk size
  7461  // may be controlled by supplying a MediaOption generated by
  7462  // googleapi.ChunkSize. The chunk size defaults to
  7463  // googleapi.DefaultUploadChunkSize.The Content-Type header used in the upload
  7464  // request will be determined by sniffing the contents of r, unless a
  7465  // MediaOption generated by googleapi.ContentType is supplied.
  7466  // At most one of Media and ResumableMedia may be set.
  7467  func (c *FilesInsertCall) Media(r io.Reader, options ...googleapi.MediaOption) *FilesInsertCall {
  7468  	c.mediaInfo_ = gensupport.NewInfoFromMedia(r, options)
  7469  	return c
  7470  }
  7471  
  7472  // ResumableMedia specifies the media to upload in chunks and can be canceled
  7473  // with ctx.
  7474  //
  7475  // Deprecated: use Media instead.
  7476  //
  7477  // At most one of Media and ResumableMedia may be set. mediaType identifies the
  7478  // MIME media type of the upload, such as "image/png". If mediaType is "", it
  7479  // will be auto-detected. The provided ctx will supersede any context
  7480  // previously provided to the Context method.
  7481  func (c *FilesInsertCall) ResumableMedia(ctx context.Context, r io.ReaderAt, size int64, mediaType string) *FilesInsertCall {
  7482  	c.ctx_ = ctx
  7483  	c.mediaInfo_ = gensupport.NewInfoFromResumableMedia(r, size, mediaType)
  7484  	return c
  7485  }
  7486  
  7487  // ProgressUpdater provides a callback function that will be called after every
  7488  // chunk. It should be a low-latency function in order to not slow down the
  7489  // upload operation. This should only be called when using ResumableMedia (as
  7490  // opposed to Media).
  7491  func (c *FilesInsertCall) ProgressUpdater(pu googleapi.ProgressUpdater) *FilesInsertCall {
  7492  	c.mediaInfo_.SetProgressUpdater(pu)
  7493  	return c
  7494  }
  7495  
  7496  // Fields allows partial responses to be retrieved. See
  7497  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  7498  // details.
  7499  func (c *FilesInsertCall) Fields(s ...googleapi.Field) *FilesInsertCall {
  7500  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  7501  	return c
  7502  }
  7503  
  7504  // Context sets the context to be used in this call's Do method.
  7505  // This context will supersede any context previously provided to the
  7506  // ResumableMedia method.
  7507  func (c *FilesInsertCall) Context(ctx context.Context) *FilesInsertCall {
  7508  	c.ctx_ = ctx
  7509  	return c
  7510  }
  7511  
  7512  // Header returns a http.Header that can be modified by the caller to add
  7513  // headers to the request.
  7514  func (c *FilesInsertCall) Header() http.Header {
  7515  	if c.header_ == nil {
  7516  		c.header_ = make(http.Header)
  7517  	}
  7518  	return c.header_
  7519  }
  7520  
  7521  func (c *FilesInsertCall) doRequest(alt string) (*http.Response, error) {
  7522  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
  7523  	var body io.Reader = nil
  7524  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.file)
  7525  	if err != nil {
  7526  		return nil, err
  7527  	}
  7528  	c.urlParams_.Set("alt", alt)
  7529  	c.urlParams_.Set("prettyPrint", "false")
  7530  	urls := googleapi.ResolveRelative(c.s.BasePath, "files")
  7531  	if c.mediaInfo_ != nil {
  7532  		urls = googleapi.ResolveRelative(c.s.BasePath, "/upload/drive/v2/files")
  7533  		c.urlParams_.Set("uploadType", c.mediaInfo_.UploadType())
  7534  	}
  7535  	if body == nil {
  7536  		body = new(bytes.Buffer)
  7537  		reqHeaders.Set("Content-Type", "application/json")
  7538  	}
  7539  	body, getBody, cleanup := c.mediaInfo_.UploadRequest(reqHeaders, body)
  7540  	defer cleanup()
  7541  	urls += "?" + c.urlParams_.Encode()
  7542  	req, err := http.NewRequest("POST", urls, body)
  7543  	if err != nil {
  7544  		return nil, err
  7545  	}
  7546  	req.Header = reqHeaders
  7547  	req.GetBody = getBody
  7548  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  7549  }
  7550  
  7551  // Do executes the "drive.files.insert" call.
  7552  // Any non-2xx status code is an error. Response headers are in either
  7553  // *File.ServerResponse.Header or (if a response was returned at all) in
  7554  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  7555  // whether the returned error was because http.StatusNotModified was returned.
  7556  func (c *FilesInsertCall) Do(opts ...googleapi.CallOption) (*File, error) {
  7557  	gensupport.SetOptions(c.urlParams_, opts...)
  7558  	res, err := c.doRequest("json")
  7559  	if res != nil && res.StatusCode == http.StatusNotModified {
  7560  		if res.Body != nil {
  7561  			res.Body.Close()
  7562  		}
  7563  		return nil, gensupport.WrapError(&googleapi.Error{
  7564  			Code:   res.StatusCode,
  7565  			Header: res.Header,
  7566  		})
  7567  	}
  7568  	if err != nil {
  7569  		return nil, err
  7570  	}
  7571  	defer googleapi.CloseBody(res)
  7572  	if err := googleapi.CheckResponse(res); err != nil {
  7573  		return nil, gensupport.WrapError(err)
  7574  	}
  7575  	rx := c.mediaInfo_.ResumableUpload(res.Header.Get("Location"))
  7576  	if rx != nil {
  7577  		rx.Client = c.s.client
  7578  		rx.UserAgent = c.s.userAgent()
  7579  		ctx := c.ctx_
  7580  		if ctx == nil {
  7581  			ctx = context.TODO()
  7582  		}
  7583  		res, err = rx.Upload(ctx)
  7584  		if err != nil {
  7585  			return nil, err
  7586  		}
  7587  		defer res.Body.Close()
  7588  		if err := googleapi.CheckResponse(res); err != nil {
  7589  			return nil, gensupport.WrapError(err)
  7590  		}
  7591  	}
  7592  	ret := &File{
  7593  		ServerResponse: googleapi.ServerResponse{
  7594  			Header:         res.Header,
  7595  			HTTPStatusCode: res.StatusCode,
  7596  		},
  7597  	}
  7598  	target := &ret
  7599  	if err := gensupport.DecodeResponse(target, res); err != nil {
  7600  		return nil, err
  7601  	}
  7602  	return ret, nil
  7603  }
  7604  
  7605  type FilesListCall struct {
  7606  	s            *Service
  7607  	urlParams_   gensupport.URLParams
  7608  	ifNoneMatch_ string
  7609  	ctx_         context.Context
  7610  	header_      http.Header
  7611  }
  7612  
  7613  // List:  Lists the user's files. This method accepts the `q` parameter, which
  7614  // is a search query combining one or more search terms. For more information,
  7615  // see the Search for files & folders (/drive/api/guides/search-files) guide.
  7616  // *Note:* This method returns *all* files by default, including trashed files.
  7617  // If you don't want trashed files to appear in the list, use the
  7618  // `trashed=false` query parameter to remove trashed files from the results.
  7619  func (r *FilesService) List() *FilesListCall {
  7620  	c := &FilesListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  7621  	return c
  7622  }
  7623  
  7624  // Corpora sets the optional parameter "corpora": Bodies of items
  7625  // (files/documents) to which the query applies. Supported bodies are
  7626  // `default`, `domain`, `drive` and `allDrives`. Prefer `default` or `drive` to
  7627  // `allDrives` for efficiency.
  7628  func (c *FilesListCall) Corpora(corpora string) *FilesListCall {
  7629  	c.urlParams_.Set("corpora", corpora)
  7630  	return c
  7631  }
  7632  
  7633  // Corpus sets the optional parameter "corpus": Deprecated: The body of items
  7634  // (files/documents) to which the query applies. Use `corpora` instead.
  7635  //
  7636  // Possible values:
  7637  //
  7638  //	"DEFAULT" - The items that the user has accessed.
  7639  //	"DOMAIN" - Items shared to the user's domain.
  7640  func (c *FilesListCall) Corpus(corpus string) *FilesListCall {
  7641  	c.urlParams_.Set("corpus", corpus)
  7642  	return c
  7643  }
  7644  
  7645  // DriveId sets the optional parameter "driveId": ID of the shared drive to
  7646  // search.
  7647  func (c *FilesListCall) DriveId(driveId string) *FilesListCall {
  7648  	c.urlParams_.Set("driveId", driveId)
  7649  	return c
  7650  }
  7651  
  7652  // IncludeItemsFromAllDrives sets the optional parameter
  7653  // "includeItemsFromAllDrives": Whether both My Drive and shared drive items
  7654  // should be included in results.
  7655  func (c *FilesListCall) IncludeItemsFromAllDrives(includeItemsFromAllDrives bool) *FilesListCall {
  7656  	c.urlParams_.Set("includeItemsFromAllDrives", fmt.Sprint(includeItemsFromAllDrives))
  7657  	return c
  7658  }
  7659  
  7660  // IncludeLabels sets the optional parameter "includeLabels": A comma-separated
  7661  // list of IDs of labels to include in the `labelInfo` part of the response.
  7662  func (c *FilesListCall) IncludeLabels(includeLabels string) *FilesListCall {
  7663  	c.urlParams_.Set("includeLabels", includeLabels)
  7664  	return c
  7665  }
  7666  
  7667  // IncludePermissionsForView sets the optional parameter
  7668  // "includePermissionsForView": Specifies which additional view's permissions
  7669  // to include in the response. Only `published` is supported.
  7670  func (c *FilesListCall) IncludePermissionsForView(includePermissionsForView string) *FilesListCall {
  7671  	c.urlParams_.Set("includePermissionsForView", includePermissionsForView)
  7672  	return c
  7673  }
  7674  
  7675  // IncludeTeamDriveItems sets the optional parameter "includeTeamDriveItems":
  7676  // Deprecated: Use `includeItemsFromAllDrives` instead.
  7677  func (c *FilesListCall) IncludeTeamDriveItems(includeTeamDriveItems bool) *FilesListCall {
  7678  	c.urlParams_.Set("includeTeamDriveItems", fmt.Sprint(includeTeamDriveItems))
  7679  	return c
  7680  }
  7681  
  7682  // MaxResults sets the optional parameter "maxResults": The maximum number of
  7683  // files to return per page. Partial or empty result pages are possible even
  7684  // before the end of the files list has been reached.
  7685  func (c *FilesListCall) MaxResults(maxResults int64) *FilesListCall {
  7686  	c.urlParams_.Set("maxResults", fmt.Sprint(maxResults))
  7687  	return c
  7688  }
  7689  
  7690  // OrderBy sets the optional parameter "orderBy": A comma-separated list of
  7691  // sort keys. Valid keys are `createdDate`, `folder`, `lastViewedByMeDate`,
  7692  // `modifiedByMeDate`, `modifiedDate`, `quotaBytesUsed`, `recency`,
  7693  // `sharedWithMeDate`, `starred`, `title`, and `title_natural`. Each key sorts
  7694  // ascending by default, but may be reversed with the `desc` modifier. Example
  7695  // usage: ?orderBy=folder,modifiedDate desc,title. Please note that there is a
  7696  // current limitation for users with approximately one million files in which
  7697  // the requested sort order is ignored.
  7698  func (c *FilesListCall) OrderBy(orderBy string) *FilesListCall {
  7699  	c.urlParams_.Set("orderBy", orderBy)
  7700  	return c
  7701  }
  7702  
  7703  // PageToken sets the optional parameter "pageToken": Page token for files.
  7704  func (c *FilesListCall) PageToken(pageToken string) *FilesListCall {
  7705  	c.urlParams_.Set("pageToken", pageToken)
  7706  	return c
  7707  }
  7708  
  7709  // Projection sets the optional parameter "projection": Deprecated: This
  7710  // parameter has no function.
  7711  //
  7712  // Possible values:
  7713  //
  7714  //	"BASIC" - Deprecated.
  7715  //	"FULL" - Deprecated.
  7716  func (c *FilesListCall) Projection(projection string) *FilesListCall {
  7717  	c.urlParams_.Set("projection", projection)
  7718  	return c
  7719  }
  7720  
  7721  // Q sets the optional parameter "q": Query string for searching files.
  7722  func (c *FilesListCall) Q(q string) *FilesListCall {
  7723  	c.urlParams_.Set("q", q)
  7724  	return c
  7725  }
  7726  
  7727  // Spaces sets the optional parameter "spaces": A comma-separated list of
  7728  // spaces to query. Supported values are `drive`, and `appDataFolder`.
  7729  func (c *FilesListCall) Spaces(spaces string) *FilesListCall {
  7730  	c.urlParams_.Set("spaces", spaces)
  7731  	return c
  7732  }
  7733  
  7734  // SupportsAllDrives sets the optional parameter "supportsAllDrives": Whether
  7735  // the requesting application supports both My Drives and shared drives.
  7736  func (c *FilesListCall) SupportsAllDrives(supportsAllDrives bool) *FilesListCall {
  7737  	c.urlParams_.Set("supportsAllDrives", fmt.Sprint(supportsAllDrives))
  7738  	return c
  7739  }
  7740  
  7741  // SupportsTeamDrives sets the optional parameter "supportsTeamDrives":
  7742  // Deprecated: Use `supportsAllDrives` instead.
  7743  func (c *FilesListCall) SupportsTeamDrives(supportsTeamDrives bool) *FilesListCall {
  7744  	c.urlParams_.Set("supportsTeamDrives", fmt.Sprint(supportsTeamDrives))
  7745  	return c
  7746  }
  7747  
  7748  // TeamDriveId sets the optional parameter "teamDriveId": Deprecated: Use
  7749  // `driveId` instead.
  7750  func (c *FilesListCall) TeamDriveId(teamDriveId string) *FilesListCall {
  7751  	c.urlParams_.Set("teamDriveId", teamDriveId)
  7752  	return c
  7753  }
  7754  
  7755  // Fields allows partial responses to be retrieved. See
  7756  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  7757  // details.
  7758  func (c *FilesListCall) Fields(s ...googleapi.Field) *FilesListCall {
  7759  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  7760  	return c
  7761  }
  7762  
  7763  // IfNoneMatch sets an optional parameter which makes the operation fail if the
  7764  // object's ETag matches the given value. This is useful for getting updates
  7765  // only after the object has changed since the last request.
  7766  func (c *FilesListCall) IfNoneMatch(entityTag string) *FilesListCall {
  7767  	c.ifNoneMatch_ = entityTag
  7768  	return c
  7769  }
  7770  
  7771  // Context sets the context to be used in this call's Do method.
  7772  func (c *FilesListCall) Context(ctx context.Context) *FilesListCall {
  7773  	c.ctx_ = ctx
  7774  	return c
  7775  }
  7776  
  7777  // Header returns a http.Header that can be modified by the caller to add
  7778  // headers to the request.
  7779  func (c *FilesListCall) Header() http.Header {
  7780  	if c.header_ == nil {
  7781  		c.header_ = make(http.Header)
  7782  	}
  7783  	return c.header_
  7784  }
  7785  
  7786  func (c *FilesListCall) doRequest(alt string) (*http.Response, error) {
  7787  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  7788  	if c.ifNoneMatch_ != "" {
  7789  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  7790  	}
  7791  	var body io.Reader = nil
  7792  	c.urlParams_.Set("alt", alt)
  7793  	c.urlParams_.Set("prettyPrint", "false")
  7794  	urls := googleapi.ResolveRelative(c.s.BasePath, "files")
  7795  	urls += "?" + c.urlParams_.Encode()
  7796  	req, err := http.NewRequest("GET", urls, body)
  7797  	if err != nil {
  7798  		return nil, err
  7799  	}
  7800  	req.Header = reqHeaders
  7801  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  7802  }
  7803  
  7804  // Do executes the "drive.files.list" call.
  7805  // Any non-2xx status code is an error. Response headers are in either
  7806  // *FileList.ServerResponse.Header or (if a response was returned at all) in
  7807  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  7808  // whether the returned error was because http.StatusNotModified was returned.
  7809  func (c *FilesListCall) Do(opts ...googleapi.CallOption) (*FileList, error) {
  7810  	gensupport.SetOptions(c.urlParams_, opts...)
  7811  	res, err := c.doRequest("json")
  7812  	if res != nil && res.StatusCode == http.StatusNotModified {
  7813  		if res.Body != nil {
  7814  			res.Body.Close()
  7815  		}
  7816  		return nil, gensupport.WrapError(&googleapi.Error{
  7817  			Code:   res.StatusCode,
  7818  			Header: res.Header,
  7819  		})
  7820  	}
  7821  	if err != nil {
  7822  		return nil, err
  7823  	}
  7824  	defer googleapi.CloseBody(res)
  7825  	if err := googleapi.CheckResponse(res); err != nil {
  7826  		return nil, gensupport.WrapError(err)
  7827  	}
  7828  	ret := &FileList{
  7829  		ServerResponse: googleapi.ServerResponse{
  7830  			Header:         res.Header,
  7831  			HTTPStatusCode: res.StatusCode,
  7832  		},
  7833  	}
  7834  	target := &ret
  7835  	if err := gensupport.DecodeResponse(target, res); err != nil {
  7836  		return nil, err
  7837  	}
  7838  	return ret, nil
  7839  }
  7840  
  7841  // Pages invokes f for each page of results.
  7842  // A non-nil error returned from f will halt the iteration.
  7843  // The provided context supersedes any context provided to the Context method.
  7844  func (c *FilesListCall) Pages(ctx context.Context, f func(*FileList) error) error {
  7845  	c.ctx_ = ctx
  7846  	defer c.PageToken(c.urlParams_.Get("pageToken"))
  7847  	for {
  7848  		x, err := c.Do()
  7849  		if err != nil {
  7850  			return err
  7851  		}
  7852  		if err := f(x); err != nil {
  7853  			return err
  7854  		}
  7855  		if x.NextPageToken == "" {
  7856  			return nil
  7857  		}
  7858  		c.PageToken(x.NextPageToken)
  7859  	}
  7860  }
  7861  
  7862  type FilesListLabelsCall struct {
  7863  	s            *Service
  7864  	fileId       string
  7865  	urlParams_   gensupport.URLParams
  7866  	ifNoneMatch_ string
  7867  	ctx_         context.Context
  7868  	header_      http.Header
  7869  }
  7870  
  7871  // ListLabels: Lists the labels on a file.
  7872  //
  7873  // - fileId: The ID for the file.
  7874  func (r *FilesService) ListLabels(fileId string) *FilesListLabelsCall {
  7875  	c := &FilesListLabelsCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  7876  	c.fileId = fileId
  7877  	return c
  7878  }
  7879  
  7880  // MaxResults sets the optional parameter "maxResults": The maximum number of
  7881  // labels to return per page. When not set, defaults to 100.
  7882  func (c *FilesListLabelsCall) MaxResults(maxResults int64) *FilesListLabelsCall {
  7883  	c.urlParams_.Set("maxResults", fmt.Sprint(maxResults))
  7884  	return c
  7885  }
  7886  
  7887  // PageToken sets the optional parameter "pageToken": The token for continuing
  7888  // a previous list request on the next page. This should be set to the value of
  7889  // `nextPageToken` from the previous response.
  7890  func (c *FilesListLabelsCall) PageToken(pageToken string) *FilesListLabelsCall {
  7891  	c.urlParams_.Set("pageToken", pageToken)
  7892  	return c
  7893  }
  7894  
  7895  // Fields allows partial responses to be retrieved. See
  7896  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  7897  // details.
  7898  func (c *FilesListLabelsCall) Fields(s ...googleapi.Field) *FilesListLabelsCall {
  7899  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  7900  	return c
  7901  }
  7902  
  7903  // IfNoneMatch sets an optional parameter which makes the operation fail if the
  7904  // object's ETag matches the given value. This is useful for getting updates
  7905  // only after the object has changed since the last request.
  7906  func (c *FilesListLabelsCall) IfNoneMatch(entityTag string) *FilesListLabelsCall {
  7907  	c.ifNoneMatch_ = entityTag
  7908  	return c
  7909  }
  7910  
  7911  // Context sets the context to be used in this call's Do method.
  7912  func (c *FilesListLabelsCall) Context(ctx context.Context) *FilesListLabelsCall {
  7913  	c.ctx_ = ctx
  7914  	return c
  7915  }
  7916  
  7917  // Header returns a http.Header that can be modified by the caller to add
  7918  // headers to the request.
  7919  func (c *FilesListLabelsCall) Header() http.Header {
  7920  	if c.header_ == nil {
  7921  		c.header_ = make(http.Header)
  7922  	}
  7923  	return c.header_
  7924  }
  7925  
  7926  func (c *FilesListLabelsCall) doRequest(alt string) (*http.Response, error) {
  7927  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  7928  	if c.ifNoneMatch_ != "" {
  7929  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  7930  	}
  7931  	var body io.Reader = nil
  7932  	c.urlParams_.Set("alt", alt)
  7933  	c.urlParams_.Set("prettyPrint", "false")
  7934  	urls := googleapi.ResolveRelative(c.s.BasePath, "files/{fileId}/listLabels")
  7935  	urls += "?" + c.urlParams_.Encode()
  7936  	req, err := http.NewRequest("GET", urls, body)
  7937  	if err != nil {
  7938  		return nil, err
  7939  	}
  7940  	req.Header = reqHeaders
  7941  	googleapi.Expand(req.URL, map[string]string{
  7942  		"fileId": c.fileId,
  7943  	})
  7944  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  7945  }
  7946  
  7947  // Do executes the "drive.files.listLabels" call.
  7948  // Any non-2xx status code is an error. Response headers are in either
  7949  // *LabelList.ServerResponse.Header or (if a response was returned at all) in
  7950  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  7951  // whether the returned error was because http.StatusNotModified was returned.
  7952  func (c *FilesListLabelsCall) Do(opts ...googleapi.CallOption) (*LabelList, error) {
  7953  	gensupport.SetOptions(c.urlParams_, opts...)
  7954  	res, err := c.doRequest("json")
  7955  	if res != nil && res.StatusCode == http.StatusNotModified {
  7956  		if res.Body != nil {
  7957  			res.Body.Close()
  7958  		}
  7959  		return nil, gensupport.WrapError(&googleapi.Error{
  7960  			Code:   res.StatusCode,
  7961  			Header: res.Header,
  7962  		})
  7963  	}
  7964  	if err != nil {
  7965  		return nil, err
  7966  	}
  7967  	defer googleapi.CloseBody(res)
  7968  	if err := googleapi.CheckResponse(res); err != nil {
  7969  		return nil, gensupport.WrapError(err)
  7970  	}
  7971  	ret := &LabelList{
  7972  		ServerResponse: googleapi.ServerResponse{
  7973  			Header:         res.Header,
  7974  			HTTPStatusCode: res.StatusCode,
  7975  		},
  7976  	}
  7977  	target := &ret
  7978  	if err := gensupport.DecodeResponse(target, res); err != nil {
  7979  		return nil, err
  7980  	}
  7981  	return ret, nil
  7982  }
  7983  
  7984  // Pages invokes f for each page of results.
  7985  // A non-nil error returned from f will halt the iteration.
  7986  // The provided context supersedes any context provided to the Context method.
  7987  func (c *FilesListLabelsCall) Pages(ctx context.Context, f func(*LabelList) error) error {
  7988  	c.ctx_ = ctx
  7989  	defer c.PageToken(c.urlParams_.Get("pageToken"))
  7990  	for {
  7991  		x, err := c.Do()
  7992  		if err != nil {
  7993  			return err
  7994  		}
  7995  		if err := f(x); err != nil {
  7996  			return err
  7997  		}
  7998  		if x.NextPageToken == "" {
  7999  			return nil
  8000  		}
  8001  		c.PageToken(x.NextPageToken)
  8002  	}
  8003  }
  8004  
  8005  type FilesModifyLabelsCall struct {
  8006  	s                   *Service
  8007  	fileId              string
  8008  	modifylabelsrequest *ModifyLabelsRequest
  8009  	urlParams_          gensupport.URLParams
  8010  	ctx_                context.Context
  8011  	header_             http.Header
  8012  }
  8013  
  8014  // ModifyLabels: Modifies the set of labels applied to a file. Returns a list
  8015  // of the labels that were added or modified.
  8016  //
  8017  // - fileId: The ID of the file to which the labels belong.
  8018  func (r *FilesService) ModifyLabels(fileId string, modifylabelsrequest *ModifyLabelsRequest) *FilesModifyLabelsCall {
  8019  	c := &FilesModifyLabelsCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  8020  	c.fileId = fileId
  8021  	c.modifylabelsrequest = modifylabelsrequest
  8022  	return c
  8023  }
  8024  
  8025  // Fields allows partial responses to be retrieved. See
  8026  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  8027  // details.
  8028  func (c *FilesModifyLabelsCall) Fields(s ...googleapi.Field) *FilesModifyLabelsCall {
  8029  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  8030  	return c
  8031  }
  8032  
  8033  // Context sets the context to be used in this call's Do method.
  8034  func (c *FilesModifyLabelsCall) Context(ctx context.Context) *FilesModifyLabelsCall {
  8035  	c.ctx_ = ctx
  8036  	return c
  8037  }
  8038  
  8039  // Header returns a http.Header that can be modified by the caller to add
  8040  // headers to the request.
  8041  func (c *FilesModifyLabelsCall) Header() http.Header {
  8042  	if c.header_ == nil {
  8043  		c.header_ = make(http.Header)
  8044  	}
  8045  	return c.header_
  8046  }
  8047  
  8048  func (c *FilesModifyLabelsCall) doRequest(alt string) (*http.Response, error) {
  8049  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
  8050  	var body io.Reader = nil
  8051  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.modifylabelsrequest)
  8052  	if err != nil {
  8053  		return nil, err
  8054  	}
  8055  	c.urlParams_.Set("alt", alt)
  8056  	c.urlParams_.Set("prettyPrint", "false")
  8057  	urls := googleapi.ResolveRelative(c.s.BasePath, "files/{fileId}/modifyLabels")
  8058  	urls += "?" + c.urlParams_.Encode()
  8059  	req, err := http.NewRequest("POST", urls, body)
  8060  	if err != nil {
  8061  		return nil, err
  8062  	}
  8063  	req.Header = reqHeaders
  8064  	googleapi.Expand(req.URL, map[string]string{
  8065  		"fileId": c.fileId,
  8066  	})
  8067  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  8068  }
  8069  
  8070  // Do executes the "drive.files.modifyLabels" call.
  8071  // Any non-2xx status code is an error. Response headers are in either
  8072  // *ModifyLabelsResponse.ServerResponse.Header or (if a response was returned
  8073  // at all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
  8074  // check whether the returned error was because http.StatusNotModified was
  8075  // returned.
  8076  func (c *FilesModifyLabelsCall) Do(opts ...googleapi.CallOption) (*ModifyLabelsResponse, error) {
  8077  	gensupport.SetOptions(c.urlParams_, opts...)
  8078  	res, err := c.doRequest("json")
  8079  	if res != nil && res.StatusCode == http.StatusNotModified {
  8080  		if res.Body != nil {
  8081  			res.Body.Close()
  8082  		}
  8083  		return nil, gensupport.WrapError(&googleapi.Error{
  8084  			Code:   res.StatusCode,
  8085  			Header: res.Header,
  8086  		})
  8087  	}
  8088  	if err != nil {
  8089  		return nil, err
  8090  	}
  8091  	defer googleapi.CloseBody(res)
  8092  	if err := googleapi.CheckResponse(res); err != nil {
  8093  		return nil, gensupport.WrapError(err)
  8094  	}
  8095  	ret := &ModifyLabelsResponse{
  8096  		ServerResponse: googleapi.ServerResponse{
  8097  			Header:         res.Header,
  8098  			HTTPStatusCode: res.StatusCode,
  8099  		},
  8100  	}
  8101  	target := &ret
  8102  	if err := gensupport.DecodeResponse(target, res); err != nil {
  8103  		return nil, err
  8104  	}
  8105  	return ret, nil
  8106  }
  8107  
  8108  type FilesPatchCall struct {
  8109  	s          *Service
  8110  	fileId     string
  8111  	file       *File
  8112  	urlParams_ gensupport.URLParams
  8113  	ctx_       context.Context
  8114  	header_    http.Header
  8115  }
  8116  
  8117  // Patch: Updates a file's metadata and/or content. When calling this method,
  8118  // only populate fields in the request that you want to modify. When updating
  8119  // fields, some fields might change automatically, such as modifiedDate. This
  8120  // method supports patch semantics.
  8121  //
  8122  // - fileId: The ID of the file to update.
  8123  func (r *FilesService) Patch(fileId string, file *File) *FilesPatchCall {
  8124  	c := &FilesPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  8125  	c.fileId = fileId
  8126  	c.file = file
  8127  	return c
  8128  }
  8129  
  8130  // AddParents sets the optional parameter "addParents": Comma-separated list of
  8131  // parent IDs to add.
  8132  func (c *FilesPatchCall) AddParents(addParents string) *FilesPatchCall {
  8133  	c.urlParams_.Set("addParents", addParents)
  8134  	return c
  8135  }
  8136  
  8137  // Convert sets the optional parameter "convert": Deprecated: This parameter
  8138  // has no function.
  8139  func (c *FilesPatchCall) Convert(convert bool) *FilesPatchCall {
  8140  	c.urlParams_.Set("convert", fmt.Sprint(convert))
  8141  	return c
  8142  }
  8143  
  8144  // EnforceSingleParent sets the optional parameter "enforceSingleParent":
  8145  // Deprecated: Adding files to multiple folders is no longer supported. Use
  8146  // `shortcuts` instead.
  8147  func (c *FilesPatchCall) EnforceSingleParent(enforceSingleParent bool) *FilesPatchCall {
  8148  	c.urlParams_.Set("enforceSingleParent", fmt.Sprint(enforceSingleParent))
  8149  	return c
  8150  }
  8151  
  8152  // IncludeLabels sets the optional parameter "includeLabels": A comma-separated
  8153  // list of IDs of labels to include in the `labelInfo` part of the response.
  8154  func (c *FilesPatchCall) IncludeLabels(includeLabels string) *FilesPatchCall {
  8155  	c.urlParams_.Set("includeLabels", includeLabels)
  8156  	return c
  8157  }
  8158  
  8159  // IncludePermissionsForView sets the optional parameter
  8160  // "includePermissionsForView": Specifies which additional view's permissions
  8161  // to include in the response. Only `published` is supported.
  8162  func (c *FilesPatchCall) IncludePermissionsForView(includePermissionsForView string) *FilesPatchCall {
  8163  	c.urlParams_.Set("includePermissionsForView", includePermissionsForView)
  8164  	return c
  8165  }
  8166  
  8167  // ModifiedDateBehavior sets the optional parameter "modifiedDateBehavior":
  8168  // Determines the behavior in which `modifiedDate` is updated. This overrides
  8169  // `setModifiedDate`.
  8170  //
  8171  // Possible values:
  8172  //
  8173  //	"fromBody" - Set `modifiedDate` to the value provided in the body of the
  8174  //
  8175  // request. No change if no value was provided.
  8176  //
  8177  //	"fromBodyIfNeeded" - Set `modifiedDate` to the value provided in the body
  8178  //
  8179  // of the request depending on other contents of the update.
  8180  //
  8181  //	"fromBodyOrNow" - Set modifiedDate to the value provided in the body of
  8182  //
  8183  // the request, or to the current time if no value was provided.
  8184  //
  8185  //	"noChange" - Maintain the previous value of `modifiedDate`.
  8186  //	"now" - Set `modifiedDate` to the current time.
  8187  //	"nowIfNeeded" - Set `modifiedDate` to the current time depending on
  8188  //
  8189  // contents of the update.
  8190  func (c *FilesPatchCall) ModifiedDateBehavior(modifiedDateBehavior string) *FilesPatchCall {
  8191  	c.urlParams_.Set("modifiedDateBehavior", modifiedDateBehavior)
  8192  	return c
  8193  }
  8194  
  8195  // NewRevision sets the optional parameter "newRevision": Whether a blob upload
  8196  // should create a new revision. If false, the blob data in the current head
  8197  // revision is replaced. If true or not set, a new blob is created as head
  8198  // revision, and previous unpinned revisions are preserved for a short period
  8199  // of time. Pinned revisions are stored indefinitely, using additional storage
  8200  // quota, up to a maximum of 200 revisions. For details on how revisions are
  8201  // retained, see the Drive Help Center
  8202  // (https://support.google.com/drive/answer/2409045). Note that this field is
  8203  // ignored if there is no payload in the request.
  8204  func (c *FilesPatchCall) NewRevision(newRevision bool) *FilesPatchCall {
  8205  	c.urlParams_.Set("newRevision", fmt.Sprint(newRevision))
  8206  	return c
  8207  }
  8208  
  8209  // Ocr sets the optional parameter "ocr": Whether to attempt OCR on .jpg, .png,
  8210  // .gif, or .pdf uploads.
  8211  func (c *FilesPatchCall) Ocr(ocr bool) *FilesPatchCall {
  8212  	c.urlParams_.Set("ocr", fmt.Sprint(ocr))
  8213  	return c
  8214  }
  8215  
  8216  // OcrLanguage sets the optional parameter "ocrLanguage": If ocr is true, hints
  8217  // at the language to use. Valid values are BCP 47 codes.
  8218  func (c *FilesPatchCall) OcrLanguage(ocrLanguage string) *FilesPatchCall {
  8219  	c.urlParams_.Set("ocrLanguage", ocrLanguage)
  8220  	return c
  8221  }
  8222  
  8223  // Pinned sets the optional parameter "pinned": Whether to pin the new
  8224  // revision. A file can have a maximum of 200 pinned revisions. Note that this
  8225  // field is ignored if there is no payload in the request.
  8226  func (c *FilesPatchCall) Pinned(pinned bool) *FilesPatchCall {
  8227  	c.urlParams_.Set("pinned", fmt.Sprint(pinned))
  8228  	return c
  8229  }
  8230  
  8231  // RemoveParents sets the optional parameter "removeParents": Comma-separated
  8232  // list of parent IDs to remove.
  8233  func (c *FilesPatchCall) RemoveParents(removeParents string) *FilesPatchCall {
  8234  	c.urlParams_.Set("removeParents", removeParents)
  8235  	return c
  8236  }
  8237  
  8238  // SetModifiedDate sets the optional parameter "setModifiedDate": Whether to
  8239  // set the modified date using the value supplied in the request body. Setting
  8240  // this field to `true` is equivalent to `modifiedDateBehavior=fromBodyOrNow`,
  8241  // and `false` is equivalent to `modifiedDateBehavior=now`. To prevent any
  8242  // changes to the modified date set `modifiedDateBehavior=noChange`.
  8243  func (c *FilesPatchCall) SetModifiedDate(setModifiedDate bool) *FilesPatchCall {
  8244  	c.urlParams_.Set("setModifiedDate", fmt.Sprint(setModifiedDate))
  8245  	return c
  8246  }
  8247  
  8248  // SupportsAllDrives sets the optional parameter "supportsAllDrives": Whether
  8249  // the requesting application supports both My Drives and shared drives.
  8250  func (c *FilesPatchCall) SupportsAllDrives(supportsAllDrives bool) *FilesPatchCall {
  8251  	c.urlParams_.Set("supportsAllDrives", fmt.Sprint(supportsAllDrives))
  8252  	return c
  8253  }
  8254  
  8255  // SupportsTeamDrives sets the optional parameter "supportsTeamDrives":
  8256  // Deprecated: Use `supportsAllDrives` instead.
  8257  func (c *FilesPatchCall) SupportsTeamDrives(supportsTeamDrives bool) *FilesPatchCall {
  8258  	c.urlParams_.Set("supportsTeamDrives", fmt.Sprint(supportsTeamDrives))
  8259  	return c
  8260  }
  8261  
  8262  // TimedTextLanguage sets the optional parameter "timedTextLanguage": The
  8263  // language of the timed text.
  8264  func (c *FilesPatchCall) TimedTextLanguage(timedTextLanguage string) *FilesPatchCall {
  8265  	c.urlParams_.Set("timedTextLanguage", timedTextLanguage)
  8266  	return c
  8267  }
  8268  
  8269  // TimedTextTrackName sets the optional parameter "timedTextTrackName": The
  8270  // timed text track name.
  8271  func (c *FilesPatchCall) TimedTextTrackName(timedTextTrackName string) *FilesPatchCall {
  8272  	c.urlParams_.Set("timedTextTrackName", timedTextTrackName)
  8273  	return c
  8274  }
  8275  
  8276  // UpdateViewedDate sets the optional parameter "updateViewedDate": Whether to
  8277  // update the view date after successfully updating the file.
  8278  func (c *FilesPatchCall) UpdateViewedDate(updateViewedDate bool) *FilesPatchCall {
  8279  	c.urlParams_.Set("updateViewedDate", fmt.Sprint(updateViewedDate))
  8280  	return c
  8281  }
  8282  
  8283  // UseContentAsIndexableText sets the optional parameter
  8284  // "useContentAsIndexableText": Whether to use the content as indexable text.
  8285  func (c *FilesPatchCall) UseContentAsIndexableText(useContentAsIndexableText bool) *FilesPatchCall {
  8286  	c.urlParams_.Set("useContentAsIndexableText", fmt.Sprint(useContentAsIndexableText))
  8287  	return c
  8288  }
  8289  
  8290  // Fields allows partial responses to be retrieved. See
  8291  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  8292  // details.
  8293  func (c *FilesPatchCall) Fields(s ...googleapi.Field) *FilesPatchCall {
  8294  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  8295  	return c
  8296  }
  8297  
  8298  // Context sets the context to be used in this call's Do method.
  8299  func (c *FilesPatchCall) Context(ctx context.Context) *FilesPatchCall {
  8300  	c.ctx_ = ctx
  8301  	return c
  8302  }
  8303  
  8304  // Header returns a http.Header that can be modified by the caller to add
  8305  // headers to the request.
  8306  func (c *FilesPatchCall) Header() http.Header {
  8307  	if c.header_ == nil {
  8308  		c.header_ = make(http.Header)
  8309  	}
  8310  	return c.header_
  8311  }
  8312  
  8313  func (c *FilesPatchCall) doRequest(alt string) (*http.Response, error) {
  8314  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
  8315  	var body io.Reader = nil
  8316  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.file)
  8317  	if err != nil {
  8318  		return nil, err
  8319  	}
  8320  	c.urlParams_.Set("alt", alt)
  8321  	c.urlParams_.Set("prettyPrint", "false")
  8322  	urls := googleapi.ResolveRelative(c.s.BasePath, "files/{fileId}")
  8323  	urls += "?" + c.urlParams_.Encode()
  8324  	req, err := http.NewRequest("PATCH", urls, body)
  8325  	if err != nil {
  8326  		return nil, err
  8327  	}
  8328  	req.Header = reqHeaders
  8329  	googleapi.Expand(req.URL, map[string]string{
  8330  		"fileId": c.fileId,
  8331  	})
  8332  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  8333  }
  8334  
  8335  // Do executes the "drive.files.patch" call.
  8336  // Any non-2xx status code is an error. Response headers are in either
  8337  // *File.ServerResponse.Header or (if a response was returned at all) in
  8338  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  8339  // whether the returned error was because http.StatusNotModified was returned.
  8340  func (c *FilesPatchCall) Do(opts ...googleapi.CallOption) (*File, error) {
  8341  	gensupport.SetOptions(c.urlParams_, opts...)
  8342  	res, err := c.doRequest("json")
  8343  	if res != nil && res.StatusCode == http.StatusNotModified {
  8344  		if res.Body != nil {
  8345  			res.Body.Close()
  8346  		}
  8347  		return nil, gensupport.WrapError(&googleapi.Error{
  8348  			Code:   res.StatusCode,
  8349  			Header: res.Header,
  8350  		})
  8351  	}
  8352  	if err != nil {
  8353  		return nil, err
  8354  	}
  8355  	defer googleapi.CloseBody(res)
  8356  	if err := googleapi.CheckResponse(res); err != nil {
  8357  		return nil, gensupport.WrapError(err)
  8358  	}
  8359  	ret := &File{
  8360  		ServerResponse: googleapi.ServerResponse{
  8361  			Header:         res.Header,
  8362  			HTTPStatusCode: res.StatusCode,
  8363  		},
  8364  	}
  8365  	target := &ret
  8366  	if err := gensupport.DecodeResponse(target, res); err != nil {
  8367  		return nil, err
  8368  	}
  8369  	return ret, nil
  8370  }
  8371  
  8372  type FilesTouchCall struct {
  8373  	s          *Service
  8374  	fileId     string
  8375  	urlParams_ gensupport.URLParams
  8376  	ctx_       context.Context
  8377  	header_    http.Header
  8378  }
  8379  
  8380  // Touch: Set the file's updated time to the current server time.
  8381  //
  8382  // - fileId: The ID of the file to update.
  8383  func (r *FilesService) Touch(fileId string) *FilesTouchCall {
  8384  	c := &FilesTouchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  8385  	c.fileId = fileId
  8386  	return c
  8387  }
  8388  
  8389  // IncludeLabels sets the optional parameter "includeLabels": A comma-separated
  8390  // list of IDs of labels to include in the `labelInfo` part of the response.
  8391  func (c *FilesTouchCall) IncludeLabels(includeLabels string) *FilesTouchCall {
  8392  	c.urlParams_.Set("includeLabels", includeLabels)
  8393  	return c
  8394  }
  8395  
  8396  // IncludePermissionsForView sets the optional parameter
  8397  // "includePermissionsForView": Specifies which additional view's permissions
  8398  // to include in the response. Only `published` is supported.
  8399  func (c *FilesTouchCall) IncludePermissionsForView(includePermissionsForView string) *FilesTouchCall {
  8400  	c.urlParams_.Set("includePermissionsForView", includePermissionsForView)
  8401  	return c
  8402  }
  8403  
  8404  // SupportsAllDrives sets the optional parameter "supportsAllDrives": Whether
  8405  // the requesting application supports both My Drives and shared drives.
  8406  func (c *FilesTouchCall) SupportsAllDrives(supportsAllDrives bool) *FilesTouchCall {
  8407  	c.urlParams_.Set("supportsAllDrives", fmt.Sprint(supportsAllDrives))
  8408  	return c
  8409  }
  8410  
  8411  // SupportsTeamDrives sets the optional parameter "supportsTeamDrives":
  8412  // Deprecated: Use `supportsAllDrives` instead.
  8413  func (c *FilesTouchCall) SupportsTeamDrives(supportsTeamDrives bool) *FilesTouchCall {
  8414  	c.urlParams_.Set("supportsTeamDrives", fmt.Sprint(supportsTeamDrives))
  8415  	return c
  8416  }
  8417  
  8418  // Fields allows partial responses to be retrieved. See
  8419  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  8420  // details.
  8421  func (c *FilesTouchCall) Fields(s ...googleapi.Field) *FilesTouchCall {
  8422  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  8423  	return c
  8424  }
  8425  
  8426  // Context sets the context to be used in this call's Do method.
  8427  func (c *FilesTouchCall) Context(ctx context.Context) *FilesTouchCall {
  8428  	c.ctx_ = ctx
  8429  	return c
  8430  }
  8431  
  8432  // Header returns a http.Header that can be modified by the caller to add
  8433  // headers to the request.
  8434  func (c *FilesTouchCall) Header() http.Header {
  8435  	if c.header_ == nil {
  8436  		c.header_ = make(http.Header)
  8437  	}
  8438  	return c.header_
  8439  }
  8440  
  8441  func (c *FilesTouchCall) doRequest(alt string) (*http.Response, error) {
  8442  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  8443  	var body io.Reader = nil
  8444  	c.urlParams_.Set("alt", alt)
  8445  	c.urlParams_.Set("prettyPrint", "false")
  8446  	urls := googleapi.ResolveRelative(c.s.BasePath, "files/{fileId}/touch")
  8447  	urls += "?" + c.urlParams_.Encode()
  8448  	req, err := http.NewRequest("POST", urls, body)
  8449  	if err != nil {
  8450  		return nil, err
  8451  	}
  8452  	req.Header = reqHeaders
  8453  	googleapi.Expand(req.URL, map[string]string{
  8454  		"fileId": c.fileId,
  8455  	})
  8456  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  8457  }
  8458  
  8459  // Do executes the "drive.files.touch" call.
  8460  // Any non-2xx status code is an error. Response headers are in either
  8461  // *File.ServerResponse.Header or (if a response was returned at all) in
  8462  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  8463  // whether the returned error was because http.StatusNotModified was returned.
  8464  func (c *FilesTouchCall) Do(opts ...googleapi.CallOption) (*File, error) {
  8465  	gensupport.SetOptions(c.urlParams_, opts...)
  8466  	res, err := c.doRequest("json")
  8467  	if res != nil && res.StatusCode == http.StatusNotModified {
  8468  		if res.Body != nil {
  8469  			res.Body.Close()
  8470  		}
  8471  		return nil, gensupport.WrapError(&googleapi.Error{
  8472  			Code:   res.StatusCode,
  8473  			Header: res.Header,
  8474  		})
  8475  	}
  8476  	if err != nil {
  8477  		return nil, err
  8478  	}
  8479  	defer googleapi.CloseBody(res)
  8480  	if err := googleapi.CheckResponse(res); err != nil {
  8481  		return nil, gensupport.WrapError(err)
  8482  	}
  8483  	ret := &File{
  8484  		ServerResponse: googleapi.ServerResponse{
  8485  			Header:         res.Header,
  8486  			HTTPStatusCode: res.StatusCode,
  8487  		},
  8488  	}
  8489  	target := &ret
  8490  	if err := gensupport.DecodeResponse(target, res); err != nil {
  8491  		return nil, err
  8492  	}
  8493  	return ret, nil
  8494  }
  8495  
  8496  type FilesTrashCall struct {
  8497  	s          *Service
  8498  	fileId     string
  8499  	urlParams_ gensupport.URLParams
  8500  	ctx_       context.Context
  8501  	header_    http.Header
  8502  }
  8503  
  8504  // Trash: Moves a file to the trash. The currently authenticated user must own
  8505  // the file or be at least a `fileOrganizer` on the parent for shared drive
  8506  // files.
  8507  //
  8508  // - fileId: The ID of the file to trash.
  8509  func (r *FilesService) Trash(fileId string) *FilesTrashCall {
  8510  	c := &FilesTrashCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  8511  	c.fileId = fileId
  8512  	return c
  8513  }
  8514  
  8515  // IncludeLabels sets the optional parameter "includeLabels": A comma-separated
  8516  // list of IDs of labels to include in the `labelInfo` part of the response.
  8517  func (c *FilesTrashCall) IncludeLabels(includeLabels string) *FilesTrashCall {
  8518  	c.urlParams_.Set("includeLabels", includeLabels)
  8519  	return c
  8520  }
  8521  
  8522  // IncludePermissionsForView sets the optional parameter
  8523  // "includePermissionsForView": Specifies which additional view's permissions
  8524  // to include in the response. Only `published` is supported.
  8525  func (c *FilesTrashCall) IncludePermissionsForView(includePermissionsForView string) *FilesTrashCall {
  8526  	c.urlParams_.Set("includePermissionsForView", includePermissionsForView)
  8527  	return c
  8528  }
  8529  
  8530  // SupportsAllDrives sets the optional parameter "supportsAllDrives": Whether
  8531  // the requesting application supports both My Drives and shared drives.
  8532  func (c *FilesTrashCall) SupportsAllDrives(supportsAllDrives bool) *FilesTrashCall {
  8533  	c.urlParams_.Set("supportsAllDrives", fmt.Sprint(supportsAllDrives))
  8534  	return c
  8535  }
  8536  
  8537  // SupportsTeamDrives sets the optional parameter "supportsTeamDrives":
  8538  // Deprecated: Use `supportsAllDrives` instead.
  8539  func (c *FilesTrashCall) SupportsTeamDrives(supportsTeamDrives bool) *FilesTrashCall {
  8540  	c.urlParams_.Set("supportsTeamDrives", fmt.Sprint(supportsTeamDrives))
  8541  	return c
  8542  }
  8543  
  8544  // Fields allows partial responses to be retrieved. See
  8545  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  8546  // details.
  8547  func (c *FilesTrashCall) Fields(s ...googleapi.Field) *FilesTrashCall {
  8548  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  8549  	return c
  8550  }
  8551  
  8552  // Context sets the context to be used in this call's Do method.
  8553  func (c *FilesTrashCall) Context(ctx context.Context) *FilesTrashCall {
  8554  	c.ctx_ = ctx
  8555  	return c
  8556  }
  8557  
  8558  // Header returns a http.Header that can be modified by the caller to add
  8559  // headers to the request.
  8560  func (c *FilesTrashCall) Header() http.Header {
  8561  	if c.header_ == nil {
  8562  		c.header_ = make(http.Header)
  8563  	}
  8564  	return c.header_
  8565  }
  8566  
  8567  func (c *FilesTrashCall) doRequest(alt string) (*http.Response, error) {
  8568  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  8569  	var body io.Reader = nil
  8570  	c.urlParams_.Set("alt", alt)
  8571  	c.urlParams_.Set("prettyPrint", "false")
  8572  	urls := googleapi.ResolveRelative(c.s.BasePath, "files/{fileId}/trash")
  8573  	urls += "?" + c.urlParams_.Encode()
  8574  	req, err := http.NewRequest("POST", urls, body)
  8575  	if err != nil {
  8576  		return nil, err
  8577  	}
  8578  	req.Header = reqHeaders
  8579  	googleapi.Expand(req.URL, map[string]string{
  8580  		"fileId": c.fileId,
  8581  	})
  8582  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  8583  }
  8584  
  8585  // Do executes the "drive.files.trash" call.
  8586  // Any non-2xx status code is an error. Response headers are in either
  8587  // *File.ServerResponse.Header or (if a response was returned at all) in
  8588  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  8589  // whether the returned error was because http.StatusNotModified was returned.
  8590  func (c *FilesTrashCall) Do(opts ...googleapi.CallOption) (*File, error) {
  8591  	gensupport.SetOptions(c.urlParams_, opts...)
  8592  	res, err := c.doRequest("json")
  8593  	if res != nil && res.StatusCode == http.StatusNotModified {
  8594  		if res.Body != nil {
  8595  			res.Body.Close()
  8596  		}
  8597  		return nil, gensupport.WrapError(&googleapi.Error{
  8598  			Code:   res.StatusCode,
  8599  			Header: res.Header,
  8600  		})
  8601  	}
  8602  	if err != nil {
  8603  		return nil, err
  8604  	}
  8605  	defer googleapi.CloseBody(res)
  8606  	if err := googleapi.CheckResponse(res); err != nil {
  8607  		return nil, gensupport.WrapError(err)
  8608  	}
  8609  	ret := &File{
  8610  		ServerResponse: googleapi.ServerResponse{
  8611  			Header:         res.Header,
  8612  			HTTPStatusCode: res.StatusCode,
  8613  		},
  8614  	}
  8615  	target := &ret
  8616  	if err := gensupport.DecodeResponse(target, res); err != nil {
  8617  		return nil, err
  8618  	}
  8619  	return ret, nil
  8620  }
  8621  
  8622  type FilesUntrashCall struct {
  8623  	s          *Service
  8624  	fileId     string
  8625  	urlParams_ gensupport.URLParams
  8626  	ctx_       context.Context
  8627  	header_    http.Header
  8628  }
  8629  
  8630  // Untrash: Restores a file from the trash. The currently authenticated user
  8631  // must own the file or be at least a `fileOrganizer` on the parent for shared
  8632  // drive files.
  8633  //
  8634  // - fileId: The ID of the file to untrash.
  8635  func (r *FilesService) Untrash(fileId string) *FilesUntrashCall {
  8636  	c := &FilesUntrashCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  8637  	c.fileId = fileId
  8638  	return c
  8639  }
  8640  
  8641  // IncludeLabels sets the optional parameter "includeLabels": A comma-separated
  8642  // list of IDs of labels to include in the `labelInfo` part of the response.
  8643  func (c *FilesUntrashCall) IncludeLabels(includeLabels string) *FilesUntrashCall {
  8644  	c.urlParams_.Set("includeLabels", includeLabels)
  8645  	return c
  8646  }
  8647  
  8648  // IncludePermissionsForView sets the optional parameter
  8649  // "includePermissionsForView": Specifies which additional view's permissions
  8650  // to include in the response. Only `published` is supported.
  8651  func (c *FilesUntrashCall) IncludePermissionsForView(includePermissionsForView string) *FilesUntrashCall {
  8652  	c.urlParams_.Set("includePermissionsForView", includePermissionsForView)
  8653  	return c
  8654  }
  8655  
  8656  // SupportsAllDrives sets the optional parameter "supportsAllDrives": Whether
  8657  // the requesting application supports both My Drives and shared drives.
  8658  func (c *FilesUntrashCall) SupportsAllDrives(supportsAllDrives bool) *FilesUntrashCall {
  8659  	c.urlParams_.Set("supportsAllDrives", fmt.Sprint(supportsAllDrives))
  8660  	return c
  8661  }
  8662  
  8663  // SupportsTeamDrives sets the optional parameter "supportsTeamDrives":
  8664  // Deprecated: Use `supportsAllDrives` instead.
  8665  func (c *FilesUntrashCall) SupportsTeamDrives(supportsTeamDrives bool) *FilesUntrashCall {
  8666  	c.urlParams_.Set("supportsTeamDrives", fmt.Sprint(supportsTeamDrives))
  8667  	return c
  8668  }
  8669  
  8670  // Fields allows partial responses to be retrieved. See
  8671  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  8672  // details.
  8673  func (c *FilesUntrashCall) Fields(s ...googleapi.Field) *FilesUntrashCall {
  8674  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  8675  	return c
  8676  }
  8677  
  8678  // Context sets the context to be used in this call's Do method.
  8679  func (c *FilesUntrashCall) Context(ctx context.Context) *FilesUntrashCall {
  8680  	c.ctx_ = ctx
  8681  	return c
  8682  }
  8683  
  8684  // Header returns a http.Header that can be modified by the caller to add
  8685  // headers to the request.
  8686  func (c *FilesUntrashCall) Header() http.Header {
  8687  	if c.header_ == nil {
  8688  		c.header_ = make(http.Header)
  8689  	}
  8690  	return c.header_
  8691  }
  8692  
  8693  func (c *FilesUntrashCall) doRequest(alt string) (*http.Response, error) {
  8694  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  8695  	var body io.Reader = nil
  8696  	c.urlParams_.Set("alt", alt)
  8697  	c.urlParams_.Set("prettyPrint", "false")
  8698  	urls := googleapi.ResolveRelative(c.s.BasePath, "files/{fileId}/untrash")
  8699  	urls += "?" + c.urlParams_.Encode()
  8700  	req, err := http.NewRequest("POST", urls, body)
  8701  	if err != nil {
  8702  		return nil, err
  8703  	}
  8704  	req.Header = reqHeaders
  8705  	googleapi.Expand(req.URL, map[string]string{
  8706  		"fileId": c.fileId,
  8707  	})
  8708  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  8709  }
  8710  
  8711  // Do executes the "drive.files.untrash" call.
  8712  // Any non-2xx status code is an error. Response headers are in either
  8713  // *File.ServerResponse.Header or (if a response was returned at all) in
  8714  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  8715  // whether the returned error was because http.StatusNotModified was returned.
  8716  func (c *FilesUntrashCall) Do(opts ...googleapi.CallOption) (*File, error) {
  8717  	gensupport.SetOptions(c.urlParams_, opts...)
  8718  	res, err := c.doRequest("json")
  8719  	if res != nil && res.StatusCode == http.StatusNotModified {
  8720  		if res.Body != nil {
  8721  			res.Body.Close()
  8722  		}
  8723  		return nil, gensupport.WrapError(&googleapi.Error{
  8724  			Code:   res.StatusCode,
  8725  			Header: res.Header,
  8726  		})
  8727  	}
  8728  	if err != nil {
  8729  		return nil, err
  8730  	}
  8731  	defer googleapi.CloseBody(res)
  8732  	if err := googleapi.CheckResponse(res); err != nil {
  8733  		return nil, gensupport.WrapError(err)
  8734  	}
  8735  	ret := &File{
  8736  		ServerResponse: googleapi.ServerResponse{
  8737  			Header:         res.Header,
  8738  			HTTPStatusCode: res.StatusCode,
  8739  		},
  8740  	}
  8741  	target := &ret
  8742  	if err := gensupport.DecodeResponse(target, res); err != nil {
  8743  		return nil, err
  8744  	}
  8745  	return ret, nil
  8746  }
  8747  
  8748  type FilesUpdateCall struct {
  8749  	s          *Service
  8750  	fileId     string
  8751  	file       *File
  8752  	urlParams_ gensupport.URLParams
  8753  	mediaInfo_ *gensupport.MediaInfo
  8754  	ctx_       context.Context
  8755  	header_    http.Header
  8756  }
  8757  
  8758  // Update:  Updates a file's metadata and/or content. When calling this method,
  8759  // only populate fields in the request that you want to modify. When updating
  8760  // fields, some fields might be changed automatically, such as `modifiedDate`.
  8761  // This method supports patch semantics. This method supports an */upload* URI
  8762  // and accepts uploaded media with the following characteristics: - *Maximum
  8763  // file size:* 5,120 GB - *Accepted Media MIME types:*`*/*` Note: Specify a
  8764  // valid MIME type, rather than the literal `*/*` value. The literal `*/*` is
  8765  // only used to indicate that any valid MIME type can be uploaded. For more
  8766  // information on uploading files, see Upload file data
  8767  // (/drive/api/guides/manage-uploads).
  8768  //
  8769  // - fileId: The ID of the file to update.
  8770  func (r *FilesService) Update(fileId string, file *File) *FilesUpdateCall {
  8771  	c := &FilesUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  8772  	c.fileId = fileId
  8773  	c.file = file
  8774  	return c
  8775  }
  8776  
  8777  // AddParents sets the optional parameter "addParents": Comma-separated list of
  8778  // parent IDs to add.
  8779  func (c *FilesUpdateCall) AddParents(addParents string) *FilesUpdateCall {
  8780  	c.urlParams_.Set("addParents", addParents)
  8781  	return c
  8782  }
  8783  
  8784  // Convert sets the optional parameter "convert": Deprecated: This parameter
  8785  // has no function.
  8786  func (c *FilesUpdateCall) Convert(convert bool) *FilesUpdateCall {
  8787  	c.urlParams_.Set("convert", fmt.Sprint(convert))
  8788  	return c
  8789  }
  8790  
  8791  // EnforceSingleParent sets the optional parameter "enforceSingleParent":
  8792  // Deprecated: Adding files to multiple folders is no longer supported. Use
  8793  // `shortcuts` instead.
  8794  func (c *FilesUpdateCall) EnforceSingleParent(enforceSingleParent bool) *FilesUpdateCall {
  8795  	c.urlParams_.Set("enforceSingleParent", fmt.Sprint(enforceSingleParent))
  8796  	return c
  8797  }
  8798  
  8799  // IncludeLabels sets the optional parameter "includeLabels": A comma-separated
  8800  // list of IDs of labels to include in the `labelInfo` part of the response.
  8801  func (c *FilesUpdateCall) IncludeLabels(includeLabels string) *FilesUpdateCall {
  8802  	c.urlParams_.Set("includeLabels", includeLabels)
  8803  	return c
  8804  }
  8805  
  8806  // IncludePermissionsForView sets the optional parameter
  8807  // "includePermissionsForView": Specifies which additional view's permissions
  8808  // to include in the response. Only `published` is supported.
  8809  func (c *FilesUpdateCall) IncludePermissionsForView(includePermissionsForView string) *FilesUpdateCall {
  8810  	c.urlParams_.Set("includePermissionsForView", includePermissionsForView)
  8811  	return c
  8812  }
  8813  
  8814  // ModifiedDateBehavior sets the optional parameter "modifiedDateBehavior":
  8815  // Determines the behavior in which `modifiedDate` is updated. This overrides
  8816  // `setModifiedDate`.
  8817  //
  8818  // Possible values:
  8819  //
  8820  //	"fromBody" - Set `modifiedDate` to the value provided in the body of the
  8821  //
  8822  // request. No change if no value was provided.
  8823  //
  8824  //	"fromBodyIfNeeded" - Set `modifiedDate` to the value provided in the body
  8825  //
  8826  // of the request depending on other contents of the update.
  8827  //
  8828  //	"fromBodyOrNow" - Set modifiedDate to the value provided in the body of
  8829  //
  8830  // the request, or to the current time if no value was provided.
  8831  //
  8832  //	"noChange" - Maintain the previous value of `modifiedDate`.
  8833  //	"now" - Set `modifiedDate` to the current time.
  8834  //	"nowIfNeeded" - Set `modifiedDate` to the current time depending on
  8835  //
  8836  // contents of the update.
  8837  func (c *FilesUpdateCall) ModifiedDateBehavior(modifiedDateBehavior string) *FilesUpdateCall {
  8838  	c.urlParams_.Set("modifiedDateBehavior", modifiedDateBehavior)
  8839  	return c
  8840  }
  8841  
  8842  // NewRevision sets the optional parameter "newRevision": Whether a blob upload
  8843  // should create a new revision. If false, the blob data in the current head
  8844  // revision is replaced. If true or not set, a new blob is created as head
  8845  // revision, and previous unpinned revisions are preserved for a short period
  8846  // of time. Pinned revisions are stored indefinitely, using additional storage
  8847  // quota, up to a maximum of 200 revisions. For details on how revisions are
  8848  // retained, see the Drive Help Center
  8849  // (https://support.google.com/drive/answer/2409045).
  8850  func (c *FilesUpdateCall) NewRevision(newRevision bool) *FilesUpdateCall {
  8851  	c.urlParams_.Set("newRevision", fmt.Sprint(newRevision))
  8852  	return c
  8853  }
  8854  
  8855  // Ocr sets the optional parameter "ocr": Whether to attempt OCR on .jpg, .png,
  8856  // .gif, or .pdf uploads.
  8857  func (c *FilesUpdateCall) Ocr(ocr bool) *FilesUpdateCall {
  8858  	c.urlParams_.Set("ocr", fmt.Sprint(ocr))
  8859  	return c
  8860  }
  8861  
  8862  // OcrLanguage sets the optional parameter "ocrLanguage": If ocr is true, hints
  8863  // at the language to use. Valid values are BCP 47 codes.
  8864  func (c *FilesUpdateCall) OcrLanguage(ocrLanguage string) *FilesUpdateCall {
  8865  	c.urlParams_.Set("ocrLanguage", ocrLanguage)
  8866  	return c
  8867  }
  8868  
  8869  // Pinned sets the optional parameter "pinned": Whether to pin the new
  8870  // revision. A file can have a maximum of 200 pinned revisions.
  8871  func (c *FilesUpdateCall) Pinned(pinned bool) *FilesUpdateCall {
  8872  	c.urlParams_.Set("pinned", fmt.Sprint(pinned))
  8873  	return c
  8874  }
  8875  
  8876  // RemoveParents sets the optional parameter "removeParents": Comma-separated
  8877  // list of parent IDs to remove.
  8878  func (c *FilesUpdateCall) RemoveParents(removeParents string) *FilesUpdateCall {
  8879  	c.urlParams_.Set("removeParents", removeParents)
  8880  	return c
  8881  }
  8882  
  8883  // SetModifiedDate sets the optional parameter "setModifiedDate": Whether to
  8884  // set the modified date using the value supplied in the request body. Setting
  8885  // this field to `true` is equivalent to `modifiedDateBehavior=fromBodyOrNow`,
  8886  // and `false` is equivalent to `modifiedDateBehavior=now`. To prevent any
  8887  // changes to the modified date set `modifiedDateBehavior=noChange`.
  8888  func (c *FilesUpdateCall) SetModifiedDate(setModifiedDate bool) *FilesUpdateCall {
  8889  	c.urlParams_.Set("setModifiedDate", fmt.Sprint(setModifiedDate))
  8890  	return c
  8891  }
  8892  
  8893  // SupportsAllDrives sets the optional parameter "supportsAllDrives": Whether
  8894  // the requesting application supports both My Drives and shared drives.
  8895  func (c *FilesUpdateCall) SupportsAllDrives(supportsAllDrives bool) *FilesUpdateCall {
  8896  	c.urlParams_.Set("supportsAllDrives", fmt.Sprint(supportsAllDrives))
  8897  	return c
  8898  }
  8899  
  8900  // SupportsTeamDrives sets the optional parameter "supportsTeamDrives":
  8901  // Deprecated: Use `supportsAllDrives` instead.
  8902  func (c *FilesUpdateCall) SupportsTeamDrives(supportsTeamDrives bool) *FilesUpdateCall {
  8903  	c.urlParams_.Set("supportsTeamDrives", fmt.Sprint(supportsTeamDrives))
  8904  	return c
  8905  }
  8906  
  8907  // TimedTextLanguage sets the optional parameter "timedTextLanguage": The
  8908  // language of the timed text.
  8909  func (c *FilesUpdateCall) TimedTextLanguage(timedTextLanguage string) *FilesUpdateCall {
  8910  	c.urlParams_.Set("timedTextLanguage", timedTextLanguage)
  8911  	return c
  8912  }
  8913  
  8914  // TimedTextTrackName sets the optional parameter "timedTextTrackName": The
  8915  // timed text track name.
  8916  func (c *FilesUpdateCall) TimedTextTrackName(timedTextTrackName string) *FilesUpdateCall {
  8917  	c.urlParams_.Set("timedTextTrackName", timedTextTrackName)
  8918  	return c
  8919  }
  8920  
  8921  // UpdateViewedDate sets the optional parameter "updateViewedDate": Whether to
  8922  // update the view date after successfully updating the file.
  8923  func (c *FilesUpdateCall) UpdateViewedDate(updateViewedDate bool) *FilesUpdateCall {
  8924  	c.urlParams_.Set("updateViewedDate", fmt.Sprint(updateViewedDate))
  8925  	return c
  8926  }
  8927  
  8928  // UseContentAsIndexableText sets the optional parameter
  8929  // "useContentAsIndexableText": Whether to use the content as indexable text.
  8930  func (c *FilesUpdateCall) UseContentAsIndexableText(useContentAsIndexableText bool) *FilesUpdateCall {
  8931  	c.urlParams_.Set("useContentAsIndexableText", fmt.Sprint(useContentAsIndexableText))
  8932  	return c
  8933  }
  8934  
  8935  // Media specifies the media to upload in one or more chunks. The chunk size
  8936  // may be controlled by supplying a MediaOption generated by
  8937  // googleapi.ChunkSize. The chunk size defaults to
  8938  // googleapi.DefaultUploadChunkSize.The Content-Type header used in the upload
  8939  // request will be determined by sniffing the contents of r, unless a
  8940  // MediaOption generated by googleapi.ContentType is supplied.
  8941  // At most one of Media and ResumableMedia may be set.
  8942  func (c *FilesUpdateCall) Media(r io.Reader, options ...googleapi.MediaOption) *FilesUpdateCall {
  8943  	c.mediaInfo_ = gensupport.NewInfoFromMedia(r, options)
  8944  	return c
  8945  }
  8946  
  8947  // ResumableMedia specifies the media to upload in chunks and can be canceled
  8948  // with ctx.
  8949  //
  8950  // Deprecated: use Media instead.
  8951  //
  8952  // At most one of Media and ResumableMedia may be set. mediaType identifies the
  8953  // MIME media type of the upload, such as "image/png". If mediaType is "", it
  8954  // will be auto-detected. The provided ctx will supersede any context
  8955  // previously provided to the Context method.
  8956  func (c *FilesUpdateCall) ResumableMedia(ctx context.Context, r io.ReaderAt, size int64, mediaType string) *FilesUpdateCall {
  8957  	c.ctx_ = ctx
  8958  	c.mediaInfo_ = gensupport.NewInfoFromResumableMedia(r, size, mediaType)
  8959  	return c
  8960  }
  8961  
  8962  // ProgressUpdater provides a callback function that will be called after every
  8963  // chunk. It should be a low-latency function in order to not slow down the
  8964  // upload operation. This should only be called when using ResumableMedia (as
  8965  // opposed to Media).
  8966  func (c *FilesUpdateCall) ProgressUpdater(pu googleapi.ProgressUpdater) *FilesUpdateCall {
  8967  	c.mediaInfo_.SetProgressUpdater(pu)
  8968  	return c
  8969  }
  8970  
  8971  // Fields allows partial responses to be retrieved. See
  8972  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  8973  // details.
  8974  func (c *FilesUpdateCall) Fields(s ...googleapi.Field) *FilesUpdateCall {
  8975  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  8976  	return c
  8977  }
  8978  
  8979  // Context sets the context to be used in this call's Do method.
  8980  // This context will supersede any context previously provided to the
  8981  // ResumableMedia method.
  8982  func (c *FilesUpdateCall) Context(ctx context.Context) *FilesUpdateCall {
  8983  	c.ctx_ = ctx
  8984  	return c
  8985  }
  8986  
  8987  // Header returns a http.Header that can be modified by the caller to add
  8988  // headers to the request.
  8989  func (c *FilesUpdateCall) Header() http.Header {
  8990  	if c.header_ == nil {
  8991  		c.header_ = make(http.Header)
  8992  	}
  8993  	return c.header_
  8994  }
  8995  
  8996  func (c *FilesUpdateCall) doRequest(alt string) (*http.Response, error) {
  8997  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
  8998  	var body io.Reader = nil
  8999  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.file)
  9000  	if err != nil {
  9001  		return nil, err
  9002  	}
  9003  	c.urlParams_.Set("alt", alt)
  9004  	c.urlParams_.Set("prettyPrint", "false")
  9005  	urls := googleapi.ResolveRelative(c.s.BasePath, "files/{fileId}")
  9006  	if c.mediaInfo_ != nil {
  9007  		urls = googleapi.ResolveRelative(c.s.BasePath, "/upload/drive/v2/files/{fileId}")
  9008  		c.urlParams_.Set("uploadType", c.mediaInfo_.UploadType())
  9009  	}
  9010  	if body == nil {
  9011  		body = new(bytes.Buffer)
  9012  		reqHeaders.Set("Content-Type", "application/json")
  9013  	}
  9014  	body, getBody, cleanup := c.mediaInfo_.UploadRequest(reqHeaders, body)
  9015  	defer cleanup()
  9016  	urls += "?" + c.urlParams_.Encode()
  9017  	req, err := http.NewRequest("PUT", urls, body)
  9018  	if err != nil {
  9019  		return nil, err
  9020  	}
  9021  	req.Header = reqHeaders
  9022  	req.GetBody = getBody
  9023  	googleapi.Expand(req.URL, map[string]string{
  9024  		"fileId": c.fileId,
  9025  	})
  9026  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  9027  }
  9028  
  9029  // Do executes the "drive.files.update" call.
  9030  // Any non-2xx status code is an error. Response headers are in either
  9031  // *File.ServerResponse.Header or (if a response was returned at all) in
  9032  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  9033  // whether the returned error was because http.StatusNotModified was returned.
  9034  func (c *FilesUpdateCall) Do(opts ...googleapi.CallOption) (*File, error) {
  9035  	gensupport.SetOptions(c.urlParams_, opts...)
  9036  	res, err := c.doRequest("json")
  9037  	if res != nil && res.StatusCode == http.StatusNotModified {
  9038  		if res.Body != nil {
  9039  			res.Body.Close()
  9040  		}
  9041  		return nil, gensupport.WrapError(&googleapi.Error{
  9042  			Code:   res.StatusCode,
  9043  			Header: res.Header,
  9044  		})
  9045  	}
  9046  	if err != nil {
  9047  		return nil, err
  9048  	}
  9049  	defer googleapi.CloseBody(res)
  9050  	if err := googleapi.CheckResponse(res); err != nil {
  9051  		return nil, gensupport.WrapError(err)
  9052  	}
  9053  	rx := c.mediaInfo_.ResumableUpload(res.Header.Get("Location"))
  9054  	if rx != nil {
  9055  		rx.Client = c.s.client
  9056  		rx.UserAgent = c.s.userAgent()
  9057  		ctx := c.ctx_
  9058  		if ctx == nil {
  9059  			ctx = context.TODO()
  9060  		}
  9061  		res, err = rx.Upload(ctx)
  9062  		if err != nil {
  9063  			return nil, err
  9064  		}
  9065  		defer res.Body.Close()
  9066  		if err := googleapi.CheckResponse(res); err != nil {
  9067  			return nil, gensupport.WrapError(err)
  9068  		}
  9069  	}
  9070  	ret := &File{
  9071  		ServerResponse: googleapi.ServerResponse{
  9072  			Header:         res.Header,
  9073  			HTTPStatusCode: res.StatusCode,
  9074  		},
  9075  	}
  9076  	target := &ret
  9077  	if err := gensupport.DecodeResponse(target, res); err != nil {
  9078  		return nil, err
  9079  	}
  9080  	return ret, nil
  9081  }
  9082  
  9083  type FilesWatchCall struct {
  9084  	s          *Service
  9085  	fileId     string
  9086  	channel    *Channel
  9087  	urlParams_ gensupport.URLParams
  9088  	ctx_       context.Context
  9089  	header_    http.Header
  9090  }
  9091  
  9092  // Watch: Subscribes to changes to a file.
  9093  //
  9094  // - fileId: The ID for the file in question.
  9095  func (r *FilesService) Watch(fileId string, channel *Channel) *FilesWatchCall {
  9096  	c := &FilesWatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  9097  	c.fileId = fileId
  9098  	c.channel = channel
  9099  	return c
  9100  }
  9101  
  9102  // AcknowledgeAbuse sets the optional parameter "acknowledgeAbuse": Whether the
  9103  // user is acknowledging the risk of downloading known malware or other abusive
  9104  // files.
  9105  func (c *FilesWatchCall) AcknowledgeAbuse(acknowledgeAbuse bool) *FilesWatchCall {
  9106  	c.urlParams_.Set("acknowledgeAbuse", fmt.Sprint(acknowledgeAbuse))
  9107  	return c
  9108  }
  9109  
  9110  // IncludeLabels sets the optional parameter "includeLabels": A comma-separated
  9111  // list of IDs of labels to include in the `labelInfo` part of the response.
  9112  func (c *FilesWatchCall) IncludeLabels(includeLabels string) *FilesWatchCall {
  9113  	c.urlParams_.Set("includeLabels", includeLabels)
  9114  	return c
  9115  }
  9116  
  9117  // IncludePermissionsForView sets the optional parameter
  9118  // "includePermissionsForView": Specifies which additional view's permissions
  9119  // to include in the response. Only `published` is supported.
  9120  func (c *FilesWatchCall) IncludePermissionsForView(includePermissionsForView string) *FilesWatchCall {
  9121  	c.urlParams_.Set("includePermissionsForView", includePermissionsForView)
  9122  	return c
  9123  }
  9124  
  9125  // Projection sets the optional parameter "projection": Deprecated: This
  9126  // parameter has no function.
  9127  //
  9128  // Possible values:
  9129  //
  9130  //	"BASIC" - Deprecated.
  9131  //	"FULL" - Deprecated.
  9132  func (c *FilesWatchCall) Projection(projection string) *FilesWatchCall {
  9133  	c.urlParams_.Set("projection", projection)
  9134  	return c
  9135  }
  9136  
  9137  // RevisionId sets the optional parameter "revisionId": Specifies the Revision
  9138  // ID that should be downloaded. Ignored unless alt=media is specified.
  9139  func (c *FilesWatchCall) RevisionId(revisionId string) *FilesWatchCall {
  9140  	c.urlParams_.Set("revisionId", revisionId)
  9141  	return c
  9142  }
  9143  
  9144  // SupportsAllDrives sets the optional parameter "supportsAllDrives": Whether
  9145  // the requesting application supports both My Drives and shared drives.
  9146  func (c *FilesWatchCall) SupportsAllDrives(supportsAllDrives bool) *FilesWatchCall {
  9147  	c.urlParams_.Set("supportsAllDrives", fmt.Sprint(supportsAllDrives))
  9148  	return c
  9149  }
  9150  
  9151  // SupportsTeamDrives sets the optional parameter "supportsTeamDrives":
  9152  // Deprecated: Use `supportsAllDrives` instead.
  9153  func (c *FilesWatchCall) SupportsTeamDrives(supportsTeamDrives bool) *FilesWatchCall {
  9154  	c.urlParams_.Set("supportsTeamDrives", fmt.Sprint(supportsTeamDrives))
  9155  	return c
  9156  }
  9157  
  9158  // UpdateViewedDate sets the optional parameter "updateViewedDate": Deprecated:
  9159  // Use files.update with modifiedDateBehavior=noChange, updateViewedDate=true
  9160  // and an empty request body.
  9161  func (c *FilesWatchCall) UpdateViewedDate(updateViewedDate bool) *FilesWatchCall {
  9162  	c.urlParams_.Set("updateViewedDate", fmt.Sprint(updateViewedDate))
  9163  	return c
  9164  }
  9165  
  9166  // Fields allows partial responses to be retrieved. See
  9167  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  9168  // details.
  9169  func (c *FilesWatchCall) Fields(s ...googleapi.Field) *FilesWatchCall {
  9170  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  9171  	return c
  9172  }
  9173  
  9174  // Context sets the context to be used in this call's Do method.
  9175  func (c *FilesWatchCall) Context(ctx context.Context) *FilesWatchCall {
  9176  	c.ctx_ = ctx
  9177  	return c
  9178  }
  9179  
  9180  // Header returns a http.Header that can be modified by the caller to add
  9181  // headers to the request.
  9182  func (c *FilesWatchCall) Header() http.Header {
  9183  	if c.header_ == nil {
  9184  		c.header_ = make(http.Header)
  9185  	}
  9186  	return c.header_
  9187  }
  9188  
  9189  func (c *FilesWatchCall) doRequest(alt string) (*http.Response, error) {
  9190  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
  9191  	var body io.Reader = nil
  9192  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.channel)
  9193  	if err != nil {
  9194  		return nil, err
  9195  	}
  9196  	c.urlParams_.Set("alt", alt)
  9197  	c.urlParams_.Set("prettyPrint", "false")
  9198  	urls := googleapi.ResolveRelative(c.s.BasePath, "files/{fileId}/watch")
  9199  	urls += "?" + c.urlParams_.Encode()
  9200  	req, err := http.NewRequest("POST", urls, body)
  9201  	if err != nil {
  9202  		return nil, err
  9203  	}
  9204  	req.Header = reqHeaders
  9205  	googleapi.Expand(req.URL, map[string]string{
  9206  		"fileId": c.fileId,
  9207  	})
  9208  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  9209  }
  9210  
  9211  // Do executes the "drive.files.watch" call.
  9212  // Any non-2xx status code is an error. Response headers are in either
  9213  // *Channel.ServerResponse.Header or (if a response was returned at all) in
  9214  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  9215  // whether the returned error was because http.StatusNotModified was returned.
  9216  func (c *FilesWatchCall) Do(opts ...googleapi.CallOption) (*Channel, error) {
  9217  	gensupport.SetOptions(c.urlParams_, opts...)
  9218  	res, err := c.doRequest("json")
  9219  	if res != nil && res.StatusCode == http.StatusNotModified {
  9220  		if res.Body != nil {
  9221  			res.Body.Close()
  9222  		}
  9223  		return nil, gensupport.WrapError(&googleapi.Error{
  9224  			Code:   res.StatusCode,
  9225  			Header: res.Header,
  9226  		})
  9227  	}
  9228  	if err != nil {
  9229  		return nil, err
  9230  	}
  9231  	defer googleapi.CloseBody(res)
  9232  	if err := googleapi.CheckResponse(res); err != nil {
  9233  		return nil, gensupport.WrapError(err)
  9234  	}
  9235  	ret := &Channel{
  9236  		ServerResponse: googleapi.ServerResponse{
  9237  			Header:         res.Header,
  9238  			HTTPStatusCode: res.StatusCode,
  9239  		},
  9240  	}
  9241  	target := &ret
  9242  	if err := gensupport.DecodeResponse(target, res); err != nil {
  9243  		return nil, err
  9244  	}
  9245  	return ret, nil
  9246  }
  9247  
  9248  type ParentsDeleteCall struct {
  9249  	s          *Service
  9250  	fileId     string
  9251  	parentId   string
  9252  	urlParams_ gensupport.URLParams
  9253  	ctx_       context.Context
  9254  	header_    http.Header
  9255  }
  9256  
  9257  // Delete: Removes a parent from a file.
  9258  //
  9259  // - fileId: The ID of the file.
  9260  // - parentId: The ID of the parent.
  9261  func (r *ParentsService) Delete(fileId string, parentId string) *ParentsDeleteCall {
  9262  	c := &ParentsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  9263  	c.fileId = fileId
  9264  	c.parentId = parentId
  9265  	return c
  9266  }
  9267  
  9268  // EnforceSingleParent sets the optional parameter "enforceSingleParent":
  9269  // Deprecated: If an item is not in a shared drive and its last parent is
  9270  // removed, the item is placed under its owner's root.
  9271  func (c *ParentsDeleteCall) EnforceSingleParent(enforceSingleParent bool) *ParentsDeleteCall {
  9272  	c.urlParams_.Set("enforceSingleParent", fmt.Sprint(enforceSingleParent))
  9273  	return c
  9274  }
  9275  
  9276  // Fields allows partial responses to be retrieved. See
  9277  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  9278  // details.
  9279  func (c *ParentsDeleteCall) Fields(s ...googleapi.Field) *ParentsDeleteCall {
  9280  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  9281  	return c
  9282  }
  9283  
  9284  // Context sets the context to be used in this call's Do method.
  9285  func (c *ParentsDeleteCall) Context(ctx context.Context) *ParentsDeleteCall {
  9286  	c.ctx_ = ctx
  9287  	return c
  9288  }
  9289  
  9290  // Header returns a http.Header that can be modified by the caller to add
  9291  // headers to the request.
  9292  func (c *ParentsDeleteCall) Header() http.Header {
  9293  	if c.header_ == nil {
  9294  		c.header_ = make(http.Header)
  9295  	}
  9296  	return c.header_
  9297  }
  9298  
  9299  func (c *ParentsDeleteCall) doRequest(alt string) (*http.Response, error) {
  9300  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  9301  	var body io.Reader = nil
  9302  	c.urlParams_.Set("alt", alt)
  9303  	c.urlParams_.Set("prettyPrint", "false")
  9304  	urls := googleapi.ResolveRelative(c.s.BasePath, "files/{fileId}/parents/{parentId}")
  9305  	urls += "?" + c.urlParams_.Encode()
  9306  	req, err := http.NewRequest("DELETE", urls, body)
  9307  	if err != nil {
  9308  		return nil, err
  9309  	}
  9310  	req.Header = reqHeaders
  9311  	googleapi.Expand(req.URL, map[string]string{
  9312  		"fileId":   c.fileId,
  9313  		"parentId": c.parentId,
  9314  	})
  9315  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  9316  }
  9317  
  9318  // Do executes the "drive.parents.delete" call.
  9319  func (c *ParentsDeleteCall) Do(opts ...googleapi.CallOption) error {
  9320  	gensupport.SetOptions(c.urlParams_, opts...)
  9321  	res, err := c.doRequest("json")
  9322  	if err != nil {
  9323  		return err
  9324  	}
  9325  	defer googleapi.CloseBody(res)
  9326  	if err := googleapi.CheckResponse(res); err != nil {
  9327  		return gensupport.WrapError(err)
  9328  	}
  9329  	return nil
  9330  }
  9331  
  9332  type ParentsGetCall struct {
  9333  	s            *Service
  9334  	fileId       string
  9335  	parentId     string
  9336  	urlParams_   gensupport.URLParams
  9337  	ifNoneMatch_ string
  9338  	ctx_         context.Context
  9339  	header_      http.Header
  9340  }
  9341  
  9342  // Get: Gets a specific parent reference.
  9343  //
  9344  // - fileId: The ID of the file.
  9345  // - parentId: The ID of the parent.
  9346  func (r *ParentsService) Get(fileId string, parentId string) *ParentsGetCall {
  9347  	c := &ParentsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  9348  	c.fileId = fileId
  9349  	c.parentId = parentId
  9350  	return c
  9351  }
  9352  
  9353  // Fields allows partial responses to be retrieved. See
  9354  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  9355  // details.
  9356  func (c *ParentsGetCall) Fields(s ...googleapi.Field) *ParentsGetCall {
  9357  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  9358  	return c
  9359  }
  9360  
  9361  // IfNoneMatch sets an optional parameter which makes the operation fail if the
  9362  // object's ETag matches the given value. This is useful for getting updates
  9363  // only after the object has changed since the last request.
  9364  func (c *ParentsGetCall) IfNoneMatch(entityTag string) *ParentsGetCall {
  9365  	c.ifNoneMatch_ = entityTag
  9366  	return c
  9367  }
  9368  
  9369  // Context sets the context to be used in this call's Do method.
  9370  func (c *ParentsGetCall) Context(ctx context.Context) *ParentsGetCall {
  9371  	c.ctx_ = ctx
  9372  	return c
  9373  }
  9374  
  9375  // Header returns a http.Header that can be modified by the caller to add
  9376  // headers to the request.
  9377  func (c *ParentsGetCall) Header() http.Header {
  9378  	if c.header_ == nil {
  9379  		c.header_ = make(http.Header)
  9380  	}
  9381  	return c.header_
  9382  }
  9383  
  9384  func (c *ParentsGetCall) doRequest(alt string) (*http.Response, error) {
  9385  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  9386  	if c.ifNoneMatch_ != "" {
  9387  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  9388  	}
  9389  	var body io.Reader = nil
  9390  	c.urlParams_.Set("alt", alt)
  9391  	c.urlParams_.Set("prettyPrint", "false")
  9392  	urls := googleapi.ResolveRelative(c.s.BasePath, "files/{fileId}/parents/{parentId}")
  9393  	urls += "?" + c.urlParams_.Encode()
  9394  	req, err := http.NewRequest("GET", urls, body)
  9395  	if err != nil {
  9396  		return nil, err
  9397  	}
  9398  	req.Header = reqHeaders
  9399  	googleapi.Expand(req.URL, map[string]string{
  9400  		"fileId":   c.fileId,
  9401  		"parentId": c.parentId,
  9402  	})
  9403  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  9404  }
  9405  
  9406  // Do executes the "drive.parents.get" call.
  9407  // Any non-2xx status code is an error. Response headers are in either
  9408  // *ParentReference.ServerResponse.Header or (if a response was returned at
  9409  // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
  9410  // check whether the returned error was because http.StatusNotModified was
  9411  // returned.
  9412  func (c *ParentsGetCall) Do(opts ...googleapi.CallOption) (*ParentReference, error) {
  9413  	gensupport.SetOptions(c.urlParams_, opts...)
  9414  	res, err := c.doRequest("json")
  9415  	if res != nil && res.StatusCode == http.StatusNotModified {
  9416  		if res.Body != nil {
  9417  			res.Body.Close()
  9418  		}
  9419  		return nil, gensupport.WrapError(&googleapi.Error{
  9420  			Code:   res.StatusCode,
  9421  			Header: res.Header,
  9422  		})
  9423  	}
  9424  	if err != nil {
  9425  		return nil, err
  9426  	}
  9427  	defer googleapi.CloseBody(res)
  9428  	if err := googleapi.CheckResponse(res); err != nil {
  9429  		return nil, gensupport.WrapError(err)
  9430  	}
  9431  	ret := &ParentReference{
  9432  		ServerResponse: googleapi.ServerResponse{
  9433  			Header:         res.Header,
  9434  			HTTPStatusCode: res.StatusCode,
  9435  		},
  9436  	}
  9437  	target := &ret
  9438  	if err := gensupport.DecodeResponse(target, res); err != nil {
  9439  		return nil, err
  9440  	}
  9441  	return ret, nil
  9442  }
  9443  
  9444  type ParentsInsertCall struct {
  9445  	s               *Service
  9446  	fileId          string
  9447  	parentreference *ParentReference
  9448  	urlParams_      gensupport.URLParams
  9449  	ctx_            context.Context
  9450  	header_         http.Header
  9451  }
  9452  
  9453  // Insert: Adds a parent folder for a file.
  9454  //
  9455  // - fileId: The ID of the file.
  9456  func (r *ParentsService) Insert(fileId string, parentreference *ParentReference) *ParentsInsertCall {
  9457  	c := &ParentsInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  9458  	c.fileId = fileId
  9459  	c.parentreference = parentreference
  9460  	return c
  9461  }
  9462  
  9463  // EnforceSingleParent sets the optional parameter "enforceSingleParent":
  9464  // Deprecated: Adding files to multiple folders is no longer supported. Use
  9465  // `shortcuts` instead.
  9466  func (c *ParentsInsertCall) EnforceSingleParent(enforceSingleParent bool) *ParentsInsertCall {
  9467  	c.urlParams_.Set("enforceSingleParent", fmt.Sprint(enforceSingleParent))
  9468  	return c
  9469  }
  9470  
  9471  // SupportsAllDrives sets the optional parameter "supportsAllDrives": Whether
  9472  // the requesting application supports both My Drives and shared drives.
  9473  func (c *ParentsInsertCall) SupportsAllDrives(supportsAllDrives bool) *ParentsInsertCall {
  9474  	c.urlParams_.Set("supportsAllDrives", fmt.Sprint(supportsAllDrives))
  9475  	return c
  9476  }
  9477  
  9478  // SupportsTeamDrives sets the optional parameter "supportsTeamDrives":
  9479  // Deprecated: Use `supportsAllDrives` instead.
  9480  func (c *ParentsInsertCall) SupportsTeamDrives(supportsTeamDrives bool) *ParentsInsertCall {
  9481  	c.urlParams_.Set("supportsTeamDrives", fmt.Sprint(supportsTeamDrives))
  9482  	return c
  9483  }
  9484  
  9485  // Fields allows partial responses to be retrieved. See
  9486  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  9487  // details.
  9488  func (c *ParentsInsertCall) Fields(s ...googleapi.Field) *ParentsInsertCall {
  9489  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  9490  	return c
  9491  }
  9492  
  9493  // Context sets the context to be used in this call's Do method.
  9494  func (c *ParentsInsertCall) Context(ctx context.Context) *ParentsInsertCall {
  9495  	c.ctx_ = ctx
  9496  	return c
  9497  }
  9498  
  9499  // Header returns a http.Header that can be modified by the caller to add
  9500  // headers to the request.
  9501  func (c *ParentsInsertCall) Header() http.Header {
  9502  	if c.header_ == nil {
  9503  		c.header_ = make(http.Header)
  9504  	}
  9505  	return c.header_
  9506  }
  9507  
  9508  func (c *ParentsInsertCall) doRequest(alt string) (*http.Response, error) {
  9509  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
  9510  	var body io.Reader = nil
  9511  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.parentreference)
  9512  	if err != nil {
  9513  		return nil, err
  9514  	}
  9515  	c.urlParams_.Set("alt", alt)
  9516  	c.urlParams_.Set("prettyPrint", "false")
  9517  	urls := googleapi.ResolveRelative(c.s.BasePath, "files/{fileId}/parents")
  9518  	urls += "?" + c.urlParams_.Encode()
  9519  	req, err := http.NewRequest("POST", urls, body)
  9520  	if err != nil {
  9521  		return nil, err
  9522  	}
  9523  	req.Header = reqHeaders
  9524  	googleapi.Expand(req.URL, map[string]string{
  9525  		"fileId": c.fileId,
  9526  	})
  9527  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  9528  }
  9529  
  9530  // Do executes the "drive.parents.insert" call.
  9531  // Any non-2xx status code is an error. Response headers are in either
  9532  // *ParentReference.ServerResponse.Header or (if a response was returned at
  9533  // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
  9534  // check whether the returned error was because http.StatusNotModified was
  9535  // returned.
  9536  func (c *ParentsInsertCall) Do(opts ...googleapi.CallOption) (*ParentReference, error) {
  9537  	gensupport.SetOptions(c.urlParams_, opts...)
  9538  	res, err := c.doRequest("json")
  9539  	if res != nil && res.StatusCode == http.StatusNotModified {
  9540  		if res.Body != nil {
  9541  			res.Body.Close()
  9542  		}
  9543  		return nil, gensupport.WrapError(&googleapi.Error{
  9544  			Code:   res.StatusCode,
  9545  			Header: res.Header,
  9546  		})
  9547  	}
  9548  	if err != nil {
  9549  		return nil, err
  9550  	}
  9551  	defer googleapi.CloseBody(res)
  9552  	if err := googleapi.CheckResponse(res); err != nil {
  9553  		return nil, gensupport.WrapError(err)
  9554  	}
  9555  	ret := &ParentReference{
  9556  		ServerResponse: googleapi.ServerResponse{
  9557  			Header:         res.Header,
  9558  			HTTPStatusCode: res.StatusCode,
  9559  		},
  9560  	}
  9561  	target := &ret
  9562  	if err := gensupport.DecodeResponse(target, res); err != nil {
  9563  		return nil, err
  9564  	}
  9565  	return ret, nil
  9566  }
  9567  
  9568  type ParentsListCall struct {
  9569  	s            *Service
  9570  	fileId       string
  9571  	urlParams_   gensupport.URLParams
  9572  	ifNoneMatch_ string
  9573  	ctx_         context.Context
  9574  	header_      http.Header
  9575  }
  9576  
  9577  // List: Lists a file's parents.
  9578  //
  9579  // - fileId: The ID of the file.
  9580  func (r *ParentsService) List(fileId string) *ParentsListCall {
  9581  	c := &ParentsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  9582  	c.fileId = fileId
  9583  	return c
  9584  }
  9585  
  9586  // Fields allows partial responses to be retrieved. See
  9587  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  9588  // details.
  9589  func (c *ParentsListCall) Fields(s ...googleapi.Field) *ParentsListCall {
  9590  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  9591  	return c
  9592  }
  9593  
  9594  // IfNoneMatch sets an optional parameter which makes the operation fail if the
  9595  // object's ETag matches the given value. This is useful for getting updates
  9596  // only after the object has changed since the last request.
  9597  func (c *ParentsListCall) IfNoneMatch(entityTag string) *ParentsListCall {
  9598  	c.ifNoneMatch_ = entityTag
  9599  	return c
  9600  }
  9601  
  9602  // Context sets the context to be used in this call's Do method.
  9603  func (c *ParentsListCall) Context(ctx context.Context) *ParentsListCall {
  9604  	c.ctx_ = ctx
  9605  	return c
  9606  }
  9607  
  9608  // Header returns a http.Header that can be modified by the caller to add
  9609  // headers to the request.
  9610  func (c *ParentsListCall) Header() http.Header {
  9611  	if c.header_ == nil {
  9612  		c.header_ = make(http.Header)
  9613  	}
  9614  	return c.header_
  9615  }
  9616  
  9617  func (c *ParentsListCall) doRequest(alt string) (*http.Response, error) {
  9618  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  9619  	if c.ifNoneMatch_ != "" {
  9620  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  9621  	}
  9622  	var body io.Reader = nil
  9623  	c.urlParams_.Set("alt", alt)
  9624  	c.urlParams_.Set("prettyPrint", "false")
  9625  	urls := googleapi.ResolveRelative(c.s.BasePath, "files/{fileId}/parents")
  9626  	urls += "?" + c.urlParams_.Encode()
  9627  	req, err := http.NewRequest("GET", urls, body)
  9628  	if err != nil {
  9629  		return nil, err
  9630  	}
  9631  	req.Header = reqHeaders
  9632  	googleapi.Expand(req.URL, map[string]string{
  9633  		"fileId": c.fileId,
  9634  	})
  9635  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  9636  }
  9637  
  9638  // Do executes the "drive.parents.list" call.
  9639  // Any non-2xx status code is an error. Response headers are in either
  9640  // *ParentList.ServerResponse.Header or (if a response was returned at all) in
  9641  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  9642  // whether the returned error was because http.StatusNotModified was returned.
  9643  func (c *ParentsListCall) Do(opts ...googleapi.CallOption) (*ParentList, error) {
  9644  	gensupport.SetOptions(c.urlParams_, opts...)
  9645  	res, err := c.doRequest("json")
  9646  	if res != nil && res.StatusCode == http.StatusNotModified {
  9647  		if res.Body != nil {
  9648  			res.Body.Close()
  9649  		}
  9650  		return nil, gensupport.WrapError(&googleapi.Error{
  9651  			Code:   res.StatusCode,
  9652  			Header: res.Header,
  9653  		})
  9654  	}
  9655  	if err != nil {
  9656  		return nil, err
  9657  	}
  9658  	defer googleapi.CloseBody(res)
  9659  	if err := googleapi.CheckResponse(res); err != nil {
  9660  		return nil, gensupport.WrapError(err)
  9661  	}
  9662  	ret := &ParentList{
  9663  		ServerResponse: googleapi.ServerResponse{
  9664  			Header:         res.Header,
  9665  			HTTPStatusCode: res.StatusCode,
  9666  		},
  9667  	}
  9668  	target := &ret
  9669  	if err := gensupport.DecodeResponse(target, res); err != nil {
  9670  		return nil, err
  9671  	}
  9672  	return ret, nil
  9673  }
  9674  
  9675  type PermissionsDeleteCall struct {
  9676  	s            *Service
  9677  	fileId       string
  9678  	permissionId string
  9679  	urlParams_   gensupport.URLParams
  9680  	ctx_         context.Context
  9681  	header_      http.Header
  9682  }
  9683  
  9684  // Delete: Deletes a permission from a file or shared drive. **Warning:**
  9685  // Concurrent permissions operations on the same file are not supported; only
  9686  // the last update is applied.
  9687  //
  9688  // - fileId: The ID for the file or shared drive.
  9689  // - permissionId: The ID for the permission.
  9690  func (r *PermissionsService) Delete(fileId string, permissionId string) *PermissionsDeleteCall {
  9691  	c := &PermissionsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  9692  	c.fileId = fileId
  9693  	c.permissionId = permissionId
  9694  	return c
  9695  }
  9696  
  9697  // SupportsAllDrives sets the optional parameter "supportsAllDrives": Whether
  9698  // the requesting application supports both My Drives and shared drives.
  9699  func (c *PermissionsDeleteCall) SupportsAllDrives(supportsAllDrives bool) *PermissionsDeleteCall {
  9700  	c.urlParams_.Set("supportsAllDrives", fmt.Sprint(supportsAllDrives))
  9701  	return c
  9702  }
  9703  
  9704  // SupportsTeamDrives sets the optional parameter "supportsTeamDrives":
  9705  // Deprecated: Use `supportsAllDrives` instead.
  9706  func (c *PermissionsDeleteCall) SupportsTeamDrives(supportsTeamDrives bool) *PermissionsDeleteCall {
  9707  	c.urlParams_.Set("supportsTeamDrives", fmt.Sprint(supportsTeamDrives))
  9708  	return c
  9709  }
  9710  
  9711  // UseDomainAdminAccess sets the optional parameter "useDomainAdminAccess":
  9712  // Issue the request as a domain administrator; if set to true, then the
  9713  // requester will be granted access if the file ID parameter refers to a shared
  9714  // drive and the requester is an administrator of the domain to which the
  9715  // shared drive belongs.
  9716  func (c *PermissionsDeleteCall) UseDomainAdminAccess(useDomainAdminAccess bool) *PermissionsDeleteCall {
  9717  	c.urlParams_.Set("useDomainAdminAccess", fmt.Sprint(useDomainAdminAccess))
  9718  	return c
  9719  }
  9720  
  9721  // Fields allows partial responses to be retrieved. See
  9722  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  9723  // details.
  9724  func (c *PermissionsDeleteCall) Fields(s ...googleapi.Field) *PermissionsDeleteCall {
  9725  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  9726  	return c
  9727  }
  9728  
  9729  // Context sets the context to be used in this call's Do method.
  9730  func (c *PermissionsDeleteCall) Context(ctx context.Context) *PermissionsDeleteCall {
  9731  	c.ctx_ = ctx
  9732  	return c
  9733  }
  9734  
  9735  // Header returns a http.Header that can be modified by the caller to add
  9736  // headers to the request.
  9737  func (c *PermissionsDeleteCall) Header() http.Header {
  9738  	if c.header_ == nil {
  9739  		c.header_ = make(http.Header)
  9740  	}
  9741  	return c.header_
  9742  }
  9743  
  9744  func (c *PermissionsDeleteCall) doRequest(alt string) (*http.Response, error) {
  9745  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  9746  	var body io.Reader = nil
  9747  	c.urlParams_.Set("alt", alt)
  9748  	c.urlParams_.Set("prettyPrint", "false")
  9749  	urls := googleapi.ResolveRelative(c.s.BasePath, "files/{fileId}/permissions/{permissionId}")
  9750  	urls += "?" + c.urlParams_.Encode()
  9751  	req, err := http.NewRequest("DELETE", urls, body)
  9752  	if err != nil {
  9753  		return nil, err
  9754  	}
  9755  	req.Header = reqHeaders
  9756  	googleapi.Expand(req.URL, map[string]string{
  9757  		"fileId":       c.fileId,
  9758  		"permissionId": c.permissionId,
  9759  	})
  9760  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  9761  }
  9762  
  9763  // Do executes the "drive.permissions.delete" call.
  9764  func (c *PermissionsDeleteCall) Do(opts ...googleapi.CallOption) error {
  9765  	gensupport.SetOptions(c.urlParams_, opts...)
  9766  	res, err := c.doRequest("json")
  9767  	if err != nil {
  9768  		return err
  9769  	}
  9770  	defer googleapi.CloseBody(res)
  9771  	if err := googleapi.CheckResponse(res); err != nil {
  9772  		return gensupport.WrapError(err)
  9773  	}
  9774  	return nil
  9775  }
  9776  
  9777  type PermissionsGetCall struct {
  9778  	s            *Service
  9779  	fileId       string
  9780  	permissionId string
  9781  	urlParams_   gensupport.URLParams
  9782  	ifNoneMatch_ string
  9783  	ctx_         context.Context
  9784  	header_      http.Header
  9785  }
  9786  
  9787  // Get: Gets a permission by ID.
  9788  //
  9789  // - fileId: The ID for the file or shared drive.
  9790  // - permissionId: The ID for the permission.
  9791  func (r *PermissionsService) Get(fileId string, permissionId string) *PermissionsGetCall {
  9792  	c := &PermissionsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  9793  	c.fileId = fileId
  9794  	c.permissionId = permissionId
  9795  	return c
  9796  }
  9797  
  9798  // SupportsAllDrives sets the optional parameter "supportsAllDrives": Whether
  9799  // the requesting application supports both My Drives and shared drives.
  9800  func (c *PermissionsGetCall) SupportsAllDrives(supportsAllDrives bool) *PermissionsGetCall {
  9801  	c.urlParams_.Set("supportsAllDrives", fmt.Sprint(supportsAllDrives))
  9802  	return c
  9803  }
  9804  
  9805  // SupportsTeamDrives sets the optional parameter "supportsTeamDrives":
  9806  // Deprecated: Use `supportsAllDrives` instead.
  9807  func (c *PermissionsGetCall) SupportsTeamDrives(supportsTeamDrives bool) *PermissionsGetCall {
  9808  	c.urlParams_.Set("supportsTeamDrives", fmt.Sprint(supportsTeamDrives))
  9809  	return c
  9810  }
  9811  
  9812  // UseDomainAdminAccess sets the optional parameter "useDomainAdminAccess":
  9813  // Issue the request as a domain administrator; if set to true, then the
  9814  // requester will be granted access if the file ID parameter refers to a shared
  9815  // drive and the requester is an administrator of the domain to which the
  9816  // shared drive belongs.
  9817  func (c *PermissionsGetCall) UseDomainAdminAccess(useDomainAdminAccess bool) *PermissionsGetCall {
  9818  	c.urlParams_.Set("useDomainAdminAccess", fmt.Sprint(useDomainAdminAccess))
  9819  	return c
  9820  }
  9821  
  9822  // Fields allows partial responses to be retrieved. See
  9823  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  9824  // details.
  9825  func (c *PermissionsGetCall) Fields(s ...googleapi.Field) *PermissionsGetCall {
  9826  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  9827  	return c
  9828  }
  9829  
  9830  // IfNoneMatch sets an optional parameter which makes the operation fail if the
  9831  // object's ETag matches the given value. This is useful for getting updates
  9832  // only after the object has changed since the last request.
  9833  func (c *PermissionsGetCall) IfNoneMatch(entityTag string) *PermissionsGetCall {
  9834  	c.ifNoneMatch_ = entityTag
  9835  	return c
  9836  }
  9837  
  9838  // Context sets the context to be used in this call's Do method.
  9839  func (c *PermissionsGetCall) Context(ctx context.Context) *PermissionsGetCall {
  9840  	c.ctx_ = ctx
  9841  	return c
  9842  }
  9843  
  9844  // Header returns a http.Header that can be modified by the caller to add
  9845  // headers to the request.
  9846  func (c *PermissionsGetCall) Header() http.Header {
  9847  	if c.header_ == nil {
  9848  		c.header_ = make(http.Header)
  9849  	}
  9850  	return c.header_
  9851  }
  9852  
  9853  func (c *PermissionsGetCall) doRequest(alt string) (*http.Response, error) {
  9854  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  9855  	if c.ifNoneMatch_ != "" {
  9856  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  9857  	}
  9858  	var body io.Reader = nil
  9859  	c.urlParams_.Set("alt", alt)
  9860  	c.urlParams_.Set("prettyPrint", "false")
  9861  	urls := googleapi.ResolveRelative(c.s.BasePath, "files/{fileId}/permissions/{permissionId}")
  9862  	urls += "?" + c.urlParams_.Encode()
  9863  	req, err := http.NewRequest("GET", urls, body)
  9864  	if err != nil {
  9865  		return nil, err
  9866  	}
  9867  	req.Header = reqHeaders
  9868  	googleapi.Expand(req.URL, map[string]string{
  9869  		"fileId":       c.fileId,
  9870  		"permissionId": c.permissionId,
  9871  	})
  9872  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  9873  }
  9874  
  9875  // Do executes the "drive.permissions.get" call.
  9876  // Any non-2xx status code is an error. Response headers are in either
  9877  // *Permission.ServerResponse.Header or (if a response was returned at all) in
  9878  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  9879  // whether the returned error was because http.StatusNotModified was returned.
  9880  func (c *PermissionsGetCall) Do(opts ...googleapi.CallOption) (*Permission, error) {
  9881  	gensupport.SetOptions(c.urlParams_, opts...)
  9882  	res, err := c.doRequest("json")
  9883  	if res != nil && res.StatusCode == http.StatusNotModified {
  9884  		if res.Body != nil {
  9885  			res.Body.Close()
  9886  		}
  9887  		return nil, gensupport.WrapError(&googleapi.Error{
  9888  			Code:   res.StatusCode,
  9889  			Header: res.Header,
  9890  		})
  9891  	}
  9892  	if err != nil {
  9893  		return nil, err
  9894  	}
  9895  	defer googleapi.CloseBody(res)
  9896  	if err := googleapi.CheckResponse(res); err != nil {
  9897  		return nil, gensupport.WrapError(err)
  9898  	}
  9899  	ret := &Permission{
  9900  		ServerResponse: googleapi.ServerResponse{
  9901  			Header:         res.Header,
  9902  			HTTPStatusCode: res.StatusCode,
  9903  		},
  9904  	}
  9905  	target := &ret
  9906  	if err := gensupport.DecodeResponse(target, res); err != nil {
  9907  		return nil, err
  9908  	}
  9909  	return ret, nil
  9910  }
  9911  
  9912  type PermissionsGetIdForEmailCall struct {
  9913  	s            *Service
  9914  	email        string
  9915  	urlParams_   gensupport.URLParams
  9916  	ifNoneMatch_ string
  9917  	ctx_         context.Context
  9918  	header_      http.Header
  9919  }
  9920  
  9921  // GetIdForEmail: Returns the permission ID for an email address.
  9922  //
  9923  // - email: The email address for which to return a permission ID.
  9924  func (r *PermissionsService) GetIdForEmail(email string) *PermissionsGetIdForEmailCall {
  9925  	c := &PermissionsGetIdForEmailCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  9926  	c.email = email
  9927  	return c
  9928  }
  9929  
  9930  // Fields allows partial responses to be retrieved. See
  9931  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  9932  // details.
  9933  func (c *PermissionsGetIdForEmailCall) Fields(s ...googleapi.Field) *PermissionsGetIdForEmailCall {
  9934  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  9935  	return c
  9936  }
  9937  
  9938  // IfNoneMatch sets an optional parameter which makes the operation fail if the
  9939  // object's ETag matches the given value. This is useful for getting updates
  9940  // only after the object has changed since the last request.
  9941  func (c *PermissionsGetIdForEmailCall) IfNoneMatch(entityTag string) *PermissionsGetIdForEmailCall {
  9942  	c.ifNoneMatch_ = entityTag
  9943  	return c
  9944  }
  9945  
  9946  // Context sets the context to be used in this call's Do method.
  9947  func (c *PermissionsGetIdForEmailCall) Context(ctx context.Context) *PermissionsGetIdForEmailCall {
  9948  	c.ctx_ = ctx
  9949  	return c
  9950  }
  9951  
  9952  // Header returns a http.Header that can be modified by the caller to add
  9953  // headers to the request.
  9954  func (c *PermissionsGetIdForEmailCall) Header() http.Header {
  9955  	if c.header_ == nil {
  9956  		c.header_ = make(http.Header)
  9957  	}
  9958  	return c.header_
  9959  }
  9960  
  9961  func (c *PermissionsGetIdForEmailCall) doRequest(alt string) (*http.Response, error) {
  9962  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  9963  	if c.ifNoneMatch_ != "" {
  9964  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  9965  	}
  9966  	var body io.Reader = nil
  9967  	c.urlParams_.Set("alt", alt)
  9968  	c.urlParams_.Set("prettyPrint", "false")
  9969  	urls := googleapi.ResolveRelative(c.s.BasePath, "permissionIds/{email}")
  9970  	urls += "?" + c.urlParams_.Encode()
  9971  	req, err := http.NewRequest("GET", urls, body)
  9972  	if err != nil {
  9973  		return nil, err
  9974  	}
  9975  	req.Header = reqHeaders
  9976  	googleapi.Expand(req.URL, map[string]string{
  9977  		"email": c.email,
  9978  	})
  9979  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  9980  }
  9981  
  9982  // Do executes the "drive.permissions.getIdForEmail" call.
  9983  // Any non-2xx status code is an error. Response headers are in either
  9984  // *PermissionId.ServerResponse.Header or (if a response was returned at all)
  9985  // in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  9986  // whether the returned error was because http.StatusNotModified was returned.
  9987  func (c *PermissionsGetIdForEmailCall) Do(opts ...googleapi.CallOption) (*PermissionId, error) {
  9988  	gensupport.SetOptions(c.urlParams_, opts...)
  9989  	res, err := c.doRequest("json")
  9990  	if res != nil && res.StatusCode == http.StatusNotModified {
  9991  		if res.Body != nil {
  9992  			res.Body.Close()
  9993  		}
  9994  		return nil, gensupport.WrapError(&googleapi.Error{
  9995  			Code:   res.StatusCode,
  9996  			Header: res.Header,
  9997  		})
  9998  	}
  9999  	if err != nil {
 10000  		return nil, err
 10001  	}
 10002  	defer googleapi.CloseBody(res)
 10003  	if err := googleapi.CheckResponse(res); err != nil {
 10004  		return nil, gensupport.WrapError(err)
 10005  	}
 10006  	ret := &PermissionId{
 10007  		ServerResponse: googleapi.ServerResponse{
 10008  			Header:         res.Header,
 10009  			HTTPStatusCode: res.StatusCode,
 10010  		},
 10011  	}
 10012  	target := &ret
 10013  	if err := gensupport.DecodeResponse(target, res); err != nil {
 10014  		return nil, err
 10015  	}
 10016  	return ret, nil
 10017  }
 10018  
 10019  type PermissionsInsertCall struct {
 10020  	s          *Service
 10021  	fileId     string
 10022  	permission *Permission
 10023  	urlParams_ gensupport.URLParams
 10024  	ctx_       context.Context
 10025  	header_    http.Header
 10026  }
 10027  
 10028  // Insert: Inserts a permission for a file or shared drive. **Warning:**
 10029  // Concurrent permissions operations on the same file are not supported; only
 10030  // the last update is applied.
 10031  //
 10032  // - fileId: The ID for the file or shared drive.
 10033  func (r *PermissionsService) Insert(fileId string, permission *Permission) *PermissionsInsertCall {
 10034  	c := &PermissionsInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)}
 10035  	c.fileId = fileId
 10036  	c.permission = permission
 10037  	return c
 10038  }
 10039  
 10040  // EmailMessage sets the optional parameter "emailMessage": A plain text custom
 10041  // message to include in notification emails.
 10042  func (c *PermissionsInsertCall) EmailMessage(emailMessage string) *PermissionsInsertCall {
 10043  	c.urlParams_.Set("emailMessage", emailMessage)
 10044  	return c
 10045  }
 10046  
 10047  // EnforceSingleParent sets the optional parameter "enforceSingleParent":
 10048  // Deprecated: See `moveToNewOwnersRoot` for details.
 10049  func (c *PermissionsInsertCall) EnforceSingleParent(enforceSingleParent bool) *PermissionsInsertCall {
 10050  	c.urlParams_.Set("enforceSingleParent", fmt.Sprint(enforceSingleParent))
 10051  	return c
 10052  }
 10053  
 10054  // MoveToNewOwnersRoot sets the optional parameter "moveToNewOwnersRoot": This
 10055  // parameter will only take effect if the item is not in a shared drive and the
 10056  // request is attempting to transfer the ownership of the item. If set to
 10057  // `true`, the item will be moved to the new owner's My Drive root folder and
 10058  // all prior parents removed. If set to `false`, parents are not changed.
 10059  func (c *PermissionsInsertCall) MoveToNewOwnersRoot(moveToNewOwnersRoot bool) *PermissionsInsertCall {
 10060  	c.urlParams_.Set("moveToNewOwnersRoot", fmt.Sprint(moveToNewOwnersRoot))
 10061  	return c
 10062  }
 10063  
 10064  // SendNotificationEmails sets the optional parameter "sendNotificationEmails":
 10065  // Whether to send notification emails when sharing to users or groups. This
 10066  // parameter is ignored and an email is sent if the `role` is `owner`.
 10067  func (c *PermissionsInsertCall) SendNotificationEmails(sendNotificationEmails bool) *PermissionsInsertCall {
 10068  	c.urlParams_.Set("sendNotificationEmails", fmt.Sprint(sendNotificationEmails))
 10069  	return c
 10070  }
 10071  
 10072  // SupportsAllDrives sets the optional parameter "supportsAllDrives": Whether
 10073  // the requesting application supports both My Drives and shared drives.
 10074  func (c *PermissionsInsertCall) SupportsAllDrives(supportsAllDrives bool) *PermissionsInsertCall {
 10075  	c.urlParams_.Set("supportsAllDrives", fmt.Sprint(supportsAllDrives))
 10076  	return c
 10077  }
 10078  
 10079  // SupportsTeamDrives sets the optional parameter "supportsTeamDrives":
 10080  // Deprecated: Use `supportsAllDrives` instead.
 10081  func (c *PermissionsInsertCall) SupportsTeamDrives(supportsTeamDrives bool) *PermissionsInsertCall {
 10082  	c.urlParams_.Set("supportsTeamDrives", fmt.Sprint(supportsTeamDrives))
 10083  	return c
 10084  }
 10085  
 10086  // UseDomainAdminAccess sets the optional parameter "useDomainAdminAccess":
 10087  // Issue the request as a domain administrator; if set to true, then the
 10088  // requester will be granted access if the file ID parameter refers to a shared
 10089  // drive and the requester is an administrator of the domain to which the
 10090  // shared drive belongs.
 10091  func (c *PermissionsInsertCall) UseDomainAdminAccess(useDomainAdminAccess bool) *PermissionsInsertCall {
 10092  	c.urlParams_.Set("useDomainAdminAccess", fmt.Sprint(useDomainAdminAccess))
 10093  	return c
 10094  }
 10095  
 10096  // Fields allows partial responses to be retrieved. See
 10097  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
 10098  // details.
 10099  func (c *PermissionsInsertCall) Fields(s ...googleapi.Field) *PermissionsInsertCall {
 10100  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
 10101  	return c
 10102  }
 10103  
 10104  // Context sets the context to be used in this call's Do method.
 10105  func (c *PermissionsInsertCall) Context(ctx context.Context) *PermissionsInsertCall {
 10106  	c.ctx_ = ctx
 10107  	return c
 10108  }
 10109  
 10110  // Header returns a http.Header that can be modified by the caller to add
 10111  // headers to the request.
 10112  func (c *PermissionsInsertCall) Header() http.Header {
 10113  	if c.header_ == nil {
 10114  		c.header_ = make(http.Header)
 10115  	}
 10116  	return c.header_
 10117  }
 10118  
 10119  func (c *PermissionsInsertCall) doRequest(alt string) (*http.Response, error) {
 10120  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
 10121  	var body io.Reader = nil
 10122  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.permission)
 10123  	if err != nil {
 10124  		return nil, err
 10125  	}
 10126  	c.urlParams_.Set("alt", alt)
 10127  	c.urlParams_.Set("prettyPrint", "false")
 10128  	urls := googleapi.ResolveRelative(c.s.BasePath, "files/{fileId}/permissions")
 10129  	urls += "?" + c.urlParams_.Encode()
 10130  	req, err := http.NewRequest("POST", urls, body)
 10131  	if err != nil {
 10132  		return nil, err
 10133  	}
 10134  	req.Header = reqHeaders
 10135  	googleapi.Expand(req.URL, map[string]string{
 10136  		"fileId": c.fileId,
 10137  	})
 10138  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
 10139  }
 10140  
 10141  // Do executes the "drive.permissions.insert" call.
 10142  // Any non-2xx status code is an error. Response headers are in either
 10143  // *Permission.ServerResponse.Header or (if a response was returned at all) in
 10144  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
 10145  // whether the returned error was because http.StatusNotModified was returned.
 10146  func (c *PermissionsInsertCall) Do(opts ...googleapi.CallOption) (*Permission, error) {
 10147  	gensupport.SetOptions(c.urlParams_, opts...)
 10148  	res, err := c.doRequest("json")
 10149  	if res != nil && res.StatusCode == http.StatusNotModified {
 10150  		if res.Body != nil {
 10151  			res.Body.Close()
 10152  		}
 10153  		return nil, gensupport.WrapError(&googleapi.Error{
 10154  			Code:   res.StatusCode,
 10155  			Header: res.Header,
 10156  		})
 10157  	}
 10158  	if err != nil {
 10159  		return nil, err
 10160  	}
 10161  	defer googleapi.CloseBody(res)
 10162  	if err := googleapi.CheckResponse(res); err != nil {
 10163  		return nil, gensupport.WrapError(err)
 10164  	}
 10165  	ret := &Permission{
 10166  		ServerResponse: googleapi.ServerResponse{
 10167  			Header:         res.Header,
 10168  			HTTPStatusCode: res.StatusCode,
 10169  		},
 10170  	}
 10171  	target := &ret
 10172  	if err := gensupport.DecodeResponse(target, res); err != nil {
 10173  		return nil, err
 10174  	}
 10175  	return ret, nil
 10176  }
 10177  
 10178  type PermissionsListCall struct {
 10179  	s            *Service
 10180  	fileId       string
 10181  	urlParams_   gensupport.URLParams
 10182  	ifNoneMatch_ string
 10183  	ctx_         context.Context
 10184  	header_      http.Header
 10185  }
 10186  
 10187  // List: Lists a file's or shared drive's permissions.
 10188  //
 10189  // - fileId: The ID for the file or shared drive.
 10190  func (r *PermissionsService) List(fileId string) *PermissionsListCall {
 10191  	c := &PermissionsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
 10192  	c.fileId = fileId
 10193  	return c
 10194  }
 10195  
 10196  // IncludePermissionsForView sets the optional parameter
 10197  // "includePermissionsForView": Specifies which additional view's permissions
 10198  // to include in the response. Only `published` is supported.
 10199  func (c *PermissionsListCall) IncludePermissionsForView(includePermissionsForView string) *PermissionsListCall {
 10200  	c.urlParams_.Set("includePermissionsForView", includePermissionsForView)
 10201  	return c
 10202  }
 10203  
 10204  // MaxResults sets the optional parameter "maxResults": The maximum number of
 10205  // permissions to return per page. When not set for files in a shared drive, at
 10206  // most 100 results will be returned. When not set for files that are not in a
 10207  // shared drive, the entire list will be returned.
 10208  func (c *PermissionsListCall) MaxResults(maxResults int64) *PermissionsListCall {
 10209  	c.urlParams_.Set("maxResults", fmt.Sprint(maxResults))
 10210  	return c
 10211  }
 10212  
 10213  // PageToken sets the optional parameter "pageToken": The token for continuing
 10214  // a previous list request on the next page. This should be set to the value of
 10215  // `nextPageToken` from the previous response.
 10216  func (c *PermissionsListCall) PageToken(pageToken string) *PermissionsListCall {
 10217  	c.urlParams_.Set("pageToken", pageToken)
 10218  	return c
 10219  }
 10220  
 10221  // SupportsAllDrives sets the optional parameter "supportsAllDrives": Whether
 10222  // the requesting application supports both My Drives and shared drives.
 10223  func (c *PermissionsListCall) SupportsAllDrives(supportsAllDrives bool) *PermissionsListCall {
 10224  	c.urlParams_.Set("supportsAllDrives", fmt.Sprint(supportsAllDrives))
 10225  	return c
 10226  }
 10227  
 10228  // SupportsTeamDrives sets the optional parameter "supportsTeamDrives":
 10229  // Deprecated: Use `supportsAllDrives` instead.
 10230  func (c *PermissionsListCall) SupportsTeamDrives(supportsTeamDrives bool) *PermissionsListCall {
 10231  	c.urlParams_.Set("supportsTeamDrives", fmt.Sprint(supportsTeamDrives))
 10232  	return c
 10233  }
 10234  
 10235  // UseDomainAdminAccess sets the optional parameter "useDomainAdminAccess":
 10236  // Issue the request as a domain administrator; if set to true, then the
 10237  // requester will be granted access if the file ID parameter refers to a shared
 10238  // drive and the requester is an administrator of the domain to which the
 10239  // shared drive belongs.
 10240  func (c *PermissionsListCall) UseDomainAdminAccess(useDomainAdminAccess bool) *PermissionsListCall {
 10241  	c.urlParams_.Set("useDomainAdminAccess", fmt.Sprint(useDomainAdminAccess))
 10242  	return c
 10243  }
 10244  
 10245  // Fields allows partial responses to be retrieved. See
 10246  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
 10247  // details.
 10248  func (c *PermissionsListCall) Fields(s ...googleapi.Field) *PermissionsListCall {
 10249  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
 10250  	return c
 10251  }
 10252  
 10253  // IfNoneMatch sets an optional parameter which makes the operation fail if the
 10254  // object's ETag matches the given value. This is useful for getting updates
 10255  // only after the object has changed since the last request.
 10256  func (c *PermissionsListCall) IfNoneMatch(entityTag string) *PermissionsListCall {
 10257  	c.ifNoneMatch_ = entityTag
 10258  	return c
 10259  }
 10260  
 10261  // Context sets the context to be used in this call's Do method.
 10262  func (c *PermissionsListCall) Context(ctx context.Context) *PermissionsListCall {
 10263  	c.ctx_ = ctx
 10264  	return c
 10265  }
 10266  
 10267  // Header returns a http.Header that can be modified by the caller to add
 10268  // headers to the request.
 10269  func (c *PermissionsListCall) Header() http.Header {
 10270  	if c.header_ == nil {
 10271  		c.header_ = make(http.Header)
 10272  	}
 10273  	return c.header_
 10274  }
 10275  
 10276  func (c *PermissionsListCall) doRequest(alt string) (*http.Response, error) {
 10277  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
 10278  	if c.ifNoneMatch_ != "" {
 10279  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
 10280  	}
 10281  	var body io.Reader = nil
 10282  	c.urlParams_.Set("alt", alt)
 10283  	c.urlParams_.Set("prettyPrint", "false")
 10284  	urls := googleapi.ResolveRelative(c.s.BasePath, "files/{fileId}/permissions")
 10285  	urls += "?" + c.urlParams_.Encode()
 10286  	req, err := http.NewRequest("GET", urls, body)
 10287  	if err != nil {
 10288  		return nil, err
 10289  	}
 10290  	req.Header = reqHeaders
 10291  	googleapi.Expand(req.URL, map[string]string{
 10292  		"fileId": c.fileId,
 10293  	})
 10294  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
 10295  }
 10296  
 10297  // Do executes the "drive.permissions.list" call.
 10298  // Any non-2xx status code is an error. Response headers are in either
 10299  // *PermissionList.ServerResponse.Header or (if a response was returned at all)
 10300  // in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
 10301  // whether the returned error was because http.StatusNotModified was returned.
 10302  func (c *PermissionsListCall) Do(opts ...googleapi.CallOption) (*PermissionList, error) {
 10303  	gensupport.SetOptions(c.urlParams_, opts...)
 10304  	res, err := c.doRequest("json")
 10305  	if res != nil && res.StatusCode == http.StatusNotModified {
 10306  		if res.Body != nil {
 10307  			res.Body.Close()
 10308  		}
 10309  		return nil, gensupport.WrapError(&googleapi.Error{
 10310  			Code:   res.StatusCode,
 10311  			Header: res.Header,
 10312  		})
 10313  	}
 10314  	if err != nil {
 10315  		return nil, err
 10316  	}
 10317  	defer googleapi.CloseBody(res)
 10318  	if err := googleapi.CheckResponse(res); err != nil {
 10319  		return nil, gensupport.WrapError(err)
 10320  	}
 10321  	ret := &PermissionList{
 10322  		ServerResponse: googleapi.ServerResponse{
 10323  			Header:         res.Header,
 10324  			HTTPStatusCode: res.StatusCode,
 10325  		},
 10326  	}
 10327  	target := &ret
 10328  	if err := gensupport.DecodeResponse(target, res); err != nil {
 10329  		return nil, err
 10330  	}
 10331  	return ret, nil
 10332  }
 10333  
 10334  // Pages invokes f for each page of results.
 10335  // A non-nil error returned from f will halt the iteration.
 10336  // The provided context supersedes any context provided to the Context method.
 10337  func (c *PermissionsListCall) Pages(ctx context.Context, f func(*PermissionList) error) error {
 10338  	c.ctx_ = ctx
 10339  	defer c.PageToken(c.urlParams_.Get("pageToken"))
 10340  	for {
 10341  		x, err := c.Do()
 10342  		if err != nil {
 10343  			return err
 10344  		}
 10345  		if err := f(x); err != nil {
 10346  			return err
 10347  		}
 10348  		if x.NextPageToken == "" {
 10349  			return nil
 10350  		}
 10351  		c.PageToken(x.NextPageToken)
 10352  	}
 10353  }
 10354  
 10355  type PermissionsPatchCall struct {
 10356  	s            *Service
 10357  	fileId       string
 10358  	permissionId string
 10359  	permission   *Permission
 10360  	urlParams_   gensupport.URLParams
 10361  	ctx_         context.Context
 10362  	header_      http.Header
 10363  }
 10364  
 10365  // Patch: Updates a permission using patch semantics. **Warning:** Concurrent
 10366  // permissions operations on the same file are not supported; only the last
 10367  // update is applied.
 10368  //
 10369  // - fileId: The ID for the file or shared drive.
 10370  // - permissionId: The ID for the permission.
 10371  func (r *PermissionsService) Patch(fileId string, permissionId string, permission *Permission) *PermissionsPatchCall {
 10372  	c := &PermissionsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
 10373  	c.fileId = fileId
 10374  	c.permissionId = permissionId
 10375  	c.permission = permission
 10376  	return c
 10377  }
 10378  
 10379  // RemoveExpiration sets the optional parameter "removeExpiration": Whether to
 10380  // remove the expiration date.
 10381  func (c *PermissionsPatchCall) RemoveExpiration(removeExpiration bool) *PermissionsPatchCall {
 10382  	c.urlParams_.Set("removeExpiration", fmt.Sprint(removeExpiration))
 10383  	return c
 10384  }
 10385  
 10386  // SupportsAllDrives sets the optional parameter "supportsAllDrives": Whether
 10387  // the requesting application supports both My Drives and shared drives.
 10388  func (c *PermissionsPatchCall) SupportsAllDrives(supportsAllDrives bool) *PermissionsPatchCall {
 10389  	c.urlParams_.Set("supportsAllDrives", fmt.Sprint(supportsAllDrives))
 10390  	return c
 10391  }
 10392  
 10393  // SupportsTeamDrives sets the optional parameter "supportsTeamDrives":
 10394  // Deprecated: Use `supportsAllDrives` instead.
 10395  func (c *PermissionsPatchCall) SupportsTeamDrives(supportsTeamDrives bool) *PermissionsPatchCall {
 10396  	c.urlParams_.Set("supportsTeamDrives", fmt.Sprint(supportsTeamDrives))
 10397  	return c
 10398  }
 10399  
 10400  // TransferOwnership sets the optional parameter "transferOwnership": Whether
 10401  // changing a role to `owner` downgrades the current owners to writers. Does
 10402  // nothing if the specified role is not `owner`.
 10403  func (c *PermissionsPatchCall) TransferOwnership(transferOwnership bool) *PermissionsPatchCall {
 10404  	c.urlParams_.Set("transferOwnership", fmt.Sprint(transferOwnership))
 10405  	return c
 10406  }
 10407  
 10408  // UseDomainAdminAccess sets the optional parameter "useDomainAdminAccess":
 10409  // Issue the request as a domain administrator; if set to true, then the
 10410  // requester will be granted access if the file ID parameter refers to a shared
 10411  // drive and the requester is an administrator of the domain to which the
 10412  // shared drive belongs.
 10413  func (c *PermissionsPatchCall) UseDomainAdminAccess(useDomainAdminAccess bool) *PermissionsPatchCall {
 10414  	c.urlParams_.Set("useDomainAdminAccess", fmt.Sprint(useDomainAdminAccess))
 10415  	return c
 10416  }
 10417  
 10418  // Fields allows partial responses to be retrieved. See
 10419  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
 10420  // details.
 10421  func (c *PermissionsPatchCall) Fields(s ...googleapi.Field) *PermissionsPatchCall {
 10422  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
 10423  	return c
 10424  }
 10425  
 10426  // Context sets the context to be used in this call's Do method.
 10427  func (c *PermissionsPatchCall) Context(ctx context.Context) *PermissionsPatchCall {
 10428  	c.ctx_ = ctx
 10429  	return c
 10430  }
 10431  
 10432  // Header returns a http.Header that can be modified by the caller to add
 10433  // headers to the request.
 10434  func (c *PermissionsPatchCall) Header() http.Header {
 10435  	if c.header_ == nil {
 10436  		c.header_ = make(http.Header)
 10437  	}
 10438  	return c.header_
 10439  }
 10440  
 10441  func (c *PermissionsPatchCall) doRequest(alt string) (*http.Response, error) {
 10442  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
 10443  	var body io.Reader = nil
 10444  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.permission)
 10445  	if err != nil {
 10446  		return nil, err
 10447  	}
 10448  	c.urlParams_.Set("alt", alt)
 10449  	c.urlParams_.Set("prettyPrint", "false")
 10450  	urls := googleapi.ResolveRelative(c.s.BasePath, "files/{fileId}/permissions/{permissionId}")
 10451  	urls += "?" + c.urlParams_.Encode()
 10452  	req, err := http.NewRequest("PATCH", urls, body)
 10453  	if err != nil {
 10454  		return nil, err
 10455  	}
 10456  	req.Header = reqHeaders
 10457  	googleapi.Expand(req.URL, map[string]string{
 10458  		"fileId":       c.fileId,
 10459  		"permissionId": c.permissionId,
 10460  	})
 10461  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
 10462  }
 10463  
 10464  // Do executes the "drive.permissions.patch" call.
 10465  // Any non-2xx status code is an error. Response headers are in either
 10466  // *Permission.ServerResponse.Header or (if a response was returned at all) in
 10467  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
 10468  // whether the returned error was because http.StatusNotModified was returned.
 10469  func (c *PermissionsPatchCall) Do(opts ...googleapi.CallOption) (*Permission, error) {
 10470  	gensupport.SetOptions(c.urlParams_, opts...)
 10471  	res, err := c.doRequest("json")
 10472  	if res != nil && res.StatusCode == http.StatusNotModified {
 10473  		if res.Body != nil {
 10474  			res.Body.Close()
 10475  		}
 10476  		return nil, gensupport.WrapError(&googleapi.Error{
 10477  			Code:   res.StatusCode,
 10478  			Header: res.Header,
 10479  		})
 10480  	}
 10481  	if err != nil {
 10482  		return nil, err
 10483  	}
 10484  	defer googleapi.CloseBody(res)
 10485  	if err := googleapi.CheckResponse(res); err != nil {
 10486  		return nil, gensupport.WrapError(err)
 10487  	}
 10488  	ret := &Permission{
 10489  		ServerResponse: googleapi.ServerResponse{
 10490  			Header:         res.Header,
 10491  			HTTPStatusCode: res.StatusCode,
 10492  		},
 10493  	}
 10494  	target := &ret
 10495  	if err := gensupport.DecodeResponse(target, res); err != nil {
 10496  		return nil, err
 10497  	}
 10498  	return ret, nil
 10499  }
 10500  
 10501  type PermissionsUpdateCall struct {
 10502  	s            *Service
 10503  	fileId       string
 10504  	permissionId string
 10505  	permission   *Permission
 10506  	urlParams_   gensupport.URLParams
 10507  	ctx_         context.Context
 10508  	header_      http.Header
 10509  }
 10510  
 10511  // Update: Updates a permission. **Warning:** Concurrent permissions operations
 10512  // on the same file are not supported; only the last update is applied.
 10513  //
 10514  // - fileId: The ID for the file or shared drive.
 10515  // - permissionId: The ID for the permission.
 10516  func (r *PermissionsService) Update(fileId string, permissionId string, permission *Permission) *PermissionsUpdateCall {
 10517  	c := &PermissionsUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
 10518  	c.fileId = fileId
 10519  	c.permissionId = permissionId
 10520  	c.permission = permission
 10521  	return c
 10522  }
 10523  
 10524  // RemoveExpiration sets the optional parameter "removeExpiration": Whether to
 10525  // remove the expiration date.
 10526  func (c *PermissionsUpdateCall) RemoveExpiration(removeExpiration bool) *PermissionsUpdateCall {
 10527  	c.urlParams_.Set("removeExpiration", fmt.Sprint(removeExpiration))
 10528  	return c
 10529  }
 10530  
 10531  // SupportsAllDrives sets the optional parameter "supportsAllDrives": Whether
 10532  // the requesting application supports both My Drives and shared drives.
 10533  func (c *PermissionsUpdateCall) SupportsAllDrives(supportsAllDrives bool) *PermissionsUpdateCall {
 10534  	c.urlParams_.Set("supportsAllDrives", fmt.Sprint(supportsAllDrives))
 10535  	return c
 10536  }
 10537  
 10538  // SupportsTeamDrives sets the optional parameter "supportsTeamDrives":
 10539  // Deprecated: Use `supportsAllDrives` instead.
 10540  func (c *PermissionsUpdateCall) SupportsTeamDrives(supportsTeamDrives bool) *PermissionsUpdateCall {
 10541  	c.urlParams_.Set("supportsTeamDrives", fmt.Sprint(supportsTeamDrives))
 10542  	return c
 10543  }
 10544  
 10545  // TransferOwnership sets the optional parameter "transferOwnership": Whether
 10546  // changing a role to `owner` downgrades the current owners to writers. Does
 10547  // nothing if the specified role is not `owner`.
 10548  func (c *PermissionsUpdateCall) TransferOwnership(transferOwnership bool) *PermissionsUpdateCall {
 10549  	c.urlParams_.Set("transferOwnership", fmt.Sprint(transferOwnership))
 10550  	return c
 10551  }
 10552  
 10553  // UseDomainAdminAccess sets the optional parameter "useDomainAdminAccess":
 10554  // Issue the request as a domain administrator; if set to true, then the
 10555  // requester will be granted access if the file ID parameter refers to a shared
 10556  // drive and the requester is an administrator of the domain to which the
 10557  // shared drive belongs.
 10558  func (c *PermissionsUpdateCall) UseDomainAdminAccess(useDomainAdminAccess bool) *PermissionsUpdateCall {
 10559  	c.urlParams_.Set("useDomainAdminAccess", fmt.Sprint(useDomainAdminAccess))
 10560  	return c
 10561  }
 10562  
 10563  // Fields allows partial responses to be retrieved. See
 10564  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
 10565  // details.
 10566  func (c *PermissionsUpdateCall) Fields(s ...googleapi.Field) *PermissionsUpdateCall {
 10567  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
 10568  	return c
 10569  }
 10570  
 10571  // Context sets the context to be used in this call's Do method.
 10572  func (c *PermissionsUpdateCall) Context(ctx context.Context) *PermissionsUpdateCall {
 10573  	c.ctx_ = ctx
 10574  	return c
 10575  }
 10576  
 10577  // Header returns a http.Header that can be modified by the caller to add
 10578  // headers to the request.
 10579  func (c *PermissionsUpdateCall) Header() http.Header {
 10580  	if c.header_ == nil {
 10581  		c.header_ = make(http.Header)
 10582  	}
 10583  	return c.header_
 10584  }
 10585  
 10586  func (c *PermissionsUpdateCall) doRequest(alt string) (*http.Response, error) {
 10587  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
 10588  	var body io.Reader = nil
 10589  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.permission)
 10590  	if err != nil {
 10591  		return nil, err
 10592  	}
 10593  	c.urlParams_.Set("alt", alt)
 10594  	c.urlParams_.Set("prettyPrint", "false")
 10595  	urls := googleapi.ResolveRelative(c.s.BasePath, "files/{fileId}/permissions/{permissionId}")
 10596  	urls += "?" + c.urlParams_.Encode()
 10597  	req, err := http.NewRequest("PUT", urls, body)
 10598  	if err != nil {
 10599  		return nil, err
 10600  	}
 10601  	req.Header = reqHeaders
 10602  	googleapi.Expand(req.URL, map[string]string{
 10603  		"fileId":       c.fileId,
 10604  		"permissionId": c.permissionId,
 10605  	})
 10606  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
 10607  }
 10608  
 10609  // Do executes the "drive.permissions.update" call.
 10610  // Any non-2xx status code is an error. Response headers are in either
 10611  // *Permission.ServerResponse.Header or (if a response was returned at all) in
 10612  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
 10613  // whether the returned error was because http.StatusNotModified was returned.
 10614  func (c *PermissionsUpdateCall) Do(opts ...googleapi.CallOption) (*Permission, error) {
 10615  	gensupport.SetOptions(c.urlParams_, opts...)
 10616  	res, err := c.doRequest("json")
 10617  	if res != nil && res.StatusCode == http.StatusNotModified {
 10618  		if res.Body != nil {
 10619  			res.Body.Close()
 10620  		}
 10621  		return nil, gensupport.WrapError(&googleapi.Error{
 10622  			Code:   res.StatusCode,
 10623  			Header: res.Header,
 10624  		})
 10625  	}
 10626  	if err != nil {
 10627  		return nil, err
 10628  	}
 10629  	defer googleapi.CloseBody(res)
 10630  	if err := googleapi.CheckResponse(res); err != nil {
 10631  		return nil, gensupport.WrapError(err)
 10632  	}
 10633  	ret := &Permission{
 10634  		ServerResponse: googleapi.ServerResponse{
 10635  			Header:         res.Header,
 10636  			HTTPStatusCode: res.StatusCode,
 10637  		},
 10638  	}
 10639  	target := &ret
 10640  	if err := gensupport.DecodeResponse(target, res); err != nil {
 10641  		return nil, err
 10642  	}
 10643  	return ret, nil
 10644  }
 10645  
 10646  type PropertiesDeleteCall struct {
 10647  	s           *Service
 10648  	fileId      string
 10649  	propertyKey string
 10650  	urlParams_  gensupport.URLParams
 10651  	ctx_        context.Context
 10652  	header_     http.Header
 10653  }
 10654  
 10655  // Delete: Deletes a property.
 10656  //
 10657  // - fileId: The ID of the file.
 10658  // - propertyKey: The key of the property.
 10659  func (r *PropertiesService) Delete(fileId string, propertyKey string) *PropertiesDeleteCall {
 10660  	c := &PropertiesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
 10661  	c.fileId = fileId
 10662  	c.propertyKey = propertyKey
 10663  	return c
 10664  }
 10665  
 10666  // Visibility sets the optional parameter "visibility": The visibility of the
 10667  // property.
 10668  func (c *PropertiesDeleteCall) Visibility(visibility string) *PropertiesDeleteCall {
 10669  	c.urlParams_.Set("visibility", visibility)
 10670  	return c
 10671  }
 10672  
 10673  // Fields allows partial responses to be retrieved. See
 10674  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
 10675  // details.
 10676  func (c *PropertiesDeleteCall) Fields(s ...googleapi.Field) *PropertiesDeleteCall {
 10677  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
 10678  	return c
 10679  }
 10680  
 10681  // Context sets the context to be used in this call's Do method.
 10682  func (c *PropertiesDeleteCall) Context(ctx context.Context) *PropertiesDeleteCall {
 10683  	c.ctx_ = ctx
 10684  	return c
 10685  }
 10686  
 10687  // Header returns a http.Header that can be modified by the caller to add
 10688  // headers to the request.
 10689  func (c *PropertiesDeleteCall) Header() http.Header {
 10690  	if c.header_ == nil {
 10691  		c.header_ = make(http.Header)
 10692  	}
 10693  	return c.header_
 10694  }
 10695  
 10696  func (c *PropertiesDeleteCall) doRequest(alt string) (*http.Response, error) {
 10697  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
 10698  	var body io.Reader = nil
 10699  	c.urlParams_.Set("alt", alt)
 10700  	c.urlParams_.Set("prettyPrint", "false")
 10701  	urls := googleapi.ResolveRelative(c.s.BasePath, "files/{fileId}/properties/{propertyKey}")
 10702  	urls += "?" + c.urlParams_.Encode()
 10703  	req, err := http.NewRequest("DELETE", urls, body)
 10704  	if err != nil {
 10705  		return nil, err
 10706  	}
 10707  	req.Header = reqHeaders
 10708  	googleapi.Expand(req.URL, map[string]string{
 10709  		"fileId":      c.fileId,
 10710  		"propertyKey": c.propertyKey,
 10711  	})
 10712  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
 10713  }
 10714  
 10715  // Do executes the "drive.properties.delete" call.
 10716  func (c *PropertiesDeleteCall) Do(opts ...googleapi.CallOption) error {
 10717  	gensupport.SetOptions(c.urlParams_, opts...)
 10718  	res, err := c.doRequest("json")
 10719  	if err != nil {
 10720  		return err
 10721  	}
 10722  	defer googleapi.CloseBody(res)
 10723  	if err := googleapi.CheckResponse(res); err != nil {
 10724  		return gensupport.WrapError(err)
 10725  	}
 10726  	return nil
 10727  }
 10728  
 10729  type PropertiesGetCall struct {
 10730  	s            *Service
 10731  	fileId       string
 10732  	propertyKey  string
 10733  	urlParams_   gensupport.URLParams
 10734  	ifNoneMatch_ string
 10735  	ctx_         context.Context
 10736  	header_      http.Header
 10737  }
 10738  
 10739  // Get: Gets a property by its key.
 10740  //
 10741  // - fileId: The ID of the file.
 10742  // - propertyKey: The key of the property.
 10743  func (r *PropertiesService) Get(fileId string, propertyKey string) *PropertiesGetCall {
 10744  	c := &PropertiesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
 10745  	c.fileId = fileId
 10746  	c.propertyKey = propertyKey
 10747  	return c
 10748  }
 10749  
 10750  // Visibility sets the optional parameter "visibility": The visibility of the
 10751  // property.
 10752  func (c *PropertiesGetCall) Visibility(visibility string) *PropertiesGetCall {
 10753  	c.urlParams_.Set("visibility", visibility)
 10754  	return c
 10755  }
 10756  
 10757  // Fields allows partial responses to be retrieved. See
 10758  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
 10759  // details.
 10760  func (c *PropertiesGetCall) Fields(s ...googleapi.Field) *PropertiesGetCall {
 10761  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
 10762  	return c
 10763  }
 10764  
 10765  // IfNoneMatch sets an optional parameter which makes the operation fail if the
 10766  // object's ETag matches the given value. This is useful for getting updates
 10767  // only after the object has changed since the last request.
 10768  func (c *PropertiesGetCall) IfNoneMatch(entityTag string) *PropertiesGetCall {
 10769  	c.ifNoneMatch_ = entityTag
 10770  	return c
 10771  }
 10772  
 10773  // Context sets the context to be used in this call's Do method.
 10774  func (c *PropertiesGetCall) Context(ctx context.Context) *PropertiesGetCall {
 10775  	c.ctx_ = ctx
 10776  	return c
 10777  }
 10778  
 10779  // Header returns a http.Header that can be modified by the caller to add
 10780  // headers to the request.
 10781  func (c *PropertiesGetCall) Header() http.Header {
 10782  	if c.header_ == nil {
 10783  		c.header_ = make(http.Header)
 10784  	}
 10785  	return c.header_
 10786  }
 10787  
 10788  func (c *PropertiesGetCall) doRequest(alt string) (*http.Response, error) {
 10789  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
 10790  	if c.ifNoneMatch_ != "" {
 10791  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
 10792  	}
 10793  	var body io.Reader = nil
 10794  	c.urlParams_.Set("alt", alt)
 10795  	c.urlParams_.Set("prettyPrint", "false")
 10796  	urls := googleapi.ResolveRelative(c.s.BasePath, "files/{fileId}/properties/{propertyKey}")
 10797  	urls += "?" + c.urlParams_.Encode()
 10798  	req, err := http.NewRequest("GET", urls, body)
 10799  	if err != nil {
 10800  		return nil, err
 10801  	}
 10802  	req.Header = reqHeaders
 10803  	googleapi.Expand(req.URL, map[string]string{
 10804  		"fileId":      c.fileId,
 10805  		"propertyKey": c.propertyKey,
 10806  	})
 10807  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
 10808  }
 10809  
 10810  // Do executes the "drive.properties.get" call.
 10811  // Any non-2xx status code is an error. Response headers are in either
 10812  // *Property.ServerResponse.Header or (if a response was returned at all) in
 10813  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
 10814  // whether the returned error was because http.StatusNotModified was returned.
 10815  func (c *PropertiesGetCall) Do(opts ...googleapi.CallOption) (*Property, error) {
 10816  	gensupport.SetOptions(c.urlParams_, opts...)
 10817  	res, err := c.doRequest("json")
 10818  	if res != nil && res.StatusCode == http.StatusNotModified {
 10819  		if res.Body != nil {
 10820  			res.Body.Close()
 10821  		}
 10822  		return nil, gensupport.WrapError(&googleapi.Error{
 10823  			Code:   res.StatusCode,
 10824  			Header: res.Header,
 10825  		})
 10826  	}
 10827  	if err != nil {
 10828  		return nil, err
 10829  	}
 10830  	defer googleapi.CloseBody(res)
 10831  	if err := googleapi.CheckResponse(res); err != nil {
 10832  		return nil, gensupport.WrapError(err)
 10833  	}
 10834  	ret := &Property{
 10835  		ServerResponse: googleapi.ServerResponse{
 10836  			Header:         res.Header,
 10837  			HTTPStatusCode: res.StatusCode,
 10838  		},
 10839  	}
 10840  	target := &ret
 10841  	if err := gensupport.DecodeResponse(target, res); err != nil {
 10842  		return nil, err
 10843  	}
 10844  	return ret, nil
 10845  }
 10846  
 10847  type PropertiesInsertCall struct {
 10848  	s          *Service
 10849  	fileId     string
 10850  	property   *Property
 10851  	urlParams_ gensupport.URLParams
 10852  	ctx_       context.Context
 10853  	header_    http.Header
 10854  }
 10855  
 10856  // Insert: Adds a property to a file, or updates it if it already exists.
 10857  //
 10858  // - fileId: The ID of the file.
 10859  func (r *PropertiesService) Insert(fileId string, property *Property) *PropertiesInsertCall {
 10860  	c := &PropertiesInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)}
 10861  	c.fileId = fileId
 10862  	c.property = property
 10863  	return c
 10864  }
 10865  
 10866  // Fields allows partial responses to be retrieved. See
 10867  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
 10868  // details.
 10869  func (c *PropertiesInsertCall) Fields(s ...googleapi.Field) *PropertiesInsertCall {
 10870  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
 10871  	return c
 10872  }
 10873  
 10874  // Context sets the context to be used in this call's Do method.
 10875  func (c *PropertiesInsertCall) Context(ctx context.Context) *PropertiesInsertCall {
 10876  	c.ctx_ = ctx
 10877  	return c
 10878  }
 10879  
 10880  // Header returns a http.Header that can be modified by the caller to add
 10881  // headers to the request.
 10882  func (c *PropertiesInsertCall) Header() http.Header {
 10883  	if c.header_ == nil {
 10884  		c.header_ = make(http.Header)
 10885  	}
 10886  	return c.header_
 10887  }
 10888  
 10889  func (c *PropertiesInsertCall) doRequest(alt string) (*http.Response, error) {
 10890  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
 10891  	var body io.Reader = nil
 10892  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.property)
 10893  	if err != nil {
 10894  		return nil, err
 10895  	}
 10896  	c.urlParams_.Set("alt", alt)
 10897  	c.urlParams_.Set("prettyPrint", "false")
 10898  	urls := googleapi.ResolveRelative(c.s.BasePath, "files/{fileId}/properties")
 10899  	urls += "?" + c.urlParams_.Encode()
 10900  	req, err := http.NewRequest("POST", urls, body)
 10901  	if err != nil {
 10902  		return nil, err
 10903  	}
 10904  	req.Header = reqHeaders
 10905  	googleapi.Expand(req.URL, map[string]string{
 10906  		"fileId": c.fileId,
 10907  	})
 10908  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
 10909  }
 10910  
 10911  // Do executes the "drive.properties.insert" call.
 10912  // Any non-2xx status code is an error. Response headers are in either
 10913  // *Property.ServerResponse.Header or (if a response was returned at all) in
 10914  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
 10915  // whether the returned error was because http.StatusNotModified was returned.
 10916  func (c *PropertiesInsertCall) Do(opts ...googleapi.CallOption) (*Property, error) {
 10917  	gensupport.SetOptions(c.urlParams_, opts...)
 10918  	res, err := c.doRequest("json")
 10919  	if res != nil && res.StatusCode == http.StatusNotModified {
 10920  		if res.Body != nil {
 10921  			res.Body.Close()
 10922  		}
 10923  		return nil, gensupport.WrapError(&googleapi.Error{
 10924  			Code:   res.StatusCode,
 10925  			Header: res.Header,
 10926  		})
 10927  	}
 10928  	if err != nil {
 10929  		return nil, err
 10930  	}
 10931  	defer googleapi.CloseBody(res)
 10932  	if err := googleapi.CheckResponse(res); err != nil {
 10933  		return nil, gensupport.WrapError(err)
 10934  	}
 10935  	ret := &Property{
 10936  		ServerResponse: googleapi.ServerResponse{
 10937  			Header:         res.Header,
 10938  			HTTPStatusCode: res.StatusCode,
 10939  		},
 10940  	}
 10941  	target := &ret
 10942  	if err := gensupport.DecodeResponse(target, res); err != nil {
 10943  		return nil, err
 10944  	}
 10945  	return ret, nil
 10946  }
 10947  
 10948  type PropertiesListCall struct {
 10949  	s            *Service
 10950  	fileId       string
 10951  	urlParams_   gensupport.URLParams
 10952  	ifNoneMatch_ string
 10953  	ctx_         context.Context
 10954  	header_      http.Header
 10955  }
 10956  
 10957  // List: Lists a file's properties.
 10958  //
 10959  // - fileId: The ID of the file.
 10960  func (r *PropertiesService) List(fileId string) *PropertiesListCall {
 10961  	c := &PropertiesListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
 10962  	c.fileId = fileId
 10963  	return c
 10964  }
 10965  
 10966  // Fields allows partial responses to be retrieved. See
 10967  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
 10968  // details.
 10969  func (c *PropertiesListCall) Fields(s ...googleapi.Field) *PropertiesListCall {
 10970  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
 10971  	return c
 10972  }
 10973  
 10974  // IfNoneMatch sets an optional parameter which makes the operation fail if the
 10975  // object's ETag matches the given value. This is useful for getting updates
 10976  // only after the object has changed since the last request.
 10977  func (c *PropertiesListCall) IfNoneMatch(entityTag string) *PropertiesListCall {
 10978  	c.ifNoneMatch_ = entityTag
 10979  	return c
 10980  }
 10981  
 10982  // Context sets the context to be used in this call's Do method.
 10983  func (c *PropertiesListCall) Context(ctx context.Context) *PropertiesListCall {
 10984  	c.ctx_ = ctx
 10985  	return c
 10986  }
 10987  
 10988  // Header returns a http.Header that can be modified by the caller to add
 10989  // headers to the request.
 10990  func (c *PropertiesListCall) Header() http.Header {
 10991  	if c.header_ == nil {
 10992  		c.header_ = make(http.Header)
 10993  	}
 10994  	return c.header_
 10995  }
 10996  
 10997  func (c *PropertiesListCall) doRequest(alt string) (*http.Response, error) {
 10998  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
 10999  	if c.ifNoneMatch_ != "" {
 11000  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
 11001  	}
 11002  	var body io.Reader = nil
 11003  	c.urlParams_.Set("alt", alt)
 11004  	c.urlParams_.Set("prettyPrint", "false")
 11005  	urls := googleapi.ResolveRelative(c.s.BasePath, "files/{fileId}/properties")
 11006  	urls += "?" + c.urlParams_.Encode()
 11007  	req, err := http.NewRequest("GET", urls, body)
 11008  	if err != nil {
 11009  		return nil, err
 11010  	}
 11011  	req.Header = reqHeaders
 11012  	googleapi.Expand(req.URL, map[string]string{
 11013  		"fileId": c.fileId,
 11014  	})
 11015  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
 11016  }
 11017  
 11018  // Do executes the "drive.properties.list" call.
 11019  // Any non-2xx status code is an error. Response headers are in either
 11020  // *PropertyList.ServerResponse.Header or (if a response was returned at all)
 11021  // in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
 11022  // whether the returned error was because http.StatusNotModified was returned.
 11023  func (c *PropertiesListCall) Do(opts ...googleapi.CallOption) (*PropertyList, error) {
 11024  	gensupport.SetOptions(c.urlParams_, opts...)
 11025  	res, err := c.doRequest("json")
 11026  	if res != nil && res.StatusCode == http.StatusNotModified {
 11027  		if res.Body != nil {
 11028  			res.Body.Close()
 11029  		}
 11030  		return nil, gensupport.WrapError(&googleapi.Error{
 11031  			Code:   res.StatusCode,
 11032  			Header: res.Header,
 11033  		})
 11034  	}
 11035  	if err != nil {
 11036  		return nil, err
 11037  	}
 11038  	defer googleapi.CloseBody(res)
 11039  	if err := googleapi.CheckResponse(res); err != nil {
 11040  		return nil, gensupport.WrapError(err)
 11041  	}
 11042  	ret := &PropertyList{
 11043  		ServerResponse: googleapi.ServerResponse{
 11044  			Header:         res.Header,
 11045  			HTTPStatusCode: res.StatusCode,
 11046  		},
 11047  	}
 11048  	target := &ret
 11049  	if err := gensupport.DecodeResponse(target, res); err != nil {
 11050  		return nil, err
 11051  	}
 11052  	return ret, nil
 11053  }
 11054  
 11055  type PropertiesPatchCall struct {
 11056  	s           *Service
 11057  	fileId      string
 11058  	propertyKey string
 11059  	property    *Property
 11060  	urlParams_  gensupport.URLParams
 11061  	ctx_        context.Context
 11062  	header_     http.Header
 11063  }
 11064  
 11065  // Patch: Updates a property.
 11066  //
 11067  // - fileId: The ID of the file.
 11068  // - propertyKey: The key of the property.
 11069  func (r *PropertiesService) Patch(fileId string, propertyKey string, property *Property) *PropertiesPatchCall {
 11070  	c := &PropertiesPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
 11071  	c.fileId = fileId
 11072  	c.propertyKey = propertyKey
 11073  	c.property = property
 11074  	return c
 11075  }
 11076  
 11077  // Visibility sets the optional parameter "visibility": The visibility of the
 11078  // property. Allowed values are PRIVATE and PUBLIC. (Default: PRIVATE)
 11079  func (c *PropertiesPatchCall) Visibility(visibility string) *PropertiesPatchCall {
 11080  	c.urlParams_.Set("visibility", visibility)
 11081  	return c
 11082  }
 11083  
 11084  // Fields allows partial responses to be retrieved. See
 11085  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
 11086  // details.
 11087  func (c *PropertiesPatchCall) Fields(s ...googleapi.Field) *PropertiesPatchCall {
 11088  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
 11089  	return c
 11090  }
 11091  
 11092  // Context sets the context to be used in this call's Do method.
 11093  func (c *PropertiesPatchCall) Context(ctx context.Context) *PropertiesPatchCall {
 11094  	c.ctx_ = ctx
 11095  	return c
 11096  }
 11097  
 11098  // Header returns a http.Header that can be modified by the caller to add
 11099  // headers to the request.
 11100  func (c *PropertiesPatchCall) Header() http.Header {
 11101  	if c.header_ == nil {
 11102  		c.header_ = make(http.Header)
 11103  	}
 11104  	return c.header_
 11105  }
 11106  
 11107  func (c *PropertiesPatchCall) doRequest(alt string) (*http.Response, error) {
 11108  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
 11109  	var body io.Reader = nil
 11110  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.property)
 11111  	if err != nil {
 11112  		return nil, err
 11113  	}
 11114  	c.urlParams_.Set("alt", alt)
 11115  	c.urlParams_.Set("prettyPrint", "false")
 11116  	urls := googleapi.ResolveRelative(c.s.BasePath, "files/{fileId}/properties/{propertyKey}")
 11117  	urls += "?" + c.urlParams_.Encode()
 11118  	req, err := http.NewRequest("PATCH", urls, body)
 11119  	if err != nil {
 11120  		return nil, err
 11121  	}
 11122  	req.Header = reqHeaders
 11123  	googleapi.Expand(req.URL, map[string]string{
 11124  		"fileId":      c.fileId,
 11125  		"propertyKey": c.propertyKey,
 11126  	})
 11127  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
 11128  }
 11129  
 11130  // Do executes the "drive.properties.patch" call.
 11131  // Any non-2xx status code is an error. Response headers are in either
 11132  // *Property.ServerResponse.Header or (if a response was returned at all) in
 11133  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
 11134  // whether the returned error was because http.StatusNotModified was returned.
 11135  func (c *PropertiesPatchCall) Do(opts ...googleapi.CallOption) (*Property, error) {
 11136  	gensupport.SetOptions(c.urlParams_, opts...)
 11137  	res, err := c.doRequest("json")
 11138  	if res != nil && res.StatusCode == http.StatusNotModified {
 11139  		if res.Body != nil {
 11140  			res.Body.Close()
 11141  		}
 11142  		return nil, gensupport.WrapError(&googleapi.Error{
 11143  			Code:   res.StatusCode,
 11144  			Header: res.Header,
 11145  		})
 11146  	}
 11147  	if err != nil {
 11148  		return nil, err
 11149  	}
 11150  	defer googleapi.CloseBody(res)
 11151  	if err := googleapi.CheckResponse(res); err != nil {
 11152  		return nil, gensupport.WrapError(err)
 11153  	}
 11154  	ret := &Property{
 11155  		ServerResponse: googleapi.ServerResponse{
 11156  			Header:         res.Header,
 11157  			HTTPStatusCode: res.StatusCode,
 11158  		},
 11159  	}
 11160  	target := &ret
 11161  	if err := gensupport.DecodeResponse(target, res); err != nil {
 11162  		return nil, err
 11163  	}
 11164  	return ret, nil
 11165  }
 11166  
 11167  type PropertiesUpdateCall struct {
 11168  	s           *Service
 11169  	fileId      string
 11170  	propertyKey string
 11171  	property    *Property
 11172  	urlParams_  gensupport.URLParams
 11173  	ctx_        context.Context
 11174  	header_     http.Header
 11175  }
 11176  
 11177  // Update: Updates a property.
 11178  //
 11179  // - fileId: The ID of the file.
 11180  // - propertyKey: The key of the property.
 11181  func (r *PropertiesService) Update(fileId string, propertyKey string, property *Property) *PropertiesUpdateCall {
 11182  	c := &PropertiesUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
 11183  	c.fileId = fileId
 11184  	c.propertyKey = propertyKey
 11185  	c.property = property
 11186  	return c
 11187  }
 11188  
 11189  // Visibility sets the optional parameter "visibility": The visibility of the
 11190  // property. Allowed values are PRIVATE and PUBLIC. (Default: PRIVATE)
 11191  func (c *PropertiesUpdateCall) Visibility(visibility string) *PropertiesUpdateCall {
 11192  	c.urlParams_.Set("visibility", visibility)
 11193  	return c
 11194  }
 11195  
 11196  // Fields allows partial responses to be retrieved. See
 11197  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
 11198  // details.
 11199  func (c *PropertiesUpdateCall) Fields(s ...googleapi.Field) *PropertiesUpdateCall {
 11200  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
 11201  	return c
 11202  }
 11203  
 11204  // Context sets the context to be used in this call's Do method.
 11205  func (c *PropertiesUpdateCall) Context(ctx context.Context) *PropertiesUpdateCall {
 11206  	c.ctx_ = ctx
 11207  	return c
 11208  }
 11209  
 11210  // Header returns a http.Header that can be modified by the caller to add
 11211  // headers to the request.
 11212  func (c *PropertiesUpdateCall) Header() http.Header {
 11213  	if c.header_ == nil {
 11214  		c.header_ = make(http.Header)
 11215  	}
 11216  	return c.header_
 11217  }
 11218  
 11219  func (c *PropertiesUpdateCall) doRequest(alt string) (*http.Response, error) {
 11220  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
 11221  	var body io.Reader = nil
 11222  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.property)
 11223  	if err != nil {
 11224  		return nil, err
 11225  	}
 11226  	c.urlParams_.Set("alt", alt)
 11227  	c.urlParams_.Set("prettyPrint", "false")
 11228  	urls := googleapi.ResolveRelative(c.s.BasePath, "files/{fileId}/properties/{propertyKey}")
 11229  	urls += "?" + c.urlParams_.Encode()
 11230  	req, err := http.NewRequest("PUT", urls, body)
 11231  	if err != nil {
 11232  		return nil, err
 11233  	}
 11234  	req.Header = reqHeaders
 11235  	googleapi.Expand(req.URL, map[string]string{
 11236  		"fileId":      c.fileId,
 11237  		"propertyKey": c.propertyKey,
 11238  	})
 11239  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
 11240  }
 11241  
 11242  // Do executes the "drive.properties.update" call.
 11243  // Any non-2xx status code is an error. Response headers are in either
 11244  // *Property.ServerResponse.Header or (if a response was returned at all) in
 11245  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
 11246  // whether the returned error was because http.StatusNotModified was returned.
 11247  func (c *PropertiesUpdateCall) Do(opts ...googleapi.CallOption) (*Property, error) {
 11248  	gensupport.SetOptions(c.urlParams_, opts...)
 11249  	res, err := c.doRequest("json")
 11250  	if res != nil && res.StatusCode == http.StatusNotModified {
 11251  		if res.Body != nil {
 11252  			res.Body.Close()
 11253  		}
 11254  		return nil, gensupport.WrapError(&googleapi.Error{
 11255  			Code:   res.StatusCode,
 11256  			Header: res.Header,
 11257  		})
 11258  	}
 11259  	if err != nil {
 11260  		return nil, err
 11261  	}
 11262  	defer googleapi.CloseBody(res)
 11263  	if err := googleapi.CheckResponse(res); err != nil {
 11264  		return nil, gensupport.WrapError(err)
 11265  	}
 11266  	ret := &Property{
 11267  		ServerResponse: googleapi.ServerResponse{
 11268  			Header:         res.Header,
 11269  			HTTPStatusCode: res.StatusCode,
 11270  		},
 11271  	}
 11272  	target := &ret
 11273  	if err := gensupport.DecodeResponse(target, res); err != nil {
 11274  		return nil, err
 11275  	}
 11276  	return ret, nil
 11277  }
 11278  
 11279  type RepliesDeleteCall struct {
 11280  	s          *Service
 11281  	fileId     string
 11282  	commentId  string
 11283  	replyId    string
 11284  	urlParams_ gensupport.URLParams
 11285  	ctx_       context.Context
 11286  	header_    http.Header
 11287  }
 11288  
 11289  // Delete: Deletes a reply.
 11290  //
 11291  // - commentId: The ID of the comment.
 11292  // - fileId: The ID of the file.
 11293  // - replyId: The ID of the reply.
 11294  func (r *RepliesService) Delete(fileId string, commentId string, replyId string) *RepliesDeleteCall {
 11295  	c := &RepliesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
 11296  	c.fileId = fileId
 11297  	c.commentId = commentId
 11298  	c.replyId = replyId
 11299  	return c
 11300  }
 11301  
 11302  // Fields allows partial responses to be retrieved. See
 11303  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
 11304  // details.
 11305  func (c *RepliesDeleteCall) Fields(s ...googleapi.Field) *RepliesDeleteCall {
 11306  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
 11307  	return c
 11308  }
 11309  
 11310  // Context sets the context to be used in this call's Do method.
 11311  func (c *RepliesDeleteCall) Context(ctx context.Context) *RepliesDeleteCall {
 11312  	c.ctx_ = ctx
 11313  	return c
 11314  }
 11315  
 11316  // Header returns a http.Header that can be modified by the caller to add
 11317  // headers to the request.
 11318  func (c *RepliesDeleteCall) Header() http.Header {
 11319  	if c.header_ == nil {
 11320  		c.header_ = make(http.Header)
 11321  	}
 11322  	return c.header_
 11323  }
 11324  
 11325  func (c *RepliesDeleteCall) doRequest(alt string) (*http.Response, error) {
 11326  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
 11327  	var body io.Reader = nil
 11328  	c.urlParams_.Set("alt", alt)
 11329  	c.urlParams_.Set("prettyPrint", "false")
 11330  	urls := googleapi.ResolveRelative(c.s.BasePath, "files/{fileId}/comments/{commentId}/replies/{replyId}")
 11331  	urls += "?" + c.urlParams_.Encode()
 11332  	req, err := http.NewRequest("DELETE", urls, body)
 11333  	if err != nil {
 11334  		return nil, err
 11335  	}
 11336  	req.Header = reqHeaders
 11337  	googleapi.Expand(req.URL, map[string]string{
 11338  		"fileId":    c.fileId,
 11339  		"commentId": c.commentId,
 11340  		"replyId":   c.replyId,
 11341  	})
 11342  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
 11343  }
 11344  
 11345  // Do executes the "drive.replies.delete" call.
 11346  func (c *RepliesDeleteCall) Do(opts ...googleapi.CallOption) error {
 11347  	gensupport.SetOptions(c.urlParams_, opts...)
 11348  	res, err := c.doRequest("json")
 11349  	if err != nil {
 11350  		return err
 11351  	}
 11352  	defer googleapi.CloseBody(res)
 11353  	if err := googleapi.CheckResponse(res); err != nil {
 11354  		return gensupport.WrapError(err)
 11355  	}
 11356  	return nil
 11357  }
 11358  
 11359  type RepliesGetCall struct {
 11360  	s            *Service
 11361  	fileId       string
 11362  	commentId    string
 11363  	replyId      string
 11364  	urlParams_   gensupport.URLParams
 11365  	ifNoneMatch_ string
 11366  	ctx_         context.Context
 11367  	header_      http.Header
 11368  }
 11369  
 11370  // Get: Gets a reply.
 11371  //
 11372  // - commentId: The ID of the comment.
 11373  // - fileId: The ID of the file.
 11374  // - replyId: The ID of the reply.
 11375  func (r *RepliesService) Get(fileId string, commentId string, replyId string) *RepliesGetCall {
 11376  	c := &RepliesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
 11377  	c.fileId = fileId
 11378  	c.commentId = commentId
 11379  	c.replyId = replyId
 11380  	return c
 11381  }
 11382  
 11383  // IncludeDeleted sets the optional parameter "includeDeleted": If set, this
 11384  // will succeed when retrieving a deleted reply.
 11385  func (c *RepliesGetCall) IncludeDeleted(includeDeleted bool) *RepliesGetCall {
 11386  	c.urlParams_.Set("includeDeleted", fmt.Sprint(includeDeleted))
 11387  	return c
 11388  }
 11389  
 11390  // Fields allows partial responses to be retrieved. See
 11391  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
 11392  // details.
 11393  func (c *RepliesGetCall) Fields(s ...googleapi.Field) *RepliesGetCall {
 11394  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
 11395  	return c
 11396  }
 11397  
 11398  // IfNoneMatch sets an optional parameter which makes the operation fail if the
 11399  // object's ETag matches the given value. This is useful for getting updates
 11400  // only after the object has changed since the last request.
 11401  func (c *RepliesGetCall) IfNoneMatch(entityTag string) *RepliesGetCall {
 11402  	c.ifNoneMatch_ = entityTag
 11403  	return c
 11404  }
 11405  
 11406  // Context sets the context to be used in this call's Do method.
 11407  func (c *RepliesGetCall) Context(ctx context.Context) *RepliesGetCall {
 11408  	c.ctx_ = ctx
 11409  	return c
 11410  }
 11411  
 11412  // Header returns a http.Header that can be modified by the caller to add
 11413  // headers to the request.
 11414  func (c *RepliesGetCall) Header() http.Header {
 11415  	if c.header_ == nil {
 11416  		c.header_ = make(http.Header)
 11417  	}
 11418  	return c.header_
 11419  }
 11420  
 11421  func (c *RepliesGetCall) doRequest(alt string) (*http.Response, error) {
 11422  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
 11423  	if c.ifNoneMatch_ != "" {
 11424  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
 11425  	}
 11426  	var body io.Reader = nil
 11427  	c.urlParams_.Set("alt", alt)
 11428  	c.urlParams_.Set("prettyPrint", "false")
 11429  	urls := googleapi.ResolveRelative(c.s.BasePath, "files/{fileId}/comments/{commentId}/replies/{replyId}")
 11430  	urls += "?" + c.urlParams_.Encode()
 11431  	req, err := http.NewRequest("GET", urls, body)
 11432  	if err != nil {
 11433  		return nil, err
 11434  	}
 11435  	req.Header = reqHeaders
 11436  	googleapi.Expand(req.URL, map[string]string{
 11437  		"fileId":    c.fileId,
 11438  		"commentId": c.commentId,
 11439  		"replyId":   c.replyId,
 11440  	})
 11441  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
 11442  }
 11443  
 11444  // Do executes the "drive.replies.get" call.
 11445  // Any non-2xx status code is an error. Response headers are in either
 11446  // *CommentReply.ServerResponse.Header or (if a response was returned at all)
 11447  // in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
 11448  // whether the returned error was because http.StatusNotModified was returned.
 11449  func (c *RepliesGetCall) Do(opts ...googleapi.CallOption) (*CommentReply, error) {
 11450  	gensupport.SetOptions(c.urlParams_, opts...)
 11451  	res, err := c.doRequest("json")
 11452  	if res != nil && res.StatusCode == http.StatusNotModified {
 11453  		if res.Body != nil {
 11454  			res.Body.Close()
 11455  		}
 11456  		return nil, gensupport.WrapError(&googleapi.Error{
 11457  			Code:   res.StatusCode,
 11458  			Header: res.Header,
 11459  		})
 11460  	}
 11461  	if err != nil {
 11462  		return nil, err
 11463  	}
 11464  	defer googleapi.CloseBody(res)
 11465  	if err := googleapi.CheckResponse(res); err != nil {
 11466  		return nil, gensupport.WrapError(err)
 11467  	}
 11468  	ret := &CommentReply{
 11469  		ServerResponse: googleapi.ServerResponse{
 11470  			Header:         res.Header,
 11471  			HTTPStatusCode: res.StatusCode,
 11472  		},
 11473  	}
 11474  	target := &ret
 11475  	if err := gensupport.DecodeResponse(target, res); err != nil {
 11476  		return nil, err
 11477  	}
 11478  	return ret, nil
 11479  }
 11480  
 11481  type RepliesInsertCall struct {
 11482  	s            *Service
 11483  	fileId       string
 11484  	commentId    string
 11485  	commentreply *CommentReply
 11486  	urlParams_   gensupport.URLParams
 11487  	ctx_         context.Context
 11488  	header_      http.Header
 11489  }
 11490  
 11491  // Insert: Creates a new reply to the given comment.
 11492  //
 11493  // - commentId: The ID of the comment.
 11494  // - fileId: The ID of the file.
 11495  func (r *RepliesService) Insert(fileId string, commentId string, commentreply *CommentReply) *RepliesInsertCall {
 11496  	c := &RepliesInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)}
 11497  	c.fileId = fileId
 11498  	c.commentId = commentId
 11499  	c.commentreply = commentreply
 11500  	return c
 11501  }
 11502  
 11503  // Fields allows partial responses to be retrieved. See
 11504  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
 11505  // details.
 11506  func (c *RepliesInsertCall) Fields(s ...googleapi.Field) *RepliesInsertCall {
 11507  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
 11508  	return c
 11509  }
 11510  
 11511  // Context sets the context to be used in this call's Do method.
 11512  func (c *RepliesInsertCall) Context(ctx context.Context) *RepliesInsertCall {
 11513  	c.ctx_ = ctx
 11514  	return c
 11515  }
 11516  
 11517  // Header returns a http.Header that can be modified by the caller to add
 11518  // headers to the request.
 11519  func (c *RepliesInsertCall) Header() http.Header {
 11520  	if c.header_ == nil {
 11521  		c.header_ = make(http.Header)
 11522  	}
 11523  	return c.header_
 11524  }
 11525  
 11526  func (c *RepliesInsertCall) doRequest(alt string) (*http.Response, error) {
 11527  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
 11528  	var body io.Reader = nil
 11529  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.commentreply)
 11530  	if err != nil {
 11531  		return nil, err
 11532  	}
 11533  	c.urlParams_.Set("alt", alt)
 11534  	c.urlParams_.Set("prettyPrint", "false")
 11535  	urls := googleapi.ResolveRelative(c.s.BasePath, "files/{fileId}/comments/{commentId}/replies")
 11536  	urls += "?" + c.urlParams_.Encode()
 11537  	req, err := http.NewRequest("POST", urls, body)
 11538  	if err != nil {
 11539  		return nil, err
 11540  	}
 11541  	req.Header = reqHeaders
 11542  	googleapi.Expand(req.URL, map[string]string{
 11543  		"fileId":    c.fileId,
 11544  		"commentId": c.commentId,
 11545  	})
 11546  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
 11547  }
 11548  
 11549  // Do executes the "drive.replies.insert" call.
 11550  // Any non-2xx status code is an error. Response headers are in either
 11551  // *CommentReply.ServerResponse.Header or (if a response was returned at all)
 11552  // in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
 11553  // whether the returned error was because http.StatusNotModified was returned.
 11554  func (c *RepliesInsertCall) Do(opts ...googleapi.CallOption) (*CommentReply, error) {
 11555  	gensupport.SetOptions(c.urlParams_, opts...)
 11556  	res, err := c.doRequest("json")
 11557  	if res != nil && res.StatusCode == http.StatusNotModified {
 11558  		if res.Body != nil {
 11559  			res.Body.Close()
 11560  		}
 11561  		return nil, gensupport.WrapError(&googleapi.Error{
 11562  			Code:   res.StatusCode,
 11563  			Header: res.Header,
 11564  		})
 11565  	}
 11566  	if err != nil {
 11567  		return nil, err
 11568  	}
 11569  	defer googleapi.CloseBody(res)
 11570  	if err := googleapi.CheckResponse(res); err != nil {
 11571  		return nil, gensupport.WrapError(err)
 11572  	}
 11573  	ret := &CommentReply{
 11574  		ServerResponse: googleapi.ServerResponse{
 11575  			Header:         res.Header,
 11576  			HTTPStatusCode: res.StatusCode,
 11577  		},
 11578  	}
 11579  	target := &ret
 11580  	if err := gensupport.DecodeResponse(target, res); err != nil {
 11581  		return nil, err
 11582  	}
 11583  	return ret, nil
 11584  }
 11585  
 11586  type RepliesListCall struct {
 11587  	s            *Service
 11588  	fileId       string
 11589  	commentId    string
 11590  	urlParams_   gensupport.URLParams
 11591  	ifNoneMatch_ string
 11592  	ctx_         context.Context
 11593  	header_      http.Header
 11594  }
 11595  
 11596  // List: Lists all of the replies to a comment.
 11597  //
 11598  // - commentId: The ID of the comment.
 11599  // - fileId: The ID of the file.
 11600  func (r *RepliesService) List(fileId string, commentId string) *RepliesListCall {
 11601  	c := &RepliesListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
 11602  	c.fileId = fileId
 11603  	c.commentId = commentId
 11604  	return c
 11605  }
 11606  
 11607  // IncludeDeleted sets the optional parameter "includeDeleted": If set, all
 11608  // replies, including deleted replies (with content stripped) will be returned.
 11609  func (c *RepliesListCall) IncludeDeleted(includeDeleted bool) *RepliesListCall {
 11610  	c.urlParams_.Set("includeDeleted", fmt.Sprint(includeDeleted))
 11611  	return c
 11612  }
 11613  
 11614  // MaxResults sets the optional parameter "maxResults": The maximum number of
 11615  // replies to include in the response, used for paging.
 11616  func (c *RepliesListCall) MaxResults(maxResults int64) *RepliesListCall {
 11617  	c.urlParams_.Set("maxResults", fmt.Sprint(maxResults))
 11618  	return c
 11619  }
 11620  
 11621  // PageToken sets the optional parameter "pageToken": The continuation token,
 11622  // used to page through large result sets. To get the next page of results, set
 11623  // this parameter to the value of "nextPageToken" from the previous response.
 11624  func (c *RepliesListCall) PageToken(pageToken string) *RepliesListCall {
 11625  	c.urlParams_.Set("pageToken", pageToken)
 11626  	return c
 11627  }
 11628  
 11629  // Fields allows partial responses to be retrieved. See
 11630  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
 11631  // details.
 11632  func (c *RepliesListCall) Fields(s ...googleapi.Field) *RepliesListCall {
 11633  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
 11634  	return c
 11635  }
 11636  
 11637  // IfNoneMatch sets an optional parameter which makes the operation fail if the
 11638  // object's ETag matches the given value. This is useful for getting updates
 11639  // only after the object has changed since the last request.
 11640  func (c *RepliesListCall) IfNoneMatch(entityTag string) *RepliesListCall {
 11641  	c.ifNoneMatch_ = entityTag
 11642  	return c
 11643  }
 11644  
 11645  // Context sets the context to be used in this call's Do method.
 11646  func (c *RepliesListCall) Context(ctx context.Context) *RepliesListCall {
 11647  	c.ctx_ = ctx
 11648  	return c
 11649  }
 11650  
 11651  // Header returns a http.Header that can be modified by the caller to add
 11652  // headers to the request.
 11653  func (c *RepliesListCall) Header() http.Header {
 11654  	if c.header_ == nil {
 11655  		c.header_ = make(http.Header)
 11656  	}
 11657  	return c.header_
 11658  }
 11659  
 11660  func (c *RepliesListCall) doRequest(alt string) (*http.Response, error) {
 11661  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
 11662  	if c.ifNoneMatch_ != "" {
 11663  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
 11664  	}
 11665  	var body io.Reader = nil
 11666  	c.urlParams_.Set("alt", alt)
 11667  	c.urlParams_.Set("prettyPrint", "false")
 11668  	urls := googleapi.ResolveRelative(c.s.BasePath, "files/{fileId}/comments/{commentId}/replies")
 11669  	urls += "?" + c.urlParams_.Encode()
 11670  	req, err := http.NewRequest("GET", urls, body)
 11671  	if err != nil {
 11672  		return nil, err
 11673  	}
 11674  	req.Header = reqHeaders
 11675  	googleapi.Expand(req.URL, map[string]string{
 11676  		"fileId":    c.fileId,
 11677  		"commentId": c.commentId,
 11678  	})
 11679  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
 11680  }
 11681  
 11682  // Do executes the "drive.replies.list" call.
 11683  // Any non-2xx status code is an error. Response headers are in either
 11684  // *CommentReplyList.ServerResponse.Header or (if a response was returned at
 11685  // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
 11686  // check whether the returned error was because http.StatusNotModified was
 11687  // returned.
 11688  func (c *RepliesListCall) Do(opts ...googleapi.CallOption) (*CommentReplyList, error) {
 11689  	gensupport.SetOptions(c.urlParams_, opts...)
 11690  	res, err := c.doRequest("json")
 11691  	if res != nil && res.StatusCode == http.StatusNotModified {
 11692  		if res.Body != nil {
 11693  			res.Body.Close()
 11694  		}
 11695  		return nil, gensupport.WrapError(&googleapi.Error{
 11696  			Code:   res.StatusCode,
 11697  			Header: res.Header,
 11698  		})
 11699  	}
 11700  	if err != nil {
 11701  		return nil, err
 11702  	}
 11703  	defer googleapi.CloseBody(res)
 11704  	if err := googleapi.CheckResponse(res); err != nil {
 11705  		return nil, gensupport.WrapError(err)
 11706  	}
 11707  	ret := &CommentReplyList{
 11708  		ServerResponse: googleapi.ServerResponse{
 11709  			Header:         res.Header,
 11710  			HTTPStatusCode: res.StatusCode,
 11711  		},
 11712  	}
 11713  	target := &ret
 11714  	if err := gensupport.DecodeResponse(target, res); err != nil {
 11715  		return nil, err
 11716  	}
 11717  	return ret, nil
 11718  }
 11719  
 11720  // Pages invokes f for each page of results.
 11721  // A non-nil error returned from f will halt the iteration.
 11722  // The provided context supersedes any context provided to the Context method.
 11723  func (c *RepliesListCall) Pages(ctx context.Context, f func(*CommentReplyList) error) error {
 11724  	c.ctx_ = ctx
 11725  	defer c.PageToken(c.urlParams_.Get("pageToken"))
 11726  	for {
 11727  		x, err := c.Do()
 11728  		if err != nil {
 11729  			return err
 11730  		}
 11731  		if err := f(x); err != nil {
 11732  			return err
 11733  		}
 11734  		if x.NextPageToken == "" {
 11735  			return nil
 11736  		}
 11737  		c.PageToken(x.NextPageToken)
 11738  	}
 11739  }
 11740  
 11741  type RepliesPatchCall struct {
 11742  	s            *Service
 11743  	fileId       string
 11744  	commentId    string
 11745  	replyId      string
 11746  	commentreply *CommentReply
 11747  	urlParams_   gensupport.URLParams
 11748  	ctx_         context.Context
 11749  	header_      http.Header
 11750  }
 11751  
 11752  // Patch: Updates an existing reply.
 11753  //
 11754  // - commentId: The ID of the comment.
 11755  // - fileId: The ID of the file.
 11756  // - replyId: The ID of the reply.
 11757  func (r *RepliesService) Patch(fileId string, commentId string, replyId string, commentreply *CommentReply) *RepliesPatchCall {
 11758  	c := &RepliesPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
 11759  	c.fileId = fileId
 11760  	c.commentId = commentId
 11761  	c.replyId = replyId
 11762  	c.commentreply = commentreply
 11763  	return c
 11764  }
 11765  
 11766  // Fields allows partial responses to be retrieved. See
 11767  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
 11768  // details.
 11769  func (c *RepliesPatchCall) Fields(s ...googleapi.Field) *RepliesPatchCall {
 11770  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
 11771  	return c
 11772  }
 11773  
 11774  // Context sets the context to be used in this call's Do method.
 11775  func (c *RepliesPatchCall) Context(ctx context.Context) *RepliesPatchCall {
 11776  	c.ctx_ = ctx
 11777  	return c
 11778  }
 11779  
 11780  // Header returns a http.Header that can be modified by the caller to add
 11781  // headers to the request.
 11782  func (c *RepliesPatchCall) Header() http.Header {
 11783  	if c.header_ == nil {
 11784  		c.header_ = make(http.Header)
 11785  	}
 11786  	return c.header_
 11787  }
 11788  
 11789  func (c *RepliesPatchCall) doRequest(alt string) (*http.Response, error) {
 11790  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
 11791  	var body io.Reader = nil
 11792  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.commentreply)
 11793  	if err != nil {
 11794  		return nil, err
 11795  	}
 11796  	c.urlParams_.Set("alt", alt)
 11797  	c.urlParams_.Set("prettyPrint", "false")
 11798  	urls := googleapi.ResolveRelative(c.s.BasePath, "files/{fileId}/comments/{commentId}/replies/{replyId}")
 11799  	urls += "?" + c.urlParams_.Encode()
 11800  	req, err := http.NewRequest("PATCH", urls, body)
 11801  	if err != nil {
 11802  		return nil, err
 11803  	}
 11804  	req.Header = reqHeaders
 11805  	googleapi.Expand(req.URL, map[string]string{
 11806  		"fileId":    c.fileId,
 11807  		"commentId": c.commentId,
 11808  		"replyId":   c.replyId,
 11809  	})
 11810  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
 11811  }
 11812  
 11813  // Do executes the "drive.replies.patch" call.
 11814  // Any non-2xx status code is an error. Response headers are in either
 11815  // *CommentReply.ServerResponse.Header or (if a response was returned at all)
 11816  // in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
 11817  // whether the returned error was because http.StatusNotModified was returned.
 11818  func (c *RepliesPatchCall) Do(opts ...googleapi.CallOption) (*CommentReply, error) {
 11819  	gensupport.SetOptions(c.urlParams_, opts...)
 11820  	res, err := c.doRequest("json")
 11821  	if res != nil && res.StatusCode == http.StatusNotModified {
 11822  		if res.Body != nil {
 11823  			res.Body.Close()
 11824  		}
 11825  		return nil, gensupport.WrapError(&googleapi.Error{
 11826  			Code:   res.StatusCode,
 11827  			Header: res.Header,
 11828  		})
 11829  	}
 11830  	if err != nil {
 11831  		return nil, err
 11832  	}
 11833  	defer googleapi.CloseBody(res)
 11834  	if err := googleapi.CheckResponse(res); err != nil {
 11835  		return nil, gensupport.WrapError(err)
 11836  	}
 11837  	ret := &CommentReply{
 11838  		ServerResponse: googleapi.ServerResponse{
 11839  			Header:         res.Header,
 11840  			HTTPStatusCode: res.StatusCode,
 11841  		},
 11842  	}
 11843  	target := &ret
 11844  	if err := gensupport.DecodeResponse(target, res); err != nil {
 11845  		return nil, err
 11846  	}
 11847  	return ret, nil
 11848  }
 11849  
 11850  type RepliesUpdateCall struct {
 11851  	s            *Service
 11852  	fileId       string
 11853  	commentId    string
 11854  	replyId      string
 11855  	commentreply *CommentReply
 11856  	urlParams_   gensupport.URLParams
 11857  	ctx_         context.Context
 11858  	header_      http.Header
 11859  }
 11860  
 11861  // Update: Updates an existing reply.
 11862  //
 11863  // - commentId: The ID of the comment.
 11864  // - fileId: The ID of the file.
 11865  // - replyId: The ID of the reply.
 11866  func (r *RepliesService) Update(fileId string, commentId string, replyId string, commentreply *CommentReply) *RepliesUpdateCall {
 11867  	c := &RepliesUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
 11868  	c.fileId = fileId
 11869  	c.commentId = commentId
 11870  	c.replyId = replyId
 11871  	c.commentreply = commentreply
 11872  	return c
 11873  }
 11874  
 11875  // Fields allows partial responses to be retrieved. See
 11876  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
 11877  // details.
 11878  func (c *RepliesUpdateCall) Fields(s ...googleapi.Field) *RepliesUpdateCall {
 11879  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
 11880  	return c
 11881  }
 11882  
 11883  // Context sets the context to be used in this call's Do method.
 11884  func (c *RepliesUpdateCall) Context(ctx context.Context) *RepliesUpdateCall {
 11885  	c.ctx_ = ctx
 11886  	return c
 11887  }
 11888  
 11889  // Header returns a http.Header that can be modified by the caller to add
 11890  // headers to the request.
 11891  func (c *RepliesUpdateCall) Header() http.Header {
 11892  	if c.header_ == nil {
 11893  		c.header_ = make(http.Header)
 11894  	}
 11895  	return c.header_
 11896  }
 11897  
 11898  func (c *RepliesUpdateCall) doRequest(alt string) (*http.Response, error) {
 11899  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
 11900  	var body io.Reader = nil
 11901  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.commentreply)
 11902  	if err != nil {
 11903  		return nil, err
 11904  	}
 11905  	c.urlParams_.Set("alt", alt)
 11906  	c.urlParams_.Set("prettyPrint", "false")
 11907  	urls := googleapi.ResolveRelative(c.s.BasePath, "files/{fileId}/comments/{commentId}/replies/{replyId}")
 11908  	urls += "?" + c.urlParams_.Encode()
 11909  	req, err := http.NewRequest("PUT", urls, body)
 11910  	if err != nil {
 11911  		return nil, err
 11912  	}
 11913  	req.Header = reqHeaders
 11914  	googleapi.Expand(req.URL, map[string]string{
 11915  		"fileId":    c.fileId,
 11916  		"commentId": c.commentId,
 11917  		"replyId":   c.replyId,
 11918  	})
 11919  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
 11920  }
 11921  
 11922  // Do executes the "drive.replies.update" call.
 11923  // Any non-2xx status code is an error. Response headers are in either
 11924  // *CommentReply.ServerResponse.Header or (if a response was returned at all)
 11925  // in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
 11926  // whether the returned error was because http.StatusNotModified was returned.
 11927  func (c *RepliesUpdateCall) Do(opts ...googleapi.CallOption) (*CommentReply, error) {
 11928  	gensupport.SetOptions(c.urlParams_, opts...)
 11929  	res, err := c.doRequest("json")
 11930  	if res != nil && res.StatusCode == http.StatusNotModified {
 11931  		if res.Body != nil {
 11932  			res.Body.Close()
 11933  		}
 11934  		return nil, gensupport.WrapError(&googleapi.Error{
 11935  			Code:   res.StatusCode,
 11936  			Header: res.Header,
 11937  		})
 11938  	}
 11939  	if err != nil {
 11940  		return nil, err
 11941  	}
 11942  	defer googleapi.CloseBody(res)
 11943  	if err := googleapi.CheckResponse(res); err != nil {
 11944  		return nil, gensupport.WrapError(err)
 11945  	}
 11946  	ret := &CommentReply{
 11947  		ServerResponse: googleapi.ServerResponse{
 11948  			Header:         res.Header,
 11949  			HTTPStatusCode: res.StatusCode,
 11950  		},
 11951  	}
 11952  	target := &ret
 11953  	if err := gensupport.DecodeResponse(target, res); err != nil {
 11954  		return nil, err
 11955  	}
 11956  	return ret, nil
 11957  }
 11958  
 11959  type RevisionsDeleteCall struct {
 11960  	s          *Service
 11961  	fileId     string
 11962  	revisionId string
 11963  	urlParams_ gensupport.URLParams
 11964  	ctx_       context.Context
 11965  	header_    http.Header
 11966  }
 11967  
 11968  // Delete: Permanently deletes a file version. You can only delete revisions
 11969  // for files with binary content, like images or videos. Revisions for other
 11970  // files, like Google Docs or Sheets, and the last remaining file version can't
 11971  // be deleted.
 11972  //
 11973  // - fileId: The ID of the file.
 11974  // - revisionId: The ID of the revision.
 11975  func (r *RevisionsService) Delete(fileId string, revisionId string) *RevisionsDeleteCall {
 11976  	c := &RevisionsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
 11977  	c.fileId = fileId
 11978  	c.revisionId = revisionId
 11979  	return c
 11980  }
 11981  
 11982  // Fields allows partial responses to be retrieved. See
 11983  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
 11984  // details.
 11985  func (c *RevisionsDeleteCall) Fields(s ...googleapi.Field) *RevisionsDeleteCall {
 11986  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
 11987  	return c
 11988  }
 11989  
 11990  // Context sets the context to be used in this call's Do method.
 11991  func (c *RevisionsDeleteCall) Context(ctx context.Context) *RevisionsDeleteCall {
 11992  	c.ctx_ = ctx
 11993  	return c
 11994  }
 11995  
 11996  // Header returns a http.Header that can be modified by the caller to add
 11997  // headers to the request.
 11998  func (c *RevisionsDeleteCall) Header() http.Header {
 11999  	if c.header_ == nil {
 12000  		c.header_ = make(http.Header)
 12001  	}
 12002  	return c.header_
 12003  }
 12004  
 12005  func (c *RevisionsDeleteCall) doRequest(alt string) (*http.Response, error) {
 12006  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
 12007  	var body io.Reader = nil
 12008  	c.urlParams_.Set("alt", alt)
 12009  	c.urlParams_.Set("prettyPrint", "false")
 12010  	urls := googleapi.ResolveRelative(c.s.BasePath, "files/{fileId}/revisions/{revisionId}")
 12011  	urls += "?" + c.urlParams_.Encode()
 12012  	req, err := http.NewRequest("DELETE", urls, body)
 12013  	if err != nil {
 12014  		return nil, err
 12015  	}
 12016  	req.Header = reqHeaders
 12017  	googleapi.Expand(req.URL, map[string]string{
 12018  		"fileId":     c.fileId,
 12019  		"revisionId": c.revisionId,
 12020  	})
 12021  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
 12022  }
 12023  
 12024  // Do executes the "drive.revisions.delete" call.
 12025  func (c *RevisionsDeleteCall) Do(opts ...googleapi.CallOption) error {
 12026  	gensupport.SetOptions(c.urlParams_, opts...)
 12027  	res, err := c.doRequest("json")
 12028  	if err != nil {
 12029  		return err
 12030  	}
 12031  	defer googleapi.CloseBody(res)
 12032  	if err := googleapi.CheckResponse(res); err != nil {
 12033  		return gensupport.WrapError(err)
 12034  	}
 12035  	return nil
 12036  }
 12037  
 12038  type RevisionsGetCall struct {
 12039  	s            *Service
 12040  	fileId       string
 12041  	revisionId   string
 12042  	urlParams_   gensupport.URLParams
 12043  	ifNoneMatch_ string
 12044  	ctx_         context.Context
 12045  	header_      http.Header
 12046  }
 12047  
 12048  // Get: Gets a specific revision.
 12049  //
 12050  // - fileId: The ID of the file.
 12051  // - revisionId: The ID of the revision.
 12052  func (r *RevisionsService) Get(fileId string, revisionId string) *RevisionsGetCall {
 12053  	c := &RevisionsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
 12054  	c.fileId = fileId
 12055  	c.revisionId = revisionId
 12056  	return c
 12057  }
 12058  
 12059  // Fields allows partial responses to be retrieved. See
 12060  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
 12061  // details.
 12062  func (c *RevisionsGetCall) Fields(s ...googleapi.Field) *RevisionsGetCall {
 12063  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
 12064  	return c
 12065  }
 12066  
 12067  // IfNoneMatch sets an optional parameter which makes the operation fail if the
 12068  // object's ETag matches the given value. This is useful for getting updates
 12069  // only after the object has changed since the last request.
 12070  func (c *RevisionsGetCall) IfNoneMatch(entityTag string) *RevisionsGetCall {
 12071  	c.ifNoneMatch_ = entityTag
 12072  	return c
 12073  }
 12074  
 12075  // Context sets the context to be used in this call's Do method.
 12076  func (c *RevisionsGetCall) Context(ctx context.Context) *RevisionsGetCall {
 12077  	c.ctx_ = ctx
 12078  	return c
 12079  }
 12080  
 12081  // Header returns a http.Header that can be modified by the caller to add
 12082  // headers to the request.
 12083  func (c *RevisionsGetCall) Header() http.Header {
 12084  	if c.header_ == nil {
 12085  		c.header_ = make(http.Header)
 12086  	}
 12087  	return c.header_
 12088  }
 12089  
 12090  func (c *RevisionsGetCall) doRequest(alt string) (*http.Response, error) {
 12091  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
 12092  	if c.ifNoneMatch_ != "" {
 12093  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
 12094  	}
 12095  	var body io.Reader = nil
 12096  	c.urlParams_.Set("alt", alt)
 12097  	c.urlParams_.Set("prettyPrint", "false")
 12098  	urls := googleapi.ResolveRelative(c.s.BasePath, "files/{fileId}/revisions/{revisionId}")
 12099  	urls += "?" + c.urlParams_.Encode()
 12100  	req, err := http.NewRequest("GET", urls, body)
 12101  	if err != nil {
 12102  		return nil, err
 12103  	}
 12104  	req.Header = reqHeaders
 12105  	googleapi.Expand(req.URL, map[string]string{
 12106  		"fileId":     c.fileId,
 12107  		"revisionId": c.revisionId,
 12108  	})
 12109  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
 12110  }
 12111  
 12112  // Do executes the "drive.revisions.get" call.
 12113  // Any non-2xx status code is an error. Response headers are in either
 12114  // *Revision.ServerResponse.Header or (if a response was returned at all) in
 12115  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
 12116  // whether the returned error was because http.StatusNotModified was returned.
 12117  func (c *RevisionsGetCall) Do(opts ...googleapi.CallOption) (*Revision, error) {
 12118  	gensupport.SetOptions(c.urlParams_, opts...)
 12119  	res, err := c.doRequest("json")
 12120  	if res != nil && res.StatusCode == http.StatusNotModified {
 12121  		if res.Body != nil {
 12122  			res.Body.Close()
 12123  		}
 12124  		return nil, gensupport.WrapError(&googleapi.Error{
 12125  			Code:   res.StatusCode,
 12126  			Header: res.Header,
 12127  		})
 12128  	}
 12129  	if err != nil {
 12130  		return nil, err
 12131  	}
 12132  	defer googleapi.CloseBody(res)
 12133  	if err := googleapi.CheckResponse(res); err != nil {
 12134  		return nil, gensupport.WrapError(err)
 12135  	}
 12136  	ret := &Revision{
 12137  		ServerResponse: googleapi.ServerResponse{
 12138  			Header:         res.Header,
 12139  			HTTPStatusCode: res.StatusCode,
 12140  		},
 12141  	}
 12142  	target := &ret
 12143  	if err := gensupport.DecodeResponse(target, res); err != nil {
 12144  		return nil, err
 12145  	}
 12146  	return ret, nil
 12147  }
 12148  
 12149  type RevisionsListCall struct {
 12150  	s            *Service
 12151  	fileId       string
 12152  	urlParams_   gensupport.URLParams
 12153  	ifNoneMatch_ string
 12154  	ctx_         context.Context
 12155  	header_      http.Header
 12156  }
 12157  
 12158  // List: Lists a file's revisions.
 12159  //
 12160  // - fileId: The ID of the file.
 12161  func (r *RevisionsService) List(fileId string) *RevisionsListCall {
 12162  	c := &RevisionsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
 12163  	c.fileId = fileId
 12164  	return c
 12165  }
 12166  
 12167  // MaxResults sets the optional parameter "maxResults": Maximum number of
 12168  // revisions to return.
 12169  func (c *RevisionsListCall) MaxResults(maxResults int64) *RevisionsListCall {
 12170  	c.urlParams_.Set("maxResults", fmt.Sprint(maxResults))
 12171  	return c
 12172  }
 12173  
 12174  // PageToken sets the optional parameter "pageToken": Page token for revisions.
 12175  // To get the next page of results, set this parameter to the value of
 12176  // "nextPageToken" from the previous response.
 12177  func (c *RevisionsListCall) PageToken(pageToken string) *RevisionsListCall {
 12178  	c.urlParams_.Set("pageToken", pageToken)
 12179  	return c
 12180  }
 12181  
 12182  // Fields allows partial responses to be retrieved. See
 12183  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
 12184  // details.
 12185  func (c *RevisionsListCall) Fields(s ...googleapi.Field) *RevisionsListCall {
 12186  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
 12187  	return c
 12188  }
 12189  
 12190  // IfNoneMatch sets an optional parameter which makes the operation fail if the
 12191  // object's ETag matches the given value. This is useful for getting updates
 12192  // only after the object has changed since the last request.
 12193  func (c *RevisionsListCall) IfNoneMatch(entityTag string) *RevisionsListCall {
 12194  	c.ifNoneMatch_ = entityTag
 12195  	return c
 12196  }
 12197  
 12198  // Context sets the context to be used in this call's Do method.
 12199  func (c *RevisionsListCall) Context(ctx context.Context) *RevisionsListCall {
 12200  	c.ctx_ = ctx
 12201  	return c
 12202  }
 12203  
 12204  // Header returns a http.Header that can be modified by the caller to add
 12205  // headers to the request.
 12206  func (c *RevisionsListCall) Header() http.Header {
 12207  	if c.header_ == nil {
 12208  		c.header_ = make(http.Header)
 12209  	}
 12210  	return c.header_
 12211  }
 12212  
 12213  func (c *RevisionsListCall) doRequest(alt string) (*http.Response, error) {
 12214  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
 12215  	if c.ifNoneMatch_ != "" {
 12216  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
 12217  	}
 12218  	var body io.Reader = nil
 12219  	c.urlParams_.Set("alt", alt)
 12220  	c.urlParams_.Set("prettyPrint", "false")
 12221  	urls := googleapi.ResolveRelative(c.s.BasePath, "files/{fileId}/revisions")
 12222  	urls += "?" + c.urlParams_.Encode()
 12223  	req, err := http.NewRequest("GET", urls, body)
 12224  	if err != nil {
 12225  		return nil, err
 12226  	}
 12227  	req.Header = reqHeaders
 12228  	googleapi.Expand(req.URL, map[string]string{
 12229  		"fileId": c.fileId,
 12230  	})
 12231  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
 12232  }
 12233  
 12234  // Do executes the "drive.revisions.list" call.
 12235  // Any non-2xx status code is an error. Response headers are in either
 12236  // *RevisionList.ServerResponse.Header or (if a response was returned at all)
 12237  // in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
 12238  // whether the returned error was because http.StatusNotModified was returned.
 12239  func (c *RevisionsListCall) Do(opts ...googleapi.CallOption) (*RevisionList, error) {
 12240  	gensupport.SetOptions(c.urlParams_, opts...)
 12241  	res, err := c.doRequest("json")
 12242  	if res != nil && res.StatusCode == http.StatusNotModified {
 12243  		if res.Body != nil {
 12244  			res.Body.Close()
 12245  		}
 12246  		return nil, gensupport.WrapError(&googleapi.Error{
 12247  			Code:   res.StatusCode,
 12248  			Header: res.Header,
 12249  		})
 12250  	}
 12251  	if err != nil {
 12252  		return nil, err
 12253  	}
 12254  	defer googleapi.CloseBody(res)
 12255  	if err := googleapi.CheckResponse(res); err != nil {
 12256  		return nil, gensupport.WrapError(err)
 12257  	}
 12258  	ret := &RevisionList{
 12259  		ServerResponse: googleapi.ServerResponse{
 12260  			Header:         res.Header,
 12261  			HTTPStatusCode: res.StatusCode,
 12262  		},
 12263  	}
 12264  	target := &ret
 12265  	if err := gensupport.DecodeResponse(target, res); err != nil {
 12266  		return nil, err
 12267  	}
 12268  	return ret, nil
 12269  }
 12270  
 12271  // Pages invokes f for each page of results.
 12272  // A non-nil error returned from f will halt the iteration.
 12273  // The provided context supersedes any context provided to the Context method.
 12274  func (c *RevisionsListCall) Pages(ctx context.Context, f func(*RevisionList) error) error {
 12275  	c.ctx_ = ctx
 12276  	defer c.PageToken(c.urlParams_.Get("pageToken"))
 12277  	for {
 12278  		x, err := c.Do()
 12279  		if err != nil {
 12280  			return err
 12281  		}
 12282  		if err := f(x); err != nil {
 12283  			return err
 12284  		}
 12285  		if x.NextPageToken == "" {
 12286  			return nil
 12287  		}
 12288  		c.PageToken(x.NextPageToken)
 12289  	}
 12290  }
 12291  
 12292  type RevisionsPatchCall struct {
 12293  	s          *Service
 12294  	fileId     string
 12295  	revisionId string
 12296  	revision   *Revision
 12297  	urlParams_ gensupport.URLParams
 12298  	ctx_       context.Context
 12299  	header_    http.Header
 12300  }
 12301  
 12302  // Patch: Updates a revision.
 12303  //
 12304  // - fileId: The ID for the file.
 12305  // - revisionId: The ID for the revision.
 12306  func (r *RevisionsService) Patch(fileId string, revisionId string, revision *Revision) *RevisionsPatchCall {
 12307  	c := &RevisionsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
 12308  	c.fileId = fileId
 12309  	c.revisionId = revisionId
 12310  	c.revision = revision
 12311  	return c
 12312  }
 12313  
 12314  // Fields allows partial responses to be retrieved. See
 12315  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
 12316  // details.
 12317  func (c *RevisionsPatchCall) Fields(s ...googleapi.Field) *RevisionsPatchCall {
 12318  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
 12319  	return c
 12320  }
 12321  
 12322  // Context sets the context to be used in this call's Do method.
 12323  func (c *RevisionsPatchCall) Context(ctx context.Context) *RevisionsPatchCall {
 12324  	c.ctx_ = ctx
 12325  	return c
 12326  }
 12327  
 12328  // Header returns a http.Header that can be modified by the caller to add
 12329  // headers to the request.
 12330  func (c *RevisionsPatchCall) Header() http.Header {
 12331  	if c.header_ == nil {
 12332  		c.header_ = make(http.Header)
 12333  	}
 12334  	return c.header_
 12335  }
 12336  
 12337  func (c *RevisionsPatchCall) doRequest(alt string) (*http.Response, error) {
 12338  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
 12339  	var body io.Reader = nil
 12340  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.revision)
 12341  	if err != nil {
 12342  		return nil, err
 12343  	}
 12344  	c.urlParams_.Set("alt", alt)
 12345  	c.urlParams_.Set("prettyPrint", "false")
 12346  	urls := googleapi.ResolveRelative(c.s.BasePath, "files/{fileId}/revisions/{revisionId}")
 12347  	urls += "?" + c.urlParams_.Encode()
 12348  	req, err := http.NewRequest("PATCH", urls, body)
 12349  	if err != nil {
 12350  		return nil, err
 12351  	}
 12352  	req.Header = reqHeaders
 12353  	googleapi.Expand(req.URL, map[string]string{
 12354  		"fileId":     c.fileId,
 12355  		"revisionId": c.revisionId,
 12356  	})
 12357  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
 12358  }
 12359  
 12360  // Do executes the "drive.revisions.patch" call.
 12361  // Any non-2xx status code is an error. Response headers are in either
 12362  // *Revision.ServerResponse.Header or (if a response was returned at all) in
 12363  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
 12364  // whether the returned error was because http.StatusNotModified was returned.
 12365  func (c *RevisionsPatchCall) Do(opts ...googleapi.CallOption) (*Revision, error) {
 12366  	gensupport.SetOptions(c.urlParams_, opts...)
 12367  	res, err := c.doRequest("json")
 12368  	if res != nil && res.StatusCode == http.StatusNotModified {
 12369  		if res.Body != nil {
 12370  			res.Body.Close()
 12371  		}
 12372  		return nil, gensupport.WrapError(&googleapi.Error{
 12373  			Code:   res.StatusCode,
 12374  			Header: res.Header,
 12375  		})
 12376  	}
 12377  	if err != nil {
 12378  		return nil, err
 12379  	}
 12380  	defer googleapi.CloseBody(res)
 12381  	if err := googleapi.CheckResponse(res); err != nil {
 12382  		return nil, gensupport.WrapError(err)
 12383  	}
 12384  	ret := &Revision{
 12385  		ServerResponse: googleapi.ServerResponse{
 12386  			Header:         res.Header,
 12387  			HTTPStatusCode: res.StatusCode,
 12388  		},
 12389  	}
 12390  	target := &ret
 12391  	if err := gensupport.DecodeResponse(target, res); err != nil {
 12392  		return nil, err
 12393  	}
 12394  	return ret, nil
 12395  }
 12396  
 12397  type RevisionsUpdateCall struct {
 12398  	s          *Service
 12399  	fileId     string
 12400  	revisionId string
 12401  	revision   *Revision
 12402  	urlParams_ gensupport.URLParams
 12403  	ctx_       context.Context
 12404  	header_    http.Header
 12405  }
 12406  
 12407  // Update: Updates a revision.
 12408  //
 12409  // - fileId: The ID for the file.
 12410  // - revisionId: The ID for the revision.
 12411  func (r *RevisionsService) Update(fileId string, revisionId string, revision *Revision) *RevisionsUpdateCall {
 12412  	c := &RevisionsUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
 12413  	c.fileId = fileId
 12414  	c.revisionId = revisionId
 12415  	c.revision = revision
 12416  	return c
 12417  }
 12418  
 12419  // Fields allows partial responses to be retrieved. See
 12420  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
 12421  // details.
 12422  func (c *RevisionsUpdateCall) Fields(s ...googleapi.Field) *RevisionsUpdateCall {
 12423  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
 12424  	return c
 12425  }
 12426  
 12427  // Context sets the context to be used in this call's Do method.
 12428  func (c *RevisionsUpdateCall) Context(ctx context.Context) *RevisionsUpdateCall {
 12429  	c.ctx_ = ctx
 12430  	return c
 12431  }
 12432  
 12433  // Header returns a http.Header that can be modified by the caller to add
 12434  // headers to the request.
 12435  func (c *RevisionsUpdateCall) Header() http.Header {
 12436  	if c.header_ == nil {
 12437  		c.header_ = make(http.Header)
 12438  	}
 12439  	return c.header_
 12440  }
 12441  
 12442  func (c *RevisionsUpdateCall) doRequest(alt string) (*http.Response, error) {
 12443  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
 12444  	var body io.Reader = nil
 12445  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.revision)
 12446  	if err != nil {
 12447  		return nil, err
 12448  	}
 12449  	c.urlParams_.Set("alt", alt)
 12450  	c.urlParams_.Set("prettyPrint", "false")
 12451  	urls := googleapi.ResolveRelative(c.s.BasePath, "files/{fileId}/revisions/{revisionId}")
 12452  	urls += "?" + c.urlParams_.Encode()
 12453  	req, err := http.NewRequest("PUT", urls, body)
 12454  	if err != nil {
 12455  		return nil, err
 12456  	}
 12457  	req.Header = reqHeaders
 12458  	googleapi.Expand(req.URL, map[string]string{
 12459  		"fileId":     c.fileId,
 12460  		"revisionId": c.revisionId,
 12461  	})
 12462  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
 12463  }
 12464  
 12465  // Do executes the "drive.revisions.update" call.
 12466  // Any non-2xx status code is an error. Response headers are in either
 12467  // *Revision.ServerResponse.Header or (if a response was returned at all) in
 12468  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
 12469  // whether the returned error was because http.StatusNotModified was returned.
 12470  func (c *RevisionsUpdateCall) Do(opts ...googleapi.CallOption) (*Revision, error) {
 12471  	gensupport.SetOptions(c.urlParams_, opts...)
 12472  	res, err := c.doRequest("json")
 12473  	if res != nil && res.StatusCode == http.StatusNotModified {
 12474  		if res.Body != nil {
 12475  			res.Body.Close()
 12476  		}
 12477  		return nil, gensupport.WrapError(&googleapi.Error{
 12478  			Code:   res.StatusCode,
 12479  			Header: res.Header,
 12480  		})
 12481  	}
 12482  	if err != nil {
 12483  		return nil, err
 12484  	}
 12485  	defer googleapi.CloseBody(res)
 12486  	if err := googleapi.CheckResponse(res); err != nil {
 12487  		return nil, gensupport.WrapError(err)
 12488  	}
 12489  	ret := &Revision{
 12490  		ServerResponse: googleapi.ServerResponse{
 12491  			Header:         res.Header,
 12492  			HTTPStatusCode: res.StatusCode,
 12493  		},
 12494  	}
 12495  	target := &ret
 12496  	if err := gensupport.DecodeResponse(target, res); err != nil {
 12497  		return nil, err
 12498  	}
 12499  	return ret, nil
 12500  }
 12501  
 12502  type TeamdrivesDeleteCall struct {
 12503  	s           *Service
 12504  	teamDriveId string
 12505  	urlParams_  gensupport.URLParams
 12506  	ctx_        context.Context
 12507  	header_     http.Header
 12508  }
 12509  
 12510  // Delete: Deprecated: Use `drives.delete` instead.
 12511  //
 12512  // - teamDriveId: The ID of the Team Drive.
 12513  func (r *TeamdrivesService) Delete(teamDriveId string) *TeamdrivesDeleteCall {
 12514  	c := &TeamdrivesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
 12515  	c.teamDriveId = teamDriveId
 12516  	return c
 12517  }
 12518  
 12519  // Fields allows partial responses to be retrieved. See
 12520  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
 12521  // details.
 12522  func (c *TeamdrivesDeleteCall) Fields(s ...googleapi.Field) *TeamdrivesDeleteCall {
 12523  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
 12524  	return c
 12525  }
 12526  
 12527  // Context sets the context to be used in this call's Do method.
 12528  func (c *TeamdrivesDeleteCall) Context(ctx context.Context) *TeamdrivesDeleteCall {
 12529  	c.ctx_ = ctx
 12530  	return c
 12531  }
 12532  
 12533  // Header returns a http.Header that can be modified by the caller to add
 12534  // headers to the request.
 12535  func (c *TeamdrivesDeleteCall) Header() http.Header {
 12536  	if c.header_ == nil {
 12537  		c.header_ = make(http.Header)
 12538  	}
 12539  	return c.header_
 12540  }
 12541  
 12542  func (c *TeamdrivesDeleteCall) doRequest(alt string) (*http.Response, error) {
 12543  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
 12544  	var body io.Reader = nil
 12545  	c.urlParams_.Set("alt", alt)
 12546  	c.urlParams_.Set("prettyPrint", "false")
 12547  	urls := googleapi.ResolveRelative(c.s.BasePath, "teamdrives/{teamDriveId}")
 12548  	urls += "?" + c.urlParams_.Encode()
 12549  	req, err := http.NewRequest("DELETE", urls, body)
 12550  	if err != nil {
 12551  		return nil, err
 12552  	}
 12553  	req.Header = reqHeaders
 12554  	googleapi.Expand(req.URL, map[string]string{
 12555  		"teamDriveId": c.teamDriveId,
 12556  	})
 12557  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
 12558  }
 12559  
 12560  // Do executes the "drive.teamdrives.delete" call.
 12561  func (c *TeamdrivesDeleteCall) Do(opts ...googleapi.CallOption) error {
 12562  	gensupport.SetOptions(c.urlParams_, opts...)
 12563  	res, err := c.doRequest("json")
 12564  	if err != nil {
 12565  		return err
 12566  	}
 12567  	defer googleapi.CloseBody(res)
 12568  	if err := googleapi.CheckResponse(res); err != nil {
 12569  		return gensupport.WrapError(err)
 12570  	}
 12571  	return nil
 12572  }
 12573  
 12574  type TeamdrivesGetCall struct {
 12575  	s            *Service
 12576  	teamDriveId  string
 12577  	urlParams_   gensupport.URLParams
 12578  	ifNoneMatch_ string
 12579  	ctx_         context.Context
 12580  	header_      http.Header
 12581  }
 12582  
 12583  // Get: Deprecated: Use `drives.get` instead.
 12584  //
 12585  // - teamDriveId: The ID of the Team Drive.
 12586  func (r *TeamdrivesService) Get(teamDriveId string) *TeamdrivesGetCall {
 12587  	c := &TeamdrivesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
 12588  	c.teamDriveId = teamDriveId
 12589  	return c
 12590  }
 12591  
 12592  // UseDomainAdminAccess sets the optional parameter "useDomainAdminAccess":
 12593  // Issue the request as a domain administrator; if set to true, then the
 12594  // requester will be granted access if they are an administrator of the domain
 12595  // to which the Team Drive belongs.
 12596  func (c *TeamdrivesGetCall) UseDomainAdminAccess(useDomainAdminAccess bool) *TeamdrivesGetCall {
 12597  	c.urlParams_.Set("useDomainAdminAccess", fmt.Sprint(useDomainAdminAccess))
 12598  	return c
 12599  }
 12600  
 12601  // Fields allows partial responses to be retrieved. See
 12602  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
 12603  // details.
 12604  func (c *TeamdrivesGetCall) Fields(s ...googleapi.Field) *TeamdrivesGetCall {
 12605  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
 12606  	return c
 12607  }
 12608  
 12609  // IfNoneMatch sets an optional parameter which makes the operation fail if the
 12610  // object's ETag matches the given value. This is useful for getting updates
 12611  // only after the object has changed since the last request.
 12612  func (c *TeamdrivesGetCall) IfNoneMatch(entityTag string) *TeamdrivesGetCall {
 12613  	c.ifNoneMatch_ = entityTag
 12614  	return c
 12615  }
 12616  
 12617  // Context sets the context to be used in this call's Do method.
 12618  func (c *TeamdrivesGetCall) Context(ctx context.Context) *TeamdrivesGetCall {
 12619  	c.ctx_ = ctx
 12620  	return c
 12621  }
 12622  
 12623  // Header returns a http.Header that can be modified by the caller to add
 12624  // headers to the request.
 12625  func (c *TeamdrivesGetCall) Header() http.Header {
 12626  	if c.header_ == nil {
 12627  		c.header_ = make(http.Header)
 12628  	}
 12629  	return c.header_
 12630  }
 12631  
 12632  func (c *TeamdrivesGetCall) doRequest(alt string) (*http.Response, error) {
 12633  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
 12634  	if c.ifNoneMatch_ != "" {
 12635  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
 12636  	}
 12637  	var body io.Reader = nil
 12638  	c.urlParams_.Set("alt", alt)
 12639  	c.urlParams_.Set("prettyPrint", "false")
 12640  	urls := googleapi.ResolveRelative(c.s.BasePath, "teamdrives/{teamDriveId}")
 12641  	urls += "?" + c.urlParams_.Encode()
 12642  	req, err := http.NewRequest("GET", urls, body)
 12643  	if err != nil {
 12644  		return nil, err
 12645  	}
 12646  	req.Header = reqHeaders
 12647  	googleapi.Expand(req.URL, map[string]string{
 12648  		"teamDriveId": c.teamDriveId,
 12649  	})
 12650  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
 12651  }
 12652  
 12653  // Do executes the "drive.teamdrives.get" call.
 12654  // Any non-2xx status code is an error. Response headers are in either
 12655  // *TeamDrive.ServerResponse.Header or (if a response was returned at all) in
 12656  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
 12657  // whether the returned error was because http.StatusNotModified was returned.
 12658  func (c *TeamdrivesGetCall) Do(opts ...googleapi.CallOption) (*TeamDrive, error) {
 12659  	gensupport.SetOptions(c.urlParams_, opts...)
 12660  	res, err := c.doRequest("json")
 12661  	if res != nil && res.StatusCode == http.StatusNotModified {
 12662  		if res.Body != nil {
 12663  			res.Body.Close()
 12664  		}
 12665  		return nil, gensupport.WrapError(&googleapi.Error{
 12666  			Code:   res.StatusCode,
 12667  			Header: res.Header,
 12668  		})
 12669  	}
 12670  	if err != nil {
 12671  		return nil, err
 12672  	}
 12673  	defer googleapi.CloseBody(res)
 12674  	if err := googleapi.CheckResponse(res); err != nil {
 12675  		return nil, gensupport.WrapError(err)
 12676  	}
 12677  	ret := &TeamDrive{
 12678  		ServerResponse: googleapi.ServerResponse{
 12679  			Header:         res.Header,
 12680  			HTTPStatusCode: res.StatusCode,
 12681  		},
 12682  	}
 12683  	target := &ret
 12684  	if err := gensupport.DecodeResponse(target, res); err != nil {
 12685  		return nil, err
 12686  	}
 12687  	return ret, nil
 12688  }
 12689  
 12690  type TeamdrivesInsertCall struct {
 12691  	s          *Service
 12692  	teamdrive  *TeamDrive
 12693  	urlParams_ gensupport.URLParams
 12694  	ctx_       context.Context
 12695  	header_    http.Header
 12696  }
 12697  
 12698  // Insert: Deprecated: Use `drives.insert` instead.
 12699  //
 12700  //   - requestId: An ID, such as a random UUID, which uniquely identifies this
 12701  //     user's request for idempotent creation of a Team Drive. A repeated request
 12702  //     by the same user and with the same request ID will avoid creating
 12703  //     duplicates by attempting to create the same Team Drive. If the Team Drive
 12704  //     already exists a 409 error will be returned.
 12705  func (r *TeamdrivesService) Insert(requestId string, teamdrive *TeamDrive) *TeamdrivesInsertCall {
 12706  	c := &TeamdrivesInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)}
 12707  	c.urlParams_.Set("requestId", requestId)
 12708  	c.teamdrive = teamdrive
 12709  	return c
 12710  }
 12711  
 12712  // Fields allows partial responses to be retrieved. See
 12713  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
 12714  // details.
 12715  func (c *TeamdrivesInsertCall) Fields(s ...googleapi.Field) *TeamdrivesInsertCall {
 12716  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
 12717  	return c
 12718  }
 12719  
 12720  // Context sets the context to be used in this call's Do method.
 12721  func (c *TeamdrivesInsertCall) Context(ctx context.Context) *TeamdrivesInsertCall {
 12722  	c.ctx_ = ctx
 12723  	return c
 12724  }
 12725  
 12726  // Header returns a http.Header that can be modified by the caller to add
 12727  // headers to the request.
 12728  func (c *TeamdrivesInsertCall) Header() http.Header {
 12729  	if c.header_ == nil {
 12730  		c.header_ = make(http.Header)
 12731  	}
 12732  	return c.header_
 12733  }
 12734  
 12735  func (c *TeamdrivesInsertCall) doRequest(alt string) (*http.Response, error) {
 12736  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
 12737  	var body io.Reader = nil
 12738  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.teamdrive)
 12739  	if err != nil {
 12740  		return nil, err
 12741  	}
 12742  	c.urlParams_.Set("alt", alt)
 12743  	c.urlParams_.Set("prettyPrint", "false")
 12744  	urls := googleapi.ResolveRelative(c.s.BasePath, "teamdrives")
 12745  	urls += "?" + c.urlParams_.Encode()
 12746  	req, err := http.NewRequest("POST", urls, body)
 12747  	if err != nil {
 12748  		return nil, err
 12749  	}
 12750  	req.Header = reqHeaders
 12751  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
 12752  }
 12753  
 12754  // Do executes the "drive.teamdrives.insert" call.
 12755  // Any non-2xx status code is an error. Response headers are in either
 12756  // *TeamDrive.ServerResponse.Header or (if a response was returned at all) in
 12757  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
 12758  // whether the returned error was because http.StatusNotModified was returned.
 12759  func (c *TeamdrivesInsertCall) Do(opts ...googleapi.CallOption) (*TeamDrive, error) {
 12760  	gensupport.SetOptions(c.urlParams_, opts...)
 12761  	res, err := c.doRequest("json")
 12762  	if res != nil && res.StatusCode == http.StatusNotModified {
 12763  		if res.Body != nil {
 12764  			res.Body.Close()
 12765  		}
 12766  		return nil, gensupport.WrapError(&googleapi.Error{
 12767  			Code:   res.StatusCode,
 12768  			Header: res.Header,
 12769  		})
 12770  	}
 12771  	if err != nil {
 12772  		return nil, err
 12773  	}
 12774  	defer googleapi.CloseBody(res)
 12775  	if err := googleapi.CheckResponse(res); err != nil {
 12776  		return nil, gensupport.WrapError(err)
 12777  	}
 12778  	ret := &TeamDrive{
 12779  		ServerResponse: googleapi.ServerResponse{
 12780  			Header:         res.Header,
 12781  			HTTPStatusCode: res.StatusCode,
 12782  		},
 12783  	}
 12784  	target := &ret
 12785  	if err := gensupport.DecodeResponse(target, res); err != nil {
 12786  		return nil, err
 12787  	}
 12788  	return ret, nil
 12789  }
 12790  
 12791  type TeamdrivesListCall struct {
 12792  	s            *Service
 12793  	urlParams_   gensupport.URLParams
 12794  	ifNoneMatch_ string
 12795  	ctx_         context.Context
 12796  	header_      http.Header
 12797  }
 12798  
 12799  // List: Deprecated: Use `drives.list` instead.
 12800  func (r *TeamdrivesService) List() *TeamdrivesListCall {
 12801  	c := &TeamdrivesListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
 12802  	return c
 12803  }
 12804  
 12805  // MaxResults sets the optional parameter "maxResults": Maximum number of Team
 12806  // Drives to return.
 12807  func (c *TeamdrivesListCall) MaxResults(maxResults int64) *TeamdrivesListCall {
 12808  	c.urlParams_.Set("maxResults", fmt.Sprint(maxResults))
 12809  	return c
 12810  }
 12811  
 12812  // PageToken sets the optional parameter "pageToken": Page token for Team
 12813  // Drives.
 12814  func (c *TeamdrivesListCall) PageToken(pageToken string) *TeamdrivesListCall {
 12815  	c.urlParams_.Set("pageToken", pageToken)
 12816  	return c
 12817  }
 12818  
 12819  // Q sets the optional parameter "q": Query string for searching Team Drives.
 12820  func (c *TeamdrivesListCall) Q(q string) *TeamdrivesListCall {
 12821  	c.urlParams_.Set("q", q)
 12822  	return c
 12823  }
 12824  
 12825  // UseDomainAdminAccess sets the optional parameter "useDomainAdminAccess":
 12826  // Issue the request as a domain administrator; if set to true, then all Team
 12827  // Drives of the domain in which the requester is an administrator are
 12828  // returned.
 12829  func (c *TeamdrivesListCall) UseDomainAdminAccess(useDomainAdminAccess bool) *TeamdrivesListCall {
 12830  	c.urlParams_.Set("useDomainAdminAccess", fmt.Sprint(useDomainAdminAccess))
 12831  	return c
 12832  }
 12833  
 12834  // Fields allows partial responses to be retrieved. See
 12835  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
 12836  // details.
 12837  func (c *TeamdrivesListCall) Fields(s ...googleapi.Field) *TeamdrivesListCall {
 12838  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
 12839  	return c
 12840  }
 12841  
 12842  // IfNoneMatch sets an optional parameter which makes the operation fail if the
 12843  // object's ETag matches the given value. This is useful for getting updates
 12844  // only after the object has changed since the last request.
 12845  func (c *TeamdrivesListCall) IfNoneMatch(entityTag string) *TeamdrivesListCall {
 12846  	c.ifNoneMatch_ = entityTag
 12847  	return c
 12848  }
 12849  
 12850  // Context sets the context to be used in this call's Do method.
 12851  func (c *TeamdrivesListCall) Context(ctx context.Context) *TeamdrivesListCall {
 12852  	c.ctx_ = ctx
 12853  	return c
 12854  }
 12855  
 12856  // Header returns a http.Header that can be modified by the caller to add
 12857  // headers to the request.
 12858  func (c *TeamdrivesListCall) Header() http.Header {
 12859  	if c.header_ == nil {
 12860  		c.header_ = make(http.Header)
 12861  	}
 12862  	return c.header_
 12863  }
 12864  
 12865  func (c *TeamdrivesListCall) doRequest(alt string) (*http.Response, error) {
 12866  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
 12867  	if c.ifNoneMatch_ != "" {
 12868  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
 12869  	}
 12870  	var body io.Reader = nil
 12871  	c.urlParams_.Set("alt", alt)
 12872  	c.urlParams_.Set("prettyPrint", "false")
 12873  	urls := googleapi.ResolveRelative(c.s.BasePath, "teamdrives")
 12874  	urls += "?" + c.urlParams_.Encode()
 12875  	req, err := http.NewRequest("GET", urls, body)
 12876  	if err != nil {
 12877  		return nil, err
 12878  	}
 12879  	req.Header = reqHeaders
 12880  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
 12881  }
 12882  
 12883  // Do executes the "drive.teamdrives.list" call.
 12884  // Any non-2xx status code is an error. Response headers are in either
 12885  // *TeamDriveList.ServerResponse.Header or (if a response was returned at all)
 12886  // in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
 12887  // whether the returned error was because http.StatusNotModified was returned.
 12888  func (c *TeamdrivesListCall) Do(opts ...googleapi.CallOption) (*TeamDriveList, 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, gensupport.WrapError(&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, gensupport.WrapError(err)
 12906  	}
 12907  	ret := &TeamDriveList{
 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  
 12920  // Pages invokes f for each page of results.
 12921  // A non-nil error returned from f will halt the iteration.
 12922  // The provided context supersedes any context provided to the Context method.
 12923  func (c *TeamdrivesListCall) Pages(ctx context.Context, f func(*TeamDriveList) error) error {
 12924  	c.ctx_ = ctx
 12925  	defer c.PageToken(c.urlParams_.Get("pageToken"))
 12926  	for {
 12927  		x, err := c.Do()
 12928  		if err != nil {
 12929  			return err
 12930  		}
 12931  		if err := f(x); err != nil {
 12932  			return err
 12933  		}
 12934  		if x.NextPageToken == "" {
 12935  			return nil
 12936  		}
 12937  		c.PageToken(x.NextPageToken)
 12938  	}
 12939  }
 12940  
 12941  type TeamdrivesUpdateCall struct {
 12942  	s           *Service
 12943  	teamDriveId string
 12944  	teamdrive   *TeamDrive
 12945  	urlParams_  gensupport.URLParams
 12946  	ctx_        context.Context
 12947  	header_     http.Header
 12948  }
 12949  
 12950  // Update: Deprecated: Use `drives.update` instead.
 12951  //
 12952  // - teamDriveId: The ID of the Team Drive.
 12953  func (r *TeamdrivesService) Update(teamDriveId string, teamdrive *TeamDrive) *TeamdrivesUpdateCall {
 12954  	c := &TeamdrivesUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
 12955  	c.teamDriveId = teamDriveId
 12956  	c.teamdrive = teamdrive
 12957  	return c
 12958  }
 12959  
 12960  // UseDomainAdminAccess sets the optional parameter "useDomainAdminAccess":
 12961  // Issue the request as a domain administrator; if set to true, then the
 12962  // requester will be granted access if they are an administrator of the domain
 12963  // to which the Team Drive belongs.
 12964  func (c *TeamdrivesUpdateCall) UseDomainAdminAccess(useDomainAdminAccess bool) *TeamdrivesUpdateCall {
 12965  	c.urlParams_.Set("useDomainAdminAccess", fmt.Sprint(useDomainAdminAccess))
 12966  	return c
 12967  }
 12968  
 12969  // Fields allows partial responses to be retrieved. See
 12970  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
 12971  // details.
 12972  func (c *TeamdrivesUpdateCall) Fields(s ...googleapi.Field) *TeamdrivesUpdateCall {
 12973  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
 12974  	return c
 12975  }
 12976  
 12977  // Context sets the context to be used in this call's Do method.
 12978  func (c *TeamdrivesUpdateCall) Context(ctx context.Context) *TeamdrivesUpdateCall {
 12979  	c.ctx_ = ctx
 12980  	return c
 12981  }
 12982  
 12983  // Header returns a http.Header that can be modified by the caller to add
 12984  // headers to the request.
 12985  func (c *TeamdrivesUpdateCall) Header() http.Header {
 12986  	if c.header_ == nil {
 12987  		c.header_ = make(http.Header)
 12988  	}
 12989  	return c.header_
 12990  }
 12991  
 12992  func (c *TeamdrivesUpdateCall) doRequest(alt string) (*http.Response, error) {
 12993  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
 12994  	var body io.Reader = nil
 12995  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.teamdrive)
 12996  	if err != nil {
 12997  		return nil, err
 12998  	}
 12999  	c.urlParams_.Set("alt", alt)
 13000  	c.urlParams_.Set("prettyPrint", "false")
 13001  	urls := googleapi.ResolveRelative(c.s.BasePath, "teamdrives/{teamDriveId}")
 13002  	urls += "?" + c.urlParams_.Encode()
 13003  	req, err := http.NewRequest("PUT", urls, body)
 13004  	if err != nil {
 13005  		return nil, err
 13006  	}
 13007  	req.Header = reqHeaders
 13008  	googleapi.Expand(req.URL, map[string]string{
 13009  		"teamDriveId": c.teamDriveId,
 13010  	})
 13011  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
 13012  }
 13013  
 13014  // Do executes the "drive.teamdrives.update" call.
 13015  // Any non-2xx status code is an error. Response headers are in either
 13016  // *TeamDrive.ServerResponse.Header or (if a response was returned at all) in
 13017  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
 13018  // whether the returned error was because http.StatusNotModified was returned.
 13019  func (c *TeamdrivesUpdateCall) Do(opts ...googleapi.CallOption) (*TeamDrive, error) {
 13020  	gensupport.SetOptions(c.urlParams_, opts...)
 13021  	res, err := c.doRequest("json")
 13022  	if res != nil && res.StatusCode == http.StatusNotModified {
 13023  		if res.Body != nil {
 13024  			res.Body.Close()
 13025  		}
 13026  		return nil, gensupport.WrapError(&googleapi.Error{
 13027  			Code:   res.StatusCode,
 13028  			Header: res.Header,
 13029  		})
 13030  	}
 13031  	if err != nil {
 13032  		return nil, err
 13033  	}
 13034  	defer googleapi.CloseBody(res)
 13035  	if err := googleapi.CheckResponse(res); err != nil {
 13036  		return nil, gensupport.WrapError(err)
 13037  	}
 13038  	ret := &TeamDrive{
 13039  		ServerResponse: googleapi.ServerResponse{
 13040  			Header:         res.Header,
 13041  			HTTPStatusCode: res.StatusCode,
 13042  		},
 13043  	}
 13044  	target := &ret
 13045  	if err := gensupport.DecodeResponse(target, res); err != nil {
 13046  		return nil, err
 13047  	}
 13048  	return ret, nil
 13049  }
 13050  

View as plain text