blob: eb210fb85a2847c1f84cb970e8a1509fb829933b [file] [log] [blame]
// Copyright 2019 Google Inc. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
// Code generated file. DO NOT EDIT.
// Package drive provides access to the Drive API.
//
// See https://developers.google.com/drive/
//
// Usage example:
//
// import "google.golang.org/api/drive/v2"
// ...
// driveService, err := drive.New(oauthHttpClient)
package drive // import "google.golang.org/api/drive/v2"
import (
"bytes"
"context"
"encoding/json"
"errors"
"fmt"
"io"
"net/http"
"net/url"
"strconv"
"strings"
gensupport "google.golang.org/api/gensupport"
googleapi "google.golang.org/api/googleapi"
)
// Always reference these packages, just in case the auto-generated code
// below doesn't.
var _ = bytes.NewBuffer
var _ = strconv.Itoa
var _ = fmt.Sprintf
var _ = json.NewDecoder
var _ = io.Copy
var _ = url.Parse
var _ = gensupport.MarshalJSON
var _ = googleapi.Version
var _ = errors.New
var _ = strings.Replace
var _ = context.Canceled
const apiId = "drive:v2"
const apiName = "drive"
const apiVersion = "v2"
const basePath = "https://www.googleapis.com/drive/v2/"
// OAuth2 scopes used by this API.
const (
// See, edit, create, and delete all of your Google Drive files
DriveScope = "https://www.googleapis.com/auth/drive"
// View and manage its own configuration data in your Google Drive
DriveAppdataScope = "https://www.googleapis.com/auth/drive.appdata"
// View your Google Drive apps
DriveAppsReadonlyScope = "https://www.googleapis.com/auth/drive.apps.readonly"
// View and manage Google Drive files and folders that you have opened
// or created with this app
DriveFileScope = "https://www.googleapis.com/auth/drive.file"
// View and manage metadata of files in your Google Drive
DriveMetadataScope = "https://www.googleapis.com/auth/drive.metadata"
// View metadata for files in your Google Drive
DriveMetadataReadonlyScope = "https://www.googleapis.com/auth/drive.metadata.readonly"
// View the photos, videos and albums in your Google Photos
DrivePhotosReadonlyScope = "https://www.googleapis.com/auth/drive.photos.readonly"
// See and download all your Google Drive files
DriveReadonlyScope = "https://www.googleapis.com/auth/drive.readonly"
// Modify your Google Apps Script scripts' behavior
DriveScriptsScope = "https://www.googleapis.com/auth/drive.scripts"
)
func New(client *http.Client) (*Service, error) {
if client == nil {
return nil, errors.New("client is nil")
}
s := &Service{client: client, BasePath: basePath}
s.About = NewAboutService(s)
s.Apps = NewAppsService(s)
s.Changes = NewChangesService(s)
s.Channels = NewChannelsService(s)
s.Children = NewChildrenService(s)
s.Comments = NewCommentsService(s)
s.Files = NewFilesService(s)
s.Parents = NewParentsService(s)
s.Permissions = NewPermissionsService(s)
s.Properties = NewPropertiesService(s)
s.Realtime = NewRealtimeService(s)
s.Replies = NewRepliesService(s)
s.Revisions = NewRevisionsService(s)
s.Teamdrives = NewTeamdrivesService(s)
return s, nil
}
type Service struct {
client *http.Client
BasePath string // API endpoint base URL
UserAgent string // optional additional User-Agent fragment
About *AboutService
Apps *AppsService
Changes *ChangesService
Channels *ChannelsService
Children *ChildrenService
Comments *CommentsService
Files *FilesService
Parents *ParentsService
Permissions *PermissionsService
Properties *PropertiesService
Realtime *RealtimeService
Replies *RepliesService
Revisions *RevisionsService
Teamdrives *TeamdrivesService
}
func (s *Service) userAgent() string {
if s.UserAgent == "" {
return googleapi.UserAgent
}
return googleapi.UserAgent + " " + s.UserAgent
}
func NewAboutService(s *Service) *AboutService {
rs := &AboutService{s: s}
return rs
}
type AboutService struct {
s *Service
}
func NewAppsService(s *Service) *AppsService {
rs := &AppsService{s: s}
return rs
}
type AppsService struct {
s *Service
}
func NewChangesService(s *Service) *ChangesService {
rs := &ChangesService{s: s}
return rs
}
type ChangesService struct {
s *Service
}
func NewChannelsService(s *Service) *ChannelsService {
rs := &ChannelsService{s: s}
return rs
}
type ChannelsService struct {
s *Service
}
func NewChildrenService(s *Service) *ChildrenService {
rs := &ChildrenService{s: s}
return rs
}
type ChildrenService struct {
s *Service
}
func NewCommentsService(s *Service) *CommentsService {
rs := &CommentsService{s: s}
return rs
}
type CommentsService struct {
s *Service
}
func NewFilesService(s *Service) *FilesService {
rs := &FilesService{s: s}
return rs
}
type FilesService struct {
s *Service
}
func NewParentsService(s *Service) *ParentsService {
rs := &ParentsService{s: s}
return rs
}
type ParentsService struct {
s *Service
}
func NewPermissionsService(s *Service) *PermissionsService {
rs := &PermissionsService{s: s}
return rs
}
type PermissionsService struct {
s *Service
}
func NewPropertiesService(s *Service) *PropertiesService {
rs := &PropertiesService{s: s}
return rs
}
type PropertiesService struct {
s *Service
}
func NewRealtimeService(s *Service) *RealtimeService {
rs := &RealtimeService{s: s}
return rs
}
type RealtimeService struct {
s *Service
}
func NewRepliesService(s *Service) *RepliesService {
rs := &RepliesService{s: s}
return rs
}
type RepliesService struct {
s *Service
}
func NewRevisionsService(s *Service) *RevisionsService {
rs := &RevisionsService{s: s}
return rs
}
type RevisionsService struct {
s *Service
}
func NewTeamdrivesService(s *Service) *TeamdrivesService {
rs := &TeamdrivesService{s: s}
return rs
}
type TeamdrivesService struct {
s *Service
}
// About: An item with user information and settings.
type About struct {
// AdditionalRoleInfo: Information about supported additional roles per
// file type. The most specific type takes precedence.
AdditionalRoleInfo []*AboutAdditionalRoleInfo `json:"additionalRoleInfo,omitempty"`
// CanCreateTeamDrives: Whether the user can create Team Drives.
CanCreateTeamDrives bool `json:"canCreateTeamDrives,omitempty"`
// DomainSharingPolicy: The domain sharing policy for the current user.
// Possible values are:
// - allowed
// - allowedWithWarning
// - incomingOnly
// - disallowed
DomainSharingPolicy string `json:"domainSharingPolicy,omitempty"`
// Etag: The ETag of the item.
Etag string `json:"etag,omitempty"`
// ExportFormats: The allowable export formats.
ExportFormats []*AboutExportFormats `json:"exportFormats,omitempty"`
// Features: List of additional features enabled on this account.
Features []*AboutFeatures `json:"features,omitempty"`
// FolderColorPalette: The palette of allowable folder colors as RGB hex
// strings.
FolderColorPalette []string `json:"folderColorPalette,omitempty"`
// ImportFormats: The allowable import formats.
ImportFormats []*AboutImportFormats `json:"importFormats,omitempty"`
// IsCurrentAppInstalled: A boolean indicating whether the authenticated
// app is installed by the authenticated user.
IsCurrentAppInstalled bool `json:"isCurrentAppInstalled,omitempty"`
// Kind: This is always drive#about.
Kind string `json:"kind,omitempty"`
// LanguageCode: The user's language or locale code, as defined by BCP
// 47, with some extensions from Unicode's LDML format
// (http://www.unicode.org/reports/tr35/).
LanguageCode string `json:"languageCode,omitempty"`
// LargestChangeId: The largest change id.
LargestChangeId int64 `json:"largestChangeId,omitempty,string"`
// MaxUploadSizes: List of max upload sizes for each file type. The most
// specific type takes precedence.
MaxUploadSizes []*AboutMaxUploadSizes `json:"maxUploadSizes,omitempty"`
// Name: The name of the current user.
Name string `json:"name,omitempty"`
// PermissionId: The current user's ID as visible in the permissions
// collection.
PermissionId string `json:"permissionId,omitempty"`
// QuotaBytesByService: The amount of storage quota used by different
// Google services.
QuotaBytesByService []*AboutQuotaBytesByService `json:"quotaBytesByService,omitempty"`
// QuotaBytesTotal: The total number of quota bytes.
QuotaBytesTotal int64 `json:"quotaBytesTotal,omitempty,string"`
// QuotaBytesUsed: The number of quota bytes used by Google Drive.
QuotaBytesUsed int64 `json:"quotaBytesUsed,omitempty,string"`
// QuotaBytesUsedAggregate: The number of quota bytes used by all Google
// apps (Drive, Picasa, etc.).
QuotaBytesUsedAggregate int64 `json:"quotaBytesUsedAggregate,omitempty,string"`
// QuotaBytesUsedInTrash: The number of quota bytes used by trashed
// items.
QuotaBytesUsedInTrash int64 `json:"quotaBytesUsedInTrash,omitempty,string"`
// QuotaType: The type of the user's storage quota. Possible values are:
//
// - LIMITED
// - UNLIMITED
QuotaType string `json:"quotaType,omitempty"`
// RemainingChangeIds: The number of remaining change ids, limited to no
// more than 2500.
RemainingChangeIds int64 `json:"remainingChangeIds,omitempty,string"`
// RootFolderId: The id of the root folder.
RootFolderId string `json:"rootFolderId,omitempty"`
// SelfLink: A link back to this item.
SelfLink string `json:"selfLink,omitempty"`
// TeamDriveThemes: A list of themes that are supported for Team Drives.
TeamDriveThemes []*AboutTeamDriveThemes `json:"teamDriveThemes,omitempty"`
// User: The authenticated user.
User *User `json:"user,omitempty"`
// ServerResponse contains the HTTP response code and headers from the
// server.
googleapi.ServerResponse `json:"-"`
// ForceSendFields is a list of field names (e.g. "AdditionalRoleInfo")
// to unconditionally include in API requests. By default, fields with
// empty values are omitted from API requests. However, any non-pointer,
// non-interface field appearing in ForceSendFields will be sent to the
// server regardless of whether the field is empty or not. This may be
// used to include empty fields in Patch requests.
ForceSendFields []string `json:"-"`
// NullFields is a list of field names (e.g. "AdditionalRoleInfo") to
// include in API requests with the JSON null value. By default, fields
// with empty values are omitted from API requests. However, any field
// with an empty value appearing in NullFields will be sent to the
// server as null. It is an error if a field in this list has a
// non-empty value. This may be used to include null fields in Patch
// requests.
NullFields []string `json:"-"`
}
func (s *About) MarshalJSON() ([]byte, error) {
type NoMethod About
raw := NoMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
}
type AboutAdditionalRoleInfo struct {
// RoleSets: The supported additional roles per primary role.
RoleSets []*AboutAdditionalRoleInfoRoleSets `json:"roleSets,omitempty"`
// Type: The content type that this additional role info applies to.
Type string `json:"type,omitempty"`
// ForceSendFields is a list of field names (e.g. "RoleSets") to
// unconditionally include in API requests. By default, fields with
// empty values are omitted from API requests. However, any non-pointer,
// non-interface field appearing in ForceSendFields will be sent to the
// server regardless of whether the field is empty or not. This may be
// used to include empty fields in Patch requests.
ForceSendFields []string `json:"-"`
// NullFields is a list of field names (e.g. "RoleSets") to include in
// API requests with the JSON null value. By default, fields with empty
// values are omitted from API requests. However, any field with an
// empty value appearing in NullFields will be sent to the server as
// null. It is an error if a field in this list has a non-empty value.
// This may be used to include null fields in Patch requests.
NullFields []string `json:"-"`
}
func (s *AboutAdditionalRoleInfo) MarshalJSON() ([]byte, error) {
type NoMethod AboutAdditionalRoleInfo
raw := NoMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
}
type AboutAdditionalRoleInfoRoleSets struct {
// AdditionalRoles: The supported additional roles with the primary
// role.
AdditionalRoles []string `json:"additionalRoles,omitempty"`
// PrimaryRole: A primary permission role.
PrimaryRole string `json:"primaryRole,omitempty"`
// ForceSendFields is a list of field names (e.g. "AdditionalRoles") to
// unconditionally include in API requests. By default, fields with
// empty values are omitted from API requests. However, any non-pointer,
// non-interface field appearing in ForceSendFields will be sent to the
// server regardless of whether the field is empty or not. This may be
// used to include empty fields in Patch requests.
ForceSendFields []string `json:"-"`
// NullFields is a list of field names (e.g. "AdditionalRoles") to
// include in API requests with the JSON null value. By default, fields
// with empty values are omitted from API requests. However, any field
// with an empty value appearing in NullFields will be sent to the
// server as null. It is an error if a field in this list has a
// non-empty value. This may be used to include null fields in Patch
// requests.
NullFields []string `json:"-"`
}
func (s *AboutAdditionalRoleInfoRoleSets) MarshalJSON() ([]byte, error) {
type NoMethod AboutAdditionalRoleInfoRoleSets
raw := NoMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
}
type AboutExportFormats struct {
// Source: The content type to convert from.
Source string `json:"source,omitempty"`
// Targets: The possible content types to convert to.
Targets []string `json:"targets,omitempty"`
// ForceSendFields is a list of field names (e.g. "Source") to
// unconditionally include in API requests. By default, fields with
// empty values are omitted from API requests. However, any non-pointer,
// non-interface field appearing in ForceSendFields will be sent to the
// server regardless of whether the field is empty or not. This may be
// used to include empty fields in Patch requests.
ForceSendFields []string `json:"-"`
// NullFields is a list of field names (e.g. "Source") to include in API
// requests with the JSON null value. By default, fields with empty
// values are omitted from API requests. However, any field with an
// empty value appearing in NullFields will be sent to the server as
// null. It is an error if a field in this list has a non-empty value.
// This may be used to include null fields in Patch requests.
NullFields []string `json:"-"`
}
func (s *AboutExportFormats) MarshalJSON() ([]byte, error) {
type NoMethod AboutExportFormats
raw := NoMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
}
type AboutFeatures struct {
// FeatureName: The name of the feature.
FeatureName string `json:"featureName,omitempty"`
// FeatureRate: The request limit rate for this feature, in queries per
// second.
FeatureRate float64 `json:"featureRate,omitempty"`
// ForceSendFields is a list of field names (e.g. "FeatureName") to
// unconditionally include in API requests. By default, fields with
// empty values are omitted from API requests. However, any non-pointer,
// non-interface field appearing in ForceSendFields will be sent to the
// server regardless of whether the field is empty or not. This may be
// used to include empty fields in Patch requests.
ForceSendFields []string `json:"-"`
// NullFields is a list of field names (e.g. "FeatureName") to include
// in API requests with the JSON null value. By default, fields with
// empty values are omitted from API requests. However, any field with
// an empty value appearing in NullFields will be sent to the server as
// null. It is an error if a field in this list has a non-empty value.
// This may be used to include null fields in Patch requests.
NullFields []string `json:"-"`
}
func (s *AboutFeatures) MarshalJSON() ([]byte, error) {
type NoMethod AboutFeatures
raw := NoMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
}
func (s *AboutFeatures) UnmarshalJSON(data []byte) error {
type NoMethod AboutFeatures
var s1 struct {
FeatureRate gensupport.JSONFloat64 `json:"featureRate"`
*NoMethod
}
s1.NoMethod = (*NoMethod)(s)
if err := json.Unmarshal(data, &s1); err != nil {
return err
}
s.FeatureRate = float64(s1.FeatureRate)
return nil
}
type AboutImportFormats struct {
// Source: The imported file's content type to convert from.
Source string `json:"source,omitempty"`
// Targets: The possible content types to convert to.
Targets []string `json:"targets,omitempty"`
// ForceSendFields is a list of field names (e.g. "Source") to
// unconditionally include in API requests. By default, fields with
// empty values are omitted from API requests. However, any non-pointer,
// non-interface field appearing in ForceSendFields will be sent to the
// server regardless of whether the field is empty or not. This may be
// used to include empty fields in Patch requests.
ForceSendFields []string `json:"-"`
// NullFields is a list of field names (e.g. "Source") to include in API
// requests with the JSON null value. By default, fields with empty
// values are omitted from API requests. However, any field with an
// empty value appearing in NullFields will be sent to the server as
// null. It is an error if a field in this list has a non-empty value.
// This may be used to include null fields in Patch requests.
NullFields []string `json:"-"`
}
func (s *AboutImportFormats) MarshalJSON() ([]byte, error) {
type NoMethod AboutImportFormats
raw := NoMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
}
type AboutMaxUploadSizes struct {
// Size: The max upload size for this type.
Size int64 `json:"size,omitempty,string"`
// Type: The file type.
Type string `json:"type,omitempty"`
// ForceSendFields is a list of field names (e.g. "Size") to
// unconditionally include in API requests. By default, fields with
// empty values are omitted from API requests. However, any non-pointer,
// non-interface field appearing in ForceSendFields will be sent to the
// server regardless of whether the field is empty or not. This may be
// used to include empty fields in Patch requests.
ForceSendFields []string `json:"-"`
// NullFields is a list of field names (e.g. "Size") to include in API
// requests with the JSON null value. By default, fields with empty
// values are omitted from API requests. However, any field with an
// empty value appearing in NullFields will be sent to the server as
// null. It is an error if a field in this list has a non-empty value.
// This may be used to include null fields in Patch requests.
NullFields []string `json:"-"`
}
func (s *AboutMaxUploadSizes) MarshalJSON() ([]byte, error) {
type NoMethod AboutMaxUploadSizes
raw := NoMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
}
type AboutQuotaBytesByService struct {
// BytesUsed: The storage quota bytes used by the service.
BytesUsed int64 `json:"bytesUsed,omitempty,string"`
// ServiceName: The service's name, e.g. DRIVE, GMAIL, or PHOTOS.
ServiceName string `json:"serviceName,omitempty"`
// ForceSendFields is a list of field names (e.g. "BytesUsed") to
// unconditionally include in API requests. By default, fields with
// empty values are omitted from API requests. However, any non-pointer,
// non-interface field appearing in ForceSendFields will be sent to the
// server regardless of whether the field is empty or not. This may be
// used to include empty fields in Patch requests.
ForceSendFields []string `json:"-"`
// NullFields is a list of field names (e.g. "BytesUsed") to include in
// API requests with the JSON null value. By default, fields with empty
// values are omitted from API requests. However, any field with an
// empty value appearing in NullFields will be sent to the server as
// null. It is an error if a field in this list has a non-empty value.
// This may be used to include null fields in Patch requests.
NullFields []string `json:"-"`
}
func (s *AboutQuotaBytesByService) MarshalJSON() ([]byte, error) {
type NoMethod AboutQuotaBytesByService
raw := NoMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
}
type AboutTeamDriveThemes struct {
// BackgroundImageLink: A link to this Team Drive theme's background
// image.
BackgroundImageLink string `json:"backgroundImageLink,omitempty"`
// ColorRgb: The color of this Team Drive theme as an RGB hex string.
ColorRgb string `json:"colorRgb,omitempty"`
// Id: The ID of the theme.
Id string `json:"id,omitempty"`
// ForceSendFields is a list of field names (e.g. "BackgroundImageLink")
// to unconditionally include in API requests. By default, fields with
// empty values are omitted from API requests. However, any non-pointer,
// non-interface field appearing in ForceSendFields will be sent to the
// server regardless of whether the field is empty or not. This may be
// used to include empty fields in Patch requests.
ForceSendFields []string `json:"-"`
// NullFields is a list of field names (e.g. "BackgroundImageLink") to
// include in API requests with the JSON null value. By default, fields
// with empty values are omitted from API requests. However, any field
// with an empty value appearing in NullFields will be sent to the
// server as null. It is an error if a field in this list has a
// non-empty value. This may be used to include null fields in Patch
// requests.
NullFields []string `json:"-"`
}
func (s *AboutTeamDriveThemes) MarshalJSON() ([]byte, error) {
type NoMethod AboutTeamDriveThemes
raw := NoMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
}
// App: The apps resource provides a list of the apps that a user has
// installed, with information about each app's supported MIME types,
// file extensions, and other details.
type App struct {
// Authorized: Whether the app is authorized to access data on the
// user's Drive.
Authorized bool `json:"authorized,omitempty"`
// CreateInFolderTemplate: The template url to create a new file with
// this app in a given folder. The template will contain {folderId} to
// be replaced by the folder to create the new file in.
CreateInFolderTemplate string `json:"createInFolderTemplate,omitempty"`
// CreateUrl: The url to create a new file with this app.
CreateUrl string `json:"createUrl,omitempty"`
// HasDriveWideScope: Whether the app has drive-wide scope. An app with
// drive-wide scope can access all files in the user's drive.
HasDriveWideScope bool `json:"hasDriveWideScope,omitempty"`
// Icons: The various icons for the app.
Icons []*AppIcons `json:"icons,omitempty"`
// Id: The ID of the app.
Id string `json:"id,omitempty"`
// Installed: Whether the app is installed.
Installed bool `json:"installed,omitempty"`
// Kind: This is always drive#app.
Kind string `json:"kind,omitempty"`
// LongDescription: A long description of the app.
LongDescription string `json:"longDescription,omitempty"`
// Name: The name of the app.
Name string `json:"name,omitempty"`
// ObjectType: The type of object this app creates (e.g. Chart). If
// empty, the app name should be used instead.
ObjectType string `json:"objectType,omitempty"`
// OpenUrlTemplate: The template url for opening files with this app.
// The template will contain {ids} and/or {exportIds} to be replaced by
// the actual file ids. See Open Files for the full documentation.
OpenUrlTemplate string `json:"openUrlTemplate,omitempty"`
// PrimaryFileExtensions: The list of primary file extensions.
PrimaryFileExtensions []string `json:"primaryFileExtensions,omitempty"`
// PrimaryMimeTypes: The list of primary mime types.
PrimaryMimeTypes []string `json:"primaryMimeTypes,omitempty"`
// ProductId: The ID of the product listing for this app.
ProductId string `json:"productId,omitempty"`
// ProductUrl: A link to the product listing for this app.
ProductUrl string `json:"productUrl,omitempty"`
// SecondaryFileExtensions: The list of secondary file extensions.
SecondaryFileExtensions []string `json:"secondaryFileExtensions,omitempty"`
// SecondaryMimeTypes: The list of secondary mime types.
SecondaryMimeTypes []string `json:"secondaryMimeTypes,omitempty"`
// ShortDescription: A short description of the app.
ShortDescription string `json:"shortDescription,omitempty"`
// SupportsCreate: Whether this app supports creating new objects.
SupportsCreate bool `json:"supportsCreate,omitempty"`
// SupportsImport: Whether this app supports importing Google Docs.
SupportsImport bool `json:"supportsImport,omitempty"`
// SupportsMultiOpen: Whether this app supports opening more than one
// file.
SupportsMultiOpen bool `json:"supportsMultiOpen,omitempty"`
// SupportsOfflineCreate: Whether this app supports creating new files
// when offline.
SupportsOfflineCreate bool `json:"supportsOfflineCreate,omitempty"`
// UseByDefault: Whether the app is selected as the default handler for
// the types it supports.
UseByDefault bool `json:"useByDefault,omitempty"`
// ServerResponse contains the HTTP response code and headers from the
// server.
googleapi.ServerResponse `json:"-"`
// ForceSendFields is a list of field names (e.g. "Authorized") to
// unconditionally include in API requests. By default, fields with
// empty values are omitted from API requests. However, any non-pointer,
// non-interface field appearing in ForceSendFields will be sent to the
// server regardless of whether the field is empty or not. This may be
// used to include empty fields in Patch requests.
ForceSendFields []string `json:"-"`
// NullFields is a list of field names (e.g. "Authorized") to include in
// API requests with the JSON null value. By default, fields with empty
// values are omitted from API requests. However, any field with an
// empty value appearing in NullFields will be sent to the server as
// null. It is an error if a field in this list has a non-empty value.
// This may be used to include null fields in Patch requests.
NullFields []string `json:"-"`
}
func (s *App) MarshalJSON() ([]byte, error) {
type NoMethod App
raw := NoMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
}
type AppIcons struct {
// Category: Category of the icon. Allowed values are:
// - application - icon for the application
// - document - icon for a file associated with the app
// - documentShared - icon for a shared file associated with the app
Category string `json:"category,omitempty"`
// IconUrl: URL for the icon.
IconUrl string `json:"iconUrl,omitempty"`
// Size: Size of the icon. Represented as the maximum of the width and
// height.
Size int64 `json:"size,omitempty"`
// ForceSendFields is a list of field names (e.g. "Category") to
// unconditionally include in API requests. By default, fields with
// empty values are omitted from API requests. However, any non-pointer,
// non-interface field appearing in ForceSendFields will be sent to the
// server regardless of whether the field is empty or not. This may be
// used to include empty fields in Patch requests.
ForceSendFields []string `json:"-"`
// NullFields is a list of field names (e.g. "Category") to include in
// API requests with the JSON null value. By default, fields with empty
// values are omitted from API requests. However, any field with an
// empty value appearing in NullFields will be sent to the server as
// null. It is an error if a field in this list has a non-empty value.
// This may be used to include null fields in Patch requests.
NullFields []string `json:"-"`
}
func (s *AppIcons) MarshalJSON() ([]byte, error) {
type NoMethod AppIcons
raw := NoMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
}
// AppList: A list of third-party applications which the user has
// installed or given access to Google Drive.
type AppList struct {
// DefaultAppIds: List of app IDs that the user has specified to use by
// default. The list is in reverse-priority order (lowest to highest).
DefaultAppIds []string `json:"defaultAppIds,omitempty"`
// Etag: The ETag of the list.
Etag string `json:"etag,omitempty"`
// Items: The list of apps.
Items []*App `json:"items,omitempty"`
// Kind: This is always drive#appList.
Kind string `json:"kind,omitempty"`
// SelfLink: A link back to this list.
SelfLink string `json:"selfLink,omitempty"`
// ServerResponse contains the HTTP response code and headers from the
// server.
googleapi.ServerResponse `json:"-"`
// ForceSendFields is a list of field names (e.g. "DefaultAppIds") to
// unconditionally include in API requests. By default, fields with
// empty values are omitted from API requests. However, any non-pointer,
// non-interface field appearing in ForceSendFields will be sent to the
// server regardless of whether the field is empty or not. This may be
// used to include empty fields in Patch requests.
ForceSendFields []string `json:"-"`
// NullFields is a list of field names (e.g. "DefaultAppIds") to include
// in API requests with the JSON null value. By default, fields with
// empty values are omitted from API requests. However, any field with
// an empty value appearing in NullFields will be sent to the server as
// null. It is an error if a field in this list has a non-empty value.
// This may be used to include null fields in Patch requests.
NullFields []string `json:"-"`
}
func (s *AppList) MarshalJSON() ([]byte, error) {
type NoMethod AppList
raw := NoMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
}
// Change: Representation of a change to a file or Team Drive.
type Change struct {
// Deleted: Whether the file or Team Drive has been removed from this
// list of changes, for example by deletion or loss of access.
Deleted bool `json:"deleted,omitempty"`
// File: The updated state of the file. Present if the type is file and
// the file has not been removed from this list of changes.
File *File `json:"file,omitempty"`
// FileId: The ID of the file associated with this change.
FileId string `json:"fileId,omitempty"`
// Id: The ID of the change.
Id int64 `json:"id,omitempty,string"`
// Kind: This is always drive#change.
Kind string `json:"kind,omitempty"`
// ModificationDate: The time of this modification.
ModificationDate string `json:"modificationDate,omitempty"`
// SelfLink: A link back to this change.
SelfLink string `json:"selfLink,omitempty"`
// TeamDrive: The updated state of the Team Drive. Present if the type
// is teamDrive, the user is still a member of the Team Drive, and the
// Team Drive has not been deleted.
TeamDrive *TeamDrive `json:"teamDrive,omitempty"`
// TeamDriveId: The ID of the Team Drive associated with this change.
TeamDriveId string `json:"teamDriveId,omitempty"`
// Type: The type of the change. Possible values are file and teamDrive.
Type string `json:"type,omitempty"`
// ServerResponse contains the HTTP response code and headers from the
// server.
googleapi.ServerResponse `json:"-"`
// ForceSendFields is a list of field names (e.g. "Deleted") to
// unconditionally include in API requests. By default, fields with
// empty values are omitted from API requests. However, any non-pointer,
// non-interface field appearing in ForceSendFields will be sent to the
// server regardless of whether the field is empty or not. This may be
// used to include empty fields in Patch requests.
ForceSendFields []string `json:"-"`
// NullFields is a list of field names (e.g. "Deleted") to include in
// API requests with the JSON null value. By default, fields with empty
// values are omitted from API requests. However, any field with an
// empty value appearing in NullFields will be sent to the server as
// null. It is an error if a field in this list has a non-empty value.
// This may be used to include null fields in Patch requests.
NullFields []string `json:"-"`
}
func (s *Change) MarshalJSON() ([]byte, error) {
type NoMethod Change
raw := NoMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
}
// ChangeList: A list of changes for a user.
type ChangeList struct {
// Etag: The ETag of the list.
Etag string `json:"etag,omitempty"`
// Items: The list of changes. If nextPageToken is populated, then this
// list may be incomplete and an additional page of results should be
// fetched.
Items []*Change `json:"items,omitempty"`
// Kind: This is always drive#changeList.
Kind string `json:"kind,omitempty"`
// LargestChangeId: The current largest change ID.
LargestChangeId int64 `json:"largestChangeId,omitempty,string"`
// NewStartPageToken: The starting page token for future changes. This
// will be present only if the end of the current changes list has been
// reached.
NewStartPageToken string `json:"newStartPageToken,omitempty"`
// NextLink: A link to the next page of changes.
NextLink string `json:"nextLink,omitempty"`
// NextPageToken: The page token for the next page of changes. This will
// be absent if the end of the changes list has been reached. If the
// token is rejected for any reason, it should be discarded, and
// pagination should be restarted from the first page of results.
NextPageToken string `json:"nextPageToken,omitempty"`
// SelfLink: A link back to this list.
SelfLink string `json:"selfLink,omitempty"`
// ServerResponse contains the HTTP response code and headers from the
// server.
googleapi.ServerResponse `json:"-"`
// ForceSendFields is a list of field names (e.g. "Etag") to
// unconditionally include in API requests. By default, fields with
// empty values are omitted from API requests. However, any non-pointer,
// non-interface field appearing in ForceSendFields will be sent to the
// server regardless of whether the field is empty or not. This may be
// used to include empty fields in Patch requests.
ForceSendFields []string `json:"-"`
// NullFields is a list of field names (e.g. "Etag") to include in API
// requests with the JSON null value. By default, fields with empty
// values are omitted from API requests. However, any field with an
// empty value appearing in NullFields will be sent to the server as
// null. It is an error if a field in this list has a non-empty value.
// This may be used to include null fields in Patch requests.
NullFields []string `json:"-"`
}
func (s *ChangeList) MarshalJSON() ([]byte, error) {
type NoMethod ChangeList
raw := NoMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
}
// Channel: An notification channel used to watch for resource changes.
type Channel struct {
// Address: The address where notifications are delivered for this
// channel.
Address string `json:"address,omitempty"`
// Expiration: Date and time of notification channel expiration,
// expressed as a Unix timestamp, in milliseconds. Optional.
Expiration int64 `json:"expiration,omitempty,string"`
// Id: A UUID or similar unique string that identifies this channel.
Id string `json:"id,omitempty"`
// Kind: Identifies this as a notification channel used to watch for
// changes to a resource. Value: the fixed string "api#channel".
Kind string `json:"kind,omitempty"`
// Params: Additional parameters controlling delivery channel behavior.
// Optional.
Params map[string]string `json:"params,omitempty"`
// Payload: A Boolean value to indicate whether payload is wanted.
// Optional.
Payload bool `json:"payload,omitempty"`
// ResourceId: An opaque ID that identifies the resource being watched
// on this channel. Stable across different API versions.
ResourceId string `json:"resourceId,omitempty"`
// ResourceUri: A version-specific identifier for the watched resource.
ResourceUri string `json:"resourceUri,omitempty"`
// Token: An arbitrary string delivered to the target address with each
// notification delivered over this channel. Optional.
Token string `json:"token,omitempty"`
// Type: The type of delivery mechanism used for this channel.
Type string `json:"type,omitempty"`
// ServerResponse contains the HTTP response code and headers from the
// server.
googleapi.ServerResponse `json:"-"`
// ForceSendFields is a list of field names (e.g. "Address") to
// unconditionally include in API requests. By default, fields with
// empty values are omitted from API requests. However, any non-pointer,
// non-interface field appearing in ForceSendFields will be sent to the
// server regardless of whether the field is empty or not. This may be
// used to include empty fields in Patch requests.
ForceSendFields []string `json:"-"`
// NullFields is a list of field names (e.g. "Address") to include in
// API requests with the JSON null value. By default, fields with empty
// values are omitted from API requests. However, any field with an
// empty value appearing in NullFields will be sent to the server as
// null. It is an error if a field in this list has a non-empty value.
// This may be used to include null fields in Patch requests.
NullFields []string `json:"-"`
}
func (s *Channel) MarshalJSON() ([]byte, error) {
type NoMethod Channel
raw := NoMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
}
// ChildList: A list of children of a file.
type ChildList struct {
// Etag: The ETag of the list.
Etag string `json:"etag,omitempty"`
// Items: The list of children. If nextPageToken is populated, then this
// list may be incomplete and an additional page of results should be
// fetched.
Items []*ChildReference `json:"items,omitempty"`
// Kind: This is always drive#childList.
Kind string `json:"kind,omitempty"`
// NextLink: A link to the next page of children.
NextLink string `json:"nextLink,omitempty"`
// NextPageToken: The page token for the next page of children. This
// will be absent if the end of the children list has been reached. If
// the token is rejected for any reason, it should be discarded, and
// pagination should be restarted from the first page of results.
NextPageToken string `json:"nextPageToken,omitempty"`
// SelfLink: A link back to this list.
SelfLink string `json:"selfLink,omitempty"`
// ServerResponse contains the HTTP response code and headers from the
// server.
googleapi.ServerResponse `json:"-"`
// ForceSendFields is a list of field names (e.g. "Etag") to
// unconditionally include in API requests. By default, fields with
// empty values are omitted from API requests. However, any non-pointer,
// non-interface field appearing in ForceSendFields will be sent to the
// server regardless of whether the field is empty or not. This may be
// used to include empty fields in Patch requests.
ForceSendFields []string `json:"-"`
// NullFields is a list of field names (e.g. "Etag") to include in API
// requests with the JSON null value. By default, fields with empty
// values are omitted from API requests. However, any field with an
// empty value appearing in NullFields will be sent to the server as
// null. It is an error if a field in this list has a non-empty value.
// This may be used to include null fields in Patch requests.
NullFields []string `json:"-"`
}
func (s *ChildList) MarshalJSON() ([]byte, error) {
type NoMethod ChildList
raw := NoMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
}
// ChildReference: A reference to a folder's child.
type ChildReference struct {
// ChildLink: A link to the child.
ChildLink string `json:"childLink,omitempty"`
// Id: The ID of the child.
Id string `json:"id,omitempty"`
// Kind: This is always drive#childReference.
Kind string `json:"kind,omitempty"`
// SelfLink: A link back to this reference.
SelfLink string `json:"selfLink,omitempty"`
// ServerResponse contains the HTTP response code and headers from the
// server.
googleapi.ServerResponse `json:"-"`
// ForceSendFields is a list of field names (e.g. "ChildLink") to
// unconditionally include in API requests. By default, fields with
// empty values are omitted from API requests. However, any non-pointer,
// non-interface field appearing in ForceSendFields will be sent to the
// server regardless of whether the field is empty or not. This may be
// used to include empty fields in Patch requests.
ForceSendFields []string `json:"-"`
// NullFields is a list of field names (e.g. "ChildLink") to include in
// API requests with the JSON null value. By default, fields with empty
// values are omitted from API requests. However, any field with an
// empty value appearing in NullFields will be sent to the server as
// null. It is an error if a field in this list has a non-empty value.
// This may be used to include null fields in Patch requests.
NullFields []string `json:"-"`
}
func (s *ChildReference) MarshalJSON() ([]byte, error) {
type NoMethod ChildReference
raw := NoMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
}
// Comment: A comment on a file in Google Drive.
type Comment struct {
// Anchor: A region of the document represented as a JSON string. See
// anchor documentation for details on how to define and interpret
// anchor properties.
Anchor string `json:"anchor,omitempty"`
// Author: The user who wrote this comment.
Author *User `json:"author,omitempty"`
// CommentId: The ID of the comment.
CommentId string `json:"commentId,omitempty"`
// Content: The plain text content used to create this comment. This is
// not HTML safe and should only be used as a starting point to make
// edits to a comment's content.
Content string `json:"content,omitempty"`
// Context: The context of the file which is being commented on.
Context *CommentContext `json:"context,omitempty"`
// CreatedDate: The date when this comment was first created.
CreatedDate string `json:"createdDate,omitempty"`
// Deleted: Whether this comment has been deleted. If a comment has been
// deleted the content will be cleared and this will only represent a
// comment that once existed.
Deleted bool `json:"deleted,omitempty"`
// FileId: The file which this comment is addressing.
FileId string `json:"fileId,omitempty"`
// FileTitle: The title of the file which this comment is addressing.
FileTitle string `json:"fileTitle,omitempty"`
// HtmlContent: HTML formatted content for this comment.
HtmlContent string `json:"htmlContent,omitempty"`
// Kind: This is always drive#comment.
Kind string `json:"kind,omitempty"`
// ModifiedDate: The date when this comment or any of its replies were
// last modified.
ModifiedDate string `json:"modifiedDate,omitempty"`
// Replies: Replies to this post.
Replies []*CommentReply `json:"replies,omitempty"`
// SelfLink: A link back to this comment.
SelfLink string `json:"selfLink,omitempty"`
// Status: The status of this comment. Status can be changed by posting
// a reply to a comment with the desired status.
// - "open" - The comment is still open.
// - "resolved" - The comment has been resolved by one of its replies.
Status string `json:"status,omitempty"`
// ServerResponse contains the HTTP response code and headers from the
// server.
googleapi.ServerResponse `json:"-"`
// ForceSendFields is a list of field names (e.g. "Anchor") to
// unconditionally include in API requests. By default, fields with
// empty values are omitted from API requests. However, any non-pointer,
// non-interface field appearing in ForceSendFields will be sent to the
// server regardless of whether the field is empty or not. This may be
// used to include empty fields in Patch requests.
ForceSendFields []string `json:"-"`
// NullFields is a list of field names (e.g. "Anchor") to include in API
// requests with the JSON null value. By default, fields with empty
// values are omitted from API requests. However, any field with an
// empty value appearing in NullFields will be sent to the server as
// null. It is an error if a field in this list has a non-empty value.
// This may be used to include null fields in Patch requests.
NullFields []string `json:"-"`
}
func (s *Comment) MarshalJSON() ([]byte, error) {
type NoMethod Comment
raw := NoMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
}
// CommentContext: The context of the file which is being commented on.
type CommentContext struct {
// Type: The MIME type of the context snippet.
Type string `json:"type,omitempty"`
// Value: Data representation of the segment of the file being commented
// on. In the case of a text file for example, this would be the actual
// text that the comment is about.
Value string `json:"value,omitempty"`
// ForceSendFields is a list of field names (e.g. "Type") to
// unconditionally include in API requests. By default, fields with
// empty values are omitted from API requests. However, any non-pointer,
// non-interface field appearing in ForceSendFields will be sent to the
// server regardless of whether the field is empty or not. This may be
// used to include empty fields in Patch requests.
ForceSendFields []string `json:"-"`
// NullFields is a list of field names (e.g. "Type") to include in API
// requests with the JSON null value. By default, fields with empty
// values are omitted from API requests. However, any field with an
// empty value appearing in NullFields will be sent to the server as
// null. It is an error if a field in this list has a non-empty value.
// This may be used to include null fields in Patch requests.
NullFields []string `json:"-"`
}
func (s *CommentContext) MarshalJSON() ([]byte, error) {
type NoMethod CommentContext
raw := NoMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
}
// CommentList: A list of comments on a file in Google Drive.
type CommentList struct {
// Items: The list of comments. If nextPageToken is populated, then this
// list may be incomplete and an additional page of results should be
// fetched.
Items []*Comment `json:"items,omitempty"`
// Kind: This is always drive#commentList.
Kind string `json:"kind,omitempty"`
// NextLink: A link to the next page of comments.
NextLink string `json:"nextLink,omitempty"`
// NextPageToken: The page token for the next page of comments. This
// will be absent if the end of the comments list has been reached. If
// the token is rejected for any reason, it should be discarded, and
// pagination should be restarted from the first page of results.
NextPageToken string `json:"nextPageToken,omitempty"`
// SelfLink: A link back to this list.
SelfLink string `json:"selfLink,omitempty"`
// ServerResponse contains the HTTP response code and headers from the
// server.
googleapi.ServerResponse `json:"-"`
// ForceSendFields is a list of field names (e.g. "Items") to
// unconditionally include in API requests. By default, fields with
// empty values are omitted from API requests. However, any non-pointer,
// non-interface field appearing in ForceSendFields will be sent to the
// server regardless of whether the field is empty or not. This may be
// used to include empty fields in Patch requests.
ForceSendFields []string `json:"-"`
// NullFields is a list of field names (e.g. "Items") to include in API
// requests with the JSON null value. By default, fields with empty
// values are omitted from API requests. However, any field with an
// empty value appearing in NullFields will be sent to the server as
// null. It is an error if a field in this list has a non-empty value.
// This may be used to include null fields in Patch requests.
NullFields []string `json:"-"`
}
func (s *CommentList) MarshalJSON() ([]byte, error) {
type NoMethod CommentList
raw := NoMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
}
// CommentReply: A comment on a file in Google Drive.
type CommentReply struct {
// Author: The user who wrote this reply.
Author *User `json:"author,omitempty"`
// Content: The plain text content used to create this reply. This is
// not HTML safe and should only be used as a starting point to make
// edits to a reply's content. This field is required on inserts if no
// verb is specified (resolve/reopen).
Content string `json:"content,omitempty"`
// CreatedDate: The date when this reply was first created.
CreatedDate string `json:"createdDate,omitempty"`
// Deleted: Whether this reply has been deleted. If a reply has been
// deleted the content will be cleared and this will only represent a
// reply that once existed.
Deleted bool `json:"deleted,omitempty"`
// HtmlContent: HTML formatted content for this reply.
HtmlContent string `json:"htmlContent,omitempty"`
// Kind: This is always drive#commentReply.
Kind string `json:"kind,omitempty"`
// ModifiedDate: The date when this reply was last modified.
ModifiedDate string `json:"modifiedDate,omitempty"`
// ReplyId: The ID of the reply.
ReplyId string `json:"replyId,omitempty"`
// Verb: The action this reply performed to the parent comment. When
// creating a new reply this is the action to be perform to the parent
// comment. Possible values are:
// - "resolve" - To resolve a comment.
// - "reopen" - To reopen (un-resolve) a comment.
Verb string `json:"verb,omitempty"`
// ServerResponse contains the HTTP response code and headers from the
// server.
googleapi.ServerResponse `json:"-"`
// ForceSendFields is a list of field names (e.g. "Author") to
// unconditionally include in API requests. By default, fields with
// empty values are omitted from API requests. However, any non-pointer,
// non-interface field appearing in ForceSendFields will be sent to the
// server regardless of whether the field is empty or not. This may be
// used to include empty fields in Patch requests.
ForceSendFields []string `json:"-"`
// NullFields is a list of field names (e.g. "Author") to include in API
// requests with the JSON null value. By default, fields with empty
// values are omitted from API requests. However, any field with an
// empty value appearing in NullFields will be sent to the server as
// null. It is an error if a field in this list has a non-empty value.
// This may be used to include null fields in Patch requests.
NullFields []string `json:"-"`
}
func (s *CommentReply) MarshalJSON() ([]byte, error) {
type NoMethod CommentReply
raw := NoMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
}
// CommentReplyList: A list of replies to a comment on a file in Google
// Drive.
type CommentReplyList struct {
// Items: The list of replies. If nextPageToken is populated, then this
// list may be incomplete and an additional page of results should be
// fetched.
Items []*CommentReply `json:"items,omitempty"`
// Kind: This is always drive#commentReplyList.
Kind string `json:"kind,omitempty"`
// NextLink: A link to the next page of replies.
NextLink string `json:"nextLink,omitempty"`
// NextPageToken: The page token for the next page of replies. This will
// be absent if the end of the replies list has been reached. If the
// token is rejected for any reason, it should be discarded, and
// pagination should be restarted from the first page of results.
NextPageToken string `json:"nextPageToken,omitempty"`
// SelfLink: A link back to this list.
SelfLink string `json:"selfLink,omitempty"`
// ServerResponse contains the HTTP response code and headers from the
// server.
googleapi.ServerResponse `json:"-"`
// ForceSendFields is a list of field names (e.g. "Items") to
// unconditionally include in API requests. By default, fields with
// empty values are omitted from API requests. However, any non-pointer,
// non-interface field appearing in ForceSendFields will be sent to the
// server regardless of whether the field is empty or not. This may be
// used to include empty fields in Patch requests.
ForceSendFields []string `json:"-"`
// NullFields is a list of field names (e.g. "Items") to include in API
// requests with the JSON null value. By default, fields with empty
// values are omitted from API requests. However, any field with an
// empty value appearing in NullFields will be sent to the server as
// null. It is an error if a field in this list has a non-empty value.
// This may be used to include null fields in Patch requests.
NullFields []string `json:"-"`
}
func (s *CommentReplyList) MarshalJSON() ([]byte, error) {
type NoMethod CommentReplyList
raw := NoMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
}
// File: The metadata for a file.
type File struct {
// AlternateLink: A link for opening the file in a relevant Google
// editor or viewer.
AlternateLink string `json:"alternateLink,omitempty"`
// AppDataContents: Whether this file is in the Application Data folder.
AppDataContents bool `json:"appDataContents,omitempty"`
// CanComment: Deprecated: use capabilities/canComment.
CanComment bool `json:"canComment,omitempty"`
// CanReadRevisions: Deprecated: use capabilities/canReadRevisions.
CanReadRevisions bool `json:"canReadRevisions,omitempty"`
// Capabilities: Capabilities the current user has on this file. Each
// capability corresponds to a fine-grained action that a user may take.
Capabilities *FileCapabilities `json:"capabilities,omitempty"`
// CopyRequiresWriterPermission: Whether the options to copy, print, or
// download this file, should be disabled for readers and commenters.
CopyRequiresWriterPermission bool `json:"copyRequiresWriterPermission,omitempty"`
// Copyable: Deprecated: use capabilities/canCopy.
Copyable bool `json:"copyable,omitempty"`
// CreatedDate: Create time for this file (formatted RFC 3339
// timestamp).
CreatedDate string `json:"createdDate,omitempty"`
// DefaultOpenWithLink: A link to open this file with the user's default
// app for this file. Only populated when the drive.apps.readonly scope
// is used.
DefaultOpenWithLink string `json:"defaultOpenWithLink,omitempty"`
// Description: A short description of the file.
Description string `json:"description,omitempty"`
// DownloadUrl: Short lived download URL for the file. This field is
// only populated for files with content stored in Drive; it is not
// populated for Google Docs or shortcut files.
DownloadUrl string `json:"downloadUrl,omitempty"`
// Editable: Deprecated: use capabilities/canEdit.
Editable bool `json:"editable,omitempty"`
// EmbedLink: A link for embedding the file.
EmbedLink string `json:"embedLink,omitempty"`
// Etag: ETag of the file.
Etag string `json:"etag,omitempty"`
// ExplicitlyTrashed: Whether this file has been explicitly trashed, as
// opposed to recursively trashed.
ExplicitlyTrashed bool `json:"explicitlyTrashed,omitempty"`
// ExportLinks: Links for exporting Google Docs to specific formats.
ExportLinks map[string]string `json:"exportLinks,omitempty"`
// FileExtension: The final component of fullFileExtension with trailing
// text that does not appear to be part of the extension removed. This
// field is only populated for files with content stored in Drive; it is
// not populated for Google Docs or shortcut files.
FileExtension string `json:"fileExtension,omitempty"`
// FileSize: The size of the file in bytes. This field is only populated
// for files with content stored in Drive; it is not populated for
// Google Docs or shortcut files.
FileSize int64 `json:"fileSize,omitempty,string"`
// FolderColorRgb: Folder color as an RGB hex string if the file is a
// folder. The list of supported colors is available in the
// folderColorPalette field of the About resource. If an unsupported
// color is specified, it will be changed to the closest color in the
// palette. Not populated for Team Drive files.
FolderColorRgb string `json:"folderColorRgb,omitempty"`
// FullFileExtension: The full file extension; extracted from the title.
// May contain multiple concatenated extensions, such as "tar.gz".
// Removing an extension from the title does not clear this field;
// however, changing the extension on the title does update this field.
// This field is only populated for files with content stored in Drive;
// it is not populated for Google Docs or shortcut files.
FullFileExtension string `json:"fullFileExtension,omitempty"`
// HasAugmentedPermissions: Whether any users are granted file access
// directly on this file. This field is only populated for Team Drive
// files.
HasAugmentedPermissions bool `json:"hasAugmentedPermissions,omitempty"`
// HasThumbnail: Whether this file has a thumbnail. This does not
// indicate whether the requesting app has access to the thumbnail. To
// check access, look for the presence of the thumbnailLink field.
HasThumbnail bool `json:"hasThumbnail,omitempty"`
// HeadRevisionId: The ID of the file's head revision. This field is
// only populated for files with content stored in Drive; it is not
// populated for Google Docs or shortcut files.
HeadRevisionId string `json:"headRevisionId,omitempty"`
// IconLink: A link to the file's icon.
IconLink string `json:"iconLink,omitempty"`
// Id: The ID of the file.
Id string `json:"id,omitempty"`
// ImageMediaMetadata: Metadata about image media. This will only be
// present for image types, and its contents will depend on what can be
// parsed from the image content.
ImageMediaMetadata *FileImageMediaMetadata `json:"imageMediaMetadata,omitempty"`
// IndexableText: Indexable text attributes for the file (can only be
// written)
IndexableText *FileIndexableText `json:"indexableText,omitempty"`
// IsAppAuthorized: Whether the file was created or opened by the
// requesting app.
IsAppAuthorized bool `json:"isAppAuthorized,omitempty"`
// Kind: The type of file. This is always drive#file.
Kind string `json:"kind,omitempty"`
// Labels: A group of labels for the file.
Labels *FileLabels `json:"labels,omitempty"`
// LastModifyingUser: The last user to modify this file.
LastModifyingUser *User `json:"lastModifyingUser,omitempty"`
// LastModifyingUserName: Name of the last user to modify this file.
LastModifyingUserName string `json:"lastModifyingUserName,omitempty"`
// LastViewedByMeDate: Last time this file was viewed by the user
// (formatted RFC 3339 timestamp).
LastViewedByMeDate string `json:"lastViewedByMeDate,omitempty"`
// MarkedViewedByMeDate: Deprecated.
MarkedViewedByMeDate string `json:"markedViewedByMeDate,omitempty"`
// Md5Checksum: An MD5 checksum for the content of this file. This field
// is only populated for files with content stored in Drive; it is not
// populated for Google Docs or shortcut files.
Md5Checksum string `json:"md5Checksum,omitempty"`
// MimeType: The MIME type of the file. This is only mutable on update
// when uploading new content. This field can be left blank, and the
// mimetype will be determined from the uploaded content's MIME type.
MimeType string `json:"mimeType,omitempty"`
// ModifiedByMeDate: Last time this file was modified by the user
// (formatted RFC 3339 timestamp). Note that setting modifiedDate will
// also update the modifiedByMe date for the user which set the date.
ModifiedByMeDate string `json:"modifiedByMeDate,omitempty"`
// ModifiedDate: Last time this file was modified by anyone (formatted
// RFC 3339 timestamp). This is only mutable on update when the
// setModifiedDate parameter is set.
ModifiedDate string `json:"modifiedDate,omitempty"`
// OpenWithLinks: A map of the id of each of the user's apps to a link
// to open this file with that app. Only populated when the
// drive.apps.readonly scope is used.
OpenWithLinks map[string]string `json:"openWithLinks,omitempty"`
// OriginalFilename: The original filename of the uploaded content if
// available, or else the original value of the title field. This is
// only available for files with binary content in Drive.
OriginalFilename string `json:"originalFilename,omitempty"`
// OwnedByMe: Whether the file is owned by the current user. Not
// populated for Team Drive files.
OwnedByMe bool `json:"ownedByMe,omitempty"`
// OwnerNames: Name(s) of the owner(s) of this file. Not populated for
// Team Drive files.
OwnerNames []string `json:"ownerNames,omitempty"`
// Owners: The owner(s) of this file. Not populated for Team Drive
// files.
Owners []*User `json:"owners,omitempty"`
// Parents: Collection of parent folders which contain this file.
// If not specified as part of an insert request, the file will be
// placed directly in the user's My Drive folder. If not specified as
// part of a copy request, the file will inherit any discoverable
// parents of the source file. Update requests can also use the
// addParents and removeParents parameters to modify the parents list.
Parents []*ParentReference `json:"parents,omitempty"`
// PermissionIds: List of permission IDs for users with access to this
// file.
PermissionIds []string `json:"permissionIds,omitempty"`
// Permissions: The list of permissions for users with access to this
// file. Not populated for Team Drive files.
Permissions []*Permission `json:"permissions,omitempty"`
// Properties: The list of properties.
Properties []*Property `json:"properties,omitempty"`
// QuotaBytesUsed: The number of quota bytes used by this file.
QuotaBytesUsed int64 `json:"quotaBytesUsed,omitempty,string"`
// SelfLink: A link back to this file.
SelfLink string `json:"selfLink,omitempty"`
// Shareable: Deprecated: use capabilities/canShare.
Shareable bool `json:"shareable,omitempty"`
// Shared: Whether the file has been shared. Not populated for Team
// Drive files.
Shared bool `json:"shared,omitempty"`
// SharedWithMeDate: Time at which this file was shared with the user
// (formatted RFC 3339 timestamp).
SharedWithMeDate string `json:"sharedWithMeDate,omitempty"`
// SharingUser: User that shared the item with the current user, if
// available.
SharingUser *User `json:"sharingUser,omitempty"`
// Spaces: The list of spaces which contain the file. Supported values
// are 'drive', 'appDataFolder' and 'photos'.
Spaces []string `json:"spaces,omitempty"`
// TeamDriveId: ID of the Team Drive the file resides in.
TeamDriveId string `json:"teamDriveId,omitempty"`
// Thumbnail: A thumbnail for the file. This will only be used if Drive
// cannot generate a standard thumbnail.
Thumbnail *FileThumbnail `json:"thumbnail,omitempty"`
// ThumbnailLink: A short-lived link to the file's thumbnail. Typically
// lasts on the order of hours. Only populated when the requesting app
// can access the file's content.
ThumbnailLink string `json:"thumbnailLink,omitempty"`
// ThumbnailVersion: The thumbnail version for use in thumbnail cache
// invalidation.
ThumbnailVersion int64 `json:"thumbnailVersion,omitempty,string"`
// Title: The title of this file. Note that for immutable items such as
// the top level folders of Team Drives, My Drive root folder, and
// Application Data folder the title is constant.
Title string `json:"title,omitempty"`
// TrashedDate: The time that the item was trashed (formatted RFC 3339
// timestamp). Only populated for Team Drive files.
TrashedDate string `json:"trashedDate,omitempty"`
// TrashingUser: If the file has been explicitly trashed, the user who
// trashed it. Only populated for Team Drive files.
TrashingUser *User `json:"trashingUser,omitempty"`
// UserPermission: The permissions for the authenticated user on this
// file.
UserPermission *Permission `json:"userPermission,omitempty"`
// Version: A monotonically increasing version number for the file. This
// reflects every change made to the file on the server, even those not
// visible to the requesting user.
Version int64 `json:"version,omitempty,string"`
// VideoMediaMetadata: Metadata about video media. This will only be
// present for video types.
VideoMediaMetadata *FileVideoMediaMetadata `json:"videoMediaMetadata,omitempty"`
// WebContentLink: A link for downloading the content of the file in a
// browser using cookie based authentication. In cases where the content
// is shared publicly, the content can be downloaded without any
// credentials.
WebContentLink string `json:"webContentLink,omitempty"`
// WebViewLink: A link only available on public folders for viewing
// their static web assets (HTML, CSS, JS, etc) via Google Drive's
// Website Hosting.
WebViewLink string `json:"webViewLink,omitempty"`
// WritersCanShare: Whether writers can share the document with other
// users. Not populated for Team Drive files.
WritersCanShare bool `json:"writersCanShare,omitempty"`
// ServerResponse contains the HTTP response code and headers from the
// server.
googleapi.ServerResponse `json:"-"`
// ForceSendFields is a list of field names (e.g. "AlternateLink") to
// unconditionally include in API requests. By default, fields with
// empty values are omitted from API requests. However, any non-pointer,
// non-interface field appearing in ForceSendFields will be sent to the
// server regardless of whether the field is empty or not. This may be
// used to include empty fields in Patch requests.
ForceSendFields []string `json:"-"`
// NullFields is a list of field names (e.g. "AlternateLink") to include
// in API requests with the JSON null value. By default, fields with
// empty values are omitted from API requests. However, any field with
// an empty value appearing in NullFields will be sent to the server as
// null. It is an error if a field in this list has a non-empty value.
// This may be used to include null fields in Patch requests.
NullFields []string `json:"-"`
}
func (s *File) MarshalJSON() ([]byte, error) {
type NoMethod File
raw := NoMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
}
// FileCapabilities: Capabilities the current user has on this file.
// Each capability corresponds to a fine-grained action that a user may
// take.
type FileCapabilities struct {
// CanAddChildren: Whether the current user can add children to this
// folder. This is always false when the item is not a folder.
CanAddChildren bool `json:"canAddChildren,omitempty"`
// CanChangeCopyRequiresWriterPermission: Whether the current user can
// change the copyRequiresWriterPermission restriction of this file.
CanChangeCopyRequiresWriterPermission bool `json:"canChangeCopyRequiresWriterPermission,omitempty"`
// CanChangeRestrictedDownload: Deprecated
CanChangeRestrictedDownload bool `json:"canChangeRestrictedDownload,omitempty"`
// CanComment: Whether the current user can comment on this file.
CanComment bool `json:"canComment,omitempty"`
// CanCopy: Whether the current user can copy this file. For a Team
// Drive item, whether the current user can copy non-folder descendants
// of this item, or this item itself if it is not a folder.
CanCopy bool `json:"canCopy,omitempty"`
// CanDelete: Whether the current user can delete this file.
CanDelete bool `json:"canDelete,omitempty"`
// CanDeleteChildren: Whether the current user can delete children of
// this folder. This is false when the item is not a folder. Only
// populated for Team Drive items.
CanDeleteChildren bool `json:"canDeleteChildren,omitempty"`
// CanDownload: Whether the current user can download this file.
CanDownload bool `json:"canDownload,omitempty"`
// CanEdit: Whether the current user can edit this file.
CanEdit bool `json:"canEdit,omitempty"`
// CanListChildren: Whether the current user can list the children of
// this folder. This is always false when the item is not a folder.
CanListChildren bool `json:"canListChildren,omitempty"`
// CanMoveChildrenOutOfTeamDrive: Whether the current user can move
// children of this folder outside of the Team Drive. This is false when
// the item is not a folder. Only populated for Team Drive items.
CanMoveChildrenOutOfTeamDrive bool `json:"canMoveChildrenOutOfTeamDrive,omitempty"`
// CanMoveChildrenWithinTeamDrive: Whether the current user can move
// children of this folder within the Team Drive. This is false when the
// item is not a folder. Only populated for Team Drive items.
CanMoveChildrenWithinTeamDrive bool `json:"canMoveChildrenWithinTeamDrive,omitempty"`
// CanMoveItemIntoTeamDrive: Whether the current user can move this item
// into a Team Drive. If the item is in a Team Drive, this field is
// equivalent to canMoveTeamDriveItem.
CanMoveItemIntoTeamDrive bool `json:"canMoveItemIntoTeamDrive,omitempty"`
// CanMoveItemOutOfTeamDrive: Whether the current user can move this
// Team Drive item outside of this Team Drive by changing its parent.
// Note that a request to change the parent of the item may still fail
// depending on the new parent that is being added. Only populated for
// Team Drive items.
CanMoveItemOutOfTeamDrive bool `json:"canMoveItemOutOfTeamDrive,omitempty"`
// CanMoveItemWithinTeamDrive: Whether the current user can move this
// Team Drive item within this Team Drive. Note that a request to change
// the parent of the item may still fail depending on the new parent
// that is being added. Only populated for Team Drive items.
CanMoveItemWithinTeamDrive bool `json:"canMoveItemWithinTeamDrive,omitempty"`
// CanMoveTeamDriveItem: Deprecated - use canMoveItemWithinTeamDrive or
// canMoveItemOutOfTeamDrive instead.
CanMoveTeamDriveItem bool `json:"canMoveTeamDriveItem,omitempty"`
// CanReadRevisions: Whether the current user can read the revisions
// resource of this file. For a Team Drive item, whether revisions of
// non-folder descendants of this item, or this item itself if it is not
// a folder, can be read.
CanReadRevisions bool `json:"canReadRevisions,omitempty"`
// CanReadTeamDrive: Whether the current user can read the Team Drive to
// which this file belongs. Only populated for Team Drive files.
CanReadTeamDrive bool `json:"canReadTeamDrive,omitempty"`
// CanRemoveChildren: Whether the current user can remove children from
// this folder. This is always false when the item is not a folder. For
// Team Drive items, use canDeleteChildren or canTrashChildren instead.
CanRemoveChildren bool `json:"canRemoveChildren,omitempty"`
// CanRename: Whether the current user can rename this file.
CanRename bool `json:"canRename,omitempty"`
// CanShare: Whether the current user can modify the sharing settings
// for this file.
CanShare bool `json:"canShare,omitempty"`
// CanTrash: Whether the current user can move this file to trash.
CanTrash bool `json:"canTrash,omitempty"`
// CanTrashChildren: Whether the current user can trash children of this
// folder. This is false when the item is not a folder. Only populated
// for Team Drive items.
CanTrashChildren bool `json:"canTrashChildren,omitempty"`
// CanUntrash: Whether the current user can restore this file from
// trash.
CanUntrash bool `json:"canUntrash,omitempty"`
// ForceSendFields is a list of field names (e.g. "CanAddChildren") to
// unconditionally include in API requests. By default, fields with
// empty values are omitted from API requests. However, any non-pointer,
// non-interface field appearing in ForceSendFields will be sent to the
// server regardless of whether the field is empty or not. This may be
// used to include empty fields in Patch requests.
ForceSendFields []string `json:"-"`
// NullFields is a list of field names (e.g. "CanAddChildren") to
// include in API requests with the JSON null value. By default, fields
// with empty values are omitted from API requests. However, any field
// with an empty value appearing in NullFields will be sent to the
// server as null. It is an error if a field in this list has a
// non-empty value. This may be used to include null fields in Patch
// requests.
NullFields []string `json:"-"`
}
func (s *FileCapabilities) MarshalJSON() ([]byte, error) {
type NoMethod FileCapabilities
raw := NoMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
}
// FileImageMediaMetadata: Metadata about image media. This will only be
// present for image types, and its contents will depend on what can be
// parsed from the image content.
type FileImageMediaMetadata struct {
// Aperture: The aperture used to create the photo (f-number).
Aperture float64 `json:"aperture,omitempty"`
// CameraMake: The make of the camera used to create the photo.
CameraMake string `json:"cameraMake,omitempty"`
// CameraModel: The model of the camera used to create the photo.
CameraModel string `json:"cameraModel,omitempty"`
// ColorSpace: The color space of the photo.
ColorSpace string `json:"colorSpace,omitempty"`
// Date: The date and time the photo was taken (EXIF format timestamp).
Date string `json:"date,omitempty"`
// ExposureBias: The exposure bias of the photo (APEX value).
ExposureBias float64 `json:"exposureBias,omitempty"`
// ExposureMode: The exposure mode used to create the photo.
ExposureMode string `json:"exposureMode,omitempty"`
// ExposureTime: The length of the exposure, in seconds.
ExposureTime float64 `json:"exposureTime,omitempty"`
// FlashUsed: Whether a flash was used to create the photo.
FlashUsed bool `json:"flashUsed,omitempty"`
// FocalLength: The focal length used to create the photo, in
// millimeters.
FocalLength float64 `json:"focalLength,omitempty"`
// Height: The height of the image in pixels.
Height int64 `json:"height,omitempty"`
// IsoSpeed: The ISO speed used to create the photo.
IsoSpeed int64 `json:"isoSpeed,omitempty"`
// Lens: The lens used to create the photo.
Lens string `json:"lens,omitempty"`
// Location: Geographic location information stored in the image.
Location *FileImageMediaMetadataLocation `json:"location,omitempty"`
// MaxApertureValue: The smallest f-number of the lens at the focal
// length used to create the photo (APEX value).
MaxApertureValue float64 `json:"maxApertureValue,omitempty"`
// MeteringMode: The metering mode used to create the photo.
MeteringMode string `json:"meteringMode,omitempty"`
// Rotation: The rotation in clockwise degrees from the image's original
// orientation.
Rotation int64 `json:"rotation,omitempty"`
// Sensor: The type of sensor used to create the photo.
Sensor string `json:"sensor,omitempty"`
// SubjectDistance: The distance to the subject of the photo, in meters.
SubjectDistance int64 `json:"subjectDistance,omitempty"`
// WhiteBalance: The white balance mode used to create the photo.
WhiteBalance string `json:"whiteBalance,omitempty"`
// Width: The width of the image in pixels.
Width int64 `json:"width,omitempty"`
// ForceSendFields is a list of field names (e.g. "Aperture") to
// unconditionally include in API requests. By default, fields with
// empty values are omitted from API requests. However, any non-pointer,
// non-interface field appearing in ForceSendFields will be sent to the
// server regardless of whether the field is empty or not. This may be
// used to include empty fields in Patch requests.
ForceSendFields []string `json:"-"`
// NullFields is a list of field names (e.g. "Aperture") to include in
// API requests with the JSON null value. By default, fields with empty
// values are omitted from API requests. However, any field with an
// empty value appearing in NullFields will be sent to the server as
// null. It is an error if a field in this list has a non-empty value.
// This may be used to include null fields in Patch requests.
NullFields []string `json:"-"`
}
func (s *FileImageMediaMetadata) MarshalJSON() ([]byte, error) {
type NoMethod FileImageMediaMetadata
raw := NoMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
}
func (s *FileImageMediaMetadata) UnmarshalJSON(data []byte) error {
type NoMethod FileImageMediaMetadata
var s1 struct {
Aperture gensupport.JSONFloat64 `json:"aperture"`
ExposureBias gensupport.JSONFloat64 `json:"exposureBias"`
ExposureTime gensupport.JSONFloat64 `json:"exposureTime"`
FocalLength gensupport.JSONFloat64 `json:"focalLength"`
MaxApertureValue gensupport.JSONFloat64 `json:"maxApertureValue"`
*NoMethod
}
s1.NoMethod = (*NoMethod)(s)
if err := json.Unmarshal(data, &s1); err != nil {
return err
}
s.Aperture = float64(s1.Aperture)
s.ExposureBias = float64(s1.ExposureBias)
s.ExposureTime = float64(s1.ExposureTime)
s.FocalLength = float64(s1.FocalLength)
s.MaxApertureValue = float64(s1.MaxApertureValue)
return nil
}
// FileImageMediaMetadataLocation: Geographic location information
// stored in the image.
type FileImageMediaMetadataLocation struct {
// Altitude: The altitude stored in the image.
Altitude float64 `json:"altitude,omitempty"`
// Latitude: The latitude stored in the image.
Latitude float64 `json:"latitude,omitempty"`
// Longitude: The longitude stored in the image.
Longitude float64 `json:"longitude,omitempty"`
// ForceSendFields is a list of field names (e.g. "Altitude") to
// unconditionally include in API requests. By default, fields with
// empty values are omitted from API requests. However, any non-pointer,
// non-interface field appearing in ForceSendFields will be sent to the
// server regardless of whether the field is empty or not. This may be
// used to include empty fields in Patch requests.
ForceSendFields []string `json:"-"`
// NullFields is a list of field names (e.g. "Altitude") to include in
// API requests with the JSON null value. By default, fields with empty
// values are omitted from API requests. However, any field with an
// empty value appearing in NullFields will be sent to the server as
// null. It is an error if a field in this list has a non-empty value.
// This may be used to include null fields in Patch requests.
NullFields []string `json:"-"`
}
func (s *FileImageMediaMetadataLocation) MarshalJSON() ([]byte, error) {
type NoMethod FileImageMediaMetadataLocation
raw := NoMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
}
func (s *FileImageMediaMetadataLocation) UnmarshalJSON(data []byte) error {
type NoMethod FileImageMediaMetadataLocation
var s1 struct {
Altitude gensupport.JSONFloat64 `json:"altitude"`
Latitude gensupport.JSONFloat64 `json:"latitude"`
Longitude gensupport.JSONFloat64 `json:"longitude"`
*NoMethod
}
s1.NoMethod = (*NoMethod)(s)
if err := json.Unmarshal(data, &s1); err != nil {
return err
}
s.Altitude = float64(s1.Altitude)
s.Latitude = float64(s1.Latitude)
s.Longitude = float64(s1.Longitude)
return nil
}
// FileIndexableText: Indexable text attributes for the file (can only
// be written)
type FileIndexableText struct {
// Text: The text to be indexed for this file.
Text string `json:"text,omitempty"`
// ForceSendFields is a list of field names (e.g. "Text") to
// unconditionally include in API requests. By default, fields with
// empty values are omitted from API requests. However, any non-pointer,
// non-interface field appearing in ForceSendFields will be sent to the
// server regardless of whether the field is empty or not. This may be
// used to include empty fields in Patch requests.
ForceSendFields []string `json:"-"`
// NullFields is a list of field names (e.g. "Text") to include in API
// requests with the JSON null value. By default, fields with empty
// values are omitted from API requests. However, any field with an
// empty value appearing in NullFields will be sent to the server as
// null. It is an error if a field in this list has a non-empty value.
// This may be used to include null fields in Patch requests.
NullFields []string `json:"-"`
}
func (s *FileIndexableText) MarshalJSON() ([]byte, error) {
type NoMethod FileIndexableText
raw := NoMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
}
// FileLabels: A group of labels for the file.
type FileLabels struct {
// Hidden: Deprecated.
Hidden bool `json:"hidden,omitempty"`
// Modified: Whether the file has been modified by this user.
Modified bool `json:"modified,omitempty"`
// Restricted: Deprecated - use copyRequiresWriterPermission instead.
Restricted bool `json:"restricted,omitempty"`
// Starred: Whether this file is starred by the user.
Starred bool `json:"starred,omitempty"`
// Trashed: Whether this file has been trashed. This label applies to
// all users accessing the file; however, only owners are allowed to see
// and untrash files.
Trashed bool `json:"trashed,omitempty"`
// Viewed: Whether this file has been viewed by this user.
Viewed bool `json:"viewed,omitempty"`
// ForceSendFields is a list of field names (e.g. "Hidden") to
// unconditionally include in API requests. By default, fields with
// empty values are omitted from API requests. However, any non-pointer,
// non-interface field appearing in ForceSendFields will be sent to the
// server regardless of whether the field is empty or not. This may be
// used to include empty fields in Patch requests.
ForceSendFields []string `json:"-"`
// NullFields is a list of field names (e.g. "Hidden") to include in API
// requests with the JSON null value. By default, fields with empty
// values are omitted from API requests. However, any field with an
// empty value appearing in NullFields will be sent to the server as
// null. It is an error if a field in this list has a non-empty value.
// This may be used to include null fields in Patch requests.
NullFields []string `json:"-"`
}
func (s *FileLabels) MarshalJSON() ([]byte, error) {
type NoMethod FileLabels
raw := NoMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
}
// FileThumbnail: A thumbnail for the file. This will only be used if
// Drive cannot generate a standard thumbnail.
type FileThumbnail struct {
// Image: The URL-safe Base64 encoded bytes of the thumbnail image. It
// should conform to RFC 4648 section 5.
Image string `json:"image,omitempty"`
// MimeType: The MIME type of the thumbnail.
MimeType string `json:"mimeType,omitempty"`
// ForceSendFields is a list of field names (e.g. "Image") to
// unconditionally include in API requests. By default, fields with
// empty values are omitted from API requests. However, any non-pointer,
// non-interface field appearing in ForceSendFields will be sent to the
// server regardless of whether the field is empty or not. This may be
// used to include empty fields in Patch requests.
ForceSendFields []string `json:"-"`
// NullFields is a list of field names (e.g. "Image") to include in API
// requests with the JSON null value. By default, fields with empty
// values are omitted from API requests. However, any field with an
// empty value appearing in NullFields will be sent to the server as
// null. It is an error if a field in this list has a non-empty value.
// This may be used to include null fields in Patch requests.
NullFields []string `json:"-"`
}
func (s *FileThumbnail) MarshalJSON() ([]byte, error) {
type NoMethod FileThumbnail
raw := NoMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
}
// FileVideoMediaMetadata: Metadata about video media. This will only be
// present for video types.
type FileVideoMediaMetadata struct {
// DurationMillis: The duration of the video in milliseconds.
DurationMillis int64 `json:"durationMillis,omitempty,string"`
// Height: The height of the video in pixels.
Height int64 `json:"height,omitempty"`
// Width: The width of the video in pixels.
Width int64 `json:"width,omitempty"`
// ForceSendFields is a list of field names (e.g. "DurationMillis") to
// unconditionally include in API requests. By default, fields with
// empty values are omitted from API requests. However, any non-pointer,
// non-interface field appearing in ForceSendFields will be sent to the
// server regardless of whether the field is empty or not. This may be
// used to include empty fields in Patch requests.
ForceSendFields []string `json:"-"`
// NullFields is a list of field names (e.g. "DurationMillis") to
// include in API requests with the JSON null value. By default, fields
// with empty values are omitted from API requests. However, any field
// with an empty value appearing in NullFields will be sent to the
// server as null. It is an error if a field in this list has a
// non-empty value. This may be used to include null fields in Patch
// requests.
NullFields []string `json:"-"`
}
func (s *FileVideoMediaMetadata) MarshalJSON() ([]byte, error) {
type NoMethod FileVideoMediaMetadata
raw := NoMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
}
// FileList: A list of files.
type FileList struct {
// Etag: The ETag of the list.
Etag string `json:"etag,omitempty"`
// IncompleteSearch: Whether the search process was incomplete. If true,
// then some search results may be missing, since all documents were not
// searched. This may occur when searching multiple Team Drives with the
// "default,allTeamDrives" corpora, but all corpora could not be
// searched. When this happens, it is suggested that clients narrow
// their query by choosing a different corpus such as "default" or
// "teamDrive".
IncompleteSearch bool `json:"incompleteSearch,omitempty"`
// Items: The list of files. If nextPageToken is populated, then this
// list may be incomplete and an additional page of results should be
// fetched.
Items []*File `json:"items,omitempty"`
// Kind: This is always drive#fileList.
Kind string `json:"kind,omitempty"`
// NextLink: A link to the next page of files.
NextLink string `json:"nextLink,omitempty"`
// NextPageToken: The page token for the next page of files. This will
// be absent if the end of the files list has been reached. If the token
// is rejected for any reason, it should be discarded, and pagination
// should be restarted from the first page of results.
NextPageToken string `json:"nextPageToken,omitempty"`
// SelfLink: A link back to this list.
SelfLink string `json:"selfLink,omitempty"`
// ServerResponse contains the HTTP response code and headers from the
// server.
googleapi.ServerResponse `json:"-"`
// ForceSendFields is a list of field names (e.g. "Etag") to
// unconditionally include in API requests. By default, fields with
// empty values are omitted from API requests. However, any non-pointer,
// non-interface field appearing in ForceSendFields will be sent to the
// server regardless of whether the field is empty or not. This may be
// used to include empty fields in Patch requests.
ForceSendFields []string `json:"-"`
// NullFields is a list of field names (e.g. "Etag") to include in API
// requests with the JSON null value. By default, fields with empty
// values are omitted from API requests. However, any field with an
// empty value appearing in NullFields will be sent to the server as
// null. It is an error if a field in this list has a non-empty value.
// This may be used to include null fields in Patch requests.
NullFields []string `json:"-"`
}
func (s *FileList) MarshalJSON() ([]byte, error) {
type NoMethod FileList
raw := NoMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
}
// GeneratedIds: A list of generated IDs which can be provided in insert
// requests
type GeneratedIds struct {
// Ids: The IDs generated for the requesting user in the specified
// space.
Ids []string `json:"ids,omitempty"`
// Kind: This is always drive#generatedIds
Kind string `json:"kind,omitempty"`
// Space: The type of file that can be created with these IDs.
Space string `json:"space,omitempty"`
// ServerResponse contains the HTTP response code and headers from the
// server.
googleapi.ServerResponse `json:"-"`
// ForceSendFields is a list of field names (e.g. "Ids") to
// unconditionally include in API requests. By default, fields with
// empty values are omitted from API requests. However, any non-pointer,
// non-interface field appearing in ForceSendFields will be sent to the
// server regardless of whether the field is empty or not. This may be
// used to include empty fields in Patch requests.
ForceSendFields []string `json:"-"`
// NullFields is a list of field names (e.g. "Ids") to include in API
// requests with the JSON null value. By default, fields with empty
// values are omitted from API requests. However, any field with an
// empty value appearing in NullFields will be sent to the server as
// null. It is an error if a field in this list has a non-empty value.
// This may be used to include null fields in Patch requests.
NullFields []string `json:"-"`
}
func (s *GeneratedIds) MarshalJSON() ([]byte, error) {
type NoMethod GeneratedIds
raw := NoMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
}
// ParentList: A list of a file's parents.
type ParentList struct {
// Etag: The ETag of the list.
Etag string `json:"etag,omitempty"`
// Items: The list of parents.
Items []*ParentReference `json:"items,omitempty"`
// Kind: This is always drive#parentList.
Kind string `json:"kind,omitempty"`
// SelfLink: A link back to this list.
SelfLink string `json:"selfLink,omitempty"`
// ServerResponse contains the HTTP response code and headers from the
// server.
googleapi.ServerResponse `json:"-"`
// ForceSendFields is a list of field names (e.g. "Etag") to
// unconditionally include in API requests. By default, fields with
// empty values are omitted from API requests. However, any non-pointer,
// non-interface field appearing in ForceSendFields will be sent to the
// server regardless of whether the field is empty or not. This may be
// used to include empty fields in Patch requests.
ForceSendFields []string `json:"-"`
// NullFields is a list of field names (e.g. "Etag") to include in API
// requests with the JSON null value. By default, fields with empty
// values are omitted from API requests. However, any field with an
// empty value appearing in NullFields will be sent to the server as
// null. It is an error if a field in this list has a non-empty value.
// This may be used to include null fields in Patch requests.
NullFields []string `json:"-"`
}
func (s *ParentList) MarshalJSON() ([]byte, error) {
type NoMethod ParentList
raw := NoMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
}
// ParentReference: A reference to a file's parent.
type ParentReference struct {
// Id: The ID of the parent.
Id string `json:"id,omitempty"`
// IsRoot: Whether or not the parent is the root folder.
IsRoot bool `json:"isRoot,omitempty"`
// Kind: This is always drive#parentReference.
Kind string `json:"kind,omitempty"`
// ParentLink: A link to the parent.
ParentLink string `json:"parentLink,omitempty"`
// SelfLink: A link back to this reference.
SelfLink string `json:"selfLink,omitempty"`
// ServerResponse contains the HTTP response code and headers from the
// server.
googleapi.ServerResponse `json:"-"`
// ForceSendFields is a list of field names (e.g. "Id") to
// unconditionally include in API requests. By default, fields with
// empty values are omitted from API requests. However, any non-pointer,
// non-interface field appearing in ForceSendFields will be sent to the
// server regardless of whether the field is empty or not. This may be
// used to include empty fields in Patch requests.
ForceSendFields []string `json:"-"`
// NullFields is a list of field names (e.g. "Id") to include in API
// requests with the JSON null value. By default, fields with empty
// values are omitted from API requests. However, any field with an
// empty value appearing in NullFields will be sent to the server as
// null. It is an error if a field in this list has a non-empty value.
// This may be used to include null fields in Patch requests.
NullFields []string `json:"-"`
}
func (s *ParentReference) MarshalJSON() ([]byte, error) {
type NoMethod ParentReference
raw := NoMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
}
// Permission: A permission for a file.
type Permission struct {
// AdditionalRoles: Additional roles for this user. Only commenter is
// currently allowed, though more may be supported in the future.
AdditionalRoles []string `json:"additionalRoles,omitempty"`
// AuthKey: Deprecated.
AuthKey string `json:"authKey,omitempty"`
// Deleted: Whether the account associated with this permission has been
// deleted. This field only pertains to user and group permissions.
Deleted bool `json:"deleted,omitempty"`
// Domain: The domain name of the entity this permission refers to. This
// is an output-only field which is present when the permission type is
// user, group or domain.
Domain string `json:"domain,omitempty"`
// EmailAddress: The email address of the user or group this permission
// refers to. This is an output-only field which is present when the
// permission type is user or group.
EmailAddress string `json:"emailAddress,omitempty"`
// Etag: The ETag of the permission.
Etag string `json:"etag,omitempty"`
// ExpirationDate: The time at which this permission will expire (RFC
// 3339 date-time). Expiration dates have the following restrictions:
//
// - They can only be set on user and group permissions
// - The date must be in the future
// - The date cannot be more than a year in the future
// - The date can only be set on drive.permissions.update or
// drive.permissions.patch requests
ExpirationDate string `json:"expirationDate,omitempty"`
// Id: The ID of the user this permission refers to, and identical to
// the permissionId in the About and Files resources. When making a
// drive.permissions.insert request, exactly one of the id or value
// fields must be specified unless the permission type is anyone, in
// which case both id and value are ignored.
Id string `json:"id,omitempty"`
// Kind: This is always drive#permission.
Kind string `json:"kind,omitempty"`
// Name: The name for this permission.
Name string `json:"name,omitempty"`
// PhotoLink: A link to the profile photo, if available.
PhotoLink string `json:"photoLink,omitempty"`
// Role: The primary role for this user. While new values may be
// supported in the future, the following are currently allowed:
// - owner
// - organizer
// - fileOrganizer
// - writer
// - reader
Role string `json:"role,omitempty"`
// SelfLink: A link back to this permission.
SelfLink string `json:"selfLink,omitempty"`
// TeamDrivePermissionDetails: Details of whether the permissions on
// this Team Drive item are inherited or directly on this item. This is
// an output-only field which is present only for Team Drive items.
TeamDrivePermissionDetails []*PermissionTeamDrivePermissionDetails `json:"teamDrivePermissionDetails,omitempty"`
// Type: The account type. Allowed values are:
// - user
// - group
// - domain
// - anyone
Type string `json:"type,omitempty"`
// Value: The email address or domain name for the entity. This is used
// during inserts and is not populated in responses. When making a
// drive.permissions.insert request, exactly one of the id or value
// fields must be specified unless the permission type is anyone, in
// which case both id and value are ignored.
Value string `json:"value,omitempty"`
// WithLink: Whether the link is required for this permission.
WithLink bool `json:"withLink,omitempty"`
// ServerResponse contains the HTTP response code and headers from the
// server.
googleapi.ServerResponse `json:"-"`
// ForceSendFields is a list of field names (e.g. "AdditionalRoles") to
// unconditionally include in API requests. By default, fields with
// empty values are omitted from API requests. However, any non-pointer,
// non-interface field appearing in ForceSendFields will be sent to the
// server regardless of whether the field is empty or not. This may be
// used to include empty fields in Patch requests.
ForceSendFields []string `json:"-"`
// NullFields is a list of field names (e.g. "AdditionalRoles") to
// include in API requests with the JSON null value. By default, fields
// with empty values are omitted from API requests. However, any field
// with an empty value appearing in NullFields will be sent to the
// server as null. It is an error if a field in this list has a
// non-empty value. This may be used to include null fields in Patch
// requests.
NullFields []string `json:"-"`
}
func (s *Permission) MarshalJSON() ([]byte, error) {
type NoMethod Permission
raw := NoMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
}
type PermissionTeamDrivePermissionDetails struct {
// AdditionalRoles: Additional roles for this user. Only commenter is
// currently possible, though more may be supported in the future.
AdditionalRoles []string `json:"additionalRoles,omitempty"`
// Inherited: Whether this permission is inherited. This field is always
// populated. This is an output-only field.
Inherited bool `json:"inherited,omitempty"`
// InheritedFrom: The ID of the item from which this permission is
// inherited. This is an output-only field and is only populated for
// members of the Team Drive.
InheritedFrom string `json:"inheritedFrom,omitempty"`
// Role: The primary role for this user. While new values may be added
// in the future, the following are currently possible:
// - organizer
// - fileOrganizer
// - writer
// - reader
Role string `json:"role,omitempty"`
// TeamDrivePermissionType: The Team Drive permission type for this
// user. While new values may be added in future, the following are
// currently possible:
// - file
// - member
TeamDrivePermissionType string `json:"teamDrivePermissionType,omitempty"`
// ForceSendFields is a list of field names (e.g. "AdditionalRoles") to
// unconditionally include in API requests. By default, fields with
// empty values are omitted from API requests. However, any non-pointer,
// non-interface field appearing in ForceSendFields will be sent to the
// server regardless of whether the field is empty or not. This may be
// used to include empty fields in Patch requests.
ForceSendFields []string `json:"-"`
// NullFields is a list of field names (e.g. "AdditionalRoles") to
// include in API requests with the JSON null value. By default, fields
// with empty values are omitted from API requests. However, any field
// with an empty value appearing in NullFields will be sent to the
// server as null. It is an error if a field in this list has a
// non-empty value. This may be used to include null fields in Patch
// requests.
NullFields []string `json:"-"`
}
func (s *PermissionTeamDrivePermissionDetails) MarshalJSON() ([]byte, error) {
type NoMethod PermissionTeamDrivePermissionDetails
raw := NoMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
}
// PermissionId: An ID for a user or group as seen in Permission items.
type PermissionId struct {
// Id: The permission ID.
Id string `json:"id,omitempty"`
// Kind: This is always drive#permissionId.
Kind string `json:"kind,omitempty"`
// ServerResponse contains the HTTP response code and headers from the
// server.
googleapi.ServerResponse `json:"-"`
// ForceSendFields is a list of field names (e.g. "Id") to
// unconditionally include in API requests. By default, fields with
// empty values are omitted from API requests. However, any non-pointer,
// non-interface field appearing in ForceSendFields will be sent to the
// server regardless of whether the field is empty or not. This may be
// used to include empty fields in Patch requests.
ForceSendFields []string `json:"-"`
// NullFields is a list of field names (e.g. "Id") to include in API
// requests with the JSON null value. By default, fields with empty
// values are omitted from API requests. However, any field with an
// empty value appearing in NullFields will be sent to the server as
// null. It is an error if a field in this list has a non-empty value.
// This may be used to include null fields in Patch requests.
NullFields []string `json:"-"`
}
func (s *PermissionId) MarshalJSON() ([]byte, error) {
type NoMethod PermissionId
raw := NoMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
}
// PermissionList: A list of permissions associated with a file.
type PermissionList struct {
// Etag: The ETag of the list.
Etag string `json:"etag,omitempty"`
// Items: The list of permissions.
Items []*Permission `json:"items,omitempty"`
// Kind: This is always drive#permissionList.
Kind string `json:"kind,omitempty"`
// NextPageToken: The page token for the next page of permissions. This
// field will be absent if the end of the permissions list has been
// reached. If the token is rejected for any reason, it should be
// discarded, and pagination should be restarted from the first page of
// results.
NextPageToken string `json:"nextPageToken,omitempty"`
// SelfLink: A link back to this list.
SelfLink string `json:"selfLink,omitempty"`
// ServerResponse contains the HTTP response code and headers from the
// server.
googleapi.ServerResponse `json:"-"`
// ForceSendFields is a list of field names (e.g. "Etag") to
// unconditionally include in API requests. By default, fields with
// empty values are omitted from API requests. However, any non-pointer,
// non-interface field appearing in ForceSendFields will be sent to the
// server regardless of whether the field is empty or not. This may be
// used to include empty fields in Patch requests.
ForceSendFields []string `json:"-"`
// NullFields is a list of field names (e.g. "Etag") to include in API
// requests with the JSON null value. By default, fields with empty
// values are omitted from API requests. However, any field with an
// empty value appearing in NullFields will be sent to the server as
// null. It is an error if a field in this list has a non-empty value.
// This may be used to include null fields in Patch requests.
NullFields []string `json:"-"`
}
func (s *PermissionList) MarshalJSON() ([]byte, error) {
type NoMethod PermissionList
raw := NoMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
}
// Property: A key-value pair attached to a file that is either public
// or private to an application.
// The following limits apply to file properties:
// - Maximum of 100 properties total per file
// - Maximum of 30 private properties per app
// - Maximum of 30 public properties
// - Maximum of 124 bytes size limit on (key + value) string in UTF-8
// encoding for a single property.
type Property struct {
// Etag: ETag of the property.
Etag string `json:"etag,omitempty"`
// Key: The key of this property.
Key string `json:"key,omitempty"`
// Kind: This is always drive#property.
Kind string `json:"kind,omitempty"`
// SelfLink: The link back to this property.
SelfLink string `json:"selfLink,omitempty"`
// Value: The value of this property.
Value string `json:"value,omitempty"`
// Visibility: The visibility of this property. Allowed values are
// PRIVATE and PUBLIC. (Default: PRIVATE)
Visibility string `json:"visibility,omitempty"`
// ServerResponse contains the HTTP response code and headers from the
// server.
googleapi.ServerResponse `json:"-"`
// ForceSendFields is a list of field names (e.g. "Etag") to
// unconditionally include in API requests. By default, fields with
// empty values are omitted from API requests. However, any non-pointer,
// non-interface field appearing in ForceSendFields will be sent to the
// server regardless of whether the field is empty or not. This may be
// used to include empty fields in Patch requests.
ForceSendFields []string `json:"-"`
// NullFields is a list of field names (e.g. "Etag") to include in API
// requests with the JSON null value. By default, fields with empty
// values are omitted from API requests. However, any field with an
// empty value appearing in NullFields will be sent to the server as
// null. It is an error if a field in this list has a non-empty value.
// This may be used to include null fields in Patch requests.
NullFields []string `json:"-"`
}
func (s *Property) MarshalJSON() ([]byte, error) {
type NoMethod Property
raw := NoMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
}
// PropertyList: A collection of properties, key-value pairs that are
// either public or private to an application.
type PropertyList struct {
// Etag: The ETag of the list.
Etag string `json:"etag,omitempty"`
// Items: The list of properties.
Items []*Property `json:"items,omitempty"`
// Kind: This is always drive#propertyList.
Kind string `json:"kind,omitempty"`
// SelfLink: The link back to this list.
SelfLink string `json:"selfLink,omitempty"`
// ServerResponse contains the HTTP response code and headers from the
// server.
googleapi.ServerResponse `json:"-"`
// ForceSendFields is a list of field names (e.g. "Etag") to
// unconditionally include in API requests. By default, fields with
// empty values are omitted from API requests. However, any non-pointer,
// non-interface field appearing in ForceSendFields will be sent to the
// server regardless of whether the field is empty or not. This may be
// used to include empty fields in Patch requests.
ForceSendFields []string `json:"-"`
// NullFields is a list of field names (e.g. "Etag") to include in API
// requests with the JSON null value. By default, fields with empty
// values are omitted from API requests. However, any field with an
// empty value appearing in NullFields will be sent to the server as
// null. It is an error if a field in this list has a non-empty value.
// This may be used to include null fields in Patch requests.
NullFields []string `json:"-"`
}
func (s *PropertyList) MarshalJSON() ([]byte, error) {
type NoMethod PropertyList
raw := NoMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
}
// Revision: A revision of a file.
type Revision struct {
// DownloadUrl: Short term download URL for the file. This will only be
// populated on files with content stored in Drive.
DownloadUrl string `json:"downloadUrl,omitempty"`
// Etag: The ETag of the revision.
Etag string `json:"etag,omitempty"`
// ExportLinks: Links for exporting Google Docs to specific formats.
ExportLinks map[string]string `json:"exportLinks,omitempty"`
// FileSize: The size of the revision in bytes. This will only be
// populated on files with content stored in Drive.
FileSize int64 `json:"fileSize,omitempty,string"`
// Id: The ID of the revision.
Id string `json:"id,omitempty"`
// Kind: This is always drive#revision.
Kind string `json:"kind,omitempty"`
// LastModifyingUser: The last user to modify this revision.
LastModifyingUser *User `json:"lastModifyingUser,omitempty"`
// LastModifyingUserName: Name of the last user to modify this revision.
LastModifyingUserName string `json:"lastModifyingUserName,omitempty"`
// Md5Checksum: An MD5 checksum for the content of this revision. This
// will only be populated on files with content stored in Drive.
Md5Checksum string `json:"md5Checksum,omitempty"`
// MimeType: The MIME type of the revision.
MimeType string `json:"mimeType,omitempty"`
// ModifiedDate: Last time this revision was modified (formatted RFC
// 3339 timestamp).
ModifiedDate string `json:"modifiedDate,omitempty"`
// OriginalFilename: The original filename when this revision was
// created. This will only be populated on files with content stored in
// Drive.
OriginalFilename string `json:"originalFilename,omitempty"`
// Pinned: Whether this revision is pinned to prevent automatic purging.
// This will only be populated and can only be modified on files with
// content stored in Drive which are not Google Docs. Revisions can also
// be pinned when they are created through the
// drive.files.insert/update/copy by using the pinned query parameter.
Pinned bool `json:"pinned,omitempty"`
// PublishAuto: Whether subsequent revisions will be automatically
// republished. This is only populated and can only be modified for
// Google Docs.
PublishAuto bool `json:"publishAuto,omitempty"`
// Published: Whether this revision is published. This is only populated
// and can only be modified for Google Docs.
Published bool `json:"published,omitempty"`
// PublishedLink: A link to the published revision.
PublishedLink string `json:"publishedLink,omitempty"`
// PublishedOutsideDomain: Whether this revision is published outside
// the domain. This is only populated and can only be modified for
// Google Docs.
PublishedOutsideDomain bool `json:"publishedOutsideDomain,omitempty"`
// SelfLink: A link back to this revision.
SelfLink string `json:"selfLink,omitempty"`
// ServerResponse contains the HTTP response code and headers from the
// server.
googleapi.ServerResponse `json:"-"`
// ForceSendFields is a list of field names (e.g. "DownloadUrl") to
// unconditionally include in API requests. By default, fields with
// empty values are omitted from API requests. However, any non-pointer,
// non-interface field appearing in ForceSendFields will be sent to the
// server regardless of whether the field is empty or not. This may be
// used to include empty fields in Patch requests.
ForceSendFields []string `json:"-"`
// NullFields is a list of field names (e.g. "DownloadUrl") to include
// in API requests with the JSON null value. By default, fields with
// empty values are omitted from API requests. However, any field with
// an empty value appearing in NullFields will be sent to the server as
// null. It is an error if a field in this list has a non-empty value.
// This may be used to include null fields in Patch requests.
NullFields []string `json:"-"`
}
func (s *Revision) MarshalJSON() ([]byte, error) {
type NoMethod Revision
raw := NoMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
}
// RevisionList: A list of revisions of a file.
type RevisionList struct {
// Etag: The ETag of the list.
Etag string `json:"etag,omitempty"`
// Items: The list of revisions. If nextPageToken is populated, then
// this list may be incomplete and an additional page of results should
// be fetched.
Items []*Revision `json:"items,omitempty"`
// Kind: This is always drive#revisionList.
Kind string `json:"kind,omitempty"`
// NextPageToken: The page token for the next page of revisions. This
// field will be absent if the end of the revisions list has been
// reached. If the token is rejected for any reason, it should be
// discarded and pagination should be restarted from the first page of
// results.
NextPageToken string `json:"nextPageToken,omitempty"`
// SelfLink: A link back to this list.
SelfLink string `json:"selfLink,omitempty"`
// ServerResponse contains the HTTP response code and headers from the
// server.
googleapi.ServerResponse `json:"-"`
// ForceSendFields is a list of field names (e.g. "Etag") to
// unconditionally include in API requests. By default, fields with
// empty values are omitted from API requests. However, any non-pointer,
// non-interface field appearing in ForceSendFields will be sent to the
// server regardless of whether the field is empty or not. This may be
// used to include empty fields in Patch requests.
ForceSendFields []string `json:"-"`
// NullFields is a list of field names (e.g. "Etag") to include in API
// requests with the JSON null value. By default, fields with empty
// values are omitted from API requests. However, any field with an
// empty value appearing in NullFields will be sent to the server as
// null. It is an error if a field in this list has a non-empty value.
// This may be used to include null fields in Patch requests.
NullFields []string `json:"-"`
}
func (s *RevisionList) MarshalJSON() ([]byte, error) {
type NoMethod RevisionList
raw := NoMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
}
type StartPageToken struct {
// Kind: Identifies what kind of resource this is. Value: the fixed
// string "drive#startPageToken".
Kind string `json:"kind,omitempty"`
// StartPageToken: The starting page token for listing changes.
StartPageToken string `json:"startPageToken,omitempty"`
// ServerResponse contains the HTTP response code and headers from the
// server.
googleapi.ServerResponse `json:"-"`
// ForceSendFields is a list of field names (e.g. "Kind") to
// unconditionally include in API requests. By default, fields with
// empty values are omitted from API requests. However, any non-pointer,
// non-interface field appearing in ForceSendFields will be sent to the
// server regardless of whether the field is empty or not. This may be
// used to include empty fields in Patch requests.
ForceSendFields []string `json:"-"`
// NullFields is a list of field names (e.g. "Kind") to include in API
// requests with the JSON null value. By default, fields with empty
// values are omitted from API requests. However, any field with an
// empty value appearing in NullFields will be sent to the server as
// null. It is an error if a field in this list has a non-empty value.
// This may be used to include null fields in Patch requests.
NullFields []string `json:"-"`
}
func (s *StartPageToken) MarshalJSON() ([]byte, error) {
type NoMethod StartPageToken
raw := NoMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
}
// TeamDrive: Representation of a Team Drive.
type TeamDrive struct {
// BackgroundImageFile: An image file and cropping parameters from which
// a background image for this Team Drive is set. This is a write only
// field; it can only be set on drive.teamdrives.update requests that
// don't set themeId. When specified, all fields of the
// backgroundImageFile must be set.
BackgroundImageFile *TeamDriveBackgroundImageFile `json:"backgroundImageFile,omitempty"`
// BackgroundImageLink: A short-lived link to this Team Drive's
// background image.
BackgroundImageLink string `json:"backgroundImageLink,omitempty"`
// Capabilities: Capabilities the current user has on this Team Drive.
Capabilities *TeamDriveCapabilities `json:"capabilities,omitempty"`
// ColorRgb: The color of this Team Drive as an RGB hex string. It can
// only be set on a drive.teamdrives.update request that does not set
// themeId.
ColorRgb string `json:"colorRgb,omitempty"`
// CreatedDate: The time at which the Team Drive was created (RFC 3339
// date-time).
CreatedDate string `json:"createdDate,omitempty"`
// Id: The ID of this Team Drive which is also the ID of the top level
// folder of this Team Drive.
Id string `json:"id,omitempty"`
// Kind: This is always drive#teamDrive
Kind string `json:"kind,omitempty"`
// Name: The name of this Team Drive.
Name string `json:"name,omitempty"`
// Restrictions: A set of restrictions that apply to this Team Drive or
// items inside this Team Drive.
Restrictions *TeamDriveRestrictions `json:"restrictions,omitempty"`
// ThemeId: The ID of the theme from which the background image and
// color will be set. The set of possible teamDriveThemes can be
// retrieved from a drive.about.get response. When not specified on a
// drive.teamdrives.insert request, a random theme is chosen from which
// the background image and color are set. This is a write-only field;
// it can only be set on requests that don't set colorRgb or
// backgroundImageFile.
ThemeId string `json:"themeId,omitempty"`
// ServerResponse contains the HTTP response code and headers from the
// server.
googleapi.ServerResponse `json:"-"`
// ForceSendFields is a list of field names (e.g. "BackgroundImageFile")
// to unconditionally include in API requests. By default, fields with
// empty values are omitted from API requests. However, any non-pointer,
// non-interface field appearing in ForceSendFields will be sent to the
// server regardless of whether the field is empty or not. This may be
// used to include empty fields in Patch requests.
ForceSendFields []string `json:"-"`
// NullFields is a list of field names (e.g. "BackgroundImageFile") to
// include in API requests with the JSON null value. By default, fields
// with empty values are omitted from API requests. However, any field
// with an empty value appearing in NullFields will be sent to the
// server as null. It is an error if a field in this list has a
// non-empty value. This may be used to include null fields in Patch
// requests.
NullFields []string `json:"-"`
}
func (s *TeamDrive) MarshalJSON() ([]byte, error) {
type NoMethod TeamDrive
raw := NoMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
}
// TeamDriveBackgroundImageFile: An image file and cropping parameters
// from which a background image for this Team Drive is set. This is a
// write only field; it can only be set on drive.teamdrives.update
// requests that don't set themeId. When specified, all fields of the
// backgroundImageFile must be set.
type TeamDriveBackgroundImageFile struct {
// Id: The ID of an image file in Drive to use for the background image.
Id string `json:"id,omitempty"`
// Width: The width of the cropped image in the closed range of 0 to 1.
// This value represents the width of the cropped image divided by the
// width of the entire image. The height is computed by applying a width
// to height aspect ratio of 80 to 9. The resulting image must be at
// least 1280 pixels wide and 144 pixels high.
Width float64 `json:"width,omitempty"`
// XCoordinate: The X coordinate of the upper left corner of the
// cropping area in the background image. This is a value in the closed
// range of 0 to 1. This value represents the horizontal distance from
// the left side of the entire image to the left side of the cropping
// area divided by the width of the entire image.
XCoordinate float64 `json:"xCoordinate,omitempty"`
// YCoordinate: The Y coordinate of the upper left corner of the
// cropping area in the background image. This is a value in the closed
// range of 0 to 1. This value represents the vertical distance from the
// top side of the entire image to the top side of the cropping area
// divided by the height of the entire image.
YCoordinate float64 `json:"yCoordinate,omitempty"`
// ForceSendFields is a list of field names (e.g. "Id") to
// unconditionally include in API requests. By default, fields with
// empty values are omitted from API requests. However, any non-pointer,
// non-interface field appearing in ForceSendFields will be sent to the
// server regardless of whether the field is empty or not. This may be
// used to include empty fields in Patch requests.
ForceSendFields []string `json:"-"`
// NullFields is a list of field names (e.g. "Id") to include in API
// requests with the JSON null value. By default, fields with empty
// values are omitted from API requests. However, any field with an
// empty value appearing in NullFields will be sent to the server as
// null. It is an error if a field in this list has a non-empty value.
// This may be used to include null fields in Patch requests.
NullFields []string `json:"-"`
}
func (s *TeamDriveBackgroundImageFile) MarshalJSON() ([]byte, error) {
type NoMethod TeamDriveBackgroundImageFile
raw := NoMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
}
func (s *TeamDriveBackgroundImageFile) UnmarshalJSON(data []byte) error {
type NoMethod TeamDriveBackgroundImageFile
var s1 struct {
Width gensupport.JSONFloat64 `json:"width"`
XCoordinate gensupport.JSONFloat64 `json:"xCoordinate"`
YCoordinate gensupport.JSONFloat64 `json:"yCoordinate"`
*NoMethod
}
s1.NoMethod = (*NoMethod)(s)
if err := json.Unmarshal(data, &s1); err != nil {
return err
}
s.Width = float64(s1.Width)
s.XCoordinate = float64(s1.XCoordinate)
s.YCoordinate = float64(s1.YCoordinate)
return nil
}
// TeamDriveCapabilities: Capabilities the current user has on this Team
// Drive.
type TeamDriveCapabilities struct {
// CanAddChildren: Whether the current user can add children to folders
// in this Team Drive.
CanAddChildren bool `json:"canAddChildren,omitempty"`
// CanChangeCopyRequiresWriterPermissionRestriction: Whether the current
// user can change the copyRequiresWriterPermission restriction of this
// Team Drive.
CanChangeCopyRequiresWriterPermissionRestriction bool `json:"canChangeCopyRequiresWriterPermissionRestriction,omitempty"`
// CanChangeDomainUsersOnlyRestriction: Whether the current user can
// change the domainUsersOnly restriction of this Team Drive.
CanChangeDomainUsersOnlyRestriction bool `json:"canChangeDomainUsersOnlyRestriction,omitempty"`
// CanChangeTeamDriveBackground: Whether the current user can change the
// background of this Team Drive.
CanChangeTeamDriveBackground bool `json:"canChangeTeamDriveBackground,omitempty"`
// CanChangeTeamMembersOnlyRestriction: Whether the current user can
// change the teamMembersOnly restriction of this Team Drive.
CanChangeTeamMembersOnlyRestriction bool `json:"canChangeTeamMembersOnlyRestriction,omitempty"`
// CanComment: Whether the current user can comment on files in this
// Team Drive.
CanComment bool `json:"canComment,omitempty"`
// CanCopy: Whether the current user can copy files in this Team Drive.
CanCopy bool `json:"canCopy,omitempty"`
// CanDeleteChildren: Whether the current user can delete children from
// folders in this Team Drive.
CanDeleteChildren bool `json:"canDeleteChildren,omitempty"`
// CanDeleteTeamDrive: Whether the current user can delete this Team
// Drive. Attempting to delete the Team Drive may still fail if there
// are untrashed items inside the Team Drive.
CanDeleteTeamDrive bool `json:"canDeleteTeamDrive,omitempty"`
// CanDownload: Whether the current user can download files in this Team
// Drive.
CanDownload bool `json:"canDownload,omitempty"`
// CanEdit: Whether the current user can edit files in this Team Drive
CanEdit bool `json:"canEdit,omitempty"`
// CanListChildren: Whether the current user can list the children of
// folders in this Team Drive.
CanListChildren bool `json:"canListChildren,omitempty"`
// CanManageMembers: Whether the current user can add members to this
// Team Drive or remove them or change their role.
CanManageMembers bool `json:"canManageMembers,omitempty"`
// CanReadRevisions: Whether the current user can read the revisions
// resource of files in this Team Drive.
CanReadRevisions bool `json:"canReadRevisions,omitempty"`
// CanRemoveChildren: Deprecated - use canDeleteChildren or
// canTrashChildren instead.
CanRemoveChildren bool `json:"canRemoveChildren,omitempty"`
// CanRename: Whether the current user can rename files or folders in
// this Team Drive.
CanRename bool `json:"canRename,omitempty"`
// CanRenameTeamDrive: Whether the current user can rename this Team
// Drive.
CanRenameTeamDrive bool `json:"canRenameTeamDrive,omitempty"`
// CanShare: Whether the current user can share files or folders in this
// Team Drive.
CanShare bool `json:"canShare,omitempty"`
// CanTrashChildren: Whether the current user can trash children from
// folders in this Team Drive.
CanTrashChildren bool `json:"canTrashChildren,omitempty"`
// ForceSendFields is a list of field names (e.g. "CanAddChildren") to
// unconditionally include in API requests. By default, fields with
// empty values are omitted from API requests. However, any non-pointer,
// non-interface field appearing in ForceSendFields will be sent to the
// server regardless of whether the field is empty or not. This may be
// used to include empty fields in Patch requests.
ForceSendFields []string `json:"-"`
// NullFields is a list of field names (e.g. "CanAddChildren") to
// include in API requests with the JSON null value. By default, fields
// with empty values are omitted from API requests. However, any field
// with an empty value appearing in NullFields will be sent to the
// server as null. It is an error if a field in this list has a
// non-empty value. This may be used to include null fields in Patch
// requests.
NullFields []string `json:"-"`
}
func (s *TeamDriveCapabilities) MarshalJSON() ([]byte, error) {
type NoMethod TeamDriveCapabilities
raw := NoMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
}
// TeamDriveRestrictions: A set of restrictions that apply to this Team
// Drive or items inside this Team Drive.
type TeamDriveRestrictions struct {
// AdminManagedRestrictions: Whether administrative privileges on this
// Team Drive are required to modify restrictions.
AdminManagedRestrictions bool `json:"adminManagedRestrictions,omitempty"`
// CopyRequiresWriterPermission: Whether the options to copy, print, or
// download files inside this Team Drive, should be disabled for readers
// and commenters. When this restriction is set to true, it will
// override the similarly named field to true for any file inside this
// Team Drive.
CopyRequiresWriterPermission bool `json:"copyRequiresWriterPermission,omitempty"`
// DomainUsersOnly: Whether access to this Team Drive and items inside
// this Team Drive is restricted to users of the domain to which this
// Team Drive belongs. This restriction may be overridden by other
// sharing policies controlled outside of this Team Drive.
DomainUsersOnly bool `json:"domainUsersOnly,omitempty"`
// TeamMembersOnly: Whether access to items inside this Team Drive is
// restricted to members of this Team Drive.
TeamMembersOnly bool `json:"teamMembersOnly,omitempty"`
// ForceSendFields is a list of field names (e.g.
// "AdminManagedRestrictions") to unconditionally include in API
// requests. By default, fields with empty values are omitted from API
// requests. However, any non-pointer, non-interface field appearing in
// ForceSendFields will be sent to the server regardless of whether the
// field is empty or not. This may be used to include empty fields in
// Patch requests.
ForceSendFields []string `json:"-"`
// NullFields is a list of field names (e.g. "AdminManagedRestrictions")
// to include in API requests with the JSON null value. By default,
// fields with empty values are omitted from API requests. However, any
// field with an empty value appearing in NullFields will be sent to the
// server as null. It is an error if a field in this list has a
// non-empty value. This may be used to include null fields in Patch
// requests.
NullFields []string `json:"-"`
}
func (s *TeamDriveRestrictions) MarshalJSON() ([]byte, error) {
type NoMethod TeamDriveRestrictions
raw := NoMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
}
// TeamDriveList: A list of Team Drives.
type TeamDriveList struct {
// Items: The list of Team Drives.
Items []*TeamDrive `json:"items,omitempty"`
// Kind: This is always drive#teamDriveList
Kind string `json:"kind,omitempty"`
// NextPageToken: The page token for the next page of Team Drives.
NextPageToken string `json:"nextPageToken,omitempty"`
// ServerResponse contains the HTTP response code and headers from the
// server.
googleapi.ServerResponse `json:"-"`
// ForceSendFields is a list of field names (e.g. "Items") to
// unconditionally include in API requests. By default, fields with
// empty values are omitted from API requests. However, any non-pointer,
// non-interface field appearing in ForceSendFields will be sent to the
// server regardless of whether the field is empty or not. This may be
// used to include empty fields in Patch requests.
ForceSendFields []string `json:"-"`
// NullFields is a list of field names (e.g. "Items") to include in API
// requests with the JSON null value. By default, fields with empty
// values are omitted from API requests. However, any field with an
// empty value appearing in NullFields will be sent to the server as
// null. It is an error if a field in this list has a non-empty value.
// This may be used to include null fields in Patch requests.
NullFields []string `json:"-"`
}
func (s *TeamDriveList) MarshalJSON() ([]byte, error) {
type NoMethod TeamDriveList
raw := NoMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
}
// User: Information about a Drive user.
type User struct {
// DisplayName: A plain text displayable name for this user.
DisplayName string `json:"displayName,omitempty"`
// EmailAddress: The email address of the user.
EmailAddress string `json:"emailAddress,omitempty"`
// IsAuthenticatedUser: Whether this user is the same as the
// authenticated user for whom the request was made.
IsAuthenticatedUser bool `json:"isAuthenticatedUser,omitempty"`
// Kind: This is always drive#user.
Kind string `json:"kind,omitempty"`
// PermissionId: The user's ID as visible in the permissions collection.
PermissionId string `json:"permissionId,omitempty"`
// Picture: The user's profile picture.
Picture *UserPicture `json:"picture,omitempty"`
// ForceSendFields is a list of field names (e.g. "DisplayName") to
// unconditionally include in API requests. By default, fields with
// empty values are omitted from API requests. However, any non-pointer,
// non-interface field appearing in ForceSendFields will be sent to the
// server regardless of whether the field is empty or not. This may be
// used to include empty fields in Patch requests.
ForceSendFields []string `json:"-"`
// NullFields is a list of field names (e.g. "DisplayName") to include
// in API requests with the JSON null value. By default, fields with
// empty values are omitted from API requests. However, any field with
// an empty value appearing in NullFields will be sent to the server as
// null. It is an error if a field in this list has a non-empty value.
// This may be used to include null fields in Patch requests.
NullFields []string `json:"-"`
}
func (s *User) MarshalJSON() ([]byte, error) {
type NoMethod User
raw := NoMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
}
// UserPicture: The user's profile picture.
type UserPicture struct {
// Url: A URL that points to a profile picture of this user.
Url string `json:"url,omitempty"`
// ForceSendFields is a list of field names (e.g. "Url") to
// unconditionally include in API requests. By default, fields with
// empty values are omitted from API requests. However, any non-pointer,
// non-interface field appearing in ForceSendFields will be sent to the
// server regardless of whether the field is empty or not. This may be
// used to include empty fields in Patch requests.
ForceSendFields []string `json:"-"`
// NullFields is a list of field names (e.g. "Url") to include in API
// requests with the JSON null value. By default, fields with empty
// values are omitted from API requests. However, any field with an
// empty value appearing in NullFields will be sent to the server as
// null. It is an error if a field in this list has a non-empty value.
// This may be used to include null fields in Patch requests.
NullFields []string `json:"-"`
}
func (s *UserPicture) MarshalJSON() ([]byte, error) {
type NoMethod UserPicture
raw := NoMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
}
// method id "drive.about.get":
type AboutGetCall struct {
s *Service
urlParams_ gensupport.URLParams
ifNoneMatch_ string
ctx_ context.Context
header_ http.Header
}
// Get: Gets the information about the current user along with Drive API
// settings
func (r *AboutService) Get() *AboutGetCall {
c := &AboutGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
return c
}
// IncludeSubscribed sets the optional parameter "includeSubscribed":
// Whether to count changes outside the My Drive hierarchy. When set to
// false, changes to files such as those in the Application Data folder
// or shared files which have not been added to My Drive will be omitted
// from the maxChangeIdCount.
func (c *AboutGetCall) IncludeSubscribed(includeSubscribed bool) *AboutGetCall {
c.urlParams_.Set("includeSubscribed", fmt.Sprint(includeSubscribed))
return c
}
// MaxChangeIdCount sets the optional parameter "maxChangeIdCount":
// Maximum number of remaining change IDs to count
func (c *AboutGetCall) MaxChangeIdCount(maxChangeIdCount int64) *AboutGetCall {
c.urlParams_.Set("maxChangeIdCount", fmt.Sprint(maxChangeIdCount))
return c
}
// StartChangeId sets the optional parameter "startChangeId": Change ID
// to start counting from when calculating number of remaining change
// IDs
func (c *AboutGetCall) StartChangeId(startChangeId int64) *AboutGetCall {
c.urlParams_.Set("startChangeId", fmt.Sprint(startChangeId))
return c
}
// Fields allows partial responses to be retrieved. See
// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
// for more information.
func (c *AboutGetCall) Fields(s ...googleapi.Field) *AboutGetCall {
c.urlParams_.Set("fields", googleapi.CombineFields(s))
return c
}
// IfNoneMatch sets the optional parameter which makes the operation
// fail if the object's ETag matches the given value. This is useful for
// getting updates only after the object has changed since the last
// request. Use googleapi.IsNotModified to check whether the response
// error from Do is the result of In-None-Match.
func (c *AboutGetCall) IfNoneMatch(entityTag string) *AboutGetCall {
c.ifNoneMatch_ = entityTag
return c
}
// Context sets the context to be used in this call's Do method. Any
// pending HTTP request will be aborted if the provided context is
// canceled.
func (c *AboutGetCall) Context(ctx context.Context) *AboutGetCall {
c.ctx_ = ctx
return c
}
// Header returns an http.Header that can be modified by the caller to
// add HTTP headers to the request.
func (c *AboutGetCall) Header() http.Header {
if c.header_ == nil {
c.header_ = make(http.Header)
}
return c.header_
}
func (c *AboutGetCall) doRequest(alt string) (*http.Response, error) {
reqHeaders := make(http.Header)
for k, v := range c.header_ {
reqHeaders[k] = v
}
reqHeaders.Set("User-Agent", c.s.userAgent())
if c.ifNoneMatch_ != "" {
reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
}
var body io.Reader = nil
c.urlParams_.Set("alt", alt)
c.urlParams_.Set("prettyPrint", "false")
urls := googleapi.ResolveRelative(c.s.BasePath, "about")
urls += "?" + c.urlParams_.Encode()
req, err := http.NewRequest("GET", urls, body)
if err != nil {
return nil, err
}
req.Header = reqHeaders
return gensupport.SendRequest(c.ctx_, c.s.client, req)
}
// Do executes the "drive.about.get" call.
// Exactly one of *About or error will be non-nil. Any non-2xx status
// code is an error. Response headers are in either
// *About.ServerResponse.Header or (if a response was returned at all)
// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
// check whether the returned error was because http.StatusNotModified
// was returned.
func (c *AboutGetCall) Do(opts ...googleapi.CallOption) (*About, error) {
gensupport.SetOptions(c.urlParams_, opts...)
res, err := c.doRequest("json")
if res != nil && res.StatusCode == http.StatusNotModified {
if res.Body != nil {
res.Body.Close()
}
return nil, &googleapi.Error{
Code: res.StatusCode,
Header: res.Header,
}
}
if err != nil {
return nil, err
}
defer googleapi.CloseBody(res)
if err := googleapi.CheckResponse(res); err != nil {
return nil, err
}
ret := &About{
ServerResponse: googleapi.ServerResponse{
Header: res.Header,
HTTPStatusCode: res.StatusCode,
},
}
target := &ret
if err := gensupport.DecodeResponse(target, res); err != nil {
return nil, err
}
return ret, nil
// {
// "description": "Gets the information about the current user along with Drive API settings",
// "httpMethod": "GET",
// "id": "drive.about.get",
// "parameters": {
// "includeSubscribed": {
// "default": "true",
// "description": "Whether to count changes outside the My Drive hierarchy. When set to false, changes to files such as those in the Application Data folder or shared files which have not been added to My Drive will be omitted from the maxChangeIdCount.",
// "location": "query",
// "type": "boolean"
// },
// "maxChangeIdCount": {
// "default": "1",
// "description": "Maximum number of remaining change IDs to count",
// "format": "int64",
// "location": "query",
// "type": "string"
// },
// "startChangeId": {
// "description": "Change ID to start counting from when calculating number of remaining change IDs",
// "format": "int64",
// "location": "query",
// "type": "string"
// }
// },
// "path": "about",
// "response": {
// "$ref": "About"
// },
// "scopes": [
// "https://www.googleapis.com/auth/drive",
// "https://www.googleapis.com/auth/drive.appdata",
// "https://www.googleapis.com/auth/drive.file",
// "https://www.googleapis.com/auth/drive.metadata",
// "https://www.googleapis.com/auth/drive.metadata.readonly",
// "https://www.googleapis.com/auth/drive.photos.readonly",
// "https://www.googleapis.com/auth/drive.readonly"
// ]
// }
}
// method id "drive.apps.get":
type AppsGetCall struct {
s *Service
appId string
urlParams_ gensupport.URLParams
ifNoneMatch_ string
ctx_ context.Context
header_ http.Header
}
// Get: Gets a specific app.
func (r *AppsService) Get(appId string) *AppsGetCall {
c := &AppsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
c.appId = appId
return c
}
// Fields allows partial responses to be retrieved. See
// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
// for more information.
func (c *AppsGetCall) Fields(s ...googleapi.Field) *AppsGetCall {
c.urlParams_.Set("fields", googleapi.CombineFields(s))
return c
}
// IfNoneMatch sets the optional parameter which makes the operation
// fail if the object's ETag matches the given value. This is useful for
// getting updates only after the object has changed since the last